I have data and I made fitting function with TF1 class. And I want to subtract each of values from fitting function. I think that
Get y value of fitting function.
Subtract each of values from y value of fitting function.
But I don’t know how I get the y value and this method is inefficient.
And I feel that there is a function which find this. Is there any function which I am finding?
Are the residuals used in case of histogram? I want to find residuals between function and fitting function. But, I could find only histograms in the web.
You can simply iterate over the histogram bins, use hist->GetBinContent(ibin), and subtract the fit functions func->Eval(hist->GetBinCenter(ibin)). Does that do it? And yes, the graph in the tutorial’s lower plot shows the residuals.