PdfFuncMathCore and bindPdf

Dear all,

Does bindPdf work with PdfFuncMathCore.h functions? I can not find any corresponding one here.

Thank you.

I think @moneta can help you with this.

Yes, it works. I tried this:

RooRealVar x("x", "", 0); RooRealVar a("a", "", 1); RooRealVar b("b", "", 2);
auto theFunc = RooFit::bindFunction("beta_pdf", ROOT::Math::beta_pdf, x, a, b);
> theFunc
(RooAbsReal *) @0x7ffecb278828
> theFunc->getVal()
(double) 2.0000000

However, I had to gSystem->Load("libRooFit") first, because apparently the interpreter only loads RooFitCore, which does not have bindFunction.

RooFit probably thinks of it as a plain C++ function, as you can see by calling

> theFunc->ClassName()
(const char *) "RooCFunction3Binding<double,double,double,double>"

This means that you likely have to register it before being able to save it in a workspace as explained here:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.