Belle II Software development
ReassignedSecondaryMap Class Reference
Inheritance diagram for ReassignedSecondaryMap:
CDCHitColorMap

Public Member Functions

 __call__ (self, iCDCHit, cdcHit)
 

Static Public Attributes

str bkgHitColor = 'orange'
 Default color to be used.
 

Detailed Description

CDCHit to color map indicating the reassignment to a different MCParticle.

Definition at line 398 of file attributemaps.py.

Member Function Documentation

◆ __call__()

__call__ ( self,
iCDCHit,
cdcHit )
Function call to map the CDCHit id and object to a color.

Definition at line 404 of file attributemaps.py.

404 def __call__(self, iCDCHit, cdcHit):
405 """
406 Function call to map the CDCHit id and object to a color.
407 """
408
409 relatedMCParticles = cdcHit.getRelationsWith('MCParticles')
410 if relatedMCParticles.size() == 0:
411 return self.bkgHitColor
412 else:
413 mcRelationWeight = relatedMCParticles.weight(0)
414 if mcRelationWeight > 0:
415 return 'green'
416 else:
417 return 'red'
418
419

Member Data Documentation

◆ bkgHitColor

str bkgHitColor = 'orange'
staticinherited

Default color to be used.

Definition at line 116 of file attributemaps.py.


The documentation for this class was generated from the following file: