PlasmaMLPALLAS
|
Class to initialize user actions in the PALLAS simulation. More...
#include <PlasmaMLPALLASActionInitialization.hh>
Public Member Functions | |
PlasmaMLPALLASActionInitialization (const char *name, size_t nEvents, size_t nThreads, bool flagMT, PlasmaMLPALLASGeometryConstruction *geometry) | |
Constructor. | |
virtual | ~PlasmaMLPALLASActionInitialization () |
Destructor. | |
virtual void | BuildForMaster () const override |
Build actions for master thread (multithreading mode) | |
virtual void | Build () const override |
Build actions for worker threads or sequential mode. | |
Public Attributes | |
char * | NEvents |
Pointer to the string storing the number of events. | |
G4String | suffixe |
Suffix used for file/output identification. | |
size_t | NEventsGenerated |
Total number of events generated. | |
size_t | numThreads |
Number of threads in multithreading. | |
G4bool | flag_MT = false |
Flag to indicate multithreading mode. | |
Class to initialize user actions in the PALLAS simulation.
This class inherits from G4VUserActionInitialization and defines actions to be performed at the start of the simulation, including primary particle generation and event/run actions. It supports multithreading and keeps track of simulation parameters such as the number of events and thread index.
PlasmaMLPALLASActionInitialization::PlasmaMLPALLASActionInitialization | ( | const char * | name, |
size_t | nEvents, | ||
size_t | nThreads, | ||
bool | flagMT, | ||
PlasmaMLPALLASGeometryConstruction * | geometry | ||
) |
Constructor.
Constructor for ActionInitialization class.
name | Name identifier for the simulation run |
nEvents | Number of events to generate |
nThreads | Number of threads for multithreading |
flagMT | True if multithreading is enabled |
geometry | Pointer to the geometry construction object |
suff | Suffix string to append to output files |
N | Number of events to generate |
Ncores | Number of threads to use in multithreaded mode |
pMT | Flag indicating whether multithreading is enabled |
geometry | Pointer to the simulation geometry |
|
virtual |
Destructor.
Destructor for ActionInitialization class.
|
overridevirtual |
Build actions for worker threads or sequential mode.
Build actions for worker threads or single-threaded runs.
This function sets up primary generator actions, run actions, and event actions.
This function creates and assigns all user actions required for the simulation:
|
overridevirtual |
Build actions for master thread (multithreading mode)
Build actions for the master thread.
In Geant4, the master thread only manages run-level actions.
This function is called in multithreaded mode to define actions that are executed only in the master thread, such as RunAction.
G4bool PlasmaMLPALLASActionInitialization::flag_MT = false |
Flag to indicate multithreading mode.
char* PlasmaMLPALLASActionInitialization::NEvents |
Pointer to the string storing the number of events.
size_t PlasmaMLPALLASActionInitialization::NEventsGenerated |
Total number of events generated.
size_t PlasmaMLPALLASActionInitialization::numThreads |
Number of threads in multithreading.
G4String PlasmaMLPALLASActionInitialization::suffixe |
Suffix used for file/output identification.