10#ifndef ROOSTATS_HypoTestResult
11#define ROOSTATS_HypoTestResult
57 virtual double CLs()
const {
58 double thisCLb =
CLb();
60 std::cout <<
"Error: Cannot compute CLs because CLb = 0. Returning CLs = -1\n";
64 return thisCLsb / thisCLb;
#define ClassDefOverride(name, id)
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooDataSet is a container class to hold unbinned data.
const RooArgSet * get(Int_t index) const override
Return RooArgSet with coordinates of event 'index'.
HypoTestResult is a base class for results from hypothesis tests.
RooDataSet * GetFitInfo() const
RooDataSet * fAltDetailedOutput
void UpdatePValue(const SamplingDistribution *distr, double &pvalue, double &perror, bool pIsRightTail)
updates the pvalue if sufficient data is available
void Print(const Option_t *="") const override
Print out some information about the results Note: use Alt/Null labels for the hypotheses here as the...
void SetAltDetailedOutput(RooDataSet *d)
double fNullPValue
p-value for the null hypothesis (small number means disfavoured)
bool HasTestStatisticData(void) const
double fAlternatePValueError
error of p-value for the alternate hypothesis (small number means disfavoured)
HypoTestResult & operator=(const HypoTestResult &other)
assignment operator
void SetNullDetailedOutput(RooDataSet *d)
virtual double CLsplusb() const
Convert AlternatePValue into a "confidence level".
void SetAllTestStatisticsData(const RooArgList *tsd)
double GetTestStatisticData(void) const
virtual void Append(const HypoTestResult *other)
add values from another HypoTestResult
double NullPValueError() const
The error on the Null p-value.
double CLsError() const
The error on the ratio .
RooDataSet * GetNullDetailedOutput(void) const
virtual double Significance() const
familiar name for the Null p-value in terms of 1-sided Gaussian significance
void SetBackgroundAsAlt(bool l=true)
RooDataSet * fNullDetailedOutput
SamplingDistribution * fAltDistr
void SetAltPValue(double pvalue)
bool GetPValueIsRightTail(void) const
const RooArgList * GetAllTestStatisticsData(void) const
virtual double AlternatePValue() const
Return p-value for alternate hypothesis.
void SetNullDistribution(SamplingDistribution *null)
~HypoTestResult() override
destructor
bool GetBackGroundIsAlt(void) const
double SignificanceError() const
The error on the significance, computed from NullPValueError via error propagation.
virtual double NullPValue() const
Return p-value for null hypothesis.
double CLbError() const
The error on the "confidence level" of the null hypothesis.
void SetTestStatisticData(const double tsd)
double CLsplusbError() const
The error on the "confidence level" of the alternative hypothesis.
void SetAltPValueError(double err)
void SetFitInfo(RooDataSet *d)
double fNullPValueError
error of p-value for the null hypothesis (small number means disfavoured)
double fTestStatisticData
result of the test statistic evaluated on data
void SetAltDistribution(SamplingDistribution *alt)
void SetPValueIsRightTail(bool pr)
RooDataSet * GetAltDetailedOutput(void) const
const RooArgList * fAllTestStatisticsData
for the case of multiple test statistics, holds all the results
SamplingDistribution * GetNullDistribution(void) const
std::unique_ptr< RooDataSet > fFitInfo
virtual double CLs() const
is simply (not a method, but a quantity)
double fAlternatePValue
p-value for the alternate hypothesis (small number means disfavoured)
virtual double CLb() const
Convert NullPValue into a "confidence level".
SamplingDistribution * fNullDistr
void SetNullPValue(double pvalue)
void SetNullPValueError(double err)
SamplingDistribution * GetAltDistribution(void) const
This class simply holds a sampling distribution of some test statistic.
The TNamed class is the base class for all named ROOT classes.
Namespace for the RooStats classes.
double PValueToSignificance(double pvalue)
returns one-sided significance corresponding to a p-value