10#ifndef ROOSTATS_HypoTestResult
11#define ROOSTATS_HypoTestResult
38 if(newname && strlen(newname)) out->SetName(newname);
64 virtual double CLs()
const {
65 double thisCLb =
CLb();
67 std::cout <<
"Error: Cannot compute CLs because CLb = 0. Returning CLs = -1\n";
71 return thisCLsb / thisCLb;
#define ClassDefOverride(name, id)
Storage_t const & get() const
Const access to the underlying stl container.
RooArgList is a container object that can hold multiple RooAbsArg objects.
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
std::unique_ptr< RooDataSet > fNullDetailedOutput
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".
std::unique_ptr< RooDataSet > fAltDetailedOutput
void SetAllTestStatisticsData(const RooArgList *tsd)
TObject * Clone(const char *newname=nullptr) const override
clone method, required since some data members cannot rely on the streamers to copy them
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)
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
std::unique_ptr< const RooArgList > fAllTestStatisticsData
for the case of multiple test statistics, holds all the results
SamplingDistribution * GetNullDistribution(void) const
std::unique_ptr< RooDataSet > fFitInfo
std::unique_ptr< SamplingDistribution > fAltDistr
virtual double CLs() const
is simply (not a method, but a quantity)
double fAlternatePValue
p-value for the alternate hypothesis (small number means disfavoured)
std::unique_ptr< SamplingDistribution > fNullDistr
virtual double CLb() const
Convert NullPValue into a "confidence level".
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.
Mother of all ROOT objects.
Namespace for the RooStats classes.
double PValueToSignificance(double pvalue)
returns one-sided significance corresponding to a p-value