60 void rs_bernsteinCorrection(){
63 Double_t lowRange = -1, highRange =5;
92 Int_t degree = bernsteinCorrection.ImportCorrectedPdf(wks,
"nominal",
"x",
"data");
95 Error(
"rs_bernsteinCorrection",
"Bernstein correction failed ! ");
99 cout <<
" Correction based on Bernstein Poly of degree " << degree << endl;
107 nominal.plotOn(frame);
111 if (!corrected)
return;
130 bool checkSamplingDist =
true;
134 if(checkSamplingDist) {
141 if(checkSamplingDist) {
144 TH1F* samplingDist =
new TH1F(
"samplingDist",
"",20,0,10);
145 TH1F* samplingDistExtra =
new TH1F(
"samplingDistExtra",
"",20,0,10);
146 bernsteinCorrection.CreateQSamplingDist(wks,
"nominal",
"x",
"data",samplingDist, samplingDistExtra, degree,numToyMC);
150 samplingDistExtra->
Draw();
151 samplingDist->
Draw(
"same");
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Plot dataset on specified frame.
RooCmdArg LineColor(Color_t color)
RooCmdArg PrintLevel(Int_t code)
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
1-D histogram with a float per channel (see TH1 documentation)}
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none(), const RooCmdArg &arg9=RooCmdArg::none(), const RooCmdArg &arg10=RooCmdArg::none()) const
Plot (project) PDF on specified frame.
static void SetDefaultPrintLevel(int level)
RooCmdArg LineStyle(Style_t style)
void Error(const char *location, const char *msgfmt,...)
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
static const std::string & DefaultMinimizerType()
virtual void Draw(Option_t *option="")
Draw this histogram with options.
RooCmdArg Minimizer(const char *type, const char *alg=0)
RooCmdArg Rename(const char *suffix)
RooDataSet is a container class to hold unbinned data.
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
Namespace for the RooStats classes.
static constexpr double degree
RooAbsPdf * pdf(const char *name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
RooConstVar & RooConst(Double_t val)
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
Bool_t import(const RooAbsArg &arg, const RooCmdArg &arg1=RooCmdArg(), const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg())
Import a RooAbsArg object, e.g.
virtual RooFitResult * fitTo(RooAbsData &data, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Fit PDF to given dataset.
BernsteinCorrection is a utility in RooStats to augment a nominal PDF with a polynomial correction te...
static void SetDefaultMinimizer(const char *type, const char *algo=0)
The RooWorkspace is a persistable container for RooFit projects.
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.