LDMX Software
RunManager.h
Go to the documentation of this file.
1
7#ifndef SIMCORE_RUNMANAGER_H
8#define SIMCORE_RUNMANAGER_H
9
10/*~~~~~~~~~~~~~~~~*/
11/* C++ StdLib */
12/*~~~~~~~~~~~~~~~~*/
13#include <any>
14#include <map>
15#include <string>
16
17//------------//
18// Geant4 //
19//------------//
20#include "G4PhysListFactory.hh"
21#include "G4RunManager.hh"
22
23/*~~~~~~~~~~~~~~~*/
24/* Framework */
25/*~~~~~~~~~~~~~~~*/
26#include "Framework/Configure/Parameters.h"
27#include "SimCore/KaonPhysics.h"
28
29namespace simcore {
30
31// Forward declare to avoid circular dependency in headers
32class DetectorConstruction;
33class UserActionManager;
34class APrimeMessenger;
35class ConditionsInterface;
36
41class RunManager : public G4RunManager {
42 public:
47
51 virtual ~RunManager() = default;
52
56 void setupPhysics();
57
61 void Initialize();
62
70 void TerminateOneEvent();
71
77
81 void setUseRootSeed(bool useIt = true) { useRootSeed_ = useIt; }
82
86 bool useRootSeed() { return useRootSeed_; }
87
88 private:
91
95 G4PhysListFactory physicsListFactory_;
96
101 bool isPWEnabled_{false};
102
104 std::string parallelWorldPath_{""};
105
109 bool useRootSeed_{false};
110
111}; // RunManager
112} // namespace simcore
113
114#endif // _SIMCORE_RUNMANAGER_H_
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
Handle to the conditions system, provided at construction to classes which require it.
Implements the Geant4 detector construction.
Extension of Geant4 run manager.
Definition RunManager.h:41
bool useRootSeed_
Should we use random seed from root file?
Definition RunManager.h:109
std::string parallelWorldPath_
Path to GDML description of parallel world.
Definition RunManager.h:104
framework::config::Parameters parameters_
The set of parameters used to configure the RunManager.
Definition RunManager.h:90
bool isPWEnabled_
Flag indicating whether a parallel world should be registered.
Definition RunManager.h:101
void TerminateOneEvent()
Called at the end of each event.
virtual ~RunManager()=default
Class destructor.
void setupPhysics()
Initialize physics.
void setUseRootSeed(bool useIt=true)
Tell RunManager to use the seed from the root file.
Definition RunManager.h:81
bool useRootSeed()
Should we use the seed from the root file?
Definition RunManager.h:86
void Initialize()
Perform application initialization.
DetectorConstruction * getDetectorConstruction()
Get the user detector construction cast to a specific type.
G4PhysListFactory physicsListFactory_
Factory class for instantiating the physics list.
Definition RunManager.h:95