Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::BinnedArrayXD< T > Class Template Reference

#include <acts/blob/sPHENIX/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 Vector2 &lposition, std::array< size_t, 3 > &bins) const final
 
T object (const Vector2 &lposition) const override
 
T object (const Vector3 &position, std::array< size_t, 3 > &bins) const final
 
T object (const Vector3 &position) const override
 
const std::vector< T > & arrayObjects () const final
 
const std::vector< std::vector
< std::vector< T > > > & 
objectGrid () const final
 
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, Vector3 >
 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 34 of file BinnedArrayXD.hpp.

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

Member Typedef Documentation

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

typedef the object and position for readability

Definition at line 36 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 36 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 42 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 42 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 structure
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 57 of file BinnedArrayXD.hpp.

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

References bins, 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 89 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 89 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 unique object

Returns
vector of unique array objects

Implements Acts::BinnedArray< T >.

Definition at line 176 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 176 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 187 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 187 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 47 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 47 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 Vector2 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 134 of file BinnedArrayXD.hpp.

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

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

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

+ Here is the caller graph for this function:

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

Same method without bins for backward compatibility

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

Reimplemented from Acts::BinnedArray< T >.

Definition at line 146 of file BinnedArrayXD.hpp.

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

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

+ Here is the call graph for this function:

template<class T>
T Acts::BinnedArrayXD< T >::object ( const Vector3 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 157 of file BinnedArrayXD.hpp.

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

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

template<class T>
T Acts::BinnedArrayXD< T >::object ( const Vector3 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 169 of file BinnedArrayXD.hpp.

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

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

+ 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 181 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 181 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 193 of file BinnedArrayXD.hpp.

View newest version in sPHENIX GitHub at line 193 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 195 of file BinnedArrayXD.hpp.

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

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

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

the data store - a 3D array at default

Definition at line 191 of file BinnedArrayXD.hpp.

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

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


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