57void rs_bernsteinCorrection()
61 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;
106 nominal.plotOn(frame);
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,
151 samplingDistExtra->
Draw();
152 samplingDist->
Draw(
"same");
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
static void SetDefaultMinimizer(const char *type, const char *algo=0)
static const std::string & DefaultMinimizerType()
static void SetDefaultPrintLevel(int level)
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
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.
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
Helper calling plotOn(RooPlot*, RooLinkedList&) const.
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooDataSet is a container class to hold unbinned data.
A RooPlot is a plot frame and a container for graphics objects within that frame.
static RooPlot * frame(const RooAbsRealLValue &var, Double_t xmin, Double_t xmax, Int_t nBins)
Create a new frame for a given variable in x.
virtual void Draw(Option_t *options=0)
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...
The RooWorkspace is a persistable container for RooFit projects.
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.
RooAbsPdf * pdf(const char *name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
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)}
virtual void Draw(Option_t *option="")
Draw this histogram with options.
RooCmdArg Rename(const char *suffix)
RooConstVar & RooConst(Double_t val)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg Minimizer(const char *type, const char *alg=0)
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.