21 from ROOT
import Belle2
25 b2.set_random_seed(10346)
28 def importEmptyHotPixelMask(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
30 This function imports an empty payloads for the PXD
33 This function works for every Belle 2 geometry
44 def importEmptyDeadPixelMask(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
46 This function imports an empty payloads for the PXD
49 This function works for every Belle 2 geometry
60 def importEmptyOccupancyInfo(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
62 This function imports an empty payloads for the PXD
65 This function works for every Belle 2 geometry
76 def importEmptyClusterChargeMap(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
78 This function imports an empty payloads for the PXD
81 This function works for every Belle 2 geometry
92 def importEmptyGainMap(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
94 This function imports an empty payloads for the PXD
97 This function works for every Belle 2 geometry
108 def importRandomPixelMaskPhase2(HotPixelFraction=0.001, expLow=0, runLow=0, expHigh=-1, runHigh=-1):
110 This function imports payloads for the PXD
111 pixel masking with random hot pixels
113 This function works for Phase 2
133 AverageHotPixels = HotPixelFraction * 250 * 768
136 for sensorID
in sensorIDList:
138 nHotPixels = ROOT.gRandom.Poisson(AverageHotPixels)
140 for i
in range(nHotPixels):
141 uid = ROOT.gRandom.Integer(250)
142 vid = ROOT.gRandom.Integer(768)
143 print(
"mask pixel uid={}, vid={}, id={}".format(uid, vid, uid * 768 + vid))
144 pixelMask.maskSinglePixel(sensorID.getID(), uid * 768 + vid)
147 for sensorMask
in pixelMask.getMaskedPixelMap():
149 print(
"Mask for sensor {} contains {} pixels".format(sensorID, sensorMask.second.size()))
155 if __name__ ==
"__main__":
157 importEmptyHotPixelMask()
158 importEmptyDeadPixelMask()
159 importEmptyOccupancyInfo()
161 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.