ATLAS Offline Software
BinnedArray.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // BinnedArray.h, (c) ATLAS Detector software
8 
9 #ifndef TRKDETDESCRUTILS_BINNEDARRAY_H
10 #define TRKDETDESCRUTILS_BINNEDARRAY_H
11 
13 // GaudiKernel
14 #include "GaudiKernel/GaudiException.h"
15 // Eigen
17 
18 // STL
19 #include <span>
20 #include <vector>
21 #include <memory>
22 
23 class MsgStream;
24 
25 namespace Trk {
34 template<class T>
36 {
37 
38 public:
39  //Make sure derived classes can get everything
40  BinnedArray() = default;
41  BinnedArray(const BinnedArray&) = default;
42  BinnedArray(BinnedArray&&) = default;
43  BinnedArray& operator=(const BinnedArray&) = default;
45  virtual ~BinnedArray() = default;
46 
48  virtual BinnedArray* clone() const = 0;
49 
52  virtual T* object(const Amg::Vector2D& lp) const = 0;
53 
56  virtual T* object(const Amg::Vector3D& gp) const = 0;
57 
60  virtual T* entryObject(const Amg::Vector3D&) const = 0;
61 
64  virtual T* nextObject(const Amg::Vector3D& gp,
65  const Amg::Vector3D& mom,
66  bool associatedResult = true) const = 0;
67 
70  virtual std::span<T* const> arrayObjects() = 0;
71 
73  virtual std::span<T const * const> arrayObjects() const = 0;
74 
76  virtual unsigned int arrayObjectsNumber() const = 0;
77 
79  virtual const BinUtility* binUtility() const = 0;
80 
81 private:
82 };
83 } // end of namespace Trk
84 
85 #endif // TRKDETDESCRUTILS_BINNEDARRAY_H
Trk::BinnedArray::binUtility
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
Trk::BinnedArray::BinnedArray
BinnedArray(BinnedArray &&)=default
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::BinnedArray::nextObject
virtual T * nextObject(const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool associatedResult=true) const =0
Returns the pointer to the templated class object from the BinnedArray, takes 3D position & direction...
BinUtility.h
Trk::BinnedArray::object
virtual T * object(const Amg::Vector2D &lp) const =0
Returns the pointer to the templated class object from the BinnedArray, it returns 0 if not defined,...
Trk::BinnedArray::arrayObjectsNumber
virtual unsigned int arrayObjectsNumber() const =0
Number of Entries in the Array.
Trk::BinnedArray::~BinnedArray
virtual ~BinnedArray()=default
GeoPrimitives.h
Trk::BinnedArray::arrayObjects
virtual std::span< T const *const > arrayObjects() const =0
Return all objects of the Array const.
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
Trk::BinnedArray::operator=
BinnedArray & operator=(BinnedArray &&)=default
Trk::BinnedArray::entryObject
virtual T * entryObject(const Amg::Vector3D &) const =0
Returns the pointer to the templated class object from the BinnedArray - entry point.
Trk::BinnedArray::arrayObjects
virtual std::span< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
Trk::BinUtility
Definition: BinUtility.h:39
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::BinnedArray::BinnedArray
BinnedArray(const BinnedArray &)=default
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::BinnedArray::operator=
BinnedArray & operator=(const BinnedArray &)=default
Trk::BinnedArray::BinnedArray
BinnedArray()=default
Trk::BinnedArray::object
virtual T * object(const Amg::Vector3D &gp) const =0
Returns the pointer to the templated class object from the BinnedArray it returns 0 if not defined,...
Trk::BinnedArray
Definition: BinnedArray.h:36
Trk::BinnedArray::clone
virtual BinnedArray * clone() const =0
Implicit constructor.