Belle II Software development
SegmentColorMapping.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/display/ColorMapping.h>
11#include <tracking/trackFindingCDC/display/Mapping.h>
12
13#include <vector>
14#include <string>
15
16namespace Belle2 {
21 namespace TrackingUtilities {
22 class CDCSegment2D;
23 }
24 namespace TrackFindingCDC {
25
27 using SegmentColorMapping = Mapping<const TrackingUtilities::CDCSegment2D>;
28
31
33 class SegmentMCTrackIdColorMap : public SegmentColorMapping {
34
35 public:
38
40 std::string map(int index, const TrackingUtilities::CDCSegment2D& segment) override;
41
42 private:
44 std::vector<std::string> m_colors;
45 };
46
48 class SegmentFBInfoColorMap: public SegmentColorMapping {
49 public:
51 std::string map(int index, const TrackingUtilities::CDCSegment2D& segment) override;
52 };
53
55 class SegmentFirstInTrackIdColorMap : public SegmentColorMapping {
56 public:
58 std::string map(int index, const TrackingUtilities::CDCSegment2D& segment) override;
59 };
60
62 class SegmentLastInTrackIdColorMap: public SegmentColorMapping {
63 public:
65 std::string map(int index, const TrackingUtilities::CDCSegment2D& segment) override;
66 };
67
69 class SegmentFirstNPassedSuperLayersColorMap: public SegmentColorMapping {
70 public:
72 std::string map(int index, const TrackingUtilities::CDCSegment2D& segment) override;
73 };
74
76 class SegmentLastNPassedSuperLayersColorMap: public SegmentColorMapping {
77 public:
79 std::string map(int index, const TrackingUtilities::CDCSegment2D& segment) override;
80 };
81
82 }
84}
Class template for coloring objects in different Colors.
Interface defining a mapping of objects to attribute values e.g. a color.
Definition Mapping.h:23
Segment to color map based on the forward or backward alignment relative to the match Monte Carlo tra...
std::string map(int index, const TrackingUtilities::CDCSegment2D &segment) override
Function call to map a segments object from the local finder to a color.
Segment to color map by the in track id of the first hit.
std::string map(int index, const TrackingUtilities::CDCSegment2D &segment) override
Function call to map a segments object from the local finder to a color.
Segment to color map by the number of passed superlayers of the first hit.
std::string map(int index, const TrackingUtilities::CDCSegment2D &segment) override
Function call to map a segments object from the local finder to a color.
Segment to color map by the in track id of the last hit.
std::string map(int index, const TrackingUtilities::CDCSegment2D &segment) override
Function call to map a segments object from the local finder to a color.
Segment to color map by the number of passed superlayers of the last hit.
std::string map(int index, const TrackingUtilities::CDCSegment2D &segment) override
Function call to map a segments object from the local finder to a color.
std::string map(int index, const TrackingUtilities::CDCSegment2D &segment) override
Function call to map a segments object from the local finder to a color.
std::vector< std::string > m_colors
List of colors to be cycled through.
A reconstructed sequence of two dimensional hits in one super layer.
Abstract base class for different kinds of events.