27 const std::string name)
34 int method = pset.
get<
int>(
"Method");
36 if (method < 0 || method >
kBOTH)
55 for (
auto& v : mean_v)
57 for (
auto& v : sigma_v)
63 for (
auto& v : mean_v)
65 for (
auto& v : sigma_v)
74 ped_mean = ped_mean_head;
75 ped_sigma = ped_sigma_head;
76 if (ped_sigma_tail < ped_sigma) {
77 ped_mean = ped_mean_tail;
78 ped_sigma = ped_sigma_tail;
80 for (
auto& v : mean_v)
82 for (
auto& v : sigma_v)
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.
T get(std::string const &key) const
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...