38 using namespace RooFit;
39 using namespace RooStats;
42 const char* workspaceName =
"combined",
43 const char* modelConfigName =
"ModelConfig",
44 const char* dataName =
"obsData"){
52 filename =
"results/example_combined_GaussExample_model.root";
57 cout <<
"HistFactory file cannot be generated on Windows - exit" << endl;
61 cout <<
"will run standard hist2workspace example"<<endl;
62 gROOT->ProcessLine(
".! prepareHistFactory .");
63 gROOT->ProcessLine(
".! hist2workspace config/example.xml");
64 cout <<
"\n\n---------------------"<<endl;
65 cout <<
"Done creating example input"<<endl;
66 cout <<
"---------------------\n\n"<<endl;
78 cout <<
"StandardRooStatsDemoMacro: Input file " << filename <<
" is not found" << endl;
89 cout <<
"workspace not found" << endl;
102 cout <<
"data or ModelConfig was not found" <<endl;
117 cout <<
"\n95% interval on " <<firstPOI->
GetName()<<
" is : ["<<
123 cout <<
"making a plot of the profile likelihood function ....(if it is taking a lot of time use less points or the TF1 drawing option)\n";
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
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...
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...
This class provides simple and straightforward utilities to plot a LikelihoodInterval object...
ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface class f...
static const char * filename()
Double_t LowerLimit(const RooRealVar ¶m)
return the lower bound of the interval on a given parameter
virtual LikelihoodInterval * GetInterval() const
Return a likelihood interval.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
RooAbsArg * first() const
void plot(TString fname="data.root", TString var0="var0", TString var1="var1")
RooRealVar represents a fundamental (non-derived) real valued object.
void SetNPoints(Int_t np)
void StandardProfileLikelihoodDemo(const char *infile="", const char *workspaceName="combined", const char *modelConfigName="ModelConfig", const char *dataName="obsData")
Double_t UpperLimit(const RooRealVar ¶m)
return the upper bound of the interval on a given parameter
R__EXTERN TSystem * gSystem
virtual const char * GetName() const
Returns name of object.
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual void SetConfidenceLevel(Double_t cl)
set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval) ...
TObject * obj(const char *name) const
Return any type of object (RooAbsArg, RooAbsData or generic object) with given name) ...
void Print(Option_t *opts=0) const
Print contents of the workspace.
const RooArgSet * GetParametersOfInterest() const
get RooArgSet containing the parameter of interest (return NULL if not existing)
The RooWorkspace is a persistable container for RooFit projects.