7 #ifndef larana_OPTICALDETECTOR_PEDALGOEDGES_CXX 8 #define larana_OPTICALDETECTOR_PEDALGOEDGES_CXX 29 const std::string name)
36 int method = pset.
get<
int > (
"Method" );
62 for(
auto &v : mean_v ) v = ped_mean;
63 for(
auto &v : sigma_v ) v = ped_sigma;
68 for(
auto &v : mean_v ) v = ped_mean;
69 for(
auto &v : sigma_v ) v = ped_sigma;
77 ped_mean = ped_mean_head;
78 ped_sigma = ped_sigma_head;
79 if(ped_sigma_tail < ped_sigma) {
80 ped_mean = ped_mean_tail;
81 ped_sigma = ped_sigma_tail;
83 for(
auto &v : mean_v ) v = ped_mean;
84 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)
virtual ~PedAlgoEdges()
Default destructor.
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...