Segment to color map based on the forward or backward alignment relative to the match Monte Carlo track.
More...
#include <SegmentColorMapping.h>
|
| std::string | map (int index, const TrackingUtilities::CDCSegment2D &segment) 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.
|
| |
Segment to color map based on the forward or backward alignment relative to the match Monte Carlo track.
Definition at line 48 of file SegmentColorMapping.h.
◆ info() [1/2]
| virtual std::string info |
( |
| ) |
|
|
inlinevirtualinherited |
Informal string summarizing the translation from the object to the attribute value.
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.
Definition at line 37 of file Mapping.h.
38 {
39 return "(no info available)\n";
40 }
◆ map()
Function call to map a segments object from the local finder to a color.
Reimplemented from Mapping< const TrackingUtilities::CDCSegment2D >.
Definition at line 48 of file SegmentColorMapping.cc.
50{
52 ITrackType mcTrackId = mcSegmentLookUp.
getMCTrackId(&segment);
53
54 if (mcTrackId < 0) return c_bkgSegmentColor;
56 if (fbInfo == EForwardBackward::c_Forward) {
57 return "green";
58 } else if (fbInfo == EForwardBackward::c_Backward) {
59 return "red";
60 } else {
61 B2INFO("Segment not orientable to match track");
62 return c_bkgSegmentColor;
63 }
64}
ITrackType getMCTrackId(const ACDCHitCollection *ptrHits) const
Getter for the Monte Carlo track id matched to this collection of hits.
TrackingUtilities::EForwardBackward isForwardOrBackwardToMCTrack(const ACDCHitCollection *ptrHits) const
Returns the orientation of the collection of hits relative to its matched track.
static const CDCMCSegment2DLookUp & getInstance()
Getter for the singletone instance.
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.
The documentation for this class was generated from the following files: