All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/CrtTrackCosmicIdAlg.h
Go to the documentation of this file.
1 #ifndef CRTTRACKCOSMICIDALG_H_SEEN
2 #define CRTTRACKCOSMICIDALG_H_SEEN
3 
4 
5 ///////////////////////////////////////////////
6 // CrtTrackCosmicIdAlg.h
7 //
8 // Functions for CRTTrack match cosmic tagger
9 // T Brooks (tbrooks@fnal.gov), November 2018
10 ///////////////////////////////////////////////
11 
12 // sbndcode
15 
16 // framework
17 #include "fhiclcpp/ParameterSet.h"
18 #include "fhiclcpp/types/Table.h"
19 #include "fhiclcpp/types/Atom.h"
20 #include "core/ProviderManager.hh"
21 
22 // LArSoft
24 
25 // c++
26 #include <vector>
27 
28 
29 namespace ana{
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("")
41  };
42 
43  fhicl::Atom<double> BeamTimeMax {
44  Name("BeamTimeMax"),
45  Comment("")
46  };
47 
48  };
49 
50  struct Config {
51  using Name = fhicl::Name;
52  using Comment = fhicl::Comment;
53 
54  fhicl::Table<sbnd::CRTTrackMatchAlg::Config> TrackMatchAlg {
55  Name("TrackMatchAlg"),
56  Comment("")
57  };
58 
59  fhicl::Table<BeamTime> BeamTimeLimits {
60  Name("BeamTimeLimits"),
61  Comment("")
62  };
63 
64  };
65 
66  CrtTrackCosmicIdAlg(const core::ProviderManager &manager, const Config& config);
67 
68  CrtTrackCosmicIdAlg(const core::ProviderManager &manager, const fhicl::ParameterSet& pset) :
69  CrtTrackCosmicIdAlg(manager, fhicl::Table<Config>(pset, {})()) {}
70 
72 
74 
75  void reconfigure(const core::ProviderManager &manager, const Config& config);
76 
77  // Tags track as cosmic if it matches a CRTTrack
78  bool CrtTrackCosmicId(recob::Track track, std::vector<art::Ptr<recob::Hit>> hits, std::vector<sbn::crt::CRTTrack> crtTracks);
79 
80  // Getter for matching algorithm
82 
83  private:
84 
86  double fBeamTimeMin;
87  double fBeamTimeMax;
88 
89  };
90 
91 }
92 
93 #endif
bool CrtTrackCosmicId(recob::Track track, std::vector< art::Ptr< recob::Hit >> hits, std::vector< sbn::crt::CRTTrack > crtTracks)
process_name use argoneut_mc_hitfinder track
process_name opflashCryoW ana
CrtTrackCosmicIdAlg(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.
CrtTrackCosmicIdAlg(const core::ProviderManager &manager, const Config &config)
void reconfigure(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: