Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunedataprep
dunedataprep
DataPrep
Tool
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
26
#include "
dunecore/DuneInterface/Tool/TpcDataTool.h
"
27
#include <string>
28
#include <vector>
29
30
// Forward declarations.
31
namespace
fhicl
{
32
class
ParameterSet;
33
}
34
class
RunDataTool
;
35
class
ParFormula
;
36
37
class
AdcThresholdSignalFinder
:
public
TpcDataTool
{
38
39
public
:
40
41
AdcThresholdSignalFinder
(
fhicl::ParameterSet
const
&
ps
);
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.
52
int
m_LogLevel
;
53
ParFormula
*
m_Threshold
;
54
unsigned
int
m_BinsBefore
;
55
unsigned
int
m_BinsAfter
;
56
bool
m_FlagPositive
;
57
bool
m_FlagNegative
;
58
59
// Derived data.
60
RunDataTool
*
m_prdtool
;
61
62
};
63
64
#endif
AdcThresholdSignalFinder::m_LogLevel
int m_LogLevel
Definition:
AdcThresholdSignalFinder.h:52
AdcThresholdSignalFinder
Definition:
AdcThresholdSignalFinder.h:37
AdcThresholdSignalFinder::m_prdtool
RunDataTool * m_prdtool
Definition:
AdcThresholdSignalFinder.h:60
string
std::string string
Definition:
nybbler.cc:12
TpcDataTool.h
AdcThresholdSignalFinder::m_FlagPositive
bool m_FlagPositive
Definition:
AdcThresholdSignalFinder.h:56
AdcChannelData
Definition:
AdcChannelData.h:95
AdcThresholdSignalFinder::m_Threshold
ParFormula * m_Threshold
Definition:
AdcThresholdSignalFinder.h:53
AdcThresholdSignalFinder::m_BinsBefore
unsigned int m_BinsBefore
Definition:
AdcThresholdSignalFinder.h:54
TpcDataTool
Definition:
TpcDataTool.h:17
fhicl
Definition:
InputSourceFactory.h:7
ParFormula
Definition:
ParFormula.h:16
genie::units::ps
static constexpr double ps
Definition:
Units.h:99
AdcThresholdSignalFinder::Name
std::string Name
Definition:
AdcThresholdSignalFinder.h:49
AdcThresholdSignalFinder::m_BinsAfter
unsigned int m_BinsAfter
Definition:
AdcThresholdSignalFinder.h:55
DataMap
Definition:
DataMap.h:43
AdcThresholdSignalFinder::m_FlagNegative
bool m_FlagNegative
Definition:
AdcThresholdSignalFinder.h:57
RunDataTool
Definition:
RunDataTool.h:10
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Generated by
1.8.11