ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
parameter_updater.hpp
1// This file is part of the ACTS project.
2//
3// Copyright (C) 2016 CERN for the benefit of the ACTS project
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9#pragma once
10
11// Project include(s).
12#include "detray/definitions/algebra.hpp"
13#include "detray/definitions/detail/qualifiers.hpp"
14#include "detray/definitions/track_parametrization.hpp"
15#include "detray/geometry/tracking_surface.hpp"
16#include "detray/propagator/base_actor.hpp"
17#include "detray/propagator/composite_actor.hpp"
18#include "detray/propagator/detail/codegen/covariance_transport.hpp"
19#include "detray/propagator/detail/codegen/full_jacobian.hpp"
20#include "detray/propagator/detail/jacobian_engine.hpp"
21#include "detray/propagator/detail/noise_estimation.hpp"
22#include "detray/propagator/propagation_config.hpp"
23#include "detray/utils/curvilinear_frame.hpp"
24#include "detray/utils/logging.hpp"
25#include "detray/utils/type_registry.hpp"
26
27namespace detray::actor {
28
29template <concepts::algebra algebra_t>
31
32template <concepts::algebra algebra_t>
33struct parameter_setter;
34
36struct noise_cfg {
38 float accumulated_error{0.001f};
40 int n_stddev{2};
43};
44
47template <concepts::algebra algebra_t>
49 // Allow only the corresponding actors to modify the parameter data
50 friend struct parameter_transporter<algebra_t>;
51 friend struct parameter_setter<algebra_t>;
52
54 constexpr parameter_updater_state() = default;
55
59 DETRAY_HOST_DEVICE
60 explicit constexpr parameter_updater_state(
61 const propagation::config& cfg,
62 bound_matrix<algebra_t>* full_jac = nullptr)
63 : m_full_jacobian(full_jac),
64 m_cfg{cfg.navigation.accumulated_error,
65 cfg.navigation.n_scattering_stddev,
66 cfg.navigation.estimate_scattering_noise} {}
67
72 DETRAY_HOST_DEVICE
74 const propagation::config& cfg,
75 const free_track_parameters<algebra_t>& free_params,
76 bound_matrix<algebra_t>* full_jac = nullptr)
77 : m_full_jacobian(full_jac),
78 m_cfg{cfg.navigation.accumulated_error,
79 cfg.navigation.n_scattering_stddev,
80 cfg.navigation.estimate_scattering_noise} {
81 // Set bound track parameters
82 curvilinear_frame<algebra_t> cf(free_params);
83 m_bound_params.set_parameter_vector(cf.m_bound_vec);
84 // A dummy covariance - should not be used
85 m_bound_params.set_covariance(matrix::identity<bound_matrix<algebra_t>>());
86 }
87
92 DETRAY_HOST_DEVICE
94 const propagation::config& cfg,
96 bound_matrix<algebra_t>* full_jac = nullptr)
97 : m_bound_params{bound_params},
98 m_full_jacobian(full_jac),
99 m_cfg{cfg.navigation.accumulated_error,
100 cfg.navigation.n_scattering_stddev,
101 cfg.navigation.estimate_scattering_noise} {}
102
105 DETRAY_HOST_DEVICE
106 constexpr void init(const free_track_parameters<algebra_t>& free_params) {
107 // Set bound track parameters
108 curvilinear_frame<algebra_t> cf(free_params);
109 m_bound_params.set_parameter_vector(cf.m_bound_vec);
110
111 // A dummy covariance - should not be used
112 m_bound_params.set_covariance(matrix::identity<bound_matrix<algebra_t>>());
113
114 // An invalid geometry identifier - should not be used
115 m_bound_params.set_surface_link(geometry::identifier{});
116
117 assert(!m_bound_params.is_invalid());
118 }
119
122 DETRAY_HOST_DEVICE
124 assert(!bound_params.is_invalid());
125 m_bound_params = bound_params;
126 }
127
131 DETRAY_HOST_DEVICE
132 void always_update(const bool do_update = true) {
133 m_always_update = do_update;
134 }
135
139 DETRAY_HOST_DEVICE
140 void notify_on_initial(const bool do_notify = true) {
141 m_notify_on_initial = do_notify;
142 }
143
145 DETRAY_HOST_DEVICE
146 const noise_cfg& noise_estimation_cfg() const { return m_cfg; }
147
149 DETRAY_HOST_DEVICE
150 noise_cfg& noise_estimation_cfg() { return m_cfg; }
151
154 DETRAY_HOST_DEVICE
156 return m_bound_params;
157 }
158
161 DETRAY_HOST_DEVICE
163 return m_bound_params;
164 }
165
167 DETRAY_HOST_DEVICE
168 constexpr bool has_full_jacobian() const {
169 return m_full_jacobian != nullptr;
170 }
171
173 DETRAY_HOST_DEVICE
174 constexpr const bound_matrix<algebra_t>& full_jacobian() const {
175 assert(has_full_jacobian());
176 return *m_full_jacobian;
177 }
178
181 DETRAY_HOST_DEVICE
182 constexpr void set_full_jacobian(const bound_matrix<algebra_t>& jac) {
183 assert(has_full_jacobian());
184 *m_full_jacobian = jac;
185 }
186
189 DETRAY_HOST_DEVICE
191 assert(jac_ptr);
192 m_full_jacobian = jac_ptr;
193 }
194
195 private:
197 bound_track_parameters<algebra_t> m_bound_params{};
199 bound_matrix<algebra_t>* m_full_jacobian{nullptr};
201 noise_cfg m_cfg{};
203 bool m_always_update{false};
205 bool m_notify_on_initial{true};
206};
207
209template <concepts::algebra algebra_t>
212 constexpr parameter_transporter_result() = default;
213
217 DETRAY_HOST_DEVICE
219 actor::status stat, bound_track_parameters<algebra_t>* params_ptr)
220 : actor::result{stat}, m_destination_params_ptr{params_ptr} {
221 assert(m_destination_params_ptr);
222 }
223
227 DETRAY_HOST_DEVICE
229 actor::status stat, bound_track_parameters<algebra_t>& params)
230 : actor::result{stat}, m_destination_params_ptr{&params} {
231 assert(m_destination_params_ptr);
232 }
233
235 DETRAY_HOST_DEVICE
237 const {
238 assert(this->status == actor::status::e_unknown ||
239 m_destination_params_ptr);
240 return *m_destination_params_ptr;
241 }
242
244 DETRAY_HOST_DEVICE
246 assert(this->status == actor::status::e_unknown ||
247 m_destination_params_ptr);
248 return *m_destination_params_ptr;
249 }
250
251 private:
253 DETRAY_HOST
254 friend std::ostream& operator<<(
255 std::ostream& os, const parameter_transporter_result<algebra_t>& res) {
256 os << static_cast<actor::result>(res) << std::endl;
257 os << "destination params:\n" << res.destination_params() << std::endl;
258 return os;
259 }
260
262 bound_track_parameters<algebra_t>* m_destination_params_ptr{nullptr};
263};
264
268template <concepts::algebra algebra_t>
278
283
289 template <typename mask_t>
290 using type = typename mask_t::local_frame;
291 };
292
301 template <typename frame_t>
302 DETRAY_HOST_DEVICE constexpr dmatrix<algebra_t, 3, 2> operator()(
303 const frame_t& /*frame*/, const transform3_type& trf3,
304 const free_track_parameters_type& params) const {
305 return detail::jacobian_engine<algebra_t>::
306 template bound_to_free_jacobian_submatrix_dpos_dloc<frame_t>(
307 trf3, params.pos(), params.dir());
308 }
309 };
310
319 template <typename frame_t>
320 DETRAY_HOST_DEVICE constexpr dmatrix<algebra_t, 3, 2> operator()(
321 const frame_t& /*frame*/, const transform3_type& trf3,
322 const free_track_parameters_type& params,
323 const dmatrix<algebra_t, 3, 2>& ddir_dangle) const {
324 return detail::jacobian_engine<algebra_t>::
325 template bound_to_free_jacobian_submatrix_dpos_dangle<frame_t>(
326 trf3, params.pos(), params.dir(), ddir_dangle);
327 }
328 };
329
338 template <typename frame_t, typename stepper_state_t>
339 DETRAY_HOST_DEVICE constexpr dmatrix<algebra_t, 2, 3> operator()(
340 const frame_t& /*frame*/, const transform3_type& trf3,
341 const stepper_state_t& stepping) const {
342 return detail::jacobian_engine<algebra_t>::
343 template free_to_bound_jacobian_submatrix_dloc_dpos<frame_t>(
344 trf3, stepping().pos(), stepping().dir());
345 }
346 };
347
348
354 template <typename propagator_state_t>
355 DETRAY_HOST_DEVICE result operator()(state& updater_state,
356 propagator_state_t& propagation) const {
357 const auto& navigation = propagation.navigation();
358
359 // Do covariance transport only when the track is on surface
360 if (!(navigation.is_on_sensitive() ||
361 navigation.encountered_sf_material())) {
362 return {};
363 }
364 assert(navigation.is_on_surface());
365
366 // Current track position and transport jacobian
367 auto& stepping = propagation.stepping();
368
369 // Destination surface (current)
370 const auto dest_sf = navigation.current_surface();
371
372 // Bound track params of departure surface (not yet updated)
373 auto& departure_params = updater_state.bound_params();
374
375 // Result to be passed on to observing actors
376 result res{actor::status::e_notify, departure_params};
377
378 // Covariance is transported only when the departure surface is an
379 // actual tracking surface (i.e. this disables the covariance
380 // transport from curvilinear frames).
381 if (!departure_params.surface_link().is_invalid()) {
382 DETRAY_DEBUG_HOST(
383 "Actor: Departure surface: " << departure_params.surface_link());
384
385 // There is no need to transport the identical/initial parameters
386 assert(!dest_sf.identifier().is_invalid());
387 if (departure_params.surface_link() == dest_sf.identifier()) {
388 DETRAY_VERBOSE_HOST_DEVICE(
389 "Actor: On initial surface (%d), parameter transport not required",
390 dest_sf.index());
391
392 // Notify observers?
393 if (!updater_state.m_notify_on_initial) {
394 res.status = actor::status::e_unknown;
395 }
396
397 return res;
398 }
399
400 DETRAY_DEBUG_HOST("Actor: Destination surface: " << dest_sf.identifier());
401 DETRAY_VERBOSE_HOST_DEVICE(
402 "Actor: Transport track covariance to surface %d", dest_sf.index());
403
404 DETRAY_DEBUG_HOST("Actor: Departure bound param.: " << departure_params);
405
406 // Transport the covariance
407 const bound_matrix<algebra_t> propagation_step_jacobian =
408 get_full_jacobian(propagation, departure_params);
409
410 // Update the full Jacobian, if required
411 if (math::fabs(stepping.path_length()) > 0.f) {
412 if (updater_state.has_full_jacobian()) {
413 updater_state.set_full_jacobian(propagation_step_jacobian *
414 updater_state.full_jacobian());
415 }
416
417 // Reset transport Jacobian to identity matrix
418 stepping.reset_transport_jacobian();
419 }
420
421 // Copy old covariance in order to update new covariance in place
422 const bound_matrix_type old_cov = departure_params.covariance();
423 bound_matrix_type& new_cov = departure_params.covariance();
424
425 detray::detail::transport_covariance_to_bound_impl(
426 old_cov, propagation_step_jacobian, new_cov);
427 } else {
428 DETRAY_VERBOSE_HOST_DEVICE("Actor: Departure surface link invalid");
429 }
430
431 DETRAY_VERBOSE_HOST_DEVICE(
432 "Actor: Convert track parameter vector to local for surface %d",
433 dest_sf.index());
434
435 // Get the bound parameters at the destination surface
436 res.destination_params().set_parameter_vector(
437 dest_sf.free_to_bound_vector(propagation.context(), stepping()));
438
439 // Set new surface link
440 res.destination_params().set_surface_link(dest_sf.identifier());
441
442 assert(!res.destination_params().is_invalid());
443
444 DETRAY_DEBUG_HOST("Actor: Transported bound param.:\n"
445 << res.destination_params());
446
447 return res;
448 }
449
455 template <typename propagator_state_t>
456 DETRAY_HOST_DEVICE constexpr bound_matrix_type get_full_jacobian(
457 propagator_state_t& propagation,
458 const bound_track_parameters_type& departure_params) const {
459 // Map the surface shapes of the detector down to the common frames
460 using detector_t = typename propagator_state_t::detector_type;
461 using frame_registry_t =
463
464 const auto& gctx = propagation.context();
465 const auto& stepping = propagation.stepping();
466 const auto& navigation = propagation.navigation();
467
468 // Our goal here is to compute the full Jacobian, which is given as:
469 //
470 // J_full = J_F2B * (D + I) * J_transport * J_B2F
471 //
472 // The transport Jacobian is given, but the free-to-bound and
473 // bound-to-free matrices as well as the derivative matrix $D$ need
474 // to be computed still. In order to avoid full-rank matrix
475 // multiplications, we use the known substructure of the
476 // aforementioned matrices in order to perform fewer operations. We
477 // describe in detail the mathematics performed throughout the
478 // remainder of this function.
479
480 // Departure surface
481 const tracking_surface dep_sf{navigation.detector(),
482 departure_params.surface_link()};
483
484 // Destination Surface
485 const tracking_surface dest_sf = navigation.current_surface();
486
487 // Free track params of departure surface
488 const free_track_parameters<algebra_t> dep_free_params =
489 dep_sf.bound_to_free_vector(gctx, departure_params);
490
491 // Free track params of destination surface
492 const free_track_parameters<algebra_t>& dest_free_params = stepping();
493
494 // First, we will compute the bound-to-free Jacobian, which is given
495 // by three sub-Jacobians. In particular, the matrix has an 8x6
496 // shape and looks like this:
497 //
498 // l0 l1 phi th q/p t
499 // px [[ A, A, B, B, 0, 0],
500 // py [ A, A, B, B, 0, 0],
501 // pz [ A, A, B, B, 0, 0],
502 // t [ 0, 0, 0, 0, 0, 1],
503 // dx [ 0, 0, C, C, 0, 0],
504 // dy [ 0, 0, C, C, 0, 0],
505 // dz [ 0, 0, 0, C, 0, 0],
506 // q/p [ 0, 0, 0, 0, 1, 0]]
507 //
508 // Note that we thus only have 17 out of 48 non-trivial matrix
509 // elements.
510 //
511 // In this matrix, A represents the d(pos)/d(loc) submatrix, B is
512 // the d(pos)/d(angle) submatrix, and C is the d(dir)/d(angle)
513 // submatrix, all of which are 3x2 in size. Also, A and B depend on
514 // the frame type while C is computed in the same way for all
515 // frames. Finally, note that submatrix B is the zero matrix for
516 // most frame types.
517 const auto& dep_trf3 = dep_sf.transform(gctx);
518 const dmatrix<algebra_t, 3, 2> b2f_dpos_dloc =
519 types::visit<frame_registry_t, get_bound_to_free_dpos_dloc_visitor>(
520 dep_sf.shape_id(), dep_trf3, dep_free_params);
521
522 const dmatrix<algebra_t, 3, 2> b2f_ddir_dangle =
523 detail::jacobian_engine<algebra_t>::
524 bound_to_free_jacobian_submatrix_ddir_dangle(departure_params);
525
526 const dmatrix<algebra_t, 3, 2> b2f_dpos_dangle =
527 types::visit<frame_registry_t, get_bound_to_free_dpos_dangle_visitor>(
528 dep_sf.shape_id(), dep_trf3, dep_free_params, b2f_ddir_dangle);
529
530 // Next, we compute the derivative which is defined as the outer
531 // product of the two 8x1 vectors representing the path to free
532 // derivative and the free to path derivative. Thus, it is the
533 // product of the following two vectors:
534 //
535 // px [[ A], [[ B],^T
536 // py [ A], [ B],
537 // pz [ A], [ B],
538 // t [ 0]] [ 0],
539 // dx [ A], [ C],
540 // dy [ A], [ C],
541 // dz [ A], [ C],
542 // q/p [ A], [ 0]]
543 //
544 // Where A is frame independent and non-zero, B is frame-dependent
545 // and non-zero, while C is frame-dependent and non-zero only for
546 // line frames.
547 const dpoint3D<algebra_t> dest_glob_pos{dest_free_params.pos()};
548 const dvector3D<algebra_t> dest_glob_dir{dest_free_params.dir()};
549
550 auto vol = navigation.current_volume();
551 const auto vol_mat_ptr =
552 vol.has_material() ? vol.material_parameters(dest_glob_pos) : nullptr;
553
554 const auto path_to_free_derivative =
555 detail::jacobian_engine<algebra_t>::path_to_free_derivative(
556 dest_glob_dir, stepping.dtds(), stepping.dqopds(vol_mat_ptr));
557
558 const auto free_to_path_derivative = dest_sf.free_to_path_derivative(
559 gctx, dest_glob_pos, dest_glob_dir, stepping.dtds());
560
561 // Now, we compute the free-to-bound Jacobian which is of size 6x8
562 // and has the following structure:
563 //
564 // px py pz t dx dy dz q/p
565 // l0 [[ A, A, A, 0, 0, 0, 0, 0],
566 // l1 [ A, A, A, 0, 0, 0, 0, 0],
567 // phi [ 0, 0, 0, 0, B, B, 0, 0],
568 // th [ 0, 0, 0, 0, B, B, B, 0],
569 // q/p [ 0, 0, 0, 0, 0, 0, 0, 1],
570 // t [ 0, 0, 0, 1, 0, 0, 0, 0]]
571 //
572 // Thus, the number of non-trivial elements is only 11 out of the 48
573 // matrix elements. Also, submatrix A depends on the frame type
574 // while submatrix B is the same for all frame types.
575 const dmatrix<algebra_t, 2, 3> f2b_dloc_dpos =
576 types::visit<frame_registry_t, get_free_to_bound_dloc_dpos_visitor>(
577 dest_sf.shape_id(), dest_sf.transform(gctx), stepping);
578
579 const dmatrix<algebra_t, 2, 3> f2b_dangle_ddir = detail::jacobian_engine<
580 algebra_t>::free_to_bound_jacobian_submatrix_dangle_ddir(dest_glob_dir);
581
582 // Finally, we can use our Sympy-generated full Jacobian computation
583 // and return its result.
584 bound_matrix_type full_jacobian;
585
586 if constexpr (std::decay_t<propagator_state_t>::stepper_uses_gradient) {
587 detail::update_full_jacobian_with_gradient_impl(
588 stepping.internal_transport_jacobian(), b2f_dpos_dloc,
589 b2f_ddir_dangle, b2f_dpos_dangle, path_to_free_derivative,
590 free_to_path_derivative, f2b_dloc_dpos, f2b_dangle_ddir,
591 full_jacobian);
592 } else {
593 detail::update_full_jacobian_without_gradient_impl(
594 stepping.internal_transport_jacobian(), b2f_dpos_dloc,
595 b2f_ddir_dangle, b2f_dpos_dangle, path_to_free_derivative,
596 free_to_path_derivative, f2b_dloc_dpos, f2b_dangle_ddir,
597 full_jacobian);
598 }
599
600 return full_jacobian;
601 }
602};
603
606template <concepts::algebra algebra_t>
610
616 template <typename propagator_state_t>
617 DETRAY_HOST_DEVICE void operator()(
618 state& updater_state, propagator_state_t& propagation,
620 // Update the track parameters only if necessary
621 if (res.status != actor::status::e_success &&
622 !updater_state.m_always_update) {
623 return;
624 }
625
626 const auto& navigation = propagation.navigation();
627 auto& stepping = propagation.stepping();
628
629 // One of the transporter observers might have exited the navigation
630 assert(navigation.is_on_surface() || !navigation.is_alive());
631
632 DETRAY_VERBOSE_HOST_DEVICE("Actor: Update the track parameters");
633
634 // Updated bound track parameters
635 const bound_track_parameters<algebra_t>& bound_params =
636 res.destination_params();
637
638 // Update free params after bound params were changed by actors
639 const tracking_surface dest_sf{navigation.detector(),
640 bound_params.surface_link()};
641 stepping() =
642 dest_sf.bound_to_free_vector(propagation.context(), bound_params);
643
644 assert(!stepping().is_invalid());
645
646 // Track pos/dir is not always known precisely: adjust navigation
647 // tolerances according to bound covariance
648 if (const noise_cfg& cfg = updater_state.noise_estimation_cfg();
650 detail::estimate_external_mask_tolerance(
651 bound_params, propagation,
652 static_cast<dscalar<algebra_t>>(cfg.n_stddev), cfg.accumulated_error);
653 }
654
655 DETRAY_DEBUG_HOST("Actor: Updated bound param.:\n" << bound_params);
656 }
657};
658
661template <typename algebra_t, typename... transporter_observers>
662using parameter_updater =
663 composite_actor<parameter_transporter<algebra_t>, transporter_observers...,
664 parameter_setter<algebra_t>>;
665
666} // namespace detray::actor
Composition of actors.
Definition composite_actor.hpp:37
Unique identifier for geometry objects, based on the ACTS GeometryIdentifier.
Definition identifier.hpp:36
constexpr auto shape_id() const
Definition surface.hpp:142
constexpr auto transform(const context &ctx) const -> const transform3_type &
Definition surface.hpp:197
Facade for a detray detector surface with extra tracking capabilities.
Definition tracking_surface.hpp:25
constexpr auto bound_to_free_vector(const context &ctx, const bound_param_vector_type &bound_vec) const
Definition tracking_surface.hpp:90
constexpr auto free_to_path_derivative(const context &ctx, const vector3_type &pos, const vector3_type &dir, const vector3_type &dtds) const
Definition tracking_surface.hpp:137
Select a number of types from another registry and map their IDs to a continuous range of new type in...
Definition type_registry.hpp:102
get_scalar_t< A, T > dscalar
Scalar type for algebra A and value type T.
Definition algebra.hpp:64
get_vector3D_t< A, T > dvector3D
Three-dimensional vector type for algebra A and value type T.
Definition algebra.hpp:80
dmatrix< algebra_t, e_bound_size, e_bound_size > bound_matrix
Covariance matrix type for bound track parametrization.
Definition track_parametrization.hpp:81
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
get_point3D_t< A, T > dpoint3D
Three-dimensional point type for algebra A and value type T.
Definition algebra.hpp:72
free_parameters_vector< algebra_t > free_track_parameters
The free track parameters consist only of the parameter vector.
Definition free_track_parameters.hpp:249
Configuration of noise estimation.
Definition parameter_updater.hpp:36
bool estimate_scattering_noise
Estimate mask tolerance for navigation to for compensate scattering.
Definition parameter_updater.hpp:42
float accumulated_error
Percentage of total track path to assume as accumulated error.
Definition parameter_updater.hpp:38
int n_stddev
Number of standard deviations to assume to model the scattering noise.
Definition parameter_updater.hpp:40
Set the free track parameters in the stepper state, in case observing actors (e.g.
Definition parameter_updater.hpp:607
parameter_updater_state< algebra_t > state
Access the same parameter updater state as the parameter transporter.
Definition parameter_updater.hpp:609
void operator()(state &updater_state, propagator_state_t &propagation, const parameter_transporter_result< algebra_t > &res) const
Actor interface: Observer to the parameter transporter and its observers.
Definition parameter_updater.hpp:617
Visitor computing position derivatives with respect to direction angles.
Definition parameter_updater.hpp:312
constexpr dmatrix< algebra_t, 3, 2 > operator()(const frame_t &, const transform3_type &trf3, const free_track_parameters_type &params, const dmatrix< algebra_t, 3, 2 > &ddir_dangle) const
Compute position derivatives with respect to direction angles.
Definition parameter_updater.hpp:320
Visitors to the surface local coordinate frameCompute position derivatives with respect to local coor...
Definition parameter_updater.hpp:296
constexpr dmatrix< algebra_t, 3, 2 > operator()(const frame_t &, const transform3_type &trf3, const free_track_parameters_type &params) const
Definition parameter_updater.hpp:302
Visitor computing local-coordinate derivatives with respect to position.
Definition parameter_updater.hpp:331
constexpr dmatrix< algebra_t, 2, 3 > operator()(const frame_t &, const transform3_type &trf3, const stepper_state_t &stepping) const
Compute local-coordinate derivatives with respect to position.
Definition parameter_updater.hpp:339
Filter the masks of a detector according to the local frame type.
Definition parameter_updater.hpp:285
typename mask_t::local_frame type
Extract the local frame associated with a mask.
Definition parameter_updater.hpp:290
Result of the param. transporter: bound track parameters at dest. sf.
Definition parameter_updater.hpp:210
constexpr bound_track_parameters< algebra_t > & destination_params()
Definition parameter_updater.hpp:245
constexpr const bound_track_parameters< algebra_t > & destination_params() const
Definition parameter_updater.hpp:236
constexpr parameter_transporter_result()=default
Construct an empty transporter result.
constexpr parameter_transporter_result(actor::status stat, bound_track_parameters< algebra_t > &params)
Parameterized constructor using destination parameters.
Definition parameter_updater.hpp:228
friend std::ostream & operator<<(std::ostream &os, const parameter_transporter_result< algebra_t > &res)
Definition parameter_updater.hpp:254
constexpr parameter_transporter_result(actor::status stat, bound_track_parameters< algebra_t > *params_ptr)
Parameterized constructor using a pointer to the destination parameters.
Definition parameter_updater.hpp:218
Transport the free track parameters at the destination surface and the covariance at the departure su...
Definition parameter_updater.hpp:269
bound_matrix< algebra_t > bound_matrix_type
Bound matrix type (bound covariance).
Definition parameter_updater.hpp:277
dtransform3D< algebra_t > transform3_type
Transformation type used for surface-frame Jacobians.
Definition parameter_updater.hpp:271
free_track_parameters< algebra_t > free_track_parameters_type
The current free track parameters in the stepper algorithm.
Definition parameter_updater.hpp:273
constexpr bound_matrix_type get_full_jacobian(propagator_state_t &propagation, const bound_track_parameters_type &departure_params) const
Assemble the full bound-to-bound Jacobian for this propagation step.
Definition parameter_updater.hpp:456
result operator()(state &updater_state, propagator_state_t &propagation) const
Actor interface.
Definition parameter_updater.hpp:355
bound_track_parameters< algebra_t > bound_track_parameters_type
The track parameters bound to the current sensitive/material surface.
Definition parameter_updater.hpp:275
parameter_updater_state< algebra_t > state
Use the parameter updater state.
Definition parameter_updater.hpp:280
parameter_transporter_result< algebra_t > result
Result returned to observers after transporting parameters.
Definition parameter_updater.hpp:282
State of the parameter updater.
Definition parameter_updater.hpp:48
noise_cfg & noise_estimation_cfg()
Definition parameter_updater.hpp:150
constexpr void set_full_jacobian(const bound_matrix< algebra_t > &jac)
Set new full Jacbian.
Definition parameter_updater.hpp:182
constexpr void init(const free_track_parameters< algebra_t > &free_params)
Initialize the state from free track parameters.
Definition parameter_updater.hpp:106
const noise_cfg & noise_estimation_cfg() const
Definition parameter_updater.hpp:146
void notify_on_initial(const bool do_notify=true)
Notify the observing actors on the initial propagation surface (i.e.
Definition parameter_updater.hpp:140
constexpr void init(const bound_track_parameters< algebra_t > &bound_params)
Initialize the state from bound track parameters.
Definition parameter_updater.hpp:123
constexpr bound_track_parameters< algebra_t > & bound_params()
Definition parameter_updater.hpp:162
constexpr void set_full_jacobian(bound_matrix< algebra_t > *jac_ptr)
Set new full Jacbian.
Definition parameter_updater.hpp:190
void always_update(const bool do_update=true)
Always update the track parameters in the stepper state.
Definition parameter_updater.hpp:132
constexpr const bound_matrix< algebra_t > & full_jacobian() const
Definition parameter_updater.hpp:174
constexpr parameter_updater_state()=default
Construct an empty updater state.
constexpr parameter_updater_state(const propagation::config &cfg, const free_track_parameters< algebra_t > &free_params, bound_matrix< algebra_t > *full_jac=nullptr)
Start from free track parameters.
Definition parameter_updater.hpp:73
constexpr const bound_track_parameters< algebra_t > & bound_params() const
Definition parameter_updater.hpp:155
constexpr parameter_updater_state(const propagation::config &cfg, const bound_track_parameters< algebra_t > &bound_params, bound_matrix< algebra_t > *full_jac=nullptr)
Start from bound track parameters.
Definition parameter_updater.hpp:93
constexpr bool has_full_jacobian() const
Definition parameter_updater.hpp:168
constexpr parameter_updater_state(const propagation::config &cfg, bound_matrix< algebra_t > *full_jac=nullptr)
Start without explicit track parameters.
Definition parameter_updater.hpp:60
Result of the principal actor to be passed to the obsevers.
Definition base_actor.hpp:34
actor::status status
Navigation status reported by the principal actor.
Definition base_actor.hpp:36
Base class actor implementation.
Definition base_actor.hpp:20
Combine the bound track parameter vector with the covariance and associated surface.
Definition bound_track_parameters.hpp:297
const geometry::identifier & surface_link() const
Definition bound_track_parameters.hpp:364
Frame and Jacobian data associated with a free track's curvilinear frame.
Definition curvilinear_frame.hpp:25
bound_vector_type m_bound_vec
Bound curvilinear parameters of the reference track.
Definition curvilinear_frame.hpp:68
vector3_type dir() const
Definition free_track_parameters.hpp:128
point3_type pos() const
Definition free_track_parameters.hpp:110
Configuration of the propagation.
Definition propagation_config.hpp:23