CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Private Attributes
trackingPlots.TrackingSummaryTable Class Reference

Classes

class  AK4PFJets
 
class  BTVLike
 
class  GeneralTracks
 
class  GeneralTracksPt09
 
class  HighPurity
 
class  HighPurityPt09
 
class  Pixel
 
class  PixelPt09
 

Public Member Functions

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

Private Attributes

 _collection
 
 _page
 
 _purpose
 
 _section
 

Detailed Description

Definition at line 937 of file trackingPlots.py.

Constructor & Destructor Documentation

def trackingPlots.TrackingSummaryTable.__init__ (   self,
  section,
  collection = GeneralTracks 
)

Definition at line 947 of file trackingPlots.py.

948  def __init__(self, section, collection=GeneralTracks):
949  self._collection = collection
950  self._purpose = PlotPurpose.TrackingSummary
951  self._page = "summary"
952  self._section = section

Member Function Documentation

def trackingPlots.TrackingSummaryTable.create (   self,
  tdirectory 
)

Definition at line 962 of file trackingPlots.py.

References SequenceTypes._SequenceCollection._collection, trackingPlots.TrackingSummaryTable._collection, SequenceTypes.Task._collection, trackingPlots._mapCollectionToAlgoQuality(), plotting._th1ToOrderedDict(), cms::cuda.func, and str.

963  def create(self, tdirectory):
964  def _getAlgoQuality(data, algo, quality):
965  for label, value in data.items():
966  (a, q) = _mapCollectionToAlgoQuality(label)
967  if a == algo and q == quality:
968  return value[0] # value is (value, uncertainty) tuple
969  return None
970  def _getN(hname):
971  h = tdirectory.Get(hname)
972  if not h:
973  return None
976  return _getAlgoQuality(data, "ootb", "")
978  return _getAlgoQuality(data, "ootb", "Pt09")
980  return _getAlgoQuality(data, "ootb", "highPurity")
982  return _getAlgoQuality(data, "ootb", "highPurityPt09")
984  return _getAlgoQuality(data, "btvLike", "")
986  return _getAlgoQuality(data, "ak4PFJets", "")
988  return _getAlgoQuality(data, "pixel", "")
990  return _getAlgoQuality(data, "pixel", "Pt09")
991  else:
992  raise Exception("Collection not recognized, %s" % str(self._collection))
993  def _formatOrNone(num, func):
994  if num is None:
995  return None
996  return func(num)
997 
998  n_tps = _formatOrNone(_getN("num_simul_coll"), int)
999  n_m_tps = _formatOrNone(_getN("num_assoc(simToReco)_coll"), int)
1000 
1001  n_tracks = _formatOrNone(_getN("num_reco_coll"), int)
1002  n_true = _formatOrNone(_getN("num_assoc(recoToSim)_coll"), int)
1003  if n_tracks is not None and n_true is not None:
1004  n_fake = n_tracks-n_true
1005  else:
1006  n_fake = None
1007  n_pileup = _formatOrNone(_getN("num_pileup_coll"), int)
1008  n_duplicate = _formatOrNone(_getN("num_duplicate_coll"), int)
1009 
1010  eff = _formatOrNone(_getN("effic_vs_coll"), lambda n: "%.4f" % n)
1011  eff_nopt = _formatOrNone(_getN("effic_vs_coll_allPt"), lambda n: "%.4f" % n)
1012  fake = _formatOrNone(_getN("fakerate_vs_coll"), lambda n: "%.4f" % n)
1013  duplicate = _formatOrNone(_getN("duplicatesRate_coll"), lambda n: "%.4f" % n)
1014 
1015  ret = [eff, n_tps, n_m_tps,
1016  eff_nopt, fake, duplicate,
1017  n_tracks, n_true, n_fake, n_pileup, n_duplicate]
1018  if ret.count(None) == len(ret):
1019  return None
1020  return ret
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
def _th1ToOrderedDict
Definition: plotting.py:100
#define str(s)
def _mapCollectionToAlgoQuality
def trackingPlots.TrackingSummaryTable.getPage (   self)

Definition at line 956 of file trackingPlots.py.

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

957  def getPage(self):
958  return self._page
def trackingPlots.TrackingSummaryTable.getPurpose (   self)

Definition at line 953 of file trackingPlots.py.

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

954  def getPurpose(self):
955  return self._purpose
def trackingPlots.TrackingSummaryTable.getSection (   self,
  dqmSubFolder 
)

Definition at line 959 of file trackingPlots.py.

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

960  def getSection(self, dqmSubFolder):
961  return self._section
def trackingPlots.TrackingSummaryTable.headers (   self)

Definition at line 1021 of file trackingPlots.py.

1022  def headers(self):
1023  return [
1024  "Efficiency",
1025  "Number of TrackingParticles (after cuts)",
1026  "Number of matched TrackingParticles",
1027  "Efficiency (w/o pT cut)",
1028  "Fake rate",
1029  "Duplicate rate",
1030  "Number of tracks",
1031  "Number of true tracks",
1032  "Number of fake tracks",
1033  "Number of pileup tracks",
1034  "Number of duplicate tracks"
1035  ]
1036 
# Provide a "PlotGroup" interface, but provide a html page

Member Data Documentation

trackingPlots.TrackingSummaryTable._collection
private

Definition at line 948 of file trackingPlots.py.

Referenced by trackingPlots.TrackingSummaryTable.create().

trackingPlots.TrackingSummaryTable._page
private

Definition at line 950 of file trackingPlots.py.

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

trackingPlots.TrackingSummaryTable._purpose
private

Definition at line 949 of file trackingPlots.py.

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

trackingPlots.TrackingSummaryTable._section
private

Definition at line 951 of file trackingPlots.py.

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