LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "AlgoThreshold.h"
Public Member Functions | |
AlgoThreshold (const std::string name="AlgoThreshold") | |
Default constructor. More... | |
AlgoThreshold (const fhicl::ParameterSet &pset, std::unique_ptr< pmtana::RiseTimeCalculatorBase > risetimecalculator=nullptr, const std::string name="AlgoThreshold") | |
Alternative constructor. More... | |
void | Reset () |
Implementation of AlgoThreshold::reset() method. More... | |
const std::string & | Name () const |
Name getter. More... | |
bool | Status () const |
Status getter. More... | |
bool | Reconstruct (const pmtana::Waveform_t &, const pmtana::PedestalMean_t &, const pmtana::PedestalSigma_t &) |
const pulse_param & | GetPulse (size_t index=0) const |
const pulse_param_array & | GetPulses () const |
A getter for the whole array of pulse_param struct object. More... | |
size_t | GetNPulse () const |
A getter for the number of reconstructed pulses from the input waveform. More... | |
Protected Member Functions | |
bool | RecoPulse (const pmtana::Waveform_t &wf, const pmtana::PedestalMean_t &mean_v, const pmtana::PedestalSigma_t &sigma_v) |
Implementation of AlgoThreshold::reco() method. More... | |
bool | Integral (const std::vector< short > &wf, double &result, size_t begin=0, size_t end=0) const |
bool | Derivative (const std::vector< short > &wf, std::vector< int32_t > &diff, size_t begin=0, size_t end=0) const |
size_t | Max (const std::vector< short > &wf, double &result, size_t begin=0, size_t end=0) const |
size_t | Min (const std::vector< short > &wf, double &result, size_t begin=0, size_t end=0) const |
Protected Attributes | |
double | _start_adc_thres |
A variable holder for a user-defined absolute ADC threshold value. More... | |
double | _end_adc_thres |
double | _nsigma_start |
A variable holder for a multiplicative factor for the pedestal standard deviation to define the threshold. More... | |
double | _nsigma_end |
pulse_param_array | _pulse_v |
A container array of pulse_param struct objects to store (possibly multiple) reconstructed pulse(s). More... | |
pulse_param | _pulse |
A subject pulse_param object to be filled with the last reconstructed pulse parameters. More... | |
std::unique_ptr< pmtana::RiseTimeCalculatorBase > | _risetime_calc_ptr = nullptr |
Tool for rise time calculation. More... | |
This class implements threshold algorithm to AlgoThreshold class. The algorithm defines a pulse in user-specified time window. A typical usage is to set the beginning of the window to be 0 (= start of the waveform) and integrate over the time of interest. By default, the ending is set to index=0, in which case it uses the ending index of the input waveform (i.e. full integration).
Definition at line 36 of file AlgoThreshold.h.
pmtana::AlgoThreshold::AlgoThreshold | ( | const std::string | name = "AlgoThreshold" | ) |
Default constructor.
Definition at line 14 of file AlgoThreshold.cxx.
References Reset().
pmtana::AlgoThreshold::AlgoThreshold | ( | const fhicl::ParameterSet & | pset, |
std::unique_ptr< pmtana::RiseTimeCalculatorBase > | risetimecalculator = nullptr , |
||
const std::string | name = "AlgoThreshold" |
||
) |
Alternative constructor.
Definition at line 23 of file AlgoThreshold.cxx.
References _end_adc_thres, _nsigma_end, _nsigma_start, pmtana::PMTPulseRecoBase::_risetime_calc_ptr, _start_adc_thres, fhicl::ParameterSet::get(), and Reset().
|
protectedinherited |
A method to compute derivative, which is a simple subtraction of previous ADC sample from each sample. The result is stored in the input "diff" reference vector which is int32_t type as a derivative could be negative.
Definition at line 121 of file PMTPulseRecoBase.cxx.
References util::begin(), pmtana::CheckIndex(), and util::end().
|
inlineinherited |
A getter for the number of reconstructed pulses from the input waveform.
Definition at line 101 of file PMTPulseRecoBase.h.
Referenced by opdet::LEDCalibrationAna::analyze().
|
inherited |
A getter for the pulse_param struct object. Reconstruction algorithm may have more than one pulse reconstructed from an input waveform. Note you must, accordingly, provide an index key to specify which pulse_param object to be retrieved.
Definition at line 74 of file PMTPulseRecoBase.cxx.
References pmtana::PMTPulseRecoBase::_pulse_v.
Referenced by opdet::LEDCalibrationAna::analyze().
|
inherited |
A getter for the whole array of pulse_param struct object.
Definition at line 91 of file PMTPulseRecoBase.cxx.
References pmtana::PMTPulseRecoBase::_pulse_v.
Referenced by opdet::RunHitFinder().
|
protectedinherited |
A method to integrate an waveform from index "begin" to the "end". The result is filled in "result" reference. If the "end" is default (=0), then "end" is set to the last index of the waveform.
Definition at line 98 of file PMTPulseRecoBase.cxx.
References util::begin(), pmtana::CheckIndex(), and util::end().
Referenced by pmtana::AlgoFixedWindow::RecoPulse().
|
protectedinherited |
A method to return the maximum value of ADC sample within the index from "begin" to "end". If the "end" is default (=0), then "end" is set to the last index of the waveform.
Definition at line 144 of file PMTPulseRecoBase.cxx.
References util::begin(), pmtana::CheckIndex(), and util::end().
Referenced by pmtana::AlgoFixedWindow::RecoPulse().
|
protectedinherited |
A method to return the minimum value of ADC sample within the index from "begin" to "end". If the "end" is default (=0), then "end" is set to the last index of the waveform.
Definition at line 169 of file PMTPulseRecoBase.cxx.
References util::begin(), pmtana::CheckIndex(), and util::end().
|
inherited |
Name getter.
Definition at line 22 of file PMTPulseRecoBase.cxx.
References pmtana::PMTPulseRecoBase::_name.
|
inherited |
A core method: this executes the algorithm and stores reconstructed parameters in the pulse_param struct object.
Definition at line 36 of file PMTPulseRecoBase.cxx.
References pmtana::PMTPulseRecoBase::_status, and pmtana::PMTPulseRecoBase::RecoPulse().
|
protectedvirtual |
Implementation of AlgoThreshold::reco() method.
Implements pmtana::PMTPulseRecoBase.
Definition at line 52 of file AlgoThreshold.cxx.
References _end_adc_thres, _nsigma_end, _nsigma_start, pmtana::PMTPulseRecoBase::_pulse, pmtana::PMTPulseRecoBase::_pulse_v, pmtana::PMTPulseRecoBase::_risetime_calc_ptr, _start_adc_thres, pmtana::pulse_param::area, util::counter(), pmtana::pulse_param::peak, pmtana::pulse_param::ped_mean, pmtana::pulse_param::ped_sigma, Reset(), pmtana::pulse_param::reset_param(), pmtana::pulse_param::t_end, pmtana::pulse_param::t_max, pmtana::pulse_param::t_rise, pmtana::pulse_param::t_start, and value.
|
virtual |
Implementation of AlgoThreshold::reset() method.
Reimplemented from pmtana::PMTPulseRecoBase.
Definition at line 45 of file AlgoThreshold.cxx.
References pmtana::PMTPulseRecoBase::Reset().
Referenced by AlgoThreshold(), and RecoPulse().
|
inherited |
Status getter.
Definition at line 29 of file PMTPulseRecoBase.cxx.
References pmtana::PMTPulseRecoBase::_status.
|
protected |
Definition at line 60 of file AlgoThreshold.h.
Referenced by AlgoThreshold(), and RecoPulse().
|
protected |
Definition at line 65 of file AlgoThreshold.h.
Referenced by AlgoThreshold(), and RecoPulse().
|
protected |
A variable holder for a multiplicative factor for the pedestal standard deviation to define the threshold.
Definition at line 64 of file AlgoThreshold.h.
Referenced by AlgoThreshold(), and RecoPulse().
|
protectedinherited |
A subject pulse_param object to be filled with the last reconstructed pulse parameters.
Definition at line 119 of file PMTPulseRecoBase.h.
Referenced by pmtana::AlgoSiPM::RecoPulse(), pmtana::AlgoSlidingWindow::RecoPulse(), pmtana::AlgoCFD::RecoPulse(), RecoPulse(), pmtana::AlgoFixedWindow::RecoPulse(), pmtana::AlgoFixedWindow::Reset(), and pmtana::PMTPulseRecoBase::Reset().
|
protectedinherited |
A container array of pulse_param struct objects to store (possibly multiple) reconstructed pulse(s).
Definition at line 116 of file PMTPulseRecoBase.h.
Referenced by pmtana::PMTPulseRecoBase::GetPulse(), pmtana::PMTPulseRecoBase::GetPulses(), pmtana::AlgoSiPM::RecoPulse(), pmtana::AlgoSlidingWindow::RecoPulse(), pmtana::AlgoCFD::RecoPulse(), RecoPulse(), pmtana::AlgoFixedWindow::RecoPulse(), pmtana::AlgoFixedWindow::Reset(), and pmtana::PMTPulseRecoBase::Reset().
|
protectedinherited |
Tool for rise time calculation.
Definition at line 122 of file PMTPulseRecoBase.h.
Referenced by pmtana::AlgoCFD::AlgoCFD(), pmtana::AlgoFixedWindow::AlgoFixedWindow(), pmtana::AlgoSiPM::AlgoSiPM(), pmtana::AlgoSlidingWindow::AlgoSlidingWindow(), AlgoThreshold(), pmtana::AlgoSiPM::RecoPulse(), pmtana::AlgoSlidingWindow::RecoPulse(), RecoPulse(), pmtana::AlgoCFD::RecoPulse(), and pmtana::AlgoFixedWindow::RecoPulse().
|
protected |
A variable holder for a user-defined absolute ADC threshold value.
Definition at line 59 of file AlgoThreshold.h.
Referenced by AlgoThreshold(), and RecoPulse().