154 #ifndef CHEAT_PARTICLEINVENTORY_H
155 #define CHEAT_PARTICLEINVENTORY_H
160 #include "canvas/Persistency/Common/Ptr.h"
161 #include "canvas/Utilities/InputTag.h"
162 #include "fhiclcpp/types/Atom.h"
163 namespace fhicl {
class ParameterSet; }
165 namespace simb {
class MCParticle; }
166 #include "nusimdata/SimulationBase/MCTruth.h"
167 #include "nug4/ParticleNavigation/ParticleList.h"
176 fhicl::Comment(
"The label of the LArG4 module used to produce the art file we will be examining"),
180 fhicl::Comment(
"For selecting which EveID caclulator to use at initialization."),
181 "EmEveIdCalculator"};
184 fhicl::Comment(
"Option when overlaying simulation on real data, to tell the backtracker to continue even if event looks like data."),
197 template<
typename Evt>
204 template<
typename Evt>
206 template<
typename Evt>
208 template<
typename Evt>
210 template<
typename Evt>
212 template<
typename Evt>
246 std::vector<const simb::MCParticle*>
MCTruthToParticles_Ps(art::Ptr<simb::MCTruth>
const& mct)
const;
278 #include "ParticleInventory.tcc"
280 #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...
std::string fEveIdCalculator
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...
std::vector< const simb::MCParticle * > MCTruthToParticles_Ps(art::Ptr< simb::MCTruth > const &mct) const
A simple struct to contain the MC Truth information.
const simb::MCParticle * TrackIdToParticle_P(int const &id) const
std::set< int > GetSetOfTrackIds() const
BEGIN_PROLOG vertical distance to the surface Name
std::map< int, int > fTrackIdToMCTruthIndex
art::InputTag fG4ModuleLabel
std::set< int > GetSetOfEveIds() const
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
fhicl::Atom< std::string > EveIdCalculator
const simb::MCParticle * TrackIdToMotherParticle_P(int const &id) const
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)
fhicl::Atom< bool > OverrideRealData
int TrackIdToEveTrackId(const int &tid) const
bool empty(FixedBins< T, C > const &) noexcept
const art::Ptr< simb::MCTruth > & TrackIdToMCTruth_P(int const &id) const
const std::vector< art::Ptr< simb::MCTruth > > & MCTruthList() const
const sim::ParticleList & ParticleList() const