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];
72 G4int hens=HEN->size();
73 for(
G4int i=0; i<hens; ++i)
delete[] (*HEN)[i];
103 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_;
104 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_;
105 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_;
106 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_;
107 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_;
111 if(tgN!=lastN || tgZ!=lastZ)
119 if(lastI)
for(
G4int i=0; i<lastI; i++)
121 if(colN[i]==tgN && colZ[i]==tgZ)
133 lastCS=CalculateCrossSection(-1,j,-211,lastZ,lastN,pMom);
134 if(lastCS<=0. && pMom>lastTH)
146 lastCS=CalculateCrossSection(0,j,-211,lastZ,lastN,pMom);
153 colP.push_back(pMom);
154 colTH.push_back(lastTH);
155 colCS.push_back(lastCS);
165 else if(pMom<=lastTH)
171 lastCS=CalculateCrossSection(1,j,-211,lastZ,lastN,pMom);
182 static const G4double THmiG=THmin*.001;
185 static const G4int nL=105;
186 static const G4double Pmin=THmin+(nL-1)*dP;
188 static const G4int nH=224;
189 static const G4double milP=std::log(Pmin);
190 static const G4double malP=std::log(Pmax);
191 static const G4double dlP=(malP-milP)/(nH-1);
192 static const G4double milPG=std::log(.001*Pmin);
200 G4int sync=LEN->size();
201 if(sync<=I)
G4cerr<<
"*!*G4ChipsPiMinusNuclCS::CalcCrosSect:Sync="<<sync<<
"<="<<I<<
G4endl;
211 for(
G4int k=0; k<nL; k++)
213 lastLEN[k] = CrossSectionLin(targZ, targN, P);
219 lastHEN[
n] = CrossSectionLog(targZ, targN, lP);
224 G4int sync=LEN->size();
227 G4cerr<<
"***G4ChipsPiMinusNuclCS::CalcCrossSect: Sinc="<<sync<<
"#"<<I<<
", Z=" <<targZ
228 <<
", N="<<targN<<
", F="<<F<<
G4endl;
231 LEN->push_back(lastLEN);
232 HEN->push_back(lastHEN);
236 if (Momentum<lastTH)
return 0.;
237 else if (Momentum<Pmin)
239 sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN);
241 else if (Momentum<Pmax)
244 sigma=EquLinearFit(lP,nH,milP,dlP,lastHEN);
249 sigma=CrossSectionFormula(targZ, targN, P, std::log(P));
251 if(sigma<0.)
return 0.;
259 return CrossSectionFormula(tZ, tN, P, lP);
266 return CrossSectionFormula(tZ, tN, P, lP);
288 sigma=(To-El)+.4/md+.01/hd;
291 else if(tZ==1 && tN==1)
297 sigma=(.55*d*d+38.+23./std::sqrt(P))/(1.+.3/p2/p2)+18./(f*f+.1089)+.02/(gg*gg+.0025);
299 else if(tZ<97 && tN<152)
309 G4double c=41.*std::exp(al*.68)*(1.+44./a2)/(1.+8./a)/(1.+200./a2/a2);
314 sigma=(c+d*
d)/(1.+.17/p4)+f/(u*u+h*h);
318 G4cerr<<
"-Warning-G4ChipsPiMinusNuclearCroSect::CSForm:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
321 if(sigma<0.)
return 0.;
329 G4cerr<<
"***G4ChipsPionMinusInelasticXS::EquLinearFit: DX="<<DX<<
", N="<<N<<
G4endl;
335 G4int j=
static_cast<int>(
d);
virtual G4bool IsIsoApplicable(const G4DynamicParticle *Pt, G4int Z, G4int A, const G4Element *elm, const G4Material *mat)
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int tgZ, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
~G4ChipsPionMinusInelasticXS()
G4ParticleDefinition * GetDefinition() const
G4ChipsPionMinusInelasticXS()
G4double GetTotalMomentum() const
virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
#define G4_DECLARE_XS_FACTORY(cross_section)
static G4PionMinus * PionMinus()
G4GLOB_DLL std::ostream G4cerr