43 using namespace RooFit;
44 using namespace RooStats;
47 const char* workspaceName =
"combined",
48 const char* modelConfigName =
"ModelConfig",
49 const char* dataName =
"obsData"){
57 filename =
"results/example_combined_GaussExample_model.root";
62 cout <<
"HistFactory file cannot be generated on Windows - exit" << endl;
66 cout <<
"will run standard hist2workspace example"<<endl;
67 gROOT->ProcessLine(
".! prepareHistFactory .");
68 gROOT->ProcessLine(
".! hist2workspace config/example.xml");
69 cout <<
"\n\n---------------------"<<endl;
70 cout <<
"Done creating example input"<<endl;
71 cout <<
"---------------------\n\n"<<endl;
83 cout <<
"StandardRooStatsDemoMacro: Input file " << filename <<
" is not found" << endl;
95 cout <<
"workspace not found" << endl;
108 cout <<
"data or ModelConfig was not found" <<endl;
135 cout <<
"Not sure what to do about this model" <<endl;
150 cout <<
"\n95% interval on " <<firstPOI->
GetName()<<
" is : ["<<
162 TH1F* histOfThresholds =
new TH1F(
"histOfThresholds",
"",
175 histOfThresholds->Fill(poiVal,arMax);
177 histOfThresholds->SetMinimum(0);
178 histOfThresholds->Draw();
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...
RooAbsPdf * GetPdf() const
get model PDF (return NULL if pdf has not been specified or does not exist)
RooAbsData * data(const char *name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found...
ConfidenceBelt * GetConfidenceBelt()
static const char * filename()
virtual Double_t getMin(const char *name=0) const
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
RooAbsData * GetPointsToScan()
RooAbsArg * first() const
static struct mg_connection * fc(struct mg_context *ctx)
virtual void SetConfidenceLevel(Double_t cl)
set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval) ...
ConfidenceBelt is a concrete implementation of the ConfInterval interface.
RooRealVar represents a fundamental (non-derived) real valued object.
Double_t LowerLimit(RooRealVar ¶m)
return lower limit on a given parameter
R__EXTERN TSystem * gSystem
void SetNBins(Int_t bins)
virtual Int_t numEntries() const
void FluctuateNumDataEntries(bool flag=true)
virtual const char * GetName() const
Returns name of object.
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooDataSet is a container class to hold unbinned data.
Double_t UpperLimit(RooRealVar ¶m)
return upper limit on a given parameter
The FeldmanCousins class (like the Feldman-Cousins technique) is essentially a specific configuration...
virtual TObject * clone(const char *newname) const
PointSetInterval is a concrete implementation of the ConfInterval interface.
void StandardFeldmanCousinsDemo(const char *infile="", const char *workspaceName="combined", const char *modelConfigName="ModelConfig", const char *dataName="obsData")
Bool_t canBeExtended() const
virtual PointSetInterval * GetInterval() const
Main interface to get a ConfInterval (will be a PointSetInterval)
TObject * obj(const char *name) const
Return any type of object (RooAbsArg, RooAbsData or generic object) with given name) ...
virtual Double_t getMax(const char *name=0) const
void Print(Option_t *opts=0) const
Print contents of the workspace.
void CreateConfBelt(bool flag=true)
const RooArgSet * GetParametersOfInterest() const
get RooArgSet containing the parameter of interest (return NULL if not existing)
Double_t GetAcceptanceRegionMax(RooArgSet &, Double_t cl=-1., Double_t leftside=-1.)
virtual const RooArgSet * get(Int_t index) const
Return RooArgSet with coordinates of event 'index'.
The RooWorkspace is a persistable container for RooFit projects.
void UseAdaptiveSampling(bool flag=true)
Double_t getRealValue(const char *name, Double_t defVal=0, Bool_t verbose=kFALSE) const
Get value of a RooAbsReal stored in set with given name.