in a sepparate post, I was asking how to fit with a polynomial and your feedback was very helpful, thanks.
Now I have a question about the coefficients of the polynomials. I realized that for both polynomial classes (RooPolynomial and RooChebychev), the coefficients are set for the first order, second order, etc, but there is no way to set a constant term different from 1.
I mean in roofit, when defining a Chebychev polynomial like this:
RooChebychev mypoly(“mypoly”,“Chebychev polynomial”, x ,RooArgList(coef_x1, coef_x2, coef_x3));
what we are setting is: y = 1 + coef_x1 * x + coef_x2 * (2x^2 -1) + coef_x3 * (4x^3-3x)
as the arguments in the list are taken for the coefficients of the different powers of x.
Is there a way to set a coef_x0 for the indenpendent term to get the following:
y = coef_x0 + coef_x1 * x + coef_x2 * (2x^2 -1) + coef_x3 * (4x^3-3x) ?
I don’t think this is possible. But for curiosity why do you need it ? The RooChebychev is a pdf so at the end it is always normalised such that its integral is one in the defined range. If you want to have as fit parameter
different coefficients, you can always re-defined them by multiplying with the needed constant term such that you have the definition that you want.
ok… I read a bit more carefull the documentation and learnt a bit more about the Chebyshev polynomials. I see they have an important property: Tn (cos theta) = cos (n theta). Then it makes sense that Chebyshev polynomials are defined internally in the [-1,1] range and there is an internal variable transformation which is then reflected in the coefficient definition. So from that point of view the definition is consistent.