Class UF23Field

Inheritance Relationships

Base Type

Class Documentation

class UF23Field : public MagneticField

UF23Field Galactic magnetic field model.

Implements the eight coherent magnetic field models of UF23 See: M. Unger and G.R. Farrar, Astrophys.J. 970 (2024) 95, arXiv:2311.12120

Assumes a galactocentric coordinate system with the Galactic center at the origin, the x-axis pointing in the opposite direction of the Sun, and the z-axis pointing towards Galactic North.

Public Types

enum ModelType

model variations (see Tab.2 of UF23 paper)

Values:

enumerator base
enumerator neCL
enumerator expX
enumerator spur
enumerator cre10
enumerator synCG
enumerator twistX
enumerator nebCor

Public Functions

UF23Field(const ModelType mt)

constructor

Parameters:
  • mt – model type (see Tab.2 of UF23 paper)

  • maxRadiusInKpc – maximum radius of field in kpc

UF23Field() = delete

no default constructor

virtual Vector3d getField(const Vector3d &pos) const
inline virtual Vector3d getField(const Vector3d &position, double z) const
inline size_t addReference() const
inline size_t removeReference() const
inline int removeReferenceNoDelete() const
inline size_t getReferenceCount() const

Protected Attributes

mutable size_t _referenceCount