LDMX Software
EventAction.cxx
1
3
4/*~~~~~~~~~~~~~~~~*/
5/* C++ StdLib */
6/*~~~~~~~~~~~~~~~~*/
7
8/*~~~~~~~~~~~~~*/
9/* SimCore */
10/*~~~~~~~~~~~~~*/
11#include "SimCore/G4User/TrackMap.h"
13
14/*~~~~~~~~~~~~*/
15/* Geant4 */
16/*~~~~~~~~~~~~*/
17#include "G4Event.hh"
18
19namespace simcore {
20namespace g4user {
21
22void EventAction::BeginOfEventAction(const G4Event* event) {
23 // Clear the global track map.
25
26 // Call user event actions
27 for (auto& event_action : event_actions_) {
28 event_action->beginOfEventAction(event);
29 }
30}
31
32void EventAction::EndOfEventAction(const G4Event* event) {
33 // Call user event actions
34 for (auto& event_action : event_actions_) {
35 event_action->endOfEventAction(event);
36 }
37}
38
39} // namespace g4user
40} // namespace simcore
Class which implements the Geant4 user event action.
Class which implements the user tracking action.
void clear()
Clear the internal maps.
Definition TrackMap.cxx:128
void EndOfEventAction(const G4Event *event) override
Implementation of end of event hook.
void BeginOfEventAction(const G4Event *event) override
Implementation of begin of event hook.
TrackMap & getTrackMap()
Get a handle to the current TrackMap for the event.
static TrackingAction * get()
Get a pointer to the current UserTrackingAction from the G4RunManager.
This namespace is meant to contain all the standard user actions that allow a Geant4 user to interfac...
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...