CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
vertexPlots.VertexSummaryTable Class Reference

Public Member Functions

def __init__ (self, page="vertex")
 
def create (self, tdirectory)
 
def getPage (self)
 
def getPurpose (self)
 
def getSection (self, dqmSubFolder)
 
def headers (self)
 

Private Attributes

 _page
 
 _purpose
 

Detailed Description

Definition at line 289 of file vertexPlots.py.

Constructor & Destructor Documentation

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

Definition at line 290 of file vertexPlots.py.

290  def __init__(self, page="vertex"):
291  self._purpose = PlotPurpose.Vertexing
292  self._page = page
293 
def __init__(self, page="vertex")
Definition: vertexPlots.py:290

Member Function Documentation

def vertexPlots.VertexSummaryTable.create (   self,
  tdirectory 
)

Definition at line 303 of file vertexPlots.py.

References objects.autophobj.float, RecoEcal_EventContent_cff.func, and createfilelist.int.

303  def create(self, tdirectory):
304  def _formatOrNone(num, func):
305  if num is None:
306  return None
307  return func(num)
308 
309  ret = []
310  h = tdirectory.Get("TruePVLocationIndexCumulative")
311  if h:
312  n_events = h.GetEntries()
313  n_pvtagged = h.GetBinContent(2)
314  ret.extend([int(n_events), "%.4f"%(float(n_pvtagged)/float(n_events))])
315  else:
316  ret.extend([None, None])
317 
318  h = tdirectory.Get("globalEfficiencies")
319  if h:
320  d = {}
321  for i in xrange(1, h.GetNbinsX()+1):
322  d[h.GetXaxis().GetBinLabel(i)] = h.GetBinContent(i)
323  ret.extend([
324  _formatOrNone(d.get("effic_vs_Z", None), lambda n: "%.4f"%n),
325  _formatOrNone(d.get("fakerate_vs_Z", None), lambda n: "%.4f"%n),
326  _formatOrNone(d.get("merged_vs_Z", None), lambda n: "%.4f"%n),
327  _formatOrNone(d.get("duplicate_vs_Z", None), lambda n: "%.4f"%n),
328  ])
329  else:
330  ret.extend([None]*4)
331 
332  if ret.count(None) == len(ret):
333  return None
334 
335  return ret
336 
def create(self, tdirectory)
Definition: vertexPlots.py:303
def vertexPlots.VertexSummaryTable.getPage (   self)
def vertexPlots.VertexSummaryTable.getPurpose (   self)
def vertexPlots.VertexSummaryTable.getSection (   self,
  dqmSubFolder 
)

Definition at line 300 of file vertexPlots.py.

300  def getSection(self, dqmSubFolder):
301  return dqmSubFolder
302 
def getSection(self, dqmSubFolder)
Definition: vertexPlots.py:300
def vertexPlots.VertexSummaryTable.headers (   self)

Definition at line 337 of file vertexPlots.py.

337  def headers(self):
338  return [
339  "Events",
340  "PV reco+tag efficiency",
341  "Efficiency",
342  "Fake rate",
343  "Merge rate",
344  "Duplicate rate",
345  ]
346 

Member Data Documentation

vertexPlots.VertexSummaryTable._page
private

Definition at line 292 of file vertexPlots.py.

Referenced by vertexPlots.VertexSummaryTable.getPage().

vertexPlots.VertexSummaryTable._purpose
private

Definition at line 291 of file vertexPlots.py.

Referenced by vertexPlots.VertexSummaryTable.getPurpose().