diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIEventShapeSummaryTool.cxx b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIEventShapeSummaryTool.cxx
index 62aa22515bb2079d31d7a55ea7de92f345d151bd..be064d56186e55f75329c136f1ff58dd36fede8f 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIEventShapeSummaryTool.cxx
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIEventShapeSummaryTool.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 "HIEventUtils/HIEventShapeSummaryTool.h"
@@ -36,7 +36,7 @@ HIEventShapeSummaryTool::HIEventShapeSummaryTool(const std::string& n) : asg::As
 StatusCode HIEventShapeSummaryTool::summarize(const xAOD::HIEventShapeContainer* in, xAOD::HIEventShapeContainer* out) const
 {
   out->reserve(m_summary_list.size());
-  for(const auto itr : m_summary_list)
+  for(const auto& itr : m_summary_list)
   {
     xAOD::HIEventShape* es=new xAOD::HIEventShape();
     out->push_back(es);
@@ -53,7 +53,7 @@ StatusCode HIEventShapeSummaryTool::initialize()
 {
   //not optimal, but minimal code re-use, gets called only at initialization
   ATH_MSG_INFO("Configuring for summary");
-  for(const auto s : m_samp_names)
+  for(const auto& s : m_samp_names)
   {
     auto mItr=m_summary_list.find(s);
     if(mItr!=m_summary_list.end()) continue;
@@ -81,7 +81,7 @@ StatusCode HIEventShapeSummaryTool::initialize()
     }
   }
 
-  for(const auto s : m_subcalo_names)
+  for(const auto& s : m_subcalo_names)
   {
     auto mItr=m_summary_list.find(s);
     if(mItr!=m_summary_list.end()) continue;
@@ -160,7 +160,7 @@ std::string HIEventShapeSummaryTool::dumpList() const
      << std::setw(15) << "eta max"
      << std::setw(15) << "layer"
      << std::endl;
-  for(const auto itr : m_summary_list)
+  for(const auto& itr : m_summary_list)
   {
     ss << std::setw(15) << itr.second.name
        << std::setw(15) << itr.second.eta_min
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIVertexSelectionTool.cxx b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIVertexSelectionTool.cxx
index 8297d7ae16f523ae7af0fa2fdfaf169d45b66d22..92b76af96e91eb027f2c7513357510df92febfda 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIVertexSelectionTool.cxx
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIVertexSelectionTool.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
 */
 
 
@@ -96,7 +96,7 @@ asg::AcceptData HI::HIVertexSelectionTool::accept( const xAOD::Vertex& vtx ) con
     bool countPt = m_minRmsPt >= 0.;
     int nPassed = 0; // cumulative total number of tracks passed
     double sumPtSq = 0.; // cumulative total of pt^2 of tracks passed
-    for ( const auto track : vtx.trackParticleLinks() ) {
+    for ( const auto& track : vtx.trackParticleLinks() ) {
       if ( !track.isValid() ) continue;
       if ( !m_trkSelTool->accept( **track, &vtx ) ) continue;
 
diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/JetMetExAlg.cxx b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/JetMetExAlg.cxx
index ed3cc2b89f774f6eeb1c01112b86230b3340f3fa..9ddcd6c228b8ad00b63d918750b2f3d33cbe44aa 100644
--- a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/JetMetExAlg.cxx
+++ b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/JetMetExAlg.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
 */
 
 // $Id: JetMetExAlg.cxx 770492 2016-08-28 16:52:40Z rwhite $
@@ -74,7 +74,7 @@ StatusCode JetMetExAlg::initialize() {
    CHECK( m_histSvc->regHist( "/Trigger/JetMet/EmulationAccepts", m_h_emulationAccepts ) );
    CHECK( m_histSvc->regHist( "/Trigger/JetMet/TriggerAcceptsRaw", m_h_triggerAcceptsRaw ) );
    CHECK( m_histSvc->regHist( "/Trigger/JetMet/TriggerPrescaled", m_h_triggerPrescaled ) );
-   for(const std::string chain:m_hltchainList){
+   for(const std::string& chain:m_hltchainList){
        ATH_MSG_INFO( chain );
        m_numSelectedEvents[chain]=0;
        m_numL1PassedEvents[chain]=0;
@@ -139,7 +139,7 @@ StatusCode JetMetExAlg::finalize() {
    ATH_MSG_INFO( "Selection cuts: " );
    ATH_MSG_INFO( "jet pT > " << m_ptCut << " GeV" );
    ATH_MSG_INFO( "lepton |eta| < " << m_etaMax );
-   for(const std::string chain:m_hltchainList){
+   for(const std::string& chain:m_hltchainList){
        ATH_MSG_INFO( " Chain " << chain);
        ATH_MSG_INFO( "Number of selected events: " << m_numSelectedEvents[chain] );
        ATH_MSG_INFO( "Number of events with a L1 passed probe muon: " << m_numL1PassedEvents[chain] );
@@ -185,7 +185,7 @@ StatusCode JetMetExAlg::finalize() {
 StatusCode JetMetExAlg::collectTriggerStatistics() {
 
    // Now we'd like to collect some trigger statistics for the chains specified 
-    for(const auto chain : m_hltchainList){
+    for(const auto& chain : m_hltchainList){
         // Get the bits, this tell us more 
         const unsigned int bits = m_trigDec->isPassedBits(chain);
         bool efprescale=bits & TrigDefs::EF_prescaled;
@@ -218,7 +218,7 @@ StatusCode JetMetExAlg::collectTriggerStatistics() {
  * *******************************************************************************************/
 StatusCode JetMetExAlg::TriggerAnalysis (const xAOD::IParticleContainer *cont){
     bool isTriggered=false; 
-    for(const auto chain : m_hltchainList)
+    for(const auto& chain : m_hltchainList)
         if( m_trigDec->isPassed( chain ) ) isTriggered=true;
 
 
@@ -231,7 +231,7 @@ StatusCode JetMetExAlg::TriggerAnalysis (const xAOD::IParticleContainer *cont){
         probeEta=obj->eta();
         probeEt=(obj->e()/obj->eta())*0.001; //GeV
         ATH_MSG_INFO(" Probe et: " << probeEt << " eta: " << probeEta);
-        for(const std::string chain:m_hltchainList){
+        for(const std::string& chain:m_hltchainList){
             ATH_MSG_INFO("Matching to chain " << chain);
             m_numSelectedEvents[chain]+=1;
             if(!passHLT(*obj,chain)){
diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TDTExample.cxx b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TDTExample.cxx
index e5ef6fb2e2d2a07b36743999cab9b1c9b50f40a6..b78509da0bb26875c264586fb113462d9506b822 100644
--- a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TDTExample.cxx
+++ b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TDTExample.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
 */
 
 // $Id: TDTExample.cxx 779433 2016-10-20 15:22:56Z rwhite $
@@ -133,7 +133,7 @@ StatusCode Trig::TDTExample::checkTriggerDecision(){
     // Expert methods updates the cache object
     ExpertMethods *em = m_trigDec->ExperimentalAndExpertMethods();
     
-    for(const auto chain:m_cfg_chains){
+    for(const auto& chain:m_cfg_chains){
         //  By default, this returns the "Physics condition
         ATH_MSG_INFO(chain << " Passed " << m_trigDec->isPassed(chain));
         ATH_MSG_INFO(chain << " Passed Physics " << m_trigDec->isPassed(chain,TrigDefs::Physics));
@@ -225,7 +225,7 @@ StatusCode Trig::TDTExample::printLevels() {
     std::vector<std::string> allL1 =m_allL1->getListOfTriggers();
     std::vector<std::string> allHLT = m_allHLT->getListOfTriggers();
     // Create list of configured chains from input list
-    for(const std::string chain:m_allHLT->getListOfTriggers()){
+    for(const std::string& chain:m_allHLT->getListOfTriggers()){
         if(std::find(m_chain_names.begin(), m_chain_names.end(), chain) != m_chain_names.end()){ 
             ATH_MSG_INFO("Found corresponding chain in list " << chain); 
             m_cfg_chains.push_back(chain);
@@ -254,7 +254,7 @@ StatusCode Trig::TDTExample::printChainConfiguration() {
     // Expert TDT method
     // print the trigger chain configuration
     // See TrigConfHLTData/HLTChain.h
-    for(const std::string trigger : m_cfg_chains){
+    for(const std::string& trigger : m_cfg_chains){
 
         const auto trig_conf = m_trigDec->ExperimentalAndExpertMethods()->getChainConfigurationDetails(trigger);
         ATH_MSG_INFO("Chain passes " << m_trigDec->isPassed(trigger));
@@ -310,7 +310,7 @@ StatusCode Trig::TDTExample::electronsAndFlags() {
    std::vector<Feature<xAOD::ElectronContainer> > vec = f.get<xAOD::ElectronContainer>("egamma_Electrons");
    
    // Loop over the features of type ElectornContainer
-   for( const Trig::Feature<xAOD::ElectronContainer> feat : vec ) {
+   for( const Trig::Feature<xAOD::ElectronContainer>& feat : vec ) {
        // Feature label, is the TriggerElement active w/ this feature?
        // For a given feature, feat.te() gives the TriggerElement
        // From the TE, can retrieve other features in the trigger chain
@@ -558,11 +558,11 @@ StatusCode Trig::TDTExample::featuresOfCompositeChain() {
            
    // Range based loop over Combination container
    std::string label;
-   for( const Combination comb : f2.getCombinations()){ 
+   for( const Combination& comb : f2.getCombinations()){ 
        std::vector< Trig::Feature <xAOD::ElectronContainer> > elfeats = comb.get<xAOD::ElectronContainer>();
        ATH_MSG_INFO("Combination has " << elfeats.size() << " Electron features "); 
        
-       for(const Trig::Feature<xAOD::ElectronContainer> els:elfeats){
+       for(const Trig::Feature<xAOD::ElectronContainer>& els:elfeats){
            const xAOD::ElectronContainer *cont = els.cptr(); 
            TrigConf::HLTTriggerElement::getLabel (els.te()->getId(), label );
            ATH_MSG_INFO("Electron feature: " << els.label() 
@@ -582,7 +582,7 @@ StatusCode Trig::TDTExample::featuresOfCompositeChain() {
        
        std::vector< Trig::Feature <xAOD::JetContainer> > jetfeats = comb.get<xAOD::JetContainer>();
        ATH_MSG_INFO("Combination has " << jetfeats.size() << " Jet features ");
-       for(const Trig::Feature<xAOD::JetContainer> jets:jetfeats){
+       for(const Trig::Feature<xAOD::JetContainer>& jets:jetfeats){
            TrigConf::HLTTriggerElement::getLabel (jets.te()->getId(), label );
            ATH_MSG_INFO("Jet feature label " << jets.label() 
                    << " TE Id: " << jets.te()->getId() 
diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TagAndProbeExAlg.cxx b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TagAndProbeExAlg.cxx
index f821c689e3a13e5e64b6833f8afb825b9703d70a..a9fed6edcde647b26b58f76adf73cebc69aaa628 100644
--- a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TagAndProbeExAlg.cxx
+++ b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TagAndProbeExAlg.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
 */
 
 // $Id: TagAndProbeExAlg.cxx 785295 2016-11-19 03:18:52Z ssnyder $
@@ -84,7 +84,7 @@ StatusCode TagAndProbeExAlg::initialize() {
    CHECK( m_histSvc->regHist( "/Trigger/TagAndProbe/TriggerAcceptsRaw", m_h_triggerAcceptsRaw ) );
    CHECK( m_histSvc->regHist( "/Trigger/TagAndProbe/TriggerPrescaled", m_h_triggerPrescaled ) );
    CHECK( m_histSvc->regHist( "/Trigger/TagAndProbe/ZMass", m_h_zMass ) );
-   for(const std::string chain:m_hltchainList){
+   for(const std::string& chain:m_hltchainList){
        m_numSelectedEvents[chain]=0;
        m_numHLTPassedEvents[chain]=0;
        std::string histName="Eff_et_"+chain;
@@ -94,7 +94,7 @@ StatusCode TagAndProbeExAlg::initialize() {
        m_h_eff_eta[chain] = new TProfile( histName.c_str(), "#epsilon(Et)", 20, (-1.*m_etaMax), m_etaMax );
        CHECK( m_histSvc->regHist( "/Trigger/TagAndProbe/"+histName, m_h_eff_eta[chain] ) );
    }
-   for(const std::string chain:m_hltchainList){
+   for(const std::string& chain:m_hltchainList){
        m_numSelectedEvents[chain]=0;
        m_numL1PassedEvents[chain]=0;
    }
@@ -147,7 +147,7 @@ StatusCode TagAndProbeExAlg::finalize() {
    ATH_MSG_INFO( "lepton |eta| < " << m_etaMax );
    ATH_MSG_INFO( m_massMin << " GeV < mZ < " << m_massMax << " GeV" );
    ATH_MSG_INFO( "Number of events with a tag muon: " << m_numTaggedEvents );
-   for(const std::string chain:m_hltchainList){
+   for(const std::string& chain:m_hltchainList){
        ATH_MSG_INFO( " Chain " << chain);
        ATH_MSG_INFO( "Number of selected events: " << m_numSelectedEvents[chain] );
        //ATH_MSG_INFO( "Number of events with a L1 passed matched probe: " << m_numL1PassedEvents[chain] );
@@ -158,7 +158,7 @@ StatusCode TagAndProbeExAlg::finalize() {
        //        << (float)m_numHLTPassedEvents[chain]/(float)m_numL1PassedEvents[chain] * 100. << "%" );
        ATH_MSG_INFO( "" );
    }
-   for(const std::string chain:m_l1chainList){
+   for(const std::string& chain:m_l1chainList){
        ATH_MSG_INFO( " Chain " << chain);
        ATH_MSG_INFO( "Number of events with a L1 passed matched probe: " << m_numL1PassedEvents[chain] );
        ATH_MSG_INFO(" L1 Trigger efficiency (relative to offline): " 
@@ -173,7 +173,7 @@ StatusCode TagAndProbeExAlg::finalize() {
 StatusCode TagAndProbeExAlg::collectTriggerStatistics() {
 
    // Now we'd like to collect some trigger statistics for the chains specified 
-    for(const auto chain : m_hltchainList){
+    for(const auto& chain : m_hltchainList){
         // Get the bits, this tell us more 
         const unsigned int bits = m_trigDec->isPassedBits(chain);
         bool efprescale=bits & TrigDefs::EF_prescaled;
@@ -212,7 +212,7 @@ StatusCode TagAndProbeExAlg::collectTriggerStatistics() {
  * *******************************************************************************************/
 StatusCode TagAndProbeExAlg::TriggerAnalysis (const xAOD::IParticleContainer *cont){
     bool isTriggered=false; 
-    for(const auto chain : m_hltchainList)
+    for(const auto& chain : m_hltchainList)
         if( m_trigDec->isPassed( chain ) ) isTriggered=true;
 
 
@@ -263,12 +263,12 @@ StatusCode TagAndProbeExAlg::TriggerAnalysis (const xAOD::IParticleContainer *co
         probeEt=(z.second->e()/cosh(z.second->eta()))/GeV;
         ATH_MSG_INFO("Z Mass " << mass << " Probe et: " << probeEt << " eta: " << probeEta);
         m_h_zMass->Fill(mass);
-        for(const std::string chain:m_l1chainList){
+        for(const std::string& chain:m_l1chainList){
             m_numSelectedEvents[chain]+=1;
             if(passL1(*z.second,chain))
                 m_numL1PassedEvents[chain]+=1;
         }
-        for(const std::string chain:m_hltchainList){
+        for(const std::string& chain:m_hltchainList){
             ATH_MSG_INFO("Mathcing to chain " << chain);
             m_numSelectedEvents[chain]+=1;
             // L1 measurement
@@ -288,7 +288,7 @@ StatusCode TagAndProbeExAlg::TriggerAnalysis (const xAOD::IParticleContainer *co
                     // Retrieve a vector of Trigger Element (TE) features, i.e. collect all the TEs that contain ElectronContainers
                     std::vector<Trig::Feature<xAOD::ElectronContainer> > vec = f.get<xAOD::ElectronContainer>("egamma_Electrons");
                     // Loop over the features of type ElectornContainer
-                    for( const Trig::Feature<xAOD::ElectronContainer> feat : vec ) {
+                    for( const Trig::Feature<xAOD::ElectronContainer>& feat : vec ) {
                         // Use the helper util to retrieve trigger decision at each step in electron trigger sequence 
                         ATH_MSG_INFO( "TagAndProbe L2Calo Active " << m_tah->ancestorPassed<xAOD::TrigEMCluster>(feat.te())
                                 << " L2Electron Active " << m_tah->ancestorPassed<xAOD::TrigElectronContainer>(feat.te())
@@ -419,7 +419,7 @@ bool TagAndProbeExAlg::passHLT( const xAOD::IParticle &recoObj, const std::strin
 //Just find a match to any trigger in a list or group
 bool TagAndProbeExAlg::passHLT( const xAOD::IParticle &recoObj, std::vector<std::string> chainList) {
     bool match=false;
-    for(const std::string chain:chainList){
+    for(const std::string& chain:chainList){
         if(m_matchTool->match(recoObj,chain,m_dRMax))
             match=true;
     }
diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TrigEmulatorExAlg.cxx b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TrigEmulatorExAlg.cxx
index 94e28fe9bab90c2b1131d1e97c780498e28cc33d..df8efbd03228612f55c939538bbfd8e9a348c099 100644
--- a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TrigEmulatorExAlg.cxx
+++ b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TrigEmulatorExAlg.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
 */
 
 // $Id: TrigEmulatorExAlg.cxx 770492 2016-08-28 16:52:40Z rwhite $
@@ -244,7 +244,7 @@ StatusCode TrigEmulatorExAlg::EmulationAnalysis () {
     ATH_MSG_INFO("Checking " << l1jets->size() << " jets ");
     for(const auto l1jet:*l1jets){
         auto names = l1jet->thrNames();
-        for(const auto thr:names){
+        for(const auto& thr:names){
             ATH_MSG_INFO("L1 jet et8x8 " << l1jet->et8x8() << " passing threshold " << thr);
         }
     }
diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TrigExpressStreamAlg.cxx b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TrigExpressStreamAlg.cxx
index 7369db8ede8852348cf10c7ce5421653bb17fbbb..236f29eeba6972f4c39d2864d8d2a1474ca4e2a2 100644
--- a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TrigExpressStreamAlg.cxx
+++ b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TrigExpressStreamAlg.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
 */
 
 // C/C++
@@ -63,7 +63,7 @@ StatusCode TrigExpressStreamAlg::execute()
 
     const std::vector< xAOD::EventInfo::StreamTag > streamTags =evtInfo->streamTags(); 
     bool found_express_stream = false;
-    for(const xAOD::EventInfo::StreamTag stag:streamTags){
+    for(const xAOD::EventInfo::StreamTag& stag:streamTags){
         if(stag.type() == "express" && stag.name() == "express") {
             found_express_stream = true;
             break;
@@ -81,7 +81,7 @@ StatusCode TrigExpressStreamAlg::execute()
     if(m_evtNr==1){
         std::vector<std::string> configuredHLTChains = m_trigDec->getListOfTriggers( "HLT_.*" );
         // Get list of triggers in the Express Stream
-        for(const auto chain:configuredHLTChains){
+        for(const auto& chain:configuredHLTChains){
             const HLT::Chain *aChain=em->getChainDetails(chain);
             const auto trig_conf = m_trigDec->ExperimentalAndExpertMethods()->getChainConfigurationDetails(chain);
             const std::vector<TrigConf::HLTStreamTag*> chainStreams=trig_conf->streams();
@@ -106,7 +106,7 @@ StatusCode TrigExpressStreamAlg::execute()
     // Trigger bits only stored for event not per stream 
     // No way to determine whether a trigger was disabled due to
     // physics prescale or ES prescale
-    for(const auto chain:m_streamTriggers){
+    for(const auto& chain:m_streamTriggers){
         const unsigned int bits = m_trigDec->isPassedBits(chain);
         bool isPassed = m_trigDec->isPassed(chain);
 
@@ -162,7 +162,7 @@ StatusCode TrigExpressStreamAlg::execute()
 //---------------------------------------------------------------------------------------
 StatusCode TrigExpressStreamAlg::finalize()
 {
-   for(const std::string chain:m_streamTriggers){
+   for(const std::string& chain:m_streamTriggers){
        ATH_MSG_INFO( " Chain " << chain);
        ATH_MSG_INFO( "Number of events with a HLT passed probe muon: " << m_numHLTPassedEvents[chain] );
        ATH_MSG_INFO( "Number of events with a HLT passed probe muon: " << m_numL1PrescaledEvents[chain] );
diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisHelper.h b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisHelper.h
index ca494a577524701eeb41705b20885c02db54a78c..eac981dbb7df70857d383570f0094fdaa861ae41 100644
--- a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisHelper.h
+++ b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisHelper.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 /*
  * TriggerAnalysisHelper.h
@@ -141,7 +141,7 @@ namespace Trig{
 
             // Loop over Combination container
             std::string label;
-            for( const Combination comb : features.getCombinations()){
+            for( const Combination& comb : features.getCombinations()){
                 ATH_MSG_INFO( "COMB Combination was " << ( comb.active() ? "" : "not " ) << "active." );
                 std::vector< Trig::Feature <T1> > feature1 = comb.get<T1>(key1);
                 ATH_MSG_INFO("COMB Combination has " << feature1.size() << " T1 features "); 
diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisTutorial.cxx b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisTutorial.cxx
index ec1531f686d7812c57110b7bae316237dde47cfc..bb29b4b32230b5066e90982bd04fb5d983b8cc56 100644
--- a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisTutorial.cxx
+++ b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisTutorial.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // System include(s):
@@ -90,14 +90,14 @@ StatusCode TriggerAnalysisTutorial::execute() {
    if(m_eventNr==1){
        std::vector<std::string> allHLT = m_trigDec->getChainGroup("HLT_.*")->getListOfTriggers();
        // Create list of configured chains from input list
-       for(const std::string chain:allHLT){
+       for(const std::string& chain:allHLT){
            if(std::find(m_chain_names.begin(), m_chain_names.end(), chain) != m_chain_names.end()){ 
                ATH_MSG_INFO("Found corresponding chain in list " << chain); 
                m_cfg_chains.push_back(chain);
            }
        }
    }
-   for(const auto chain : m_cfg_chains){
+   for(const auto& chain : m_cfg_chains){
        if( m_trigDec->isPassed( chain ) )
            m_h_triggerAccepts->Fill( chain.c_str(), 1 );
    }
diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/apps/TrigAnalysisExApp.cxx b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/apps/TrigAnalysisExApp.cxx
index 51b5dc9e4442d2ebb24477aeec66f2b0b9bd1f5f..f8205710008ce34f00036070af39108373272409 100644
--- a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/apps/TrigAnalysisExApp.cxx
+++ b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/apps/TrigAnalysisExApp.cxx
@@ -106,7 +106,7 @@ int main() {
         // Retrieve a vector of Trigger Element (TE) features, i.e. collect all the TEs that contain ElectronContainers
         std::vector<Trig::Feature<xAOD::ElectronContainer> > vec = fcel.containerFeature<xAOD::ElectronContainer>("egamma_Electrons");
         std::cout << "Electron trigger has " << vec.size() << " electron features " << std::endl;
-        for( const Trig::Feature<xAOD::ElectronContainer> feat : vec ) {
+        for( const Trig::Feature<xAOD::ElectronContainer>& feat : vec ) {
             // With a TE, retrieve ancestors and activeState (did the hypo pass/fail?)
             // Which step is active?
             const xAOD::ElectronContainer *cont=feat.cptr();
@@ -124,7 +124,7 @@ int main() {
         // Retrieve featues from L2 step
         std::vector<Trig::Feature<xAOD::TrigElectronContainer> > vecl2 = fcel.containerFeature<xAOD::TrigElectronContainer>();
         std::cout << "Electron trigger has " << vecl2.size() << " trig electron features " << std::endl;
-        for( const Trig::Feature<xAOD::TrigElectronContainer> feat : vecl2 ) {
+        for( const Trig::Feature<xAOD::TrigElectronContainer>& feat : vecl2 ) {
             // With a TE, retrieve ancestors and activeState (did the hypo pass/fail?)
             // Which step is active?
             const xAOD::TrigElectronContainer *cont=feat.cptr();
@@ -141,7 +141,7 @@ int main() {
         // Can also look at the combinations of the two rois 
         std::cout << eltrigger << " has " << fcel.getCombinations().size() << " combinations, " 
             << fcel.containerFeature<xAOD::ElectronContainer>().size() << " Electron features, " << std::endl;
-        for( const Trig::Combination comb : fcel.getCombinations()){ 
+        for( const Trig::Combination& comb : fcel.getCombinations()){ 
             std::vector< Trig::Feature <xAOD::ElectronContainer> > elfeats = comb.containerFeature<xAOD::ElectronContainer>();
             std::cout << "Combination has " << elfeats.size() << " Electron features " << std::endl;
         }
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/EfficiencyTool.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/EfficiencyTool.cxx
index f4baf74a26da1601a7ba15c8803bd889da15222a..2ffc42bbe7c5e93d4fd8a742ac4a4769f9c7124b 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/EfficiencyTool.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/EfficiencyTool.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
 */
 
 /**********************************************************************
@@ -426,7 +426,7 @@ void EfficiencyTool::inefficiency(const std::string& pid, const std::string base
                std::vector<std::string> groupnames {"Trk", "TrkClus", "TRT"};
                for (int ibin = 0; ibin < hist1("IneffisEM" + pid)->GetNbinsX(); ibin++)
                   hist1("IneffisEM" + pid)->Fill(ibin + 0.5, 0);
-               for (const auto groupname : groupnames)
+               for (const auto& groupname : groupnames)
                   for (int ibin = 0; ibin < hist1("IneffisEM" + pid + groupname)->GetNbinsX(); ibin++)
                       hist1("IneffisEM" + pid + groupname)->Fill(ibin + 0.5, 0);
             }        
@@ -536,7 +536,7 @@ StatusCode EfficiencyTool::toolExecute(const std::string basePath,const TrigInfo
     const std::string pid = info.trigPidDecorator.substr(2);
     
     ATH_MSG_DEBUG("Efficiency for " << info.trigName << " " <<pidword);
-    for(const auto pairObj : pairObjs){
+    for(const auto& pairObj : pairObjs){
         // Final cuts done here
         if(pairObj.first->type()==xAOD::Type::Electron){
             const xAOD::Electron* el = static_cast<const xAOD::Electron *> (pairObj.first);
@@ -595,12 +595,12 @@ StatusCode EfficiencyTool::toolExecute(const std::string basePath,const TrigInfo
               this->fillEfficiency(dir+"/"+algname+"/EFCalo",acceptData.getCutResult("EFCalo"),etthr,pidword,pairObj.first,m_detailedHists);
               this->fillEfficiency(dir+"/"+algname+"/L1Calo",acceptData.getCutResult("L1Calo"),etthr,pidword,pairObj.first);
               if(m_detailedHists){
-                  for(const auto pid : m_isemname) {
+                  for(const auto& pid : m_isemname) {
                       this->fillEfficiency(dir+"/"+algname+"/HLT/"+pid,acceptData.getCutResult("HLT"),etthr,"is"+pid,pairObj.first);
                       if( pairObj.first->auxdecor<bool>("Isolated") ) fillEfficiency(dir+"/"+algname+"/HLT/"+pid+"Iso",
                           acceptData.getCutResult("HLT"),etthr,"is"+pid,pairObj.first);
                   }
-                  for(const auto pid : m_lhname) {
+                  for(const auto& pid : m_lhname) {
                       this->fillEfficiency(dir+"/"+algname+"/HLT/"+pid,acceptData.getCutResult("HLT"),etthr,"is"+pid,pairObj.first);
                       if( pairObj.first->auxdecor<bool>("Isolated") ) fillEfficiency(dir+"/"+algname+"/HLT/"+pid+"Iso",
                           acceptData.getCutResult("HLT"),etthr,"is"+pid,pairObj.first);
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaAnalysisBaseTool.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaAnalysisBaseTool.cxx
index 2e9f805e41f6218e27fe3cd8c98dc95a67056eed..f7d0bb03f6cd4412c58c97abb7662c997c75785a 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaAnalysisBaseTool.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaAnalysisBaseTool.cxx
@@ -212,7 +212,7 @@ StatusCode TrigEgammaAnalysisBaseTool::initialize() {
     
     }*/
 
-    for(const auto cut:m_trigLevel) m_accept.addCut(cut,cut);
+    for(const auto& cut:m_trigLevel) m_accept.addCut(cut,cut);
     return sc;
 }
 
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaDistTool.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaDistTool.cxx
index c26e62ee4b79198445c6d63689d0d84b227ee6a7..d5707a3c11033cd0063b2bf0b3e772aec6468ef6 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaDistTool.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaDistTool.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
 */
 
 /**********************************************************************
@@ -63,7 +63,7 @@ StatusCode TrigEgammaDistTool::toolExecute(const std::string basePath,TrigInfo i
     if (boost::starts_with(info.trigName, "L1" )){
         const auto initRois = fc.get<TrigRoiDescriptor>();
         ATH_MSG_DEBUG("Size of initialRoI" << initRois.size());
-        for(const auto feat : initRois){
+        for(const auto& feat : initRois){
             if(feat.te()==nullptr) {
                 ATH_MSG_DEBUG("initial RoI feature nullptr");
                 continue;
@@ -79,7 +79,7 @@ StatusCode TrigEgammaDistTool::toolExecute(const std::string basePath,TrigInfo i
     }
     else {
         
-        for(const auto pairObj : pairObjs){
+        for(const auto& pairObj : pairObjs){
             fillShowerShapes(dir+"Offline",pairObj.first); // Fill Offline shower shapes
             if(xAOD::EgammaHelpers::isElectron(pairObj.first)) { // Fill offline tracking
                 const xAOD::Electron* elOff =static_cast<const xAOD::Electron*> (pairObj.first);
@@ -91,7 +91,7 @@ StatusCode TrigEgammaDistTool::toolExecute(const std::string basePath,TrigInfo i
         if(m_tp){
             if(info.trigType=="electron"){
                 const auto vec_el = fc.get<xAOD::ElectronContainer>("egamma_Electrons",TrigDefs::alsoDeactivateTEs);
-                for (const auto feat : vec_el){
+                for (const auto& feat : vec_el){
                     if(feat.te()==nullptr) continue;
                     const auto* cont = getFeature<xAOD::ElectronContainer>(feat.te());
                     std::unique_ptr<xAOD::TrigPassBits> bits = getBits<xAOD::ElectronContainer>(feat.te(),cont);
@@ -123,7 +123,7 @@ StatusCode TrigEgammaDistTool::toolExecute(const std::string basePath,TrigInfo i
 
             const auto initRois = fcl1.get<TrigRoiDescriptor>();
             ATH_MSG_DEBUG("Size of initialRoI" << initRois.size());
-            for(const auto feat : initRois){
+            for(const auto& feat : initRois){
                 if(feat.te()==nullptr) {
                     ATH_MSG_DEBUG("initial RoI feature nullptr");
                     continue;
@@ -140,7 +140,7 @@ StatusCode TrigEgammaDistTool::toolExecute(const std::string basePath,TrigInfo i
                 fillL1Calo(dir+"L1Calo",l1);
             }
             const auto vec_l2em = fc.get<xAOD::TrigEMCluster>("",TrigDefs::alsoDeactivateTEs);
-            for (const auto feat : vec_l2em){
+            for (const auto& feat : vec_l2em){
                 if(feat.te()==nullptr) continue;
                 const auto* obj = getFeature<xAOD::TrigEMCluster>(feat.te());
                 // Only consider passing objects
@@ -154,7 +154,7 @@ StatusCode TrigEgammaDistTool::toolExecute(const std::string basePath,TrigInfo i
 
 
             const auto vec_clus = fc.get<xAOD::CaloClusterContainer>("TrigEFCaloCalibFex",TrigDefs::alsoDeactivateTEs);
-            for(const auto feat : vec_clus){
+            for(const auto& feat : vec_clus){
                 if(feat.te()==nullptr) continue;
                 const auto *cont = getFeature<xAOD::CaloClusterContainer>(feat.te(),"TrigEFCaloCalibFex");
                 ATH_MSG_DEBUG("Retreive clusters, bits");
@@ -177,7 +177,7 @@ StatusCode TrigEgammaDistTool::toolExecute(const std::string basePath,TrigInfo i
             // Loop over features, get PassBits from TE for Electron
             if(info.trigType=="electron"){
                 const auto vec_l2el = fc.get<xAOD::TrigElectronContainer>("",TrigDefs::alsoDeactivateTEs);
-                for (const auto feat : vec_l2el){
+                for (const auto& feat : vec_l2el){
                     if(feat.te()==nullptr) continue;
                     const auto* cont = getFeature<xAOD::TrigElectronContainer>(feat.te());
                     std::unique_ptr<xAOD::TrigPassBits> bits = getBits<xAOD::TrigElectronContainer>(feat.te(),cont);
@@ -195,7 +195,7 @@ StatusCode TrigEgammaDistTool::toolExecute(const std::string basePath,TrigInfo i
                 }
                 const auto vec_el = fc.get<xAOD::ElectronContainer>("egamma_Electrons",TrigDefs::alsoDeactivateTEs);
                 ATH_MSG_DEBUG("Retrieved egamma_Electrons: " << vec_el.size());
-                for (const auto feat : vec_el){
+                for (const auto& feat : vec_el){
                     if(feat.te()==nullptr) continue;
                     const auto* cont = getFeature<xAOD::ElectronContainer>(feat.te());
                     std::unique_ptr<xAOD::TrigPassBits> bits = getBits<xAOD::ElectronContainer>(feat.te(),cont);
@@ -219,7 +219,7 @@ StatusCode TrigEgammaDistTool::toolExecute(const std::string basePath,TrigInfo i
             else if(info.trigType=="photon"){
                 const auto vec_ph = fc.get<xAOD::PhotonContainer>("",TrigDefs::alsoDeactivateTEs);
                 ATH_MSG_DEBUG("Retrieved egamma_Photons: " << vec_ph.size());
-                for (const auto feat : vec_ph){
+                for (const auto& feat : vec_ph){
                     if(feat.te()==nullptr) continue;
                     const auto* cont = getFeature<xAOD::PhotonContainer>(feat.te());
                     std::unique_ptr<xAOD::TrigPassBits> bits = getBits<xAOD::PhotonContainer>(feat.te(),cont);
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaEventSelection.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaEventSelection.cxx
index 98545bb95a2c48206026f56e37abf7dc267dd15e..cab71c339c6395070809aa1cfa0bd9d01ba0ff90 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaEventSelection.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaEventSelection.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
 */
 /**********************************************************************
  * AsgTool: TrigEgammaEventSelection
@@ -86,7 +86,7 @@ StatusCode TrigEgammaEventSelection::childBook(){
   }
 
 
-  for(const auto trigName:m_trigInputList){ 
+  for(const auto& trigName:m_trigInputList){ 
     if (std::find(chains.begin(), chains.end(), trigName) != chains.end()){ 
       if(plot()->getTrigInfoMap().count(trigName) != 0)
         ATH_MSG_WARNING("Trigger already booked, removing from trigger list " << trigName);
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavAnalysisTool.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavAnalysisTool.cxx
index df95ba0164aafb69c85cbb0d3ee652a7b831c558..0d86adee3335bea20e1edc8d0ec66dd7a6c761e2 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavAnalysisTool.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavAnalysisTool.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 "TrigEgammaAnalysisTools/TrigEgammaNavAnalysisTool.h"
@@ -27,7 +27,7 @@ StatusCode TrigEgammaNavAnalysisTool::childBook(){
     m_dir=plot()->getBasePath();
     std::vector<std::string> chains  = tdt()->getListOfTriggers("HLT_e.*, L1_EM.*, HLT_g.*");
 
-    for(const auto trigName:m_trigInputList){
+    for(const auto& trigName:m_trigInputList){
         if (std::find(chains.begin(), chains.end(), trigName) != chains.end()){ 
             if(plot()->getTrigInfoMap().count(trigName) != 0)
                 ATH_MSG_WARNING("Trigger already booked, removing from trigger list " << trigName);
@@ -111,7 +111,7 @@ StatusCode TrigEgammaNavAnalysisTool::childExecute(){
         return StatusCode::SUCCESS; 
     }
     int ilist=0;
-    for(const auto trigger : m_trigList){
+    for(const auto& trigger : m_trigList){
         ATH_MSG_DEBUG("Start Chain Analysis ============================= " << trigger 
                 << " " << getTrigInfo(trigger).trigName); 
         // Trigger counts
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPAnalysisTool.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPAnalysisTool.cxx
index 71a4ad01aa2340d10d8d0be801b7797f37027923..78cd63d526135ad232836d184f89af571f8ab8da 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPAnalysisTool.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPAnalysisTool.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
 */
 
 
@@ -44,7 +44,7 @@ StatusCode TrigEgammaNavTPAnalysisTool::childBook(){
     m_dir=plot()->getBasePath();
     std::vector<std::string> chains  = tdt()->getListOfTriggers("HLT_e.*, L1_EM.*, HLT_g.*");
 
-    for(const auto trigName:m_trigInputList){ 
+    for(const auto& trigName:m_trigInputList){ 
         if (std::find(chains.begin(), chains.end(), trigName) != chains.end()){ 
             if(plot()->getTrigInfoMap().count(trigName) != 0)
                 ATH_MSG_WARNING("Trigger already booked, removing from trigger list " << trigName);
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaPlotTool.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaPlotTool.cxx
index a50f2e7c8693faf0e8431b0ff352871d3c5bb2b9..0a62f999e6a03f157257f2810545973531f0196d 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaPlotTool.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaPlotTool.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
 */
 
 // Plot Tool -- for all your plotting needs
@@ -193,7 +193,7 @@ StatusCode TrigEgammaPlotTool::book(std::map<std::string,TrigInfo> trigInfo){
 
     setBinning();
     bool badconfig=false;
-    for(const auto info:trigInfo){
+    for(const auto& info:trigInfo){
         // Check for existing trigger in list
         if(m_trigInfo.count(info.first) != 0) {
             ATH_MSG_ERROR("Trigger booked! Check list of triggers in tools");
@@ -209,7 +209,7 @@ StatusCode TrigEgammaPlotTool::book(std::map<std::string,TrigInfo> trigInfo){
             std::vector<std::string> dirnames;
             dirnames.push_back(basePath + "/Distributions/Offline");
             dirnames.push_back(basePath + "/Distributions/HLT");
-            for (const auto dir:dirnames){
+            for (const auto& dir:dirnames){
                 ATH_MSG_VERBOSE(dir);
                 addDirectory(dir);
                 bookDistributionHistos(dir);
@@ -236,7 +236,7 @@ void TrigEgammaPlotTool::bookShifterHistos(){
     std::vector<std::string>::iterator dirItr;
     std::map<std::string, TH1 *>::iterator histItr; 
     // Book histograms from existing expert plots
-    for(const auto info:m_trigInfo){
+    for(const auto& info:m_trigInfo){
         ATH_MSG_INFO(info.first << " ");
         if(getCategoryFromTrigger(info.first,category)){
             dirtrig=m_baseDir+"/Expert/"+info.first;
@@ -247,7 +247,7 @@ void TrigEgammaPlotTool::bookShifterHistos(){
                 addDirectory(dirmam);
                 //Add contents of the histograms
                 if(m_tp){
-                    for(const auto plot:m_distplots){
+                    for(const auto& plot:m_distplots){
                         fullPath = getPath(plot, dirtrig+"/Distributions/HLT");
                         histItr = m_hist1.find(fullPath);
                         if (histItr == m_hist1.end())
@@ -257,7 +257,7 @@ void TrigEgammaPlotTool::bookShifterHistos(){
                     }
                 }
                 else {
-                    for(const auto plot:m_effplots){
+                    for(const auto& plot:m_effplots){
                         fullPath = getPath(plot, dirtrig+"/Efficiency/HLT");
                         histItr = m_hist1.find(fullPath);
                         if (histItr == m_hist1.end())
@@ -265,7 +265,7 @@ void TrigEgammaPlotTool::bookShifterHistos(){
                         else
                         addHistogram((TH1*)hist1(plot,dirtrig+"/Efficiency/HLT")->Clone());
                     }
-                    for(const auto plot:m_distplots){
+                    for(const auto& plot:m_distplots){
                         fullPath = getPath(plot, dirtrig+"/Distributions/HLT");
                         histItr = m_hist1.find(fullPath);
                         if (histItr == m_hist1.end())
@@ -273,7 +273,7 @@ void TrigEgammaPlotTool::bookShifterHistos(){
                         else
                             addHistogram((TH1*)hist1(plot,dirtrig+"/Distributions/HLT")->Clone());
                     }
-                    for(const auto plot:m_resplots){
+                    for(const auto& plot:m_resplots){
                         fullPath = getPath(plot, dirtrig+"/Resolutions/HLT");
                         histItr = m_hist1.find(fullPath);
                         if (histItr == m_hist1.end())
@@ -292,7 +292,7 @@ StatusCode TrigEgammaPlotTool::execute(){
 }
 
 bool TrigEgammaPlotTool::getCategoryFromTrigger(const std::string trigger,std::string &category){
-    for(const auto mam:m_mam){
+    for(const auto& mam:m_mam){
         if(mam.second == trigger){
             category=mam.first;
             return true;
@@ -309,13 +309,13 @@ StatusCode TrigEgammaPlotTool::finalizeShifterHistos(std::map<std::string,TrigIn
     std::string category="";
     std::string fullPath;
     std::map<std::string, TH1 *>::iterator histItr; 
-    for(const auto info:trigInfo){
+    for(const auto& info:trigInfo){
         if(getCategoryFromTrigger(info.first,category)){
             dirtrig=m_baseDir+"/Expert/"+info.first;
             dirmam=m_baseDir+"/Shifter/"+category;
             if(m_tp){
                 ATH_MSG_INFO("Finalize " << name() << " " << info.first << " " << m_tp );
-                for(const auto plot:m_distplots){
+                for(const auto& plot:m_distplots){
                     fullPath = getPath(plot, dirtrig+"/Distributions/HLT");
                     histItr = m_hist1.find(fullPath);
                     if (histItr == m_hist1.end())
@@ -327,7 +327,7 @@ StatusCode TrigEgammaPlotTool::finalizeShifterHistos(std::map<std::string,TrigIn
             }
             else {
                 ATH_MSG_INFO("Finalize " << name() << " " << info.first << " " << m_tp );
-                for(const auto plot:m_effplots){
+                for(const auto& plot:m_effplots){
                     fullPath = getPath(plot, dirtrig+"/Efficiency/HLT");
                     histItr = m_hist1.find(fullPath);
                     if (histItr == m_hist1.end())
@@ -335,7 +335,7 @@ StatusCode TrigEgammaPlotTool::finalizeShifterHistos(std::map<std::string,TrigIn
                     else
                         hist1(plot,dirmam)->Add(hist1(plot,dirtrig+"/Efficiency/HLT"));
                 }
-                for(const auto plot:m_distplots){
+                for(const auto& plot:m_distplots){
                     fullPath = getPath(plot, dirtrig+"/Distributions/HLT");
                     histItr = m_hist1.find(fullPath);
                     if (histItr == m_hist1.end())
@@ -343,7 +343,7 @@ StatusCode TrigEgammaPlotTool::finalizeShifterHistos(std::map<std::string,TrigIn
                     else
                         hist1(plot,dirmam)->Add(hist1(plot,dirtrig+"/Distributions/HLT"));
                 }
-                for(const auto plot:m_resplots){
+                for(const auto& plot:m_resplots){
                     fullPath = getPath(plot, dirtrig+"/Resolutions/HLT");
                     histItr = m_hist1.find(fullPath);
                     if (histItr == m_hist1.end())
@@ -1192,7 +1192,7 @@ void TrigEgammaPlotTool::bookExpertHistos(TrigInfo trigInfo){
       dirnames.push_back(basePath + "/"+algname+"/L2");
       dirnames.push_back(basePath + "/"+algname+"/EFCalo");
 
-      for (const auto dir:dirnames) {
+      for (const auto& dir:dirnames) {
           addDirectory(dir);
           bookEfficiencyHistos(dir);
           if ( m_detailedHists ) 
@@ -1270,7 +1270,7 @@ void TrigEgammaPlotTool::bookExpertHistos(TrigInfo trigInfo){
           effdirs.push_back(basePath + "/"+algname+"/HLT/LHLooseIso");
           effdirs.push_back(basePath + "/"+algname+"/HLT/LHMediumIso");
           effdirs.push_back(basePath + "/"+algname+"/HLT/LHTightIso");
-          for (const auto effdir:effdirs) {
+          for (const auto& effdir:effdirs) {
               addDirectory(effdir);
               bookEfficiencyHistos(effdir);
               bookEfficiency2DHistos(effdir);
@@ -1283,7 +1283,7 @@ void TrigEgammaPlotTool::bookExpertHistos(TrigInfo trigInfo){
 
     dirnames.push_back(basePath + "/Distributions/Offline");
     dirnames.push_back(basePath + "/Distributions/HLT");
-    for (const auto dir:dirnames){
+    for (const auto& dir:dirnames){
         ATH_MSG_VERBOSE(dir);
         addDirectory(dir);
         bookEgammaDistributionHistos(dir);
@@ -1323,7 +1323,7 @@ void TrigEgammaPlotTool::bookExpertHistos(TrigInfo trigInfo){
     addDirectory(dirname);
 
     //Book the kinematic plots for each trigger level
-    for(const auto dir:dirnames) 
+    for(const auto& dir:dirnames) 
         bookDistributionHistos(dir);
 
     // Resolution
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaResolutionTool.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaResolutionTool.cxx
index 66e0a7441e5df957ab7f70c2aa54730dc16949ff..878cdc37975596c9bb749949f818ab88c441ee7c 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaResolutionTool.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaResolutionTool.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
 */
 
 /**********************************************************************
@@ -49,7 +49,7 @@ StatusCode TrigEgammaResolutionTool::toolExecute(const std::string basePath,Trig
     if(boost::contains(info.trigName,"iloose") || boost::contains(info.trigName,"ivarloose")) filliso=true;
     if(boost::contains(info.trigName,"icaloloose") || boost::contains(info.trigName,"icalovloose") || boost::contains(info.trigName,"icalotight")) filliso=true;
     ATH_MSG_DEBUG("Executing resolution for " << dir);
-    for(const auto pairObj : pairObjs){
+    for(const auto& pairObj : pairObjs){
         const xAOD::Egamma* eg =pairObj.first;
         const HLT::TriggerElement *feat = pairObj.second; 
 
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/src/TrigEgammaMonTool.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/src/TrigEgammaMonTool.cxx
index 84c3551dfebaa04a6d898a422187b459a61147ac..983104b3d3cfa79a915b86f98f45cf4c2e9e8768 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/src/TrigEgammaMonTool.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/src/TrigEgammaMonTool.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
 */
 
 /**********************************************************************
@@ -37,7 +37,7 @@ StatusCode TrigEgammaMonTool::book(){
     ATH_MSG_INFO("Initializing " << name() << "...");
     ATH_MSG_INFO("Retrieving tools..." << m_asgToolNames.size());
 
-    for(const auto toolname : m_asgToolNames){
+    for(const auto& toolname : m_asgToolNames){
         ATH_MSG_INFO("Add "<<toolname<<"..." );
         m_asgtools.push_back(ToolHandle<ITrigEgammaAnalysisBaseTool>(toolname));
     }