EIC 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 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 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, Vector3D>
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 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 57 of file BinnedArrayXD.hpp.

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

References charm_jet_strange_helicity::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 unqiue 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 233 of file BinnedArrayXD.hpp.

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

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

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

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

References charm_jet_strange_helicity::bins, and 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 157 of file BinnedArrayXD.hpp.

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

References charm_jet_strange_helicity::bins, Acts::BinnedArrayXD< T >::m_binUtility, Acts::BinnedArrayXD< T >::m_objectGrid, and Acts::VectorHelpers::position().

+ Here is the call graph for this function:

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

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

References charm_jet_strange_helicity::bins, and 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 191 of file BinnedArrayXD.hpp.

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

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

View newest version in sPHENIX GitHub at line 241 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: