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

#include <G4ChipsAntiBaryonInelasticXS.hh>

+ Inheritance diagram for G4ChipsAntiBaryonInelasticXS:

Public Member Functions

 G4ChipsAntiBaryonInelasticXS ()
 
 ~G4ChipsAntiBaryonInelasticXS ()
 
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 G4ChipsAntiBaryonInelasticXS.hh.

Constructor & Destructor Documentation

◆ G4ChipsAntiBaryonInelasticXS()

G4ChipsAntiBaryonInelasticXS::G4ChipsAntiBaryonInelasticXS ( )

Definition at line 60 of file G4ChipsAntiBaryonInelasticXS.cc.

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

◆ ~G4ChipsAntiBaryonInelasticXS()

G4ChipsAntiBaryonInelasticXS::~G4ChipsAntiBaryonInelasticXS ( )

Definition at line 74 of file G4ChipsAntiBaryonInelasticXS.cc.

75{
76 G4int lens=LEN->size();
77 for(G4int i=0; i<lens; ++i) delete[] (*LEN)[i];
78 delete LEN;
79 G4int hens=HEN->size();
80 for(G4int i=0; i<hens; ++i) delete[] (*HEN)[i];
81 delete HEN;
82}
int G4int
Definition: G4Types.hh:66

Member Function Documentation

◆ Default_Name()

static const char * G4ChipsAntiBaryonInelasticXS::Default_Name ( )
inlinestatic

Definition at line 56 of file G4ChipsAntiBaryonInelasticXS.hh.

56{return "ChipsAntiBaryonInelasticXS";}

Referenced by G4ChipsComponentXS::G4ChipsComponentXS().

◆ GetChipsCrossSection()

G4double G4ChipsAntiBaryonInelasticXS::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 143 of file G4ChipsAntiBaryonInelasticXS.cc.

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

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

◆ GetIsoCrossSection()

G4double G4ChipsAntiBaryonInelasticXS::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 131 of file G4ChipsAntiBaryonInelasticXS.cc.

135{
136 G4double pMom=Pt->GetTotalMomentum();
137 G4int tgN = A - tgZ;
138 G4int pdg = Pt->GetDefinition()->GetPDGEncoding();
139
140 return GetChipsCrossSection(pMom, tgZ, tgN, pdg);
141}
double G4double
Definition: G4Types.hh:64
virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
G4ParticleDefinition * GetDefinition() const
G4double GetTotalMomentum() const

◆ IsIsoApplicable()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 84 of file G4ChipsAntiBaryonInelasticXS.cc.

87{
88 G4ParticleDefinition* particle = Pt->GetDefinition();
89
90 if(particle == G4AntiNeutron::AntiNeutron())
91 {
92 return true;
93 }
94 else if(particle == G4AntiProton::AntiProton())
95 {
96 return true;
97 }
98 else if(particle == G4AntiLambda::AntiLambda())
99 {
100 return true;
101 }
102 else if(particle == G4AntiSigmaPlus::AntiSigmaPlus())
103 {
104 return true;
105 }
106 else if(particle == G4AntiSigmaMinus::AntiSigmaMinus())
107 {
108 return true;
109 }
110 else if(particle == G4AntiSigmaZero::AntiSigmaZero())
111 {
112 return true;
113 }
114 else if(particle == G4AntiXiMinus::AntiXiMinus())
115 {
116 return true;
117 }
118 else if(particle == G4AntiXiZero::AntiXiZero())
119 {
120 return true;
121 }
122 else if(particle == G4AntiOmegaMinus::AntiOmegaMinus())
123 {
124 return true;
125 }
126 return false;
127}
static G4AntiLambda * AntiLambda()
static G4AntiNeutron * AntiNeutron()
static G4AntiOmegaMinus * AntiOmegaMinus()
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:93
static G4AntiSigmaMinus * AntiSigmaMinus()
static G4AntiSigmaPlus * AntiSigmaPlus()
static G4AntiSigmaZero * AntiSigmaZero()
static G4AntiXiMinus * AntiXiMinus()
static G4AntiXiZero * AntiXiZero()

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