ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::InterpolatedBFieldMap< grid_t >::FieldCell Struct Reference

struct representing smallest grid unit in magnetic field grid More...

#include <Acts/MagneticField/InterpolatedBFieldMap.hpp>

Public Member Functions

 FieldCell (std::array< double, DIM_POS > lowerLeft, std::array< double, DIM_POS > upperRight, std::array< Vector3, N > fieldValues)
 default constructor
Vector3 getField (const ActsVector< DIM_POS > &position) const
 retrieve field at given position
bool isInside (const ActsVector< DIM_POS > &position) const
 check whether given 3D position is inside this field cell

Static Public Attributes

static constexpr unsigned int N = 1 << DIM_POS
 number of corner points defining the confining hyper-box

Detailed Description

template<typename grid_t>
struct Acts::InterpolatedBFieldMap< grid_t >::FieldCell

struct representing smallest grid unit in magnetic field grid

This type encapsulates all required information to perform linear interpolation of magnetic field values within a confined spatial region (hyper-box). The cell stores field values at all corner points and performs interpolation for any position within the cell boundaries. This allows for efficient repeated lookups within the same grid cell without consulting the full grid structure.

Constructor & Destructor Documentation

◆ FieldCell()

template<typename grid_t>
Acts::InterpolatedBFieldMap< grid_t >::FieldCell::FieldCell ( std::array< double, DIM_POS > lowerLeft,
std::array< double, DIM_POS > upperRight,
std::array< Vector3, N > fieldValues )

default constructor

Parameters
[in]lowerLeftgeneralized lower-left corner of hyper box (containing the minima of the hyper box along each Dimension)
[in]upperRightgeneralized upper-right corner of hyper box (containing the maxima of the hyper box along each Dimension)
[in]fieldValuesfield values at the hyper box corners sorted in the canonical order defined in Acts::interpolate

Member Function Documentation

◆ getField()

template<typename grid_t>
Vector3 Acts::InterpolatedBFieldMap< grid_t >::FieldCell::getField ( const ActsVector< DIM_POS > & position) const

retrieve field at given position

Parameters
[in]positionglobal 3D position
Returns
magnetic field value at the given position
Precondition
The given position must lie within the current field cell.

◆ isInside()

template<typename grid_t>
bool Acts::InterpolatedBFieldMap< grid_t >::FieldCell::isInside ( const ActsVector< DIM_POS > & position) const

check whether given 3D position is inside this field cell

Parameters
[in]positionglobal 3D position
Returns
true if position is inside the current field cell, otherwise false

Member Data Documentation

◆ N

template<typename grid_t>
unsigned int Acts::InterpolatedBFieldMap< grid_t >::FieldCell::N = 1 << DIM_POS
staticconstexpr

number of corner points defining the confining hyper-box