63 LEN =
new std::vector<G4double*>;
64 HEN =
new std::vector<G4double*>;
69 G4int lens=LEN->size();
70 for(
G4int i=0; i<lens; ++i)
delete[] (*LEN)[i];
73 G4int hens=HEN->size();
74 for(
G4int i=0; i<hens; ++i)
delete[] (*HEN)[i];
131 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_;
132 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_;
133 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_;
134 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_;
135 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_;
139 if(tgN!=lastN || tgZ!=lastZ)
148 if(lastI)
for(
G4int i=0; i<lastI; i++)
150 if(colN[i]==tgN && colZ[i]==tgZ)
163 lastCS=CalculateCrossSection(-1,j,PDG,lastZ,lastN,pMom);
165 if(lastCS<=0. && pMom>lastTH)
177 lastCS=CalculateCrossSection(0,j,PDG,lastZ,lastN,pMom);
184 colP.push_back(pMom);
185 colTH.push_back(lastTH);
186 colCS.push_back(lastCS);
196 else if(pMom<=lastTH)
202 lastCS=CalculateCrossSection(1,j,PDG,lastZ,lastN,pMom);
213 static const G4double THmiG=THmin*.001;
216 static const G4int nL=105;
217 static const G4double Pmin=THmin+(nL-1)*dP;
219 static const G4int nH=224;
220 static const G4double milP=std::log(Pmin);
221 static const G4double malP=std::log(Pmax);
222 static const G4double dlP=(malP-milP)/(nH-1);
223 static const G4double milPG=std::log(.001*Pmin);
231 G4int sync=LEN->size();
232 if(sync<=I)
G4cerr<<
"*!*G4QPiMinusNuclCS::CalcCrosSect:Sync="<<sync<<
"<="<<I<<
G4endl;
242 for(
G4int k=0; k<nL; k++)
244 lastLEN[k] = CrossSectionLin(targZ, targN, P);
250 lastHEN[
n] = CrossSectionLog(targZ, targN, lP);
255 G4int sync=LEN->size();
258 G4cerr<<
"***G4QHyperNuclCS::CalcCrossSect: Sinc="<<sync<<
"#"<<I<<
", Z=" <<targZ
259 <<
", N="<<targN<<
", F="<<F<<
G4endl;
262 LEN->push_back(lastLEN);
263 HEN->push_back(lastHEN);
267 if (Momentum<lastTH)
return 0.;
268 else if (Momentum<Pmin)
270 sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN);
272 else if (Momentum<Pmax)
275 sigma=EquLinearFit(lP,nH,milP,dlP,lastHEN);
280 sigma=CrossSectionFormula(targZ, targN, P, std::log(P));
282 if(sigma<0.)
return 0.;
290 return CrossSectionFormula(tZ, tN, P, lP);
297 return CrossSectionFormula(tZ, tN, P, lP);
311 G4double El=(.0557*ld2+6.72+99./p2)/(1.+2./sp+2./p4);
312 G4double To=(.3*ld2+38.2+900./
sp)/(1.+27./sp+3./p4);
315 else if(tZ<97 && tN<152)
329 G4double c=(170.+3600./a2s)/(1.+65./a2s);
330 G4double gg=42.*(std::exp(al*0.8)+4.E-8*a4)/(1.+28./a)/(1.+5.E-5*a2);
337 e=380.+18.*a2/(1.+a2/60.)/(1.+2.E-19*a8);
339 h=1.E-8*a2/(1.+a2/17.)/(1.+3.E-20*a8);
340 t=(.2+.00056*a2)/(1.+a2*.0006);
342 sigma=(c+d*
d)/(1.+t/ssp+r/p4)+(gg+e*std::exp(-6.*P))/(1.+h/p4/p4);
344 G4cout<<
"G4QHyperonNucCS::CSForm: A="<<a<<
",P="<<P<<
",CS="<<sigma<<
",c="<<c<<
",g="<<gg
345 <<
",d="<<d<<
",r="<<r<<
",e="<<e<<
",h="<<h<<
G4endl;
350 G4cerr<<
"-Warning-G4QHyperonNuclearCroSect::CSForm:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
353 if(sigma<0.)
return 0.;
361 G4cerr<<
"***G4ChipsHyperonInelasticXS::EquLinearFit: DX="<<DX<<
", N="<<N<<
G4endl;
367 G4int j=
static_cast<int>(
d);
virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int tgZ, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
static G4OmegaMinus * OmegaMinus()
G4int GetPDGEncoding() const
G4ParticleDefinition * GetDefinition() const
static G4SigmaZero * SigmaZero()
G4double GetTotalMomentum() const
static G4XiZero * XiZero()
G4GLOB_DLL std::ostream G4cout
G4ChipsHyperonInelasticXS()
static G4XiMinus * XiMinus()
static G4SigmaMinus * SigmaMinus()
#define G4_DECLARE_XS_FACTORY(cross_section)
~G4ChipsHyperonInelasticXS()
virtual G4bool IsIsoApplicable(const G4DynamicParticle *Pt, G4int Z, G4int A, const G4Element *elm, const G4Material *mat)
static G4SigmaPlus * SigmaPlus()
static G4Lambda * Lambda()
G4GLOB_DLL std::ostream G4cerr