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

◆ __init__()

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 

Member Function Documentation

◆ __copy__()

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

Definition at line 11 of file PhysicsObject.py.

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 

References PhysicsObject.PhysicsObject.physObj.

Referenced by ConfigToolBase.ConfigToolBase.apply().

◆ __getattr__()

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.

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 

References PhysicsObject.PhysicsObject.physObj.

◆ scaleEnergy()

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 

References p4, and PhysicsObject.PhysicsObject.physObj.

Member Data Documentation

◆ physObj

PhysicsObject.PhysicsObject.physObj
p4
double p4[4]
Definition: TauolaWrapper.h:92