Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (13 years ago)
Author:
garnier
Message:

geant4 tag 9.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4BinaryCascade.cc

    r1340 r1347  
    152152{
    153153  static G4int eventcounter=0;
     154 
     155//   if ( eventcounter == 0 ) {
     156//      SetEpReportLevel(3);   // report non conservation with model etc.
     157//      G4double relativeLevel = 1*perCent;
     158//      G4double absoluteLevel = 2*MeV;
     159//      SetEnergyMomentumCheckLevels(relativeLevel,absoluteLevel);
     160//   }
     161 
    154162  //if(eventcounter == 100*(eventcounter/100) )
    155163  eventcounter++;
     
    278286   G4cout << "G4BinaryCascade Propagate starting -------------------------------------------------------" <<G4endl;
    279287#endif
     288
     289   // *GF* FIXME ? in propagate mode this test is wrong! Could be in Apply....
     290  if(nucleus->GetMassNumber() == 1) // 1H1 is special case
     291  {
     292      #ifdef debug_BIC_Propagate
     293          G4cout << " special case 1H1.... " << G4endl;
     294      #endif
     295     return Propagate1H1(secondaries,nucleus);
     296  }
     297
    280298  G4ReactionProductVector * products = new G4ReactionProductVector;
    281299  the3DNucleus = nucleus;
     
    289307  ClearAndDestroy(&theFinalState);
    290308  std::vector<G4KineticTrack *>::iterator iter;
    291 
    292    // *GF* FIXME ? in propagate mode this test is wrong! Could be in Apply....
    293   if(nucleus->GetMassNumber() == 1) // 1H1 is special case
    294   {
    295       #ifdef debug_BIC_Propagate
    296           G4cout << " special case 1H1.... " << G4endl;
    297       #endif
    298      return Propagate1H1(secondaries,nucleus);
    299   }
    300309
    301310  BuildTargetList();
     
    10681077     PrintKTVector(&target_collection,std::string("... targets"));
    10691078//*GF*     throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCasacde::ApplyCollision()");
    1070 #else
     1079#endif
    10711080     return false;
    1072 #endif
    10731081  }
    10741082
     
    11171125  G4KineticTrackVector * products=0;
    11181126  products = collision->GetFinalState();
     1127
     1128  G4bool lateParticleCollision= (!haveTarget) && products && products->size() == 1;
    11191129
    11201130  #ifdef debug_BIC_ApplyCollision
     
    11391149           PrintKTVector(&collision->GetTargetCollection(),std::string(" Target particles"));
    11401150      } 
    1141    #endif
    1142      G4bool lateParticleCollision= (!haveTarget) && products && products->size() == 1;
    11431151        //  if ( lateParticleCollision ) G4cout << " Added late particle--------------------------"<<G4endl;
    11441152        //  if ( lateParticleCollision && products ) PrintKTVector(products, " reaction products");
     1153   #endif
    11451154//**************************************** 
    11461155
     
    15611570      {
    15621571          nsec++;
    1563           G4double tStep(0), tdummy(0);
    1564           ((G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes(kt,tdummy,tStep);
     1572          G4double tStep(0), tdummy(0);
     1573          G4bool intersect =
     1574               ((G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes(kt,tdummy,tStep);
    15651575#ifdef debug_BIC_StepParticlesOut
    15661576          G4cout << " minTimeStep, tStep Particle " <<minTimeStep << " " <<tStep
    15671577                 << " " <<kt->GetDefinition()->GetParticleName()
    15681578                 << " 4mom " << kt->GetTrackingMomentum()<<G4endl;
    1569 #endif
    1570           if(tStep<minTimeStep && tStep> 0 )
     1579          if ( ! intersect );
     1580          {
     1581             PrintKTVector(&theSecondaryList, std::string(" state ERROR....."));
     1582             throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCascade::StepParticlesOut() particle not in nucleus");
     1583          }
     1584#endif
     1585          if(intersect && tStep<minTimeStep && tStep> 0 )
    15711586          {
    15721587            minTimeStep = tStep;
     
    24622477    }
    24632478    size_t current(0);
    2464     for(current=0; current<secs->size(); current++)
     2479    for(current=0; secs && current<secs->size(); current++)
    24652480    {
    24662481      if((*secs)[current]->GetDefinition()->IsShortLived())
     
    27082723                                          G4KineticTrackVector * products)
    27092724{
    2710   G4RKPropagation * RKprop=(G4RKPropagation *)thePropagator;
    27112725
    27122726  G4KineticTrackVector debug1;
     
    27162730  PrintKTVector(products,std::string(" Scatterer products"));
    27172731 
     2732#ifdef dontUse
    27182733  G4double thisExcitation(0);
    27192734//  excitation energy from this collision
     
    27222737  G4KineticTrack * kt=collision->GetPrimary();
    27232738  initial +=  kt->Get4Momentum().e();
     2739
     2740  G4RKPropagation * RKprop=(G4RKPropagation *)thePropagator;
    27242741 
    27252742  initial +=  RKprop->GetField(kt->GetDefinition()->GetPDGEncoding(),kt->GetPosition());
     
    27892806         << G4endl;
    27902807   currentInitialEnergy-=final; 
    2791 
     2808#endif
    27922809}
    27932810
Note: See TracChangeset for help on using the changeset viewer.