Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SvgDefaults.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SvgDefaults.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2022 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
#include "
Acts/Plugins/ActSVG/SvgUtils.hpp
"
12
#include <
Acts/Plugins/ActSVG/LayerSvgConverter.hpp
>
13
#include <
Acts/Plugins/ActSVG/TrackingGeometrySvgConverter.hpp
>
14
15
namespace
{
16
17
static
inline
Acts::Svg::Style
layerStyle() {
18
Acts::Svg::Style
lStyle;
19
lStyle.
fillColor
= {51, 153, 255};
20
lStyle.
fillOpacity
= 0.75;
21
lStyle.
highlightColor
= {255, 153, 51};
22
lStyle.
highlights
= {
"mouseover"
,
"mouseout"
};
23
lStyle.
strokeColor
= {25, 25, 25};
24
lStyle.
strokeWidth
= 0.5;
25
lStyle.
nSegments
= 72
u
;
26
27
return
lStyle;
28
}
29
30
static
inline
Acts::Svg::Style
infoStyle() {
31
Acts::Svg::Style
iStyle;
32
iStyle.
fillColor
= {0, 0, 180};
33
iStyle.
fillOpacity
= 0.8;
34
iStyle.
highlights
= {};
35
iStyle.
fontSize
= 40.;
36
return
iStyle;
37
}
38
39
static
inline
Acts::Svg::Style
backgroundStyle() {
40
Acts::Svg::Style
bgStyle;
41
bgStyle.
fillColor
= {55, 55, 55};
42
bgStyle.
fillOpacity
= 0.50;
43
bgStyle.
highlights
= {};
44
bgStyle.
strokeColor
= {25, 25, 25};
45
bgStyle.
strokeWidth
= 0.5;
46
bgStyle.
nSegments
= 72
u
;
47
return
bgStyle;
48
}
49
50
static
inline
Acts::Svg::Style
pointStyle() {
51
Acts::Svg::Style
pStyle;
52
pStyle.
fillColor
= {200, 0, 0};
53
pStyle.
fillOpacity
= 1.0;
54
pStyle.
highlightColor
= {0, 200, 0};
55
pStyle.
highlights
= {
"mouseover"
,
"mouseout"
};
56
pStyle.
strokeColor
= {0, 0, 0};
57
pStyle.
strokeWidth
= 0.5;
58
pStyle.
nSegments
= 72
u
;
59
60
return
pStyle;
61
}
62
63
static
inline
Acts::Svg::TrackingGeometryConverter::Options
64
trackingGeometryOptions() {
65
Acts::GeometryIdentifier
geoID(0);
66
67
Acts::Svg::LayerConverter::Options
lOptions;
68
69
lOptions.
name
=
"layer"
;
70
lOptions.
surfaceStyles
=
71
Acts::GeometryHierarchyMap<Acts::Svg::Style>
({{geoID, layerStyle()}});
72
73
Acts::Svg::TrackingGeometryConverter::Options
tgOptions;
74
tgOptions.prefix =
""
;
75
tgOptions.layerOptions =
76
Acts::GeometryHierarchyMap<Acts::Svg::LayerConverter::Options>
(
77
{{geoID, lOptions}});
78
79
return
tgOptions;
80
}
81
82
static
inline
Acts::Svg::TrackingGeometryConverter::Options
83
backgroundGeometryOptions() {
84
Acts::GeometryIdentifier
geoID(0);
85
86
Acts::Svg::LayerConverter::Options
lOptions;
87
88
lOptions.
name
=
"layer"
;
89
lOptions.
surfaceStyles
=
Acts::GeometryHierarchyMap<Acts::Svg::Style>
(
90
{{geoID, backgroundStyle()}});
91
lOptions.
moduleInfo
=
false
;
92
lOptions.
gridInfo
=
false
;
93
lOptions.
zRange
= {-100, 100};
94
lOptions.
phiRange
= {-0.2, 0.2};
95
96
Acts::Svg::TrackingGeometryConverter::Options
tgOptions;
97
tgOptions.
prefix
=
""
;
98
tgOptions.
layerOptions
=
99
Acts::GeometryHierarchyMap<Acts::Svg::LayerConverter::Options>
(
100
{{geoID, lOptions}});
101
102
return
tgOptions;
103
}
104
105
}
// namespace
106
107
namespace
ActsExamples {
108
109
static
Acts::Svg::Style
s_layerStyle
= layerStyle();
110
111
static
Acts::Svg::Style
s_pointStyle
= pointStyle();
112
113
static
Acts::Svg::Style
s_infoStyle
= infoStyle();
114
115
static
Acts::Svg::TrackingGeometryConverter::Options
s_trackingGeometryOptions
=
116
trackingGeometryOptions();
117
118
static
Acts::Svg::TrackingGeometryConverter::Options
119
s_backgroundTrackingGeometryOptions
= backgroundGeometryOptions();
120
121
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Io
Svg
include
ActsExamples
Io
Svg
SvgDefaults.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:39
using
1.8.2 with
sPHENIX GitHub integration