Skip to content

Commit

Permalink
Merge branch 'columnflow:master' into run3_working_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
haddadanas authored May 15, 2024
2 parents 29e22aa + f8a1606 commit b98b3fd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions columnflow/production/cms/btag.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ def add_weight(syst_name, syst_direction, column_name):
direction,
f"btag_weight_{name}_{direction}",
)
if syst_name in ["cferr1", "cferr2"]:
# for c flavor uncertainties, multiply the uncertainty with the nominal btag weight
events = set_ak_column(
events,
f"btag_weight_{name}_{direction}",
events.btag_weight * events[f"btag_weight_{name}_{direction}"],
value_type=np.float32,
)
elif self.shift_is_known_jec_source:
# TODO: year dependent jec variations fully covered?
events = add_weight(
Expand Down

0 comments on commit b98b3fd

Please sign in to comment.