66 #define NaN numeric_limits<float>::quiet_NaN() 67 #define IsNaN(a) TMath::IsNaN(a) 79 fNullPValue(
NaN), fAlternatePValue(
NaN),
80 fNullPValueError(0), fAlternatePValueError(0),
81 fTestStatisticData(
NaN),
82 fAllTestStatisticsData(NULL),
83 fNullDistr(NULL), fAltDistr(NULL),
84 fNullDetailedOutput(NULL), fAltDetailedOutput(NULL), fFitInfo(NULL),
85 fPValueIsRightTail(
kTRUE),
141 if (
this == &other)
return *
this;
305 if (
CLb() == 0 )
return -1;
343 std::cout << std::endl <<
"Results " <<
GetName() <<
": " << endl;
344 std::cout <<
" - Null p-value = " <<
NullPValue();
346 std::cout << std::endl;
349 std::cout << std::endl;
351 std::cout <<
" - Number of Alt toys: " <<
fAltDistr->
GetSize() << std::endl;
356 std::cout <<
" - CL_b: " <<
CLb();
357 if (fromToys) std::cout <<
" +/- " <<
CLbError();
358 std::cout << std::endl;
359 std::cout <<
" - CL_s+b: " <<
CLsplusb();
361 std::cout << std::endl;
362 std::cout <<
" - CL_s: " <<
CLs();
363 if (fromToys) std::cout <<
" +/- " <<
CLsError();
364 std::cout << std::endl;
Bool_t HasTestStatisticData(void) const
virtual const char * GetName() const
Returns name of object.
void SetAltDistribution(SamplingDistribution *alt)
Double_t fNullPValueError
virtual Double_t CLb() const
Convert NullPValue into a "confidence level".
void Print(const Option_t *="") const
Print out some information about the results Note: use Alt/Null labels for the hypotheses here as the...
RooDataSet * GetAltDetailedOutput(void) const
const RooArgList * fAllTestStatisticsData
RooDataSet * GetFitInfo(void) const
Double_t getVal(const RooArgSet *set=0) const
virtual void SetName(const char *name)
Set the name of the TNamed.
HypoTestResult is a base class for results from hypothesis tests.
Double_t NullPValueError() const
The error on the Null p-value.
HypoTestResult & operator=(const HypoTestResult &other)
assignment operator
RooDataSet * fNullDetailedOutput
void UpdatePValue(const SamplingDistribution *distr, Double_t &pvalue, Double_t &perror, Bool_t pIsRightTail)
updates the pvalue if sufficient data is available
SamplingDistribution * GetAltDistribution(void) const
Double_t CLbError() const
The error on the "confidence level" of the null hypothesis.
double normal_pdf(double x, double sigma=1, double x0=0)
Probability density function of the normal (Gaussian) distribution.
virtual Double_t Significance() const
familiar name for the Null p-value in terms of 1-sided Gaussian significance
Double_t CLsError() const
The error on the ratio .
The TNamed class is the base class for all named ROOT classes.
Bool_t GetPValueIsRightTail(void) const
double pow(double, double)
Double_t fTestStatisticData
RooRealVar represents a fundamental (non-derived) real valued object.
void SetAllTestStatisticsData(const RooArgList *tsd)
Double_t fAlternatePValue
virtual ~HypoTestResult()
destructor
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
RooAbsArg * at(Int_t idx) const
virtual Double_t NullPValue() const
Return p-value for null hypothesis.
Double_t GetTestStatisticData(void) const
SamplingDistribution * fAltDistr
Double_t fAlternatePValueError
static Double_t infinity()
Return internal infinity representation.
Int_t GetSize() const
size of samples
SamplingDistribution * GetNullDistribution(void) const
Bool_t fPValueIsRightTail
void Add(const SamplingDistribution *other)
merge two sampling distributions
RooDataSet is a container class to hold unbinned data.
void SetTestStatisticData(const Double_t tsd)
This class simply holds a sampling distribution of some test statistic.
HypoTestResult(const char *name=0)
default constructor
virtual void Append(const HypoTestResult *other)
add values from another HypoTestResult
virtual Double_t CLs() const
is simply (not a method, but a quantity)
void SetPValueIsRightTail(Bool_t pr)
virtual Double_t CLsplusb() const
Convert AlternatePValue into a "confidence level".
RooDataSet * GetNullDetailedOutput(void) const
Namespace for the RooStats classes.
SamplingDistribution * fNullDistr
void append(RooDataSet &data)
Add all data points of given data set to this data set.
Double_t CLsplusbError() const
The error on the "confidence level" of the alternative hypothesis.
Double_t IntegralAndError(Double_t &error, Double_t low, Double_t high, Bool_t normalize=kTRUE, Bool_t lowClosed=kTRUE, Bool_t highClosed=kFALSE) const
numerical integral in these limits including error estimation
Double_t SignificanceError() const
The error on the significance, computed from NullPValueError via error propagation.
RooDataSet * fAltDetailedOutput
Bool_t GetBackGroundIsAlt(void) const
Double_t Sqrt(Double_t x)
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
void SetNullDistribution(SamplingDistribution *null)
virtual const char * GetTitle() const
Returns title of object.