AdcMultiThreshSignalFinder.h
Go to the documentation of this file.
1 // AdcMultiThreshSignalFinder.h
2 //
3 // Tool to find signals and build ROI's with respect to pedestal
4 // subtracted baseline. This is a more basic version of the algorithm
5 // developed by Christoph Alt for the 3x1x1 dual-phase TPC detector
6 //
7 //
8 // Configuration:
9 // LogLevel - 0=silent, 1=init, 2=each event, >2=more
10 // UseStandardDevidation - true/false to define thresholds wrt pedestal RMS
11 // Threshold1 - 1st threshold to seed ROI (in ADC or units of ped RMS)
12 // SamplesAboveThreshold1 - min number of continuous samples to be above 1st threshold
13 // Threshold2 - 2nd threshold to refine ROI search (in ADC or units of ped RMS)
14 // SamplesAboveThreshold2 - min number of continuous samples to be above 2nd threshold
15 // ThresholdMax - threshold for which max value in seeded ROI
16 // ThresholdMin - minimum value to which expand found ROIs
17 // BinsBefore - number of time bins to pad found ROI on the left
18 // BinsAfter - number of time bins to pad found ROI on the right
19 //
20 
21 
22 #ifndef AdcMultiThreshSignalFinder_H
23 #define AdcMultiThreshSignalFinder_H
24 
26 #include "fhiclcpp/ParameterSet.h"
29 
31 
32 public:
33 
35 
36  ~AdcMultiThreshSignalFinder() override;
37 
38  // Build ROIs
39  DataMap update(AdcChannelData& acd) const override;
40 
41 private:
42 
43  // Parameters.
45  bool m_UseStd;
54 
55  //
56  typedef struct
57  {
58  bool isRoi;
65 
66  void init()
67  {
68  isRoi = false;
69  StartRoi = 0;
70  EndRoi = 0;
71  NsaTh1 = 0;
72  NsaTh2 = 0;
73  NsaTh3 = 0;
74  MaxValue = 0;
75  }
76 
78 };
79 
80 
81 #endif
float AdcSignal
Definition: AdcTypes.h:21
DataMap update(AdcChannelData &acd) const override
static constexpr double ps
Definition: Units.h:99
unsigned int AdcIndex
Definition: AdcTypes.h:15
AdcMultiThreshSignalFinder(fhicl::ParameterSet const &ps)