From 16d1d72bdbaac8f28393a770eb99f5a224250452 Mon Sep 17 00:00:00 2001 From: Frederik Date: Wed, 18 Oct 2023 20:09:00 +0200 Subject: [PATCH] Minor updates --- .../include/detray/plugins/svgtools/conversion/grid.hpp | 8 ++++---- .../plugins/svgtools/conversion/intersection_record.hpp | 4 +--- .../include/detray/plugins/svgtools/utils/groups.hpp | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/svgtools/include/detray/plugins/svgtools/conversion/grid.hpp b/plugins/svgtools/include/detray/plugins/svgtools/conversion/grid.hpp index 3d6ffed04..645db0c54 100644 --- a/plugins/svgtools/include/detray/plugins/svgtools/conversion/grid.hpp +++ b/plugins/svgtools/include/detray/plugins/svgtools/conversion/grid.hpp @@ -65,7 +65,7 @@ auto r_phi_split(const std::vector& edges_rphi) { return std::tuple(edges_phi, r); } -/// @return returns the actsvg grid type and edge values for a detray cylinder +/// @returns the actsvg grid type and edge values for a detray cylinder /// grid. template auto cylinder2_grid_type_and_edges(const detector_t& detector, @@ -74,7 +74,7 @@ auto cylinder2_grid_type_and_edges(const detector_t& detector, auto edges_rphi = bin_edges(detector, link); auto edges_z = bin_edges(detector, link); auto [edges_phi, r] = r_phi_split(edges_rphi); - std::vector edges_r{0.f, r}; + std::vector edges_r{r, r}; if (std::is_same_v) { return std::tuple(actsvg::proto::grid::e_r_phi, edges_r, edges_phi); @@ -93,7 +93,7 @@ auto cylinder2_grid_type_and_edges(const detector_t& detector, std::vector{}); } -/// @return returns the actsvg grid type and edge values for a detray disc grid. +/// @returns the actsvg grid type and edge values for a detray disc grid. template auto disc_grid_type_and_edges(const detector_t& detector, const link_t& link, const view_t&) { @@ -109,7 +109,7 @@ auto disc_grid_type_and_edges(const detector_t& detector, const link_t& link, std::vector{}); } -/// @return returns the detray grids respective actsvg grid type and edge +/// @returns the detray grids respective actsvg grid type and edge /// values. template diff --git a/plugins/svgtools/include/detray/plugins/svgtools/conversion/intersection_record.hpp b/plugins/svgtools/include/detray/plugins/svgtools/conversion/intersection_record.hpp index 68ceb24c5..7344f3c4a 100644 --- a/plugins/svgtools/include/detray/plugins/svgtools/conversion/intersection_record.hpp +++ b/plugins/svgtools/include/detray/plugins/svgtools/conversion/intersection_record.hpp @@ -24,12 +24,10 @@ inline auto intersection_record(const container_t& points) { using p_intersection_record_t = svgtools::meta::proto::intersection_record; p_intersection_record_t p_ir; - std::vector landmarks; for (const auto& point : points) { const auto p_lm = svgtools::conversion::landmark(point); - landmarks.push_back(p_lm); + p_ir._landmarks.push_back(p_lm); } - p_ir._landmarks = landmarks; return p_ir; } diff --git a/plugins/svgtools/include/detray/plugins/svgtools/utils/groups.hpp b/plugins/svgtools/include/detray/plugins/svgtools/utils/groups.hpp index ae092d3ff..70b047b06 100644 --- a/plugins/svgtools/include/detray/plugins/svgtools/utils/groups.hpp +++ b/plugins/svgtools/include/detray/plugins/svgtools/utils/groups.hpp @@ -11,6 +11,7 @@ #include "actsvg/core.hpp" // System include(s) +#include #include namespace detray::svgtools::utils {