Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef TRKDETDESCRUTILS_BINNEDARRAY1D_H
10 #define TRKDETDESCRUTILS_BINNEDARRAY1D_H
45 const std::vector<std::pair<std::shared_ptr<T>,
Amg::Vector3D>>& tclassvector,
54 const std::vector<std::pair<std::shared_ptr<T>,
Amg::Vector3D>>& tclassvector,
115 bool associatedResult =
true)
const
147 std::unique_ptr<std::vector<T*>>
arrayObjects = std::make_unique<std::vector<T*>>();
150 for (
size_t ill = 0; ill <
bins; ++ill) {
159 size_t vecsize = tclassvector.size();
160 m_array = std::vector<std::shared_ptr<T>>(vecsize);
165 ((tclassvector)[
ivec]).first;
167 throw GaudiException(
"BinnedArray1D constructor",
168 "Object outside bounds", StatusCode::FAILURE);
181 #endif // TRKSURFACES_BINNEDARRAY1D_H
size_t entry(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
std::vector< std::shared_ptr< T > > m_array
1D vector of cached not owning pointers to class T
Eigen::Matrix< double, 2, 1 > Vector2D
Cached pointer with atomic update.
BinnedArray1D & operator=(BinnedArray1D &&)=default
BinnedArray1D(BinnedArray1D &&)=default
BinnedArraySpan< T *const > arrayObjects()
Return all objects of the Array non-const T.
BinnedArray1D * clone() const
Implicit Constructor.
size_t bins(size_t ba=0) const
Number of bins.
BinnedArray1D(const BinnedArray1D &barr)
Copy.
T * entryObject(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray - entry point.
const BinUtility * binUtility() const
Return the BinUtility.
BinnedArray1D & operator=(const BinnedArray1D &barr)
Assignment.
void createArrayCache() const
Cached unique_ptr 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.
T * object(const Amg::Vector2D &lp) const
Returns the pointer to the templated class object from the BinnedArray, it returns nullptr if not def...
BinnedArraySpan< T const *const > arrayObjects() const
Return all objects of the Array const T.
BinnedArray1D(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector, const BinUtility &bingen)
ctors with arguments
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
T * object(const Amg::Vector3D &gp) const
Returns the pointer to the templated class object from the BinnedArray it returns nullptr if not defi...
CxxUtils::CachedUniquePtr< std::vector< T * > > m_arrayObjects
binUtility for retrieving and filling the Array
unsigned int arrayObjectsNumber() const
Number of Entries in the Array.
void initialize(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector)
vector of pointers to the class T
size_t bin(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
BinnedArray1D(const std::vector< std::pair< std::shared_ptr< T >, Amg::Vector3D >> &tclassvector, BinUtility &&bingen)
vec_fb< typename boost::int_t< sizeof(T) *8 >::exact, N > ivec
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)