51G4double* G4QHyperonNuclearCrossSection::lastLEN=0;
52G4double* G4QHyperonNuclearCrossSection::lastHEN=0;
53G4int G4QHyperonNuclearCrossSection::lastN=0;
54G4int G4QHyperonNuclearCrossSection::lastZ=0;
55G4double G4QHyperonNuclearCrossSection::lastP=0.;
56G4double G4QHyperonNuclearCrossSection::lastTH=0.;
57G4double G4QHyperonNuclearCrossSection::lastCS=0.;
58G4int G4QHyperonNuclearCrossSection::lastI=0;
59std::vector<G4double*>* G4QHyperonNuclearCrossSection::LEN =
new std::vector<G4double*>;
60std::vector<G4double*>* G4QHyperonNuclearCrossSection::HEN =
new std::vector<G4double*>;
66 return &theCrossSection;
71 G4int lens=LEN->size();
72 for(
G4int i=0; i<lens; ++i)
delete[] (*LEN)[i];
74 G4int hens=HEN->size();
75 for(
G4int i=0; i<hens; ++i)
delete[] (*HEN)[i];
86 static std::vector <G4int> colN;
87 static std::vector <G4int> colZ;
88 static std::vector <G4double> colP;
89 static std::vector <G4double> colTH;
90 static std::vector <G4double> colCS;
93 G4cout<<
"G4QHyCS::GetCS:>>> f="<<fCS<<
", p="<<pMom<<
", Z="<<tgZ<<
"("<<lastZ<<
") ,N="<<tgN
94 <<
"("<<lastN<<
"), PDG="<<PDG<<
", thresh="<<lastTH<<
",Sz="<<colN.size()<<
G4endl;
96 if(PDG!=3122 && PDG!=3212 && PDG!=3112 && PDG!=3322 && PDG!=3312 && PDG!=3334)
97 G4cout<<
"-Warning-G4QHyperonCS::GetCS:Not a Zero or Negative Hyperon,PDG="<<PDG<<
G4endl;
99 if(tgN!=lastN || tgZ!=lastZ)
108 G4cout<<
"G4QHyCS::GetCS: the amount of records in the AMDB lastI="<<lastI<<
G4endl;
110 if(lastI)
for(
G4int i=0; i<lastI; i++)
112 if(colN[i]==tgN && colZ[i]==tgZ)
117 G4cout<<
"G4QHyCS::GetCS:*Found* P="<<pMom<<
",Threshold="<<lastTH<<
",j="<<j<<
G4endl;
122 G4cout<<
"G4QPCS::GetCS:Found,P="<<pMom<<
" < Threshold="<<lastTH<<
",CS=0"<<
G4endl;
132 G4cout<<
"..G4QHyCS::GetCS:.DoNothing.P="<<pMom<<
",CS="<<lastCS*millibarn<<
G4endl;
135 return lastCS*millibarn;
140 G4cout<<
"G4QHyCS::G:UpdatDB P="<<pMom<<
",f="<<fCS<<
",lI="<<lastI<<
",j="<<j<<
G4endl;
144 G4cout<<
"G4QHyCS::GetCrosSec: *****> New (inDB) Calculated CS="<<lastCS<<
G4endl;
146 if(lastCS<=0. && pMom>lastTH)
149 G4cout<<
"G4QHyCS::GetCS: New P="<<pMom<<
"(CS=0) > Threshold="<<lastTH<<
G4endl;
157 G4cout<<
"-->G4QHyCrossSec::GetCrosSec: pPDG="<<PDG<<
", j="<<j<<
", N="<<colN[i]
158 <<
",Z["<<i<<
"]="<<colZ[i]<<
G4endl;
163 G4cout<<
"-?-G4QHyCS::GetCS:RC Z="<<tgZ<<
",N="<<tgN<<
",in="<<in<<
",j="<<j<<
" ?"<<
G4endl;
168 G4cout<<
"^^^G4QHyCS::GetCS:CalcNew P="<<pMom<<
", f="<<fCS<<
", lastI="<<lastI<<
G4endl;
177 G4cout<<
"G4QHyCrossSection::GetCrossSect: NewThresh="<<lastTH<<
",P="<<pMom<<
G4endl;
181 colP.push_back(pMom);
182 colTH.push_back(lastTH);
183 colCS.push_back(lastCS);
185 G4cout<<
"G4QHyCS::GetCrosSec:recCS="<<lastCS<<
",lZ="<<lastN<<
",lN="<<lastZ<<
G4endl;
189 G4cout<<
"G4QHyCS::GetCS:1st,P="<<pMom<<
"(MeV),CS="<<lastCS*millibarn<<
"(mb)"<<
G4endl;
191 return lastCS*millibarn;
196 G4cout<<
"G4QHyCS::GetCS: Update lastI="<<lastI<<
",j="<<j<<
G4endl;
202 else if(pMom<=lastTH)
205 G4cout<<
"G4QHyCS::GetCS: Current P="<<pMom<<
" < Threshold="<<lastTH<<
", CS=0"<<
G4endl;
209 else if(std::fabs(lastP-pMom)<
tolerance*pMom)
213 G4cout<<
".G4QHyCS::GetCS:OldNZ&P="<<lastP<<
"="<<pMom<<
",CS="<<lastCS*millibarn<<
G4endl;
215 return lastCS*millibarn;
220 G4cout<<
"!-G4QHyCS::GetCS:UseCur P="<<pMom<<
",f="<<fCS<<
",I="<<lastI<<
",j="<<j<<
G4endl;
226 G4cout<<
"==>G4QHyCS::GetCroSec: P="<<pMom<<
"(MeV),CS="<<lastCS*millibarn<<
"(mb)"<<
G4endl;
228 return lastCS*millibarn;
236 static const G4double THmiG=THmin*.001;
239 static const G4int nL=105;
240 static const G4double Pmin=THmin+(nL-1)*dP;
242 static const G4int nH=224;
243 static const G4double milP=std::log(Pmin);
244 static const G4double malP=std::log(Pmax);
245 static const G4double dlP=(malP-milP)/(nH-1);
246 static const G4double milPG=std::log(.001*Pmin);
248 G4cout<<
"G4QHyNucCS::CalCS:N="<<targN<<
",Z="<<targZ<<
",P="<<Momentum<<
">"<<THmin<<
G4endl;
254 G4cout<<
"G4QHypNucCS::CalCS: A="<<A<<
", F="<<F<<
",I="<<I<<
",nL="<<nL<<
",nH="<<nH<<
G4endl;
260 G4int sync=LEN->size();
261 if(sync<=I)
G4cerr<<
"*!*G4QPiMinusNuclCS::CalcCrosSect:Sync="<<sync<<
"<="<<I<<
G4endl;
271 for(
G4int n=0; n<nL; n++)
273 lastLEN[n] = CrossSectionLin(targZ, targN, P);
277 for(
G4int n=0; n<nH; n++)
279 lastHEN[n] = CrossSectionLog(targZ, targN, lP);
283 G4cout<<
"-*->G4QHypNucCS::CalcCS:Tab for Z="<<targZ<<
", N="<<targN<<
",I="<<I<<
G4endl;
287 G4int sync=LEN->size();
290 G4cerr<<
"***G4QHyperNuclCS::CalcCrossSect: Sinc="<<sync<<
"#"<<I<<
", Z=" <<targZ
291 <<
", N="<<targN<<
", F="<<F<<
G4endl;
294 LEN->push_back(lastLEN);
295 HEN->push_back(lastHEN);
300 G4cout<<
"G4QHyNCS::CalcCS:lTH="<<lastTH<<
",Pmi="<<Pmin<<
",dP="<<dP<<
",dlP="<<dlP<<
G4endl;
302 if (Momentum<lastTH)
return 0.;
303 else if (Momentum<Pmin)
306 G4cout<<
"G4QHyNCS::CalcCS:bLEN nL="<<nL<<
",TH="<<THmin<<
",dP="<<dP<<
G4endl;
311 G4cout<<
"G4QHyNuCS::CalcCS: E="<<Momentum<<
",T="<<THmin<<
",dP="<<dP<<
G4endl;
314 else if (Momentum<Pmax)
318 G4cout<<
"G4QHyNucCS::CalcCS: before HEN nH="<<nH<<
",iE="<<milP<<
",dlP="<<dlP<<
G4endl;
325 sigma=CrossSectionFormula(targZ, targN, P, std::log(P));
328 G4cout<<
"G4QHyperonNuclearCrossSection::CalcCS: CS="<<sigma<<
G4endl;
330 if(sigma<0.)
return 0.;
338 return CrossSectionFormula(tZ, tN, P, lP);
345 return CrossSectionFormula(tZ, tN, P, lP);
359 G4double El=(.0557*ld2+6.72+99./p2)/(1.+2./sp+2./p4);
360 G4double To=(.3*ld2+38.2+900./
sp)/(1.+27./sp+3./p4);
363 else if(tZ<97 && tN<152)
377 G4double c=(170.+3600./a2s)/(1.+65./a2s);
378 G4double g_value=42.*(std::exp(al*0.8)+4.E-8*a4)/(1.+28./a)/(1.+5.E-5*a2);
385 e=380.+18.*a2/(1.+a2/60.)/(1.+2.E-19*a8);
387 h=1.E-8*a2/(1.+a2/17.)/(1.+3.E-20*a8);
388 t=(.2+.00056*a2)/(1.+a2*.0006);
390 sigma=(c+d*d)/(1.+t/ssp+r/p4)+(g_value+e*std::exp(-6.*P))/(1.+h/p4/p4);
392 G4cout<<
"G4QHyperonNucCS::CSForm: A="<<a<<
",P="<<P<<
",CS="<<sigma<<
",c="<<c<<
",g="<<g_value
393 <<
",d="<<d<<
",r="<<r<<
",e="<<e<<
",h="<<h<<
G4endl;
398 G4cerr<<
"-Warning-G4QHyperonNuclearCroSect::CSForm:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
401 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)
~G4QHyperonNuclearCrossSection()
virtual G4double GetCrossSection(G4bool fCS, G4double pMom, G4int tgZ, G4int tgN, G4int pPDG=3122)
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