LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
UtilFunc.h
Go to the documentation of this file.
1 #ifndef larana_OPTICALDETECTOR_UTILFUNC_H
2 #define larana_OPTICALDETECTOR_UTILFUNC_H
3 
4 #include "OpticalRecoTypes.h"
5 
6 #include <cstddef>
7 #include <vector>
8 
9 namespace pmtana {
10 
11  double mean(const std::vector<short>& wf, size_t start = 0, size_t nsample = 0);
12 
13  double edge_aware_mean(const std::vector<short>& wf, int start, int end);
14 
15  double std(const std::vector<short>& wf,
16  const double ped_mean,
17  size_t start = 0,
18  size_t nsample = 0);
19 
20  double BinnedMaxOccurrence(const PedestalMean_t& mean_v, const size_t nbins);
21 
22  double BinnedMaxTH1D(const std::vector<double>& v, int bins);
23 
24  int sign(double val);
25 
26 }
27 
28 #endif
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Definition: UtilFunc.cxx:43
double BinnedMaxOccurrence(const PedestalMean_t &mean_v, const size_t nbins)
Definition: UtilFunc.cxx:60
double edge_aware_mean(const std::vector< short > &wf, int start, int end)
Definition: UtilFunc.cxx:25
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77
int sign(double val)
Definition: UtilFunc.cxx:104
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
Definition: UtilFunc.cxx:13
std::vector< double > PedestalMean_t
double BinnedMaxTH1D(const std::vector< double > &v, int bins)
Definition: UtilFunc.cxx:112