Multiple fits on 1 histogram and Fit results in TPaveStat

Hi all,
I need to fit one histogram with 2 different functions in 2 different ranges and then with a third function
which is the sum of the previous two.
So far so good as I am using $ROOTSYS/tutorials/fit/multifit.C (awesome :slight_smile: )
My problem is that now I would like to have in the TPaveStats box the results of the last fit (combined function) while it displays the results (chi-square and parameters) of the first fit.
How can I achieve this?

Thanks for your help.

PS I am not including anything as the same problem can be reproduced(/solved) by running (/modifying) the tutorial macro, but please let me know if something more is needed.

Some answer to a similar question can be find here:

Hi couet,
ok so the solution is to add it by hand,…
Thanks a lot, although i had reached the same solution by myself…
It means that there’s no automatic way to update the stats box, in case of multiple fits…

Thanks really a lot for your feedback.

Yes that’s what this post suggests.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.