51G4double* G4QAntiBaryonPlusNuclearCrossSection::lastLEN=0;
52G4double* G4QAntiBaryonPlusNuclearCrossSection::lastHEN=0;
53G4int G4QAntiBaryonPlusNuclearCrossSection::lastN=0;
54G4int G4QAntiBaryonPlusNuclearCrossSection::lastZ=0;
55G4double G4QAntiBaryonPlusNuclearCrossSection::lastP=0.;
56G4double G4QAntiBaryonPlusNuclearCrossSection::lastTH=0.;
57G4double G4QAntiBaryonPlusNuclearCrossSection::lastCS=0.;
58G4int G4QAntiBaryonPlusNuclearCrossSection::lastI=0;
59std::vector<G4double*>* G4QAntiBaryonPlusNuclearCrossSection::LEN =
60 new std::vector<G4double*>;
61std::vector<G4double*>* G4QAntiBaryonPlusNuclearCrossSection::HEN =
62 new std::vector<G4double*>;
68 return &theCrossSection;
73 G4int lens=LEN->size();
74 for(
G4int i=0; i<lens; ++i)
delete[] (*LEN)[i];
76 G4int hens=HEN->size();
77 for(
G4int i=0; i<hens; ++i)
delete[] (*HEN)[i];
88 static std::vector <G4int> colN;
89 static std::vector <G4int> colZ;
90 static std::vector <G4double> colP;
91 static std::vector <G4double> colTH;
92 static std::vector <G4double> colCS;
95 G4cout<<
"G4QaBPCS::GetCS:>>>f="<<fCS<<
", p="<<pMom<<
", Z="<<tgZ<<
"("<<lastZ<<
") ,N="<<tgN
96 <<
"("<<lastN<<
"),PDG="<<PDG<<
", thresh="<<lastTH<<
",Sz="<<colN.size()<<
G4endl;
98 if(PDG!=-3112 && PDG!=-3312 && PDG!=-3334)
99 G4cout<<
"-Warning-G4QAntiBaryonPlusCS::GetCS: Not a PositiveAntiBar,PDG="<<PDG<<
G4endl;
101 if(tgN!=lastN || tgZ!=lastZ)
110 G4cout<<
"G4QABPNuclCS::GetCS: the amount of records in the AMDB lastI="<<lastI<<
G4endl;
112 if(lastI)
for(
G4int i=0; i<lastI; i++)
114 if(colN[i]==tgN && colZ[i]==tgZ)
119 G4cout<<
"G4QaBPCS::GetCS:*Found*P="<<pMom<<
",Threshold="<<lastTH<<
",j="<<j<<
G4endl;
124 G4cout<<
"G4QPCS::GetCS:Found,P="<<pMom<<
" < Threshold="<<lastTH<<
",CS=0"<<
G4endl;
134 G4cout<<
"G4QaBPNCS::GetCS:.DoNothing.P="<<pMom<<
",CS="<<lastCS*millibarn<<
G4endl;
137 return lastCS*millibarn;
142 G4cout<<
"G4QaBPNCS::G:UpdDB,P="<<pMom<<
",f="<<fCS<<
",lI="<<lastI<<
",j="<<j<<
G4endl;
146 G4cout<<
"G4QaBPNuCS::GetCrosSec: *****> New (inDB) Calculated CS="<<lastCS<<
G4endl;
148 if(lastCS<=0. && pMom>lastTH)
151 G4cout<<
"G4QaBPNuCS::GetCS: New P="<<pMom<<
"(CS=0) > Threshold="<<lastTH<<
G4endl;
159 G4cout<<
"-->G4QaBarPNucCrossSec::GetCrosSec: pPDG="<<PDG<<
", j="<<j<<
", N="<<colN[i]
160 <<
",Z["<<i<<
"]="<<colZ[i]<<
G4endl;
165 G4cout<<
"-?-G4QaBPNCS::GeCS:R,Z="<<tgZ<<
",N="<<tgN<<
",in="<<in<<
",j="<<j<<
" ?"<<
G4endl;
170 G4cout<<
"^^^G4QaBPCS::GetCS:CalcNewP="<<pMom<<
", f="<<fCS<<
", lastI="<<lastI<<
G4endl;
179 G4cout<<
"G4QaBPNucCrossSec::GetCrossSect: NewThresh="<<lastTH<<
",P="<<pMom<<
G4endl;
183 colP.push_back(pMom);
184 colTH.push_back(lastTH);
185 colCS.push_back(lastCS);
187 G4cout<<
"G4QaBPNCS::GetCrosSec:lCS="<<lastCS<<
",lZ="<<lastN<<
",lN="<<lastZ<<
G4endl;
191 G4cout<<
"G4QaBPNCS::GCS:1st,P="<<pMom<<
"(MeV),CS="<<lastCS*millibarn<<
"(mb)"<<
G4endl;
193 return lastCS*millibarn;
198 G4cout<<
"G4QaBarPNucCrossSect::GetCrosSect: Update lastI="<<lastI<<
",j="<<j<<
G4endl;
204 else if(pMom<=lastTH)
207 G4cout<<
"G4QaBPNuCS::GetCS:CurrentP="<<pMom<<
" < Threshold="<<lastTH<<
", CS=0"<<
G4endl;
211 else if(std::fabs(lastP-pMom)<
tolerance*pMom)
215 G4cout<<
"G4QaBPCS::GetCS:OldNZ&P="<<lastP<<
"="<<pMom<<
",CS="<<lastCS*millibarn<<
G4endl;
217 return lastCS*millibarn;
222 G4cout<<
"-!-G4QaBPCS::GeCS:UseCurP="<<pMom<<
",f="<<fCS<<
",I="<<lastI<<
",j="<<j<<
G4endl;
228 G4cout<<
"==>G4QaBPCS::GetCroSec:P="<<pMom<<
"(MeV),CS="<<lastCS*millibarn<<
"(mb)"<<
G4endl;
230 return lastCS*millibarn;
238 static const G4double THmiG=THmin*.001;
241 static const G4int nL=105;
242 static const G4double Pmin=THmin+(nL-1)*dP;
244 static const G4int nH=224;
245 static const G4double milP=std::log(Pmin);
246 static const G4double malP=std::log(Pmax);
247 static const G4double dlP=(malP-milP)/(nH-1);
248 static const G4double milPG=std::log(.001*Pmin);
250 G4cout<<
"G4QaBPNuCS::CalCS:N="<<targN<<
",Z="<<targZ<<
",P="<<Momentum<<
">"<<THmin<<
G4endl;
256 G4cout<<
"G4QaBarPNucCS::CalCS:A="<<A<<
",F="<<F<<
",I="<<I<<
",nL="<<nL<<
",nH="<<nH<<
G4endl;
262 G4int sync=LEN->size();
263 if(sync<=I)
G4cerr<<
"*!*G4QaBarPNuclCS::CalcCrosSect: Sync="<<sync<<
"<="<<I<<
G4endl;
273 for(
G4int n=0; n<nL; n++)
275 lastLEN[n] = CrossSectionLin(targZ, targN, P);
279 for(
G4int n=0; n<nH; n++)
281 lastHEN[n] = CrossSectionLog(targZ, targN, lP);
285 G4cout<<
"-*->G4QaBarPNucCS::CalCS:Tab for Z="<<targZ<<
",N="<<targN<<
",I="<<I<<
G4endl;
289 G4int sync=LEN->size();
292 G4cerr<<
"***G4QaBarPNuclCS::CalcCrossSect: Sinc="<<sync<<
"#"<<I<<
", Z=" <<targZ
293 <<
", N="<<targN<<
", F="<<F<<
G4endl;
296 LEN->push_back(lastLEN);
297 HEN->push_back(lastHEN);
302 G4cout<<
"G4QaBPNCS::CalCS:lTH="<<lastTH<<
",Pmi="<<Pmin<<
",dP="<<dP<<
",dlP="<<dlP<<
G4endl;
304 if (Momentum<lastTH)
return 0.;
305 else if (Momentum<Pmin)
308 G4cout<<
"G4QaBPNCS::CalcCS:bLEN nL="<<nL<<
",TH="<<THmin<<
",dP="<<dP<<
G4endl;
313 G4cout<<
"G4QaBPNCS::CalcCS: E="<<Momentum<<
",T="<<THmin<<
",dP="<<dP<<
G4endl;
316 else if (Momentum<Pmax)
320 G4cout<<
"G4QaBarPNucCS::CalcCS:before HEN nH="<<nH<<
",iE="<<milP<<
",dlP="<<dlP<<
G4endl;
327 sigma=CrossSectionFormula(targZ, targN, P, std::log(P));
330 G4cout<<
"G4QAntiBaryonPlusNuclearCrossSection::CalcCS: CS="<<sigma<<
G4endl;
332 if(sigma<0.)
return 0.;
344 if(tZ<.99 || tN<0.)
return 0.;
345 G4double dE=tZ/(1.+std::pow(tA,third));
347 if(tZ==1 && tN==0) tM=prM;
349 return std::sqrt(T*(tpM+T));
357 return CrossSectionFormula(tZ, tN, P, lP);
365 return CrossSectionFormula(tZ, tN, P, lP);
380 sigma=(To-El)+.2443*ld2+31.48;
382 else if(tZ==1 && tN==1)
387 sigma=(0.6*r*r+67.+90.*std::exp(-lP*.666))/(1.+4.E-7/p4/p4);
389 else if(tZ<97 && tN<152)
401 G4double c=(170.+3600./a2s)/(1.+65./a2s)+40.*std::pow(a,0.712)/(1.+12.2/a)/(1.+34./a2);
402 G4double r=(170.+0.01*a3)/(1.+a3/28000.);
403 G4double h=.016*(1.+1.5E-8*a3*a2s)/a4;
404 sigma=(c+d*d+r/
sp)/(1.+h/p4/p4);
406 G4cout<<
"G4QAntiBarPlNucCS::CSForm: A="<<a<<
",P="<<P<<
",CS="<<sigma<<
",c="<<c<<
",g="<<g
407 <<
",d="<<d<<
",r="<<r<<
",e="<<e<<
",h="<<h<<
G4endl;
412 G4cerr<<
"-Warning-G4QAntiBarPlNuclCroSect::CSForm:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
415 if(sigma<0.)
return 0.;
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
G4double CalculateCrossSection(G4bool CS, G4int F, G4int I, G4int PDG, G4int Z, G4int N, G4double Momentum)
~G4QAntiBaryonPlusNuclearCrossSection()
virtual G4double GetCrossSection(G4bool fCS, G4double pMom, G4int tgZ, G4int tgN, G4int pPDG=-3112)
static G4VQCrossSection * GetPointer()
G4double EquLinearFit(G4double X, G4int N, G4double X0, G4double DX, G4double *Y)
virtual G4double ThresholdEnergy(G4int Z, G4int N, G4int PDG=0)
static G4double tolerance