Details
-
Bug
-
Resolution: Fixed
-
High
-
5.34/00
-
None
-
slc6
Description
I am finding that plotting RooRealSumPdf the first time, with the Normalization(1.,RooAbsReal::RelativeExpected) option does not normalize to the expected number of events the first time the pdf is drawn. Here's a not-so-minimal example:
using namespace RooFit;
|
TH1D* h = new TH1D("h","h",2,0,2);
|
h->SetBinContent(1,2); h->SetBinContent(2,5);
|
h->SetBinError(1,1.1); h->SetBinError(2,3.3);
|
RooRealVar x("x","x",0,2);x.setBins(2);
|
|
RooDataHist d("d","d",RooArgList(x),h);
|
RooHistFunc nominals("f","f",x,d);
|
|
RooRealVar binWidth("binWidth","binWidth",1);
|
RooRealSumPdf m("m","m",RooArgList(nominals),RooArgList(binWidth),true);
|
|
RooPlot* f = x.frame();
|
m.plotOn(f,Normalization(1.0,RooAbsReal::RelativeExpected));
|
m.plotOn(f,Normalization(1.0,RooAbsReal::RelativeExpected),LineColor(kRed));
|
f->Draw();
|