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
This archive was generated by hypermail 2.2.0 : Fri Sep 02 2011 - 11:50:01 CEST