Class Acts::Experimental::KdtSurfaces

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
class KdtSurfaces

A wrapper class around a KDTree of surfaces.

It also deals with the conversion from global query to KDTree lookup positions

Public Types

using Entry = std::pair<Query, std::shared_ptr<Surface>>

Broadcast the entry.

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

inline KdtSurfaces(const GeometryContext &gctx, const std::vector<std::shared_ptr<Surface>> &surfaces, const std::array<BinningValue, kDIM> &casts, const reference_generator &rgen = detail::PolyhedronReferenceGenerator<1u, false>{})

Constructor from a vector of surfaces.

  • 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.


extent – is the range Extent to be queried


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.


range – is the range to be queried


the matching surfaces from the KDT structure