25 auto vertices3D = surfaceHedron.
vertices;
26 pSurface._vertices = vertices3D;
32 if (planarBounds !=
nullptr) {
34 pSurface._vertices.reserve(vertices2D.size());
35 for (
const auto&
v2 : vertices2D) {
36 pSurface._vertices.push_back({
v2[0],
v2[1], 0.});
42 if (annulusBounds !=
nullptr) {
44 pSurface._vertices.reserve(vertices2D.size());
45 for (
const auto&
v2 : vertices2D) {
46 pSurface._vertices.push_back({
v2[0],
v2[1], 0.});
48 }
else if (surface.
type() == Acts::Surface::SurfaceType::Disc) {
51 if (surface.
bounds().
type() == Acts::SurfaceBounds::BoundsType::eDisc) {
53 actsvg::scalar ri =
static_cast<actsvg::scalar
>(boundValues[0]);
54 actsvg::scalar ro =
static_cast<actsvg::scalar
>(boundValues[1]);
55 pSurface._radii = {ri, ro};
57 static_cast<actsvg::scalar
>(boundValues[3] - boundValues[2]),
58 static_cast<actsvg::scalar>(boundValues[3] + boundValues[2])};
60 actsvg::scalar pl = pSurface._opening[0];
61 actsvg::scalar ph = pSurface._opening[1];
63 pSurface._vertices = {
64 {
static_cast<actsvg::scalar
>(ri * std::cos(pl)),
65 static_cast<actsvg::scalar>(ri * std::sin(pl)), 0.},
66 {
static_cast<actsvg::scalar
>(ro * std::cos(ph)),
67 static_cast<actsvg::scalar>(ro * std::sin(ph)), 0.},
68 {
static_cast<actsvg::scalar
>(ri * std::cos(pl)),
69 static_cast<actsvg::scalar>(ri * std::sin(pl)), 0.},
70 {
static_cast<actsvg::scalar
>(ro * std::cos(ph)),
71 static_cast<actsvg::scalar>(ro * std::sin(ph)), 0.}};
81 if (bType == Acts::SurfaceBounds::BoundsType::eRectangle) {
82 pSurface._type = ProtoSurface::type::e_rectangle;
84 pSurface._measures = {
85 static_cast<actsvg::scalar
>(0.5 * (boundValues[2] - boundValues[0])),
86 static_cast<actsvg::scalar
>(0.5 * (boundValues[3] - boundValues[1]))};
87 }
else if (bType == Acts::SurfaceBounds::BoundsType::eTrapezoid) {
88 pSurface._type = ProtoSurface::type::e_trapez;
90 pSurface._measures = {
static_cast<actsvg::scalar
>(boundValues[0]),
91 static_cast<actsvg::scalar>(boundValues[1]),
92 static_cast<actsvg::scalar
>(boundValues[2])};
93 }
else if (bType == Acts::SurfaceBounds::BoundsType::eDiamond) {
95 for (
const auto& bv : boundValues) {
96 pSurface._measures.push_back(static_cast<actsvg::scalar>(bv));
98 }
else if (bType == Acts::SurfaceBounds::BoundsType::eAnnulus) {
99 pSurface._type = ProtoSurface::type::e_trapez;
101 for (
const auto& bv : boundValues) {
102 pSurface._measures.push_back(static_cast<actsvg::scalar>(bv));
104 }
else if (bType == Acts::SurfaceBounds::BoundsType::eDisc) {
105 pSurface._type = ProtoSurface::type::e_disc;
107 actsvg::scalar ri =
static_cast<actsvg::scalar
>(boundValues[0]);
108 actsvg::scalar ro =
static_cast<actsvg::scalar
>(boundValues[1]);
109 actsvg::scalar zp =
static_cast<actsvg::scalar
>(surface.
center(gctx).z());
110 pSurface._radii = {ri, ro};
111 pSurface._zparameters = {zp, zp};
112 pSurface._opening = {
113 static_cast<actsvg::scalar
>(boundValues[3] - boundValues[2]),
114 static_cast<actsvg::scalar>(boundValues[3] + boundValues[2])};
116 for (
const auto& bv : boundValues) {
117 pSurface._measures.push_back(static_cast<actsvg::scalar>(bv));
122 pSurface._fill._fc = {