EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
helper functions for grid-related operations More...
#include <acts/blob/sPHENIX/Core/include/Acts/Utilities/detail/grid_helper.hpp>
Static Public Member Functions | |
template<class... Axes> | |
static GlobalNeighborHoodIndices < sizeof...(Axes)> | closestPointsIndices (const std::array< size_t, sizeof...(Axes)> &localIndices, const std::tuple< Axes...> &axes) |
get the global indices for closest points on grid | |
template<class... Axes> | |
static std::array< double, sizeof...(Axes)> | getBinCenter (const std::array< size_t, sizeof...(Axes)> &localIndices, const std::tuple< Axes...> &axes) |
retrieve bin center from set of local bin indices | |
template<class... Axes> | |
static size_t | getGlobalBin (const std::array< size_t, sizeof...(Axes)> &localBins, const std::tuple< Axes...> &axes) |
determine global bin index from local indices along each axis | |
template<class Point , class... Axes> | |
static std::array< size_t, sizeof...(Axes)> | getLocalBinIndices (const Point &point, const std::tuple< Axes...> &axes) |
determine local bin index for each axis from point | |
template<class... Axes> | |
static std::array< size_t, sizeof...(Axes)> | getLocalBinIndices (size_t bin, const std::tuple< Axes...> &axes) |
determine local bin index for each axis from global bin index | |
template<class... Axes> | |
static std::array< double, sizeof...(Axes)> | getLowerLeftBinEdge (const std::array< size_t, sizeof...(Axes)> &localIndices, const std::tuple< Axes...> &axes) |
retrieve lower-left bin edge from set of local bin indices | |
template<class... Axes> | |
static std::array< size_t, sizeof...(Axes)> | getLowerLeftBinIndices (const std::array< size_t, sizeof...(Axes)> &localIndices, const std::tuple< Axes...> &axes) |
get local bin indices for lower-left neighboring bin | |
template<class... Axes> | |
static std::array< size_t, sizeof...(Axes)> | getNBins (const std::tuple< Axes...> &axes) |
calculate number of bins in a grid defined by a set of axes for each axis | |
template<class... Axes> | |
static std::array< const IAxis *, sizeof...(Axes)> | getAxes (const std::tuple< Axes...> &axes) |
return an array with copies of the axes, converted to type AnyAxis | |
template<class... Axes> | |
static std::array< double, sizeof...(Axes)> | getUpperRightBinEdge (const std::array< size_t, sizeof...(Axes)> &localIndices, const std::tuple< Axes...> &axes) |
retrieve upper-right bin edge from set of local bin indices | |
template<class... Axes> | |
static std::array< size_t, sizeof...(Axes)> | getUpperRightBinIndices (const std::array< size_t, sizeof...(Axes)> &localIndices, const std::tuple< Axes...> &axes) |
get local bin indices for upper-right neighboring bin | |
template<class... Axes> | |
static std::array< double, sizeof...(Axes)> | getMin (const std::tuple< Axes...> &axes) |
get the minimum value of all axes of one grid | |
template<class... Axes> | |
static std::array< double, sizeof...(Axes)> | getMax (const std::tuple< Axes...> &axes) |
get the maximum value of all axes of one grid | |
template<class... Axes> | |
static std::array< double, sizeof...(Axes)> | getWidth (const std::tuple< Axes...> &axes) |
get the bin width of all axes of one grid | |
template<class... Axes> | |
static GlobalNeighborHoodIndices < sizeof...(Axes)> | neighborHoodIndices (const std::array< size_t, sizeof...(Axes)> &localIndices, std::pair< size_t, size_t > sizes, const std::tuple< Axes...> &axes) |
get global bin indices for bins in specified neighborhood | |
template<class... Axes> | |
static GlobalNeighborHoodIndices < sizeof...(Axes)> | neighborHoodIndices (const std::array< size_t, sizeof...(Axes)> &localIndices, size_t size, const std::tuple< Axes...> &axes) |
template<class... Axes> | |
static std::set< size_t > | exteriorBinIndices (const std::tuple< Axes...> &axes) |
get bin indices of all overflow and underflow bins | |
template<class Point , class... Axes> | |
static bool | isInside (const Point &position, const std::tuple< Axes...> &axes) |
check whether given point is inside axes limits | |
helper functions for grid-related operations
Definition at line 447 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 447 of file grid_helper.hpp
|
inlinestatic |
get the global indices for closest points on grid
Axes | parameter pack of axis types defining the grid |
[in] | bin | global bin index for bin of interest |
[in] | axes | actual axis objects spanning the grid |
bin
must be a valid bin index (excluding under-/overflow bins along any axis). Definition at line 460 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 460 of file grid_helper.hpp
References neighborHoodIndices().
Referenced by Acts::detail::Grid< external_spacepoint_t >::rawClosestPointsIndices().
|
inlinestatic |
get bin indices of all overflow and underflow bins
Axes | parameter pack of axis types defining the grid |
[in] | axes | actual axis objects spanning the grid |
Definition at line 766 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 766 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::exteriorBinIndices(), and MAX.
Referenced by Acts::detail::Grid< external_spacepoint_t >::setExteriorBins().
|
inlinestatic |
return an array with copies of the axes, converted to type AnyAxis
Axes | parameter pack of axis types defining the grid |
[in] | axes | actual axis objects spanning the grid |
Definition at line 624 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 624 of file grid_helper.hpp
Referenced by Acts::detail::Grid< external_spacepoint_t >::axes().
|
inlinestatic |
retrieve bin center from set of local bin indices
Axes | parameter pack of axis types defining the grid |
[in] | localIndices | local bin indices along each axis |
[in] | axes | actual axis objects spanning the grid |
localIndices
must only contain valid bin indices (i.e. excluding under-/overflow bins). Definition at line 477 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 477 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::getBinCenter(), and MAX.
Referenced by Acts::detail::Grid< external_spacepoint_t >::binCenter().
|
inlinestatic |
determine global bin index from local indices along each axis
Axes | parameter pack of axis types defining the grid |
[in] | localBins | local bin indices along each axis |
[in] | axes | actual axis objects spanning the grid |
Definition at line 498 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 498 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::getGlobalBin(), and MAX.
Referenced by Acts::detail::Grid< external_spacepoint_t >::globalBinFromLocalBins().
|
inlinestatic |
determine local bin index for each axis from point
Point | any type with point semantics supporting component access through operator [] |
Axes | parameter pack of axis types defining the grid |
[in] | point | point to look up in the grid |
[in] | axes | actual axis objects spanning the grid |
axes
object)Point
type must represent a point in d (or higher) dimensions where d is the number of axis objects in the tuple. Definition at line 525 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 525 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::getLocalBinIndices(), and MAX.
Referenced by Acts::detail::Grid< external_spacepoint_t >::localBinsFromGlobalBin(), Acts::detail::Grid< external_spacepoint_t >::localBinsFromLowerLeftEdge(), and Acts::detail::Grid< external_spacepoint_t >::localBinsFromPosition().
|
inlinestatic |
determine local bin index for each axis from global bin index
Axes | parameter pack of axis types defining the grid |
[in] | bin | global bin index |
[in] | axes | actual axis objects spanning the grid |
axes
object)Definition at line 546 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 546 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::getLocalBinIndices(), and MAX.
|
inlinestatic |
retrieve lower-left bin edge from set of local bin indices
Axes | parameter pack of axis types defining the grid |
[in] | localIndices | local bin indices along each axis |
[in] | axes | actual axis objects spanning the grid |
localIndices
must only contain valid bin indices (excluding underflow bins). Definition at line 567 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 567 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::getLowerLeftBinEdge(), and MAX.
Referenced by Acts::detail::Grid< external_spacepoint_t >::lowerLeftBinEdge().
|
inlinestatic |
get local bin indices for lower-left neighboring bin
Axes | parameter pack of axis types defining the grid |
[in] | localIndices | local bin indices along each axis |
[in] | axes | actual axis objects spanning the grid |
localIndices
must only contain valid bin indices (excluding underflow bins).This function returns the local bin indices for the generalized lower-left neighbor which simply means that all local bin indices are decremented by one.
Definition at line 591 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 591 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::getLowerLeftBinIndices(), and MAX.
|
inlinestatic |
get the maximum value of all axes of one grid
Axes | parameter pack of axis types defining the grid |
[in] | axes | actual axis objects spanning the grid |
Definition at line 694 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 694 of file grid_helper.hpp
Referenced by Acts::detail::Grid< external_spacepoint_t >::maxPosition().
|
inlinestatic |
get the minimum value of all axes of one grid
Axes | parameter pack of axis types defining the grid |
[in] | axes | actual axis objects spanning the grid |
Definition at line 681 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 681 of file grid_helper.hpp
Referenced by Acts::detail::Grid< external_spacepoint_t >::minPosition().
|
inlinestatic |
calculate number of bins in a grid defined by a set of axes for each axis
Axes | parameter pack of axis types defining the grid |
[in] | axes | actual axis objects spanning the grid |
Definition at line 610 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 610 of file grid_helper.hpp
Referenced by neighborHoodIndices(), and Acts::detail::Grid< external_spacepoint_t >::numLocalBins().
|
inlinestatic |
retrieve upper-right bin edge from set of local bin indices
Axes | parameter pack of axis types defining the grid |
[in] | localIndices | local bin indices along each axis |
[in] | axes | actual axis objects spanning the grid |
localIndices
must only contain valid bin indices (excluding overflow bins). Definition at line 641 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 641 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::getUpperRightBinEdge(), and MAX.
Referenced by Acts::detail::Grid< external_spacepoint_t >::upperRightBinEdge().
|
inlinestatic |
get local bin indices for upper-right neighboring bin
Axes | parameter pack of axis types defining the grid |
[in] | localIndices | local bin indices along each axis |
[in] | axes | actual axis objects spanning the grid |
localIndices
must only contain valid bin indices (excluding overflow bins).This function returns the local bin indices for the generalized upper-right neighbor which simply means that all local bin indices are incremented by one.
Definition at line 665 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 665 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::getUpperRightBinIndices(), and MAX.
|
inlinestatic |
get the bin width of all axes of one grid
Axes | parameter pack of axis types defining the grid |
[in] | axes | actual axis objects spanning the grid |
Definition at line 707 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 707 of file grid_helper.hpp
Referenced by Acts::detail::Grid< external_spacepoint_t >::localBinsFromLowerLeftEdge().
|
inlinestatic |
check whether given point is inside axes limits
Point | any type with point semantics supporting component access through operator [] |
Axes | parameter pack of axis types defining the grid |
[in] | position | point to look up in the grid |
[in] | axes | actual axis objects spanning the grid |
true
if , otherwise false
Point
type must represent a point in d (or higher) dimensions where d is the number of axis objects in the tuple. Definition at line 792 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 792 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::isInside(), and MAX.
Referenced by Acts::detail::Grid< external_spacepoint_t >::isInside().
|
inlinestatic |
get global bin indices for bins in specified neighborhood
Axes | parameter pack of axis types defining the grid |
[in] | localIndices | local bin indices along each axis |
[in] | size | size of neighborhood determining how many adjacent bins along each axis are considered |
[in] | axes | actual axis objects spanning the grid |
size
parameter sets the range by how many units each local bin index is allowed to be varied. All local bin indices are varied independently, that is diagonal neighbors are included. Ignoring the truncation of the neighborhood size reaching beyond over-/underflow bins, the neighborhood is of size along each dimension. Definition at line 735 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 735 of file grid_helper.hpp
References getNBins(), MAX, and Acts::detail::grid_helper_impl< N >::neighborHoodIndices().
Referenced by closestPointsIndices(), Acts::detail::Grid< external_spacepoint_t >::neighborHoodIndices(), and neighborHoodIndices().
|
inlinestatic |
Definition at line 754 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 754 of file grid_helper.hpp
References neighborHoodIndices().