13 #include "fhiclcpp/ParameterSet.h"
14 #include "messagefacility/MessageLogger/MessageLogger.h"
17 #include "nusimdata/SimulationBase/MCParticle.h"
23 :fG4ModuleLabel(config.G4ModuleLabel()),
24 fEveIdCalculator(config.EveIdCalculator()),
25 fOverrideRealData(config.OverrideRealData())
31 :fG4ModuleLabel(pSet.
get<art::InputTag>(
"G4ModuleLabel",
"largeant")),
32 fEveIdCalculator(pSet.
get<
std::string>(
"EveIdCalculator",
"EmEveIdCalculator")),
33 fOverrideRealData(pSet.
get<
bool>(
"OverrideRealData",
false))
49 sim::ParticleList::const_iterator part_it =
fParticleList.find(
id);
51 mf::LogWarning(
"ParticleInventory") <<
"Particle with TrackId: "
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
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
FHICL Validation Object This struct is used for loading the fhicl configuration.
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
std::set< int > GetSetOfEveIds() const
const art::Ptr< simb::MCTruth > & ParticleToMCTruth_P(const simb::MCParticle *p) const
const simb::MCParticle * TrackIdToMotherParticle_P(int const &id) const
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