Geant4 VMC Version 6.6
|
The manager class for accessing hadronic cross sections. More...
#include <TG4CrossSectionManager.h>
Public Member Functions | |
TG4CrossSectionManager () | |
virtual | ~TG4CrossSectionManager () |
TObjArray * | MakeHistograms () |
G4double | GetCrossSection (TG4CrossSectionType type) const |
void | PrintCrossSections () const |
void | PrintCrossSection (TG4CrossSectionType type) const |
void | SetParticleName (const G4String &name) |
void | SetElementName (const G4String &name) |
void | SetNumberOfBinsE (G4int val) |
void | SetNumberOfBinsP (G4int val) |
void | SetMinKinEnergy (G4double val) |
void | SetMaxKinEnergy (G4double val) |
void | SetMinMomentum (G4double val) |
void | SetMaxMomentum (G4double val) |
void | SetLabel (const G4String &label) |
void | SetKinEnergy (G4double val) |
void | SetMomentum (G4double val) |
void | SetMakeHistograms (G4bool makeHistograms) |
G4bool | IsMakeHistograms () const |
Public Member Functions inherited from TG4Verbose | |
TG4Verbose (const G4String &cmdName) | |
TG4Verbose (const G4String &cmdName, G4int verboseLevel) | |
virtual | ~TG4Verbose () |
virtual void | VerboseLevel (G4int level) |
virtual G4int | VerboseLevel () const |
Private Member Functions | |
TG4CrossSectionManager (const TG4CrossSectionManager &right) | |
Not implemented. | |
TG4CrossSectionManager & | operator= (const TG4CrossSectionManager &right) |
Not implemented. | |
const G4ParticleDefinition * | GetParticle () const |
const G4Element * | GetElement () const |
G4double | GetMomentum () const |
void | CreateHistograms () |
void | FillHistograms () |
Private Attributes | |
TG4CrossSectionMessenger | fMessenger |
messenger | |
TObjArray * | fHistograms |
array of histograms | |
G4String | fParticleName |
particle name | |
G4String | fElementName |
element name | |
G4double | fMinKinEnergy |
minimum kinetic energy (histogram range) | |
G4double | fMaxKinEnergy |
maximum kinetic energy( histogram range) | |
G4double | fMinMomentum |
minimum momentum (histogram range) | |
G4double | fMaxMomentum |
maximum momentum (histogram range) | |
G4int | fNofBinsE |
number of bins in kinetic energy | |
G4int | fNofBinsP |
number of bins in momentum | |
G4String | fLabel |
the histogram label | |
G4double | fKinEnergy |
current kinetic energy | |
G4bool | fIsInitialised |
info if histograms are created | |
G4bool | fMakeHistograms |
option to make histograms (for ecternal use) | |
Static Private Attributes | |
static const G4String | fgkDefaultParticleName = "proton" |
default particle name | |
static const G4String | fgkDefaultElementName = "Al" |
default element name | |
static const G4double | fgkDefaultMinKinEnergy = 0.1 * MeV |
default minimum kinetic energy | |
static const G4double | fgkDefaultMaxKinEnergy = 1 * TeV |
default maximum kinetic energy | |
static const G4double | fgkDefaultMinMomentum = 1 * MeV |
default minimum momentum | |
static const G4double | fgkDefaultMaxMomentum = 100 * TeV |
default maximum momentum | |
static const G4int | fgkDefaultNofBinsE = 700 |
defualt number of bins in energy | |
static const G4int | fgkDefaultNofBinsP = 800 |
defualt number of bins in momentum | |
static const G4double | fgkDefaultKinEnergy = 1 * MeV |
defualt kinetic energy | |
The manager class for accessing hadronic cross sections.
The main methods:
The selection of the particle, the element and the histogram parameters (energy and moment range and number of bins) has to be done first via the set methods of the class.
In MakeHistograms(), the array with the following histograms for the selected parameters is filled and returned:
If verbose level is set >=1 then a table with cross section values per energy values is printed.
It is also possible to access the cross section value for a selected energy or a momentum via GetCrossSection() method. A selected cross section or all cross sections can be also printed via PrintCrossSection[s] methods.
Implemented according to the Geant4 example: extended/hadronic/Hadr00.
Definition at line 66 of file TG4CrossSectionManager.h.
TG4CrossSectionManager::TG4CrossSectionManager | ( | ) |
Default constructor
Definition at line 44 of file TG4CrossSectionManager.cxx.
|
virtual |
Destructor
Definition at line 65 of file TG4CrossSectionManager.cxx.
|
private |
Not implemented.
TObjArray * TG4CrossSectionManager::MakeHistograms | ( | ) |
This call first triggers creating and filling the array of histograms which is then returned. This method has to be called when the physics list is fully initialised, this is true for sure in the EndOfRunAction.
Definition at line 304 of file TG4CrossSectionManager.cxx.
Referenced by TG4RunAction::EndOfRunAction().
G4double TG4CrossSectionManager::GetCrossSection | ( | TG4CrossSectionType | type | ) | const |
Return the value of the selected cross section type for the particle and element selected via set methods
Definition at line 317 of file TG4CrossSectionManager.cxx.
Referenced by PrintCrossSection(), and PrintCrossSections().
void TG4CrossSectionManager::PrintCrossSections | ( | ) | const |
Print all cross sections for the particle and element selected via set methods
Definition at line 348 of file TG4CrossSectionManager.cxx.
Referenced by TG4CrossSectionMessenger::SetNewValue().
void TG4CrossSectionManager::PrintCrossSection | ( | TG4CrossSectionType | type | ) | const |
Print the value of the selected cross section type for the particle and element selected via set methods
Definition at line 369 of file TG4CrossSectionManager.cxx.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Set the particle name
Definition at line 145 of file TG4CrossSectionManager.h.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Set the element name
Definition at line 151 of file TG4CrossSectionManager.h.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Set the number of bins in kinetic energy
Definition at line 181 of file TG4CrossSectionManager.h.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Set the number of bins in momentum
Definition at line 187 of file TG4CrossSectionManager.h.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Set the minimum kinetic energy (histogram range)
Definition at line 157 of file TG4CrossSectionManager.h.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Set the maximum kinetic energy( histogram range)
Definition at line 163 of file TG4CrossSectionManager.h.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Set the minimum momentum (histogram range)
Definition at line 169 of file TG4CrossSectionManager.h.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Set the maximum momentum (histogram range)
Definition at line 175 of file TG4CrossSectionManager.h.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Set a label to the histogram. The label will be added at the beginning of the histogram title.
Definition at line 193 of file TG4CrossSectionManager.h.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Set the current kinetic energy
Definition at line 200 of file TG4CrossSectionManager.h.
Referenced by TG4CrossSectionMessenger::SetNewValue().
void TG4CrossSectionManager::SetMomentum | ( | G4double | val | ) |
Recalculate the current kinetic energy for given momentum and selected particle
Definition at line 383 of file TG4CrossSectionManager.cxx.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Set the option to make histograms (for external use)
Definition at line 206 of file TG4CrossSectionManager.h.
Referenced by TG4CrossSectionMessenger::SetNewValue().
|
inline |
Return the option to make histograms (for external use)
Definition at line 212 of file TG4CrossSectionManager.h.
Referenced by TG4RunAction::EndOfRunAction().
|
private |
Not implemented.
|
private |
Return the particle for selected particle name
Definition at line 78 of file TG4CrossSectionManager.cxx.
Referenced by FillHistograms(), GetCrossSection(), GetMomentum(), and SetMomentum().
|
private |
Return the element for selected element name
Definition at line 97 of file TG4CrossSectionManager.cxx.
Referenced by FillHistograms(), and GetCrossSection().
|
private |
Return the momentum for selected particle and kinetic energy
Definition at line 117 of file TG4CrossSectionManager.cxx.
Referenced by PrintCrossSection(), and PrintCrossSections().
|
private |
Create the cross sections histograms.
Definition at line 130 of file TG4CrossSectionManager.cxx.
Referenced by FillHistograms(), and MakeHistograms().
|
private |
Fill the cross sections histograms. This method has to be called when the physics list is fully initialised, this is true for sure in the EndOfRunAction.
Definition at line 188 of file TG4CrossSectionManager.cxx.
Referenced by MakeHistograms().
|
staticprivate |
default particle name
Definition at line 114 of file TG4CrossSectionManager.h.
|
staticprivate |
default element name
Definition at line 115 of file TG4CrossSectionManager.h.
|
staticprivate |
default minimum kinetic energy
Definition at line 117 of file TG4CrossSectionManager.h.
|
staticprivate |
default maximum kinetic energy
Definition at line 119 of file TG4CrossSectionManager.h.
|
staticprivate |
default minimum momentum
Definition at line 120 of file TG4CrossSectionManager.h.
|
staticprivate |
default maximum momentum
Definition at line 121 of file TG4CrossSectionManager.h.
|
staticprivate |
defualt number of bins in energy
Definition at line 122 of file TG4CrossSectionManager.h.
|
staticprivate |
defualt number of bins in momentum
Definition at line 123 of file TG4CrossSectionManager.h.
|
staticprivate |
defualt kinetic energy
Definition at line 124 of file TG4CrossSectionManager.h.
|
private |
messenger
Definition at line 127 of file TG4CrossSectionManager.h.
|
private |
array of histograms
Definition at line 128 of file TG4CrossSectionManager.h.
Referenced by CreateHistograms(), FillHistograms(), MakeHistograms(), and ~TG4CrossSectionManager().
|
private |
particle name
Definition at line 129 of file TG4CrossSectionManager.h.
Referenced by CreateHistograms(), FillHistograms(), GetCrossSection(), GetParticle(), PrintCrossSection(), PrintCrossSections(), and SetParticleName().
|
private |
element name
Definition at line 130 of file TG4CrossSectionManager.h.
Referenced by CreateHistograms(), FillHistograms(), GetElement(), PrintCrossSection(), PrintCrossSections(), and SetElementName().
|
private |
minimum kinetic energy (histogram range)
Definition at line 131 of file TG4CrossSectionManager.h.
Referenced by CreateHistograms(), FillHistograms(), and SetMinKinEnergy().
|
private |
maximum kinetic energy( histogram range)
Definition at line 132 of file TG4CrossSectionManager.h.
Referenced by CreateHistograms(), FillHistograms(), and SetMaxKinEnergy().
|
private |
minimum momentum (histogram range)
Definition at line 133 of file TG4CrossSectionManager.h.
Referenced by CreateHistograms(), FillHistograms(), and SetMinMomentum().
|
private |
maximum momentum (histogram range)
Definition at line 134 of file TG4CrossSectionManager.h.
Referenced by CreateHistograms(), FillHistograms(), and SetMaxMomentum().
|
private |
number of bins in kinetic energy
Definition at line 135 of file TG4CrossSectionManager.h.
Referenced by CreateHistograms(), FillHistograms(), and SetNumberOfBinsE().
|
private |
number of bins in momentum
Definition at line 136 of file TG4CrossSectionManager.h.
Referenced by CreateHistograms(), FillHistograms(), and SetNumberOfBinsP().
|
private |
the histogram label
Definition at line 137 of file TG4CrossSectionManager.h.
Referenced by CreateHistograms(), and SetLabel().
|
private |
current kinetic energy
Definition at line 138 of file TG4CrossSectionManager.h.
Referenced by GetCrossSection(), GetMomentum(), PrintCrossSection(), PrintCrossSections(), SetKinEnergy(), and SetMomentum().
|
private |
info if histograms are created
Definition at line 139 of file TG4CrossSectionManager.h.
Referenced by CreateHistograms(), and FillHistograms().
|
private |
option to make histograms (for ecternal use)
Definition at line 140 of file TG4CrossSectionManager.h.
Referenced by IsMakeHistograms(), and SetMakeHistograms().