Skip to content

Commit

Permalink
adding primary vertex information. close vhbb/cms-sw#31
Browse files Browse the repository at this point in the history
  • Loading branch information
arizzi committed Apr 2, 2015
1 parent f5f2eab commit da21717
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions VHbbAnalysis/Heppy/python/vhbbobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 2 additions & 0 deletions VHbbAnalysis/Heppy/test/vhbb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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"),

}
)

Expand Down

0 comments on commit da21717

Please sign in to comment.