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

#include <G4ChipsHyperonInelasticXS.hh>

+ Inheritance diagram for G4ChipsHyperonInelasticXS:

Public Member Functions

 G4ChipsHyperonInelasticXS ()
 
 ~G4ChipsHyperonInelasticXS ()
 
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 49 of file G4ChipsHyperonInelasticXS.hh.

Constructor & Destructor Documentation

◆ G4ChipsHyperonInelasticXS()

G4ChipsHyperonInelasticXS::G4ChipsHyperonInelasticXS ( )

Definition at line 53 of file G4ChipsHyperonInelasticXS.cc.

54{
55 // Initialization of the
56 lastLEN=0; // Pointer to the lastArray of LowEn CS
57 lastHEN=0; // Pointer to the 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 in 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}

◆ ~G4ChipsHyperonInelasticXS()

G4ChipsHyperonInelasticXS::~G4ChipsHyperonInelasticXS ( )

Definition at line 68 of file G4ChipsHyperonInelasticXS.cc.

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

Member Function Documentation

◆ Default_Name()

static const char * G4ChipsHyperonInelasticXS::Default_Name ( )
inlinestatic

◆ GetChipsCrossSection()

G4double G4ChipsHyperonInelasticXS::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 129 of file G4ChipsHyperonInelasticXS.cc.

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

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

◆ GetIsoCrossSection()

G4double G4ChipsHyperonInelasticXS::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 117 of file G4ChipsHyperonInelasticXS.cc.

121{
122 G4double pMom=Pt->GetTotalMomentum();
123 G4int tgN = A - tgZ;
124 G4int pdg = Pt->GetDefinition()->GetPDGEncoding();
125
126 return GetChipsCrossSection(pMom, tgZ, tgN, pdg);
127}
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 G4ChipsHyperonInelasticXS::IsIsoApplicable ( const G4DynamicParticle Pt,
G4int  Z,
G4int  A,
const G4Element elm,
const G4Material mat 
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 79 of file G4ChipsHyperonInelasticXS.cc.

82{
83 G4ParticleDefinition* particle = Pt->GetDefinition();
84 if (particle == G4Lambda::Lambda())
85 {
86 return true;
87 }
88 else if(particle == G4SigmaPlus::SigmaPlus())
89 {
90 return true;
91 }
92 else if(particle == G4SigmaMinus::SigmaMinus())
93 {
94 return true;
95 }
96 else if(particle == G4SigmaZero::SigmaZero())
97 {
98 return true;
99 }
100 else if(particle == G4XiMinus::XiMinus())
101 {
102 return true;
103 }
104 else if(particle == G4XiZero::XiZero())
105 {
106 return true;
107 }
108 else if(particle == G4OmegaMinus::OmegaMinus())
109 {
110 return true;
111 }
112 return false;
113}
static G4Lambda * Lambda()
Definition: G4Lambda.cc:108
static G4OmegaMinus * OmegaMinus()
static G4SigmaMinus * SigmaMinus()
static G4SigmaPlus * SigmaPlus()
Definition: G4SigmaPlus.cc:108
static G4SigmaZero * SigmaZero()
Definition: G4SigmaZero.cc:99
static G4XiMinus * XiMinus()
Definition: G4XiMinus.cc:106
static G4XiZero * XiZero()
Definition: G4XiZero.cc:106

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