RooFit Slice normalisation

hello there,

I am trying to plot a slice in my propertime fit across the tag values in RooFit like so:

pdf->fitTo(*sigdata,NumCPU(ncpu), Minos(kTRUE));
TCanvas* bTimeSigFit = new TCanvas("bTimeSigFit","b propertime signal fit");
RooPlot *t0 = obs_t->frame(Bins(25),Range(0.0,12.0,kTRUE));
sigdata->plotOn(t0,Cut("B0_tag==B0_tag::B0"),MarkerStyle(kOpenCircle),MarkerSize(0.6));
obs_tag->setLabel("B0");
pdf->plotOn(t0,Slice(*obs_tag),LineStyle(kDotted),LineColor(kRed));
sigdata->plotOn(t0,Cut("B0_tag==B0_tag::B0bar"),MarkerStyle(kFullTriangleUp),MarkerSize(0.6));
obs_tag->setLabel("B0bar");
pdf->plotOn(t0,Slice(*obs_tag),LineColor(kBlue),LineStyle(kDashed));
pdf->paramOn(t0);

This does not display correctly, with the normalisation of the slices being incorrect with respect to the data (see attached)

I’ve tried doing a ProjWdata() in addition to the Slice(), I’ve tried cutting sigdata into two seperate datasets for the +1/-1 tags and plotting them seperately, but the normalisation still comes out incorrectly. I’ve also tried removing the Range() in case that was the problem.

Does anyone have any ideas as to why this may be, and any possible solutions, short of normalising by hand?

Thanks,

Conor
propertime.ps (20.5 KB)

Hi,

I don’t see anything wrong with your code immediately.

If you send me a standalone working example macro that reproduces this problem, I can debug this.

Wouter

Thanks, I’ll try putting together a macro today- in the meantime I have sent you the full code, as it may take a while to put this in macro form.

Conor