Usage of Geantino and track colors

Dear all,

My question is simple, but I have no idea if this is at all possible with Geant4.

I know that the Geantino has no interactions whatsoever, but I’d like to have different track colors depending on the amount of material the Geantino passes through. In addition, I’d like to be able to compute how much material (say in mm) has a given geantino passed through.
Are there methods to compute the above?

Many thanks in advance.

_Geant4 Version:_11.02
_Operating System:_GNU/Linux (conda environment)
Compiler/Version:
CMake Version:


Hi Leonardo

Simple question, but not so simple solution…

As you know, we have a range of trajectory models, but none that can handle accumulated material. I can only suggest you write your own trajectory.

As for computing the amount of material the geantino passes through, I guess you can do this at each step (in your stepping action) with information available there. Your trajectory should be designed to store the accumulated material at each step. Then in your DrawTrajectory, draw each step with a colour according to the accumulated material. The vis manager will invoke this if you /vis/scene/add/trajectories.

Have a look at examples/extended/runAndEvent/RE01 and RE04, and examples/extended/optical/LXe.

Hope that helps
John

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.