diff --git a/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/src/SCTByteStreamErrorFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/src/SCTByteStreamErrorFillerTool.cxx
index b5bedd5def386045f09d67762cdf4d910e5f64c5..1a4bd761c5b62d3dd781304f30463decddf30b7a 100644
--- a/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/src/SCTByteStreamErrorFillerTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/InDetD3PDMaker/src/SCTByteStreamErrorFillerTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCTByteStreamErrorFillerTool.h"
@@ -80,7 +80,7 @@ StatusCode SCTByteStreamErrorFillerTool::fill (const xAOD::EventInfo& /*p*/)
      const std::set<IdentifierHash> errorSet = m_byteStreamErrTool->getErrorSet(type);
        int eta=0,phi=0,bec=0,layer=0,side=0;
        *m_totalNumErrors += errorSet.size();
-       for(const auto idHash : errorSet) {
+       for(const auto& idHash : errorSet) {
 		 Identifier itId = m_sctid->wafer_id(idHash);
 		 layer = m_sctid->layer_disk(itId);
 		 side = m_sctid->side(itId);
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/src/GainDecorator.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/src/GainDecorator.cxx
index 385c5cdf2ca0c1ee5d956aca31f2a24a97a414fd..3ec5328ecf916a49272fa3f342141a508022852f 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/src/GainDecorator.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/src/GainDecorator.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////
@@ -38,7 +38,7 @@ DerivationFramework::GainDecorator::GainDecorator(const std::string& t,
   declareProperty("layers", m_layers = {0,1,2,3});
 
   // Define the names for the decorations
-  for (const auto kv : m_gainNames)
+  for (const auto& kv : m_gainNames)
     for (const auto layer : m_layers)
     {
       std::string name = m_decorationPattern;
@@ -125,7 +125,7 @@ void DerivationFramework::GainDecorator::decorateObject(const xAOD::Egamma*& ega
     // Set the initial values to 0 (needed?)
     std::map< std::pair<int, int>, float > E;
     std::map< std::pair<int, int>, uint8_t > nCells;
-    for (const auto kv : m_names_E)
+    for (const auto& kv : m_names_E)
     {
       E[kv.first] = 0.;
       nCells[kv.first] = 0;
@@ -147,8 +147,8 @@ void DerivationFramework::GainDecorator::decorateObject(const xAOD::Egamma*& ega
     }
     
     // Decorate    
-    for (const auto kv : m_names_E) egamma->auxdecor<float>(kv.second) = E[ kv.first ];
-    for (const auto kv : m_names_nCells) egamma->auxdecor<uint8_t>(kv.second) = nCells[ kv.first ];
+    for (const auto& kv : m_names_E) egamma->auxdecor<float>(kv.second) = E[ kv.first ];
+    for (const auto& kv : m_names_nCells) egamma->auxdecor<uint8_t>(kv.second) = nCells[ kv.first ];
 
 }
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/EventInfoBSErrDecorator.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/EventInfoBSErrDecorator.cxx
index acf9409dbcc29696b060bfb0a941a77628c72ada..db88e7bc5f01234f037826f7fcca393245073e90 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/EventInfoBSErrDecorator.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/EventInfoBSErrDecorator.cxx
@@ -88,7 +88,7 @@ namespace DerivationFramework {
       scterr[kSCT_BSErr_Ntot].push_back(totalNumErrors);
 
       // loop in errorSet
-      for(const auto error : errorSet) {
+      for(const auto& error : errorSet) {
         ATH_MSG_DEBUG("debugging information");
         Identifier itId = m_sctId->wafer_id(error);
         ATH_MSG_DEBUG(error);
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx
index 668893e81b3c0cdb15c36e3ed70e86ebec2de95c..93ed52f4e4bae3ea62bfb916c9157cb6319046cd 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <string>
@@ -897,8 +897,8 @@ bool EgammaCalibrationAndSmearingTool::isAffectedBySystematic( const CP::Systema
 
 CP::SystematicSet EgammaCalibrationAndSmearingTool::affectingSystematics() const {
   CP::SystematicSet affecting_systematics;
-  for (const auto it : m_syst_description) { affecting_systematics.insert(it.first); }
-  for (const auto it : m_syst_description_resolution) { affecting_systematics.insert(it.first); }
+  for (const auto& it : m_syst_description) { affecting_systematics.insert(it.first); }
+  for (const auto& it : m_syst_description_resolution) { affecting_systematics.insert(it.first); }
 
   return affecting_systematics;
 }
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/dumpAllSystematics.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/dumpAllSystematics.cxx
index d8aaad125fee4d3622fba931f8eb7eb6fc4d429d..221f67b3fb8becafb5698241c3f2a6a917fc4f29 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/dumpAllSystematics.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/dumpAllSystematics.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <boost/algorithm/string/join.hpp>
@@ -159,7 +159,7 @@ StatusCode DumpAllSystematics::initialize()
     const CP::SystematicSet& sys_set = m_EgammaCalibrationAndSmearingTools[itool]->recommendedSystematics();
     ATH_MSG_INFO("size of the systematics set for tool [" << itool << "] " + m_EgammaCalibrationAndSmearingTools[itool].name() << ": " << sys_set.size());
     std::vector<std::string> sys_names; sys_names.reserve(sys_set.size());
-    for (const auto sys : sys_set) { if (sys.parameter() == 1) { sys_names.push_back(sys.name()); all_sys_names.insert(sys.name()); } }
+    for (const auto& sys : sys_set) { if (sys.parameter() == 1) { sys_names.push_back(sys.name()); all_sys_names.insert(sys.name()); } }
     std::sort(sys_names.begin(), sys_names.end());
     all_sys_names_per_tool.push_back(sys_names);
 
@@ -167,7 +167,7 @@ StatusCode DumpAllSystematics::initialize()
     m_energy_variations[itool].resize(sys_set.size());
 
     int isys = 0;
-    for (const auto sys : sys_set) {
+    for (const auto& sys : sys_set) {
       const std::string branch_name = prefix + tool_name + "_ratio_" + sys.name();
       m_tree->Branch(branch_name.c_str(), &m_energy_variations[itool][isys],
                      (branch_name + "/F").c_str());
@@ -362,7 +362,7 @@ StatusCode DumpAllSystematics::do_energy(xAOD::Egamma& particle, int itool)
 
   const CP::SystematicSet& sys_set = m_EgammaCalibrationAndSmearingTools[itool]->recommendedSystematics();
   int isys = -1;  // ugly
-  for (const auto sys : sys_set) {
+  for (const auto& sys : sys_set) {
     ++isys;
     CP::SystematicSet ss;
     ss.insert(sys);