ATLAS Offline Software
Loading...
Searching...
No Matches
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
23class MsgStream;
24
25namespace Trk {
33
34template<class T>
36{
37
38public:
39 //Make sure derived classes can get everything
40 BinnedArray() = default;
41 BinnedArray(const 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
81private:
82};
83} // end of namespace Trk
84
85#endif // TRKDETDESCRUTILS_BINNEDARRAY_H
A generic symmetric BinUtility, for fully symmetric binning in terms of binning grid and binning type...
Definition BinUtility.h:39
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
virtual BinnedArray * clone() const =0
Implicit constructor.
BinnedArray(BinnedArray &&)=default
virtual ~BinnedArray()=default
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...
virtual std::span< T const *const > arrayObjects() const =0
Return all objects of the Array const.
BinnedArray()=default
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,...
virtual T * entryObject(const Amg::Vector3D &) const =0
Returns the pointer to the templated class object from the BinnedArray - entry point.
BinnedArray(const BinnedArray &)=default
BinnedArray & operator=(const BinnedArray &)=default
virtual unsigned int arrayObjectsNumber() const =0
Number of Entries in the Array.
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,...
BinnedArray & operator=(BinnedArray &&)=default
virtual std::span< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.