Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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:
41  //Make sure derived classes can get everything
42  BinnedArray() = default;
43  BinnedArray(const BinnedArray&) = default;
44  BinnedArray(BinnedArray&&) = default;
45  BinnedArray& operator=(const BinnedArray&) = default;
47  virtual ~BinnedArray() = default;
48 
50  virtual BinnedArray* clone() const = 0;
51 
54  virtual T* object(const Amg::Vector2D& lp) const = 0;
55 
58  virtual T* object(const Amg::Vector3D& gp) const = 0;
59 
62  virtual T* entryObject(const Amg::Vector3D&) const = 0;
63 
66  virtual T* nextObject(const Amg::Vector3D& gp,
67  const Amg::Vector3D& mom,
68  bool associatedResult = true) const = 0;
69 
73 
76 
78  virtual unsigned int arrayObjectsNumber() const = 0;
79 
81  virtual const BinUtility* binUtility() const = 0;
82 
83 private:
84 };
85 } // end of namespace Trk
86 
87 #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.
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
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.
SharedObject.h
Trk::BinUtility
Definition: BinUtility.h:39
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.
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:38
Trk::BinnedArraySpan
std::span< T > BinnedArraySpan
Definition: BinnedArray.h:34
Trk::BinnedArray::clone
virtual BinnedArray * clone() const =0
Implicit constructor.