LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "PedAlgoRmsSlider.h"
Public Member Functions | |
PedAlgoRmsSlider (const std::string name="PedRmsSlider") | |
Default constructor. More... | |
PedAlgoRmsSlider (const fhicl::ParameterSet &pset, const std::string name="PedRmsSlider") | |
Alternative ctor. More... | |
virtual | ~PedAlgoRmsSlider () |
Default destructor. More... | |
void | PrintInfo () |
Print settings. More... | |
const std::string & | Name () const |
Name getter. More... | |
bool | Evaluate (const pmtana::Waveform_t &wf) |
Method to compute a pedestal. More... | |
double | Mean (size_t i) const |
Getter of the pedestal mean value. More... | |
const pmtana::PedestalMean_t & | Mean () const |
Getter of the pedestal mean value. More... | |
double | Sigma (size_t i) const |
Getter of the pedestal standard deviation. More... | |
const pmtana::PedestalSigma_t & | Sigma () const |
Getter of the pedestal standard deviation. More... | |
Protected Member Functions | |
bool | ComputePedestal (const pmtana::Waveform_t &wf, pmtana::PedestalMean_t &mean_v, pmtana::PedestalSigma_t &sigma_v) |
Method to compute a pedestal of the input waveform using "nsample" ADC samples from "start" index. More... | |
virtual bool | ComputePedestal (const ::pmtana::Waveform_t &wf, pmtana::PedestalMean_t &mean_v, pmtana::PedestalSigma_t &sigma_v)=0 |
Private Member Functions | |
double | CalcMean (const std::vector< double > &wf, size_t start, size_t nsample) |
Returns the mean of the elements of the vector from start to start+nsample. More... | |
double | CalcStd (const std::vector< double > &wf, const double ped_mean, size_t start, size_t nsample) |
Returns the std of the elements of the vector from start to start+nsample. More... | |
bool | CheckSanity (pmtana::PedestalMean_t &mean_v, pmtana::PedestalSigma_t &sigma_v) |
Checks the sanity of the estimated pedestal, returns false if not sane. More... | |
Private Attributes | |
size_t | _sample_size |
How many samples are used to calculate local rms and mean. More... | |
double | _threshold |
Threshold applied to local rms to claim a pulse. More... | |
float | _max_sigma |
Max sigma to consider adc as 'sane'. More... | |
float | _ped_range_max |
Max value of adc to consider adc as 'sane'. More... | |
float | _ped_range_min |
Min value of adc to consider adc as 'sane'. More... | |
bool | _verbose |
For debugging. More... | |
int | _n_wf_to_csvfile |
If greater than zero saves firsts waveforms with pedestal to csv file. More... | |
int | _wf_saved = 0 |
std::ofstream | _csvfile |
A class that calculates pedestal mean & standard deviation (here and elsewhere called as "RMS").
Definition at line 31 of file PedAlgoRmsSlider.h.
pmtana::PedAlgoRmsSlider::PedAlgoRmsSlider | ( | const std::string | name = "PedRmsSlider" | ) |
Default constructor.
Definition at line 21 of file PedAlgoRmsSlider.cxx.
pmtana::PedAlgoRmsSlider::PedAlgoRmsSlider | ( | const fhicl::ParameterSet & | pset, |
const std::string | name = "PedRmsSlider" |
||
) |
Alternative ctor.
Definition at line 29 of file PedAlgoRmsSlider.cxx.
References _csvfile, _max_sigma, _n_wf_to_csvfile, _ped_range_max, _ped_range_min, _sample_size, _threshold, _verbose, and fhicl::ParameterSet::get().
|
virtual |
|
private |
Returns the mean of the elements of the vector from start to start+nsample.
Definition at line 68 of file PedAlgoRmsSlider.cxx.
Referenced by ComputePedestal().
|
private |
Returns the std of the elements of the vector from start to start+nsample.
Definition at line 83 of file PedAlgoRmsSlider.cxx.
Referenced by ComputePedestal().
|
private |
Checks the sanity of the estimated pedestal, returns false if not sane.
Definition at line 341 of file PedAlgoRmsSlider.cxx.
References _max_sigma, _ped_range_max, _verbose, and pmtana::mean().
Referenced by ComputePedestal().
|
protected |
Method to compute a pedestal of the input waveform using "nsample" ADC samples from "start" index.
Definition at line 102 of file PedAlgoRmsSlider.cxx.
References _csvfile, _n_wf_to_csvfile, _sample_size, _threshold, _verbose, _wf_saved, CalcMean(), CalcStd(), CheckSanity(), pmtana::mean(), PrintInfo(), and pmtana::std().
|
protectedpure virtualinherited |
Method to compute pedestal: mean and sigma array should be filled per ADC. The length of each array is guaranteed to be same.
Referenced by pmtana::PMTPedestalBase::Evaluate().
|
inherited |
Method to compute a pedestal.
Definition at line 33 of file PMTPedestalBase.cxx.
References pmtana::PMTPedestalBase::_mean_v, pmtana::PMTPedestalBase::_sigma_v, and pmtana::PMTPedestalBase::ComputePedestal().
Referenced by pmtana::PedAlgoUB::ComputePedestal(), and pmtana::PulseRecoManager::Reconstruct().
|
inherited |
Getter of the pedestal mean value.
Definition at line 53 of file PMTPedestalBase.cxx.
References pmtana::PMTPedestalBase::_mean_v, and ss.
Referenced by pmtana::PedAlgoUB::ComputePedestal(), and pmtana::PulseRecoManager::Reconstruct().
|
inherited |
Getter of the pedestal mean value.
Definition at line 77 of file PMTPedestalBase.cxx.
References pmtana::PMTPedestalBase::_mean_v.
|
inherited |
Name getter.
Definition at line 28 of file PMTPedestalBase.cxx.
References pmtana::PMTPedestalBase::_name.
void pmtana::PedAlgoRmsSlider::PrintInfo | ( | ) |
Print settings.
Definition at line 57 of file PedAlgoRmsSlider.cxx.
References _n_wf_to_csvfile, _sample_size, _threshold, and _verbose.
Referenced by ComputePedestal().
|
inherited |
Getter of the pedestal standard deviation.
Definition at line 65 of file PMTPedestalBase.cxx.
References pmtana::PMTPedestalBase::_sigma_v, and ss.
Referenced by pmtana::PedAlgoUB::ComputePedestal(), and pmtana::PulseRecoManager::Reconstruct().
|
inherited |
Getter of the pedestal standard deviation.
Definition at line 82 of file PMTPedestalBase.cxx.
References pmtana::PMTPedestalBase::_sigma_v.
|
private |
Definition at line 67 of file PedAlgoRmsSlider.h.
Referenced by ComputePedestal(), and PedAlgoRmsSlider().
|
private |
Max sigma to consider adc as 'sane'.
Definition at line 60 of file PedAlgoRmsSlider.h.
Referenced by CheckSanity(), and PedAlgoRmsSlider().
|
private |
If greater than zero saves firsts waveforms with pedestal to csv file.
Definition at line 65 of file PedAlgoRmsSlider.h.
Referenced by ComputePedestal(), PedAlgoRmsSlider(), and PrintInfo().
|
private |
Max value of adc to consider adc as 'sane'.
Definition at line 61 of file PedAlgoRmsSlider.h.
Referenced by CheckSanity(), and PedAlgoRmsSlider().
|
private |
Min value of adc to consider adc as 'sane'.
Definition at line 62 of file PedAlgoRmsSlider.h.
Referenced by PedAlgoRmsSlider().
|
private |
How many samples are used to calculate local rms and mean.
Definition at line 57 of file PedAlgoRmsSlider.h.
Referenced by ComputePedestal(), PedAlgoRmsSlider(), and PrintInfo().
|
private |
Threshold applied to local rms to claim a pulse.
Definition at line 58 of file PedAlgoRmsSlider.h.
Referenced by ComputePedestal(), PedAlgoRmsSlider(), and PrintInfo().
|
private |
For debugging.
Definition at line 64 of file PedAlgoRmsSlider.h.
Referenced by CheckSanity(), ComputePedestal(), PedAlgoRmsSlider(), and PrintInfo().
|
private |
Definition at line 66 of file PedAlgoRmsSlider.h.
Referenced by ComputePedestal().