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

Magnetic field manager class. More...

#include <KfField.h>

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

Public Member Functions

 Field (EFieldMode fldMode, EFieldType fldType)
 Constructor.
 
template<typename I >
 Field (const Field< I > &other)
 Copy constructor.
 
 ~Field ()=default
 Destructor.
 
Fieldoperator= (const Field &other)
 Copy assignment operator.
 
FieldValue< T > GetFieldValue (int sliceID, const T &x, const T &y) const
 Creates field value object.
 
EFieldType GetFieldType () const
 Gets field type.
 
const FieldRegion< T > & GetPrimVertexField () const
 Gets field region near primary vertex.
 
FieldRegion< T > GetFieldRegion (const FieldValue< T > &b0, const T &z0, const FieldValue< T > &b1, const T &z1, const FieldValue< T > &b2, const T &z2) const
 Makes field region object.
 
void RemoveSlice (int iLayer)
 Removes a field slice.
 
std::string ToString (int indentLevel, int verbose) const
 String representation of the class.
 

Private Member Functions

 Field ()=default
 Default constructor.
 
template<class Archive >
void load (Archive &ar, const unsigned int)
 Serialization load method.
 
template<class Archive >
void save (Archive &ar, const unsigned int) const
 Serialization save method.
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialization method.
 

Private Attributes

std::optional< detail::FieldBase< T, EFieldMode::Intrpl > > foFldIntrpl {std::nullopt}
 Interpolated field.
 
std::optional< detail::FieldBase< T, EFieldMode::Orig > > foFldOrig {std::nullopt}
 Original field.
 
FieldRegion< T > fPrimVertexField
 Field region near primary vertex (constant field is assumed)
 
EFieldType fFieldType {EFieldType::Normal}
 Field type.
 
EFieldMode fFieldMode
 Field mode.
 

Friends

template<typename >
class Field
 
class FieldFactory
 
class boost::serialization::access
 

Detailed Description

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

Magnetic field manager class.

Template Parameters
TUnderlying floating point type (float/double/fvec)

Definition at line 188 of file KfField.h.

Constructor & Destructor Documentation

◆ Field() [1/3]

template<typename T >
cbm::algo::kf::Field< T >::Field ( EFieldMode fldMode,
EFieldType fldType )
inline

Constructor.

Parameters
fldModeField mode

Definition at line 197 of file KfField.h.

References cbm::algo::kf::Intrpl, and cbm::algo::kf::Orig.

◆ Field() [2/3]

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

Copy constructor.

Definition at line 210 of file KfField.h.

References cbm::algo::kf::Intrpl, and cbm::algo::kf::Orig.

◆ ~Field()

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

Destructor.

◆ Field() [3/3]

template<typename T >
cbm::algo::kf::Field< T >::Field ( )
privatedefault

Default constructor.

Member Function Documentation

◆ GetFieldRegion()

template<typename T >
FieldRegion< T > cbm::algo::kf::Field< T >::GetFieldRegion ( const FieldValue< T > & b0,
const T & z0,
const FieldValue< T > & b1,
const T & z1,
const FieldValue< T > & b2,
const T & z2 ) const
inline

Makes field region object.

Parameters
b0Field value in the first node [kG]
z0First node z-coordinate [cm]
b1Field value in the first node [kG]
z1Second node z-coordinate [cm]
b2Field value in the first node [kG]
z2Third node z-coordinate [cm]
Note
Parameters b0-b2, z0-z2 are ignored, if fFieldMode == EFieldMode::Orig

Definition at line 263 of file KfField.h.

◆ GetFieldType()

template<typename T >
EFieldType cbm::algo::kf::Field< T >::GetFieldType ( ) const
inline

Gets field type.

Definition at line 250 of file KfField.h.

◆ GetFieldValue()

template<typename T >
FieldValue< T > cbm::algo::kf::Field< T >::GetFieldValue ( int sliceID,
const T & x,
const T & y ) const
inline

Creates field value object.

Parameters
sliceIDIndex of slice
xx-coordinate of the point [cm]
yy-coordinate of the point [cm]

Definition at line 243 of file KfField.h.

References x, and y.

◆ GetPrimVertexField()

template<typename T >
const FieldRegion< T > & cbm::algo::kf::Field< T >::GetPrimVertexField ( ) const
inline

Gets field region near primary vertex.

Definition at line 253 of file KfField.h.

◆ load()

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

Serialization load method.

Definition at line 285 of file KfField.h.

◆ operator=()

◆ RemoveSlice()

template<typename T >
void Field::RemoveSlice ( int iLayer)

Removes a field slice.

Parameters
iLayerIndex of field slice

Definition at line 56 of file KfField.cxx.

References cbm::algo::kf::Intrpl, and cbm::algo::kf::Orig.

◆ save()

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

Serialization save method.

Definition at line 298 of file KfField.h.

◆ serialize()

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

Serialization method.

Definition at line 313 of file KfField.h.

◆ ToString()

template<typename T >
std::string Field::ToString ( int indentLevel,
int verbose ) const

String representation of the class.

Parameters
indentLevelIndent level of the string output
verboseVerbosity level

Definition at line 69 of file KfField.cxx.

References cbm::algo::kf::Intrpl, and cbm::algo::kf::Orig.

Friends And Related Symbol Documentation

◆ boost::serialization::access

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

Definition at line 192 of file KfField.h.

◆ Field

template<typename T >
template<typename >
friend class Field
friend

Definition at line 190 of file KfField.h.

◆ FieldFactory

template<typename T >
friend class FieldFactory
friend

Definition at line 191 of file KfField.h.

Member Data Documentation

◆ fFieldMode

template<typename T >
EFieldMode cbm::algo::kf::Field< T >::fFieldMode
private

Field mode.

Definition at line 322 of file KfField.h.

Referenced by cbm::algo::kf::Field< T >::operator=().

◆ fFieldType

template<typename T >
EFieldType cbm::algo::kf::Field< T >::fFieldType {EFieldType::Normal}
private

Field type.

Definition at line 321 of file KfField.h.

Referenced by cbm::algo::kf::Field< T >::operator=().

◆ foFldIntrpl

template<typename T >
std::optional<detail::FieldBase<T, EFieldMode::Intrpl> > cbm::algo::kf::Field< T >::foFldIntrpl {std::nullopt}
private

Interpolated field.

Definition at line 318 of file KfField.h.

Referenced by cbm::algo::kf::Field< T >::operator=().

◆ foFldOrig

template<typename T >
std::optional<detail::FieldBase<T, EFieldMode::Orig> > cbm::algo::kf::Field< T >::foFldOrig {std::nullopt}
private

Original field.

Definition at line 319 of file KfField.h.

Referenced by cbm::algo::kf::Field< T >::operator=().

◆ fPrimVertexField

template<typename T >
FieldRegion<T> cbm::algo::kf::Field< T >::fPrimVertexField
private

Field region near primary vertex (constant field is assumed)

Definition at line 320 of file KfField.h.

Referenced by cbm::algo::kf::Field< T >::operator=().


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