Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::SolenoidBField Class Referencefinal

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

+ Inheritance diagram for Acts::SolenoidBField:
+ Collaboration diagram for Acts::SolenoidBField:

Classes

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

Public Member Functions

 SolenoidBField (Config config)
 the constructor with a shared pointer
 
Vector2 getField (const Vector2 &position) const
 Retrieve magnetic field value in local (r,z) coordinates.
 
MagneticFieldProvider::Cache makeCache (const MagneticFieldContext &mctx) const override
 
 
Vector3 getField (const Vector3 &position) const
 Get the B field at a position.
 
Result< Vector3getField (const Vector3 &position, MagneticFieldProvider::Cache &cache) const override
 
 
Result< Vector3getFieldGradient (const Vector3 &position, ActsMatrix< 3, 3 > &derivative, MagneticFieldProvider::Cache &cache) const override
 
 

Private Member Functions

Vector2 multiCoilField (const Vector2 &pos, double scale) const
 
Vector2 singleCoilField (const Vector2 &pos, double scale) const
 
double B_r (const Vector2 &pos, double scale) const
 
double B_z (const Vector2 &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 70 of file SolenoidBField.hpp.

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

Constructor & Destructor Documentation

Acts::SolenoidBField::SolenoidBField ( Config  config)

the constructor 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 22 of file SolenoidBField.cpp.

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

References Acts::SolenoidBField::Config::bMagCenter, ckf::field, 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 Vector2 pos,
double  scale 
) const
private

Definition at line 84 of file SolenoidBField.cpp.

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

References k, m_cfg(), physmon_track_finding_ttbar::r, and physmon_track_finding_ttbar::z.

+ Here is the call graph for this function:

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

Definition at line 121 of file SolenoidBField.cpp.

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

References k, m_cfg(), physmon_track_finding_ttbar::r, and physmon_track_finding_ttbar::z.

+ Here is the call graph for this function:

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

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

Parameters
[in]positionlocal 2D position

Definition at line 56 of file SolenoidBField.cpp.

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

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

+ Here is the caller graph for this function:

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

Get the B field at a position.

Parameters
positionThe position to query at

Definition at line 36 of file SolenoidBField.cpp.

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

References Acts::VectorHelpers::perp().

+ Here is the call graph for this function:

Acts::Result< Acts::Vector3 > Acts::SolenoidBField::getField ( const Vector3 position,
MagneticFieldProvider::Cache cache 
) const
override

Definition at line 51 of file SolenoidBField.cpp.

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

Acts::Result< Acts::Vector3 > Acts::SolenoidBField::getFieldGradient ( const Vector3 position,
ActsMatrix< 3, 3 > &  derivative,
MagneticFieldProvider::Cache cache 
) const
override

Note
currently the derivative is not calculated

Definition at line 60 of file SolenoidBField.cpp.

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

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

Definition at line 158 of file SolenoidBField.cpp.

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

References m_cfg(), physmon_track_finding_ttbar::r, and physmon_track_finding_ttbar::z.

Referenced by pyqqbh(), pysugi(), and rk4step().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Acts::MagneticFieldProvider::Cache Acts::SolenoidBField::makeCache ( const MagneticFieldContext mctx) const
override

Definition at line 31 of file SolenoidBField.cpp.

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

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

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

Definition at line 66 of file SolenoidBField.cpp.

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

References m_cfg().

Referenced by SolenoidBField().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 79 of file SolenoidBField.cpp.

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

Member Data Documentation

Config Acts::SolenoidBField::m_cfg
private

Definition at line 125 of file SolenoidBField.hpp.

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

Referenced by SolenoidBField().

double Acts::SolenoidBField::m_dz
private

Definition at line 127 of file SolenoidBField.hpp.

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

Referenced by SolenoidBField().

double Acts::SolenoidBField::m_R2
private

Definition at line 128 of file SolenoidBField.hpp.

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

Referenced by SolenoidBField().

double Acts::SolenoidBField::m_scale
private

Definition at line 126 of file SolenoidBField.hpp.

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

Referenced by SolenoidBField().


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