23 :fG4ModuleLabel(config.G4ModuleLabel()),
24 fEveIdCalculator(config.EveIdCalculator()),
25 fOverrideRealData(config.OverrideRealData())
52 <<
id <<
" not found in inventory. " 53 <<
"Returning null pointer.";
56 return part_it->second;
72 int partIndex = mctItr->second;
75 throw cet::exception(
"ParticleInventory") <<
"Attempt to find MCTruth for TrackId: " 76 <<
id <<
" has failed.";
94 std::vector<const simb::MCParticle*> ret;
96 for (
const sim::ParticleList::value_type& TrackIdpair:
fParticleList) {
98 ret.push_back(TrackIdpair.second);
107 ret.emplace((partItr->second)->TrackId());
116 for(
auto tId : tIds){
sim::ParticleList fParticleList
FHICL Validation Object This struct is used for loading the fhicl configuration.
std::string fEveIdCalculator
const std::vector< art::Ptr< simb::MCTruth > > & MCTruthVector_Ps() const
std::vector< const simb::MCParticle * > MCTruthToParticles_Ps(art::Ptr< simb::MCTruth > const &mct) const
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
const art::Ptr< simb::MCTruth > & ParticleToMCTruth_P(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
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
Header for the ParticleInvenotry Service Provider.
std::vector< art::Ptr< simb::MCTruth > > fMCTruthList
A vector containing the MCTruth objects.
ParticleInventory(const ParticleInventoryConfig &config)
auto const & get(AssnsNode< L, R, D > const &r)
const art::Ptr< simb::MCTruth > & TrackIdToMCTruth_P(int const &id) const
cet::coded_exception< error, detail::translate > exception