diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc
index 20dadc075fe577df1f358f806e721d67cedd7ff0..7c4d54d9a738c8d243020b047ed3a90abdfe8a52 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc
@@ -57,8 +57,7 @@ BFieldCache::inside(double z, double r, double phi) const
   if (phi < m_phimin) {
     phi += 2.0 * M_PI;
   }
-  return (phi >= m_phimin && phi <= m_phimax && z >= m_zmin && z <= m_zmax &&
-          r >= m_rmin && r <= m_rmax);
+  return (r <= m_rmax && r >= m_rmin && z <= m_zmax && z >= m_zmin &&
+          phi <= m_phimax && phi >= m_phimin);
 }
 
-
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.h
index 27d857f010e7dc544bdcc734207a96584711e5e8..d453cc124ea57c9c6779129e1da52aa8408bc939 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.h
@@ -21,7 +21,10 @@ class BFieldCond
 {
 public:
   // constructor
-  BFieldCond(bool finite, const double* p1, const double* p2, double curr)
+  BFieldCond(bool finite,
+             const double* p1,
+             const double* p2,
+             double curr)
     : m_finite(finite)
     , m_p1(Eigen::Map<const Eigen::Vector3d>(p1))
     , m_p2(Eigen::Map<const Eigen::Vector3d>(p2))
@@ -32,9 +35,9 @@ public:
 
   // compute magnetic field, plus derivatives if requested, and add
   void addBiotSavart(double scaleFactor,
-                     const double* xyz,
-                     double* B,
-                     double* deriv = nullptr) const;
+                     const double* ATH_RESTRICT xyz,
+                     double* ATH_RESTRICT B,
+                     double* ATH_RESTRICT deriv = nullptr) const;
   // scale the current wrt the nominal current
   void scaleCurrent(double factor) { m_curr = factor * m_nomCurr; }
   // accessors
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.icc b/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.icc
index 86147f2680b56920d83be7ee86caca6522e3fd10..3cf66a5d8bc16bfb0197f12030759312b8a7e157 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.icc
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.icc
@@ -10,9 +10,9 @@
  */
 inline void
 BFieldCond::addBiotSavart(double scaleFactor,
-                          const double* xyz,
-                          double* B_in,
-                          double* deriv) const
+                          const double* ATH_RESTRICT xyz,
+                          double* ATH_RESTRICT B_in,
+                          double* ATH_RESTRICT deriv) const
 {
   static const double mu04pi = 1.0e-7;    // mu_0/4pi
   static const double minvsq = 10. * 10.; // (1 cm)^2
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h
index 8be3f4ddb765bd6e2bf8e8e78996f31b3aebb530..636b83a0765854a13b95f70d8903a43c433513fd 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h
@@ -18,6 +18,7 @@
 
 #include "MagFieldElements/BFieldCache.h"
 #include "MagFieldElements/BFieldVector.h"
+#include "CxxUtils/restrict.h"
 #include <array>
 #include <cmath>
 #include <vector>