Commit a669b47a authored by Dennis Noll's avatar Dennis Noll
Browse files

[recipes] tth+common: now uses cone pt lepton for DNN input

parent 054a254d
......@@ -133,7 +133,7 @@ class Base:
hl = self.hl
param = self.param
return {
"lep": ("lep", 1, common + ("pdgId", "charge"), np.float32, {"groups": ["multiclass", "eval", "input", "part"]}),
"lep": ("lep_cone", 1, common + ("pdgId", "charge"), np.float32, {"groups": ["multiclass", "eval", "input", "part"]}),
"jet": ("analysis_jets", 6, common + ("btagDeepFlavB",), np.float32, {"groups": ["multiclass", "eval", "input", "part"]}),
"fat": ("good_fat_bjets", 1, common + fat_jet_vars, np.float32, {"groups": ["multiclass", "eval", "input", "part"]}),
"met": ("metp4", 0, common, np.float32, {"groups": ["multiclass", "eval", "input", "part"]}),
......
......@@ -824,9 +824,19 @@ class Base(common.NeutrinoBase, common.Base):
ak.argsort(presel_electrons.cone_pt, ascending=False)
][:, :2]
sync_muons = presel_muons[ak.argsort(presel_muons.cone_pt, ascending=False)][..., :2]
good_electrons = lep[np.abs(lep.pdgId) == 11]
good_muons = lep[np.abs(lep.pdgId) == 13]
lepp4 = lep.sum()
lep_cone = ak.zip(
dict(
pt=lep.cone_pt,
eta=lep.eta,
phi=lep.phi,
mass=lep.mass,
pdgId=lep.pdgId,
charge=lep.charge,
),
with_name="PtEtaPhiMCandidate",
)
lepp4 = lep_cone.sum()
b_sort = ak.argsort(presel_jets.btagDeepFlavB, ascending=False)
bjets = presel_jets[b_sort[:, :2]]
......@@ -836,7 +846,7 @@ class Base(common.NeutrinoBase, common.Base):
analysis_jets = ak.concatenate([bjets, lightjets[:, :4]], axis=1, merge=False)
metp4 = util.get_metp4(met)
hww_visible = lep + wjets.sum(axis=-1)
hww_visible = lep_cone + wjets.sum(axis=-1)
neutrino = self.neutrino_reco(
np.stack(
(
......@@ -882,7 +892,7 @@ class Base(common.NeutrinoBase, common.Base):
m_wlep = wlep.mass
pt_wlep = wlep.pt
(min_dr_lepbjets,) = util.min_dr_part1_part2(lep, bjets, getn=1)
(min_dr_lepbjets,) = util.min_dr_part1_part2(lep_cone, bjets, getn=1)
dphi_hbb_hww = abs(hbb.delta_phi(hww))
dphi_hbb_hwwvis = abs(hbb.delta_phi(wjj + lepp4))
......@@ -911,12 +921,11 @@ class Base(common.NeutrinoBase, common.Base):
vbf_pair_mass = util.normalize(vbf_dijets.mass, pad=True, fill=0)
vbf_pairs_absdeltaeta = util.normalize(vbf_pairs_absdeltaeta, pad=True, fill=0)
lep_conept = util.normalize(lep.cone_pt, pad=True)
lep_conept = util.normalize(lep_cone.pt, pad=True)
eventshapes = util.get_eventshape_variables(
met_or_nu=neutrino,
leps=lep,
leps=lep_cone,
jets=presel_jets, # use analysis_jets here?
)
sphericity = eventshapes.sphericity
......@@ -938,7 +947,7 @@ class Base(common.NeutrinoBase, common.Base):
eventshapes_met = util.get_eventshape_variables(
met_or_nu=metp4,
leps=lep,
leps=lep_cone,
jets=presel_jets, # use analysis_jets here?
)
sphericity_met = eventshapes_met.sphericity
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment