Analysis Software
Documentation for sPHENIX simulation software
|
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< ActsScalar, 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< ActsScalar, 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< ActsScalar, 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< ActsScalar, sizeof...(Axes)> | getMin (const std::tuple< Axes...> &axes) |
get the minimum value of all axes of one grid | |
template<class... Axes> | |
static std::array< ActsScalar, sizeof...(Axes)> | getMax (const std::tuple< Axes...> &axes) |
get the maximum value of all axes of one grid | |
template<class... Axes> | |
static std::array< ActsScalar, 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 GlobalNeighborHoodIndices < sizeof...(Axes)> | neighborHoodIndices (const std::array< size_t, sizeof...(Axes)> &localIndices, std::array< std::pair< int, int >, sizeof...(Axes)> &sizes, const std::tuple< Axes...> &axes) |
get global bin indices for bins in specified neighborhood for each axis | |
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 495 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 495 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 508 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 508 of file grid_helper.hpp
References Acts::Experimental::detail::localIndices(), and 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 856 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 856 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array, Acts::detail::grid_helper_impl< N >::exteriorBinIndices(), ambiguity_solver_full_chain::idx, and Acts::Logging::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 672 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 672 of file grid_helper.hpp
References arr, and TauVsDIS_MachineLearning_Differentiation::array.
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 525 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 525 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array, Acts::detail::grid_helper_impl< N >::getBinCenter(), Acts::Experimental::detail::localIndices(), and Acts::Logging::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 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 >::getGlobalBin(), and Acts::Logging::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 573 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 573 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array, Acts::detail::grid_helper_impl< N >::getLocalBinIndices(), and Acts::Logging::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 594 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 594 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array, Acts::detail::grid_helper_impl< N >::getLocalBinIndices(), and Acts::Logging::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 615 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 615 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array, Acts::detail::grid_helper_impl< N >::getLowerLeftBinEdge(), Acts::Experimental::detail::localIndices(), and Acts::Logging::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 639 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 639 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::getLowerLeftBinIndices(), Acts::Experimental::detail::localIndices(), and Acts::Logging::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 742 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 742 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array.
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 729 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 729 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array.
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 658 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 658 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array.
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 689 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 689 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array, Acts::detail::grid_helper_impl< N >::getUpperRightBinEdge(), Acts::Experimental::detail::localIndices(), and Acts::Logging::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 713 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 713 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::getUpperRightBinIndices(), Acts::Experimental::detail::localIndices(), and Acts::Logging::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 755 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 755 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array.
Referenced by Acts::detail::Grid< external_spacepoint_t >::binWidth(), and 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 882 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 882 of file grid_helper.hpp
References Acts::detail::grid_helper_impl< N >::isInside(), and Acts::Logging::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 783 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 783 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array, getNBins(), Acts::Experimental::detail::localIndices(), Acts::Logging::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 802 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 802 of file grid_helper.hpp
References Acts::Experimental::detail::localIndices(), neighborHoodIndices(), and size.
|
inlinestatic |
get global bin indices for bins in specified neighborhood for each axis
Axes | parameter pack of axis types defining the grid |
[in] | localIndices | local bin indices along each axis |
[in] | size | size of neighborhood for each axis, which 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 831 of file grid_helper.hpp.
View newest version in sPHENIX GitHub at line 831 of file grid_helper.hpp
References TauVsDIS_MachineLearning_Differentiation::array, getNBins(), Acts::Experimental::detail::localIndices(), Acts::Logging::MAX, and Acts::detail::grid_helper_impl< N >::neighborHoodIndices().