154 #ifndef CHEAT_PARTICLEINVENTORY_H 155 #define CHEAT_PARTICLEINVENTORY_H 180 "The label of the LArG4 module used to produce the art file we will be examining"),
184 fhicl::Comment(
"For selecting which EveID caclulator to use at initialization."),
185 "EmEveIdCalculator"};
188 fhicl::Comment(
"Option when overlaying simulation on real data, to tell the backtracker to " 189 "continue even if event looks like data."),
202 template <
typename Evt>
203 void PrepEvent(
const Evt&
evt);
209 template <
typename Evt>
210 void PrepParticleList(
const Evt& evt)
const;
211 template <
typename Evt>
212 void PrepTrackIdToMCTruthIndex(
const Evt& evt)
const;
213 template <
typename Evt>
214 void PrepMCTruthList(
const Evt& evt)
const;
215 template <
typename Evt>
216 void PrepMCTruthListAndTrackIdToMCTruthIndex(
const Evt& evt)
const;
217 template <
typename Evt>
218 bool CanRun(
const Evt& evt)
const;
223 const std::vector<art::Ptr<simb::MCTruth>>&
MCTruthList()
const {
return fMCTObj.fMCTruthList; }
227 return fMCTObj.fTrackIdToMCTruthIndex;
235 return *(this->TrackIdToParticle_P(
id));
242 return *(this->TrackIdToMotherParticle_P(
id));
249 return *(this->TrackIdToMCTruth_P(
id));
260 return *(this->ParticleToMCTruth_P(p));
263 const std::vector<art::Ptr<simb::MCTruth>>& MCTruthVector_Ps()
269 std::set<int> GetSetOfTrackIds()
const;
270 std::set<int> GetSetOfEveIds()
const;
275 std::vector<art::Ptr<simb::MCTruth>>
297 #endif //CHEAT_PARTICLEINVENTORY_H
simb::MCParticle TrackIdToParticle(int const &id) const
sim::ParticleList fParticleList
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. ...
simb::MCParticle TrackIdToMotherParticle(int const &id) const
std::string fEveIdCalculator
void SetEveIdCalculator(sim::EveIdCalculator *ec)
const std::map< int, int > & TrackIdToMCTruthIndex() const
A simple struct to contain the MC Truth information.
art::InputTag fG4ModuleLabel
simb::MCTruth TrackIdToMCTruth(int const &id) const
simb::MCTruth ParticleToMCTruth(const simb::MCParticle *p) const
std::map< int, int > fTrackIdToMCTruthIndex
code to link reconstructed objects back to the MC truth information
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.
Particle list in DetSim contains Monte Carlo particle 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.