1 Sep 13:08 2011

### Re: [ROOT] different fit behaviour in ROOT and ROOFIT

Lorenzo Moneta <Lorenzo.Moneta <at> cern.ch>

2011-09-01 11:08:17 GMT

2011-09-01 11:08:17 GMT

Hi Roberta, Sorry for having looking late into this problem. I have investigated more, it required me some time and I have concluded that the RooFIt result is probably not right, while the ROOT is. The reason for the difference is still to be found. I have been using the same pdf definition of RooFit, by transforming the pdf in a TF1 and then fitted using ROOT and I get consistent results with your TestROOT macro. In particular if I use as input the RooFit parameters , I get clearly a smaller value of the likelihood function (meaning that is not optimal). Furthermore, when using a chi2 fit method (not maximum likelihood) which should work perfectly fine and give the same results in your case since the histogram bin errors are gaussian I get again the same result. ( NJPSI ~ 2200) So, something is probably wrong in the RooFIt fitting, it could be also a numerical problem not dealt correctly in the likelihood calculation in RooFit. I attach my macro, which uses the RooFit to build the model but ROOT for fitting Cheers, Lorenzo

(Continue reading)