Problem 1811 - G4Navigator starts overlap checks, kills our tracking
Summary: G4Navigator starts overlap checks, kills our tracking
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/navigation (show other problems)
Version: 10.2
Hardware: All All
: P5 normal
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2016-01-08 12:08 CET by Tobias Schlüter
Modified: 2016-01-11 10:55 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Tobias Schlüter 2016-01-08 12:08:48 CET
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.
Comment 1 Gabriele Cosmo 2016-01-11 09:13:14 CET
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.
Comment 2 Tobias Schlüter 2016-01-11 10:12:58 CET
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.
Comment 3 Gabriele Cosmo 2016-01-11 10:37:12 CET
OK, I see.. I've moved the check within G4VERBOSE.
The modification will be available in the next public patch to release 10.2.
Comment 4 Tobias Schlüter 2016-01-11 10:55:46 CET
Thank you!