12SVD Default PulseShape Calibration importer (MC).
13Script to Import Calibrations into a local DB
16from ROOT
import Belle2
17from ROOT.Belle2
import SVDStripCalAmp
21now = datetime.datetime.now()
51peakTime_origami_U = 66
52peakTime_origami_V = 52
58 '''default pulse shape calibrations importer'''
66 tmp_calAmp = SVDStripCalAmp()
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")
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()
84 print(
"setting PulseShape for " +
85 str(layerNumber) +
"." + str(ladderNumber) +
"." + str(sensorNumber) +
"." + str(side))
89 peakTime = peakTime_L3_V
94 peakTime = peakTime_fwd_V
96 if sensorNumber == layerNumber - 1:
98 peakTime = peakTime_bkw_V
100 gain = gain_origami_V
101 peakTime = peakTime_origami_V
105 peakTime = peakTime_L3_U
107 if sensorNumber == 1:
109 peakTime = peakTime_fwd_U
111 if sensorNumber == layerNumber - 1:
113 peakTime = peakTime_bkw_U
115 gain = gain_origami_U
116 peakTime = peakTime_origami_U
118 tmp_calAmp.gain = 1 / gain
119 tmp_calAmp.peakTime = peakTime
122 for strip
in range(0, Nstrips):
125 calAmp_payload.set(layerNumber, ladderNumber, sensorNumber, bool(side), strip, tmp_calAmp)
130b2.conditions.prepend_globaltag(
"svd_onlySVDinGeoConfiguration")
132main = b2.create_path()
135eventinfosetter = b2.register_module(
'EventInfoSetter')
136eventinfosetter.param({
'evtNumList': [1],
'expList': 0,
'runList': 0})
137main.add_module(eventinfosetter)
139main.add_module(
"Gearbox")
140main.add_module(
"Geometry")
145progress = b2.register_module(
'Progress')
146main.add_module(progress)
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.