154 #ifndef CHEAT_PARTICLEINVENTORY_H 155 #define CHEAT_PARTICLEINVENTORY_H 184 fhicl::Comment(
"The label of the LArG4 module used to produce the art file we will be examining"),
197 template<
typename Evt>
204 template<
typename Evt>
206 template<
typename Evt>
208 template<
typename Evt>
210 template<
typename Evt>
212 template<
typename Evt>
213 bool CanRun(
const Evt& evt)
const;
272 #endif //CHEAT_PARTICLEINVENTORY_H
void PrepParticleList(const Evt &evt) const
A function to load the ParticleList and cache it This function will find the particle list and load i...
simb::MCParticle TrackIdToParticle(int const &id) const
sim::ParticleList fParticleList
const std::map< int, int > & TrackIdToMCTruthIndex() const
bool MCTruthListReady() const
A simple check to determine if the MCTruthList has already been prepared and cached or not...
FHICL Validation Object This struct is used for loading the fhicl configuration.
bool TrackIdToMCTruthReady() const
A simple check to determine if the TrackIdToMCTruth map has been prepared or not. ...
fhicl::Atom< art::InputTag > G4ModuleLabel
An atom. FHICL Atom for retreiving the module label to be used in retreiving information from the art...
simb::MCParticle TrackIdToMotherParticle(int const &id) const
void PrepEvent(const Evt &evt)
Function to set up the ParticleInventory state for an event. This is a function to tell the ParticleI...
int EveId(const int trackID) const
bool CanRun(const Evt &evt) const
A short function to check if use of the backtracker is appropriate or not based on the type of input ...
const std::vector< art::Ptr< simb::MCTruth > > & MCTruthVector_Ps() const
void PrepTrackIdToMCTruthIndex(const Evt &evt) const
A function to prepare and cache a map of TrackIds and MCTruth object indicies from fMCTruthList...
void PrepMCTruthList(const Evt &evt) const
A function to load and cache the MCTruthList of the event.
void SetEveIdCalculator(sim::EveIdCalculator *ec)
void PrepMCTruthListAndTrackIdToMCTruthIndex(const Evt &evt) const
A function to make both PrepTrackIdToMCTruthIndex and PrepMCTruthList run when both are needed...
A simple struct to contain the MC Truth information.
const simb::MCParticle * TrackIdToParticle_P(int const &id) const
std::set< int > GetSetOfTrackIds() const
std::map< int, int > fTrackIdToMCTruthIndex
art::InputTag fG4ModuleLabel
std::set< int > GetSetOfEveIds() const
Interface for calculating the "ultimate mother" of a particle in a simulated event.
const art::Ptr< simb::MCTruth > & ParticleToMCTruth_P(const simb::MCParticle *p) const
simb::MCTruth TrackIdToMCTruth(int const &id) const
simb::MCTruth ParticleToMCTruth(const simb::MCParticle *p) const
code to link reconstructed objects back to the MC truth information
const simb::MCParticle * TrackIdToMotherParticle_P(int const &id) const
Example routine for calculating the "ultimate e-m mother" of a particle in a simulated event...
bool ParticleListReady() const
A simple check to determine if the ParticleList has already been prepared for this event or not...
std::vector< art::Ptr< simb::MCTruth > > fMCTruthList
A vector containing the MCTruth objects.
ParticleInventory(const ParticleInventoryConfig &config)
Event generator information.
Particle list in DetSim contains Monte Carlo particle information.
static void AdoptEveIdCalculator(EveIdCalculator *)
int TrackIdToEveTrackId(const int &tid) const
const art::Ptr< simb::MCTruth > & TrackIdToMCTruth_P(int const &id) const
const std::vector< const simb::MCParticle * > MCTruthToParticles_Ps(art::Ptr< simb::MCTruth > const &mct) const
const std::vector< art::Ptr< simb::MCTruth > > & MCTruthList() const
const sim::ParticleList & ParticleList() const