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

Pure virtual base class for Binned Array to avoid map searches. More...

#include <Acts/Utilities/BinnedArray.hpp>

Inheritance diagram for Acts::BinnedArray< T >:
[legend]

Public Member Functions

 BinnedArray ()=default
 Default Constructor - needed for inherited classes.
virtual ~BinnedArray ()=default
 Virtual Destructor.
virtual const std::vector< T > & arrayObjects () const =0
 Return all unique object.
virtual const BinUtilitybinUtility () const =0
 Return the BinUtility.
virtual T object (const Vector2 &lposition) const
 Same method without bins for backward compatibility.
virtual T object (const Vector2 &lposition, std::array< std::size_t, 3 > &bins) const =0
 Returns the object in the associated bin according the local position.
virtual T object (const Vector3 &position) const
 Same method without bins for backward compatibility.
virtual T object (const Vector3 &position, std::array< std::size_t, 3 > &bin) const =0
 Returns the object in the associated bin according the local position.
virtual const std::vector< std::vector< std::vector< T > > > & objectGrid () const =0
 Return the object grid multiple entries are allowed.

Detailed Description

template<class T>
class Acts::BinnedArray< T >

Pure virtual base class for Binned Array to avoid map searches.

  • there is only one restriction: T must be of pointer type in order to be initialized with nullptr and to allow for nullptr return type
  • the BinnedArray is designed for 0D, 1D, 2D, and 3D binning

Constructor & Destructor Documentation

◆ BinnedArray()

template<class T>
Acts::BinnedArray< T >::BinnedArray ( )
default

Default Constructor - needed for inherited classes.

◆ ~BinnedArray()

template<class T>
virtual Acts::BinnedArray< T >::~BinnedArray ( )
virtualdefault

Virtual Destructor.

Member Function Documentation

◆ arrayObjects()

template<class T>
virtual const std::vector< T > & Acts::BinnedArray< T >::arrayObjects ( ) const
pure virtual

Return all unique object.

Note
this is the accessor to the
Returns
the vector of all array objects

Implemented in Acts::BinnedArrayXD< T >.

◆ binUtility()

template<class T>
virtual const BinUtility * Acts::BinnedArray< T >::binUtility ( ) const
pure virtual

Return the BinUtility.

  • if returned 0 it is a 0D array
    Returns
    plain pointer to the bin utility

Implemented in Acts::BinnedArrayXD< T >.

◆ object() [1/4]

template<class T>
virtual T Acts::BinnedArray< T >::object ( const Vector2 & lposition) const
virtual

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 in Acts::BinnedArrayXD< T >.

◆ object() [2/4]

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

Returns the object in the associated bin according the local position.

Parameters
lpositionis the local position for the object retrieval
binsis the bin triple to filled
Returns
the object according to the estimated bin

Implemented in Acts::BinnedArrayXD< T >.

◆ object() [3/4]

template<class T>
virtual T Acts::BinnedArray< T >::object ( const Vector3 & position) const
virtual

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 in Acts::BinnedArrayXD< T >.

◆ object() [4/4]

template<class T>
virtual T Acts::BinnedArray< T >::object ( const Vector3 & position,
std::array< std::size_t, 3 > & bin ) const
pure virtual

Returns the object in the associated bin according the local position.

Parameters
positionis the global position for the object retrieval
binis the bin triple filled
Returns
the object according to the estimated bin

Implemented in Acts::BinnedArrayXD< T >.

◆ objectGrid()

template<class T>
virtual const std::vector< std::vector< std::vector< T > > > & Acts::BinnedArray< T >::objectGrid ( ) const
pure virtual

Return the object grid multiple entries are allowed.

Returns
the object grid

Implemented in Acts::BinnedArrayXD< T >.