13 from ROOT
import Belle2
17 set_random_seed(10346)
20 def importEmptyHotPixelMask(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
22 This function imports an empty payloads for the PXD
25 This function works for every Belle 2 geometry
36 def importEmptyDeadPixelMask(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
38 This function imports an empty payloads for the PXD
41 This function works for every Belle 2 geometry
52 def importEmptyOccupancyInfo(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
54 This function imports an empty payloads for the PXD
57 This function works for every Belle 2 geometry
68 def importEmptyClusterChargeMap(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
70 This function imports an empty payloads for the PXD
73 This function works for every Belle 2 geometry
84 def importEmptyGainMap(expLow=0, runLow=0, expHigh=-1, runHigh=-1):
86 This function imports an empty payloads for the PXD
89 This function works for every Belle 2 geometry
100 def importRandomPixelMaskPhase2(HotPixelFraction=0.001, expLow=0, runLow=0, expHigh=-1, runHigh=-1):
102 This function imports payloads for the PXD
103 pixel masking with random hot pixels
105 This function works for Phase 2
125 AverageHotPixels = HotPixelFraction * 250 * 768
128 for sensorID
in sensorIDList:
130 nHotPixels = ROOT.gRandom.Poisson(AverageHotPixels)
132 for i
in range(nHotPixels):
133 uid = ROOT.gRandom.Integer(250)
134 vid = ROOT.gRandom.Integer(768)
135 print(
"mask pixel uid={}, vid={}, id={}".format(uid, vid, uid * 768 + vid))
136 pixelMask.maskSinglePixel(sensorID.getID(), uid * 768 + vid)
139 for sensorMask
in pixelMask.getMaskedPixelMap():
141 print(
"Mask for sensor {} contains {} pixels".format(sensorID, sensorMask.second.size()))
147 if __name__ ==
"__main__":
149 importEmptyHotPixelMask()
150 importEmptyDeadPixelMask()
151 importEmptyOccupancyInfo()
153 importEmptyClusterChargeMap()