Monte Carlo LYSO
Geant4 simulation for the LYSO calorimeter prototype
action.cc
Go to the documentation of this file.
1 
5 #include "action.hh"
6 
8 {
9  fMCID = theMCID;
10 }
11 
12 
13 
15 {
16  // Here must be initialized only Run Action
17  MyEventAction *eventAction = new MyEventAction();
18 
19  MyRunAction *runAction = new MyRunAction(fMCID, eventAction);
20  SetUserAction(runAction);
21 }
22 
23 
24 
26 {
27  // Initialize all the user actions. Only PrimaryGenerator is mandatory in G4
28  MyPrimaryGenerator *generator = new MyPrimaryGenerator();
29  SetUserAction(generator);
30 
31  MyEventAction *eventAction = new MyEventAction();
32  SetUserAction(eventAction);
33 
34  MyRunAction *runAction = new MyRunAction(fMCID, eventAction);
35  SetUserAction(runAction);
36 
37  MySteppingAction *steppingAction = new MySteppingAction(eventAction);
38  SetUserAction(steppingAction);
39 }
Declaration of the class MyActionInitialization.
void Build() const override
Configures user action classes for worker threads.
Definition: action.cc:25
G4int fMCID
The Monte Carlo ID.
Definition: action.hh:40
MyActionInitialization(G4int theMCID)
Constructor of the class.
Definition: action.cc:7
void BuildForMaster() const override
Configures the MyRunAction class for the master thread (in multithreading mode).
Definition: action.cc:14
User action concrete class of G4UserEventAction. In addition to defining procedures executed at the s...
Definition: event.hh:26
Mandatory user action concrete class of G4VUserPrimaryGeneratorAction. It defines the settings for th...
Definition: generator.hh:25
User action concrete class of G4UserRunAction. It defines procedures to be executed at the start and ...
Definition: run.hh:19
User action concrete class of G4UserSteppingAction. It defines procedures to be executed for every st...
Definition: stepping.hh:19