Belle II Software  release-05-02-19
HitColorMapping.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: dschneider, Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/display/Mapping.h>
13 
14 #include <tracking/trackFindingCDC/rootification/StoreWrappedObjPtr.h>
15 
16 #include <map>
17 #include <vector>
18 #include <string>
19 
20 namespace Belle2 {
25  class CDCHit;
26 
27  namespace TrackFindingCDC {
28 
29  class CDCWireHit;
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 
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 
132  int m_iColor;
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 }
Belle2::TrackFindingCDC::PosFlagColorMap
CDCHit to color map by their assoziated CDCSimHit::getPosFlag property.
Definition: HitColorMapping.h:81
Belle2::TrackFindingCDC::MCParticleColorMap::MCParticleColorMap
MCParticleColorMap()
Constructor setting up a Monte Carlo id to color map which is continously filled as new during the ev...
Definition: HitColorMapping.cc:240
Belle2::TrackFindingCDC::MCParticleColorMap
CDCHit to color map by their assoziated MCParticle::getArrayId() property.
Definition: HitColorMapping.h:125
Belle2::TrackFindingCDC::ReassignedSecondaryMap
CDCHit to color map indicating the reassignment to a different MCParticle.
Definition: HitColorMapping.h:118
Belle2::TrackFindingCDC::BackgroundTagColorMap
CDCHit to color map by their assoziated CDCSimHit::getBackgroundTag property.
Definition: HitColorMapping.h:91
Belle2::CDCHit
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition: CDCHit.h:51
Belle2::TrackFindingCDC::PosFlagColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:112
Belle2::TrackFindingCDC::TakenFlagColorMap::TakenFlagColorMap
TakenFlagColorMap()
Constructor checking if the CDCWireHits caring the taken flag are accessable.
Definition: HitColorMapping.cc:71
Belle2::TrackFindingCDC::MCPDGCodeColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:274
Belle2::TrackFindingCDC::SimHitIsBkgColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:369
Belle2::TrackFindingCDC::ZeroDriftLengthColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:51
Belle2::TrackFindingCDC::MCParticleColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:256
Belle2::TrackFindingCDC::StoreWrappedObjPtr
This class is for convenience access and registration of objects, that are stored inside the StoreWra...
Definition: StoreWrappedObjPtr.h:40
Belle2::TrackFindingCDC::SimHitIsBkgColorMap
CDCHit to color map by CDCSimHit::getBackgroundTag().
Definition: HitColorMapping.h:180
Belle2::TrackFindingCDC::NLoopsColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map a segments object from the local finder to a color.
Definition: HitColorMapping.cc:380
Belle2::TrackFindingCDC::Mapping< const CDCHit >
Belle2::TrackFindingCDC::MCPDGCodeColorMap
CDCHit to color map by the associated MCParticle::getPDG()
Definition: HitColorMapping.h:150
Belle2::TrackFindingCDC::PosFlagColorMap::info
std::string info() override
Informal string summarizing the translation from CDCSimHit::getPosFlag variable to colors.
Definition: HitColorMapping.cc:125
Belle2::TrackFindingCDC::MCParticleColorMap::m_colors
std::vector< std::string > m_colors
List of colors to be cycled.
Definition: HitColorMapping.h:137
Belle2::TrackFindingCDC::ZeroDriftLengthColorMap
CDCHit to color map highlighting the CDCHits with 0 drift length.
Definition: HitColorMapping.h:50
Belle2::TrackFindingCDC::SimHitPDGCodeColorMap::info
std::string info() override
Informal string summarizing the translation from pdg codes to colors.
Definition: HitColorMapping.cc:349
Belle2::TrackFindingCDC::RLColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:94
Belle2::TrackFindingCDC::MCParticleColorMap::m_iColor
int m_iColor
Index of the color to be used next.
Definition: HitColorMapping.h:140
Belle2::TrackFindingCDC::RLColorMap::info
std::string info() override
Informal string summarizing the translation from right left passage variable to colors.
Definition: HitColorMapping.cc:107
Belle2::TrackFindingCDC::MCSegmentIdColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:181
Belle2::TrackFindingCDC::BackgroundTagColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:130
Belle2::TrackFindingCDC::MCParticleColorMap::info
std::string info() override
Informal string summarizing the translation from CDCSimHit::getBackgroundTag.
Definition: HitColorMapping.cc:247
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::TOFColorMap
CDCHit to color map by their assoziated CDCSimHit::getFlightTime.
Definition: HitColorMapping.h:108
Belle2::TrackFindingCDC::MCParticleColorMap::m_usedColors
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...
Definition: HitColorMapping.h:146
Belle2::TrackFindingCDC::TakenFlagColorMap
CDCHit to color map highlighting the CDCHits that posses the do not use flag.
Definition: HitColorMapping.h:57
Belle2::TrackFindingCDC::SimHitPDGCodeColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:336
Belle2::TrackFindingCDC::BackgroundTagColorMap::info
std::string info() override
Informal string summarizing the translation from CDCSimHit::getBackgroundTag.
Definition: HitColorMapping.cc:159
Belle2::TrackFindingCDC::TakenFlagColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:78
Belle2::TrackFindingCDC::TOFColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:202
Belle2::TrackFindingCDC::TOFColorMap::timeOfFlightToColor
std::string timeOfFlightToColor(const double timeOfFlight)
Translates the given floating point time of flight to a color.
Definition: HitColorMapping.cc:209
Belle2::TrackFindingCDC::MCPrimaryColorMap
CDCHit to color map by the isPrimary information as well as the secondary process type in case the pa...
Definition: HitColorMapping.h:160
Belle2::TrackFindingCDC::MCPrimaryColorMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:308
Belle2::TrackFindingCDC::ReassignedSecondaryMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a color.
Definition: HitColorMapping.cc:224
Belle2::TrackFindingCDC::TakenFlagColorMap::m_storedWireHits
StoreWrappedObjPtr< std::vector< CDCWireHit > > m_storedWireHits
Memory of the handle to the CDCWireHits on the DataStore.
Definition: HitColorMapping.h:67
Belle2::TrackFindingCDC::MCPrimaryColorMap::info
std::string info() override
Informal string summarizing the translation from seconday process codes to colors.
Definition: HitColorMapping.cc:328
Belle2::TrackFindingCDC::SimHitPDGCodeColorMap
CDCHit to color map by the associated CDCSimHit::getPDG().
Definition: HitColorMapping.h:170
Belle2::TrackFindingCDC::NLoopsColorMap
Segment to color map by the number of passed loops.
Definition: HitColorMapping.h:187
Belle2::TrackFindingCDC::MCPDGCodeColorMap::info
std::string info() override
Informal string summarizing the translation from pdg codes to colors.
Definition: HitColorMapping.cc:288
Belle2::TrackFindingCDC::MCSegmentIdColorMap
CDCHit to color map by their Monte Carlo segment id.
Definition: HitColorMapping.h:101
Belle2::TrackFindingCDC::ZeroDriftLengthStrokeWidthMap::map
std::string map(int index, const CDCHit &hit) override
Function call to map the CDCHit id and object to a stroke width.
Definition: HitColorMapping.cc:61