-
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: misaligned_detector_view (in core/detail/alignment.hpp)
As the name suggests, this function makes a misaligned detector view by combining "static" buffers of the detector (volumes, surfaces, etc.) with a buffer of a potentially misaligned transform store
- Loading branch information
Vakho Tsulaia
committed
Dec 11, 2024
1 parent
cefce90
commit c005fc7
Showing
3 changed files
with
70 additions
and
3 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_trfstore_type> | ||
typename host_detector_type::view_type misaligned_detector_view( | ||
typename host_detector_type::buffer_type& det_buffer, | ||
typename host_trfstore_type::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