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

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

#include <KfFieldRegion.h>

Public Member Functions

 ~GlobalField ()=delete
 Destructor of static class.
 

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, T x, T y, 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 field function (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 34 of file KfFieldRegion.h.

Constructor & Destructor Documentation

◆ ~GlobalField()

cbm::algo::kf::GlobalField::~GlobalField ( )
delete

Destructor of static class.

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 67 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,
T x,
T y,
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 533 of file KfFieldRegion.h.

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

Referenced by cbm::algo::kf::detail::ConcreteFieldRegion< T, EFieldMode::Original >::Get(), cbm::algo::kf::detail::ConcreteField< T, EFieldMode::Original >::GetFieldValue(), GetFieldValue(), and cbm::algo::kf::FieldBuilder::MakeField().

◆ IsUsingOriginalFieldForced()

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

Checks if the original field function is used.

Definition at line 70 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 50 of file KfFieldRegion.h.

References fgOriginalField, and fgOriginalFieldType.

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

◆ UndefField()

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

Undefined magnetic field function.

Definition at line 197 of file KfFieldRegion.cxx.

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

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 73 of file KfFieldRegion.h.

Referenced by ForceUseOfOriginalField(), and IsUsingOriginalFieldForced().

◆ fgOriginalField

◆ fgOriginalFieldType


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