All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ICandidateHitFinder.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////
2 ///
3 /// \file ICandidateHitFinder.h
4 ///
5 /// \brief This provides an interface for tools which are tasked with
6 /// finding candidate hits on input waveforms
7 ///
8 /// \author T. Usher
9 ///
10 ////////////////////////////////////////////////////////////////////////
11 
12 #ifndef ICandidateHitFinder_H
13 #define ICandidateHitFinder_H
14 
16 
17 #include <vector>
18 
19 namespace reco_tool {
21  public:
22  virtual ~ICandidateHitFinder() noexcept = default;
23 
24  // Define a structure to contain hits
25  struct HitCandidate {
26  size_t startTick;
27  size_t stopTick;
28  size_t maxTick;
29  size_t minTick;
32  float hitCenter;
33  float hitSigma;
34  float hitHeight;
35  };
36 
37  using HitCandidateVec = std::vector<HitCandidate>;
38  using MergeHitCandidateVec = std::vector<HitCandidateVec>;
39 
40  using Waveform = std::vector<float>;
41 
42  // Search for candidate hits on the input waveform
43  virtual void findHitCandidates(
44  const recob::Wire::RegionsOfInterest_t::datarange_t&, // Waveform (with range info) to analyze
45  const size_t, // waveform start tick
46  const size_t, // channel #
47  const size_t, // Event count (for histograms)
48  HitCandidateVec&) const = 0; // output candidate hits
49 
50  virtual void MergeHitCandidates(const recob::Wire::RegionsOfInterest_t::datarange_t&,
51  const HitCandidateVec&,
52  MergeHitCandidateVec&) const = 0;
53  };
54 }
55 
56 #endif
virtual void MergeHitCandidates(const recob::Wire::RegionsOfInterest_t::datarange_t &, const HitCandidateVec &, MergeHitCandidateVec &) const =0
virtual void findHitCandidates(const recob::Wire::RegionsOfInterest_t::datarange_t &, const size_t, const size_t, const size_t, HitCandidateVec &) const =0
virtual ~ICandidateHitFinder() noexcept=default
Declaration of basic channel signal object.
std::vector< HitCandidateVec > MergeHitCandidateVec
std::vector< HitCandidate > HitCandidateVec