Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions columnflow/production/cmsGhent/btag_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ def fixed_wp_btag_weights(
# get the total number of jets in the chunk
jets = events.Jet[jet_mask] if jet_mask is not None else events.Jet
jets = set_ak_column(jets, "abseta", abs(jets.eta))
# currently set hard max on pt for efficiency since overflow could not be changed in correctionlib
# (could also manually change the flow)
jets = set_ak_column(jets, "minpt", ak.where(jets.pt <= 999, jets.pt, 999))

# helper to create and store the weight
def add_weight(flavour_group, systematic, variation=None):
Expand Down Expand Up @@ -185,9 +188,7 @@ def sf_eff_wp(working_point, none_value=0.):
)
eff = self.btag_eff_corrector(
flat_input.hadronFlavour,
# currently set hard max on pt since overflow could not be changed in correctionlib
# (could also manually change the flow)
ak.min([flat_input.pt, 999 * ak.ones_like(flat_input.pt)], axis=0),
flat_input.minpt,
flat_input.abseta,
working_point,
)
Expand Down
Loading