Belle II Software  release-06-01-15
ShapeFitterModule Class Reference
Inheritance diagram for ShapeFitterModule:
Collaboration diagram for ShapeFitterModule:

Public Member Functions

def initialize (self)
 
def event (self)
 

Public Attributes

 eventNumber
 
 digits
 

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 57 of file EclShapeFitter.py.

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