15 #ifndef larana_OPTICALDETECTOR_PEDALGORMSSLIDER_H
16 #define larana_OPTICALDETECTOR_PEDALGORMSSLIDER_H
21 namespace fhicl {
class ParameterSet; }
72 double CalcMean(
const std::vector<double>& wf,
size_t start,
size_t nsample);
75 double CalcStd(
const std::vector<double>& wf,
const double ped_mean,
size_t start,
size_t nsample);
void PrintInfo()
Print settings.
bool CheckSanity(pmtana::PedestalMean_t &mean_v, pmtana::PedestalSigma_t &sigma_v)
Checks the sanity of the estimated pedestal, returns false if not sane.
std::vector< double > PedestalSigma_t
float _ped_range_min
Min value of adc to consider adc as 'sane'.
int _num_postsample
number of ADCs to sample after the gap
float _max_sigma
Max sigma to consider adc as 'sane'.
PedAlgoRmsSlider(const std::string name="PedRmsSlider")
Default constructor.
Class definition file of PMTPedestalBase.
int _num_presample
number of ADCs to sample before the gap
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.
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...
double _threshold
Threshold applied to local rms to claim a pulse.
float _ped_range_max
Max value of adc to consider adc as 'sane'.
std::vector< short > Waveform_t
int _n_wf_to_csvfile
If greater than zero saves firsts waveforms with pedestal to csv file.
size_t _sample_size
How many samples are used to calculate local rms and mean.
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.
std::vector< double > PedestalMean_t
bool _verbose
For debugging.