Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunesim
dunesim
DetSim
Service
Legacy35tZeroSuppressService.h
Go to the documentation of this file.
1
// Legacy35tZeroSuppressService.h
2
//
3
// David Adams
4
// November 2015
5
//
6
// Service wrapper for legacy 35-ton zero suppression.
7
// Code taken from run.cxx in dunetpc v04.29.02.
8
// Parameters:
9
// AdcThreshold - threshold
10
// TickRange - range
11
// SuppressStickyBits - treat sticky bits as below threshold
12
// If a tick I has pedestal-corrected |ADC| > AdcThreshold, ticks
13
// [i-TickRange, i+TickRange] are retained.
14
// If tick I has sticky bits and has pedestal-corrected ADC < 64,
15
// it is treated as though its pedstal-corrected ADC is zero.
16
// If the gap between unsuppressed blocks is less that MinTickGap,
17
// then the bins in that gap are not suppressed. Edges (bins
18
// outside the tick range are treated as unsupressed.
19
20
#ifndef Legacy35tZeroSuppressService_H
21
#define Legacy35tZeroSuppressService_H
22
23
#include "
dunecore/DuneInterface/Service/AdcSuppressService.h
"
24
25
#include <memory>
26
#include <string>
27
#include <iostream>
28
29
namespace
fhicl
{
30
class
ParameterSet;
31
}
32
namespace
art
{
33
class
ActivityRegistry;
34
}
35
36
class
Legacy35tZeroSuppressService
:
public
AdcSuppressService
{
37
38
public
:
39
40
// Ctor from fcl.
41
Legacy35tZeroSuppressService
(
fhicl::ParameterSet
const
& pset,
art::ActivityRegistry
&);
42
43
// Ctor from direct params.
44
Legacy35tZeroSuppressService
(
float
aAdcThreshold,
45
unsigned
int
aTickRange,
46
unsigned
int
aMinTickGap,
47
bool
aSuppressStickyBits);
48
49
// Filter an array of signals. Result is written to keep.
50
int
filter
(
const
AdcCountVector
& sigs,
Channel
chan,
AdcPedestal
ped,
AdcFilterVector
& keep)
const
;
51
52
// Print the configuration.
53
std::ostream& print(std::ostream& out =std::cout,
std::string
prefix
=
""
)
const
;
54
55
56
private
:
57
58
// Parameters.
59
float
m_AdcThreshold
;
60
unsigned
int
m_TickRange
;
61
unsigned
int
m_MinTickGap
;
62
bool
m_SuppressStickyBits
;
63
64
65
};
66
67
DECLARE_ART_SERVICE_INTERFACE_IMPL
(
Legacy35tZeroSuppressService
,
AdcSuppressService
, LEGACY)
68
69
#endif
AdcCountVector
std::vector< AdcCount > AdcCountVector
Definition:
AdcTypes.h:19
AdcSuppressService.h
submit_ppfxjobs.prefix
string prefix
Definition:
submit_ppfxjobs.py:128
string
std::string string
Definition:
nybbler.cc:12
DECLARE_ART_SERVICE_INTERFACE_IMPL
DECLARE_ART_SERVICE_INTERFACE_IMPL(MySharedService, art::test::MyServiceInterface, SHARED) DEFINE_ART_SERVICE_INTERFACE_IMPL(MySharedService
Legacy35tZeroSuppressService::m_TickRange
unsigned int m_TickRange
Definition:
Legacy35tZeroSuppressService.h:60
filter
Framework.
Definition:
ProtoDUNEUnstableHVFilter_module.cc:44
Legacy35tZeroSuppressService::m_AdcThreshold
float m_AdcThreshold
Definition:
Legacy35tZeroSuppressService.h:59
AdcSuppressService::Channel
unsigned int Channel
Definition:
AdcSuppressService.h:31
fhicl
Definition:
InputSourceFactory.h:7
Legacy35tZeroSuppressService
Definition:
Legacy35tZeroSuppressService.h:36
AdcFilterVector
std::vector< bool > AdcFilterVector
Definition:
AdcTypes.h:27
AdcPedestal
float AdcPedestal
Definition:
AdcTypes.h:25
art::ActivityRegistry
Definition:
ActivityRegistry.h:52
Legacy35tZeroSuppressService::m_MinTickGap
unsigned int m_MinTickGap
Definition:
Legacy35tZeroSuppressService.h:61
art
Definition:
BasicOptionsHandler.h:9
AdcSuppressService
Definition:
AdcSuppressService.h:27
Legacy35tZeroSuppressService::m_SuppressStickyBits
bool m_SuppressStickyBits
Definition:
Legacy35tZeroSuppressService.h:62
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Generated by
1.8.11