Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ChipsKaonMinusInelasticXS Class Reference

#include <G4ChipsKaonMinusInelasticXS.hh>

+ Inheritance diagram for G4ChipsKaonMinusInelasticXS:

Public Member Functions

 G4ChipsKaonMinusInelasticXS ()
 
 ~G4ChipsKaonMinusInelasticXS ()
 
virtual void CrossSectionDescription (std::ostream &) const
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *Pt, G4int Z, G4int A, const G4Element *elm, const G4Material *mat)
 
virtual G4double GetIsoCrossSection (const G4DynamicParticle *, G4int tgZ, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
 
virtual G4double GetChipsCrossSection (G4double momentum, G4int Z, G4int N, G4int pdg)
 
- Public Member Functions inherited from G4VCrossSectionDataSet
 G4VCrossSectionDataSet (const G4String &nam="")
 
virtual ~G4VCrossSectionDataSet ()
 
virtual G4bool IsElementApplicable (const G4DynamicParticle *, G4int Z, const G4Material *mat=nullptr)
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *, G4int Z, G4int A, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
 
G4double GetCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=nullptr)
 
G4double ComputeCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=nullptr)
 
virtual G4double ComputeCrossSectionPerElement (G4double kinEnergy, G4double loge, const G4ParticleDefinition *, const G4Element *, const G4Material *mat=nullptr)
 
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 G4double ComputeIsoCrossSection (G4double kinEnergy, G4double loge, const G4ParticleDefinition *, G4int Z, G4int A, const G4Isotope *iso=nullptr, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
 
virtual const G4IsotopeSelectIsotope (const G4Element *, G4double kinEnergy, G4double logE)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void DumpPhysicsTable (const G4ParticleDefinition &)
 
virtual void CrossSectionDescription (std::ostream &) const
 
virtual void SetVerboseLevel (G4int value)
 
G4double GetMinKinEnergy () const
 
void SetMinKinEnergy (G4double value)
 
G4double GetMaxKinEnergy () const
 
void SetMaxKinEnergy (G4double value)
 
bool ForAllAtomsAndEnergies () const
 
void SetForAllAtomsAndEnergies (G4bool val)
 
const G4StringGetName () const
 
void SetName (const G4String &nam)
 
G4VCrossSectionDataSetoperator= (const G4VCrossSectionDataSet &right)=delete
 
 G4VCrossSectionDataSet (const G4VCrossSectionDataSet &)=delete
 

Static Public Member Functions

static const char * Default_Name ()
 

Additional Inherited Members

- Protected Attributes inherited from G4VCrossSectionDataSet
G4int verboseLevel
 
G4String name
 

Detailed Description

Definition at line 45 of file G4ChipsKaonMinusInelasticXS.hh.

Constructor & Destructor Documentation

◆ G4ChipsKaonMinusInelasticXS()

G4ChipsKaonMinusInelasticXS::G4ChipsKaonMinusInelasticXS ( )

Definition at line 66 of file G4ChipsKaonMinusInelasticXS.cc.

67{
68 lastLEN=0; // Pointer to lastArray of LowEn CS
69 lastHEN=0; // Pointer to lastArray of HighEn CS
70 lastN=0; // The last N of calculated nucleus
71 lastZ=0; // The last Z of calculated nucleus
72 lastP=0.; // Last used in CrossSection Momentum
73 lastTH=0.; // Last threshold momentum
74 lastCS=0.; // Last value of the Cross Section
75 lastI=0; // The last position in the DAMDB
76 LEN = new std::vector<G4double*>;
77 HEN = new std::vector<G4double*>;
78}

◆ ~G4ChipsKaonMinusInelasticXS()

G4ChipsKaonMinusInelasticXS::~G4ChipsKaonMinusInelasticXS ( )

Definition at line 80 of file G4ChipsKaonMinusInelasticXS.cc.

81{
82 std::size_t lens=LEN->size();
83 for(std::size_t i=0; i<lens; ++i) delete[] (*LEN)[i];
84 delete LEN;
85
86 std::size_t hens=HEN->size();
87 for(std::size_t i=0; i<hens; ++i) delete[] (*HEN)[i];
88 delete HEN;
89}

Member Function Documentation

◆ CrossSectionDescription()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 92 of file G4ChipsKaonMinusInelasticXS.cc.

93{
94 outFile << "G4ChipsKaonMinusInelasticXS provides the inelastic cross\n"
95 << "section for K- nucleus scattering as a function of incident\n"
96 << "momentum. The cross section is calculated using M. Kossov's\n"
97 << "CHIPS parameterization of cross section data.\n";
98}

◆ Default_Name()

static const char * G4ChipsKaonMinusInelasticXS::Default_Name ( )
inlinestatic

◆ GetChipsCrossSection()

G4double G4ChipsKaonMinusInelasticXS::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 121 of file G4ChipsKaonMinusInelasticXS.cc.

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

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

◆ GetIsoCrossSection()

G4double G4ChipsKaonMinusInelasticXS::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 110 of file G4ChipsKaonMinusInelasticXS.cc.

114{
115 G4double pMom=Pt->GetTotalMomentum();
116 G4int tgN = A - tgZ;
117
118 return GetChipsCrossSection(pMom, tgZ, tgN, -321);
119}
double G4double
Definition: G4Types.hh:83
const G4double A[17]
virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
G4double GetTotalMomentum() const

◆ IsIsoApplicable()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 100 of file G4ChipsKaonMinusInelasticXS.cc.

103{
104 return true;
105}

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