22 : fG4ModuleLabel(config.G4ModuleLabel())
23 , fEveIdCalculator(config.EveIdCalculator())
24 , fOverrideRealData(config.OverrideRealData())
51 <<
"Particle with TrackId: " <<
id <<
" not found in inventory. " 52 <<
"Returning null pointer.";
55 return part_it->second;
70 int partIndex = mctItr->second;
75 <<
"Attempt to find MCTruth for TrackId: " <<
id <<
" has failed.";
96 std::vector<const simb::MCParticle*> ret;
99 if (this->
TrackIdToMCTruth_P(TrackIdpair.first) == mct) ret.push_back(TrackIdpair.second);
109 ret.emplace((partItr->second)->TrackId());
119 for (
auto tId : tIds) {
sim::ParticleList fParticleList
FHICL Validation Object This struct is used for loading the fhicl configuration.
list_type::value_type value_type
list_type::const_iterator const_iterator
constexpr auto abs(T v)
Returns the absolute value of the argument.
int EveId(const int trackID) const
std::string fEveIdCalculator
iterator find(const key_type &key)
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
art::InputTag fG4ModuleLabel
std::set< int > GetSetOfEveIds() const
const art::Ptr< simb::MCTruth > & ParticleToMCTruth_P(const simb::MCParticle *p) const
std::map< int, int > fTrackIdToMCTruthIndex
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
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)
const art::Ptr< simb::MCTruth > & TrackIdToMCTruth_P(int const &id) const
cet::coded_exception< error, detail::translate > exception