18 from ROOT
import Belle2
24 calChannel = int(argvs[1])
26 B2RESULT(
'using calibration channel ' + str(calChannel))
30 ''' subtract time of the first calibration signal '''
33 ''' event function '''
36 t0 = [0
for i
in range(64)]
37 num = [0
for i
in range(64)]
39 channel = digit.getChannel()
42 if ch == calChannel
and digit.getHitQuality() == 4:
44 t0[i] = digit.getTime()
47 t0[i] = min(t0[i], digit.getTime())
51 i = int(digit.getChannel()/8)
53 digit.subtractT0(t0[i])
56 digit.setHitQuality(0)
58 B2ERROR(
"No calibration double pulses found in the event")
65 roinput = register_module(
'RootInput')
66 main.add_module(roinput)
72 output = register_module(
'RootOutput')
73 main.add_module(output)
76 progress = register_module(
'Progress')
77 main.add_module(progress)