All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reco_truth_matching.h
Go to the documentation of this file.
1 #ifndef SBNCODE_SINGLEPHOTONANALYSIS_RECO_TRUTH_MATCHING_H
2 #define SBNCODE_SINGLEPHOTONANALYSIS_RECO_TRUTH_MATCHING_H
3 
4 #include <vector>
5 #include <map>
6 
7 #include "nusimdata/SimulationBase/simb.h"
8 #include "nusimdata/SimulationBase/MCTruth.h"
9 
12 
15 
16 
17 //#include <typeinfo>
18 
19 namespace single_photon
20 {
21  void RecoMCTracks(
22  std::vector<PandoraPFParticle> all_PPFPs,
23  const std::vector<art::Ptr<recob::Track>>& tracks,
24  std::map<art::Ptr<recob::Track>, art::Ptr<simb::MCParticle> > & trackToMCParticleMap,
25  std::map< art::Ptr<simb::MCParticle>, art::Ptr<simb::MCTruth>> & MCParticleToMCTruthMap,
26  std::vector<art::Ptr<simb::MCParticle>> & mcParticleVector,
27  std::map< int, art::Ptr<simb::MCParticle> > & MCParticleToTrackIdMap,
28  std::vector<double> & vfrac,
29  var_all& vars
30  );
31 
32  //recoMCmatching but specifically for recob::showers
34  std::vector<PandoraPFParticle> all_PPFPs,
35  std::vector<art::Ptr<recob::Shower>>& showerVector,
36  std::map<art::Ptr<recob::Shower>,art::Ptr<simb::MCParticle>>& showerToMCParticleMap,
37  art::FindManyP<simb::MCParticle,anab::BackTrackerHitMatchingData>& mcparticles_per_hit,
38  std::vector<art::Ptr<simb::MCParticle>>& mcParticleVector,
39  std::map< int ,art::Ptr<simb::MCParticle> > & MCParticleToTrackIdMap,
40  var_all& vars
41  );
42 
43 
44 
45  /* @brief: a simpler MCmatching function for track and shower
46  * @argument to be filled in function body:
47  * objectToMCParticleMap: map of object (track, shower) to its best-matching MCParticle
48  * mcParticleVector: a vector of best-matching MCParticle corresponding to objectVector
49  * @return: a vector of fraction number, which is the fraction of unassociated hits in all reco hits of PFParticle
50  */
51  //Typenamed for recob::Track and recob::Shower
52  std::vector<double> trackRecoMCmatching(std::vector<art::Ptr<recob::Track>>& objectVector,
53  std::map<art::Ptr<recob::Track>,art::Ptr<simb::MCParticle>>& objectToMCParticleMap,
54  std::map<art::Ptr<recob::Track>,art::Ptr<recob::PFParticle>>& objectToPFParticleMap,
55  std::map<art::Ptr<recob::PFParticle>, std::vector<art::Ptr<recob::Hit>> >& pfParticleToHitsMap,
56  art::FindManyP<simb::MCParticle,anab::BackTrackerHitMatchingData>& mcparticles_per_hit,
57  std::vector<art::Ptr<simb::MCParticle>>& mcParticleVector,
58  var_all& vars
59  );
60 
61 
62  int photoNuclearTesting(std::vector<art::Ptr<simb::MCParticle>>& mcParticleVector);
63 
64 }//namespace end
65 
66 #endif // SBNCODE_SINGLEPHOTONANALYSIS_RECO_TRUTH_MATCHING_H
ClusterModuleLabel join with tracks
std::vector< double > trackRecoMCmatching(std::vector< art::Ptr< recob::Track >> &objectVector, std::map< art::Ptr< recob::Track >, art::Ptr< simb::MCParticle >> &objectToMCParticleMap, std::map< art::Ptr< recob::Track >, art::Ptr< recob::PFParticle >> &objectToPFParticleMap, std::map< art::Ptr< recob::PFParticle >, std::vector< art::Ptr< recob::Hit >> > &pfParticleToHitsMap, art::FindManyP< simb::MCParticle, anab::BackTrackerHitMatchingData > &mcparticles_per_hit, std::vector< art::Ptr< simb::MCParticle >> &mcParticleVector, var_all &vars)
void RecoMCTracks(std::vector< PandoraPFParticle > all_PPFPs, const std::vector< art::Ptr< recob::Track >> &tracks, std::map< art::Ptr< recob::Track >, art::Ptr< simb::MCParticle > > &trackToMCParticleMap, std::map< art::Ptr< simb::MCParticle >, art::Ptr< simb::MCTruth >> &MCParticleToMCTruthMap, std::vector< art::Ptr< simb::MCParticle >> &mcParticleVector, std::map< int, art::Ptr< simb::MCParticle > > &MCParticleToTrackIdMap, std::vector< double > &vfrac, var_all &vars)
void showerRecoMCmatching(std::vector< PandoraPFParticle > all_PPFPs, std::vector< art::Ptr< recob::Shower >> &showerVector, std::map< art::Ptr< recob::Shower >, art::Ptr< simb::MCParticle >> &showerToMCParticleMap, art::FindManyP< simb::MCParticle, anab::BackTrackerHitMatchingData > &mcparticles_per_hit, std::vector< art::Ptr< simb::MCParticle >> &mcParticleVector, std::map< int, art::Ptr< simb::MCParticle > > &MCParticleToTrackIdMap, var_all &vars)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
int photoNuclearTesting(std::vector< art::Ptr< simb::MCParticle >> &mcParticleVector)
Provides recob::Track data product.