ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::SolenoidBField Class Reference

#include <acts/blob/master/Core/include/Acts/MagneticField/SolenoidBField.hpp>

+ Collaboration diagram for Acts::SolenoidBField:

Classes

struct  Cache
 
struct  Config
 Config struct for the SolenoidBfield. More...
 

Public Member Functions

 SolenoidBField (Config config)
 the constructur with a shared pointer
 
Vector3D getField (const Vector3D &position) const
 retrieve magnetic field value
 
Vector3D getField (const Vector3D &position, Cache &) const
 Retrieve magnetic field value.
 
Vector2D getField (const Vector2D &position) const
 Retrieve magnetic field value in local (r,z) coordinates.
 
Vector3D getFieldGradient (const Vector3D &position, ActsMatrixD< 3, 3 > &) const
 retrieve magnetic field value & its gradient
 
Vector3D getFieldGradient (const Vector3D &position, ActsMatrixD< 3, 3 > &, Cache &) const
 retrieve magnetic field value & its gradient
 

Private Member Functions

Vector2D multiCoilField (const Vector2D &pos, double scale) const
 
Vector2D singleCoilField (const Vector2D &pos, double scale) const
 
double B_r (const Vector2D &pos, double scale) const
 
double B_z (const Vector2D &pos, double scale) const
 
double k2 (double r, double z) const
 

Private Attributes

Config m_cfg
 
double m_scale
 
double m_dz
 
double m_R2
 

Detailed Description

Implements a multi-coil solenoid magnetic field. On every call, the field is evaluated at that exact position. The field has radially symmetry, the field vectors point in +z direction. The config exposes a target field value in the center. This value is used to empirically determine a scale factor which reproduces this field value in the center.

E_1(k^2) = complete elliptic integral of the 1st kind E_2(k^2) = complete elliptic integral of the 2nd kind

E_1(k^2) and E_2(k^2) are usually indicated as K(k^2) and E(k^2) in literature, respectively _ 2 / pi / 2 2 2 - 1 / 2 E (k ) = | ( 1 - k sin {theta} ) dtheta 1 _/ 0

        _          ____________________

2 / pi / 2| / 2 2 E (k ) = | |/ 1 - k sin {theta} dtheta 2 _/ 0

k^2 = is a function of the point (r, z) and of the radius of the coil R

2 4Rr k = ------------— 2 2 (R + r) + z Using these, you can evaluate the two components B_r and B_z of the magnetic field: _ _ mu I | / 2 \ | 0 kz | |2 - k | 2 2 | B (r, z) = --— ---— | |----—|E (k ) - E (k ) | r 4pi ___ | | 2| 2 1 | | / 3 |_ \2 - 2k / _| |/ Rr

 _                                       _

mu I | / 2 \ | 0 k | | (R + r)k - 2r | 2 2 | B (r,z) = --— -— | | -----------— | E (k ) + E (k ) | z 4pi __ | | 2 | 2 1 | |/Rr |_ \ 2r(1 - k ) / _|

Definition at line 65 of file SolenoidBField.hpp.

View newest version in sPHENIX GitHub at line 65 of file SolenoidBField.hpp

Constructor & Destructor Documentation

Acts::SolenoidBField::SolenoidBField ( Config  config)

the constructur with a shared pointer

Note
since it is a shared field, we enforce it to be const
Template Parameters
bFieldis the shared BField to be stored

Definition at line 15 of file SolenoidBField.cpp.

View newest version in sPHENIX GitHub at line 15 of file SolenoidBField.cpp

References Acts::SolenoidBField::Config::bMagCenter, Acts::SolenoidBField::Config::length, m_cfg, m_dz, m_R2, m_scale, multiCoilField(), Acts::SolenoidBField::Config::nCoils, and Acts::SolenoidBField::Config::radius.

+ Here is the call graph for this function:

Member Function Documentation

double Acts::SolenoidBField::B_r ( const Vector2D pos,
double  scale 
) const
private

Definition at line 77 of file SolenoidBField.cpp.

View newest version in sPHENIX GitHub at line 77 of file SolenoidBField.cpp

References kdfinder::abs(), B(), k, k2, M_PI, r, and z.

+ Here is the call graph for this function:

double Acts::SolenoidBField::B_z ( const Vector2D pos,
double  scale 
) const
private

Definition at line 114 of file SolenoidBField.cpp.

View newest version in sPHENIX GitHub at line 114 of file SolenoidBField.cpp

References kdfinder::abs(), B(), k, k2, M_PI, r, and z.

+ Here is the call graph for this function:

Acts::Vector3D Acts::SolenoidBField::getField ( const Vector3D position) const

retrieve magnetic field value

Parameters
[in]positionglobal 3D position
Returns
magnetic field vector at given position

Definition at line 24 of file SolenoidBField.cpp.

View newest version in sPHENIX GitHub at line 24 of file SolenoidBField.cpp

References Acts::VectorHelpers::perp().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::IntegrationTest::BOOST_DATA_TEST_CASE(), main(), and Acts::solenoidFieldMapper().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Acts::Vector3D Acts::SolenoidBField::getField ( const Vector3D position,
Cache  
) const

Retrieve magnetic field value.

Parameters
[in]positionglobal 3D position
[in]cacheCache object, passed through to wrapped BField

Definition at line 39 of file SolenoidBField.cpp.

View newest version in sPHENIX GitHub at line 39 of file SolenoidBField.cpp

Acts::Vector2D Acts::SolenoidBField::getField ( const Vector2D position) const

Retrieve magnetic field value in local (r,z) coordinates.

Parameters
[in]positionlocal 2D position

Definition at line 44 of file SolenoidBField.cpp.

View newest version in sPHENIX GitHub at line 44 of file SolenoidBField.cpp

Acts::Vector3D Acts::SolenoidBField::getFieldGradient ( const Vector3D position,
ActsMatrixD< 3, 3 > &   
) const

retrieve magnetic field value & its gradient

Parameters
[in]positionglobal 3D position
[out]derivativegradient of magnetic field vector as (3x3) matrix
Returns
magnetic field vector
Note
currently the derivative is not calculated

Definition at line 48 of file SolenoidBField.cpp.

View newest version in sPHENIX GitHub at line 48 of file SolenoidBField.cpp

Acts::Vector3D Acts::SolenoidBField::getFieldGradient ( const Vector3D position,
ActsMatrixD< 3, 3 > &  ,
Cache  
) const

retrieve magnetic field value & its gradient

Parameters
[in]positionglobal 3D position
[out]derivativegradient of magnetic field vector as (3x3) matrix
[in]cacheCache object, passed through to wrapped BField
Returns
magnetic field vector
Note
currently the derivative is not calculated

Definition at line 53 of file SolenoidBField.cpp.

View newest version in sPHENIX GitHub at line 53 of file SolenoidBField.cpp

double Acts::SolenoidBField::k2 ( double  r,
double  z 
) const
private

Definition at line 151 of file SolenoidBField.cpp.

View newest version in sPHENIX GitHub at line 151 of file SolenoidBField.cpp

References r, and z.

Acts::Vector2D Acts::SolenoidBField::multiCoilField ( const Vector2D pos,
double  scale 
) const
private

Definition at line 59 of file SolenoidBField.cpp.

View newest version in sPHENIX GitHub at line 59 of file SolenoidBField.cpp

Referenced by SolenoidBField().

+ Here is the caller graph for this function:

Acts::Vector2D Acts::SolenoidBField::singleCoilField ( const Vector2D pos,
double  scale 
) const
private

Definition at line 72 of file SolenoidBField.cpp.

View newest version in sPHENIX GitHub at line 72 of file SolenoidBField.cpp

Member Data Documentation

Config Acts::SolenoidBField::m_cfg
private

Definition at line 136 of file SolenoidBField.hpp.

View newest version in sPHENIX GitHub at line 136 of file SolenoidBField.hpp

Referenced by SolenoidBField().

double Acts::SolenoidBField::m_dz
private

Definition at line 138 of file SolenoidBField.hpp.

View newest version in sPHENIX GitHub at line 138 of file SolenoidBField.hpp

Referenced by SolenoidBField().

double Acts::SolenoidBField::m_R2
private

Definition at line 139 of file SolenoidBField.hpp.

View newest version in sPHENIX GitHub at line 139 of file SolenoidBField.hpp

Referenced by SolenoidBField().

double Acts::SolenoidBField::m_scale
private

Definition at line 137 of file SolenoidBField.hpp.

View newest version in sPHENIX GitHub at line 137 of file SolenoidBField.hpp

Referenced by SolenoidBField().


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