LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "AlgoSlidingWindow.h"
Public Member Functions | |
AlgoSlidingWindow (const std::string name="SlidingWindow") | |
Default constructor. More... | |
AlgoSlidingWindow (const fhicl::ParameterSet &pset, const std::string name="SlidingWindow") | |
Alternative ctor. More... | |
virtual | ~AlgoSlidingWindow () |
Default destructor. More... | |
void | Reset () |
Implementation of AlgoSlidingWindow::reset() method. More... | |
const std::string & | Name () const |
Name getter. More... | |
const 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 &, const pmtana::PedestalMean_t &, const pmtana::PedestalSigma_t &) |
Implementation of AlgoSlidingWindow::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 | |
float | _adc_thres |
A variable holder for a user-defined absolute ADC threshold value. More... | |
float | _end_adc_thres |
float | _nsigma |
A variable holder for a multiplicative factor for the pedestal standard deviation to define the threshold. More... | |
float | _end_nsigma |
bool | _verbose |
size_t | _num_presample |
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... | |
This class implements threshold algorithm to AlgoSlidingWindow class.
Definition at line 29 of file AlgoSlidingWindow.h.
pmtana::AlgoSlidingWindow::AlgoSlidingWindow | ( | const std::string | name = "SlidingWindow" | ) |
Default constructor.
Definition at line 15 of file AlgoSlidingWindow.cxx.
pmtana::AlgoSlidingWindow::AlgoSlidingWindow | ( | const fhicl::ParameterSet & | pset, |
const std::string | name = "SlidingWindow" |
||
) |
Alternative ctor.
Definition at line 21 of file AlgoSlidingWindow.cxx.
References _adc_thres, _end_adc_thres, _end_nsigma, _nsigma, _num_presample, _verbose, fhicl::ParameterSet::get(), and Reset().
|
virtual |
|
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 122 of file PMTPulseRecoBase.cxx.
References evd::details::begin(), pmtana::CheckIndex(), and evd::details::end().
|
inlineinherited |
A getter for the number of reconstructed pulses from the input waveform.
Definition at line 106 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 73 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 92 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 99 of file PMTPulseRecoBase.cxx.
References evd::details::begin(), pmtana::CheckIndex(), and evd::details::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 146 of file PMTPulseRecoBase.cxx.
References evd::details::begin(), pmtana::CheckIndex(), and evd::details::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 170 of file PMTPulseRecoBase.cxx.
References evd::details::begin(), pmtana::CheckIndex(), and evd::details::end().
|
inherited |
Name getter.
Definition at line 21 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 AlgoSlidingWindow::reco() method.
Implements pmtana::PMTPulseRecoBase.
Definition at line 57 of file AlgoSlidingWindow.cxx.
References _adc_thres, _end_adc_thres, _end_nsigma, _nsigma, _num_presample, pmtana::PMTPulseRecoBase::_pulse, pmtana::PMTPulseRecoBase::_pulse_v, _verbose, pmtana::pulse_param::area, 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_start, and fhicl::detail::atom::value().
|
virtual |
Implementation of AlgoSlidingWindow::reset() method.
Reimplemented from pmtana::PMTPulseRecoBase.
Definition at line 50 of file AlgoSlidingWindow.cxx.
References pmtana::PMTPulseRecoBase::Reset().
Referenced by AlgoSlidingWindow(), and RecoPulse().
|
inherited |
Status getter.
Definition at line 26 of file PMTPulseRecoBase.cxx.
References pmtana::PMTPulseRecoBase::_status.
|
protected |
A variable holder for a user-defined absolute ADC threshold value.
Definition at line 54 of file AlgoSlidingWindow.h.
Referenced by AlgoSlidingWindow(), and RecoPulse().
|
protected |
Definition at line 54 of file AlgoSlidingWindow.h.
Referenced by AlgoSlidingWindow(), and RecoPulse().
|
protected |
Definition at line 57 of file AlgoSlidingWindow.h.
Referenced by AlgoSlidingWindow(), and RecoPulse().
|
protected |
A variable holder for a multiplicative factor for the pedestal standard deviation to define the threshold.
Definition at line 57 of file AlgoSlidingWindow.h.
Referenced by AlgoSlidingWindow(), and RecoPulse().
|
protected |
Definition at line 59 of file AlgoSlidingWindow.h.
Referenced by AlgoSlidingWindow(), and RecoPulse().
|
protectedinherited |
A subject pulse_param object to be filled with the last reconstructed pulse parameters.
Definition at line 126 of file PMTPulseRecoBase.h.
Referenced by pmtana::AlgoSiPM::RecoPulse(), RecoPulse(), pmtana::AlgoCFD::RecoPulse(), pmtana::AlgoThreshold::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 123 of file PMTPulseRecoBase.h.
Referenced by pmtana::PMTPulseRecoBase::GetPulse(), pmtana::PMTPulseRecoBase::GetPulses(), pmtana::AlgoSiPM::RecoPulse(), pmtana::AlgoCFD::RecoPulse(), RecoPulse(), pmtana::AlgoFixedWindow::RecoPulse(), pmtana::AlgoThreshold::RecoPulse(), pmtana::AlgoFixedWindow::Reset(), and pmtana::PMTPulseRecoBase::Reset().
|
protected |
Definition at line 58 of file AlgoSlidingWindow.h.
Referenced by AlgoSlidingWindow(), and RecoPulse().