Problem 536

Summary: Infinite loop in QGSP_BERT
Product: Geant4 Reporter: frank.gaede
Component: processes/hadronic/modelsAssignee: Mika.Heikkinen
Status: RESOLVED FIXED    
Severity: normal    
Priority: P1    
Version: 5.2   
Hardware: Other   
OS: Linux   

Description frank.gaede 2003-09-30 11:31:21 CEST
apply counter in G4CascadeInterface.cc:
 ....
  G4int counter = 0;
  G4int countCut = 1000;
  if (G4int(theNucleusA) == 1)
    {
      do
        {
          counter++;
          if(counter>countCut) break;
          targetH = new G4InuclElementaryParticle(targetMomentum, 1);

          output = collider->collide(bullet, targetH);
        }

while(output.getOutgoingParticles().size()+output.getNucleiFragments().size()
< 2.5);

      sumBaryon += 1;

    std::vector<G4double>  bmom = bullet->getMomentum();
    eInit = sqrt(bmom[0] * bmom[0]);
    std::vector<G4double> tmom = targetH->getMomentum();
    eInit += sqrt(tmom[0] * tmom[0]);

      if (verboseLevel > 2) {
        G4cout << "Target:  " << G4endl;
        targetH->printParticle();
      }

    }
  else
    {
      do
      {
        counter++;
        if(counter>countCut) break;
        output = collider->collide(bullet, target );
      }
      while(
output.getOutgoingParticles().size()+output.getNucleiFragments().size() < 2.5
           && output.getOutgoingParticles().begin()->type()==bullet->type() );
    }

....
Comment 1 Hans-Peter.Wellisch 2003-10-18 04:24:59 CEST
Thank yuo for filing the report.

Question to Aatos: Is this problem also resolev in your new commit?

Many greetings,

Hans-Peter.
Comment 2 Mika.Heikkinen 2004-02-23 00:37:59 CET
Latest Geant4 6.0 release fixes this problem.
(G4CascadeInterface is fixed)