FitPanel Linear Plus Gaussian Fit

Hello, I wish to do a linear plus gauss fit on my data using the fit panel, however when I use the add option and try to make the fit it says that poly1(0)+gaus(2) does not exist as a function. I’m wondering if I need to define this summation manually or if the fit panel should take care of it.




The correct string is


Also which ROOT version are you using ? It works for me using 5.22



ya, I am using the same version but its seems to not recognize it. I tried to define my own function and load into the fit panel which was successful however it did not produce the correct fit. It made a linear only.

I did:

TF1 *fit = new TF1(“fit”, “pol1(0)+gaus(2)”);
graph->Fit(“fit”, “+”);

then called the fit panel which contained the function, but when I try to fit a range with the sliders it produces a linear fit.

Thank you, I have figured it out, the initial parameters were giving me trouble.

Thanks once again.