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.
 
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 179 of file HitColorMapping.h.

Member Function Documentation

◆ info() [1/2]

virtual std::string info ( )
inlinevirtualinherited

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

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

Definition at line 37 of file Mapping.h.

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

◆ info() [2/2]

virtual std::string info ( )
inlinevirtualinherited

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

Reimplemented in BackgroundTagColorMap, MCParticleColorMap, MCPDGCodeColorMap, MCPrimaryColorMap, PosFlagColorMap, RLColorMap, 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 379 of file HitColorMapping.cc.

380{
381 const CDCMCHitLookUp& mcHitLookUp = mcHitLookUp.getInstance();
382
383 int nLoops = mcHitLookUp.getNLoops(&hit);
384
385 if (nLoops < 0) {
386 return c_bkgHitColor;
387 }
388 return Colors::getWheelColor(70 * nLoops);
389}
TrackingUtilities::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: