LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
ICandidateHitFinder.h
Go to the documentation of this file.
1 
12 #ifndef ICandidateHitFinder_H
13 #define ICandidateHitFinder_H
14 
15 #include "fhiclcpp/ParameterSet.h"
16 
17 namespace reco_tool
18 {
20  {
21  public:
22  virtual ~ICandidateHitFinder() noexcept = default;
23 
24  // Define standard art tool interface
25  virtual void configure(const fhicl::ParameterSet& pset) = 0;
26 
27  // Define a structure to contain hits
28  using HitCandidate_t = struct HitCandidate
29  {
30  size_t startTick;
31  size_t stopTick;
32  size_t maxTick;
33  size_t minTick;
36  float hitCenter;
37  float hitSigma;
38  float hitHeight;
39  };
40 
41  using HitCandidateVec = std::vector<HitCandidate_t>;
42  using MergeHitCandidateVec = std::vector<HitCandidateVec>;
43 
44  using Waveform = std::vector<float>;
45 
46  // Search for candidate hits on the input waveform
47  virtual void findHitCandidates(const Waveform&, // Waveform to analyze
48  size_t, // waveform start tick
49  size_t, // channel #
50  size_t, // Event count (for histograms)
51  HitCandidateVec&) const = 0; // output candidate hits
52 
53  virtual void MergeHitCandidates(const Waveform&,
54  const HitCandidateVec&,
55  MergeHitCandidateVec&) const = 0;
56  };
57 }
58 
59 #endif
virtual void findHitCandidates(const Waveform &, size_t, size_t, size_t, HitCandidateVec &) const =0
virtual void configure(const fhicl::ParameterSet &pset)=0
std::vector< HitCandidate_t > HitCandidateVec
struct HitCandidate{size_t startTick HitCandidate_t
virtual ~ICandidateHitFinder() noexcept=default
virtual void MergeHitCandidates(const Waveform &, const HitCandidateVec &, MergeHitCandidateVec &) const =0
std::vector< HitCandidateVec > MergeHitCandidateVec