User defined Gamma tracking

Hi everyone,

I’m currently trying to calculate the gamma path length inside the gamma emitting volume. I have modified the B4c example to do so. My gamma source is a cylinder of 14.5 mm of radius and 10 mm height. The primary photons are all parallel as pictured in the following figure :

My sensitive detector is the gamma source and simulations gives me a path length distribution. The problm is that some photons have a length superior to the source height. If I understand correctly how GEANT4 works, it’s because each primary particles are tracked until the cut-off, a gamma scattered will remains the same gamma for the tracking. Therefore by multiple scattering, the gamma path lengh inside the source can be superior to the sensitive detector height. Am I correct here ? Using geantino instead of gamma gives what I expect.

Is it possible to stop the tracking of a photon after a user-defined energy loss ?

Your interpretation is correct. The path length is the total path travelled, which can be longer than your naive volume thickness. If you’re not interested in the true path, you could use the initial and final coordinates along the appropriate axis (Z?) to get the effective thickness traversed.

If you want to kill tracks “early”, you can do so. I thought G4UserLimits could do it, but it checks on absolute (kinetic) energy, not on accumulated energy loss. You could write your own limiting process and add it to the physics list.

Thanks a lot, I used your idea with the coordinates and it’s seems to be working

@Alkra how did you make that cylindrical beam source

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