Geant4-11
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
G4ChipsKaonPlusInelasticXS Class Reference

#include <G4ChipsKaonPlusInelasticXS.hh>

Inheritance diagram for G4ChipsKaonPlusInelasticXS:
G4VCrossSectionDataSet

Public Member Functions

virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
G4double ComputeCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=nullptr)
 
virtual void CrossSectionDescription (std::ostream &) const
 
virtual void DumpPhysicsTable (const G4ParticleDefinition &)
 
bool ForAllAtomsAndEnergies () const
 
 G4ChipsKaonPlusInelasticXS ()
 
virtual G4double GetChipsCrossSection (G4double momentum, G4int Z, G4int N, G4int pdg)
 
G4double GetCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=nullptr)
 
virtual G4double GetElementCrossSection (const G4DynamicParticle *, G4int Z, const G4Material *mat=nullptr)
 
virtual G4double GetIsoCrossSection (const G4DynamicParticle *, G4int tgZ, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
 
G4double GetMaxKinEnergy () const
 
G4double GetMinKinEnergy () const
 
const G4StringGetName () const
 
virtual G4int GetVerboseLevel () const
 
virtual G4bool IsElementApplicable (const G4DynamicParticle *, G4int Z, const G4Material *mat=nullptr)
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *Pt, G4int Z, G4int A, const G4Element *elm, const G4Material *mat)
 
virtual const G4IsotopeSelectIsotope (const G4Element *, G4double kinEnergy, G4double logE)
 
void SetForAllAtomsAndEnergies (G4bool val)
 
void SetMaxKinEnergy (G4double value)
 
void SetMinKinEnergy (G4double value)
 
void SetName (const G4String &nam)
 
virtual void SetVerboseLevel (G4int value)
 
 ~G4ChipsKaonPlusInelasticXS ()
 

Static Public Member Functions

static const char * Default_Name ()
 

Protected Attributes

G4String name
 
G4int verboseLevel
 

Private Member Functions

G4double CalculateCrossSection (G4int F, G4int I, G4int PDG, G4int Z, G4int N, G4double Momentum)
 
G4double CrossSectionFormula (G4int targZ, G4int targN, G4double P, G4double lP)
 
G4double CrossSectionLin (G4int targZ, G4int targN, G4double P)
 
G4double CrossSectionLog (G4int targZ, G4int targN, G4double lP)
 
G4double EquLinearFit (G4double X, G4int N, G4double X0, G4double DX, G4double *Y)
 
G4int GetFunctions (G4int tZ, G4int tN, G4double *y, G4double *z)
 
G4double ThresholdMomentum (G4int targZ, G4int targN)
 

Private Attributes

std::vector< G4doublecolCS
 
std::vector< G4intcolN
 
std::vector< G4doublecolP
 
std::vector< G4doublecolTH
 
std::vector< G4intcolZ
 
std::vector< G4double * > * HEN
 
G4bool isForAllAtomsAndEnergies
 
G4int j =0
 
G4double lastCS
 
G4double lastE =0.
 
G4doublelastHEN
 
G4int lastI
 
G4doublelastLEN
 
G4int lastN
 
G4double lastP
 
G4int lastPDG =0
 
G4double lastSig =0.
 
G4double lastTH
 
G4int lastZ
 
std::vector< G4double * > * LEN
 
G4double maxKinEnergy
 
G4double minKinEnergy
 
G4CrossSectionDataSetRegistryregistry
 

Detailed Description

Definition at line 47 of file G4ChipsKaonPlusInelasticXS.hh.

Constructor & Destructor Documentation

◆ G4ChipsKaonPlusInelasticXS()

G4ChipsKaonPlusInelasticXS::G4ChipsKaonPlusInelasticXS ( )

Definition at line 75 of file G4ChipsKaonPlusInelasticXS.cc.

76{
77 G4AutoLock l(&initM);
78 prM = G4Proton::Proton()->GetPDGMass(); // Proton mass in MeV
79 piM = G4PionPlus::PionPlus()->GetPDGMass()+.1; // Pion mass in MeV+Safety (WP)??
80 pM = G4KaonPlus::KaonPlus()->GetPDGMass(); // Projectile mass in MeV
81 tpM = pM+pM; // Doubled projectile mass (MeV)
82 l.unlock();
83 // Initialization of the
84 lastLEN=0; // Pointer to the lastArray of LowEn CS
85 lastHEN=0; // Pointer to the lastArray of HighEn CS
86 lastN=0; // The last N of calculated nucleus
87 lastZ=0; // The last Z of calculated nucleus
88 lastP=0.; // Last used in cross section Momentum
89 lastTH=0.; // Last threshold momentum
90 lastCS=0.; // Last value of the Cross Section
91 lastI=0; // The last position in the DAMDB
92 LEN = new std::vector<G4double*>;
93 HEN = new std::vector<G4double*>;
94}
std::vector< G4double * > * LEN
std::vector< G4double * > * HEN
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:112
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:97
static G4Proton * Proton()
Definition: G4Proton.cc:92
G4VCrossSectionDataSet(const G4String &nam="")

References G4ParticleDefinition::GetPDGMass(), HEN, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::initM, G4KaonPlus::KaonPlus(), lastCS, lastHEN, lastI, lastLEN, lastN, lastP, lastTH, lastZ, LEN, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::piM, G4PionPlus::PionPlus(), anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::pM, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::prM, G4Proton::Proton(), anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::tpM, and G4TemplateAutoLock< _Mutex_t >::unlock().

◆ ~G4ChipsKaonPlusInelasticXS()

G4ChipsKaonPlusInelasticXS::~G4ChipsKaonPlusInelasticXS ( )

Definition at line 96 of file G4ChipsKaonPlusInelasticXS.cc.

97{
98 G4int lens=LEN->size();
99 for(G4int i=0; i<lens; ++i) delete[] (*LEN)[i];
100 delete LEN;
101
102 G4int hens=HEN->size();
103 for(G4int i=0; i<hens; ++i) delete[] (*HEN)[i];
104 delete HEN;
105}
int G4int
Definition: G4Types.hh:85

References HEN, and LEN.

Member Function Documentation

◆ BuildPhysicsTable()

void G4VCrossSectionDataSet::BuildPhysicsTable ( const G4ParticleDefinition )
virtualinherited

◆ CalculateCrossSection()

G4double G4ChipsKaonPlusInelasticXS::CalculateCrossSection ( G4int  F,
G4int  I,
G4int  PDG,
G4int  Z,
G4int  N,
G4double  Momentum 
)
private

Definition at line 212 of file G4ChipsKaonPlusInelasticXS.cc.

214{
215 G4double sigma=0.;
216 if(F&&I) sigma=0.; // @@ *!* Fake line *!* to use F & I !!!Temporary!!!
217 G4double A=targN+targZ; // A of the target
218
219 if(F<=0) // This isotope was not the last used isotop
220 {
221 if(F<0) // This isotope was found in DAMDB =-----=> RETRIEVE
222 {
223 G4int sync=LEN->size();
224 if(sync<=I) G4cerr<<"*!*G4ChipsKPlusNuclCS::CalcCrosSect:Sync="<<sync<<"<="<<I<<G4endl;
225 lastLEN=(*LEN)[I]; // Pointer to prepared LowEnergy cross sections
226 lastHEN=(*HEN)[I]; // Pointer to prepared High Energy cross sections
227 }
228 else // This isotope wasn't calculated before => CREATE
229 {
230 lastLEN = new G4double[nL]; // Allocate memory for the new LEN cross sections
231 lastHEN = new G4double[nH]; // Allocate memory for the new HEN cross sections
232 // --- Instead of making a separate function ---
233 G4double P=THmiG; // Table threshold in GeV/c
234 for(G4int k=0; k<nL; k++)
235 {
236 lastLEN[k] = CrossSectionLin(targZ, targN, P);
237 P+=dPG;
238 }
239 G4double lP=milPG;
240 for(G4int n=0; n<nH; n++)
241 {
242 lastHEN[n] = CrossSectionLog(targZ, targN, lP);
243 lP+=dlP;
244 }
245 // --- End of possible separate function
246 // *** The synchronization check ***
247 G4int sync=LEN->size();
248 if(sync!=I)
249 {
250 G4cerr<<"***G4ChipsKPlusNuclCS::CalcCrossSect: Sinc="<<sync<<"#"<<I<<", Z=" <<targZ
251 <<", N="<<targN<<", F="<<F<<G4endl;
252 //G4Exception("G4PiMinusNuclearCS::CalculateCS:","39",FatalException,"DBoverflow");
253 }
254 LEN->push_back(lastLEN); // remember the Low Energy Table
255 HEN->push_back(lastHEN); // remember the High Energy Table
256 } // End of creation of the new set of parameters
257 } // End of parameters udate
258 // =--------------------------= NOW the Magic Formula =---------------------------------=
259
260 if (Momentum<lastTH) return 0.; // It must be already checked in the interface class
261 else if (Momentum<Pmin) // Low Energy region
262 {
263 if(A<=1. && Momentum < 600.) sigma=0.; // Approximation tot/el uncertainty
264 else sigma=EquLinearFit(Momentum,nL,THmin,dP,lastLEN);
265 }
266 else if (Momentum<Pmax) // High Energy region
267 {
268 G4double lP=std::log(Momentum);
269 sigma=EquLinearFit(lP,nH,milP,dlP,lastHEN);
270 }
271 else // UHE region (calculation, not frequent)
272 {
273 G4double P=0.001*Momentum; // Approximation formula is for P in GeV/c
274 sigma=CrossSectionFormula(targZ, targN, P, std::log(P));
275 }
276 if(sigma<0.) return 0.;
277 return sigma;
278}
static const G4int nL
static const G4double THmin
static const G4int nH
double G4double
Definition: G4Types.hh:83
const G4double A[17]
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
G4double CrossSectionLin(G4int targZ, G4int targN, G4double P)
G4double EquLinearFit(G4double X, G4int N, G4double X0, G4double DX, G4double *Y)
G4double CrossSectionLog(G4int targZ, G4int targN, G4double lP)
G4double CrossSectionFormula(G4int targZ, G4int targN, G4double P, G4double lP)
static double P[]

References A, CrossSectionFormula(), CrossSectionLin(), CrossSectionLog(), anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::dlP, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::dP, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::dPG, EquLinearFit(), G4cerr, G4endl, HEN, lastHEN, lastLEN, lastTH, LEN, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::milP, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::milPG, CLHEP::detail::n, nH, nL, P, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::Pmax, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::Pmin, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::THmiG, and THmin.

Referenced by GetChipsCrossSection().

◆ ComputeCrossSection()

G4double G4VCrossSectionDataSet::ComputeCrossSection ( const G4DynamicParticle part,
const G4Element elm,
const G4Material mat = nullptr 
)
inherited

Definition at line 81 of file G4VCrossSectionDataSet.cc.

84{
85 G4int Z = elm->GetZasInt();
86
87 if (IsElementApplicable(part, Z, mat)) {
88 return GetElementCrossSection(part, Z, mat);
89 }
90
91 // isotope-wise cross section making sum over available
92 // isotope cross sections, which may be incomplete, so
93 // the result is corrected
94 size_t nIso = elm->GetNumberOfIsotopes();
95 G4double fact = 0.0;
96 G4double xsec = 0.0;
97
98 // user-defined isotope abundances
99 const G4IsotopeVector* isoVector = elm->GetIsotopeVector();
100 const G4double* abundVector = elm->GetRelativeAbundanceVector();
101
102 for (size_t j=0; j<nIso; ++j) {
103 const G4Isotope* iso = (*isoVector)[j];
104 G4int A = iso->GetN();
105 if(abundVector[j] > 0.0 && IsIsoApplicable(part, Z, A, elm, mat)) {
106 fact += abundVector[j];
107 xsec += abundVector[j]*GetIsoCrossSection(part, Z, A, iso, elm, mat);
108 }
109 }
110 return (fact > 0.0) ? xsec/fact : 0.0;
111}
std::vector< G4Isotope * > G4IsotopeVector
const G4int Z[17]
G4double * GetRelativeAbundanceVector() const
Definition: G4Element.hh:167
size_t GetNumberOfIsotopes() const
Definition: G4Element.hh:159
G4int GetZasInt() const
Definition: G4Element.hh:132
G4IsotopeVector * GetIsotopeVector() const
Definition: G4Element.hh:163
G4int GetN() const
Definition: G4Isotope.hh:93
virtual G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *mat=nullptr)
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=nullptr, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
virtual G4bool IsIsoApplicable(const G4DynamicParticle *, G4int Z, G4int A, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
virtual G4bool IsElementApplicable(const G4DynamicParticle *, G4int Z, const G4Material *mat=nullptr)

References A, G4VCrossSectionDataSet::GetElementCrossSection(), G4VCrossSectionDataSet::GetIsoCrossSection(), G4Element::GetIsotopeVector(), G4Isotope::GetN(), G4Element::GetNumberOfIsotopes(), G4Element::GetRelativeAbundanceVector(), G4Element::GetZasInt(), G4VCrossSectionDataSet::IsElementApplicable(), G4VCrossSectionDataSet::IsIsoApplicable(), and Z.

Referenced by G4VCrossSectionDataSet::GetCrossSection().

◆ CrossSectionDescription()

void G4ChipsKaonPlusInelasticXS::CrossSectionDescription ( std::ostream &  outFile) const
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 108 of file G4ChipsKaonPlusInelasticXS.cc.

109{
110 outFile << "G4ChipsKaonPlusInelasticXS provides the inelastic cross\n"
111 << "section for K+ nucleus scattering as a function of incident\n"
112 << "momentum. The cross section is calculated using M. Kossov's\n"
113 << "CHIPS parameterization of cross section data.\n";
114}

◆ CrossSectionFormula()

G4double G4ChipsKaonPlusInelasticXS::CrossSectionFormula ( G4int  targZ,
G4int  targN,
G4double  P,
G4double  lP 
)
private

Definition at line 308 of file G4ChipsKaonPlusInelasticXS.cc.

310{
311 G4double sigma=0.;
312 if(tZ==1 && !tN) // KPlus-Proton interaction from G4QuasiElRatios
313 {
314 G4double ld=lP-3.5;
315 G4double ld2=ld*ld;
316 G4double sp=std::sqrt(P);
317 G4double p2=P*P;
318 G4double p4=p2*p2;
319 G4double lm=P-1.;
320 G4double md=lm*lm+.372;
321 G4double El=(.0557*ld2+2.23)/(1.-.7/sp+.1/p4);
322 G4double To=(.3*ld2+19.5)/(1.+.46/sp+1.6/p4);
323 sigma=(To-El)+.6/md;
324 }
325 else if(tZ<97 && tN<152) // General solution
326 {
327 G4double p2=P*P;
328 G4double p4=p2*p2;
329 G4double a=tN+tZ; // A of the target
330 G4double al=std::log(a);
331 G4double sa=std::sqrt(a);
332 G4double asa=a*sa;
333 G4double a2=a*a;
334 G4double a3=a2*a;
335 G4double a4=a2*a2;
336 G4double a8=a4*a4;
337 G4double a12=a8*a4;
338 G4double f=.6; // Default values for deutrons
339 G4double r=.5;
340 G4double gg=3.7;
341 G4double c=36.;
342 G4double ss=3.5;
343 G4double t=3.;
344 G4double u=.44;
345 G4double v=5.E-9;
346 if(tZ>1 && tN>1) // More than deuteron
347 {
348 f=1.;
349 r=1./(1.+.007*a2);
350 gg=4.2;
351 c=52.*std::exp(al*.6)*(1.+95./a2)/(1.+9./a)/(1.+46./a2);
352 ss=(40.+.14*a)/(1.+12./a);
353 G4double y=std::exp(al*1.7);
354 t=.185*y/(1.+.00012*y);
355 u=(1.+80./asa)/(1.+200./asa);
356 v=(1.+3.E-6*a4*(1.+6.E-7*a3+4.E10/a12))/a3/20000.;
357 }
358 G4double d=lP-gg;
359 G4double w=P-1.;
360 G4double rD=ss/(w*w+.36);
361 G4double h=P-.44;
362 G4double rR=t/(h*h+u*u);
363 sigma=(f*d*d+c)/(1.+r/std::sqrt(P)+1./p4)+(rD+rR)/(1+v/p4/p4);
364 }
365 else
366 {
367 G4cerr<<"-Warning-G4ChipsKaonPlusNuclearCroSect::CSForm:Bad A, Z="<<tZ<<", N="<<tN<<G4endl;
368 sigma=0.;
369 }
370 if(sigma<0.) return 0.;
371 return sigma;
372}
const G4double al
Mysterious coefficient that appears in the wavefunctions.

References G4INCL::DeuteronDensity::anonymous_namespace{G4INCLDeuteronDensity.cc}::al, G4cerr, G4endl, P, and G4InuclParticleNames::sp.

Referenced by CalculateCrossSection(), CrossSectionLin(), and CrossSectionLog().

◆ CrossSectionLin()

G4double G4ChipsKaonPlusInelasticXS::CrossSectionLin ( G4int  targZ,
G4int  targN,
G4double  P 
)
private

Definition at line 295 of file G4ChipsKaonPlusInelasticXS.cc.

296{
297 G4double lP=std::log(P);
298 return CrossSectionFormula(tZ, tN, P, lP);
299}

References CrossSectionFormula(), and P.

Referenced by CalculateCrossSection().

◆ CrossSectionLog()

G4double G4ChipsKaonPlusInelasticXS::CrossSectionLog ( G4int  targZ,
G4int  targN,
G4double  lP 
)
private

Definition at line 302 of file G4ChipsKaonPlusInelasticXS.cc.

303{
304 G4double P=std::exp(lP);
305 return CrossSectionFormula(tZ, tN, P, lP);
306}

References CrossSectionFormula(), and P.

Referenced by CalculateCrossSection().

◆ Default_Name()

static const char * G4ChipsKaonPlusInelasticXS::Default_Name ( )
inlinestatic

◆ DumpPhysicsTable()

void G4VCrossSectionDataSet::DumpPhysicsTable ( const G4ParticleDefinition )
virtualinherited

◆ EquLinearFit()

G4double G4ChipsKaonPlusInelasticXS::EquLinearFit ( G4double  X,
G4int  N,
G4double  X0,
G4double  DX,
G4double Y 
)
private

Definition at line 374 of file G4ChipsKaonPlusInelasticXS.cc.

375{
376 if(DX<=0. || N<2)
377 {
378 G4cerr<<"***G4ChipsKaonPlusInelasticXS::EquLinearFit: DX="<<DX<<", N="<<N<<G4endl;
379 return Y[0];
380 }
381
382 G4int N2=N-2;
383 G4double d=(X-X0)/DX;
384 G4int jj=static_cast<int>(d);
385 if (jj<0) jj=0;
386 else if(jj>N2) jj=N2;
387 d-=jj; // excess
388 G4double yi=Y[jj];
389 G4double sigma=yi+(Y[jj+1]-yi)*d;
390
391 return sigma;
392}
G4double Y(G4double density)

References G4cerr, G4endl, and Y().

Referenced by CalculateCrossSection().

◆ ForAllAtomsAndEnergies()

bool G4VCrossSectionDataSet::ForAllAtomsAndEnergies ( ) const
inlineinherited

◆ GetChipsCrossSection()

G4double G4ChipsKaonPlusInelasticXS::GetChipsCrossSection ( G4double  momentum,
G4int  Z,
G4int  N,
G4int  pdg 
)
virtual

!The slave functions must provide cross-sections in millibarns (mb) !! (not in IU)

Definition at line 137 of file G4ChipsKaonPlusInelasticXS.cc.

138{
139
140 G4bool in=false; // By default the isotope must be found in the AMDB
141 if(tgN!=lastN || tgZ!=lastZ) // The nucleus was not the last used isotope
142 {
143 in = false; // By default the isotope haven't be found in AMDB
144 lastP = 0.; // New momentum history (nothing to compare with)
145 lastN = tgN; // The last N of the calculated nucleus
146 lastZ = tgZ; // The last Z of the calculated nucleus
147 lastI = colN.size(); // Size of the Associative Memory DB in the heap
148 j = 0; // A#0f records found in DB for this projectile
149
150 if(lastI) for(G4int i=0; i<lastI; i++) // AMDB exists, try to find the (Z,N) isotope
151 {
152 if(colN[i]==tgN && colZ[i]==tgZ) // Try the record "i" in the AMDB
153 {
154 lastI=i; // Remember the index for future fast/last use
155 lastTH =colTH[i]; // The last THreshold (A-dependent)
156
157 if(pMom<=lastTH)
158 {
159 return 0.; // Energy is below the Threshold value
160 }
161 lastP =colP [i]; // Last Momentum (A-dependent)
162 lastCS =colCS[i]; // Last CrossSect (A-dependent)
163 in = true; // This is the case when the isotop is found in DB
164 // Momentum pMom is in IU ! @@ Units
165 lastCS=CalculateCrossSection(-1,j,321,lastZ,lastN,pMom); // read & update
166
167 if(lastCS<=0. && pMom>lastTH) // Correct the threshold (@@ No intermediate Zeros)
168 {
169 lastCS=0.;
170 lastTH=pMom;
171 }
172 break; // Go out of the LOOP
173 }
174 j++; // Increment a#0f records found in DB
175 }
176 if(!in) // This isotope has not been calculated previously
177 {
179 lastCS=CalculateCrossSection(0,j,321,lastZ,lastN,pMom); //calculate & create
180
181 //if(lastCS>0.) // It means that the AMBD was initialized
182 //{
183
184 lastTH = 0; //ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
185 colN.push_back(tgN);
186 colZ.push_back(tgZ);
187 colP.push_back(pMom);
188 colTH.push_back(lastTH);
189 colCS.push_back(lastCS);
190 //} // M.K. Presence of H1 with high threshold breaks the syncronization
191 return lastCS*millibarn;
192 } // End of creation of the new set of parameters
193 else
194 {
195 colP[lastI]=pMom;
197 }
198 } // End of parameters udate
199 else if(pMom<=lastTH)
200 {
201 return 0.; // Momentum is below the Threshold Value -> CS=0
202 }
203 else // It is the last used -> use the current tables
204 {
205 lastCS=CalculateCrossSection(1,j,321,lastZ,lastN,pMom); // Only read and UpdateDB
206 lastP=pMom;
207 }
208 return lastCS*millibarn;
209}
static constexpr double millibarn
Definition: G4SIunits.hh:86
bool G4bool
Definition: G4Types.hh:86
G4double CalculateCrossSection(G4int F, G4int I, G4int PDG, G4int Z, G4int N, G4double Momentum)

References CalculateCrossSection(), colCS, colN, colP, colTH, colZ, j, lastCS, lastI, lastN, lastP, lastTH, lastZ, and millibarn.

Referenced by G4ChipsKaonZeroInelasticXS::GetChipsCrossSection(), G4ChipsComponentXS::GetInelasticElementCrossSection(), GetIsoCrossSection(), and G4ChipsComponentXS::GetTotalElementCrossSection().

◆ GetCrossSection()

G4double G4VCrossSectionDataSet::GetCrossSection ( const G4DynamicParticle dp,
const G4Element elm,
const G4Material mat = nullptr 
)
inlineinherited

Definition at line 187 of file G4VCrossSectionDataSet.hh.

190{
191 return ComputeCrossSection(dp, elm, mat);
192}
G4double ComputeCrossSection(const G4DynamicParticle *, const G4Element *, const G4Material *mat=nullptr)

References G4VCrossSectionDataSet::ComputeCrossSection().

◆ GetElementCrossSection()

G4double G4VCrossSectionDataSet::GetElementCrossSection ( const G4DynamicParticle dynPart,
G4int  Z,
const G4Material mat = nullptr 
)
virtualinherited

Reimplemented in G4EMDissociationCrossSection, G4IonsShenCrossSection, G4NeutrinoElectronCcXsc, G4NeutrinoElectronNcXsc, G4NeutrinoElectronTotXsc, G4NeutronElectronElXsc, G4PhotoNuclearCrossSection, G4NeutronCaptureXS, G4NeutronElasticXS, G4NeutronInelasticXS, G4ElectroNuclearCrossSection, G4BGGNucleonElasticXS, G4BGGPionElasticXS, G4BGGPionInelasticXS, G4BGGNucleonInelasticXS, G4CrossSectionElastic, G4CrossSectionInelastic, G4GammaNuclearXS, G4ParticleInelasticXS, G4ZeroXS, G4NucleonNuclearCrossSection, G4MuNeutrinoNucleusTotXsc, and G4KokoulinMuonNuclearXS.

Definition at line 114 of file G4VCrossSectionDataSet.cc.

117{
119 ed << "GetElementCrossSection is not implemented in <" << name << ">\n"
120 << "Particle: " << dynPart->GetDefinition()->GetParticleName()
121 << " Ekin(MeV)= " << dynPart->GetKineticEnergy()/MeV;
122 if(mat) { ed << " material: " << mat->GetName(); }
123 ed << " target Z= " << Z << G4endl;
124 G4Exception("G4VCrossSectionDataSet::GetElementCrossSection", "had001",
125 FatalException, ed);
126 return 0.0;
127}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
static constexpr double MeV
Definition: G4SIunits.hh:200
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4String & GetName() const
Definition: G4Material.hh:173
const G4String & GetParticleName() const

References FatalException, G4endl, G4Exception(), G4DynamicParticle::GetDefinition(), G4DynamicParticle::GetKineticEnergy(), G4Material::GetName(), G4ParticleDefinition::GetParticleName(), MeV, G4VCrossSectionDataSet::name, and Z.

Referenced by G4QMDReaction::ApplyYourself(), G4VCrossSectionDataSet::ComputeCrossSection(), G4GammaNuclearXS::GetElementCrossSection(), G4GammaNuclearXS::GetIsoCrossSection(), and G4GammaNuclearXS::Initialise().

◆ GetFunctions()

G4int G4ChipsKaonPlusInelasticXS::GetFunctions ( G4int  tZ,
G4int  tN,
G4double y,
G4double z 
)
private

◆ GetIsoCrossSection()

G4double G4ChipsKaonPlusInelasticXS::GetIsoCrossSection ( const G4DynamicParticle Pt,
G4int  tgZ,
G4int  A,
const G4Isotope iso = 0,
const G4Element elm = 0,
const G4Material mat = 0 
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 126 of file G4ChipsKaonPlusInelasticXS.cc.

130{
131 G4double pMom=Pt->GetTotalMomentum();
132 G4int tgN = A - tgZ;
133
134 return GetChipsCrossSection(pMom, tgZ, tgN, 321);
135}
virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
G4double GetTotalMomentum() const

References A, GetChipsCrossSection(), and G4DynamicParticle::GetTotalMomentum().

◆ GetMaxKinEnergy()

G4double G4VCrossSectionDataSet::GetMaxKinEnergy ( ) const
inlineinherited

◆ GetMinKinEnergy()

G4double G4VCrossSectionDataSet::GetMinKinEnergy ( ) const
inlineinherited

◆ GetName()

const G4String & G4VCrossSectionDataSet::GetName ( ) const
inlineinherited

◆ GetVerboseLevel()

G4int G4VCrossSectionDataSet::GetVerboseLevel ( ) const
inlinevirtualinherited

◆ IsElementApplicable()

G4bool G4VCrossSectionDataSet::IsElementApplicable ( const G4DynamicParticle ,
G4int  Z,
const G4Material mat = nullptr 
)
virtualinherited

◆ IsIsoApplicable()

G4bool G4ChipsKaonPlusInelasticXS::IsIsoApplicable ( const G4DynamicParticle Pt,
G4int  Z,
G4int  A,
const G4Element elm,
const G4Material mat 
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 116 of file G4ChipsKaonPlusInelasticXS.cc.

119{
120 return true;
121}

◆ SelectIsotope()

const G4Isotope * G4VCrossSectionDataSet::SelectIsotope ( const G4Element anElement,
G4double  kinEnergy,
G4double  logE 
)
virtualinherited

Reimplemented in G4GammaNuclearXS, G4NeutronCaptureXS, G4NeutronElasticXS, G4NeutronInelasticXS, and G4ParticleInelasticXS.

Definition at line 149 of file G4VCrossSectionDataSet.cc.

151{
152 size_t nIso = anElement->GetNumberOfIsotopes();
153 const G4Isotope* iso = anElement->GetIsotope(0);
154
155 // more than 1 isotope
156 if(1 < nIso) {
157 const G4double* abundVector = anElement->GetRelativeAbundanceVector();
158 G4double sum = 0.0;
160 for (size_t j=0; j<nIso; ++j) {
161 sum += abundVector[j];
162 if(q <= sum) {
163 iso = anElement->GetIsotope(j);
164 break;
165 }
166 }
167 }
168 return iso;
169}
#define G4UniformRand()
Definition: Randomize.hh:52
const G4Isotope * GetIsotope(G4int iso) const
Definition: G4Element.hh:170

References G4UniformRand, G4Element::GetIsotope(), G4Element::GetNumberOfIsotopes(), and G4Element::GetRelativeAbundanceVector().

◆ SetForAllAtomsAndEnergies()

void G4VCrossSectionDataSet::SetForAllAtomsAndEnergies ( G4bool  val)
inlineinherited

◆ SetMaxKinEnergy()

void G4VCrossSectionDataSet::SetMaxKinEnergy ( G4double  value)
inlineinherited

◆ SetMinKinEnergy()

void G4VCrossSectionDataSet::SetMinKinEnergy ( G4double  value)
inlineinherited

◆ SetName()

void G4VCrossSectionDataSet::SetName ( const G4String nam)
inlineinherited

Definition at line 240 of file G4VCrossSectionDataSet.hh.

241{
242 name = nam;
243}

References G4VCrossSectionDataSet::name.

Referenced by G4ParticleHPInelasticData::G4ParticleHPInelasticData().

◆ SetVerboseLevel()

void G4VCrossSectionDataSet::SetVerboseLevel ( G4int  value)
inlinevirtualinherited

◆ ThresholdMomentum()

G4double G4ChipsKaonPlusInelasticXS::ThresholdMomentum ( G4int  targZ,
G4int  targN 
)
private

Definition at line 281 of file G4ChipsKaonPlusInelasticXS.cc.

282{
283 G4double tA=tZ+tN;
284 if(tZ<.99 || tN<0.) return 0.;
285 G4double tM=931.5*tA;
286 G4double dE=piM; // At least one Pi0 must be created
287 if(tZ==1 && tN==0) tM=prM; // A threshold on the free proton
288 else dE=tZ/(1.+std::pow(tA,third)); // Safety for diffused edge of the nucleus (QE)
289 //G4double dE=1.263*tZ/(1.+std::pow(tA,third));
290 G4double T=dE+dE*(dE/2+pM)/tM;
291 return std::sqrt(T*(tpM+T));
292}
static const G4double dE

References dE, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::piM, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::pM, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::prM, anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::third, and anonymous_namespace{G4ChipsKaonPlusInelasticXS.cc}::tpM.

Field Documentation

◆ colCS

std::vector<G4double> G4ChipsKaonPlusInelasticXS::colCS
private

Definition at line 103 of file G4ChipsKaonPlusInelasticXS.hh.

Referenced by GetChipsCrossSection().

◆ colN

std::vector<G4int> G4ChipsKaonPlusInelasticXS::colN
private

Definition at line 99 of file G4ChipsKaonPlusInelasticXS.hh.

Referenced by GetChipsCrossSection().

◆ colP

std::vector<G4double> G4ChipsKaonPlusInelasticXS::colP
private

Definition at line 101 of file G4ChipsKaonPlusInelasticXS.hh.

Referenced by GetChipsCrossSection().

◆ colTH

std::vector<G4double> G4ChipsKaonPlusInelasticXS::colTH
private

Definition at line 102 of file G4ChipsKaonPlusInelasticXS.hh.

Referenced by GetChipsCrossSection().

◆ colZ

std::vector<G4int> G4ChipsKaonPlusInelasticXS::colZ
private

Definition at line 100 of file G4ChipsKaonPlusInelasticXS.hh.

Referenced by GetChipsCrossSection().

◆ HEN

std::vector<G4double*>* G4ChipsKaonPlusInelasticXS::HEN
private

◆ isForAllAtomsAndEnergies

G4bool G4VCrossSectionDataSet::isForAllAtomsAndEnergies
privateinherited

◆ j

G4int G4ChipsKaonPlusInelasticXS::j =0
private

Definition at line 98 of file G4ChipsKaonPlusInelasticXS.hh.

Referenced by GetChipsCrossSection().

◆ lastCS

G4double G4ChipsKaonPlusInelasticXS::lastCS
private

◆ lastE

G4double G4ChipsKaonPlusInelasticXS::lastE =0.
private

Definition at line 87 of file G4ChipsKaonPlusInelasticXS.hh.

◆ lastHEN

G4double* G4ChipsKaonPlusInelasticXS::lastHEN
private

◆ lastI

G4int G4ChipsKaonPlusInelasticXS::lastI
private

◆ lastLEN

G4double* G4ChipsKaonPlusInelasticXS::lastLEN
private

◆ lastN

G4int G4ChipsKaonPlusInelasticXS::lastN
private

◆ lastP

G4double G4ChipsKaonPlusInelasticXS::lastP
private

◆ lastPDG

G4int G4ChipsKaonPlusInelasticXS::lastPDG =0
private

Definition at line 88 of file G4ChipsKaonPlusInelasticXS.hh.

◆ lastSig

G4double G4ChipsKaonPlusInelasticXS::lastSig =0.
private

Definition at line 84 of file G4ChipsKaonPlusInelasticXS.hh.

◆ lastTH

G4double G4ChipsKaonPlusInelasticXS::lastTH
private

◆ lastZ

G4int G4ChipsKaonPlusInelasticXS::lastZ
private

◆ LEN

std::vector<G4double*>* G4ChipsKaonPlusInelasticXS::LEN
private

◆ maxKinEnergy

G4double G4VCrossSectionDataSet::maxKinEnergy
privateinherited

◆ minKinEnergy

G4double G4VCrossSectionDataSet::minKinEnergy
privateinherited

◆ name

G4String G4VCrossSectionDataSet::name
protectedinherited

◆ registry

G4CrossSectionDataSetRegistry* G4VCrossSectionDataSet::registry
privateinherited

◆ verboseLevel

G4int G4VCrossSectionDataSet::verboseLevel
protectedinherited

Definition at line 168 of file G4VCrossSectionDataSet.hh.

Referenced by G4BGGNucleonElasticXS::BuildPhysicsTable(), G4BGGPionElasticXS::BuildPhysicsTable(), G4BGGPionInelasticXS::BuildPhysicsTable(), G4GammaNuclearXS::BuildPhysicsTable(), G4NeutronCaptureXS::BuildPhysicsTable(), G4NeutronElasticXS::BuildPhysicsTable(), G4NeutronInelasticXS::BuildPhysicsTable(), G4ParticleInelasticXS::BuildPhysicsTable(), G4BGGNucleonInelasticXS::BuildPhysicsTable(), G4LENDCrossSection::create_used_target_map(), G4BGGNucleonElasticXS::G4BGGNucleonElasticXS(), G4BGGNucleonInelasticXS::G4BGGNucleonInelasticXS(), G4BGGPionElasticXS::G4BGGPionElasticXS(), G4BGGPionInelasticXS::G4BGGPionInelasticXS(), G4GammaNuclearXS::G4GammaNuclearXS(), G4NeutronCaptureXS::G4NeutronCaptureXS(), G4NeutronElasticXS::G4NeutronElasticXS(), G4NeutronInelasticXS::G4NeutronInelasticXS(), G4ParticleInelasticXS::G4ParticleInelasticXS(), G4NeutronCaptureXS::GetElementCrossSection(), G4NeutronElasticXS::GetElementCrossSection(), G4NeutronInelasticXS::GetElementCrossSection(), G4BGGNucleonElasticXS::GetElementCrossSection(), G4BGGPionElasticXS::GetElementCrossSection(), G4BGGPionInelasticXS::GetElementCrossSection(), G4BGGNucleonInelasticXS::GetElementCrossSection(), G4GammaNuclearXS::GetElementCrossSection(), G4ParticleInelasticXS::GetElementCrossSection(), G4BGGNucleonElasticXS::GetIsoCrossSection(), G4BGGPionElasticXS::GetIsoCrossSection(), G4BGGPionInelasticXS::GetIsoCrossSection(), G4GammaNuclearXS::GetIsoCrossSection(), G4BGGNucleonInelasticXS::GetIsoCrossSection(), G4VCrossSectionDataSet::GetVerboseLevel(), G4NeutronElasticXS::Initialise(), G4ParticleInelasticXS::IsoCrossSection(), G4NeutronCaptureXS::IsoCrossSection(), G4NeutronInelasticXS::IsoCrossSection(), G4GammaNuclearXS::RetrieveVector(), G4NeutronCaptureXS::RetrieveVector(), G4NeutronInelasticXS::RetrieveVector(), G4ParticleInelasticXS::RetrieveVector(), and G4VCrossSectionDataSet::SetVerboseLevel().


The documentation for this class was generated from the following files: