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 <string>
14
15//------------//
16// Geant4 //
17//------------//
18#include "G4PhysListFactory.hh"
19#include "G4RunManager.hh"
20
21/*~~~~~~~~~~~~~~~*/
22/* Framework */
23/*~~~~~~~~~~~~~~~*/
24#include "Framework/Configure/Parameters.h"
25#include "Framework/Logger.h"
26
27namespace simcore {
28
29// Forward declare to avoid circular dependency in headers
30class DetectorConstruction;
31class UserActionManager;
32class APrimeMessenger;
33class ConditionsInterface;
34
39class RunManager : public G4RunManager {
40 public:
45
49 virtual ~RunManager() = default;
50
54 void setupPhysics();
55
59 void Initialize();
60
68 void TerminateOneEvent();
69
75
79 void setUseRootSeed(bool useIt = true) { use_root_seed_ = useIt; }
80
84 bool useRootSeed() { return use_root_seed_; }
85
86 private:
89
93 G4PhysListFactory physics_list_factory_;
94
99 bool is_pw_enabled_{false};
100
102 std::string parallel_world_path_{""};
103
107 bool use_root_seed_{false};
108
110 enableLogging("RunManager")
111
112}; // RunManager
113} // namespace simcore
114
115#endif // _SIMCORE_RUNMANAGER_H_
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
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:39
std::string parallel_world_path_
Path to GDML description of parallel world.
Definition RunManager.h:102
bool use_root_seed_
Should we use random seed from root file?
Definition RunManager.h:107
framework::config::Parameters parameters_
The set of parameters used to configure the RunManager.
Definition RunManager.h:88
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:79
bool is_pw_enabled_
Flag indicating whether a parallel world should be registered.
Definition RunManager.h:99
bool useRootSeed()
Should we use the seed from the root file?
Definition RunManager.h:84
void Initialize()
Perform application initialization.
DetectorConstruction * getDetectorConstruction()
Get the user detector construction cast to a specific type.
G4PhysListFactory physics_list_factory_
Factory class for instantiating the physics list.
Definition RunManager.h:93
RunManager(framework::config::Parameters &parameters, ConditionsInterface &)
Class constructor.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...