Hi,
I have fit two sets of data with RooFit one is simply a RooDataHist the other is a RooAddPdf where the sum is constucted as
[color=#00BF40]sum(“sum”,“sum”, RooArgSet(Pdf1,Pdf2,Pdf3), RooArgSet(var1,var2,var3));[/color]
and the fitting is done by
[color=#00BF40]sum.fitTo(data,Extended());[/color]
I get a pretty good fit by eye and I can print out the value of chisquared with xframe->chiSquare() but I want to get the degrees of freedom in the fit and display both that and chisquare in the stats box. I know how to enable the stats box with
[color=#00BF40]data.statOn(xframe,Layout(0.50,0.90,0.80));[/color]
but this only gives me a box with RMS, mean, and entries. How do I add chisquared/ndf and Probability to that box? Also am I even using statOn with the correct item? I have a feeling it has something to do with this in the fit stats section but I can’t figure out how that works. I’ve been trying to searching for the solution for about a day now and can’t find anything answering this.
Any help is greatly appreciated, thank you!