File indexing completed on 2025-11-23 09:33:26
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Geometry/GeometryContext.hpp"
0013 #include "Acts/Plugins/ActSVG/SurfaceSvgConverter.hpp"
0014 #include "Acts/Plugins/ActSVG/SvgUtils.hpp"
0015 #include "Acts/Utilities/BinningType.hpp"
0016 #include "actsvg/core.hpp"
0017 #include "actsvg/meta.hpp"
0018
0019 #include <map>
0020 #include <memory>
0021 #include <tuple>
0022
0023 namespace Acts {
0024
0025 class Surface;
0026
0027 namespace Experimental {
0028 class Portal;
0029 class DetectorVolume;
0030 }
0031
0032 namespace Svg {
0033
0034 using ProtoPortal = actsvg::proto::portal<std::vector<Vector3>>;
0035 using ProtoLink = ProtoPortal::link;
0036
0037 namespace PortalConverter {
0038
0039
0040 struct Options {
0041
0042 SurfaceConverter::Options surfaceOptions;
0043
0044 double linkLength = 10.;
0045
0046 std::map<const Experimental::DetectorVolume*, unsigned int> volumeIndices;
0047 };
0048
0049
0050
0051
0052
0053
0054
0055
0056 ProtoPortal convert(const GeometryContext& gctx,
0057 const Experimental::Portal& portal,
0058 const PortalConverter::Options& portalOptions);
0059
0060 }
0061
0062 namespace View {
0063
0064
0065
0066
0067
0068
0069
0070 static inline actsvg::svg::object xy(const ProtoPortal& portal,
0071 const std::string& identification) {
0072 actsvg::views::x_y xyView;
0073 return actsvg::display::portal(identification, portal, xyView);
0074 }
0075
0076
0077
0078
0079
0080
0081
0082 static inline actsvg::svg::object zr(const ProtoPortal& portal,
0083 const std::string& identification) {
0084 actsvg::views::z_r zrView;
0085 return actsvg::display::portal(identification, portal, zrView);
0086 }
0087
0088 }
0089
0090 }
0091
0092 }