Belle II Software development
ImportTimeWindow.py
1#!/usr/bin/env python3
2
3
10
11# Import KLM time window payloads.
12
13import basf2
14from ROOT import Belle2 # noqa: make the Belle2 namespace available
15from ROOT.Belle2 import KLMDatabaseImporter, KLMTimeWindow
16
17basf2.set_log_level(basf2.LogLevel.INFO)
18
19dbImporter = KLMDatabaseImporter()
20
21timeWindow = KLMTimeWindow()
22timeWindow.setCoincidenceWindow(50)
23timeWindow.setPromptTime(0)
24# Raw KLM scintillator hit times are in the range from -5000 to -4000 ns approximately.
25# The prompt window can be readjusted after the implementation of KLM time calibration.
26# timeWindow.setPromptWindow(50)
27timeWindow.setPromptWindow(10000)
28
29dbImporter.setIOV(0, 0, 0, -1)
30dbImporter.importTimeWindow(timeWindow)
31
32dbImporter.setIOV(1002, 0, 1002, -1)
33dbImporter.importTimeWindow(timeWindow)
34
35dbImporter.setIOV(1003, 0, 1003, -1)
36dbImporter.importTimeWindow(timeWindow)