Skip to content

Commit 8c39659

Browse files
Update detray to version 0.99.0 (#1025)
This commit updates detray to version 0.99.0, and makes the appropriate changes as provided by Joana. Co-authored-by: Joana Niermann <[email protected]>
2 parents 21b8216 + 919b4bc commit 8c39659

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

extern/detray/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ message( STATUS "Building Detray as part of the TRACCC project" )
1313

1414
# Declare where to get Detray from.
1515
set( TRACCC_DETRAY_SOURCE
16-
"URL;https://github.com/acts-project/detray/archive/refs/tags/v0.98.0.tar.gz;URL_MD5;0de44d53f8d5fb31a2d74071f4333abc"
16+
"URL;https://github.com/acts-project/detray/archive/refs/tags/v0.99.0.tar.gz;URL_MD5;ee3bf6a61e923d364ee5111f237f1fe2"
1717
CACHE STRING "Source for Detray, when built as part of this project" )
1818
mark_as_advanced( TRACCC_DETRAY_SOURCE )
1919
FetchContent_Declare( Detray SYSTEM ${TRACCC_DETRAY_SOURCE} )

simulation/include/traccc/simulation/smearing_writer.hpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
// Detray core include(s).
2121
#include <detray/propagator/base_actor.hpp>
22+
#include <detray/utils/concepts.hpp>
2223

2324
// DFE include(s).
2425
#include <dfe/dfe_io_dsv.hpp>
@@ -102,13 +103,20 @@ struct smearing_writer : detray::actor {
102103

103104
struct measurement_kernel {
104105

105-
template <typename mask_group_t, typename index_t>
106+
template <typename mask_group_t, typename index_range_t>
106107
inline void operator()(
107-
const mask_group_t& mask_group, const index_t& index,
108+
const mask_group_t& mask_group, const index_range_t& index,
108109
const traccc::bound_track_parameters<algebra_type>& bound_params,
109110
smearer_t& smearer, io::csv::measurement& iomeas) const {
110-
111-
const auto& mask = mask_group[index];
111+
using mask_t = typename mask_group_t::value_type;
112+
113+
mask_t mask;
114+
if constexpr (detray::concepts::interval<index_range_t>) {
115+
// The measurement smearer only needs to deduce the mask type
116+
mask = mask_group[index.lower()];
117+
} else {
118+
mask = mask_group[index];
119+
}
112120

113121
smearer(mask, smearer.get_offset(), bound_params, iomeas);
114122
}

0 commit comments

Comments
 (0)