24ROOT.gInterpreter.ProcessLine(
25 'auto x = RooRealVar("x", "x", -3, 3); auto myerf = RooFit::bindFunction("erf", TMath::Erf, x)'
34frame1 = x.frame(Title=
"TMath.Erf bound as ROOT.RooFit function")
46ROOT.gInterpreter.ProcessLine(
47 'auto x2 = RooRealVar("x2", "x2", 0, 0.999);\
48 auto a = RooRealVar("a", "a", 5, 0, 10);\
49 auto b = RooRealVar("b", "b", 5, 0, 10);\
50 auto beta = RooFit::bindPdf("beta", ROOT::Math::beta_pdf, x2, a, b)'
61data = beta.generate({x2}, 10000)
65frame2 = x2.frame(Title=
"ROOT.Math.Beta bound as ROOT.RooFit pdf")
73fa1 = ROOT.TF1(
"fa1",
"sin(x)/x", 0, 10)
76x3 = ROOT.RooRealVar(
"x3",
"x3", 0.01, 20)
79rfa1 = ROOT.RooFit.bindFunction(fa1, x3)
85frame3 = x3.frame(Title=
"TF1 bound as ROOT.RooFit function")
88c = ROOT.TCanvas(
"rf105_funcbinding",
"rf105_funcbinding", 1200, 400)
91ROOT.gPad.SetLeftMargin(0.15)
92frame1.GetYaxis().SetTitleOffset(1.6)
95ROOT.gPad.SetLeftMargin(0.15)
96frame2.GetYaxis().SetTitleOffset(1.6)
99ROOT.gPad.SetLeftMargin(0.15)
100frame3.GetYaxis().SetTitleOffset(1.6)
103c.SaveAs(
"rf105_funcbinding.png")