CbmRoot
|
Implementation of the polynomial field approximation. More...
#include <CbmLitFieldFitter.h>
Public Member Functions | |
CbmLitFieldFitter (unsigned int polynomDegree) | |
Constructor. More... | |
virtual | ~CbmLitFieldFitter () |
Destructor. More... | |
template<class T > | |
void | FitSlice (float Z, lit::parallel::LitFieldSlice< T > &slice) |
Fits (X, Y) slice of the magnetic field at Z position. More... | |
void | FitSliceScal (float Z, lit::parallel::LitFieldSlice< fscal > &slice) |
FitSlice implementation using fscal data type. More... | |
void | FitSliceVec (float Z, lit::parallel::LitFieldSlice< fvec > &slice) |
FitSlice implementation using fvec data type. More... | |
void | SetXangle (double xangle) |
void | SetYangle (double yangle) |
void | SetNofBinsX (int nofBinsX) |
void | SetNofBinsY (int nofBinsY) |
void | SetUseEllipseAcc (bool useEllipseAcc) |
Private Member Functions | |
void | FitSlice (double Z, std::vector< double > &parBx, std::vector< double > &parBy, std::vector< double > &parBz) |
Fit (X, Y) slice of magnetic field at Z position. More... | |
void | FitSlice (const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z, std::vector< double > &par) |
Fit (X, Y) slice of magnetic field. More... | |
void | FitSliceMy (double Z, std::vector< double > &parBx, std::vector< double > &parBy, std::vector< double > &parBz) |
Fit (X, Y) slice of the magnetic field at Z position. More... | |
const CbmLitPolynom * | GetPolynom () const |
Return polynomial which is used for approximation. More... | |
Private Attributes | |
FairField * | fField |
double | fXangle |
double | fYangle |
int | fNofBinsX |
int | fNofBinsY |
bool | fUseEllipseAcc |
unsigned int | fPolynomDegree |
CbmLitPolynom * | fPolynom |
Implementation of the polynomial field approximation.
Class performs approximation of magnetic field using 0-9 degree polynomial. MINUIT is used for minimization. Also custom LSM fit is implemented for comparison.
Definition at line 60 of file CbmLitFieldFitter.h.
CbmLitFieldFitter::CbmLitFieldFitter | ( | unsigned int | polynomDegree | ) |
Constructor.
[in] | polynomDegree | Polynomial degree to be used for field approximation. |
Definition at line 786 of file CbmLitFieldFitter.cxx.
|
virtual |
Destructor.
Definition at line 810 of file CbmLitFieldFitter.cxx.
|
private |
Fit (X, Y) slice of magnetic field.
[in] | x | Vector with X coordinates. |
[in] | y | Vector with y coordinates. |
[in] | z | Vector with field values. |
[out] | par | Output vector with polynomial coefficients. |
Definition at line 886 of file CbmLitFieldFitter.cxx.
References fPolynom, CbmLitPolynom::GetNofCoefficients(), FCNPolynom::GetPolynom(), i, x, and y.
|
private |
Fit (X, Y) slice of magnetic field at Z position.
[in] | Z | Z position of the slice. |
[out] | parBx | Output vector with polynomial coefficients for Bx. |
[out] | parBy | Output vector with polynomial coefficients for By. |
[out] | parBz | Output vector with polynomial coefficients for Bz. |
Definition at line 838 of file CbmLitFieldFitter.cxx.
References fField, FitSlice(), fNofBinsX, fNofBinsY, fUseEllipseAcc, fXangle, fYangle, pos, x, and y.
void CbmLitFieldFitter::FitSlice | ( | float | Z, |
lit::parallel::LitFieldSlice< T > & | slice | ||
) |
Fits (X, Y) slice of the magnetic field at Z position.
[in] | Z | Z position of the slice. |
[out] | slice | Output approximated field slice. |
Definition at line 813 of file CbmLitFieldFitter.cxx.
References lit::parallel::LitFieldSlice< T >::SetCoefficients(), and lit::parallel::LitFieldSlice< T >::SetZ().
Referenced by FitSlice().
|
private |
Fit (X, Y) slice of the magnetic field at Z position.
[in] | Z | Z position of the slice. |
[out] | parBx | Output vector with polynomial coefficients for Bx. |
[out] | parBy | Output vector with polynomial coefficients for By. |
[out] | parBz | Output vector with polynomial coefficients for Bz. |
Definition at line 917 of file CbmLitFieldFitter.cxx.
References fabs(), fPolynomDegree, fXangle, fYangle, i, m, sqrt(), x, and y.
void CbmLitFieldFitter::FitSliceScal | ( | float | Z, |
lit::parallel::LitFieldSlice< fscal > & | slice | ||
) |
FitSlice implementation using fscal data type.
Definition at line 827 of file CbmLitFieldFitter.cxx.
void CbmLitFieldFitter::FitSliceVec | ( | float | Z, |
lit::parallel::LitFieldSlice< fvec > & | slice | ||
) |
FitSlice implementation using fvec data type.
Definition at line 833 of file CbmLitFieldFitter.cxx.
|
inlineprivate |
Return polynomial which is used for approximation.
Definition at line 139 of file CbmLitFieldFitter.h.
References fPolynom.
|
inline |
Definition at line 94 of file CbmLitFieldFitter.h.
References fNofBinsX.
|
inline |
Definition at line 95 of file CbmLitFieldFitter.h.
References fNofBinsY.
|
inline |
Definition at line 96 of file CbmLitFieldFitter.h.
References fUseEllipseAcc.
|
inline |
Definition at line 92 of file CbmLitFieldFitter.h.
References fXangle.
|
inline |
Definition at line 93 of file CbmLitFieldFitter.h.
References fYangle.
|
private |
Definition at line 142 of file CbmLitFieldFitter.h.
Referenced by CbmLitFieldFitter(), and FitSlice().
|
private |
Definition at line 147 of file CbmLitFieldFitter.h.
Referenced by FitSlice(), and SetNofBinsX().
|
private |
Definition at line 148 of file CbmLitFieldFitter.h.
Referenced by FitSlice(), and SetNofBinsY().
|
private |
Definition at line 155 of file CbmLitFieldFitter.h.
Referenced by CbmLitFieldFitter(), FitSlice(), and GetPolynom().
|
private |
Definition at line 154 of file CbmLitFieldFitter.h.
Referenced by FitSliceMy().
|
private |
Definition at line 151 of file CbmLitFieldFitter.h.
Referenced by FitSlice(), and SetUseEllipseAcc().
|
private |
Definition at line 144 of file CbmLitFieldFitter.h.
Referenced by FitSlice(), FitSliceMy(), and SetXangle().
|
private |
Definition at line 145 of file CbmLitFieldFitter.h.
Referenced by FitSlice(), FitSliceMy(), and SetYangle().