CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ntupleDataFormat.SimHitMatchInfo Class Reference
Inheritance diagram for ntupleDataFormat.SimHitMatchInfo:
ntupleDataFormat._Object

Public Member Functions

def __getattr__ (self, attr)
 
def __init__ (self, tree, index, shindex, prefix)
 
def simHit (self)
 
- Public Member Functions inherited from ntupleDataFormat._Object
def __getattr__ (self, attr)
 
def __init__ (self, tree, index, prefix)
 
def index (self)
 
def isValid (self)
 

Private Attributes

 _shindex
 

Detailed Description

Class representing a match to a SimHit.

The point of this class is to provide, in addition to the matched
SimHit, also other information about the match (e.g. fraction of
charge from this SimHit).

Definition at line 547 of file ntupleDataFormat.py.

Constructor & Destructor Documentation

def ntupleDataFormat.SimHitMatchInfo.__init__ (   self,
  tree,
  index,
  shindex,
  prefix 
)
Constructor.

Arguments:
tree    -- TTree object
index   -- Index of the hit matched to SimHit
shindex -- Index of the SimHit match (second index in _simHitIdx branch)
prefix  -- String for prefix of the object (track/seed/hit) matched to TrackingParticle

Definition at line 554 of file ntupleDataFormat.py.

554  def __init__(self, tree, index, shindex, prefix):
555  """Constructor.
556 
557  Arguments:
558  tree -- TTree object
559  index -- Index of the hit matched to SimHit
560  shindex -- Index of the SimHit match (second index in _simHitIdx branch)
561  prefix -- String for prefix of the object (track/seed/hit) matched to TrackingParticle
562  """
563  super(SimHitMatchInfo, self).__init__(tree, index, prefix)
564  self._shindex = shindex
565 
def __init__(self, tree, index, shindex, prefix)

Member Function Documentation

def ntupleDataFormat.SimHitMatchInfo.__getattr__ (   self,
  attr 
)
Custom __getattr__ because of the second index needed to access the branch.

Definition at line 566 of file ntupleDataFormat.py.

References ntupleDataFormat.SimHitMatchInfo._shindex.

566  def __getattr__(self, attr):
567  """Custom __getattr__ because of the second index needed to access the branch."""
568  val = super(SimHitMatchInfo, self).__getattr__(attr)()[self._shindex]
569  return lambda: val
570 
def ntupleDataFormat.SimHitMatchInfo.simHit (   self)

Member Data Documentation

ntupleDataFormat.SimHitMatchInfo._shindex
private