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
vertexPlots.VertexSummaryTable Class Reference

Public Member Functions

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

Private Attributes

 _page
 
 _purpose
 

Detailed Description

Definition at line 366 of file vertexPlots.py.

Constructor & Destructor Documentation

def vertexPlots.VertexSummaryTable.__init__ (   self,
  page = "vertex" 
)

Definition at line 367 of file vertexPlots.py.

368  def __init__(self, page="vertex"):
369  self._purpose = PlotPurpose.Vertexing
370  self._page = page

Member Function Documentation

def vertexPlots.VertexSummaryTable.create (   self,
  tdirectory 
)

Definition at line 380 of file vertexPlots.py.

References cms::cuda.func, and sistrip::SpyUtilities.range().

381  def create(self, tdirectory):
382  def _formatOrNone(num, func):
383  if num is None:
384  return None
385  return func(num)
386 
387  ret = []
388  h = tdirectory.Get("TruePVLocationIndexCumulative")
389  if h:
390  n_events = h.GetEntries()
391  n_pvtagged = h.GetBinContent(2)
392  ret.extend([int(n_events), "%.4f"%(float(n_pvtagged)/float(n_events))])
393  else:
394  ret.extend([None, None])
395 
396  h = tdirectory.Get("globalEfficiencies")
397  if h:
398  d = {}
399  for i in range(1, h.GetNbinsX()+1):
400  d[h.GetXaxis().GetBinLabel(i)] = h.GetBinContent(i)
401  ret.extend([
402  _formatOrNone(d.get("effic_vs_Z", None), lambda n: "%.4f"%n),
403  _formatOrNone(d.get("fakerate_vs_Z", None), lambda n: "%.4f"%n),
404  _formatOrNone(d.get("merged_vs_Z", None), lambda n: "%.4f"%n),
405  _formatOrNone(d.get("duplicate_vs_Z", None), lambda n: "%.4f"%n),
406  ])
407  else:
408  ret.extend([None]*4)
409 
410  if ret.count(None) == len(ret):
411  return None
412 
413  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
const uint16_t range(const Frame &aFrame)
def vertexPlots.VertexSummaryTable.getPage (   self)

Definition at line 374 of file vertexPlots.py.

References html.Table._page, vertexPlots.VertexSummaryTable._page, trackingPlots.TrackingSummaryTable._page, trackingPlots.TrackingTimingTable._page, and plotting.PlotFolder._page.

375  def getPage(self):
376  return self._page
def vertexPlots.VertexSummaryTable.getPurpose (   self)

Definition at line 371 of file vertexPlots.py.

References html.Table._purpose, vertexPlots.VertexSummaryTable._purpose, trackingPlots.TrackingSummaryTable._purpose, trackingPlots.TrackingTimingTable._purpose, and plotting.PlotFolder._purpose.

372  def getPurpose(self):
373  return self._purpose
def vertexPlots.VertexSummaryTable.getSection (   self,
  dqmSubFolder 
)

Definition at line 377 of file vertexPlots.py.

378  def getSection(self, dqmSubFolder):
379  return dqmSubFolder
def vertexPlots.VertexSummaryTable.headers (   self)

Definition at line 414 of file vertexPlots.py.

415  def headers(self):
416  return [
417  "Events",
418  "PV reco+tag efficiency",
419  "Efficiency",
420  "Fake rate",
421  "Merge rate",
422  "Duplicate rate",
423  ]

Member Data Documentation

vertexPlots.VertexSummaryTable._page
private

Definition at line 369 of file vertexPlots.py.

Referenced by vertexPlots.VertexSummaryTable.getPage().

vertexPlots.VertexSummaryTable._purpose
private

Definition at line 368 of file vertexPlots.py.

Referenced by vertexPlots.VertexSummaryTable.getPurpose().