LDMX Software
EventAction.cxx
1
3
4/*~~~~~~~~~~~~~~~~*/
5/* C++ StdLib */
6/*~~~~~~~~~~~~~~~~*/
7#include <iostream>
8
9/*~~~~~~~~~~~~~*/
10/* SimCore */
11/*~~~~~~~~~~~~~*/
12#include "SimCore/G4User/TrackMap.h"
14
15/*~~~~~~~~~~~~*/
16/* Geant4 */
17/*~~~~~~~~~~~~*/
18#include "G4Event.hh"
19
20namespace simcore {
21namespace g4user {
22
23void EventAction::BeginOfEventAction(const G4Event* event) {
24 // Clear the global track map.
26
27 // Call user event actions
28 for (auto& event_action : event_actions_) {
29 event_action->BeginOfEventAction(event);
30 }
31}
32
33void EventAction::EndOfEventAction(const G4Event* event) {
34 // Call user event actions
35 for (auto& event_action : event_actions_) {
36 event_action->EndOfEventAction(event);
37 }
38}
39
40} // namespace g4user
41} // 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:127
void BeginOfEventAction(const G4Event *event)
Implementation of begin of event hook.
void EndOfEventAction(const G4Event *event)
Implementation of end 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 ...