Belle II Software development
SimHitIsBkgColorMap Class Reference

CDCHit to color map by CDCSimHit::getBackgroundTag(). More...

#include <HitColorMapping.h>

Inheritance diagram for SimHitIsBkgColorMap:
Mapping< const CDCHit >

Public Member Functions

std::string map (int index, const CDCHit &hit) override
 Function call to map the CDCHit id and object to a color.
 
virtual std::string info ()
 Informal string summarizing the translation from the object to the attribute value.
 

Detailed Description

CDCHit to color map by CDCSimHit::getBackgroundTag().

Definition at line 170 of file HitColorMapping.h.

Member Function Documentation

◆ info()

virtual std::string info ( )
inlinevirtualinherited

Informal string summarizing the translation from the object to the attribute value.

Reimplemented in RLColorMap, PosFlagColorMap, BackgroundTagColorMap, MCParticleColorMap, MCPDGCodeColorMap, MCPrimaryColorMap, and SimHitPDGCodeColorMap.

Definition at line 37 of file Mapping.h.

38 {
39 return "(no info available)\n";
40 }

◆ map()

std::string map ( int  index,
const CDCHit hit 
)
overridevirtual

Function call to map the CDCHit id and object to a color.

Reimplemented from Mapping< const CDCHit >.

Definition at line 367 of file HitColorMapping.cc.

368{
369 CDCSimHit* simHit = hit.getRelated<CDCSimHit>("CDCSimHits");
370 bool bkgTag = simHit->getBackgroundTag();
371 if (bkgTag) {
372 return "gray";
373 } else {
374 return "red";
375 }
376}
Example Detector.
Definition: CDCSimHit.h:21
virtual unsigned short getBackgroundTag() const
Get background tag.
Definition: SimHitBase.h:46

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