Basic functionality: binding ROOT math functions as RooFit functions and pdfs
{
RooPlot *frame1 =
x.
frame(Title(
"TMath::Erf bound as RooFit function"));
beta->Print();
std::unique_ptr<RooDataSet>
data{beta->generate(
x2, 10000)};
beta->fitTo(*
data, PrintLevel(-1));
RooPlot *frame2 =
x2.frame(Title(
"ROOT::Math::Beta bound as RooFit pdf"));
beta->plotOn(frame2);
TF1 *fa1 =
new TF1(
"fa1",
"sin(x)/x", 0, 10);
RooPlot *frame3 = x3.
frame(Title(
"TF1 bound as RooFit function"));
TCanvas *
c =
new TCanvas(
"rf105_funcbinding",
"rf105_funcbinding", 1200, 400);
gPad->SetLeftMargin(0.15);
gPad->SetLeftMargin(0.15);
gPad->SetLeftMargin(0.15);
}
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 x2
void Print(Option_t *options=nullptr) const override
Print the object to the defaultPrintStream().
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
virtual 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
Plot (project) PDF on specified frame.
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.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
double beta_pdf(double x, double a, double b)
Probability density function of the beta distribution.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Double_t Erf(Double_t x)
Computation of the error function erf(x).
RooCFunction1Binding<double,double>::erf[ function=TMath::Erf x=x ] = 0
RooCFunction3PdfBinding<double,double,double,double>::beta[ function=(0x7f9741cf5e70) x=x2 y=a z=b ] = 0.934689
[#1] INFO:NumericIntegration -- RooRealIntegral::init(beta_Int[x2]) using numeric integrator RooRombergIntegrator to calculate Int(x2)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(beta_Int[x2]) using numeric integrator RooRombergIntegrator to calculate Int(x2)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(beta_Int[x2]) using numeric integrator RooRombergIntegrator to calculate Int(x2)
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: activating const optimization
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: deactivating const optimization
[#1] INFO:NumericIntegration -- RooRealIntegral::init(beta_Int[x2]) using numeric integrator RooRombergIntegrator to calculate Int(x2)
RooTFnBinding::fa1[ TFn={fa1=sin(x)/x} obs=(x3) ] = -0.0547936
- Date
- July 2008
- Author
- Wouter Verkerke
Definition in file rf105_funcbinding.C.