Belle II Software  release-05-02-19
ShapeFitterModule Class Reference

BASF2 PATH GENERATION. More...

Inheritance diagram for ShapeFitterModule:
Collaboration diagram for ShapeFitterModule:

Public Member Functions

def initialize (self)
 
def event (self)
 

Public Attributes

 evtn
 Event number.
 
 digits
 Store array of ECLDigits.
 

Detailed Description

BASF2 PATH GENERATION.

Definition at line 55 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 64 of file EclShapeFitter.py.

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

◆ initialize()

def initialize (   self)
 

Definition at line 56 of file EclShapeFitter.py.


The documentation for this class was generated from the following file:
ClusterEfficiency.ClusterEfficiency.event
def event(self)
Definition: ClusterEfficiency.py:146
Belle2::ECL::ECLDspUtilities::shapeFitter
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....
Definition: ECLDspUtilities.cc:255