About the range of protons in a target

Hello, experts,

I wonder how to get the range of protons in a target. I try to use GetPostStepPoint()->GetPosition()).z() to get the position in the z direction, since the proton is incident along the z direction. Then, I think when the last position.z in the target is found, I can get the difference of initial and final points along the z direction, namely the range. However, it puzzles me how to select the last position.z, which means that another condition needs to be set for selecting the last position.z among all the output positions of z. The only one I could name out is the energy cut value for the last position.z, which I still do not know how to set. Therefore, could you give me some advice on this? Or is there another method to achieve the range of protons in a target?

Thank you in advance.

Best regards,


1 Like