PlasmaMLPALLAS
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
PlasmaMLPALLASRunAction Class Reference

Defines the run-level actions and statistics handling for the PALLAS simulation. More...

#include <PlasmaMLPALLASRunAction.hh>

Inheritance diagram for PlasmaMLPALLASRunAction:
Inheritance graph
[legend]
Collaboration diagram for PlasmaMLPALLASRunAction:
Collaboration graph
[legend]

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

PlasmaMLPALLASPrimaryGeneratorActionfPrimaryGenerator = nullptr
 Primary generator reference.
 
PlasmaMLPALLASGeometryConstructionfGeometry = nullptr
 Geometry reference.
 

Detailed Description

Defines the run-level actions and statistics handling for the PALLAS simulation.

Manages run-level actions, statistics, and ROOT output.

Author
Arnaud HUBER huber.nosp@m.@lp2.nosp@m.ib.in.nosp@m.2p3..nosp@m.fr - Alexei SYTOV sytov.nosp@m.@inf.nosp@m.n.it
Date
2025

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:

Note
This class interacts closely with:

Constructor & Destructor Documentation

◆ PlasmaMLPALLASRunAction()

PlasmaMLPALLASRunAction::PlasmaMLPALLASRunAction ( const char *  fileName,
size_t  nEventsGenerated,
G4bool  multithreaded 
)

Constructor.

Parameters
fileNameBase name for ROOT output file
nEventsGeneratedNumber of events to process
multithreadedTrue if running with multithreading

◆ ~PlasmaMLPALLASRunAction()

PlasmaMLPALLASRunAction::~PlasmaMLPALLASRunAction ( )

Destructor.

Member Function Documentation

◆ BeginOfRunAction()

void PlasmaMLPALLASRunAction::BeginOfRunAction ( const G4Run *  aRun)
override

Called at the start of each run.

Called at the start of each run to set up ROOT output structures and initialize state.

Parameters
aRunPointer to the current G4Run

◆ EndOfRunAction()

void PlasmaMLPALLASRunAction::EndOfRunAction ( const G4Run *  aRun)
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.

Parameters
aRunPointer to the current G4Run

◆ SetGeometry()

void PlasmaMLPALLASRunAction::SetGeometry ( PlasmaMLPALLASGeometryConstruction geom)

Set the geometry reference.

◆ SetPrimaryGenerator()

void PlasmaMLPALLASRunAction::SetPrimaryGenerator ( PlasmaMLPALLASPrimaryGeneratorAction gen)

Set the primary generator reference.

◆ UpdateStatistics()

template<typename T >
void PlasmaMLPALLASRunAction::UpdateStatistics ( T &  stats,
const T &  newStats,
TTree *  tree 
)
static

Generic template to update cumulative statistics in a ROOT tree.

Thread-safe update of statistics and ROOT tree filling.

Template Parameters
TType of the statistics structure
Parameters
statsDestination statistics object (persistent in the run)
newStatsSource statistics (new values)
treeROOT tree to fill

◆ UpdateStatisticsBSPECYAG()

void PlasmaMLPALLASRunAction::UpdateStatisticsBSPECYAG ( RunTallyYAG  a)

◆ UpdateStatisticsBSYAG()

void PlasmaMLPALLASRunAction::UpdateStatisticsBSYAG ( RunTallyYAG  a)

◆ UpdateStatisticsGlobalInput()

void PlasmaMLPALLASRunAction::UpdateStatisticsGlobalInput ( RunTallyGlobalInput  a)

◆ UpdateStatisticsHorizontalColl()

void PlasmaMLPALLASRunAction::UpdateStatisticsHorizontalColl ( RunTallyCollimators  a)

◆ UpdateStatisticsInput()

void PlasmaMLPALLASRunAction::UpdateStatisticsInput ( RunTallyInput  a)

◆ UpdateStatisticsQuadrupoles()

void PlasmaMLPALLASRunAction::UpdateStatisticsQuadrupoles ( RunTallyQuadrupoles  a)

◆ UpdateStatisticsVerticalColl()

void PlasmaMLPALLASRunAction::UpdateStatisticsVerticalColl ( RunTallyCollimators  a)

Member Data Documentation

◆ fGeometry

PlasmaMLPALLASGeometryConstruction* PlasmaMLPALLASRunAction::fGeometry = nullptr
protected

Geometry reference.

◆ fPrimaryGenerator

PlasmaMLPALLASPrimaryGeneratorAction* PlasmaMLPALLASRunAction::fPrimaryGenerator = nullptr
protected

Primary generator reference.


The documentation for this class was generated from the following files: