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

#include <G4ChipsPionMinusInelasticXS.hh>

+ Inheritance diagram for G4ChipsPionMinusInelasticXS:

Public Member Functions

 G4ChipsPionMinusInelasticXS ()
 
 ~G4ChipsPionMinusInelasticXS ()
 
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=0)
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *, G4int Z, G4int A, const G4Element *elm=0, const G4Material *mat=0)
 
G4double GetCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=0)
 
G4double ComputeCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=0)
 
virtual G4double GetElementCrossSection (const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
 
virtual G4double GetIsoCrossSection (const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
 
virtual G4IsotopeSelectIsotope (const G4Element *, G4double kinEnergy)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void DumpPhysicsTable (const G4ParticleDefinition &)
 
virtual void CrossSectionDescription (std::ostream &) const
 
void SetVerboseLevel (G4int value)
 
G4double GetMinKinEnergy () const
 
void SetMinKinEnergy (G4double value)
 
G4double GetMaxKinEnergy () const
 
void SetMaxKinEnergy (G4double value)
 
const G4StringGetName () const
 

Static Public Member Functions

static const char * Default_Name ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VCrossSectionDataSet
void SetName (const G4String &)
 
- Protected Attributes inherited from G4VCrossSectionDataSet
G4int verboseLevel
 

Detailed Description

Definition at line 48 of file G4ChipsPionMinusInelasticXS.hh.

Constructor & Destructor Documentation

◆ G4ChipsPionMinusInelasticXS()

G4ChipsPionMinusInelasticXS::G4ChipsPionMinusInelasticXS ( )

Definition at line 53 of file G4ChipsPionMinusInelasticXS.cc.

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

◆ ~G4ChipsPionMinusInelasticXS()

G4ChipsPionMinusInelasticXS::~G4ChipsPionMinusInelasticXS ( )

Definition at line 68 of file G4ChipsPionMinusInelasticXS.cc.

69{
70 G4int lens=LEN->size();
71 for(G4int i=0; i<lens; ++i) delete[] (*LEN)[i];
72 delete LEN;
73 G4int hens=HEN->size();
74 for(G4int i=0; i<hens; ++i) delete[] (*HEN)[i];
75 delete HEN;
76}
int G4int
Definition: G4Types.hh:66

Member Function Documentation

◆ Default_Name()

static const char * G4ChipsPionMinusInelasticXS::Default_Name ( )
inlinestatic

Definition at line 56 of file G4ChipsPionMinusInelasticXS.hh.

56{return "ChipsPionMinusInelasticXS";}

Referenced by G4ChipsComponentXS::G4ChipsComponentXS().

◆ GetChipsCrossSection()

G4double G4ChipsPionMinusInelasticXS::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 101 of file G4ChipsPionMinusInelasticXS.cc.

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

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

◆ GetIsoCrossSection()

G4double G4ChipsPionMinusInelasticXS::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 90 of file G4ChipsPionMinusInelasticXS.cc.

94{
95 G4double pMom=Pt->GetTotalMomentum();
96 G4int tgN = A - tgZ;
97
98 return GetChipsCrossSection(pMom, tgZ, tgN, -211);
99}
double G4double
Definition: G4Types.hh:64
virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
G4double GetTotalMomentum() const

◆ IsIsoApplicable()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 79 of file G4ChipsPionMinusInelasticXS.cc.

82{
83 G4ParticleDefinition* particle = Pt->GetDefinition();
84 if (particle == G4PionMinus::PionMinus() ) return true;
85 return false;
86}
G4ParticleDefinition * GetDefinition() const
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98

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