14from ROOT
import Belle2
15from ROOT.Belle2
import KLMDatabaseImporter, BKLMAlignment, EKLMAlignment, \
16 EKLMSegmentAlignment, KLMAlignmentData, \
17 KLMChannelIndex, KLMDisplacementGenerator
20main = basf2.create_path()
21basf2.set_log_level(basf2.LogLevel.INFO)
24main.add_module(
'EventInfoSetter')
27main.add_module(
'Gearbox')
32dbImporter = KLMDatabaseImporter()
34bklmAlignment = BKLMAlignment()
35eklmAlignment = EKLMAlignment()
36eklmSegmentAlignment = EKLMSegmentAlignment()
39displacementGenerator = KLMDisplacementGenerator()
40displacementGenerator.fillZeroDisplacements(
41 eklmAlignment, eklmSegmentAlignment)
42displacementGenerator.saveDisplacement(
43 eklmAlignment, eklmSegmentAlignment,
'EKLMDisplacement.root')
46alignmentData = KLMAlignmentData(0, 0, 0, 0, 0, 0)
47index = KLMChannelIndex(KLMChannelIndex.c_IndexLevelLayer)
48index2 = KLMChannelIndex(KLMChannelIndex.c_IndexLevelLayer)
49index = index2.beginBKLM()
51while (index != index2.endBKLM()):
52 module = index.getKLMModuleNumber()
53 bklmAlignment.setModuleAlignment(module, alignmentData)
57dbImporter.setIOV(0, 0, -1, -1)
58dbImporter.importAlignment(
59 bklmAlignment, eklmAlignment, eklmSegmentAlignment,
True)