11 #include "fhiclcpp/ParameterSet.h"
28 const std::string
name)
35 int method = pset.get<
int > (
"Method" );
56 for(
auto &v : mean_v ) v = ped_mean;
57 for(
auto &v : sigma_v ) v = ped_sigma;
62 for(
auto &v : mean_v ) v = ped_mean;
63 for(
auto &v : sigma_v ) v = ped_sigma;
71 ped_mean = ped_mean_head;
72 ped_sigma = ped_sigma_head;
73 if(ped_sigma_tail < ped_sigma) {
74 ped_mean = ped_mean_tail;
75 ped_sigma = ped_sigma_tail;
77 for(
auto &v : mean_v ) v = ped_mean;
78 for(
auto &v : sigma_v ) v = ped_sigma;
Class def header for exception classes in OpticalDetector package.
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
std::vector< double > PedestalSigma_t
PED_METHOD _method
Methods.
PedAlgoEdges(const std::string name="PedEdges")
Default constructor.
std::vector< short > Waveform_t
PED_METHOD
enum to define algorithm options
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
Calculate both and use the one with smaller RMS.
size_t _nsample_tail
ADC sample in tail to be used
Class definition file of PedAlgoEdges.
size_t _nsample_front
ADC sample in front to be used
std::vector< double > PedestalMean_t
bool ComputePedestal(const pmtana::Waveform_t &wf, pmtana::PedestalMean_t &mean_v, pmtana::PedestalSigma_t &sigma_v)
Method to compute a pedestal of the input waveform using "nsample" ADC samples from "start" index...