|
PlasmaMLPALLAS
|
Defines the run-level actions and statistics handling for the PALLAS simulation. More...
#include <PlasmaMLPALLASRunAction.hh>


Public Member Functions | |
| PlasmaMLPALLASRunAction (const char *fileName, size_t nEventsGenerated, G4bool multithreaded) | |
| Constructor. | |
| ~PlasmaMLPALLASRunAction () | |
| Destructor. | |
| void | BeginOfRunAction (const G4Run *run) override |
| Called at the start of each run. | |
| void | EndOfRunAction (const G4Run *run) override |
| Called at the end of each run. | |
| void | UpdateStatisticsGlobalInput (RunTallyGlobalInput) |
| void | UpdateStatisticsInput (RunTallyInput) |
| void | UpdateStatisticsQuadrupoles (RunTallyQuadrupoles) |
| void | UpdateStatisticsHorizontalColl (RunTallyCollimators) |
| void | UpdateStatisticsVerticalColl (RunTallyCollimators) |
| void | UpdateStatisticsBSYAG (RunTallyYAG) |
| void | UpdateStatisticsBSPECYAG (RunTallyYAG) |
| void | SetPrimaryGenerator (PlasmaMLPALLASPrimaryGeneratorAction *gen) |
| Set the primary generator reference. | |
| void | SetGeometry (PlasmaMLPALLASGeometryConstruction *geom) |
| Set the geometry reference. | |
Static Public Member Functions | |
| template<typename T > | |
| static void | UpdateStatistics (T &stats, const T &newStats, TTree *tree) |
| Generic template to update cumulative statistics in a ROOT tree. | |
Protected Attributes | |
| PlasmaMLPALLASPrimaryGeneratorAction * | fPrimaryGenerator = nullptr |
| Primary generator reference. | |
| PlasmaMLPALLASGeometryConstruction * | fGeometry = nullptr |
| Geometry reference. | |
Defines the run-level actions and statistics handling for the PALLAS simulation.
Manages run-level actions, statistics, and ROOT output.
This header declares the PlasmaMLPALLASRunAction class, which inherits from Geant4's G4UserRunAction to manage actions at the beginning and end of each run. It handles:
The associated RunTallyGlobalInput struct stores simulation configuration parameters and beamline element settings for the entire run.
Data recorded here typically includes:
PlasmaMLPALLASPrimaryGeneratorActionPlasmaMLPALLASGeometryConstructionRunTallyQuadrupoles | PlasmaMLPALLASRunAction::PlasmaMLPALLASRunAction | ( | const char * | fileName, |
| size_t | nEventsGenerated, | ||
| G4bool | multithreaded | ||
| ) |
Constructor.
| fileName | Base name for ROOT output file |
| nEventsGenerated | Number of events to process |
| multithreaded | True if running with multithreading |
| PlasmaMLPALLASRunAction::~PlasmaMLPALLASRunAction | ( | ) |
Destructor.
|
override |
Called at the start of each run.
Called at the start of each run to set up ROOT output structures and initialize state.
| aRun | Pointer to the current G4Run |
|
override |
Called at the end of each run.
Called at the end of each run to write collected data to the ROOT file and clean up.
| aRun | Pointer to the current G4Run |
| void PlasmaMLPALLASRunAction::SetGeometry | ( | PlasmaMLPALLASGeometryConstruction * | geom | ) |
Set the geometry reference.
| void PlasmaMLPALLASRunAction::SetPrimaryGenerator | ( | PlasmaMLPALLASPrimaryGeneratorAction * | gen | ) |
Set the primary generator reference.
|
static |
Generic template to update cumulative statistics in a ROOT tree.
Thread-safe update of statistics and ROOT tree filling.
| T | Type of the statistics structure |
| stats | Destination statistics object (persistent in the run) |
| newStats | Source statistics (new values) |
| tree | ROOT tree to fill |
| void PlasmaMLPALLASRunAction::UpdateStatisticsBSPECYAG | ( | RunTallyYAG | a | ) |
| void PlasmaMLPALLASRunAction::UpdateStatisticsBSYAG | ( | RunTallyYAG | a | ) |
| void PlasmaMLPALLASRunAction::UpdateStatisticsGlobalInput | ( | RunTallyGlobalInput | a | ) |
| void PlasmaMLPALLASRunAction::UpdateStatisticsHorizontalColl | ( | RunTallyCollimators | a | ) |
| void PlasmaMLPALLASRunAction::UpdateStatisticsInput | ( | RunTallyInput | a | ) |
| void PlasmaMLPALLASRunAction::UpdateStatisticsQuadrupoles | ( | RunTallyQuadrupoles | a | ) |
| void PlasmaMLPALLASRunAction::UpdateStatisticsVerticalColl | ( | RunTallyCollimators | a | ) |
|
protected |
Geometry reference.
|
protected |
Primary generator reference.