152 Event processor: get data and print to screen
155 event = evtMetaData.obj().getEvent()
156 run = evtMetaData.obj().
getRun()
158 for waveform
in waveforms:
159 chan = waveform.getChannel()
162 nInFirstWindow, nNarrowPeaks, nHeight150, nOscillations = 0, 0, 0, 0
165 wins = np.array(waveform.getStorageWindows())
166 if not np.all(wins[:-1] <= wins[1:]):
167 self.nWaveFormsOutOfOrder += 1
168 if False and args.plotWaveforms:
169 wf_display(waveform, run, event,
"windowOrder")
170 self.plotCounter += 1
172 wf = np.array(waveform.getWaveform())
173 if False and args.plotWaveforms:
174 wf_display(waveform, run, event,
"general")
175 self.plotCounter += 1
179 rawDigits = waveform.getRelationsWith(
"TOPRawDigits")
180 nTOPRawDigits = len(rawDigits)
182 if False and args.plotWaveforms
and nTOPRawDigits > 2:
184 wf_display(waveform, run, event,
"manyPeaks")
185 self.plotCounter += 1
186 if False and args.plotWaveforms
and nTOPRawDigits > 3:
188 wf_display(waveform, run, event,
"tooManyPeaks")
189 self.plotCounter += 1
191 fePeakHt = raw.getValuePeak()
192 fePeakTDC = raw.getSamplePeak()
193 fePeakWd = raw.getSampleFall() - raw.getSampleRise()
194 fePeakIntegral = raw.getIntegral()
198 if 0 < fePeakTDC < 65
and chan % 8 == 0:
201 if False and args.plotWaveforms:
202 wf_display(waveform, run, event,
"calPuls_firstWin")
203 self.plotCounter += 1
206 if (140 < fePeakHt < 220)
and chan % 8 == 0:
207 if False and args.plotWaveforms:
208 wf_display(waveform, run, event,
"strangeADCBump_1")
209 self.plotCounter += 1
210 if (300 < fePeakHt < 410)
and chan % 8 == 0:
211 if False and args.plotWaveforms:
212 wf_display(waveform, run, event,
"strangeADCBump_2")
213 self.plotCounter += 1
219 if nTOPRawDigits > 1:
221 fePeak1Ht = rawDigits[1].getValuePeak()
222 fePeak1TDC = rawDigits[1].getSamplePeak()
223 fePeak1Wd = rawDigits[1].getSampleFall() - rawDigits[1].getSampleRise()
226 if nTOPRawDigits > 1
and fePeak1TDC < 64:
228 if False and args.plotWaveforms:
229 wf_display(waveform, run, event,
"secondPeakInFirstWindow")
230 self.plotCounter += 1
232 if fePeakWd < 5
or nTOPRawDigits > 1
and fePeak1Wd < 5:
235 if False and args.plotWaveforms:
236 wf_display(waveform, run, event,
"thinpeak")
237 self.plotCounter += 1
239 if 145 < fePeak1Ht < 155
and chan % 8 == 0:
242 if False and args.plotWaveforms:
243 wf_display(waveform, run, event,
"peak1Ht_is_150")
244 self.plotCounter += 1
246 if nTOPRawDigits > 5
and (fePeakHt - fePeak1Ht) < 5:
251 if False and args.plotWaveforms:
252 wf_display(waveform, run, event,
"oscillations")
253 self.plotCounter += 1
274 if args.plotWaveforms
and self.plotCounter >= 10:
275 evtMetaData.obj().setEndOfData()
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.
static ExpRun getRun(std::map< ExpRun, std::pair< double, double >> runs, double t)
Get exp number + run number from time.