Belle II Software development
PXDMaskedPixelsChecker Class Reference
Inheritance diagram for PXDMaskedPixelsChecker:
ConditionCheckerBase

Public Member Functions

def __init__ (self, name, tfile, rundir="maps")
 
def define_graphs (self)
 
def define_hists (self)
 
def get_db_content (self)
 
def get_graph_value (self, sensor_db_content)
 
def set_hist_content (self, h2, sensor_db_content)
 
def draw_plots (self, canvas=None, cname="PXDHotPixel", ymin=0., ymax=plot_type_dict["hot"]["max"], **kwargs)
 

Public Attributes

 hist_title_suffix
 Hist title suffix.
 

Detailed Description

Checker for PXDMaskedPixelPar

Definition at line 311 of file condition_checker.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  name,
  tfile,
  rundir = "maps" 
)
 

Reimplemented from ConditionCheckerBase.

Definition at line 316 of file condition_checker.py.

316 def __init__(self, name, tfile, rundir="maps"):
317 """
318 """
319 super().__init__(name, Belle2.PXDMaskedPixelPar, tfile, rundir)
320
The payload telling which PXD pixel to mask (ignore)

Member Function Documentation

◆ define_graphs()

def define_graphs (   self)
Method to define TGraph

Reimplemented from ConditionCheckerBase.

Definition at line 321 of file condition_checker.py.

321 def define_graphs(self):
322 """
323 Method to define TGraph
324 """
325 super().define_graphs(ytitle="Hot pixels [%]")
326

◆ define_hists()

def define_hists (   self)
Method to define TH2

Reimplemented from ConditionCheckerBase.

Definition at line 327 of file condition_checker.py.

327 def define_hists(self):
328 """
329 Method to define TH2
330 """
331 super().define_hists(name="MaskedPixels", title="Masked Pixels", ztitle="isMasked")
332

◆ draw_plots()

def draw_plots (   self,
  canvas = None,
  cname = "PXDHotPixel",
  ymin = 0.,
  ymax = plot_type_dict["hot"]["max"],
**  kwargs 
)
Method to draw plots on a TCanvas

Reimplemented from ConditionCheckerBase.

Definition at line 349 of file condition_checker.py.

349 def draw_plots(self, canvas=None, cname="PXDHotPixel", ymin=0., ymax=plot_type_dict["hot"]["max"], **kwargs):
350 """
351 Method to draw plots on a TCanvas
352 """
353 super().draw_plots(canvas=canvas, cname=cname, ymin=ymin, ymax=ymax, **kwargs)
354
355

◆ get_db_content()

def get_db_content (   self)
Abstract method to get content of a payload
Should return a Dictionary with sensorID.getID() as key and relaated calibration results as value

Reimplemented from ConditionCheckerBase.

Definition at line 333 of file condition_checker.py.

333 def get_db_content(self):
334 return self.dbObj.getMaskedPixelMap()
335

◆ get_graph_value()

def get_graph_value (   self,
  sensor_db_content 
)
Abstract method to get a value for each TGraph
Parameters:
  sensor_db_content (Any): Calibration results of a module

Reimplemented from ConditionCheckerBase.

Definition at line 336 of file condition_checker.py.

336 def get_graph_value(self, sensor_db_content):
337 hotcount = len(sensor_db_content)
338
339 self.hist_title_suffix = f" ({hotcount} pixels)"
340 return hotcount * 100. / nPixels
341

◆ set_hist_content()

def set_hist_content (   self,
  h2,
  sensor_db_content 
)
Method to set TH2 bins
Parameters:
  h2 (TH2): TH2F object for handling values of a pixel matrix
  sensor_db_content (Any): Calibration results of a module

Reimplemented from ConditionCheckerBase.

Definition at line 342 of file condition_checker.py.

342 def set_hist_content(self, h2, sensor_db_content):
343 # loop over all masked pixels
344 for pixelID in sensor_db_content:
345 uCell = int(pixelID / nVCells)
346 vCell = pixelID % nVCells
347 h2.SetBinContent(int(uCell + 1), int(vCell + 1), 1)
348

Member Data Documentation

◆ hist_title_suffix

hist_title_suffix

Hist title suffix.

Definition at line 339 of file condition_checker.py.


The documentation for this class was generated from the following file: