Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef TRKDETDESCRUTILS_BINNEDARRAY2D_H
10 #define TRKDETDESCRUTILS_BINNEDARRAY2D_H
12 #include "GaudiKernel/GaudiException.h"
48 const std::vector<std::pair<std::shared_ptr<T>,
Amg::Vector3D>>& tclassvector,
57 const std::vector<std::pair<std::shared_ptr<T>,
Amg::Vector3D>>& tclassvector,
118 bool associatedResult =
true)
const
121 if (associatedResult){
127 return (nextFirst > 0 && nextSecond > 0)
159 std::unique_ptr<std::vector<T*>>
arrayObjects = std::make_unique<std::vector<T*>>();
176 size_t vecsize = tclassvector.size();
183 throw GaudiException(
"BinnedArray2D",
"Object outside bounds",
184 StatusCode::FAILURE);
189 std::vector<std::vector<std::shared_ptr<T>>>
m_array{};
198 #endif // TRKSURFACES_BINNEDARRAY2D_H
size_t entry(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
BinnedArray2D & operator=(const BinnedArray2D &barr)
Assignment operator.
unsigned int arrayObjectsNumber() const
Number of Entries in the Array.
std::span< T const *const > arrayObjects() const
Return all objects of the Array const T.
T * object(const Amg::Vector2D &lp) const
Returns the pointer to the templated class object from the BinnedArray, it returns nullptr if not def...
void initialize(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector)
vector of pointers to the class T
BinnedArray2D & operator=(BinnedArray2D &&)=default
Eigen::Matrix< double, 2, 1 > Vector2D
const BinUtility * binUtility() const
Return the BinUtility.
std::span< T *const > arrayObjects()
Return all objects of the Array non-const T.
T * entryObject(const Amg::Vector3D &pos) const
Returns the pointer to the templated class object from the BinnedArray -entry point.
Cached pointer with atomic update.
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.
BinnedArray2D(const BinnedArray2D &barr)
Copy Constructor !
BinnedArray2D(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector, BinUtility &&bingen)
size_t bins(size_t ba=0) const
Number of bins.
CxxUtils::CachedUniquePtr< std::vector< T * > > m_arrayObjects
binUtility for retrieving and filling the Array
std::vector< std::vector< std::shared_ptr< T > > > m_array
1D vector of cached not owning pointers to class T
Ensure that the ATLAS eigen extensions are properly loaded.
bool inside(const Amg::Vector3D &position) const
Check if bin is inside from Vector3D.
void createArrayCache() const
Eigen::Matrix< double, 3, 1 > Vector3D
BinnedArray2D(BinnedArray2D &&)=default
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
T * object(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray it returns nullptr if not defi...
BinnedArray2D * 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)
vec_fb< typename boost::int_t< sizeof(T) *8 >::exact, N > ivec
BinnedArray2D(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector, const BinUtility &bingen)
Constructors with arguments.
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)