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 577 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 585 of file ntupleDataFormat.py.

585  def __init__(self, tree, index, tpindex, prefix):
586  """Constructor.
587 
588  Arguments:
589  tree -- TTree object
590  index -- Index of the object (track/seed) matched to TrackingParticle
591  tpindex -- Index of the TrackingParticle match (second index in _simTrkIdx branch)
592  prefix -- String for prefix of the object (track/seed) matched to TrackingParticle
593  """
594  super(TrackingParticleMatchInfo, self).__init__(tree, index, prefix)
595  self._tpindex = tpindex
596 
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.

Note that when mapping the 'attr' to a branch, a 'simTrk' is
prepended and the first letter of 'attr' is turned to upper
case.

Definition at line 597 of file ntupleDataFormat.py.

References ntupleDataFormat.TrackingParticleMatchInfo._tpindex, and pfDeepBoostedJetPreprocessParams_cfi.upper.

597  def __getattr__(self, attr):
598  """Custom __getattr__ because of the second index needed to access the branch.
599 
600  Note that when mapping the 'attr' to a branch, a 'simTrk' is
601  prepended and the first letter of 'attr' is turned to upper
602  case.
603  """
604  val = super(TrackingParticleMatchInfo, self).__getattr__("simTrk"+attr[0].upper()+attr[1:])()[self._tpindex]
605  return lambda: val
606 
def ntupleDataFormat.TrackingParticleMatchInfo.trackingParticle (   self)

Member Data Documentation

ntupleDataFormat.TrackingParticleMatchInfo._tpindex
private