diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentDeviation.h b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentDeviation.h
index ae5a12eaf023e531b522728687b953493aa6eae2..9fe6a19d16cbd9b4e069ecc25ab10eeb605b1b5e 100644
--- a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentDeviation.h
+++ b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentDeviation.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONALIGNERRORBASE_ALIGNMENTDEVIATION_H
@@ -19,6 +19,10 @@ namespace Trk {
      */
     class AlignmentDeviation {
     public:
+        AlignmentDeviation (const std::vector<const Trk::RIO_OnTrack*>& hits,  // not owned
+                            std::size_t hitshash,
+                            bool hitshashdone);
+
         virtual ~AlignmentDeviation() {}
 
         /**
@@ -69,6 +73,16 @@ namespace Trk {
         bool m_hitshashdone;
     };
 
+    inline
+    AlignmentDeviation::AlignmentDeviation (const std::vector<const Trk::RIO_OnTrack*>& hits,  // not owned
+                                            std::size_t hitshash,
+                                            bool hitshashdone)
+      : m_hits (hits),
+        m_hitshash (hitshash),
+        m_hitshashdone (hitshashdone)
+    {
+    }
+
     inline void AlignmentDeviation::getListOfHits(std::vector<const Trk::RIO_OnTrack*>& hits) const { hits = m_hits; }
 
     inline std::size_t AlignmentDeviation::getHashOfHits() const { return m_hitshash; }
diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentRotationDeviation.cxx b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentRotationDeviation.cxx
index c7d348272c36e8193f984e60b467e0a9d6bbd39f..01edd6ce43308eec653e61a59ad945eefffe7e78 100644
--- a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentRotationDeviation.cxx
+++ b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentRotationDeviation.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonAlignErrorBase/AlignmentRotationDeviation.h"
@@ -11,10 +11,9 @@ using namespace MuonAlign;
 
 AlignmentRotationDeviation::AlignmentRotationDeviation(Amg::Vector3D center, Amg::Vector3D axis, double sigma,
                                                        const std::vector<const Trk::RIO_OnTrack*>& hits) :
-    m_center(std::move(center)), m_axis(std::move(axis)), m_sigma(sigma) {
-    m_hits = hits;
-    m_hitshash = 0;
-    m_hitshashdone = false;
+    AlignmentDeviation (hits, 0, false),
+    m_center(std::move(center)), m_axis(std::move(axis)), m_sigma(sigma)
+{
 }
 
 int AlignmentRotationDeviation::nPar() const { return 1; }
diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentTranslationDeviation.cxx b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentTranslationDeviation.cxx
index e13e5b13239a7a681014a101150aa8db3c7d6f63..6a6af4b8207f63781931f4013dc13643a5c6f84b 100644
--- a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentTranslationDeviation.cxx
+++ b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentTranslationDeviation.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonAlignErrorBase/AlignmentTranslationDeviation.h"
@@ -10,10 +10,9 @@ using namespace MuonAlign;
 
 AlignmentTranslationDeviation::AlignmentTranslationDeviation(const Amg::Vector3D& u, double sigma,
                                                              const std::vector<const Trk::RIO_OnTrack*>& hits) :
-    m_u(u.unit()), m_sigma(sigma) {
-    m_hits = hits;
-    m_hitshash = 0;
-    m_hitshashdone = false;
+    AlignmentDeviation (hits, 0, false),
+    m_u(u.unit()), m_sigma(sigma)
+{
 }
 
 int AlignmentTranslationDeviation::nPar() const { return 1; }