ATLAS Offline Software
BinnedArray.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 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 
14 // GaudiKernel
15 #include "GaudiKernel/GaudiException.h"
16 // Eigen
18 
19 // STL
20 #include <span>
21 #include <vector>
22 
23 class MsgStream;
24 
25 namespace Trk {
33 template<class T>
34 using BinnedArraySpan = std::span<T>;
35 
36 template<class T>
38 {
39 
40 public:
43 
45  virtual ~BinnedArray() {}
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 
71 
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::arrayObjects
virtual BinnedArraySpan< T const *const > arrayObjects() const =0
Return all objects of the Array const.
Trk::BinnedArray::binUtility
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
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::BinnedArray
BinnedArray()
Default Constructor - needed for inherited classes.
Definition: BinnedArray.h:42
Trk::BinnedArray::arrayObjectsNumber
virtual unsigned int arrayObjectsNumber() const =0
Number of Entries in the Array.
GeoPrimitives.h
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
Trk::BinnedArray::entryObject
virtual T * entryObject(const Amg::Vector3D &) const =0
Returns the pointer to the templated class object from the BinnedArray - entry point.
SharedObject.h
Trk::BinUtility
Definition: BinUtility.h:39
Trk::BinnedArray::~BinnedArray
virtual ~BinnedArray()
Virtual Destructor.
Definition: BinnedArray.h:45
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::BinnedArray::arrayObjects
virtual BinnedArraySpan< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
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:38
Trk::BinnedArraySpan
std::span< T > BinnedArraySpan
Definition: BinnedArray.h:34
Trk::BinnedArray::clone
virtual BinnedArray * clone() const =0
Implicit constructor.