66 LEN =
new std::vector<G4double*>;
67 HEN =
new std::vector<G4double*>;
73 std::size_t lens=LEN->size();
74 for(std::size_t i=0; i<lens; ++i)
delete[] (*LEN)[i];
76 std::size_t hens=HEN->size();
77 for(std::size_t i=0; i<hens; ++i)
delete[] (*HEN)[i];
84 outFile <<
"G4ChipsPionPlusInelasticXS provides the inelastic cross\n"
85 <<
"section for pion+ nucleus scattering as a function of incident\n"
86 <<
"momentum. The cross section is calculated using M. Kossov's\n"
87 <<
"CHIPS parameterization of cross section data.\n";
115 if(tgN!=lastN || tgZ!=lastZ)
121 lastI = (
G4int)colN.size();
123 if(lastI)
for(
G4int i=0; i<lastI; ++i)
125 if(colN[i]==tgN && colZ[i]==tgZ)
137 lastCS=CalculateCrossSection(-1,j,211,lastZ,lastN,pMom);
138 if(lastCS<=0. && pMom>lastTH)
150 lastCS=CalculateCrossSection(0,j,211,lastZ,lastN,pMom);
157 colP.push_back(pMom);
158 colTH.push_back(lastTH);
159 colCS.push_back(lastCS);
161 return lastCS*millibarn;
169 else if(pMom<=lastTH)
175 lastCS=CalculateCrossSection(1,j,211,lastZ,lastN,pMom);
178 return lastCS*millibarn;
186 static const G4double THmiG=THmin*.001;
189 static const G4int nL=105;
190 static const G4double Pmin=THmin+(nL-1)*dP;
192 static const G4int nH=224;
195 static const G4double dlP=(malP-milP)/(nH-1);
205 if(sync<=I)
G4cerr<<
"*!*G4ChipsPiMinusNuclCS::CalcCrosSect:Sync="<<sync<<
"<="<<I<<
G4endl;
215 for(
G4int k=0; k<nL; k++)
217 lastLEN[k] = CrossSectionLin(targZ, targN, P);
223 lastHEN[
n] = CrossSectionLog(targZ, targN, lP);
231 G4cerr<<
"***G4ChipsPiMinusNuclCS::CalcCrossSect: Sinc="<<sync<<
"#"<<
I<<
", Z=" <<targZ
232 <<
", N="<<targN<<
", F="<<F<<
G4endl;
235 LEN->push_back(lastLEN);
236 HEN->push_back(lastHEN);
240 if (Momentum<lastTH)
return 0.;
241 else if (Momentum<Pmin)
243 sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN);
245 else if (Momentum<Pmax)
248 sigma=EquLinearFit(lP,nH,milP,dlP,lastHEN);
253 sigma=CrossSectionFormula(targZ, targN, P,
G4Log(P));
255 if(sigma<0.)
return 0.;
266 if(tZ<.99 || tN<0.)
return 0.;
267 else if(tZ==1 && tN==0)
return 300.;
272 return std::sqrt(T*(tpM+T));
279 return CrossSectionFormula(tZ, tN, P, lP);
286 return CrossSectionFormula(tZ, tN, P, lP);
306 else if(tZ==1 && tN==1)
312 sigma=(.55*d*d+38.+23./std::sqrt(P))/(1.+.3/p2/p2)+18./(f*f+.1089)+.02/(gg*gg+.0025);
314 else if(tZ<97 && tN<152)
324 G4double c=41.*
G4Exp(al*.68)*(1.+44./a2)/(1.+8./a)/(1.+200./a2/a2);
330 sigma=(c+d*d)/(1.+(.2-.009*sa)/p4)+f/(u*u+h*h)/(1.+r/p2);
334 G4cerr<<
"-Warning-G4ChipsPiPlusNuclearCroSect::CSForm:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
337 if(sigma<0.)
return 0.;
345 G4cerr<<
"***G4ChipsPionPlusInelasticXS::EquLinearFit: DX="<<DX<<
", N="<<
N<<
G4endl;
351 G4int jj=
static_cast<int>(d);
353 else if(jj>N2) jj=N2;
#define G4_DECLARE_XS_FACTORY(cross_section)
G4double Y(G4double density)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
G4GLOB_DLL 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)
virtual void CrossSectionDescription(std::ostream &) const
G4ChipsPionPlusInelasticXS()
G4double GetTotalMomentum() const
G4double GetPDGMass() const
static G4PionPlus * Definition()
static G4PionPlus * PionPlus()
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const