Skip to content

Commit

Permalink
wqq discriminant
Browse files Browse the repository at this point in the history
  • Loading branch information
rkansal47 committed Feb 9, 2024
1 parent 5201875 commit b2aef91
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/HHbbVV/processors/bbVVSkimmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,19 +482,13 @@ def process(self, events: ak.Array):
)
add_selection("ak8bb_txbb", txbb_cut, *selection_args)

# XHY->bbWW Semi-resolved Channel Veto
Wqq_excess = ak.count(
fatjets["particleNet_H4qvsQCD"][fatjets["particleNet_H4qvsQCD"] >= 0.8], axis=-1
# XHY->bbWW semi-resolved channel veto
Wqq_score = (fatjets.particleNetMD_Xqq + fatjets.particleNetMD_Xcc) / (
fatjets.particleNetMD_Xqq + fatjets.particleNetMD_Xcc + fatjets.particleNetMD_QCD
)

# if Wqq_excess for an event is == 2 then we need to make sure that the Hbb is included in these two
Wqq_cut = (Wqq_excess < 3) & (
((Wqq_excess == 2) & (ak8FatJetVars["ak8FatJetParticleNet_Th4q"][bb_mask] >= 0.8))
| (Wqq_excess < 2)
)

# add_selection("ak8_semi_resolved_Wqq", Wqq_cut, *selection_args)
skimmed_events["ak8_semi_resolved_Wqq"] = Wqq_cut.to_numpy()
print("Num W tagged:", ak.sum(Wqq_score >= 0.8, axis=1).to_numpy())
skimmed_events["ak8FatJetNumWTagged"] = ak.sum(Wqq_score >= 0.8, axis=1).to_numpy()

# 2018 HEM cleaning
# https://indico.cern.ch/event/1249623/contributions/5250491/attachments/2594272/4477699/HWW_0228_Draft.pdf
Expand Down Expand Up @@ -730,9 +724,11 @@ def process(self, events: ak.Array):
sel_events = events[sel_all][selector]
selected_sfs[key] = get_lund_SFs(
sel_events,
i
if self._save_all
else skimmed_events["ak8FatJetHVV"][selector][:, 1],
(
i
if self._save_all
else skimmed_events["ak8FatJetHVV"][selector][:, 1]
),
num_prongs,
gen_quarks[selector],
trunc_gauss=False,
Expand Down

0 comments on commit b2aef91

Please sign in to comment.