14 from ROOT.Belle2
import KLMDatabaseImporter, BKLMAlignment, EKLMAlignment, \
15 EKLMSegmentAlignment, KLMAlignmentData, \
16 KLMChannelIndex, KLMDisplacementGenerator
19 main = basf2.create_path()
20 basf2.set_log_level(basf2.LogLevel.INFO)
23 main.add_module(
'EventInfoSetter')
26 main.add_module(
'Gearbox')
31 dbImporter = KLMDatabaseImporter()
33 bklmAlignment = BKLMAlignment()
34 eklmAlignment = EKLMAlignment()
35 eklmSegmentAlignment = EKLMSegmentAlignment()
38 displacementGenerator = KLMDisplacementGenerator()
39 displacementGenerator.fillZeroDisplacements(
40 eklmAlignment, eklmSegmentAlignment)
41 displacementGenerator.saveDisplacement(
42 eklmAlignment, eklmSegmentAlignment,
'EKLMDisplacement.root')
45 alignmentData = KLMAlignmentData(0, 0, 0, 0, 0, 0)
46 index = KLMChannelIndex(KLMChannelIndex.c_IndexLevelLayer)
47 index2 = KLMChannelIndex(KLMChannelIndex.c_IndexLevelLayer)
48 index = index2.beginBKLM()
50 while (index != index2.endBKLM()):
51 module = index.getKLMModuleNumber()
52 bklmAlignment.setModuleAlignment(module, alignmentData)
56 dbImporter.setIOV(0, 0, -1, -1)
57 dbImporter.importAlignment(
58 bklmAlignment, eklmAlignment, eklmSegmentAlignment,
True)