Simultaneous fit

Dear experts,

I want to do a simultaneous fit of 2 samples: positive and negative. My pdf is a product of mass pdf and angles pdf. My purpose is to perform a simultanous fit of the angles in bins of the mass.
I reproduce this case with a simple root script (in attachment) inspired by this tutorial:
root.cern.ch/root/html534/tutori … ool.C.html

The fit works well. Now, I want to split the parameter “mean” ,shared by the positive and negative pdf, in bins of mass. The fit failed and I got strange values. You can find the complete output in attachment.

Do I miss something?

Thank you very much in advance!
Cheers,
Walaa
tut_binnedFit.cc (4.21 KB)
output_tut_binnedFit.txt (11.9 KB)

Hello,

There is a problem in the link of root tutorial. The correct one is:
root.cern.ch/root/html534/tutori … ool.C.html