14
14
#include " detray/materials/detail/concepts.hpp"
15
15
#include " detray/materials/detail/material_accessor.hpp"
16
16
#include " detray/materials/material.hpp"
17
- #include " detray/propagator/detail/jacobian_engine.hpp"
18
- #include " detray/tracks/detail/transform_track_parameters.hpp"
19
- #include " detray/tracks/tracks.hpp"
20
17
21
18
// System include(s)
22
19
#include < limits>
@@ -34,9 +31,6 @@ struct surface_kernels {
34
31
using point3_type = dpoint3D<algebra_t >;
35
32
using vector3_type = dvector3D<algebra_t >;
36
33
using transform3_type = dtransform3D<algebra_t >;
37
- using bound_param_vector_type = bound_parameters_vector<algebra_t >;
38
- using free_param_vector_type = free_parameters_vector<algebra_t >;
39
- using free_matrix_type = free_matrix<algebra_t >;
40
34
41
35
// / A functor to retrieve the masks shape name
42
36
struct get_shape_name {
@@ -159,21 +153,6 @@ struct surface_kernels {
159
153
}
160
154
};
161
155
162
- // / A functor to perform global to local bound transformation
163
- struct global_to_bound {
164
- template <typename mask_group_t , typename index_t >
165
- DETRAY_HOST_DEVICE inline point2_type operator ()(
166
- const mask_group_t & /* mask_group*/ , const index_t & /* index*/ ,
167
- const transform3_type& trf3, const point3_type& global,
168
- const vector3_type& dir) const {
169
- using mask_t = typename mask_group_t ::value_type;
170
-
171
- const point3_type local = mask_t::to_local_frame (trf3, global, dir);
172
-
173
- return {local[0 ], local[1 ]};
174
- }
175
- };
176
-
177
156
// / A functor to perform global to local transformation
178
157
struct global_to_local {
179
158
template <typename mask_group_t , typename index_t >
@@ -211,127 +190,6 @@ struct surface_kernels {
211
190
return mask_t::to_global_frame (trf3, local);
212
191
}
213
192
};
214
-
215
- // / A functor to get from a free to a bound vector
216
- struct free_to_bound_vector {
217
-
218
- // Visitor to the detector mask store that is called on the mask
219
- // collection that contains the mask (shape) type of the surface
220
- template <typename mask_group_t , typename index_t >
221
- DETRAY_HOST_DEVICE inline bound_param_vector_type operator ()(
222
- const mask_group_t & /* mask_group*/ , const index_t & /* index*/ ,
223
- const transform3_type& trf3,
224
- const free_param_vector_type& free_vec) const {
225
-
226
- using frame_t = typename mask_group_t ::value_type::local_frame;
227
-
228
- return detail::free_to_bound_vector<frame_t >(trf3, free_vec);
229
- }
230
- };
231
-
232
- // / A functor to get from a bound to a free vector
233
- struct bound_to_free_vector {
234
-
235
- template <typename mask_group_t , typename index_t >
236
- DETRAY_HOST_DEVICE inline free_param_vector_type operator ()(
237
- const mask_group_t & mask_group, const index_t & index,
238
- const transform3_type& trf3,
239
- const bound_param_vector_type& bound_vec) const {
240
-
241
- return detail::bound_to_free_vector (trf3, mask_group[index ],
242
- bound_vec);
243
- }
244
- };
245
-
246
- // / A functor to get the free-to-bound Jacobian
247
- struct free_to_bound_jacobian {
248
-
249
- template <typename mask_group_t , typename index_t >
250
- DETRAY_HOST_DEVICE inline auto operator ()(
251
- const mask_group_t & /* mask_group*/ , const index_t & /* index*/ ,
252
- const transform3_type& trf3,
253
- const free_param_vector_type& free_vec) const {
254
-
255
- using frame_t = typename mask_group_t ::value_type::local_frame;
256
-
257
- return detail::jacobian_engine<frame_t >::free_to_bound_jacobian (
258
- trf3, free_vec);
259
- }
260
- };
261
-
262
- // / A functor to get the bound-to-free Jacobian
263
- struct bound_to_free_jacobian {
264
-
265
- template <typename mask_group_t , typename index_t >
266
- DETRAY_HOST_DEVICE inline auto operator ()(
267
- const mask_group_t & mask_group, const index_t & index,
268
- const transform3_type& trf3,
269
- const bound_param_vector_type& bound_vec) const {
270
-
271
- using frame_t = typename mask_group_t ::value_type::local_frame;
272
-
273
- return detail::jacobian_engine<frame_t >::bound_to_free_jacobian (
274
- trf3, mask_group[index ], bound_vec);
275
- }
276
- };
277
-
278
- // / A functor to get the path correction
279
- struct path_correction {
280
-
281
- template <typename mask_group_t , typename index_t ,
282
- concepts::scalar scalar_t >
283
- DETRAY_HOST_DEVICE inline free_matrix_type operator ()(
284
- const mask_group_t & /* mask_group*/ , const index_t & /* index*/ ,
285
- const transform3_type& trf3, const vector3_type& pos,
286
- const vector3_type& dir, const vector3_type& dtds,
287
- const scalar_t dqopds) const {
288
-
289
- using frame_t = typename mask_group_t ::value_type::local_frame;
290
-
291
- return detail::jacobian_engine<frame_t >::path_correction (
292
- pos, dir, dtds, dqopds, trf3);
293
- }
294
- };
295
-
296
- // / A functor to get the local min bounds.
297
- struct local_min_bounds {
298
-
299
- template <typename mask_group_t , typename index_t ,
300
- concepts::scalar scalar_t >
301
- DETRAY_HOST_DEVICE inline auto operator ()(
302
- const mask_group_t & mask_group, const index_t & index,
303
- const scalar_t env =
304
- std::numeric_limits<scalar_t >::epsilon()) const {
305
-
306
- return mask_group[index ].local_min_bounds (env);
307
- }
308
- };
309
-
310
- // / A functor to get the minimum distance to any surface boundary.
311
- struct min_dist_to_boundary {
312
-
313
- template <typename mask_group_t , typename index_t ,
314
- concepts::point point_t >
315
- DETRAY_HOST_DEVICE inline auto operator ()(
316
- const mask_group_t & mask_group, const index_t & index,
317
- const point_t & loc_p) const {
318
-
319
- return mask_group[index ].min_dist_to_boundary (loc_p);
320
- }
321
- };
322
-
323
- // / A functor to get the vertices in local coordinates.
324
- struct local_vertices {
325
-
326
- template <typename mask_group_t , typename index_t ,
327
- concepts::scalar scalar_t >
328
- DETRAY_HOST_DEVICE inline auto operator ()(
329
- const mask_group_t & mask_group, const index_t & index,
330
- const dindex n_seg) const {
331
-
332
- return mask_group[index ].vertices (n_seg);
333
- }
334
- };
335
193
};
336
194
337
195
} // namespace detray::detail
0 commit comments