66 LEN =
new std::vector<G4double*>;
67 HEN =
new std::vector<G4double*>;
72 G4int lens=LEN->size();
73 for(
G4int i=0; i<lens; ++i)
delete[] (*LEN)[i];
75 G4int hens=HEN->size();
76 for(
G4int i=0; i<hens; ++i)
delete[] (*HEN)[i];
83 outFile <<
"G4ChipsPionMinusInelasticXS provides the inelastic cross\n"
84 <<
"section for pion- nucleus scattering as a function of incident\n"
85 <<
"momentum. The cross section is calculated using M. Kossov's\n"
86 <<
"CHIPS parameterization of cross section data.\n";
113 if(tgN!=lastN || tgZ!=lastZ)
121 if(lastI)
for(
G4int i=0; i<lastI; i++)
123 if(colN[i]==tgN && colZ[i]==tgZ)
135 lastCS=CalculateCrossSection(-1,j,-211,lastZ,lastN,pMom);
136 if(lastCS<=0. && pMom>lastTH)
148 lastCS=CalculateCrossSection(0,j,-211,lastZ,lastN,pMom);
155 colP.push_back(pMom);
156 colTH.push_back(lastTH);
157 colCS.push_back(lastCS);
159 return lastCS*millibarn;
167 else if(pMom<=lastTH)
173 lastCS=CalculateCrossSection(1,j,-211,lastZ,lastN,pMom);
176 return lastCS*millibarn;
184 static const G4double THmiG=THmin*.001;
187 static const G4int nL=105;
188 static const G4double Pmin=THmin+(nL-1)*dP;
190 static const G4int nH=224;
193 static const G4double dlP=(malP-milP)/(nH-1);
202 G4int sync=LEN->size();
203 if(sync<=I)
G4cerr<<
"*!*G4ChipsPiMinusNuclCS::CalcCrosSect:Sync="<<sync<<
"<="<<I<<
G4endl;
213 for(
G4int k=0; k<nL; k++)
215 lastLEN[k] = CrossSectionLin(targZ, targN, P);
221 lastHEN[
n] = CrossSectionLog(targZ, targN, lP);
226 G4int sync=LEN->size();
229 G4cerr<<
"***G4ChipsPiMinusNuclCS::CalcCrossSect: Sinc="<<sync<<
"#"<<I<<
", Z=" <<targZ
230 <<
", N="<<targN<<
", F="<<F<<
G4endl;
233 LEN->push_back(lastLEN);
234 HEN->push_back(lastHEN);
238 if (Momentum<lastTH)
return 0.;
239 else if (Momentum<Pmin)
241 sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN);
243 else if (Momentum<Pmax)
246 sigma=EquLinearFit(lP,nH,milP,dlP,lastHEN);
251 sigma=CrossSectionFormula(targZ, targN, P,
G4Log(P));
253 if(sigma<0.)
return 0.;
261 return CrossSectionFormula(tZ, tN, P, lP);
268 return CrossSectionFormula(tZ, tN, P, lP);
290 sigma=(To-El)+.4/md+.01/hd;
293 else if(tZ==1 && tN==1)
299 sigma=(.55*d*d+38.+23./std::sqrt(P))/(1.+.3/p2/p2)+18./(f*f+.1089)+.02/(gg*gg+.0025);
301 else if(tZ<97 && tN<152)
311 G4double c=41.*
G4Exp(al*.68)*(1.+44./a2)/(1.+8./a)/(1.+200./a2/a2);
316 sigma=(c+d*d)/(1.+.17/p4)+f/(u*u+h*h);
320 G4cerr<<
"-Warning-G4ChipsPiMinusNuclearCroSect::CSForm:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
323 if(sigma<0.)
return 0.;
331 G4cerr<<
"***G4ChipsPionMinusInelasticXS::EquLinearFit: DX="<<DX<<
", N="<<N<<
G4endl;
337 G4int jj=
static_cast<int>(d);
339 else if(jj>N2) jj=N2;
#define G4_DECLARE_XS_FACTORY(cross_section)
double A(double temperature)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
G4GLOB_DLL 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 void CrossSectionDescription(std::ostream &) const
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()
G4double GetTotalMomentum() const