Ignore:
Timestamp:
May 28, 2009, 4:26:57 PM (15 years ago)
Author:
garnier
Message:

maj sur la beta de geant 4.9.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QStringChipsParticleLevelInterface.cc

    r819 r1055  
    2323// * acceptance of all terms of the Geant4 Software license.          *
    2424// ********************************************************************
    25 //
     25// Short description: Interface of QGSC to CHIPS (Energy Flow  of soft hadrons)
     26// ----------------------------------------------------------------------------
    2627
    2728//#define debug
     
    143144  }
    144145  G4int targetPDGCode = 90000000 + 1000*resZ + (resA-resZ);    // PDG of theResidualNucleus
    145   G4double targetMass = theNucleus->GetMass();                 // Its mass
    146   targetMass -= hitMass; // subtract masses of knocked out nucleons (binding?! M.K.) E/M
     146  G4double targetMass=mNeut;
     147  if (!resZ)                                                   // Nucleus of only neutrons
     148  {
     149    if (resA>1) targetMass*=resA;
     150  }
     151  else targetMass=G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ)
     152                                                                            ->GetPDGMass();
    147153  G4double targetEnergy = std::sqrt(hitMomentum.mag2()+targetMass*targetMass);
    148154  // !! @@ Target should be at rest: hitMomentum=(0,0,0) @@ !! M.K. (go to this system)
     
    153159  G4double impactX = theImpact.first;
    154160  G4double impactY = theImpact.second;
    155   G4double inpactPar2 = impactX*impactX + impactY*impactY;
     161  G4double impactPar2 = impactX*impactX + impactY*impactY;
    156162 
    157163  G4double radius2 = theNucleus->GetNuclearRadius(theInnerCoreDensityCut*perCent);
     
    160166#ifdef pdebug
    161167  G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: r="<<std::sqrt(radius2)/fermi
    162         <<", b="<<std::sqrt(inpactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi
    163         <<", b/r="<<std::sqrt(inpactPar2/radius2)<<G4endl;
    164 #endif
    165   if(radius2 - inpactPar2>0) pathlength = 2.*std::sqrt(radius2 - inpactPar2);
     168        <<", b="<<std::sqrt(impactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi
     169        <<", b/r="<<std::sqrt(impactPar2/radius2)<<G4endl;
     170#endif
     171  if(radius2 - impactPar2>0) pathlength = 2.*std::sqrt(radius2 - impactPar2);
    166172  G4double theEnergyLostInFragmentation = theEnergyLossPerFermi*pathlength/fermi;
    167173 
     
    176182          << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGCharge()<<" "
    177183          << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGEncoding()<<" "
    178           << a4Mom <<G4endl;
     184          << a4Mom <<G4endl;
    179185#endif
    180186#ifdef pdebug
     
    193199      if((*current).first > toSort)        // The current is smaller then existing
    194200      {
    195                theSorted.insert(current, it);     // It shifts the others up
    196                inserted = true;
    197                break;
     201        theSorted.insert(current, it);     // It shifts the others up
     202        inserted = true;
     203        break;
    198204      }
    199205    }
     
    234240        <<theSorted.size()<<G4endl;
    235241#endif
    236  
     242  G4bool EscapeExists = false;
    237243  for(current = theSorted.begin(); current!=theSorted.end(); current++)
    238244  {
    239245#ifdef pdebug
    240                                 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: nq="
     246    G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: nq="
    241247          <<(*current).second->GetDefinition()->GetQuarkContent(3)<<", naq="
    242248          <<(*current).second->GetDefinition()->GetAntiQuarkContent(3)<<", PDG="
     
    306312
    307313#ifdef pdebug
    308                                 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<", EL="
     314    G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<", EL="
    309315                                                    <<theEnergyLostInFragmentation<<G4endl;
    310316#endif
    311 
    312     if(runningEnergy > theEnergyLostInFragmentation) break;
    313    
     317    if(runningEnergy > theEnergyLostInFragmentation)
     318    {
     319      EscapeExists = true;
     320      break;
     321    }
    314322#ifdef CHIPSdebug
    315323    G4cout <<"G4QStringChipsParticleLevelInterface::Propagate: ABSORBED STRING particles "
    316324           <<(*current).second->GetDefinition()->GetPDGCharge()<<" "
    317325           << (*current).second->GetDefinition()->GetPDGEncoding()<<" "
    318                   << (*current).second->Get4Momentum() <<G4endl;
     326           << (*current).second->Get4Momentum() <<G4endl;
    319327#endif
    320328#ifdef pdebug
     
    322330          <<current->second->GetDefinition()->GetPDGCharge()<<", PDG="
    323331          <<current->second->GetDefinition()->GetPDGEncoding()<<", 4M="
    324                  <<current->second->Get4Momentum()<<G4endl;
     332          <<current->second->Get4Momentum()<<G4endl;
    325333#endif
    326334
     
    382390      {
    383391        theFinalContents[hp] +=theContents[running];
    384                *(theFinalMomenta[hp])+=*(theMomenta[running]);
    385                running++;
    386                if(running == theContents.size()) break;
     392        *(theFinalMomenta[hp])+=*(theMomenta[running]);
     393        running++;
     394        if(running == theContents.size()) break;
    387395      }
    388396    }
     
    402410  G4QNucleus::SetParameters(fractionOfSingleQuasiFreeNucleons,
    403411                            fractionOfPairedQuasiFreeNucleons,
    404                                                  clusteringCoefficient,
    405                                                                fusionToExchange);
     412                            clusteringCoefficient,
     413                            fusionToExchange);
    406414  G4Quasmon::SetParameters(temperature, halfTheStrangenessOfSee, etaToEtaPrime);
    407415
     
    424432    G4QCHIPSWorld::Get()->GetParticles(nop);
    425433    G4QEnvironment* pan= new G4QEnvironment(projHV, targetPDGCode);
     434#ifdef pdebug
     435      G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: CHIPS fragmentation, rA="
     436            <<resA<<", #AbsPt="<<particleCount<<G4endl;
     437#endif
    426438    try
    427439    {
     
    438450      {
    439451        G4cerr <<"  Incoming 4-momentum and PDG code of "<<i<<"'th hadron: "
    440                <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl;
     452        <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl;
    441453      }
    442454      throw;
     
    447459    delete pan;
    448460  }
    449   else output = new G4QHadronVector;
    450    
     461  else
     462  {
     463#ifdef pdebug
     464    G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: NO CHIPS fragmentation, rA="
     465          <<resA<<", #AbsPt="<<particleCount<<G4endl;
     466#endif
     467    output = new G4QHadronVector;
     468  }   
    451469  // Fill the result.
    452470#ifdef CHIPSdebug
    453   G4cout << "NEXT EVENT"<<endl;
     471  G4cout << "NEXT EVENT, EscapeExists="<<EscapeExists<<G4endl;
    454472#endif
    455473
    456474  // first decay and add all escaping particles.
    457   for(current = firstEscape; current!=theSorted.end(); current++)
     475  if (EscapeExists) for (current = firstEscape; current!=theSorted.end(); current++)
    458476  {
    459477    G4KineticTrack* aResult = (*current).second;
     
    472490      theSec->SetMomentum(current4Mom.vect());
    473491#ifdef pdebug
    474                                   G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG="
     492      G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG="
    475493            <<aResult->GetDefinition()->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl;
    476494#endif
     
    487505        theSec->SetMomentum(current4Mom.vect());
    488506#ifdef pdebug
    489                                     G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG="
     507        G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG="
    490508              <<secondaries->operator[](aSecondary)->GetDefinition()->GetPDGEncoding()
    491509              <<",4M="<<current4Mom<<G4endl;
     
    561579      theSec->SetMomentum(current4Mom.vect());
    562580#ifdef pdebug
    563                                   G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG="
     581      G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG="
    564582              <<theDefinition->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl;
    565583#endif
     
    576594    G4cout <<"CHIPS particles "<<theDefinition->GetPDGCharge()<<" "
    577595           << theDefinition->GetPDGEncoding()<<" "
    578            << output->operator[](particle)->Get4Momentum() <<G4endl;
     596    << output->operator[](particle)->Get4Momentum() <<G4endl;
    579597#endif
    580598
    581599    delete output->operator[](particle);
     600  }
     601  else
     602  {
     603    if(resA>0)
     604    {
     605      G4ParticleDefinition* theDefinition = G4Neutron::Neutron();
     606      if(resA==1) // The residual nucleus at rest must be added to conserve BaryN & Charge
     607      {
     608        if(resZ == 1) theDefinition = G4Proton::Proton();
     609      }
     610      else theDefinition = G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ);
     611      theSec = new G4ReactionProduct(theDefinition);
     612      theSec->SetTotalEnergy(theDefinition->GetPDGMass());
     613      theSec->SetMomentum(G4ThreeVector(0.,0.,0.));
     614      theResult->push_back(theSec);
     615      if(!resZ && resA>0) for(G4int ni=1; ni<resA; ni++)
     616      {
     617        theSec = new G4ReactionProduct(theDefinition);
     618        theSec->SetTotalEnergy(theDefinition->GetPDGMass());
     619        theSec->SetMomentum(G4ThreeVector(0.,0.,0.));
     620        theResult->push_back(theSec);
     621      }
     622    }
    582623  }
    583624  delete output;
     
    588629  G4cout << "QUASMON preparation info "
    589630         << 1./MeV*proj4Mom<<" "
    590         << 1./MeV*targ4Mom<<" "
    591         << nD<<" "<<nU<<" "<<nS<<" "<<nAD<<" "<<nAU<<" "<<nAS<<" "
    592         << hitCount<<" "
    593         << particleCount<<" "
    594         << theLow<<" "
    595         << theHigh<<" "
    596         << G4endl;
     631  << 1./MeV*targ4Mom<<" "
     632  << nD<<" "<<nU<<" "<<nS<<" "<<nAD<<" "<<nAU<<" "<<nAS<<" "
     633  << hitCount<<" "
     634  << particleCount<<" "
     635  << theLow<<" "
     636  << theHigh<<" "
     637  << G4endl;
    597638#endif
    598639
Note: See TracChangeset for help on using the changeset viewer.