13 SVD Default PulseShape Calibration importer (MC).
14 Script to Import Calibrations into a local DB
17 from ROOT
import Belle2
18 from ROOT.Belle2
import SVDStripCalAmp
22 now = datetime.datetime.now()
44 gain_origami_U = 271.4
45 gain_origami_V = 218.8
52 peakTime_origami_U = 66
53 peakTime_origami_V = 52
59 '''default pulse shape calibrations importer'''
67 tmp_calAmp = SVDStripCalAmp()
69 tmp_calAmp.peakTime = 75
70 tmp_calAmp.pulseWidth = pulseWidth
72 tmp_calAmp,
"PulseShapeCalibrations_default_" + str(now.isoformat()) +
73 "_INFO:_peakTime=fromPhase3calibrations_pulseWidth=130_gain=fromPhase3calibrations")
77 for layer
in geoCache.getLayers(Belle2.VXD.SensorInfoBase.SVD):
78 layerNumber = layer.getLayerNumber()
79 for ladder
in geoCache.getLadders(layer):
80 ladderNumber = ladder.getLadderNumber()
81 for sensor
in geoCache.getSensors(ladder):
82 sensorNumber = sensor.getSensorNumber()
85 print(
"setting PulseShape for " +
86 str(layerNumber) +
"." + str(ladderNumber) +
"." + str(sensorNumber) +
"." + str(side))
90 peakTime = peakTime_L3_V
95 peakTime = peakTime_fwd_V
97 if sensorNumber == layerNumber - 1:
99 peakTime = peakTime_bkw_V
101 gain = gain_origami_V
102 peakTime = peakTime_origami_V
106 peakTime = peakTime_L3_U
108 if sensorNumber == 1:
110 peakTime = peakTime_fwd_U
112 if sensorNumber == layerNumber - 1:
114 peakTime = peakTime_bkw_U
116 gain = gain_origami_U
117 peakTime = peakTime_origami_U
119 tmp_calAmp.gain = 1 / gain
120 tmp_calAmp.peakTime = peakTime
123 for strip
in range(0, Nstrips):
126 calAmp_payload.set(layerNumber, ladderNumber, sensorNumber, bool(side), strip, tmp_calAmp)
131 b2.conditions.prepend_globaltag(
"svd_onlySVDinGeoConfiguration")
133 main = b2.create_path()
136 eventinfosetter = b2.register_module(
'EventInfoSetter')
137 eventinfosetter.param({
'evtNumList': [1],
'expList': 0,
'runList': 0})
138 main.add_module(eventinfosetter)
140 main.add_module(
"Gearbox")
141 main.add_module(
"Geometry")
146 progress = b2.register_module(
'Progress')
147 main.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.