Dear all,
I am using root v.5.15/06 and recently I found that when I fit the plot with pol9 (polX) function, I am not able to re-create this function again later. I will explain:
First I have the plot with some errors. Then I fit interactively (in the canvas window) using pol9 and intervals from -2.7 to -1.5… I get the parameter values for all 10 parameters.
Second step is to recreate this function so I can use it lately in my different code. For this I simply define my own pol9 function,
TF1* fit_logyjb = new TF1(“fit_logyjb”,“pol9”,-2.7, -1.5)
and copy all 10 parameters from the fitted function, using
fit_logyjb->SetParameters(par0, par1, par2, etc…)
As a cross-check I wanted to compare the “new” function with the fitted one. I expected exactly the same function (i.e.lines in the canvas would overlay), but that’s not the case (please, see the attachment).
Black function is the one that is FITTED, the red one is RECREATED using the same parameters of the fitted function. I verified that the parameters are the same in both functions.
This also happens when trying to fit and recreate another polynomials…
Do you know if this should be the correct way to get the same function as the fitted one? What I am missing/doing wrong?
Thank you very much for any hint,
Best regards,
Tomas
test.ps (11.5 KB)