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];
76 G4int hens=HEN->size();
77 for(
G4int i=0; i<hens; ++i)
delete[] (*HEN)[i];
108 static std::vector <G4int> colN;
109 static std::vector <G4int> colZ;
110 static std::vector <G4double> colP;
111 static std::vector <G4double> colTH;
112 static std::vector <G4double> colCS;
116 if(tgN!=lastN || tgZ!=lastZ)
125 if(lastI)
for(
G4int i=0; i<lastI; i++)
127 if(colN[i]==tgN && colZ[i]==tgZ)
140 lastCS=CalculateCrossSection(-1,j,321,lastZ,lastN,pMom);
142 if(lastCS<=0. && pMom>lastTH)
154 lastCS=CalculateCrossSection(0,j,321,lastZ,lastN,pMom);
162 colP.push_back(pMom);
163 colTH.push_back(lastTH);
164 colCS.push_back(lastCS);
166 return lastCS*millibarn;
174 else if(pMom<=lastTH)
180 lastCS=CalculateCrossSection(1,j,321,lastZ,lastN,pMom);
183 return lastCS*millibarn;
191 static const G4double THmiG=THmin*.001;
194 static const G4int nL=105;
195 static const G4double Pmin=THmin+(nL-1)*dP;
197 static const G4int nH=224;
198 static const G4double milP=std::log(Pmin);
199 static const G4double malP=std::log(Pmax);
200 static const G4double dlP=(malP-milP)/(nH-1);
201 static const G4double milPG=std::log(.001*Pmin);
211 G4int sync=LEN->size();
212 if(sync<=I)
G4cerr<<
"*!*G4ChipsKPlusNuclCS::CalcCrosSect:Sync="<<sync<<
"<="<<I<<
G4endl;
222 for(
G4int k=0; k<nL; k++)
224 lastLEN[k] = CrossSectionLin(targZ, targN, P);
230 lastHEN[
n] = CrossSectionLog(targZ, targN, lP);
235 G4int sync=LEN->size();
238 G4cerr<<
"***G4ChipsKPlusNuclCS::CalcCrossSect: Sinc="<<sync<<
"#"<<I<<
", Z=" <<targZ
239 <<
", N="<<targN<<
", F="<<F<<
G4endl;
242 LEN->push_back(lastLEN);
243 HEN->push_back(lastHEN);
248 if (Momentum<lastTH)
return 0.;
249 else if (Momentum<Pmin)
251 if(A<=1. && Momentum < 600.) sigma=0.;
252 else sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN);
254 else if (Momentum<Pmax)
257 sigma=EquLinearFit(lP,nH,milP,dlP,lastHEN);
262 sigma=CrossSectionFormula(targZ, targN, P, std::log(P));
264 if(sigma<0.)
return 0.;
277 if(tZ<.99 || tN<0.)
return 0.;
280 if(tZ==1 && tN==0) tM=prM;
281 else dE=tZ/(1.+std::pow(tA,third));
284 return std::sqrt(T*(tpM+T));
291 return CrossSectionFormula(tZ, tN, P, lP);
298 return CrossSectionFormula(tZ, tN, P, lP);
314 G4double El=(.0557*ld2+2.23)/(1.-.7/sp+.1/p4);
315 G4double To=(.3*ld2+19.5)/(1.+.46/sp+1.6/p4);
318 else if(tZ<97 && tN<152)
344 c=52.*std::exp(al*.6)*(1.+95./a2)/(1.+9./a)/(1.+46./a2);
345 ss=(40.+.14*a)/(1.+12./a);
347 t=.185*y/(1.+.00012*y);
348 u=(1.+80./asa)/(1.+200./asa);
349 v=(1.+3.E-6*a4*(1.+6.E-7*a3+4.E10/a12))/a3/20000.;
356 sigma=(f*d*d+c)/(1.+r/std::sqrt(P)+1./p4)+(rD+rR)/(1+v/p4/p4);
360 G4cerr<<
"-Warning-G4ChipsKaonPlusNuclearCroSect::CSForm:Bad A, Z="<<tZ<<
", N="<<tN<<
G4endl;
363 if(sigma<0.)
return 0.;
371 G4cerr<<
"***G4ChipsKaonPlusInelasticXS::EquLinearFit: DX="<<DX<<
", N="<<N<<
G4endl;
377 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)
~G4ChipsKaonPlusInelasticXS()
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int tgZ, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
G4ChipsKaonPlusInelasticXS()
virtual G4bool IsIsoApplicable(const G4DynamicParticle *Pt, G4int Z, G4int A, const G4Element *elm, const G4Material *mat)
G4ParticleDefinition * GetDefinition() const
G4double GetTotalMomentum() const
static G4KaonPlus * KaonPlus()
G4double GetPDGMass() const
static G4PionPlus * PionPlus()
static G4Proton * Proton()