Belle II Software development
NLoopsColorMap Class Reference

Segment to color map by the number of passed loops. More...

#include <HitColorMapping.h>

Inheritance diagram for NLoopsColorMap:
Mapping< const CDCHit >

Public Member Functions

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

Detailed Description

Segment to color map by the number of passed loops.

Definition at line 177 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 a segments object from the local finder to a color.

Reimplemented from Mapping< const CDCHit >.

Definition at line 378 of file HitColorMapping.cc.

379{
380 const CDCMCHitLookUp& mcHitLookUp = mcHitLookUp.getInstance();
381
382 int nLoops = mcHitLookUp.getNLoops(&hit);
383
384 if (nLoops < 0) {
385 return c_bkgHitColor;
386 }
387 return Colors::getWheelColor(70 * nLoops);
388}
Interface class to the Monte Carlo information for individual hits.
Index getNLoops(const CDCHit *ptrHit) const
Returns the number of loops the track traversed until this hit.
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.
static std::string getWheelColor(int degree)
Get a color from the wheel of colors.
Definition: Colors.cc:71

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