DuneDPhaseRoiBuildingService.h
Go to the documentation of this file.
1 // DuneDPhaseRoiBuildingService.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 // R.Sulej:
33 // - copied from DuneRoiBuildingService.h to substitute signal shaping
34 // service for double-phase;
35 // - added option to look for ROI's in the filtered signal, so one can
36 // remove slow fluctuations of pedestal; this is identical filter as
37 // in the noise removal and one can easyli inspect the filter output
38 // in the event display if it is applied at noise removal step.
39 //
40 #ifndef DuneDPhaseRoiBuildingService_H
41 #define DuneDPhaseRoiBuildingService_H
42 
44 
45 class AdcSuppressService;
46 
48 
49 public:
50 
52 
53  int build(AdcChannelData& data) const;
54 
55  std::ostream& print(std::ostream& out =std::cout, std::string prefix ="") const;
56 
57 private:
59 
60  // Parameters.
62  std::vector< float > m_FltCoeffs;
63 
69 
70 };
71 
73 
74 #endif
AdcSignalVector getLowFreqFiltered(const AdcSignalVector &adc) const
DuneDPhaseRoiBuildingService(fhicl::ParameterSet const &pset, art::ActivityRegistry &)
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
int16_t adc
Definition: CRTFragment.hh:202
unsigned int AdcIndex
Definition: AdcTypes.h:15
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const
std::vector< AdcSignal > AdcSignalVector
Definition: AdcTypes.h:22