CbmRoot
|
Class stores a grid of magnetic field values in XY slice at Z position. More...
#include <LitFieldGrid.h>
Public Member Functions | |
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. | |
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. | |
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 51 of file LitFieldGrid.h.
|
inline |
Constructor.
Definition at line 56 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 118 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 183 of file LitFieldGrid.h.
References lit::parallel::LitFieldValue< T >::Bx, lit::parallel::LitFieldValue< T >::By, lit::parallel::LitFieldValue< T >::Bz, GetFieldValue(), v, x, and y.
|
inline |
Returns Z position of the grid.
Definition at line 74 of file LitFieldGrid.h.
References fZ.
Referenced by lit::parallel::LitStationGroupMuon< T >::GetFieldRegion().
|
inline |
Check if field was set.
Definition at line 200 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 98 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 80 of file LitFieldGrid.h.
References fZ.
Referenced by CbmLitFieldGridCreator::CreateGrid().
|
inline |
|
friend |
Operator << for convenient output to ostream.
Definition at line 231 of file LitFieldGrid.h.
|
private |
Definition at line 243 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 244 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 248 of file LitFieldGrid.h.
Referenced by GetFieldValue(), IsEmpty(), SetField(), and ToString().
|
private |
Definition at line 241 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 242 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 238 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 238 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 239 of file LitFieldGrid.h.
Referenced by SetField(), and ToString().
|
private |
Definition at line 239 of file LitFieldGrid.h.
Referenced by GetFieldValue(), SetField(), and ToString().
|
private |
Definition at line 240 of file LitFieldGrid.h.
Referenced by GetZ(), SetZ(), and ToString().