ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
curvilinear_frame.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/geometry/coordinates/cartesian2D.hpp"
15#include "detray/geometry/mask.hpp"
16#include "detray/geometry/shapes/rectangle2D.hpp"
17#include "detray/propagator/detail/jacobian_engine.hpp"
18#include "detray/tracks/bound_track_parameters.hpp"
19#include "detray/utils/unit_vectors.hpp"
20
21namespace detray {
22
24template <concepts::algebra algebra_t>
29 using vector3 = typename transform3_type::vector3;
37 using jacobian_engine_type = detail::jacobian_engine<algebra_t>;
40
43 DETRAY_HOST_DEVICE
44 explicit curvilinear_frame(const free_track_parameters_type& free_params) {
45 assert(!free_params.is_invalid());
46
47 const vector3 t = free_params.pos();
48 const vector3 z = free_params.dir();
50
51 m_trf = transform3_type(t, z, x);
52 m_bound_vec = detail::free_to_bound_vector<cartesian2D<algebra_t>>(
53 m_trf, free_params);
54 }
55
58 DETRAY_HOST_DEVICE
64
69
70}; // curvilinear frame
71
72} // namespace detray
Mask a region on a surface and link it to a volume.
Definition mask.hpp:46
Detray include(s).
Definition array_operators.hpp:18
dmatrix< algebra_t, e_free_size, e_bound_size > bound_to_free_matrix
Mapping from bound to free track parameters.
Definition track_parametrization.hpp:85
get_transform3D_t< A, T > dtransform3D
Three-dimensional transform type for algebra A and value type T.
Definition algebra.hpp:84
free_parameters_vector< algebra_t > free_track_parameters
The free track parameters consist only of the parameter vector.
Definition free_track_parameters.hpp:249
Six-component parameter vector expressed in a surface-bound coordinate frame.
Definition bound_track_parameters.hpp:29
bound_to_free_matrix< algebra_t > bound_to_free_matrix_type
Matrix type mapping bound parameter variations to free parameters.
Definition curvilinear_frame.hpp:33
bound_parameters_vector< algebra_t > bound_vector_type
Vector holding the bound parameters at the frame's reference point.
Definition curvilinear_frame.hpp:35
bound_to_free_matrix_type bound_to_free_jacobian() const
Compute the Jacobian from bound curvilinear parameters to free parameters.
Definition curvilinear_frame.hpp:59
detail::jacobian_engine< algebra_t > jacobian_engine_type
Engine that computes the bound-to-free Jacobian.
Definition curvilinear_frame.hpp:37
free_track_parameters< algebra_t > free_track_parameters_type
Type of the free track parameters used to initialize the frame.
Definition curvilinear_frame.hpp:39
bound_vector_type m_bound_vec
Bound curvilinear parameters of the reference track.
Definition curvilinear_frame.hpp:68
dtransform3D< algebra_t > transform3_type
Three-dimensional transform type for the curvilinear frame.
Definition curvilinear_frame.hpp:27
typename transform3_type::vector3 vector3
Three-dimensional vector type used by the transform.
Definition curvilinear_frame.hpp:29
transform3_type m_trf
Transform placing the curvilinear frame at the track reference point.
Definition curvilinear_frame.hpp:66
unit_vectors< vector3 > unit_vectors_type
Helper for constructing the transverse unit vectors.
Definition curvilinear_frame.hpp:31
curvilinear_frame(const free_track_parameters_type &free_params)
Build the frame and bound parameter vector from a valid free track.
Definition curvilinear_frame.hpp:44
constexpr bool is_invalid() const
Definition free_track_parameters.hpp:225
vector3_type dir() const
Definition free_track_parameters.hpp:128
point3_type pos() const
Definition free_track_parameters.hpp:110
Build the curvilinear unit basis perpendicular to a three-dimensional direction.
Definition unit_vectors.hpp:22
vector3_t make_curvilinear_unit_u(const vector3_t &dir)
Construct the first curvilinear unit vector U for the given direction.
Definition unit_vectors.hpp:31