CbmRoot
CbmGeant4Settings.h
Go to the documentation of this file.
1 
6 #ifndef CBMGEANT4SETTINGS_H
7 #define CBMGEANT4SETTINGS_H 1
8 
15 #include "CbmVMCSettings.h"
16 
17 #include <array>
18 #include <string>
19 #include <vector>
20 
21 class TVirtualMC;
22 
24 public:
25  CbmGeant4Settings() = default;
26  ~CbmGeant4Settings() = default;
29 
34  void Init(TVirtualMC*);
35 
41  void SetG4RunConfig(std::string navigationEngine,
42  std::string physicsLists,
43  std::string specialProcesses) {
44  fG4RunConfig[0] = navigationEngine;
45  fG4RunConfig[1] = physicsLists;
46  fG4RunConfig[2] = specialProcesses;
47  }
48 
53  std::array<std::string, 3> GetG4RunConfig() { return fG4RunConfig; }
54 
59  void SetG4Command(std::string command) {
60  fG4Commands.clear();
61  fG4Commands.push_back(command);
62  }
63 
68  void AddG4Command(std::string command) { fG4Commands.push_back(command); }
69 
74  void SetMaximumNumberOfSteps(Int_t numSteps) { fMaxNumSteps = numSteps; }
75 
76 private:
77  std::array<std::string, 3> fG4RunConfig {
78  {"geomRoot", "QGSP_BERT_EMV+optical", "stepLimiter"}};
79 
80  std::vector<std::string> fG4Commands {
81  "/process/optical/verbose 0",
82  "/process/optical/defaults/cerenkov/setMaxPhotons 20",
83  "/process/optical/defaults/cerenkov/setMaxBetaChange 0.1",
84  "/process/optical/setTrackSecondariesFirst Cerenkov false"};
85 
86  Int_t fMaxNumSteps {10000000};
87 
89 };
90 
91 #endif /* CBMGEANT4SETTINGS_H */
CbmGeant4Settings::~CbmGeant4Settings
~CbmGeant4Settings()=default
CbmGeant4Settings::fMaxNumSteps
Int_t fMaxNumSteps
Definition: CbmGeant4Settings.h:86
CbmGeant4Settings::SetG4Command
void SetG4Command(std::string command)
Set a new command which should be passsed to Geant4. The call will remove the current list of command...
Definition: CbmGeant4Settings.h:59
CbmGeant4Settings::ClassDef
ClassDef(CbmGeant4Settings, 3)
CbmGeant4Settings::fG4Commands
std::vector< std::string > fG4Commands
Definition: CbmGeant4Settings.h:80
CbmVMCSettings.h
CbmGeant4Settings::SetG4RunConfig
void SetG4RunConfig(std::string navigationEngine, std::string physicsLists, std::string specialProcesses)
Define the Geant4 run configuration.
Definition: CbmGeant4Settings.h:41
CbmGeant4Settings::operator=
CbmGeant4Settings & operator=(const CbmGeant4Settings &)=delete
CbmGeant4Settings::CbmGeant4Settings
CbmGeant4Settings()=default
CbmGeant4Settings::CbmGeant4Settings
CbmGeant4Settings(const CbmGeant4Settings &)=delete
CbmGeant4Settings::SetMaximumNumberOfSteps
void SetMaximumNumberOfSteps(Int_t numSteps)
Set the maximum number of steps after which the transport is stopped list of commands.
Definition: CbmGeant4Settings.h:74
CbmGeant4Settings::fG4RunConfig
std::array< std::string, 3 > fG4RunConfig
Definition: CbmGeant4Settings.h:77
CbmGeant4Settings::Init
void Init(TVirtualMC *)
Set all parameters defined in this class.
Definition: CbmGeant4Settings.cxx:12
CbmGeant4Settings::AddG4Command
void AddG4Command(std::string command)
Add a new command which should be passsed to Geant4 to the existing list of commands.
Definition: CbmGeant4Settings.h:68
CbmGeant4Settings
User interface class to define the Geant4 simulation settings.
Definition: CbmGeant4Settings.h:23
CbmVMCSettings
User interface class to define the transport simulation settings which are common for both used trans...
Definition: CbmVMCSettings.h:34
CbmGeant4Settings::GetG4RunConfig
std::array< std::string, 3 > GetG4RunConfig()
Get the Geant4 run configuration.
Definition: CbmGeant4Settings.h:53