59 double ped_mean = mean_v.front();
60 double ped_rms = sigma_v.front();
68 start_threshold += ped_mean;
69 end_threshold += ped_mean;
73 for(
auto const &
value : wf){
75 if( !fire && ((
double)
value) >= start_threshold ){
91 if( fire && ((
double)value) < end_threshold ){
98 _pulse.
t_end = counter < wf.size() ? counter : counter - 1;
113 _pulse.
area += ((double)value - (
double)ped_mean);
115 if(
_pulse.
peak < ((
double)value - (double)ped_mean)) {
119 _pulse.
peak = ((double)value - (
double)ped_mean);
std::vector< double > PedestalSigma_t
virtual void Reset()
A method to be called event-wise to reset parameters.
pulse_param _pulse
A subject pulse_param object to be filled with the last reconstructed pulse parameters.
AlgoThreshold(const std::string name="AlgoThreshold")
Default constructor.
void Reset()
Implementation of AlgoThreshold::reset() method.
T get(std::string const &key) const
std::vector< short > Waveform_t
bool RecoPulse(const pmtana::Waveform_t &wf, const pmtana::PedestalMean_t &mean_v, const pmtana::PedestalSigma_t &sigma_v)
Implementation of AlgoThreshold::reco() method.
double _nsigma_start
A variable holder for a multiplicative factor for the pedestal standard deviation to define the thres...
Class definition file of AlgoThreshold.
std::vector< double > PedestalMean_t
pulse_param_array _pulse_v
A container array of pulse_param struct objects to store (possibly multiple) reconstructed pulse(s)...
double _start_adc_thres
A variable holder for a user-defined absolute ADC threshold value.