154 #ifndef CHEAT_PARTICLEINVENTORY_H 155 #define CHEAT_PARTICLEINVENTORY_H 162 namespace fhicl {
class ParameterSet; }
165 #include "nug4/ParticleNavigation/ParticleList.h" 177 fhicl::Comment(
"The label of the LArG4 module used to produce the art file we will be examining"),
181 fhicl::Comment(
"For selecting which EveID caclulator to use at initialization."),
182 "EmEveIdCalculator"};
185 fhicl::Comment(
"Option when overlaying simulation on real data, to tell the backtracker to continue even if event looks like data."),
198 template<
typename Evt>
199 void PrepEvent (
const Evt&
evt );
205 template<
typename Evt>
206 void PrepParticleList (
const Evt& evt )
const;
207 template<
typename Evt>
208 void PrepTrackIdToMCTruthIndex(
const Evt& evt )
const;
209 template<
typename Evt>
210 void PrepMCTruthList (
const Evt& evt )
const;
211 template<
typename Evt>
212 void PrepMCTruthListAndTrackIdToMCTruthIndex(
const Evt& evt )
const ;
213 template<
typename Evt>
214 bool CanRun(
const Evt& evt)
const;
216 const sim::ParticleList&
ParticleList()
const {
return fParticleList; }
219 const std::vector< art::Ptr<simb::MCTruth> >&
MCTruthList()
const {
return fMCTObj.fMCTruthList;}
227 {
return *(this->TrackIdToParticle_P(
id)); }
231 {
return *(this->TrackIdToMotherParticle_P(
id)); }
235 {
return *(this->TrackIdToMCTruth_P(
id)); }
243 {
return *(this->ParticleToMCTruth_P(p)); }
245 const std::vector< art::Ptr<simb::MCTruth> >& MCTruthVector_Ps()
const;
249 std::set<int> GetSetOfTrackIds()
const;
250 std::set<int> GetSetOfEveIds()
const;
279 #include "ParticleInventory.tcc" 281 #endif //CHEAT_PARTICLEINVENTORY_H
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. ...
ChannelGroupService::Name Name
simb::MCParticle TrackIdToMotherParticle(int const &id) const
std::string fEveIdCalculator
void SetEveIdCalculator(sim::EveIdCalculator *ec)
A simple struct to contain the MC Truth information.
std::map< int, int > fTrackIdToMCTruthIndex
art::InputTag fG4ModuleLabel
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
Contains data associated to particles from detector simulation.
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.
Event generator information.
int TrackIdToEveTrackId(const int &tid) const
const std::vector< art::Ptr< simb::MCTruth > > & MCTruthList() const
const sim::ParticleList & ParticleList() const
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.