PeakFinding.h
Go to the documentation of this file.
1 #ifndef WIRECELLSIGPROC_PEAKFINDING
2 #define WIRECELLSIGPROC_PEAKFINDING
3 
5 #include "WireCellUtil/Logging.h"
6 
7 namespace WireCell{
8  namespace SigProc{
9 
10  class PeakFinding {
11  public:
12  PeakFinding(int fMaxPeaks = 200,
13  double sigma = 1, double threshold = 0.05,
14  bool backgroundRemove = false,int deconIterations =3 ,
15  bool markov = true, int averWindow = 3);
16  ~PeakFinding();
17 
18  int find_peak(Waveform::realseq_t& signal);
19 
20  void Clear();
21 
22  int GetNPeaks(){return npeaks;};
23  double* GetPositionX(){return fPositionX;};
24  double* GetPositionY(){return fPositionY;};
25 
26 
27  private:
28  int fMaxPeaks;
29  double sigma;
30  double threshold;
33  bool markov;
35 
36  // data ...
37  double* source;
38  int ssize;
39 
40  double *destVector;
41  double *fPositionX;
42  double *fPositionY;
43 
44  int npeaks;
45 
46  // actual search function ...
47  int SearchHighRes();
48 
50  };
51  }
52 }
53 #endif
54 
55 // Local Variables:
56 // mode: c++
57 // c-basic-offset: 2
58 // End:
Sequence< real_t > realseq_t
Definition: Waveform.h:31
PeakFinding(int fMaxPeaks=200, double sigma=1, double threshold=0.05, bool backgroundRemove=false, int deconIterations=3, bool markov=true, int averWindow=3)
Definition: PeakFinding.cxx:9
std::shared_ptr< spdlog::logger > logptr_t
Definition: Logging.h:24
Definition: Main.h:22
int find_peak(Waveform::realseq_t &signal)
Definition: PeakFinding.cxx:38