11 #include "fhiclcpp/types/Atom.h"
12 #include "art/Utilities/ToolMacros.h"
13 #include "art/Utilities/ToolConfigTable.h"
39 bool _positive)
const override;
48 : fPeakRatio { config().PeakRatio() }
54 bool _positive)
const{
57 std::vector<double> wf_aux (ped_pulse);
59 for(
size_t ix=0; ix<wf_aux.size(); ix++){
60 wf_aux[ix]=((double)wf_pulse[ix])-wf_aux[ix];
64 for(
size_t ix=0; ix<wf_aux.size(); ix++){
65 wf_aux[ix]=wf_aux[ix]-((double)wf_pulse[ix]);
69 auto it_max = max_element(wf_aux.begin(), wf_aux.end());
70 size_t rise = std::lower_bound( wf_aux.begin(), it_max,
fPeakRatio*(*it_max) ) - wf_aux.begin();
double RiseTime(const pmtana::Waveform_t &wf_pulse, const pmtana::PedestalMean_t &ped_pulse, bool _positive) const override
fhicl::Atom< double > PeakRatio
RiseTimeThreshold(art::ToolConfigTable< Config > const &config)
Interfacce class for a tool to calculate the pulse rise time.
std::vector< short > Waveform_t
BEGIN_PROLOG vertical distance to the surface Name
std::vector< double > PedestalMean_t