All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/CrtHitCosmicIdAlg.h
Go to the documentation of this file.
1 #ifndef CRTHITCOSMICIDALG_H_SEEN
2 #define CRTHITCOSMICIDALG_H_SEEN
3 
4 
5 ///////////////////////////////////////////////
6 // CrtHitCosmicIdAlg.h
7 //
8 // Functions for CRTHit match cosmic tagger
9 // T Brooks (tbrooks@fnal.gov), November 2018
10 ///////////////////////////////////////////////
11 
12 // sbndcode
15 
16 // framework
17 #include "art/Framework/Principal/Event.h"
18 #include "fhiclcpp/ParameterSet.h"
19 #include "fhiclcpp/types/Table.h"
20 #include "fhiclcpp/types/Atom.h"
21 #include "core/ProviderManager.hh"
22 
23 // LArSoft
25 
26 // c++
27 #include <vector>
28 
29 
30 namespace ana{
31 
33  public:
34 
35  struct BeamTime {
36  using Name = fhicl::Name;
37  using Comment = fhicl::Comment;
38 
39  fhicl::Atom<double> BeamTimeMin {
40  Name("BeamTimeMin"),
41  Comment("Minimum t0 tagged time cut")
42  };
43 
44  fhicl::Atom<double> BeamTimeMax {
45  Name("BeamTimeMax"),
46  Comment("Maximum t0 tagged time cut")
47  };
48 
49  };
50 
51  struct Config {
52  using Name = fhicl::Name;
53  using Comment = fhicl::Comment;
54 
55  fhicl::Table<sbnd::CRTT0MatchAlg::Config> T0Alg {
56  Name("T0Alg"),
57  Comment("Configuration for CRTHit matching")
58  };
59 
60  fhicl::Table<BeamTime> BeamTimeLimits {
61  Name("BeamTimeLimits"),
62  Comment("Configuration for t0 cut limits")
63  };
64 
65  };
66 
67  CrtHitCosmicIdAlg(const core::ProviderManager &manager, const Config& config);
68 
69  CrtHitCosmicIdAlg(const core::ProviderManager &manager, const fhicl::ParameterSet& pset) :
70  CrtHitCosmicIdAlg(manager, fhicl::Table<Config>(pset, {})()) {}
71 
73 
75 
76  void reconfigure(const core::ProviderManager &manager, const Config& config);
77 
78  // Returns true if matched to CRTHit outside beam time
79  bool CrtHitCosmicId(recob::Track track, std::vector<art::Ptr<recob::Hit>> hits, std::vector<sbn::crt::CRTHit> crtHits);
80 
81  // Getter for matching algorithm
82  sbnd::CRTT0MatchAlg T0Alg() const {return t0Alg;}
83 
84  private:
85 
87  double fBeamTimeMin;
88  double fBeamTimeMax;
89 
90  };
91 
92 }
93 
94 #endif
bool CrtHitCosmicId(recob::Track track, std::vector< art::Ptr< recob::Hit >> hits, std::vector< sbn::crt::CRTHit > crtHits)
process_name use argoneut_mc_hitfinder track
process_name opflashCryoW ana
void reconfigure(const core::ProviderManager &manager, const Config &config)
CrtHitCosmicIdAlg(const core::ProviderManager &manager, const fhicl::ParameterSet &pset)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
Interface to LArSoft services.
BEGIN_PROLOG vertical distance to the surface Name
Provides recob::Track data product.
CrtHitCosmicIdAlg(const core::ProviderManager &manager, 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: