7 #ifndef ALGOTHRESHOLD_CXX 8 #define ALGOTHRESHOLD_CXX 26 const std::string name)
65 double ped_mean = mean_v.front();
66 double ped_rms = sigma_v.front();
74 start_threshold += ped_mean;
75 end_threshold += ped_mean;
79 for(
auto const &
value : wf){
81 if( !fire && ((
double)
value) >= start_threshold ){
97 if( fire && ((
double)value) < end_threshold ){
104 _pulse.
t_end = counter < wf.size() ? counter : counter - 1;
119 _pulse.
area += ((double)value - (
double)ped_mean);
121 if(
_pulse.
peak < ((
double)value - (double)ped_mean)) {
125 _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.
virtual ~AlgoThreshold()
Default destructor.
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.
std::string value(boost::any const &)
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.