ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::BinnedArrayXD< T > Class Template Reference

#include <acts/blob/master/Core/include/Acts/Utilities/BinnedArrayXD.hpp>

+ Inheritance diagram for Acts::BinnedArrayXD< T >:
+ Collaboration diagram for Acts::BinnedArrayXD< T >:

Public Member Functions

 BinnedArrayXD (T object)
 
 m_binUtility (nullptr)
 
 BinnedArrayXD (const std::vector< TAP > &tapvector, std::unique_ptr< const BinUtility > bu)
 
 BinnedArrayXD (const std::vector< std::vector< std::vector< T >>> &grid, std::unique_ptr< const BinUtility > bu)
 
 BinnedArrayXD (const BinnedArrayXD< T > &barr)=delete
 
BinnedArrayXDoperator= (const BinnedArrayXD< T > &barr)=delete
 
 ~BinnedArrayXD () override=default
 Destructor.
 
T object (const Vector2D &lposition, std::array< size_t, 3 > &bins) const final
 
T object (const Vector2D &lposition) const override
 
T object (const Vector3D &position, std::array< size_t, 3 > &bins) const final
 
T object (const Vector3D &position) const override
 
const std::vector< T > & arrayObjects () const final
 
const std::vector< std::vector
< std::vector< T > > > & 
objectGrid () const final
 
std::vector< TobjectCluster (const std::array< size_t, 3 > &binTriple) const override
 
const BinUtilitybinUtility () const final
 
- Public Member Functions inherited from Acts::BinnedArray< T >
 BinnedArray ()=default
 Default Constructor - needed for inherited classes.
 
virtual ~BinnedArray ()=default
 Virtual Destructor.
 

Private Types

using TAP = std::pair< T, Vector3D >
 typedef the object and position for readability
 

Private Attributes

std::vector< std::vector
< std::vector< T > > > 
m_objectGrid
 the data store - a 3D array at default
 
std::vector< Tm_arrayObjects
 Vector of unique Array objects.
 
std::unique_ptr< const BinUtilitym_binUtility
 binUtility for retrieving and filling the Array
 

Detailed Description

template<class T>
class Acts::BinnedArrayXD< T >

Avoiding a map search, the templated BinnedArray class can help ordereing geometrical objects by providing a dedicated BinUtility.

This can be 0D, 1D, 2D, and 3D in regular binning

the type of Binning is given defined through the BinUtility

Definition at line 33 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 33 of file BinnedArrayXD.hpp

Member Typedef Documentation

template<class T>
using Acts::BinnedArrayXD< T >::TAP = std::pair<T, Vector3D>
private

typedef the object and position for readability

Definition at line 35 of file BinnedArrayXD.hpp.

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

Constructor & Destructor Documentation

template<class T>
Acts::BinnedArrayXD< T >::BinnedArrayXD ( T  object)
inline

Constructor for single object

Template Parameters
objectis the single object

Definition at line 41 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 41 of file BinnedArrayXD.hpp

template<class T>
Acts::BinnedArrayXD< T >::BinnedArrayXD ( const std::vector< TAP > &  tapvector,
std::unique_ptr< const BinUtility bu 
)
inline

Constructor with std::vector and a BinUtility

  • fills the internal data structur
Parameters
tapvectoris a vector of object and binning position
buis the unique bin utility for this binned array

reserve the right amount of data

loop over the object & position for ordering

check for inside

fill the data

fill the unique m_arrayObjects

Definition at line 56 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 56 of file BinnedArrayXD.hpp

References Acts::BinnedArrayXD< T >::m_arrayObjects, Acts::BinnedArrayXD< T >::m_binUtility, and Acts::BinnedArrayXD< T >::m_objectGrid.

template<class T>
Acts::BinnedArrayXD< T >::BinnedArrayXD ( const std::vector< std::vector< std::vector< T >>> &  grid,
std::unique_ptr< const BinUtility bu 
)
inline

Constructor with a grid and a BinUtility

Parameters
gridis the prepared object grid
buis the unique bin utility for this binned array

reserve the right amount of data

loop over the object & position for ordering

fill the unique m_arrayObjects

Definition at line 88 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 88 of file BinnedArrayXD.hpp

References Acts::BinnedArrayXD< T >::m_arrayObjects, Acts::BinnedArrayXD< T >::m_binUtility, and Acts::BinnedArrayXD< T >::m_objectGrid.

template<class T>
Acts::BinnedArrayXD< T >::BinnedArrayXD ( const BinnedArrayXD< T > &  barr)
delete

Copy constructor

  • not allowed, use the same array
template<class T>
Acts::BinnedArrayXD< T >::~BinnedArrayXD ( )
overridedefault

Destructor.

Member Function Documentation

template<class T>
const std::vector<T>& Acts::BinnedArrayXD< T >::arrayObjects ( ) const
inlinefinalvirtual

Return all unqiue object

Returns
vector of unique array objects

Implements Acts::BinnedArray< T >.

Definition at line 175 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 175 of file BinnedArrayXD.hpp

References Acts::BinnedArrayXD< T >::m_arrayObjects.

template<class T>
const BinUtility* Acts::BinnedArrayXD< T >::binUtility ( ) const
inlinefinalvirtual

Return the BinUtility

Returns
plain pointer to the bin utility of this array

Implements Acts::BinnedArray< T >.

Definition at line 232 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 232 of file BinnedArrayXD.hpp

References Acts::BinnedArrayXD< T >::m_binUtility.

template<class T>
Acts::BinnedArrayXD< T >::m_binUtility ( nullptr  )
inline

fill the single object into the object grid

Definition at line 46 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 46 of file BinnedArrayXD.hpp

References Acts::BinnedArrayXD< T >::m_objectGrid, and Acts::BinnedArrayXD< T >::object().

+ Here is the call graph for this function:

template<class T>
T Acts::BinnedArrayXD< T >::object ( const Vector2D lposition,
std::array< size_t, 3 > &  bins 
) const
inlinefinalvirtual

Returns the object in the array from a local position

Parameters
lpositionis the local position for the bin search
binsis the bin triple filled during this access
Returns
is the object in that bin

Implements Acts::BinnedArray< T >.

Definition at line 133 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 133 of file BinnedArrayXD.hpp

References Acts::BinnedArrayXD< T >::m_binUtility, and Acts::BinnedArrayXD< T >::m_objectGrid.

Referenced by Acts::BinnedArrayXD< T >::m_binUtility(), Acts::BinnedArrayXD< T >::object(), and Acts::BinnedArrayXD< T >::objectCluster().

+ Here is the caller graph for this function:

template<class T>
T Acts::BinnedArrayXD< T >::object ( const Vector2D lposition) const
inlineoverridevirtual

Same method without bins for backward compatibility

Parameters
lpositionis the local position for finding the obect
Returns
the object according to the estimated bin

Reimplemented from Acts::BinnedArray< T >.

Definition at line 145 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 145 of file BinnedArrayXD.hpp

References Acts::BinnedArrayXD< T >::object().

+ Here is the call graph for this function:

template<class T>
T Acts::BinnedArrayXD< T >::object ( const Vector3D position,
std::array< size_t, 3 > &  bins 
) const
inlinefinalvirtual

Returns the object in the array from a global position

Parameters
positionis the global position for the bin search
binsis the bins triple filled during access
Returns
is the object in that bin

Implements Acts::BinnedArray< T >.

Definition at line 156 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 156 of file BinnedArrayXD.hpp

References Acts::BinnedArrayXD< T >::m_binUtility, and Acts::BinnedArrayXD< T >::m_objectGrid.

template<class T>
T Acts::BinnedArrayXD< T >::object ( const Vector3D position) const
inlineoverridevirtual

Same method without bins for backward compatibility

Parameters
positionis the global position for the object finding
Returns
the object according to the estimated bin

Reimplemented from Acts::BinnedArray< T >.

Definition at line 168 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 168 of file BinnedArrayXD.hpp

References Acts::BinnedArrayXD< T >::object().

+ Here is the call graph for this function:

template<class T>
std::vector<T> Acts::BinnedArrayXD< T >::objectCluster ( const std::array< size_t, 3 > &  binTriple) const
inlineoverridevirtual

Returns the object according to the bin triple and their neighbour objects (if different)

Parameters
binTripleis the binning
Returns
a vector of unique objects

Implements Acts::BinnedArray< T >.

Definition at line 190 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 190 of file BinnedArrayXD.hpp

References Acts::BinnedArrayXD< T >::m_binUtility, Acts::BinnedArrayXD< T >::m_objectGrid, Acts::BinnedArrayXD< T >::object(), and T.

+ Here is the call graph for this function:

template<class T>
const std::vector<std::vector<std::vector<T> > >& Acts::BinnedArrayXD< T >::objectGrid ( ) const
inlinefinalvirtual

Return the object grid multiple entries are allowed and wanted

Returns
internal object grid

Implements Acts::BinnedArray< T >.

Definition at line 180 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 180 of file BinnedArrayXD.hpp

References Acts::BinnedArrayXD< T >::m_objectGrid.

template<class T>
BinnedArrayXD& Acts::BinnedArrayXD< T >::operator= ( const BinnedArrayXD< T > &  barr)
delete

Assignment operator

  • not allowed, use the same array

Member Data Documentation

template<class T>
std::vector<T> Acts::BinnedArrayXD< T >::m_arrayObjects
private

Vector of unique Array objects.

Definition at line 238 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 238 of file BinnedArrayXD.hpp

Referenced by Acts::BinnedArrayXD< T >::arrayObjects(), and Acts::BinnedArrayXD< T >::BinnedArrayXD().

template<class T>
std::unique_ptr<const BinUtility> Acts::BinnedArrayXD< T >::m_binUtility
private

binUtility for retrieving and filling the Array

Definition at line 240 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 240 of file BinnedArrayXD.hpp

Referenced by Acts::BinnedArrayXD< T >::BinnedArrayXD(), Acts::BinnedArrayXD< T >::binUtility(), Acts::BinnedArrayXD< T >::object(), and Acts::BinnedArrayXD< T >::objectCluster().

template<class T>
std::vector<std::vector<std::vector<T> > > Acts::BinnedArrayXD< T >::m_objectGrid
private

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