Simultaneous binned fit with RooFit

Hi all,
I’ve found a code in the tutorial list that is close to what I have to do:

I need to modify 4 things:
1 - set common parameters for the two pdfs
2 - switch to an extended likelihood fit
3 - define 2 different fit ranges
4 - bin the datasets

With the attached code I’ve tried to get points from 1 to 3. Is it correct or this confuses the fitter? Results look reasonable.

How can I fix the code to implement point 4?

Thanks in advance for any help!

SimultaneousTest.C (4.72 KB)

Hi all,
I still can’t get what I want.
I’ve attached here a test script that generates 2 datasets (Wide and NoWide ranges) and tries to fit them simultaneously. The signal is a simple gaussian and the combinatorial is an exponential.
I get a strange behaviour:

  • the Wide combinatorial is always wrong by a factor of 2
  • the NoWide signal is always overestimated of a small amount epsilon
  • the NoWide combinatorial is underestimated of epsilon
    Generating with my defaults epsilon is ~ 80.

What am I doing wrong here?

TestFitYieldsSimultaneously.C (7.38 KB)