Skip to content

Commit d28875c

Browse files
author
Vakho Tsulaia
committed
Propagator actors: use geometry context from propagator state
... instead of constructing a fake one
1 parent 479223d commit d28875c

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

core/include/detray/propagator/actors/parameter_resetter.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,10 @@ struct parameter_resetter : actor {
6868
return;
6969
}
7070

71-
using geo_cxt_t =
72-
typename propagator_state_t::detector_type::geometry_context;
73-
const geo_cxt_t ctx{};
74-
7571
// Surface
7672
const auto sf = navigation.get_surface();
7773

78-
sf.template visit_mask<kernel>(sf.transform(ctx), sf.index(), stepping);
74+
sf.template visit_mask<kernel>(sf.transform(propagation._context), sf.index(), stepping);
7975
}
8076
};
8177

core/include/detray/propagator/actors/parameter_transporter.hpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ struct parameter_transporter : actor {
9898
}
9999

100100
using detector_type = typename propagator_state_t::detector_type;
101-
using geo_cxt_t = typename detector_type::geometry_context;
102-
const geo_cxt_t ctx{};
103101

104102
// Current Surface
105103
const auto sf = navigation.get_surface();
@@ -114,11 +112,11 @@ struct parameter_transporter : actor {
114112
stepping.prev_sf_index()};
115113

116114
const bound_to_free_matrix<algebra_t> bound_to_free_jacobian =
117-
prev_sf.bound_to_free_jacobian(ctx, stepping.bound_params());
115+
prev_sf.bound_to_free_jacobian(propagation._context, stepping.bound_params());
118116

119117
stepping.set_full_jacobian(
120118
sf.template visit_mask<get_full_jacobian_kernel>(
121-
sf.transform(ctx), bound_to_free_jacobian, propagation));
119+
sf.transform(propagation._context), bound_to_free_jacobian, propagation));
122120

123121
// Calculate surface-to-surface covariance transport
124122
const bound_matrix_t new_cov =
@@ -130,7 +128,7 @@ struct parameter_transporter : actor {
130128

131129
// Convert free to bound vector
132130
stepping.bound_params().set_parameter_vector(
133-
sf.free_to_bound_vector(ctx, stepping()));
131+
sf.free_to_bound_vector(propagation._context, stepping()));
134132

135133
// Set surface link
136134
stepping.bound_params().set_surface_link(sf.barcode());

core/include/detray/propagator/actors/pointwise_material_interactor.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ struct pointwise_material_interactor : actor {
130130
DETRAY_HOST_DEVICE inline void operator()(
131131
state &interactor_state, propagator_state_t &prop_state) const {
132132

133-
// @Todo: Make context part of propagation state
134-
using detector_type = typename propagator_state_t::detector_type;
135-
using geo_context_type = typename detector_type::geometry_context;
136-
137133
interactor_state.reset();
138134

139135
const auto &navigation = prop_state._navigation;
@@ -143,7 +139,7 @@ struct pointwise_material_interactor : actor {
143139

144140
auto &stepping = prop_state._stepping;
145141

146-
this->update(geo_context_type{}, stepping.particle_hypothesis(),
142+
this->update(prop_state._context, stepping.particle_hypothesis(),
147143
stepping.bound_params(), interactor_state,
148144
static_cast<int>(navigation.direction()),
149145
navigation.get_surface());

0 commit comments

Comments
 (0)