7 #include "fhiclcpp/ParameterSet.h"
13 std::unique_ptr<pmtana::RiseTimeCalculatorBase> risetimecalculator,
14 const std::string
name)
18 _adc_thres = pset.get<
float >(
"ADCThreshold" );
20 _2nd_thres = pset.get<
float >(
"SecondThreshold");
21 _pedestal = pset.get<
float >(
"Pedestal" );
46 bool first_found =
false;
47 bool record_hit =
false;
52 double pedestal = ped_mean.front();
55 threshold += pedestal;
57 pre_threshold += pedestal;
61 for (
short const &
value : wf) {
63 if (!fire && (
double(
value) >= pre_threshold)) {
73 if (fire && (
double(
value) < pre_threshold)) {
96 if (!record_hit && (
double(
value) >= threshold)) record_hit =
true;
109 else if (!first_found)
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.
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
bool RecoPulse(const pmtana::Waveform_t &, const pmtana::PedestalMean_t &, const pmtana::PedestalSigma_t &)
AlgoSiPM(const fhicl::ParameterSet &pset, std::unique_ptr< pmtana::RiseTimeCalculatorBase > risetimecalculator=nullptr, const std::string name="AlgoSiPM")
std::vector< short > Waveform_t
std::unique_ptr< pmtana::RiseTimeCalculatorBase > _risetime_calc_ptr
Tool for rise time calculation.
void Reset()
A method to be called event-wise to reset parameters.
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)...