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

#include <G4QHadronInelasticDataSet.hh>

+ Inheritance diagram for G4QHadronInelasticDataSet:

Public Member Functions

 G4QHadronInelasticDataSet (const G4String &input_name="CHIPSInelasticXS")
 
 ~G4QHadronInelasticDataSet ()
 
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 103 of file G4QHadronInelasticDataSet.hh.

Constructor & Destructor Documentation

◆ G4QHadronInelasticDataSet()

G4QHadronInelasticDataSet::G4QHadronInelasticDataSet ( const G4String input_name = "CHIPSInelasticXS")

Definition at line 49 of file G4QHadronInelasticDataSet.cc.

50 : G4VCrossSectionDataSet(input_name)
51{
52 //CHIPSpAin = G4QProtonNuclearCrossSection::GetPointer();
53 //CHIPSnAin = G4QNeutronNuclearCrossSection::GetPointer();
54 //CHIPSpimAin = G4QPionMinusNuclearCrossSection::GetPointer();
55 //CHIPSpipAin = G4QPionPlusNuclearCrossSection::GetPointer();
56 //CHIPSkpAin = G4QKaonPlusNuclearCrossSection::GetPointer();
57 //CHIPSkmAin = G4QKaonMinusNuclearCrossSection::GetPointer();
58 //CHIPSk0Ain = G4QKaonZeroNuclearCrossSection::GetPointer();
59 //CHIPShAin = G4QHyperonNuclearCrossSection::GetPointer();
60 //CHIPShpAin = G4QHyperonPlusNuclearCrossSection::GetPointer();
61 //CHIPSabpAin = G4QAntiBaryonPlusNuclearCrossSection::GetPointer();
62 //CHIPSabAin = G4QAntiBaryonNuclearCrossSection::GetPointer();
63 ////CHIPSphAin = G4QPhotonNuclearCrossSection::GetPointer();
64 ////CHIPSeAin = G4QElectronNuclearCrossSection::GetPointer();
65 ////CHIPSmuAin = G4QMuonNuclearCrossSection::GetPointer();
66 ////CHIPStauAin = G4QTauNuclearCrossSection::GetPointer();
67 ////CHIPSnumAin = G4QNuMuNuclearCrossSection::GetPointer();
68 ////CHIPSanumAin = G4QANuMuNuclearCrossSection::GetPointer();
69 ////CHIPSnueAin = G4QNuENuclearCrossSection::GetPointer();
70 ////CHIPSanueAin = G4QANuENuclearCrossSection::GetPointer();
71 ////CHIPSnunuAin = G4QNuNuNuclearCrossSection::GetPointer();
72 ////CHIPSananAin = G4QANuANuNuclearCrossSection::GetPointer();
73
74 //Isotopes = G4QIsotope::Get(); // Pointer to the G4QIsotopes singleton
76}

◆ ~G4QHadronInelasticDataSet()

G4QHadronInelasticDataSet::~G4QHadronInelasticDataSet ( )
inline

Definition at line 108 of file G4QHadronInelasticDataSet.hh.

108{};

Member Function Documentation

◆ BuildPhysicsTable()

void G4QHadronInelasticDataSet::BuildPhysicsTable ( const G4ParticleDefinition )
inlinevirtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 113 of file G4QHadronInelasticDataSet.hh.

113{};

◆ Description()

void G4QHadronInelasticDataSet::Description ( ) const

Definition at line 78 of file G4QHadronInelasticDataSet.cc.

79{
80 char* dirName = getenv("G4PhysListDocDir");
81 if (dirName) {
82 std::ofstream outFile;
83 G4String outFileName = GetName() + ".html";
84 G4String pathName = G4String(dirName) + "/" + outFileName;
85
86 outFile.open(pathName);
87 outFile << "<html>\n";
88 outFile << "<head>\n";
89
90 outFile << "<title>Description of CHIPSInelasticXS</title>\n";
91 outFile << "</head>\n";
92 outFile << "<body>\n";
93
94 outFile << "CHIPSInelasticXS provides hadron-nuclear inelastic cross\n"
95 << "sections for all hadrons at all energies. These cross\n"
96 << "sections represent parameterizations developed by M. Kossov.\n";
97
98 outFile << "</body>\n";
99 outFile << "</html>\n";
100 outFile.close();
101 }
102}
const G4String & GetName() const

Referenced by G4QHadronInelasticDataSet().

◆ DumpPhysicsTable()

void G4QHadronInelasticDataSet::DumpPhysicsTable ( const G4ParticleDefinition )
inlinevirtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 114 of file G4QHadronInelasticDataSet.hh.

114{};

◆ GetIsoCrossSection()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 216 of file G4QHadronInelasticDataSet.cc.

219{
220 G4ParticleDefinition* particle = Pt->GetDefinition();
221 G4double Momentum=Pt->GetTotalMomentum();
222 G4VQCrossSection* CSmanager=0;
223
224 G4int pPDG=0;
225 if(particle == G4Neutron::Neutron())
226 {
228 pPDG=2112;
229 }
230 else if(particle == G4Proton::Proton())
231 {
233 pPDG=2212;
234 }
235 else if(particle == G4PionMinus::PionMinus())
236 {
238 pPDG=-211;
239 }
240 else if(particle == G4PionPlus::PionPlus())
241 {
243 pPDG=211;
244 }
245 else if(particle == G4KaonMinus::KaonMinus())
246 {
248 pPDG=-321;
249 }
250 else if(particle == G4KaonPlus::KaonPlus())
251 {
253 pPDG=321;
254 }
255 else if(particle == G4KaonZeroLong::KaonZeroLong() ||
256 particle == G4KaonZeroShort::KaonZeroShort() ||
257 particle == G4KaonZero::KaonZero() ||
258 particle == G4AntiKaonZero::AntiKaonZero() )
259 {
261 if(G4UniformRand() > 0.5) pPDG= 311;
262 else pPDG=-311;
263 }
264 else if(particle == G4Lambda::Lambda())
265 {
267 pPDG=3122;
268 }
269 else if(particle == G4SigmaPlus::SigmaPlus())
270 {
272 pPDG=3222;
273 }
274 else if(particle == G4SigmaMinus::SigmaMinus())
275 {
277 pPDG=3112;
278 }
279 else if(particle == G4SigmaZero::SigmaZero())
280 {
282 pPDG=3212;
283 }
284 else if(particle == G4XiMinus::XiMinus())
285 {
287 pPDG=3312;
288 }
289 else if(particle == G4XiZero::XiZero())
290 {
292 pPDG=3322;
293 }
294 else if(particle == G4OmegaMinus::OmegaMinus())
295 {
297 pPDG=3334;
298 }
299 else if(particle == G4AntiNeutron::AntiNeutron())
300 {
302 pPDG=-2112;
303 }
304 else if(particle == G4AntiProton::AntiProton())
305 {
307 pPDG=-2212;
308 }
309 else if(particle == G4AntiLambda::AntiLambda())
310 {
312 pPDG=-3122;
313 }
314 else if(particle == G4AntiSigmaPlus::AntiSigmaPlus())
315 {
317 pPDG=-3222;
318 }
319 else if(particle == G4AntiSigmaMinus::AntiSigmaMinus())
320 {
322 pPDG=-3112;
323 }
324 else if(particle == G4AntiSigmaZero::AntiSigmaZero())
325 {
327 pPDG=-3212;
328 }
329 else if(particle == G4AntiXiMinus::AntiXiMinus())
330 {
332 pPDG=-3312;
333 }
334 else if(particle == G4AntiXiZero::AntiXiZero())
335 {
337 pPDG=-3322;
338 }
339 else if(particle == G4AntiOmegaMinus::AntiOmegaMinus())
340 {
342 pPDG=-3334;
343 }
344 //else if(particle == G4Gamma::Gamma())
345 //{
346 // CSmanager=G4QPhotonNuclearCrossSection::GetPointer();
347 // pPDG=22;
348 //}
349 //else if(particle == G4Electron::Electron() ||
350 // particle == G4Positron::Positron())
351 //{
352 // CSmanager=G4QElectronNuclearCrossSection::GetPointer();
353 // pPDG=11;
354 //}
355 //else if(particle == G4MuonPlus::MuonPlus() ||
356 // particle == G4MuonMinus::MuonMinus())
357 //{
358 // CSmanager=G4QMuonNuclearCrossSection::GetPointer();
359 // pPDG=13;
360 //}
361 //else if(particle == G4TauPlus::TauPlus() ||
362 // particle == G4TauMinus::TauMinus())
363 //{
364 // CSmanager=G4QTauNuclearCrossSection::GetPointer();
365 // pPDG=15;
366 //}
367 //else if(particle == G4NeutrinoMu::NeutrinoMu() )
368 //{
369 // CSmanager=G4QNuMuNuclearCrossSection::GetPointer();
370 // CSmanager2=G4QNuNuNuclearCrossSection::GetPointer();
371 // pPDG=14;
372 //}
373 //else if(particle == G4AntiNeutrinoMu::AntiNeutrinoMu() )
374 //{
375 // CSmanager=G4QANuMuNuclearCrossSection::GetPointer();
376 // CSmanager2=G4QANuANuNuclearCrossSection::GetPointer();
377 // pPDG=-14;
378 //}
379 //else if(particle == G4NeutrinoE::NeutrinoE() )
380 //{
381 // CSmanager=G4QNuENuclearCrossSection::GetPointer();
382 // CSmanager2=G4QNuNuNuclearCrossSection::GetPointer();
383 // pPDG=12;
384 //}
385 //else if(particle == G4AntiNeutrinoE::AntiNeutrinoE() )
386 //{
387 // CSmanager=G4QANuENuclearCrossSection::GetPointer();
388 // CSmanager2=G4QANuANuNuclearCrossSection::GetPointer();
389 // pPDG=-12;
390 //}
391 else
392 {
393 G4cerr << "-ERROR-G4QHadronInelasticDataSet::GetIsoZACrossSection: PDG="
394 << particle->GetPDGEncoding() << " isn't supported by CHIPS" << G4endl;
395 //throw G4HadronicException(__FILE__, __LINE__,
396 //"G4QHadronInelasticDataSet::GetIsoZACrossSection: Particle not supported by CHIPS");
397 return 0;
398 }
399 G4int N=A-Z;
400 G4double CSI=CSmanager->GetCrossSection(true, Momentum, Z, N, pPDG); // CS(j,i) basic
401 return CSI;
402}
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 G4QHadronInelasticDataSet::IsIsoApplicable ( const G4DynamicParticle Pt,
G4int  Z,
G4int  A,
const G4Element elm = 0,
const G4Material mat = 0 
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 104 of file G4QHadronInelasticDataSet.cc.

106{
107 G4ParticleDefinition* particle = Pt->GetDefinition();
108 if (particle == G4Neutron::Neutron() ) return true; // @@ isotopes?
109 else if (particle == G4Proton::Proton() ) return true;
110 else if (particle == G4PionMinus::PionMinus() ) return true;
111 else if (particle == G4PionPlus::PionPlus() ) return true;
112 else if (particle == G4KaonPlus::KaonPlus() ) return true;
113 else if (particle == G4KaonMinus::KaonMinus() ) return true;
114 else if (particle == G4KaonZeroLong::KaonZeroLong() ) return true;
115 else if (particle == G4KaonZeroShort::KaonZeroShort() ) return true;
116 else if (particle == G4Lambda::Lambda() ) return true;
117 else if (particle == G4SigmaPlus::SigmaPlus() ) return true;
118 else if (particle == G4SigmaMinus::SigmaMinus() ) return true;
119 else if (particle == G4SigmaZero::SigmaZero() ) return true;
120 else if (particle == G4XiMinus::XiMinus() ) return true;
121 else if (particle == G4XiZero::XiZero() ) return true;
122 else if (particle == G4OmegaMinus::OmegaMinus() ) return true;
123 else if (particle == G4AntiNeutron::AntiNeutron() ) return true;
124 else if (particle == G4AntiProton::AntiProton() ) return true;
125 else if (particle == G4AntiLambda::AntiLambda() ) return true;
126 else if (particle == G4AntiSigmaPlus::AntiSigmaPlus() ) return true;
127 else if (particle == G4AntiSigmaMinus::AntiSigmaMinus() ) return true;
128 else if (particle == G4AntiSigmaZero::AntiSigmaZero() ) return true;
129 else if (particle == G4AntiXiMinus::AntiXiMinus() ) return true;
130 else if (particle == G4AntiXiZero::AntiXiZero() ) return true;
131 else if (particle == G4AntiOmegaMinus::AntiOmegaMinus() ) return true;
132 //else if (particle == G4MuonPlus::MuonPlus() ) return true;
133 //else if (particle == G4MuonMinus::MuonMinus() ) return true;
134 //else if (particle == G4Gamma::Gamma() ) return true;
135 //else if (particle == G4Electron::Electron() ) return true;
136 //else if (particle == G4Positron::Positron() ) return true;
137 //else if (particle == G4TauPlus::TauPlus() ) return true;
138 //else if (particle == G4TauMinus::TauMinus() ) return true;
139 //else if (particle == G4AntiNeutrinoE::AntiNeutrinoE() ) return true;
140 //else if (particle == G4NeutrinoE::NeutrinoE() ) return true;
141 //else if (particle == G4AntiNeutrinoMu::AntiNeutrinoMu() ) return true;
142 //else if (particle == G4NeutrinoMu::NeutrinoMu() ) return true;
143 //else if (particle == G4AntiNeutrinoTau::AntiNeutrinoTau()) return true;
144 //else if (particle == G4NeutrinoTau::NeutrinoTau() ) return true;
145 return false;
146}
G4ParticleDefinition * GetDefinition() const

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