24 #ifndef PANDORAINTERFACEHELPER_H
25 #define PANDORAINTERFACEHELPER_H
27 #include "HelperBase.h"
29 #include "canvas/Persistency/Common/FindManyP.h"
30 #include "canvas/Persistency/Common/FindOneP.h"
31 #include "lardataobj/RecoBase/PFParticle.h"
32 #include "lardataobj/RecoBase/SpacePoint.h"
33 #include "lardataobj/RecoBase/Hit.h"
34 #include "larpandora/LArPandoraInterface/LArPandoraHelper.h"
36 #include "nusimdata/SimulationBase/MCParticle.h"
37 #include "nusimdata/SimulationBase/MCTruth.h"
38 #include "lardataobj/AnalysisBase/BackTrackerMatchingData.h"
42 typedef std::map<art::Ptr<recob::PFParticle>, art::Ptr<simb::MCParticle>> PFParticlesToMCParticles;
48 typedef std::map<art::Ptr<recob::PFParticle>,
unsigned int>
49 RecoParticleToNMatchedHits;
50 typedef std::map<art::Ptr<simb::MCParticle>, RecoParticleToNMatchedHits>
52 typedef std::set<art::Ptr<recob::PFParticle>> PFParticleSet;
53 typedef std::set<art::Ptr<simb::MCParticle>> MCParticleSet;
61 void reconfigure(fhicl::ParameterSet
const &pset);
71 const art::ValidHandle<std::vector<recob::PFParticle>> pfparticles,
72 size_t top_index, std::vector<size_t> &unordered_daugthers,
73 std::string _pfp_producer);
86 const art::ValidHandle<std::vector<recob::PFParticle>> pfparticles,
87 const art::Event &evt,
88 std::string _pfp_producer);
90 void get_daughter_tracks(std::vector<size_t> pf_ids,
const art::Event &evt,
91 std::vector<art::Ptr<recob::Track>> &tracks,
92 std::string _pfp_producer);
94 void get_daughter_showers(std::vector<size_t> pf_ids,
const art::Event &evt,
95 std::vector<art::Ptr<recob::Shower>> &showers,
96 std::string _pfp_producer);
116 void Configure(art::Event
const &e,
117 std::string _pfp_producer,
118 std::string _spacepoint_producer,
119 std::string _hitfinder_producer,
120 std::string _geant_producer,
121 std::string _hit_mcp_producer);
123 art::Ptr<simb::MCTruth> TrackIDToMCTruth(art::Event
const &e, std::string _geant_producer,
int geant_track_id);
133 const std::string &label,
134 lar_pandora::MCParticleVector &particleVector);
144 const std::string &label,
145 lar_pandora::MCTruthToMCParticles &truthToParticles,
146 lar_pandora::MCParticlesToMCTruth &particlesToTruth);
152 bool _configured =
false;
153 bool m_isOverlaidSample =
false;
155 bool _verbose =
false;
Definition: PandoraInterfaceHelper.h:55
void traversePFParticleTree(const art::ValidHandle< std::vector< recob::PFParticle >> pfparticles, size_t top_index, std::vector< size_t > &unordered_daugthers, std::string _pfp_producer)
Travers the tree of the daughters of a PFParticle.
Definition: PandoraInterfaceHelper.cxx:290
void GetRecoToTrueMatches(lar_pandora::PFParticlesToMCParticles &matchedParticles)
Configure function parameters.
Definition: PandoraInterfaceHelper.cxx:222
std::vector< double > calculateChargeCenter(size_t ipf, const art::ValidHandle< std::vector< recob::PFParticle >> pfparticles, const art::Event &evt, std::string _pfp_producer)
Measures the three-dimensional center of the deposited charge for a PFParticle.
Definition: PandoraInterfaceHelper.cxx:373
Definition: HelperBase.h:17
lar_pandora::HitsToMCParticles _hit_to_mcps_map
A map from recon hits to MCParticles.
Definition: PandoraInterfaceHelper.h:149
void CollectMCParticles(const art::Event &evt, const std::string &label, lar_pandora::MCParticleVector &particleVector)
Collect a vector of MCParticle objects from the ART event record.
Definition: PandoraInterfaceHelper.cxx:173
lar_pandora::PFParticlesToHits _pfp_to_hits_map
A map from PFParticles to recon hits.
Definition: PandoraInterfaceHelper.h:150