30 pLink._start = {position.x(), position.y(), position.z()};
31 pLink._end = {end3.x(), end3.y(), end3.z()};
32 auto linkIndexCandidate = portalOptions.
volumeIndices.find(dVolume);
33 if (linkIndexCandidate != portalOptions.
volumeIndices.end()) {
34 pLink._link_index = linkIndexCandidate->second;
49 std::vector<Acts::Svg::ProtoLink> convertMultiLink(
54 int sign) noexcept(
false) {
56 std::vector<Acts::Svg::ProtoLink> pLinks;
57 const auto&
volumes = multiLink.indexedUpdator.extractor.dVolumes;
58 const auto& casts = multiLink.indexedUpdator.casts;
63 if constexpr (decltype(multiLink.indexedUpdator)::grid_type::DIM == 1
u) {
67 const auto& boundaries =
68 multiLink.indexedUpdator.grid.axes()[0
u]->getBinEdges();
74 position =
Acts::Vector3(refC * std::cos(phi), refC * std::sin(phi),
80 position =
Acts::Vector3(r * std::cos(refC), r * std::sin(refC),
83 throw std::invalid_argument(
"convertMultiLink: incorrect binning.");
86 pLinks.push_back(makeProtoLink(portalOptions, position,
108 const auto surfaceTranslation = surfaceTransform.translation().eval();
109 const auto surfaceType =
surface.bounds().type();
110 const auto& boundValues =
surface.bounds().values();
111 switch (surfaceType) {
112 case SurfaceBounds::eCylinder: {
116 rPos =
Vector3(r * std::cos(aphi), r * std::sin(aphi),
117 surfaceTranslation.z());
119 case SurfaceBounds::eDisc: {
121 ActsScalar r = 0.5 * (boundValues[0
u] + boundValues[1
u]);
123 rPos =
Vector3(r * std::cos(aphi), r * std::sin(aphi),
124 surfaceTranslation.z());
127 rPos = surfaceTranslation;
130 rDir =
surface.normal(gctx, rPos);
136 for (
const auto& dvu : updators) {
138 const auto* instance = dvu.instance();
141 if (singleLink !=
nullptr) {
142 pPortal._volume_links.push_back(makeProtoLink(
143 portalOptions, rPos,
Vector3(sign * rDir), singleLink->dVolume));
147 if (multiLink !=
nullptr) {
148 auto pLinks = convertMultiLink(gctx, *multiLink,
surface, rPos,
149 portalOptions, sign);
151 pPortal._volume_links.insert(pPortal._volume_links.end(), pLinks.begin(),