March 16, 2011, 4:16pm
I am already using the possibility to display the result of a fit on a RooFrame using paramOn like this:
Incidentally, I am also getting the chi squared for the fit like this:
frame->chiSquare("fit","data",7); //7 parameters to fit
I am now wondering if there is a way that I could get this value of chi squared displayed in the param box directly, like old fashioned ROOT does?
Thanks in advance,
I want to revive this topic, as my search on this was unfortunately unsuccessful. Maybe there are some new insights?
January 27, 2021, 12:05pm
There is a way to get the chi2 displayed using the Label option of paramsOn.
Using the above example you can do as following. You can also customize the format (e.g. how many digit printed) as you want:
double chi2 = frame->chiSquare("fit","data",7);
TString chi2Line = TString::Format("Chisquare = %f ",chi2); //