CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
ntupleDataFormat._TrackingParticleMatchAdaptor Class Reference
Inheritance diagram for ntupleDataFormat._TrackingParticleMatchAdaptor:
ntupleDataFormat.Seed ntupleDataFormat.Track

Public Member Functions

def __init__ (self)
 
def bestMatchingTrackingParticle (self)
 
def bestMatchingTrackingParticleFromFirstHit (self)
 
def bestMatchingTrackingParticleFromFirstHitNormalizedChi2 (self)
 
def bestMatchingTrackingParticleFromFirstHitShareFrac (self)
 
def bestMatchingTrackingParticleFromFirstHitShareFracSimClusterDenom (self)
 
def bestMatchingTrackingParticleFromFirstHitShareFracSimDenom (self)
 
def bestMatchingTrackingParticleNormalizedChi2 (self)
 
def bestMatchingTrackingParticleShareFrac (self)
 
def bestMatchingTrackingParticleShareFracSimClusterDenom (self)
 
def bestMatchingTrackingParticleShareFracSimDenom (self)
 
def matchedTrackingParticleInfos (self)
 
def nMatchedTrackingParticles (self)
 

Private Member Functions

def _nMatchedTrackingParticles (self)
 

Detailed Description

Adaptor class for objects matched to TrackingParticles.

Definition at line 298 of file ntupleDataFormat.py.

Constructor & Destructor Documentation

def ntupleDataFormat._TrackingParticleMatchAdaptor.__init__ (   self)

Definition at line 300 of file ntupleDataFormat.py.

300  def __init__(self):
301  super(_TrackingParticleMatchAdaptor, self).__init__()
302 

Member Function Documentation

def ntupleDataFormat._TrackingParticleMatchAdaptor._nMatchedTrackingParticles (   self)
private
def ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticle (   self)
Returns best-matching TrackingParticle, even for fake tracks, or None if there is no best-matching TrackingParticle.

Best-matching is defined as the one with largest number of
hits matched to the hits of a track (>= 3). If there are many
fulfilling the same number of hits, the one inducing the
innermost hit of the track is chosen.

Definition at line 322 of file ntupleDataFormat.py.

References ntupleDataFormat._Collection._tree, ntupleDataFormat._Object._tree, python.cmstools.EventTree._tree, ntupleDataFormat.TrackingNtuple._tree, ntupleDataFormat.Event._tree, and ntupleDataFormat.BeamSpot._tree.

Referenced by ntupleDataFormat.Track.dxyPull(), ntupleDataFormat.Track.dzPull(), ntupleDataFormat.Track.phiPull(), ntupleDataFormat.Track.ptPull(), and ntupleDataFormat.Track.thetaPull().

323  """Returns best-matching TrackingParticle, even for fake tracks, or None if there is no best-matching TrackingParticle.
324 
325  Best-matching is defined as the one with largest number of
326  hits matched to the hits of a track (>= 3). If there are many
327  fulfilling the same number of hits, the one inducing the
328  innermost hit of the track is chosen.
329  """
330  idx = self.bestSimTrkIdx()
331  if idx < 0:
332  return None
333  return TrackingParticle(self._tree, idx)
334 
def ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticleFromFirstHit (   self)
Returns best-matching TrackingParticle, even for fake tracks, or None if there is no best-matching TrackingParticle.

Best-matching is defined as the one with largest number of
hits matched to the hits of a track (>= 3) starting from the
beginning of the track. If there are many fulfilling the same
number of hits, "a first TP" is chosen (a bit arbitrary, but
should be rare".

Definition at line 351 of file ntupleDataFormat.py.

References ntupleDataFormat._Collection._tree, ntupleDataFormat._Object._tree, python.cmstools.EventTree._tree, ntupleDataFormat.TrackingNtuple._tree, ntupleDataFormat.Event._tree, and ntupleDataFormat.BeamSpot._tree.

352  """Returns best-matching TrackingParticle, even for fake tracks, or None if there is no best-matching TrackingParticle.
353 
354  Best-matching is defined as the one with largest number of
355  hits matched to the hits of a track (>= 3) starting from the
356  beginning of the track. If there are many fulfilling the same
357  number of hits, "a first TP" is chosen (a bit arbitrary, but
358  should be rare".
359  """
360  idx = self.bestFromFirstHitSimTrkIdx()
361  if idx < 0:
362  return None
363  return TrackingParticle(self._tree, idx)
364 
def ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticleFromFirstHitNormalizedChi2 (   self)
Normalized chi2 calculated from track parameters+covariance matrix and TrackingParticle parameters for best-matching TrackingParticle starting from the first hit of a track.

Definition at line 377 of file ntupleDataFormat.py.

378  """Normalized chi2 calculated from track parameters+covariance matrix and TrackingParticle parameters for best-matching TrackingParticle starting from the first hit of a track."""
379  return self.bestFromFirstHitSimTrkNChi2()
380 
def ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticleFromFirstHitShareFrac (   self)
Fraction of shared hits with reco hits as denominator for best-matching TrackingParticle starting from the first hit of a track.

Definition at line 365 of file ntupleDataFormat.py.

366  """Fraction of shared hits with reco hits as denominator for best-matching TrackingParticle starting from the first hit of a track."""
367  return self.bestFromFirstHitSimTrkShareFrac()
368 
def ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticleFromFirstHitShareFracSimClusterDenom (   self)
Fraction of shared hits with number of reco clusters associated to a TrackingParticle as denominator for best-matching TrackingParticle starting from the first hit of a track.

Definition at line 373 of file ntupleDataFormat.py.

374  """Fraction of shared hits with number of reco clusters associated to a TrackingParticle as denominator for best-matching TrackingParticle starting from the first hit of a track."""
375  return self.bestFromFirstHitSimTrkShareFracSimClusterDenom()
376 
def ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticleFromFirstHitShareFracSimDenom (   self)
Fraction of shared hits with TrackingParticle::numberOfTrackerHits() as denominator for best-matching TrackingParticle starting from the first hit of a track.

Definition at line 369 of file ntupleDataFormat.py.

370  """Fraction of shared hits with TrackingParticle::numberOfTrackerHits() as denominator for best-matching TrackingParticle starting from the first hit of a track."""
371  return self.bestFromFirstHitSimTrkShareFracSimDenom()
372 
def ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticleNormalizedChi2 (   self)
Normalized chi2 calculated from track parameters+covariance matrix and TrackingParticle parameters for best-matching TrackingParticle.

Definition at line 347 of file ntupleDataFormat.py.

348  """Normalized chi2 calculated from track parameters+covariance matrix and TrackingParticle parameters for best-matching TrackingParticle."""
349  return self.bestSimTrkNChi2()
350 
def ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticleShareFrac (   self)
Fraction of shared hits with reco hits as denominator for best-matching TrackingParticle.

Definition at line 335 of file ntupleDataFormat.py.

336  """Fraction of shared hits with reco hits as denominator for best-matching TrackingParticle."""
337  return self.bestSimTrkShareFrac()
338 
def ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticleShareFracSimClusterDenom (   self)
Fraction of shared hits with number of reco clusters associated to a TrackingParticle as denominator for best-matching TrackingParticle.

Definition at line 343 of file ntupleDataFormat.py.

344  """Fraction of shared hits with number of reco clusters associated to a TrackingParticle as denominator for best-matching TrackingParticle."""
345  return self.bestSimTrkShareFracSimClusterDenom()
346 
def ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticleShareFracSimDenom (   self)
Fraction of shared hits with TrackingParticle::numberOfTrackerHits() as denominator for best-matching TrackingParticle.

Definition at line 339 of file ntupleDataFormat.py.

340  """Fraction of shared hits with TrackingParticle::numberOfTrackerHits() as denominator for best-matching TrackingParticle."""
341  return self.bestSimTrkShareFracSimDenom()
342 
def ntupleDataFormat._TrackingParticleMatchAdaptor.matchedTrackingParticleInfos (   self)
Returns a generator for matched TrackingParticles.

The generator returns TrackingParticleMatchInfo objects.

Definition at line 312 of file ntupleDataFormat.py.

References ntupleDataFormat._Object._checkIsValid(), SeedingNode< DATA >._index, SeedingNode< TrackingLayer >._index, Vispa.Share.FindAlgorithm.FindAlgorithm._index, RPCMuonExtraStruct._index, ntupleDataFormat._Object._index, python.cmstools.EventTree._index, python.cmstools.EventBranch._index, html.HtmlReport._index, ntupleDataFormat._TrackingParticleMatchAdaptor._nMatchedTrackingParticles(), CommonAnalyzer._prefix, ntupleDataFormat._Object._prefix, html.PageSet._prefix, ntupleDataFormat.BeamSpot._prefix, ntuplePrintersDiff._IndentPrinter._prefix, ntupleDataFormat._Collection._tree, ntupleDataFormat._Object._tree, python.cmstools.EventTree._tree, ntupleDataFormat.TrackingNtuple._tree, ntupleDataFormat.Event._tree, and ntupleDataFormat.BeamSpot._tree.

313  """Returns a generator for matched TrackingParticles.
314 
315  The generator returns TrackingParticleMatchInfo objects.
316 
317  """
318  self._checkIsValid()
319  for imatch in range(self._nMatchedTrackingParticles()):
320  yield TrackingParticleMatchInfo(self._tree, self._index, imatch, self._prefix)
321 
def ntupleDataFormat._TrackingParticleMatchAdaptor.nMatchedTrackingParticles (   self)
Returns the number of matched TrackingParticles.

Definition at line 307 of file ntupleDataFormat.py.

References ntupleDataFormat._Object._checkIsValid(), and ntupleDataFormat._TrackingParticleMatchAdaptor._nMatchedTrackingParticles().

308  """Returns the number of matched TrackingParticles."""
309  self._checkIsValid()
310  return self._nMatchedTrackingParticles()
311