60 def beginRun(self):
61 '''begin run'''
62
64
65
66 tmp_calAmp = SVDStripCalAmp()
67 tmp_calAmp.gain = 275
68 tmp_calAmp.peakTime = 75
69 tmp_calAmp.pulseWidth = pulseWidth
71 tmp_calAmp, "PulseShapeCalibrations_default_" + str(now.isoformat()) +
72 "_INFO:_peakTime=fromPhase3calibrations_pulseWidth=130_gain=fromPhase3calibrations")
73
75
76 for layer in geoCache.getLayers(Belle2.VXD.SensorInfoBase.SVD):
77 layerNumber = layer.getLayerNumber()
78 for ladder in geoCache.getLadders(layer):
79 ladderNumber = ladder.getLadderNumber()
80 for sensor in geoCache.getSensors(ladder):
81 sensorNumber = sensor.getSensorNumber()
82 for side in (0, 1):
83 Nstrips = 768
84 print("setting PulseShape for " +
85 str(layerNumber) + "." + str(ladderNumber) + "." + str(sensorNumber) + "." + str(side))
86 if side == 0:
87 if layerNumber == 3:
88 gain = gain_L3_V
89 peakTime = peakTime_L3_V
90 else:
91 Nstrips = 512
92 if sensorNumber == 1:
93 gain = gain_fwd_V
94 peakTime = peakTime_fwd_V
95 else:
96 if sensorNumber == layerNumber - 1:
97 gain = gain_bkw_V
98 peakTime = peakTime_bkw_V
99 else:
100 gain = gain_origami_V
101 peakTime = peakTime_origami_V
102 if side == 1:
103 if layerNumber == 3:
104 gain = gain_L3_U
105 peakTime = peakTime_L3_U
106 else:
107 if sensorNumber == 1:
108 gain = gain_fwd_U
109 peakTime = peakTime_fwd_U
110 else:
111 if sensorNumber == layerNumber - 1:
112 gain = gain_bkw_U
113 peakTime = peakTime_bkw_U
114 else:
115 gain = gain_origami_U
116 peakTime = peakTime_origami_U
117
118 tmp_calAmp.gain = 1 / gain
119 tmp_calAmp.peakTime = peakTime
120
121
122 for strip in range(0, Nstrips):
123
124
125 calAmp_payload.set(layerNumber, ladderNumber, sensorNumber, bool(side), strip, tmp_calAmp)
126
128
129
static IntervalOfValidity always()
Function that returns an interval of validity that is always valid, c.f.
base class for calibrations classes
static GeoCache & getInstance()
Return a reference to the singleton instance.
static Database & Instance()
Instance of a singleton Database.