12#include "detray/core/concepts.hpp"
13#include "detray/geometry/surface.hpp"
16#include "detray/plugins/svgtools/meta/proto/information_section.hpp"
19#include "actsvg/core.hpp"
20#include "actsvg/meta.hpp"
28namespace detray::svgtools::conversion {
31template <concepts::po
int3D po
int3_t>
32inline std::string point_to_string(point3_t point) {
33 std::stringstream stream;
34 stream << std::fixed << std::setprecision(2) <<
"(" <<
point[0] <<
", "
40template <concepts::detector detector_t>
41inline auto information_section(
42 const typename detector_t::geometry_context& context,
43 const detray::geometry::surface<detector_t>& d_surface) {
44 using point3_t =
typename detector_t::point3_type;
46 svgtools::meta::proto::information_section<point3_t> is;
47 is._title = d_surface.
is_portal() ?
"Portal" :
"Surface";
51 is._info = {
"Idx: " + std::to_string(d_surface.
index()),
52 point_to_string(position)};
53 is._position = position;
constexpr auto is_portal() const -> bool
Definition surface.hpp:158
constexpr auto centroid() const -> point3_type
Definition surface.hpp:221
constexpr auto transform(const context &ctx) const -> const transform3_type &
Definition surface.hpp:197
constexpr auto index() const -> dindex
Definition surface.hpp:124
actsvg::svg::object point(const Acts::Vector3 &pos, double size, const Style &style, unsigned int idx)
Write/create a 3D point in a given view.
Definition EventDataSvgConverter.hpp:56