CbmRoot
lit::parallel::LitFieldSlice< T > Class Template Reference

Approximated magnetic field slice in XY plane perpendicular to Z. More...

#include <LitFieldSlice.h>

Public Member Functions

 LitFieldSlice ()
 Constructor. More...
 
void GetFieldValue (const T &x, const T &y, LitFieldValue< T > &B) const
 Returns field value at a certain (X, Y) position. More...
 
void SetCoefficients (const std::vector< T > &x, const std::vector< T > &y, const std::vector< T > &z)
 Sets polynom coefficients. More...
 
const T & GetZ () const
 Returns Z position of the slice. More...
 
void SetZ (const T &Z)
 Sets Z position of the slice. More...
 
std::string ToString () const
 Returns std::string representation of the class. More...
 

Static Public Attributes

static const unsigned int N = 36
 

Private Attributes

cx [N]
 
cy [N]
 
cz [N]
 
fZ
 

Friends

std::ostream & operator<< (std::ostream &strm, const LitFieldSlice &slice)
 Operator << for convenient output to std::ostream. More...
 

Detailed Description

template<class T>
class lit::parallel::LitFieldSlice< T >

Approximated magnetic field slice in XY plane perpendicular to Z.

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

It stores coefficients of the polynomial function for each field component Bx, By and Bz. Order of the polynom is defined by LIT_POLYNOM_DEGREE.

Definition at line 35 of file LitFieldSlice.h.

Constructor & Destructor Documentation

◆ LitFieldSlice()

Member Function Documentation

◆ GetFieldValue()

template<class T >
void lit::parallel::LitFieldSlice< T >::GetFieldValue ( const T &  x,
const T &  y,
LitFieldValue< T > &  B 
) const
inline

Returns field value at a certain (X, Y) position.

LIT_POLYNOM_DEGREE defines a polynom order which is used for output field value calculation.

Parameters
[in]xX position.
[in]yY position.
[out]BField value.

Definition at line 73 of file LitFieldSlice.h.

References lit::parallel::LitFieldValue< T >::Bx, lit::parallel::LitFieldValue< T >::By, lit::parallel::LitFieldValue< T >::Bz, lit::parallel::LitFieldSlice< T >::cx, lit::parallel::LitFieldSlice< T >::cy, lit::parallel::LitFieldSlice< T >::cz, x, and y.

◆ GetZ()

template<class T >
const T& lit::parallel::LitFieldSlice< T >::GetZ ( ) const
inline

Returns Z position of the slice.

Returns
Z position of the slice.

Definition at line 338 of file LitFieldSlice.h.

References lit::parallel::LitFieldSlice< T >::fZ.

◆ SetCoefficients()

template<class T >
void lit::parallel::LitFieldSlice< T >::SetCoefficients ( const std::vector< T > &  x,
const std::vector< T > &  y,
const std::vector< T > &  z 
)
inline

Sets polynom coefficients.

Parameters
[in]xCoefficients for Bx.
[in]yCoefficients for By
[in]zCoefficients for Bz

Definition at line 324 of file LitFieldSlice.h.

References lit::parallel::LitFieldSlice< T >::cx, lit::parallel::LitFieldSlice< T >::cy, lit::parallel::LitFieldSlice< T >::cz, i, lit::parallel::LitFieldSlice< T >::N, x, and y.

Referenced by CbmLitFieldFitter::FitSlice().

◆ SetZ()

template<class T >
void lit::parallel::LitFieldSlice< T >::SetZ ( const T &  Z)
inline

Sets Z position of the slice.

Parameters
[in]ZValue of Z coordinate.

Definition at line 344 of file LitFieldSlice.h.

References lit::parallel::LitFieldSlice< T >::fZ.

Referenced by CbmLitFieldFitter::FitSlice().

◆ ToString()

template<class T >
std::string lit::parallel::LitFieldSlice< T >::ToString ( ) const
inline

Returns std::string representation of the class.

Returns
Class representation as std::string.

Definition at line 350 of file LitFieldSlice.h.

References lit::parallel::LitFieldSlice< T >::cx, lit::parallel::LitFieldSlice< T >::cy, lit::parallel::LitFieldSlice< T >::cz, lit::parallel::LitFieldSlice< T >::fZ, i, and lit::parallel::LitFieldSlice< T >::N.

Friends And Related Function Documentation

◆ operator<<

template<class T >
std::ostream& operator<< ( std::ostream &  strm,
const LitFieldSlice< T > &  slice 
)
friend

Operator << for convenient output to std::ostream.

Returns
Insertion stream in order to be able to call a succession of insertion operations.

Definition at line 374 of file LitFieldSlice.h.

Member Data Documentation

◆ cx

◆ cy

◆ cz

◆ fZ

◆ N


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