7#ifndef SIMCORE_G4USER_USERTRACKINGACTION_H_
8#define SIMCORE_G4USER_USERTRACKINGACTION_H_
16#include "SimCore/TrackMap.h"
19#include "G4RunManager.hh"
20#include "G4UserTrackingAction.hh"
25#include "SimCore/UserAction.h"
27namespace simcore::g4user {
117 return static_cast<TrackingAction*
>(
const_cast<G4UserTrackingAction*
>(
118 G4RunManager::GetRunManager()->GetUserTrackingAction()));
Defines a map of particle ancestry and particles to be saved.
Interface that defines a user action.
Implementation of user tracking action.
void PostUserTrackingAction(const G4Track *aTrack)
Implementation of post-tracking action.
void registerAction(UserAction *trackingAction)
Register a user action of type RunAction with this class.
TrackingAction()
Class constructor.
TrackMap & getTrackMap()
Get a handle to the current TrackMap for the event.
void PreUserTrackingAction(const G4Track *aTrack)
Implementation of pre-tracking action.
TrackMap trackMap_
Stores parentage information for all tracks in the event.
static TrackingAction * get()
Get a pointer to the current UserTrackingAction from the G4RunManager.
virtual ~TrackingAction()
Class destructor.
std::vector< UserAction * > trackingActions_
custom user actions to be called before and after processing a track