Right now I am using the Roofit Chebyshev fitting function to fit the SideBand region to estimate the background in Signal Region. And to obtain the best fitting performance I am considering using the Chebyshev fitting in Root to have a rough view of the proper parameter values. But it seems the parameter values in Root and in Roofit are not that consistent.
The parameters given by Root are
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 5.28613e+03 1.81819e+02 8.81551e-03 -2.21654e-10
2 p1 -1.00650e+02 3.99181e+00 8.92255e-05 -2.13190e-08
3 p2 2.43159e-01 1.08098e-02 4.43067e-07 1.16268e-05
But the parameters given by RooFit are:
NO. NAME VALUE ERROR NEGATIVE POSITIVE
1 b0 -1.02501e+00 6.77973e-02 -6.53512e-02 6.43098e-02
2 b1 4.28238e-01 2.80908e-02 -2.80506e-02 2.79006e-02
3 b2 -9.99989e-02 2.46081e-02 at limit 1.71735e-02
The values are hugely different for the same Chebychev 3rd. Is there connection between the parameters in Roofit and Root? Or anyone know how to transfer the parameter values obtained from Root to the parameters in RooFit?
The definition of the polynomial should be the same. The only difference is that in RooFit they are defined in the internal [-1,1].
I think it is always better to rescale the input x values to the [-1,1] interval, which is the natural range for the Chebyshev polynomial.
So If you apply this transformation you should get the same parameters.
But we found another issue: the definition of chebychev function in Root and RooFit are different. In Root the first parameter of chebychev is the constant, p0*1, while in RooFit is only 1 itself. And when I tried to use the fitFunction->FixParameter(0,1) to fix the first parameter to be 1 as in RooFit, then the fitting of Root is divergent and much worse.