12#ifndef CBMLITFIELDFITTER_H_
13#define CBMLITFIELDFITTER_H_
45 virtual double Calculate(
double x,
double y,
double c[])
const = 0;
86 std::vector<double> aparBx, aparBy, aparBz;
89 std::vector<T> aparBxT, aparByT, aparBzT;
90 aparBxT.assign(aparBx.begin(), aparBx.end());
91 aparByT.assign(aparBy.begin(), aparBy.end());
92 aparBzT.assign(aparBz.begin(), aparBz.end());
123 void FitSlice(
double Z, std::vector<double>& parBx, std::vector<double>& parBy, std::vector<double>& parBz);
132 void FitSlice(
const std::vector<double>&
x,
const std::vector<double>&
y,
const std::vector<double>& z,
133 std::vector<double>& par);
142 void FitSliceMy(
double Z, std::vector<double>& parBx, std::vector<double>& parBy, std::vector<double>& parBz);
Approximated magnetic field slice in XY plane perpendicular to Z.
Implementation of the polynomial field approximation.
const CbmLitPolynom * GetPolynom() const
Return polynomial which is used for approximation.
void FitSlice(float Z, lit::parallel::LitFieldSlice< T > &slice)
Fits (X, Y) slice of the magnetic field at Z position.
void SetNofBinsX(int nofBinsX)
void FitSliceVec(float Z, lit::parallel::LitFieldSlice< fvec > &slice)
FitSlice implementation using fvec data type.
void SetXangle(double xangle)
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.
void SetUseEllipseAcc(bool useEllipseAcc)
virtual ~CbmLitFieldFitter()
Destructor.
void FitSliceScal(float Z, lit::parallel::LitFieldSlice< fscal > &slice)
FitSlice implementation using fscal data type.
void SetNofBinsY(int nofBinsY)
CbmLitFieldFitter(unsigned int polynomDegree)
Constructor.
unsigned int fPolynomDegree
void SetYangle(double yangle)
Abstract class for polynomial function.
CbmLitPolynom()
Constructor.
virtual unsigned int GetNofCoefficients() const =0
Return number of coefficients for this polynomial function.
virtual ~CbmLitPolynom()
Destructor.
virtual double Calculate(double x, double y, double c[]) const =0
Returns calculated value.
Approximated magnetic field slice in XY plane perpendicular to Z.
void SetZ(const T &Z)
Sets Z position of the slice.
void SetCoefficients(const std::vector< T > &x, const std::vector< T > &y, const std::vector< T > &z)
Sets polynom coefficients.