File indexing completed on 2023-03-17 11:15:47
0001 from PhysicsTools.Heppy.physicsobjects.PhysicsObject import *
0002
0003
0004 import ROOT
0005 def printGenParticle(self):
0006 tmp = '{className} : {pdgId:>3}, pt = {pt:5.1f}, eta = {eta:5.2f}, phi = {phi:5.2f}, mass = {mass:5.2f}'
0007 base= tmp.format( className = self.__class__.__name__,
0008 pdgId = self.pdgId(),
0009 pt = self.pt(),
0010 eta = self.eta(),
0011 phi = self.phi(),
0012 mass = self.mass() )
0013 theStr = '{base}, status = {status:>2}'.format(base=base, status=self.status())
0014 return theStr
0015 setattr(ROOT.reco.GenParticle,"__str__",printGenParticle)
0016
0017
0018 GenParticle = ROOT.reco.GenParticle