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 
15 #include "fhiclcpp/ParameterSet.h"
17 
18 namespace reco_tool {
20  public:
21  virtual ~ICandidateHitFinder() noexcept = default;
22 
23  // Define a structure to contain hits
24  struct HitCandidate {
25  size_t startTick;
26  size_t stopTick;
27  size_t maxTick;
28  size_t minTick;
31  float hitCenter;
32  float hitSigma;
33  float hitHeight;
34  };
35 
36  using HitCandidateVec = std::vector<HitCandidate>;
37  using MergeHitCandidateVec = std::vector<HitCandidateVec>;
38 
39  using Waveform = std::vector<float>;
40 
41  // Search for candidate hits on the input waveform
42  virtual void findHitCandidates(
43  const recob::Wire::RegionsOfInterest_t::datarange_t&, // Waveform (with range info) to analyze
44  const size_t, // waveform start tick
45  const size_t, // channel #
46  const size_t, // Event count (for histograms)
47  HitCandidateVec&) const = 0; // output candidate hits
48 
49  virtual void MergeHitCandidates(const recob::Wire::RegionsOfInterest_t::datarange_t&,
50  const HitCandidateVec&,
51  MergeHitCandidateVec&) const = 0;
52  };
53 }
54 
55 #endif
virtual void MergeHitCandidates(const recob::Wire::RegionsOfInterest_t::datarange_t &, const HitCandidateVec &, MergeHitCandidateVec &) const =0
virtual ~ICandidateHitFinder() noexcept=default
virtual void findHitCandidates(const recob::Wire::RegionsOfInterest_t::datarange_t &, const size_t, const size_t, const size_t, HitCandidateVec &) const =0
Declaration of basic channel signal object.
std::vector< HitCandidateVec > MergeHitCandidateVec
std::vector< HitCandidate > HitCandidateVec