Belle II Software development
SegmentFBInfoColorMap Class Reference

Segment to color map based on the forward or backward alignment relative to the match Monte Carlo track. More...

#include <SegmentColorMapping.h>

Inheritance diagram for SegmentFBInfoColorMap:
Mapping< T >

Public Member Functions

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.
 

Detailed Description

Segment to color map based on the forward or backward alignment relative to the match Monte Carlo track.

Definition at line 46 of file SegmentColorMapping.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, 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 47 of file SegmentColorMapping.cc.

49{
51 ITrackType mcTrackId = mcSegmentLookUp.getMCTrackId(&segment);
52
53 if (mcTrackId < 0) return c_bkgSegmentColor;
54 EForwardBackward fbInfo = mcSegmentLookUp.isForwardOrBackwardToMCTrack(&segment);
55 if (fbInfo == EForwardBackward::c_Forward) {
56 return "green";
57 } else if (fbInfo == EForwardBackward::c_Backward) {
58 return "red";
59 } else {
60 B2INFO("Segment not orientable to match track");
61 return c_bkgSegmentColor;
62 }
63}
EForwardBackward isForwardOrBackwardToMCTrack(const ACDCHitCollection *ptrHits) const
Returns the orientation of the collection of hits relative to its matched track.
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.
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.

◆ map() [2/2]

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

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