Belle II Software development
PXDGainMapChecker Class Reference
Inheritance diagram for PXDGainMapChecker:
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="PXDGain", ymin=0.5, ymax=2.5, **kwargs)
 

Detailed Description

Checker for PXDGainMapPar

Definition at line 453 of file condition_checker.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from ConditionCheckerBase.

Definition at line 458 of file condition_checker.py.

458 def __init__(self, name, tfile, rundir="maps"):
459 """
460 """
461 super().__init__(name, Belle2.PXDGainMapPar, tfile, rundir)
462
The payload class for PXD gain corrections.
Definition: PXDGainMapPar.h:43

Member Function Documentation

◆ define_graphs()

def define_graphs (   self)
Method to define TGraph

Reimplemented from ConditionCheckerBase.

Definition at line 463 of file condition_checker.py.

463 def define_graphs(self):
464 """
465 Method to define TGraph
466 """
467 super().define_graphs(ytitle="Gain / MC default")
468

◆ define_hists()

def define_hists (   self)
Method to define TH2

Reimplemented from ConditionCheckerBase.

Definition at line 469 of file condition_checker.py.

469 def define_hists(self):
470 """
471 Method to define TH2
472 """
473 nU = self.dbObj.getBinsU()
474 nV = self.dbObj.getBinsV()
475 super().define_hists(name="GainMap", title="Gain / MC default", ztitle="Relative gain", nUCells=nU, nVCells=nV)
476

◆ draw_plots()

def draw_plots (   self,
  canvas = None,
  cname = "PXDGain",
  ymin = 0.5,
  ymax = 2.5,
**  kwargs 
)
Method to draw plots on a TCanvas

Reimplemented from ConditionCheckerBase.

Definition at line 494 of file condition_checker.py.

494 def draw_plots(self, canvas=None, cname="PXDGain", ymin=0.5, ymax=2.5, **kwargs):
495 """
496 Method to draw plots on a TCanvas
497 """
498 super().draw_plots(canvas=canvas, cname=cname, ymin=ymin, ymax=ymax, **kwargs)

◆ 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 477 of file condition_checker.py.

477 def get_db_content(self):
478 gainMap = self.dbObj.getCalibrationMap()
479 content_dic = {}
480 for sensorID in sensorID_list:
481 numID = sensorID.getID()
482 content_dic[numID] = np.array(list(gainMap[numID]))
483 return content_dic
484

◆ get_graph_value()

def get_graph_value (   self,
  sensor_db_content 
)
sensor_db_content (np.array): Array of gain factors of a module

Reimplemented from ConditionCheckerBase.

Definition at line 485 of file condition_checker.py.

485 def get_graph_value(self, sensor_db_content):
486 """
487 sensor_db_content (np.array): Array of gain factors of a module
488 """
489 return sensor_db_content.mean()
490

◆ 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 491 of file condition_checker.py.

491 def set_hist_content(self, h2, sensor_db_content):
492 array2hist(sensor_db_content.reshape(h2.GetNbinsX(), h2.GetNbinsY()), h2)
493

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