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 Attributes
trackingPlots.TrackingSummaryTable Class Reference

Public Member Functions

def __init__
 
def create
 
def getPage
 
def getPurpose
 
def getSection
 
def headers
 

Private Attributes

 _highPurity
 
 _page
 
 _purpose
 
 _section
 

Detailed Description

Definition at line 680 of file trackingPlots.py.

Constructor & Destructor Documentation

def trackingPlots.TrackingSummaryTable.__init__ (   self,
  section,
  highPurity = False 
)

Member Function Documentation

def trackingPlots.TrackingSummaryTable.create (   self,
  tdirectory 
)

Definition at line 696 of file trackingPlots.py.

References trackingPlots.TrackingSummaryTable._highPurity, trackingPlots._mapCollectionToAlgoQuality(), and RecoJets_EventContent_cff.func.

697  def create(self, tdirectory):
698  def _getN(hname):
699  h = tdirectory.Get(hname)
700  if not h:
701  return None
702  if self._highPurity:
703  (algo, quality) = _mapCollectionToAlgoQuality(h.GetXaxis().GetBinLabel(2))
704  if algo != "ootb" and quality != "highPurity":
705  return None
706  return h.GetBinContent(2)
707  else:
708  (algo, quality) = _mapCollectionToAlgoQuality(h.GetXaxis().GetBinLabel(1))
709  if algo != "ootb" and quality != "":
710  return None
711  return h.GetBinContent(1)
712  def _formatOrNone(num, func):
713  if num is None:
714  return None
715  return func(num)
716 
717  n_tracks = _formatOrNone(_getN("num_reco_coll"), int)
718  n_true = _formatOrNone(_getN("num_assoc(recoToSim)_coll"), int)
719  if n_tracks is not None and n_true is not None:
720  n_fake = n_tracks-n_true
721  else:
722  n_fake = None
723  n_pileup = _formatOrNone(_getN("num_pileup_coll"), int)
724  n_duplicate = _formatOrNone(_getN("num_duplicate_coll"), int)
725 
726  eff = _formatOrNone(_getN("effic_vs_coll"), lambda n: "%.4f" % n)
727 
728  ret = [eff, n_tracks, n_true, n_fake, n_pileup, n_duplicate]
729  if ret.count(None) == len(ret):
730  return None
731  return ret
def _mapCollectionToAlgoQuality
def trackingPlots.TrackingSummaryTable.getPage (   self)

Definition at line 690 of file trackingPlots.py.

References html.Table._page, trackingPlots.TrackingSummaryTable._page, and plotting.PlotFolder._page.

691  def getPage(self):
692  return self._page
def trackingPlots.TrackingSummaryTable.getPurpose (   self)

Definition at line 687 of file trackingPlots.py.

References html.Table._purpose, trackingPlots.TrackingSummaryTable._purpose, and plotting.PlotFolder._purpose.

688  def getPurpose(self):
689  return self._purpose
def trackingPlots.TrackingSummaryTable.getSection (   self,
  dqmSubFolder 
)

Definition at line 693 of file trackingPlots.py.

References html.Table._section, trackingPlots.TrackingSummaryTable._section, and plotting.PlotFolder._section.

694  def getSection(self, dqmSubFolder):
695  return self._section
def trackingPlots.TrackingSummaryTable.headers (   self)

Definition at line 732 of file trackingPlots.py.

733  def headers(self):
734  return [
735  "Efficiency",
736  "Number of tracks",
737  "Number of true tracks",
738  "Number of fake tracks",
739  "Number of pileup tracks",
740  "Number of duplicate tracks"
741  ]

Member Data Documentation

trackingPlots.TrackingSummaryTable._highPurity
private

Definition at line 682 of file trackingPlots.py.

Referenced by trackingPlots.TrackingSummaryTable.create().

trackingPlots.TrackingSummaryTable._page
private

Definition at line 684 of file trackingPlots.py.

Referenced by vertexPlots.VertexSummaryTable.getPage(), trackingPlots.TrackingSummaryTable.getPage(), and trackingPlots.TrackingTimingTable.getPage().

trackingPlots.TrackingSummaryTable._purpose
private

Definition at line 683 of file trackingPlots.py.

Referenced by vertexPlots.VertexSummaryTable.getPurpose(), trackingPlots.TrackingSummaryTable.getPurpose(), and trackingPlots.TrackingTimingTable.getPurpose().

trackingPlots.TrackingSummaryTable._section
private

Definition at line 685 of file trackingPlots.py.

Referenced by trackingPlots.TrackingSummaryTable.getSection(), and trackingPlots.TrackingTimingTable.getSection().