Belle II Software development
PosFlagColorMap Class Reference

CDCHit to color map by their assoziated CDCSimHit::getPosFlag property. More...

#include <HitColorMapping.h>

Inheritance diagram for PosFlagColorMap:
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.
 
std::string info () override
 Informal string summarizing the translation from CDCSimHit::getPosFlag variable to colors.
 

Detailed Description

CDCHit to color map by their assoziated CDCSimHit::getPosFlag property.

Definition at line 71 of file HitColorMapping.h.

Member Function Documentation

◆ info()

std::string info ( )
overridevirtual

Informal string summarizing the translation from CDCSimHit::getPosFlag variable to colors.

Reimplemented from Mapping< const CDCHit >.

Definition at line 123 of file HitColorMapping.cc.

124{
125 return "PosFlag variable of the related CDCSimHit: green <-> 0 (Right), red <-> 1 (Left), orange <-> determinable.\n";
126}

◆ 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 110 of file HitColorMapping.cc.

111{
112 CDCSimHit* simHit = hit.getRelated<CDCSimHit>("CDCSimHits");
113 int posFlag = simHit->getPosFlag();
114 if (posFlag == 0) {
115 return ("green"); // right
116 } else if (posFlag == 1) {
117 return ("red"); // left
118 } else {
119 return (c_bkgHitColor);
120 }
121}
Example Detector.
Definition: CDCSimHit.h:21
int getPosFlag() const
The method to get old left/right info.
Definition: CDCSimHit.h:223

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