28void HybridOriginalDemo(
int ntoys = 1000)
42 RooRealVar sig_yield(
"sig_yield",
"", 20, 0, 300);
46 RooRealVar bkg_yield(
"bkg_yield",
"", 40, 0, 300);
47 RooExtendPdf bkg_ext_pdf(
"bkg_ext_pdf",
"", bkg_pdf, bkg_yield);
50 sig_yield.setConstant(
kTRUE);
70 myHybridCalc.SetTestStatistic(1);
73 myHybridCalc.SetNumberOfToys(ntoys);
74 myHybridCalc.UseNuisance(
true);
77 myHybridCalc.SetGenerateBinned(
false);
80 HybridResult *myHybridResult = myHybridCalc.GetHypoTest();
82 if (!myHybridResult) {
83 std::cerr <<
"\nError returned from Hypothesis test" << std::endl;
89 myHybridResult->
GetPlot(
"myHybridPlot",
"Plot of results with HybridCalculatorOriginal", 100);
93 double clsb_data = myHybridResult->
CLsplusb();
94 double clb_data = myHybridResult->
CLb();
95 double cls_data = myHybridResult->
CLs();
96 double data_significance = myHybridResult->
Significance();
100 double mean_sb_toys_test_stat = myHybridPlot->
GetSBmean();
102 double toys_significance = myHybridResult->
Significance();
104 std::cout <<
"Completed HybridCalculatorOriginal example:\n";
105 std::cout <<
" - -2lnQ = " << min2lnQ_data << endl;
106 std::cout <<
" - CL_sb = " << clsb_data << std::endl;
107 std::cout <<
" - CL_b = " << clb_data << std::endl;
108 std::cout <<
" - CL_s = " << cls_data << std::endl;
109 std::cout <<
" - significance of data = " << data_significance << std::endl;
110 std::cout <<
" - mean significance of toys = " << toys_significance << std::endl;
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
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.
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
RooRealVar represents a fundamental (non-derived) real valued object.
HybridCalculatorOriginal class.
This class provides the plots for the result of a study performed with the HybridCalculatorOriginal c...
double GetSBmean()
Get SB histo mean.
void Draw(const char *options="")
Draw on current pad.
Class encapsulating the result of the HybridCalculatorOriginal.
double GetTestStat_data()
Get test statistics value for data.
HybridPlot * GetPlot(const char *name, const char *title, int n_bins)
prepare a plot showing a result and return a pointer to a HybridPlot object the needed arguments are:...
void SetDataTestStatistics(double testStat_data_val)
set the value of the test statistics on data
virtual Double_t CLb() const
Convert NullPValue into a "confidence level".
virtual Double_t CLsplusb() const
Convert AlternatePValue into a "confidence level".
virtual Double_t Significance() const
familiar name for the Null p-value in terms of 1-sided Gaussian significance
virtual Double_t CLs() const
is simply (not a method, but a quantity)
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
Template specialisation used in RooAbsArg:
RooCmdArg Extended(Bool_t flag=kTRUE)
RooConstVar & RooConst(Double_t val)
Namespace for the RooStats classes.