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"
28#include "SimCore/KaonPhysics.h"
29
30namespace simcore {
31
32// Forward declare to avoid circular dependency in headers
33class DetectorConstruction;
34class UserActionManager;
35class APrimeMessenger;
36class ConditionsInterface;
37
42class RunManager : public G4RunManager {
43 public:
48
52 virtual ~RunManager() = default;
53
57 void setupPhysics();
58
62 void Initialize();
63
71 void TerminateOneEvent();
72
78
82 void setUseRootSeed(bool useIt = true) { useRootSeed_ = useIt; }
83
87 bool useRootSeed() { return useRootSeed_; }
88
89 private:
92
96 G4PhysListFactory physicsListFactory_;
97
102 bool isPWEnabled_{false};
103
105 std::string parallelWorldPath_{""};
106
110 bool useRootSeed_{false};
111
113 enableLogging("RunManager")
114
115}; // RunManager
116} // namespace simcore
117
118#endif // _SIMCORE_RUNMANAGER_H_
Base classes for all user event processing components to extend.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
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:42
bool useRootSeed_
Should we use random seed from root file?
Definition RunManager.h:110
std::string parallelWorldPath_
Path to GDML description of parallel world.
Definition RunManager.h:105
framework::config::Parameters parameters_
The set of parameters used to configure the RunManager.
Definition RunManager.h:91
bool isPWEnabled_
Flag indicating whether a parallel world should be registered.
Definition RunManager.h:102
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:82
bool useRootSeed()
Should we use the seed from the root file?
Definition RunManager.h:87
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:96
RunManager(framework::config::Parameters &parameters, ConditionsInterface &)
Class constructor.