Estimate the uncertainty of the light-collection efficiency with the bootstrap method. More...
#include <Bootstrapper.h>
Public Member Functions | |
Bootstrapper (const std::list< utl::TabulatedFunctionErrors > &data, const int verbosity=0) | |
const utl::TabulatedFunctionErrors & | GetMean () |
int | GetVerbosity () |
bool | MaxRelUncertaintyBelowThreshold (const double relUncertaintyThreshold, const double absValueThreshold=0.) |
void | SetVerbosity (const int verbosity) |
~Bootstrapper () | |
Private Types | |
enum | VarianceEstimator { eSampleVariance = 0, eSampleVarianceWeighted, eMedianAbsoluteDeviation } |
Private Member Functions | |
void | Bootstrap () |
double | Mean (const std::vector< double > &samples) |
std::pair< double, double > | MeanWithUncertainty (const std::vector< double > &samples, const std::vector< double > &uncertainties, const VarianceEstimator est=eSampleVariance) |
double | Median (const std::vector< double > &sortedSamples) |
double | MedianAbsoluteDeviation (const std::vector< double > &samples, const double mean) |
double | SampleVariance (const std::vector< double > &samples, const double mean) |
double | WeightedMean (const std::vector< double > &samples, const std::vector< double > &uncertainties) |
double | WeightedSampleVariance (const std::vector< double > &samples, const std::vector< double > &uncertainties, const double mean) |
Private Attributes | |
const std::list < utl::TabulatedFunctionErrors > & | fData |
utl::TabulatedFunctionErrors | fMean |
int | fVerbosity |
global verbosity flag More... | |
Estimate the uncertainty of the light-collection efficiency with the bootstrap method.
Definition at line 29 of file Bootstrapper.h.
Enumerator | |
---|---|
eSampleVariance | |
eSampleVarianceWeighted | |
eMedianAbsoluteDeviation |
Definition at line 44 of file Bootstrapper.h.
Bootstrapper::Bootstrapper | ( | const std::list< utl::TabulatedFunctionErrors > & | data, |
const int | verbosity = 0 |
||
) |
Definition at line 33 of file Bootstrapper.cc.
References Bootstrap().
|
inline |
Definition at line 33 of file Bootstrapper.h.
|
private |
Definition at line 42 of file Bootstrapper.cc.
References utl::TabulatedFunctionErrors::Clear(), eSampleVarianceWeighted, fData, fMean, utl::TabulatedFunction::GetNPoints(), utl::TabulatedFunction::GetX(), utl::TabulatedFunction::GetY(), utl::TabulatedFunctionErrors::GetYErr(), INFO, MeanWithUncertainty(), and utl::TabulatedFunctionErrors::PushBack().
Referenced by Bootstrapper().
|
inline |
Definition at line 35 of file Bootstrapper.h.
References fMean.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
inline |
Definition at line 39 of file Bootstrapper.h.
References fVerbosity.
bool Bootstrapper::MaxRelUncertaintyBelowThreshold | ( | const double | relUncertaintyThreshold, |
const double | absValueThreshold = 0. |
||
) |
Definition at line 105 of file Bootstrapper.cc.
References fMean, fVerbosity, utl::TabulatedFunction::GetNPoints(), utl::TabulatedFunction::GetY(), utl::TabulatedFunctionErrors::GetYErr(), and INFO.
Referenced by FdLightCollectionEfficiencyKG::FdLightCollectionEfficiency::RunPhotonGenerationRayTracingLoop().
|
private |
Definition at line 165 of file Bootstrapper.cc.
Referenced by MeanWithUncertainty().
|
private |
Definition at line 132 of file Bootstrapper.cc.
References eMedianAbsoluteDeviation, eSampleVariance, eSampleVarianceWeighted, Mean(), MedianAbsoluteDeviation(), SampleVariance(), sqrt(), WeightedMean(), and WeightedSampleVariance().
Referenced by Bootstrap().
|
private |
Definition at line 237 of file Bootstrapper.cc.
Referenced by MedianAbsoluteDeviation().
|
private |
Definition at line 253 of file Bootstrapper.cc.
References Median().
Referenced by MeanWithUncertainty().
|
private |
Definition at line 199 of file Bootstrapper.cc.
References std::pow().
Referenced by MeanWithUncertainty().
|
inline |
Definition at line 38 of file Bootstrapper.h.
References fVerbosity.
|
private |
Definition at line 179 of file Bootstrapper.cc.
Referenced by MeanWithUncertainty().
|
private |
Definition at line 213 of file Bootstrapper.cc.
References std::pow().
Referenced by MeanWithUncertainty().
|
private |
Definition at line 63 of file Bootstrapper.h.
Referenced by Bootstrap().
|
private |
Definition at line 67 of file Bootstrapper.h.
Referenced by Bootstrap(), GetMean(), and MaxRelUncertaintyBelowThreshold().
|
private |
global verbosity flag
Definition at line 65 of file Bootstrapper.h.
Referenced by GetVerbosity(), MaxRelUncertaintyBelowThreshold(), and SetVerbosity().