Fit polynomial exponential function in RooFit

Hi experts,
I have a spectrum over which I usually fit a 4th degree chebychev polynomial. I am now trying to fit a polynomial exponential function [i.e, exp(-poly)] instead. I was wondering how could I go about this? Would I have to use RooGenericPdf to define my own function or is there a way to use RooExponential and RooChebychev for this? Some help with how to proceed would be greatly appreciated, thanks!

Hi, sorry for the late reply!

You can definitely use RooChebychev for the polynomial, but then you can’t put it into a RooExponential because this one strictly represents an exp(c*x) and implements analytic integration only for this case.

Indeed you should use a RooGenericPdf here, just with the exponential of the Chebychev:

RooGenericPdf("mypdf", "std::exp(cheb)", RooArgList(cheb));

I hope this works for you, if you have any other trouble let us know!


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