ENVIRONMENT: We're using G4Navigator to look up materials during track reconstruction for the Belle II experiment. Of course, track reconstruction sometimes has numerical trouble, bad track candidates, etc. Hence, we sometimes do weird geometry lookups or weird sequences of lookups. PROBLEM: Geant4 turns out to be somewhat fragile, and we have most corners covered, but there's a really annoying issue: sometimes G4Navigator triggers an overlap check, see the lines following 1017. For us, this overlap check serves no purpose at all: once the overlap check finishes (it never finds an overlap, and we have extensively checked the geometry for overlaps), tracking just continues -- usually triggering a few more overlap checks until the track is either rejected or recovered, and event processing continues. SIGNIFICANCE OF PROBLEM: The result of this behavior is that we spend _huge_ amounts of computing time on overlap checks and event processing time becomes completely unpredictable for no perceptible gain. This happens roughly once in 300,000 track fits, which is often enough to make execution times of small MC studies that one does on a single PC unpredictable enough to disturb any workflow. SUGGESTED SOLUTION: please don't automatically start overlap checks unless some debugging flag is set.
The G4Navigator triggers the check for geometry overlaps when a track gets stuck and cannot be recovered; in this case the whole event itself gets aborted, unless you have overwritten the normal behaviour of G4Exception for such cases. If this happens so often in your application, it indicates a rather serious issue you may want to investigate and fix. We can certainly disable the overlap check when not running in verbose mode (which is the default), but you must be aware this won't be a solution for your problem.
Thank you! I would indeed strongly prefer if you moved this to verbose. We're seeing this behavior when we're using G4Navigator to look up materials during track reconstruction, so I'm not sure that Geant4's notion of a track getting stuck even applies.
OK, I see.. I've moved the check within G4VERBOSE. The modification will be available in the next public patch to release 10.2.
Thank you!