ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
wire_chamber_metadata.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/detail/multi_store.hpp"
13#include "detray/core/detail/single_store.hpp"
14#include "detray/definitions/algebra.hpp"
15#include "detray/definitions/containers.hpp"
16#include "detray/definitions/indexing.hpp"
17#include "detray/geometry/mask.hpp"
18#include "detray/geometry/shapes/concentric_cylinder2D.hpp"
19#include "detray/geometry/shapes/cylinder3D.hpp"
20#include "detray/geometry/shapes/line.hpp"
21#include "detray/geometry/shapes/ring2D.hpp"
22#include "detray/geometry/surface_descriptor.hpp"
23#include "detray/material/material.hpp"
24#include "detray/material/material_map.hpp"
25#include "detray/material/material_rod.hpp"
26#include "detray/navigation/accelerators/brute_force.hpp"
27#include "detray/navigation/accelerators/spatial_grid.hpp"
28
29namespace detray {
30
32template <concepts::algebra algebra_t>
35 using algebra_type = algebra_t;
38
40 using nav_link = std::uint_least16_t;
41
42 template <template <typename...> class vector_t = dvector>
45 single_store<dtransform3D<algebra_type>, vector_t, geometry_context>;
46
56
58 enum class mask_id : std::uint_least8_t {
59 e_drift_cell = 0u,
60 e_straw_tube = 1u,
61 e_concentric_cylinder2D = 2u,
62 e_ring2D = 3u,
63 };
64
65 DETRAY_HOST inline friend std::ostream& operator<<(std::ostream& os,
66 mask_id id) {
67 switch (id) {
68 case mask_id::e_drift_cell:
69 os << "e_drift_cell";
70 break;
71 case mask_id::e_straw_tube:
72 os << "e_straw_tube";
73 break;
74 case mask_id::e_concentric_cylinder2D:
75 os << "e_concentric_cylinder2D";
76 break;
77 case mask_id::e_ring2D:
78 os << "e_ring2D";
79 break;
80 default:
81 os << "invalid";
82 }
83 return os;
84 };
85
86 template <template <typename...> class vector_t = dvector>
88 using mask_store = regular_multi_store<mask_id, empty_context, dtuple,
89 vector_t, drift_cell_t, straw_tube_t,
91
92 template <typename container_t>
96 template <typename container_t>
103
105 enum class material_id : std::uint_least8_t {
106 e_concentric_cylinder2D_map = 0u,
107 e_ring2D_map = 1u,
108 e_raw_material = 2u,
109 e_material_rod = 3u,
110 e_none = 4u,
111 };
112
113 DETRAY_HOST inline friend std::ostream& operator<<(std::ostream& os,
114 material_id id) {
115 switch (id) {
116 case material_id::e_concentric_cylinder2D_map:
117 os << "e_concentric_cylinder2D_map";
118 break;
119 case material_id::e_ring2D_map:
120 os << "e_ring2D_map";
121 break;
122 case material_id::e_raw_material:
123 os << "e_raw_material";
124 break;
125 case material_id::e_material_rod:
126 os << "e_material_rod";
127 break;
128 case material_id::e_none:
129 os << "e_none";
130 break;
131 default:
132 os << "invalid";
133 }
134 return os;
135 };
136
137 template <typename container_t = host_container_types>
140 multi_store<material_id, empty_context, dtuple,
143 typename container_t::template vector_type<raw_material_t>,
144 typename container_t::template vector_type<material_rod_t>>;
145
155
156 template <typename axes_t, typename bin_entry_t, typename container_t>
161 detray::simple_serializer, container_t, false>;
162
163 template <typename container_t>
167 container_t>;
168 template <typename container_t>
172
174 enum class accel_id : std::uint_least8_t {
175 e_surface_brute_force = 0u,
176 e_surface_concentric_cylinder2D_grid = 1u,
177 e_volume_cylinder3D_grid = 2u,
178 e_surface_default = e_surface_brute_force,
179 e_volume_default = e_volume_cylinder3D_grid,
180 };
181
182 DETRAY_HOST inline friend std::ostream& operator<<(std::ostream& os,
183 accel_id id) {
184 switch (id) {
185 case accel_id::e_surface_brute_force:
186 os << "e_surface_brute_force";
187 break;
188 case accel_id::e_surface_concentric_cylinder2D_grid:
189 os << "e_surface_concentric_cylinder2D_grid";
190 break;
191 case accel_id::e_volume_cylinder3D_grid:
192 os << "e_volume_cylinder3D_grid";
193 break;
194 default:
195 os << "invalid";
196 }
197 return os;
198 };
199
200 template <typename container_t = host_container_types>
202 using accelerator_store = multi_store<
203 accel_id, empty_context, dtuple,
207
209 enum geo_objects : std::uint_least8_t {
210 e_portal = 0u,
211 e_passive = 0u,
212 e_sensitive = 1u,
213 e_volume = 2u,
214 e_size = 3u,
215 e_all = e_size,
216 };
217
218 DETRAY_HOST inline friend std::ostream& operator<<(std::ostream& os,
219 geo_objects id) {
220 switch (id) {
221 case geo_objects::e_sensitive:
222 os << "e_sensitive";
223 break;
224 case geo_objects::e_passive:
225 os << "e_portal/e_passive";
226 break;
227 case geo_objects::e_volume:
228 os << "e_volume";
229 break;
230 case geo_objects::e_size:
231 os << "e_size";
232 break;
233 default:
234 os << "invalid";
235 }
236 return os;
237 };
238
242};
243
244} // namespace detray
Bin that views a collection of entries it does not own.
Definition grid_bins.hpp:206
A collection of brute force surface finders, callable by index.
Definition brute_force.hpp:38
A collection of grids that can be moved to device as part of the detector.
Definition grid_collection.hpp:31
Mask a region on a surface and link it to a volume.
Definition mask.hpp:46
Templated surface class for detector surfaces and portals.
Definition surface_descriptor.hpp:35
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
vecmem::vector< value_t > dvector
Vector container backed by vecmem.
Definition containers.hpp:34
grid< algebra_t, axes< shape_t >, bins::single< material_slab< dscalar< algebra_t > > >, simple_serializer, container_t, owning > material_map
Definition of binned material.
Definition material_map.hpp:29
unsigned int dindex
Default index type.
Definition indexing.hpp:18
spatial_grid_impl< grid_impl< coordinate_axes< axes_t, algebra_t, ownership, containers >, bin_t, simple_serializer > > spatial_grid
Spatial grid alias built from coordinate axes and a bin type.
Definition spatial_grid.hpp:275
detray::tuple< types... > dtuple
Tuple type used by detray storage and dispatch.
Definition containers.hpp:46
detail::multi_index< index_t, DIM > dmulti_index
Index that consists of multiple subindices.
Definition indexing.hpp:33
std::ostream & operator<<(std::ostream &os, volume_id vid)
Write the volume shape identifier using its enumerator name.
Definition geometry.hpp:59
Rod structure to be mapped on the line mask.
Definition material_rod.hpp:26
Material composition properties and density data used by interactions.
Definition material.hpp:36
Detector-specific aliases and storage policy for wire chamber geometry.
Definition wire_chamber_metadata.hpp:33
accel_id
Identifiers for navigation accelerator alternatives.
Definition wire_chamber_metadata.hpp:174
mask< detray::line_square, algebra_type, nav_link > drift_cell_t
Type alias used by this detector metadata configuration.
Definition wire_chamber_metadata.hpp:48
typename material_store<>::single_link material_link
Link type used to refer to the corresponding detector component store.
Definition wire_chamber_metadata.hpp:151
dynamic_simple_grid_t< axes< detray::concentric_cylinder2D >, surface_type, container_t > surface_concentric_cylinder2D_grid_t
Grid type used to index the corresponding detector components.
Definition wire_chamber_metadata.hpp:165
typename mask_store<>::range_link mask_link
Link type used to refer to the corresponding detector component store.
Definition wire_chamber_metadata.hpp:149
material_map< algebra_type, detray::concentric_cylinder2D, container_t > concentric_cylinder2D_map_t
Material map type associated with this surface shape.
Definition wire_chamber_metadata.hpp:94
dmulti_index< dtyped_index< accel_id, dindex >, geo_objects::e_size > object_link_type
Link type used to refer to the corresponding detector component store.
Definition wire_chamber_metadata.hpp:240
material_id
Identifiers for material payload and map alternatives.
Definition wire_chamber_metadata.hpp:105
algebra_t algebra_type
Algebra backend used by this detector metadata.
Definition wire_chamber_metadata.hpp:35
std::uint_least16_t nav_link
Link type used to refer to the corresponding detector component store.
Definition wire_chamber_metadata.hpp:40
single_store< dtransform3D< algebra_type >, vector_t, geometry_context > transform_store
Store type holding the corresponding detector component collection.
Definition wire_chamber_metadata.hpp:44
multi_store< accel_id, empty_context, dtuple, brute_force_collection< surface_type, container_t >, grid_collection< surface_concentric_cylinder2D_grid_t< container_t > >, grid_collection< volume_cylinder3D_grid_t< container_t > > > accelerator_store
Store type holding the corresponding detector component collection.
Definition wire_chamber_metadata.hpp:202
dynamic_simple_grid_t< axes< detray::cylinder3D >, dindex, container_t > volume_cylinder3D_grid_t
Grid type used to index the corresponding detector components.
Definition wire_chamber_metadata.hpp:170
geo_objects
Categories used to distinguish detector geometry objects.
Definition wire_chamber_metadata.hpp:209
mask< detray::concentric_cylinder2D, algebra_type, nav_link > concentric_cylinder2D_t
Type alias used by this detector metadata configuration.
Definition wire_chamber_metadata.hpp:52
mask< detray::line_circular, algebra_type, nav_link > straw_tube_t
Type alias used by this detector metadata configuration.
Definition wire_chamber_metadata.hpp:50
surface_descriptor< mask_link, material_link, transform_link, nav_link > surface_type
Surface descriptor type combining links to its geometry components.
Definition wire_chamber_metadata.hpp:153
material< scalar_t > raw_material_t
Material representation used by this detector metadata.
Definition wire_chamber_metadata.hpp:100
dscalar< algebra_type > scalar_t
Scalar type associated with the selected algebra backend.
Definition wire_chamber_metadata.hpp:37
mask_id
Identifiers for the supported surface masks.
Definition wire_chamber_metadata.hpp:58
material_rod< scalar_t > material_rod_t
Material representation used by this detector metadata.
Definition wire_chamber_metadata.hpp:102
multi_store< material_id, empty_context, dtuple, grid_collection< concentric_cylinder2D_map_t< container_t > >, grid_collection< ring2D_map_t< container_t > >, typename container_t::template vector_type< raw_material_t >, typename container_t::template vector_type< material_rod_t > > material_store
Store type holding the corresponding detector component collection.
Definition wire_chamber_metadata.hpp:139
regular_multi_store< mask_id, empty_context, dtuple, vector_t, drift_cell_t, straw_tube_t, concentric_cylinder2D_t, ring2D_t > mask_store
Store type holding the corresponding detector component collection.
Definition wire_chamber_metadata.hpp:88
spatial_grid< algebra_type, axes_t, detray::bins::dynamic_array< bin_entry_t >, detray::simple_serializer, container_t, false > dynamic_simple_grid_t
Grid type used to index the corresponding detector components.
Definition wire_chamber_metadata.hpp:158
typename transform_store<>::single_link transform_link
Link type used to refer to the corresponding detector component store.
Definition wire_chamber_metadata.hpp:147
mask< detray::ring2D, algebra_type, nav_link > ring2D_t
Type alias used by this detector metadata configuration.
Definition wire_chamber_metadata.hpp:55
material_map< algebra_type, detray::ring2D, container_t > ring2D_map_t
Material map type associated with this surface shape.
Definition wire_chamber_metadata.hpp:98