61 const G4double dlP=(malP-milP)/(nH-1);
62 const G4double milPG=std::log(.001*Pmin);
76 LEN =
new std::vector<G4double*>;
77 HEN =
new std::vector<G4double*>;
82 G4int lens=LEN->size();
83 for(
G4int i=0; i<lens; ++i)
delete[] (*LEN)[i];
86 G4int hens=HEN->size();
87 for(
G4int i=0; i<hens; ++i)
delete[] (*HEN)[i];
117 static G4ThreadLocal std::vector <G4int> *colN_G4MT_TLS_ = 0 ;
if (!colN_G4MT_TLS_) colN_G4MT_TLS_ =
new std::vector <G4int> ; std::vector <G4int> &colN = *colN_G4MT_TLS_;
118 static G4ThreadLocal std::vector <G4int> *colZ_G4MT_TLS_ = 0 ;
if (!colZ_G4MT_TLS_) colZ_G4MT_TLS_ =
new std::vector <G4int> ; std::vector <G4int> &colZ = *colZ_G4MT_TLS_;
119 static G4ThreadLocal std::vector <G4double> *colP_G4MT_TLS_ = 0 ;
if (!colP_G4MT_TLS_) colP_G4MT_TLS_ =
new std::vector <G4double> ; std::vector <G4double> &colP = *colP_G4MT_TLS_;
120 static G4ThreadLocal std::vector <G4double> *colTH_G4MT_TLS_ = 0 ;
if (!colTH_G4MT_TLS_) colTH_G4MT_TLS_ =
new std::vector <G4double> ; std::vector <G4double> &colTH = *colTH_G4MT_TLS_;
121 static G4ThreadLocal std::vector <G4double> *colCS_G4MT_TLS_ = 0 ;
if (!colCS_G4MT_TLS_) colCS_G4MT_TLS_ =
new std::vector <G4double> ; std::vector <G4double> &colCS = *colCS_G4MT_TLS_;
125 if(tgN!=lastN || tgZ!=lastZ)
133 if(lastI)
for(
G4int i=0; i<lastI; i++)
135 if(colN[i]==tgN && colZ[i]==tgZ)
147 lastCS=CalculateCrossSection(-1,j,-321,lastZ,lastN,pMom);
148 if(lastCS<=0. && pMom>lastTH)
160 lastCS=CalculateCrossSection(0,j,-321,lastZ,lastN,pMom);
169 colP.push_back(pMom);
170 colTH.push_back(lastTH);
171 colCS.push_back(lastCS);
181 else if(pMom<=lastTH)
187 lastCS=CalculateCrossSection(1,j,-321,lastZ,lastN,pMom);
204 G4int sync=LEN->size();
205 if(sync<=I)
G4cerr<<
"*!*G4QPiMinusNuclCS::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);
228 G4int sync=LEN->size();
231 G4cerr<<
"***G4ChipsKaonMinusCS::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, std::log(P));
255 if(sigma<0.)
return 0.;
263 return CrossSectionFormula(tZ, tN, P, lP);
270 return CrossSectionFormula(tZ, tN, P, lP);
289 G4double El=(.0557*ld2+2.23)/(1.-.7/sp+.075/p4);
290 G4double To=(.3*ld2+19.5)/(1.-.21/sp+.52/p4);
291 sigma=8.8/psp+(To-El)+.002/md+.15/hd;
293 else if(tZ==1 && tN==1)
299 sigma=(.6*dX*dX+36.)/(1.-.11/sp+.52/p2/p2)+.7/(dR*dR+.0256)+18./P/
sp;
301 else if(tZ<97 && tN<152)
310 G4double c=52.*std::exp(al*0.6)*(1.+97./a2)/(1.+9.8/a)/(1.+47./a2);
316 sigma=(c+d*
d)/(1.+gg/sp+h/p2/p2)+f/(v*v+u*u)+20.*sa/P/sp;
320 G4cerr<<
"-Warning-G4ChipsKMinusNuclearCroSect::CSForm:*Bad A* Z="<<tZ<<
", N="<<tN<<
G4endl;
323 if(sigma<0.)
return 0.;
331 G4cerr<<
"***G4ChipsKaonMinusInelasticXS::EquLinearFit: DX="<<DX<<
", N="<<N<<
G4endl;
337 G4int j=
static_cast<int>(
d);
G4ParticleDefinition * GetDefinition() const
~G4ChipsKaonMinusInelasticXS()
static G4KaonMinus * KaonMinus()
G4double GetTotalMomentum() 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)
#define G4_DECLARE_XS_FACTORY(cross_section)
G4ChipsKaonMinusInelasticXS()
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int tgZ, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
G4GLOB_DLL std::ostream G4cerr