#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, bool storeDroppedMCParticles=false) | |
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 () |
sim::ParticleList && | YieldDroppedList () |
Yields the (dropped) ParticleList accumulated during the current event. More... | |
Static Public Member Functions | |
static int | GetCurrentTrackID () |
static int | GetCurrentOrigTrackID () |
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, bool useOrigTrackIDMap=false) 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 |
std::unique_ptr < sim::ParticleList > | fdroppedParticleList |
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... | |
std::map< int, int > | fParentIDMap_OrigTrackID |
key is current track ID, value is parent ID – for real G4 track ID tracking only 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 | fCurrentOrigTrackID = sim::NoParticleId |
except for EM shower particles where it always shows the original track ID More... | |
static int | fCurrentPdgCode = 0 |
pdg code of current particle More... | |
static int | fTrackIDOffset = 0 |
Definition at line 45 of file ParticleListAction.h.
using larg4::ParticleListAction::GeneratedParticleIndex_t = simb::GeneratedParticleIndex_t |
Definition at line 47 of file ParticleListAction.h.
larg4::ParticleListAction::ParticleListAction | ( | double | energyCut, |
bool | storeTrajectories = false , |
||
bool | keepEMShowerDaughters = false , |
||
bool | keepMCParticleList = true , |
||
bool | storeDroppedMCParticles = false |
||
) |
Definition at line 58 of file ParticleListAction.cxx.
|
private |
Adds a trajectory point to the current particle, and runs the filter.
Definition at line 577 of file ParticleListAction.cxx.
|
virtual |
Definition at line 74 of file ParticleListAction.cxx.
|
virtual |
Definition at line 468 of file ParticleListAction.cxx.
|
inlinestatic |
Definition at line 126 of file ParticleListAction.h.
|
inlinestatic |
Definition at line 131 of file ParticleListAction.h.
|
inlinestatic |
Definition at line 121 of file ParticleListAction.h.
const sim::ParticleList * larg4::ParticleListAction::GetList | ( | ) | const |
Definition at line 487 of file ParticleListAction.cxx.
|
private |
Definition at line 92 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 513 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 148 of file ParticleListAction.h.
|
inline |
Returns whether a particle list is being kept.
Definition at line 155 of file ParticleListAction.h.
|
static |
returns whether the specified particle has been marked as dropped
Definition at line 51 of file ParticleListAction.cxx.
|
inline |
Grabs a particle filter.
Definition at line 114 of file ParticleListAction.h.
|
virtual |
Definition at line 275 of file ParticleListAction.cxx.
|
virtual |
Definition at line 116 of file ParticleListAction.cxx.
|
inline |
Definition at line 137 of file ParticleListAction.h.
|
virtual |
Definition at line 316 of file ParticleListAction.cxx.
sim::ParticleList && larg4::ParticleListAction::YieldDroppedList | ( | ) |
Yields the (dropped) ParticleList accumulated during the current event.
Definition at line 552 of file ParticleListAction.cxx.
sim::ParticleList && larg4::ParticleListAction::YieldList | ( | ) |
Definition at line 522 of file ParticleListAction.cxx.
|
staticprivate |
except for EM shower particles where it always shows the original track ID
g4 real track ID of the current particle (including for EM shower daughters)
Definition at line 190 of file ParticleListAction.h.
|
private |
information about the particle currently being simulated for a single particle.
Definition at line 179 of file ParticleListAction.h.
|
staticprivate |
pdg code of current particle
Definition at line 192 of file ParticleListAction.h.
|
staticprivate |
track ID of the current particle, set to eve ID for EM shower particles
Definition at line 188 of file ParticleListAction.h.
|
private |
The accumulated particle information for all dropped particles in the event.
Definition at line 183 of file ParticleListAction.h.
|
private |
The minimum energy for a particle to be included in the list.
Definition at line 177 of file ParticleListAction.h.
|
private |
filter for particles to be kept
Definition at line 197 of file ParticleListAction.h.
|
private |
whether to keep EM shower secondaries, tertiaries, etc
Definition at line 195 of file ParticleListAction.h.
|
private |
key is current track ID, value is parent ID
Definition at line 186 of file ParticleListAction.h.
|
private |
key is current track ID, value is parent ID – for real G4 track ID tracking only
Definition at line 187 of file ParticleListAction.h.
|
private |
The accumulated particle information for all particles in the event.
Definition at line 181 of file ParticleListAction.h.
|
private |
Map: particle track ID -> index of primary information in MC truth.
Definition at line 200 of file ParticleListAction.h.
|
private |
Whether to store particle trajectories with each particle.
Definition at line 185 of file ParticleListAction.h.
|
staticprivate |
offset added to track ids when running over multiple MCTruth objects.
Definition at line 193 of file ParticleListAction.h.