In my implementation of
G4VSensitiveDetector::ProcessHits I’d need to check if the current step is the last step inside the current volume. To my knowledge, this can happen due to quite some reasons:
- the step ends on a geometry boundary
- the particle is stopped
- the particle energy goes below the user limit
- the particle is destroyed by an interaction
and maybe others that I’m missing at the moment. Is there an “easy” way to check if the current step is the last one or do I need to check all the above conditions (and maybe others?) one by one? Thanks.