#include <ParticleListAction_service.h>
Classes | |
struct | ParticleInfo_t |
Public Member Functions | |
ParticleListActionService (fhicl::ParameterSet const &) | |
void | preUserTrackingAction (const G4Track *) override |
void | postUserTrackingAction (const G4Track *) override |
void | userSteppingAction (const G4Step *) override |
simb::GeneratedParticleIndex_t | GetPrimaryTruthIndex (int trackId) const |
Returns the index of primary truth (sim::NoGeneratorIndex if none). More... | |
void | beginOfEventAction (const G4Event *) override |
void | endOfEventAction (const G4Event *) override |
void | setInputCollections (std::vector< art::Handle< std::vector< simb::MCTruth >>> const &mclists) |
void | setPtrInfo (art::ProductID pid, art::EDProductGetter const *productGetter) |
std::unique_ptr< std::vector < simb::MCParticle > > | ParticleCollection () |
std::unique_ptr< std::map< int, std::set< int > > > | DroppedTracksCollection () |
std::unique_ptr< art::Assns < simb::MCTruth, simb::MCParticle, sim::GeneratedParticleInfo > > | AssnsMCTruthToMCParticle () |
std::map< int, int > | GetTargetIDMap () |
Private Member Functions | |
sim::ParticleList && | YieldList () |
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 |
sim::ParticleList | fParticleList |
G4bool | fstoreTrajectories |
Whether to store particle trajectories with each particle. More... | |
std::vector< std::string > | fkeepGenTrajectories |
std::map< int, int > | fParentIDMap |
key is current track ID, value is parent ID More... | |
std::map< int, int > | fTargetIDMap |
key is original track ID, value is ID to assign for downstream objs (e.g. SimEdeps) More... | |
int | fCurrentTrackID |
int | fTrackIDOffset |
bool | fKeepEMShowerDaughters |
whether to keep EM shower secondaries, tertiaries, etc More... | |
std::vector< std::string > | fNotStoredPhysics |
Physics processes that will not be stored. More... | |
bool | fkeepOnlyPrimaryFullTraj |
bool | fSparsifyTrajectories |
help reduce the number of trajectory points. More... | |
double | fSparsifyMargin |
set the sparsification margin More... | |
bool | fKeepTransportation |
tell whether or not to keep the transportation process More... | |
bool | fKeepSecondToLast |
tell whether or not to force keeping the second to last point More... | |
std::vector< art::Handle < std::vector< simb::MCTruth > > > const * | fMCLists |
MCTruthCollection input lists. More... | |
std::map< int, simb::GeneratedParticleIndex_t > | fPrimaryTruthMap |
Map: particle track ID -> index of primary information in MC truth. More... | |
std::map< int, size_t > | fMCTIndexMap |
Map: particle track ID -> index of primary parent in std::vector<simb::MCTruth> object. More... | |
std::map< int, bool > | fMCTPrimProcessKeepMap |
Map: particle trakc ID -> boolean decision to keep or not full trajectory points. More... | |
std::map< size_t, std::pair < std::string, G4bool > > | fMCTIndexToGeneratorMap |
Map: MCTruthIndex -> generator, input label of generator and keepGenerator decision. More... | |
std::unordered_map < std::string, int > | fNotStoredCounterUMap |
Map: not stored process and counter. More... | |
std::map< int, std::set< int > > | fdroppedTracksMap |
map <ParentID, set: list of track ids for which no MCParticle was created> More... | |
std::unique_ptr< std::vector < simb::MCParticle > > | partCol_ |
std::unique_ptr< std::map< int, std::set< int > > > | droppedCol_ |
std::unique_ptr< art::Assns < simb::MCTruth, simb::MCParticle, sim::GeneratedParticleInfo > > | tpassn_ |
art::ProductID | pid_ {art::ProductID::invalid()} |
art::EDProductGetter const * | productGetter_ {nullptr} |
Definition at line 61 of file ParticleListAction_service.h.
|
explicit |
Definition at line 66 of file ParticleListAction.cc.
|
private |
Adds a trajectory point to the current particle, and runs the filter.
Definition at line 674 of file ParticleListAction.cc.
|
inline |
Definition at line 111 of file ParticleListAction_service.h.
|
override |
Definition at line 130 of file ParticleListAction.cc.
|
inline |
Definition at line 105 of file ParticleListAction_service.h.
|
override |
Definition at line 685 of file ParticleListAction.cc.
|
private |
Definition at line 215 of file ParticleListAction.cc.
simb::GeneratedParticleIndex_t larg4::ParticleListActionService::GetPrimaryTruthIndex | ( | int | trackId | ) | const |
Returns the index of primary truth (sim::NoGeneratorIndex
if none).
Definition at line 644 of file ParticleListAction.cc.
|
inline |
Definition at line 116 of file ParticleListAction_service.h.
|
inline |
Definition at line 101 of file ParticleListAction_service.h.
|
override |
Definition at line 438 of file ParticleListAction.cc.
|
override |
Definition at line 235 of file ParticleListAction.cc.
|
inline |
Definition at line 88 of file ParticleListAction_service.h.
|
inline |
Definition at line 94 of file ParticleListAction_service.h.
|
override |
Definition at line 506 of file ParticleListAction.cc.
|
private |
Definition at line 653 of file ParticleListAction.cc.
|
private |
Definition at line 214 of file ParticleListAction_service.h.
|
private |
information about the particle currently being simulated for a single particle.
Definition at line 166 of file ParticleListAction_service.h.
|
private |
track ID of the current particle, set to eve ID for EM shower particles
Definition at line 179 of file ParticleListAction_service.h.
|
private |
map <ParentID, set: list of track ids for which no MCParticle was created>
Definition at line 211 of file ParticleListAction_service.h.
|
private |
The minimum energy for a particle to be included in the list.
Definition at line 164 of file ParticleListAction_service.h.
|
private |
whether to keep EM shower secondaries, tertiaries, etc
Definition at line 183 of file ParticleListAction_service.h.
|
private |
List of generators for which fstoreTrajectories applies. if not provided and storeTrajectories is true, then all trajectories for all generators will be stored. If storeTrajectories is set to false, this list is ignored and all additional trajectory points are not stored.
Definition at line 172 of file ParticleListAction_service.h.
|
private |
Whether to store trajectories only for primaries and their descendants with MCTruth process = "primary"
Definition at line 185 of file ParticleListAction_service.h.
|
private |
tell whether or not to force keeping the second to last point
Definition at line 190 of file ParticleListAction_service.h.
|
private |
tell whether or not to keep the transportation process
Definition at line 189 of file ParticleListAction_service.h.
|
private |
MCTruthCollection input lists.
Definition at line 193 of file ParticleListAction_service.h.
|
private |
Map: particle track ID -> index of primary parent in std::vector<simb::MCTruth> object.
Definition at line 199 of file ParticleListAction_service.h.
|
private |
Map: MCTruthIndex -> generator, input label of generator and keepGenerator decision.
Definition at line 205 of file ParticleListAction_service.h.
|
private |
Map: particle trakc ID -> boolean decision to keep or not full trajectory points.
Definition at line 202 of file ParticleListAction_service.h.
|
private |
Map: not stored process and counter.
Definition at line 208 of file ParticleListAction_service.h.
|
private |
Physics processes that will not be stored.
Definition at line 184 of file ParticleListAction_service.h.
|
private |
key is current track ID, value is parent ID
Definition at line 177 of file ParticleListAction_service.h.
|
private |
The accumulated particle information for all particles in the event.
Definition at line 168 of file ParticleListAction_service.h.
|
private |
Map: particle track ID -> index of primary information in MC truth.
Definition at line 196 of file ParticleListAction_service.h.
|
private |
set the sparsification margin
Definition at line 188 of file ParticleListAction_service.h.
|
private |
help reduce the number of trajectory points.
Definition at line 187 of file ParticleListAction_service.h.
|
private |
Whether to store particle trajectories with each particle.
Definition at line 170 of file ParticleListAction_service.h.
|
private |
key is original track ID, value is ID to assign for downstream objs (e.g. SimEdeps)
Definition at line 178 of file ParticleListAction_service.h.
|
mutableprivate |
offset added to track ids when running over multiple MCTruth objects.
Definition at line 181 of file ParticleListAction_service.h.
|
private |
Definition at line 213 of file ParticleListAction_service.h.
|
private |
Definition at line 217 of file ParticleListAction_service.h.
|
private |
Definition at line 218 of file ParticleListAction_service.h.
|
private |
Definition at line 216 of file ParticleListAction_service.h.