Ignore:
Timestamp:
Jan 8, 2010, 11:56:51 AM (15 years ago)
Author:
garnier
Message:

update geant4.9.3 tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/cross_sections/src/G4GGNuclNuclCrossSection.cc

    r1055 r1228  
    164164    // production to be checked !!! edit MK xsc
    165165
    166     sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscMK(theProton, pTkin, theProton) +
    167           (pZ*tN+pN*tZ)*GetHadronNucleonXscMK(theProton, pTkin, theNeutron);
     166    //sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscMK(theProton, pTkin, theProton) +
     167    //      (pZ*tN+pN*tZ)*GetHadronNucleonXscMK(theProton, pTkin, theNeutron);
     168
     169    sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscNS(theProton, pTkin, theProton) +
     170          (pZ*tN+pN*tZ)*GetHadronNucleonXscNS(theProton, pTkin, theNeutron);
    168171 
    169172    ratio = sigma/nucleusSquare;
     
    588591  if(Nt < 0.) Nt = 0.;
    589592 
    590   sumInelastic  = Zt*GetHadronNucleonXscMK(aParticle, theProton);
    591   sumInelastic += Nt*GetHadronNucleonXscMK(aParticle, theNeutron);   
     593  sumInelastic  = Zt*GetHadronNucleonXscNS(aParticle, theProton);
     594  sumInelastic += Nt*GetHadronNucleonXscNS(aParticle, theNeutron);   
    592595 
    593596  return sumInelastic;
     
    652655
    653656  return Xinelastic*= millibarn;
    654 }
    655 
    656 /////////////////////////////////////////////////////////////////////////////////////
    657 //
    658 // Returns hadron-nucleon cross-section based on Mikhail Kossov CHIPS parametrisation of
    659 // data from G4QuasiFreeRatios class
    660 
    661 G4double
    662 G4GGNuclNuclCrossSection::GetHadronNucleonXscMK(G4ParticleDefinition* pParticle, G4double pTkin,
    663                                                 G4ParticleDefinition* nucleon  )
    664 {
    665   G4int I = -1;
    666   G4int PDG = pParticle->GetPDGEncoding();
    667   G4double totalXsc = 0;
    668   G4double elasticXsc = 0;
    669   G4double inelasticXsc;
    670   // G4int absPDG = std::abs(PDG);
    671 
    672   G4double pM = pParticle->GetPDGMass();
    673   G4double p  = std::sqrt(pTkin*(pTkin+2*pM))/GeV;
    674 
    675   G4bool F = false;           
    676   if(nucleon == theProton)       F = true;
    677   else if(nucleon == theNeutron) F = false;
    678   else
    679   {
    680     G4cout << "nucleon is not proton or neutron, return xsc for proton" << G4endl;
    681     F = true;
    682   }
    683 
    684   G4bool kfl = true;                             // Flag of K0/aK0 oscillation
    685   G4bool kf  = false;
    686 
    687   if( PDG == 130 || PDG == 310 )
    688   {
    689     kf = true;
    690     if( G4UniformRand() > .5 ) kfl = false;
    691   }
    692   if     ( (PDG == 2212 && F) || (PDG == 2112 && !F) ) I = 0; // pp/nn
    693   else if( (PDG == 2112 && F) || (PDG == 2212 && !F) ) I = 1; // np/pn
    694   else
    695   {
    696     G4cout<<"MK PDG = "<<PDG
    697           <<", while it is defined only for p,n,hyperons,anti-baryons,pi,K/antiK"<<G4endl;
    698     G4Exception("G4QuasiFreeRatio::FetchElTot:","22",FatalException,"CHIPScrash");
    699   }
    700 
    701   // Each parameter set can have not more than nPoints = 128 parameters
    702 
    703   static const G4double lmi = 3.5;       // min of (lnP-lmi)^2 parabola
    704   static const G4double pbe = .0557;     // elastic (lnP-lmi)^2 parabola coefficient
    705   static const G4double pbt = .3;        // total (lnP-lmi)^2 parabola coefficient
    706   static const G4double pmi = .1;        // Below that fast LE calculation is made
    707   static const G4double pma = 1000.;     // Above that fast HE calculation is made
    708                  
    709   if( p <= 0.)
    710   {
    711     G4cout<<" p = "<<p<<" is zero or negative"<<G4endl;
    712 
    713     elasticXsc   = 0.;
    714     inelasticXsc = 0.;
    715     totalXsc     = 0.;
    716 
    717     return totalXsc;
    718   }
    719   if (!I)                          // pp/nn
    720   {
    721     if( p < pmi )
    722     {
    723       G4double p2 = p*p;
    724       elasticXsc          = 1./(.00012 + p2*.2);
    725       totalXsc          = elasticXsc;
    726     }
    727     else if(p>pma)
    728     {
    729       G4double lp  = std::log(p)-lmi;
    730       G4double lp2 = lp*lp;
    731       elasticXsc  = pbe*lp2 + 6.72;
    732       totalXsc    = pbt*lp2 + 38.2;
    733     }
    734     else
    735     {
    736       G4double p2  = p*p;
    737       G4double LE  = 1./( .00012 + p2*.2);
    738       G4double lp  = std::log(p) - lmi;
    739       G4double lp2 = lp*lp;
    740       G4double rp2 = 1./p2;
    741       elasticXsc  = LE + ( pbe*lp2 + 6.72+32.6/p)/( 1. + rp2/p);
    742       totalXsc    = LE + ( pbt*lp2 + 38.2+52.7*rp2)/( 1. + 2.72*rp2*rp2);
    743     }
    744   }
    745   else if( I==1 )                        // np/pn
    746   {
    747     if( p < pmi )
    748     {
    749       G4double p2 = p*p;
    750       elasticXsc = 1./( .00012 + p2*( .051 + .1*p2));
    751       totalXsc   = elasticXsc;
    752     }
    753     else if( p > pma )
    754     {
    755       G4double lp  = std::log(p) - lmi;
    756       G4double lp2 = lp*lp;
    757       elasticXsc  = pbe*lp2 + 6.72;
    758       totalXsc    = pbt*lp2 + 38.2;
    759     }
    760     else
    761     {
    762       G4double p2  = p*p;
    763       G4double LE  = 1./( .00012 + p2*( .051 + .1*p2 ) );
    764       G4double lp  = std::log(p) - lmi;
    765       G4double lp2 = lp*lp;
    766       G4double rp2 = 1./p2;
    767       elasticXsc  = LE + (pbe*lp2 + 6.72 + 30./p)/( 1. + .49*rp2/p);
    768       totalXsc    = LE + (pbt*lp2 + 38.2)/( 1. + .54*rp2*rp2);
    769     }
    770   }
    771   else
    772   {
    773     G4cout<<"PDG incoding = "<<I<<" is not defined (0-1)"<<G4endl;
    774  
    775   }
    776   if( elasticXsc > totalXsc ) elasticXsc = totalXsc;
    777 
    778   totalXsc   *= millibarn;
    779   elasticXsc *= millibarn;
    780   inelasticXsc   = totalXsc - elasticXsc;
    781   if (inelasticXsc < 0.) inelasticXsc = 0.;
    782 
    783   return inelasticXsc;
    784657}
    785658
     
    940813  }
    941814  return R;
    942 
    943 
    944 
    945 }
    946 
    947 
    948 
    949 
     815}
    950816
    951817
Note: See TracChangeset for help on using the changeset viewer.