Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added prompt genleptons collection to ntuples #669

Open
wants to merge 1 commit into
base: vhbbHeppy80X
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion VHbbAnalysis/Heppy/python/VHGeneratorAnalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def makeMCInfo(self, event):
event.vh_genHiggsBosons = []
event.vh_genHiggsSisters = []
event.vh_genleps = []
event.vh_genlepsprompt = []
event.vh_gentauleps = []
event.vh_gentaus = []
event.vh_genlepsRecovered = []
Expand All @@ -241,7 +242,10 @@ def makeMCInfo(self, event):
)
event.vh_gengluonfromt = filter(lambda x: x.p4().Pt>20, event.vh_gengluonfromt)
event.vh_gengluonfromb = filter(lambda x: x.p4().Pt>20, event.vh_gengluonfromb)

event.vh_genlepsprompt = sorted(
[p for p in event.genParticles if abs(p.pdgId()) in [11,13] and (p.isPromptFinalState() or p.isDirectPromptTauDecayProductFinalState())],
key=lambda x: x.p4().Pt()
)
#event.vh_genHiggsToBB = [ p for p in event.genParticles if abs(p.pdgId())==25 and p.numberOfDaughters()==2 and abs(p.daughter(0).pdgId()) == 5 ]

#event.vh_genvbosonsToLL = [ p for p in event.genParticles if abs(p.pdgId()) in [23,24] and abs(p.mother().pdgId()) in [23,24] and p.numberOfDaughters()==2 and abs(p.daughter(0).pdgId()) in [11,13,15] ]
Expand Down
1 change: 1 addition & 0 deletions VHbbAnalysis/Heppy/test/vhbb.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
"vh_gengluonfromt" : NTupleCollection("GenGluonFromTop", genParticleType, 4, help="Generated gluons from top quarks",mcOnly=True),
"vh_genwzquarks" : NTupleCollection("GenWZQuark", genParticleType, 6, help="Generated quarks from W/Z decays",mcOnly=True),
"vh_genleps" : NTupleCollection("GenLep", genParticleWithAncestryType, 6, help="Generated leptons from W/Z/Higgs decays",mcOnly=True),
"vh_genlepsprompt" : NTupleCollection("GenLeptonsPrompt", genParticleWithAncestryType, 15, help="Generated prompt leptons",mcOnly=True),
"gennus" : NTupleCollection("GenNu", genParticleWithAncestryType, 6, help="Generated neutrino from W/Z decays",mcOnly=True),
"gentaus" : NTupleCollection("GenTaus", genParticleWithAncestryType, 6, help="Generated taus",mcOnly=True),
"gennusFromTau" : NTupleCollection("GenNuFromTau", genParticleType, 8, help="Generated neutrino from tau decay",mcOnly=True),
Expand Down