CMS 3D CMS Logo

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

Public Member Functions

def __getattr__ (self, attr)
 
def __init__ (self, tree, index, tpindex, prefix)
 
def trackingParticle (self)
 
- Public Member Functions inherited from ntuple._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 or SimHit information for hits.

Definition at line 417 of file ntuple.py.

Constructor & Destructor Documentation

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

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

Definition at line 424 of file ntuple.py.

424  def __init__(self, tree, index, tpindex, prefix):
425  """Constructor.
426 
427  Arguments:
428  tree -- TTree object
429  index -- Index of the object (track/seed/hit) matched to TrackingParticle
430  tpindex -- Index of the TrackingParticle match (second index in _simTrkIdx branch)
431  prefix -- String for prefix of the object (track/seed/hit) matched to TrackingParticle
432  """
433  super(TrackingParticleMatchInfo, self).__init__(tree, index, prefix)
434  self._tpindex = tpindex
435 
def __init__(self, tree, index, tpindex, prefix)
Definition: ntuple.py:424

Member Function Documentation

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

Definition at line 436 of file ntuple.py.

References ntuple.TrackingParticleMatchInfo._tpindex.

436  def __getattr__(self, attr):
437  """Custom __getattr__ because of the second index needed to access the branch."""
438  return lambda: super(TrackingParticleMatchInfo, self).__getattr__(attr)()[self._tpindex]
439 
def __getattr__(self, attr)
Definition: ntuple.py:436
def ntuple.TrackingParticleMatchInfo.trackingParticle (   self)

Member Data Documentation

ntuple.TrackingParticleMatchInfo._tpindex
private