Skip to content

Commit

Permalink
Remove the member variable of jac_to_global from base stepper
Browse files Browse the repository at this point in the history
  • Loading branch information
beomki-yeo committed Sep 23, 2024
1 parent 91c0667 commit c53c423
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
7 changes: 0 additions & 7 deletions core/include/detray/propagator/actors/parameter_resetter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,13 @@ struct parameter_resetter : actor {
// Note: How is it possible with "range"???
const auto& mask = mask_group[index];

using frame_t = decltype(mask.local_frame());
using jacobian_engine = detail::jacobian_engine<frame_t>;

// Reset the free vector
stepping() = detail::bound_to_free_vector(trf3, mask,
stepping._bound_params);

// Reset the path length
stepping._s = 0;

// Reset jacobian coordinate transformation at the current surface
stepping._jac_to_global = jacobian_engine::bound_to_free_jacobian(
trf3, mask, stepping._bound_params);

// Reset jacobian transport to identity matrix
matrix_operator().set_identity(stepping._jac_transport);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct parameter_transporter : actor {
template <typename mask_group_t, typename index_t,
typename propagator_state_t>
DETRAY_HOST_DEVICE inline void operator()(
const mask_group_t& /*mask_group*/, const index_t& /*index*/,
const mask_group_t& mask_group, const index_t& index,
const transform3_type& trf3, propagator_state_t& propagation) {

using frame_t = typename mask_group_t::value_type::shape::
Expand Down Expand Up @@ -86,8 +86,10 @@ struct parameter_transporter : actor {
path_correction;

// Bound to free jacobian at the departure surface
const bound_to_free_matrix_t& bound_to_free_jacobian =
stepping._jac_to_global;
const auto& mask = mask_group[index];
const bound_to_free_matrix_t bound_to_free_jacobian =
jacobian_engine_t::bound_to_free_jacobian(
trf3, mask, stepping._bound_params);

stepping._full_jacobian = free_to_bound_jacobian * correction_term *
free_transport_jacobian *
Expand Down
7 changes: 0 additions & 7 deletions core/include/detray/propagator/base_stepper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ class base_stepper {
// A dummy barcode - should not be used
_bound_params.set_surface_link(geometry::barcode{});

// Set the bound to free jacobian
_jac_to_global = cf.bound_to_free_jacobian();

// Reset the path length
_s = 0.f;

Expand Down Expand Up @@ -116,10 +113,6 @@ class base_stepper {
free_matrix_type _jac_transport =
matrix_operator().template identity<e_free_size, e_free_size>();

/// bound-to-free jacobian from departure surface
bound_to_free_matrix_type _jac_to_global =
matrix_operator().template zero<e_free_size, e_bound_size>();

/// bound covariance
bound_track_parameters_type _bound_params;

Expand Down

0 comments on commit c53c423

Please sign in to comment.