Skip to content

Commit

Permalink
Sometimes coefficient has a different name
Browse files Browse the repository at this point in the history
  • Loading branch information
nsmith- committed Nov 2, 2023
1 parent 484a45e commit 6ca7196
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/InterferenceModels.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ def done(self):
if isinstance(histfunc, ROOT.CMSHistFunc):
histfunc.injectExternalMorph(func)
elif isinstance(histfunc, ROOT.CMSHistSum):
coefname = "n_exp_final_bin{channel}_proc_{process}".format(channel=channel, process=process)
postfix = "bin{channel}_proc_{process}".format(channel=channel, process=process)
for idx, coef in enumerate(histfunc.coefList()):
if coef.GetName() == coefname:
if coef.GetName() in ("n_exp_" + postfix, "n_exp_final_" + postfix):
if self.verbose:
print("Injecting external morph for " + coefname)
print("Injecting external morph for " + funcname)
histfunc.injectExternalMorph(idx, func)
break

Expand Down

0 comments on commit 6ca7196

Please sign in to comment.