CMS 3D CMS Logo

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

Public Member Functions

def __getattr__ (self, attr)
 
def __init__ (self, tree, index, tpindex, prefix)
 
def trackingParticle (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

 _tpindex
 

Detailed Description

Class representing a match to a TrackingParticle.

The point of this class is to provide, in addition to the matched
TrackingParticle, also other information about the match (e.g.
shared hit fraction for tracks/seeds).

Definition at line 548 of file ntupleDataFormat.py.

Constructor & Destructor Documentation

def ntupleDataFormat.TrackingParticleMatchInfo.__init__ (   self,
  tree,
  index,
  tpindex,
  prefix 
)
Constructor.

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

Definition at line 556 of file ntupleDataFormat.py.

556  def __init__(self, tree, index, tpindex, prefix):
557  """Constructor.
558 
559  Arguments:
560  tree -- TTree object
561  index -- Index of the object (track/seed) matched to TrackingParticle
562  tpindex -- Index of the TrackingParticle match (second index in _simTrkIdx branch)
563  prefix -- String for prefix of the object (track/seed) matched to TrackingParticle
564  """
565  super(TrackingParticleMatchInfo, self).__init__(tree, index, prefix)
566  self._tpindex = tpindex
567 
def __init__(self, tree, index, tpindex, prefix)

Member Function Documentation

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

Definition at line 568 of file ntupleDataFormat.py.

References ntupleDataFormat.TrackingParticleMatchInfo._tpindex.

568  def __getattr__(self, attr):
569  """Custom __getattr__ because of the second index needed to access the branch."""
570  val = super(TrackingParticleMatchInfo, self).__getattr__(attr)()[self._tpindex]
571  return lambda: val
572 
def ntupleDataFormat.TrackingParticleMatchInfo.trackingParticle (   self)

Member Data Documentation

ntupleDataFormat.TrackingParticleMatchInfo._tpindex
private