Project
Loading...
Searching...
No Matches
G4Params.h
Go to the documentation of this file.
1
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3
// All rights not expressly granted are reserved.
4
//
5
// This software is distributed under the terms of the GNU General Public
6
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7
//
8
// In applying this license CERN does not waive the privileges and immunities
9
// granted to it by virtue of its status as an Intergovernmental Organization
10
// or submit itself to any jurisdiction.
11
12
#ifndef O2_SIMCONFIG_G4PARAM_H_
13
#define O2_SIMCONFIG_G4PARAM_H_
14
15
#include "
CommonUtils/ConfigurableParam.h
"
16
#include "
CommonUtils/ConfigurableParamHelper.h
"
17
#include "
SimulationDataFormat/MonopoleParticles.h
"
18
19
namespace
o2
20
{
21
namespace
conf
22
{
23
24
// enumerating the possible G4 physics settings
25
enum class
EG4Physics
{
26
kFTFP_BERT_optical
= 0,
/* just ordinary */
27
kFTFP_BERT_optical_biasing
= 1,
/* with biasing enabled */
28
kFTFP_INCLXX_optical
= 2,
/* special INCL++ version */
29
kFTFP_BERT_HP_optical
= 3,
/* enable low energy neutron transport */
30
kFTFP_BERT_EMV_optical
= 4,
/* just ordinary with faster electromagnetic physics */
31
kFTFP_BERT_EMV_optical_biasing
= 5,
/* with biasing enabled with faster electromagnetic physics */
32
kFTFP_INCLXX_EMV_optical
= 6,
/* special INCL++ version */
33
kFTFP_BERT_EMV_HP_optical
= 7,
/* enable low energy neutron transport */
34
kUSER
= 8
/* allows to give own string combination */
35
};
36
37
// enumerating possible geometry navigation modes
38
// (understanding that geometry description is always done with TGeo)
39
enum class
EG4Nav
{
40
kTGeo
= 0,
/* navigate with TGeo */
41
kG4
= 1,
/* navigate with G4 native geometry */
42
kVecGeom
= 2
/* navigate with VecGeom, on the G4 geometry built from TGeo */
43
};
44
45
// the Geant4 navigator used with navmode kVecGeom
46
enum class
EVecGeomNav
{
47
kRelocating
= 0,
/* relocates at the boundary locate, blocking the volume just left (default) */
48
kPropagated
= 1
/* adopts the state VecGeom propagated during the step; less work per crossing */
49
};
50
51
// parameters to influence the G4 engine
52
struct
G4Params
:
public
o2::conf::ConfigurableParamHelper
<G4Params> {
53
EG4Physics
physicsmode
=
EG4Physics::kFTFP_BERT_EMV_optical
;
// default physics mode with which to configure G4
54
55
std::string
configMacroFile
=
""
;
// a user provided g4Config.in file (otherwise standard one fill be taken)
56
std::string
userPhysicsList
=
""
;
// possibility to directly give physics list as string
57
58
EG4Nav
navmode
=
EG4Nav::kTGeo
;
// geometry navigation mode (default TGeo)
59
60
// Settings for navmode == kVecGeom; ignored otherwise.
61
// which of the two VecGeom navigators
62
EVecGeomNav
vecgeomNavigator
=
EVecGeomNav::kRelocating
;
63
double
vecgeomPushDepth
= 1.e-9;
// cm; how far past a face, measured across it, a boundary
64
// point is pushed before it is located
65
bool
vecgeomZeroSafety
=
false
;
// answer zero to every safety query; conservative, but it
66
// shortens steps and so changes the random history
67
bool
vecgeomFlattenAssemblies
=
true
;
// dissolve TGeo assemblies into their content when converting
68
// to VecGeom; the Geant4 touchable keeps the assembly levels
69
int
vecgeomBooleanThreshold
= 8;
// Boolean solids with at least this many components become
70
// VecGeom MultiUnions; 0 keeps them as converted
71
int
vecgeomCheckRays
= 0;
// if > 0, step this many rays out of the interaction point with
72
// TGeo and VecGeom and report the volumes they enter differently
73
int
vecgeomCheckLocation
= 0;
// if > 0, locate this many random points with both and report
74
// the volumes they disagree on
75
std::string
vecgeomCheckVolumes
=
""
;
// comma-separated volumes to cross-check by sampling inside
76
// their placements
77
78
std::string
fluenceWeightFile
=
""
;
// file containing the scoring weights (pdg, ekin, weight)
79
std::string
const
&
getPhysicsConfigString
()
const
;
80
81
bool
g4scoring
=
false
;
82
bool
g4fluenceweight
=
false
;
83
84
// Enable magnetic-monopole ionisation as defined in Detectors/gconfig/O2MonopolePhysics.
85
// The G4mplIonisation process (Ahlen stopping power) is attached to
86
// the O2 monopole particles (PDG +-4110000 / +-4120000) on top of the chosen
87
// reference physics list. Off by default
88
bool
monopole
=
false
;
89
// Monopole magnetic charge in units of the Dirac charge g_D = eplus/(2*alpha)
90
// (~68.5 eplus). 1.0 corresponds to a single classic Dirac monopole.
91
// The monopole is transported with the full dual Lorentz force
92
// F = g*(B - v x E/c^2). The electric part acts inside the TPC field cage,
93
// the only volume with an electric field, and its magnitude is the TPC's own
94
// TPCGEMParam.ElectricField[0]
95
float
monopoleMagneticCharge
= 1.f;
96
// Monopole mass in GeV, preliminarly applied to all the monopoles species
97
// To-do: allow different monopoles masses in the same run
98
float
monopoleMass
=
static_cast<
float
>
(
o2::sim::MonopoleMassDefaultGeV
);
99
100
// Fast simulation. Empty fastSimModels (the default) disables the feature
101
// entirely; see Detectors/gconfig/include/SimSetup/G4FastSimulation.h.
102
std::string
fastSimModels
=
""
;
// comma-separated model names to activate
103
std::string
fastSimEnvelope
=
""
;
// volume a model stands in for, e.g. AFaM; the media of its
104
// subtree are collected automatically
105
std::string
fastSimRegions
=
""
;
// optional explicit media, overriding the subtree walk
106
float
fastSimMinEnergy
= 1.f;
// GeV; below this the detailed transport runs
107
O2ParamDef
(
G4Params
,
"G4"
);
108
};
109
110
}
// namespace conf
111
}
// namespace o2
112
113
#endif
/* O2_SIMCONFIG_G4PARAM_H_ */
ConfigurableParamHelper.h
ConfigurableParam.h
MonopoleParticles.h
Identification of the BSM magnetic monopoles across the simulation.
o2::conf::ConfigurableParamHelper
Definition
ConfigurableParamHelper.h:116
o2::conf::EVecGeomNav
EVecGeomNav
Definition
G4Params.h:46
o2::conf::EVecGeomNav::kPropagated
@ kPropagated
o2::conf::EVecGeomNav::kRelocating
@ kRelocating
o2::conf::EG4Physics
EG4Physics
Definition
G4Params.h:25
o2::conf::EG4Physics::kFTFP_BERT_EMV_optical
@ kFTFP_BERT_EMV_optical
o2::conf::EG4Physics::kFTFP_BERT_optical
@ kFTFP_BERT_optical
o2::conf::EG4Physics::kFTFP_BERT_EMV_HP_optical
@ kFTFP_BERT_EMV_HP_optical
o2::conf::EG4Physics::kFTFP_INCLXX_optical
@ kFTFP_INCLXX_optical
o2::conf::EG4Physics::kFTFP_BERT_EMV_optical_biasing
@ kFTFP_BERT_EMV_optical_biasing
o2::conf::EG4Physics::kFTFP_INCLXX_EMV_optical
@ kFTFP_INCLXX_EMV_optical
o2::conf::EG4Physics::kUSER
@ kUSER
o2::conf::EG4Physics::kFTFP_BERT_optical_biasing
@ kFTFP_BERT_optical_biasing
o2::conf::EG4Physics::kFTFP_BERT_HP_optical
@ kFTFP_BERT_HP_optical
o2::conf::EG4Nav
EG4Nav
Definition
G4Params.h:39
o2::conf::EG4Nav::kG4
@ kG4
o2::conf::EG4Nav::kVecGeom
@ kVecGeom
o2::conf::EG4Nav::kTGeo
@ kTGeo
o2::sim::MonopoleMassDefaultGeV
constexpr double MonopoleMassDefaultGeV
Default monopole mass in GeV.
Definition
MonopoleParticles.h:35
o2
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Definition
FlattenRestore.h:23
o2::conf::G4Params
Definition
G4Params.h:52
o2::conf::G4Params::physicsmode
EG4Physics physicsmode
Definition
G4Params.h:53
o2::conf::G4Params::vecgeomNavigator
EVecGeomNav vecgeomNavigator
Definition
G4Params.h:62
o2::conf::G4Params::fastSimRegions
std::string fastSimRegions
Definition
G4Params.h:105
o2::conf::G4Params::monopoleMass
float monopoleMass
Definition
G4Params.h:98
o2::conf::G4Params::O2ParamDef
O2ParamDef(G4Params, "G4")
o2::conf::G4Params::vecgeomCheckRays
int vecgeomCheckRays
Definition
G4Params.h:71
o2::conf::G4Params::g4scoring
bool g4scoring
Definition
G4Params.h:81
o2::conf::G4Params::vecgeomFlattenAssemblies
bool vecgeomFlattenAssemblies
Definition
G4Params.h:67
o2::conf::G4Params::monopole
bool monopole
Definition
G4Params.h:88
o2::conf::G4Params::fastSimMinEnergy
float fastSimMinEnergy
Definition
G4Params.h:106
o2::conf::G4Params::fastSimEnvelope
std::string fastSimEnvelope
Definition
G4Params.h:103
o2::conf::G4Params::userPhysicsList
std::string userPhysicsList
Definition
G4Params.h:56
o2::conf::G4Params::getPhysicsConfigString
std::string const & getPhysicsConfigString() const
Definition
G4Params.cxx:32
o2::conf::G4Params::fluenceWeightFile
std::string fluenceWeightFile
Definition
G4Params.h:78
o2::conf::G4Params::vecgeomPushDepth
double vecgeomPushDepth
Definition
G4Params.h:63
o2::conf::G4Params::vecgeomBooleanThreshold
int vecgeomBooleanThreshold
Definition
G4Params.h:69
o2::conf::G4Params::g4fluenceweight
bool g4fluenceweight
Definition
G4Params.h:82
o2::conf::G4Params::configMacroFile
std::string configMacroFile
Definition
G4Params.h:55
o2::conf::G4Params::monopoleMagneticCharge
float monopoleMagneticCharge
Definition
G4Params.h:95
o2::conf::G4Params::vecgeomCheckLocation
int vecgeomCheckLocation
Definition
G4Params.h:73
o2::conf::G4Params::vecgeomCheckVolumes
std::string vecgeomCheckVolumes
Definition
G4Params.h:75
o2::conf::G4Params::fastSimModels
std::string fastSimModels
Definition
G4Params.h:102
o2::conf::G4Params::navmode
EG4Nav navmode
Definition
G4Params.h:58
o2::conf::G4Params::vecgeomZeroSafety
bool vecgeomZeroSafety
Definition
G4Params.h:65
Common
SimConfig
include
SimConfig
G4Params.h
Generated on Mon Nov 9 2026 00:54:10 for Project by
1.9.8