All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/PandoraT0CosmicIdAlg.h
Go to the documentation of this file.
1 #ifndef PANDORAT0COSMICIDALG_H_SEEN
2 #define PANDORAT0COSMICIDALG_H_SEEN
3 
4 
5 ///////////////////////////////////////////////
6 // PandoraT0CosmicIdAlg.h
7 //
8 // Functions for pandora t0 cosmic tagger
9 // Pandora removed these particles anyway
10 // T Brooks (tbrooks@fnal.gov), November 2018
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
27 
28 // c++
29 #include <vector>
30 
31 
32 namespace ana{
33 
35  public:
36 
37  struct BeamTime {
38  using Name = fhicl::Name;
39  using Comment = fhicl::Comment;
40 
41  fhicl::Atom<double> BeamTimeMin {
42  Name("BeamTimeMin"),
43  Comment("")
44  };
45 
46  fhicl::Atom<double> BeamTimeMax {
47  Name("BeamTimeMax"),
48  Comment("")
49  };
50 
51  };
52 
53  struct Config {
54  using Name = fhicl::Name;
55  using Comment = fhicl::Comment;
56 
57  fhicl::Atom<art::InputTag> PandoraLabel {
58  Name("PandoraLabel"),
59  Comment("")
60  };
61 
62  fhicl::Atom<art::InputTag> TpcTrackModuleLabel {
63  Name("TpcTrackModuleLabel"),
64  Comment("")
65  };
66 
67  fhicl::Table<BeamTime> BeamTimeLimits {
68  Name("BeamTimeLimits"),
69  Comment("")
70  };
71 
72  };
73 
74  PandoraT0CosmicIdAlg(const Config& config);
75 
76  PandoraT0CosmicIdAlg(const fhicl::ParameterSet& pset) :
77  PandoraT0CosmicIdAlg(fhicl::Table<Config>(pset, {})()) {}
78 
80 
82 
83  void reconfigure(const Config& config);
84 
85  // Finds any t0s associated with track by pandora, tags if outside beam
86  bool PandoraT0CosmicId(recob::Track track, const art::Event& event);
87 
88  // Finds any t0s associated with pfparticle by pandora, tags if outside beam
89  bool PandoraT0CosmicId(recob::PFParticle pfparticle, std::map< size_t, art::Ptr<recob::PFParticle> > pfParticleMap, const art::Event& event);
90 
91  private:
92 
93  art::InputTag fPandoraLabel;
94  art::InputTag fTpcTrackModuleLabel;
95  double fBeamTimeMin;
96  double fBeamTimeMax;
97 
98  };
99 
100 }
101 
102 #endif
Declaration of signal hit object.
process_name use argoneut_mc_hitfinder track
process_name opflashCryoW ana
BEGIN_PROLOG vertical distance to the surface Name
Provides recob::Track data product.
Hierarchical representation of particle flow.
Definition: PFParticle.h:44
bool PandoraT0CosmicId(recob::Track track, const art::Event &event)
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track: