#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... | |
void | PrintInfo () |
Print settings. More... | |
Public Member Functions inherited from pmtana::PMTPedestalBase | |
PMTPedestalBase (std::string name="noname") | |
Default constructor. More... | |
virtual | ~PMTPedestalBase () |
Default destructor. 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... | |
double | Sigma (size_t i) const |
Getter of the pedestal standard deviation. More... | |
const pmtana::PedestalMean_t & | Mean () const |
Getter of the pedestal mean value. 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... | |
Protected Member Functions inherited from pmtana::PMTPedestalBase | |
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 |
int | _num_presample |
number of ADCs to sample before the gap More... | |
int | _num_postsample |
number of ADCs to sample after the gap More... | |
std::ofstream | _csvfile |
A class that calculates pedestal mean & standard deviation (here and elsewhere called as "RMS").
Definition at line 32 of file PedAlgoRmsSlider.h.
pmtana::PedAlgoRmsSlider::PedAlgoRmsSlider | ( | const std::string | name = "PedRmsSlider" | ) |
Default constructor.
Definition at line 19 of file PedAlgoRmsSlider.cxx.
pmtana::PedAlgoRmsSlider::PedAlgoRmsSlider | ( | const fhicl::ParameterSet & | pset, |
const std::string | name = "PedRmsSlider" |
||
) |
Alternative ctor.
Definition at line 27 of file PedAlgoRmsSlider.cxx.
|
private |
Returns the mean of the elements of the vector from start to start+nsample.
Definition at line 62 of file PedAlgoRmsSlider.cxx.
|
private |
Returns the std of the elements of the vector from start to start+nsample.
Definition at line 77 of file PedAlgoRmsSlider.cxx.
|
private |
Checks the sanity of the estimated pedestal, returns false if not sane.
Definition at line 411 of file PedAlgoRmsSlider.cxx.
|
protected |
Method to compute a pedestal of the input waveform using "nsample" ADC samples from "start" index.
Definition at line 96 of file PedAlgoRmsSlider.cxx.
void pmtana::PedAlgoRmsSlider::PrintInfo | ( | ) |
Print settings.
Definition at line 51 of file PedAlgoRmsSlider.cxx.
|
private |
Definition at line 67 of file PedAlgoRmsSlider.h.
|
private |
Max sigma to consider adc as 'sane'.
Definition at line 58 of file PedAlgoRmsSlider.h.
|
private |
If greater than zero saves firsts waveforms with pedestal to csv file.
Definition at line 63 of file PedAlgoRmsSlider.h.
|
private |
number of ADCs to sample after the gap
Definition at line 66 of file PedAlgoRmsSlider.h.
|
private |
number of ADCs to sample before the gap
Definition at line 65 of file PedAlgoRmsSlider.h.
|
private |
Max value of adc to consider adc as 'sane'.
Definition at line 59 of file PedAlgoRmsSlider.h.
|
private |
Min value of adc to consider adc as 'sane'.
Definition at line 60 of file PedAlgoRmsSlider.h.
|
private |
How many samples are used to calculate local rms and mean.
Definition at line 55 of file PedAlgoRmsSlider.h.
|
private |
Threshold applied to local rms to claim a pulse.
Definition at line 56 of file PedAlgoRmsSlider.h.
|
private |
For debugging.
Definition at line 62 of file PedAlgoRmsSlider.h.
|
private |
Definition at line 64 of file PedAlgoRmsSlider.h.