Hello,

I am trying to modify rf204_extrangefit.C so that I can view the number of events of the background pdf in two separate ranges (independently from each other). I’ve tried to “doubly extend” a pdf with multiple nBck parameters, but the fitting goes crazy. i.e.

```
RooExtendPdf esig("esig","extended signal p.d.f",sig,nsig,"signalRange") ;
RooExtendPdf ebkg1("ebkg1","extended background p.d.f",bkg,nbkg,"signalRange") ;
RooExtendPdf ebkg("ebkg","extended background p.d.f",ebkg1,nbkgB,"bkgRange") ;
...
RooAddPdf model("model","(g1+g2)+a",RooArgList(ebkg,esig)) ;
```

Where I would like to find the number of background events in the bkgRange and the number of background events in the signalRange, but not the summation of the two (this is just an example, in general I would like to be able to find the number of background events in n ranges, where the sum of the ranges does not necessarily span the entire fitting area).

I’ve tried to directly use integration, but this gets tricky with the errors. Thanks for any help!