File KdtSurfacesProvider.hpp
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
-
namespace Experimental
-
template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator>
class KdtSurfaces - #include <Acts/Detector/KdtSurfacesProvider.hpp>
A wrapper class around a KDTree of surfaces.
It also deals with the conversion from global query to KDTree lookup positions
Public Types
-
using KDTS = KDTree<kDIM, std::shared_ptr<Surface>, ActsScalar, std::array, bSize>
Broadcast the surface KDT type.
-
using Query = std::array<ActsScalar, kDIM>
Broadcast the query definition.
Public Functions
Constructor from a vector of surfaces.
- Parameters
gctx – the geometry context of this call
surfaces – the surfaces to be filled into the tree
casts – the cast list from global position into kdtree local
rgen – the reference point generator
-
inline std::vector<std::shared_ptr<Surface>> surfaces(const Extent &extent) const
Query with an Extent object.
- Parameters
extent – is the range Extent to be queried
- Returns
the matching surfaces fpulled from the KDT structure
-
inline std::vector<std::shared_ptr<Surface>> surfaces(const RangeXD<kDIM, ActsScalar> &range) const
Query with a Range object.
- Parameters
range – is the range to be queried
- Returns
the matching surfaces from the KDT structure
Private Functions
-
inline Vector3 cog(const std::vector<Vector3> &positions) const
Helper method to calculate the center of gravity.
Note
will do nothing if vector size is equal to 1
Note
no checking on positions.empty() is done as the positions are to be provided by a generator which itself is tested for consistency
- Parameters
positions – are the reference positions that go in
- Returns
the center of gravity
Private Members
-
std::array<BinningValue, kDIM> m_casts = {}
Cast values that turn a global position to lookup position.
-
reference_generator m_rGenerator
Helper to generate reference points for filling.
-
using KDTS = KDTree<kDIM, std::shared_ptr<Surface>, ActsScalar, std::array, bSize>
-
template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator>
class KdtSurfacesProvider : public Acts::Experimental::ISurfacesProvider - #include <Acts/Detector/KdtSurfacesProvider.hpp>
Callable struct wrapper around the KDT surface structure.
This allows to create small region based callable structs at configuration level that are then connected to an InternalStructureBuilder
Public Functions
The prefilled surfaces in a KD tree structure, it is generally shared amongst different providers.
- Parameters
kdts – the prefilled KDTree structure
kregion – the region where these are pulled from
-
inline std::vector<std::shared_ptr<Surface>> surfaces([[maybe_unused]] const GeometryContext &gctx) const final
The call to provide the surfaces.
Private Members
-
std::shared_ptr<KdtSurfaces<kDIM, bSize, reference_generator>> m_kdt = nullptr
-
template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator>
-
namespace Experimental