Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator > Class Template Reference

A wrapper class around a KDTree of surfaces. More...

#include <acts/blob/sPHENIX/Core/include/Acts/Detector/KdtSurfacesProvider.hpp>

+ Collaboration diagram for Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >:

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.
 
using Entry = std::pair< Query, std::shared_ptr< Surface >>
 Broadcast the entry.
 

Public Member Functions

 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 >{})
 
std::vector< std::shared_ptr
< Surface > > 
surfaces (const RangeXD< kDIM, ActsScalar > &range) const
 
std::vector< std::shared_ptr
< Surface > > 
surfaces (const Extent &extent) const
 

Private Member Functions

template<typename Array , std::size_t... idx>
void fillCasts (const Vector3 &position, Array &a, std::index_sequence< idx...>) const
 
Query cog (const std::vector< Query > &cQueries) const
 

Private Attributes

std::unique_ptr< KDTSm_kdt = nullptr
 The KDTree as single source for the surfaces (maybe shared)
 
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.
 

Detailed Description

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

A wrapper class around a KDTree of surfaces.

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

Definition at line 35 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 35 of file KdtSurfacesProvider.hpp

Member Typedef Documentation

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
using Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::Entry = std::pair<Query, std::shared_ptr<Surface>>

Broadcast the entry.

Definition at line 45 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 45 of file KdtSurfacesProvider.hpp

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
using Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::KDTS = KDTree<kDIM, std::shared_ptr<Surface>, ActsScalar, std::array, bSize>

Broadcast the surface KDT type.

Definition at line 39 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 39 of file KdtSurfacesProvider.hpp

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
using Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::Query = std::array<ActsScalar, kDIM>

Broadcast the query definition.

Definition at line 42 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 42 of file KdtSurfacesProvider.hpp

Constructor & Destructor Documentation

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::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>{} 
)
inline

Constructor from a vector of surfaces

Parameters
gctxthe geometry context of this call
surfacesthe surfaces to be filled into the tree
caststhe cast list from global position into kdtree local
rgenthe reference point generator

Definition at line 53 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 53 of file KdtSurfacesProvider.hpp

Member Function Documentation

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
Query Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::cog ( const std::vector< Query > &  cQueries) const
inlineprivate

Helper method to calculate the center of gravity in the casted frame (i.e. query frame)

Parameters
cQueriesare the casted query positions
Note
will do nothing if vector size is equal to 1
no checking on qQueries.empty() is done as the positions are to be provided by a generator which itself is tested for consistency
Returns
the center of gravity as a query object

Definition at line 143 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 143 of file KdtSurfacesProvider.hpp

References Acts::PhysicalConstants::c, Acts::Test::transform, and testSigmaEff::v.

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
template<typename Array , std::size_t... idx>
void Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::fillCasts ( const Vector3 position,
Array &  a,
std::index_sequence< idx...>   
) const
inlineprivate

Unroll the cast loop

Parameters
positionis the position of the update call
ais the array to be filled

Definition at line 127 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 127 of file KdtSurfacesProvider.hpp

References Acts::VectorHelpers::cast(), ambiguity_solver_full_chain::idx, and Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::m_casts.

+ Here is the call graph for this function:

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
std::vector<std::shared_ptr<Surface> > Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::surfaces ( const RangeXD< kDIM, ActsScalar > &  range) const
inline

Query with a Range object

Parameters
rangeis the range to be queried
Returns
the matching surfaces from the KDT structure

Definition at line 90 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 90 of file KdtSurfacesProvider.hpp

References Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::m_kdt, and physmon_simulation::s.

Referenced by Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::surfaces().

+ Here is the caller graph for this function:

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
std::vector<std::shared_ptr<Surface> > Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::surfaces ( const Extent extent) const
inline

Query with an Extent object

Parameters
extentis the range Extent to be queried
Returns
the matching surfaces fpulled from the KDT structure

Definition at line 105 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 105 of file KdtSurfacesProvider.hpp

References Acts::enumerate(), Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::m_casts, Acts::Extent::range(), Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::surfaces(), and testSigmaEff::v.

+ Here is the call graph for this function:

Member Data Documentation

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
std::array<BinningValue, kDIM> Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::m_casts = {}
private

Cast values that turn a global position to lookup position.

Definition at line 118 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 118 of file KdtSurfacesProvider.hpp

Referenced by Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::fillCasts(), and Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::surfaces().

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
std::unique_ptr<KDTS> Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::m_kdt = nullptr
private

The KDTree as single source for the surfaces (maybe shared)

Definition at line 115 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 115 of file KdtSurfacesProvider.hpp

Referenced by Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::surfaces().

template<size_t kDIM = 2u, size_t bSize = 100u, typename reference_generator = detail::PolyhedronReferenceGenerator<1u, false>>
reference_generator Acts::Experimental::KdtSurfaces< kDIM, bSize, reference_generator >::m_rGenerator
private

Helper to generate reference points for filling.

Definition at line 121 of file KdtSurfacesProvider.hpp.

View newest version in sPHENIX GitHub at line 121 of file KdtSurfacesProvider.hpp


The documentation for this class was generated from the following file: