66 #define NaN numeric_limits<float>::quiet_NaN()
67 #define IsNaN(a) TMath::IsNaN(a)
71 using namespace RooStats;
79 fNullPValue(
NaN), fAlternatePValue(
NaN),
80 fNullPValueError(0), fAlternatePValueError(0),
81 fTestStatisticData(
NaN),
82 fAllTestStatisticsData(
NULL),
84 fNullDetailedOutput(
NULL), fAltDetailedOutput(
NULL), fFitInfo(
NULL),
85 fPValueIsRightTail(
kTRUE),
95 fNullPValue(nullp), fAlternatePValue(altp),
96 fNullPValueError(0), fAlternatePValueError(0),
97 fTestStatisticData(
NaN),
98 fAllTestStatisticsData(
NULL),
100 fNullDetailedOutput(
NULL), fAltDetailedOutput(
NULL), fFitInfo(
NULL),
101 fPValueIsRightTail(
kTRUE),
111 fNullPValue(
NaN), fAlternatePValue(
NaN),
112 fNullPValueError(0), fAlternatePValueError(0),
113 fTestStatisticData(
NaN),
114 fAllTestStatisticsData(
NULL),
116 fNullDetailedOutput(
NULL), fAltDetailedOutput(
NULL), fFitInfo(
NULL),
117 fPValueIsRightTail( other.GetPValueIsRightTail() ),
118 fBackgroundIsAlt( other.GetBackGroundIsAlt() )
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;
virtual const char * GetTitle() const
Returns title of object.
void SetAltDistribution(SamplingDistribution *alt)
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
Double_t CLbError() const
The error on the "confidence level" of the null 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 fNullPValueError
RooDataSet * GetFitInfo(void) const
const RooArgList * fAllTestStatisticsData
virtual Double_t CLs() const
is simply (not a method, but a quantity)
virtual void SetName(const char *name)
Set the name of the TNamed.
HypoTestResult is a base class for results from hypothesis tests.
HypoTestResult & operator=(const HypoTestResult &other)
assignment operator
RooDataSet * GetNullDetailedOutput(void) const
RooDataSet * fNullDetailedOutput
Double_t SignificanceError() const
The error on the significance, computed from NullPValueError via error propagation.
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
Int_t GetSize() const
size of samples
virtual Double_t CLsplusb() const
Convert AlternatePValue into a "confidence level".
double normal_pdf(double x, double sigma=1, double x0=0)
Probability density function of the normal (Gaussian) distribution.
RooDataSet * GetAltDetailedOutput(void) const
The TNamed class is the base class for all named ROOT classes.
void Print(const Option_t *="") const
Print out some information about the results Note: use Alt/Null labels for the hypotheses here as the...
double pow(double, double)
Double_t fTestStatisticData
Double_t getVal(const RooArgSet *set=0) const
virtual Double_t NullPValue() const
Return p-value for null hypothesis.
RooRealVar represents a fundamental (non-derived) real valued object.
void SetAllTestStatisticsData(const RooArgList *tsd)
Double_t fAlternatePValue
virtual Double_t CLb() const
Convert NullPValue into a "confidence level".
virtual ~HypoTestResult()
destructor
Double_t NullPValueError() const
The error on the Null p-value.
SamplingDistribution * fAltDistr
Double_t fAlternatePValueError
static Double_t infinity()
Return internal infinity representation.
virtual const char * GetName() const
Returns name of object.
Bool_t fPValueIsRightTail
virtual Double_t Significance() const
familiar name for the Null p-value in terms of 1-sided Gaussian significance
void Add(const SamplingDistribution *other)
merge two sampling distributions
Bool_t HasTestStatisticData(void) const
Bool_t GetPValueIsRightTail(void) const
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
void SetPValueIsRightTail(Bool_t pr)
SamplingDistribution * fNullDistr
RooAbsArg * at(Int_t idx) const
void append(RooDataSet &data)
Add all data points of given data set to this data set.
SamplingDistribution * GetNullDistribution(void) const
RooDataSet * fAltDetailedOutput
Double_t CLsplusbError() const
The error on the "confidence level" of the alternative hypothesis.
Double_t GetTestStatisticData(void) const
Double_t Sqrt(Double_t x)
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
void SetNullDistribution(SamplingDistribution *null)
Double_t CLsError() const
The error on the ratio .
Bool_t GetBackGroundIsAlt(void) const