Belle II Software  release-05-01-25
SubtractCalSignal Class Reference
Inheritance diagram for SubtractCalSignal:
Collaboration diagram for SubtractCalSignal:

Public Member Functions

def event (self)
 

Detailed Description

subtract time of the first calibration signal 

Definition at line 29 of file subtractCalPulse.py.

Member Function Documentation

◆ event()

def event (   self)
event function 

Definition at line 32 of file subtractCalPulse.py.

32  def event(self):
33  ''' event function '''
34 
35  digits = Belle2.PyStoreArray('TOPDigits')
36  t0 = [0 for i in range(64)]
37  num = [0 for i in range(64)]
38  for digit in digits:
39  channel = digit.getChannel()
40  i = int(channel / 8)
41  ch = int(channel) % 8
42  if ch == calChannel and digit.getHitQuality() == 4:
43  if num[i] == 0:
44  t0[i] = digit.getTime()
45  num[i] += 1
46  else:
47  t0[i] = min(t0[i], digit.getTime())
48  num[i] += 1
49  sum = 0
50  for digit in digits:
51  i = int(digit.getChannel()/8)
52  if num[i] == 2:
53  digit.subtractT0(t0[i])
54  sum += 1
55  else:
56  digit.setHitQuality(0)
57  if sum == 0:
58  B2ERROR("No calibration double pulses found in the event")
59 
60 
61 # Create path

The documentation for this class was generated from the following file:
ClusterEfficiency.ClusterEfficiency.event
def event(self)
Definition: ClusterEfficiency.py:146
Belle2::PyStoreArray
a (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:58