As part of the G4CMP library, we have implemented versions of
EndTrackig(), to support capturing additional track information, attaching UserTrackInfo containers, etc. This includes doing a sanity check that particle types which are G4CMP specific are being transported through appropriately configured volumes.
At the moment, if that sanity check fails, we throw a G4Exception with “EventMustBeAborted”, but that is much harsher than necessary. What I’d like to do is to have just the current track be killed, and the event continue on its way. Since
StartTracking() gets a
const G4Track* argument, we can’t (shouldn’t) directly modify the track status to “fStopAndKill”.
Is there an easy way to abort the current track processing from within