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 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ __copy__()

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

Definition at line 11 of file PhysicsObject.py.

References PhysicsObject.PhysicsObject.physObj.

Referenced by ConfigToolBase.ConfigToolBase.apply().

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 

◆ __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.

References PhysicsObject.PhysicsObject.physObj.

Referenced by datamodel.Event.__getitem__(), and datamodel.Object.__getitem__().

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 
30 

◆ scaleEnergy()

def PhysicsObject.PhysicsObject.scaleEnergy (   self,
  scale 
)

Definition at line 19 of file PhysicsObject.py.

References PhysicsObject.PhysicsObject.physObj.

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

Member Data Documentation

◆ physObj