57using std::cout, std::endl;
73 filename =
"results/example_combined_GaussExample_model.root";
78 cout <<
"will run standard hist2workspace example" << endl;
79 gROOT->ProcessLine(
".! prepareHistFactory .");
80 gROOT->ProcessLine(
".! hist2workspace config/example.xml");
81 cout <<
"\n\n---------------------" << endl;
82 cout <<
"Done creating example input" << endl;
83 cout <<
"---------------------\n\n" << endl;
94 cout <<
"StandardRooStatsDemoMacro: Input file " <<
filename <<
" is not found" << endl;
105 cout <<
"workspace not found" << endl;
118 cout <<
"data or ModelConfig was not found" << endl;
133 mc->GetPdf()->fitTo(*
data);
138 mc->GetNuisanceParameters()->Print(
"v");
140 cout <<
" check expectedData by category" << endl;
143 if (
strcmp(
mc->GetPdf()->ClassName(),
"RooSimultaneous") == 0) {
144 cout <<
"Is a simultaneous PDF" << endl;
147 cout <<
"Is not a simultaneous PDF" << endl;
154 std::unique_ptr<RooArgSet>
obstmp{
pdftmp->getObservables(*
mc->GetObservables())};
168 cout <<
"expected events = " <<
mc->GetPdf()->expectedEvents(*
data->get()) << endl;
199 cout <<
"on type " <<
catName <<
" " << endl;
204 std::unique_ptr<RooArgSet>
obstmp{
pdftmp->getObservables(*
mc->GetObservables())};
209 TIter it =
mc->GetNuisanceParameters()->createIterator();
227 cout <<
"working on lumi" << endl;
228 var->
setVal(
w->var(
"nominalLumi")->getVal());
242 cout <<
"working on lumi" << endl;
243 var->
setVal(
w->var(
"nominalLumi")->getVal() + 0.05);
256 cout <<
"working on lumi" << endl;
257 var->
setVal(
w->var(
"nominalLumi")->getVal() - 0.05);
271 cout <<
"working on lumi" << endl;
272 var->
setVal(
w->var(
"nominalLumi")->getVal());
294 if (list->GetSize() > 4) {
295 double n = list->GetSize();
301 c1->Divide(list->GetSize());
302 for (
int i = 0; i < list->GetSize(); ++i) {
ROOT::RRangeCast< T, false, Range_t > static_range_cast(Range_t &&coll)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
R__EXTERN TSystem * gSystem
const_iterator begin() const
void Print(Option_t *options=nullptr) const override
Print the object to the defaultPrintStream().
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
RooPlot * frame(const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}) const
Create a new RooPlot on the heap with a drawing frame initialized for this object,...
Object to represent discrete states.
Container class to hold unbinned data.
Plot frame and a container for graphics objects within that frame.
void Draw(Option_t *options=nullptr) override
Draw this plot and all of the elements it contains.
void SetYTitle(const char *title)
Use the constructor that doesn t take the name and and then call SetName() and SetTitle() on the RooPlot.")
Variable that can be changed from the outside.
void setVal(double value) override
Set value of variable to 'value'.
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
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.
const char * GetName() const override
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.
RooCmdArg DataError(Int_t)
RooCmdArg LineWidth(Width_t width)
RooCmdArg Normalization(double scaleFactor)
RooCmdArg MarkerSize(Size_t size)
RooCmdArg Cut(const char *cutSpec)
RooCmdArg LineColor(Color_t color)
RooCmdArg LineStyle(Style_t style)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Namespace for the RooStats classes.
Int_t CeilNint(Double_t x)
Returns the nearest integer of TMath::Ceil(x).