Problem 719

Summary: Infinite loop caused by G4HadronicProcess
Product: Geant4 Reporter: dennis.herbert.wright
Component: processes/hadronicAssignee: Hans-Peter.Wellisch
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 6.1   
Hardware: All   
OS: All   

Description dennis.herbert.wright 2005-01-31 17:58:41 CET
When G4HadronicProcess sees a hadron with zero kinetic energy (stopped but
alive) it resets the track status to be alive.  The tracking manager then
takes the particle, sees that it has zero energy and sets it to stopped but
alive and sends it back to the hadronic process, where the track is again set
to alive.
   The problem is in G4HadronicProcess::FillTotalResult() which does not
check for "stopped but alive".  As a work-around I added the
lines:
        } else if (aT.GetKineticEnergy() == 0) {
          theTotalResult->SetStatusChange(fStopButAlive);

after the block
        if(aR->GetStatusChange()==suspend)
        {
        }

This stops the infinite loop in my tests.
Note that although I have found this in V6.1, it is probably also in V6.2 and
V7.0.
Comment 1 Hans-Peter.Wellisch 2005-02-22 03:54:59 CET
Was fixed some time ago; Now gives a warning.