21 from ROOT
import Belle2
25 """Fill BKLM histograms of values from RawKLMs, KLMDigits, BKLMHit1ds, and BKLMHit2ds;
26 (optionally) draw event displays from these data-objects."""
43 BKLM_MAXSTRIP_BIT = 15
45 BKLM_STRIP_MASK = 0x3f
47 BKLM_PLANE_MASK = (1 << BKLM_PLANE_BIT)
49 BKLM_LAYER_MASK = (15 << BKLM_LAYER_BIT)
51 BKLM_SECTOR_MASK = (7 << BKLM_SECTOR_BIT)
53 BKLM_SECTION_MASK = (1 << BKLM_SECTION_BIT)
55 BKLM_MAXSTRIP_MASK = (63 << BKLM_MAXSTRIP_BIT)
57 BKLM_MODULEID_MASK = (BKLM_SECTION_MASK | BKLM_SECTOR_MASK | BKLM_LAYER_MASK)
59 def __init__(self, exp, run, histName, pdfName, eventPdfName, verbosity,
60 maxDisplays, minRPCHits, legacyTimes, singleEntry, view):
64 exp (str): formatted experiment number
65 run (str): formatter run number
66 histName (str): path name of the output histogram ROOT file
67 pdfName (str): path name of the output histogram PDF file
68 eventPdfName (str): path name of the output event-display PDF file
69 verbosity (int): determines how many histograms are written to the histogram PDF file
70 maxDisplays (int): max # of events displays to write
71 minRPCHits (int): min # of RPC BKLMHit2ds in any sector for event display
72 legacyTimes (bool): true to correct BKLMHit{1,2}d times in legacy reconstruction, False otherwise
73 singleEntry (int): select events with any (0) or exactly one (1) or more than one (2) entries/channel
74 view (int): view event displays using one-dimensional (1) or two-dimensional (2) BKLMHits
107 """Create and return a ROOT TGraph
110 x[] (real): x coordinates
111 y[] (real): y coordinates
113 graph = ROOT.TGraph()
114 for i
in range(0, len(x)):
115 graph.SetPoint(i, x[i], y[i])
116 graph.SetLineColor(2)
117 graph.SetLineWidth(1)
121 """Create and return a ROOT TLatex with the following properties:
122 size = 0.04, color = red, alignment = middle centre, angle = 90 degrees
125 x (real): x coordinate
126 y (real): y coordinate
127 s (str): character string
129 text = ROOT.TLatex(x, y, s)
130 text.SetTextSize(0.04)
132 text.SetTextAlign(22)
133 text.SetTextAngle(90)
137 """Handle job initialization: fill the mapping database, create histograms, open the event-display file"""
139 expRun =
'e{0:02d}r{1}: '.format(int(self.
expexp), int(self.
runrun))
141 self.
hist_XYhist_XY = ROOT.TH2F(
'XY',
' ;x;y', 10, -345.0, 345.0, 10, -345.0, 345.0)
142 self.
hist_XYhist_XY.SetStats(
False)
145 self.
hist_ZY1Dhist_ZY1D[0] = ROOT.TH2F(
'ZY0',
' ;z;y', 10, -200.0, 300.0, 10, -150.0, 350.0)
146 self.
hist_ZY1Dhist_ZY1D[1] = ROOT.TH2F(
'ZY1',
' ;z;y', 10, -200.0, 300.0, 10, -150.0, 350.0)
147 self.
hist_ZY1Dhist_ZY1D[0].SetStats(
False)
148 self.
hist_ZY1Dhist_ZY1D[0].SetStats(
False)
150 self.
hist_ZYhist_ZY = ROOT.TH2F(
'ZY',
' ;z;y', 10, -345.0, 345.0, 10, -345.0, 345.0)
151 self.
hist_ZYhist_ZY.SetStats(
False)
154 ROOT.gStyle.SetOptStat(10)
158 self.
sectorFBToDCsectorFBToDC = [11, 15, 2, 6, 10, 14, 3, 7, 9, 13, 0, 4, 8, 12, 1, 5]
160 self.
dcToSectorFBdcToSectorFB = [10, 14, 2, 6, 11, 15, 3, 7, 12, 8, 4, 0, 13, 9, 5, 1]
175 self.
t0RPCt0RPC = [[[0, 0, 17, 16, 15, 13, 14, 14, 16, 17, 18, 16, 16, 18, 16],
176 [0, 0, 0, -2, -1, -5, -6, -5, -5, -3, -4, -6, -8, -6, -8],
177 [0, 0, 6, 3, 5, 0, -1, -1, -2, 0, 0, -2, -3, -2, -4],
178 [0, 0, -4, -3, -6, -8, -8, -9, -9, -7, -7, -10, -10, -10, -12],
179 [0, 0, 6, 8, 4, 4, 3, 8, 4, 7, 7, 3, 5, 5, 4],
180 [0, 0, 18, 20, 18, 18, 16, 21, 17, 20, 20, 19, 21, 19, 20],
181 [0, 0, 19, 19, 19, 18, 17, 18, 22, 24, 25, 22, 22, 24, 22],
182 [0, 0, 19, 19, 18, 17, 16, 18, 18, 20, 21, 19, 20, 20, 20],
183 [0, 0, 6, 7, 9, 5, 4, 6, 6, 9, 9, 6, 7, 8, 7],
184 [0, 0, 3, 2, 2, -4, -1, -2, -2, 1, 0, -4, 246, -3, -4],
185 [0, 0, -1, -1, -1, -5, -6, -6, -8, -5, -4, -7, -7, -7, -8],
186 [0, 0, -5, -5, -5, -12, -9, -10, -8, -6, -10, -8, -8, -11, -12],
187 [0, 0, 12, 12, 13, 8, 6, 6, 7, 9, 10, 7, 6, 8, 5],
188 [0, 0, 14, 15, 43, 12, 10, 12, 11, 15, 16, 28, 14, 15, 14],
189 [0, 0, 22, 22, 21, 19, 19, 19, 21, 23, 24, 21, 22, 22, 22],
190 [0, 0, 18, 18, 17, 16, 16, 18, 18, 20, 21, 18, 18, 20, 19]],
191 [[0, 0, 6, 5, 4, 1, 1, 2, 3, 2, 2, -1, 0, 1, -1],
192 [0, 0, -11, -12, -11, -15, -18, -18, -18, -18, -19, -22, -23, -22, -24],
193 [0, 0, -4, -7, -6, -11, -12, -12, -14, -15, -15, -18, -19, -18, -20],
194 [0, 0, -15, -15, -16, -19, -22, -21, -22, -22, -22, -25, -26, -26, -27],
195 [0, 0, -5, -3, -6, -7, -9, -9, -9, -8, -8, -13, -12, -10, -13],
196 [0, 0, 6, 7, 5, 5, 3, 9, 4, 5, 6, 3, 5, 3, 4],
197 [0, 0, 9, 10, 10, 7, 7, 7, 9, 9, 9, 6, 6, 8, 8],
198 [0, 0, 7, 8, 7, 6, 4, 5, 4, 5, 5, 4, 3, 4, 3],
199 [0, 0, -5, -3, -1, -4, -8, -7, -7, -6, -6, -6, -9, -9, -9],
200 [0, 0, -8, -8, -11, -10, -14, -15, -16, -14, -15, -20, -20, -13, -20],
201 [0, 0, -12, -12, -14, -16, -16, -15, -21, -19, -19, -23, -23, -23, -24],
202 [0, 0, -15, -15, -15, -21, -22, -22, -22, -21, -23, -25, -25, -26, -27],
203 [0, 0, 0, 0, 2, -4, -5, -5, -4, -2, -1, -5, -5, -3, -7],
204 [0, 0, 3, 3, 32, 1, 0, -1, -3, 2, 1, 13, -1, 0, -2],
205 [0, 0, 11, 11, 10, 9, 6, 7, 6, 8, 8, 5, 6, 7, 6],
206 [0, 0, 7, 8, 7, 5, 3, 5, 7, 5, 5, 2, 7, 4, 3]]]
209 self.
ct0Scintct0Scint = [[[5, 7], [-27, -24], [-29, -45], [-27, -32], [3, 6], [34, 35], [48, 44], [33, 38],
210 [4, 7], [-28, -27], [-39, -34], [-36, -33], [2, 5], [25, 30], [46, 49], [41, 31]],
211 [[0, 0], [-32, -32], [-29, -54], [-31, -40], [-1, -1], [29, 27], [41, 41], [28, 28],
212 [-2, -1], [-32, -34], [-38, -45], [-40, -41], [-3, -3], [21, 20], [41, 42], [41, 19]]]
217 ROOT.gStyle.SetOptStat(10)
218 ROOT.gStyle.SetOptFit(111)
223 self.
hist_nDigithist_nDigit = ROOT.TH1F(
'NDigit', expRun +
'# of BKLMDigits', 500, -0.5, 499.5)
225 self.
hist_nRawKLMhist_nRawKLM = ROOT.TH1F(
'NRawKLM', expRun +
'# of RawKLMs', 10, -0.5, 9.5)
227 self.
hist_rawKLMnumEventshist_rawKLMnumEvents = ROOT.TH1F(
'RawKLMnumEvents', expRun +
'RawKLM NumEvents;(should be 1)', 10, -0.5, 9.5)
229 self.
hist_rawKLMnumNodeshist_rawKLMnumNodes = ROOT.TH1F(
'RawKLMnumNodes', expRun +
'RawKLM NumNodes;(should be 1)', 10, -0.5, 9.5)
232 expRun +
'RawKLM NodeID;' +
233 'NodeID (bklm: 1..4, eklm:5..8);' +
235 10, -0.5, 9.5, 10, -0.5, 9.5)
238 expRun +
'RawKLM lane vs flag;' +
239 'Flag (1=RPC, 2=Scint);' +
240 'Lane (scint: 1..7, RPC: 8..20)',
241 4, -0.5, 3.5, 21, -0.5, 20.5)
244 expRun +
'RawKLM RPC tdcExtra bits;' +
245 'Sector # (0-7 = backward, 8-15 = forward);' +
246 'tdcExtra [should be 0]',
247 16, -0.5, 15.5, 32, -0.5, 31.5)
250 expRun +
'RawKLM RPC adcExtra bits;' +
251 'Sector # (0-7 = backward, 8-15 = forward);' +
252 'adcExtra [should be 0]',
253 16, -0.5, 15.5, 16, -0.5, 15.5)
256 expRun +
'RawKLM Scint tdcExtra bits;' +
257 'Sector # (0-7 = backward, 8-15 = forward);' +
259 16, -0.5, 15.5, 32, -0.5, 31.5)
262 expRun +
'RawKLM Scint adcExtra bits;' +
263 'Sector # (0-7 = backward, 8-15 = forward);' +
265 16, -0.5, 15.5, 16, -0.5, 15.5)
267 self.
hist_rawKLMsizeMultihithist_rawKLMsizeMultihit = ROOT.TH1F(
'rawKLMsizeMultihit', expRun +
'RawKLM word count (N/channel)', 400, -0.5, 799.5)
269 self.
hist_rawKLMsizehist_rawKLMsize = ROOT.TH1F(
'rawKLMsize', expRun +
'RawKLM word count (1/channel)', 250, -0.5, 499.5)
274 for sectorFB
in range(0, 16):
278 label =
'rawKLM_S{0:02d}_sizeMultihit'.format(sectorFB)
279 title =
'{0}sector {1} [COPPER {2} finesse {3}] word count (N/channel)'.format(expRun, sectorFB, copper, finesse)
281 label =
'rawKLM_S{0:02d}_size'.format(sectorFB)
282 title =
'{0}sector {1} [COPPER {2} finesse {3}] word count (1/channel)'.format(expRun, sectorFB, copper, finesse)
283 self.
hist_rawKLMsizeByDChist_rawKLMsizeByDC.append(ROOT.TH1F(label, title, 100, -0.5, 199.5))
288 for sectorFB
in range(0, 16):
292 label =
'rawKLM_S{0:02d}_channelMultiplicity'.format(sectorFB)
293 title =
'{0}sector {1} [COPPER {2} finesse {3}] per-channel multiplicity (N/channel > 1);'.format(
294 expRun, sectorFB, copper, finesse) +
'Per-channel multiplicity;(Lane #) * 2 + (Axis #)'
296 label =
'rawKLM_S{0:02d}_channelMultiplicityFine'.format(sectorFB)
297 title =
'{0}sector {1} [COPPER {2} finesse {3}] per-channel multiplicity (N/channel > 1);'.format(
298 expRun, sectorFB, copper, finesse) +
'Per-channel multiplicity;(Lane #) * 256 + (Axis #) * 128 + (Channel #)'
302 'mappedSectorOccupancyMultihit',
303 expRun +
'Sector occupancy of mapped channels (N/channel);' +
304 'Sector # (0-7 = backward, 8-15 = forward)',
308 'unmappedSectorOccupancyMultihit',
309 expRun +
'Sector occupancy of unmapped channels (N/channel);' +
310 'Sector # (0-7 = backward, 8-15 = forward)',
314 'mappedSectorOccupancy',
315 expRun +
'Sector occupancy of mapped channels (1/channel);' +
316 'Sector # (0-7 = backward, 8-15 = forward)',
320 'unmappedSectorOccupancy',
321 expRun +
'Sector occupancy of unmapped channels (1/channel);' +
322 'Sector # (0-7 = backward, 8-15 = forward)',
326 'mappedRPCSectorOccupancy',
327 expRun +
'Sector occupancy of mapped RPC channels (1/channel);' +
328 'Sector # (0-7 = backward, 8-15 = forward)',
332 'mappedRPCLaneAxisOccupancy',
333 expRun +
'Lane/axis occupancy of mapped RPC channels (1/channel);' +
334 'Sector # (0-7 = backward, 8-15 = forward);' +
335 '(Lane #) * 2 + (Axis #)',
336 16, -0.5, 15.5, 42, -0.5, 41.5)
339 'unmappedRPCSectorOccupancy',
340 expRun +
'Sector occupancy of unmapped RPC channels (1/channel);' +
341 'Sector # (0-7 = backward, 8-15 = forward)',
345 'unmappedRPCLaneAxisOccupancy',
346 expRun +
'Lane/axis occupancy of unmapped RPC channels (1/channel);' +
347 'Sector # (0-7 = backward, 8-15 = forward);' +
348 '(Lane #) * 2 + (Axis #)',
349 16, -0.5, 15.5, 42, -0.5, 41.5)
352 'mappedScintSectorOccupancy',
353 expRun +
'Sector occupancy of mapped scint channels (1/channel);' +
354 'Sector # (0-7 = backward, 8-15 = forward)',
358 'mappedScintLaneAxisOccupancy',
359 expRun +
'Lane/axis occupancy of mapped scint channels (1/channel);' +
360 'Sector # (0-7 = backward, 8-15 = forward);' +
361 '(Lane #) * 2 + (Axis #)',
362 16, -0.5, 15.5, 42, -0.5, 41.5)
365 'unmappedScintSectorOccupancy',
366 expRun +
'Sector occupancy of unmapped scint channels (1/channel);' +
367 'Sector # (0-7 = backward, 8-15 = forward)',
371 'unmappedScintLaneAxisOccupancy',
372 expRun +
'Lane/axis occupancy of unmapped scint channels (1/channel);' +
373 'Sector # (0-7 = backward, 8-15 = forward);' +
374 '(Lane #) * 2 + (Axis #)',
375 16, -0.5, 15.5, 42, -0.5, 41.5)
378 [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0],
379 [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]
382 [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0],
383 [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]
386 [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0],
387 [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]
388 for sectorFB
in range(0, 16):
389 label =
'mappedChannelOccupancy_S{0:02d}ZPrompt'.format(sectorFB)
390 title =
'{0}In-time mapped channel occupancy for sector {1} z hits;lane;channel'.format(expRun, sectorFB)
392 label =
'mappedChannelOccupancy_S{0:02d}ZBkgd'.format(sectorFB)
393 title =
'{0}Out-of-time mapped channel occupancy for sector {1} z hits;lane;channel'.format(expRun, sectorFB)
395 label =
'unmappedChannelOccupancy_S{0:02d}Z'.format(sectorFB)
396 title =
'{0}Unmapped channel occupancy for sector {1} z hits;lane;channel'.format(expRun, sectorFB)
398 label =
'mappedChannelOccupancy_S{0:02d}PhiPrompt'.format(sectorFB)
399 title =
'{0}In-time mapped occupancy for sector {1} phi hits;lane;channel'.format(expRun, sectorFB)
401 label =
'mappedChannelOccupancy_S{0:02d}PhiBkgd'.format(sectorFB)
402 title =
'{0}Out-of-time mapped occupancy for sector {1} phi hits;lane;channel'.format(expRun, sectorFB)
404 label =
'unmappedChannelOccupancy_S{0:02d}Phi'.format(sectorFB)
405 title =
'{0}Unmapped channel occupancy for sector {1} phi hits;lane;channel'.format(expRun, sectorFB)
409 expRun +
'RPC TDC lowest-order bits;' +
410 'Sector # (0-7 = backward, 8-15 = forward);' +
411 'TDC % 4 (ns) [should be 0]',
412 16, -0.5, 15.5, 4, -0.5, 3.5)
415 'mappedRPCTime', expRun +
'RPC mapped-strip time distribution;t - t(trigger) (ns)', 256, -0.5, 1023.5)
418 'mappedRPCTimeCal', expRun +
'RPC mapped-strip time distribution;t - t(trigger) - dt(layer) (ns)', 256, -0.5, 1023.5)
423 for sectorFB
in range(0, 16):
426 for layer
in range(0, 15):
427 label =
'mappedRPCPhiTime_S{0:02d}L{1:02d}'.format(sectorFB, layer)
428 title =
'{0}RPC sector {1} layer {2} phi time distribution;t - t(trigger) (ns)'.format(expRun, sectorFB, layer)
430 label =
'mappedRPCZTime_S{0:02d}L{1:02d}'.format(sectorFB, layer)
431 title =
'{0}RPC sector {1} layer {2} z time distribution;t - t(trigger) (ns)'.format(expRun, sectorFB, layer)
435 expRun +
'RPC mapped-strip time;' +
436 'Sector # (0-7 = backward, 8-15 = forward);' +
437 't - t(trigger) (ns)',
438 16, -0.5, 15.5, 128, -0.5, 1023.5)
441 expRun +
'RPC mapped-strip time;' +
442 'Sector # (0-7 = backward, 8-15 = forward);' +
443 't - t(trigger) - dt(layer) (ns)',
444 16, -0.5, 15.5, 128, -0.5, 1023.5)
447 expRun +
'RPC Ctime-range in event;' +
448 'CtimeMax - CtimeMin (ns)',
452 expRun +
'RPC Ctime-range in event;' +
453 'Sector # (0-7 = backward, 8-15 = forward);' +
454 'CtimeMax - CtimeMin (ns)',
455 16, -0.5, 15.5, 128, -0.5, 8191.5)
458 expRun +
'RPC unmapped-strip time distribution;' +
459 't - t(trigger) (ns)',
463 expRun +
'RPC unmapped-strip time;' +
464 'Sector # (0-7 = backward, 8-15 = forward);' +
465 't - t(trigger) (ns)',
466 16, -0.5, 15.5, 128, -0.5, 1023.5)
469 expRun +
'Scint TDC lowest-order bits;' +
470 'Sector # (0-7 = backward, 8-15 = forward);' +
472 16, -0.5, 15.5, 4, -0.5, 3.5)
475 expRun +
'Scint mapped-strip ctime distribution;' +
476 'ctime - ct(trigger) (ns)',
480 expRun +
'Scint mapped-strip ctime;' +
481 'Sector # (0-7 = backward, 8-15 = forward);' +
482 'ctime - ct(trigger) (ns)',
483 16, -0.5, 15.5, 32, -0.5, 1023.5)
486 expRun +
'Scint mapped-strip ctime distribution;' +
487 'ctime - ct(trigger) - dt(layer) (ns)',
491 expRun +
'Scint mapped-strip ctime;' +
492 'Sector # (0-7 = backward, 8-15 = forward);' +
493 'ctime - ct(trigger) - dt(layer) (ns)',
494 16, -0.5, 15.5, 32, -0.5, 1023.5)
499 for sectorFB
in range(0, 16):
502 for layer
in range(0, 2):
503 label =
'mappedScintPhiCtime_S{0:02d}L{1:02d}'.format(sectorFB, layer)
504 title =
'{0}Scint sector {1} layer {2} phi ctime distribution;ctime - ct(trigger) (ns)'.format(expRun,
507 label =
'mappedScintZCtime_S{0:02d}L{1:02d}'.format(sectorFB, layer)
508 title =
'{0}Scint sector {1} layer {2} z ctime distribution;ctime - ct(trigger) (ns)'.format(expRun,
513 expRun +
'Scint ctime-range in event;' +
514 'ctimeMax - ctimeMin (ns)',
518 expRun +
'Scint ctime-range in event;' +
519 'Sector # (0-7 = backward, 8-15 = forward);' +
520 'ctimeMax - ctimeMin (ns)',
521 16, -0.5, 15.5, 128, -0.5, 1023.5)
524 expRun +
'Scint unmapped-strip ctime distribution;' +
525 'ctime - ct(trigger) (ns)',
529 expRun +
'Scint unmapped-strip ctime;' +
530 'Sector # (0-7 = backward, 8-15 = forward);' +
531 'ctime - ct(trigger) (ns)',
532 16, -0.5, 15.5, 32, -0.5, 1023.5)
535 expRun +
'Scint mapped-strip TDC distribution;' +
540 expRun +
'Scint mapped-strip time distribution;' +
541 't - t(trigger) (ns)', 32, -0.5, 31.5)
544 expRun +
'Scint mapped-strip TDC;' +
545 'Sector # (0-7 = backward, 8-15 = forward);' +
547 16, -0.5, 15.5, 32, -0.5, 31.5)
550 expRun +
'Scint mapped-strip time;' +
551 'Sector # (0-7 = backward, 8-15 = forward);' +
552 't - t(trigger) (ns)',
553 16, -0.5, 15.5, 32, -0.5, 31.5)
556 expRun +
'Scint unmapped-strip time distribution;' +
557 't - t(trigger) (ns)',
561 expRun +
'Scint unmapped-strip time;' +
562 'Sector # (0-7 = backward, 8-15 = forward);' +
563 't - t(trigger) (ns)',
564 16, -0.5, 15.5, 32, -0.5, 31.5)
570 expRun +
'trigCtime - trigRevo9time (ns)',
571 256, -1024.5, 1023.5)
574 expRun +
'RPC TDC range;' +
575 'maxTDC - minTDC (ns)',
579 expRun +
'RPC Ctime range;' +
580 'maxCtime - minCtime (ns)',
584 expRun +
'RPC Ctime range vs TDC range;' +
585 'maxTDC - minTDC (ns);' +
586 'maxCtime - minCtime (ns)',
587 128, -0.5, 1023.5, 128, -0.5, 1023.5)
590 expRun +
'RPC TDC range vs time;' +
591 't - t(trigger) (ns);' +
592 'maxTDC - minTDC (ns)',
593 128, -0.5, 1023.5, 128, -0.5, 1023.5)
596 expRun +
'RPC Ctime range vs time;' +
597 't - t(trigger) (ns);' +
598 'maxCtime - minCtime (ns)',
599 128, -0.5, 1023.5, 128, -0.5, 1023.5)
604 self.
hist_nHit1dhist_nHit1d = ROOT.TH1F(
'NHit1d', expRun +
'# of BKLMHit1ds', 100, -0.5, 99.5)
606 self.
hist_nHit1dRPCPrompthist_nHit1dRPCPrompt = ROOT.TH1F(
'NHit1dRPCPrompt', expRun +
'# of prompt RPC BKLMHit1ds', 100, -0.5, 99.5)
608 self.
hist_nHit1dRPCBkgdhist_nHit1dRPCBkgd = ROOT.TH1F(
'NHit1dRPCBkgd', expRun +
'# of background RPC BKLMHit1ds', 100, -0.5, 99.5)
610 self.
hist_nHit1dScinthist_nHit1dScint = ROOT.TH1F(
'NHit1dScint', expRun +
'# of scintillator BKLMHit1ds', 100, -0.5, 99.5)
612 self.
hist_nHit1dPrompthist_nHit1dPrompt = ROOT.TH1F(
'NHit1dPrompt', expRun +
'# of prompt BKLMHit1ds', 100, -0.5, 99.5)
614 self.
hist_nHit1dBkgdhist_nHit1dBkgd = ROOT.TH1F(
'NHit1dBkgd', expRun +
'# of bkgd BKLMHit1ds', 100, -0.5, 99.5)
617 expRun +
'Distribution of BKLMHit1ds;# of phi BKLMHit1ds;# of z BKLMHit1ds',
618 60, -0.5, 59.5, 60, -0.5, 59.5)
621 expRun +
'BKLMHit1d phi-strip multiplicity;' +
622 'sector # (0-7 = backward, 8-15 = forward);' +
624 16, -0.5, 15.5, 8, -0.5, 7.5)
627 expRun +
'BKLMHit1d z-strip multiplicity;' +
628 'sector # (0-7 = backward, 8-15 = forward);' +
630 16, -0.5, 15.5, 8, -0.5, 7.5)
633 expRun +
'RPC BKLMHit1d phi-strip time distribution;' +
634 't(phi1D) - dt(layer) (ns)',
638 expRun +
'RPC BKLMHit1d z-strip time distribution;' +
639 't(z1D) - dt(layer) (ns)',
643 expRun +
'RPC BKLMHit1d x 2 calibrated average-time distribution;' +
644 '0.5*[t(phi1D) + t(z1D)] - dt(layer) (ns)',
648 expRun +
'RPC BKLMHit1d x 2 time-difference distribution;' +
649 't(phi1D) - t(z1D) (ns)',
653 expRun +
'Scintillator BKLMHit1d phi-strip ctime distribution;' +
654 't(phi1D) - dt(layer) (ns)',
658 expRun +
'Scintillator BKLMHit1d z-strip ctime distribution;' +
659 't(z1D) - dt(layer) (ns)',
663 expRun +
'Scintillator BKLMHit1d x 2 calibrated average-time distribution;' +
664 '0.5*[t(phi1D) + t(z1D)] - dt(layer) (ns)',
668 expRun +
'Scintillator BKLMHit1d x 2 time-difference distribution;' +
669 't(phi1D) - t(z1D) (ns)',
675 self.
hist_nHit2dhist_nHit2d = ROOT.TH1F(
'NHit2d', expRun +
'# of BKLMHit2ds', 50, -0.5, 49.5)
678 expRun +
'Forward xy RPC occupancy for in-time hits;x(cm);y(cm)',
679 230, -345.0, 345.0, 230, -345.0, 345.0)
682 expRun +
'Backward xy RPC occupancy for in-time hits;x(cm);y(cm)',
683 230, -345.0, 345.0, 230, -345.0, 345.0)
686 expRun +
'Forward xy RPC occupancy for out-of-time hits;x(cm);y(cm)',
687 230, -345.0, 345.0, 230, -345.0, 345.0)
690 expRun +
'Backward xy RPC occupancy for out-of-time hits;x(cm);y(cm)',
691 230, -345.0, 345.0, 230, -345.0, 345.0)
694 expRun +
'layer-z occupancy for in-time hits;z(cm);layer',
695 48, -190.0, 290.0, 16, -0.5, 15.5)
698 expRun +
'z occupancy for in-time hits;z(cm)',
702 expRun +
'layer occupancy for in-time hits;layer',
706 expRun +
'layer-z occupancy for out-of-time hits;z(cm);layer',
707 48, -190.0, 290.0, 16, -0.5, 15.5)
710 expRun +
'z occupancy for out-of-time hits;z(cm)',
714 expRun +
'layer occupancy for out-of-time hits;layer',
718 expRun +
'RPC BKLMHit2d time distribution;' +
719 't(2D) - dt(layer) (ns)',
723 expRun +
'RPC BKLMHit2d time distribution;' +
724 'sector # (0-7 = backward, 8-15 = forward);' +
725 't(2D) - dt(layer) (ns)',
726 16, -0.5, 15.5, 256, -0.5, 1023.5)
729 expRun +
'Scint BKLMHit2d ctime distribution;' +
730 't(2D) - dt(layer) (ns)',
734 expRun +
'Scint BKLMHit2d ctime distribution;' +
735 'sector # (0-7 = backward, 8-15 = forward);' +
736 't(2D) - dt(layer) (ns)',
737 16, -0.5, 15.5, 128, -0.5, 1023.5)
741 expRun +
'RPC BKLMHit2d time vs z (forward);' +
743 't(2D) - dt(layer) (ns)',
747 expRun +
'RPC BKLMHit2d time vs z (backward);' +
749 't(2D) - dt(layer) (ns)',
765 r0 = 201.9 + 0.5 * 4.4
767 tan0 = math.tan(math.pi / 8.0)
769 g.SetPoint(0, -200.0, 0.0)
770 g.SetPoint(1, +200.0, 0.0)
774 self.
bklmXYbklmXY.append(g)
776 g.SetPoint(0, 0.0, -200.0)
777 g.SetPoint(1, 0.0, +200.0)
781 self.
bklmXYbklmXY.append(g)
783 g.SetPoint(0, -5.0, 0.0)
784 g.SetPoint(1, +5.0, 0.0)
785 g.SetPoint(2, 0.0, 0.0)
786 g.SetPoint(3, 0.0, +5.0)
787 g.SetPoint(4, 0.0, -5.0)
790 self.
bklmXYbklmXY.append(g)
791 for layer
in range(0, 15):
795 g.SetPoint(0, +r, -x)
796 g.SetPoint(1, +r, +x)
797 g.SetPoint(2, +x, +r)
798 g.SetPoint(3, -x, +r)
799 g.SetPoint(4, -r, +x)
800 g.SetPoint(5, -r, -x)
801 g.SetPoint(6, -x, -r)
802 g.SetPoint(7, +x, -r)
803 g.SetPoint(8, +r, -x)
811 self.
bklmXYbklmXY.append(g)
819 g.SetPoint(0, -zL + z0 - 140.0, 0.0)
820 g.SetPoint(1, +zL + z0 + 70.0, 0.0)
824 self.
bklmZYbklmZY.append(g)
826 g.SetPoint(0, 0.0, -315.0)
827 g.SetPoint(1, 0.0, +340.0)
831 self.
bklmZYbklmZY.append(g)
833 g.SetPoint(0, -5.0, 0.0)
834 g.SetPoint(1, +5.0, 0.0)
835 g.SetPoint(2, 0.0, 0.0)
836 g.SetPoint(3, 0.0, +5.0)
837 g.SetPoint(4, 0.0, -5.0)
840 self.
bklmZYbklmZY.append(g)
842 g.SetPoint(0, -zL + z0, +x0)
843 g.SetPoint(1, -zL + z0, +r0)
847 self.
bklmZYbklmZY.append(g)
849 g.SetPoint(0, -zL + z0, -x0)
850 g.SetPoint(1, -zL + z0, -r0)
854 self.
bklmZYbklmZY.append(g)
856 g.SetPoint(0, +zL + z0, +x0)
857 g.SetPoint(1, +zL + z0, +r0)
861 self.
bklmZYbklmZY.append(g)
863 g.SetPoint(0, +zL + z0, -x0)
864 g.SetPoint(1, +zL + z0, -r0)
868 self.
bklmZYbklmZY.append(g)
870 g.SetPoint(0, -zL + z0, r0)
871 g.SetPoint(1, +zL + z0, r0)
872 g.SetPoint(2, +zL + z0, rF)
873 g.SetPoint(3, -zL + z0, rF)
874 g.SetPoint(4, -zL + z0, r0)
877 self.
bklmZYbklmZY.append(g)
879 g.SetPoint(0, -zL + z0, -r0)
880 g.SetPoint(1, +zL + z0, -r0)
881 g.SetPoint(2, +zL + z0, -rF)
882 g.SetPoint(3, -zL + z0, -rF)
883 g.SetPoint(4, -zL + z0, -r0)
886 self.
bklmZYbklmZY.append(g)
888 g.SetPoint(0, -zL + z0, -x0)
889 g.SetPoint(1, +zL + z0, -x0)
890 g.SetPoint(2, +zL + z0, +x0)
891 g.SetPoint(3, -zL + z0, +x0)
892 g.SetPoint(4, -zL + z0, -x0)
895 self.
bklmZYbklmZY.append(g)
898 """Handle job termination: draw histograms, close output files"""
901 pdfNameLast =
'{0}]'.format(self.
eventPdfNameeventPdfName)
904 for sectorFB
in range(0, 16):
906 if mappedScintSectorOccupancy > 0:
907 for laneAxis
in range(0, 42):
910 sectorFB + 1, laneAxis + 1, 100.0 * numerator / mappedScintSectorOccupancy)
912 if mappedRPCSectorOccupancy > 0:
913 for laneAxis
in range(0, 42):
916 sectorFB + 1, laneAxis + 1, 100.0 * numerator / mappedRPCSectorOccupancy)
918 if unmappedScintSectorOccupancy > 0:
919 for laneAxis
in range(0, 42):
922 sectorFB + 1, laneAxis + 1, 100.0 * numerator / unmappedScintSectorOccupancy)
924 if unmappedRPCSectorOccupancy > 0:
925 for laneAxis
in range(0, 42):
928 sectorFB + 1, laneAxis + 1, 100.0 * numerator / unmappedRPCSectorOccupancy)
929 canvas = ROOT.TCanvas(
"canvas", self.
pdfNamepdfName, 1600, 1600)
930 title =
'{0}['.format(self.
pdfNamepdfName)
933 canvas.GetPad(0).SetGrid(1, 1)
934 canvas.GetPad(0).Update()
936 canvas.Print(self.
pdfNamepdfName,
"Title:{0}".format(self.
hist_nDigithist_nDigit.GetName()))
939 canvas.Print(self.
pdfNamepdfName,
"Title:{0}".format(self.
hist_nRawKLMhist_nRawKLM.GetName()))
959 for dc
in range(0, 16):
965 for dc
in range(0, 16):
968 for dc
in range(0, 16):
986 canvas.GetPad(0).SetGrid(1, 1)
987 canvas.GetPad(1).SetGrid(1, 1)
988 canvas.GetPad(2).SetGrid(1, 1)
990 borderRPC0x = [7.5, 20.5, 20.5, 7.5, 7.5]
991 borderRPC0y = [0.5, 0.5, 48.5, 48.5, 0.5]
992 borderRPC0yChimney = [0.5, 0.5, 34.5, 34.5, 0.5]
994 borderScint0x = [0.5, 1.5, 1.5, 2.5, 2.5, 1.5, 1.5, 0.5, 0.5]
995 borderScint0y = [4.5, 4.5, 2.5, 2.5, 44.5, 44.5, 41.5, 41.5, 4.5]
997 borderRPC1x = [7.5, 20.5, 20.5, 11.5, 11.5, 7.5, 7.5]
998 borderRPC1y = [0.5, 0.5, 48.5, 48.5, 36.5, 36.5, 0.5]
1000 borderScint1x = [0.5, 2.5, 2.5, 0.5, 0.5]
1001 borderScint1ay = [0.5, 0.5, 9.5, 9.5, 0.5]
1002 borderScint1by = [15.5, 15.5, 60.5, 60.5, 15.5]
1003 borderScint1xChimney = [0.5, 1.5, 1.5, 2.5, 2.5, 1.5, 1.5, 0.5, 0.5]
1004 borderScint1ayChimney = [0.5, 0.5, 0.5, 0.5, 9.5, 9.5, 8.5, 8.5, 0.5]
1005 borderScint1byChimney = [15.5, 15.5, 16.5, 16.5, 45.5, 45.5, 45.5, 45.5, 15.5]
1007 graphRPC0 = self.
makeGraphmakeGraph(borderRPC0x, borderRPC0y)
1008 graphRPC0Chimney = self.
makeGraphmakeGraph(borderRPC0x, borderRPC0yChimney)
1010 graphScint0 = self.
makeGraphmakeGraph(borderScint0x, borderScint0y)
1012 graphRPC1 = self.
makeGraphmakeGraph(borderRPC1x, borderRPC1y)
1014 graphScint1a = self.
makeGraphmakeGraph(borderScint1x, borderScint1ay)
1015 graphScint1b = self.
makeGraphmakeGraph(borderScint1x, borderScint1by)
1016 graphScint1aChimney = self.
makeGraphmakeGraph(borderScint1xChimney, borderScint1ayChimney)
1017 graphScint1bChimney = self.
makeGraphmakeGraph(borderScint1xChimney, borderScint1byChimney)
1019 textRPC0 = self.
makeTextmakeText(6.8, 25.0,
"RPC z")
1020 textScint0 = self.
makeTextmakeText(3.2, 25.0,
"Scint #phi")
1021 textRPC1 = self.
makeTextmakeText(6.8, 25.0,
"RPC #phi")
1022 textScint1 = self.
makeTextmakeText(3.2, 25.0,
"Scint z")
1023 for sectorFB
in range(0, 16):
1025 for lane
in range(8, 21):
1026 for channel
in range(0, 64):
1028 zmax = z
if z > zmax
else zmax
1033 graphRPC0Chimney.Draw(
"L")
1034 graphScint1aChimney.Draw(
"L")
1035 graphScint1bChimney.Draw(
"L")
1038 graphScint1a.Draw(
"L")
1039 graphScint1b.Draw(
"L")
1043 for lane
in range(8, 21):
1044 for channel
in range(0, 64):
1046 zmax = z
if z > zmax
else zmax
1051 graphScint0.Draw(
"L")
1056 for sectorFB
in range(0, 16):
1058 for lane
in range(8, 21):
1059 for channel
in range(0, 64):
1061 zmax = z
if z > zmax
else zmax
1066 graphRPC0Chimney.Draw(
"L")
1067 graphScint1aChimney.Draw(
"L")
1068 graphScint1bChimney.Draw(
"L")
1071 graphScint1a.Draw(
"L")
1072 graphScint1b.Draw(
"L")
1076 for lane
in range(8, 21):
1077 for channel
in range(0, 64):
1079 zmax = z
if z > zmax
else zmax
1084 graphScint0.Draw(
"L")
1088 for sectorFB
in range(0, 16):
1092 graphRPC0Chimney.Draw(
"L")
1093 graphScint1aChimney.Draw(
"L")
1094 graphScint1bChimney.Draw(
"L")
1097 graphScint1a.Draw(
"L")
1098 graphScint1b.Draw(
"L")
1104 graphScint0.Draw(
"L")
1112 timeFit = ROOT.TF1(
"timeFit",
"gausn(0)+pol0(3)", 100.0, 500.0)
1113 timeFit.SetParName(0,
"Area")
1114 timeFit.SetParName(1,
"Mean")
1115 timeFit.SetParName(2,
"Sigma")
1116 timeFit.SetParName(3,
"Bkgd")
1117 timeFit.SetParLimits(2, 10.0, 80.0)
1119 timeFit.SetParameter(0, n)
1120 timeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1121 timeFit.SetParameter(1, 320.0)
1122 timeFit.SetParameter(2, 20.0)
1123 timeFit.SetParameter(3, 100.0)
1130 timeFit.SetParameter(0, n)
1131 timeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1132 timeFit.SetParameter(1, 320.0)
1133 timeFit.SetParameter(2, 20.0)
1134 timeFit.SetParameter(3, 100.0)
1145 for sectorFB
in range(0, 16):
1146 for layer
in range(2, 15):
1148 timeFit.SetParameter(0, n)
1149 timeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1150 timeFit.SetParameter(1, 320.0)
1151 timeFit.SetParameter(2, 20.0)
1152 timeFit.SetParameter(3, 100.0)
1156 for sectorFB
in range(0, 16):
1157 for layer
in range(2, 15):
1159 timeFit.SetParameter(0, n)
1160 timeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1161 timeFit.SetParameter(1, 320.0)
1162 timeFit.SetParameter(2, 20.0)
1163 timeFit.SetParameter(3, 100.0)
1181 ctimeFit = ROOT.TF1(
"ctimeFit",
"gausn(0)+pol0(3)", 300.0, 700.0)
1182 ctimeFit.SetParName(0,
"Area")
1183 ctimeFit.SetParName(1,
"Mean")
1184 ctimeFit.SetParName(2,
"Sigma")
1185 ctimeFit.SetParName(3,
"Bkgd")
1186 ctimeFit.SetParLimits(2, 10.0, 80.0)
1188 ctimeFit.SetParameter(0, n)
1189 ctimeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1190 ctimeFit.SetParameter(1, 450.0)
1191 ctimeFit.SetParameter(2, 40.0)
1192 ctimeFit.SetParameter(3, 10.0)
1199 ctimeFit.SetParameter(0, n)
1200 ctimeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1201 ctimeFit.SetParameter(1, 450.0)
1202 ctimeFit.SetParameter(2, 40.0)
1203 ctimeFit.SetParameter(3, 10.0)
1214 for sectorFB
in range(0, 16):
1215 for layer
in range(0, 2):
1217 ctimeFit.SetParameter(0, n)
1218 ctimeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1219 ctimeFit.SetParameter(1, 440.0)
1220 ctimeFit.SetParameter(2, 40.0)
1221 ctimeFit.SetParameter(3, 10.0)
1225 for sectorFB
in range(0, 16):
1226 for layer
in range(0, 2):
1228 ctimeFit.SetParameter(0, n)
1229 ctimeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1230 ctimeFit.SetParameter(1, 440.0)
1231 ctimeFit.SetParameter(2, 40.0)
1232 ctimeFit.SetParameter(3, 10.0)
1276 canvas.Print(self.
pdfNamepdfName,
"Title:{0}".format(self.
hist_nHit1dhist_nHit1d.GetName()))
1278 canvas.Print(self.
pdfNamepdfName,
"Title:{0}".format(self.
hist_n1dPhiZhist_n1dPhiZ.GetName()))
1294 timeFit.SetParameter(0, n)
1295 timeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1296 timeFit.SetParameter(1, 330.0)
1297 timeFit.SetParameter(2, 15.0)
1298 timeFit.SetParameter(3, 100.0)
1303 timeFit.SetParameter(0, n)
1304 timeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1305 timeFit.SetParameter(1, 330.0)
1306 timeFit.SetParameter(2, 15.0)
1307 timeFit.SetParameter(3, 100.0)
1313 timeFit.SetParameter(0, n)
1314 timeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1315 timeFit.SetParameter(1, 330.0)
1316 timeFit.SetParameter(2, 15.0)
1317 timeFit.SetParameter(3, 100.0)
1322 canvas.Print(self.
pdfNamepdfName,
"Title:{0}".format(self.
hist_dtRPC1dhist_dtRPC1d.GetName()))
1324 ctimeFit.SetParameter(0, n)
1325 ctimeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1326 ctimeFit.SetParameter(1, 520.0)
1327 ctimeFit.SetParameter(2, 40.0)
1328 ctimeFit.SetParameter(3, 10.0)
1333 ctimeFit.SetParameter(0, n)
1334 ctimeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1335 ctimeFit.SetParameter(1, 520.0)
1336 ctimeFit.SetParameter(2, 40.0)
1337 ctimeFit.SetParameter(3, 10.0)
1343 ctimeFit.SetParameter(0, n)
1344 ctimeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1345 ctimeFit.SetParameter(1, 520.0)
1346 ctimeFit.SetParameter(2, 40.0)
1347 ctimeFit.SetParameter(3, 10.0)
1355 canvas.Print(self.
pdfNamepdfName,
"Title:{0}".format(self.
hist_nHit2dhist_nHit2d.GetName()))
1378 canvas.Print(self.
pdfNamepdfName,
"Title:{0}".format(self.
hist_tVsZFwdhist_tVsZFwd.GetName()))
1380 canvas.Print(self.
pdfNamepdfName,
"Title:{0}".format(self.
hist_tVsZFwdhist_tVsZFwd.GetName()))
1381 timeFit.SetParameter(0, self.
hist_tRPCCal2dhist_tRPCCal2d.GetEntries())
1383 timeFit.SetParameter(0, n)
1384 timeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1385 timeFit.SetParameter(1, 320.0)
1386 timeFit.SetParameter(2, 20.0)
1387 timeFit.SetParameter(3, 100.0)
1394 ctimeFit.SetParameter(0, n)
1395 ctimeFit.SetParLimits(0, 0.2 * n, 5.0 * n)
1396 ctimeFit.SetParameter(1, 500.0)
1397 ctimeFit.SetParameter(2, 40.0)
1398 ctimeFit.SetParameter(3, 10.0)
1405 pdfNameLast =
'{0}]'.format(self.
pdfNamepdfName)
1412 """Handle begin of run: print diagnostic message"""
1414 print(
'beginRun', EventMetaData.getRun())
1417 """Handle end of run: print diagnostic message"""
1419 print(
'endRun', EventMetaData.getRun())
1422 """Process one event: fill histograms, (optionally) draw event display"""
1426 event = EventMetaData.getEvent()
1437 for hit1d
in hit1ds:
1438 tCal1d.append(hit1d.getTime())
1440 for hit2d
in hit2ds:
1441 tCal2d.append(hit2d.getTime())
1443 countAllMultihit = 0
1445 count = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1446 rawFb = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
1447 rawSector = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
1448 rawLayer = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
1449 rawPlane = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
1450 rawStrip = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
1451 rawCtime = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
1452 for copper
in range(0, len(rawklms)):
1453 rawklm = rawklms[copper]
1456 if rawklm.GetNumEntries() != 1:
1457 print(
'##0 Event', event,
'copper', copper,
' getNumEntries=', rawklm.GetNumEntries())
1459 nodeID = rawklm.GetNodeID(0) - self.
BKLM_IDBKLM_ID
1461 nodeID = nodeID - (self.
EKLM_IDEKLM_ID - self.
BKLM_IDBKLM_ID) + 4
1463 if (nodeID < 0)
or (nodeID > 4):
1465 trigCtime = (rawklm.GetTTCtime(0) & 0x7ffffff) << 3
1466 revo9time = trigCtime - 0x3b0
1467 for finesse
in range(0, 4):
1468 dc = (finesse << 2) + copper
1469 nWords = rawklm.GetDetectorNwords(0, finesse)
1473 countAllMultihit = countAllMultihit + nWords
1474 bufSlot = rawklm.GetDetectorBuffer(0, finesse)
1475 lastWord = bufSlot[nWords - 1]
1476 if lastWord & 0xffff != 0:
1477 print(
"##1 Event", event,
'copper', copper,
'finesse', finesse,
'n=', nWords,
'lastWord=', hex(lastWord))
1478 if (nWords % 2) == 0:
1479 print(
"##2 Event", event,
'copper', copper,
'finesse', finesse,
'n=', nWords,
'should be odd -- skipping')
1481 if int(self.
expexp) != 3:
1482 revo9time = ((lastWord >> 16) << 3) & 0xffff
1483 dt = (trigCtime - revo9time) & 0x3ff
1491 channelMultiplicity = {}
1496 minScintCtime = 99999
1500 for j
in range(0, n):
1501 word0 = bufSlot[j * 2]
1502 word1 = bufSlot[j * 2 + 1]
1503 ctime = word0 & 0xffff
1504 channel = (word0 >> 16) & 0x7f
1505 axis = (word0 >> 23) & 0x01
1506 lane = (word0 >> 24) & 0x1f
1507 flag = (word0 >> 30) & 0x03
1508 adc = word1 & 0x0fff
1509 tdc = (word1 >> 16) & 0x07ff
1511 isScint = (flag == 2)
1512 laneAxisChannel = (word0 >> 16) & 0x1fff
1513 if laneAxisChannel
not in channelMultiplicity:
1514 countAll = countAll + 2
1515 count[dc] = count[dc] + 2
1516 channelMultiplicity[laneAxisChannel] = 0
1517 channelMultiplicity[laneAxisChannel] += 1
1519 if ctime < minRPCCtime:
1521 if ctime > maxRPCCtime:
1528 if int(self.
expexp) <= 3:
1529 trigCtx = trigCtime >> 3
1530 ctime = trigCtx - ((trigCtx - ctime) << 2)
1531 if ctime < minScintCtime:
1532 minScintCtime = ctime
1533 if ctime > maxScintCtime:
1534 maxScintCtime = ctime
1535 electId = (channel << 12) | (axis << 11) | (lane << 6) | (finesse << 4) | nodeID
1543 rawFb[dc].append(fb)
1544 rawSector[dc].append(sector)
1545 rawLayer[dc].append(layer)
1546 rawPlane[dc].append(plane)
1547 rawStrip[dc].append(strip)
1548 rawCtime[dc].append(ctime)
1550 rawFb[dc].append(-1)
1551 rawSector[dc].append(-1)
1552 rawLayer[dc].append(-1)
1553 rawPlane[dc].append(-1)
1554 rawStrip[dc].append(-1)
1555 rawCtime[dc].append(-1)
1556 tdcRangeRPC = maxRPCtdc - minRPCtdc
1557 ctimeRangeRPC = (maxRPCCtime - minRPCCtime) << 3
1558 ctimeRangeScint = (maxScintCtime - minScintCtime) << 3
1562 if maxScintCtime > 0:
1566 for j
in range(0, n):
1567 word0 = bufSlot[j * 2]
1568 word1 = bufSlot[j * 2 + 1]
1569 ctime = word0 & 0xffff
1570 channel = (word0 >> 16) & 0x7f
1571 axis = (word0 >> 23) & 0x01
1572 lane = (word0 >> 24) & 0x1f
1573 flag = (word0 >> 30) & 0x03
1574 electId = (channel << 12) | (axis << 11) | (lane << 6) | (finesse << 4) | nodeID
1575 adc = word1 & 0x0fff
1576 tdc = (word1 >> 16) & 0x07ff
1577 tdcExtra = (word1 >> 27) & 0x1f
1578 adcExtra = (word1 >> 12) & 0x0f
1580 isScint = (flag == 2)
1581 laneAxis = axis
if ((lane < 1)
or (lane > 20))
else ((lane << 1) + axis)
1582 laneAxisChannel = (word0 >> 16) & 0x1fff
1583 multiplicity = channelMultiplicity[laneAxisChannel]
1584 if multiplicity > 1:
1587 if (self.
singleEntrysingleEntry == 1
and multiplicity > 1)
or (self.
singleEntrysingleEntry == 2
and multiplicity == 1):
1596 if int(self.
expexp) <= 3:
1597 trigCtx = trigCtime >> 3
1598 ctime = trigCtx - ((trigCtx - ctime) << 2)
1599 t = (tdc - trigCtime) & 0x03ff
1600 ct = (ctime << 3) - (trigCtime & 0x7fff8)
1604 if channelMultiplicity[laneAxisChannel] == 1:
1608 tCal = int(tdc - trigCtime - self.
t0RPCt0RPC[axis][sectorFB][lane - 6]) & 0x03ff
1615 if abs(tCal - self.
t0Calt0Cal) < 50:
1631 ctCal = int((ctime << 3) - trigCtime - self.
ct0Scintct0Scint[1 - axis][sectorFB][lane - 1]) & 0x03ff
1632 if abs(ctCal - self.
ct0Calct0Cal) < 50:
1652 if channelMultiplicity[laneAxisChannel] == 1:
1676 cosine = [0, 0, 0, 0, 0, 0, 0, 0]
1677 sine = [0, 0, 0, 0, 0, 0, 0, 0]
1678 for sector
in range(0, 8):
1679 phi = math.pi * sector / 4
1680 cosine[sector] = math.cos(phi)
1681 sine[sector] = math.sin(phi)
1682 zyList = [[], [], [], [], [], [], [], []]
1683 xyList = [[], [], [], [], [], [], [], []]
1684 r0 = 201.9 + 0.5 * 4.4
1689 nPhiStrips = [37, 42, 36, 36, 36, 36, 48, 48, 48, 48, 48, 48, 48, 48, 48]
1690 dPhiStrips = [4.0, 4.0, 4.9, 5.11, 5.32, 5.53, 4.3, 4.46, 4.62, 4.77, 4.93, 5.09, 5.25, 5.4, 5.56]
1691 scintFlip = [[[-1, 1], [-1, 1], [1, 1], [1, -1], [1, -1], [1, -1], [-1, -1], [-1, 1]],
1692 [[1, -1], [1, -1], [1, 1], [-1, 1], [-1, 1], [-1, 1], [-1, -1], [1, -1]]]
1696 zTimes = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
1702 for hit1d
in hit1ds:
1703 key = hit1d.getModuleID()
1710 sectorFB = sector
if fb == 0
else sector + 8
1715 n = rawklms[copper].GetDetectorNwords(0, finesse) >> 1
1716 trigCtime = (rawklms[copper].GetTTCtime(0) & 0x07ffffff) << 3
1719 for j
in range(0, n):
1720 if layer != rawLayer[dc][j]:
1722 if sector != rawSector[dc][j]:
1724 if fb != rawFb[dc][j]:
1726 if plane != rawPlane[dc][j]:
1728 strip = rawStrip[dc][j]
1729 if strip < stripMin:
1731 if strip > stripMax:
1734 ctime = rawCtime[dc][j] << 3
1735 ct = ctime - trigCtime - self.
ct0Scintct0Scint[plane][sectorFB][layer]
1736 ctTrunc = int(ct) & 0x3ff
1737 if abs(ctTrunc - self.
ct0Calct0Cal) < ctDiffMax:
1738 ctDiffMax = int(abs(ctTrunc - self.
ct0Calct0Cal))
1743 tCal = tCal = hit1d.getTime() - trigCtime - self.
t0RPCt0RPC[plane][sectorFB][layer]
1747 tCal = hit1d.getTime() - self.
ct0Scintct0Scint[plane][sectorFB][layer]
1749 tCal = hit1d.getTime() - self.
t0RPCt0RPC[plane][sectorFB][layer]
1750 tCalTrunc = int(tCal) & 0x3ff
1752 if self.
viewview == 1:
1758 stripAverage = (stripMin + stripMax) * 0.5
1762 isPrompt = (abs(tCalTrunc - self.
ct0Cal1dct0Cal1d) < 50)
1765 zA = z0 - stripAverage * dzScint
1767 zA = z0 + stripAverage * dzScint
1769 h = ((stripAverage - 0.5 * nPhiStrips[layer]) * dPhiStrips[layer]) * scintFlip[fb][sector][layer]
1770 xB = r * cosine[sector] - h * sine[sector]
1771 yB = r * sine[sector] + h * cosine[sector]
1773 isPrompt = (abs(tCalTrunc - self.
t0Cal1dt0Cal1d) < 50)
1776 zA = z0 - stripAverage * dzRPC
1778 zA = z0 + stripAverage * dzRPC
1780 h = ((stripAverage - 0.5 * nPhiStrips[layer]) * dPhiStrips[layer])
1781 xB = r * cosine[sector] - h * sine[sector]
1782 yB = r * sine[sector] + h * cosine[sector]
1783 if abs(tCalTrunc - self.
t0Calt0Cal) < 50:
1793 phiTimes[key] = tCal
1800 zTimes[layer][key] = tCal
1809 gZY.SetPoint(0, zA - 1.0, yA - 1.0)
1810 gZY.SetPoint(1, zA - 1.0, yA + 1.0)
1811 gZY.SetPoint(2, zA + 1.0, yA + 1.0)
1812 gZY.SetPoint(3, zA + 1.0, yA - 1.0)
1813 gZY.SetPoint(4, zA - 1.0, yA - 1.0)
1816 gZY.SetLineColor(promptColor)
1818 gZY.SetLineColor(bkgdColor)
1819 zyList[sector].append(gZY)
1822 gXY.SetPoint(0, xB - 1.0, yB - 1.0)
1823 gXY.SetPoint(1, xB - 1.0, yB + 1.0)
1824 gXY.SetPoint(2, xB + 1.0, yB + 1.0)
1825 gXY.SetPoint(3, xB + 1.0, yB - 1.0)
1826 gXY.SetPoint(4, xB - 1.0, yB - 1.0)
1829 gXY.SetLineColor(promptColor)
1831 gXY.SetLineColor(bkgdColor)
1832 xyList[sector].append(gXY)
1839 self.
hist_nHit1dBkgdhist_nHit1dBkgd.Fill(nScint + nRPCBkgd + nRPCPrompt)
1841 for phiKey
in phiTimes:
1846 sectorFB = sector
if fb == 0
else sector + 8
1847 tphi = phiTimes[phiKey]
1848 tphiTrunc = int(tphi) & 0x3ff
1849 for zKey
in zTimes[layer]:
1852 tz = zTimes[layer][zKey]
1853 tzTrunc = int(tz) & 0x3ff
1854 dt = (tphiTrunc - tzTrunc) & 0x3ff
1857 t = (tphi + tz) * 0.5
1858 tTrunc = int(t) & 0x3ff
1874 for sector
in range(0, 8):
1875 if len(zyList[sector]) > self.
minRPCHitsminRPCHits:
1878 title =
'e{0:02d}r{1}: event {2} z-readout hits in S{3}'.format(int(self.
expexp), int(self.
runrun), event, sector)
1879 self.
hist_ZY1Dhist_ZY1D[jCanvas - 1].SetTitle(title)
1880 self.
hist_ZY1Dhist_ZY1D[jCanvas - 1].Draw()
1881 for g
in self.
bklmZYbklmZY:
1883 for g
in zyList[sector]:
1890 enoughXYHits =
False
1891 for sector
in range(0, 8):
1892 if len(xyList[sector]) > self.
minRPCHitsminRPCHits:
1899 title =
'e{0:02d}r{1}: event {2} phi-readout hits'.format(int(self.
expexp), int(self.
runrun), event)
1900 self.
hist_XYhist_XY.SetTitle(title)
1902 for g
in self.
bklmXYbklmXY:
1904 for sector
in range(0, 8):
1905 for g
in xyList[sector]:
1916 if drawnSectors > 0:
1923 rpcHits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1924 for hit2d
in hit2ds:
1925 key = hit2d.getModuleID()
1929 phiStripMin = hit2d.getPhiStripMin() - 1
1930 phiStripMax = hit2d.getPhiStripMax() - 1
1931 zStripMin = hit2d.getZStripMin() - 1
1932 zStripMax = hit2d.getZStripMax() - 1
1933 sectorFB = sector
if fb == 0
else sector + 8
1935 rpcHits[sectorFB] += 1
1940 n = rawklms[copper].GetDetectorNwords(0, finesse) >> 1
1941 trigCtime = (rawklms[copper].GetTTCtime(0) & 0x07ffffff) << 3
1948 for j
in range(0, n):
1949 if layer != rawLayer[dc][j]:
1951 if sector != rawSector[dc][j]:
1953 if fb != rawFb[dc][j]:
1955 strip = rawStrip[dc][j]
1956 plane = rawPlane[dc][j]
1958 if strip < zStripMin:
1960 if strip > zStripMax:
1962 ctZ = rawCtime[dc][j] << 3
1965 if strip < phiStripMin:
1967 if strip > phiStripMax:
1969 ctPhi = rawCtime[dc][j] << 3
1971 if (jZ >= 0)
and (jPhi >= 0):
1973 if abs(ctZ - ctPhi) > 40:
1975 ct = int((ctZ + ctPhi) * 0.5 - trigCtime - self.
ct0Scintct0Scint[plane][sectorFB][layer]) & 0x3ff
1976 if abs(ct - self.
ct0Calct0Cal) < ctDiffMax:
1977 ctDiffMax = int(abs(ct - self.
ct0Calct0Cal))
1982 tCal = hit2d.getTime() - trigCtime - self.
t0RPCt0RPC[plane][sectorFB][layer]
1986 tCal = hit2d.getTime() - self.
ct0Scintct0Scint[plane][sectorFB][layer]
1988 tCal = hit2d.getTime() - self.
t0RPCt0RPC[plane][sectorFB][layer]
1989 tCalTrunc = int(tCal) & 0x3ff
1990 x = hit2d.getGlobalPositionX()
1991 y = hit2d.getGlobalPositionY()
1992 z = hit2d.getGlobalPositionZ()
1993 r = math.sqrt(x * x + y * y)
2002 if abs(tCalTrunc - self.
ct0Cal2dct0Cal2d) < 50:
2016 if abs(tCalTrunc - self.
t0Cal2dt0Cal2d) < 50:
2023 self.
hist_tVsZBwdhist_tVsZBwd.Fill(-(z - 47.0), tCalTrunc)
2026 self.
hist_tVsZFwdhist_tVsZFwd.Fill(+(z - 47.0), tCalTrunc)
2027 elif abs(tCalTrunc - self.
t0Cal2dt0Cal2d) >= 50:
2039 gXY.SetPoint(0, x - 1.0, y - 1.0)
2040 gXY.SetPoint(1, x - 1.0, y + 1.0)
2041 gXY.SetPoint(2, x + 1.0, y + 1.0)
2042 gXY.SetPoint(3, x + 1.0, y - 1.0)
2043 gXY.SetPoint(4, x - 1.0, y - 1.0)
2046 gZY.SetPoint(0, z - 1.0, y - 1.0)
2047 gZY.SetPoint(1, z - 1.0, y + 1.0)
2048 gZY.SetPoint(2, z + 1.0, y + 1.0)
2049 gZY.SetPoint(3, z + 1.0, y - 1.0)
2050 gZY.SetPoint(4, z - 1.0, y - 1.0)
2053 gXY.SetLineColor(promptColor)
2054 gZY.SetLineColor(promptColor)
2056 gXY.SetLineColor(bkgdColor)
2057 gZY.SetLineColor(bkgdColor)
2064 hasEnoughRPCHits =
False
2065 for count
in rpcHits:
2067 hasEnoughRPCHits =
True
2069 if hasEnoughRPCHits:
2071 title =
'e{0:02d}r{1}: event {2} 2D hits'.format(int(self.
expexp), int(self.
runrun), event)
2072 self.
hist_XYhist_XY.SetTitle(title)
2073 self.
hist_ZYhist_ZY.SetTitle(title)
2076 for g
in self.
bklmXYbklmXY:
2082 for g
in self.
bklmZYbklmZY:
a (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.
hist_occupancyZBkgd
histogram of z coordinate for out-of-time BKLMHit2ds
hist_mappedScintLaneAxisOccupancy
scatterplot of number of mapped scint hits by lane/axis vs sector, at most one entry per readout chan...
int EKLM_ID
COPPER base identifier for EKLM readout.
hist_unmappedSectorOccupancy
histogram of number of unmapped hits by sector, at most one entry per readout channel
hist_multiplicityPhiBySector
scatterplot of #Phi BKLMHit1ds vs sector
hist_tzRPCCal1d
histogram of RPC-z BKLMHit1d time relative to event's trigger time, corrected for inter-sector variat...
run
internal copy of run number
hist_dtScint1d
histogram of scint-phi and -z BKLMHit1d time difference
hist_occupancyRZBkgd
scatterplot of side view of forward BKLM for in-time BKLMHit2ds
hist_rawKLMtdcExtraRPC
scatterplot of the RawKLM RPC hit's extra bits vs sector in the third (time) word
def __init__(self, exp, run, histName, pdfName, eventPdfName, verbosity, maxDisplays, minRPCHits, legacyTimes, singleEntry, view)
hist_occupancyRBkgd
histogram of layer# for out-of-time BKLMHit2ds
hist_mappedRPCPhiTimePerLayer
histograms of RPC mapped-channel phi-strip TDC value relative to event's trigger time,...
hist_mappedRPCTimeCal
histogram of RPC mapped-channel TDC value relative to event's trigger time, corrected for inter-secto...
hist_tVsZFwd
profile histogram of BKLMHit2d RPC time vs z (forward)
hist_occupancyRZPrompt
scatterplot of side view of forward BKLM for in-time BKLMHit2ds
hist_nHit1dScint
histogram of the number of scint BKLMHit1ds
hist_XY
blank scatterplot to define the bounds of the BKLM end view
hist_rawKLMnodeID
scatterplot of the RawKLM's COPPER index vs NodeID relative to the base BKLM/EKLM values
int BKLM_SECTOR_BIT
bit position for sector-1 [0..7]; 0 is on the +x axis and 2 is on the +y axis
hist_mappedScintTime
histogram of scint mapped-channel TDC value relative to event's trigger Ctime
ct0Scint
per-layer variations in scint-ctime calibration adjustment (ns) for rawKLMs
hist_nRawKLM
histogram of the number of RawKLMs in the event (should be 1)
ct0Cal
scint-ctime calibration adjustment (ns) for rawKLMs
hist_occupancyForwardXYPrompt
scatterplot of end view of forward BKLM for in-time BKLMHit2ds
tuple BKLM_MAXSTRIP_MASK
bit mask for maxStrip-1 [0..47]
int BKLM_MAXSTRIP_BIT
bit position for maxStrip-1 [0..47]
hist_rawKLMlaneFlag
scatterplot of the RawKLM hit's lane vs flag (1=RPC, 2=Scint)
tuple BKLM_SECTOR_MASK
bit mask for sector-1 [0..7]; 0 is on the +x axis and 2 is on the +y axis
ct0Cal2d
scint-ctime calibration adjustment (ns) for BKLMHit2ds
def makeText(self, x, y, s)
tuple BKLM_SECTION_MASK
bit mask for section [0..1]; forward is 0
eventCanvas
TCanvas on which event displays will be drawn.
hist_n1dPhiZ
scatterplot of #Z BKLMHit1ds vs #Phi BKLMHit1ds
hist_rawKLMchannelMultiplicity
scatterplots of multiplicity of entries in one readout channel vs lane/axis, indexed by sector#
hist_tdcRangeVsCtimeRangeRPC
scatterplot of RPC TDC range vs Ctime range
hist_tdcRangeRPC
histogram of RPC TDC range
hist_tRPCCal2d
histogram of RPC calibrated time in BKLMHit2ds
hist_mappedRPCSectorOccupancy
histogram of number of mapped RPC hits by sector, at most one entry per readout channel
ct0Cal1d
scint-ctime calibration adjustment (ns) for BKLMHit1ds
hist_ctzScintCal1d
histogram of scint-z BKLMHit1d time relative to event's trigger Ctime, corrected for inter-sector var...
eventPdfName
internal copy of the pathname of the output event-display PDF file
maxDisplays
internal copy of the maximum number of event displays to write
hist_mappedScintCtimeBySector
scatterplot of scint mapped-channel CTIME value relative to event's trigger Ctime vs sector
hist_unmappedRPCSectorOccupancy
histogram of number of unmapped RPC hits by sector, at most one entry per readout channel
singleEntry
select events with any (0) or exactly one (1) or more than one (2) entries/channel
hist_nHit1dRPCBkgd
histogram of the number of out-of-time RPC BKLMHit1ds
legacyTimes
calculate prompt time for legacy BKLMHit1ds and BKLMHit2ds (True) or use stored time (False)
hist_tphiRPCCal1d
histogram of RPC-phi BKLMHit1d time relative to event's trigger time, corrected for inter-sector vari...
t0RPC
per-layer variations in RPC z- and phi-time calibration adjustment (ns) for rawKLMs
hist_nHit1dRPCPrompt
histogram of the number of in-time RPC BKLMHit1ds
int BKLM_PLANE_BIT
bit position for plane-1 [0..1]; 0 is inner-plane
hist_tdcRangeVsTimeRPC
scatterplot of RPC TDC range vs time
eventCounter
event counter (needed for PDF table of contents' ordinal event#)
view
view event displays using one-dimensional (1) or two-dimensional (2) hits
hist_mappedScintCtimeCal
histogram of scint mapped-channel CTIME value relative to event's trigger Ctime, corrected for inter-...
hist_mappedScintCtimeRangeBySector
scatterplot of scint mapped-channel CTIME range in event vs sector
hist_unmappedScintTimeBySector
scatterplot of scint unmapped-channel TDC value relative to event's trigger Ctime vs sector
hist_unmappedScintTime
histogram of scint unmapped-channel TDC value relative to event's trigger Ctime
t0Cal
Time-calibration constants obtained from experiment 7 run 1505 RPC-time calibration adjustment (ns) f...
hist_unmappedRPCTimeBySector
scatterplot of RPC unmapped-channel TDC value relative to event's trigger time, by sector
hist_unmappedRPCTime
histogram of RPC unmapped-channel TDC value relative to event's trigger time
hist_rawKLMsizeMultihit
histogram of number of hits, including multiple entries on one readout channel
dcToSectorFB
map for data concentrator -> sectorFB
hist_tRPCCal1d
histogram of RPC-phi and -z BKLMHit1d avg time relative to event's trigger time, corrected for inter-...
int BKLM_STRIP_BIT
bit position for strip-1 [0..47]
def makeGraph(self, x, y)
hist_mappedChannelOccupancyBkgd
scatterplots of out-of-time mapped channel occupancy (1 hit per readout channel), indexed by sector#
hist_mappedChannelOccupancyPrompt
scatterplots of in-time mapped channel occupancy (1 hit per readout channel), indexed by sector#
hist_unmappedSectorOccupancyMultihit
histogram of number of unmapped hits by sector, including multiple entries on one readout channel
hist_ctimeRangeRPC
histogram of RPC Ctime range
hist_mappedScintCtime
histogram of scint mapped-channel CTIME value relative to event's trigger Ctime
hist_trigCtimeVsTrigRevo9time
histogram of RawKLM[] header's trigger CTIME relative to its final-data-word trigger REVO9 time
int BKLM_ID
COPPER base identifier for BKLM readout.
hist_ctScintCal1d
histogram of scint-phi and -z BKLMHit1d avg time relative to event's trigger Ctime,...
hist_mappedScintCtimeRange
histogram of scint mapped-channel CTIME range in event
hist_occupancyRPrompt
histogram of layer# for in-time BKLMHit2ds
hist_ctphiScintCal1d
histogram of scint-phi BKLMHit1d time relative to event's trigger Ctime, corrected for inter-sector v...
hist_nDigit
histogram of the number of BKLMDigits in the event
hist_ctScintCal2d
histogram of scint calibrated time in BKLMHit2ds
hist_mappedRPCTime
histogram of RPC mapped-channel TDC value relative to event's trigger time
hist_nHit2d
histogram of the number of BKLMHit2ds
hist_rawKLMsizeByDCMultihit
histograms of number of hits, including multiple entries on one readout channel, indexed by sector#
hist_mappedRPCLaneAxisOccupancy
scatterplot of number of mapped RPC hits by lane/axis vs sector, at most one entry per readout channe...
hist_mappedRPCCtimeRange
histogram of RPC mapped-channel REVO9 range in event
hist_unmappedScintCtimeBySector
scatterplot of scint unmapped-channel CTIME value relative to event's trigger Ctime,...
hist_ZY
blank scatterplot to define the bounds of the BKLM side view for 2D hits
minRPCHits
internal copy of the minimum number of RPC BKLMHit2ds in any sector for event display
hist_nHit1dBkgd
histogram of the number of out-of-time scint BKLMHit1ds
exp
internal copy of experiment number
hist_mappedSectorOccupancy
histogram of number of mapped hits by sector, at most one entry per readout channel
verbosity
internal copy of the histogram verbosity in the histogram PDF file
hist_rawKLMsizeByDC
histograms of number of hits, at most one entry per readout channel, indexed by sector#
hist_multiplicityZBySector
scatterplot of #Z BKLMHit1ds vs sector
hist_ctScintCal2dBySector
scatterplot of scint calibrated time in BKLMHit2ds vs sector
tuple BKLM_MODULEID_MASK
bit mask for unique module identifier (end, sector, layer)
t0Cal1d
RPC-time calibration adjustment (ns) for BKLMHit1ds.
hist_unmappedRPCLaneAxisOccupancy
scatterplot of number of unmapped RPC hits by lane/axis vs sector, at most one entry per readout chan...
hist_RPCTimeLowBitsBySector
scatterplot of RPC TDC low-order bits vs sector (should be 0 since granularity is 4 ns)
hist_occupancyZPrompt
histogram of z coordinate for in-time BKLMHit2ds
hist_mappedRPCZTimePerLayer
histograms of RPC mapped-channel z-strip TDC value relative to event's trigger time,...
tuple BKLM_LAYER_MASK
bit mask for layer-1 [0..15]; 0 is innermost and 14 is outermost
hist_nHit1dPrompt
histogram of the number of in-time scint BKLMHit1ds
hist_mappedScintZCtimePerLayer
histograms of scint mapped-channel z-strip CTIME value relative to event's trigger Ctime,...
bklmZY
list of line-segment (z,y) points for the BKLM side view
hist_ZY1D
blank scatterplot to define the bounds of the BKLM side view for 1D hits
hist_mappedSectorOccupancyMultihit
histogram of number of mapped hits by sector, including multiple entries on one readout channel
hist_mappedRPCTimeCalBySector
scatterplot of RPC mapped-channel TDC relative to trigger time, corrected for inter-sector variation,...
hist_occupancyForwardXYBkgd
scatterplot of end view of forward BKLM for out-of-time BKLMHit2ds
hist_unmappedScintLaneAxisOccupancy
scatterplot of number of unmapped scint hits by lane/axis vs sector, at most one entry per readout ch...
hist_mappedScintSectorOccupancy
scatterplot of number of mapped scint hits by lane/axis vs sector, at most one entry per readout chan...
hist_tVsZBwd
profile histogram of BKLMHit2d RPC time vs z (forward)
hist_rawKLMadcExtraScint
scatterplot of the RawKLM scint hit's extra bits vs sector in the fourth (adc) word
hist_mappedScintTimeBySector
scatterplot of scint mapped-channel TDC value relative to event's trigger Ctime vs sector
hist_mappedRPCTimeBySector
scatterplot of RPC mapped-channel TDC value relative to event's trigger time vs sector
eventDisplays
event-display counter
hist_dtRPC1d
histogram of RPC-phi and -z BKLMHit1d time difference
hist_ctimeRangeVsTimeRPC
scatterplot of RPC Ctime range vs time
lastTitle
title of the last-drawn event display (needed for PDF table of contents' last event)
hist_rawKLMtdcExtraScint
scatterplot of the RawKLM scint hit's extra bits vs sector in the third (time) word
tuple BKLM_PLANE_MASK
bit mask for plane-1 [0..1]; 0 is inner-plane
int BKLM_SECTION_BIT
bit position for section [0..1]; forward is 0
pdfName
internal copy of the pathname of the output histogram PDF file
hist_unmappedScintCtime
histogram of scint unmapped-channel CTIME value relative to event's trigger Ctime
histogramFile
Output ROOT TFile that will contain the histograms/scatterplots.
hist_rawKLMnumEvents
histogram of the RawKLM's NumEvents (should be 1)
hist_rawKLMchannelMultiplicityFine
scatterplots of multiplicity of entries in one readout channel vs lane/axis/channel,...
int BKLM_LAYER_BIT
bit position for layer-1 [0..14]; 0 is innermost
hist_unmappedChannelOccupancy
scatterplots of unmapped channel occupancy (1 hit per readout channel), indexed by sector#
hist_ScintTimeLowBitsBySector
scatterplot of scint TDC low-order bits vs sector
hist_mappedScintCtimeCalBySector
scatterplot of scint mapped-channel CTIME relative to trigger Ctime, corrected for inter-sector varia...
histName
internal copy of the pathname of the output histogram ROOT file
bklmXY
list of line-segment (x,y) points for the BKLM end view
hist_unmappedScintSectorOccupancy
histogram of number of unmapped scint hits by sector, at most one entry per readout channel
hist_rawKLMadcExtraRPC
scatterplot of the RawKLM RPC hit's extra bits vs sector in the fourth (adc) word
t0Cal2d
RPC-time calibration adjustment (ns) for BKLMHit2ds.
hist_mappedScintTDCBySector
scatterplot of scint mapped-channel TDC value (NOT relative to event's trigger Ctime) vs sector
hist_mappedScintPhiCtimePerLayer
histograms of scint mapped-channel phi-strip CTIME value relative to event's trigger Ctime,...
electIdToModuleId
readout <-> detector map (from the information retrieved from the conditions database)
int BKLM_STRIP_MASK
bit mask for strip-1 [0..47]
hist_rawKLMnumNodes
histogram of the RawKLM's NumNodes (should be 1)
hist_tRPCCal2dBySector
scatterplot of RPC calibrated time in BKLMHit2ds vs sector
hist_rawKLMsize
histogram of number of hits, at most one entry per readout channel
hist_occupancyBackwardXYPrompt
scatterplot of end view of backward BKLM for in-time BKLMHit2ds
hist_nHit1d
histogram of the number of BKLMHit1ds
hist_mappedScintTDC
histogram of scint mapped-channel TDC value (NOT relative to event's trigger Ctime)
hist_occupancyBackwardXYBkgd
scatterplot of end view of backward BKLM for out-of-time BKLMHit2ds
hist_mappedRPCCtimeRangeBySector
scatterplot of RPC mapped-channel REVO9 range in event vs sector
sectorFBToDC
map for sectorFB -> data concentrator