54void StandardTestStatDistributionDemo(
const char *
infile =
"",
const char *
workspaceName =
"combined",
69 filename =
"results/example_combined_GaussExample_model.root";
74 cout <<
"will run standard hist2workspace example" << endl;
75 gROOT->ProcessLine(
".! prepareHistFactory .");
76 gROOT->ProcessLine(
".! hist2workspace config/example.xml");
77 cout <<
"\n\n---------------------" << endl;
78 cout <<
"Done creating example input" << endl;
79 cout <<
"---------------------\n\n" << endl;
90 cout <<
"StandardRooStatsDemoMacro: Input file " <<
filename <<
" is not found" << endl;
100 cout <<
"workspace not found" << endl;
113 cout <<
"data or ModelConfig was not found" << endl;
125 cout <<
"\n\n--------------------------------------" << endl;
126 cout <<
"Will generate sampling distribution at " <<
firstPOI->GetName() <<
" = " <<
plcUpperLimit << endl;
127 int nPOI =
mc->GetParametersOfInterest()->getSize();
129 cout <<
"not sure what to do with other parameters of interest, but here are their values" << endl;
130 mc->GetParametersOfInterest()->Print(
"v");
143 poi.
add(*
mc->GetParametersOfInterest());
148 sampler.SetObservables(*
mc->GetObservables());
149 sampler.SetGlobalObservables(*
mc->GetGlobalObservables());
150 if (!
mc->GetPdf()->canBeExtended() && (
data->numEntries() == 1)) {
151 cout <<
"tell it to use 1 event" << endl;
155 sampler.SetParametersForTestStat(*
mc->GetParametersOfInterest());
173 double min =
plot.GetTH1F(
sampDist)->GetXaxis()->GetXmin();
174 double max =
plot.GetTH1F(
sampDist)->GetXaxis()->GetXmax();
176 TF1 *
f =
new TF1(
"f",
Form(
"2*ROOT::Math::chisquared_pdf(2*x,%d,0)",
nPOI), min, max);
178 c1->SaveAs(
"standard_test_stat_distribution.pdf");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter char TVirtualGLPainter plot
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
R__EXTERN TSystem * gSystem
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Abstract base class for binned and unbinned datasets.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Variable that can be changed from the outside.
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
The ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface cla...
ProfileLikelihoodTestStat is an implementation of the TestStatistic interface that calculates the pro...
This class provides simple and straightforward utilities to plot SamplingDistribution objects.
This class simply holds a sampling distribution of some test statistic.
ToyMCSampler is an implementation of the TestStatSampler interface.
Persistable container for RooFit projects.
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Namespace for the RooStats classes.