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

Magnetic field region, corresponding to a hit triplet. More...

#include <KfFieldRegion.h>

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

Public Types

template<EFieldMode Mode>
using ConcreteFieldRegion_t = typename detail::ConcreteFieldRegion<T, Mode>
 
using Interpolated_t = ConcreteFieldRegion_t<EFieldMode::Interpolated>
 
using Original_t = ConcreteFieldRegion_t<EFieldMode::Original>
 
using FieldRegionVariant_t = typename std::variant<Interpolated_t, Original_t>
 

Public Member Functions

 FieldRegion ()=default
 Default constructor.
 
 FieldRegion (const FieldRegion &)=default
 Copy constructor.
 
 FieldRegion (FieldRegion &&)=default
 Move constructor.
 
 FieldRegion (const FieldValue< T > &b0, const FieldValue< T > &b1, const FieldValue< T > &b2)
 Constructor for interpolated field.
 
 FieldRegion (EFieldType type, const FieldFn_t &fieldFn)
 Constructor for original field.
 
 ~FieldRegion ()=default
 Constructor from a concrete field.
 
FieldRegionoperator= (const FieldRegion &)=default
 Copy assignment operator.
 
FieldRegionoperator= (FieldRegion &&)=default
 Move assignment operator.
 
FieldValue< T > Get (T x, T y, T z) const
 Gets the field value in a spatial point on the track.
 
template<EFieldMode FieldMode>
ConcreteFieldRegion_t< FieldMode > * GetConcrete ()
 Gets a pointer to the concrete field instance (mutable access)
 
template<EFieldMode FieldMode>
const ConcreteFieldRegion_t< FieldMode > * GetConcrete () const
 Gets a pointer to the concrete field instance (constant access)
 
std::tuple< T, T, T > GetDoubleIntegrals (T x1, T y1, T z1, T x2, T y2, T z2) const
 Gets the double integrals of the field along the track.
 
EFieldMode GetFieldMode () const
 Gets field mode.
 
EFieldType GetFieldType () const
 Gets field type.
 
void Set (const FieldValue< T > &b0, const FieldValue< T > &b1, const FieldValue< T > &b2)
 Interpolates the field by three nodal points with the second order polynomial.
 
void SetFieldType (EFieldType type)
 Sets the field type.
 
void Shift (T z)
 Shifts the coefficients to another first z-coordinate.
 
void CheckConsistency () const
 Consistency checker.
 
std::string ToString (int indentLevel=0, int verbose=1) const
 String representation of the class content.
 

Static Public Member Functions

template<typename I>
static FieldRegion CopyConvert (const FieldRegion< I > &other)
 Creates a converted copy of the field with a different floating point type.
 
template<EFieldMode FieldMode, typename... Args>
static constexpr FieldRegion Create (Args... args)
 Creates a field region.
 
template<typename... Args>
static constexpr FieldRegion Create (EFieldMode mode, Args... args)
 Creates a field region.
 

Private Member Functions

template<typename I, EFieldMode FieldMode>
 FieldRegion (const FieldRegion< I > &other, Tag< FieldMode >)
 Constructor from a field region with another floating point type.
 
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)
 

Private Attributes

FieldRegionVariant_t fFrVariant
 A variant of concrete field region.
 

Friends

template<typename>
class FieldRegion
 
class boost::serialization::access
 Serialization method.
 

Detailed Description

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

Magnetic field region, corresponding to a hit triplet.

Template Parameters
TUnderlying data-type

Definition at line 307 of file KfFieldRegion.h.

Member Typedef Documentation

◆ ConcreteFieldRegion_t

template<typename T>
template<EFieldMode Mode>
using cbm::algo::kf::FieldRegion< T >::ConcreteFieldRegion_t = typename detail::ConcreteFieldRegion<T, Mode>

Definition at line 313 of file KfFieldRegion.h.

◆ FieldRegionVariant_t

template<typename T>
using cbm::algo::kf::FieldRegion< T >::FieldRegionVariant_t = typename std::variant<Interpolated_t, Original_t>

Definition at line 316 of file KfFieldRegion.h.

◆ Interpolated_t

template<typename T>
using cbm::algo::kf::FieldRegion< T >::Interpolated_t = ConcreteFieldRegion_t<EFieldMode::Interpolated>

Definition at line 314 of file KfFieldRegion.h.

◆ Original_t

template<typename T>
using cbm::algo::kf::FieldRegion< T >::Original_t = ConcreteFieldRegion_t<EFieldMode::Original>

Definition at line 315 of file KfFieldRegion.h.

Constructor & Destructor Documentation

◆ FieldRegion() [1/6]

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

Default constructor.

◆ FieldRegion() [2/6]

template<typename T>
cbm::algo::kf::FieldRegion< T >::FieldRegion ( const FieldRegion< T > & )
default

Copy constructor.

References FieldRegion.

◆ FieldRegion() [3/6]

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

Move constructor.

References FieldRegion.

◆ FieldRegion() [4/6]

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

Constructor for interpolated field.

Parameters
b0Field value at the first nodal point [kG]
b1Field value at the second nodal point [kG]
b2Field value at the third nodal point [kG]

Definition at line 331 of file KfFieldRegion.h.

References fFrVariant.

◆ FieldRegion() [5/6]

template<typename T>
cbm::algo::kf::FieldRegion< T >::FieldRegion ( EFieldType type,
const FieldFn_t & fieldFn )
inline

Constructor for original field.

Parameters
typeField type
fieldFnExternal magnetic field function

Definition at line 339 of file KfFieldRegion.h.

References fFrVariant.

◆ ~FieldRegion()

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

Constructor from a concrete field.

Destructor

◆ FieldRegion() [6/6]

template<typename T>
template<typename I, EFieldMode FieldMode>
cbm::algo::kf::FieldRegion< T >::FieldRegion ( const FieldRegion< I > & other,
Tag< FieldMode >  )
inlineprivate

Constructor from a field region with another floating point type.

Template Parameters
IUnderlying floating point type of another field region
FieldModeMode of the another field region

Definition at line 490 of file KfFieldRegion.h.

References fFrVariant, and FieldRegion.

Member Function Documentation

◆ CheckConsistency()

template<typename T>
void cbm::algo::kf::FieldRegion< T >::CheckConsistency ( ) const
inline

Consistency checker.

Definition at line 471 of file KfFieldRegion.h.

References fFrVariant.

◆ CopyConvert()

template<typename T>
template<typename I>
static FieldRegion cbm::algo::kf::FieldRegion< T >::CopyConvert ( const FieldRegion< I > & other)
inlinestatic

Creates a converted copy of the field with a different floating point type.

Template Parameters
Iunderlying type of the class
Parameters
otherA source field of different type

Definition at line 359 of file KfFieldRegion.h.

References fFrVariant, and FieldRegion.

Referenced by cbm::algo::ca::TripletConstructorSW::FitTriplets().

◆ Create() [1/2]

template<typename T>
template<EFieldMode FieldMode, typename... Args>
static constexpr FieldRegion cbm::algo::kf::FieldRegion< T >::Create ( Args... args)
inlinestaticconstexpr

Creates a field region.

Definition at line 416 of file KfFieldRegion.h.

References FieldRegion.

◆ Create() [2/2]

template<typename T>
template<typename... Args>
static constexpr FieldRegion cbm::algo::kf::FieldRegion< T >::Create ( EFieldMode mode,
Args... args )
inlinestaticconstexpr

Creates a field region.

Parameters
modeField mode
argsArguments to be passed to a concrete constructor

Definition at line 425 of file KfFieldRegion.h.

References FieldRegion, cbm::algo::kf::Interpolated, and cbm::algo::kf::Original.

◆ Get()

template<typename T>
FieldValue< T > cbm::algo::kf::FieldRegion< T >::Get ( T x,
T y,
T z ) const
inline

Gets the field value in a spatial point on the track.

Parameters
xx-coordinate of the point [cm]
yy-coordinate of the point [cm]
zz-coordinate of the point [cm]
Note
The x and y coordinates are ignored, if the interpolated field is used

Definition at line 371 of file KfFieldRegion.h.

References fFrVariant, x, and y.

Referenced by cbm::kf::CreateKfParticle().

◆ GetConcrete() [1/2]

template<typename T>
template<EFieldMode FieldMode>
ConcreteFieldRegion_t< FieldMode > * cbm::algo::kf::FieldRegion< T >::GetConcrete ( )
inline

Gets a pointer to the concrete field instance (mutable access)

Template Parameters
FieldModeField mode
Note
Returns nullptr, if the FieldMode differs from the type of the field region held by the fFrVariant

Definition at line 380 of file KfFieldRegion.h.

References fFrVariant.

Referenced by CbmL1PFFitter::PFFieldRegion::getL1FieldRegion(), and CbmL1PFFitter::PFFieldRegion::setFromL1FieldRegion().

◆ GetConcrete() [2/2]

template<typename T>
template<EFieldMode FieldMode>
const ConcreteFieldRegion_t< FieldMode > * cbm::algo::kf::FieldRegion< T >::GetConcrete ( ) const
inline

Gets a pointer to the concrete field instance (constant access)

Template Parameters
FieldModeField mode
Note
Returns nullptr, if the FieldMode differs from the type of the field region held by the fFrVariant

Definition at line 389 of file KfFieldRegion.h.

References fFrVariant.

◆ GetDoubleIntegrals()

template<typename T>
std::tuple< T, T, T > cbm::algo::kf::FieldRegion< T >::GetDoubleIntegrals ( T x1,
T y1,
T z1,
T x2,
T y2,
T z2 ) const
inline

Gets the double integrals of the field along the track.

Definition at line 395 of file KfFieldRegion.h.

References fFrVariant.

◆ GetFieldMode()

template<typename T>
EFieldMode cbm::algo::kf::FieldRegion< T >::GetFieldMode ( ) const
inline

Gets field mode.

Definition at line 403 of file KfFieldRegion.h.

References fFrVariant.

◆ GetFieldType()

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

Gets field type.

Definition at line 409 of file KfFieldRegion.h.

References fFrVariant.

◆ load()

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

Serialization load method.

Definition at line 499 of file KfFieldRegion.h.

References fFrVariant.

◆ operator=() [1/2]

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

Copy assignment operator.

References FieldRegion.

◆ operator=() [2/2]

template<typename T>
FieldRegion & cbm::algo::kf::FieldRegion< T >::operator= ( FieldRegion< T > && )
default

Move assignment operator.

References FieldRegion.

◆ save()

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

Serialization save method.

Definition at line 508 of file KfFieldRegion.h.

References fFrVariant.

◆ serialize()

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

Definition at line 521 of file KfFieldRegion.h.

◆ Set()

template<typename T>
void cbm::algo::kf::FieldRegion< T >::Set ( const FieldValue< T > & b0,
const FieldValue< T > & b1,
const FieldValue< T > & b2 )
inline

Interpolates the field by three nodal points with the second order polynomial.

Note
The interpolation is carried out vs. z-coordinates of the space points of the field values
Parameters
b0Field value at z0 [kG]
b1Field value at z1 [kG]
b2Field value at z2 [kG]

Definition at line 440 of file KfFieldRegion.h.

References fFrVariant, and cbm::algo::kf::Interpolated.

Referenced by cbm::algo::ca::TripletConstructor::CreateTripletsForHit(), and CbmL1PFFitter::Fit().

◆ SetFieldType()

template<typename T>
void cbm::algo::kf::FieldRegion< T >::SetFieldType ( EFieldType type)
inline

Sets the field type.

Definition at line 452 of file KfFieldRegion.h.

References fFrVariant.

◆ Shift()

template<typename T>
void cbm::algo::kf::FieldRegion< T >::Shift ( T z)
inline

Shifts the coefficients to another first z-coordinate.

Parameters
znew z-coordinate [cm]

Definition at line 459 of file KfFieldRegion.h.

References fFrVariant, and cbm::algo::kf::Interpolated.

◆ ToString()

template<typename T>
std::string cbm::algo::kf::FieldRegion< T >::ToString ( int indentLevel = 0,
int verbose = 1 ) const
inline

String representation of the class content.

Parameters
intdentLevelIndent level
verboseVerbosity level

Definition at line 479 of file KfFieldRegion.h.

References fFrVariant.

Friends And Related Symbol Documentation

◆ boost::serialization::access

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

Serialization method.

Definition at line 519 of file KfFieldRegion.h.

◆ FieldRegion

template<typename T>
template<typename>
friend class FieldRegion
friend

Member Data Documentation

◆ fFrVariant


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