Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split generic navigation state off from caching_navigator
Browse files Browse the repository at this point in the history
niermann999 committed Jan 13, 2025
1 parent 618a679 commit c9ddffa
Showing 17 changed files with 607 additions and 468 deletions.
7 changes: 7 additions & 0 deletions core/include/detray/geometry/detail/surface_descriptor.hpp
Original file line number Diff line number Diff line change
@@ -148,6 +148,13 @@ class surface_descriptor {
return m_material;
}

/// @returns true if the surface descriptor has a valid material link
DETRAY_HOST_DEVICE
constexpr auto has_material() const -> bool {
return (m_material.id() != material_link::id_type::e_none) &&
!m_material.is_invalid();
}

/// @returns true if the surface is a senstive detector module.
DETRAY_HOST_DEVICE
constexpr auto is_sensitive() const -> bool {
7 changes: 1 addition & 6 deletions core/include/detray/geometry/tracking_surface.hpp
Original file line number Diff line number Diff line change
@@ -141,12 +141,7 @@ class tracking_surface {

/// @returns true if the surface carries material.
DETRAY_HOST_DEVICE
constexpr auto has_material() const -> bool {
return m_desc.material().id() !=
static_cast<typename descr_t::material_link::id_type>(
detector_t::materials::id::e_none) &&
!m_desc.material().is_invalid();
}
constexpr bool has_material() const { return m_desc.has_material(); }

/// @returns the mask volume link
DETRAY_HOST_DEVICE
Loading

0 comments on commit c9ddffa

Please sign in to comment.