LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "PMTPulseRecoBase.h"
Public Member Functions | |
PMTPulseRecoBase (const std::string name="noname") | |
Default constructor with fhicl parameters. More... | |
virtual | ~PMTPulseRecoBase () |
Default destructor. More... | |
const std::string & | Name () const |
Name getter. More... | |
const bool | Status () const |
Status getter. More... | |
virtual void | Reset () |
A method to be called event-wise to reset parameters. 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 | |
virtual bool | RecoPulse (const pmtana::Waveform_t &, const pmtana::PedestalMean_t &, const pmtana::PedestalSigma_t &)=0 |
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 | |
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... | |
Private Attributes | |
std::string | _name |
Unique name. More... | |
bool | _status |
Status after pulse reconstruction. More... | |
The base class of pulse reconstruction algorithms. All algorithms should inherit from this calss to be executed by a manager class, pulse_reco. Note that this class does not depend on the rest of the framework except for the use of constants. In order to reconstruct a pulse, all it requires is a std::vector<short> type object (i.e. raw waveform), waveform pedestal, and its standard deviation. All of these are to be provided by an executer. Reconstructed pulse parameters are stored in the pulse_param struct object.
All methods specified as "virtual" should be implemented by the inherit children class.
This class provides some basic std::vector calculation algorithms such as integral, derivative, max and min algorithms. Inherit children classes are encouraged to use these provided methods when possible.
Definition at line 70 of file PMTPulseRecoBase.h.
pmtana::PMTPulseRecoBase::PMTPulseRecoBase | ( | const std::string | name = "noname" | ) |
Default constructor with fhicl parameters.
Definition at line 15 of file PMTPulseRecoBase.cxx.
References Reset().
|
virtual |
|
protected |
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().
|
inline |
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().
const pulse_param & pmtana::PMTPulseRecoBase::GetPulse | ( | size_t | index = 0 | ) | const |
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 _pulse_v.
Referenced by opdet::LEDCalibrationAna::analyze().
const pulse_param_array & pmtana::PMTPulseRecoBase::GetPulses | ( | ) | const |
A getter for the whole array of pulse_param struct object.
Definition at line 92 of file PMTPulseRecoBase.cxx.
References _pulse_v.
Referenced by opdet::RunHitFinder().
|
protected |
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().
|
protected |
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().
|
protected |
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().
const std::string & pmtana::PMTPulseRecoBase::Name | ( | ) | const |
bool pmtana::PMTPulseRecoBase::Reconstruct | ( | const pmtana::Waveform_t & | wf, |
const pmtana::PedestalMean_t & | mean_v, | ||
const pmtana::PedestalSigma_t & | sigma_v | ||
) |
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 _status, and RecoPulse().
|
protectedpure virtual |
Implemented in pmtana::AlgoFixedWindow, pmtana::AlgoThreshold, pmtana::AlgoCFD, pmtana::AlgoSlidingWindow, and pmtana::AlgoSiPM.
Referenced by Reconstruct().
|
virtual |
A method to be called event-wise to reset parameters.
Reimplemented in pmtana::AlgoFixedWindow, pmtana::AlgoThreshold, pmtana::AlgoCFD, pmtana::AlgoSlidingWindow, and pmtana::AlgoSiPM.
Definition at line 62 of file PMTPulseRecoBase.cxx.
References _pulse, _pulse_v, and pmtana::pulse_param::reset_param().
Referenced by PMTPulseRecoBase(), pmtana::AlgoSiPM::Reset(), pmtana::AlgoCFD::Reset(), pmtana::AlgoSlidingWindow::Reset(), and pmtana::AlgoThreshold::Reset().
const bool pmtana::PMTPulseRecoBase::Status | ( | ) | const |
Status getter.
Definition at line 26 of file PMTPulseRecoBase.cxx.
References _status.
|
private |
|
protected |
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(), pmtana::AlgoSlidingWindow::RecoPulse(), pmtana::AlgoCFD::RecoPulse(), pmtana::AlgoThreshold::RecoPulse(), pmtana::AlgoFixedWindow::Reset(), and Reset().
|
protected |
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 GetPulse(), GetPulses(), pmtana::AlgoSiPM::RecoPulse(), pmtana::AlgoCFD::RecoPulse(), pmtana::AlgoSlidingWindow::RecoPulse(), pmtana::AlgoFixedWindow::RecoPulse(), pmtana::AlgoThreshold::RecoPulse(), pmtana::AlgoFixedWindow::Reset(), and Reset().
|
private |
Status after pulse reconstruction.
Definition at line 114 of file PMTPulseRecoBase.h.
Referenced by Reconstruct(), and Status().