GGS(GenericGEANT4Simulation)Software
2.7.0
|
Saves MC truth for each event. More...
#include <GGSMCTruthAction.h>
Public Member Functions | |
GGSMCTruthAction () | |
Constructor. | |
~GGSMCTruthAction () | |
Destructor. | |
void | EndOfEventAction (const G4Event *event) |
Fills MC truth informations for current event. More... | |
void | BeginOfRunAction (const G4Run *run) |
Opens the output file for the current run and prepares the output tree. More... | |
void | EndOfRunAction (const G4Run *run) |
Closes the output file for the current run. More... | |
void | SetOutputFileBase (const std::string &outFileBase) |
Sets the output file base name. More... | |
void | SetOutputTreeName (const std::string &outTreeName) |
Sets the output tree name. More... | |
![]() | |
GGSUserAction () | |
Constructor. More... | |
virtual | ~GGSUserAction () |
Destructor. | |
G4ClassificationOfNewTrack | ClassifyNewTrack (const G4Track *) |
Override of the ClassifyNewTrack method. More... | |
Saves MC truth for each event.
For each event, this class will save MC truth informations on ROOT file.
Definition at line 33 of file GGSMCTruthAction.h.
void GGSMCTruthAction::BeginOfRunAction | ( | const G4Run * | run | ) |
Opens the output file for the current run and prepares the output tree.
run | The current run. |
Definition at line 58 of file GGSMCTruthAction.cpp.
void GGSMCTruthAction::EndOfEventAction | ( | const G4Event * | event | ) |
Fills MC truth informations for current event.
event | The current event. |
Definition at line 45 of file GGSMCTruthAction.cpp.
void GGSMCTruthAction::EndOfRunAction | ( | const G4Run * | run | ) |
Closes the output file for the current run.
run | The current run. |
Definition at line 73 of file GGSMCTruthAction.cpp.
|
inline |
Sets the output file base name.
The file base name can be with or without extension (.root will be automatically used as extension). For each run, the run number will be appended to the base name before the .root extension. If no value is provided the file base name will fallback to the default value set in GSRootFileservice.
outFileBase | The output file base name. |
Definition at line 71 of file GGSMCTruthAction.h.
|
inline |
Sets the output tree name.
This name will be used for the TTree object where the MC truth for each event will be stored. By default, this value is set to "MCTruth" in constructor.
outTreeName | The output tree name. |
Definition at line 79 of file GGSMCTruthAction.h.