Hi experts,
I have a RooAddPDF and want to fit it to a RooDataHist. Currently, I use the default maximum likelihood fit by doing the following:
some_rooaddpdf.fitTo(some_roodatahist, Range(fitting_lowerbound,fitting_higherbound));
Now I want to do the same, but with a chi-squared fit instead. I guess I would have to use ->chi2FitTo() analogous to before, like this:
some_rooaddpdf.chi2FitTo(some_roodatahist, Range(fitting_lowerbound,fitting_higherbound));
Two questions:
-
I am a bit confused by the documentation of chi2FitTo(). Could someone elaborate on the option ‘Extended’?
-
How do I access the goodness-of-fit value, which is ‘chi-squared/NDF’? I know there is a tutorial showing how to calculate it when using a frame, but is there no way of simply accessing it when the chi-square fit has just been done? Also, the documentation of TFitResult does not show how to access it.
Any ideas? Thanks in advance!