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/Geometry/GeometryContext.hpp"
0012 #include "Acts/Geometry/GeometryHierarchyMap.hpp"
0013 #include "Acts/Plugins/ActSVG/SvgUtils.hpp"
0014 #include <actsvg/core.hpp>
0015 #include <actsvg/meta.hpp>
0016
0017 #include <numbers>
0018
0019 namespace Acts {
0020
0021 class Layer;
0022
0023 namespace Svg {
0024
0025 using ProtoVolume = actsvg::proto::volume<std::vector<Vector3>>;
0026
0027 static std::array<double, 2> noLimitZ = {std::numeric_limits<double>::lowest(),
0028 std::numeric_limits<double>::max()};
0029
0030 static std::array<double, 2> noLimitPhi = {-std::numbers::pi, std::numbers::pi};
0031
0032 namespace LayerConverter {
0033
0034
0035 enum Sheets {
0036 eModuleInfo = 0,
0037 eGridInfo = 1,
0038 eCrossSectionXY = 2,
0039 eCrossSectionZR = 3
0040 };
0041
0042
0043 struct Options {
0044
0045 std::string name = "";
0046
0047 GeometryHierarchyMap<Style> surfaceStyles;
0048
0049 std::array<double, 2> zRange = noLimitZ;
0050
0051 std::array<double, 2> phiRange = noLimitPhi;
0052
0053 bool gridInfo = true;
0054 bool moduleInfo = true;
0055 bool projectionInfo = true;
0056
0057 bool labelProjection = false;
0058 double labelGauge = 0.;
0059 };
0060
0061
0062
0063
0064
0065
0066
0067
0068 std::vector<actsvg::svg::object> convert(const GeometryContext& gctx,
0069 const Layer& layer,
0070 const Options& cOptions);
0071
0072 }
0073
0074 }
0075
0076 }