Belle II Software development
Styling.cc
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#include <tracking/trackFindingCDC/display/Styling.h>
9#include <tracking/trackFindingCDC/display/HitColorMapping.h>
10#include <tracking/trackFindingCDC/display/SegmentColorMapping.h>
11#include <tracking/trackFindingCDC/display/RecoTrackColorMapping.h>
12
13using namespace Belle2;
14using namespace TrackFindingCDC;
15
16std::unique_ptr<ChooseableRecoTrackStyling::ObjectMapping>
17ChooseableRecoTrackStyling::createMapping(const std::string& mappingName)
18{
19 if (mappingName == "ListColors") {
20 return std::make_unique<RecoTrackListColorsColorMap>();
21 } else if (mappingName == "MatchingStatus") {
22 return std::make_unique<RecoTrackMatchingStatusColorMap>();
23 } else if (mappingName == "MCMatchingStatus") {
24 return std::make_unique<MCRecoTrackMatchingStatusColorMap>();
25 } else {
26 return Super::createMapping(mappingName);
27 }
28}
29
30std::unique_ptr<ChooseableSegmentStyling::ObjectMapping>
31ChooseableSegmentStyling::createMapping(const std::string& mappingName)
32{
33 if (mappingName == "SegmentMCTrackIdColorMap") {
34 return std::make_unique<SegmentMCTrackIdColorMap>();
35 } else if (mappingName == "SegmentFBInfoColorMap") {
36 return std::make_unique<SegmentFBInfoColorMap>();
37 } else if (mappingName == "SegmentFirstInTrackIdColorMap") {
38 return std::make_unique<SegmentFirstInTrackIdColorMap>();
39 } else if (mappingName == "SegmentLastInTrackIdColorMap") {
40 return std::make_unique<SegmentLastInTrackIdColorMap>();
41 } else if (mappingName == "SegmentFirstNPassedSuperLayersColorMap") {
42 return std::make_unique<SegmentFirstNPassedSuperLayersColorMap>();
43 } else if (mappingName == "SegmentLastNPassedSuperLayersColorMap") {
44 return std::make_unique<SegmentLastNPassedSuperLayersColorMap>();
45 } else if (mappingName == "ListColors") {
46 return std::make_unique<SegmentListColorsColorMap>();
47 } else {
48 return Super::createMapping(mappingName);
49 }
50}
51
52std::unique_ptr<ChooseableHitStyling::ObjectMapping>
53ChooseableHitStyling::createMapping(const std::string& mappingName)
54{
55 if (mappingName == "ZeroDriftLengthColorMap") {
56 return std::make_unique<ZeroDriftLengthColorMap>();
57 } else if (mappingName == "ZeroDriftLengthStrokeWidthMap") {
58 return std::make_unique<ZeroDriftLengthStrokeWidthMap>();
59 } else if (mappingName == "TakenFlagColorMap") {
60 return std::make_unique<TakenFlagColorMap>();
61 } else if (mappingName == "RLColorMap") {
62 return std::make_unique<RLColorMap>();
63 } else if (mappingName == "PosFlagColorMap") {
64 return std::make_unique<PosFlagColorMap>();
65 } else if (mappingName == "BackgroundTagColorMap") {
66 return std::make_unique<BackgroundTagColorMap>();
67 } else if (mappingName == "MCSegmentIdColorMap") {
68 return std::make_unique<MCSegmentIdColorMap>();
69 } else if (mappingName == "TOFColorMap") {
70 return std::make_unique<TOFColorMap>();
71 } else if (mappingName == "ReassignedSecondaryMap") {
72 return std::make_unique<ReassignedSecondaryMap>();
73 } else if (mappingName == "MCParticleColorMap") {
74 return std::make_unique<MCParticleColorMap>();
75 } else if (mappingName == "MCPDGCodeColorMap") {
76 return std::make_unique<MCPDGCodeColorMap>();
77 } else if (mappingName == "MCPrimaryColorMap") {
78 return std::make_unique<MCPrimaryColorMap>();
79 } else if (mappingName == "SimHitPDGCodeColorMap") {
80 return std::make_unique<SimHitPDGCodeColorMap>();
81 } else if (mappingName == "SimHitIsBkgColorMap") {
82 return std::make_unique<SimHitIsBkgColorMap>();
83 } else if (mappingName == "NLoops") {
84 return std::make_unique<NLoopsColorMap>();
85 } else {
86 return Super::createMapping(mappingName);
87 }
88}
std::unique_ptr< ObjectMapping > createMapping(const std::string &mappingName) override
Method defining the available mapping names.
Definition: Styling.cc:53
std::unique_ptr< ObjectMapping > createMapping(const std::string &mappingName) override
Method defining the available mapping names.
Definition: Styling.cc:17
std::unique_ptr< ObjectMapping > createMapping(const std::string &mappingName) override
Method defining the available mapping names.
Definition: Styling.cc:31
virtual std::unique_ptr< ObjectMapping > createMapping(const std::string &mappingName)
Create a mapping for the object from a name.
Definition: Styling.h:136
Abstract base class for different kinds of events.