CbmRoot
|
Class stores a grid of magnetic field values in XY slice at Z position. More...
#include <LitFieldGrid.h>
Public Member Functions | |
LitFieldGrid () | |
Constructor. More... | |
fscal | GetZ () const |
Returns Z position of the grid. More... | |
void | SetZ (fscal Z) |
Sets Z position of the grid. More... | |
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. More... | |
void | GetFieldValue (fscal x, fscal y, LitFieldValue< fscal > &B) const |
Return field value for (X, Y) position (scalar version). More... | |
void | GetFieldValue (fvec x, fvec y, LitFieldValue< fvec > &B) const |
Returns field value for (X, Y) position (SIMD version). More... | |
bool | IsEmpty () const |
Check if field was set. More... | |
string | ToString () const |
Returns string representation of the class. More... | |
Private Attributes | |
fscal | fXMin |
fscal | fXMax |
fscal | fYMin |
fscal | fYMax |
fscal | fZ |
unsigned short | fNofBinsX |
unsigned short | fNofBinsY |
fscal | fBinSizeX |
fscal | fBinSizeY |
vector< vector< LitFieldValue< fscal > > > | fField |
Friends | |
ostream & | operator<< (ostream &strm, const LitFieldGrid &grid) |
Operator << for convenient output to ostream. More... | |
Class stores a grid of magnetic field values in XY slice at Z position.
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 44 of file LitFieldGrid.h.
|
inline |
Constructor.
Definition at line 49 of file LitFieldGrid.h.
|
inline |
Return field value for (X, Y) position (scalar version).
[in] | x | X position. |
[in] | y | Y position. |
[out] | B | Field value. |
Definition at line 113 of file LitFieldGrid.h.
References lit::parallel::LitFieldValue< T >::Bx, lit::parallel::LitFieldValue< T >::By, lit::parallel::LitFieldValue< T >::Bz, fBinSizeX, fBinSizeY, fField, fNofBinsX, fNofBinsY, fXMax, fXMin, fYMin, x, and y.
Referenced by lit::parallel::LitStationGroupMuon< T >::GetFieldRegion(), GetFieldValue(), and lit::parallel::LitRK4Extrapolation().
|
inline |
Returns field value for (X, Y) position (SIMD version).
[in] | x | X position. |
[in] | y | Y position. |
[out] | B | Field value. |
Definition at line 177 of file LitFieldGrid.h.
References lit::parallel::LitFieldValue< T >::Bx, lit::parallel::LitFieldValue< T >::By, lit::parallel::LitFieldValue< T >::Bz, fvecLen, GetFieldValue(), i, v, x, and y.
|
inline |
Returns Z position of the grid.
Definition at line 65 of file LitFieldGrid.h.
References fZ.
Referenced by lit::parallel::LitStationGroupMuon< T >::GetFieldRegion().
|
inline |
Check if field was set.
Definition at line 193 of file LitFieldGrid.h.
References fField.
Referenced by lit::parallel::LitTrackFitter(), lit::parallel::LitTrackFinderNN::PropagateToStation(), and lit::parallel::LitTrackFinderNN::PropagateVirtualStations().
|
inline |
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.
[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 89 of file LitFieldGrid.h.
References fBinSizeX, fBinSizeY, fField, fNofBinsX, fNofBinsY, fXMax, fXMin, fYMax, and fYMin.
Referenced by CbmLitFieldGridCreator::CreateGrid().
|
inline |
Sets Z position of the grid.
[in] | Z | position of the grid. |
Definition at line 71 of file LitFieldGrid.h.
References fZ.
Referenced by CbmLitFieldGridCreator::CreateGrid().
|
inline |
|
friend |
Operator << for convenient output to ostream.
Definition at line 225 of file LitFieldGrid.h.
|
private |
Definition at line 236 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 237 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 241 of file LitFieldGrid.h.
Referenced by GetFieldValue(), IsEmpty(), SetField(), and ToString().
|
private |
Definition at line 234 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 235 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 231 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 231 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 232 of file LitFieldGrid.h.
Referenced by SetField(), and ToString().
|
private |
Definition at line 232 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 233 of file LitFieldGrid.h.
Referenced by GetZ(), SetZ(), and ToString().