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

#include <G4ChipsProtonInelasticXS.hh>

+ Inheritance diagram for G4ChipsProtonInelasticXS:

Public Member Functions

 G4ChipsProtonInelasticXS ()
 
 ~G4ChipsProtonInelasticXS ()
 
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)
 
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 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 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 44 of file G4ChipsProtonInelasticXS.hh.

Constructor & Destructor Documentation

◆ G4ChipsProtonInelasticXS()

G4ChipsProtonInelasticXS::G4ChipsProtonInelasticXS ( )

Definition at line 57 of file G4ChipsProtonInelasticXS.cc.

58{
59 // Initialization of the
60 lastLEN=0; // Pointer to the lastArray of LowEn CS
61 lastHEN=0; // Pointer to the lastArray of HighEn CS
62 lastN=0; // The last N of calculated nucleus
63 lastZ=0; // The last Z of calculated nucleus
64 lastP=0.; // Last used in cross section Momentum
65 lastTH=0.; // Last threshold momentum
66 lastCS=0.; // Last value of the Cross Section
67 lastI=0; // The last position in the DAMDB
68
69 LEN = new std::vector<G4double*>;
70 HEN = new std::vector<G4double*>;
71}
G4VCrossSectionDataSet(const G4String &nam="")

◆ ~G4ChipsProtonInelasticXS()

G4ChipsProtonInelasticXS::~G4ChipsProtonInelasticXS ( )

Definition at line 73 of file G4ChipsProtonInelasticXS.cc.

74{
75 std::size_t lens=LEN->size();
76 for(std::size_t i=0; i<lens; ++i) delete[] (*LEN)[i];
77 delete LEN;
78 std::size_t hens=HEN->size();
79 for(std::size_t i=0; i<hens; ++i) delete[] (*HEN)[i];
80 delete HEN;
81}

Member Function Documentation

◆ CrossSectionDescription()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 84 of file G4ChipsProtonInelasticXS.cc.

85{
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";
90}

◆ Default_Name()

static const char * G4ChipsProtonInelasticXS::Default_Name ( )
inlinestatic

Definition at line 53 of file G4ChipsProtonInelasticXS.hh.

53{return "ChipsProtonInelasticXS";}

Referenced by G4ChipsComponentXS::G4ChipsComponentXS().

◆ GetChipsCrossSection()

G4double G4ChipsProtonInelasticXS::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 113 of file G4ChipsProtonInelasticXS.cc.

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

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

◆ GetIsoCrossSection()

G4double G4ChipsProtonInelasticXS::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 102 of file G4ChipsProtonInelasticXS.cc.

106{
107 G4double pMom=Pt->GetTotalMomentum();
108 G4int tgN = A - tgZ;
109
110 return GetChipsCrossSection(pMom, tgZ, tgN, 2212);
111}
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 G4ChipsProtonInelasticXS::IsIsoApplicable ( const G4DynamicParticle * Pt,
G4int Z,
G4int A,
const G4Element * elm,
const G4Material * mat )
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 92 of file G4ChipsProtonInelasticXS.cc.

95{
96 return true;
97}

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