All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbncode/sbncode/CAFMaker/RecoUtils/RecoUtils.h
Go to the documentation of this file.
1 #ifndef CAFRECOSELECTIONUTILS_H
2 #define CAFRECOSELECTIONUTILS_H
3 
4 
5 ///////////////////////////////////////////////
6 // RecoUtils.h
7 //
8 // A few reco utilities like truth matching
9 // D Brailsford (adapted from work by D Brailsford and M Wallbank), October 2017
10 ///////////////////////////////////////////////
11 
12 // framework
13 #include "art/Framework/Principal/Event.h"
14 #include "fhiclcpp/ParameterSet.h"
15 #include "art/Framework/Principal/Handle.h"
16 #include "art/Framework/Services/Registry/ServiceHandle.h"
17 #include "canvas/Persistency/Common/Ptr.h"
18 #include "canvas/Persistency/Common/PtrVector.h"
19 #include "canvas/Persistency/Common/FindManyP.h"
20 
21 // LArSoft
22 #include "nusimdata/SimulationBase/MCParticle.h"
23 #include "nusimdata/SimulationBase/MCTruth.h"
27 //#include "lardataobj/AnalysisBase/MVAPIDResult.h"
28 //#include "lardataobj/AnalysisBase/ParticleID.h"
32 
33 // c++
34 #include <vector>
35 #include <map>
36 
37 // ROOT
38 #include "TTree.h"
39 
40 namespace CAFRecoUtils{
41 
42  std::vector<std::pair<int, float>> AllTrueParticleIDEnergyMatches(const detinfo::DetectorClocksData &clockData, const std::vector<art::Ptr<recob::Hit> >& hits, bool rollup_unsaved_ids=1);
43  float TotalHitEnergy(const detinfo::DetectorClocksData &clockData, const std::vector<art::Ptr<recob::Hit> >& hits);
44 
45  float TrackPurity(const detinfo::DetectorClocksData &clockData, int mcparticle_id, const std::vector<art::Ptr<recob::Hit>> &reco_track_hits);
46  float TrackCompletion(const detinfo::DetectorClocksData &clockData, int mcparticle_id, const std::vector<art::Ptr<recob::Hit>> &reco_track_hits);
47 
48  int GetShowerPrimary(const int g4ID);
49 }
50 #endif
Declaration of signal hit object.
float TrackPurity(const detinfo::DetectorClocksData &clockData, int mcparticle_id, const std::vector< art::Ptr< recob::Hit >> &reco_track_hits)
std::vector< std::pair< int, float > > AllTrueParticleIDEnergyMatches(const detinfo::DetectorClocksData &clockData, const std::vector< art::Ptr< recob::Hit > > &hits, bool rollup_unsaved_ids=1)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
Provides recob::Track data product.
Contains all timing reference information for the detector.
float TotalHitEnergy(const detinfo::DetectorClocksData &clockData, const std::vector< art::Ptr< recob::Hit > > &hits)
art framework interface to geometry description
float TrackCompletion(const detinfo::DetectorClocksData &clockData, int mcparticle_id, const std::vector< art::Ptr< recob::Hit >> &reco_track_hits)