File indexing completed on 2025-10-22 07:52:52
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/Utilities/BinningType.hpp"
0014 #include "ActsPlugins/ActSVG/SurfaceSvgConverter.hpp"
0015 #include "ActsPlugins/ActSVG/SvgUtils.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 }
0033
0034 namespace ActsPlugins::Svg {
0035
0036 using ProtoPortal = actsvg::proto::portal<std::vector<Acts::Vector3>>;
0037 using ProtoLink = ProtoPortal::link;
0038
0039 namespace PortalConverter {
0040
0041
0042 struct Options {
0043
0044 SurfaceConverter::Options surfaceOptions;
0045
0046 double linkLength = 10.;
0047
0048 std::map<const Acts::Experimental::DetectorVolume*, unsigned int>
0049 volumeIndices;
0050 };
0051
0052
0053
0054
0055
0056
0057
0058
0059 ProtoPortal convert(const Acts::GeometryContext& gctx,
0060 const Acts::Experimental::Portal& portal,
0061 const PortalConverter::Options& portalOptions);
0062
0063 }
0064
0065 namespace View {
0066
0067
0068
0069
0070
0071
0072
0073 static inline actsvg::svg::object xy(const ProtoPortal& portal,
0074 const std::string& identification) {
0075 actsvg::views::x_y xyView;
0076 return actsvg::display::portal(identification, portal, xyView);
0077 }
0078
0079
0080
0081
0082
0083
0084
0085 static inline actsvg::svg::object zr(const ProtoPortal& portal,
0086 const std::string& identification) {
0087 actsvg::views::z_r zrView;
0088 return actsvg::display::portal(identification, portal, zrView);
0089 }
0090
0091 }
0092
0093 }