|
ACTS
Experiment-independent tracking
|
SVG generator for a detector and related entities. More...
#include <detray/plugins/svgtools/illustrator.hpp>
Public Member Functions | |
| illustrator (const detector_t &detector, const typename detector_t::name_map &name_map, const styling::style &style=detray::svgtools::styling::tableau_colorblind::style) | |
| std::string | det_name () const |
| template<typename view_t> | |
| auto | draw_detector (const view_t &view, const typename detector_t::geometry_context &gctx={}, const float r_length=1100.f, const float z_length=3100.f) const |
| Converts a detray detector to an svg. | |
| template<typename view_t, typename intersection_t> | |
| auto | draw_intersections (const std::string &prefix, const std::vector< intersection_t > &intersections, const typename detector_t::vector3_type dir, const view_t &view, const dindex_range highlight_idx={detail::invalid_value< dindex >(), detail::invalid_value< dindex >()}, const typename detector_t::geometry_context &gctx={}) const |
| Converts a collection of intersections to an svg. | |
| template<typename view_t, class trajectory_t, typename intersection_t> | |
| auto | draw_intersections_and_trajectory (const std::string &prefix, const std::vector< intersection_t > &intersections, const trajectory_t &trajectory, const view_t &view, typename detector_t::scalar_type max_path=500.f, const dindex_range highlight_idx={detail::invalid_value< dindex >(), detail::invalid_value< dindex >()}, const typename detector_t::geometry_context &gctx={}) const |
| Converts a trajectory and its intersections to an svg with a related coloring. | |
| template<typename view_t, concepts::point3D point_t> | |
| auto | draw_landmark (const std::string &prefix, const point_t &point, const view_t &view) const |
| Converts a point to an svg. | |
| template<typename view_t> | |
| auto | draw_surface (const dindex index, const view_t &view, const typename detector_t::geometry_context &gctx={}) const |
| Converts a single detray surface of the detector to an svg. | |
| template<typename view_t> | |
| auto | draw_surface_material (const dindex index, const view_t &view) const |
| Converts the material map of a single detray surface to an svg. | |
| template<detray::ranges::range range_t, typename view_t> | |
| auto | draw_surface_materials (const range_t &indices, const view_t &view) const |
| Converts the material of multiple detray surfaces to an svg. | |
| template<detray::ranges::range range_t, typename view_t> | |
| auto | draw_surfaces (const range_t &indices, const view_t &view, const typename detector_t::geometry_context &gctx={}) const |
| Converts a multiple of detray surfaces of the detector to an svg. | |
| template<typename view_t, typename point3_container> | |
| auto | draw_trajectory (const std::string &prefix, const point3_container &points, const view_t &view) const |
| Converts a trajectory to an svg. | |
| template<typename view_t, template< typename > class trajectory_t, concepts::algebra algebra_t> | |
| auto | draw_trajectory (const std::string &prefix, const trajectory_t< algebra_t > &trajectory, const dscalar< algebra_t > path, const view_t &view) const |
| Converts a trajectory to an svg. | |
| template<typename view_t> | |
| auto | draw_volume (const dindex index, const view_t &view, const typename detector_t::geometry_context &gctx={}) const |
| Converts a detray volume of the detector to an svg. | |
| template<typename view_t> | |
| auto | draw_volume (const std::string_view name, const view_t &view, const typename detector_t::geometry_context &gctx={}) const |
| Converts a detray volume of the detector to an svg. | |
| template<detray::ranges::range range_t, typename view_t> | |
| auto | draw_volumes (const range_t &volume_ids, const view_t &view, const typename detector_t::geometry_context &gctx={}) const |
| Converts multiple detray volumes of the detector to an svg. | |
| void | hide_eta_lines (bool toggle=true) |
| Toggle eta lines in detector rz-view. | |
| void | hide_grids (bool toggle=true) |
| Toggle surface grids. | |
| void | hide_material (bool toggle=true) |
| Toggle surface material. | |
| void | hide_passives (bool toggle=true) |
| Toggle passive surfaces. | |
| void | hide_portals (bool toggle=true) |
| Toggle portal surfaces. | |
| const detector_t::name_map & | names () |
| void | search_window (std::array< dindex, 2 > window) |
| Neighborhood search window for the grid display. | |
| void | show_info (bool toggle=true) |
| Toggle info boxes. | |
| styling::style & | style () |
| Access the illustrator style. | |
SVG generator for a detector and related entities.
Provides an easy interface for displaying typical objects in a detector. For more flexibility, use the tools in svgtools::conversion to convert detray objects to their respective proto object. Use functions in svgtools::meta::display and actsvg::display to display the proto objects.
| detray::svgtools::illustrator< detector_t >::illustrator | ( | const detector_t & | detector, |
| const typename detector_t::name_map & | name_map, | ||
| const styling::style & | style = detray::svgtools::styling::tableau_colorblind::style ) |
| detector | the detector |
| name_map | naming scheme of the detector |
| style | display style |
| std::string detray::svgtools::illustrator< detector_t >::det_name | ( | ) | const |
| auto detray::svgtools::illustrator< detector_t >::draw_detector | ( | const view_t & | view, |
| const typename detector_t::geometry_context & | gctx = {}, | ||
| const float | r_length = 1100.f, | ||
| const float | z_length = 3100.f ) const |
Converts a detray detector to an svg.
| view | the display view. |
| gctx | the geometry context. |
| r_length | radial extent used for eta-line overlays |
| z_length | longitudinal extent used for eta-line overlays |
| auto detray::svgtools::illustrator< detector_t >::draw_intersections | ( | const std::string & | prefix, |
| const std::vector< intersection_t > & | intersections, | ||
| const typename detector_t::vector3_type | dir, | ||
| const view_t & | view, | ||
| const dindex_range | highlight_idx = {detail::invalid_value<dindex>(), detail::invalid_value<dindex>()}, | ||
| const typename detector_t::geometry_context & | gctx = {} ) const |
Converts a collection of intersections to an svg.
| prefix | the id of the svg object. |
| intersections | the intersection collection. |
| dir | the direction of the trajectory. |
| view | the display view. |
| highlight_idx | inclusive range of highlighted intersection indices |
| gctx | the geometry context. |
| auto detray::svgtools::illustrator< detector_t >::draw_intersections_and_trajectory | ( | const std::string & | prefix, |
| const std::vector< intersection_t > & | intersections, | ||
| const trajectory_t & | trajectory, | ||
| const view_t & | view, | ||
| typename detector_t::scalar_type | max_path = 500.f, | ||
| const dindex_range | highlight_idx = {detail::invalid_value<dindex>(), detail::invalid_value<dindex>()}, | ||
| const typename detector_t::geometry_context & | gctx = {} ) const |
Converts a trajectory and its intersections to an svg with a related coloring.
| prefix | the id of the svg object. |
| intersections | the intersection record. |
| trajectory | the trajectory (eg. ray or helix). |
| view | the display view. |
| max_path | the maximal path length from trajectory origin. |
| highlight_idx | inclusive range of highlighted intersection indices |
| gctx | the geometry context. |
| auto detray::svgtools::illustrator< detector_t >::draw_landmark | ( | const std::string & | prefix, |
| const point_t & | point, | ||
| const view_t & | view ) const |
Converts a point to an svg.
| prefix | the id of the svg object. |
| point | the point. |
| view | the display view. |
| auto detray::svgtools::illustrator< detector_t >::draw_surface | ( | const dindex | index, |
| const view_t & | view, | ||
| const typename detector_t::geometry_context & | gctx = {} ) const |
Converts a single detray surface of the detector to an svg.
| index | the index of the surface in the detector. |
| view | the display view. |
| gctx | the geometry context. |
actsvg::svg::object of the detector's surface. | auto detray::svgtools::illustrator< detector_t >::draw_surface_material | ( | const dindex | index, |
| const view_t & | view ) const |
Converts the material map of a single detray surface to an svg.
| index | the index of the surface in the detector. |
| view | the display view. |
| auto detray::svgtools::illustrator< detector_t >::draw_surface_materials | ( | const range_t & | indices, |
| const view_t & | view ) const |
Converts the material of multiple detray surfaces to an svg.
| indices | the collection of surface indices in the detector to convert. |
| view | the display view. |
actsvg::svg::object of the surface's material maps. | auto detray::svgtools::illustrator< detector_t >::draw_surfaces | ( | const range_t & | indices, |
| const view_t & | view, | ||
| const typename detector_t::geometry_context & | gctx = {} ) const |
Converts a multiple of detray surfaces of the detector to an svg.
| indices | the collection of surface indices in the detector to convert. |
| view | the display view. |
| gctx | the geometry context. |
actsvg::svg::object of the detector's surfaces. | auto detray::svgtools::illustrator< detector_t >::draw_trajectory | ( | const std::string & | prefix, |
| const point3_container & | points, | ||
| const view_t & | view ) const |
Converts a trajectory to an svg.
| prefix | the id of the svg object. |
| points | ordered positions making up the trajectory |
| view | the display view. |
| auto detray::svgtools::illustrator< detector_t >::draw_trajectory | ( | const std::string & | prefix, |
| const trajectory_t< algebra_t > & | trajectory, | ||
| const dscalar< algebra_t > | path, | ||
| const view_t & | view ) const |
Converts a trajectory to an svg.
| prefix | the id of the svg object. |
| trajectory | the trajectory (eg. ray or helix). |
| path | maximal pathlength of along the trajectory. |
| view | the display view. |
actsvg::svg::object of the trajectory. | auto detray::svgtools::illustrator< detector_t >::draw_volume | ( | const dindex | index, |
| const view_t & | view, | ||
| const typename detector_t::geometry_context & | gctx = {} ) const |
Converts a detray volume of the detector to an svg.
| index | the index of the volume in the detector. |
| view | the display view. |
| gctx | the geometry context. |
actsvg::svg::object of the detector's volume. | auto detray::svgtools::illustrator< detector_t >::draw_volume | ( | const std::string_view | name, |
| const view_t & | view, | ||
| const typename detector_t::geometry_context & | gctx = {} ) const |
Converts a detray volume of the detector to an svg.
| name | the name of the volume. |
| view | the display view. |
| gctx | the geometry context. |
actsvg::svg::object of the detector's volume. | auto detray::svgtools::illustrator< detector_t >::draw_volumes | ( | const range_t & | volume_ids, |
| const view_t & | view, | ||
| const typename detector_t::geometry_context & | gctx = {} ) const |
Converts multiple detray volumes of the detector to an svg.
| volume_ids | the collection of volume indices or names in the detector to convert. |
| view | the display view. |
| gctx | the geometry context. |
actsvg::svg::object of the detector's volumes. | void detray::svgtools::illustrator< detector_t >::hide_eta_lines | ( | bool | toggle = true | ) |
Toggle eta lines in detector rz-view.
| toggle | true to hide eta lines |
| void detray::svgtools::illustrator< detector_t >::hide_grids | ( | bool | toggle = true | ) |
Toggle surface grids.
| toggle | true enables the named display option |
| void detray::svgtools::illustrator< detector_t >::hide_material | ( | bool | toggle = true | ) |
Toggle surface material.
| toggle | true to hide material overlays |
| void detray::svgtools::illustrator< detector_t >::hide_passives | ( | bool | toggle = true | ) |
Toggle passive surfaces.
| toggle | true enables the named display option |
| void detray::svgtools::illustrator< detector_t >::hide_portals | ( | bool | toggle = true | ) |
Toggle portal surfaces.
| toggle | true enables the named display option |
| const detector_t::name_map & detray::svgtools::illustrator< detector_t >::names | ( | ) |
| void detray::svgtools::illustrator< detector_t >::search_window | ( | std::array< dindex, 2 > | window | ) |
Neighborhood search window for the grid display.
| window | number of neighboring bins to include on each axis |
| void detray::svgtools::illustrator< detector_t >::show_info | ( | bool | toggle = true | ) |
Toggle info boxes.
| toggle | true to show information boxes |
| styling::style & detray::svgtools::illustrator< detector_t >::style | ( | ) |
Access the illustrator style.