Struct Acts::SurfaceArray::ISurfaceGridLookup¶
-
struct Acts::SurfaceArray::ISurfaceGridLookup
Base interface for all surface lookups.
Subclassed by Acts::SurfaceArray::SingleElementLookup, Acts::SurfaceArray::SurfaceGridLookup< Axes >
Public Functions
-
virtual ~ISurfaceGridLookup() = 0
Pure virtual destructor.
-
inline virtual std::vector<BinningValue> binningValues() const
The binning values described by this surface grid lookup They are in order of the axes (optional) and empty for eingle lookups.
-
virtual size_t completeBinning(const GeometryContext &gctx, const SurfaceVector &surfaces) = 0
Attempts to fix sub-optimal binning by filling closest Surfaces into empty bin.
- Parameters
gctx – The current geometry context object, e.g. alignment
surfaces – The surface pointers to fill
- Returns
number of bins that were filled
-
virtual size_t dimensions() const = 0
Get the number of dimensions of the grid.
- Returns
number of dimensions
-
virtual void fill(const GeometryContext &gctx, const SurfaceVector &surfaces) = 0
Fill provided surfaces into the contained
Grid
.- Parameters
gctx – The current geometry context object, e.g. alignment
surfaces – Input surface pointers
-
virtual std::vector<const IAxis*> getAxes() const = 0
Returns copies of the axes used in the grid as
AnyAxis
.Note
This returns copies. Use for introspection and querying.
- Returns
The axes
-
virtual Vector3 getBinCenter(size_t bin) const = 0
Gets the center position of bin
bin
in global coordinates.- Parameters
bin – the global bin index
- Returns
The bin center
-
virtual bool isValidBin(size_t bin) const = 0
Checks if global bin is valid.
Note
Valid means that the index points to a bin which is not a under or overflow bin or out of range in any axis.
- Parameters
bin – the global bin index
- Returns
bool if the bin is valid
-
virtual SurfaceVector &lookup(const Vector3 &position) = 0
Performs lookup at
pos
and returns bin content as reference.- Parameters
position – Lookup position
- Returns
SurfaceVector
at given bin
-
virtual const SurfaceVector &lookup(const Vector3 &position) const = 0
Performs lookup at
pos
and returns bin content as const reference.- Parameters
position – Lookup position
- Returns
SurfaceVector
at given bin
-
virtual SurfaceVector &lookup(size_t bin) = 0
Performs lookup at global bin and returns bin content as reference.
- Parameters
bin – Global lookup bin
- Returns
SurfaceVector
at given bin
-
virtual const SurfaceVector &lookup(size_t bin) const = 0
Performs lookup at global bin and returns bin content as const reference.
- Parameters
bin – Global lookup bin
- Returns
SurfaceVector
at given bin
-
virtual const SurfaceVector &neighbors(const Vector3 &position) const = 0
Performs a lookup at
pos
, but returns neighbors as well.- Parameters
position – Lookup position
- Returns
SurfaceVector
at given bin. Copy of all bins selected
-
virtual size_t size() const = 0
Returns the total size of the grid (including under/overflow bins)
- Returns
Size of the grid data structure
-
virtual ~ISurfaceGridLookup() = 0