ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::BinnedArrayXD< T > Class Template Reference

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

#include <Acts/Utilities/BinnedArrayXD.hpp>

Inheritance diagram for Acts::BinnedArrayXD< T >:
[legend]
Collaboration diagram for Acts::BinnedArrayXD< T >:
[legend]

Public Member Functions

 BinnedArrayXD (const BinnedArrayXD< T > &barr)=delete
 Copy constructor.
 BinnedArrayXD (const std::vector< std::vector< std::vector< T > > > &grid, std::unique_ptr< const BinUtility > bu)
 Constructor with a grid and a BinUtility.
 BinnedArrayXD (const std::vector< TAP > &tapvector, std::unique_ptr< const BinUtility > bu)
 Constructor with std::vector and a BinUtility.
 BinnedArrayXD (T object)
 Constructor for single object.
 ~BinnedArrayXD () override=default
 Destructor.
const std::vector< T > & arrayObjects () const final
 Return all unique object.
const BinUtilitybinUtility () const final
 Return the BinUtility.
object (const Vector2 &lposition) const override
 Same method without bins for backward compatibility.
object (const Vector2 &lposition, std::array< std::size_t, 3 > &bins) const final
 Returns the object in the array from a local position.
object (const Vector3 &position) const override
 Same method without bins for backward compatibility.
object (const Vector3 &position, std::array< std::size_t, 3 > &bins) const final
 Returns the object in the array from a global position.
const std::vector< std::vector< std::vector< T > > > & objectGrid () const final
 Return the object grid multiple entries are allowed and wanted.
BinnedArrayXDoperator= (const BinnedArrayXD< T > &barr)=delete
 Assignment operator.
Public Member Functions inherited from Acts::BinnedArray< T >
 BinnedArray ()=default
 Default Constructor - needed for inherited classes.
virtual ~BinnedArray ()=default
 Virtual Destructor.

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

Constructor & Destructor Documentation

◆ BinnedArrayXD() [1/4]

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

Constructor for single object.

Parameters
objectThe single object to store

◆ BinnedArrayXD() [2/4]

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

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

◆ BinnedArrayXD() [3/4]

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

Constructor with a grid and a BinUtility.

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

◆ BinnedArrayXD() [4/4]

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

Copy constructor.

  • not allowed, use the same array

◆ ~BinnedArrayXD()

template<class T>
Acts::BinnedArrayXD< T >::~BinnedArrayXD ( )
overridedefault

Destructor.

Member Function Documentation

◆ arrayObjects()

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

Return all unique object.

Returns
vector of unique array objects

Implements Acts::BinnedArray< T >.

◆ binUtility()

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

Return the BinUtility.

Returns
plain pointer to the bin utility of this array

Implements Acts::BinnedArray< T >.

◆ object() [1/4]

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

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

◆ object() [2/4]

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

Returns the object in the array from a local position.

Todo
check if we can change to triple return at once
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 >.

◆ object() [3/4]

template<class T>
T Acts::BinnedArrayXD< T >::object ( const Vector3 & position) const
overridevirtual

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

◆ object() [4/4]

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

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

◆ objectGrid()

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

Return the object grid multiple entries are allowed and wanted.

Returns
internal object grid

Implements Acts::BinnedArray< T >.

◆ operator=()

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

Assignment operator.

  • not allowed, use the same array