EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::detail::grid_helper Struct Reference

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
 

Detailed Description

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

Member Function Documentation

template<class... Axes>
static GlobalNeighborHoodIndices<sizeof...(Axes)> Acts::detail::grid_helper::closestPointsIndices ( const std::array< size_t, sizeof...(Axes)> &  localIndices,
const std::tuple< Axes...> &  axes 
)
inlinestatic

get the global indices for closest points on grid

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]binglobal bin index for bin of interest
[in]axesactual axis objects spanning the grid
Returns
Sorted collection of global bin indices for bins whose lower-left corners are the closest points on the grid to every point in the given bin
Note
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class... Axes>
static std::set<size_t> Acts::detail::grid_helper::exteriorBinIndices ( const std::tuple< Axes...> &  axes)
inlinestatic

get bin indices of all overflow and underflow bins

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]axesactual axis objects spanning the grid
Returns
set of global bin indices for all over- and underflow bins

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class... Axes>
static std::array<const IAxis*, sizeof...(Axes)> Acts::detail::grid_helper::getAxes ( const std::tuple< Axes...> &  axes)
inlinestatic

return an array with copies of the axes, converted to type AnyAxis

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]axesactual axis objects spanning the grid
Returns
array with copies of the axis

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().

+ Here is the caller graph for this function:

template<class... Axes>
static std::array<double, sizeof...(Axes)> Acts::detail::grid_helper::getBinCenter ( const std::array< size_t, sizeof...(Axes)> &  localIndices,
const std::tuple< Axes...> &  axes 
)
inlinestatic

retrieve bin center from set of local bin indices

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]localIndiceslocal bin indices along each axis
[in]axesactual axis objects spanning the grid
Returns
center position of bin
Precondition
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class... Axes>
static size_t Acts::detail::grid_helper::getGlobalBin ( const std::array< size_t, sizeof...(Axes)> &  localBins,
const std::tuple< Axes...> &  axes 
)
inlinestatic

determine global bin index from local indices along each axis

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]localBinslocal bin indices along each axis
[in]axesactual axis objects spanning the grid
Returns
global index for bin defined by the local bin indices
Precondition
All local bin indices must be a valid index for the corresponding axis (including the under-/overflow bin for this axis).

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class Point , class... Axes>
static std::array<size_t, sizeof...(Axes)> Acts::detail::grid_helper::getLocalBinIndices ( const Point &  point,
const std::tuple< Axes...> &  axes 
)
inlinestatic

determine local bin index for each axis from point

Template Parameters
Pointany type with point semantics supporting component access through operator[]
Axesparameter pack of axis types defining the grid
Parameters
[in]pointpoint to look up in the grid
[in]axesactual axis objects spanning the grid
Returns
array with local bin indices along each axis (in same order as given axes object)
Precondition
The given Point type must represent a point in d (or higher) dimensions where d is the number of axis objects in the tuple.
Note
This could be a under-/overflow bin along one or more axes.

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class... Axes>
static std::array<size_t, sizeof...(Axes)> Acts::detail::grid_helper::getLocalBinIndices ( size_t  bin,
const std::tuple< Axes...> &  axes 
)
inlinestatic

determine local bin index for each axis from global bin index

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]binglobal bin index
[in]axesactual axis objects spanning the grid
Returns
array with local bin indices along each axis (in same order as given axes object)
Note
Local bin indices can contain under-/overflow bins along any axis.

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.

+ Here is the call graph for this function:

template<class... Axes>
static std::array<double, sizeof...(Axes)> Acts::detail::grid_helper::getLowerLeftBinEdge ( const std::array< size_t, sizeof...(Axes)> &  localIndices,
const std::tuple< Axes...> &  axes 
)
inlinestatic

retrieve lower-left bin edge from set of local bin indices

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]localIndiceslocal bin indices along each axis
[in]axesactual axis objects spanning the grid
Returns
generalized lower-left bin edge
Precondition
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class... Axes>
static std::array<size_t, sizeof...(Axes)> Acts::detail::grid_helper::getLowerLeftBinIndices ( const std::array< size_t, sizeof...(Axes)> &  localIndices,
const std::tuple< Axes...> &  axes 
)
inlinestatic

get local bin indices for lower-left neighboring bin

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]localIndiceslocal bin indices along each axis
[in]axesactual axis objects spanning the grid
Returns
array with local bin indices of lower-left neighbor bin
Precondition
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.

+ Here is the call graph for this function:

template<class... Axes>
static std::array<double, sizeof...(Axes)> Acts::detail::grid_helper::getMax ( const std::tuple< Axes...> &  axes)
inlinestatic

get the maximum value of all axes of one grid

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]axesactual axis objects spanning the grid
Returns
array returning the maxima of all given axes

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().

+ Here is the caller graph for this function:

template<class... Axes>
static std::array<double, sizeof...(Axes)> Acts::detail::grid_helper::getMin ( const std::tuple< Axes...> &  axes)
inlinestatic

get the minimum value of all axes of one grid

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]axesactual axis objects spanning the grid
Returns
array returning the minima of all given axes

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().

+ Here is the caller graph for this function:

template<class... Axes>
static std::array<size_t, sizeof...(Axes)> Acts::detail::grid_helper::getNBins ( const std::tuple< Axes...> &  axes)
inlinestatic

calculate number of bins in a grid defined by a set of axes for each axis

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]axesactual axis objects spanning the grid
Returns
array of number of bins for each axis of the grid
Note
This does not include under-/overflow bins along each axis.

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().

+ Here is the caller graph for this function:

template<class... Axes>
static std::array<double, sizeof...(Axes)> Acts::detail::grid_helper::getUpperRightBinEdge ( const std::array< size_t, sizeof...(Axes)> &  localIndices,
const std::tuple< Axes...> &  axes 
)
inlinestatic

retrieve upper-right bin edge from set of local bin indices

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]localIndiceslocal bin indices along each axis
[in]axesactual axis objects spanning the grid
Returns
generalized upper-right bin edge
Precondition
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class... Axes>
static std::array<size_t, sizeof...(Axes)> Acts::detail::grid_helper::getUpperRightBinIndices ( const std::array< size_t, sizeof...(Axes)> &  localIndices,
const std::tuple< Axes...> &  axes 
)
inlinestatic

get local bin indices for upper-right neighboring bin

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]localIndiceslocal bin indices along each axis
[in]axesactual axis objects spanning the grid
Returns
array with local bin indices of upper-right neighbor bin
Precondition
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.

+ Here is the call graph for this function:

template<class... Axes>
static std::array<double, sizeof...(Axes)> Acts::detail::grid_helper::getWidth ( const std::tuple< Axes...> &  axes)
inlinestatic

get the bin width of all axes of one grid

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]axesactual axis objects spanning the grid
Returns
array returning the maxima of all given axes

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().

+ Here is the caller graph for this function:

template<class Point , class... Axes>
static bool Acts::detail::grid_helper::isInside ( const Point &  position,
const std::tuple< Axes...> &  axes 
)
inlinestatic

check whether given point is inside axes limits

Template Parameters
Pointany type with point semantics supporting component access through operator[]
Axesparameter pack of axis types defining the grid
Parameters
[in]positionpoint to look up in the grid
[in]axesactual axis objects spanning the grid
Returns
true if $\text{xmin_i} \le x_i < \text{xmax}_i \forall i=0, \dots, d-1$, otherwise false
Precondition
The given 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class... Axes>
static GlobalNeighborHoodIndices<sizeof...(Axes)> Acts::detail::grid_helper::neighborHoodIndices ( const std::array< size_t, sizeof...(Axes)> &  localIndices,
std::pair< size_t, size_t >  sizes,
const std::tuple< Axes...> &  axes 
)
inlinestatic

get global bin indices for bins in specified neighborhood

Template Parameters
Axesparameter pack of axis types defining the grid
Parameters
[in]localIndiceslocal bin indices along each axis
[in]sizesize of neighborhood determining how many adjacent bins along each axis are considered
[in]axesactual axis objects spanning the grid
Returns
Sorted collection of global bin indices for all bins in the neighborhood
Note
Over-/underflow bins are included in the neighborhood.
The 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 $2 \times \text{size}+1$ along each dimension.
The concrete bins which are returned depend on the WrappingTypes of the contained axes

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class... Axes>
static GlobalNeighborHoodIndices<sizeof...(Axes)> Acts::detail::grid_helper::neighborHoodIndices ( const std::array< size_t, sizeof...(Axes)> &  localIndices,
size_t  size,
const std::tuple< Axes...> &  axes 
)
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().

+ Here is the call graph for this function:


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