Belle II Software development
SegmentMCTrackIdColorMap Class Reference

Segment to color map based on the matched MCTrackId. More...

#include <SegmentColorMapping.h>

Inheritance diagram for SegmentMCTrackIdColorMap:
Mapping< T >

Public Member Functions

 SegmentMCTrackIdColorMap ()
 Constructor.
 
std::string map (int index, const CDCSegment2D &segment) override
 Function call to map a segments object from the local finder to a color.
 
virtual std::string map (int index, T &t)
 Main function returning an attribute value for an object at the given index.
 
virtual std::string info ()
 Informal string summarizing the translation from the object to the attribute value.
 

Private Attributes

std::vector< std::string > m_colors
 List of colors to be cycled through.
 

Detailed Description

Segment to color map based on the matched MCTrackId.

Definition at line 31 of file SegmentColorMapping.h.

Constructor & Destructor Documentation

◆ SegmentMCTrackIdColorMap()

Constructor.

Definition at line 28 of file SegmentColorMapping.cc.

30{
31}
static std::vector< std::string > getList()
Get a list of useful colors.
Definition: Colors.cc:15
std::vector< std::string > m_colors
List of colors to be cycled through.

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, SimHitPDGCodeColorMap, ConstantMapping< T >, CycleMapping< T >, CycleMapping< AObject >, RecoTrackMatchingStatusColorMap, and MCRecoTrackMatchingStatusColorMap.

Definition at line 37 of file Mapping.h.

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

◆ map() [1/2]

std::string map ( int  index,
const CDCSegment2D segment 
)
override

Function call to map a segments object from the local finder to a color.

Definition at line 33 of file SegmentColorMapping.cc.

35{
37 ITrackType mcTrackId = mcSegmentLookUp.getMCTrackId(&segment);
38
39 if (mcTrackId < 0) {
40 return c_bkgSegmentColor;
41 } else {
42 int m_iColor = mcTrackId % m_colors.size();
43 return m_colors[m_iColor];
44 }
45}
ITrackType getMCTrackId(const ACDCHitCollection *ptrHits) const
Getter for the Monte Carlo track id matched to this collection of hits.
Specialisation of the lookup for the truth values of two dimensional segments.
static const CDCMCSegment2DLookUp & getInstance()
Getter for the singletone instance.

◆ map() [2/2]

virtual std::string map ( int  index,
T &  t 
)
inlinevirtualinherited

Member Data Documentation

◆ m_colors

std::vector<std::string> m_colors
private

List of colors to be cycled through.

Definition at line 42 of file SegmentColorMapping.h.


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