Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: Add separate navigation state #912

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions core/include/detray/geometry/detail/surface_descriptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 1 addition & 6 deletions core/include/detray/geometry/tracking_surface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading