Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadronicParameters.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27//---------------------------------------------------------------------------
28//
29// ClassName: G4HadronicParameters
30//
31// Author: 2018 Alberto Ribon
32//
33// Description: Singleton to keep global hadronic parameters.
34//
35// Modified:
36//
37//----------------------------------------------------------------------------
38//
39#ifndef G4HadronicParameters_h
40#define G4HadronicParameters_h 1
41
42#include "globals.hh"
43#include "G4Threading.hh"
44
46
47
49 public:
50
53
54 G4double GetMaxEnergy() const;
55 void SetMaxEnergy( const G4double val );
56 // Getter/Setter for the upper limit for Geant4 hadronic physics, for any application.
57 // Any hadronic model, physics list builder and constructor should use this method
58 // instead of putting an arbitrary value in the code.
59 // Any application which tries to use hadronic physics for an energy higher than this limit
60 // will get a run-time crash, because no model is found.
61
66 // Getter/Setter of the recommended energy limits, for physics lists, of the
67 // transition region between the Fritiof (FTF) string model and the
68 // intranuclear cascade model, either Bertini (BERT) or Binary (BIC).
69
74 // Getter/Setter of the recommended energy limits, for physics lists, of the
75 // transition region between the two strings models - the Quark Gluon String (QGS)
76 // model and the Fritiof (FTF) model.
77
80 // if max kinetic energy is below this limit EM and hadronic physics is not
81 // instantiated for hyperons, anti-hyperons, anti light ions, b-, c- particles
82
87 // cross section factor for protons and neutrons
88
93 // cross section factor for pions
94
99 // cross section factor for other hadrons and ions
100
101 G4double XSFactorEM() const;
102 void SetXSFactorEM( G4double val );
103 // cross section factor for gamma and leptons
104
106 void SetEnableBCParticles( G4bool val );
107 // Baryons and mesons with c- and b- quarks may be enabled/disabled
108 // This flag is used both by EM and hadronic physics constructors
109
110 G4bool ApplyFactorXS() const;
111 void SetApplyFactorXS( G4bool val );
112 // Flag enabling cross section factor definition
113
114 G4int GetVerboseLevel() const;
115 void SetVerboseLevel( const G4int val );
116 // Getter/Setter of the general verbosity level for hadronics.
117
119 void SetEnableCRCoalescence( G4bool val );
120 // Boolean switch that allows to apply the Cosmic Ray (CR) coalescence algorithm
121 // to the secondaries produced by a string model. By default it is disabled.
122
123 private:
125
126 G4bool IsLocked() const;
127
128 static G4HadronicParameters* sInstance;
129 #ifdef G4MULTITHREADED
130 static G4Mutex paramMutex;
131 #endif
132
134
135 G4double fMaxEnergy;
136 G4double fMinEnergyTransitionFTF_Cascade;
137 G4double fMaxEnergyTransitionFTF_Cascade;
138 G4double fMinEnergyTransitionQGS_FTF;
139 G4double fMaxEnergyTransitionQGS_FTF;
140 G4double fEnergyThresholdForHeavyHadrons;
141 G4double fXSFactorNucleonInelastic = 1.0;
142 G4double fXSFactorPionInelastic = 1.0;
143 G4double fXSFactorHadronInelastic = 1.0;
144 G4double fXSFactorNucleonElastic = 1.0;
145 G4double fXSFactorPionElastic = 1.0;
146 G4double fXSFactorHadronElastic = 1.0;
147 G4double fXSFactorEM = 1.0;
148 G4double fXSFactorLimit = 0.2;
149
150 G4int fVerboseLevel = 1;
151 G4bool fEnableBC = false;
152 G4bool fApplyFactorXS = false;
153 G4bool fEnableCRCoalescence = false;
154};
155
157 return fMaxEnergy;
158}
159
161 return fMinEnergyTransitionFTF_Cascade;
162}
164 return fMaxEnergyTransitionFTF_Cascade;
165}
166
168 return fMinEnergyTransitionQGS_FTF;
169}
170
172 return fMaxEnergyTransitionQGS_FTF;
173}
174
176 return fEnergyThresholdForHeavyHadrons;
177}
178
180 return fXSFactorNucleonInelastic;
181}
182
184 return fXSFactorNucleonElastic;
185}
186
188 return fXSFactorPionInelastic;
189}
190
192 return fXSFactorPionElastic;
193}
194
196 return fXSFactorHadronInelastic;
197}
198
200 return fXSFactorHadronElastic;
201}
202
204 return fXSFactorEM;
205}
206
208 return fVerboseLevel;
209}
210
212 return fEnableBC;
213}
214
216 return fApplyFactorXS;
217}
218
220 return fEnableCRCoalescence;
221}
222
223#endif
std::mutex G4Mutex
Definition: G4Threading.hh:81
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4double XSFactorPionElastic() const
static G4HadronicParameters * Instance()
G4double XSFactorNucleonElastic() const
G4double GetMinEnergyTransitionFTF_Cascade() const
void SetXSFactorNucleonInelastic(G4double val)
G4double GetMinEnergyTransitionQGS_FTF() const
void SetXSFactorPionInelastic(G4double val)
G4double GetMaxEnergyTransitionFTF_Cascade() const
void SetVerboseLevel(const G4int val)
void SetXSFactorPionElastic(G4double val)
G4bool EnableCRCoalescence() const
G4bool EnableBCParticles() const
G4double EnergyThresholdForHeavyHadrons() const
void SetMaxEnergy(const G4double val)
void SetApplyFactorXS(G4bool val)
void SetEnergyThresholdForHeavyHadrons(G4double val)
void SetMinEnergyTransitionQGS_FTF(const G4double val)
void SetMinEnergyTransitionFTF_Cascade(const G4double val)
G4double XSFactorHadronInelastic() const
void SetEnableBCParticles(G4bool val)
G4double GetMaxEnergyTransitionQGS_FTF() const
void SetXSFactorHadronElastic(G4double val)
void SetXSFactorEM(G4double val)
void SetEnableCRCoalescence(G4bool val)
void SetMaxEnergyTransitionQGS_FTF(const G4double val)
void SetXSFactorHadronInelastic(G4double val)
void SetXSFactorNucleonElastic(G4double val)
void SetMaxEnergyTransitionFTF_Cascade(const G4double val)
G4double XSFactorPionInelastic() const
G4double XSFactorHadronElastic() const
G4double GetMaxEnergy() const
G4double XSFactorNucleonInelastic() const