diff --git a/detectors/include/detray/detectors/itk_metadata.hpp b/detectors/include/detray/detectors/itk_metadata.hpp index a23d6f24c..879f2b0df 100644 --- a/detectors/include/detray/detectors/itk_metadata.hpp +++ b/detectors/include/detray/detectors/itk_metadata.hpp @@ -135,16 +135,19 @@ struct itk_metadata { /// If they share the same index value here, they will be added into the /// same acceleration data structure in every respective volume enum geo_objects : std::uint_least8_t { - e_surface = 0u, //< This detector keeps all surfaces in the same - e_portal = 0u, // acceleration data structure (id 0) - e_passive = 0u, - e_size = 1u + e_portal = 0, + e_passive = 0, + e_sensitive = 1, + e_size = 2, + e_all = e_size, }; /// The acceleration data structures live in another tuple that needs to be /// indexed correctly: enum class accel_ids : std::uint_least8_t { - e_brute_force = 0u, //< test all surfaces in a volume (brute force) + e_brute_force = 0, // test all surfaces in a volume (brute force) + e_disc_grid = 1, // endcap + e_cylinder2_grid = 2, // barrel e_default = e_brute_force, }; diff --git a/detectors/include/detray/detectors/odd_metadata.hpp b/detectors/include/detray/detectors/odd_metadata.hpp new file mode 100644 index 000000000..445fd4449 --- /dev/null +++ b/detectors/include/detray/detectors/odd_metadata.hpp @@ -0,0 +1,148 @@ +/** Detray library, part of the ACTS project (R&D line) + * + * (c) 2024 CERN for the benefit of the ACTS project + * + * Mozilla Public License Version 2.0 + */ + +#pragma once + +// Project include(s) +#include "detray/core/detail/multi_store.hpp" +#include "detray/core/detail/single_store.hpp" +#include "detray/definitions/detail/containers.hpp" +#include "detray/definitions/detail/indexing.hpp" +#include "detray/geometry/detail/surface_descriptor.hpp" +#include "detray/geometry/mask.hpp" +#include "detray/geometry/shapes/concentric_cylinder2D.hpp" +#include "detray/geometry/shapes/rectangle2D.hpp" +#include "detray/geometry/shapes/ring2D.hpp" +#include "detray/materials/material_map.hpp" +#include "detray/navigation/accelerators/brute_force_finder.hpp" +#include "detray/navigation/accelerators/surface_grid.hpp" + +// Linear algebra types +#include "detray/definitions/detail/algebra.hpp" + +namespace detray { + +// +// ODD Detector +// + +/// Defines a detector that is design to contain the ODD geometry +struct odd_metadata { + + /// Define the algebra type for the geometry and navigation + using algebra_type = ALGEBRA_PLUGIN; + + /// Portal link type between volumes + using nav_link = std::uint_least16_t; + + // + // Surface Primitives + // + + /// The mask types for the ODD sensitive surfaces + using rectangle = mask; + // Types for portals + using cylinder_portal = mask; + using disc_portal = mask; + + /// Assign the mask types to the mask tuple container entries. + enum class mask_ids : std::uint_least8_t { + e_rectangle2 = 0u, + e_portal_cylinder2 = 2u, + e_portal_ring2 = 3u, + }; + + /// This is the mask collections tuple (in the detector called 'mask store') + /// the @c regular_multi_store is a vecemem-ready tuple of vectors of + /// the detector masks. + template