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

A helper class to instantiate a Field object. More...

#include <KfField.h>

Classes

struct  SliceRef
 A helper structure for field slices initialization. More...
 

Public Member Functions

 FieldFactory ()=default
 Default constructor.
 
 FieldFactory (const FieldFactory &)=default
 Copy constructor.
 
 ~FieldFactory ()=default
 Destructor.
 
FieldFactoryoperator= (const FieldFactory &)=default
 Copy assignment operator.
 
void AddSliceReference (double halfSizeX, double halfSizeY, double refZ)
 Adds a slice reference.
 
EFieldMode GetFieldMode () const
 Gets field mode.
 
EFieldType GetFieldType () const
 Gets field type.
 
template<typename T >
Field< T > MakeField () const
 Create field.
 
void Reset ()
 Resets the instance.
 
void ResetSliceReferences ()
 Resets slicer references.
 
void SetFieldFunction (const FieldFn_t &fieldFn, EFieldType fldType)
 Sets magnetic field function.
 
void SetFieldMode (EFieldMode fldMode)
 Sets field mode.
 
void SetStep (double step=2.5)
 Sets a step for the primary vertex field region estimation.
 
void SetTarget (double x, double y, double z)
 Sets target.
 

Private Attributes

std::set< SliceReffSliceReferences
 Set of slice references.
 
FieldFn_t fFieldFn {defs::ZeroFieldFn}
 Field function (x, y, z) [cm] -> (Bx, By, Bz) [kG].
 
double fTargetStep {2.5}
 Step between nodal points for the primary vertex field estimation.
 
EFieldType fFieldType {EFieldType::Null}
 Field type.
 
EFieldMode fFieldMode {EFieldMode::Intrpl}
 FieldMode.
 
std::array< double, 3 > fTarget {{defs::Undef<double>, defs::Undef<double>, defs::Undef<double>}}
 Target position.
 

Detailed Description

A helper class to instantiate a Field object.

Definition at line 328 of file KfField.h.

Constructor & Destructor Documentation

◆ FieldFactory() [1/2]

cbm::algo::kf::FieldFactory::FieldFactory ( )
default

Default constructor.

◆ FieldFactory() [2/2]

cbm::algo::kf::FieldFactory::FieldFactory ( const FieldFactory & )
default

Copy constructor.

◆ ~FieldFactory()

cbm::algo::kf::FieldFactory::~FieldFactory ( )
default

Destructor.

Member Function Documentation

◆ AddSliceReference()

void FieldFactory::AddSliceReference ( double halfSizeX,
double halfSizeY,
double refZ )

Adds a slice reference.

Parameters
halfSizeXHalf-size of the slice in x-direction [cm]
halfSizeYHalf-size of the slice in y-direction [cm]
refZReference z-position of the slice [cm]

Definition at line 96 of file KfField.cxx.

References fSliceReferences.

Referenced by cbm::algo::kf::SetupBuilder::Init(), and cbm::algo::kf::SetupBuilder::SetFromSetup().

◆ GetFieldMode()

EFieldMode cbm::algo::kf::FieldFactory::GetFieldMode ( ) const
inline

Gets field mode.

Definition at line 366 of file KfField.h.

◆ GetFieldType()

EFieldType cbm::algo::kf::FieldFactory::GetFieldType ( ) const
inline

Gets field type.

Definition at line 369 of file KfField.h.

◆ MakeField()

template<typename T >
Field< T > cbm::algo::kf::FieldFactory::MakeField ( ) const

Create field.

Template Parameters
TUnderlying floating-point data type

Definition at line 417 of file KfField.h.

References pos, and x.

Referenced by cbm::algo::kf::SetupBuilder::MakeSetup().

◆ operator=()

FieldFactory & cbm::algo::kf::FieldFactory::operator= ( const FieldFactory & )
default

Copy assignment operator.

◆ Reset()

void cbm::algo::kf::FieldFactory::Reset ( )
inline

Resets the instance.

Definition at line 377 of file KfField.h.

Referenced by cbm::algo::kf::SetupBuilder::Reset().

◆ ResetSliceReferences()

void cbm::algo::kf::FieldFactory::ResetSliceReferences ( )
inline

Resets slicer references.

Definition at line 380 of file KfField.h.

Referenced by cbm::algo::kf::SetupBuilder::SetFromSetup().

◆ SetFieldFunction()

void cbm::algo::kf::FieldFactory::SetFieldFunction ( const FieldFn_t & fieldFn,
EFieldType fldType )
inline

Sets magnetic field function.

Parameters
fieldFnMagnetic field function (KF-format)

Definition at line 384 of file KfField.h.

Referenced by cbm::algo::kf::SetupBuilder::SetFieldFunction().

◆ SetFieldMode()

void cbm::algo::kf::FieldFactory::SetFieldMode ( EFieldMode fldMode)
inline

Sets field mode.

Definition at line 391 of file KfField.h.

◆ SetStep()

void cbm::algo::kf::FieldFactory::SetStep ( double step = 2.5)
inline

Sets a step for the primary vertex field region estimation.

Parameters
stepA step between nodal points in z-axis direction [cm]

Definition at line 395 of file KfField.h.

Referenced by cbm::algo::kf::SetupBuilder::SetFieldFunction().

◆ SetTarget()

void cbm::algo::kf::FieldFactory::SetTarget ( double x,
double y,
double z )
inline

Sets target.

Parameters
xx-coordinate of the target position [cm]
yy-coordinate of the target position [cm]
zz-coordinate of the target position [cm]

Definition at line 401 of file KfField.h.

References x, and y.

Referenced by cbm::algo::kf::SetupBuilder::SetTargetProperty().

Member Data Documentation

◆ fFieldFn

FieldFn_t cbm::algo::kf::FieldFactory::fFieldFn {defs::ZeroFieldFn}
private

Field function (x, y, z) [cm] -> (Bx, By, Bz) [kG].

Definition at line 405 of file KfField.h.

◆ fFieldMode

EFieldMode cbm::algo::kf::FieldFactory::fFieldMode {EFieldMode::Intrpl}
private

FieldMode.

Definition at line 408 of file KfField.h.

◆ fFieldType

EFieldType cbm::algo::kf::FieldFactory::fFieldType {EFieldType::Null}
private

Field type.

Definition at line 407 of file KfField.h.

◆ fSliceReferences

std::set<SliceRef> cbm::algo::kf::FieldFactory::fSliceReferences
private

Set of slice references.

Definition at line 404 of file KfField.h.

Referenced by AddSliceReference().

◆ fTarget

std::array<double, 3> cbm::algo::kf::FieldFactory::fTarget {{defs::Undef<double>, defs::Undef<double>, defs::Undef<double>}}
private

Target position.

Definition at line 411 of file KfField.h.

◆ fTargetStep

double cbm::algo::kf::FieldFactory::fTargetStep {2.5}
private

Step between nodal points for the primary vertex field estimation.

Definition at line 406 of file KfField.h.


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