Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunedataprep
dunedataprep
DataPrep
Tool
BaselineDetrend.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////////////////
2
//
3
// Remove trends in baseline fluctuations. This is basically a very low pass
4
// filter removing oscillations at ~1 kHz. The smoothed version of the pedestal
5
// is contructed using LOWESS smoothing algorithm implemented in TSmoothGraph
6
// See docdb DUNE-doc-21111
7
//
8
// Parametres:
9
// LogLevel: controls level of printout
10
//
11
// UseBasicROI: use basic ROI finder (para: Threshold and Pad ticks)
12
// to bypass the signal regions
13
//
14
// Threshold: to bypass signals during smoothing
15
//
16
// Pad ticks: number of ticks around signal candidates
17
//
18
// MinFrac: min number of pedestal samples to build the smoothed representation
19
//
20
// Span: span parameters between 0 ... 1. The larger it is the smoother the
21
// result. The value that works the best (follows baseline variations
22
// at ~1kHz rate) is around 0.04.
23
//
24
//
25
// Written: V. Galymov
26
// April 2020
27
//
28
////////////////////////////////////////////////////////////////////////////////////
29
30
#ifndef __BASELINEDETREND_H__
31
#define __BASELINEDETREND_H__
32
33
// dune interfaces
34
#include "
art/Utilities/ToolMacros.h
"
35
#include "
fhiclcpp/ParameterSet.h
"
36
#include "
dunecore/DuneInterface/Tool/TpcDataTool.h
"
37
38
#include <vector>
39
40
class
TGraphSmooth;
41
class
TGraph;
42
43
//typedef std::vector<float> AdcSignalVector;
44
45
class
BaselineDetrend
:
public
TpcDataTool
46
{
47
48
public
:
49
BaselineDetrend
(
fhicl::ParameterSet
const
&
ps
);
50
~BaselineDetrend
()
override
;
51
52
DataMap
update
(
AdcChannelData
& acd)
const override
;
53
54
private
:
55
int
m_LogLevel
;
56
bool
m_UseBasicROI
;
57
float
m_Thresh
;
58
unsigned
m_Pad
;
59
float
m_MinFrac
;
60
float
m_Span
;
61
62
//
63
// smoother
64
TGraphSmooth *
m_GS
;
65
66
//
67
AdcSignalVector
Smoother
(
const
AdcSignalVector
&
data
,
68
const
std::vector<unsigned> &pedidx )
const
;
69
};
70
71
72
#endif
BaselineDetrend::update
DataMap update(AdcChannelData &acd) const override
Definition:
BaselineDetrend_tool.cc:44
BaselineDetrend::m_LogLevel
int m_LogLevel
Definition:
BaselineDetrend.h:55
BaselineDetrend::m_UseBasicROI
bool m_UseBasicROI
Definition:
BaselineDetrend.h:56
TpcDataTool.h
BaselineDetrend::m_MinFrac
float m_MinFrac
Definition:
BaselineDetrend.h:59
BaselineDetrend::Smoother
AdcSignalVector Smoother(const AdcSignalVector &data, const std::vector< unsigned > &pedidx) const
Definition:
BaselineDetrend_tool.cc:74
AdcChannelData
Definition:
AdcChannelData.h:95
ParameterSet.h
TpcDataTool
Definition:
TpcDataTool.h:17
BaselineDetrend::m_Pad
unsigned m_Pad
Definition:
BaselineDetrend.h:58
BaselineDetrend::~BaselineDetrend
~BaselineDetrend() override
Definition:
BaselineDetrend_tool.cc:39
BaselineDetrend::BaselineDetrend
BaselineDetrend(fhicl::ParameterSet const &ps)
Definition:
BaselineDetrend_tool.cc:18
ToolMacros.h
BaselineDetrend::m_Thresh
float m_Thresh
Definition:
BaselineDetrend.h:57
BaselineDetrend::m_Span
float m_Span
Definition:
BaselineDetrend.h:60
genie::units::ps
static constexpr double ps
Definition:
Units.h:99
BaselineDetrend::m_GS
TGraphSmooth * m_GS
Definition:
BaselineDetrend.h:64
BaselineDetrend
Definition:
BaselineDetrend.h:45
make_THn_beam_input.data
data
Definition:
make_THn_beam_input.py:80
AdcSignalVector
std::vector< AdcSignal > AdcSignalVector
Definition:
AdcTypes.h:22
DataMap
Definition:
DataMap.h:43
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Generated by
1.8.11