Putting fits to TNtuple data


  This question deals with having ROOT put fits to data I have stored in an TNtuple. For example, I have Bfield, temperature, and frequency stored for each entry (leaf?) in the ntuple. What I would like to do is draw say frequency versus temperature, and then have root try various  

mathematical fits to the data. The drawing part I can do, but I have been unable to really get anything from the refernce documentation about the Fit() function for TTrees. Can someone provide me with an example that would show me how to apply a particular formula fit to data I have stored in Tntuples?

Thanks, Andy

UIUC Physics Dept.


Have a look at
root.cern.ch/root/htmldoc/TTree. … nbinnedFit



As indicated by Eddy your solution is TTree::UnbinnedFit.
However, a problem was recently discovered in this function for the computation of the fit errors. I recommend using the CVS version
or wait our development release 4.01/02 coming in the following few days.