64 LEN =
new std::vector<G4double*>;
65 HEN =
new std::vector<G4double*>;
70 G4int lens=LEN->size();
71 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];
104 static std::vector <G4int> colN;
105 static std::vector <G4int> colZ;
106 static std::vector <G4double> colP;
107 static std::vector <G4double> colTH;
108 static std::vector <G4double> colCS;
112 if(tgN!=lastN || tgZ!=lastZ)
120 if(lastI)
for(
G4int i=0; i<lastI; i++)
122 if(colN[i]==tgN && colZ[i]==tgZ)
134 lastCS=CalculateCrossSection(-1,j,-211,lastZ,lastN,pMom);
135 if(lastCS<=0. && pMom>lastTH)
147 lastCS=CalculateCrossSection(0,j,-211,lastZ,lastN,pMom);
154 colP.push_back(pMom);
155 colTH.push_back(lastTH);
156 colCS.push_back(lastCS);
158 return lastCS*millibarn;
166 else if(pMom<=lastTH)
172 lastCS=CalculateCrossSection(1,j,-211,lastZ,lastN,pMom);
175 return lastCS*millibarn;
183 static const G4double THmiG=THmin*.001;
186 static const G4int nL=105;
187 static const G4double Pmin=THmin+(nL-1)*dP;
189 static const G4int nH=224;
190 static const G4double milP=std::log(Pmin);
191 static const G4double malP=std::log(Pmax);
192 static const G4double dlP=(malP-milP)/(nH-1);
193 static const G4double milPG=std::log(.001*Pmin);
201 G4int sync=LEN->size();
202 if(sync<=I)
G4cerr<<
"*!*G4ChipsPiMinusNuclCS::CalcCrosSect:Sync="<<sync<<
"<="<<I<<
G4endl;
212 for(
G4int k=0; k<nL; k++)
214 lastLEN[k] = CrossSectionLin(targZ, targN, P);
220 lastHEN[
n] = CrossSectionLog(targZ, targN, lP);
225 G4int sync=LEN->size();
228 G4cerr<<
"***G4ChipsPiMinusNuclCS::CalcCrossSect: Sinc="<<sync<<
"#"<<I<<
", Z=" <<targZ
229 <<
", N="<<targN<<
", F="<<F<<
G4endl;
232 LEN->push_back(lastLEN);
233 HEN->push_back(lastHEN);
237 if (Momentum<lastTH)
return 0.;
238 else if (Momentum<Pmin)
240 sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN);
242 else if (Momentum<Pmax)
245 sigma=EquLinearFit(lP,nH,milP,dlP,lastHEN);
250 sigma=CrossSectionFormula(targZ, targN, P, std::log(P));
252 if(sigma<0.)
return 0.;
260 return CrossSectionFormula(tZ, tN, P, lP);
267 return CrossSectionFormula(tZ, tN, P, lP);
289 sigma=(To-El)+.4/md+.01/hd;
292 else if(tZ==1 && tN==1)
298 sigma=(.55*d*d+38.+23./std::sqrt(P))/(1.+.3/p2/p2)+18./(f*f+.1089)+.02/(gg*gg+.0025);
300 else if(tZ<97 && tN<152)
310 G4double c=41.*std::exp(al*.68)*(1.+44./a2)/(1.+8./a)/(1.+200./a2/a2);
315 sigma=(c+d*d)/(1.+.17/p4)+f/(u*u+h*h);
319 G4cerr<<
"-Warning-G4ChipsPiMinusNuclearCroSect::CSForm:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
322 if(sigma<0.)
return 0.;
330 G4cerr<<
"***G4ChipsPionMinusInelasticXS::EquLinearFit: DX="<<DX<<
", N="<<N<<
G4endl;
336 G4int j=
static_cast<int>(d);
#define G4_DECLARE_XS_FACTORY(cross_section)
G4DLLIMPORT std::ostream G4cerr
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int tgZ, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
~G4ChipsPionMinusInelasticXS()
virtual G4bool IsIsoApplicable(const G4DynamicParticle *Pt, G4int Z, G4int A, const G4Element *elm, const G4Material *mat)
virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
G4ChipsPionMinusInelasticXS()
G4ParticleDefinition * GetDefinition() const
G4double GetTotalMomentum() const
static G4PionMinus * PionMinus()