|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef TRKDETDESCRUTILS_COMPACTBINNEDARRAY2D_H
10 #define TRKDETDESCRUTILS_COMPACTBINNEDARRAY2D_H
43 const std::vector<std::vector<size_t>>& indexarray,
45 const std::vector<Trk::BinUtility*>& bVec)
55 if (indexarray.size() != bingen->
bins())
56 std::cout <<
" problem in construction of CompactBinnedArray2D: index "
57 "array not compatible with BinUtility:"
58 << indexarray.size() <<
"!=" << bingen->
bins() << std::endl;
61 for (
size_t i = 0;
i < indexarray.size();
i++) {
62 for (
size_t j = 0; j < indexarray[
i].size(); j++) {
63 if (indexarray[
i][j] > iMax)
64 iMax = indexarray[
i][j];
67 if (iMax > tclassvector.size() - 1)
69 <<
" problem in construction of CompactBinnedArray2D:runaway index:"
70 << iMax <<
"," << tclassvector.size() << std::endl;
122 for (
unsigned int i = 0;
i <
m_buVec.size();
i++)
168 bool associatedResult =
true)
const
175 if (associatedResult) {
182 if (
dl.second <
ds.second)
233 #endif // TRKDETDESCRUTILS_COMPACTBINNEDARRAY2D_H
T * object(const Amg::Vector2D &lp) const
Returns the pointer to the templated class object from the BinnedArray, it returns 0 if not defined;.
const BinUtility * binUtility() const
Return the BinUtility.
size_t entry(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
const BinUtility * m_binUtility
binUtility
T * object(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray it returns 0 if not defined;.
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.
Eigen::Matrix< double, 2, 1 > Vector2D
BinnedArraySpan< T const *const > arrayObjects() const
Return all objects of the Array const T.
std::vector< BinUtility * > m_buVec
vector of bin utilities for 2nd dim
std::pair< size_t, float > distanceToNext(const Amg::Vector3D &position, const Amg::Vector3D &direction, size_t ba=0) const
Distance estimate to next bin
CompactBinnedArray2D * clone(const std::vector< T * > &ptrs) const
CompactBinnedArray2D * clone() const
Implicit Constructor.
size_t bins(size_t ba=0) const
Number of bins.
T * entryObject(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray - entry point.
const BinUtility * layerBinUtility(const Amg::Vector3D &pos) const
Return the BinUtility.
std::vector< T * > m_arrayObjects
objects
CompactBinnedArray2D & operator=(const CompactBinnedArray2D &barr)
Assignment operator.
unsigned int arrayObjectsNumber() const
Number of Entries in the Array.
~CompactBinnedArray2D()
Virtual Destructor.
CompactBinnedArray2D()
Default Constructor - needed for inherited classes.
Ensure that the ATLAS eigen extensions are properly loaded.
bool inside(const Amg::Vector3D &position) const
Check if bin is inside from Vector3D.
Eigen::Matrix< double, 3, 1 > Vector3D
CompactBinnedArray2D(const CompactBinnedArray2D &barr)
Copy Constructor - copies only pointers !
size_t layerBin(const Amg::Vector3D &pos) const
Return the layer bin.
CompactBinnedArray2D(const std::vector< T * > &tclassvector, const std::vector< std::vector< size_t >> &indexarray, const BinUtility *bingen, const std::vector< Trk::BinUtility * > &bVec)
Constructor with std::vector and a BinUtility.
BinUtility * clone() const
Implizit Constructor.
std::vector< std::vector< size_t > > m_array
vector of indices to objects
size_t bin(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
std::span< T > BinnedArraySpan
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)
BinnedArraySpan< T *const > arrayObjects()
Return all objects of the Array.