CbmRoot
CbmLitFieldFitter Class Reference

Implementation of the polynomial field approximation. More...

#include <CbmLitFieldFitter.h>

Collaboration diagram for CbmLitFieldFitter:
[legend]

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 CbmLitPolynomGetPolynom () 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
 
CbmLitPolynomfPolynom
 

Detailed Description

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.

Author
Andrey Lebedev andre.nosp@m.y.le.nosp@m.bedev.nosp@m.@gsi.nosp@m..de
Date
2009

Definition at line 60 of file CbmLitFieldFitter.h.

Constructor & Destructor Documentation

◆ CbmLitFieldFitter()

CbmLitFieldFitter::CbmLitFieldFitter ( unsigned int  polynomDegree)

Constructor.

Parameters
[in]polynomDegreePolynomial degree to be used for field approximation.

Definition at line 786 of file CbmLitFieldFitter.cxx.

References fField, and fPolynom.

◆ ~CbmLitFieldFitter()

CbmLitFieldFitter::~CbmLitFieldFitter ( )
virtual

Destructor.

Definition at line 810 of file CbmLitFieldFitter.cxx.

Member Function Documentation

◆ FitSlice() [1/3]

void CbmLitFieldFitter::FitSlice ( const std::vector< double > &  x,
const std::vector< double > &  y,
const std::vector< double > &  z,
std::vector< double > &  par 
)
private

Fit (X, Y) slice of magnetic field.

Parameters
[in]xVector with X coordinates.
[in]yVector with y coordinates.
[in]zVector with field values.
[out]parOutput vector with polynomial coefficients.

Definition at line 886 of file CbmLitFieldFitter.cxx.

References fPolynom, CbmLitPolynom::GetNofCoefficients(), FCNPolynom::GetPolynom(), i, x, and y.

◆ FitSlice() [2/3]

void CbmLitFieldFitter::FitSlice ( double  Z,
std::vector< double > &  parBx,
std::vector< double > &  parBy,
std::vector< double > &  parBz 
)
private

Fit (X, Y) slice of magnetic field at Z position.

Parameters
[in]ZZ position of the slice.
[out]parBxOutput vector with polynomial coefficients for Bx.
[out]parByOutput vector with polynomial coefficients for By.
[out]parBzOutput 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.

◆ FitSlice() [3/3]

template<class T >
void CbmLitFieldFitter::FitSlice ( float  Z,
lit::parallel::LitFieldSlice< T > &  slice 
)

Fits (X, Y) slice of the magnetic field at Z position.

Parameters
[in]ZZ position of the slice.
[out]sliceOutput 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().

◆ FitSliceMy()

void CbmLitFieldFitter::FitSliceMy ( double  Z,
std::vector< double > &  parBx,
std::vector< double > &  parBy,
std::vector< double > &  parBz 
)
private

Fit (X, Y) slice of the magnetic field at Z position.

Parameters
[in]ZZ position of the slice.
[out]parBxOutput vector with polynomial coefficients for Bx.
[out]parByOutput vector with polynomial coefficients for By.
[out]parBzOutput 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.

◆ FitSliceScal()

void CbmLitFieldFitter::FitSliceScal ( float  Z,
lit::parallel::LitFieldSlice< fscal > &  slice 
)

FitSlice implementation using fscal data type.

Definition at line 827 of file CbmLitFieldFitter.cxx.

◆ FitSliceVec()

void CbmLitFieldFitter::FitSliceVec ( float  Z,
lit::parallel::LitFieldSlice< fvec > &  slice 
)

FitSlice implementation using fvec data type.

Definition at line 833 of file CbmLitFieldFitter.cxx.

◆ GetPolynom()

const CbmLitPolynom* CbmLitFieldFitter::GetPolynom ( ) const
inlineprivate

Return polynomial which is used for approximation.

Returns
Polynomial which is used for approximation.

Definition at line 139 of file CbmLitFieldFitter.h.

References fPolynom.

◆ SetNofBinsX()

void CbmLitFieldFitter::SetNofBinsX ( int  nofBinsX)
inline

Definition at line 94 of file CbmLitFieldFitter.h.

References fNofBinsX.

◆ SetNofBinsY()

void CbmLitFieldFitter::SetNofBinsY ( int  nofBinsY)
inline

Definition at line 95 of file CbmLitFieldFitter.h.

References fNofBinsY.

◆ SetUseEllipseAcc()

void CbmLitFieldFitter::SetUseEllipseAcc ( bool  useEllipseAcc)
inline

Definition at line 96 of file CbmLitFieldFitter.h.

References fUseEllipseAcc.

◆ SetXangle()

void CbmLitFieldFitter::SetXangle ( double  xangle)
inline

Definition at line 92 of file CbmLitFieldFitter.h.

References fXangle.

◆ SetYangle()

void CbmLitFieldFitter::SetYangle ( double  yangle)
inline

Definition at line 93 of file CbmLitFieldFitter.h.

References fYangle.

Member Data Documentation

◆ fField

FairField* CbmLitFieldFitter::fField
private

Definition at line 142 of file CbmLitFieldFitter.h.

Referenced by CbmLitFieldFitter(), and FitSlice().

◆ fNofBinsX

int CbmLitFieldFitter::fNofBinsX
private

Definition at line 147 of file CbmLitFieldFitter.h.

Referenced by FitSlice(), and SetNofBinsX().

◆ fNofBinsY

int CbmLitFieldFitter::fNofBinsY
private

Definition at line 148 of file CbmLitFieldFitter.h.

Referenced by FitSlice(), and SetNofBinsY().

◆ fPolynom

CbmLitPolynom* CbmLitFieldFitter::fPolynom
private

Definition at line 155 of file CbmLitFieldFitter.h.

Referenced by CbmLitFieldFitter(), FitSlice(), and GetPolynom().

◆ fPolynomDegree

unsigned int CbmLitFieldFitter::fPolynomDegree
private

Definition at line 154 of file CbmLitFieldFitter.h.

Referenced by FitSliceMy().

◆ fUseEllipseAcc

bool CbmLitFieldFitter::fUseEllipseAcc
private

Definition at line 151 of file CbmLitFieldFitter.h.

Referenced by FitSlice(), and SetUseEllipseAcc().

◆ fXangle

double CbmLitFieldFitter::fXangle
private

Definition at line 144 of file CbmLitFieldFitter.h.

Referenced by FitSlice(), FitSliceMy(), and SetXangle().

◆ fYangle

double CbmLitFieldFitter::fYangle
private

Definition at line 145 of file CbmLitFieldFitter.h.

Referenced by FitSlice(), FitSliceMy(), and SetYangle().


The documentation for this class was generated from the following files: