Skip to content

Commit

Permalink
Merge pull request #46 from rkansal47/vbfhbb_muons
Browse files Browse the repository at this point in the history
Add VBF Hbb muons
  • Loading branch information
rkansal47 authored Feb 19, 2024
2 parents 4a8268a + 0c0e585 commit 8f35580
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
7 changes: 4 additions & 3 deletions src/HHbbVV/postprocessing/InferenceAnalysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@
"]\n",
"\n",
"for mX, mY in res_mps:\n",
" res_samples[\n",
" f\"X[{mX}]->H(bb)Y[{mY}](WW)\"\n",
" ] = f\"NMSSM_XToYH_MX{mX}_MY{mY}_HTo2bYTo2W_hadronicDecay\"\n",
" res_samples[f\"X[{mX}]->H(bb)Y[{mY}](WW)\"] = (\n",
" f\"NMSSM_XToYH_MX{mX}_MY{mY}_HTo2bYTo2W_hadronicDecay\"\n",
" )\n",
"\n",
"res_sig_keys = list(res_samples.keys())\n",
"nonres_sig_keys = [\"HHbbVV\"]"
Expand Down Expand Up @@ -310,6 +310,7 @@
" sample2...\n",
"}\n",
"\"\"\"\n",
"\n",
"pt_key = \"Pt\"\n",
"msd_key = \"Msd\"\n",
"var_prefix = \"ak8FatJet\"\n",
Expand Down
21 changes: 15 additions & 6 deletions src/HHbbVV/processors/bbVVSkimmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def process(self, events: ak.Array):

electrons, muons = events.Electron, events.Muon

# selection from https://github.com/jennetd/hbb-coffea/blob/85bc3692be9e0e0a0c82ae3c78e22cdf5b3e4d68/boostedhiggs/vhbbprocessor.py#L283-L307
# VBF Hbb selection from https://github.com/jennetd/hbb-coffea/blob/85bc3692be9e0e0a0c82ae3c78e22cdf5b3e4d68/boostedhiggs/vhbbprocessor.py#L283-L307
# https://indico.cern.ch/event/1154430/#b-471403-higgs-meeting-special

goodelectronHbb = (
Expand All @@ -545,7 +545,15 @@ def process(self, events: ak.Array):
)
nelectronsHbb = ak.sum(goodelectronHbb, axis=1)

# if using HH4b lepton vetoes:
goodmuonHbb = (
(events.Muon.pt > 10)
& (abs(events.Muon.eta) < 2.4)
& (events.Muon.pfRelIso04_all < 0.25)
& events.Muon.looseId
)
nmuonsHbb = ak.sum(goodmuonHbb, axis=1)

# HH4b lepton vetoes:
# https://cms.cern.ch/iCMS/user/noteinfo?cmsnoteid=CMS%20AN-2020/231 Section 7.1.2
# In order to be considered in the lepton veto step, a muon (electron) is required to to pass the selections described in Section 5.2, and to have pT > 15 GeV (pT > 20 GeV), and |η| < 2.4 (2.5).
# A muon is also required to pass loose identification criteria as detailed in [35] and mini-isolation
Expand All @@ -559,17 +567,18 @@ def process(self, events: ak.Array):
)
nelectronsHH = ak.sum(goodelectronHH, axis=1)

goodmuon = (
goodmuonHH = (
(events.Muon.pt > 15)
& (abs(events.Muon.eta) < 2.4)
& (events.Muon.miniPFRelIso_all < 0.4)
& events.Muon.looseId
)
nmuons = ak.sum(goodmuon, axis=1)
nmuonsHH = ak.sum(goodmuonHH, axis=1)

skimmed_events["nGoodMuons"] = nmuons.to_numpy()
skimmed_events["nGoodElectronsHH"] = nelectronsHH.to_numpy()
skimmed_events["nGoodElectronsHbb"] = nelectronsHbb.to_numpy()
skimmed_events["nGoodElectronsHH"] = nelectronsHH.to_numpy()
skimmed_events["nGoodMuonsHbb"] = nmuonsHbb.to_numpy()
skimmed_events["nGoodMuonsHH"] = nmuonsHH.to_numpy()

######################
# Remove branches
Expand Down

0 comments on commit 8f35580

Please sign in to comment.