CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
PhysicsObject.PhysicsObject Class Reference
Inheritance diagram for PhysicsObject.PhysicsObject:

Public Member Functions

def __copy__ (self)
 
def __getattr__ (self, name)
 
def __init__ (self, physObj)
 
def scaleEnergy (self, scale)
 

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  def __init__(self, physObj):
8  self.physObj = physObj
9  super(PhysicsObject, self).__init__()
10 
def __init__(self, physObj)
Definition: PhysicsObject.py:7

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  def __copy__(self):
12  '''Very dirty trick, the physObj is deepcopied...'''
13  physObj = copy.deepcopy( self.physObj )
14  newone = type(self)(physObj)
15  newone.__dict__.update(self.__dict__)
16  newone.physObj = physObj
17  return newone
18 
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  def __getattr__(self,name):
26  '''Makes all attributes and methods of the wrapped physObj
27  directly available.'''
28  return getattr(self.physObj, name)
29 
def PhysicsObject.PhysicsObject.scaleEnergy (   self,
  scale 
)

Definition at line 19 of file PhysicsObject.py.

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

Member Data Documentation