All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PandoraNuScoreCosmicIdAlg.h
Go to the documentation of this file.
1 #ifndef PANDORANUSCORECOSMICIDALG_H_SEEN
2 #define PANDORANUSCORECOSMICIDALG_H_SEEN
3 
4 
5 ///////////////////////////////////////////////
6 // PandoraNuScoreCosmicIdAlg.h
7 //
8 // Alg to check pandora pfparticle metadata
9 // to see if it was tagged as a cosmic
10 // Ed Tyley, Jan 2020
11 ///////////////////////////////////////////////
12 
13 // framework
14 #include "art/Framework/Principal/Event.h"
15 #include "fhiclcpp/ParameterSet.h"
16 #include "fhiclcpp/types/Table.h"
17 #include "fhiclcpp/types/Atom.h"
18 #include "art/Framework/Principal/Handle.h"
19 #include "canvas/Persistency/Common/Ptr.h"
20 #include "canvas/Persistency/Common/FindManyP.h"
21 
22 // LArSoft
28 // c++
29 #include <vector>
30 #include <iostream>
31 
32 namespace sbnd{
33 
35  public:
36 
37  struct Config {
38  using Name = fhicl::Name;
39  using Comment = fhicl::Comment;
40 
41  fhicl::Atom<art::InputTag> PandoraLabel {
42  Name("PandoraLabel"),
43  Comment("")
44  };
45 
46  fhicl::Atom<art::InputTag> TpcTrackModuleLabel {
47  Name("TpcTrackModuleLabel"),
48  Comment("")
49  };
50 
51  fhicl::Atom<float> NuScoreCut {
52  Name("NuScoreCut"),
53  Comment("")
54  };
55 
56  };
57 
58  PandoraNuScoreCosmicIdAlg(const Config& config);
59 
60  PandoraNuScoreCosmicIdAlg(const fhicl::ParameterSet& pset) :
61  PandoraNuScoreCosmicIdAlg(fhicl::Table<Config>(pset, {})()) {}
62 
64 
66 
67  void reconfigure(const Config& config);
68 
69  // Finds any t0s associated with track by pandora, tags if outside beam
70  bool PandoraNuScoreCosmicId(recob::Track track, const art::Event& event);
71 
72  // Finds any t0s associated with pfparticle by pandora, tags if outside beam
73  bool PandoraNuScoreCosmicId(recob::PFParticle pfparticle, std::map< size_t, art::Ptr<recob::PFParticle> > pfParticleMap, const art::Event& event);
74 
75  recob::PFParticle GetPFPNeutrino(recob::PFParticle pfparticle, std::map< size_t, art::Ptr<recob::PFParticle> >& pfParticleMap);
76 
77  recob::PFParticle GetPFPNeutrino(recob::PFParticle pfp, const std::vector<recob::PFParticle>& pfpVec);
78 
79  float GetPandoraNuScore(recob::PFParticle pfparticle,
80  art::FindManyP<larpandoraobj::PFParticleMetadata> PFPMetaDataAssoc);
81 
82  private:
83 
84  art::InputTag fPandoraLabel;
85  art::InputTag fTpcTrackModuleLabel;
86  float fNuScoreCut;
87 
88  };
89 
90 }
91 
92 #endif
Declaration of signal hit object.
void reconfigure(const Config &config)
process_name use argoneut_mc_hitfinder track
recob::PFParticle GetPFPNeutrino(recob::PFParticle pfparticle, std::map< size_t, art::Ptr< recob::PFParticle > > &pfParticleMap)
float GetPandoraNuScore(recob::PFParticle pfparticle, art::FindManyP< larpandoraobj::PFParticleMetadata > PFPMetaDataAssoc)
BEGIN_PROLOG vertical distance to the surface Name
Provides recob::Track data product.
Hierarchical representation of particle flow.
Definition: PFParticle.h:44
PandoraNuScoreCosmicIdAlg(const fhicl::ParameterSet &pset)
bool PandoraNuScoreCosmicId(recob::Track track, const art::Event &event)
stream1 can override from command line with o or output services user sbnd
fhicl::Atom< art::InputTag > TpcTrackModuleLabel
PandoraNuScoreCosmicIdAlg(const Config &config)
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track: