Problem 489

Summary: Negative interaction length
Product: Geant4 Reporter: Alberto.Ribon
Component: processes/hadronic/modelsAssignee: Hans-Peter.Wellisch
Status: RESOLVED FIXED    
Severity: major CC: Gunter.Folger
Priority: P1    
Version: 5.1   
Hardware: PC   
OS: Linux   

Description Alberto.Ribon 2003-05-20 10:10:53 CEST
Trying to run the application provided in the tar-file downloadable from
my AFS public area, the job will crash at the first event with the following
dump:

G4VProcess::SubtractNumberOfInteractionLengthLeft()  negative
currentInteractionLength

*** G4Exception: Aborting execution ***

Using /tracking/verbose 6, it turns out that many 'nan' are produced
starting from the calculation of the time-of-flight/position ....

Running on Linux-g++ with gcc-3.2 in optimised mode (in debug-mode and/or
gcc-2.95.2 it works fine instead).
Based on the reference tag "geant4-05-01-ref-01" and physics-list QGCP_BIC
(see README file in the tar ball).
Comment 1 Gabriele Cosmo 2003-05-21 03:29:59 CEST
A gamma is produced with 'nan' kinetic energy by neutron-inelastic process.
Comment 2 Hans-Peter.Wellisch 2003-06-10 02:30:59 CEST
This one was fixed in 5.1, but just now the same symptom appears elsewhere
again. Fix was a protection for zero particle mass in G4DynamicParticle.cc.
Comment 3 Gabriele Cosmo 2003-06-12 07:06:59 CEST
This particular problem is now fixed in tag "partman-V05-01-00" for
particles/management, the problem was still due to negative value to
sqrt computed for precision loss on mass calculation of massless
particles (photons in this case).
The fix will be included in release 5.2.