I am fitting a variable Bmass with double gaussian+exponential. I want to check the fit quality. Could you please tell me how to print the chi square/dof in the fitted plot? I also want to plot pull distributions for the fit plot. How to plot pull distribution?
Hi Deepak, could you post some minimal working code? These things depend on how you are doing your fit.
I am attaching the fitting code. Please have a look on it.
Deepakbsmass_data.cc (5.3 KB)
Okey dokey a scan of your tutorials folder should find this macro:
That should fit in with your code quite easily
frame->chiSquare() ; prints only chisquare value. But I need chisquare/dof value.
it actually prints chi2/nBins. See e.g. here:
However, it doesn’t know how many parameters the fitted function had. That’s why you have to give this as a hint for the internal calculation.
I updated the documentation, so it will show up much more clearly on the webpages in a couple of days.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.