diff --git a/VHbbAnalysis/Heppy/python/VHGeneratorAnalyzer.py b/VHbbAnalysis/Heppy/python/VHGeneratorAnalyzer.py index 01863d3838088..209a1810971c4 100644 --- a/VHbbAnalysis/Heppy/python/VHGeneratorAnalyzer.py +++ b/VHbbAnalysis/Heppy/python/VHGeneratorAnalyzer.py @@ -144,6 +144,7 @@ def makeMCInfo(self, event): print "" event.genHiggsBoson = [] + event.genHiggsSisters = [] event.genleps = [] event.gentauleps = [] event.gentaus = [] @@ -175,6 +176,10 @@ def makeMCInfo(self, event): higgsBosons = [ p for p in event.genParticles if (p.pdgId() == 25) and p.numberOfDaughters() > 0 and abs(p.daughter(0).pdgId()) != 25 ] + higgsBosonsFirst = [ p for p in event.genParticles if (p.pdgId() == 25) and p.numberOfMothers() > 0 and abs(p.mother(0).pdgId()) != 25 ] + higgsMothers = [x.mother(0) for x in higgsBosonsFirst] + #print higgsMothers + event.genHiggsSisters = [p for p in event.genParticles if p.mother(0) in higgsMothers and p.pdgId() != 25 ] if len(higgsBosons) == 0: event.genHiggsDecayMode = 0 diff --git a/VHbbAnalysis/Heppy/test/vhbb.py b/VHbbAnalysis/Heppy/test/vhbb.py index 938e4bbc881bc..d9ec887711071 100755 --- a/VHbbAnalysis/Heppy/test/vhbb.py +++ b/VHbbAnalysis/Heppy/test/vhbb.py @@ -97,8 +97,9 @@ "goodVertices" : NTupleCollection("primaryVertices", primaryVertexType, 4, help="first four PVs"), #dump of gen objects - "generatorSummary" : NTupleCollection("GenSummary", genParticleWithLinksType, 30, help="Generator summary, see description in Heppy GeneratorAnalyzer",mcOnly=True), + #"generatorSummary" : NTupleCollection("GenSummary", genParticleWithLinksType, 30, help="Generator summary, see description in Heppy GeneratorAnalyzer",mcOnly=True), #"genJets" : NTupleCollection("GenJet", genParticleType, 15, help="Generated jets with hadron matching, sorted by pt descending",filter=lambda x: x.pt() > 20,mcOnly=True), + "genHiggsSisters" : NTupleCollection("GenHiggsSisters", genParticleType, 4, help="Sisters of the Higgs bosons"), "gentopquarks" : NTupleCollection("GenTop", genParticleType, 4, help="Generated top quarks from hard scattering"), "gennusFromTop" : NTupleCollection("GenNuFromTop", genParticleType, 4, help="Generated neutrino from t->W decay"), "genbquarksFromH" : NTupleCollection("GenBQuarkFromH", genParticleType, 4, help="Generated bottom quarks from Higgs decays"),