Class Acts::BinnedArray

template<class T>
class Acts::BinnedArray

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 withh nullptr and to allow for nullptr return type

  • the BinnedArray is designed for 0D, 1D, 2D, and 3D binning

Subclassed by Acts::BinnedArrayXD< T >

Public Functions

BinnedArray() = default

Default Constructor - needed for inherited classes.

virtual ~BinnedArray() = default

Virtual Destructor.

virtual const std::vector<T> &arrayObjects() const = 0

Return all unqiue object.

Note

this is the accessor to the

Returns

the vector of all array objects

virtual const BinUtility *binUtility() const = 0

Return the BinUtility.

  • if returned 0 it is a 0D array

Returns

plain pointer to the bin utility

virtual T object(const Vector2 &lposition, std::array<size_t, 3> &bins) const = 0

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

Parameters
  • lposition – is the local position for the object retrieval

  • bins – is the bin triple to filled

Returns

the object according to the estimated bin

inline virtual T object(const Vector2 &lposition) const

Same method without bins for backward compatibility.

Parameters

lposition – is the local position for finding the obect

Returns

the object according to the estimated bin

virtual T object(const Vector3 &position, std::array<size_t, 3> &bin) const = 0

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

Parameters
  • position – is the global position for the object retrieval

  • bin – is the bin triple filled

Returns

the object according to the estimated bin

inline virtual T object(const Vector3 &position) const

Same method without bins for backward compatibility.

Parameters

position – is the global position for the object finding

Returns

the object according to the estimated bin

virtual const std::vector<std::vector<std::vector<T>>> &objectGrid() const = 0

Return the object grid multiple entries are allowed.

Returns

the object grid