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
17
18namespace o2
19{
20namespace conf
21{
22
23// enumerating the possible G4 physics settings
24enum class EG4Physics {
25 kFTFP_BERT_optical = 0, /* just ordinary */
26 kFTFP_BERT_optical_biasing = 1, /* with biasing enabled */
27 kFTFP_INCLXX_optical = 2, /* special INCL++ version */
28 kFTFP_BERT_HP_optical = 3, /* enable low energy neutron transport */
29 kFTFP_BERT_EMV_optical = 4, /* just ordinary with faster electromagnetic physics */
30 kFTFP_BERT_EMV_optical_biasing = 5, /* with biasing enabled with faster electromagnetic physics */
31 kFTFP_INCLXX_EMV_optical = 6, /* special INCL++ version */
32 kFTFP_BERT_EMV_HP_optical = 7, /* enable low energy neutron transport */
33 kUSER = 8 /* allows to give own string combination */
34};
35
36// enumerating possible geometry navigation modes
37// (understanding that geometry description is always done with TGeo)
38enum class EG4Nav {
39 kTGeo = 0, /* navigate with TGeo */
40 kG4 = 1, /* navigate with G4 native geometry */
41 kVecGeom = 2 /* navigate with VecGeom, on the G4 geometry built from TGeo */
42};
43
44// the Geant4 navigator used with navmode kVecGeom
45enum class EVecGeomNav {
46 kRelocating = 0, /* relocates at the boundary locate, blocking the volume just left (default) */
47 kPropagated = 1 /* adopts the state VecGeom propagated during the step; less work per crossing */
48};
49
50// parameters to influence the G4 engine
52 EG4Physics physicsmode = EG4Physics::kFTFP_BERT_EMV_optical; // default physics mode with which to configure G4
53
54 std::string configMacroFile = ""; // a user provided g4Config.in file (otherwise standard one fill be taken)
55 std::string userPhysicsList = ""; // possibility to directly give physics list as string
56
57 EG4Nav navmode = EG4Nav::kTGeo; // geometry navigation mode (default TGeo)
58
59 // Settings for navmode == kVecGeom; ignored otherwise.
60 // which of the two VecGeom navigators
62 double vecgeomPushDepth = 1.e-9; // cm; how far past a face, measured across it, a boundary
63 // point is pushed before it is located
64 bool vecgeomZeroSafety = false; // answer zero to every safety query; conservative, but it
65 // shortens steps and so changes the random history
66 bool vecgeomFlattenAssemblies = true; // dissolve TGeo assemblies into their content when converting
67 // to VecGeom; the Geant4 touchable keeps the assembly levels
68 int vecgeomBooleanThreshold = 8; // Boolean solids with at least this many components become
69 // VecGeom MultiUnions; 0 keeps them as converted
70 int vecgeomCheckRays = 0; // if > 0, step this many rays out of the interaction point with
71 // TGeo and VecGeom and report the volumes they enter differently
72 int vecgeomCheckLocation = 0; // if > 0, locate this many random points with both and report
73 // the volumes they disagree on
74 std::string vecgeomCheckVolumes = ""; // comma-separated volumes to cross-check by sampling inside
75 // their placements
76
77 std::string fluenceWeightFile = ""; // file containing the scoring weights (pdg, ekin, weight)
78 std::string const& getPhysicsConfigString() const;
79
80 bool g4scoring = false;
81 bool g4fluenceweight = false;
82
83 // Fast simulation. Empty fastSimModels (the default) disables the feature
84 // entirely; see Detectors/gconfig/include/SimSetup/G4FastSimulation.h.
85 std::string fastSimModels = ""; // comma-separated model names to activate
86 std::string fastSimEnvelope = ""; // volume a model stands in for, e.g. AFaM; the media of its
87 // subtree are collected automatically
88 std::string fastSimRegions = ""; // optional explicit media, overriding the subtree walk
89 float fastSimMinEnergy = 1.f; // GeV; below this the detailed transport runs
91};
92
93} // namespace conf
94} // namespace o2
95
96#endif /* O2_SIMCONFIG_G4PARAM_H_ */
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
EG4Physics physicsmode
Definition G4Params.h:52
EVecGeomNav vecgeomNavigator
Definition G4Params.h:61
std::string fastSimRegions
Definition G4Params.h:88
O2ParamDef(G4Params, "G4")
bool vecgeomFlattenAssemblies
Definition G4Params.h:66
float fastSimMinEnergy
Definition G4Params.h:89
std::string fastSimEnvelope
Definition G4Params.h:86
std::string userPhysicsList
Definition G4Params.h:55
std::string const & getPhysicsConfigString() const
Definition G4Params.cxx:32
std::string fluenceWeightFile
Definition G4Params.h:77
double vecgeomPushDepth
Definition G4Params.h:62
int vecgeomBooleanThreshold
Definition G4Params.h:68
std::string configMacroFile
Definition G4Params.h:54
std::string vecgeomCheckVolumes
Definition G4Params.h:74
std::string fastSimModels
Definition G4Params.h:85