59 Double_t lowRange = -1, highRange = 5;
69 std::unique_ptr<RooDataSet>
data{reality.generate(
x, 1000)};
90 Int_t degree = bernsteinCorrection.ImportCorrectedPdf(wks,
"nominal",
"x",
"data");
93 Error(
"rs_bernsteinCorrection",
"Bernstein correction failed ! ");
97 cout <<
" Correction based on Bernstein Poly of degree " << degree << endl;
103 nominal.plotOn(frame);
127 bool checkSamplingDist =
true;
131 if (checkSamplingDist) {
138 if (checkSamplingDist) {
141 TH1F *samplingDist =
new TH1F(
"samplingDist",
"", 20, 0, 10);
142 TH1F *samplingDistExtra =
new TH1F(
"samplingDistExtra",
"", 20, 0, 10);
143 bernsteinCorrection.CreateQSamplingDist(wks,
"nominal",
"x",
"data", samplingDist, samplingDistExtra, degree,
148 samplingDistExtra->
Draw();
149 samplingDist->
Draw(
"same");
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
static void SetDefaultMinimizer(const char *type, const char *algo=nullptr)
Set the default Minimizer type and corresponding algorithms.
static void SetDefaultPrintLevel(int level)
Set the default Print Level.
Abstract interface for all probability density functions.
RooPlot * plotOn(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 RooCmdArg &arg9={}, const RooCmdArg &arg10={}) const override
Helper calling plotOn(RooPlot*, RooLinkedList&) const.
RooFit::OwningPtr< RooFitResult > fitTo(RooAbsData &data, CmdArgs_t const &... cmdArgs)
Fit PDF to given dataset.
Efficient implementation of a sum of PDFs of the form.
RooArgList is a container object that can hold multiple RooAbsArg objects.
A RooPlot is a plot frame and a container for graphics objects within that frame.
static RooPlot * frame(const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins)
Create a new frame for a given variable in x.
void Draw(Option_t *options=nullptr) override
Draw this plot and all of the elements it contains.
RooRealVar represents a variable that can be changed from the outside.
BernsteinCorrection is a utility in RooStats to augment a nominal PDF with a polynomial correction te...
Persistable container for RooFit projects.
RooAbsPdf * pdf(RooStringView name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
bool import(const RooAbsArg &arg, 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 RooCmdArg &arg9={})
Import a RooAbsArg object, e.g.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
1-D histogram with a float per channel (see TH1 documentation)}
void Draw(Option_t *option="") override
Draw this histogram with options.
RooCmdArg Rename(const char *suffix)
RooConstVar & RooConst(double val)
RooCmdArg PrintLevel(Int_t code)
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.