Belle II Software development
ImportReconstructionParameters.py
1#!/usr/bin/env python3
2
3
10
11# Import KLM scintillator digitization parameters payloads.
12
13import sys
14import basf2
15from ROOT import Belle2 # noqa: make the Belle2 namespace available
16from ROOT.Belle2 import KLMDatabaseImporter, KLMReconstructionParameters
17
18basf2.set_log_level(basf2.LogLevel.INFO)
19
20mc = False
21if (len(sys.argv) >= 2):
22 if (sys.argv[1] == 'mc'):
23 mc = True
24
25dbImporter = KLMDatabaseImporter()
26
27recPar = KLMReconstructionParameters()
28recPar.setMultiStripDigitsEnabled(False)
29
30if (mc):
31 dbImporter.setIOV(1002, 0, 1002, -1)
32 dbImporter.importReconstructionParameters(recPar)
33
34 dbImporter.setIOV(1003, 0, 1003, -1)
35 dbImporter.importReconstructionParameters(recPar)
36
37 dbImporter.setIOV(0, 0, 0, -1)
38 dbImporter.importReconstructionParameters(recPar)
39
40else:
41 dbImporter.setIOV(0, 0, 15, -1)
42 dbImporter.importReconstructionParameters(recPar)
43
44 recPar.setMultiStripDigitsEnabled(True)
45 dbImporter.setIOV(16, 0, -1, -1)
46 dbImporter.importReconstructionParameters(recPar)