Hi,
I have a TH1F called h and would like to fit a Gaussian to it. Additionally I would like to access the TFitResult. According to ROOT's documentation (http://root.cern.ch/root/html/TH1.html#TH1:Fit) this ought to work like this:
TFitResultPtr fitres = h->Fit("gaus", "S", "", -0.1, 0.5); Double_t chi2 = fitres->Chi2();
Only it doesn't: The second line yields
Error: Symbol fitres is not defined in current scope (tmpfile):1: Error: Failed to evaluate fitres->Chi2()
What's wrong here?
Best regards,
Alexander
Received on Tue Dec 15 2009 - 12:30:33 CET
This archive was generated by hypermail 2.2.0 : Tue Dec 15 2009 - 17:50:02 CET