147 Event processor: get data and print to screen
150 event = evtMetaData.obj().getEvent()
151 run = evtMetaData.obj().
getRun()
153 for waveform
in waveforms:
154 chan = waveform.getChannel()
157 nInFirstWindow, nNarrowPeaks, nHeight150, nOscillations = 0, 0, 0, 0
160 wins = np.array(waveform.getStorageWindows())
161 if not np.all(wins[:-1] <= wins[1:]):
162 self.nWaveFormsOutOfOrder += 1
163 if False and args.plotWaveforms:
164 wf_display(waveform, run, event,
"windowOrder")
165 self.plotCounter += 1
167 wf = np.array(waveform.getWaveform())
168 if False and args.plotWaveforms:
169 wf_display(waveform, run, event,
"general")
170 self.plotCounter += 1
174 rawDigits = waveform.getRelationsWith(
"TOPRawDigits")
175 nTOPRawDigits = len(rawDigits)
177 if False and args.plotWaveforms
and nTOPRawDigits > 2:
179 wf_display(waveform, run, event,
"manyPeaks")
180 self.plotCounter += 1
181 if False and args.plotWaveforms
and nTOPRawDigits > 3:
183 wf_display(waveform, run, event,
"tooManyPeaks")
184 self.plotCounter += 1
186 fePeakHt = raw.getValuePeak()
187 fePeakTDC = raw.getSamplePeak()
188 fePeakWd = raw.getSampleFall() - raw.getSampleRise()
189 fePeakIntegral = raw.getIntegral()
193 if 0 < fePeakTDC < 65
and chan % 8 == 0:
196 if False and args.plotWaveforms:
197 wf_display(waveform, run, event,
"calPuls_firstWin")
198 self.plotCounter += 1
201 if (140 < fePeakHt < 220)
and chan % 8 == 0:
202 if False and args.plotWaveforms:
203 wf_display(waveform, run, event,
"strangeADCBump_1")
204 self.plotCounter += 1
205 if (300 < fePeakHt < 410)
and chan % 8 == 0:
206 if False and args.plotWaveforms:
207 wf_display(waveform, run, event,
"strangeADCBump_2")
208 self.plotCounter += 1
214 if nTOPRawDigits > 1:
216 fePeak1Ht = rawDigits[1].getValuePeak()
217 fePeak1TDC = rawDigits[1].getSamplePeak()
218 fePeak1Wd = rawDigits[1].getSampleFall() - rawDigits[1].getSampleRise()
219 fePeak1Integral = rawDigits[1].getIntegral()
221 if nTOPRawDigits > 1
and fePeak1TDC < 64:
223 if False and args.plotWaveforms:
224 wf_display(waveform, run, event,
"secondPeakInFirstWindow")
225 self.plotCounter += 1
227 if fePeakWd < 5
or nTOPRawDigits > 1
and fePeak1Wd < 5:
230 if False and args.plotWaveforms:
231 wf_display(waveform, run, event,
"thinpeak")
232 self.plotCounter += 1
234 if 145 < fePeak1Ht < 155
and chan % 8 == 0:
237 if False and args.plotWaveforms:
238 wf_display(waveform, run, event,
"peak1Ht_is_150")
239 self.plotCounter += 1
241 if nTOPRawDigits > 5
and (fePeakHt - fePeak1Ht) < 5:
246 if False and args.plotWaveforms:
247 wf_display(waveform, run, event,
"oscillations")
248 self.plotCounter += 1
269 if args.plotWaveforms
and self.plotCounter >= 10:
270 evtMetaData.obj().setEndOfData()