Hi ROOT experts,
could you please help me understand this RooFit/ROOT issue that I am having:
I want to create a 2-dim PDF for my SM background which has constant entries given by MC efficiencies.
I do:
[code]RooRealVar mT(“mT”,“mT”, 0.0, 800.);
RooRealVar meff(“meff”,“meff”, 0.0, 5000.);
// Meff
// | C | D
// | — + —
// | A | B
// ------------- mT
Double_t effBkgA = 0.71943690000000005;
Double_t effBkgB = 0.1085825;
Double_t effBkgC = 0.13874990000000001;
Double_t effBkgD = 0.033230700000000002;
// x == mT
xBins = 2
double _xLimits[xBins+1]={0,100,800};
TArrayD xLimits(xBins+1,_xLimits);
// y == meff
yBins = 2
double _yLimits[yBins+1]={0,800,5000};
TArrayD yLimits(yBins+1,_yLimits);
TH2F smBkgd(“smBkgd”,“Standard Model Background”, xBins, _xLimits, yBins, _yLimits);
smBkgd.Fill( 50,400, effBkgA);
smBkgd.Fill(150,400, effBkgB);
smBkgd.Fill( 50,1000, effBkgC);
smBkgd.Fill(150,1000, effBkgD);
RooDataHist smHist(“smHist”,“Standard Model Background”, RooArgSet(mT,meff), &smBkgd);
RooHistPdf smPdf(“smPdf”,“Standard Model Background PDF”,RooArgSet(mT,meff),smHist);
TH2F bkgdHist(“bkgdHist”,“SM Bkg histogram”,xBins, _xLimits, yBins, _yLimits);
smPdf.fillHistogram(&bkgdHist,RooArgList(mT,meff));
bkgdHist.DrawCopy(“LEGO”);[/code]
My problem is that the input and output histograms (smBkgd, bkgdHist) do not agree. While the input hist nicely follows my MC efficiencies, the one created from the PDF does not anymore
If I use equal bin sizes everything works fine, but that’s not what I want to do.
Any idea what I am missing here ?
Thanks!
Till