CbmRoot
Loading...
Searching...
No Matches
cbm::algo::kf::FieldSlice< T > Class Template Reference

A magnetic field approximation on the two-dimensional plane. More...

#include <KfFieldSlice.h>

Inheritance diagram for cbm::algo::kf::FieldSlice< T >:
[legend]

Public Member Functions

 FieldSlice ()=default
 Default constructor.
 
 FieldSlice (const FieldFn_t &fieldFn, double xMax, double yMax, double zRef)
 Constructor from parameters.
 
template<typename I >
 FieldSlice (const FieldSlice< I > &other)
 Copy constructor.
 
 ~FieldSlice ()=default
 Destructor.
 
FieldSliceoperator= (const FieldSlice &other)=default
 Copy assignment operator.
 
constexpr FieldValue< T > GetFieldValue (const T &x, const T &y) const
 Gets field value at a point on the transverse plane.
 
constexpr FieldValue< T > GetFieldValueForLine (const TrackParam< T > &trkPar) const
 Gets field value for the intersection with a straight track.
 
const T & GetZref () const
 Gets reference z-coordinate of the slice [cm].
 
std::string ToString (int indentLevel=0, int verbose=1) const
 String representation of the class content.
 
void CheckConsistency () const
 Consistency checker.
 

Private Types

using CoeffArray_t = std::array<T, kNofCoeff>
 Array of the approximation coefficients [<monomial>].
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int)
 

Private Attributes

CoeffArray_t fBx {{T(0.)}}
 Approximation coefficients for the x-component of the field.
 
CoeffArray_t fBy {{T(0.)}}
 Approximation coefficients for the y-component of the field.
 
CoeffArray_t fBz {{T(0.)}}
 Approximation coefficients for the z-component of the field.
 
fZref {defs::Undef<T>}
 Reference z of the coefficients [cm].
 

Static Private Attributes

static constexpr int kPolDegree {5}
 Approximation polynomial degree.
 
static constexpr int kNofCoeff {((kPolDegree + 1) * (kPolDegree + 2)) / 2}
 Number of coefficients.
 

Friends

template<typename >
class FieldSlice
 
class boost::serialization::access
 Serialization function.
 

Detailed Description

template<typename T>
class cbm::algo::kf::FieldSlice< T >

A magnetic field approximation on the two-dimensional plane.

Template Parameters
TUnderlying data-type

Definition at line 31 of file KfFieldSlice.h.

Member Typedef Documentation

◆ CoeffArray_t

template<typename T >
using cbm::algo::kf::FieldSlice< T >::CoeffArray_t = std::array<T, kNofCoeff>
private

Array of the approximation coefficients [<monomial>].

Definition at line 39 of file KfFieldSlice.h.

Constructor & Destructor Documentation

◆ FieldSlice() [1/3]

template<typename T >
cbm::algo::kf::FieldSlice< T >::FieldSlice ( )
default

Default constructor.

◆ FieldSlice() [2/3]

template<typename T >
FieldSlice::FieldSlice ( const FieldFn_t & fieldFn,
double xMax,
double yMax,
double zRef )

Constructor from parameters.

Parameters
fieldFnMagnetic field function (point xyz, field xyz)
xMaxHalf-size of the slice in x-direction [cm]
yMaxHalf-size of the slice in y-direction [cm]
zRefReference z-coordinate of the slice [cm]

Definition at line 24 of file KfFieldSlice.cxx.

References cbm::algo::kf::FieldSlice< T >::kNofCoeff, x, and y.

◆ FieldSlice() [3/3]

template<typename T >
template<typename I >
cbm::algo::kf::FieldSlice< T >::FieldSlice ( const FieldSlice< I > & other)
inline

Copy constructor.

Template Parameters
IThe underlying data type of the source object

Definition at line 55 of file KfFieldSlice.h.

◆ ~FieldSlice()

template<typename T >
cbm::algo::kf::FieldSlice< T >::~FieldSlice ( )
default

Destructor.

Member Function Documentation

◆ CheckConsistency()

template<typename T >
void FieldSlice::CheckConsistency ( ) const

Consistency checker.

Definition at line 149 of file KfFieldSlice.cxx.

References cbm::algo::kf::utils::CheckSimdVectorEquality().

◆ GetFieldValue()

template<typename T >
FieldValue< T > cbm::algo::kf::FieldSlice< T >::GetFieldValue ( const T & x,
const T & y ) const
inlineconstexpr

◆ GetFieldValueForLine()

template<typename T >
FieldValue< T > cbm::algo::kf::FieldSlice< T >::GetFieldValueForLine ( const TrackParam< T > & trkPar) const
inlineconstexpr

Gets field value for the intersection with a straight track.

Parameters
trackParamTrack parameter set
Returns
Field value [kG]

Definition at line 84 of file KfFieldSlice.h.

References cbm::algo::kf::TrackParamBase< T >::GetTx(), cbm::algo::kf::TrackParamBase< T >::GetTy(), cbm::algo::kf::TrackParamBase< T >::GetX(), cbm::algo::kf::TrackParamBase< T >::GetY(), and cbm::algo::kf::TrackParamBase< T >::GetZ().

◆ GetZref()

template<typename T >
const T & cbm::algo::kf::FieldSlice< T >::GetZref ( ) const
inline

Gets reference z-coordinate of the slice [cm].

Definition at line 91 of file KfFieldSlice.h.

◆ operator=()

template<typename T >
FieldSlice & cbm::algo::kf::FieldSlice< T >::operator= ( const FieldSlice< T > & other)
default

Copy assignment operator.

◆ serialize()

template<typename T >
template<class Archive >
void cbm::algo::kf::FieldSlice< T >::serialize ( Archive & ar,
const unsigned int  )
inlineprivate

Definition at line 105 of file KfFieldSlice.h.

◆ ToString()

template<typename T >
std::string FieldSlice::ToString ( int indentLevel = 0,
int verbose = 1 ) const

String representation of the class content.

Parameters
intdentLevelIndent level
verboseVerbosity level

Definition at line 113 of file KfFieldSlice.cxx.

References cbm::algo::kf::utils::simd::Cast(), and x.

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<typename T >
friend class boost::serialization::access
friend

Serialization function.

Definition at line 103 of file KfFieldSlice.h.

◆ FieldSlice

template<typename T >
template<typename >
friend class FieldSlice
friend

Definition at line 33 of file KfFieldSlice.h.

Member Data Documentation

◆ fBx

template<typename T >
CoeffArray_t cbm::algo::kf::FieldSlice< T >::fBx {{T(0.)}}
private

Approximation coefficients for the x-component of the field.

Definition at line 113 of file KfFieldSlice.h.

◆ fBy

template<typename T >
CoeffArray_t cbm::algo::kf::FieldSlice< T >::fBy {{T(0.)}}
private

Approximation coefficients for the y-component of the field.

Definition at line 114 of file KfFieldSlice.h.

◆ fBz

template<typename T >
CoeffArray_t cbm::algo::kf::FieldSlice< T >::fBz {{T(0.)}}
private

Approximation coefficients for the z-component of the field.

Definition at line 115 of file KfFieldSlice.h.

◆ fZref

template<typename T >
T cbm::algo::kf::FieldSlice< T >::fZref {defs::Undef<T>}
private

Reference z of the coefficients [cm].

Definition at line 116 of file KfFieldSlice.h.

◆ kNofCoeff

template<typename T >
int cbm::algo::kf::FieldSlice< T >::kNofCoeff {((kPolDegree + 1) * (kPolDegree + 2)) / 2}
staticconstexprprivate

Number of coefficients.

Definition at line 36 of file KfFieldSlice.h.

Referenced by cbm::algo::kf::FieldSlice< T >::FieldSlice().

◆ kPolDegree

template<typename T >
int cbm::algo::kf::FieldSlice< T >::kPolDegree {5}
staticconstexprprivate

Approximation polynomial degree.

Definition at line 35 of file KfFieldSlice.h.


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