Monte Carlo LYSO
Geant4 simulation for the LYSO calorimeter prototype
run.hh
Go to the documentation of this file.
1 
5 #ifndef RUN_HH
6 #define RUN_HH
7 
8 #include "G4UserRunAction.hh"
9 #include "G4Run.hh"
10 #include "G4AnalysisManager.hh"
11 
12 #include "event.hh"
13 
18 class MyRunAction : public G4UserRunAction
19 {
20 public:
30  MyRunAction(G4int theMCID, MyEventAction* eventAction);
31  ~MyRunAction() override = default;
39  void BeginOfRunAction(const G4Run* run) override;
46  void EndOfRunAction(const G4Run* run) override;
47 
48 private:
49  G4int fMCID;
51 };
52 
53 #endif // RUN_HH
User action concrete class of G4UserEventAction. In addition to defining procedures executed at the s...
Definition: event.hh:26
User action concrete class of G4UserRunAction. It defines procedures to be executed at the start and ...
Definition: run.hh:19
void BeginOfRunAction(const G4Run *run) override
Creates and accesses the output root file at the beginning of the run.
Definition: run.cc:57
~MyRunAction() override=default
Destructor of the class.
MyEventAction * fEventAction
Pointer to the MyEventAction object.
Definition: run.hh:50
G4int fMCID
The Monte Carlo ID.
Definition: run.hh:49
MyRunAction(G4int theMCID, MyEventAction *eventAction)
Constructor of the class.
Definition: run.cc:7
void EndOfRunAction(const G4Run *run) override
Writes the TTree to the output root file and closes it at the end of the run.
Definition: run.cc:79
Declaration of the class MyEventAction.