diff --git a/VHbbAnalysis/Heppy/python/vhbbobj.py b/VHbbAnalysis/Heppy/python/vhbbobj.py index b1d471abe4bb1..d04381de7f7d9 100644 --- a/VHbbAnalysis/Heppy/python/vhbbobj.py +++ b/VHbbAnalysis/Heppy/python/vhbbobj.py @@ -176,6 +176,14 @@ NTupleVariable("sumEt", lambda x : x.sumEt() ), ]) +primaryVertexType = NTupleObjectType("primaryVertex", variables = [ + NTupleVariable("x", lambda x : x.x()), + NTupleVariable("y", lambda x : x.y()), + NTupleVariable("z", lambda x : x.z()), +# NTupleVariable("score", lambda x : x.mass()), # to be added for 74X +]) + + def ptRel(p4,axis): a=ROOT.TVector3(axis.Vect().X(),axis.Vect().Y(),axis.Vect().Z()) o=ROOT.TLorentzVector(p4.Px(),p4.Py(),p4.Pz(),p4.E()) diff --git a/VHbbAnalysis/Heppy/test/vhbb.py b/VHbbAnalysis/Heppy/test/vhbb.py index 81b404fb34b8e..a6c2aaec3134d 100755 --- a/VHbbAnalysis/Heppy/test/vhbb.py +++ b/VHbbAnalysis/Heppy/test/vhbb.py @@ -70,6 +70,7 @@ "cleanJetsAll" : NTupleCollection("Jet", jetTypeVHbb, 15, help="Cental+fwd jets after full selection and cleaning, sorted by b-tag"), "selectedTaus" : NTupleCollection("TauGood", tauTypeVHbb, 3, help="Taus after the preselection"), "softActivityJets" : NTupleCollection("softActivityJets", fourVectorType, 5, help="jets made for soft activity"), + "goodVertices" : NTupleCollection("primaryVertices", primaryVertexType, 4, help="first four PVs"), #dump of gen objects "genJets" : NTupleCollection("GenJet", genParticleType, 15, help="Generated top quarks from hard scattering",filter=lambda x: x.pt() > 20,mcOnly=True), @@ -86,6 +87,7 @@ #"genZbosonsToLL" : NTupleCollection("GenZbosonsToLL", genParticleType, 6, help="Generated W or Z bosons decaying to LL"), #"genWbosonsToLL" : NTupleCollection("GenWbosonsToLL", genParticleType, 6, help="Generated W or Z bosons decaying to LL"), "genvbosons" : NTupleCollection("GenVbosons", genParticleType, 6, help="Generated W or Z bosons, mass > 30"), + } )