7 #include "fhiclcpp/ParameterSet.h"
24 std::unique_ptr<pmtana::RiseTimeCalculatorBase> risetimecalculator,
26 const std::string
name)
37 _nsigma_end = pset.get<
double>(
"NSigmaThresholdEnd");
62 double ped_mean = mean_v.front();
63 double ped_rms = sigma_v.front();
71 start_threshold += ped_mean;
72 end_threshold += ped_mean;
76 for(
auto const &
value : wf){
78 if( !fire && ((
double)
value) >= start_threshold ){
94 if( fire && ((
double)value) < end_threshold ){
101 _pulse.
t_end = counter < wf.size() ? counter : counter - 1;
122 _pulse.
area += ((double)value - (
double)ped_mean);
124 if(
_pulse.
peak < ((
double)value - (double)ped_mean)) {
128 _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.
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.