16#ifndef ROOSTATS_SamplingDistribution
17#define ROOSTATS_SamplingDistribution
33 SamplingDistribution(
const char *
name,
const char *title, std::vector<double>& samplingDist,
const char * varName =
nullptr);
35 std::vector<double>& samplingDist, std::vector<double>& sampleWeights,
const char * varName =
nullptr);
56 double InverseCDF(
double pvalue,
double sigmaVariaton,
double& inverseVariation);
72 double Integral(
double low,
double high,
bool normalize =
true,
bool lowClosed =
true,
bool highClosed =
false)
const;
75 double IntegralAndError(
double & error,
double low,
double high,
bool normalize =
true,
76 bool lowClosed =
true,
bool highClosed =
false)
const;
79 double CDF(
double x)
const;
88 mutable std::vector<double>
fSumW;
#define ClassDefOverride(name, id)
Container class to hold unbinned data.
This class simply holds a sampling distribution of some test statistic.
double Integral(double low, double high, bool normalize=true, bool lowClosed=true, bool highClosed=false) const
numerical integral in these limits
double CDF(double x) const
calculate CDF as a special case of Integral(...) with lower limit equal to -inf
~SamplingDistribution() override
Destructor of SamplingDistribution.
std::vector< double > fSumW2
! Cached vector with sum of the weight used to compute integral error
double InverseCDFInterpolate(double pvalue)
get the inverse of the Cumulative distribution function
const std::vector< double > & GetSampleWeights() const
Get the sampling weights.
Int_t GetSize() const
size of samples
std::vector< double > fSumW
! Cached vector with sum of the weight used to compute integral
SamplingDistribution()
Default constructor for SamplingDistribution.
std::vector< double > fSamplingDist
vector of points for the sampling distribution
double IntegralAndError(double &error, double low, double high, bool normalize=true, bool lowClosed=true, bool highClosed=false) const
numerical integral in these limits including error estimation
double InverseCDF(double pvalue)
get the inverse of the Cumulative distribution function
void Add(const SamplingDistribution *other)
merge two sampling distributions
const TString GetVarName() const
void SortValues() const
internal function to sort values
std::vector< double > fSampleWeights
vector of weights for the samples
const std::vector< double > & GetSamplingDistribution() const
Get test statistics values.
The TNamed class is the base class for all named ROOT classes.
Namespace for the RooStats classes.