diff --git a/src/HHbbVV/processors/bbVVSkimmer.py b/src/HHbbVV/processors/bbVVSkimmer.py index 9ec321e7..3b0c80cd 100644 --- a/src/HHbbVV/processors/bbVVSkimmer.py +++ b/src/HHbbVV/processors/bbVVSkimmer.py @@ -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 @@ -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,