All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbndcode/sbndcode/CosmicId/Algs/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 
22 // LArSoft
24 
25 // c++
26 #include <vector>
27 
28 
29 namespace sbnd{
30 
32  public:
33 
34  struct BeamTime {
35  using Name = fhicl::Name;
36  using Comment = fhicl::Comment;
37 
38  fhicl::Atom<double> BeamTimeMin {
39  Name("BeamTimeMin"),
40  Comment("Minimum t0 tagged time cut")
41  };
42 
43  fhicl::Atom<double> BeamTimeMax {
44  Name("BeamTimeMax"),
45  Comment("Maximum t0 tagged time cut")
46  };
47 
48  };
49 
50  struct Config {
51  using Name = fhicl::Name;
52  using Comment = fhicl::Comment;
53 
54  fhicl::Table<CRTT0MatchAlg::Config> T0Alg {
55  Name("T0Alg"),
56  Comment("Configuration for CRTHit matching")
57  };
58 
59  fhicl::Table<BeamTime> BeamTimeLimits {
60  Name("BeamTimeLimits"),
61  Comment("Configuration for t0 cut limits")
62  };
63 
64  };
65 
66  CrtHitCosmicIdAlg(const Config& config);
67 
68  CrtHitCosmicIdAlg(const fhicl::ParameterSet& pset) :
69  CrtHitCosmicIdAlg(fhicl::Table<Config>(pset, {})()) {}
70 
72 
74 
75  void reconfigure(const Config& config);
76 
77  // Returns true if matched to CRTHit outside beam time
79  recob::Track track, std::vector<sbn::crt::CRTHit> crtHits, const art::Event& event);
80 
81  // Getter for matching algorithm
82  CRTT0MatchAlg T0Alg() const {return t0Alg;}
83 
84  private:
85 
87  double fBeamTimeMin;
88  double fBeamTimeMax;
89 
90  };
91 
92 }
93 
94 #endif
process_name use argoneut_mc_hitfinder track
BEGIN_PROLOG vertical distance to the surface Name
bool CrtHitCosmicId(detinfo::DetectorPropertiesData const &detProp, recob::Track track, std::vector< sbn::crt::CRTHit > crtHits, const art::Event &event)
Provides recob::Track data product.
stream1 can override from command line with o or output services user sbnd
auto const detProp
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track: