-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New function for creating misaligned detector views
Introduced a new function `misaligned_detector_view()` that makes a misaligned detector view by combining "static" buffers of the detector (volumes, surfaces, etc.) with a buffer of potentially misaligned transforms. The new mechanism is tested by a new unit test `detector_align_cuda`. A demonstration of the usage of this mechanism added to the `cuda/detector_construction` tutorial code
- Loading branch information
Vakho Tsulaia
committed
Dec 19, 2024
1 parent
93eb6ab
commit 1065c82
Showing
6 changed files
with
217 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** Detray library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2023-2024 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
namespace detray::detail { | ||
|
||
/// Creates detector view using "static" detector components and | ||
/// a "misaligned" transform store | ||
template <typename host_detector_type> | ||
typename host_detector_type::view_type misaligned_detector_view( | ||
typename host_detector_type::buffer_type& det_buffer, | ||
typename host_detector_type::transform_container::buffer_type& trf_buffer) { | ||
typename host_detector_type::view_type detview{ | ||
detray::get_data( | ||
detray::detail::get<0>(det_buffer.m_buffer)), // volumes | ||
detray::get_data( | ||
detray::detail::get<1>(det_buffer.m_buffer)), // surfaces | ||
detray::get_data(trf_buffer), // transforms | ||
detray::get_data(detray::detail::get<3>(det_buffer.m_buffer)), // masks | ||
detray::get_data( | ||
detray::detail::get<4>(det_buffer.m_buffer)), // materials | ||
detray::get_data( | ||
detray::detail::get<5>(det_buffer.m_buffer)), // accelerators | ||
detray::get_data(detray::detail::get<6>( | ||
det_buffer.m_buffer))}; // volume search grid | ||
return detview; | ||
} | ||
|
||
} // namespace detray::detail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters