CbmRoot
Loading...
Searching...
No Matches
cbm::algo::kf::GlobalField Class Reference

Handler for the global magnetic field related functions. More...

#include <KfFieldRegion.h>

Static Public Member Functions

static std::tuple< double, double, double > UndefField (double, double, double)
 Undefined magnetic field function.
 
static void SetFieldFunction (EFieldType fldType, const FieldFn_t &fn)
 Sets global field function.
 
template<typename T >
static FieldValue< T > GetFieldValue (const FieldFn_t &fieldFn, const T &x, const T &y, const T &z)
 Creates a field value object in a spactial point of a generic floating-point type.
 
static void ForceUseOfOriginalField (bool v=true)
 Forces the use of the original field function.
 
static bool IsUsingOriginalFieldForced ()
 Checks if the original field function is used.
 

Static Public Attributes

static FieldFn_t fgOriginalField {&GlobalField::UndefField}
 Global variable to store the fielf funciton (x,y,z)->(Bx,By,Bz)
 
static EFieldType fgOriginalFieldType {EFieldType::Null}
 Global field type.
 

Static Private Attributes

static bool fgForceUseOfOriginalField {false}
 Flag to force the use of the original field in all field classes.
 

Detailed Description

Handler for the global magnetic field related functions.

Definition at line 33 of file KfFieldRegion.h.

Member Function Documentation

◆ ForceUseOfOriginalField()

static void cbm::algo::kf::GlobalField::ForceUseOfOriginalField ( bool v = true)
inlinestatic

Forces the use of the original field function.

Definition at line 64 of file KfFieldRegion.h.

References fgForceUseOfOriginalField, and v.

Referenced by cbm::algo::ca::Framework::ReceiveParameters().

◆ GetFieldValue()

template<typename T >
FieldValue< T > cbm::algo::kf::GlobalField::GetFieldValue ( const FieldFn_t & fieldFn,
const T & x,
const T & y,
const T & z )
inlinestatic

Creates a field value object in a spactial point of a generic floating-point type.

Template Parameters
TFloating point data-type of the involved variables
Parameters
fieldFnField function (x,y,z)->(Bx,By,Bz)
xThe point x-coordinate [cm]
yThe point y-coordinate [cm]
zThe point z-coordinate [cm]
Returns
FieldValue<T> object

Definition at line 433 of file KfFieldRegion.h.

References cbm::algo::kf::FieldValue< T >::SetSimdEntry(), x, and y.

◆ IsUsingOriginalFieldForced()

static bool cbm::algo::kf::GlobalField::IsUsingOriginalFieldForced ( )
inlinestatic

Checks if the original field function is used.

Definition at line 67 of file KfFieldRegion.h.

References fgForceUseOfOriginalField.

Referenced by UndefField().

◆ SetFieldFunction()

static void cbm::algo::kf::GlobalField::SetFieldFunction ( EFieldType fldType,
const FieldFn_t & fn )
inlinestatic

Sets global field function.

Parameters
fnField function of the FairRoot format

Definition at line 46 of file KfFieldRegion.h.

References fgOriginalField, and fgOriginalFieldType.

Referenced by cbm::ca::tools::SetOriginalCbmField().

◆ UndefField()

std::tuple< double, double, double > cbm::algo::kf::GlobalField::UndefField ( double ,
double ,
double  )
static

Undefined magnetic field function.

Definition at line 228 of file KfFieldRegion.cxx.

References IsUsingOriginalFieldForced(), and cbm::algo::kf::defs::Undef< double >.

Member Data Documentation

◆ fgForceUseOfOriginalField

bool cbm::algo::kf::GlobalField::fgForceUseOfOriginalField {false}
staticprivate

Flag to force the use of the original field in all field classes.

Definition at line 70 of file KfFieldRegion.h.

Referenced by ForceUseOfOriginalField(), and IsUsingOriginalFieldForced().

◆ fgOriginalField

FieldFn_t cbm::algo::kf::GlobalField::fgOriginalField {&GlobalField::UndefField}
static

◆ fgOriginalFieldType

EFieldType cbm::algo::kf::GlobalField::fgOriginalFieldType {EFieldType::Null}
static

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