#include <ParticleListAction.h>
Classes | |
struct | ParticleInfo_t |
Public Types | |
using | GeneratedParticleIndex_t = simb::GeneratedParticleIndex_t |
Public Member Functions | |
ParticleListAction (double energyCut, bool storeTrajectories=false, bool keepEMShowerDaughters=false, bool keepMCParticleList=true) | |
virtual void | BeginOfEventAction (const G4Event *) |
virtual void | EndOfEventAction (const G4Event *) |
virtual void | PreTrackingAction (const G4Track *) |
virtual void | PostTrackingAction (const G4Track *) |
virtual void | SteppingAction (const G4Step *) |
void | ParticleFilter (std::unique_ptr< util::PositionInVolumeFilter > &&filter) |
Grabs a particle filter. More... | |
void | ResetTrackIDOffset () |
const sim::ParticleList * | GetList () const |
std::map< int, GeneratedParticleIndex_t > const & | GetPrimaryTruthMap () const |
bool | hasList () const |
Returns whether a particle list is being kept. More... | |
GeneratedParticleIndex_t | GetPrimaryTruthIndex (int trackId) const |
Returns the index of primary truth (sim::NoGeneratorIndex if none). More... | |
sim::ParticleList && | YieldList () |
Static Public Member Functions | |
static int | GetCurrentTrackID () |
static int | GetCurrentPdgCode () |
static bool | isDropped (simb::MCParticle const *p) |
returns whether the specified particle has been marked as dropped More... | |
Private Member Functions | |
int | GetParentage (int trackid) const |
void | AddPointToCurrentParticle (TLorentzVector const &pos, TLorentzVector const &mom, std::string const &process) |
Adds a trajectory point to the current particle, and runs the filter. More... | |
Private Attributes | |
G4double | fenergyCut |
ParticleInfo_t | fCurrentParticle |
std::unique_ptr< sim::ParticleList > | fparticleList |
G4bool | fstoreTrajectories |
Whether to store particle trajectories with each particle. More... | |
std::map< int, int > | fParentIDMap |
key is current track ID, value is parent ID More... | |
bool | fKeepEMShowerDaughters |
whether to keep EM shower secondaries, tertiaries, etc More... | |
std::unique_ptr< util::PositionInVolumeFilter > | fFilter |
filter for particles to be kept More... | |
std::map< int, GeneratedParticleIndex_t > | fPrimaryTruthMap |
Map: particle track ID -> index of primary information in MC truth. More... | |
Static Private Attributes | |
static int | fCurrentTrackID = sim::NoParticleId |
static int | fCurrentPdgCode = 0 |
pdg code of current particle More... | |
static int | fTrackIDOffset = 0 |
Definition at line 45 of file ParticleListAction.h.
Definition at line 47 of file ParticleListAction.h.
larg4::ParticleListAction::ParticleListAction | ( | double | energyCut, |
bool | storeTrajectories = false , |
||
bool | keepEMShowerDaughters = false , |
||
bool | keepMCParticleList = true |
||
) |
Definition at line 57 of file ParticleListAction.cxx.
|
private |
Adds a trajectory point to the current particle, and runs the filter.
Definition at line 509 of file ParticleListAction.cxx.
|
virtual |
Definition at line 71 of file ParticleListAction.cxx.
|
virtual |
Definition at line 440 of file ParticleListAction.cxx.
|
inlinestatic |
Definition at line 123 of file ParticleListAction.h.
|
inlinestatic |
Definition at line 118 of file ParticleListAction.h.
const sim::ParticleList * larg4::ParticleListAction::GetList | ( | ) | const |
Definition at line 459 of file ParticleListAction.cxx.
|
private |
Definition at line 87 of file ParticleListAction.cxx.
simb::GeneratedParticleIndex_t larg4::ParticleListAction::GetPrimaryTruthIndex | ( | int | trackId | ) | const |
Returns the index of primary truth (sim::NoGeneratorIndex
if none).
Definition at line 478 of file ParticleListAction.cxx.
|
inline |
Returns a map of truth record information index for each of the primary particles (by track ID).
Definition at line 140 of file ParticleListAction.h.
|
inline |
Returns whether a particle list is being kept.
Definition at line 147 of file ParticleListAction.h.
|
static |
returns whether the specified particle has been marked as dropped
Definition at line 50 of file ParticleListAction.cxx.
|
inline |
Grabs a particle filter.
Definition at line 111 of file ParticleListAction.h.
|
virtual |
Definition at line 260 of file ParticleListAction.cxx.
|
virtual |
Definition at line 110 of file ParticleListAction.cxx.
|
inline |
Definition at line 129 of file ParticleListAction.h.
|
virtual |
Definition at line 292 of file ParticleListAction.cxx.
sim::ParticleList && larg4::ParticleListAction::YieldList | ( | ) |
Definition at line 487 of file ParticleListAction.cxx.
|
private |
information about the particle currently being simulated for a single particle.
Definition at line 168 of file ParticleListAction.h.
|
staticprivate |
pdg code of current particle
Definition at line 176 of file ParticleListAction.h.
|
staticprivate |
track ID of the current particle, set to eve ID for EM shower particles
Definition at line 174 of file ParticleListAction.h.
|
private |
The minimum energy for a particle to be included in the list.
Definition at line 166 of file ParticleListAction.h.
|
private |
filter for particles to be kept
Definition at line 181 of file ParticleListAction.h.
|
private |
whether to keep EM shower secondaries, tertiaries, etc
Definition at line 179 of file ParticleListAction.h.
|
private |
key is current track ID, value is parent ID
Definition at line 173 of file ParticleListAction.h.
|
private |
The accumulated particle information for all particles in the event.
Definition at line 170 of file ParticleListAction.h.
|
private |
Map: particle track ID -> index of primary information in MC truth.
Definition at line 184 of file ParticleListAction.h.
|
private |
Whether to store particle trajectories with each particle.
Definition at line 172 of file ParticleListAction.h.
|
staticprivate |
offset added to track ids when running over multiple MCTruth objects.
Definition at line 177 of file ParticleListAction.h.