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