|
ACTS
Experiment-independent tracking
|
Analytical solenoid magnetic field implementation. More...
#include <Acts/MagneticField/SolenoidBField.hpp>
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. | |
| Vector3 | getField (const Vector3 &position) const |
| Get the B field at a position. | |
| Result< Vector3 > | getField (const Vector3 &position, MagneticFieldProvider::Cache &cache) const override |
| Retrieve magnetic field value at a given location. | |
| MagneticFieldProvider::Cache | makeCache (const MagneticFieldContext &mctx) const override |
| Make an opaque cache for the magnetic field. | |
| Public Member Functions inherited from Acts::MagneticFieldProvider | |
| virtual | ~MagneticFieldProvider ()=default |
Additional Inherited Members | |
| Public Types inherited from Acts::MagneticFieldProvider | |
| using | Cache = Acts::AnyBase<sizeof(char) * 512> |
| Opaque cache type that can store arbitrary implementation specific cache data. | |
Analytical solenoid magnetic field implementation.
This class 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)\) and \(E_2(k^2)\) are usually indicated as \(K(k^2)\) and \(E(k^2)\) in literature, respectively
\[ E_1(k^2) = \int_0^{\pi/2} \left( 1 - k^2 \sin^2{\theta} \right )^{-1/2} \mathrm{d}\theta \]
\[ E_2(k^2) = \int_0^{\pi/2}\sqrt{1 - k^2 \sin^2{\theta}} \mathrm{d}\theta \]
\(k^2\) is a function of the point \((r, z)\) and of the radius of the coil \(R\)
\[ k^2 = \frac{4Rr}{(R+r)^2 + z^2} \]
Using these, you can evaluate the two components \(B_r\) and \(B_z\) of the magnetic field:
\[ B_r(r, z) = \frac{\mu_0 I}{4\pi} \frac{kz}{\sqrt{Rr^3}} \left[ \left(\frac{2-k^2}{2-2k^2}\right)E_2(k^2) - E_1(k^2) \right ] \]
\[ B_z(r,z) = \frac{\mu_0 I}{4\pi} \frac{k}{\sqrt{Rr}} \left[ \left( \frac{(R+r)k^2-2r}{2r(1-k^2)} \right ) E_2(k^2) + E_1(k^2) \right ] \]
In the implementation the factor of \((\mu_0\cdot I)\) is defined to be a scaling factor. It is evaluated and defined as the magnetic field in the center of the coil, i.e. the scale set in Acts::SolenoidBField::Config::bMagCenter.
|
explicit |
the constructor with a shared pointer
| bField | is the shared BField to be stored |
| config | Configuration struct containing solenoid parameters |
Retrieve magnetic field value in local (r,z) coordinates.
| [in] | position | local 2D position |
Get the B field at a position.
| position | The position to query at |
|
overridevirtual |
Retrieve magnetic field value at a given location.
Requires an instance of Acts::MagneticFieldProvider::Cache created through makeCache.
| [in] | position | global 3D position for the lookup |
| [in,out] | cache | Field provider specific cache object |
Implements Acts::MagneticFieldProvider.
|
overridevirtual |
Make an opaque cache for the magnetic field.
Instructs the specific implementation to generate a Acts::MagneticFieldProvider::Cache instance for magnetic field lookup.
| mctx | The magnetic field context to generate cache for |
Implements Acts::MagneticFieldProvider.