12#include "detray/definitions/algebra.hpp"
13#include "detray/definitions/detail/qualifiers.hpp"
14#include "detray/definitions/math.hpp"
15#include "detray/material/material.hpp"
16#include "detray/navigation/policies.hpp"
17#include "detray/propagator/base_stepper.hpp"
18#include "detray/utils/logging.hpp"
28 :
public base_stepper<algebra_t, constraint_t, policy_t, inspector_t> {
51 template <std::
size_t ROWS, std::
size_t COLS>
57 static constexpr const stepping::id
id = stepping::id::e_linear;
63 using base_state::base_state;
68 auto& track = (*this)();
69 track.set_pos(track.pos() + track.dir() * this->step_size());
71 this->update_path_lengths(this->step_size());
77 DETRAY_VERBOSE_HOST_DEVICE(
"Advance Jacobian");
84 this->step_size() * matrix::identity<matrix_type<3, 3>>();
85 getter::set_block(D, dxdn, e_free_pos0, e_free_dir0);
89 this->transport_jacobian() = D * this->transport_jacobian();
119 stepping.run_inspector(cfg,
"Step skipped (Overlap): ", dist_to_next);
124 stepping.set_step_size(dist_to_next);
126 DETRAY_VERBOSE_HOST_DEVICE(
"Take step: %f mm", stepping.step_size());
130 stepping.constraints().template size<>(stepping.direction());
131 math::fabs(stepping.step_size()) > math::fabs(max_step)) {
133 stepping.run_inspector(cfg,
"Before constraint: ", dist_to_next);
135 stepping.set_step_size(max_step);
139 stepping.advance_track();
143 stepping.advance_jacobian();
147 stepping.count_trials();
150 stepping.run_inspector(cfg,
"Step complete: ", dist_to_next);
Base stepper implementation.
Definition base_stepper.hpp:49
bound_track_parameters< algebra_t > bound_track_parameters_type
Definition base_stepper.hpp:57
free_track_parameters< algebra_t > free_track_parameters_type
Definition base_stepper.hpp:55
Straight line stepper implementation.
Definition line_stepper.hpp:28
bool step(const scalar_type dist_to_next, state &stepping, const stepping::config &cfg, const bool=true, const material< scalar_type > *=nullptr) const
Take a step, regulared by a constrained step.
Definition line_stepper.hpp:113
dscalar< algebra_t > scalar_type
Scalar type for step lengths and material derivatives.
Definition line_stepper.hpp:39
static constexpr bool uses_gradient
This stepper has a nonzero position-direction transport gradient.
Definition line_stepper.hpp:34
algebra_t algebra_type
Algebra backend used by the stepper.
Definition line_stepper.hpp:37
dmatrix< algebra_t, ROWS, COLS > matrix_type
Matrix type with dimensions selected by the template arguments.
Definition line_stepper.hpp:52
typename base_type::free_track_parameters_type free_track_parameters_type
Free track parameter representation.
Definition line_stepper.hpp:45
typename base_type::bound_track_parameters_type bound_track_parameters_type
Bound track parameter representation.
Definition line_stepper.hpp:48
dvector3D< algebra_t > vector3_type
Three-dimensional vector type.
Definition line_stepper.hpp:41
dtransform3D< algebra_t > transform3_type
Three-dimensional transform type.
Definition line_stepper.hpp:43
Algebra plugin concept.
Definition concepts.hpp:147
Detray include(s).
Definition array_operators.hpp:18
get_scalar_t< A, T > dscalar
Scalar type for algebra A and value type T.
Definition algebra.hpp:64
dmatrix< algebra_t, e_free_size, e_free_size > free_matrix
Covariance matrix type for free track parametrization.
Definition track_parametrization.hpp:73
get_vector3D_t< A, T > dvector3D
Three-dimensional vector type for algebra A and value type T.
Definition algebra.hpp:80
get_transform3D_t< A, T > dtransform3D
Three-dimensional transform type for algebra A and value type T.
Definition algebra.hpp:84
get_matrix_t< A, R, C, T > dmatrix
R by C matrix type for algebra A and value type T.
Definition algebra.hpp:88
State carried by the straight-line stepper.
Definition line_stepper.hpp:55
void advance_jacobian()
Advance the free-parameter transport Jacobian for a straight segment.
Definition line_stepper.hpp:76
constexpr scalar_type dqopds(const material< scalar_type > *) const
Derivative of q/p with respect to path length in vacuum.
Definition line_stepper.hpp:100
typename base_type::template state<> base_state
Base state providing common track, path, and constraint storage.
Definition line_stepper.hpp:60
void advance_track()
Update the track state in a straight line.
Definition line_stepper.hpp:67
constexpr vector3_type dtds() const
Derivative of time with respect to path length for straight motion.
Definition line_stepper.hpp:95
Material composition properties and density data used by interactions.
Definition material.hpp:36
Default navigation update policy for the steppers: If a constraint has been hit, lower the trustlevel...
Definition policies.hpp:63
Configuration flags and limits consumed by a stepper.
Definition stepping_config.hpp:29
bool do_covariance_transport
Do covariance transport.
Definition stepping_config.hpp:48
A void inpector that does nothing.
Definition base_stepper.hpp:34
Struct that represents unconstrained stepping.
Definition constrained_step.hpp:50
static constexpr scalar_t um
Length, native unit mm.
Definition units.hpp:25