12#include "detray/definitions/algebra.hpp"
13#include "detray/definitions/containers.hpp"
14#include "detray/geometry/surface_descriptor.hpp"
15#include "detray/utils/ranges.hpp"
18#include "detray/test/framework/types.hpp"
20namespace detray::test {
22enum class plane_mask_id :
unsigned int {
23 e_plane_rectangle2D = 0
u,
26enum class plane_material_id :
unsigned int {
27 e_plane_material_slab = 0
u,
35template <concepts::algebra algebra_t = test::algebra>
42 vector3_t z{vector::normalize(direction)};
43 vector3_t x = vector::normalize(
50 surfaces.reserve(distances.size());
51 transforms.reserve(distances.size());
53 for (
const auto [idx, d] : detray::views::enumerate(distances)) {
54 vector3_t t = d * direction;
55 transforms.emplace_back(t, z, x);
57 plane_mask_link_t mask_link{plane_mask_id::e_plane_rectangle2D, idx};
58 plane_material_link_t material_link{
59 plane_material_id::e_plane_material_slab, 0
u};
60 surfaces.emplace_back(idx, std::move(mask_link), std::move(material_link),
61 0u, surface_id::e_sensitive);
62 surfaces.back().set_index(idx);
65 return std::make_tuple(std::move(surfaces), std::move(transforms));
constexpr double u
atomic mass unit u
Definition Units.hpp:155
get_scalar_t< A, T > dscalar
Scalar type for algebra A and value type T.
Definition algebra.hpp:64
vecmem::vector< value_t > dvector
Vector container backed by vecmem.
Definition containers.hpp:34
detail::typed_index< id_t, index_t, value_t, id_mask, index_mask > dtyped_index
Link consisting of a type ID and an index.
Definition indexing.hpp:39
get_vector3D_t< A, T > dvector3D
Three-dimensional vector type for algebra A and value type T.
Definition algebra.hpp:80
get_transform3D_t< A, T > dtransform3D
Three-dimensional transform type for algebra A and value type T.
Definition algebra.hpp:84