Limiting post-step point inside the boundary

Hi All,

For a specific detector/geometry and when a boundary is being passed, I need to limit the post-step point to the same volume as the pre-step point. Any comments on how to do so would be so much appreciated.

Thank you,

Is the track being killed at the boundary? Otherwise, you can’t. The post-step point, with coordinates exactly on the surface, is assigned to the next volume because it’s going to become the pre-step point of the next step. At that point, it’s starting in the new volume and keeps going.

Take a look at G4OpBoundaryProcess to see the gyrations they have to go through to get a reflection that turns back into the same volume.

1 Like

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