12#include "detray/core/concepts.hpp"
13#include "detray/definitions/algebra.hpp"
14#include "detray/definitions/math.hpp"
15#include "detray/geometry/surface.hpp"
27template <concepts::detector detector_t, concepts::po
int po
int_t>
29cos_angle(
const typename detector_t::geometry_context &ctx,
33 return math::fabs(vector::dot(dir, sf.
normal(ctx, loc)));
Facade for a detray detector surface.
Definition surface.hpp:36
constexpr auto normal(const context &ctx, const point_t &p) const -> vector3_type
Definition surface.hpp:239
Detray include(s).
Definition array_operators.hpp:18
get_scalar_t< A, T > dscalar
Scalar type for algebra A and value type T.
Definition algebra.hpp:64
constexpr dscalar< typename detector_t::algebra_type > cos_angle(const typename detector_t::geometry_context &ctx, geometry::surface< detector_t > sf, const dvector3D< typename detector_t::algebra_type > &dir, const point_t &loc)
Helper to get the incidence angle of a direction vector on a surface.
Definition geometry_utils.hpp:29
get_vector3D_t< A, T > dvector3D
Three-dimensional vector type for algebra A and value type T.
Definition algebra.hpp:80