# Excluding a sub-range in a 2D fit - RooFit

Good morning,

I am fitting a two-dimensional signal distribution in mES and the neutrino mass squared (Mnu2). The x-axis (Mnu2) goes from -2. to +2., and the y-axis (mES) from 5.0 to 5.3. If I apply my fit function to the whole region I have a systematic discrepancy at Mnu2 > 0.3 and mES > 5.275. To avoid any bias from this region in the latter fit on data I would like to exclude it from the fit, but get the signal yield from the whole region. Therefore I define three ranges

``````mES.setRange("whole", 5.0,5.3)
Mnu2.setRange("whole",-2.,2.)

mES.setRange("subI",5.0,5.3)
Mnu2.setRange("subI",-2.,0.3)

mES.setRange("subII",5.0,5.25)
Mnu2.setRange("subII",0.3,2.)``````

and define my fitfunction in the region “whole”

``````SigYield = RooRealVar("SigYield", "SigYield", 109025., 0., 250000.)
FitFunc = RooExtendPdf("FitFunc", "FitFunc", Mnu2mES, SigYield,"whole")``````

while fitting in the sub ranges

``result = FitFunc.fitTo(FitSet, ROOT.RooFit.Save(ROOT.kTRUE), ROOT.RooFit.Extended(ROOT.kTRUE), ROOT.RooFit.PrintLevel(3), ROOT.RooFit.ConditionalObservables(cond), ROOT.RooFit.Range("subI,subII"))``

Unfortunately the returned signal yield seems to return only the integral in the sub-ranges. Here a few numbers:

• The Fit set has 109025 entries, and a fit in the Range “whole” returns 109030 +/- 330.
• Fitting in “subI,subII” gives a signal yield of 107460 +/- 330
• Changing “subII” to 5.0,5.25 in mES gives a yield of 104340 +/- 330

I did something comparable a while back in a 1D fit by fitting the sub-ranges -0.3 to 0.1 and 0.1 to 0.3, while my extended pdf was defined in the range -0.1 to 0.1. Back then the returned yield was the yield in the range -0.1 to 0.1 whic

Is this method applicable on 1D problems only? Or is it necessary for the regions to be disjoint?

Cheers,

Torsten