Belle II Software development
HitColorMapping.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/Mapping.h>
11
12#include <tracking/trackingUtilities/rootification/StoreWrappedObjPtr.h>
13
14#include <map>
15#include <vector>
16#include <string>
17
18namespace Belle2 {
23 class CDCHit;
24
25 namespace TrackingUtilities {
26 class CDCWireHit;
27 }
28
29 namespace TrackFindingCDC {
30
32 class ZeroDriftLengthStrokeWidthMap : public Mapping<const CDCHit> {
33 public:
35 std::string map(int index, const CDCHit& hit) override;
36 };
37
39 using HitColorMapping = Mapping<const CDCHit>;
40
42 class ZeroDriftLengthColorMap : public HitColorMapping {
43 public:
45 std::string map(int index, const CDCHit& hit) override;
46 };
47
49 class TakenFlagColorMap : public HitColorMapping {
50 public:
53
55 std::string map(int index, const CDCHit& hit) override;
56
57 private:
60 };
61
63 class RLColorMap : public HitColorMapping {
64 public:
66 std::string map(int index, const CDCHit& hit) override;
67
69 std::string info() override;
70 };
71
73 class PosFlagColorMap : public HitColorMapping {
74 public:
76 std::string map(int index, const CDCHit& hit) override;
77
79 std::string info() override;
80 };
81
83 class BackgroundTagColorMap : public HitColorMapping {
84 public:
86 std::string map(int index, const CDCHit& hit) override;
87
89 std::string info() override;
90 };
91
93 class MCSegmentIdColorMap : public HitColorMapping {
94 public:
96 std::string map(int index, const CDCHit& hit) override;
97 };
98
100 class TOFColorMap : public HitColorMapping {
101 public:
103 std::string map(int index, const CDCHit& hit) override;
104
106 std::string timeOfFlightToColor(const double timeOfFlight);
107 };
108
110 class ReassignedSecondaryMap : public HitColorMapping {
111 public:
113 std::string map(int index, const CDCHit& hit) override;
114 };
115
117 class MCParticleColorMap : public HitColorMapping {
118 public:
121
123 std::string map(int index, const CDCHit& hit) override;
124
126 std::string info() override;
127 private:
129 std::vector<std::string> m_colors;
130
133
138 std::map<int, std::string> m_usedColors;
139 };
140
142 class MCPDGCodeColorMap : public HitColorMapping {
143 public:
145 std::string map(int index, const CDCHit& hit) override;
146
148 std::string info() override;
149 };
150
152 class MCPrimaryColorMap : public HitColorMapping {
153 public:
155 std::string map(int index, const CDCHit& hit) override;
156
158 std::string info() override;
159 };
160
162 class SimHitPDGCodeColorMap : public HitColorMapping {
163 public:
165 std::string map(int index, const CDCHit& hit) override;
166
168 std::string info() override;
169 };
170
172 class SimHitIsBkgColorMap : public HitColorMapping {
173 public:
175 std::string map(int index, const CDCHit& hit) override;
176 };
177
179 class NLoopsColorMap: public HitColorMapping {
180 public:
182 std::string map(int index, const CDCHit& hit) override;
183 };
184 }
186}
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition CDCHit.h:40
CDCHit to color map by their associated CDCSimHit::getBackgroundTag property.
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
std::string info() override
Informal string summarizing the translation from CDCSimHit::getBackgroundTag.
CDCHit to color map by the associated MCParticle::getPDG()
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
std::string info() override
Informal string summarizing the translation from pdg codes to colors.
int m_iColor
Index of the color to be used next.
std::map< int, std::string > m_usedColors
Mapping of the already used colors by the MCParticle::getArrayId to map later CDCHits to the same col...
std::vector< std::string > m_colors
List of colors to be cycled.
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
std::string info() override
Informal string summarizing the translation from CDCSimHit::getBackgroundTag.
MCParticleColorMap()
Constructor setting up a Monte Carlo id to color map which is continuously filled as new during the e...
CDCHit to color map by the isPrimary information as well as the secondary process type in case the pa...
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
std::string info() override
Informal string summarizing the translation from secondary process codes to colors.
CDCHit to color map by their Monte Carlo segment id.
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Interface defining a mapping of objects to attribute values e.g. a color.
Definition Mapping.h:23
Segment to color map by the number of passed loops.
std::string map(int index, const CDCHit &hit) override
Function call to map a segments object from the local finder to a color.
CDCHit to color map by their associated CDCSimHit::getPosFlag property.
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
std::string info() override
Informal string summarizing the translation from CDCSimHit::getPosFlag variable to colors.
CDCHit to color map by their local right left passage information from Monte Carlo truth.
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
std::string info() override
Informal string summarizing the translation from right left passage variable to colors.
CDCHit to color map indicating the reassignment to a different MCParticle.
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
CDCHit to color map by CDCSimHit::getBackgroundTag().
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
CDCHit to color map by the associated CDCSimHit::getPDG().
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
std::string info() override
Informal string summarizing the translation from pdg codes to colors.
CDCHit to color map by their associated CDCSimHit::getFlightTime.
std::string timeOfFlightToColor(const double timeOfFlight)
Translates the given floating point time of flight to a color.
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
TakenFlagColorMap()
Constructor checking if the CDCWireHits caring the taken flag are accessible.
TrackingUtilities::StoreWrappedObjPtr< std::vector< TrackingUtilities::CDCWireHit > > m_storedWireHits
Memory of the handle to the CDCWireHits on the DataStore.
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
CDCHit to color map highlighting the CDCHits with 0 drift length.
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
CDCHit to stroke width map highlighting the CDCHits with 0 drift length.
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a stroke width.
Class representing a hit wire in the central drift chamber.
Definition CDCWireHit.h:58
This class is for convenience access and registration of objects, that are stored inside the StoreWra...
Abstract base class for different kinds of events.