Belle II Software development
ShapeFitterModule Class Reference
Inheritance 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 41 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(f'RealData: {cid:4} {amp:6} {time:6} {qual:6}')
91 print(f'Emulator: {cid:4} {amp2:6} {time2:6} {qual2:6}')
92 if verbose:
93 print(f'Event : {self.eventNumber} Trigger time: {trigger_time}')
94 print(f'CellID: {cid} AmpData: {amp} TimeData: {time} QualityData: {qual}')
95 print(' '.join([str(x) for x in adc]), end='')
96 print(' ')
97
98 self.eventNumber += 1
99
100
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 49 of file EclShapeFitter.py.

49 def initialize(self):
50 """Initialize
51 """
52
53 self.eventNumber = 0
54
55 self.digits = Belle2.PyStoreArray('ECLDigits')
56
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72

Member Data Documentation

◆ digits

digits

Store array of ECLDigits.

Definition at line 55 of file EclShapeFitter.py.

◆ eventNumber

eventNumber

event number

Definition at line 53 of file EclShapeFitter.py.


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