DuneRoiBuildingService.h
Go to the documentation of this file.
1 // AdcRoiBuildingService.h
2 //
3 // David Adams
4 // June 2016
5 //
6 // Implementation of service to build ROIs in AdcChannelData using
7 // the same algorithm as in the original DUNE 35t module. An unpadded
8 // ROI starts for any signal above NSigmaStart sigma above the noise
9 // and continues until the level falls below NSigmaEnd sigma. The
10 // noise level sigma = sss.GetDeconNoise() where sss is the DUNE
11 // signal shaping service. Note that NSigmaEnd was fixed to 1.0 in
12 // the original code.
13 //
14 // The ROIs are then padded to include PadLow channels below and PadHigh
15 // channels above the unpadded region. Overlapping ROIs are then merged.
16 //
17 // The original code defines the upper value for an unpadded ROI to be one
18 // tick beyond the last tick above threshold unless it extends to the
19 // end of the sample array. Here the upper value is always set to be the
20 // last tick above threshold. one should be able to reproduce the old
21 // behavior by adding one to NSigmaEnd.
22 //
23 // The ROIs are recorded in in data.rois.
24 //
25 // Configuration:
26 // LogLevel - usual log level
27 // NSigmaStart - Level in sigma at which an unpadded signal starts.
28 // NSigmaEnd - Level in sigma at which an unpadded signal ends.
29 // PadLow - Number of ticks to retain before signal above threshold.
30 // PadHigh - Number of ticks to retain after signal above threshold.
31 //
32 #ifndef DuneRoiBuildingService_H
33 #define DuneRoiBuildingService_H
34 
36 
37 class AdcSuppressService;
38 
40 
41 public:
42 
44 
45  int build(AdcChannelData& data) const;
46 
47  std::ostream& print(std::ostream& out =std::cout, std::string prefix ="") const;
48 
49 private:
50 
51  // Parameters.
57 
58 };
59 
61 
62 #endif
int build(AdcChannelData &data) const
std::string string
Definition: nybbler.cc:12
float AdcSignal
Definition: AdcTypes.h:21
DECLARE_ART_SERVICE_INTERFACE_IMPL(MySharedService, art::test::MyServiceInterface, SHARED) DEFINE_ART_SERVICE_INTERFACE_IMPL(MySharedService
DuneRoiBuildingService(fhicl::ParameterSet const &pset, art::ActivityRegistry &)
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const
unsigned int AdcIndex
Definition: AdcTypes.h:15