12SVD Default Occupancy Calibration importer (MC).
13Script to Import Calibrations into a local DB
16from ROOT
import Belle2
19now = datetime.datetime.now()
23occupancy_allOtherLayers = 0.002
27 ''' default importer of strip occupancy'''
35 str(now.isoformat()) +
"_INFO:_testJamesBranch")
39 for layer
in geoCache.getLayers(Belle2.VXD.SensorInfoBase.SVD):
40 layerNumber = layer.getLayerNumber()
41 for ladder
in geoCache.getLadders(layer):
42 ladderNumber = ladder.getLadderNumber()
43 for sensor
in geoCache.getSensors(ladder):
44 sensorNumber = sensor.getSensorNumber()
47 print(
"setting Occupancy for " +
48 str(layerNumber) +
"." + str(ladderNumber) +
"." + str(sensorNumber) +
"." + str(side))
51 occupancy = occupancy_L3
54 occupancy = occupancy_allOtherLayers
57 occupancy = occupancy_L3
59 occupancy = occupancy_allOtherLayers
61 print(
"WARNING: sensors end!...")
65 for strip
in range(0, Nstrips):
66 payload.set(layerNumber, ladderNumber, sensorNumber, bool(side), strip, occupancy)
71main = b2.create_path()
74eventinfosetter = b2.register_module(
'EventInfoSetter')
75eventinfosetter.param({
'evtNumList': [1],
'expList': 0,
'runList': 0})
76main.add_module(eventinfosetter)
78main.add_module(
"Gearbox")
79main.add_module(
"Geometry")
84progress = b2.register_module(
'Progress')
85main.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.