69 LEN =
new std::vector<G4double*>;
70 HEN =
new std::vector<G4double*>;
75 std::size_t lens=LEN->size();
76 for(std::size_t i=0; i<lens; ++i)
delete[] (*LEN)[i];
78 std::size_t hens=HEN->size();
79 for(std::size_t i=0; i<hens; ++i)
delete[] (*HEN)[i];
86 outFile <<
"G4ChipsProtonInelasticXS provides the inelastic cross\n"
87 <<
"section for proton nucleus scattering as a function of incident\n"
88 <<
"momentum. The cross section is calculated using M. Kossov's\n"
89 <<
"CHIPS parameterization of cross section data.\n";
117 if(tgN!=lastN || tgZ!=lastZ)
123 lastI = (
G4int)colN.size();
125 if(lastI)
for(
G4int i=0; i<lastI; ++i)
127 if(colN[i]==tgN && colZ[i]==tgZ)
139 lastCS=CalculateCrossSection(-1,j,2212,lastZ,lastN,pMom);
140 if(lastCS<=0. && pMom>lastTH)
152 lastCS=CalculateCrossSection(0,j,2212,lastZ,lastN,pMom);
159 colP.push_back(pMom);
160 colTH.push_back(lastTH);
161 colCS.push_back(lastCS);
163 return lastCS*millibarn;
171 else if(pMom<=lastTH)
177 lastCS=CalculateCrossSection(1,j,2212,lastZ,lastN,pMom);
180 return lastCS*millibarn;
188 static const G4double THmiG=THmin*.001;
191 static const G4int nL=105;
192 static const G4double Pmin=THmin+(nL-1)*dP;
194 static const G4int nH=224;
197 static const G4double dlP=(malP-milP)/(nH-1);
204 if(sync<=I)
G4cout<<
"*!*G4QProtonNuclCS::CalcCrossSect:Sync="<<sync<<
"<="<<I<<
G4endl;
214 for(
G4int k=0; k<nL; ++k)
216 lastLEN[k] = CrossSectionLin(targZ, targN, P);
222 lastHEN[
n] = CrossSectionLog(targZ, targN, lP);
230 G4cout<<
"***G4ChipsProtonNuclCS::CalcCrossSect: Sinc="<<sync<<
"#"<<I<<
", Z=" <<targZ
231 <<
", N="<<targN<<
", F="<<F<<
G4endl;
234 LEN->push_back(lastLEN);
235 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.;
267 if(tZ<.99 || tN<0.)
return 0.;
268 else if(tZ==1 && tN==0)
return 800.;
273 return std::sqrt(T*(tpM+T));
280 if(P<ThresholdMomentum(tZ,tN)*.001)
return sigma;
282 if(tZ==1&&!tN){
if(P>.35) sigma=CrossSectionFormula(tZ,tN,P,lP);}
283 else if(tZ<97 && tN<152)
302 else if(tZ==5 && tN==6)
308 else if(tZ==4 && tN==5)
314 else if(tZ==3 && tN==4)
320 else if(tZ==3 && tN==3)
326 else if(tZ==2 && tN==1)
333 sigma=CrossSectionFormula(tZ,tN,P,lP);
337 sigma+=pex*
G4Exp(-dp*dp/wid);
342 G4cerr<<
"-Warning-G4ChipsProtonNuclearXS::CSLin:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
345 if(sigma<0.)
return 0.;
353 return CrossSectionFormula(tZ, tN, P, lP);
366 El=1./(0.00012+p2*0.2);
383 El=
LE+(0.0557*lp2+6.72+32.6/P)/(1.+rp2/P);
384 To=
LE+(0.3 *lp2+38.2+52.7*rp2)/(1.+2.72*rp2*rp2);
398 else if(tZ<97 && tN<152)
413 G4double c=(170.+3600./a2s)/(1.+65./a2s);
418 G4double e=318.+a4/(1.+.0015*a4/
G4Exp(al*0.09))/(1.+4.e-28*a12)+
419 8.e-18/(1./a16+1.3e-20)/(1.+1.e-21*a12);
420 G4double ss=3.57+.009*a2/(1.+.0001*a2*a);
421 G4double h=(.01/a4+2.5e-6/a)*(1.+6.e-6*a2*a)/(1.+6.e7/a12/a2);
422 sigma=(c+d*d)/(1.+r/p4)+(gg+e*
G4Exp(-ss*P))/(1.+h/p4/p4);
426 G4cerr<<
"-Warning-G4QProtonNuclearCroSect::CSForm:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
429 if(sigma<0.)
return 0.;
437 G4cerr<<
"***G4ChipsProtonInelasticXS::EquLinearFit: DX="<<DX<<
", N="<<
N<<
G4endl;
443 G4int jj=
static_cast<int>(d);
445 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
G4GLOB_DLL std::ostream G4cout
~G4ChipsProtonInelasticXS()
G4ChipsProtonInelasticXS()
virtual void CrossSectionDescription(std::ostream &) const
static const char * Default_Name()
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 G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
G4double GetTotalMomentum() const
G4double GetPDGMass() const
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
static G4Proton * Definition()
static G4Proton * Proton()
G4VCrossSectionDataSet(const G4String &nam="")