|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef TRKDETDESCRUTILS_COMPACTBINNEDARRAY1D_H
10 #define TRKDETDESCRUTILS_COMPACTBINNEDARRAY1D_H
44 const std::vector<size_t>& indexvector,
54 if (indexvector.size() != bingen->
bins())
55 std::cout <<
" problem in construction of CompactBinnedArray1D: number "
56 "of indexes not compatible with BinUtility:"
57 << indexvector.size() <<
"!=" << bingen->
bins() << std::endl;
59 unsigned int iMax = 0;
60 for (
unsigned int i = 0;
i < indexvector.size();
i++)
61 if (indexvector[
i] > iMax)
62 iMax = indexvector[
i];
63 if (iMax > tclassvector.size() - 1)
65 <<
" problem in construction of CompactBinnedArray1D:runaway index:"
66 << iMax <<
"," << tclassvector.size() << std::endl;
144 bool associatedResult =
true)
const
194 #endif // TRKDETDESCRUTILS_COMPACTBINNEDARRAY1D_H
size_t entry(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
const BinUtility * binUtility() const
Return the BinUtility.
BinUtility * m_binUtility
binUtility
BinnedArraySpan< T const *const > arrayObjects() const
Return all objects of the Array const T.
Eigen::Matrix< double, 2, 1 > Vector2D
T * object(const Amg::Vector2D &lp) const
Returns the pointer to the templated class object from the BinnedArray, it returns 0 if not defined;.
unsigned int arrayObjectsNumber() const
Number of Entries in the Array.
size_t layerBin(const Amg::Vector3D &pos) const
Return the layer bin.
size_t bins(size_t ba=0) const
Number of bins.
std::vector< T * > m_arrayObjects
objects
BinnedArraySpan< T *const > arrayObjects()
Return all objects of the Array non const T.
~CompactBinnedArray1D()
Virtual Destructor.
CompactBinnedArray1D(const CompactBinnedArray1D &barr)
Copy Constructor - copies only pointers !
CompactBinnedArray1D()
Default Constructor - needed for inherited classes.
T * nextObject(const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool associatedResult=true) const
Returns the pointer to the templated class object from the BinnedArray.
CompactBinnedArray1D(const std::vector< T * > &tclassvector, const std::vector< size_t > &indexvector, BinUtility *bingen)
Constructor with std::vector and a BinUtility.
Ensure that the ATLAS eigen extensions are properly loaded.
bool inside(const Amg::Vector3D &position) const
Check if bin is inside from Vector3D.
std::vector< size_t > m_array
vector of indices to objects
T * object(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray it returns 0 if not defined;.
Eigen::Matrix< double, 3, 1 > Vector3D
CompactBinnedArray1D * clone(const std::vector< T * > &ptrs) const
CompactBinnedArray1D * clone() const
Implicit Constructor.
BinUtility * clone() const
Implizit Constructor.
size_t bin(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
const BinUtility * layerBinUtility(const Amg::Vector3D &) const
Return the BinUtility.
CompactBinnedArray1D & operator=(const CompactBinnedArray1D &barr)
Assignment operator.
std::span< T > BinnedArraySpan
T * entryObject(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray - entry point.
size_t next(const Amg::Vector3D &position, const Amg::Vector3D &direction, size_t ba=0) const
Bin from a 3D vector (already in binning frame)