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 Member Functions
ntuple.TrackingParticle Class Reference
Inheritance diagram for ntuple.TrackingParticle:
ntuple._Object ntuple._SimHitAdaptor

Public Member Functions

def __init__
 
def decayVertices
 
def matchedTrackInfos
 
def nMatchedTracks
 
def parentVertex
 
- Public Member Functions inherited from ntuple._Object
def __getattr__
 
def __init__
 
def index
 
def isValid
 
- Public Member Functions inherited from ntuple._SimHitAdaptor
def __init__
 
def nSimHits
 
def simHits
 

Private Member Functions

def _nMatchedTracks
 

Detailed Description

Class representing a TrackingParticle.

Definition at line 704 of file ntuple.py.

Constructor & Destructor Documentation

def ntuple.TrackingParticle.__init__ (   self,
  tree,
  index 
)
Constructor.

Arguments:
tree  -- TTree object
index -- Index of the TrackingParticle

Definition at line 706 of file ntuple.py.

707  def __init__(self, tree, index):
708  """Constructor.
709 
710  Arguments:
711  tree -- TTree object
712  index -- Index of the TrackingParticle
713  """
714  super(TrackingParticle, self).__init__(tree, index, "sim")

Member Function Documentation

def ntuple.TrackingParticle._nMatchedTracks (   self)
private
Internal function to get the number of matched tracks.

Definition at line 715 of file ntuple.py.

References SeedingNode< DATA >._index, Vispa.Share.FindAlgorithm.FindAlgorithm._index, RPCMuonExtraStruct._index, python.cmstools.EventTree._index, ntuple._Object._index, python.cmstools.EventBranch._index, html.HtmlReport._index, and findQualityFiles.size.

Referenced by ntuple.TrackingParticle.matchedTrackInfos(), and ntuple.TrackingParticle.nMatchedTracks().

716  def _nMatchedTracks(self):
717  """Internal function to get the number of matched tracks."""
718  return self._tree.sim_trkIdx[self._index].size()
tuple size
Write out results.
def ntuple.TrackingParticle.decayVertices (   self)
Returns a generator for decay vertices.

The generator returns TrackingVertex objects.

Definition at line 738 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, ntuple._Collection._tree, python.cmstools.EventTree._tree, and ntuple._Object._tree.

739  def decayVertices(self):
740  """Returns a generator for decay vertices.
741 
742  The generator returns TrackingVertex objects.
743  """
744  self._checkIsValid()
745  for ivtx in self._tree.sim_decayVtxIdx[self._index]:
746  yield TrackingVertex(self._tree, ivtx)
def _checkIsValid
Definition: ntuple.py:97
def ntuple.TrackingParticle.matchedTrackInfos (   self)
Returns a generator for matched tracks.

The generator returns TrackMatchInfo objects.

Definition at line 724 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, ntuple.TrackingParticle._nMatchedTracks(), CommonAnalyzer._prefix, ntuple._Object._prefix, html.PageSet._prefix, ntuple._Collection._tree, python.cmstools.EventTree._tree, and ntuple._Object._tree.

725  def matchedTrackInfos(self):
726  """Returns a generator for matched tracks.
727 
728  The generator returns TrackMatchInfo objects.
729  """
730  self._checkIsValid()
731  for imatch in xrange(self._nMatchedTracks()):
732  yield TrackMatchInfo(self._tree, self._index, imatch, self._prefix)
def _checkIsValid
Definition: ntuple.py:97
def ntuple.TrackingParticle.nMatchedTracks (   self)
Returns the number of matched tracks.

Definition at line 719 of file ntuple.py.

References ntuple._Object._checkIsValid(), and ntuple.TrackingParticle._nMatchedTracks().

720  def nMatchedTracks(self):
721  """Returns the number of matched tracks."""
722  self._checkIsValid()
723  return self._nMatchedTracks()
def _checkIsValid
Definition: ntuple.py:97
def ntuple.TrackingParticle.parentVertex (   self)
Returns the parent TrackingVertex.

Definition at line 733 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, ntuple._Collection._tree, python.cmstools.EventTree._tree, and ntuple._Object._tree.

734  def parentVertex(self):
735  """Returns the parent TrackingVertex."""
736  self._checkIsValid()
737  return TrackingVertex(self._tree, self._tree.sim_parentVtxIdx[self._index])
def _checkIsValid
Definition: ntuple.py:97