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
GeometryView3D.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file GeometryView3D.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2020 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/Definitions/Algebra.hpp
"
12
#include "
Acts/Geometry/AbstractVolume.hpp
"
13
#include "
Acts/Geometry/GeometryContext.hpp
"
14
#include "
Acts/Visualization/IVisualization3D.hpp
"
15
#include "
Acts/Visualization/ViewConfig.hpp
"
16
17
#include <string>
18
19
namespace
Acts {
20
21
class
Layer;
22
class
Surface
;
23
class
SurfaceArray;
24
class
TrackingVolume;
25
struct
Polyhedron
;
26
class
AbstractVolume;
27
class
IVisualization3D;
28
29
namespace
Experimental {
30
class
DetectorVolume;
31
class
Portal;
32
}
// namespace Experimental
33
34
static
ViewConfig
s_viewSensitive
=
ViewConfig
({0, 180, 240});
35
static
ViewConfig
s_viewPassive
=
ViewConfig
({240, 280, 0});
36
static
ViewConfig
s_viewVolume
=
ViewConfig
({220, 220, 0});
37
static
ViewConfig
s_viewGrid
=
ViewConfig
({220, 0, 0});
38
static
ViewConfig
s_viewLine
=
ViewConfig
({0, 0, 220});
39
40
struct
GeometryView3D
{
46
static
void
drawPolyhedron
(
IVisualization3D
& helper,
47
const
Polyhedron
& polyhedron,
48
const
ViewConfig
& viewConfig =
s_viewVolume
);
49
57
static
void
drawSurface
(
IVisualization3D
& helper,
const
Surface
&
surface
,
58
const
GeometryContext
&
gctx
,
59
const
Transform3
&
transform
= Transform3::Identity(),
60
const
ViewConfig
& viewConfig =
s_viewSensitive
);
61
72
static
void
drawSurfaceArray
(
73
IVisualization3D
& helper,
const
SurfaceArray
& surfaceArray,
74
const
GeometryContext
& gctx,
75
const
Transform3
&
transform
= Transform3::Identity(),
76
const
ViewConfig
& sensitiveConfig =
s_viewSensitive
,
77
const
ViewConfig
& passiveConfig =
s_viewPassive
,
78
const
ViewConfig
& gridConfig =
s_viewGrid
,
79
const
std::string
&
outputDir
=
"."
);
80
88
static
void
drawVolume
(
IVisualization3D
& helper,
const
AbstractVolume
& volume,
89
const
GeometryContext
& gctx,
90
const
Transform3
&
transform
= Transform3::Identity(),
91
const
ViewConfig
& viewConfig =
s_viewVolume
);
92
101
static
void
drawPortal
(
IVisualization3D
& helper,
102
const
Experimental::Portal
& portal,
103
const
GeometryContext
& gctx,
104
const
Transform3
&
transform
= Transform3::Identity(),
105
const
ViewConfig
& connected =
ViewConfig
({0, 255, 0}),
106
const
ViewConfig
& disconnected =
ViewConfig
({255, 0,
107
0}));
108
118
static
void
drawDetectorVolume
(
119
IVisualization3D
& helper,
120
const
Acts::Experimental::DetectorVolume
& volume,
121
const
GeometryContext
& gctx,
122
const
Transform3
&
transform
= Transform3::Identity(),
123
const
ViewConfig
& connected =
ViewConfig
({0, 255, 0}),
124
const
ViewConfig
& unconnected =
ViewConfig
({255, 0, 0}),
125
const
ViewConfig
& viewConfig =
s_viewSensitive
);
126
136
static
void
drawLayer
(
IVisualization3D
& helper,
const
Layer
&
layer
,
137
const
GeometryContext
& gctx,
138
const
ViewConfig
& layerConfig =
s_viewPassive
,
139
const
ViewConfig
& sensitiveConfig =
s_viewSensitive
,
140
const
ViewConfig
& gridConfig =
s_viewGrid
,
141
const
std::string
&
outputDir
=
"."
);
142
157
static
void
drawTrackingVolume
(
158
IVisualization3D
& helper,
const
TrackingVolume
& tVolume,
159
const
GeometryContext
& gctx,
160
const
ViewConfig
& containerView =
s_viewVolume
,
161
const
ViewConfig
& volumeView =
s_viewVolume
,
162
const
ViewConfig
& layerView =
s_viewPassive
,
163
const
ViewConfig
& sensitiveView =
s_viewSensitive
,
164
const
ViewConfig
& gridView =
s_viewGrid
,
bool
writeIt =
true
,
165
const
std::string
& tag =
""
,
const
std::string
&
outputDir
=
"."
);
166
176
static
void
drawSegmentBase
(
IVisualization3D
& helper,
const
Vector3
&
start
,
177
const
Vector3
&
end
,
int
arrows = 0,
178
double
arrowLength = 0.,
double
arrowWidth = 0.,
179
const
ViewConfig
& viewConfig =
s_viewLine
);
180
187
static
void
drawSegment
(
IVisualization3D
& helper,
const
Vector3
& start,
188
const
Vector3
& end,
189
const
ViewConfig
& viewConfig =
s_viewLine
);
190
199
static
void
drawArrowBackward
(
IVisualization3D
& helper,
const
Vector3
& start,
200
const
Vector3
& end,
double
arrowLength,
201
double
arrowWidth,
202
const
ViewConfig
& viewConfig =
s_viewLine
);
203
212
static
void
drawArrowForward
(
IVisualization3D
& helper,
const
Vector3
& start,
213
const
Vector3
& end,
double
arrowLength,
214
double
arrowWidth,
215
const
ViewConfig
& viewConfig =
s_viewLine
);
216
225
static
void
drawArrowsBoth
(
IVisualization3D
& helper,
const
Vector3
& start,
226
const
Vector3
& end,
double
arrowLength,
227
double
arrowWidth,
228
const
ViewConfig
& viewConfig =
s_viewLine
);
229
};
230
231
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
Visualization
GeometryView3D.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:35
using
1.8.2 with
sPHENIX GitHub integration