An example of using the HypoTestInverterOriginal class
␛[1mRooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby␛[0m
Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
All rights reserved, please read http://roofit.sourceforge.net/license.txt
Target matches upper limit: de-activate interpolation in HypoTestInverterResult
Running for r = 3
Test statistics has been evaluated for data
HybridCalculatorOriginal: run 1000 toy-MC experiments
with test statistics index: 2
....... toy number 0 / 1000
....... toy number 500 / 1000
computed: 0.34252
Running for r = 5
Test statistics has been evaluated for data
HybridCalculatorOriginal: run 1000 toy-MC experiments
with test statistics index: 2
....... toy number 0 / 1000
....... toy number 500 / 1000
computed: 0.0669145
The confidence level at both boundaries are both too large ( 0.34252 and 0.0669145
Run again with other boundaries or larger toy-MC statistics
The computed upper limit is: 5
an estimated error on this upper limit is: 0
void rs801_HypoTestInverterOriginal()
{
HybridCalculatorOriginal myhc(*data, totPdf, bkgPdf, 0, 0);
myhc.SetTestStatistic(2);
myhc.SetNumberOfToys(1000);
myhc.UseNuisance(false);
HypoTestInverterOriginal myInverter(myhc,
r);
myInverter.SetTestSize(0.10);
myInverter.UseCLs(true);
myInverter.RunAutoScan(3., 5, myInverter.Size() / 2, 0.005);
HypoTestInverterResult *results = myInverter.GetInterval();
HypoTestInverterPlot myInverterPlot("myInverterPlot", "", results);
double ulError = results->UpperLimitEstimatedError();
double upperLimit = results->UpperLimit();
std::cout << "The computed upper limit is: " << upperLimit << std::endl;
std::cout << "an estimated error on this upper limit is: " << ulError << std::endl;
}
{
rs801_HypoTestInverterOriginal();
}
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooConstVar represent a constant real-valued object.
RooDataSet is a container class to hold unbinned data.
RooExtendPdf is a wrapper around an existing PDF that adds a parameteric extended likelihood term to ...
RooPolynomial implements a polynomial p.d.f of the form.
RooRealVar represents a fundamental (non-derived) real valued object.
A TGraphErrors is a TGraph with error bars.
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
int main(int argc, char **argv)
Template specialisation used in RooAbsArg:
RooConstVar & RooConst(Double_t val)
Namespace for the RooStats classes.
static constexpr double ns
- Author
- Gregory Schott
Definition in file rs801_HypoTestInverterOriginal.C.