Analysis Software
Documentation for sPHENIX simulation software
|
interpolate magnetic field value from field values on a given grid More...
#include <acts/blob/sPHENIX/Core/include/Acts/MagneticField/InterpolatedBFieldMap.hpp>
Classes | |
struct | Cache |
struct | Config |
Config structure for the interpolated B field map. More... | |
struct | FieldCell |
struct representing smallest grid unit in magnetic field grid More... | |
Public Types | |
using | Grid = grid_t |
using | FieldType = typename Grid::value_type |
Public Member Functions | |
InterpolatedBFieldMap (Config cfg) | |
default constructor | |
minBin | fill (1) |
Result< FieldCell > | getFieldCell (const Vector3 &position) const |
retrieve field cell for given position | |
std::vector< size_t > | getNBins () const final |
get the number of bins for all axes of the field map | |
std::vector< double > | getMin () const final |
get the minimum value of all axes of the field map | |
std::vector< double > | getMax () const final |
get the maximum value of all axes of the field map | |
bool | isInside (const Vector3 &position) const final |
check whether given 3D position is inside look-up domain | |
bool | isInsideLocal (const ActsVector< DIM_POS > &gridPosition) const |
check whether given 3D position is inside look-up domain | |
const Grid & | getGrid () const |
Get a const reference on the underlying grid structure. | |
MagneticFieldProvider::Cache | makeCache (const MagneticFieldContext &mctx) const final |
| |
Result< Vector3 > | getField (const Vector3 &position) const |
retrieve field at given position | |
Vector3 | getFieldUnchecked (const Vector3 &position) const final |
Result< Vector3 > | getField (const Vector3 &position, MagneticFieldProvider::Cache &cache) const final |
| |
Result< Vector3 > | getFieldGradient (const Vector3 &position, ActsMatrix< 3, 3 > &derivative, MagneticFieldProvider::Cache &cache) const final |
| |
Public Attributes | |
m_lowerLeft = m_cfg.grid.lowerLeftBinEdge(minBin) | |
m_upperRight = m_cfg.grid.lowerLeftBinEdge(m_cfg.grid.numLocalBins()) | |
Static Public Attributes | |
static constexpr size_t | DIM_POS = Grid::DIM |
Private Attributes | |
Config | m_cfg |
Grid::point_t | m_lowerLeft |
Grid::point_t | m_upperRight |
interpolate magnetic field value from field values on a given grid
This class implements a magnetic field service which is initialized by a field map defined by:
The magnetic field value for a given global position is then determined by:
grid_t | The Grid type which provides the field storage and interpolation |
Definition at line 76 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 76 of file InterpolatedBFieldMap.hpp
using Acts::InterpolatedBFieldMap< grid_t >::FieldType = typename Grid::value_type |
Definition at line 79 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 79 of file InterpolatedBFieldMap.hpp
using Acts::InterpolatedBFieldMap< grid_t >::Grid = grid_t |
Definition at line 78 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 78 of file InterpolatedBFieldMap.hpp
|
inline |
default constructor
Definition at line 180 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 180 of file InterpolatedBFieldMap.hpp
References testing::internal::move().
minBin Acts::InterpolatedBFieldMap< grid_t >::fill | ( | 1 | ) |
|
inline |
retrieve field at given position
[in] | position | global 3D position |
position
must lie within the range of the underlying magnetic field map. Definition at line 283 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 283 of file InterpolatedBFieldMap.hpp
References Acts::InterpolatedBFieldMap< grid_t >::Config::grid, Acts::InterpolatedBFieldMap< grid_t >::isInsideLocal(), Acts::InterpolatedBFieldMap< grid_t >::m_cfg, position, Acts::InterpolatedBFieldMap< grid_t >::Config::transformBField, and Acts::InterpolatedBFieldMap< grid_t >::Config::transformPos.
Referenced by Acts::InterpolatedBFieldMap< grid_t >::getFieldGradient().
|
inlinefinal |
Definition at line 300 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 300 of file InterpolatedBFieldMap.hpp
References Acts::InterpolatedBFieldMap< grid_t >::Cache::fieldCell, Acts::InterpolatedBFieldMap< grid_t >::getFieldCell(), Acts::InterpolatedBFieldMap< grid_t >::m_cfg, position, and Acts::InterpolatedBFieldMap< grid_t >::Config::transformPos.
|
inline |
retrieve field cell for given position
[in] | position | global 3D position |
position
must lie within the range of the underlying magnetic field map. Definition at line 194 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 194 of file InterpolatedBFieldMap.hpp
References assert, Acts::InterpolatedBFieldMap< grid_t >::DIM_POS, Acts::InterpolatedBFieldMap< grid_t >::Config::grid, i, index, Acts::InterpolatedBFieldMap< grid_t >::isInsideLocal(), Acts::InterpolatedBFieldMap< grid_t >::m_cfg, testing::internal::move(), position, Acts::InterpolatedBFieldMap< grid_t >::Config::transformBField, and Acts::InterpolatedBFieldMap< grid_t >::Config::transformPos.
Referenced by Acts::InterpolatedBFieldMap< grid_t >::getField().
|
inlinefinal |
Definition at line 319 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 319 of file InterpolatedBFieldMap.hpp
References Acts::InterpolatedBFieldMap< grid_t >::getField(), and position.
|
inlinefinal |
Definition at line 293 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 293 of file InterpolatedBFieldMap.hpp
References Acts::InterpolatedBFieldMap< grid_t >::Config::grid, Acts::InterpolatedBFieldMap< grid_t >::m_cfg, position, Acts::InterpolatedBFieldMap< grid_t >::Config::transformBField, and Acts::InterpolatedBFieldMap< grid_t >::Config::transformPos.
|
inline |
Get a const reference on the underlying grid structure.
Definition at line 268 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 268 of file InterpolatedBFieldMap.hpp
References Acts::InterpolatedBFieldMap< grid_t >::Config::grid, and Acts::InterpolatedBFieldMap< grid_t >::m_cfg.
|
inlinefinal |
get the maximum value of all axes of the field map
Definition at line 237 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 237 of file InterpolatedBFieldMap.hpp
References Acts::InterpolatedBFieldMap< grid_t >::m_upperRight.
|
inlinefinal |
get the minimum value of all axes of the field map
Definition at line 230 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 230 of file InterpolatedBFieldMap.hpp
References Acts::InterpolatedBFieldMap< grid_t >::m_lowerLeft.
|
inlinefinal |
get the number of bins for all axes of the field map
Definition at line 222 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 222 of file InterpolatedBFieldMap.hpp
References Acts::InterpolatedBFieldMap< grid_t >::Config::grid, and Acts::InterpolatedBFieldMap< grid_t >::m_cfg.
|
inlinefinal |
check whether given 3D position is inside look-up domain
[in] | position | global 3D position |
true
if position is inside the defined look-up grid, otherwise false
Definition at line 246 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 246 of file InterpolatedBFieldMap.hpp
References Acts::InterpolatedBFieldMap< grid_t >::isInsideLocal(), Acts::InterpolatedBFieldMap< grid_t >::m_cfg, position, and Acts::InterpolatedBFieldMap< grid_t >::Config::transformPos.
|
inline |
check whether given 3D position is inside look-up domain
[in] | gridPosition | local N-D position |
true
if position is inside the defined look-up grid, otherwise false
Definition at line 255 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 255 of file InterpolatedBFieldMap.hpp
References Acts::InterpolatedBFieldMap< grid_t >::DIM_POS, i, Acts::InterpolatedBFieldMap< grid_t >::m_lowerLeft, and Acts::InterpolatedBFieldMap< grid_t >::m_upperRight.
Referenced by Acts::InterpolatedBFieldMap< grid_t >::getField(), Acts::InterpolatedBFieldMap< grid_t >::getFieldCell(), and Acts::InterpolatedBFieldMap< grid_t >::isInside().
|
inlinefinal |
Definition at line 271 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 271 of file InterpolatedBFieldMap.hpp
|
static |
Definition at line 80 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 80 of file InterpolatedBFieldMap.hpp
Referenced by Acts::InterpolatedBFieldMap< grid_t >::getFieldCell(), Acts::InterpolatedBFieldMap< grid_t >::FieldCell::isInside(), and Acts::InterpolatedBFieldMap< grid_t >::isInsideLocal().
|
private |
Definition at line 327 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 327 of file InterpolatedBFieldMap.hpp
Referenced by Acts::InterpolatedBFieldMap< grid_t >::getField(), Acts::InterpolatedBFieldMap< grid_t >::getFieldCell(), Acts::InterpolatedBFieldMap< grid_t >::getFieldUnchecked(), Acts::InterpolatedBFieldMap< grid_t >::getGrid(), Acts::InterpolatedBFieldMap< grid_t >::getNBins(), and Acts::InterpolatedBFieldMap< grid_t >::isInside().
Acts::InterpolatedBFieldMap< grid_t >::m_lowerLeft = m_cfg.grid.lowerLeftBinEdge(minBin) |
Definition at line 183 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 183 of file InterpolatedBFieldMap.hpp
Referenced by Acts::InterpolatedBFieldMap< grid_t >::getMin(), and Acts::InterpolatedBFieldMap< grid_t >::isInsideLocal().
|
private |
Definition at line 329 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 329 of file InterpolatedBFieldMap.hpp
Acts::InterpolatedBFieldMap< grid_t >::m_upperRight = m_cfg.grid.lowerLeftBinEdge(m_cfg.grid.numLocalBins()) |
Definition at line 184 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 184 of file InterpolatedBFieldMap.hpp
Referenced by Acts::InterpolatedBFieldMap< grid_t >::getMax(), and Acts::InterpolatedBFieldMap< grid_t >::isInsideLocal().
|
private |
Definition at line 330 of file InterpolatedBFieldMap.hpp.
View newest version in sPHENIX GitHub at line 330 of file InterpolatedBFieldMap.hpp