ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
tracking_surface.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/core/concepts.hpp"
13#include "detray/definitions/algebra.hpp"
14#include "detray/definitions/detail/qualifiers.hpp"
15#include "detray/geometry/detail/tracking_surface_kernels.hpp"
16#include "detray/geometry/surface.hpp"
17
18// System include(s)
19#include <type_traits>
20
21namespace detray {
22
24template <concepts::detector det_t>
25class tracking_surface : public geometry::surface<const det_t> {
27 using detector_t = std::add_const_t<det_t>;
28
29 using base_surface_t = geometry::surface<detector_t>;
30
32 using kernels =
33 detail::tracking_surface_kernels<typename detector_t::algebra_type>;
35 using free_param_vector_type = typename kernels::free_param_vector_type;
37 using bound_param_vector_type = typename kernels::bound_param_vector_type;
38
39 public:
54
56 using base_surface_t::base_surface_t;
57
60 DETRAY_HOST_DEVICE
61 explicit constexpr tracking_surface(const base_surface_t sf)
62 : base_surface_t(sf) {}
63
67 template <typename detector_type = detector_t>
68 requires(!std::is_const_v<detector_type>)
69 // NOLINTNEXTLINE
70 DETRAY_HOST_DEVICE constexpr operator tracking_surface<const detector_type>()
71 const {
72 return tracking_surface<const detector_type>{this->m_detector,
73 this->m_desc};
74 }
75
79 DETRAY_HOST_DEVICE
80 constexpr auto free_to_bound_vector(
81 const context &ctx, const free_param_vector_type &free_vec) const {
83 this->transform(ctx), free_vec);
84 }
85
89 DETRAY_HOST_DEVICE
90 constexpr auto bound_to_free_vector(
91 const context &ctx, const bound_param_vector_type &bound_vec) const {
93 this->transform(ctx), bound_vec);
94 }
95
99 DETRAY_HOST_DEVICE
101 const context &ctx, const free_param_vector_type &free_vec) const {
103 this->transform(ctx), free_vec);
104 }
105
109 DETRAY_HOST_DEVICE
111 const context &ctx, const bound_param_vector_type &bound_vec) const {
113 this->transform(ctx), bound_vec);
114 }
115
122 DETRAY_HOST_DEVICE
123 constexpr auto path_correction(const context &ctx, const vector3_type &pos,
124 const vector3_type &dir,
125 const vector3_type &dtds,
126 const scalar_type dqopds) const {
128 this->transform(ctx), pos, dir, dtds, dqopds);
129 }
130
136 DETRAY_HOST_DEVICE
137 constexpr auto free_to_path_derivative(const context &ctx,
138 const vector3_type &pos,
139 const vector3_type &dir,
140 const vector3_type &dtds) const {
142 this->transform(ctx), pos, dir, dtds);
143 }
144};
145
147template <concepts::detector detector_t, typename descr_t>
148DETRAY_HOST_DEVICE_DEDUCTION_GUIDE tracking_surface(const detector_t &,
149 const descr_t &)
151
153template <concepts::detector detector_t>
154DETRAY_HOST_DEVICE_DEDUCTION_GUIDE tracking_surface(const detector_t &,
157
159template <concepts::detector detector_t>
160DETRAY_HOST_DEVICE_DEDUCTION_GUIDE tracking_surface(
162
164template <concepts::detector detector_t>
165DETRAY_HOST_DEVICE_DEDUCTION_GUIDE tracking_surface(
167
168} // namespace detray
Unique identifier for geometry objects, based on the ACTS GeometryIdentifier.
Definition identifier.hpp:36
Facade for a detray detector surface.
Definition surface.hpp:36
typename detector_t::geometry_context context
Definition surface.hpp:58
dvector3D< algebra_type > vector3_type
Definition surface.hpp:54
dpoint3D< algebra_type > point3_type
Definition surface.hpp:52
typename detector_t::algebra_type algebra_type
Definition surface.hpp:46
dpoint2D< algebra_type > point2_type
Definition surface.hpp:50
dtransform3D< algebra_type > transform3_type
Definition surface.hpp:56
constexpr auto transform(const context &ctx) const -> const transform3_type &
Definition surface.hpp:197
dscalar< algebra_type > scalar_type
Definition surface.hpp:48
constexpr auto visit_mask(Args &&...args) const
Definition surface.hpp:298
Facade for a detray detector surface with extra tracking capabilities.
Definition tracking_surface.hpp:25
constexpr auto path_correction(const context &ctx, const vector3_type &pos, const vector3_type &dir, const vector3_type &dtds, const scalar_type dqopds) const
Definition tracking_surface.hpp:123
typename base_surface_t::scalar_type scalar_type
Scalar type used for track parameters and geometry values.
Definition tracking_surface.hpp:43
constexpr auto free_to_bound_jacobian(const context &ctx, const free_param_vector_type &free_vec) const
Definition tracking_surface.hpp:100
constexpr tracking_surface(const base_surface_t sf)
Decorate a geometric surface with tracking functionality.
Definition tracking_surface.hpp:61
typename base_surface_t::algebra_type algebra_type
Algebra backend used for surface tracking calculations.
Definition tracking_surface.hpp:41
typename base_surface_t::transform3_type transform3_type
Transform type used by the underlying surface.
Definition tracking_surface.hpp:51
constexpr auto bound_to_free_vector(const context &ctx, const bound_param_vector_type &bound_vec) const
Definition tracking_surface.hpp:90
typename base_surface_t::vector3_type vector3_type
Three-dimensional vector type.
Definition tracking_surface.hpp:49
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
typename base_surface_t::point2_type point2_type
Two-dimensional local point type.
Definition tracking_surface.hpp:45
constexpr auto bound_to_free_jacobian(const context &ctx, const bound_param_vector_type &bound_vec) const
Definition tracking_surface.hpp:110
typename base_surface_t::context context
Geometry context type used to resolve contextual transforms.
Definition tracking_surface.hpp:53
constexpr auto free_to_bound_vector(const context &ctx, const free_param_vector_type &free_vec) const
Definition tracking_surface.hpp:80
typename base_surface_t::point3_type point3_type
Three-dimensional point type.
Definition tracking_surface.hpp:47
Detray include(s).
Definition array_operators.hpp:18
tracking_surface(const detector_t &, const descr_t &) -> tracking_surface< detector_t >
Deduce the detector type from a detector and surface descriptor pair.