63 LEN =
new std::vector<G4double*>;
64 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.;
263 if(tZ<.99 || tN<0.)
return 0.;
264 else if(tZ==1 && tN==0)
return 300.;
266 G4double dE=tZ/(1.+std::pow(tA,third));
269 return std::sqrt(T*(tpM+T));
276 return CrossSectionFormula(tZ, tN, P, lP);
283 return CrossSectionFormula(tZ, tN, P, lP);
303 else if(tZ==1 && tN==1)
309 sigma=(.55*d*d+38.+23./std::sqrt(P))/(1.+.3/p2/p2)+18./(f*f+.1089)+.02/(gg*gg+.0025);
311 else if(tZ<97 && tN<152)
321 G4double c=41.*std::exp(al*.68)*(1.+44./a2)/(1.+8./a)/(1.+200./a2/a2);
327 sigma=(c+d*d)/(1.+(.2-.009*sa)/p4)+f/(u*u+h*h)/(1.+r/p2);
331 G4cerr<<
"-Warning-G4ChipsPiPlusNuclearCroSect::CSForm:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
334 if(sigma<0.)
return 0.;
342 G4cerr<<
"***G4ChipsPionPlusInelasticXS::EquLinearFit: DX="<<DX<<
", N="<<N<<
G4endl;
348 G4int j=
static_cast<int>(d);
#define G4_DECLARE_XS_FACTORY(cross_section)
G4DLLIMPORT std::ostream G4cerr
virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
~G4ChipsPionPlusInelasticXS()
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int tgZ, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
virtual G4bool IsIsoApplicable(const G4DynamicParticle *Pt, G4int Z, G4int A, const G4Element *elm, const G4Material *mat)
G4ChipsPionPlusInelasticXS()
G4ParticleDefinition * GetDefinition() const
G4double GetTotalMomentum() const
G4double GetPDGMass() const
static G4PionPlus * Definition()
static G4PionPlus * PionPlus()