Problem 719 - Infinite loop caused by G4HadronicProcess
Summary: Infinite loop caused by G4HadronicProcess
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic (show other problems)
Version: 6.1
Hardware: All All
: P2 normal
Assignee: Hans-Peter.Wellisch
URL:
Depends on:
Blocks:
 
Reported: 2005-01-31 17:58 CET by dennis.herbert.wright
Modified: 2005-02-22 03:54 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 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.