Belle II Software  release-05-01-25
attributemaps.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 from ROOT import gSystem
5 gSystem.Load('libframework') # for PyStoreArray
6 gSystem.Load('libcdc') # for CDCSimHit
7 gSystem.Load('libtracking') # for CDCWire and so on
8 gSystem.Load('libgenfit2') # for GFTrackCands
9 
10 gSystem.Load('libdataobjects')
11 
12 from ROOT import Belle2 # make Belle2 namespace available
13 from ROOT import std
14 from ROOT import genfit
15 
16 import bisect
17 import colorsys
18 
19 # Standard color map for id types
20 listColors = [ # 'magenta',
21  # 'gold',
22  # 'yellow',
23  # 'aquamarine',
24  'red',
25  'blue',
26  'green',
27  'orange',
28  'cyan',
29  'olive',
30  'lime',
31  'maroon',
32  'tomato',
33  'turquoise',
34  'mediumspringgreen',
35  'darkgreen',
36  'indigo',
37 ]
38 
39 
40 def timeOfFlightToColor(timeOfFlight):
41  """
42  Translates the given floating point time of flight to a color.
43  """
44 
45  # values are all fractions of their respective scale
46 
47  # Full color circle in 3 nanoseconds
48  hue = 360 / 3.0 * timeOfFlight % 360.0 / 360.0
49  saturation = 0.75
50  lightness = 0.5
51 
52  (red, green, blue) = colorsys.hls_to_rgb(hue, lightness, saturation)
53 
54  color = 'rgb({0:.2%}, {1:.2%}, {2:.2%})'.format(red, green, blue)
55  return color
56 
57 
58 def inTrackIdToColor(inTrackId):
59  """
60  Translates the given integer in track id to a color.
61  """
62 
63  hue = 50 * inTrackId % 360 / 360.0
64  saturation = 0.75
65  lightness = 0.5
66 
67  (red, green, blue) = colorsys.hls_to_rgb(hue, lightness, saturation)
68 
69  color = 'rgb({0:.2%}, {1:.2%}, {2:.2%})'.format(red, green, blue)
70  return color
71 
72 
74 
75  """
76  Base class for CDCHit to the stroke width map functional objects.
77  """
78 
79  def __call__(self, iCDCHit, cdcHit):
80  """
81  Function call to map the CDCHit id and object to a stroke width.
82  """
83 
84  return 0.2
85 
86 
88 
89  """
90  CDCHit to stroke width map highlighting the CDCHits with 0 drift length.
91  """
92 
93  def __call__(self, iCDCHit, cdcHit):
94  """
95  Function call to map the CDCHit id and object to a stroke width.
96  """
97 
98  wirehit = Belle2.TrackFindingCDC.CDCWireHit(cdcHit)
99  if wirehit.getRefDriftLength() == 0.0:
100  return 1
101  else:
102  return 0.2
103 
104 
106 
107  """
108  Base class for CDCHit to color map functional objects.
109  """
110 
111 
112  bkgHitColor = 'orange'
113 
114  def __call__(self, iCDCHit, cdcHit):
115  """
116  Function call to map the CDCHit id and object to a color.
117  """
118 
119  return self.bkgHitColor
120 
121 
123 
124  """
125  CDCHit to color map highlighting the CDCHits with 0 drift length.
126  """
127 
128  def __call__(self, iCDCHit, cdcHit):
129  """
130  Function call to map the CDCHit id and object to a color.
131  """
132 
133  wirehit = Belle2.TrackFindingCDC.CDCWireHit(cdcHit)
134  if wirehit.getRefDriftLength() == 0.0:
135  return 'red'
136  else:
137  return self.bkgHitColor
138 
139 
141 
142  """
143  CDCHit to color map highlighting the CDCHits that posses the do not use flag.
144  """
145 
146  def __init__(self):
147  """Constructor"""
148  super().__init__()
149 
150  self.storedWireHits = Belle2.PyStoreObj('CDCWireHitVector')
151  if not self.storedWireHits:
152  print('Could not find CDCWireHitVector in the data store to lookup TakenFlag')
153 
154  def __call__(self, iCDCHit, cdcHit):
155  """
156  Function call to map the CDCHit id and object to a color.
157  """
158  if not self.storedWireHits:
159  return self.bkgHitColor
160 
161  wireHits = self.storedWireHits.obj().get()
162  # Search the sorted range of wire hits for the one corresponding to the given CDCHit
163  wireHit = wireHits.at(bisect.bisect_left(wireHits, cdcHit))
164  if wireHit.getAutomatonCell().hasTakenFlag():
165  return 'red'
166  else:
167  return self.bkgHitColor
168 
169 
171 
172  """
173  CDCHit to color map by their local right left passage information from Monte Carlo truth
174  """
175 
176  def __call__(self, iCDCHit, cdcHit):
177  """
178  Function call to map the CDCHit id and object to a color.
179  """
180 
182  rlInfo = mcHitLookUp.getRLInfo(cdcHit)
183  if rlInfo == 1:
184  # Right
185  return 'green'
186  elif rlInfo == -1 or rlInfo == 65535: # <- The root interface mistakes the signed enum value for an unsigned value
187  # Left
188  return 'red'
189  else:
190  self.bkgHitColor
191 
192  def __str__(self):
193  """
194  Informal string summarizing the translation from right left passage variable to colors.
195  """
196 
197  return 'Local right left passage variable: green <-> right, red <-> left, orange <-> not determinable.'
198 
199 
201 
202  """
203  CDCRecoHit3D to color map for the correctness of the rl information
204  """
205 
206  def __init__(self):
207  """Constructor"""
209  mcHitLookUp.fill()
210 
211  def __call__(self, iCDCRecoHit, cdcRecoHit3D):
212  """
213  This function maps the cdcRecoHit3D to the color which inidcated the correctness of the rl passage
214  """
215 
216  cdcHit = cdcRecoHit3D.getWireHit().getHit()
217 
219  rlInfo = mcHitLookUp.getRLInfo(cdcHit)
220 
221  if rlInfo == -32768 or rlInfo == 32768: # <- The root interface mistakes the signed enum value for an unsigned value
222  return 'violet'
223  elif rlInfo == cdcRecoHit3D.getRLInfo():
224  return 'green'
225  else:
226  return 'red'
227 
228  def __str__(self):
229  """
230  Informal string summarizing the translation from right left passage variable to colors.
231  """
232  return 'Correct RL info: gree, wrong RL info: red'
233 
234 
236 
237  """
238  CDCHit to color map by their assoziated CDCSimHit::getPosFlag property.
239  """
240 
241  def __call__(self, iCDCHit, cdcHit):
242  """
243  Function call to map the CDCHit id and object to a color.
244  """
245 
246  simHit = cdcHit.getRelated('CDCSimHits')
247  posFlag = simHit.getPosFlag()
248  if posFlag == 0:
249  # Right
250  return 'green'
251  elif posFlag == 1:
252  # Left
253  return 'red'
254  else:
255  self.bkgHitColor
256 
257  def __str__(self):
258  """
259  Informal string summarizing the translation from CDCSimHit::getPosFlag variable to colors.
260  """
261 
262  return 'PosFlag variable of the related CDCSimHit: green <-> 0 (Right), red <-> 1 (Left), orange <-> determinable.'
263 
264 
266 
267  """
268  CDCHit to color map by their assoziated CDCSimHit::getBackgroundTag property.
269  """
270 
271 
272  BackgroundMetaData = Belle2.BackgroundMetaData
273 
274 
275  bkgname_by_bkgtag = {
276  BackgroundMetaData.bg_none: 'bg_none',
277  BackgroundMetaData.bg_Coulomb_LER: 'bg_Coulomb_LER',
278  BackgroundMetaData.bg_Coulomb_HER: 'bg_Coulomb_HER',
279  BackgroundMetaData.bg_RBB_LER: 'bg_RBB_LER',
280  BackgroundMetaData.bg_RBB_HER: 'bg_RBB_HER',
281  BackgroundMetaData.bg_Touschek_LER: 'bg_Touschek_LER',
282  BackgroundMetaData.bg_Touschek_HER: 'bg_Touschek_HER',
283  BackgroundMetaData.bg_twoPhoton: 'bg_twoPhoton',
284  BackgroundMetaData.bg_RBB_gamma: 'bg_RBB_gamma',
285  BackgroundMetaData.bg_RBB_LER_far: 'bg_RBB_LER_far',
286  BackgroundMetaData.bg_RBB_HER_far: 'bg_RBB_HER_far',
287  BackgroundMetaData.bg_Touschek_LER_far: 'bg_Touschek_LER_far',
288  BackgroundMetaData.bg_Touschek_HER_far: 'bg_Touschek_HER_far',
289  BackgroundMetaData.bg_SynchRad_LER: 'bg_SynchRad_LER',
290  BackgroundMetaData.bg_SynchRad_HER: 'bg_SynchRad_HER',
291  BackgroundMetaData.bg_other: 'bg_other',
292  }
293 
294 
295  color_by_bkgtag = {
296  BackgroundMetaData.bg_none: 'orange',
297  BackgroundMetaData.bg_Coulomb_LER: 'red',
298  BackgroundMetaData.bg_Coulomb_HER: 'darkred',
299  BackgroundMetaData.bg_RBB_LER: 'blue',
300  BackgroundMetaData.bg_RBB_HER: 'darkblue',
301  BackgroundMetaData.bg_Touschek_LER: 'green',
302  BackgroundMetaData.bg_Touschek_HER: 'darkgreen',
303  BackgroundMetaData.bg_twoPhoton: 'violet',
304  BackgroundMetaData.bg_RBB_gamma: 'skyblue',
305  BackgroundMetaData.bg_RBB_LER_far: 'turquoise',
306  BackgroundMetaData.bg_RBB_HER_far: 'darkturquoise',
307  BackgroundMetaData.bg_Touschek_LER_far: 'olivergreen',
308  BackgroundMetaData.bg_Touschek_HER_far: 'darkolivegreen',
309  BackgroundMetaData.bg_SynchRad_LER: 'goldenrod',
310  BackgroundMetaData.bg_SynchRad_HER: 'darkgoldenrod',
311  BackgroundMetaData.bg_other: 'orange',
312  }
313 
314  def __call__(self, iCDCHit, cdcHit):
315  """
316  Function call to map the CDCHit id and object to a color.
317  """
318 
319  cdcSimHit = cdcHit.getRelated('CDCSimHits')
320  backgroundTag = cdcSimHit.getBackgroundTag()
321 
322  color = self.color_by_bkgtag.get(backgroundTag, None)
323 
324  if color is None:
325  print('Background tag %s not associated with a color.'
326  % backgroundTag)
327  return 'orange'
328  else:
329  return color
330 
331  def __str__(self):
332  """
333  Informal string summarizing the translation from CDCSimHit::getBackgroundTag variable to colors.
334  """
335 
336  color_by_bkgname = {}
337 
338  for backgroundTag in self.bkgname_by_bkgtag:
339  name = self.bkgname_by_bkgtag[backgroundTag]
340  color = self.color_by_bkgtag[backgroundTag]
341  color_by_bkgname[name] = color
342 
343  bkgname_and_color = sorted(color_by_bkgname.items())
344 
345  message = 'Background tag color coding is \n%s' % '\n'.join(name + ' -> ' + color for (name, color) in bkgname_and_color)
346  return message
347 
348 
350 
351  """
352  CDCHit to color map by their Monte Carlo segment id
353  """
354 
355  def __call__(self, iCDCHit, cdcHit):
356  """
357  Function call to map the CDCHit id and object to a color.
358  """
359 
361  inTrackSegmentId = mcHitLookUp.getInTrackSegmentId(cdcHit)
362 
363  if inTrackSegmentId < 0:
364  return self.bkgHitColor
365  else:
366  # values are all fractions of their respective scale
367  hue = 50 * inTrackSegmentId % 360 / 360.0
368  saturation = 0.75
369  lightness = 0.5
370 
371  (red, green, blue) = colorsys.hls_to_rgb(hue, lightness,
372  saturation)
373 
374  color = 'rgb({0:.2%}, {1:.2%}, {2:.2%})'.format(red, green, blue)
375  return color
376 
377 
379 
380  """
381  CDCHit to color map by their assoziated CDCSimHit::getFlightTime.
382  """
383 
384  def __call__(self, iCDCHit, cdcHit):
385  """
386  Function call to map the CDCHit id and object to a color.
387  """
388 
389  simHit = cdcHit.getRelated('CDCSimHits')
390  timeOfFlight = simHit.getFlightTime()
391 
392  return timeOfFlightToColor(timeOfFlight)
393 
394 
396 
397  """
398  CDCHit to color map indicating the reassignment to a different MCParticle.
399  """
400 
401  def __call__(self, iCDCHit, cdcHit):
402  """
403  Function call to map the CDCHit id and object to a color.
404  """
405 
406  relatedMCParticles = cdcHit.getRelationsWith('MCParticles')
407  if relatedMCParticles.size() == 0:
408  return self.bkgHitColor
409  else:
410  mcRelationWeight = relatedMCParticles.weight(0)
411  if mcRelationWeight > 0:
412  return 'green'
413  else:
414  return 'red'
415 
416 
418 
419  """
420  CDCHit to color map coloring by the assoziated MCParticle::getArrayIndex()
421  """
422 
423  def __init__(self):
424  """
425  Construction method setting up a Monte Carlo id to color dictionary which is continously filled
426  as new during the event.
427  """
428 
429 
431 
432  def __call__(self, iCDCHit, cdcHit):
433  """
434  Function call to map the CDCHit id and object to a color.
435  """
436 
437  mcParticle = cdcHit.getRelated('MCParticles')
438  if mcParticle:
439  mcParticleId = mcParticle.getArrayIndex()
440  else:
441  mcParticleId = -1
442 
443  # cdcSimHit = cdcHit.getRelated("CDCSimHits")
444  # if cdcSimHit:
445  # cdcSimHitTrackId = cdcSimHit.getTrackId()
446  # else:
447  # cdcSimHitTrackId = -1
448 
449  if mcParticleId in self.color_by_mcparticleId:
450  color = self.color_by_mcparticleId[mcParticleId]
451  else:
452  iColor = len(self.color_by_mcparticleId)
453  iColor = iColor % len(listColors)
454  color = listColors[iColor]
455  self.color_by_mcparticleId[mcParticleId] = color
456 
457  return color
458 
459 
461 
462  """
463  CDCHit to color map by the assoziated MCParticle::getPDG()
464  """
465 
466 
467  color_by_pdgcode = {
468  -999: CDCHitColorMap.bkgHitColor,
469  11: 'blue',
470  -11: 'blue',
471  13: 'turquoise',
472  -13: 'turquoise',
473  15: 'cyan',
474  -15: 'cyan',
475  211: 'green',
476  -211: 'green',
477  321: 'olive',
478  -321: 'olive',
479  2212: 'red',
480  -2212: 'red',
481  }
482 
483 
484  missing_pdg_color = 'lime'
485 
486  def __call__(self, iCDCHit, cdcHit):
487  """
488  Function call to map the CDCHit id and object to a color.
489  """
490 
491  mcParticle = cdcHit.getRelated('MCParticles')
492  if mcParticle:
493  pdgcode = mcParticle.getPDG()
494  else:
495 
496  # getSecondaryPhysicsProcess()
497  pdgcode = -999
498 
499  if pdgcode in self.color_by_pdgcode:
500  color = self.color_by_pdgcode[pdgcode]
501  else:
502  print('Unknown PDG code', pdgcode)
503  color = self.missing_pdg_color
504 
505  return color
506 
507  def __str__(self):
508  """
509  Informal string summarizing the translation from pdg codes to colors.
510  """
511 
512  legend_head = 'Legend:\n'
513 
514  pdg_code_by_color = {}
515 
516  for (pdgcode, color) in list(self.color_by_pdgcode.items()):
517  pdg_code_by_color.setdefault(color, [])
518  pdg_code_by_color[color].append(pdgcode)
519 
520  legend_content = '\n'.join(str(color) + '->' + str(pdg_code_by_color[color])
521  for color in pdg_code_by_color)
522 
523  return legend_head + legend_content
524 
525 
527 
528  """
529  CDCHit to color map by the isPrimary information as well as the secondary process type in case the particle is not primary.
530  """
531 
532  def __init__(self):
533  """
534  Constuction method setting up a dictionary to count the hits for each secondary type.
535  """
536 
537 
539 
540  def __call__(self, iCDCHit, cdcHit):
541  """
542  Function call to map the CDCHit id and object to a color.
543  """
544 
545  mcParticle = cdcHit.getRelated('MCParticles')
546  if mcParticle:
547  primaryFlag = 1
548  isPrimary = mcParticle.hasStatus(primaryFlag)
549  secondaryProcess = mcParticle.getSecondaryPhysicsProcess()
550  if secondaryProcess > 0:
551  motherMCParticle = mcParticle.getMother()
552  secondary_type = (motherMCParticle.getPDG(),
553  mcParticle.getPDG())
554  else:
555  motherMCParticle = None
556  secondary_type = (-999, mcParticle.getPDG())
557 
558  self.n_hits_by_secondary_type.setdefault(secondary_type, 0)
559  self.n_hits_by_secondary_type[secondary_type] = \
560  self.n_hits_by_secondary_type[secondary_type] + 1
561  if isPrimary:
562  return 'blue'
563  elif secondaryProcess > 200:
564  # decay in flight
565  return 'green'
566  else:
567  return 'red'
568  else:
569  return self.bkgHitColor
570 
571  def __str__(self):
572  """
573  Informal string summarizing the translation from seconday process codes to colors.
574  """
575 
576  return """
577 Legend:
578 blue->primary
579 green->secondary decay in flight
580 red->secondary other process
581 orange->beam background
582 """ \
583  + str(self.n_hits_by_secondary_type)
584 
585 
587 
588  """
589  Base class for Segments to color map functional objects.
590  """
591 
592 
593  bkgSegmentColor = 'orange'
594 
595  def __call__(self, iSegment, segment):
596  """
597  Function call to map a segments object from the local finder to a color.
598  """
599 
600  return self.bkgSegmentColor
601 
602 
604 
605  """
606  Segment to color map based on the matched MCTrackId
607  """
608 
609  def __call__(self, iSegment, segment):
610  """
611  Function call to map a segments object from the local finder to a color.
612  """
613 
614  mcSegmentLookUp = \
616 
617  mcTrackId = mcSegmentLookUp.getMCTrackId(segment)
618  if mcTrackId < 0:
619  return self.bkgSegmentColor
620  else:
621  iColor = mcTrackId % len(listColors)
622  color = listColors[iColor]
623  return color
624 
625 
627 
628  """
629  Segment to color map based on the forward or backward alignment relative to the match Monte Carlo track.
630  """
631 
632  def __call__(self, iSegment, segment):
633  """
634  Function call to map a segments object from the local finder to a color.
635  """
636 
637  mcSegmentLookUp = \
639 
640  # Just to look at matched segments
641  mcTrackId = mcSegmentLookUp.getMCTrackId(segment)
642  if mcTrackId < 0:
643  return self.bkgSegmentColor
644 
645  fbInfo = mcSegmentLookUp.isForwardOrBackwardToMCTrack(segment)
646  if fbInfo == 1:
647  return 'green'
648  elif fbInfo == -1 or fbInfo == 65535: # <- The root interface mistakes the signed enum value for an unsigned value
649  return 'red'
650  else:
651  print('Segment not orientable to match track')
652  return self.bkgSegmentColor
653 
654 
656 
657  """
658  Segment to color map by the in track id of the first hit.
659  """
660 
661  def __call__(self, iSegment, segment):
662  """
663  Function call to map a segments object from the local finder to a color.
664  """
665 
666  mcSegmentLookUp = \
668 
669  # Just to look at matched segments
670  firstInTrackId = mcSegmentLookUp.getFirstInTrackId(segment)
671 
672  if firstInTrackId < 0:
673  return self.bkgSegmentColor
674 
675  return inTrackIdToColor(firstInTrackId)
676 
677 
679 
680  """
681  Segment to color map by the in track id of the last hit.
682  """
683 
684  def __call__(self, iSegment, segment):
685  """
686  Function call to map a segments object from the local finder to a color.
687  """
688 
689  mcSegmentLookUp = \
691 
692  # Just to look at matched segments
693  lastInTrackId = mcSegmentLookUp.getLastInTrackId(segment)
694 
695  if lastInTrackId < 0:
696  return self.bkgSegmentColor
697 
698  return inTrackIdToColor(lastInTrackId)
699 
700 
702 
703  """
704  Segment to color map by the number of passed superlayers of the first hit.
705  """
706 
707  def __call__(self, iSegment, segment):
708  """
709  Function call to map a segments object from the local finder to a color.
710  """
711 
712  mcSegmentLookUp = \
714 
715  # Just to look at matched segments
716  firstNPassedSuperLayers = \
717  mcSegmentLookUp.getFirstNPassedSuperLayers(segment)
718 
719  if firstNPassedSuperLayers < 0:
720  return self.bkgSegmentColor
721 
722  return inTrackIdToColor(firstNPassedSuperLayers)
723 
724 
726 
727  """
728  Segment to color map by the number of passed superlayers of the last hit.
729  """
730 
731  def __call__(self, iSegment, segment):
732  """
733  Function call to map a segments object from the local finder to a color.
734  """
735 
736  mcSegmentLookUp = \
738 
739  # Just to look at matched segments
740  lastNPassedSuperLayers = \
741  mcSegmentLookUp.getLastNPassedSuperLayers(segment)
742 
743  if lastNPassedSuperLayers < 0:
744  return self.bkgSegmentColor
745 
746  return inTrackIdToColor(lastNPassedSuperLayers)
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.ZeroDriftLengthColorMap
Definition: attributemaps.py:122
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCPDGCodeColorMap.color_by_pdgcode
dictionary color_by_pdgcode
Dictionary to define the color for the most relevant.
Definition: attributemaps.py:467
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.ReassignedSecondaryMap
Definition: attributemaps.py:395
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.TakenFlagColorMap.__init__
def __init__(self)
Definition: attributemaps.py:146
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.CDCSegmentColorMap.__call__
def __call__(self, iSegment, segment)
Definition: attributemaps.py:595
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.WrongRLColorMap.__init__
def __init__(self)
Definition: attributemaps.py:206
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCParticleColorMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:432
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentFirstNPassedSuperLayersColorMap.__call__
def __call__(self, iSegment, segment)
Definition: attributemaps.py:707
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentFirstInTrackIdColorMap
Definition: attributemaps.py:655
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.CDCHitColorMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:114
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCPrimaryColorMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:540
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCPrimaryColorMap.__init__
def __init__(self)
Definition: attributemaps.py:532
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.ZeroDriftLengthColorMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:128
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentLastInTrackIdColorMap.__call__
def __call__(self, iSegment, segment)
Definition: attributemaps.py:684
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCParticleColorMap
Definition: attributemaps.py:417
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.ReassignedSecondaryMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:401
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCPDGCodeColorMap.__str__
def __str__(self)
Definition: attributemaps.py:507
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.BackgroundTagColorMap.bkgname_by_bkgtag
dictionary bkgname_by_bkgtag
dictionary of (tag, label) pairs
Definition: attributemaps.py:275
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentMCTrackIdColorMap.__call__
def __call__(self, iSegment, segment)
Definition: attributemaps.py:609
Belle2::PyStoreObj
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:69
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.PosFlagColorMap.__str__
def __str__(self)
Definition: attributemaps.py:257
Belle2::TrackFindingCDC::CDCMCSegment2DLookUp::getInstance
static const CDCMCSegment2DLookUp & getInstance()
Getter for the singletone instance.
Definition: CDCMCSegment2DLookUp.cc:23
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.ZeroDriftLengthStrokeWidthMap
Definition: attributemaps.py:87
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.ZeroDriftLengthStrokeWidthMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:93
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCPDGCodeColorMap.missing_pdg_color
string missing_pdg_color
Color for the case a particle a pdg code not mentioned in the color_by_pdgcode map.
Definition: attributemaps.py:484
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.CDCHitStrokeWidthMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:79
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.BackgroundTagColorMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:314
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentMCTrackIdColorMap
Definition: attributemaps.py:603
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.RLColorMap
Definition: attributemaps.py:170
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.WrongRLColorMap.__call__
def __call__(self, iCDCRecoHit, cdcRecoHit3D)
Definition: attributemaps.py:211
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCPDGCodeColorMap
Definition: attributemaps.py:460
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.TOFColorMap
Definition: attributemaps.py:378
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.CDCSegmentColorMap
Definition: attributemaps.py:586
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCPDGCodeColorMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:486
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.BackgroundTagColorMap
Definition: attributemaps.py:265
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.PosFlagColorMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:241
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentLastNPassedSuperLayersColorMap.__call__
def __call__(self, iSegment, segment)
Definition: attributemaps.py:731
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCParticleColorMap.color_by_mcparticleId
color_by_mcparticleId
Dictionary mapping the MCParticle ids to colors for consistent and contious use of the available colo...
Definition: attributemaps.py:430
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.BackgroundTagColorMap.__str__
def __str__(self)
Definition: attributemaps.py:331
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCPrimaryColorMap.n_hits_by_secondary_type
n_hits_by_secondary_type
Dictionary keeping track of the number of hits with a specific secondary process type.
Definition: attributemaps.py:538
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.TOFColorMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:384
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentLastInTrackIdColorMap
Definition: attributemaps.py:678
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.CDCSegmentColorMap.bkgSegmentColor
string bkgSegmentColor
Default color to be used.
Definition: attributemaps.py:593
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.CDCHitColorMap
Definition: attributemaps.py:105
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCPrimaryColorMap
Definition: attributemaps.py:526
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCSegmentIdColorMap
Definition: attributemaps.py:349
Belle2::BackgroundMetaData
Metadata information about the beam background file.
Definition: BackgroundMetaData.h:34
Belle2::TrackFindingCDC::CDCMCHitLookUp::getInstance
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.
Definition: CDCMCHitLookUp.cc:32
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.RLColorMap.__str__
def __str__(self)
Definition: attributemaps.py:192
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.CDCHitStrokeWidthMap
Definition: attributemaps.py:73
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentFirstNPassedSuperLayersColorMap
Definition: attributemaps.py:701
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.RLColorMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:176
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.TakenFlagColorMap
Definition: attributemaps.py:140
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.BackgroundTagColorMap.color_by_bkgtag
dictionary color_by_bkgtag
dictionary of (tag, color) pairs
Definition: attributemaps.py:295
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentFBInfoColorMap.__call__
def __call__(self, iSegment, segment)
Definition: attributemaps.py:632
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentLastNPassedSuperLayersColorMap
Definition: attributemaps.py:725
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCSegmentIdColorMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:355
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.TakenFlagColorMap.__call__
def __call__(self, iCDCHit, cdcHit)
Definition: attributemaps.py:154
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentFBInfoColorMap
Definition: attributemaps.py:626
Belle2::TrackFindingCDC::CDCWireHit
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:65
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.CDCHitColorMap.bkgHitColor
string bkgHitColor
Default color to be used.
Definition: attributemaps.py:112
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCPrimaryColorMap.__str__
def __str__(self)
Definition: attributemaps.py:571
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.MCParticleColorMap.__init__
def __init__(self)
Definition: attributemaps.py:423
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.PosFlagColorMap
Definition: attributemaps.py:235
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.TakenFlagColorMap.storedWireHits
storedWireHits
cached copy of the CDCWireHitVector
Definition: attributemaps.py:150
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.SegmentFirstInTrackIdColorMap.__call__
def __call__(self, iSegment, segment)
Definition: attributemaps.py:661
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.WrongRLColorMap
Definition: attributemaps.py:200
trackfindingcdc.cdcdisplay.svgdrawing.attributemaps.WrongRLColorMap.__str__
def __str__(self)
Definition: attributemaps.py:228