20 from ROOT
import Belle2
24 b2.set_random_seed(10346)
27 def importEmptyHotPixelMask(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
29 This function imports an empty payloads for the PXD
32 This function works for every Belle 2 geometry
43 def importEmptyDeadPixelMask(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
45 This function imports an empty payloads for the PXD
48 This function works for every Belle 2 geometry
59 def importEmptyOccupancyInfo(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
61 This function imports an empty payloads for the PXD
64 This function works for every Belle 2 geometry
75 def importEmptyClusterChargeMap(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
77 This function imports an empty payloads for the PXD
80 This function works for every Belle 2 geometry
91 def importEmptyGainMap(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
93 This function imports an empty payloads for the PXD
96 This function works for every Belle 2 geometry
107 def importRandomPixelMaskPhase2(HotPixelFraction=0.001, expLow=0, runLow=0, expHigh=-1, runHigh=-1):
109 This function imports payloads for the PXD
110 pixel masking with random hot pixels
112 This function works for Phase 2
132 AverageHotPixels = HotPixelFraction * 250 * 768
135 for sensorID
in sensorIDList:
137 nHotPixels = ROOT.gRandom.Poisson(AverageHotPixels)
139 for i
in range(nHotPixels):
140 uid = ROOT.gRandom.Integer(250)
141 vid = ROOT.gRandom.Integer(768)
142 print(f
"mask pixel uid={uid}, vid={vid}, id={uid * 768 + vid}")
143 pixelMask.maskSinglePixel(sensorID.getID(), uid * 768 + vid)
146 for sensorMask
in pixelMask.getMaskedPixelMap():
148 print(f
"Mask for sensor {sensorID} contains {sensorMask.second.size()} pixels")
154 if __name__ ==
"__main__":
156 importEmptyHotPixelMask()
157 importEmptyDeadPixelMask()
158 importEmptyOccupancyInfo()
160 importEmptyClusterChargeMap()
A class that describes the interval of experiments/runs for which an object in the database is valid.
The payload class for PXD cluster charge calibrations.
The payload telling which PXD pixel is dead (=Readout system does not receive signals)
The payload class for PXD gain corrections.
The payload telling which PXD pixel to mask (ignore)
The payload collecting some meta information from running the masking algorithm.
Class to uniquely identify a any structure of the PXD and SVD.
static Database & Instance()
Instance of a singleton Database.