Commit 73cb8548 authored by Mike Hance's avatar Mike Hance
Browse files

adding lep2/3 kinematics

parent 3b9ba653
Pipeline #3184388 passed with stages
in 17 minutes and 17 seconds
......@@ -141,6 +141,14 @@ class Hists:
self.addbranch("lep1Eta", 'f')
self.addbranch("lep1Phi", 'f')
self.addbranch("lep2PT", 'f')
self.addbranch("lep2Eta", 'f')
self.addbranch("lep2Phi", 'f')
self.addbranch("lep3PT", 'f')
self.addbranch("lep3Eta", 'f')
self.addbranch("lep3Phi", 'f')
self.addbranch("tau1PT", 'f')
self.addbranch("tau1Eta", 'f')
self.addbranch("tau1Phi", 'f')
......@@ -192,6 +200,14 @@ class Hists:
event.sortedleptons[0].P4() if len(event.sortedleptons) > 0 else None
)
subleadingLep = (
event.sortedleptons[1].P4() if len(event.sortedleptons) > 1 else None
)
subsubleadingLep = (
event.sortedleptons[2].P4() if len(event.sortedleptons) > 2 else None
)
muonsmomentum=ROOT.TLorentzVector()
muonsmomentum.SetPtEtaPhiM(0,0,0,0)
for m in event.muons:
......@@ -316,6 +332,24 @@ class Hists:
self.branches["lep1Eta"][0] = defaultfill
self.branches["lep1Phi"][0] = defaultfill
if subleadingLep:
self.branches["lep2PT"][0] = leadingLep.Pt()
self.branches["lep2Eta"][0] = leadingLep.Eta()
self.branches["lep2Phi"][0] = leadingLep.Phi()
else:
self.branches["lep2PT"][0] = defaultfill
self.branches["lep2Eta"][0] = defaultfill
self.branches["lep2Phi"][0] = defaultfill
if subsubleadingLep:
self.branches["lep3PT"][0] = leadingLep.Pt()
self.branches["lep3Eta"][0] = leadingLep.Eta()
self.branches["lep3Phi"][0] = leadingLep.Phi()
else:
self.branches["lep3PT"][0] = defaultfill
self.branches["lep3Eta"][0] = defaultfill
self.branches["lep3Phi"][0] = defaultfill
self.tree.Fill()
......
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