65 LEN =
new std::vector<G4double*>;
66 HEN =
new std::vector<G4double*>;
107 static G4ThreadLocal std::vector <G4int> *colN_G4MT_TLS_ = 0 ;
if (!colN_G4MT_TLS_) colN_G4MT_TLS_ =
new std::vector <G4int> ; std::vector <G4int> &colN = *colN_G4MT_TLS_;
108 static G4ThreadLocal std::vector <G4int> *colZ_G4MT_TLS_ = 0 ;
if (!colZ_G4MT_TLS_) colZ_G4MT_TLS_ =
new std::vector <G4int> ; std::vector <G4int> &colZ = *colZ_G4MT_TLS_;
109 static G4ThreadLocal std::vector <G4double> *colP_G4MT_TLS_ = 0 ;
if (!colP_G4MT_TLS_) colP_G4MT_TLS_ =
new std::vector <G4double> ; std::vector <G4double> &colP = *colP_G4MT_TLS_;
110 static G4ThreadLocal std::vector <G4double> *colTH_G4MT_TLS_ = 0 ;
if (!colTH_G4MT_TLS_) colTH_G4MT_TLS_ =
new std::vector <G4double> ; std::vector <G4double> &colTH = *colTH_G4MT_TLS_;
111 static G4ThreadLocal std::vector <G4double> *colCS_G4MT_TLS_ = 0 ;
if (!colCS_G4MT_TLS_) colCS_G4MT_TLS_ =
new std::vector <G4double> ; std::vector <G4double> &colCS = *colCS_G4MT_TLS_;
115 if(tgN!=lastN || tgZ!=lastZ)
123 if(lastI)
for(
G4int i=0; i<lastI; i++)
125 if(colN[i]==tgN && colZ[i]==tgZ)
137 lastCS=CalculateCrossSection(-1,j,2212,lastZ,lastN,pMom);
138 if(lastCS<=0. && pMom>lastTH)
150 lastCS=CalculateCrossSection(0,j,2212,lastZ,lastN,pMom);
157 colP.push_back(pMom);
158 colTH.push_back(lastTH);
159 colCS.push_back(lastCS);
169 else if(pMom<=lastTH)
175 lastCS=CalculateCrossSection(1,j,2212,lastZ,lastN,pMom);
186 static const G4double THmiG=THmin*.001;
189 static const G4int nL=105;
190 static const G4double Pmin=THmin+(nL-1)*dP;
192 static const G4int nH=224;
193 static const G4double milP=std::log(Pmin);
194 static const G4double malP=std::log(Pmax);
195 static const G4double dlP=(malP-milP)/(nH-1);
196 static const G4double milPG=std::log(.001*Pmin);
204 G4int sync=LEN->size();
205 if(sync<=I)
G4cout<<
"*!*G4QProtonNuclCS::CalcCrossSect:Sync="<<sync<<
"<="<<I<<
G4endl;
215 for(
G4int k=0; k<nL; k++)
217 lastLEN[k] = CrossSectionLin(targZ, targN, P);
223 lastHEN[
n] = CrossSectionLog(targZ, targN, lP);
228 G4int sync=LEN->size();
231 G4cout<<
"***G4ChipsProtonNuclCS::CalcCrossSect: Sinc="<<sync<<
"#"<<I<<
", Z=" <<targZ
232 <<
", N="<<targN<<
", F="<<F<<
G4endl;
235 LEN->push_back(lastLEN);
236 HEN->push_back(lastHEN);
240 if (Momentum<lastTH)
return 0.;
241 else if (Momentum<Pmin)
243 sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN);
245 else if (Momentum<Pmax)
248 sigma=EquLinearFit(lP,nH,milP,dlP,lastHEN);
253 sigma=CrossSectionFormula(targZ, targN, P, std::log(P));
255 if(sigma<0.)
return 0.;
267 if(tZ<.99 || tN<0.)
return 0.;
268 else if(tZ==1 && tN==0)
return 800.;
270 G4double dE=tZ/(1.+std::pow(tA,third));
273 return std::sqrt(T*(tpM+T));
280 if(P<ThresholdMomentum(tZ,tN)*.001)
return sigma;
282 if(tZ==1&&!tN){
if(P>.35) sigma=CrossSectionFormula(tZ,tN,P,lP);}
283 else if(tZ<97 && tN<152)
302 else if(tZ==5 && tN==6)
308 else if(tZ==4 && tN==5)
314 else if(tZ==3 && tN==4)
320 else if(tZ==3 && tN==3)
326 else if(tZ==2 && tN==1)
333 sigma=CrossSectionFormula(tZ,tN,P,lP);
337 sigma+=pex*std::exp(-dp*dp/wid);
342 G4cerr<<
"-Warning-G4ChipsProtonNuclearXS::CSLin:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
345 if(sigma<0.)
return 0.;
353 return CrossSectionFormula(tZ, tN, P, lP);
366 El=1./(0.00012+p2*0.2);
383 El=LE+(0.0557*lp2+6.72+32.6/P)/(1.+rp2/P);
384 To=LE+(0.3 *lp2+38.2+52.7*rp2)/(1.+2.72*rp2*rp2);
398 else if(tZ<97 && tN<152)
413 G4double c=(170.+3600./a2s)/(1.+65./a2s);
417 G4double gg=40.*std::exp(al*0.712)/(1.+12.2/
a)/(1.+34./a2);
418 G4double e=318.+a4/(1.+.0015*a4/std::exp(al*0.09))/(1.+4.e-28*a12)+
419 8.e-18/(1./a16+1.3e-20)/(1.+1.e-21*a12);
420 G4double ss=3.57+.009*a2/(1.+.0001*a2*
a);
421 G4double h=(.01/a4+2.5e-6/
a)*(1.+6.e-6*a2*a)/(1.+6.e7/a12/a2);
422 sigma=(c+d*
d)/(1.+r/p4)+(gg+e*std::exp(-ss*P))/(1.+h/p4/p4);
426 G4cerr<<
"-Warning-G4QProtonNuclearCroSect::CSForm:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
429 if(sigma<0.)
return 0.;
437 G4cerr<<
"***G4ChipsProtonInelasticXS::EquLinearFit: DX="<<DX<<
", N="<<N<<
G4endl;
443 G4int j=
static_cast<int>(
d);
virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
G4ParticleDefinition * GetDefinition() const
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int tgZ, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
G4double GetTotalMomentum() const
static G4Proton * Definition()
G4GLOB_DLL std::ostream G4cout
static G4Proton * Proton()
virtual G4bool IsIsoApplicable(const G4DynamicParticle *Pt, G4int Z, G4int A, const G4Element *elm, const G4Material *mat)
~G4ChipsProtonInelasticXS()
#define G4_DECLARE_XS_FACTORY(cross_section)
G4double GetPDGMass() const
G4ChipsProtonInelasticXS()
G4GLOB_DLL std::ostream G4cerr