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
18
19namespace o2
20{
21namespace conf
22{
23
24// enumerating the possible G4 physics settings
25enum 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)
39enum 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
46enum 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
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
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]
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
108};
109
110} // namespace conf
111} // namespace o2
112
113#endif /* O2_SIMCONFIG_G4PARAM_H_ */
Identification of the BSM magnetic monopoles across the simulation.
constexpr double MonopoleMassDefaultGeV
Default monopole mass in GeV.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
EG4Physics physicsmode
Definition G4Params.h:53
EVecGeomNav vecgeomNavigator
Definition G4Params.h:62
std::string fastSimRegions
Definition G4Params.h:105
O2ParamDef(G4Params, "G4")
bool vecgeomFlattenAssemblies
Definition G4Params.h:67
std::string fastSimEnvelope
Definition G4Params.h:103
std::string userPhysicsList
Definition G4Params.h:56
std::string const & getPhysicsConfigString() const
Definition G4Params.cxx:32
std::string fluenceWeightFile
Definition G4Params.h:78
double vecgeomPushDepth
Definition G4Params.h:63
int vecgeomBooleanThreshold
Definition G4Params.h:69
std::string configMacroFile
Definition G4Params.h:55
float monopoleMagneticCharge
Definition G4Params.h:95
std::string vecgeomCheckVolumes
Definition G4Params.h:75
std::string fastSimModels
Definition G4Params.h:102