AdcThresholdSignalFinder.h
Go to the documentation of this file.
1 // AdcThresholdSignalFinder.h
2 
3 // David Adams
4 // October 2017
5 //
6 // Tool to find and flag signal regions in ADC data.
7 //
8 // For each tick with sample above Threshold and/or below -Threshold, the region
9 // [bin-BinsBefore, bin+binsAfter] is flagged as signal.
10 // An ROI is created for each range of contiguous signals.
11 //
12 // Configuration:
13 // LogLevel - 0=silent, 1=init, 2=each event, >2=more
14 // Threshold - threshold for signal finding
15 // BinsBefore - lower limit for signal range
16 // BinsAfter - upper limit for signal range
17 // FlagPositive - Flag signals above Threshold
18 // FlagNegative - Flag signals below Threshold
19 //
20 // The output results holds:
21 // int nThresholdBins - # bins above threshold
22 
23 #ifndef AdcThresholdSignalFinder_H
24 #define AdcThresholdSignalFinder_H
25 
27 #include <string>
28 #include <vector>
29 
30 // Forward declarations.
31 namespace fhicl {
32  class ParameterSet;
33 }
34 class RunDataTool;
35 class ParFormula;
36 
38 
39 public:
40 
42 
43  DataMap view(const AdcChannelData& acd) const override;
44 
45  DataMap update(AdcChannelData& acd) const override;
46 
47 private:
48 
49  using Name = std::string;
50 
51  // Configuration data.
54  unsigned int m_BinsBefore;
55  unsigned int m_BinsAfter;
58 
59  // Derived data.
61 
62 };
63 
64 #endif
std::string string
Definition: nybbler.cc:12
static constexpr double ps
Definition: Units.h:99