14from ROOT
import Belle2
15from ROOT.Belle2
import KLMDatabaseImporter, KLMStripEfficiency, KLMChannelIndex
18if (len(sys.argv) < 2):
19 print(
'Usage: basf2 ImportStripEfficiency.py [mc | input_file].')
20elif (sys.argv[1] ==
'mc'):
23 inputFile = sys.argv[1]
25dbImporter = KLMDatabaseImporter()
27stripEfficiency = KLMStripEfficiency()
30 index = KLMChannelIndex()
31 index2 = KLMChannelIndex()
32 while (index != index2.end()):
33 channel = index.getKLMChannelNumber()
34 stripEfficiency.setEfficiency(channel, 1.0, 0.0)
37 dbImporter.setIOV(0, 0, 0, -1)
38 dbImporter.importStripEfficiency(stripEfficiency)
40 dbImporter.setIOV(1002, 0, 1002, -1)
41 dbImporter.importStripEfficiency(stripEfficiency)
43 dbImporter.setIOV(1003, 0, 1003, -1)
44 dbImporter.importStripEfficiency(stripEfficiency)
47 dbImporter.loadStripEfficiency(stripEfficiency, inputFile)
49 dbImporter.setIOV(0, 0, -1, -1)
50 dbImporter.importStripEfficiency(stripEfficiency)