CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
ntuplePrintersDiff.SeedPrinter Class Reference
Inheritance diagram for ntuplePrintersDiff.SeedPrinter:
ntuplePrintersDiff._RecHitPrinter ntuplePrintersDiff._IndentPrinter

Public Member Functions

def __call__
 
def __init__
 
def diff
 
def printHeader
 
def printHits
 
def printMatchedTrackingParticles
 
def printSeed
 
- Public Member Functions inherited from ntuplePrintersDiff._RecHitPrinter
def __init__
 
- Public Member Functions inherited from ntuplePrintersDiff._IndentPrinter
def __init__
 
def indent
 
def restoreIndent
 
def setIndentFrom
 

Private Attributes

 _hits
 
 _trackingParticleMatchPrinter
 

Detailed Description

Definition at line 828 of file ntuplePrintersDiff.py.

Constructor & Destructor Documentation

def ntuplePrintersDiff.SeedPrinter.__init__ (   self,
  indent = 0,
  hits = True,
  trackingParticles = False,
  trackingParticlePrinter = None,
  bestMatchingTrackingParticle = True 
)

Definition at line 829 of file ntuplePrintersDiff.py.

830  def __init__(self, indent=0, hits=True, trackingParticles=False, trackingParticlePrinter=None, bestMatchingTrackingParticle=True):
831  super(SeedPrinter, self).__init__(indent)
832  self._hits = hits
833  self._trackingParticleMatchPrinter = _TrackingParticleMatchPrinter(trackingParticles, trackingParticlePrinter, bestMatchingTrackingParticle)

Member Function Documentation

def ntuplePrintersDiff.SeedPrinter.__call__ (   self,
  seed,
  out = sys.stdout 
)

Definition at line 867 of file ntuplePrintersDiff.py.

References ntuplePrintersDiff.SeedPrinter.printSeed().

868  def __call__(self, seed, out=sys.stdout):
869  if isinstance(out, list):
870  lst = out
871  else:
872  lst = []
873 
874  lst.extend(self.printSeed(seed))
875 
876  if not isinstance(out, list):
877  for line in lst:
878  out.write(line),
879  out.write("\n")
def ntuplePrintersDiff.SeedPrinter.diff (   self,
  seed1,
  seed2,
  diffForTwiki = False,
  diffTrackingParticles = False 
)

Definition at line 880 of file ntuplePrintersDiff.py.

References ntuplePrintersDiff._formatHitDiffForTwiki(), ntuplePrintersDiff._makediff(), ntuplePrintersDiff._mapdiff(), CommonAnalyzer._prefix, ntupleDataFormat._Object._prefix, ntupleDataFormat.BeamSpot._prefix, html.PageSet._prefix, ntuplePrintersDiff._IndentPrinter._prefix, L1GctLut< NAddressBits, NDataBits >.printHeader(), EcalSelectiveReadout.printHeader(), FastTimerService.printHeader(), ntuplePrintersDiff.SeedPrinter.printHeader(), HGCalEgammaIDHelper.printHits(), TkAccumulatingSensitiveDetector.printHits, hgcal::EGammaPCAHelper.printHits(), GlobalTrajectoryBuilderBase.printHits(), GlobalMuonRefitter.printHits(), ntuplePrintersDiff.SeedPrinter.printHits(), ntuplePrintersDiff._TrackingParticleMatchPrinter.printMatchedTrackingParticles(), ntuplePrintersDiff.SeedPrinter.printMatchedTrackingParticles(), and ntuplePrintersDiff.SeedPrinter.printSeed().

881  def diff(self, seed1, seed2, diffForTwiki=False, diffTrackingParticles=False):
882  if seed1 is None:
883  return _makediff([], self.printSeed(seed2))
884  if seed2 is None:
885  return _makediff(self.printSeed(seed1), [])
886 
887  ret = _DiffResult()
888  ret.extend(_mapdiff(self.printHeader, seed1, seed2))
889  diffHits = _mapdiff(self.printHits, seed1, seed2)
890  ret.extend(diffHits)
891  if diffForTwiki:
892  ret.extend(_formatHitDiffForTwiki(diffHits, self._prefix))
893  if diffTrackingParticles:
894  ret.extend(_mapdiff(self.printMatchedTrackingParticles, seed1, seed2))
895  return ret
def ntuplePrintersDiff.SeedPrinter.printHeader (   self,
  seed 
)

Definition at line 834 of file ntuplePrintersDiff.py.

References CommonAnalyzer._prefix, ntupleDataFormat._Object._prefix, ntupleDataFormat.BeamSpot._prefix, html.PageSet._prefix, and ntuplePrintersDiff._IndentPrinter._prefix.

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

835  def printHeader(self, seed):
836  lst = []
837  track = seed.track()
838  if track.isValid():
839  madeTrack = "made track %d" % track.index()
840  else:
841  madeTrack = "did not make a track, stopReason %s" % SeedStopReason.toString(seed.stopReason())
842  if seed.stopReason() == SeedStopReason.NOT_STOPPED:
843  madeTrack += " (usually this means that the track was reconstructed, but rejected by the track selection)"
844 
845  lst.append(self._prefix+"Seed %d algo %s %s" % (seed.indexWithinAlgo(), Algo.toString(seed.algo()), madeTrack))
846  lst.append(self._prefix+" starting state: pT %f local pos x,y %f,%f mom x,y,z %f,%f,%f" % (seed.statePt(), seed.stateTrajX(), seed.stateTrajY(), seed.stateTrajPx(), seed.stateTrajPy(), seed.stateTrajPz()))
847  return lst
def ntuplePrintersDiff.SeedPrinter.printHits (   self,
  seed 
)

Definition at line 848 of file ntuplePrintersDiff.py.

References ntuplePrintersDiff._hitPatternSummary(), FP420HitsObject._hits, TrackerHitsObject._hits, DTBtiChip._hits, ntuplePrintersDiff.SeedPrinter._hits, CommonAnalyzer._prefix, ntupleDataFormat._Object._prefix, ntupleDataFormat.BeamSpot._prefix, html.PageSet._prefix, ntuplePrintersDiff._IndentPrinter._prefix, ntuplePrintersDiff._RecHitPrinter._printHits(), Mixins.PrintOptions.indent(), FWLayoutBuilder.indent(), edm::DocFormatHelper.indent(), Json::StyledWriter.indent(), FWDialogBuilder.indent(), edm::service::ELdestination.indent, Json::StyledStreamWriter.indent(), JsonOutputProducer.indent(), ntuplePrintersDiff._IndentPrinter.indent(), and ntuplePrintersDiff._IndentPrinter.restoreIndent().

Referenced by ntuplePrintersDiff.TrackingParticlePrinter.__call__(), ntuplePrintersDiff.SeedPrinter.diff(), ntuplePrintersDiff.TrackPrinter.diff(), ntuplePrintersDiff.TrackingParticlePrinter.diff(), ntuplePrintersDiff.SeedPrinter.printSeed(), and ntuplePrintersDiff.TrackPrinter.printTrack().

849  def printHits(self, seed):
850  lst = []
851  if self._hits:
852  lst.append(self._prefix+" hits"+_hitPatternSummary(seed.hits()))
853  self.indent(2)
854  lst.extend(self._printHits(seed.hits()))
855  self.restoreIndent()
856  return lst
def ntuplePrintersDiff.SeedPrinter.printMatchedTrackingParticles (   self,
  seed 
)

Definition at line 857 of file ntuplePrintersDiff.py.

References CommonAnalyzer._prefix, ntupleDataFormat._Object._prefix, ntupleDataFormat.BeamSpot._prefix, html.PageSet._prefix, and ntuplePrintersDiff._IndentPrinter._prefix.

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

858  def printMatchedTrackingParticles(self, seed):
859  return self._trackingParticleMatchPrinter.printMatchedTrackingParticles(self._prefix, seed)
def ntuplePrintersDiff.SeedPrinter.printSeed (   self,
  seed 
)

Definition at line 860 of file ntuplePrintersDiff.py.

References L1GctLut< NAddressBits, NDataBits >.printHeader(), EcalSelectiveReadout.printHeader(), FastTimerService.printHeader(), ntuplePrintersDiff.SeedPrinter.printHeader(), HGCalEgammaIDHelper.printHits(), TkAccumulatingSensitiveDetector.printHits, hgcal::EGammaPCAHelper.printHits(), GlobalTrajectoryBuilderBase.printHits(), GlobalMuonRefitter.printHits(), ntuplePrintersDiff.SeedPrinter.printHits(), ntuplePrintersDiff._TrackingParticleMatchPrinter.printMatchedTrackingParticles(), and ntuplePrintersDiff.SeedPrinter.printMatchedTrackingParticles().

Referenced by ntuplePrintersDiff.SeedPrinter.__call__(), ntuplePrintersDiff.SeedPrinter.diff(), and ntuplePrintersDiff.TrackPrinter.printTrack().

861  def printSeed(self, seed):
862  lst = []
863  lst.extend(self.printHeader(seed))
864  lst.extend(self.printHits(seed))
865  lst.extend(self.printMatchedTrackingParticles(seed))
866  return lst

Member Data Documentation

ntuplePrintersDiff.SeedPrinter._hits
private

Definition at line 831 of file ntuplePrintersDiff.py.

Referenced by ntuplePrintersDiff.TrackPrinter.diff(), ntupleDataFormat._RecoHitAdaptor.gluedHits(), ntupleDataFormat._RecoHitAdaptor.hits(), ntupleDataFormat._RecoHitAdaptor.invalidHits(), ntupleDataFormat._RecoHitAdaptor.phase2OTHits(), ntupleDataFormat._RecoHitAdaptor.pixelHits(), ntuplePrintersDiff.SeedPrinter.printHits(), ntuplePrintersDiff.TrackPrinter.printHits(), ntuplePrintersDiff.TrackingParticlePrinter.printHits(), and ntupleDataFormat._RecoHitAdaptor.stripHits().

ntuplePrintersDiff.SeedPrinter._trackingParticleMatchPrinter
private

Definition at line 832 of file ntuplePrintersDiff.py.