No matching function for call to ‘RooProdPdf::

Dear Experts,

I am trying to do a 2D fit, Here’s the complete folder that I am using. 2dfit_forum.tar.gz (1.1 MB)
The problem is that, the fit converges when I use the RooExponential fit the “COMBINATORIAL” part, then the code runs fine but when when I try to use a first order polynomial using RooPolyVar, I get the error message:

/kk_2dfit.C:156:66: error: no matching function for call to ‘RooProdPdf::RooProdPdf(const char [9], const char [9], RooPolyVar&, myRooPolBG&)’
RooProdPdf comb_bkg(“comb_bkg”, “comb_bkg”, comb_mKK, bkg_mD0pi);

Will you please have a look?


@jonas @moneta can please take a look whenever you will have time? Thank you!

Hi @sanjeeda!

The problem is that RooProdPdf expects two pdfs as arguments, but RooPolyVar is not a pdf.

You can solve your problem by wrapping your polynomial with the RooWrapperPdf:

RooPolyVar comb_mKK_func("comb_mKK_func", "comb_mKK_func",
                         mKK, RooArgSet(c0, c1));
RooWrapperPdf comb_mKK("comb_mKK", "comb_mKK", comb_mKK_func);
RooProdPdf comb_bkg("comb_bkg", "comb_bkg", comb_mKK, bkg_mD0pi);

Let me know if that works or if you need further help!


1 Like

Dear @jonas,

Thank you very much. The code works now. :smiley:

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