13 SVD Default Occupancy Calibration importer (MC).
14 Script to Import Calibrations into a local DB
17 from ROOT
import Belle2
20 now = datetime.datetime.now()
24 occupancy_allOtherLayers = 0.002
28 ''' default importer of strip occupancy'''
36 str(now.isoformat()) +
"_INFO:_testJamesBranch")
40 for layer
in geoCache.getLayers(Belle2.VXD.SensorInfoBase.SVD):
41 layerNumber = layer.getLayerNumber()
42 for ladder
in geoCache.getLadders(layer):
43 ladderNumber = ladder.getLadderNumber()
44 for sensor
in geoCache.getSensors(ladder):
45 sensorNumber = sensor.getSensorNumber()
48 print(
"setting Occupancy for " +
49 str(layerNumber) +
"." + str(ladderNumber) +
"." + str(sensorNumber) +
"." + str(side))
52 occupancy = occupancy_L3
55 occupancy = occupancy_allOtherLayers
58 occupancy = occupancy_L3
60 occupancy = occupancy_allOtherLayers
62 print(
"WARNING: sensors end!...")
66 for strip
in range(0, Nstrips):
67 payload.set(layerNumber, ladderNumber, sensorNumber, bool(side), strip, occupancy)
72 main = b2.create_path()
75 eventinfosetter = b2.register_module(
'EventInfoSetter')
76 eventinfosetter.param({
'evtNumList': [1],
'expList': 0,
'runList': 0})
77 main.add_module(eventinfosetter)
79 main.add_module(
"Gearbox")
80 main.add_module(
"Geometry")
85 progress = b2.register_module(
'Progress')
86 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.