53void rs102_hypotestwithshapes() {
70 DoHypothesisTest(wspace);
87 Double_t lowRange = 60, highRange = 200;
90 RooRealVar invMass(
"invMass",
"M_{inv}", lowRange, highRange,
"GeV");
96 RooRealVar sigma1(
"sigma1",
"Width of Gaussian",12.,2,100) ;
97 RooGaussian sigModel(
"sigModel",
"Signal Model", invMass, mH, sigma1);
101 sigma1.setConstant();
106 RooRealVar sigma1_z(
"sigma1_z",
"Width of Gaussian",10.,6,100) ;
107 RooGaussian zjjModel(
"zjjModel",
"Z+jets Model", invMass, mZ, sigma1_z);
111 sigma1_z.setConstant();
131 RooRealVar fzjj(
"fzjj",
"fraction of zjj background events",.4,0.,1) ;
134 RooRealVar fsigExpected(
"fsigExpected",
"expected fraction of signal events",.2,0.,1) ;
135 fsigExpected.setConstant();
139 RooRealVar mu(
"mu",
"signal strength in units of SM expectation",1,0.,2) ;
143 RooRealVar ratioSigEff(
"ratioSigEff",
"ratio of signal efficiency to nominal signal efficiency",1. ,0.,2) ;
144 ratioSigEff.setConstant(
kTRUE);
147 RooProduct fsig(
"fsig",
"fraction of signal events",
RooArgSet(mu,ratioSigEff,fsigExpected)) ;
178 model.SetWorkspace(*wks);
179 model.SetPdf(
"model");
209 cout <<
"-------------------------------------------------" << endl;
210 cout <<
"The p-value for the null is " << htr->
NullPValue() << endl;
211 cout <<
"Corresponding to a significance of " << htr->
Significance() << endl;
212 cout <<
"-------------------------------------------------\n\n" << endl;
245 data->plotOn(frame ) ;
246 model->plotOn(frame) ;
251 frame->
SetTitle(
"An example fit to the signal + background model");
267 model->plotOn(xframe2) ;
271 xframe2->
SetTitle(
"An example fit to the background-only model");
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
RooPlot * frame(const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Create a new RooPlot on the heap with a drawing frame initialized for this object,...
void setConstant(Bool_t value=kTRUE)
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
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...
Chebychev polynomial p.d.f.
RooDataSet is a container class to hold unbinned data.
A RooPlot is a plot frame and a container for graphics objects within that frame.
void SetTitle(const char *name)
Set the title of the RooPlot to 'title'.
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.
RooProduct a RooAbsReal implementation that represent the product of a given set of other RooAbsReal ...
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void setVal(Double_t value)
Set value of variable to 'value'.
virtual void SetNullParameters(const RooArgSet &set)
set parameter values for the null if using a common PDF
virtual void SetModel(const ModelConfig &model)
set the model (in this case can set only the parameters for the null hypothesis)
virtual void SetData(RooAbsData &data)
Set the DataSet, add to the the workspace if not already there.
HypoTestResult is a base class for results from hypothesis tests.
virtual Double_t Significance() const
familiar name for the Null p-value in terms of 1-sided Gaussian significance
virtual Double_t NullPValue() const
Return p-value for null hypothesis.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface class f...
virtual HypoTestResult * GetHypoTest() const
Return the hypothesis test result obtained from the likelihood ratio of the maximum likelihood value ...
The RooWorkspace is a persistable container for RooFit projects.
RooAbsData * data(const char *name) const
Retrieve dataset (binned or unbinned) 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.
Bool_t import(const RooAbsArg &arg, const RooCmdArg &arg1=RooCmdArg(), const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg())
Import a RooAbsArg object, e.g.
RooAbsPdf * pdf(const char *name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
RooCmdArg Hesse(Bool_t flag=kTRUE)
RooCmdArg Rename(const char *suffix)
RooCmdArg Components(const RooArgSet &compSet)
RooCmdArg Save(Bool_t flag=kTRUE)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg DataError(Int_t)
RooCmdArg LineColor(Color_t color)
RooCmdArg LineStyle(Style_t style)
RooCmdArg Minos(Bool_t flag=kTRUE)
@(#)root/roostats:$Id$ Author: George Lewis, Kyle Cranmer