15 #include <actsvg/core.hpp>
16 #include <actsvg/meta.hpp>
31 namespace GridConverter {
56 template <
typename gr
id_type>
58 const std::array<BinningValue, grid_type::DIM>& bValues,
64 auto axes = grid.axes();
68 std::vector<Acts::ActsScalar> edges0;
69 std::vector<Acts::ActsScalar> edges1;
72 if constexpr (grid_type::DIM == 1
u) {
74 axes[0]->getBoundaryType() == detail::AxisBoundaryType::Closed) {
76 edges1 = axes[0]->getBinEdges();
77 pGrid._type = actsvg::proto::grid::e_r_phi;
80 auto [boundRange, boundValue] = cOptions.
optionalBound.value();
81 if (boundValue ==
binR) {
83 edges0 = {boundRange[0
u], boundRange[1
u]};
88 if constexpr (grid_type::DIM == 2
u) {
90 edges0 = axes[0]->getBinEdges();
91 edges1 = axes[1]->getBinEdges();
92 if (bValues[0] ==
binPhi and bValues[1] ==
binZ) {
95 pGrid._type = actsvg::proto::grid::e_z_phi;
96 }
else if (bValues[0] ==
binPhi and bValues[1] ==
binR) {
99 pGrid._type = actsvg::proto::grid::e_r_phi;
100 }
else if (bValues[0] ==
binZ and bValues[1] ==
binPhi) {
102 pGrid._type = actsvg::proto::grid::e_z_phi;
103 }
else if (bValues[0] ==
binR and bValues[1] ==
binPhi) {
105 pGrid._type = actsvg::proto::grid::e_r_phi;
106 }
else if (bValues[0] ==
binX and bValues[1] ==
binY) {
108 pGrid._type = actsvg::proto::grid::e_x_y;
113 pGrid._edges_0 = std::vector<actsvg::scalar>(edges0.begin(), edges0.end());
114 pGrid._edges_1 = std::vector<actsvg::scalar>(edges1.begin(), edges1.end());
118 pGrid._stroke = stroke;