50 void StandardFeldmanCousinsDemo(
const char* infile =
"",
51 const char* workspaceName =
"combined",
52 const char* modelConfigName =
"ModelConfig",
53 const char* dataName =
"obsData"){
58 const char* filename =
"";
59 if (!strcmp(infile,
"")) {
60 filename =
"results/example_combined_GaussExample_model.root";
65 cout <<
"HistFactory file cannot be generated on Windows - exit" << endl;
69 cout <<
"will run standard hist2workspace example"<<endl;
70 gROOT->ProcessLine(
".! prepareHistFactory .");
71 gROOT->ProcessLine(
".! hist2workspace config/example.xml");
72 cout <<
"\n\n---------------------"<<endl;
73 cout <<
"Done creating example input"<<endl;
74 cout <<
"---------------------\n\n"<<endl;
86 cout <<
"StandardRooStatsDemoMacro: Input file " << filename <<
" is not found" << endl;
98 cout <<
"workspace not found" << endl;
111 cout <<
"data or ModelConfig was not found" <<endl;
121 fc.SetConfidenceLevel(0.95);
123 fc.UseAdaptiveSampling(
true);
125 fc.CreateConfBelt(
true);
136 fc.FluctuateNumDataEntries(
false);
138 cout <<
"Not sure what to do about this model" <<endl;
153 cout <<
"\n95% interval on " <<firstPOI->
GetName()<<
" is : ["<<
165 TH1F* histOfThresholds =
new TH1F(
"histOfThresholds",
"",
178 histOfThresholds->
Fill(poiVal,arMax);
181 histOfThresholds->
Draw();
virtual Double_t getMin(const char *name=0) const
virtual const char * GetName() const
Returns name of object.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
virtual Double_t getMax(const char *name=0) const
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
virtual void SetMinimum(Double_t minimum=-1111)
1-D histogram with a float per channel (see TH1 documentation)}
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
static struct mg_connection * fc(struct mg_context *ctx)
ConfidenceBelt is a concrete implementation of the ConfInterval interface.
virtual TObject * clone(const char *newname) const
RooRealVar represents a fundamental (non-derived) real valued object.
RooAbsData * data(const char *name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found...
Double_t LowerLimit(RooRealVar ¶m)
return lower limit on a given parameter
R__EXTERN TSystem * gSystem
virtual void Draw(Option_t *option="")
Draw this histogram with options.
RooAbsArg * first() const
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooDataSet is a container class to hold unbinned data.
Bool_t canBeExtended() const
virtual const RooArgSet * get(Int_t index) const
Return RooArgSet with coordinates of event 'index'.
TObject * obj(const char *name) const
Return any type of object (RooAbsArg, RooAbsData or generic object) with given name) ...
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...
Namespace for the RooStats classes.
RooAbsPdf * GetPdf() const
get model PDF (return NULL if pdf has not been specified or does not exist)
const RooArgSet * GetParametersOfInterest() const
get RooArgSet containing the parameter of interest (return NULL if not existing)
PointSetInterval is a concrete implementation of the ConfInterval interface.
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.
Double_t GetAcceptanceRegionMax(RooArgSet &, Double_t cl=-1., Double_t leftside=-1.)
void Print(Option_t *opts=0) const
Print contents of the workspace.
The RooWorkspace is a persistable container for RooFit projects.
virtual Int_t numEntries() const