Belle II Software  release-08-01-10
ShapeFitterModule Class Reference
Inheritance diagram for ShapeFitterModule:
Collaboration diagram for ShapeFitterModule:

Public Member Functions

def initialize (self)
 
def event (self)
 

Public Attributes

 eventNumber
 event number
 
 digits
 Store array of ECLDigits.
 

Detailed Description

Module that prints ShaperDSP emulator discrepancies
   for ECL data.

Uses ECLDigits, ECLDsps, ECLTrigs dataobjects

Definition at line 42 of file EclShapeFitter.py.

Member Function Documentation

◆ event()

def event (   self)
Check for discrepancy between real ShaperDSP
   data and shapeFitter function from
   ecl/utility/src/ECLDspUtilities.cc .

Definition at line 58 of file EclShapeFitter.py.

58  def event(self):
59  """Check for discrepancy between real ShaperDSP
60  data and shapeFitter function from
61  ecl/utility/src/ECLDspUtilities.cc .
62  """
63 
64  for digit in self.digits:
65  waveform = digit.getRelated('ECLDsps')
66  if not waveform:
67  continue
68 
69  trig = digit.getRelated('ECLTrigs')
70  if not trig:
71  continue
72 
73  trigger_time = int(trig.getTimeTrig())
74 
75  # Waveform data
76  adc = waveform.getDspA()
77  cid = digit.getCellId()
78  amp = digit.getAmp()
79  time = digit.getTimeFit()
80  qual = digit.getQuality()
81 
82  # == Call emulator
83  result = Belle2.ECL.ECLDspUtilities.shapeFitter(cid, adc, trigger_time)
84 
85  amp2 = result.amp
86  time2 = result.time
87  qual2 = result.quality
88 
89  if amp != amp2 or time != time2 or qual != qual2:
90  print()
91  print('RealData: %4d %6d %6d %6d' % (cid, amp, time, qual))
92  print('Emulator: %4d %6d %6d %6d' % (cid, amp2, time2, qual2))
93  if verbose:
94  print('Event : %d Trigger time: %d' % (self.evtn, trigger_time))
95  print('CellID: %d AmpData: %d TimeData: %d QualityData: %d' % (cid, amp, time, qual))
96  print(' '.join([str(x) for x in adc]), end='')
97  print(' ')
98 
99  self.eventNumber += 1
100 
101 
102 b2.set_log_level(b2.LogLevel.ERROR)
103 
104 # Create path. Register necessary modules to this path.
static ECLShapeFit shapeFitter(int cid, std::vector< int > adc, int ttrig, bool adjusted_timing=true)
Emulate shape fitting algorithm from ShaperDSP using algorithm from ecl/utility/src/ECLDspEmulator....

◆ initialize()

def initialize (   self)
Initialize

Definition at line 50 of file EclShapeFitter.py.


The documentation for this class was generated from the following file: