I can happily plot fit result for my 2D simultaneous pdf, by doing:
combinedData.plotOn(frame, ROOT.RooFit.CutRange("sigRegion"), ROOT.RooFit.Cut("channelCat==channelCat::%s" % chName) ) combinedPdf.plotOn(frame, ROOT.RooFit.Slice(channelCat, chName), ROOT.RooFit.ProjWData(ROOT.RooArgSet(channelCat), combinedData), ROOT.RooFit.Components(aComponent), ROOT.RooFit.FillColor(aColor), ROOT.RooFit.DrawOption("F"))
Now, I want to plot the same results but with a cut on one of the 2 variables of these 2D plane,
so I tried to modify the
combinedPdf.plotOn() part by adding:
y.setRange("sigRegion", 0.9, 1)
but the Pdf seems to be not correctly normalized (too small number of events in it).
So googling around I find that I should actually use:
but this gives the warning:
[#0] WARNING:Plotting -- RooHist::getFitRangeNEvt() WARNING: Number of normalization events associated to histogram is not equal to number of events in histogram due cut made in RooAbsData::plotOn() call. Automatic normalization over sub-range of plot variable assumes that the effect of that cut is uniform across the plot, which may be an incorrect assumption. To be sure of correct normalization explicit pass normalization information to RooAbsPdf::plotOn() call using Normalization()
so eventually tried:
ROOT.RooFit.ProjectionRange("sigRegion"), ROOT.RooFit.NormRange("sigRegion"), ROOT.RooFit.Normalization(1.0, ROOT.RooAbsReal.RelativeExpected)
which still gives the same results as without this last line (trying 1 just to see what happens).
What’s the correct way of normalizating the projection + cut ?
ROOT Version: 6.08/06
Platform: Scientific Linux release 6.9
Compiler: Not Provided