7#ifndef SIMCORE_G4USER_PHOTONUCLEARTRACKER_H_
8#define SIMCORE_G4USER_PHOTONUCLEARTRACKER_H_
26#include "SimCore/Event/PhotonuclearInteraction.h"
74 return {TYPE::EVENT, TYPE::STEPPING, TYPE::TRACKING};
104 void stepping(
const G4Step* step)
override;
151 std::string& material);
160 const G4Track* track);
File holding UserAction prototype and supporting macro.
Class encapsulating parameters for configuring a processor.
Tracks detailed information about photonuclear interactions.
static PhotonuclearTracker * instance
Static pointer to the current instance.
void BeginOfEventAction(const G4Event *event) override
Called at the beginning of each event.
ldmx::PhotonuclearInteraction::ParticleInfo createParticleInfo(const G4Track *track)
Create a ParticleInfo struct from a G4Track.
std::map< int, int > descendant_ancestry_
Maps descendant track ID -> immediate secondary track ID Propagates through the genealogy to trace ba...
void PreUserTrackingAction(const G4Track *track) override
Called before tracking a new track.
virtual ~PhotonuclearTracker()=default
Destructor.
PhotonuclearTracker(const std::string &name, framework::config::Parameters ¶meters)
Constructor.
std::map< int, int > secondary_to_pn_index_
Maps secondary track ID -> index in pn_interactions_ Used to quickly find which PN interaction a seco...
static PhotonuclearTracker * get()
Get the current PhotonuclearTracker instance.
void extractTargetInfo(const G4Step *step, int &Z, int &A, std::string &material)
Extract target nucleus information from the current step.
void PostUserTrackingAction(const G4Track *track) override
Called after tracking a track.
std::vector< TYPE > getTypes() override
Get the types of actions this class handles.
void EndOfEventAction(const G4Event *event) override
Called at the end of each event.
void stepping(const G4Step *step) override
Called after each simulation step.
std::vector< ldmx::PhotonuclearInteraction > getInteractions() const
Get the collection of PN interactions for this event.
std::vector< ldmx::PhotonuclearInteraction > pn_interactions_
Collection of PN interactions in this event.
Interface that defines a user action.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...
Stores kinematic and identity information for a particle.