Class stores a grid of magnetic field values in XY slice at Z position.
More...
#include <LitFieldGrid.h>
|
| | LitFieldGrid () |
| | Constructor.
|
| |
| fscal | GetZ () const |
| | Returns Z position of the grid.
|
| |
| void | SetZ (fscal Z) |
| | Sets Z position of the grid.
|
| |
| void | SetField (const vector< vector< LitFieldValue< fscal > > > &field, fscal xmin, fscal xmax, fscal ymin, fscal ymax, int nofBinsX, int nofBinsY) |
| | Set field values for the grid.
|
| |
| void | GetFieldValue (fscal x, fscal y, LitFieldValue< fscal > &B) const |
| | Return field value for (X, Y) position (scalar version).
|
| |
| void | GetFieldValue (fvec x, fvec y, LitFieldValue< fvec > &B) const |
| | Returns field value for (X, Y) position (SIMD version).
|
| |
| bool | IsEmpty () const |
| | Check if field was set.
|
| |
| string | ToString () const |
| | Returns string representation of the class.
|
| |
Class stores a grid of magnetic field values in XY slice at Z position.
- Author
- Andrey Lebedev andre.nosp@m.y.le.nosp@m.bedev.nosp@m.@gsi.nosp@m..de
- Date
- 2009
This approach is used as an alternative to parabolic field approximation. It is more precise - the same grid is used as in the full magnetic field map. However the access to the grid can not be SIMDized. And the values are accessed one by one and packed later to the vector. But it is still fast! The value of the field is calculated as a weighted mean of the four surrounding values.
Definition at line 51 of file LitFieldGrid.h.
◆ LitFieldGrid()
| lit::parallel::LitFieldGrid::LitFieldGrid |
( |
| ) |
|
|
inline |
◆ GetFieldValue() [1/2]
| void lit::parallel::LitFieldGrid::GetFieldValue |
( |
fscal | x, |
|
|
fscal | y, |
|
|
LitFieldValue< fscal > & | B ) const |
|
inline |
Return field value for (X, Y) position (scalar version).
- Parameters
-
| [in] | x | X position. |
| [in] | y | Y position. |
| [out] | B | Field value. |
Definition at line 118 of file LitFieldGrid.h.
◆ GetFieldValue() [2/2]
| void lit::parallel::LitFieldGrid::GetFieldValue |
( |
fvec | x, |
|
|
fvec | y, |
|
|
LitFieldValue< fvec > & | B ) const |
|
inline |
Returns field value for (X, Y) position (SIMD version).
- Parameters
-
| [in] | x | X position. |
| [in] | y | Y position. |
| [out] | B | Field value. |
Definition at line 183 of file LitFieldGrid.h.
◆ GetZ()
| fscal lit::parallel::LitFieldGrid::GetZ |
( |
| ) |
const |
|
inline |
Returns Z position of the grid.
- Returns
- Z position of the grid.
Definition at line 74 of file LitFieldGrid.h.
◆ IsEmpty()
| bool lit::parallel::LitFieldGrid::IsEmpty |
( |
| ) |
const |
|
inline |
◆ SetField()
Set field values for the grid.
Grid is a rectangle with (xmin, ymax) as a top left corner and (xmax, ymin) as a bottom right corner and has a total number of bins nofBinsX*nofBinsY.
- Parameters
-
| [in] | field | 2D vector of field values. |
| [in] | xmax | Maximum X position. |
| [in] | xmin | Minimum X position. |
| [in] | ymax | Maximum Y position. |
| [in] | ymin | Minimum Y position. |
| [in] | nofBinsX | Number of bins in X. |
| [in] | nofBinsY | Number of bins in Y. |
Definition at line 98 of file LitFieldGrid.h.
◆ SetZ()
| void lit::parallel::LitFieldGrid::SetZ |
( |
fscal | Z | ) |
|
|
inline |
Sets Z position of the grid.
- Parameters
-
| [in] | Z | position of the grid. |
Definition at line 80 of file LitFieldGrid.h.
◆ ToString()
| string lit::parallel::LitFieldGrid::ToString |
( |
| ) |
const |
|
inline |
Returns string representation of the class.
- Returns
- String representation of the class.
Definition at line 206 of file LitFieldGrid.h.
◆ operator<<
| ostream & operator<< |
( |
ostream & | strm, |
|
|
const LitFieldGrid & | grid ) |
|
friend |
Operator << for convenient output to ostream.
- Returns
- Insertion stream in order to be able to call a succession of insertion operations.
Definition at line 231 of file LitFieldGrid.h.
◆ fBinSizeX
| fscal lit::parallel::LitFieldGrid::fBinSizeX |
|
private |
◆ fBinSizeY
| fscal lit::parallel::LitFieldGrid::fBinSizeY |
|
private |
◆ fField
◆ fNofBinsX
| unsigned short lit::parallel::LitFieldGrid::fNofBinsX |
|
private |
◆ fNofBinsY
| unsigned short lit::parallel::LitFieldGrid::fNofBinsY |
|
private |
◆ fXMax
| fscal lit::parallel::LitFieldGrid::fXMax |
|
private |
◆ fXMin
| fscal lit::parallel::LitFieldGrid::fXMin |
|
private |
◆ fYMax
| fscal lit::parallel::LitFieldGrid::fYMax |
|
private |
◆ fYMin
| fscal lit::parallel::LitFieldGrid::fYMin |
|
private |
◆ fZ
| fscal lit::parallel::LitFieldGrid::fZ |
|
private |
The documentation for this class was generated from the following file: