44 void rs_numberCountingCombination_expected();
45 void rs_numberCountingCombination_observed();
46 void rs_numberCountingCombination_observedWithTau();
50 void rs_numberCountingCombination(
int flag=1)
53 rs_numberCountingCombination_expected();
55 rs_numberCountingCombination_observed();
57 rs_numberCountingCombination_observedWithTau();
61 void rs_numberCountingCombination_expected()
88 f.
AddModel(s,2,wspace,
"TopLevelPdf",
"masterSignal");
93 f.
AddExpData(s, b, db, 2, wspace,
"ExpectedNumberCountingData");
113 *wspace->
pdf(
"TopLevelPdf"), *poi, 0.05, nullParams);
119 cout <<
"-------------------------------------------------" << endl;
120 cout <<
"The p-value for the null is " << htr->NullPValue() << endl;
121 cout <<
"Corresponding to a significance of " << htr->Significance() << endl;
122 cout <<
"-------------------------------------------------\n\n" << endl;
136 RooArgSet* paramsOfInterest = nullParams;
137 plc.SetParameters(*paramsOfInterest);
148 lrPlot.SetMaximum(3.);
152 cout <<
"lower limit on master signal = " << lower << endl;
153 cout <<
"upper limit on master signal = " << upper << endl;
162 cout <<
"-------------------------------------------------" << endl;
163 std::cout <<
"Consider this parameter point:" << std::endl;
166 std::cout <<
"It IS in the interval." << std::endl;
168 std::cout <<
"It is NOT in the interval." << std::endl;
169 cout <<
"-------------------------------------------------\n\n" << endl;
173 cout <<
"-------------------------------------------------" << endl;
174 std::cout <<
"Consider this parameter point:" << std::endl;
177 std::cout <<
"It IS in the interval." << std::endl;
179 std::cout <<
"It is NOT in the interval." << std::endl;
180 cout <<
"-------------------------------------------------\n\n" << endl;
229 void rs_numberCountingCombination_observed()
255 f.
AddModel(s,2,wspace,
"TopLevelPdf",
"masterSignal");
260 Double_t bkgMeas[2] = {111.23,98.76};
262 f.
AddData(mainMeas, bkgMeas, dbMeas, 2, wspace,
"ObservedNumberCountingData");
282 *wspace->
pdf(
"TopLevelPdf"), *poi, 0.05, nullParams);
289 cout <<
"-------------------------------------------------" << endl;
290 cout <<
"The p-value for the null is " << htr->
NullPValue() << endl;
291 cout <<
"Corresponding to a significance of " << htr->
Significance() << endl;
292 cout <<
"-------------------------------------------------\n\n" << endl;
307 RooArgSet* paramsOfInterest = nullParams;
308 plc.SetParameters(*paramsOfInterest);
313 cout <<
"lower limit on master signal = " << lrint->
LowerLimit(*mu ) << endl;
314 cout <<
"upper limit on master signal = " << lrint->
UpperLimit(*mu ) << endl;
326 void rs_numberCountingCombination_observedWithTau()
351 f.
AddModel(s,2,wspace,
"TopLevelPdf",
"masterSignal");
356 Double_t sideband[2] = {11123.,9876.};
358 f.
AddDataWithSideband(mainMeas, sideband, tau, 2, wspace,
"ObservedNumberCountingDataWithSideband");
378 *wspace->
pdf(
"TopLevelPdf"), *poi, 0.05, nullParams);
383 cout <<
"-------------------------------------------------" << endl;
384 cout <<
"The p-value for the null is " << htr->
NullPValue() << endl;
385 cout <<
"Corresponding to a significance of " << htr->Significance() << endl;
386 cout <<
"-------------------------------------------------\n\n" << endl;
401 RooArgSet* paramsOfInterest = nullParams;
402 plc.SetParameters(*paramsOfInterest);
409 cout <<
"lower limit on master signal = " << lrint->
LowerLimit(*mu ) << endl;
410 cout <<
"upper limit on master signal = " << lrint->
UpperLimit(*mu ) << endl;
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...
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
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")
virtual Double_t Significance() const
familiar name for the Null p-value in terms of 1-sided Gaussian significance
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t tau
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
virtual Bool_t IsInInterval(const RooArgSet &) const
check if given point is in the interval
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void addClone(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
RooAbsData * data(const char *name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found...
Double_t UpperLimit(const RooRealVar ¶m)
return the upper bound of the interval on a given parameter
RooAbsArg * first() const
virtual Double_t NullPValue() const
Return p-value for null hypothesis.
Namespace for the RooStats classes.
RooAbsPdf * pdf(const char *name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
RooRealVar * var(const char *name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found...
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")
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
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.