Belle II Software  release-05-01-25
EventInspectorPocketDAQ.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 # Purpose:
5 # basf2 module to histogram useful values in PocketDAQ data created by the
6 # test stand at Indiana University.
7 #
8 import basf2
9 import math
10 import ctypes
11 import ROOT
12 from ROOT import Belle2, TH1F, TH2F, TCanvas, THistPainter, TPad, TFile
13 
14 
16  """Fill BKLM histograms of values from RawKLMs, KLMDigits, BKLMHit1ds, and BKLMHit2ds;
17  (optionally) draw event displays from these data-objects."""
18 
19 
20  BKLM_ID = 0x07000000
21 
22  EKLM_ID = 0x08000000
23 
24  BKLM_STRIP_BIT = 0
25 
26  BKLM_PLANE_BIT = 6
27 
28  BKLM_LAYER_BIT = 7
29 
30  BKLM_SECTOR_BIT = 11
31 
32  BKLM_SECTION_BIT = 14
33 
34  BKLM_MAXSTRIP_BIT = 15
35 
36  BKLM_STRIP_MASK = 0x3f
37 
38  BKLM_PLANE_MASK = (1 << BKLM_PLANE_BIT)
39 
40  BKLM_LAYER_MASK = (15 << BKLM_LAYER_BIT)
41 
42  BKLM_SECTOR_MASK = (7 << BKLM_SECTOR_BIT)
43 
44  BKLM_SECTION_MASK = (1 << BKLM_SECTION_BIT)
45 
46  BKLM_MAXSTRIP_MASK = (63 << BKLM_MAXSTRIP_BIT)
47 
48  BKLM_MODULEID_MASK = (BKLM_SECTION_MASK | BKLM_SECTOR_MASK | BKLM_LAYER_MASK)
49 
50  def __init__(self, exp, run, histName, pdfName):
51  """Constructor
52 
53  Arguments:
54  exp (str): formatted experiment number
55  run (str): formatter run number
56  histName (str): path name of the output histogram ROOT file
57  pdfName (str): path name of the output histogram PDF file
58  eventPdfName (str): path name of the output event-display PDF file
59  maxDisplays (int): max # of events displays to write
60  minRPCHits (int): min # of RPC BKLMHit2ds in any sector for event display
61  """
62  super().__init__()
63 
64  self.exp = exp
65 
66  self.run = run
67 
68  self.histName = histName
69 
70  self.pdfName = pdfName
71 
72  def makeGraph(self, x, y):
73  """Create and return a ROOT TGraph
74 
75  Arguments:
76  x[] (real): x coordinates
77  y[] (real): y coordinates
78  """
79  graph = ROOT.TGraph()
80  for i in range(0, len(x)):
81  graph.SetPoint(i, x[i], y[i])
82  graph.SetLineColor(2)
83  graph.SetLineWidth(1)
84  return graph
85 
86  def makeText(self, x, y, s):
87  """Create and return a ROOT TLatex with the following properties:
88  size = 0.04, color = red, alignment = middle centre, angle = 90 degrees
89 
90  Arguments:
91  x (real): x coordinate
92  y (real): y coordinate
93  s (str): character string
94  """
95  text = ROOT.TLatex(x, y, s)
96  text.SetTextSize(0.04)
97  text.SetTextColor(2)
98  text.SetTextAlign(22)
99  text.SetTextAngle(90)
100  return text
101 
102  def initialize(self):
103  """Handle job initialization: create histograms"""
104 
105  expRun = 'e{0:02d}r{1}: '.format(int(self.exp), int(self.run))
106 
107 
108  self.histogramFile = ROOT.TFile.Open(self.histName, "RECREATE")
109 
110  # create the rawKLM histograms
111 
112 
113  self.hist_ttc_trigtime = ROOT.TH1F('ttc_trigtime',
114  expRun + 'tt_ctime relative to triggertime;' +
115  'tt_ctime - triggertime (ns)',
116  256, -0.5, 2047.5)
117 
118  self.hist_rawKLMlane = ROOT.TH1F('rawKLMlane',
119  expRun + 'RawKLM lane;Lane (scint: 1..7, RPC: 8..20)',
120  21, -0.5, 20.5)
121 
122  self.hist_rawKLMsizeMultihit = ROOT.TH1F('rawKLMsizeMultihit',
123  expRun + 'RawKLM word count (N/channel)',
124  200, -0.5, 199.5)
125 
126  self.hist_rawKLMsize = ROOT.TH1F('rawKLMsize',
127  expRun + 'RawKLM word count (1/channel)',
128  200, -0.5, 199.5)
129 
130  self.hist_PerChannelMultiplicity = ROOT.TH2F(
131  'PerChannelMultiplicity',
132  expRun + 'Per-channel multiplicity (N/channel > 1);' +
133  'Per-channel multiplicity;' +
134  '(Lane #) * 2 + (Axis #)',
135  30, -0.5, 29.5, 42, -0.5, 41.5)
136 
137  self.hist_RPCLaneAxisOccupancy = ROOT.TH2F(
138  'RPCLaneAxisOccupancy',
139  expRun + 'Lane/axis occupancy of RPC channels (1/channel);' +
140  'Sector # (always 0);' +
141  '(Lane #) * 2 + (Axis #)',
142  3, -1.5, 1.5, 42, -0.5, 41.5)
143 
144  self.hist_ScintLaneAxisOccupancy = ROOT.TH2F(
145  'ScintLaneAxisOccupancy',
146  expRun + 'Lane/axis occupancy of scint channels (1/channel);' +
147  'Sector # (always 0);' +
148  '(Lane #) * 2 + (Axis #)',
149  3, -1.5, 1.5, 42, -0.5, 41.5)
150 
151  self.hist_ChannelOccupancy = [0, 0]
152  self.hist_ChannelOccupancy[0] = ROOT.TH2F('ChannelOccupancy_a0',
153  expRun + 'Channel occupancy for axis 0;lane;channel',
154  42, -0.25, 20.75, 128, -0.25, 63.75)
155  self.hist_ChannelOccupancy[1] = ROOT.TH2F('ChannelOccupancy_a1',
156  expRun + 'Channel occupancy for axis 1;lane;channel',
157  42, -0.25, 20.75, 128, -0.25, 63.75)
158 
160  [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0],
161  [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0],
162  [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]
163  for lane in range(0, 21):
164  nChannels = 64 if (lane > 2) else 128
165  label = 'ChannelOccupancy_A0L{0}'.format(lane)
166  title = '{0}Channel occupancy for axis 0 lane {1};channel'.format(expRun, lane)
167  self.hist_ChannelOccupancyAL[lane][0] = ROOT.TH1F(label, title, nChannels, -0.5, nChannels - 0.5)
168  label = 'ChannelOccupancy_A1L{0}'.format(lane)
169  title = '{0}Channel occupancy for axis 1 lane {1};channel'.format(expRun, lane)
170  self.hist_ChannelOccupancyAL[lane][1] = ROOT.TH1F(label, title, nChannels, -0.5, nChannels - 0.5)
171 
172  self.hist_RPCTimeLowBitsBySector = ROOT.TH2F('RPCTimeLowBitsBySector',
173  expRun + 'RPC TDC lowest-order bits;' +
174  'Sector # (always 0);' +
175  'TDC % 4 (ns) [should be 0]',
176  3, -1.5, 1.5, 8, -0.25, 3.75)
177 
178  self.hist_RPCTime = ROOT.TH1F('RPCTime',
179  expRun + 'RPC tdc relative to event trigtime;tdc - triggerTime (ns)',
180  256, -0.5, 1023.5)
181 
182  self.hist_RPCTime2 = ROOT.TH1F('RPCTime_Ctime',
183  expRun + 'RPC tdc relative to event ctime;tdc - trigCtime (ns)',
184  256, -0.5, 1023.5)
185 
186  self.hist_RPCTimePerLayerA0 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
187  for lane in range(0, 21):
188  label = 'RPCTimeA0L{0:02d}'.format(lane)
189  title = '{0}RPC axis 0 lane {1} time relative to trigtime;t - triggerTime (ns)'.format(expRun, lane)
190  self.hist_RPCTimePerLayerA0[lane] = ROOT.TH1F(label, title, 256, -0.5, 1023.5)
191 
192  self.hist_RPCTimePerLayerA1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
193  for lane in range(0, 21):
194  label = 'RPCTimeA1L{0:02d}'.format(lane)
195  title = '{0}RPC axis 1 lane {1} time relative to trigtime;t - triggerTime (ns)'.format(expRun, lane)
196  self.hist_RPCTimePerLayerA1[lane] = ROOT.TH1F(label, title, 256, -0.5, 1023.5)
197 
198  self.hist_RPCTime2PerLayerA0 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
199  for lane in range(0, 21):
200  label = 'RPCTime2A0L{0:02d}'.format(lane)
201  title = '{0}RPC axis 0 lane {1} time relative to trigCtime;t - trigCtime (ns)'.format(expRun, lane)
202  self.hist_RPCTime2PerLayerA0[lane] = ROOT.TH1F(label, title, 256, -0.5, 1023.5)
203 
204  self.hist_RPCTime2PerLayerA1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
205  for lane in range(0, 21):
206  label = 'RPCTime2A1L{0:02d}'.format(lane)
207  title = '{0}RPC axis 1 lane {1} time relative to trigCtime;t - trigCtime (ns)'.format(expRun, lane)
208  self.hist_RPCTime2PerLayerA1[lane] = ROOT.TH1F(label, title, 256, -0.5, 1023.5)
209 
210  self.hist_RPCTdcRange = ROOT.TH1F('RPCTdcRange', expRun + 'RPC TDC-range in event;TDCMax - TDCMin (ns)', 512, -0.5, 2047.5)
211 
212  self.hist_RPCRevotimeRange = ROOT.TH1F('RPCRevotimeRange',
213  expRun + 'RPC revotime-range in event;revotimeMax - revotimeMin (ns)',
214  128, -0.5, 8191.5)
215 
216  self.hist_revotimeRPCtdc = ROOT.TH2F('revotimeRPCtdc',
217  expRun + 'RPC TDC vs revotime;tdc (ns);revotime - minRevotime',
218  64, 767.5, 1023.5, 10, -0.5, 159.5)
219 
220  self.hist_revotimeRPCtdc2 = ROOT.TH2F(
221  'revotimeRPCtdc2',
222  expRun + 'RPC TDC vs revotime;' +
223  'tdc - dt(index) (ns);' +
224  'revotime - minRevotime',
225  64, 767.5, 1023.5, 10, -0.5, 159.5)
226 
227  self.hist_jRPCtdc = ROOT.TH2F('jRPCtdc',
228  expRun + 'RPC TDC vs hit index;tdc (ns);Hit index',
229  64, 767.5, 1023.5, 60, -0.5, 59.5)
230 
231  self.hist_jRPCtdc2 = ROOT.TH2F('jRPCtdc2',
232  expRun + 'RPC TDC vs hit index;tdc - dt(index) (ns);Hit index',
233  64, 767.5, 1023.5, 60, -0.5, 59.5)
234 
236  'ScintTimeLowBitsBySector',
237  expRun + 'Scint TDC lowest-order bits;' +
238  'Sector # (always 0);' +
239  'TDC % 4 (ns)',
240  3, -1.5, 1.5, 8, -0.25, 3.75)
241 
242  self.hist_ScintTime = ROOT.TH1F('ScintTime',
243  expRun + 'Scint tdc distribution;tdc - triggerTime (ns)',
244  256, -0.5, 1023.5)
245 
246  self.hist_ScintCtime = ROOT.TH1F('ScintCtime',
247  expRun + 'Scint ctime distribution;ctime - triggerCtime (ns)',
248  32, -0.5, 1023.5)
249 
250  self.hist_ScintCtime0 = ROOT.TH1F('ScintCtime0',
251  expRun + 'Scint ctime distribution;ctime - triggerTime (ns)',
252  32, -0.5, 1023.5)
253 
254  self.hist_ScintCtimeRange = ROOT.TH1F(
255  'ScintCtimeRange', expRun + 'Scint ctime-range in event;ctimeMax - ctimeMin (ns)', 128, -0.5, 8191.5)
256 
257  def terminate(self):
258  """Handle job termination: draw histograms, close output files"""
259 
260  canvas = ROOT.TCanvas("canvas", self.pdfName, 1600, 1600)
261  title = '{0}['.format(self.pdfName)
262  canvas.SaveAs(title)
263  canvas.Clear()
264  canvas.GetPad(0).SetGrid(1, 1)
265  canvas.GetPad(0).Update()
266  self.hist_rawKLMlane.Draw()
267  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_rawKLMlane.GetName()))
268  self.hist_rawKLMsizeMultihit.Draw()
269  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_rawKLMsizeMultihit.GetName()))
270  self.hist_rawKLMsize.Draw()
271  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_rawKLMsize.GetName()))
272  self.hist_PerChannelMultiplicity.Draw("box")
273  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_PerChannelMultiplicity.GetName()))
274  canvas.Clear()
275  canvas.Divide(2, 1)
276  canvas.GetPad(0).SetGrid(1, 1)
277  canvas.GetPad(1).SetGrid(1, 1)
278  canvas.GetPad(2).SetGrid(1, 1)
279  for sectorFB in range(0, 1):
280  canvas.cd(1)
281  self.hist_ChannelOccupancy[0].Draw("colz")
282  canvas.cd(2)
283  self.hist_ChannelOccupancy[1].Draw("colz")
284  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_ChannelOccupancy[0].GetName()))
285  for lane in range(0, 21):
286  n0 = self.hist_ChannelOccupancyAL[lane][0].GetEntries()
287  n1 = self.hist_ChannelOccupancyAL[lane][1].GetEntries()
288  if n0 + n1 > 0:
289  canvas.cd(1)
290  self.hist_ChannelOccupancyAL[lane][0].Draw()
291  canvas.cd(2)
292  self.hist_ChannelOccupancyAL[lane][1].Draw()
293  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_ChannelOccupancyAL[lane][0].GetName()))
294  canvas.Clear()
295  canvas.Divide(1, 1)
296  self.hist_ttc_trigtime.Draw()
297  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_ttc_trigtime.GetName()))
298  self.hist_RPCTimeLowBitsBySector.Draw("box")
299  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_RPCTimeLowBitsBySector.GetName()))
300  self.hist_RPCTime.Draw()
301  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_RPCTime.GetName()))
302  for lane in range(0, 21):
303  if self.hist_RPCTimePerLayerA0[lane].GetEntries() > 0:
304  self.hist_RPCTimePerLayerA0[lane].Draw()
305  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_RPCTimePerLayerA0[lane].GetName()))
306  for lane in range(0, 21):
307  if self.hist_RPCTimePerLayerA1[lane].GetEntries() > 0:
308  self.hist_RPCTimePerLayerA1[lane].Draw()
309  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_RPCTimePerLayerA1[lane].GetName()))
310  self.hist_RPCTdcRange.Draw()
311  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_RPCTdcRange.GetName()))
312  self.hist_RPCRevotimeRange.Draw()
313  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_RPCRevotimeRange.GetName()))
314  self.hist_revotimeRPCtdc.Draw("colz")
315  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_revotimeRPCtdc.GetName()))
316  # self.hist_revotimeRPCtdc2.Draw("colz")
317  # canvas.Print(self.pdfName, "Title:{0}".format(self.hist_revotimeRPCtdc2.GetName()))
318  self.hist_jRPCtdc.Draw("colz")
319  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_jRPCtdc.GetName()))
320  # self.hist_jRPCtdc2.Draw("colz")
321  # canvas.Print(self.pdfName, "Title:{0}".format(self.hist_jRPCtdc2.GetName()))
322  self.hist_ScintTimeLowBitsBySector.Draw("box")
323  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_ScintTimeLowBitsBySector.GetName()))
324  self.hist_ScintTime.Draw()
325  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_ScintTime.GetName()))
326  self.hist_ScintCtime.Draw()
327  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_ScintCtime.GetName()))
328  self.hist_ScintCtime0.Draw()
329  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_ScintCtime0.GetName()))
330  self.hist_ScintCtimeRange.Draw()
331  canvas.Print(self.pdfName, "Title:{0}".format(self.hist_ScintCtimeRange.GetName()))
332  pdfNameLast = '{0}]'.format(self.pdfName)
333  canvas.Print(pdfNameLast, "Title:{0}".format(self.hist_ScintCtimeRange.GetName()))
334  self.histogramFile.Write()
335  self.histogramFile.Close()
336  print('Goodbye')
337 
338  def beginRun(self):
339  """Handle begin of run: print diagnostic message"""
340  print('beginRun', self.run)
341 
342  def endRun(self):
343  """Handle end of run: print diagnostic message"""
344  print('endRun', self.run)
345 
346  def event(self, eventHits, tt_ctime, raw_time):
347  """Process one event: fill histograms"""
348 
349  sectorFB = 0
350  n = len(eventHits)
351  countAllMultihit = 2 * n + 1 if (n > 0) else 0
352  countAll = 1
353  channelMultiplicity = {}
354  minCtime = 99999
355  minRPCTdc = 99999
356  maxRPCTdc = 0
357  minRPCCtime = 99999
358  maxRPCCtime = 0
359  minScintCtime = 99999
360  maxScintCtime = 0
361  self.hist_ttc_trigtime.Fill((tt_ctime - raw_time) & 0x0fff)
362  for j in range(0, n):
363  items = eventHits[j]
364  lane = items[0]
365  channel = items[1]
366  axis = items[2]
367  ctime = items[3] # this is revo9 time for RPCs, ctime for scintillators
368  flag = 1 if (lane > 2) else 2
369  isRPC = (flag == 1)
370  isScint = (flag == 2)
371  laneAxisChannel = (((lane << 1) + axis) << 7) + channel
372  if laneAxisChannel not in channelMultiplicity:
373  countAll = countAll + 2
374  channelMultiplicity[laneAxisChannel] = 0
375  channelMultiplicity[laneAxisChannel] = channelMultiplicity[laneAxisChannel] + 1
376  if ctime < minCtime:
377  minCtime = ctime
378  self.hist_rawKLMlane.Fill(lane)
379  for j in range(0, n):
380  items = eventHits[j]
381  lane = items[0]
382  channel = items[1]
383  axis = items[2]
384  ctime = items[3] # this is revo9 time for RPCs, ctime for scintillators
385  tdc = items[4]
386  charge = items[5]
387  flag = 1 if (lane > 2) else 2
388  isRPC = (flag == 1)
389  isScint = (flag == 2)
390  laneAxisChannel = (((lane << 1) + axis) << 7) + channel
391  laneAxis = axis if ((lane < 1) or (lane > 20)) else ((lane << 1) + axis)
392  if laneAxisChannel in channelMultiplicity:
393  if channelMultiplicity[laneAxisChannel] > 1:
394  self.hist_PerChannelMultiplicity.Fill(channelMultiplicity[laneAxisChannel], laneAxis)
395  # DIVOT del channelMultiplicity[laneAxisChannel] # consider only first hit in the channel/axis/lane of this dc
396  t = (tdc - raw_time) & 0x03ff # in ns, range is 0..1023
397  t2 = (tdc - tt_ctime) & 0x03ff # in ns, range is 0..1023
398  ct = ((ctime << 3) - tt_ctime) & 0x3ff
399  if isRPC:
400  if tdc < minRPCTdc:
401  minRPCTdc = tdc
402  if tdc > maxRPCTdc:
403  maxRPCTdc = tdc
404  if ctime < minRPCCtime:
405  minRPCCtime = ctime
406  if ctime > maxRPCCtime:
407  maxRPCCtime = ctime
408  self.hist_RPCTimeLowBitsBySector.Fill(sectorFB, (tdc & 3))
409  self.hist_RPCLaneAxisOccupancy.Fill(sectorFB, laneAxis)
410  self.hist_RPCTime.Fill(t)
411  self.hist_RPCTime2.Fill(t2)
412  if axis == 0:
413  self.hist_RPCTimePerLayerA0[lane].Fill(t)
414  self.hist_RPCTime2PerLayerA0[lane].Fill(t2)
415  else:
416  self.hist_RPCTimePerLayerA1[lane].Fill(t)
417  self.hist_RPCTime2PerLayerA1[lane].Fill(t2)
418  if n > 0:
419  t0j = 0.75 * j
420  self.hist_revotimeRPCtdc.Fill(t, ctime - minCtime)
421  self.hist_revotimeRPCtdc2.Fill(t - t0j, ctime - minCtime)
422  self.hist_jRPCtdc.Fill(t, j)
423  self.hist_jRPCtdc2.Fill(t - t0j, j)
424  else:
425  if ctime < minScintCtime:
426  minScintCtime = ctime
427  if ctime > maxScintCtime:
428  maxScintCtime = ctime
429  self.hist_ScintTimeLowBitsBySector.Fill(sectorFB, (tdc & 3))
430  self.hist_ScintLaneAxisOccupancy.Fill(sectorFB, laneAxis)
431  self.hist_ScintTime.Fill(t)
432  self.hist_ScintCtime.Fill(ct)
433  self.hist_ScintCtime0.Fill(((ctime << 3) - raw_time) & 0x3ff)
434  self.hist_ChannelOccupancy[axis].Fill(lane, channel)
435  self.hist_ChannelOccupancyAL[lane][axis].Fill(channel)
436  if n > 1:
437  if maxRPCTdc > 0:
438  self.hist_RPCTdcRange.Fill(maxRPCTdc - minRPCTdc)
439  if maxRPCCtime > 0:
440  self.hist_RPCRevotimeRange.Fill((maxRPCCtime - minRPCCtime) << 3)
441  if maxScintCtime > 0:
442  self.hist_ScintCtimeRange.Fill((maxScintCtime - minScintCtime) << 3)
443  self.hist_rawKLMsizeMultihit.Fill(countAllMultihit)
444  self.hist_rawKLMsize.Fill(countAll)
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_ScintCtimeRange
hist_ScintCtimeRange
histogram of scint CTIME range in event
Definition: EventInspectorPocketDAQ.py:254
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_ChannelOccupancy
hist_ChannelOccupancy
scatterplots of channel occupancy (1 hit per readout channel) for each axis
Definition: EventInspectorPocketDAQ.py:151
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_RPCTdcRange
hist_RPCTdcRange
histogram of RPC TDC range in event
Definition: EventInspectorPocketDAQ.py:210
EventInspectorPocketDAQ.EventInspectorPocketDAQ.initialize
def initialize(self)
Definition: EventInspectorPocketDAQ.py:102
EventInspectorPocketDAQ.EventInspectorPocketDAQ.makeText
def makeText(self, x, y, s)
Definition: EventInspectorPocketDAQ.py:86
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_RPCRevotimeRange
hist_RPCRevotimeRange
histogram of RPC REVO9 range in event
Definition: EventInspectorPocketDAQ.py:212
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_ScintTime
hist_ScintTime
histogram of scint TDC value relative to event's trigger time
Definition: EventInspectorPocketDAQ.py:242
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_RPCTimeLowBitsBySector
hist_RPCTimeLowBitsBySector
scatterplot of RPC TDC low-order bits vs sector (should be 0 since granularity is 4 ns)
Definition: EventInspectorPocketDAQ.py:172
EventInspectorPocketDAQ.EventInspectorPocketDAQ.pdfName
pdfName
internal copy of the pathname of the output histogram PDF file
Definition: EventInspectorPocketDAQ.py:70
EventInspectorPocketDAQ.EventInspectorPocketDAQ.__init__
def __init__(self, exp, run, histName, pdfName)
Definition: EventInspectorPocketDAQ.py:50
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_RPCTime
hist_RPCTime
histogram of RPC TDC value relative to event's REVO9 trigger time in last word of event
Definition: EventInspectorPocketDAQ.py:178
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_ScintCtime
hist_ScintCtime
histogram of scint CTIME value relative to event's ctime
Definition: EventInspectorPocketDAQ.py:246
EventInspectorPocketDAQ.EventInspectorPocketDAQ
Definition: EventInspectorPocketDAQ.py:15
EventInspectorPocketDAQ.EventInspectorPocketDAQ.terminate
def terminate(self)
Definition: EventInspectorPocketDAQ.py:257
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_jRPCtdc2
hist_jRPCtdc2
scatterplot of RPC calibrated time vs hit's index, corrected for DC-processing delay
Definition: EventInspectorPocketDAQ.py:231
EventInspectorPocketDAQ.EventInspectorPocketDAQ.exp
exp
internal copy of experiment number
Definition: EventInspectorPocketDAQ.py:64
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_RPCTime2
hist_RPCTime2
histogram of RPC TDC value relative to event's ctime in event header
Definition: EventInspectorPocketDAQ.py:182
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_ttc_trigtime
hist_ttc_trigtime
histogram of the tt_ctime relative to triggertime
Definition: EventInspectorPocketDAQ.py:113
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_jRPCtdc
hist_jRPCtdc
scatterplot of RPC calibrated time vs hit's index
Definition: EventInspectorPocketDAQ.py:227
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_revotimeRPCtdc2
hist_revotimeRPCtdc2
scatterplot of RPC REVO9 range vs TDC value corrected for DC-processing delay in event
Definition: EventInspectorPocketDAQ.py:220
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_ScintLaneAxisOccupancy
hist_ScintLaneAxisOccupancy
scatterplot of number of mapped scint hits by lane/axis vs sector, at most one entry per readout chan...
Definition: EventInspectorPocketDAQ.py:144
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_PerChannelMultiplicity
hist_PerChannelMultiplicity
scatterplot of multiplicity of entries in one readout channel vs lane/axis
Definition: EventInspectorPocketDAQ.py:130
EventInspectorPocketDAQ.EventInspectorPocketDAQ.beginRun
def beginRun(self)
Definition: EventInspectorPocketDAQ.py:338
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_rawKLMsize
hist_rawKLMsize
histogram of number of hits, at most one entry per readout channel
Definition: EventInspectorPocketDAQ.py:126
EventInspectorPocketDAQ.EventInspectorPocketDAQ.histogramFile
histogramFile
Output ROOT TFile that will contain the histograms/scatterplots.
Definition: EventInspectorPocketDAQ.py:108
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_RPCTimePerLayerA0
hist_RPCTimePerLayerA0
histograms of RPC TDC value relative to event's trigger time for axis 0, indexed by lane
Definition: EventInspectorPocketDAQ.py:186
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_ChannelOccupancyAL
hist_ChannelOccupancyAL
histograms of channel occupancy (1 hit per readout channel), indexed by axis/lane
Definition: EventInspectorPocketDAQ.py:159
EventInspectorPocketDAQ.EventInspectorPocketDAQ.endRun
def endRun(self)
Definition: EventInspectorPocketDAQ.py:342
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_RPCTimePerLayerA1
hist_RPCTimePerLayerA1
histograms of RPC TDC value relative to event's trigger time for axis 1, indexed by lane
Definition: EventInspectorPocketDAQ.py:192
EventInspectorPocketDAQ.EventInspectorPocketDAQ.run
run
internal copy of run number
Definition: EventInspectorPocketDAQ.py:66
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_revotimeRPCtdc
hist_revotimeRPCtdc
scatterplot of RPC REVO9 range vs TDC value in event
Definition: EventInspectorPocketDAQ.py:216
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_RPCLaneAxisOccupancy
hist_RPCLaneAxisOccupancy
scatterplot of number of mapped RPC hits by lane/axis vs sector, at most one entry per readout channe...
Definition: EventInspectorPocketDAQ.py:137
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_rawKLMlane
hist_rawKLMlane
histogram of the hit's lane
Definition: EventInspectorPocketDAQ.py:118
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_RPCTime2PerLayerA0
hist_RPCTime2PerLayerA0
histograms of RPC TDC value relative to event's ctime for axis 0, indexed by lane
Definition: EventInspectorPocketDAQ.py:198
EventInspectorPocketDAQ.EventInspectorPocketDAQ.histName
histName
internal copy of the pathname of the output histogram ROOT file
Definition: EventInspectorPocketDAQ.py:68
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_ScintTimeLowBitsBySector
hist_ScintTimeLowBitsBySector
scatterplot of scint TDC low-order bits vs sector
Definition: EventInspectorPocketDAQ.py:235
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_ScintCtime0
hist_ScintCtime0
histogram of scint CTIME value relative to event's trigger time
Definition: EventInspectorPocketDAQ.py:250
EventInspectorPocketDAQ.EventInspectorPocketDAQ.event
def event(self, eventHits, tt_ctime, raw_time)
Definition: EventInspectorPocketDAQ.py:346
EventInspectorPocketDAQ.EventInspectorPocketDAQ.makeGraph
def makeGraph(self, x, y)
Definition: EventInspectorPocketDAQ.py:72
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_RPCTime2PerLayerA1
hist_RPCTime2PerLayerA1
histograms of RPC TDC value relative to event's ctime for axis 1, indexed by lane
Definition: EventInspectorPocketDAQ.py:204
EventInspectorPocketDAQ.EventInspectorPocketDAQ.hist_rawKLMsizeMultihit
hist_rawKLMsizeMultihit
histogram of number of hits, including multiple entries on one readout channel
Definition: EventInspectorPocketDAQ.py:122