CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ntuplePrintersDiff._TrackingParticleMatchPrinter Class Reference
Inheritance diagram for ntuplePrintersDiff._TrackingParticleMatchPrinter:

Public Member Functions

def __init__ (self, trackingParticles, trackingParticlePrinter, bestMatchingTrackingParticle)
 
def bestMatchingTrackingParticle (self)
 
def printMatchedTrackingParticles (self, prefix, track)
 

Private Member Functions

def _printTrackingParticles (self, prefix, tps, header)
 

Private Attributes

 _bestMatchingTrackingParticle
 
 _trackingParticlePrinter
 
 _trackingParticles
 

Detailed Description

Definition at line 780 of file ntuplePrintersDiff.py.

Constructor & Destructor Documentation

def ntuplePrintersDiff._TrackingParticleMatchPrinter.__init__ (   self,
  trackingParticles,
  trackingParticlePrinter,
  bestMatchingTrackingParticle 
)

Definition at line 781 of file ntuplePrintersDiff.py.

781  def __init__(self, trackingParticles, trackingParticlePrinter, bestMatchingTrackingParticle):
782  self._trackingParticles = trackingParticles
783  self._trackingParticlePrinter = trackingParticlePrinter
784  self._bestMatchingTrackingParticle = bestMatchingTrackingParticle
785 
def __init__(self, trackingParticles, trackingParticlePrinter, bestMatchingTrackingParticle)

Member Function Documentation

def ntuplePrintersDiff._TrackingParticleMatchPrinter._printTrackingParticles (   self,
  prefix,
  tps,
  header 
)
private

Definition at line 789 of file ntuplePrintersDiff.py.

References ntuplePrintersDiff._TrackingParticleMatchPrinter._trackingParticlePrinter, join(), and harvestTrackValidationPlots.str.

Referenced by ntuplePrintersDiff._TrackingParticleMatchPrinter.printMatchedTrackingParticles().

789  def _printTrackingParticles(self, prefix, tps, header):
790  lst = []
791  if self._trackingParticlePrinter is None:
792  lst.append(prefix+header+" "+",".join([str(tp.index()) for tp in tps]))
793  else:
794  lst.append(prefix+header)
795  for tp in tps:
796  lst.extend(self._trackingParticlePrinter.printTrackingParticle(tp))
797  lst.extend(self._trackingParticlePrinter.printHits(tp))
798  lst.extend(self._trackingParticlePrinter.printMatchedTracks(tp, useTrackPrinter=False))
799  return lst
800 
def _printTrackingParticles(self, prefix, tps, header)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def ntuplePrintersDiff._TrackingParticleMatchPrinter.bestMatchingTrackingParticle (   self)
def ntuplePrintersDiff._TrackingParticleMatchPrinter.printMatchedTrackingParticles (   self,
  prefix,
  track 
)

Definition at line 801 of file ntuplePrintersDiff.py.

References ntuplePrintersDiff._TrackingParticleMatchPrinter._bestMatchingTrackingParticle, ntuplePrintersDiff._TrackingParticleMatchPrinter._printTrackingParticles(), ntuplePrintersDiff._TrackingParticleMatchPrinter._trackingParticlePrinter, and ntuplePrintersDiff._TrackingParticleMatchPrinter._trackingParticles.

Referenced by ntuplePrintersDiff.SeedPrinter.diff(), ntuplePrintersDiff.TrackPrinter.diff(), ntuplePrintersDiff.SeedPrinter.printSeed(), and ntuplePrintersDiff.TrackPrinter.printTrackAndMatchedTrackingParticles().

801  def printMatchedTrackingParticles(self, prefix, track):
802  lst = []
803  if not self._trackingParticles:
804  return lst
805 
806  pfx = prefix+" "
807  if self._trackingParticlePrinter is not None:
808  self._trackingParticlePrinter.indent(len(pfx)+1)
809 
810  if track.nMatchedTrackingParticles() == 0:
812  bestTP = track.bestMatchingTrackingParticle()
813  if bestTP is not None:
814  lst.extend(self._printTrackingParticles(pfx, [bestTP], "not matched to any TP, but a following TP with >= 3 matched hits is found"))
815  else:
816  lst.append(prefix+"not matched to any TP")
817  else:
818  lst.append(prefix+"not matched to any TP")
819  else:
820  lst.extend(self._printTrackingParticles(pfx, [tpInfo.trackingParticle() for tpInfo in track.matchedTrackingParticleInfos()], "matched to TPs"))
821 
822  if self._trackingParticlePrinter is not None:
823  self._trackingParticlePrinter.restoreIndent()
824 
825  return lst
826 
def _printTrackingParticles(self, prefix, tps, header)

Member Data Documentation

ntuplePrintersDiff._TrackingParticleMatchPrinter._bestMatchingTrackingParticle
private
ntuplePrintersDiff._TrackingParticleMatchPrinter._trackingParticlePrinter
private
ntuplePrintersDiff._TrackingParticleMatchPrinter._trackingParticles
private