Belle II Software  release-05-02-19
ImportTimeWindow.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 # Import KLM time window payloads.
5 
6 import basf2
7 import ROOT
8 from ROOT.Belle2 import KLMDatabaseImporter, KLMTimeWindow
9 
10 basf2.set_log_level(basf2.LogLevel.INFO)
11 
12 dbImporter = KLMDatabaseImporter()
13 
14 timeWindow = KLMTimeWindow()
15 timeWindow.setCoincidenceWindow(50)
16 timeWindow.setPromptTime(0)
17 # Raw KLM scintillator hit times are in the range from -5000 to -4000 ns approximately.
18 # The prompt window can be readjusted after the implementation of KLM time calibration.
19 # timeWindow.setPromptWindow(50)
20 timeWindow.setPromptWindow(10000)
21 
22 dbImporter.setIOV(0, 0, 0, -1)
23 dbImporter.importTimeWindow(timeWindow)
24 
25 dbImporter.setIOV(1002, 0, 1002, -1)
26 dbImporter.importTimeWindow(timeWindow)
27 
28 dbImporter.setIOV(1003, 0, 1003, -1)
29 dbImporter.importTimeWindow(timeWindow)