| Summary: | Infinite loop caused by G4HadronicProcess | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | dennis.herbert.wright |
| Component: | processes/hadronic | Assignee: | Hans-Peter.Wellisch |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 6.1 | ||
| Hardware: | All | ||
| OS: | All | ||
Was fixed some time ago; Now gives a warning. |
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.