ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
Lookup helper which encapsulates a Grid
.
More...
#include <acts/blob/master/Core/include/Acts/Surfaces/SurfaceArray.hpp>
Public Types | |
using | point_t = std::conditional_t< DIM==1, std::array< double, 1 >, ActsVectorD< DIM >> |
Specifies the local coordinate type. This resolves to ActsVector<DIM> for DIM > 1, else std::array<double, 1> | |
using | Grid_t = detail::Grid< SurfaceVector, Axes...> |
Public Member Functions | |
SurfaceGridLookup (std::function< point_t(const Vector3D &)> globalToLocal, std::function< Vector3D(const point_t &)> localToGlobal, std::tuple< Axes...> axes) | |
Default constructor. | |
void | fill (const GeometryContext &gctx, const SurfaceVector &surfaces) override |
Fill provided surfaces into the contained Grid . | |
size_t | completeBinning (const GeometryContext &gctx, const SurfaceVector &surfaces) override |
Attempts to fix sub-optimal binning by filling closest Surfaces into empty bins. | |
SurfaceVector & | lookup (const Vector3D &position) override |
Performs lookup at pos and returns bin content as reference. | |
const SurfaceVector & | lookup (const Vector3D &position) const override |
Performs lookup at pos and returns bin content as const reference. | |
SurfaceVector & | lookup (size_t bin) override |
Performs lookup at global bin and returns bin content as reference. | |
const SurfaceVector & | lookup (size_t bin) const override |
Performs lookup at global bin and returns bin content as const reference. | |
const SurfaceVector & | neighbors (const Vector3D &position) const override |
Performs a lookup at pos , but returns neighbors as well. | |
size_t | size () const override |
Returns the total size of the grid (including under/overflow bins) | |
Vector3D | getBinCenter (size_t bin) const override |
Gets the center position of bin bin in global coordinates. | |
std::vector< const IAxis * > | getAxes () const override |
Returns copies of the axes used in the grid as AnyAxis . | |
size_t | dimensions () const override |
Get the number of dimensions of the grid. | |
bool | isValidBin (size_t bin) const override |
Checks if global bin is valid. | |
Public Member Functions inherited from Acts::SurfaceArray::ISurfaceGridLookup | |
virtual | ~ISurfaceGridLookup ()=0 |
Pure virtual destructor. | |
Static Public Attributes | |
static constexpr size_t | DIM = sizeof...(Axes) |
Private Member Functions | |
void | populateNeighborCache () |
template<size_t D = DIM, std::enable_if_t< D!=1, int > = 0> | |
Vector3D | getBinCenterImpl (size_t bin) const |
template<size_t D = DIM, std::enable_if_t< D==1, int > = 0> | |
Vector3D | getBinCenterImpl (size_t bin) const |
Private Attributes | |
std::function< point_t(const Vector3D &)> | m_globalToLocal |
std::function< Vector3D(const point_t &)> | m_localToGlobal |
Grid_t | m_grid |
std::vector< SurfaceVector > | m_neighborMap |
Lookup helper which encapsulates a Grid
.
Axes | The axes used for the grid |
Definition at line 114 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 114 of file SurfaceArray.hpp
using Acts::SurfaceArray::SurfaceGridLookup< Axes >::Grid_t = detail::Grid<SurfaceVector, Axes...> |
Definition at line 123 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 123 of file SurfaceArray.hpp
using Acts::SurfaceArray::SurfaceGridLookup< Axes >::point_t = std::conditional_t<DIM == 1, std::array<double, 1>, ActsVectorD<DIM>> |
Specifies the local coordinate type. This resolves to ActsVector<DIM>
for DIM > 1, else std::array<double, 1>
Definition at line 122 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 122 of file SurfaceArray.hpp
|
inline |
Default constructor.
globalToLocal | Callable that converts from global to local |
localToGlobal | Callable that converts from local to global |
grid | The grid data structure. |
DIM
. If DIM > 1, local coords are ActsVectorD<DIM>
else std::array<double, 1>
. Definition at line 133 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 133 of file SurfaceArray.hpp
References Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid, Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_neighborMap, and Acts::detail::Grid< T, Axes >::size().
|
inlineoverridevirtual |
Attempts to fix sub-optimal binning by filling closest Surfaces into empty bins.
gctx | The current geometry context object, e.g. alignment |
surfaces | The surface pointers to fill |
Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 169 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 169 of file SurfaceArray.hpp
References b, Acts::binR, Acts::SurfaceArray::SurfaceGridLookup< Axes >::getBinCenter(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::isValidBin(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::lookup(), max, norm, Acts::SurfaceArray::SurfaceGridLookup< Axes >::populateNeighborCache(), and Acts::SurfaceArray::SurfaceGridLookup< Axes >::size().
Referenced by Acts::Test::BOOST_FIXTURE_TEST_CASE().
|
inlineoverridevirtual |
Get the number of dimensions of the grid.
Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 266 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 266 of file SurfaceArray.hpp
References Acts::SurfaceArray::SurfaceGridLookup< Axes >::DIM.
|
inlineoverridevirtual |
Fill provided surfaces into the contained Grid
.
This is done by iterating, accessing the binningPosition, lookup and append. Also populates the neighbor map by combining the filled bins of all bins around a given one.
gctx | The current geometry context object, e.g. alignment |
surfaces | Input surface pointers |
Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 152 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 152 of file SurfaceArray.hpp
References Acts::binR, Acts::SurfaceArray::SurfaceGridLookup< Axes >::lookup(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::populateNeighborCache(), and pos().
Referenced by Acts::Test::BOOST_FIXTURE_TEST_CASE().
|
inlineoverridevirtual |
Returns copies of the axes used in the grid as AnyAxis
.
Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 259 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 259 of file SurfaceArray.hpp
References Acts::detail::Grid< T, Axes >::axes(), and Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid.
|
inlineoverridevirtual |
Gets the center position of bin bin
in global coordinates.
bin | the global bin index |
Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 252 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 252 of file SurfaceArray.hpp
References Acts::SurfaceArray::SurfaceGridLookup< Axes >::getBinCenterImpl().
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::completeBinning().
|
inlineprivate |
Internal method. This is here, because apparently Eigen doesn't like Vector1D. So SurfaceGridLookup internally uses std::array<double, 1> instead of Vector1D (see the point_t typedef). This needs to be switched here, so as not to attempt an initialization of Vector1D that Eigen will complain about. The SFINAE is hidden in this private method so the public interface stays the same, since we don't care what happens here on the callers end This is the version for DIM>1
Definition at line 317 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 317 of file SurfaceArray.hpp
References Acts::detail::Grid< T, Axes >::binCenter(), Acts::detail::Grid< T, Axes >::localBinsFromGlobalBin(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid, and Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_localToGlobal.
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::getBinCenter().
|
inlineprivate |
Internal method, see above. This is the version for DIM==1
Definition at line 325 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 325 of file SurfaceArray.hpp
References Acts::detail::Grid< T, Axes >::binCenter(), Acts::detail::Grid< T, Axes >::localBinsFromGlobalBin(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid, Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_localToGlobal, and pos().
|
inlineoverridevirtual |
Checks if global bin is valid.
bin | the global bin index |
Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 273 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 273 of file SurfaceArray.hpp
References incremental_prev_tag::idx, Acts::detail::Grid< T, Axes >::localBinsFromGlobalBin(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid, and Acts::detail::Grid< T, Axes >::numLocalBins().
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::completeBinning(), and Acts::SurfaceArray::SurfaceGridLookup< Axes >::populateNeighborCache().
|
inlineoverridevirtual |
Performs lookup at pos
and returns bin content as reference.
position | Lookup position |
SurfaceVector
at given bin Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 209 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 209 of file SurfaceArray.hpp
References Acts::detail::Grid< T, Axes >::atPosition(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_globalToLocal, and Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid.
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::completeBinning(), and Acts::SurfaceArray::SurfaceGridLookup< Axes >::fill().
|
inlineoverridevirtual |
Performs lookup at pos
and returns bin content as const reference.
position | Lookup position |
SurfaceVector
at given bin Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 217 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 217 of file SurfaceArray.hpp
References Acts::detail::Grid< T, Axes >::atPosition(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_globalToLocal, and Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid.
|
inlineoverridevirtual |
Performs lookup at global bin and returns bin content as reference.
bin | Global lookup bin |
SurfaceVector
at given bin Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 225 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 225 of file SurfaceArray.hpp
References Acts::detail::Grid< T, Axes >::at(), and Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid.
|
inlineoverridevirtual |
Performs lookup at global bin and returns bin content as const reference.
bin | Global lookup bin |
SurfaceVector
at given bin Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 231 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 231 of file SurfaceArray.hpp
References Acts::detail::Grid< T, Axes >::at(), and Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid.
|
inlineoverridevirtual |
Performs a lookup at pos
, but returns neighbors as well.
position | Lookup position |
SurfaceVector
at given bin. Copy of all bins selected Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 239 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 239 of file SurfaceArray.hpp
References Acts::detail::Grid< T, Axes >::globalBinFromPosition(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_globalToLocal, Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid, and Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_neighborMap.
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::populateNeighborCache().
|
inlineprivate |
Definition at line 287 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 287 of file SurfaceArray.hpp
References Acts::detail::Grid< T, Axes >::at(), field_utils::copy(), incremental_prev_tag::idx, Acts::SurfaceArray::SurfaceGridLookup< Axes >::isValidBin(), Acts::detail::Grid< T, Axes >::localBinsFromGlobalBin(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid, Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_neighborMap, Acts::detail::Grid< T, Axes >::neighborHoodIndices(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::neighbors(), Acts::detail::Grid< T, Axes >::size(), and Acts::UnitConstants::u.
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::completeBinning(), and Acts::SurfaceArray::SurfaceGridLookup< Axes >::fill().
|
inlineoverridevirtual |
Returns the total size of the grid (including under/overflow bins)
Implements Acts::SurfaceArray::ISurfaceGridLookup.
Definition at line 247 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 247 of file SurfaceArray.hpp
References Acts::SurfaceArray::SurfaceGridLookup< Axes >::m_grid, and Acts::detail::Grid< T, Axes >::size().
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::completeBinning().
|
static |
Definition at line 115 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 115 of file SurfaceArray.hpp
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::dimensions().
|
private |
Definition at line 330 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 330 of file SurfaceArray.hpp
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::lookup(), and Acts::SurfaceArray::SurfaceGridLookup< Axes >::neighbors().
|
private |
Definition at line 332 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 332 of file SurfaceArray.hpp
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::getAxes(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::getBinCenterImpl(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::isValidBin(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::lookup(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::neighbors(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::populateNeighborCache(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::size(), and Acts::SurfaceArray::SurfaceGridLookup< Axes >::SurfaceGridLookup().
|
private |
Definition at line 331 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 331 of file SurfaceArray.hpp
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::getBinCenterImpl().
|
private |
Definition at line 333 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 333 of file SurfaceArray.hpp
Referenced by Acts::SurfaceArray::SurfaceGridLookup< Axes >::neighbors(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::populateNeighborCache(), and Acts::SurfaceArray::SurfaceGridLookup< Axes >::SurfaceGridLookup().