test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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__
 
def __init__
 
def trackingParticle
 
- Public Member Functions inherited from ntuple._Object
def __getattr__
 
def __init__
 
def index
 
def isValid
 

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 403 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 410 of file ntuple.py.

411  def __init__(self, tree, index, tpindex, prefix):
412  """Constructor.
413 
414  Arguments:
415  tree -- TTree object
416  index -- Index of the object (track/seed/hit) matched to TrackingParticle
417  tpindex -- Index of the TrackingParticle match (second index in _simTrkIdx branch)
418  prefix -- String for prefix of the object (track/seed/hit) matched to TrackingParticle
419  """
420  super(TrackingParticleMatchInfo, self).__init__(tree, index, prefix)
421  self._tpindex = tpindex

Member Function Documentation

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

Definition at line 422 of file ntuple.py.

References ntuple.TrackingParticleMatchInfo._tpindex.

423  def __getattr__(self, attr):
424  """Custom __getattr__ because of the second index needed to access the branch."""
425  return lambda: super(TrackingParticleMatchInfo, self).__getattr__(attr)()[self._tpindex]
def ntuple.TrackingParticleMatchInfo.trackingParticle (   self)
Returns matched TrackingParticle.

Definition at line 426 of file ntuple.py.

References ntuple._Object._checkIsValid(), SeedingNode< DATA >._index, Vispa.Share.FindAlgorithm.FindAlgorithm._index, RPCMuonExtraStruct._index, python.cmstools.EventTree._index, ntuple._Object._index, python.cmstools.EventBranch._index, html.HtmlReport._index, CommonAnalyzer._prefix, ntuple._Object._prefix, html.PageSet._prefix, ntuple.TrackingParticleMatchInfo._tpindex, ntuple._Collection._tree, python.cmstools.EventTree._tree, and ntuple._Object._tree.

427  def trackingParticle(self):
428  """Returns matched TrackingParticle."""
429  self._checkIsValid()
430  return TrackingParticle(self._tree, getattr(self._tree, self._prefix+"_simTrkIdx")[self._index][self._tpindex])
def _checkIsValid
Definition: ntuple.py:97

Member Data Documentation

ntuple.TrackingParticleMatchInfo._tpindex
private

Definition at line 420 of file ntuple.py.

Referenced by ntuple.TrackingParticleMatchInfo.__getattr__(), and ntuple.TrackingParticleMatchInfo.trackingParticle().