51G4double* G4QIonIonCrossSection::lastLENI=0;
52G4double* G4QIonIonCrossSection::lastHENI=0;
53G4double* G4QIonIonCrossSection::lastLENE=0;
54G4double* G4QIonIonCrossSection::lastHENE=0;
55G4int G4QIonIonCrossSection::lastPDG=0;
56G4int G4QIonIonCrossSection::lastN=0;
57G4int G4QIonIonCrossSection::lastZ=0;
58G4double G4QIonIonCrossSection::lastP=0.;
59G4double G4QIonIonCrossSection::lastTH=0.;
60G4double G4QIonIonCrossSection::lastICS=0.;
61G4double G4QIonIonCrossSection::lastECS=0.;
62G4int G4QIonIonCrossSection::lastI=0;
68 return &theCrossSection;
77 static std::vector <G4int> colPDG;
78 static std::vector <G4int> colN;
79 static std::vector <G4int> colZ;
80 static std::vector <G4double> colP;
81 static std::vector <G4double> colTH;
82 static std::vector <G4double> colICS;
83 static std::vector <G4double> colECS;
86 G4cout<<
"G4QIICS::GetCS:>>> f="<<fCS<<
", Z="<<tZ<<
"("<<lastZ<<
"), N="<<tN<<
"("<<lastN
87 <<
"),PDG="<<pPDG<<
"("<<lastPDG<<
"), p="<<pMom<<
"("<<lastTH<<
")"<<
",Sz="
93 G4cout<<
"G4QIonIonCS::GetCS: *** Found pPDG="<<pPDG<<
" =--=> CS=0"<<
G4endl;
98 if(tN!=lastN || tZ!=lastZ || pPDG!=lastPDG)
108 G4cout<<
"G4QIICS::GetCS:FindI="<<lastI<<
",pPDG="<<pPDG<<
",tN="<<tN<<
",tZ="<<tZ<<
G4endl;
110 if(lastI)
for(
G4int i=0; i<lastI; i++)
113 G4cout<<
"G4QII::GCS:P="<<colPDG[i]<<
",N="<<colN[i]<<
",Z="<<colZ[i]<<
",j="<<j<<
G4endl;
115 if(colPDG[i]==pPDG && colN[i]==tN && colZ[i]==tZ)
120 G4cout<<
"G4QIICS::GetCS:*Found* P="<<pMom<<
",Threshold="<<lastTH<<
",j="<<j<<
G4endl;
125 G4cout<<
"G4QIICS::GetCS:Found P="<<pMom<<
"<Threshold="<<lastTH<<
"->XS=0"<<
G4endl;
135 G4cout<<
"G4QIonIonCS::GetCS:P="<<pMom<<
",InXS="<<lastICS*millibarn<<
",ElXS="
136 <<lastECS*millibarn<<
G4endl;
139 if(fCS)
return lastICS*millibarn;
140 return lastECS*millibarn;
145 G4cout<<
"G4QIICS::G:UpdatDB P="<<pMom<<
",f="<<fCS<<
",lI="<<lastI<<
",j="<<j<<
G4endl;
150 G4cout<<
"G4QIonIonCS::GetCS:=>New(inDB) InCS="<<lastICS<<
",ElCS="<<lastECS<<
G4endl;
152 if((lastICS<=0. || lastECS<=0.) && pMom>lastTH)
155 G4cout<<
"G4QIonIonCS::GetCS:New,T="<<pMom<<
"(CS=0) > Threshold="<<lastTH<<
G4endl;
162 G4cout<<
"--->G4QIonIonCrossSec::GetCrosSec: pPDG="<<pPDG<<
",j="<<j<<
",N="<<colN[i]
163 <<
",Z["<<i<<
"]="<<colZ[i]<<
",PDG="<<colPDG[i]<<
G4endl;
170 G4cout<<
"G4QIICS::GetCrosSec:CalcNew P="<<pMom<<
",f="<<fCS<<
",lastI="<<lastI<<
G4endl;
175 if(lastICS<=0. || lastECS<=0.)
179 G4cout<<
"G4QIonIonCrossSect::GetCrossSect:NewThresh="<<lastTH<<
",P="<<pMom<<
G4endl;
184 G4cout<<
"G4QIonIonCS::GetCS:1-st,P="<<pMom<<
">Thresh="<<lastTH<<
"->XS=0"<<
G4endl;
190 G4cout<<
"G4QIICS::GetCS: *New* ICS="<<lastICS<<
", ECS="<<lastECS<<
",N="<<lastN<<
",Z="
195 colPDG.push_back(pPDG);
196 colP.push_back(pMom);
197 colTH.push_back(lastTH);
198 colICS.push_back(lastICS);
199 colECS.push_back(lastECS);
201 G4cout<<
"G4QIICS::GetCS:*1st*, P="<<pMom<<
"(MeV), InCS="<<lastICS*millibarn
202 <<
", ElCS="<<lastECS*millibarn<<
"(mb)"<<
G4endl;
204 if(fCS)
return lastICS*millibarn;
205 return lastECS*millibarn;
210 G4cout<<
"G4QIICS::GetCS: Update lastI="<<lastI<<
",j="<<j<<
G4endl;
214 colICS[lastI]=lastICS;
215 colECS[lastI]=lastECS;
218 else if(pMom<=lastTH)
221 G4cout<<
"G4QIICS::GetCS: Current T="<<pMom<<
" < Threshold="<<lastTH<<
", CS=0"<<
G4endl;
225 else if(std::fabs(lastP/pMom-1.)<
tolerance)
228 G4cout<<
"G4QIICS::GetCS:OldCur P="<<pMom<<
"="<<pMom<<
", InCS="<<lastICS*millibarn
229 <<
", ElCS="<<lastECS*millibarn<<
"(mb)"<<
G4endl;
231 if(fCS)
return lastICS*millibarn;
232 return lastECS*millibarn;
237 G4cout<<
"G4QIICS::GetCS:UpdatCur P="<<pMom<<
",f="<<fCS<<
",I="<<lastI<<
",j="<<j<<
G4endl;
244 G4cout<<
"G4QIICS::GetCroSec:*End*,P="<<pMom<<
"(MeV), InCS="<<lastICS*millibarn<<
", ElCS="
245 <<lastECS*millibarn<<
"(mb)"<<
G4endl;
247 if(fCS)
return lastICS*millibarn;
248 return lastECS*millibarn;
260 static const G4int nL=100;
261 static const G4double Pmin=THmin+(nL-1)*dP;
263 static const G4int nH=100;
264 static const G4double milP=std::log(Pmin);
265 static const G4double malP=std::log(Pmax);
266 static const G4double dlP=(malP-milP)/(nH-1);
269 static std::vector <G4double*> LENI;
270 static std::vector <G4double*> HENI;
271 static std::vector <G4double*> LENE;
272 static std::vector <G4double*> HENE;
274 G4cout<<
"G4QIonIonCrossSection::CalcCS: Z="<<tZ<<
", N="<<tN<<
", P="<<TotMom<<
G4endl;
277 G4int zPDG=dPDG/1000;
282 if (Momentum<THmin)
return 0.;
302 G4int er=GetFunctions(pZ,pN,tZ,tN,lastLENI,lastHENI,lastLENE,lastHENE);
303 if(er<1)
G4cerr<<
"*W*G4QIonIonCroSec::CalcCrossSection: pA="<<tA<<
",tA="<<tA<<
G4endl;
305 G4cout<<
"G4QIonIonCrossSection::CalcCS: GetFunctions er="<<er<<
",pA="<<pA<<
",tA="<<tA
309 G4int sync=LENI.size();
310 if(sync!=I)
G4cout<<
"*W*G4IonIonCrossSec::CalcCrossSect:Sync="<<sync<<
"#"<<I<<
G4endl;
311 LENI.push_back(lastLENI);
312 HENI.push_back(lastHENI);
313 LENE.push_back(lastLENE);
314 HENE.push_back(lastHENE);
318 if (Momentum<lastTH)
return 0.;
319 else if (Momentum<Pmin)
322 G4cout<<
"G4QIICS::CalCS:p="<<pA<<
",t="<<tA<<
",n="<<nL<<
",T="<<THmin<<
",d="<<dP<<
G4endl;
326 G4cout<<
"-Warning-G4QIICS::CalcCS: pA="<<pA<<
" or tA="<<tA<<
" aren't nuclei"<<
G4endl;
332 if(XS) sigma=
EquLinearFit(Momentum,nL,THmin,dPp,lastLENI);
333 else sigma=
EquLinearFit(Momentum,nL,THmin,dPp,lastLENE);
336 if(sigma<0.)
G4cout<<
"-Warning-G4QIICS::CalcCS:pA="<<pA<<
",tA="<<tA<<
",XS="<<XS<<
",P="
337 <<Momentum<<
", Th="<<THmin<<
", dP="<<dP<<
G4endl;
340 else if (Momentum<Pmax*pA)
344 G4cout<<
"G4QIonIonCS::CalcCS:before HEN nH="<<nH<<
",iE="<<milP<<
",dlP="<<dlP<<
G4endl;
348 G4cout<<
"-Warning-G4QIICS::CalCS:pA="<<pA<<
" or tA="<<tA<<
" aren't composit"<<
G4endl;
360 std::pair<G4double, G4double> inelel = CalculateXS(pZ, pN, tZ, tN, Momentum);
361 if(XS) sigma=inelel.first;
362 else sigma=inelel.second;
365 G4cout<<
"G4IonIonCrossSection::CalculateCrossSection: sigma="<<sigma<<
G4endl;
367 if(sigma<0.)
return 0.;
380 static const G4int nL=100;
381 static const G4double Pmin=THmin+(nL-1)*dP;
383 static const G4int nH=100;
384 static const G4double milP=std::log(Pmin);
385 static const G4double malP=std::log(Pmax);
386 static const G4double dlP=(malP-milP)/(nH-1);
387 static const G4double lP=std::exp(dlP);
389 if(pZ<1 || pN<0 || tZ<1 || tN<0)
391 G4cout<<
"-W-G4QIonIonCS::GetFunct:pZ="<<pZ<<
",pN="<<pN<<
",tZ="<<tZ<<
",tN="<<tN<<
G4endl;
397 for(
G4int k=0; k<nL; k++)
399 std::pair<G4double,G4double> len = CalculateXS(pZ, pN, tZ, tN, Mom);
405 for(
G4int j=0; j<nH; j++)
407 std::pair<G4double,G4double> len = CalculateXS(pZ, pN, pZ, pN, lMom);
413 G4cout<<
"G4QIonIonCS::GetFunctions: pZ="<<pZ<<
", tZ="<<tZ<<
" pair is calculated"<<
G4endl;
419std::pair<G4double,G4double> G4QIonIonCrossSection::CalculateXS(
G4int pZ,
G4int pN,
G4int tZ,
428 if(pA<.9 || tA<.9 ||pA>239. || tA>239 || Mom < 0.)
return std::make_pair(0.,0.);
438 else if(pN == 1 && !pZ)
443 else G4cerr<<
"-Warn-G4QIICS::CaCS:pZ="<<pZ<<
",pN="<<pN<<
",tZ="<<tZ<<
",tN="<<tN<<
G4endl;
462 G4double tot=R*CalculateTotal(pA, tA, Mom);
463 G4double rat=CalculateElTot(pA, tA, Mom);
468 return std::make_pair(inCS,elCS);
478 G4double e=std::pow(pA,0.1)+std::pow(tA,0.1);
481 if(pA>4. && tA>4.) f=3.3+130./ab/ab+2.25/e;
482 G4double c=(385.+11.*ab/(1.+.02*ab*al)+(.5*ab+500./al/al)/al)*std::pow(d,f);
485 G4cout<<
"G4QIonIonCS::CalcTot:P="<<Mom<<
", stot="<<c+d*r*r<<
", d="<<d<<
", r="<<r<<
G4endl;
497 G4double d=.00166/(1.+.002*std::pow(ab,1.33333));
499 G4double e=1.+.235*(std::fabs(ap-5.78));
500 if (std::fabs(pA-2.)<.1 && std::fabs(tA-2.)<.1) e=2.18;
501 else if(std::fabs(pA-2.)<.1 && std::fabs(tA-3.)<.1) e=1.90;
502 else if(std::fabs(pA-3.)<.1 && std::fabs(tA-2.)<.1) e=1.90;
503 else if(std::fabs(pA-2.)<.1 && std::fabs(tA-4.)<.1) e=1.65;
504 else if(std::fabs(pA-4.)<.1 && std::fabs(tA-2.)<.1) e=1.65;
505 else if(std::fabs(pA-3.)<.1 && std::fabs(tA-4.)<.1) e=1.32;
506 else if(std::fabs(pA-4.)<.1 && std::fabs(tA-3.)<.1) e=1.32;
507 else if(std::fabs(pA-4.)<.1 && std::fabs(tA-4.)<.1) e=1.;
509 G4double g_value=std::log(std::pow(pA,0.35)+std::pow(tA,0.35));
513 G4cout<<
"G4QIonIonCS::CalcElT:P="<<Mom<<
",el/tot="<<c+d*r*r<<
",d="<<d<<
", r="<<r<<
G4endl;
524 if(pZ<.99 || pN<0. || tZ<.99 || tN<0.)
return 0.;
528 G4double dE=pZ*tZ/(std::pow(pA,third)+std::pow(tA,third))/pA;
529 return std::sqrt(dE*(tpM+dE));
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
G4double ThresholdMomentum(G4int pZ, G4int pN, G4int tZ, G4int tN)
static G4VQCrossSection * GetPointer()
virtual G4double GetCrossSection(G4bool fCS, G4double pMom, G4int Z, G4int N, G4int PDG)
G4double CalculateCrossSection(G4bool fCS, G4int F, G4int I, G4int PDG, G4int tZ, G4int tN, G4double Momentum)
static G4VQCrossSection * GetPointer()
static G4VQCrossSection * GetPointer()
static G4VQCrossSection * GetPointer()
static G4VQCrossSection * GetPointer()
G4double EquLinearFit(G4double X, G4int N, G4double X0, G4double DX, G4double *Y)
virtual G4double GetCrossSection(G4bool, G4double, G4int, G4int, G4int pPDG=0)
virtual G4double ThresholdEnergy(G4int Z, G4int N, G4int PDG=0)
static G4double tolerance