Class containing a waveform baseline value. More...
#include <WaveformBaseline.h>
Public Types | |
using | Baseline_t = float |
Type of baseline value. More... | |
Public Member Functions | |
WaveformBaseline ()=default | |
Constructor: default baseline (0 ). More... | |
WaveformBaseline (Baseline_t baseline) | |
Constructor: sets the baseline. More... | |
Access to the baseline | |
In addition to the direct method ( | |
Baseline_t | baseline () const |
Baseline_t | operator() () const |
Returns the current baseline value. More... | |
Public Attributes | |
Baseline_t | fBaseline {} |
The current value of the baseline. More... | |
Class containing a waveform baseline value.
The baseline is stored as a floating point value, not to lose precision.
This class is a data product wrapper for a simple value, with some usability candies attached.
will print Baseline: 1.2 ADC
.
The following is a more complex example showing baseline subtraction. We assume we are using the type util::quantities::counts
as ADC count type (defined in lardataalg/Utilities/quantities/electronics.h
) for the waveform.
The subtracted
waveform is positive and baseline-subtracted. We use ICARUS utilities to manage the polarity of the waveform (hard-coded negative). Note that the subtraction is less than trivial because of the integral type waveform on top of the floating point baseline. The samples are converted into floating point for the subtraction, then reconverted (rounded) back.
Definition at line 84 of file WaveformBaseline.h.
using icarus::WaveformBaseline::Baseline_t = float |
Type of baseline value.
Definition at line 86 of file WaveformBaseline.h.
|
default |
Constructor: default baseline (0
).
|
inline |
Constructor: sets the baseline.
Definition at line 97 of file WaveformBaseline.h.
|
inline |
Returns the current baseline value.
Definition at line 112 of file WaveformBaseline.h.
|
inline |
Baseline_t icarus::WaveformBaseline::fBaseline {} |
The current value of the baseline.
Definition at line 88 of file WaveformBaseline.h.