Geant4-11
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
111 void SetEnableHyperNuclei( G4bool val );
112 // Light hyper-nuclei may be enabled/disabled
113 // This flag is used both by EM and hadronic physics constructors
114
115 G4bool ApplyFactorXS() const;
116 void SetApplyFactorXS( G4bool val );
117 // Flag enabling cross section factor definition
118
119 G4int GetVerboseLevel() const;
120 void SetVerboseLevel( const G4int val );
121 // Getter/Setter of the general verbosity level for hadronics.
122
124 void SetEnableCRCoalescence( G4bool val );
125 // Boolean switch that allows to apply the Cosmic Ray (CR) coalescence algorithm
126 // to the secondaries produced by a string model. By default it is disabled.
127
128 private:
130
131 G4bool IsLocked() const;
132
134 #ifdef G4MULTITHREADED
135 static G4Mutex paramMutex;
136 #endif
137
139
154
160};
161
163 return fMaxEnergy;
164}
165
168}
171}
172
175}
176
179}
180
183}
184
187}
188
191}
192
195}
196
199}
200
203}
204
207}
208
210 return fXSFactorEM;
211}
212
214 return fVerboseLevel;
215}
216
218 return fEnableBC;
219}
220
222 return fEnableHyperNuclei;
223}
224
226 return fApplyFactorXS;
227}
228
231}
232
233#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
static G4HadronicParameters * sInstance
G4double XSFactorPionElastic() const
static G4HadronicParameters * Instance()
G4double XSFactorNucleonElastic() const
G4double GetMinEnergyTransitionFTF_Cascade() const
void SetXSFactorNucleonInelastic(G4double val)
G4bool EnableHyperNuclei() const
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
void SetEnableHyperNuclei(G4bool val)
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
G4HadronicParametersMessenger * fMessenger