Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KFParticleFieldRegion Class Reference

A class to store an approximation of the magnetic field along the particle trajectory. Is used for nonhomogeneous field. More...

#include <KFParticle/blob/master/KFParticle/KFParticleField.h>

Public Member Functions

 KFParticleFieldRegion ()
 
 KFParticleFieldRegion (const float field[10])
 
KFParticleFieldValue Get (const float_v z)
 
void Set (const KFParticleFieldValue &B0, const float_v B0z, const KFParticleFieldValue &B1, const float_v B1z, const KFParticleFieldValue &B2, const float_v B2z)
 
void Set (const KFParticleFieldValue &B0, const float_v B0z, const KFParticleFieldValue &B1, const float_v B1z)
 
void SetOneEntry (const float *field, int iEntry=0)
 
void SetOneEntry (const int i0, const KFParticleFieldRegion &f1, const int i1)
 

Public Attributes

float_v fField [10]
 

Detailed Description

A class to store an approximation of the magnetic field along the particle trajectory. Is used for nonhomogeneous field.

Author
M.Zyzak, I.Kisel
Date
05.02.2019
Version
1.0

The class is used to store the approximation of the magnetic field along the particle trajectory. Each component Bx, By, Bz is approximated with a parabola function depending on the z coordinate. The class is fully vectorised, all parameters are stored in SIMD vectors. The class is used in case of the CBM-like nonhomogenious magnetic field.

Definition at line 81 of file KFParticleField.h.

View newest version in sPHENIX GitHub at line 81 of file KFParticleField.h

Constructor & Destructor Documentation

KFParticleFieldRegion::KFParticleFieldRegion ( )
inline

Definition at line 84 of file KFParticleField.h.

View newest version in sPHENIX GitHub at line 84 of file KFParticleField.h

KFParticleFieldRegion::KFParticleFieldRegion ( const float  field[10])
inline

Sets current vectorised representation of the magnetic field approximation from the scalar input array.

Parameters
[in]field[10]- the scalar input array with the magnetic field approximation

Definition at line 85 of file KFParticleField.h.

View newest version in sPHENIX GitHub at line 85 of file KFParticleField.h

References fField, and i.

Member Function Documentation

KFParticleFieldValue KFParticleFieldRegion::Get ( const float_v  z)
inline

Returns a magnetic field vector calculated using current parametrisation at the given Z coordinate.

Parameters
[in]z- value of the Z coordinate, where magnetic field should be calculated.

Definition at line 94 of file KFParticleField.h.

View newest version in sPHENIX GitHub at line 94 of file KFParticleField.h

References dz, fField, KFParticleFieldValue::x, KFParticleFieldValue::y, and KFParticleFieldValue::z.

void KFParticleFieldRegion::Set ( const KFParticleFieldValue B0,
const float_v  B0z,
const KFParticleFieldValue B1,
const float_v  B1z,
const KFParticleFieldValue B2,
const float_v  B2z 
)
inline

Approximates the magnetic field with the parabolas using three points along the particle trajectory.

Parameters
[in]B0- magnetic field vector at the first point
[in]B0z- Z position of the first point
[in]B1- magnetic field vector at the second point
[in]B1z- Z position of the second point
[in]B2- magnetic field vector at the third point
[in]B2z- Z position of the third point

Definition at line 108 of file KFParticleField.h.

View newest version in sPHENIX GitHub at line 108 of file KFParticleField.h

References fField, KFParticleFieldValue::x, KFParticleFieldValue::y, and KFParticleFieldValue::z.

void KFParticleFieldRegion::Set ( const KFParticleFieldValue B0,
const float_v  B0z,
const KFParticleFieldValue B1,
const float_v  B1z 
)
inline

Approximates the magnetic field with the strainght line using two points.

Parameters
[in]B0- magnetic field vector at the first point
[in]B0z- Z position of the first point
[in]B1- magnetic field vector at the second point
[in]B1z- Z position of the second point

Definition at line 147 of file KFParticleField.h.

View newest version in sPHENIX GitHub at line 147 of file KFParticleField.h

References fField, KFParticleFieldValue::x, KFParticleFieldValue::y, and KFParticleFieldValue::z.

void KFParticleFieldRegion::SetOneEntry ( const float *  field,
int  iEntry = 0 
)
inline

Sets one element of the SIMD vector with index iEntry.

Parameters
[in]field- a scalar input array with the approximation of the magnetic field
[in]iEntry- entry number of the current SIMD vectors to be set with the input approximation

Definition at line 167 of file KFParticleField.h.

View newest version in sPHENIX GitHub at line 167 of file KFParticleField.h

References fField, and i.

void KFParticleFieldRegion::SetOneEntry ( const int  i0,
const KFParticleFieldRegion f1,
const int  i1 
)
inline

Copies the field approximation from the vector f1 with index i1 to the SIMD vector elemets of the current object with index i0.

Parameters
[in]i0- index of the SIMD vector elements of the current field approximation to be set
[in]f1- input approximation of the magnetic field
[in]i1- index of the SIMD vector elements of the input approximation to be copied to the current object

Definition at line 177 of file KFParticleField.h.

View newest version in sPHENIX GitHub at line 177 of file KFParticleField.h

References fField, and i.

Member Data Documentation

float_v KFParticleFieldRegion::fField[10]

The coefficients of the field approximation:
cx0 = fField[0], cx1 = fField[1], cx2 = fField[2] - coefficients of the Bx approximation;
cy0 = fField[3], cy1 = fField[4], cy2 = fField[5] - coefficients of the By approximation;
cz0 = fField[6], cz1 = fField[7], cz2 = fField[8] - coefficients of the Bz approximation;
z0 = fField[9] - reference Z coordinate.
Bx(z) = cx0 + cx1*(z-z0) + cx2*(z-z0)^2
By(z) = cy0 + cy1*(z-z0) + cy2*(z-z0)^2
Bz(z) = cz0 + cz1*(z-z0) + cz2*(z-z0)^2

Definition at line 197 of file KFParticleField.h.

View newest version in sPHENIX GitHub at line 197 of file KFParticleField.h

Referenced by Get(), KFParticleFieldRegion(), Set(), and SetOneEntry().


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