Handles event begin/end callbacks, hit digitization, and event-level publication.
More...
#include <gEventAction.h>
This class is the worker-side event action used by GEMC. It participates in the per-event lifecycle driven by Geant4 and is responsible for transforming hit collections into GEMC data products.
The event processing workflow implemented here is:
- begin-of-event logging and lightweight tracing;
- retrieval of the event hit collections at end of event;
- lookup of the digitization routine associated with each collection name;
- conversion of hits into digitized payload and true-information payload;
- storage of event-mode output in the event data collection;
- storage of run-mode output in the run-level collection owned by GRunAction;
- publication of completed event data through the worker-thread streamers.
Ownership:
- The shared configuration object is retained by shared ownership.
- The run_action pointer is non-owning and is expected to remain valid for the lifetime of the worker-thread action set created by GAction.
Definition at line 108 of file gEventAction.h.
◆ GEventAction() [1/3]
- Parameters
-
| gopt | Shared configuration object used for event-product construction and logging. |
| run_a | Non-owning pointer to the thread-local GRunAction instance that provides access to digitization routines, run-level accumulation, and streamers. |
| provenance | Worker-local track registry shared with the tracking action, or null when disabled. |
Definition at line 88 of file gEventAction.cc.
◆ ~GEventAction()
| GEventAction::~GEventAction |
( |
| ) |
|
|
overridedefault |
◆ GEventAction() [2/3]
◆ GEventAction() [3/3]
◆ BeginOfEventAction()
| void GEventAction::BeginOfEventAction |
( |
const G4Event * | event | ) |
|
|
override |
In this implementation, the method is mainly used for event/thread tracing and lightweight diagnostics.
- Parameters
-
| event | Geant4 event descriptor for the event being started. |
Definition at line 158 of file gEventAction.cc.
◆ EndOfEventAction()
| void GEventAction::EndOfEventAction |
( |
const G4Event * | event | ) |
|
|
override |
This method performs the main event-processing logic of the module:
- count the event in the run-level bookkeeping;
- retrieve the hit collections associated with the event;
- resolve the proper digitization routine for each collection;
- digitize each hit and collect its truth information;
- route produced payload to event-mode or run-mode accumulation depending on the digitizer collection mode;
- publish the event data once all event-mode collections have been processed.
- Parameters
-
| event | Geant4 event descriptor for the event being completed. |
Definition at line 170 of file gEventAction.cc.
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this class was generated from the following files: