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

#include <G4QHadronElasticDataSet.hh>

+ Inheritance diagram for G4QHadronElasticDataSet:

Public Member Functions

 G4QHadronElasticDataSet (const G4String &dataSetName="CHIPSElasticXS")
 
 ~G4QHadronElasticDataSet ()
 
G4bool IsIsoApplicable (const G4DynamicParticle *, G4int Z, G4int A, const G4Element *elm=0, const G4Material *mat=0)
 
G4double GetIsoCrossSection (const G4DynamicParticle *P, G4int Z, G4int A, const G4Isotope *, const G4Element *, const G4Material *)
 
void BuildPhysicsTable (const G4ParticleDefinition &)
 
void DumpPhysicsTable (const G4ParticleDefinition &)
 
void Description () const
 
- 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
 

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 78 of file G4QHadronElasticDataSet.hh.

Constructor & Destructor Documentation

◆ G4QHadronElasticDataSet()

G4QHadronElasticDataSet::G4QHadronElasticDataSet ( const G4String dataSetName = "CHIPSElasticXS")

Definition at line 49 of file G4QHadronElasticDataSet.cc.

50 : G4VCrossSectionDataSet(dataSetName)
51{
52 //Isotopes = G4QIsotope::Get(); // Pointer to the G4QIsotopes singleton
54}

◆ ~G4QHadronElasticDataSet()

G4QHadronElasticDataSet::~G4QHadronElasticDataSet ( )
inline

Definition at line 83 of file G4QHadronElasticDataSet.hh.

83{};

Member Function Documentation

◆ BuildPhysicsTable()

void G4QHadronElasticDataSet::BuildPhysicsTable ( const G4ParticleDefinition )
inlinevirtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 88 of file G4QHadronElasticDataSet.hh.

88{};

◆ Description()

void G4QHadronElasticDataSet::Description ( ) const

Definition at line 56 of file G4QHadronElasticDataSet.cc.

57{
58 char* dirName = getenv("G4PhysListDocDir");
59 if (dirName) {
60 std::ofstream outFile;
61 G4String outFileName = GetName() + ".html";
62 G4String pathName = G4String(dirName) + "/" + outFileName;
63
64 outFile.open(pathName);
65 outFile << "<html>\n";
66 outFile << "<head>\n";
67
68 outFile << "<title>Description of CHIPSElasticXS</title>\n";
69 outFile << "</head>\n";
70 outFile << "<body>\n";
71
72 outFile << "CHIPSElasticXS provides hadron-nuclear elastic cross\n"
73 << "sections for all hadrons at all energies. These cross\n"
74 << "sections represent parameterizations developed by M. Kossov.\n";
75
76 outFile << "</body>\n";
77 outFile << "</html>\n";
78 outFile.close();
79 }
80}
const G4String & GetName() const

Referenced by G4QHadronElasticDataSet().

◆ DumpPhysicsTable()

void G4QHadronElasticDataSet::DumpPhysicsTable ( const G4ParticleDefinition )
inlinevirtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 89 of file G4QHadronElasticDataSet.hh.

89{};

◆ GetIsoCrossSection()

G4double G4QHadronElasticDataSet::GetIsoCrossSection ( const G4DynamicParticle P,
G4int  Z,
G4int  A,
const G4Isotope ,
const G4Element ,
const G4Material  
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 182 of file G4QHadronElasticDataSet.cc.

185{
186 G4ParticleDefinition* particle = Pt->GetDefinition();
187 G4double Momentum=Pt->GetTotalMomentum();
188 G4VQCrossSection* CSmanager=0;
189 G4VQCrossSection* CSmanager2=0;
190
191 G4int pPDG=0;
192 if(particle == G4Neutron::Neutron())
193 {
195 pPDG=2112;
196 }
197 else if(particle == G4Proton::Proton())
198 {
200 pPDG=2212;
201 }
202 else if(particle == G4PionMinus::PionMinus())
203 {
205 pPDG=-211;
206 }
207 else if(particle == G4PionPlus::PionPlus())
208 {
210 pPDG=211;
211 }
212 else if(particle == G4KaonMinus::KaonMinus())
213 {
215 pPDG=-321;
216 }
217 else if(particle == G4KaonPlus::KaonPlus())
218 {
220 pPDG=321;
221 }
222 else if(particle == G4KaonZeroLong::KaonZeroLong() ||
223 particle == G4KaonZeroShort::KaonZeroShort() ||
224 particle == G4KaonZero::KaonZero() ||
225 particle == G4AntiKaonZero::AntiKaonZero() )
226 {
229 if(G4UniformRand() > 0.5) pPDG= 321;
230 else pPDG=-321;
231 }
232 else if(particle == G4Lambda::Lambda())
233 {
235 pPDG=3122;
236 }
237 else if(particle == G4SigmaPlus::SigmaPlus())
238 {
240 pPDG=3222;
241 }
242 else if(particle == G4SigmaMinus::SigmaMinus())
243 {
245 pPDG=3112;
246 }
247 else if(particle == G4SigmaZero::SigmaZero())
248 {
250 pPDG=3212;
251 }
252 else if(particle == G4XiMinus::XiMinus())
253 {
255 pPDG=3312;
256 }
257 else if(particle == G4XiZero::XiZero())
258 {
260 pPDG=3322;
261 }
262 else if(particle == G4OmegaMinus::OmegaMinus())
263 {
265 pPDG=3334;
266 }
267 else if(particle == G4AntiNeutron::AntiNeutron())
268 {
270 pPDG=-2112;
271 }
272 else if(particle == G4AntiProton::AntiProton())
273 {
275 pPDG=-2212;
276 }
277 else if(particle == G4AntiLambda::AntiLambda())
278 {
280 pPDG=-3122;
281 }
282 else if(particle == G4AntiSigmaPlus::AntiSigmaPlus())
283 {
285 pPDG=-3222;
286 }
287 else if(particle == G4AntiSigmaMinus::AntiSigmaMinus())
288 {
290 pPDG=-3112;
291 }
292 else if(particle == G4AntiSigmaZero::AntiSigmaZero())
293 {
295 pPDG=-3212;
296 }
297 else if(particle == G4AntiXiMinus::AntiXiMinus())
298 {
300 pPDG=-3312;
301 }
302 else if(particle == G4AntiXiZero::AntiXiZero())
303 {
305 pPDG=-3322;
306 }
307 else if(particle == G4AntiOmegaMinus::AntiOmegaMinus())
308 {
310 pPDG=-3334;
311 }
312 else
313 {
314 G4cerr << "-ERROR-G4QHadronElasticDataSet::GetIsoZACrossSection: PDG="
315 << particle->GetPDGEncoding() << " isn't supported by CHIPS" << G4endl;
316 //throw G4HadronicException(__FILE__, __LINE__,
317 // "G4QHadronElasticDataSet::GetIsoZACrossSection: Particle isn't supported by CHIPS");
318 return 0;
319 }
320 G4int N=A-Z;
321 G4double CSI=CSmanager->GetCrossSection(true, Momentum, Z, N, pPDG); // CS(j,i) basic
322 if(CSmanager2) CSI = (CSI + CSmanager2->GetCrossSection(true, Momentum, Z, N, pPDG))/2;
323 return CSI;
324}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cerr
#define G4UniformRand()
Definition: Randomize.hh:53
static G4AntiKaonZero * AntiKaonZero()
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()
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
static G4KaonZeroLong * KaonZeroLong()
static G4KaonZeroShort * KaonZeroShort()
static G4KaonZero * KaonZero()
Definition: G4KaonZero.cc:104
static G4Lambda * Lambda()
Definition: G4Lambda.cc:108
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4OmegaMinus * OmegaMinus()
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4VQCrossSection * GetPointer()
static G4SigmaMinus * SigmaMinus()
static G4SigmaPlus * SigmaPlus()
Definition: G4SigmaPlus.cc:108
static G4SigmaZero * SigmaZero()
Definition: G4SigmaZero.cc:99
virtual G4double GetCrossSection(G4bool, G4double, G4int, G4int, G4int pPDG=0)
static G4XiMinus * XiMinus()
Definition: G4XiMinus.cc:106
static G4XiZero * XiZero()
Definition: G4XiZero.cc:106

◆ IsIsoApplicable()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 82 of file G4QHadronElasticDataSet.cc.

84{
85 G4ParticleDefinition* particle = Pt->GetDefinition();
86 if (particle == G4Neutron::Neutron() ) return true; // @@ isotopes?
87 else if (particle == G4Proton::Proton() ) return true;
88 else if (particle == G4PionMinus::PionMinus() ) return true;
89 else if (particle == G4PionPlus::PionPlus() ) return true;
90 else if (particle == G4KaonPlus::KaonPlus() ) return true;
91 else if (particle == G4KaonMinus::KaonMinus() ) return true;
92 else if (particle == G4KaonZeroLong::KaonZeroLong() ) return true;
93 else if (particle == G4KaonZeroShort::KaonZeroShort() ) return true;
94 else if (particle == G4Lambda::Lambda() ) return true;
95 else if (particle == G4SigmaPlus::SigmaPlus() ) return true;
96 else if (particle == G4SigmaMinus::SigmaMinus() ) return true;
97 else if (particle == G4SigmaZero::SigmaZero() ) return true;
98 else if (particle == G4XiMinus::XiMinus() ) return true;
99 else if (particle == G4XiZero::XiZero() ) return true;
100 else if (particle == G4OmegaMinus::OmegaMinus() ) return true;
101 else if (particle == G4AntiNeutron::AntiNeutron() ) return true;
102 else if (particle == G4AntiProton::AntiProton() ) return true;
103 else if (particle == G4AntiLambda::AntiLambda() ) return true;
104 else if (particle == G4AntiSigmaPlus::AntiSigmaPlus() ) return true;
105 else if (particle == G4AntiSigmaMinus::AntiSigmaMinus() ) return true;
106 else if (particle == G4AntiSigmaZero::AntiSigmaZero() ) return true;
107 else if (particle == G4AntiXiMinus::AntiXiMinus() ) return true;
108 else if (particle == G4AntiXiZero::AntiXiZero() ) return true;
109 else if (particle == G4AntiOmegaMinus::AntiOmegaMinus() ) return true;
110 return false;
111}
G4ParticleDefinition * GetDefinition() const

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