37 using namespace RooFit ;
38 using namespace RooStats ;
86 f.
AddModel(s,2,wspace,
"TopLevelPdf",
"masterSignal");
91 f.
AddExpData(s, b, db, 2, wspace,
"ExpectedNumberCountingData");
111 *wspace->
pdf(
"TopLevelPdf"), *poi, 0.05, nullParams);
117 cout <<
"-------------------------------------------------" << endl;
118 cout <<
"The p-value for the null is " << htr->NullPValue() << endl;
119 cout <<
"Corresponding to a signifcance of " << htr->Significance() << endl;
120 cout <<
"-------------------------------------------------\n\n" << endl;
134 RooArgSet* paramsOfInterest = nullParams;
135 plc.SetParameters(*paramsOfInterest);
150 cout <<
"lower limit on master signal = " << lower << endl;
151 cout <<
"upper limit on master signal = " << upper << endl;
160 cout <<
"-------------------------------------------------" << endl;
161 std::cout <<
"Consider this parameter point:" << std::endl;
164 std::cout <<
"It IS in the interval." << std::endl;
166 std::cout <<
"It is NOT in the interval." << std::endl;
167 cout <<
"-------------------------------------------------\n\n" << endl;
171 cout <<
"-------------------------------------------------" << endl;
172 std::cout <<
"Consider this parameter point:" << std::endl;
175 std::cout <<
"It IS in the interval." << std::endl;
177 std::cout <<
"It is NOT in the interval." << std::endl;
178 cout <<
"-------------------------------------------------\n\n" << endl;
253 f.
AddModel(s,2,wspace,
"TopLevelPdf",
"masterSignal");
258 Double_t bkgMeas[2] = {111.23,98.76};
260 f.
AddData(mainMeas, bkgMeas, dbMeas, 2, wspace,
"ObservedNumberCountingData");
280 *wspace->
pdf(
"TopLevelPdf"), *poi, 0.05, nullParams);
287 cout <<
"-------------------------------------------------" << endl;
288 cout <<
"The p-value for the null is " << htr->
NullPValue() << endl;
289 cout <<
"Corresponding to a signifcance of " << htr->
Significance() << endl;
290 cout <<
"-------------------------------------------------\n\n" << endl;
305 RooArgSet* paramsOfInterest = nullParams;
306 plc.SetParameters(*paramsOfInterest);
311 cout <<
"lower limit on master signal = " << lrint->
LowerLimit(*mu ) << endl;
312 cout <<
"upper limit on master signal = " << lrint->
UpperLimit(*mu ) << endl;
349 f.
AddModel(s,2,wspace,
"TopLevelPdf",
"masterSignal");
354 Double_t sideband[2] = {11123.,9876.};
356 f.
AddDataWithSideband(mainMeas, sideband, tau, 2, wspace,
"ObservedNumberCountingDataWithSideband");
376 *wspace->
pdf(
"TopLevelPdf"), *poi, 0.05, nullParams);
381 cout <<
"-------------------------------------------------" << endl;
382 cout <<
"The p-value for the null is " << htr->
NullPValue() << endl;
383 cout <<
"Corresponding to a signifcance of " << htr->Significance() << endl;
384 cout <<
"-------------------------------------------------\n\n" << endl;
399 RooArgSet* paramsOfInterest = nullParams;
400 plc.SetParameters(*paramsOfInterest);
407 cout <<
"lower limit on master signal = " << lrint->
LowerLimit(*mu ) << endl;
408 cout <<
"upper limit on master signal = " << lrint->
UpperLimit(*mu ) << endl;
void rs_numberCountingCombination_expected()
void Draw(const Option_t *options=0)
draw the likelihood interval or contour for the 1D case a RooPlot is drawn by default of the profiled...
Bool_t setRealValue(const char *name, Double_t newVal=0, Bool_t verbose=kFALSE)
Set value of a RooAbsRealLValye stored in set with given name to newVal No error messages are printed...
void SetMaximum(const Double_t theMaximum)
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
RooAbsData * data(const char *name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found...
HypoTestResult is a base class for results from hypothesis tests.
This class provides simple and straightforward utilities to plot a LikelihoodInterval object...
ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface class f...
Double_t LowerLimit(const RooRealVar ¶m)
return the lower bound of the interval on a given parameter
void AddExpData(Double_t *sigExp, Double_t *bkgExp, Double_t *db, Int_t nbins, RooWorkspace *ws, const char *dsName="ExpectedNumberCountingData")
RooAbsArg * first() const
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
RooAbsPdf * pdf(const char *name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
void rs_numberCountingCombination_observed()
virtual Double_t NullPValue() const
Return p-value for null hypothesis.
void rs_numberCountingCombination_observedWithTau()
RooRealVar represents a fundamental (non-derived) real valued object.
Double_t UpperLimit(const RooRealVar ¶m)
return the upper bound of the interval on a given parameter
virtual Double_t Significance() const
familiar name for the Null p-value in terms of 1-sided Gaussian significance
RooRealVar * var(const char *name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found...
virtual Bool_t IsInInterval(const RooArgSet &) const
check if given point is in the interval
virtual void SetConfidenceLevel(Double_t cl)
set the confidence level for the interval (e.g 0.682 for a 1-sigma interval)
void AddDataWithSideband(Double_t *mainMeas, Double_t *sideband, Double_t *tau, Int_t nbins, RooWorkspace *ws, const char *dsName="ExpectedNumberCountingData")
void AddData(Double_t *mainMeas, Double_t *bkgMeas, Double_t *db, Int_t nbins, RooWorkspace *ws, const char *dsName="NumberCountingData")
void rs_numberCountingCombination(int flag=1)
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add clone of specified element to an owning set.
void AddModel(Double_t *sigExp, Int_t nchan, RooWorkspace *ws, const char *pdfName="CombinedPdf", const char *masterSignalName="masterSignal")
The RooWorkspace is a persistable container for RooFit projects.