2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 inline Trk::MagneticFieldProperties::MagneticFieldProperties(
6 Trk::MagneticFieldMode mode)
7 : m_magneticFieldMode(mode)
8 , m_magneticField(0., 0., 0.)
11 inline Trk::MagneticFieldProperties::MagneticFieldProperties(
12 const Amg::Vector3D& field)
13 : m_magneticFieldMode(Trk::ConstantField)
14 , m_magneticField(field)
17 inline Trk::MagneticFieldProperties::operator MagneticFieldMode() const
19 return m_magneticFieldMode;
22 inline Trk::MagneticFieldMode
23 Trk::MagneticFieldProperties::magneticFieldMode() const
25 return m_magneticFieldMode;
28 inline const Amg::Vector3D&
29 Trk::MagneticFieldProperties::magneticField() const
31 if (m_magneticFieldMode != Trk::ConstantField)
33 "Trk::MagneticFieldProperties",
34 "You can only ask for a field value if you have a constant field!",
36 return m_magneticField;