Fixing fractions in complex composite models in RooFit

Hi all,

I am trying to use RooFit to fit a mass peak shape with the following features:

  • Mass peak defined by a CBShape.
  • Peaking background 1, CBShape.
  • Peaking background 2, CBShape.
  • Non peaking background, RooExponential.

And I need to extract, essentially, the yield of the mass peak. My problem is the following: I want to restrict the yield of the peaking backgrounds to a certain fraction of the yield of the data:
N_bkg,i = N_peak*f
But letting f vary. If I only had one peaking background, I would do something like


and I would extract de yield from Npeaking*(1-f). However, if I add a second peaking background


now the f1 and f2 don’t have the meaning I want --that is, a fraction of the CB_peak yield.

I have not been able to find a workaround for this, but I’m sure somebody has found a similar problem at some point. Any ideas would be very much appreciated!


PD: On another note, I don’t like very much the logical composition of the model, because one would like to have the background on one side (with dependences on N_peak). However, if I used a RooFormulaVar to modelize N_bkg1 the possible variations of f1 are lost…