CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
PhysicsObject.PhysicsObject Class Reference
Inheritance diagram for PhysicsObject.PhysicsObject:

Public Member Functions

def __copy__
 
def __getattr__
 
def __init__
 
def scaleEnergy
 

Public Attributes

 physObj
 

Detailed Description

Wrapper to particle-like C++ objects.

Definition at line 4 of file PhysicsObject.py.

Constructor & Destructor Documentation

def PhysicsObject.PhysicsObject.__init__ (   self,
  physObj 
)

Definition at line 7 of file PhysicsObject.py.

7 
8  def __init__(self, physObj):
9  self.physObj = physObj
10  super(PhysicsObject, self).__init__()

Member Function Documentation

def PhysicsObject.PhysicsObject.__copy__ (   self)
Very dirty trick, the physObj is deepcopied...

Definition at line 11 of file PhysicsObject.py.

References PhysicsObject.PhysicsObject.physObj.

11 
12  def __copy__(self):
13  '''Very dirty trick, the physObj is deepcopied...'''
14  physObj = copy.deepcopy( self.physObj )
15  newone = type(self)(physObj)
16  newone.__dict__.update(self.__dict__)
17  newone.physObj = physObj
18  return newone
def PhysicsObject.PhysicsObject.__getattr__ (   self,
  name 
)
Makes all attributes and methods of the wrapped physObj
directly available.

Definition at line 25 of file PhysicsObject.py.

References PhysicsObject.PhysicsObject.physObj.

25 
26  def __getattr__(self,name):
27  '''Makes all attributes and methods of the wrapped physObj
28  directly available.'''
29  return getattr(self.physObj, name)
30 
def PhysicsObject.PhysicsObject.scaleEnergy (   self,
  scale 
)

Definition at line 19 of file PhysicsObject.py.

19 
20  def scaleEnergy( self, scale ):
21  p4 = self.physObj.p4()
22  p4 *= scale
23  self.physObj.setP4( p4 )
24 

Member Data Documentation

PhysicsObject.PhysicsObject.physObj

Definition at line 8 of file PhysicsObject.py.

Referenced by PhysicsObject.PhysicsObject.__copy__(), PhysicsObject.PhysicsObject.__getattr__(), Electron.Electron.mvaNonTrigV0(), Electron.Electron.mvaTrigNoIPV0(), Electron.Electron.mvaTrigV0(), and Electron.Electron.p4().