Skip to content

Commit

Permalink
layout bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rkansal47 committed Sep 11, 2023
1 parent e98309f commit 4df9750
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/HHbbVV/processors/bbVVSkimmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ def process(self, events: ak.Array):
ak4_jet_vars = {}

jets, _ = get_jec_jets(events, year, isData, self.jecs, fatjets=False)
print("fatjet", fatjets)

vbf_jet_mask = (
jets.isTight
Expand Down Expand Up @@ -566,11 +565,6 @@ def process(self, events: ak.Array):
weights.add("genweight", gen_weights)

add_pileup_weight(weights, year, events.Pileup.nPU.to_numpy())
# print(len(vbf_jets),type(vbf_jets.pt.layout.content),vbf_jets.pt.layout.content)
# print(dir(vbf_jets.pt.layout.content))
# print(dir(JetArray(vbf_jets).pt.layout.content))
# print(JetArray(vbf_jets).pt.layout.content.offsets)
# print(vbf_jets.pt.layout.content.offsets)
add_pileupid_weights(weights, year, vbf_jets, events.GenJet, wp="M") # this gives error
add_VJets_kFactors(weights, events.GenPart, dataset)

Expand Down
3 changes: 2 additions & 1 deletion src/HHbbVV/processors/corrections.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,9 @@ def add_pileupid_weights(weights: Weights, year: str, jets: JetArray, genjets, w
jets = jets[ak.any(jets.metric_table(genjets) < 0.4, axis=-1)]

sf_cset = correctionlib.CorrectionSet.from_file(get_pog_json("jmar", year))["PUJetID_eff"]

# save offsets to reconstruct jagged shape
offsets = jets.pt.layout.content.offsets
offsets = jets.pt.layout.offsets

sfs_var = []
for var in ["nom", "up", "down"]:
Expand Down

0 comments on commit 4df9750

Please sign in to comment.