Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunedataprep
dunedataprep
DataPrep
Service
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
43
#include "
dunecore/DuneInterface/Service/AdcRoiBuildingService.h
"
44
45
class
AdcSuppressService
;
46
47
class
DuneDPhaseRoiBuildingService
:
public
AdcRoiBuildingService
{
48
49
public
:
50
51
DuneDPhaseRoiBuildingService
(
fhicl::ParameterSet
const
& pset,
art::ActivityRegistry
&);
52
53
int
build
(
AdcChannelData
&
data
)
const
;
54
55
std::ostream&
print
(std::ostream& out =std::cout,
std::string
prefix
=
""
)
const
;
56
57
private
:
58
AdcSignalVector
getLowFreqFiltered
(
const
AdcSignalVector
&
adc
)
const
;
59
60
// Parameters.
61
bool
m_UseFilter
;
62
std::vector< float >
m_FltCoeffs
;
63
64
int
m_LogLevel
;
65
AdcSignal
m_NSigmaStart
;
66
AdcSignal
m_NSigmaEnd
;
67
AdcIndex
m_PadLow
;
68
AdcIndex
m_PadHigh
;
69
70
};
71
72
DECLARE_ART_SERVICE_INTERFACE_IMPL
(
DuneDPhaseRoiBuildingService
,
AdcRoiBuildingService
, LEGACY)
73
74
#endif
DuneDPhaseRoiBuildingService::getLowFreqFiltered
AdcSignalVector getLowFreqFiltered(const AdcSignalVector &adc) const
Definition:
DuneDPhaseRoiBuildingService_service.cc:123
DuneDPhaseRoiBuildingService::m_PadLow
AdcIndex m_PadLow
Definition:
DuneDPhaseRoiBuildingService.h:67
DuneDPhaseRoiBuildingService::DuneDPhaseRoiBuildingService
DuneDPhaseRoiBuildingService(fhicl::ParameterSet const &pset, art::ActivityRegistry &)
Definition:
DuneDPhaseRoiBuildingService_service.cc:23
AdcRoiBuildingService
Definition:
AdcRoiBuildingService.h:14
submit_ppfxjobs.prefix
string prefix
Definition:
submit_ppfxjobs.py:128
DuneDPhaseRoiBuildingService::m_FltCoeffs
std::vector< float > m_FltCoeffs
Definition:
DuneDPhaseRoiBuildingService.h:62
string
std::string string
Definition:
nybbler.cc:12
AdcSignal
float AdcSignal
Definition:
AdcTypes.h:21
DECLARE_ART_SERVICE_INTERFACE_IMPL
DECLARE_ART_SERVICE_INTERFACE_IMPL(MySharedService, art::test::MyServiceInterface, SHARED) DEFINE_ART_SERVICE_INTERFACE_IMPL(MySharedService
DuneDPhaseRoiBuildingService::m_PadHigh
AdcIndex m_PadHigh
Definition:
DuneDPhaseRoiBuildingService.h:68
adc
int16_t adc
Definition:
CRTFragment.hh:202
AdcChannelData
Definition:
AdcChannelData.h:95
DuneDPhaseRoiBuildingService
Definition:
DuneDPhaseRoiBuildingService.h:47
DuneDPhaseRoiBuildingService::m_NSigmaStart
AdcSignal m_NSigmaStart
Definition:
DuneDPhaseRoiBuildingService.h:65
AdcRoiBuildingService.h
AdcIndex
unsigned int AdcIndex
Definition:
AdcTypes.h:15
DuneDPhaseRoiBuildingService::print
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const
Definition:
DuneDPhaseRoiBuildingService_service.cc:150
make_THn_beam_input.data
data
Definition:
make_THn_beam_input.py:80
DuneDPhaseRoiBuildingService::m_LogLevel
int m_LogLevel
Definition:
DuneDPhaseRoiBuildingService.h:64
DuneDPhaseRoiBuildingService::m_UseFilter
bool m_UseFilter
Definition:
DuneDPhaseRoiBuildingService.h:61
art::ActivityRegistry
Definition:
ActivityRegistry.h:52
AdcSignalVector
std::vector< AdcSignal > AdcSignalVector
Definition:
AdcTypes.h:22
DuneDPhaseRoiBuildingService::build
int build(AdcChannelData &data) const
Definition:
DuneDPhaseRoiBuildingService_service.cc:40
DuneDPhaseRoiBuildingService::m_NSigmaEnd
AdcSignal m_NSigmaEnd
Definition:
DuneDPhaseRoiBuildingService.h:66
AdcSuppressService
Definition:
AdcSuppressService.h:27
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Generated by
1.8.11