13 #ifndef SBNCODE_SINGLEPHOTONANALYSIS_TRUNCMEAN_H
14 #define SBNCODE_SINGLEPHOTONANALYSIS_TRUNCMEAN_H
36 namespace single_photon
68 std::vector<double>& dq_trunc_v,
const double& nsigma = 1);
83 const size_t& nmax,
const size_t& currentiteration,
85 const double& convergencelimit,
95 double Mean (
const std::vector<double>& v);
96 double Median(
const std::vector<double>& v);
97 double RMS (
const std::vector<double>& v);
109 #endif // SBNCODE_SINGLEPHOTONANALYSIS_TRUNCMEAN_H
static const double kINVALID_FLOAT
void setRadius(const double &rad)
Set the smearing radius over which to take hits for truncated mean computaton.
void CalcTruncMeanProfile(const std::vector< double > &rr_v, const std::vector< double > &dq_v, std::vector< double > &dq_trunc_v, const double &nsigma=1)
Given residual range and dq vectors return truncated local dq. Input vectors are assumed to be match ...
~TruncMean()
Default destructor.
double Mean(const std::vector< double > &v)
double CalcIterativeTruncMean(std::vector< double > v, const size_t &nmin, const size_t &nmax, const size_t ¤titeration, const size_t &lmin, const double &convergencelimit, const double &nsigma, const double &oldmed=kINVALID_FLOAT)
Iteratively calculate the truncated mean of a distribution.
TruncMean()
Default constructor.
double Median(const std::vector< double > &v)
double RMS(const std::vector< double > &v)