4#include "SimCore/TrackMap.h"
7#include "SimCore/UserTrackInformation.h"
10#include "G4PrimaryParticle.hh"
11#include "G4VUserPrimaryParticleInformation.hh"
15namespace simcore::g4user {
29 ->GetUserInformation();
32 int curGenStatus = -1;
33 if (track->GetDynamicParticle()->GetPrimaryParticle()) {
35 track->GetDynamicParticle()
36 ->GetPrimaryParticle()
37 ->GetUserInformation());
55 if (curGenStatus == 1 or !regionInfo or regionInfo->getStoreSecondaries()) {
56 track_info->setSaveFlag(
true);
65 trackingAction->PreUserTrackingAction(track);
71 trackingAction->PostUserTrackingAction(track);
81 if (track_info->getSaveFlag() and
82 track->GetTrackStatus() == G4TrackStatus::fStopAndKill) {
Class which implements the user tracking action.
Class that provides extra information for Geant4 primary particles.
bool contains(const G4Track *track) const
Check if the passed track has already been inserted into the track map.
void save(const G4Track *track)
Add a track to be stored into output map.
void insert(const G4Track *track)
Add a record in the map for the input track.
Defines extra information attached to a Geant4 primary particle.
int getHepEvtStatus()
Get the HEP event status.
void PostUserTrackingAction(const G4Track *aTrack)
Implementation of post-tracking action.
void PreUserTrackingAction(const G4Track *aTrack)
Implementation of pre-tracking action.
TrackMap trackMap_
Stores parentage information for all tracks in the event.
std::vector< UserAction * > trackingActions_
custom user actions to be called before and after processing a track