Geant4 11.2.2
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
45
46
48 public:
49
52
53 inline G4double GetMaxEnergy() const;
54 void SetMaxEnergy( const G4double val );
55 // Getter/Setter for the upper limit for Geant4 hadronic physics, for any application.
56 // Any hadronic model, physics list builder and constructor should use this method
57 // instead of putting an arbitrary value in the code.
58 // Any application which tries to use hadronic physics for an energy higher than this limit
59 // will get a run-time crash, because no model is found.
60
65 // Getter/Setter of the recommended energy limits, for physics lists, of the
66 // transition region between the Fritiof (FTF) string model and the
67 // intranuclear cascade model, either Bertini (BERT) or Binary (BIC).
68
73 // Getter/Setter of the recommended energy limits, for physics lists, of the
74 // transition region between the two strings models - the Quark Gluon String (QGS)
75 // model and the Fritiof (FTF) model.
76
77 inline G4double GetMinEnergyINCLXX_Pbar() const;
78 inline G4double GetMaxEnergyINCLXX_Pbar() const;
79 void SetMinEnergyINCLXX_Pbar( const G4double val );
80 void SetMaxEnergyINCLXX_Pbar( const G4double val );
81 // Getter/Setter of the recommended energy limits, for physics lists, of the
82 // intranuclear cascade model INCLXX, for pbar interaction.
83
86 // If max kinetic energy is below this limit, then EM and hadronic physics are not
87 // instantiated for hyperons, anti-hyperons, anti light ions, b-, c- particles.
88
91 inline G4double XSFactorNucleonElastic() const;
93 // Cross section factor for protons and neutrons.
94
95 inline G4double XSFactorPionInelastic() const;
97 inline G4double XSFactorPionElastic() const;
99 // Cross section factor for pions.
100
101 inline G4double XSFactorHadronInelastic() const;
103 inline G4double XSFactorHadronElastic() const;
105 // Cross section factor for other hadrons and ions.
106
107 inline G4double XSFactorEM() const;
108 void SetXSFactorEM( G4double val );
109 // Cross section factor for gamma and leptons.
110
111 inline G4bool EnableBCParticles() const;
112 void SetEnableBCParticles( G4bool val );
113 // Baryons and mesons with c- and b- quarks may be enabled/disabled.
114 // This flag is used both by EM and hadronic physics constructors.
115
116 inline G4bool EnableHyperNuclei() const;
117 void SetEnableHyperNuclei( G4bool val );
118 // Light hyper-nuclei may be enabled/disabled.
119 // This flag is used both by EM and hadronic physics constructors.
120
121 inline G4bool ApplyFactorXS() const;
122 void SetApplyFactorXS( G4bool val );
123 // Flag enabling cross section factor definition.
124
125 inline G4int GetVerboseLevel() const;
126 void SetVerboseLevel( const G4int val );
127 // Getter/Setter of the general verbosity level for hadronics.
128
129 inline G4bool EnableCRCoalescence() const;
130 void SetEnableCRCoalescence( G4bool val );
131 // Boolean switch that allows to apply the Cosmic Ray (CR) coalescence algorithm
132 // to the secondaries produced by a string model. By default it is disabled.
133
134 inline G4bool EnableIntegralInelasticXS() const;
135 inline G4bool EnableIntegralElasticXS() const;
138 // Enable/disable integral method for main types of hadrons.
139
141 // For nucleon-hadron interactions, it's not decided what to do with diffraction
142 // dissociation. For the moment, they are turned off. This option allows it to
143 // be turned back on. Applies to Baryon Number > 10 or # target nucleons > 10.
145
148 // Coherent Charge exchange process may be enabled/disabled.
149
150 inline G4bool EnableNeutronGeneralProcess() const;
152 // Neutron general process may be enabled/disabled.
153
154 inline G4double GetEPRelativeLevel() const;
155 inline G4double GetEPAbsoluteLevel() const;
156 inline G4int GetEPReportLevel() const;
157 inline G4bool GetBinaryDebug() const;
158 inline const G4String& GetDirPARTICLEXS() const;
159 inline const G4String& GetPhysListDocDir() const;
160 inline const G4String& GetPhysListName() const;
161 // Access to environment variables.
162
165 // Getter/Setter for the neutron kinetic energy threshold for
166 // applying the SVT (Sampling of the Velocity of the Target) algorithm.
167
170 // Getter/Setter for the time threshold of radioactive decays
171 // (i.e. radioactive decays that happen later than this value are ignored).
172
173 private:
174
176
177 G4bool IsLocked() const;
178
179 static G4HadronicParameters* sInstance;
180
182
183 G4double fMaxEnergy;
184 G4double fMinEnergyTransitionFTF_Cascade;
185 G4double fMaxEnergyTransitionFTF_Cascade;
186 G4double fMinEnergyTransitionQGS_FTF;
187 G4double fMaxEnergyTransitionQGS_FTF;
188 G4double fMinEnergyINCLXX_Pbar;
189 G4double fMaxEnergyINCLXX_Pbar;
190 G4double fEnergyThresholdForHeavyHadrons;
191 G4double fXSFactorNucleonInelastic = 1.0;
192 G4double fXSFactorPionInelastic = 1.0;
193 G4double fXSFactorHadronInelastic = 1.0;
194 G4double fXSFactorNucleonElastic = 1.0;
195 G4double fXSFactorPionElastic = 1.0;
196 G4double fXSFactorHadronElastic = 1.0;
197 G4double fXSFactorEM = 1.0;
198 G4double fXSFactorLimit = 0.2;
199 G4double fRelativeDiff = DBL_MAX;
200 G4double fAbsoluteDiff = DBL_MAX;
201 G4double fNeutronEkinThresholdForSVT = -1.0;
202 G4double fTimeThresholdForRadioactiveDecays = -1.0;
203
204 G4int fVerboseLevel = 1;
205 G4int fReportLevel = 0;
206
207 G4bool fEnableBC = false;
208 G4bool fEnableHyperNuclei = false;
209 G4bool fApplyFactorXS = false;
210 G4bool fEnableCRCoalescence = false;
211 G4bool fEnableIntegralInelasticXS = true;
212 G4bool fEnableIntegralElasticXS = true;
213 G4bool fEnableDiffDissociationForBGreater10 = false;
214 G4bool fNeutronGeneral = false;
215 G4bool fChargeExchange = false;
216 G4bool fBinaryDebug = false;
217
218 G4String fDirPARTICLEXS = "";
219 G4String fPhysListDocDir = "";
220 G4String fPhysListName = "";
221};
222
224 return fMaxEnergy;
225}
226
228 return fMinEnergyTransitionFTF_Cascade;
229}
231 return fMaxEnergyTransitionFTF_Cascade;
232}
233
235 return fMinEnergyTransitionQGS_FTF;
236}
237
239 return fMaxEnergyTransitionQGS_FTF;
240}
241
243 return fMinEnergyINCLXX_Pbar;
244}
246 return fMaxEnergyINCLXX_Pbar;
247}
248
249
251 return fEnergyThresholdForHeavyHadrons;
252}
253
255 return fXSFactorNucleonInelastic;
256}
257
259 return fXSFactorNucleonElastic;
260}
261
263 return fXSFactorPionInelastic;
264}
265
267 return fXSFactorPionElastic;
268}
269
271 return fXSFactorHadronInelastic;
272}
273
275 return fXSFactorHadronElastic;
276}
277
279 return fXSFactorEM;
280}
281
283 return fVerboseLevel;
284}
285
287 return fEnableBC;
288}
289
291 return fEnableHyperNuclei;
292}
293
295 return fApplyFactorXS;
296}
297
299 return fEnableCRCoalescence;
300}
301
303 return fEnableIntegralInelasticXS;
304}
305
307 return fEnableIntegralElasticXS;
308}
309
311 return fEnableDiffDissociationForBGreater10;
312}
313
315 return fNeutronGeneral;
316}
317
319 return fChargeExchange;
320}
321
323 return fBinaryDebug;
324}
325
327 return fRelativeDiff;
328}
329
331 return fAbsoluteDiff;
332}
333
335 return fReportLevel;
336}
337
339 return fDirPARTICLEXS;
340}
341
343{
344 return fPhysListDocDir;
345}
346
348{
349 return fPhysListName;
350}
351
353 return fNeutronEkinThresholdForSVT;
354}
355
357 return fTimeThresholdForRadioactiveDecays;
358}
359
360#endif
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
void SetEnableIntegralElasticXS(G4bool val)
G4bool EnableIntegralInelasticXS() const
G4double XSFactorPionElastic() const
void SetEnableDiffDissociationForBGreater10(G4bool val)
void SetEnableCoherentChargeExchange(G4bool val)
static G4HadronicParameters * Instance()
G4bool EnableDiffDissociationForBGreater10() const
G4double GetTimeThresholdForRadioactiveDecay() const
const G4String & GetPhysListName() const
G4double XSFactorNucleonElastic() const
G4double GetMinEnergyTransitionFTF_Cascade() const
G4double GetEPRelativeLevel() const
G4bool EnableCoherentChargeExchange() const
void SetNeutronKineticEnergyThresholdForSVT(const G4double val)
void SetXSFactorNucleonInelastic(G4double val)
void SetEnableIntegralInelasticXS(G4bool val)
G4double GetEPAbsoluteLevel() const
G4double GetMinEnergyTransitionQGS_FTF() const
void SetXSFactorPionInelastic(G4double val)
G4bool EnableNeutronGeneralProcess() const
G4double GetMaxEnergyTransitionFTF_Cascade() const
void SetVerboseLevel(const G4int val)
const G4String & GetDirPARTICLEXS() const
G4double GetNeutronKineticEnergyThresholdForSVT() const
void SetXSFactorPionElastic(G4double val)
void SetTimeThresholdForRadioactiveDecay(const G4double val)
void SetEnableHyperNuclei(G4bool val)
G4double EnergyThresholdForHeavyHadrons() const
void SetMaxEnergyINCLXX_Pbar(const G4double val)
G4bool EnableIntegralElasticXS() const
void SetMaxEnergy(const G4double val)
G4double GetMaxEnergyINCLXX_Pbar() const
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
const G4String & GetPhysListDocDir() const
void SetXSFactorHadronElastic(G4double val)
void SetXSFactorEM(G4double val)
void SetEnableCRCoalescence(G4bool val)
void SetMaxEnergyTransitionQGS_FTF(const G4double val)
void SetMinEnergyINCLXX_Pbar(const G4double val)
void SetXSFactorHadronInelastic(G4double val)
void SetEnableNeutronGeneralProcess(G4bool val)
void SetXSFactorNucleonElastic(G4double val)
void SetMaxEnergyTransitionFTF_Cascade(const G4double val)
G4double XSFactorPionInelastic() const
G4double XSFactorHadronElastic() const
G4double GetMinEnergyINCLXX_Pbar() const
G4double XSFactorNucleonInelastic() const
#define DBL_MAX
Definition templates.hh:62