Paramaters from FitPanel

Hi ROOTers
I am using the fitPanel on my current canvas to fit a gaussian+linear on a TGrpah object (it could be a histogram too). How could I get the parameters of the fit after I run the FitPanel function (From the right click hidden menu) on my current canvas?


I am not sure I understood your question well, but here is a first response we can tune later on :slight_smile:

If you just want to see the parameters, click on the button ‘Set Parameters’. It will show you the parameters as they were left in the last fit. If what you want is the function result of the fit, then you should go into the object, get the list of functions that has fitted them and retrieve the last function. For example, with a histogram you could do:


This returns a TList* with all the functions that fitted the object previously.

Let me know if this solved your question and please, give us any feedback you can. If you think there is some missing functionality in the fitPanel it would be very helpful for us.


you can get the parameters of the fit in the statistics box of the TCanvas, just by selecting in the TCanvas menu Options the FIt Parameters


Thxs… now I figure out with your help how to get access to the fitting parameters. One thing that I would like to add to the posting (for future references) is that every time one executes a fit using the FitPanel menu, the returned fit function is added to the list of functions of the current selected object.

I have to say the fitpanel menu is a very helpful tool indeed… ROOT rocks!

Thanks for the feedback :slight_smile:

The functionality you are asking for is already implemented, but in the development branch. We still have to merge it with the main ROOT version. Nevertheless it will be in the next release.

In the meantime, try checking the ‘Add to list’ button.