24 std::unique_ptr<pmtana::RiseTimeCalculatorBase> risetimecalculator,
26 const std::string name)
61 double ped_mean = mean_v.front();
62 double ped_rms = sigma_v.front();
65 auto start_threshold =
72 start_threshold += ped_mean;
73 end_threshold += ped_mean;
77 for (
auto const&
value : wf) {
79 if (!fire && ((
double)
value) >= start_threshold) {
94 if (fire && ((
double)value) < end_threshold) {
101 _pulse.
t_end = counter < wf.size() ? counter : counter - 1;
120 _pulse.
area += ((double)value - (
double)ped_mean);
122 if (
_pulse.
peak < ((
double)value - (double)ped_mean)) {
126 _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.
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
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.
std::unique_ptr< pmtana::RiseTimeCalculatorBase > _risetime_calc_ptr
Tool for rise time calculation.
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.