Skip to content

Commit

Permalink
check histpdf size in ShapeTools.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Aliya Nigamova committed Jun 23, 2024
1 parent 6a0cbf3 commit fcef577
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/ShapeTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,11 +1005,11 @@ def getPdf(self, channel, process, _cache={}):
pdfs.Add(self.shape2Pdf(shapeUp, channel, process))
pdfs.Add(self.shape2Pdf(shapeDown, channel, process))
histpdf = nominalPdf if nominalPdf.InheritsFrom("RooDataHist") else nominalPdf.dataHist()
xvar = histpdf.get().first()
yvar = histpdf.get().second()
if histpdf.get().getSize() > 2:
raise ValueError("No support for 3+ dimensional histpdfs")
elif yvar:
elif histpdf.get().getSize() > 1:
xvar = histpdf.get().first()
yvar = histpdf.get().second()
rhp = ROOT.FastVerticalInterpHistPdf2D2(
"shape%s_%s_%s_morph" % (postFix, channel, process),
"",
Expand All @@ -1022,6 +1022,7 @@ def getPdf(self, channel, process, _cache={}):
qalgo,
)
else:
xvar = histpdf.get().first()
rhp = ROOT.FastVerticalInterpHistPdf2(
"shape%s_%s_%s_morph" % (postFix, channel, process),
"",
Expand Down

0 comments on commit fcef577

Please sign in to comment.