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.generateFixedModuleDisplacement(1, 0, 0)
43displacementGenerator.saveDisplacement(
44 eklmAlignment, eklmSegmentAlignment,
'EKLMDisplacement.root')
47alignmentData = KLMAlignmentData(0, 0, 0, 0, 0, 0)
48index = KLMChannelIndex(KLMChannelIndex.c_IndexLevelLayer)
49index2 = KLMChannelIndex(KLMChannelIndex.c_IndexLevelLayer)
50index = index2.beginBKLM()
52while (index != index2.endBKLM()):
53 module = index.getKLMModuleNumber()
54 bklmAlignment.setModuleAlignment(module, alignmentData)
58dbImporter.setIOV(0, 0, -1, -1)
59dbImporter.importAlignment(
60 bklmAlignment, eklmAlignment, eklmSegmentAlignment,
True)