From 03fd87975b0d997b37563669e9c415092409a812 Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Tue, 8 Feb 2022 13:17:24 +0100
Subject: [PATCH] InnerDetector clang-tidy related fixes

---
 .../InDetAlignGenAlgs/src/AddTRTMomConstr.cxx |  12 +-
 .../InDetAlignGenAlgs/src/AlignWrt.cxx        |   4 +-
 .../src/CreateMisalignAlg.cxx                 |  36 +++---
 .../InDetAlignGenAlgs/src/InDetAlignCog.cxx   |   8 +-
 .../InDetAlignGenAlgs/src/SiDistWriteAlg.cxx  |   6 +-
 .../InDetAlignGenTools/InDetAlignDBTool.h     |   6 +-
 .../InDetAlignGenTools/InDetAlignFillTrack.h  |   6 +-
 .../src/InDetAlignDBTool.cxx                  |  59 ++++-----
 .../src/InDetAlignFillSiCluster.cxx           |  12 +-
 .../src/InDetAlignFillTrack.cxx               |  28 ++--
 .../src/InDetAlignHitQualSelTool.cxx          |  64 ++++-----
 .../src/InDetAlignOverlapTool.cxx             |  52 ++++----
 .../src/InDetAlignTrackSelTool.cxx            |  10 +-
 .../src/RefitSiOnlyTool.cxx                   |  18 +--
 .../src/SurveyConstraint.cxx                  |  46 +++----
 .../src/SiTrkAlignDBTool.cxx                  |  26 ++--
 .../src/TRTTrkAlignDBTool.cxx                 |   8 +-
 .../src/InDetAlignModuleTool.cxx              |   4 +-
 .../src/InDetGeometryManagerTool.cxx          |  22 ++--
 .../src/PixelGeometryManagerTool.cxx          |  58 ++++-----
 .../src/SCTGeometryManagerTool.cxx            |  32 ++---
 .../src/SiGeometryManagerTool.cxx             |  22 ++--
 .../src/TRTGeometryManagerTool.cxx            |  30 ++---
 .../src/DetailedIDNtupleTool.cxx              |   6 +-
 .../src/SimpleIDNtupleTool.cxx                |   6 +-
 .../InDetBeamSpotFinder/src/BeamSpotPdf.cxx   |   6 +-
 .../src/InDetBeamSpotFinder.cxx               |   4 +-
 .../src/InDetBeamSpotVertex.cxx               |  36 +++---
 .../src/RefitTracksAndVertex.cxx              |  22 ++--
 .../PixelCalibAlgs/PixelNtupleTracks.h        |   3 +-
 .../SCT_CalibAlgs/SCTCalibWriteTool.h         |   4 +-
 .../SCT_CalibAlgs/src/SCTCalib.cxx            |  16 +--
 .../SCT_CalibAlgs/src/SCTCalibWriteTool.cxx   |   4 +-
 .../SCT_CalibAlgs/src/SCT_CalibLbTool.cxx     |   4 +-
 .../SCT_CalibAlgs/src/XmlStreamer.cxx         |   6 +-
 .../TRT_CalibAlgs/src/TRTCalibrationMgr.cxx   |   4 +-
 .../TRT_CalibAlgs/src/TRT_StrawStatus.cxx     |  22 ++--
 .../TRT_CalibTools/src/Calibrator.cxx         |  32 ++---
 .../TRT_CalibTools/src/Calibrator.h           |  14 +-
 .../TRT_CalibTools/src/FillAlignTRTHits.cxx   |  26 ++--
 .../TRT_CalibTools/src/FillAlignTrkInfo.cxx   |   4 +-
 .../src/TRTCalibTrackSelectionTool.cxx        |  10 +-
 .../TRT_CalibTools/src/TRTCalibrator.cxx      |  64 ++++-----
 .../test/InDetBSErrContainerCnv_p1_test.cxx   |   4 +-
 .../test/TRT_BSIdErrContainerCnv_p1_test.cxx  |   4 +-
 .../src/SCT_ReadoutTestAlg.cxx                |   4 +-
 .../TRT_ConditionsAlgs/src/TRTCondWrite.cxx   |   6 +-
 .../src/InDetCosmicsEventPhase.cxx            |   2 +-
 .../src/InDetCosmicsEventPhaseTool.cxx        |  10 +-
 .../src/InDetFixedWindowTrackTimeTool.cxx     |  12 +-
 .../src/InDetSlidingWindowTrackTimeTool.cxx   |  12 +-
 .../src/TRT_TrackTimingTool.cxx               |  22 ++--
 .../InDetCosmicsFilters/src/TrackFilter.cxx   |   6 +-
 .../src/TRT_SegmentsToTrack.cxx               |   2 +-
 .../InDetGeoModelUtils/GeoModelXmlTool.h      |   6 +-
 .../src/GeoModelXmlTool.cxx                   |  17 +--
 .../src/InDetMaterialManager.cxx              |   4 +-
 .../src/VolumeSplitterUtils.cxx               |  14 +-
 .../src/SiDetectorElement.cxx                 |   4 +-
 .../InDetServMatManager.h                     |   2 +-
 .../src/InDetServMatManager.cxx               |   2 +-
 .../src/ServicesTracker.cxx                   |   4 +-
 .../PixelGeoModel/src/GeoPixelLayer.cxx       |   9 +-
 .../src/ITkPixelReadoutManager.cxx            |   6 +-
 .../src/PixelReadoutManager.cxx               |   6 +-
 .../src/SCT_CablingCondAlgFromCoraCool.cxx    |   4 +-
 .../SCT_Cabling/src/SCT_OnlineIdType.cxx      |   4 +-
 .../src/SCT_BarrelModuleSideDesign.cxx        |  10 +-
 .../src/SCT_ForwardFrameTransformation.cxx    |   4 +-
 .../src/SCT_ForwardModuleSideDesign.cxx       |  10 +-
 .../src/SCT_ModuleSideDesign.cxx              |   4 +-
 .../src/SCT_ReadoutScheme.cxx                 |   8 +-
 .../src/StripAnnulusDesign.cxx                |   8 +-
 .../src/StripBoxDesign.cxx                    |  12 +-
 .../src/StripStereoAnnulusDesign.cxx          |  16 +--
 .../TRT_Cabling/src/TRT_CablingData.cxx       |  12 +-
 .../TRT_Cabling/src/TRT_CablingData.h         |   4 +-
 .../TRT_Cabling/src/TRT_CablingSvc.cxx        |   4 +-
 .../src/TRT_FillCablingData_DC3.cxx           |  24 ++--
 .../src/TRT_FillCablingData_SR1.cxx           |   4 +-
 .../src/TRT_FillCablingData_SR1_ECC.cxx       |  16 +--
 .../src/TRT_FillCablingData_TB04.cxx          |   4 +-
 .../src/TRTDetectorFactory_Full.cxx           |  38 +++---
 .../src/TRTDetectorFactory_Full.h             |   6 +-
 .../src/TRTDetectorFactory_Lite.cxx           |  14 +-
 .../src/TRT_DetDescrDB_ParameterInterface.cxx |   8 +-
 .../TRT_GeoModel/src/TRT_DetectorTool.cxx     |  12 +-
 .../src/TRT_BarrelElement.cxx                 |   6 +-
 .../InDetIdCnv/src/PixelIDDetDescrCnv.cxx     |   4 +-
 .../InDetIdCnv/src/SCT_IDDetDescrCnv.cxx      |   4 +-
 .../InDetIdCnv/src/SiliconIDDetDescrCnv.cxx   |   4 +-
 .../InDetIdCnv/src/TRT_IDDetDescrCnv.cxx      |   4 +-
 .../src/BCM_DigitizationTool.cxx              |  16 ++-
 .../src/BCM_DigitizationTool.h                |   4 +-
 .../SiSmearedDigitizationTool.h               |   4 +-
 .../src/PixelFastDigitizationTool.cxx         |  22 ++--
 .../src/SCT_FastDigitizationTool.cxx          |  12 +-
 .../src/SiSmearedDigitizationTool.cxx         |  56 ++++----
 .../src/TRTFastDigitizationTool.cxx           |  26 ++--
 .../src/PixelDigitizationTool.cxx             |   6 +-
 .../SCT_Digitization/src/SCT_Amp.cxx          |  10 +-
 .../src/SCT_DigitizationTool.cxx              |   8 +-
 .../SCT_Digitization/src/SCT_FrontEnd.cxx     |  22 ++--
 .../SiDigitization/InducedChargeModel.h       |  12 +-
 .../SiDigitization/src/InducedChargeModel.cxx |  12 +-
 .../src/SiChargedDiodeCollection.cxx          |   6 +-
 .../src/StripDigitizationTool.cxx             |   8 +-
 .../TRT_Digitization/src/TRTDigCondBase.cxx   |   5 +-
 .../src/TRTDigCondFakeMap.cxx                 |   5 +-
 .../TRT_Digitization/src/TRTDigSettings.cxx   |  16 +--
 .../src/TRTDigitizationTool.cxx               |   8 +-
 .../TRT_Digitization/src/TRTNoise.cxx         |  13 +-
 .../TRT_Digitization/src/TRTNoise.h           |   4 +-
 .../src/TRTProcessingOfStraw.cxx              |  34 +++--
 .../src/BCM_RawContByteStreamCnv.cxx          |   4 +-
 .../src/BCM_RawContByteStreamTool.cxx         |   6 +-
 .../src/BCM_RodDecoder.cxx                    |   6 +-
 .../test/BCM_RDO_CollectionCnv_p0_test.cxx    |   4 +-
 .../test/BCM_RDO_ContainerCnv_p0_test.cxx     |   4 +-
 .../test/BCM_RawDataCnv_p0_test.cxx           |   4 +-
 .../src/InDetLowBetaCandidateCnv.cxx          |   4 +-
 .../src/InDetLowBetaContainerCnv.cxx          |   4 +-
 .../src/InDetSimDataCnv_p1.cxx                |   4 +-
 .../src/InDetSimDataCnv_p2.cxx                |   4 +-
 .../src/InDetSimDataCollectionCnv.cxx         |   4 +-
 .../src/Pixel1RawDataContainerCnv_p1.cxx      |   6 +-
 .../src/Pixel1RawDataContainerCnv_p2.cxx      |   8 +-
 .../src/PixelClusterContainerCnv.cxx          |   8 +-
 .../src/PixelClusterContainerCnv_p0.cxx       |   4 +-
 .../src/PixelRDO_ContainerCnv.cxx             |  10 +-
 .../src/SCT1_RawDataContainerCnv_p1.cxx       |   4 +-
 .../src/SCT_RawDataContainerCnv_p1.cxx        |   4 +-
 .../src/SCT_RawDataContainerCnv_p2.cxx        |   4 +-
 .../src/SCT_RawDataContainerCnv_p3.cxx        |   4 +-
 .../src/SCT_RawDataContainerCnv_p4.cxx        |   4 +-
 .../src/TRT_DriftCircleContainerCnv.cxx       |   8 +-
 .../src/TRT_DriftCircleContainerCnv_p0.cxx    |   4 +-
 .../src/TRT_LoLumRawDataContainerCnv_p1.cxx   |   6 +-
 .../src/TRT_LoLumRawDataContainerCnv_p2.cxx   |   8 +-
 .../src/TRT_LoLumRawDataContainerCnv_p3.cxx   |   6 +-
 .../src/TRT_RDO_ContainerCnv.cxx              |  10 +-
 .../src/InDetEventCnvTool.cxx                 |  40 +++---
 .../PixelClusterContainerCnv_p1.cxx           |   8 +-
 .../PixelGangedClusterAmbiguitiesCnv_p1.cxx   |   6 +-
 .../SCT_ClusterContainerCnv_p1.cxx            |   8 +-
 .../TRT_DriftCircleContainerCnv_p1.cxx        |   8 +-
 .../src/PixelClusterContainerCnv_p2.cxx       |   4 +-
 .../src/PixelClusterContainerCnv_p3.cxx       |   4 +-
 .../src/SCT_ClusterContainerCnv_p2.cxx        |   4 +-
 .../src/SCT_ClusterContainerCnv_p3.cxx        |   4 +-
 .../src/TRT_DriftCircleContainerCnv_p2.cxx    |   4 +-
 .../src/PixelClusterRetriever.cxx             |   8 +-
 .../InDetJiveXML/src/PixelRDORetriever.cxx    |   4 +-
 .../InDetJiveXML/src/SiClusterRetriever.cxx   |   8 +-
 .../src/SiSpacePointRetriever.cxx             |  12 +-
 .../InDetJiveXML/src/TRTRetriever.cxx         |   4 +-
 .../src/PixelPrepDataToxAOD.cxx               |  36 +++---
 .../src/SCT_PrepDataToxAOD.cxx                |   8 +-
 .../src/TRT_PrepDataToxAOD.cxx                |  10 +-
 .../src/SiHitCollectionCnv.cxx                |   4 +-
 .../src/TRTUncompressedHitCollectionCnv.cxx   |   4 +-
 .../src/InDetHits/TRT_HitCollectionCnv_p4.cxx |   6 +-
 .../test/SiHitCnv_p1_test.cxx                 |   4 +-
 .../test/SiHitCollectionCnv_p2_test.cxx       |   4 +-
 .../test/SiHitCollectionCnv_p3_test.cxx       |   4 +-
 .../test/TRT_HitCnv_p1_test.cxx               |   4 +-
 .../test/TRT_HitCollectionCnv_p2_test.cxx     |   4 +-
 .../test/TRT_HitCollectionCnv_p3_test.cxx     |   4 +-
 .../test/TRT_HitCollectionCnv_p4_test.cxx     |   4 +-
 .../src/PixelRawContByteStreamCnv.cxx         |   4 +-
 .../src/PixelRawContByteStreamTool.cxx        |   4 +-
 .../src/PixelRawDataProvider.cxx              |   4 +-
 .../src/SCTRawContByteStreamTool.cxx          |   4 +-
 .../src/SCT_RodEncoder.cxx                    |   4 +-
 .../src/InDetUpdateCaches.cxx                 |   8 +-
 .../src/PrintSiElements.cxx                   |   4 +-
 .../src/ReadSiDetectorElements.cxx            | 106 +++++++--------
 .../src/ReadTRT_DetectorElements.cxx          |   8 +-
 .../src/TestTRT_Alignment.cxx                 |  10 +-
 .../SCT_G4_SD/test/SctSensorSD_gtest.cxx      |   4 +-
 .../TRT_G4Utilities/TRTParameters.hh          |  18 +--
 .../TRT_G4Utilities/src/TRTParameters.cc      |  16 +--
 .../src/TRTParametersOfModulesB.cc            |   4 +-
 .../src/TRTParametersOfModulesC.cc            |   4 +-
 .../test/TRTSensitiveDetector_gtest.cxx       |   8 +-
 .../GetDetectorLocalFrames.h                  |   4 +-
 .../src/GetDetectorLocalFrames.cxx            |  12 +-
 .../src/GetDetectorPositions.cxx              |  10 +-
 .../InDetDiMuonMonitoring/src/DiMuMon.cxx     |  20 +--
 .../src/InDetGlobalLRTMonAlg.cxx              |   4 +-
 .../src/InDetGlobalTrackMonAlg.cxx            |   4 +-
 .../src/ElectronSelector.cxx                  |  14 +-
 .../src/IDPerfMonEoverP.cxx                   |  66 +++++-----
 .../src/IDPerfMonKshort.cxx                   |  18 +--
 .../src/IDPerfMonWenu.cxx                     |  50 +++----
 .../src/IDPerfMonZee.cxx                      |  46 +++----
 .../src/IDPerfMonZmumu.cxx                    |  78 +++++------
 .../src/MuonSelector.cxx                      |  20 +--
 .../src/PerfMonServices.cxx                   |  12 +-
 .../src/TRT_Electron_Monitoring_Tool.cxx      |   6 +-
 .../src/ZmumuEvent.cxx                        |  28 ++--
 .../src/InDetVertexMonitoring.cxx             |  20 +--
 .../src/PixelAthClusterMonAlg.cxx             |   6 +-
 .../PixelMonitoring/src/PixelAthMVAMonAlg.cxx |   2 +-
 .../SCT_Monitoring/src/SCTErrMonAlg.cxx       |   6 +-
 .../SCT_Monitoring/src/SCTHitEffMonAlg.cxx    |   4 +-
 .../SCT_Monitoring/src/SCTHitEffMonTool.cxx   |  18 +--
 .../SCT_Monitoring/src/SCTTracksMonAlg.cxx    |   4 +-
 .../SCT_Monitoring/src/SCTTracksMonTool.cxx   |   4 +-
 .../src/TRTMonitoringRun3ESD_Alg.cxx          |  56 ++++----
 .../src/TRTMonitoringRun3RAW_Alg.cxx          |  30 ++---
 .../InDetSimData/InDetSimData/InDetSimData.h  |   4 +-
 .../InDetSimData/src/InDetSimData.cxx         |   5 +-
 .../TrtToolsBetaLiklihood.h                   |   4 +-
 .../InDetLowBetaFinder/src/LowBetaAlg.cxx     | 122 +++++++++---------
 .../src/TrtToolsBetaLiklihood.cxx             |  38 +++---
 .../src/TrtToolsBetaWrapper.cxx               |  28 ++--
 .../InDetV0Finder/src/InDetV0Finder.cxx       |   4 +-
 .../src/SiSPSeededTrackFinder.cxx             |   6 +-
 .../src/SiTrajectoryElement_xk.cxx            |  53 ++++----
 .../InDetPRD_AssociationToolGangedPixels.cxx  |   6 +-
 .../InDetPRDtoTrackMapToolGangedPixels.cxx    |   6 +-
 .../Root/InDetHardScatterSelectionTool.cxx    |   4 +-
 .../src/InDetIterativeSecVtxFinderTool.cxx    |  12 +-
 .../src/InDetAdaptiveMultiPriVxFinderTool.cxx |   4 +-
 .../src/InDetIterativePriVxFinderTool.cxx     |   4 +-
 .../JetFitterV0FinderTool.h                   |   6 +-
 .../src/InDetMaterialVeto.cxx                 |   8 +-
 .../InDetVKalVxInJetTool/src/Utilities.cxx    |   6 +-
 .../src/ClusterMakerTool.cxx                  |  12 +-
 .../src/NnPixelClusterSplitter.cxx            |  12 +-
 .../src/SCT_ClusteringTool.cxx                |   4 +-
 .../src/TruthPixelClusterSplitter.cxx         |  12 +-
 .../src/TRT_DriftCircleTool.cxx               |   4 +-
 .../src/TRT_DriftCircleToolCosmics.cxx        |   4 +-
 .../SimpleTRT_SeededSpacePointFinder_ATL.cxx  |  12 +-
 .../TRT_TrackSegmentsMakerCondAlg_ATLxk.cxx   |   4 +-
 .../Root/TrackVertexAssociationTool.cxx       |   4 +-
 InnerDetector/InDetSimEvent/src/SiHit.cxx     |  13 +-
 .../InDetSimEvent/src/SiHitIdHelper.cxx       |  10 +-
 .../TRT_PAI_Process/src/TRT_PAI_Process.cxx   |   6 +-
 .../TRT_PAI_Process/src/TRT_PAI_utils.cxx     |   6 +-
 .../TRT_TR_Process/src/TRRegionXMLHandler.cxx |   6 +-
 .../src/TRTTransitionRadiation.cxx            |  20 +--
 .../src/TrigTrackingxAODCnvMT.cxx             |   4 +-
 .../src/InDetDetailedTrackTruthMaker.cxx      |   8 +-
 .../src/PRD_MultiTruthBuilder.cxx             |   6 +-
 .../src/PRD_TruthTrajectoryManipulatorID.cxx  |   4 +-
 .../src/PRD_TruthTrajectorySelectorID.cxx     |   8 +-
 .../src/InDetRecStatisticsAlg.cxx             |  20 +--
 .../src/TrackStatHelper.cxx                   |  47 +++----
 .../Root/InDetSecVertexTruthMatchTool.cxx     |  12 +-
 .../src/InDetSecVertexTruthMatchAlgorithm.cxx |   6 +-
 .../src/SegmentDriftCircleAssValidation.cxx   |  16 +--
 .../src/TrackClusterAssValidation.cxx         |  22 ++--
 .../src/SCT_ClusterValidationNtupleWriter.cxx |   4 +-
 .../Root/InDetVertexTruthMatchTool.cxx        |  28 ++--
 .../Root/InDetVertexTruthMatchUtils.cxx       |   6 +-
 .../src/InDetVertexTruthMatchAlgorithm.cxx    |   4 +-
 .../src/InDetEventSplitter.cxx                |   8 +-
 .../src/InDetVertexSplitter.cxx               |  12 +-
 .../src/InDetVertexSplitterHist.cxx           |  10 +-
 .../Application/doPixelValidation.cxx         |   9 +-
 .../PixelRTT/OfflineCalibOutputTrack.h        |   8 +-
 .../PixelRTT/PixelRTT/ResPullValidation.h     |   4 +-
 .../PixelRTT/src/OfflineCalibOutputTrack.cxx  |  43 +++---
 .../PixelRTT/src/ResPullValidation.cxx        |  31 ++---
 .../PixelRTT/src/TrackValidation.cxx          |  16 +--
 268 files changed, 1748 insertions(+), 1734 deletions(-)

diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx
index 0d5d79b9eb46..15571ae4dbdc 100644
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // @file AddTRTMomConstr.cxx
@@ -161,7 +161,7 @@ bool AddTRTMomConstr::accept( const Trk::Track& track ) {
   float theta = mesp->parameters()[Trk::theta] ;
   float pt = 0. ;
   if( theta != 0 ){
-    float ptInv = std::fabs( mesp->parameters()[Trk::qOverP] ) / std::sin( theta ) ;
+    float ptInv = std::abs( mesp->parameters()[Trk::qOverP] ) / std::sin( theta ) ;
     if( ptInv != 0 ) {
       pt = 1./ptInv ;
       if( m_selPtMin > 0 && pt < m_selPtMin ) rc = false ;
@@ -189,7 +189,7 @@ bool AddTRTMomConstr::accept( const Trk::Track& track ) {
     rc = false ;
   }
   // different treatment for TRT in transition region
-  bool isInTransitionRegion = std::fabs(eta) > m_selEtaCrackMin && std::fabs(eta) < m_selEtaCrackMax ;
+  bool isInTransitionRegion = std::abs(eta) > m_selEtaCrackMin && std::abs(eta) < m_selEtaCrackMax ;
   if( isInTransitionRegion ) {
     if( int(summary->get(Trk::numberOfTRTHits)) < m_selNHitTRTMinCrack ) {
       ++m_nRejectTRT ;
@@ -219,7 +219,7 @@ bool AddTRTMomConstr::accept( const Trk::Track& track ) {
 const Trk::TrackStateOnSurface* AddTRTMomConstr::findouterscthit( const Trk::Track* track ) {
   ATH_MSG_VERBOSE ("Inside findouterscthit: " << track->trackStateOnSurfaces()->size());
   double rmax=0. ;
-  const Trk::TrackStateOnSurface* rc=0 ;
+  const Trk::TrackStateOnSurface* rc=nullptr ;
   for (const Trk::TrackStateOnSurface* tsos : *track->trackStateOnSurfaces()) {
     if( !tsos->type(Trk::TrackStateOnSurface::Outlier) &&
         tsos->measurementOnTrack() &&
@@ -230,7 +230,7 @@ const Trk::TrackStateOnSurface* AddTRTMomConstr::findouterscthit( const Trk::Tra
         ATH_MSG_VERBOSE ( "Found SCT_ClusterOnTrack");
         const Amg::Vector3D& pos = sctclus->globalPosition() ;
         double r = std::sqrt(pos.x()*pos.x() + pos.y()*pos.y()) ;
-        if(rc==0 || r>rmax) {
+        if(rc==nullptr || r>rmax) {
           rc = tsos ;
           rmax = r ;
         }
@@ -255,7 +255,7 @@ const Trk::TrackStateOnSurface* AddTRTMomConstr::findinnertrthit( const Trk::Tra
         ATH_MSG_VERBOSE ( "Found TRT_DriftCircleOnTrack" );
         const Amg::Vector3D& pos = trthit->globalPosition() ;
         double r = sqrt(pos.x()*pos.x() + pos.y()*pos.y()) ;
-        if(rc==0 || r<rmin) {
+        if(rc==nullptr || r<rmin) {
           rc = tsos ;
           rmin = r ;
         }
diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AlignWrt.cxx b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AlignWrt.cxx
index e3ece360cfc4..a519af9e40e8 100755
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AlignWrt.cxx
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AlignWrt.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // AlignWrt.cxx
@@ -23,7 +23,7 @@ InDetAlignWrt::InDetAlignWrt(const std::string& name, ISvcLocator* pSvcLocator)
   :AthAlgorithm   (name, pSvcLocator),
    p_iddbtool("InDetAlignDBTool"),
    p_migratetool("InDetAlignDBTool/InDetAlignMigrate"),
-   p_eventinfo (0),
+   p_eventinfo (nullptr),
    m_setup     (false),
    m_par_create(true),
    m_par_wrt(false),
diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.cxx b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.cxx
index a78985965d6e..11c6aefb1817 100644
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.cxx
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.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
 */
 
 //////////////////////////////////////////////////////////////////////////
@@ -295,7 +295,7 @@ namespace InDetAlignment
 				// Syntax is (ID, Level) where Level is from 1 to 3 (3 is single module level)
 				if (msgLvl(MSG::INFO)) {
           HepGeom::Transform3D InitialAlignment = Amg::EigenTransformToCLHEP(m_IDAlignDBTool->getTrans(SCT_ModuleID,3));
-					msg() << "Initial Alignment of module " << m_idHelper->show_to_string(SCT_ModuleID,0,'/') << endmsg;
+					msg() << "Initial Alignment of module " << m_idHelper->show_to_string(SCT_ModuleID,nullptr,'/') << endmsg;
 					msg() << commonAlignmentOutput(InitialAlignment);
 					msg() << endmsg;
 				}
@@ -344,7 +344,7 @@ namespace InDetAlignment
 					
 					if (msgLvl(MSG::INFO)) {
             HepGeom::Transform3D InitialAlignment = Amg::EigenTransformToCLHEP(m_IDAlignDBTool->getTrans(Pixel_ModuleID,3));
-						msg() << "Initial Alignment of module " << m_idHelper->show_to_string(Pixel_ModuleID,0,'/') << endmsg;
+						msg() << "Initial Alignment of module " << m_idHelper->show_to_string(Pixel_ModuleID,nullptr,'/') << endmsg;
 						msg() << commonAlignmentOutput(InitialAlignment);
 						msg() << endmsg;
 					}
@@ -413,13 +413,13 @@ namespace InDetAlignment
 			if ( p ) {
 				if (msgLvl(MSG::INFO)) {
   				InitialAlignment = Amg::EigenTransformToCLHEP(*p) ;
-					msg() << "Initial Alignment of module " << m_idHelper->show_to_string(TRTID,0,'/') << endmsg;
+					msg() << "Initial Alignment of module " << m_idHelper->show_to_string(TRTID,nullptr,'/') << endmsg;
 					msg() << commonAlignmentOutput(InitialAlignment);
 					msg() << endmsg;
 				}
 			} else {
 				
-					ATH_MSG_INFO("No initial alignment for TRT module " << m_idHelper->show_to_string(TRTID,0,'/') );
+					ATH_MSG_INFO("No initial alignment for TRT module " << m_idHelper->show_to_string(TRTID,nullptr,'/') );
 			}
 			
 			
@@ -496,7 +496,7 @@ namespace InDetAlignment
 			const Identifier& ModuleID = iter->first;
 			
       //const Trk::TrkDetElementBase *module = 0;
-			const InDetDD::SiDetectorElement * SiModule = 0; //dummy to get moduleTransform() for silicon
+			const InDetDD::SiDetectorElement * SiModule = nullptr; //dummy to get moduleTransform() for silicon
 			
 			if (m_idHelper->is_pixel(ModuleID)) {
                                 const IdentifierHash Pixel_ModuleHash = m_pixelIdHelper->wafer_hash(ModuleID);
@@ -580,7 +580,7 @@ namespace InDetAlignment
 
 
 
-			ATH_MSG_INFO(  "ID Module " << i << " with ID " << m_idHelper->show_to_string(ModuleID,0,'/') );
+			ATH_MSG_INFO(  "ID Module " << i << " with ID " << m_idHelper->show_to_string(ModuleID,nullptr,'/') );
 			if (msgLvl(MSG::DEBUG)) {
 				msg() << "radius "  << r / CLHEP::cm << " centimeter" << endmsg;
 				msg() << "phi "  << phi << endmsg;
@@ -717,7 +717,7 @@ namespace InDetAlignment
 					        deltaPhi = r/maxRadius * maxAngle + minRadius/r * maxAngleInner; //linearly + reciprocal term in r
 					} else if (m_MisalignmentMode==22) {
 						//Phi deltaPhi = clamshell
-						//                     deltaPhi = fabs( sin ( phi )) * maxAngle;
+						//                     deltaPhi = std::abs( sin ( phi )) * maxAngle;
 						if (m_idHelper->is_trt(ModuleID) && abs(m_trtIdHelper->barrel_ec(ModuleID))==2) {
 							//clamshell mode cannot handle TRT endcap, sorry
 							deltaPhi = 0.;
@@ -833,27 +833,27 @@ namespace InDetAlignment
 			}
 			
 			// suppress tiny translations that occur due to trafo.inverse*trafo numerics
-			if ( fabs(alignmentTrafo.getTranslation().x()) < 1e-10) {
+			if ( std::abs(alignmentTrafo.getTranslation().x()) < 1e-10) {
 				HepGeom::Vector3D<double>
 				zeroSuppressedTranslation(0,alignmentTrafo.getTranslation().y(),alignmentTrafo.
 										  getTranslation().z());
 				alignmentTrafo =
                 HepGeom::Transform3D(alignmentTrafo.getRotation(),zeroSuppressedTranslation);
 			}
-			if ( fabs(alignmentTrafo.getTranslation().y()) < 1e-10) {
+			if ( std::abs(alignmentTrafo.getTranslation().y()) < 1e-10) {
 				HepGeom::Vector3D<double>
 				zeroSuppressedTranslation(alignmentTrafo.getTranslation().x(),0,alignmentTrafo.
 										  getTranslation().z());
 				alignmentTrafo =
                 HepGeom::Transform3D(alignmentTrafo.getRotation(),zeroSuppressedTranslation);
 			}
-			if ( fabs(alignmentTrafo.getTranslation().z()) < 1e-10) {
+			if ( std::abs(alignmentTrafo.getTranslation().z()) < 1e-10) {
 				HepGeom::Vector3D<double>
 				zeroSuppressedTranslation(alignmentTrafo.getTranslation().x(),alignmentTrafo.getTranslation().y(),0);
 				alignmentTrafo =
                 HepGeom::Transform3D(alignmentTrafo.getRotation(),zeroSuppressedTranslation);
 			}
-			if ( fabs(alignmentTrafo.getRotation().getDelta()) < 1e-10) {
+			if ( std::abs(alignmentTrafo.getRotation().getDelta()) < 1e-10) {
 				CLHEP::HepRotation zeroSuppressedRotation(alignmentTrafo.getRotation());
 				zeroSuppressedRotation.setDelta(0.);
 				alignmentTrafo =
@@ -865,9 +865,9 @@ namespace InDetAlignment
 			
 			if (m_idHelper->is_sct(ModuleID) || m_idHelper->is_pixel(ModuleID)) {
 				if (m_IDAlignDBTool->tweakTrans(ModuleID,3, alignmentTrafoAmg)) {
-					ATH_MSG_INFO( "Update of alignment constants for module " << m_idHelper->show_to_string(ModuleID,0,'/') << " successful" );
+					ATH_MSG_INFO( "Update of alignment constants for module " << m_idHelper->show_to_string(ModuleID,nullptr,'/') << " successful" );
 				} else {
-					ATH_MSG_ERROR( "Update of alignment constants for module " << m_idHelper->show_to_string(ModuleID,0,'/') << " not successful" );
+					ATH_MSG_ERROR( "Update of alignment constants for module " << m_idHelper->show_to_string(ModuleID,nullptr,'/') << " not successful" );
 				}
 			} else if (m_idHelper->is_trt(ModuleID)) {
 				if (!m_trtIdHelper->is_barrel(ModuleID) && m_trtIdHelper->phi_module(ModuleID)!=0) {
@@ -876,9 +876,9 @@ namespace InDetAlignment
 				} else {
 					//if (m_trtaligndbservice->tweakTrans(ModuleID,alignmentTrafo).isFailure()) {
 					if (m_trtaligndbservice->tweakAlignTransform(ModuleID,alignmentTrafoAmg,2).isFailure()) { 
-						ATH_MSG_ERROR( "Update of alignment constants for module " << m_idHelper->show_to_string(ModuleID,0,'/') << " not successful" );
+						ATH_MSG_ERROR( "Update of alignment constants for module " << m_idHelper->show_to_string(ModuleID,nullptr,'/') << " not successful" );
 					} else {
-						ATH_MSG_INFO( "Update of alignment constants for module " << m_idHelper->show_to_string(ModuleID,0,'/') << " successful" );
+						ATH_MSG_INFO( "Update of alignment constants for module " << m_idHelper->show_to_string(ModuleID,nullptr,'/') << " successful" );
 					}
 				}
 			} else {
@@ -981,7 +981,7 @@ namespace InDetAlignment
 	const Identifier CreateMisalignAlg::reduceTRTID(Identifier id)
 	{
 		//     msg(MSG::DEBUG)  << "in CreateMisalignAlg::reduceTRTID" << endmsg;
-		ATH_MSG_DEBUG( "reduceTRTID got Id " << m_idHelper->show_to_string(id,0,'/'));
+		ATH_MSG_DEBUG( "reduceTRTID got Id " << m_idHelper->show_to_string(id,nullptr,'/'));
 		
 		int barrel_ec= m_trtIdHelper->barrel_ec(id);
 		// attention: TRT DB only has one alignment correction per barrel module (+1/-1) pair
@@ -1003,7 +1003,7 @@ namespace InDetAlignment
 		}
 		
 		//     if (msgLvl(MSG::DEBUG)) msg()  << "    and returns Id " << m_idHelper->show_to_string(m_trtIdHelper->module_id(barrel_ec,phi_module,layer_or_wheel),0,'/') << endmsg;
-		ATH_MSG_DEBUG(  "    and returns Id " << m_idHelper->show_to_string(m_trtIdHelper->layer_id(barrel_ec,phi_module,layer_or_wheel,strawlayer),0,'/'));
+		ATH_MSG_DEBUG(  "    and returns Id " << m_idHelper->show_to_string(m_trtIdHelper->layer_id(barrel_ec,phi_module,layer_or_wheel,strawlayer),nullptr,'/'));
 		//     return  m_trtIdHelper->module_id(barrel_ec,phi_module,layer_or_wheel);
 		return  m_trtIdHelper->layer_id(barrel_ec,phi_module,layer_or_wheel,strawlayer);
 	}
diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.cxx b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.cxx
index 9ffa0b63135d..18b885316be8 100644
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.cxx
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.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
 */
 
 /** @file InDetAlignCog.cxx
@@ -82,9 +82,9 @@ static const double onemrad  = 0.001;
 
 InDetAlignCog::InDetAlignCog(const std::string& name, ISvcLocator* pSvcLocator) 
   : AthAlgorithm(name, pSvcLocator), 
-    m_pixid(0),
-    m_sctid(0),
-    m_trtid(0),
+    m_pixid(nullptr),
+    m_sctid(nullptr),
+    m_trtid(nullptr),
     m_IDAlignDBTool("InDetAlignDBTool"),
     m_TRTAlignDbTool("TRT_AlignDbSvc",name),
     //m_TRTAlignDbTool("TRTAlignDbTool"),
diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/SiDistWriteAlg.cxx b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/SiDistWriteAlg.cxx
index 4536c292be83..52f02c44be72 100755
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/SiDistWriteAlg.cxx
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/SiDistWriteAlg.cxx
@@ -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
 */
 
 // SiDistWriteAlg.cxx
@@ -17,7 +17,7 @@
 SiDistWriteAlg::SiDistWriteAlg(const std::string& name, ISvcLocator* pSvcLocator)
     :AthAlgorithm   (name, pSvcLocator),
         
-     m_pixid(0),m_sctid(0),
+     m_pixid(nullptr),m_sctid(nullptr),
      m_first(true),
      m_par_print(false),
      m_par_size(3),
@@ -167,7 +167,7 @@ bool SiDistWriteAlg::makeIdent(const std::string& ident,
 void SiDistWriteAlg::print() {
   ATH_MSG_DEBUG ( "Print distortion parameters at " << m_par_distkey );
   // retrieve distortions from Storegate and print in detail
-  const DetCondCFloat* pdist=0;
+  const DetCondCFloat* pdist=nullptr;
   if (StatusCode::SUCCESS==detStore()->retrieve(pdist,m_par_distkey)) {
     pdist->print2();
   } else {
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignDBTool.h b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignDBTool.h
index 3b81a464b0df..a2b18669202f 100755
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignDBTool.h
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignDBTool.h
@@ -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
 */
 
 #ifndef INDETALIGNGENTOOLS_ALIGNDBTOOL_H
@@ -198,8 +198,8 @@ virtual public IInDetAlignDBTool, public AthAlgTool {
   std::string m_par_dbkey;
   bool m_par_oldTextFile;  // Input text file using old format
 
-  AlignableTransform* getTransPtr(const std::string key) const;
-  const AlignableTransform* cgetTransPtr(const std::string key) const;
+  AlignableTransform* getTransPtr(const std::string& key) const;
+  const AlignableTransform* cgetTransPtr(const std::string& key) const;
   void fakeGeom(const int nbpix, const int necpix, 
 		const int nbsct, const int necsct);
 
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignFillTrack.h b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignFillTrack.h
index 8b017105b8f5..75ac3e88c528 100644
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignFillTrack.h
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignFillTrack.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 INDETALIGNGENTOOLS_INDETALIGNFILLTRACK_H
@@ -66,8 +66,8 @@ class InDetAlignFillTrack: virtual public IInDetAlignFillTrack, public AthAlgToo
   void bookLowNtuple();
   void bookMatchingNtuple();
   int dumpTrackCol(const TrackCollection*);
-  int dumpTrackCol(const TrackCollection*, const std::string);
-  void dumpTrack(int, const Trk::Track*, const std::string);  
+  int dumpTrackCol(const TrackCollection*, const std::string&);
+  void dumpTrack(int, const Trk::Track*, const std::string&);  
   void dumpPerigee(const Trk::TrackParameters*, int);
   StatusCode dumpMatching(const TrackCollection*,const TrackCollection*);
 
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx
index 2337dc17193e..1ebfe45e1604 100755
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx
@@ -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
 */
 
 // InDetAlignDBTool.cxx
@@ -12,6 +12,7 @@
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
 #include "AthenaPoolUtilities/AthenaAttributeList.h"
 
+#include <cmath>
 #include <fstream>
 #include <iostream>
 
@@ -118,12 +119,12 @@ StatusCode InDetAlignDBTool::initialize()
   ndet[0]=0;
   ndet[1]=0;
 
-  if (StatusCode::SUCCESS!=detStore()->retrieve(m_pixman,"Pixel") || m_pixman==0) {
+  if (StatusCode::SUCCESS!=detStore()->retrieve(m_pixman,"Pixel") || m_pixman==nullptr) {
     ATH_MSG_WARNING( "Could not find pixel manager ");
     return StatusCode::FAILURE;
   }
 
-  if (StatusCode::SUCCESS!=detStore()->retrieve(m_sctman,"SCT") || m_sctman==0) {
+  if (StatusCode::SUCCESS!=detStore()->retrieve(m_sctman,"SCT") || m_sctman==nullptr) {
     ATH_MSG_FATAL("Could not find SCT manager ");
     return StatusCode::FAILURE;
   }
@@ -166,7 +167,7 @@ StatusCode InDetAlignDBTool::initialize()
     std::string man_name;
     for (int idet=1;idet<3;++idet) {
       for (const InDetDD::SiDetectorElement* element: *(idet==1 ? m_pixman->getDetectorElementCollection() : m_sctman->getDetectorElementCollection())) {
-        if (element!=0) {
+        if (element!=nullptr) {
           const Identifier ident=element->identify();
           int det,bec,layer,ring,sector,side;
           if (idToDetSet(ident,det,bec,layer,ring,sector,side)) {
@@ -254,7 +255,7 @@ void InDetAlignDBTool::createDB() const
     ATH_MSG_FATAL("Cannot create new database when geometry is faked");
   }
   AlignableTransform* pat;
-  AlignableTransformContainer* patc=0;
+  AlignableTransformContainer* patc=nullptr;
   // loop over all SiDetectorElements (pixel and SCT) and fill corresponding
   // AlignableTransform objects with default values
 
@@ -308,7 +309,7 @@ void InDetAlignDBTool::createDB() const
   std::vector<std::string> level2;
   for (int idet=1;idet<3;++idet) {
     for (const InDetDD::SiDetectorElement* element: *(idet==1 ? m_pixman->getDetectorElementCollection() : m_sctman->getDetectorElementCollection())) {
-      if (element!=0) {
+      if (element!=nullptr) {
         const Identifier ident=element->identify();
         std::string key=dirkey(ident,3);
         // do not produce AlignableTrasnforms for SCT side 1 if option set
@@ -527,7 +528,7 @@ void InDetAlignDBTool::dispGroup(const int dettype, const int bec,
   AlignableTransform* pat;
   for (int idet=1;idet<3;++idet) {
     for (const InDetDD::SiDetectorElement* element: *(idet==1 ? m_pixman->getDetectorElementCollection() : m_sctman->getDetectorElementCollection())) {
-      if (element!=0) {
+      if (element!=nullptr) {
         const Identifier ident=element->identify();
         int mdet,mbec,mlayer,mring,msector,mside;
         idToDetSet(ident,mdet,mbec,mlayer,mring,msector,mside);
@@ -561,7 +562,7 @@ void InDetAlignDBTool::dispGroup(const int dettype, const int bec,
             const Amg::Vector3D modcent=element->center();
             float dx=modcent.x();
             float dy=modcent.y();
-            float dr=sqrt(dx*dx+dy*dy);
+            float dr=std::sqrt(dx*dx+dy*dy);
                   xd=(rd*dx-rpd*dy)/dr;
             yd=(rd*dy+rpd*dx)/dr;
           } else {
@@ -636,7 +637,7 @@ void InDetAlignDBTool::dispGroup(const int dettype, const int bec,
 
 void InDetAlignDBTool::writeFile(const bool ntuple, const std::string file) 
   const {
-  std::ofstream* outfile=0;
+  std::ofstream* outfile=nullptr;
   INTupleSvc* ntsvc;
   if (StatusCode::SUCCESS!=service("NTupleSvc",ntsvc,true))
     ATH_MSG_ERROR("Cannot find NTupleSvc" );
@@ -760,13 +761,13 @@ void InDetAlignDBTool::writeFile(const bool ntuple, const std::string file)
 // write extra txt file for new IBLDist
 void InDetAlignDBTool::writeIBLDistFile( const std::string file) 
   const {
-  std::ofstream* outfile=0;
+  std::ofstream* outfile=nullptr;
  
   ATH_MSG_DEBUG( "writeFile: Write IBLDist DB in text file: " << file );
   outfile=new std::ofstream(file.c_str());
   *outfile << "/Indet/IBLDist" << std::endl;
 
-  const CondAttrListCollection* atrlistcol=0;
+  const CondAttrListCollection* atrlistcol=nullptr;
   if (StatusCode::SUCCESS==detStore()->retrieve(atrlistcol,"/Indet/IBLDist")) {
     // loop over objects in collection                                                                                                             
     for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); citr!=atrlistcol->end();++citr) {
@@ -792,7 +793,7 @@ void InDetAlignDBTool::writeIBLDistFile( const std::string file)
 // write extra txt file for new IBLDist                                                                                                                                        
 void InDetAlignDBTool::writeGlobalFolderFile( const std::string file)
   const {
-  std::ofstream* outfile=0;
+  std::ofstream* outfile=nullptr;
 
   if (m_dynamicDB){
     ATH_MSG_DEBUG( "writeFile: Write GlobalFolder DB in text file: " << file );
@@ -803,7 +804,7 @@ void InDetAlignDBTool::writeGlobalFolderFile( const std::string file)
 
       *outfile << *it << std::endl;
     
-      const CondAttrListCollection* atrlistcol=0;
+      const CondAttrListCollection* atrlistcol=nullptr;
       if (StatusCode::SUCCESS==detStore()->retrieve(atrlistcol,*it)) {
 	// loop over objects in collection
 	for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); citr!=atrlistcol->end();++citr) {
@@ -855,7 +856,7 @@ void InDetAlignDBTool::readTextFile(const std::string file) const {
   int ntrans=0;
 
   std::string channelName; // Channel name
-  const AlignableTransform* pat = 0;
+  const AlignableTransform* pat = nullptr;
 
   while (infile) {
     std::string tmpline; 
@@ -877,7 +878,7 @@ void InDetAlignDBTool::readTextFile(const std::string file) const {
       channelName = tmpstr;
       ATH_MSG_DEBUG("Read in AlignableTransform data, key " << channelName );
       // find the AlignableTransform with this key
-      pat = 0;
+      pat = nullptr;
       if (!(pat=cgetTransPtr(channelName))) {
   ATH_MSG_ERROR("Cannot find AlignableTransform object for key" 
               << channelName );
@@ -1108,7 +1109,7 @@ bool InDetAlignDBTool::setTrans(const Identifier& ident, const int level,
     bool result=false;
     if ((pat=cgetTransPtr(key))) {
       pat2=const_cast<AlignableTransform*>(pat);
-      if (pat2!=0) {
+      if (pat2!=nullptr) {
 	result=pat2->update(ident, Amg::EigenTransformToCLHEP(trans) );
 	if (!result) ATH_MSG_ERROR( "Attempt to set non-existant transform" );
       } 
@@ -1152,7 +1153,7 @@ bool InDetAlignDBTool::tweakTrans(const Identifier& ident, const int level,
     AlignableTransform* pat2;
     if ((pat=cgetTransPtr(key))) {
       pat2=const_cast<AlignableTransform*>(pat);
-      if (pat2!=0) {
+      if (pat2!=nullptr) {
 	result=pat2->tweak(ident,Amg::EigenTransformToCLHEP(trans));
       if (!result) ATH_MSG_ERROR(
 				 "Attempt to tweak non-existant transform" );
@@ -1395,12 +1396,12 @@ void InDetAlignDBTool::printDB(const int level) const {
 
 // ==========================================
 
-AlignableTransform* InDetAlignDBTool::getTransPtr(const std::string key) 
+AlignableTransform* InDetAlignDBTool::getTransPtr(const std::string& key) 
   const {
   // look in collection to retrieve pointer to AlignableTransform object of 
   // given key and return it, return 0 if not collection or key value not found
   AlignableTransformContainer* patc;
-  AlignableTransform* pat=0;
+  AlignableTransform* pat=nullptr;
   if (m_par_newdb) {
     if (StatusCode::SUCCESS==detStore()->retrieve(patc,m_par_dbroot )) {
       for (DataVector<AlignableTransform>::iterator dva=patc->begin();
@@ -1412,18 +1413,18 @@ AlignableTransform* InDetAlignDBTool::getTransPtr(const std::string key)
       }
     }
   } else {
-    if (StatusCode::SUCCESS!=detStore()->retrieve(pat,key)) pat=0;
+    if (StatusCode::SUCCESS!=detStore()->retrieve(pat,key)) pat=nullptr;
   }
   return pat;
 }
 
-const AlignableTransform* InDetAlignDBTool::cgetTransPtr(const std::string key)
+const AlignableTransform* InDetAlignDBTool::cgetTransPtr(const std::string& key)
   const {
   // look in collection to retrieve pointer to AlignableTransform object of 
   // given key and return it, return 0 if not collection or key value not found
   // const version
   const AlignableTransformContainer* patc;
-  const AlignableTransform* pat=0;
+  const AlignableTransform* pat=nullptr;
   if (m_par_newdb) {
     if (StatusCode::SUCCESS==detStore()->retrieve(patc,m_par_dbroot )) {
       for (DataVector<AlignableTransform>::const_iterator dva=patc->begin();
@@ -1435,7 +1436,7 @@ const AlignableTransform* InDetAlignDBTool::cgetTransPtr(const std::string key)
       }
     }
   } else {
-    if (StatusCode::SUCCESS!=detStore()->retrieve(pat,key)) pat=0;
+    if (StatusCode::SUCCESS!=detStore()->retrieve(pat,key)) pat=nullptr;
   }
   return pat;
 }
@@ -1536,13 +1537,13 @@ void InDetAlignDBTool::extractAlphaBetaGamma(const Amg::Transform3D & trans,
 bool InDetAlignDBTool::tweakIBLDist(const int stave, const float bowx) const {
 
   // find transform key, then set appropriate transform           
-  const CondAttrListCollection* atrlistcol1=0;
-  CondAttrListCollection* atrlistcol2=0;
+  const CondAttrListCollection* atrlistcol1=nullptr;
+  CondAttrListCollection* atrlistcol2=nullptr;
   bool result=false;
   if (StatusCode::SUCCESS==detStore()->retrieve(atrlistcol1,"/Indet/IBLDist")) {
     // loop over objects in collection                                    
     atrlistcol2 = const_cast<CondAttrListCollection*>(atrlistcol1);
-    if (atrlistcol2!=0){
+    if (atrlistcol2!=nullptr){
       for (CondAttrListCollection::const_iterator citr=atrlistcol2->begin(); citr!=atrlistcol2->end();++citr) {
 	
 	const coral::AttributeList& atrlist=citr->second;
@@ -1584,8 +1585,8 @@ bool InDetAlignDBTool::tweakGlobalFolder(const Identifier& ident, const int leve
 					 const Amg::Transform3D& trans ) const {
 
   // find transform key, then set appropriate transform           
-  const CondAttrListCollection* atrlistcol1=0;
-  CondAttrListCollection* atrlistcol2=0;
+  const CondAttrListCollection* atrlistcol1=nullptr;
+  CondAttrListCollection* atrlistcol2=nullptr;
   bool result=false;
   std::string key=dirkey(ident,level);
   int det,bec,layer,ring,sector,side;
@@ -1597,7 +1598,7 @@ bool InDetAlignDBTool::tweakGlobalFolder(const Identifier& ident, const int leve
     // loop over objects in collection                                    
     //atrlistcol1->dump();
     atrlistcol2 = const_cast<CondAttrListCollection*>(atrlistcol1);
-    if (atrlistcol2!=0){
+    if (atrlistcol2!=nullptr){
       for (CondAttrListCollection::const_iterator citr=atrlistcol2->begin(); citr!=atrlistcol2->end();++citr) {
 	
 	const coral::AttributeList& atrlist=citr->second;
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillSiCluster.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillSiCluster.cxx
index bcb5666debaa..0dd089e2598f 100755
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillSiCluster.cxx
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillSiCluster.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 //////////////////////////////////////////////////////////////////////////
@@ -39,11 +39,11 @@ InDetAlignFillSiCluster::InDetAlignFillSiCluster(const std::string& type,
 						 const std::string& name,
 						 const IInterface* parent)
   : AthAlgTool(type,name,parent),
-    m_ntupleSvc(0),
-    m_pixelid(0),
-    m_sctID(0),
-    m_Pixel_clcontainer(0),
-    m_Sct_clcontainer(0)
+    m_ntupleSvc(nullptr),
+    m_pixelid(nullptr),
+    m_sctID(nullptr),
+    m_Pixel_clcontainer(nullptr),
+    m_Sct_clcontainer(nullptr)
 {
   declareInterface<IInDetAlignFillSiCluster>(this);
   declareProperty("Pixel_SiClusterContainerName", m_Pixel_SiClustersName="PixelClusters");
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx
index 9f918794835d..59b837e933fc 100644
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx
@@ -59,7 +59,7 @@ InDetAlignFillTrack::InDetAlignFillTrack (const std::string& type,
                                           const std::string& name,
                                           const IInterface* parent)
   : AthAlgTool(type, name, parent),
-  m_ntupleSvc(0),
+  m_ntupleSvc(nullptr),
   m_mctable{},
   m_totaltrks(0),
   m_totalhits(0),
@@ -133,7 +133,7 @@ StatusCode InDetAlignFillTrack::initialize() {
     ATH_CHECK(svcLoc()->service("PartPropSvc", p_PartPropSvc, CREATEIFNOTTHERE));
     //
     m_mctable = const_cast<HepPDT::ParticleDataTable*>(p_PartPropSvc->PDT());
-    if (m_mctable == 0) {
+    if (m_mctable == nullptr) {
       ATH_MSG_FATAL("FillTrack: PDG table not found");
       return StatusCode::FAILURE;
     }
@@ -247,7 +247,7 @@ StatusCode InDetAlignFillTrack::FillTrack() {
   if (m_doTruth) {
     int nTracks = 0;
 
-    const TrackTruthCollection* truthCol = NULL;
+    const TrackTruthCollection* truthCol = nullptr;
 
     // retrieve all track truth collection from TDS
     if (StatusCode::SUCCESS != evtStore()->retrieve(truthCol, m_TruthTrkCol)) {
@@ -272,7 +272,7 @@ StatusCode InDetAlignFillTrack::FillTrack() {
       //looping over tracks
       for (; trackItr != trackItrE && nTracks < maxTracks; ++trackItr) {
         const Trk::Track* track = *trackItr;
-        if (track == NULL) {
+        if (track == nullptr) {
           ATH_MSG_WARNING("No associated Trk::Track object found for track "
                           << nTracks);
           continue;
@@ -298,7 +298,7 @@ StatusCode InDetAlignFillTrack::FillTrack() {
           // probability of the reco<->truth match
           float trkTruthProb = trkTruth.probability();
 
-          HepMcParticleLink HMPL = trkTruth.particleLink();
+          const HepMcParticleLink& HMPL = trkTruth.particleLink();
 
           if (HMPL.isValid()) {
 #ifdef HEPMC3
@@ -346,7 +346,7 @@ StatusCode InDetAlignFillTrack::FillTrack() {
             else {
               // currently cannot configure the TruthToTrack tool properly
 
-              const Trk::TrackParameters* generatedTrackPerigee = 0;
+              const Trk::TrackParameters* generatedTrackPerigee = nullptr;
 
               //using a tool to produce perigee track parameters from generated parameters
               generatedTrackPerigee = m_truthToTrack->makePerigeeParameters(genParticle);
@@ -442,7 +442,7 @@ StatusCode InDetAlignFillTrack::FillTrack() {
                   ATH_MSG_DEBUG("Distance between perigee point and generated vertex: "
                                 << distance / CLHEP::m << " m");
 
-                  const Trk::TrackParameters* generatedTrackPerigee = 0;
+                  const Trk::TrackParameters* generatedTrackPerigee = nullptr;
 
                   // Extrapolate directly to exclude material effects!
                   if (distance > 1.e-4) {
@@ -820,7 +820,7 @@ int InDetAlignFillTrack::dumpTrackCol(const TrackCollection* tracks) {
 //  InDetAlignFillTrack::dumpTrackCol()
 //=====================================================================
 int InDetAlignFillTrack::dumpTrackCol(const TrackCollection* tracks,
-                                      const std::string TrkColName) {
+                                      const std::string& TrkColName) {
   ATH_MSG_DEBUG("In dump" << TrkColName << "TrackCol()");
 
   int itrk = 0;
@@ -830,7 +830,7 @@ int InDetAlignFillTrack::dumpTrackCol(const TrackCollection* tracks,
 
   //looping over tracks
   for (; trackItr != trackItrE && itrk < maxTracks; ++trackItr) {
-    if (*trackItr != 0) dumpTrack(itrk, (*trackItr), TrkColName);
+    if (*trackItr != nullptr) dumpTrack(itrk, (*trackItr), TrkColName);
 
     itrk++;
   }
@@ -842,12 +842,12 @@ int InDetAlignFillTrack::dumpTrackCol(const TrackCollection* tracks,
 //  InDetAlignFillTrack::dumpTrack()
 //=====================================================================
 void InDetAlignFillTrack::dumpTrack(int itrk, const Trk::Track* trk,
-                                    std::string TrkColName) {
+                                    const std::string& TrkColName) {
   ATH_MSG_VERBOSE("In dump" << TrkColName << "Track()");
 
   const Trk::Perigee* aMeasPer = trk->perigeeParameters();
 
-  if (aMeasPer == 0) {
+  if (aMeasPer == nullptr) {
     ATH_MSG_ERROR("Could not get Trk::MeasuredPerigee");
   } else {
     double d0 = aMeasPer->parameters()[Trk::d0];
@@ -949,7 +949,7 @@ void InDetAlignFillTrack::dumpTrack(int itrk, const Trk::Track* trk,
     // chi2Prob = TMath::Prob(chi2,DoF) ROOT function
     double chi2Prob = 0.;
     const Trk::FitQuality* fitQual = (*trk).fitQuality();
-    if (fitQual == 0) {
+    if (fitQual == nullptr) {
       ATH_MSG_ERROR("No fit quality assigned to the track");
       chi2Prob = -1e12; // return big value
     } else {
@@ -1110,7 +1110,7 @@ StatusCode InDetAlignFillTrack::dumpMatching(const TrackCollection* tracksUpper,
   TrackCollection::const_iterator trackItrUpperE = tracksUpper->end();
   for (; trackItrUpper != trackItrUpperE; ++trackItrUpper) {
     const Trk::Track* trackUpper = *trackItrUpper;
-    if (trackUpper == NULL) {
+    if (trackUpper == nullptr) {
       ATH_MSG_DEBUG("No associated Trk::Track object found for track " << nTracksUpper);
       continue;
     }
@@ -1151,7 +1151,7 @@ StatusCode InDetAlignFillTrack::dumpMatching(const TrackCollection* tracksUpper,
     DataVector<Trk::Track>::const_iterator trackItrLowerE = tracksLower->end();
     for (; trackItrLower != trackItrLowerE; ++trackItrLower) { //looping over Lower tracks
       const Trk::Track* trackLower = *trackItrLower;
-      if (trackLower == NULL) {
+      if (trackLower == nullptr) {
         ATH_MSG_DEBUG("No associated Trk::Track object found for track " << nTracksLower);
         continue;
       }
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignHitQualSelTool.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignHitQualSelTool.cxx
index 697174e88607..a3d35f3af6e1 100644
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignHitQualSelTool.cxx
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignHitQualSelTool.cxx
@@ -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
 */
 
 #include "TrkTrack/TrackStateOnSurface.h"
@@ -71,58 +71,58 @@ StatusCode InDetAlignHitQualSelTool::finalize() {
 const Trk::RIO_OnTrack* InDetAlignHitQualSelTool::getGoodHit( const Trk::TrackStateOnSurface* tsos ) const {
   ATH_MSG_DEBUG( "** getGoodHit ** Dealing with a new tsos ** START ** " ) ;
 
-  if( tsos == NULL ) {
+  if( tsos == nullptr ) {
     ATH_MSG_ERROR( "0 pointer passed for TSOS!" ) ;
-    return 0 ;
+    return nullptr ;
   }
   if( !tsos->type(Trk::TrackStateOnSurface::Measurement) ) {
     ATH_MSG_DEBUG( "not a hit, cast to MeasurementBase will fail, so reject" ) ;
-    return 0 ;
+    return nullptr ;
   }
   if( m_rejectOutliers && tsos->type(Trk::TrackStateOnSurface::Outlier) ) {
     ATH_MSG_DEBUG( "outlier, reject" ) ;
-    return 0 ;
+    return nullptr ;
   }
   const Trk::MeasurementBase* measBase = tsos->measurementOnTrack() ;
-  if( measBase == NULL) {
+  if( measBase == nullptr) {
     ATH_MSG_DEBUG( "tsos->measurementOnTrack() returned 0 pointer" ) ;
-    return 0 ;
+    return nullptr ;
   }
   
   const Trk::RIO_OnTrack* hit = dynamic_cast <const Trk::RIO_OnTrack*>( measBase ) ;
-  if( hit == NULL ) {
+  if( hit == nullptr ) {
     ATH_MSG_DEBUG( "dynamic_cast <const Trk::RIO_OnTrack*>( measBase ) returned 0 pointer" ) ;
-    return 0 ;
+    return nullptr ;
   }
 
   const Trk::PrepRawData* prd = hit->prepRawData() ;
-  if( prd == NULL ) {
+  if( prd == nullptr ) {
     ATH_MSG_WARNING( "hit->prepRawData() method failed" ) ;
-    return 0 ;
+    return nullptr ;
   }
   
   
-  if( m_rejectGangedPixels && isGangedPixel( prd ) ) return 0 ;
+  if( m_rejectGangedPixels && isGangedPixel( prd ) ) return nullptr ;
   const vector<Identifier> &idVec = prd->rdoList() ;
 
   // cut on the cluster size
-  if( m_maxClusterSize > 0 && !isGoodClusterSize( idVec ) ) return 0 ;
+  if( m_maxClusterSize > 0 && !isGoodClusterSize( idVec ) ) return nullptr ;
 
   // cut on edge channels
-  if( m_rejectEdgeChannels && isEdgeChannel( idVec ) ) return 0 ;
+  if( m_rejectEdgeChannels && isEdgeChannel( idVec ) ) return nullptr ;
   // cut on the track incidence angle alpha
   const Trk::TrackParameters* trkPar = tsos->trackParameters() ;
-  if( trkPar == NULL ) {
+  if( trkPar == nullptr ) {
     ATH_MSG_WARNING( "tsos->trackParameters() returned 0 pointer" ) ;
-    return 0 ;
+    return nullptr ;
   }
   const InDetDD::SiDetectorElement *detEle
     = dynamic_cast<const InDetDD::SiDetectorElement*>( hit->detectorElement() ) ;
-  if( detEle == NULL ) {
+  if( detEle == nullptr ) {
     ATH_MSG_WARNING( "hit cast to SiDetectorElement returned 0 pointer" ) ;
-    return 0 ;
+    return nullptr ;
   }
-  if( !isGoodAngle( trkPar, detEle ) ) return 0 ;  
+  if( !isGoodAngle( trkPar, detEle ) ) return nullptr ;  
   return hit ;
 }
 
@@ -131,7 +131,7 @@ bool InDetAlignHitQualSelTool::isGoodSiHit( const Trk::TrackStateOnSurface* tsos
   bool isPixelHit = false;
   bool isIBLHit = false;
 
-  if( tsos == NULL ) {
+  if( tsos == nullptr ) {
     ATH_MSG_ERROR( "0 pointer passed for TSOS!" ) ;
     return false ;
   }
@@ -145,19 +145,19 @@ bool InDetAlignHitQualSelTool::isGoodSiHit( const Trk::TrackStateOnSurface* tsos
     return false ;
   }
   const Trk::MeasurementBase* measBase = tsos->measurementOnTrack() ;
-  if( measBase == NULL) {
+  if( measBase == nullptr) {
     ATH_MSG_DEBUG( "tsos->measurementOnTrack() returned 0 pointer" ) ;
     return false ;
   }
   
   const Trk::RIO_OnTrack* hit = dynamic_cast <const Trk::RIO_OnTrack*>( measBase ) ;
-  if( hit == NULL ) {
+  if( hit == nullptr ) {
     ATH_MSG_DEBUG( "dynamic_cast <const Trk::RIO_OnTrack*>( measBase ) returned 0 pointer" ) ;
     return false ;
   }
 
   const Trk::PrepRawData* prd = hit->prepRawData() ;
-  if( prd == NULL ) {
+  if( prd == nullptr ) {
     ATH_MSG_WARNING( "hit->prepRawData() method failed" ) ;
     return false ;
   }
@@ -212,14 +212,14 @@ bool InDetAlignHitQualSelTool::isGoodSiHit( const Trk::TrackStateOnSurface* tsos
 
   // cut on the track incidence angle alpha
   const Trk::TrackParameters* trkPar = tsos->trackParameters() ;
-  if( trkPar == NULL ) {
+  if( trkPar == nullptr ) {
     ATH_MSG_WARNING( "tsos->trackParameters() returned 0 pointer" ) ;
     return false ;
   }
   // incidence angle
   const InDetDD::SiDetectorElement *detEle
     = dynamic_cast<const InDetDD::SiDetectorElement*>( hit->detectorElement() ) ;
-  if( detEle == NULL ) {
+  if( detEle == nullptr ) {
     ATH_MSG_WARNING( "hit cast to SiDetectorElement returned 0 pointer" ) ;
     return false ;
   }
@@ -231,7 +231,7 @@ bool InDetAlignHitQualSelTool::isGoodSiHit( const Trk::TrackStateOnSurface* tsos
 
 
 bool InDetAlignHitQualSelTool::getGoodHole( const Trk::TrackStateOnSurface* tsos ) const {
-  if( tsos == NULL ) {
+  if( tsos == nullptr ) {
     ATH_MSG_ERROR( "0 pointer passed for TSOS!" ) ;
     return false ;
   }
@@ -241,13 +241,13 @@ bool InDetAlignHitQualSelTool::getGoodHole( const Trk::TrackStateOnSurface* tsos
   }
   // for holes only cut on the track incidence angle alpha
   const Trk::TrackParameters* trkPar = tsos->trackParameters() ;
-  if( trkPar == NULL ) {
+  if( trkPar == nullptr ) {
     ATH_MSG_WARNING( "tsos->trackParameters() returned 0 pointer" ) ;
     return false ;
   }
   const InDetDD::SiDetectorElement *detEle = dynamic_cast<const InDetDD::SiDetectorElement*>( 
     tsos->trackParameters()->associatedSurface().associatedDetectorElement() ) ;
-  if( detEle == NULL ) {
+  if( detEle == nullptr ) {
     ATH_MSG_WARNING( "hole cast to SiDetectorElement returned 0 pointer" ) ;
     return false ;
   }
@@ -258,7 +258,7 @@ bool InDetAlignHitQualSelTool::getGoodHole( const Trk::TrackStateOnSurface* tsos
 
 bool InDetAlignHitQualSelTool::isGangedPixel( const Trk::PrepRawData* prd ) const {
   const InDet::SiCluster* cluster = dynamic_cast<const InDet::SiCluster*>( prd ) ;
-  if( cluster == NULL ) {
+  if( cluster == nullptr ) {
     ATH_MSG_WARNING( "dynamic_cast<const InDet::SiCluster*>( prd ) failed!" ) ;
     return false ;
   }
@@ -312,7 +312,7 @@ bool InDetAlignHitQualSelTool::isGoodAngle( const Trk::TrackParameters* trkPar
                                                 , const InDetDD::SiDetectorElement* detEle
                                                 ) const {
   const double trkIncidAngle = incidAngle( trkPar, detEle ) ;
-  if( fabs(trkIncidAngle) > m_maxIncidAngle ) {
+  if( std::abs(trkIncidAngle) > m_maxIncidAngle ) {
     ATH_MSG_DEBUG( "trkIncidAngle = |" << trkIncidAngle << "| > " << m_maxIncidAngle << ", reject" ) ;
     return false ;
   }
@@ -324,8 +324,8 @@ double InDetAlignHitQualSelTool::incidAngle( const Trk::TrackParameters* trkPar
                                                  , const InDetDD::SiDetectorElement* detEle
                                                  ) const {
   Amg::Vector3D trkDir       = trkPar->momentum() ;
-  Amg::Vector3D detElePhi    = detEle->phiAxis() ; //!< local x axis in global frame
-  Amg::Vector3D detEleNormal = detEle->normal() ; //!< local z axis in global frame
+  const Amg::Vector3D& detElePhi    = detEle->phiAxis() ; //!< local x axis in global frame
+  const Amg::Vector3D& detEleNormal = detEle->normal() ; //!< local z axis in global frame
   double trkDotPhi = trkDir.dot( detElePhi ) ; //!< scalar product
   double trkDotNormal = trkDir.dot( detEleNormal ) ;
   double trkIncidAngle = atan( trkDotPhi/trkDotNormal ) ;
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignOverlapTool.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignOverlapTool.cxx
index dd91cdd5886a..0752d59a3d9e 100644
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignOverlapTool.cxx
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignOverlapTool.cxx
@@ -1,12 +1,12 @@
 /*
-   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
  */
 
-#include <iostream>
-#include <iomanip>
+#include <cmath>
 #include <fstream>
+#include <iomanip>
+#include <iostream>
 #include <string>
-#include <math.h>
 #include <vector>
 
 #include "AthContainers/DataVector.h"
@@ -108,8 +108,8 @@ int InDetAlignOverlapTool::getNumberOverlapPIX(const AlignTrk& trk) const {
         if ((p_modlist->vec[index]).bec() == 0 && (p_modlist->vec[Allindex]).bec() == 0) { // BARREL
           if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
               (p_modlist->vec[Allindex]).ring() == (p_modlist->vec[index]).ring() &&
-              (fabs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
-               fabs((p_modlist->vec[Allindex]).sector() -
+              (std::abs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
+               std::abs((p_modlist->vec[Allindex]).sector() -
                     ((p_modlist->vec[index]).sector() + PixelSector[(p_modlist->vec[index]).layer()])) == 1.)) {
             // msg()
             if (msgLvl(MSG::DEBUG)) {
@@ -132,7 +132,7 @@ int InDetAlignOverlapTool::getNumberOverlapPIX(const AlignTrk& trk) const {
           }
 
           if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
-              fabs((p_modlist->vec[Allindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
+              std::abs((p_modlist->vec[Allindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
               (p_modlist->vec[Allindex]).sector() == (p_modlist->vec[index]).sector()) {
             //msg()
             if (msgLvl(MSG::DEBUG)) {
@@ -158,8 +158,8 @@ int InDetAlignOverlapTool::getNumberOverlapPIX(const AlignTrk& trk) const {
         if ((p_modlist->vec[index]).bec() != 0 && (p_modlist->vec[index]).bec() == (p_modlist->vec[Allindex]).bec()) { // ENDCAP
           if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
               (p_modlist->vec[Allindex]).ring() == (p_modlist->vec[index]).ring() &&
-              (fabs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
-               fabs((p_modlist->vec[Allindex]).sector() - ((p_modlist->vec[index]).sector() + ECPixelSector)) == 1.)) {
+              (std::abs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
+               std::abs((p_modlist->vec[Allindex]).sector() - ((p_modlist->vec[index]).sector() + ECPixelSector)) == 1.)) {
             //msg()
             if (msgLvl(MSG::DEBUG)) {
               msg().setColor(MSG::RED);
@@ -252,8 +252,8 @@ int InDetAlignOverlapTool::getNumberOverlapSCT(const AlignTrk& trk) const {
         if ((p_modlist->vec[index]).bec() == 0 && (p_modlist->vec[Allindex]).bec() == 0) { // BARREL
           if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
               (p_modlist->vec[Allindex]).ring() == (p_modlist->vec[index]).ring() &&
-              (fabs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
-               fabs((p_modlist->vec[Allindex]).sector() -
+              (std::abs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
+               std::abs((p_modlist->vec[Allindex]).sector() -
                     ((p_modlist->vec[index]).sector() + SCTSector[(p_modlist->vec[index]).layer()])) == 1.)) {
             if (msgLvl(MSG::DEBUG)) {
               msg().setColor(MSG::RED);
@@ -271,7 +271,7 @@ int InDetAlignOverlapTool::getNumberOverlapSCT(const AlignTrk& trk) const {
           }
 
           if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
-              fabs((p_modlist->vec[Allindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
+              std::abs((p_modlist->vec[Allindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
               (p_modlist->vec[Allindex]).sector() == (p_modlist->vec[index]).sector()) {
             if (msgLvl(MSG::DEBUG)) {
               msg().setColor(MSG::RED);
@@ -298,8 +298,8 @@ int InDetAlignOverlapTool::getNumberOverlapSCT(const AlignTrk& trk) const {
                                                                                                                          // -2)
           if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
               (p_modlist->vec[Allindex]).ring() == (p_modlist->vec[index]).ring() &&
-              (fabs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
-               fabs((p_modlist->vec[Allindex]).sector() - ((p_modlist->vec[index]).sector() + ECSCTSector)) == 1.)) {
+              (std::abs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
+               std::abs((p_modlist->vec[Allindex]).sector() - ((p_modlist->vec[index]).sector() + ECSCTSector)) == 1.)) {
             if (msgLvl(MSG::DEBUG)) {
               msg().setColor(MSG::RED);
               msg(MSG::DEBUG) << " Index:" << index << " layer " << (p_modlist->vec[index]).layer() << " ring " <<
@@ -316,7 +316,7 @@ int InDetAlignOverlapTool::getNumberOverlapSCT(const AlignTrk& trk) const {
           }
 
           if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
-              fabs((p_modlist->vec[Allindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
+              std::abs((p_modlist->vec[Allindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
               (p_modlist->vec[Allindex]).sector() == (p_modlist->vec[index]).sector()) {
             if (msgLvl(MSG::DEBUG)) {
               msg().setColor(MSG::GREEN);
@@ -391,14 +391,14 @@ std::vector<AlignSiHit> InDetAlignOverlapTool::getOverlapHit(const AlignTrk& trk
         if ((p_modlist->vec[index]).bec() == 0 && (p_modlist->vec[newindex]).bec() == 0) {               // BARREL
           if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
               (p_modlist->vec[newindex]).ring() == (p_modlist->vec[index]).ring() &&
-              (fabs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
-               fabs((p_modlist->vec[newindex]).sector() -
+              (std::abs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
+               std::abs((p_modlist->vec[newindex]).sector() -
                     ((p_modlist->vec[index]).sector() + PixelSector[(p_modlist->vec[index]).layer()])) == 1.)) {
             isPIXOverlap = true;
           }
 
           if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
-              fabs((p_modlist->vec[newindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
+              std::abs((p_modlist->vec[newindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
               (p_modlist->vec[newindex]).sector() == (p_modlist->vec[index]).sector()) {
             isPIXOverlap = true;
           }
@@ -407,8 +407,8 @@ std::vector<AlignSiHit> InDetAlignOverlapTool::getOverlapHit(const AlignTrk& trk
         if ((p_modlist->vec[index]).bec() != 0 && (p_modlist->vec[index]).bec() == (p_modlist->vec[newindex]).bec()) { // ENDCAP
           if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
               (p_modlist->vec[newindex]).ring() == (p_modlist->vec[index]).ring() &&
-              (fabs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
-               fabs((p_modlist->vec[newindex]).sector() - ((p_modlist->vec[index]).sector() + ECPixelSector)) == 1.)) {
+              (std::abs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
+               std::abs((p_modlist->vec[newindex]).sector() - ((p_modlist->vec[index]).sector() + ECPixelSector)) == 1.)) {
             isPIXOverlap = true;
           }
         }
@@ -423,14 +423,14 @@ std::vector<AlignSiHit> InDetAlignOverlapTool::getOverlapHit(const AlignTrk& trk
         if ((p_modlist->vec[index]).bec() == 0 && (p_modlist->vec[newindex]).bec() == 0) { // BARREL
           if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
               (p_modlist->vec[newindex]).ring() == (p_modlist->vec[index]).ring() &&
-              (fabs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
-               fabs((p_modlist->vec[newindex]).sector() -
+              (std::abs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
+               std::abs((p_modlist->vec[newindex]).sector() -
                     ((p_modlist->vec[index]).sector() + SCTSector[(p_modlist->vec[index]).layer()])) == 1.)) {
             isSCTOverlap = true;
           }
 
           if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
-              fabs((p_modlist->vec[newindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
+              std::abs((p_modlist->vec[newindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
               (p_modlist->vec[newindex]).sector() == (p_modlist->vec[index]).sector()) {
             isSCTOverlap = true;
           }
@@ -446,13 +446,13 @@ std::vector<AlignSiHit> InDetAlignOverlapTool::getOverlapHit(const AlignTrk& trk
                                                                                                                          // -2)
           if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
               (p_modlist->vec[newindex]).ring() == (p_modlist->vec[index]).ring() &&
-              (fabs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
-               fabs((p_modlist->vec[newindex]).sector() - ((p_modlist->vec[index]).sector() + ECSCTSector)) == 1.)) {
+              (std::abs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
+               std::abs((p_modlist->vec[newindex]).sector() - ((p_modlist->vec[index]).sector() + ECSCTSector)) == 1.)) {
             isSCTOverlap = true;
           }
 
           if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
-              fabs((p_modlist->vec[newindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
+              std::abs((p_modlist->vec[newindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
               (p_modlist->vec[newindex]).sector() == (p_modlist->vec[index]).sector()) {
             isSCTOverlap = true;
           }
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignTrackSelTool.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignTrackSelTool.cxx
index 4ab3502d887f..7376ec234604 100755
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignTrackSelTool.cxx
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignTrackSelTool.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
 */
 
 // InDetAlignTrackSelTool.h
@@ -91,7 +91,7 @@ double InDetAlignTrackSelTool::Momentum(const Trk::Track& track) const {
   }
   else{
     Amg::VectorX perigeeParams = perigee->parameters();
-    mom = fabs(1./perigeeParams[Trk::qOverP]);
+    mom = std::abs(1./perigeeParams[Trk::qOverP]);
     mom /= 1000.; //mom in GeV
   }
 
@@ -113,7 +113,7 @@ double InDetAlignTrackSelTool::Pt(const Trk::Track& track) const {
   }
   else{  
     Amg::VectorX perigeeParams = perigee->parameters();
-    pt = fabs(sin(perigeeParams[Trk::theta])/perigeeParams[Trk::qOverP]);
+    pt = std::abs(sin(perigeeParams[Trk::theta])/perigeeParams[Trk::qOverP]);
     pt /= 1000.; // pt in GeV
   }
 
@@ -153,7 +153,7 @@ int InDetAlignTrackSelTool::nHoles(const Trk::Track& track) const {
   int nholes=0, nhpix, nhsct;
 
   std::unique_ptr<Trk::TrackSummary> summary = m_trackSumTool->summary(track);
-  if(summary==0){
+  if(summary==nullptr){
     ATH_MSG_ERROR( "Could not create TrackSummary" ) ;
     nholes = 1000;
   }
@@ -185,7 +185,7 @@ double InDetAlignTrackSelTool::chi2Prob(const Trk::Track& track) const {
   // chi2Prob = TMath::Prob(chi2,DoF) ROOT function
   const Trk::FitQuality* fitQual = track.fitQuality();
 
-  if (fitQual==0) {
+  if (fitQual==nullptr) {
     ATH_MSG_ERROR( "No fit quality assigned to the track" ) ; 
     chi2Prob = -1e12; // return big value
   }
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/RefitSiOnlyTool.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/RefitSiOnlyTool.cxx
index 74d14321e8dc..29fd69f5d3ea 100755
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/RefitSiOnlyTool.cxx
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/RefitSiOnlyTool.cxx
@@ -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
 */
 
 //////////////////////////////////////////////////////////////////////////
@@ -38,7 +38,7 @@ namespace InDetAlignment {
     AthAlgTool(type,name,parent),
     m_idHelper{},
     m_ITrkFitter("Trk::KalmanFitter"),
-    m_comPar(0),
+    m_comPar(nullptr),
     m_ParticleHypothesis(Trk::nonInteracting),
     m_trkindex{}
   {
@@ -112,12 +112,12 @@ namespace InDetAlignment {
       if (*t) {
   Trk::Track* refittedTrack = refit(*t);
    
-  if (refittedTrack==0)
+  if (refittedTrack==nullptr)
           ATH_MSG_DEBUG( " Refit of the track " << m_trkindex << " did not work. Track skipped." );
 
   newTrks->push_back(refittedTrack);
       } else {
-        newTrks->push_back(0);
+        newTrks->push_back(nullptr);
         ATH_MSG_DEBUG( " Track " << m_trkindex << " is empty." );
       }
       
@@ -144,7 +144,7 @@ namespace InDetAlignment {
     }
     else { ATH_MSG_WARNING( "Track # " << m_trkindex << " without perigee" ); }
 
-    Trk::Track* SiOnlyTrack = 0;
+    Trk::Track* SiOnlyTrack = nullptr;
     bool containsGangedPixels = false;
     std::vector<const Trk::MeasurementBase*> MeasurementBase_Collection;
 
@@ -153,7 +153,7 @@ namespace InDetAlignment {
       measBase !=tr->measurementsOnTrack()->end(); ++measBase) {
 
       const Trk::RIO_OnTrack* rio = dynamic_cast <const Trk::RIO_OnTrack*>(*measBase);
-      if (rio != 0) {
+      if (rio != nullptr) {
         const Identifier& surfaceID = (rio->identify());
         if(filterHit(surfaceID)==false) {
           MeasurementBase_Collection.push_back(*measBase);
@@ -207,7 +207,7 @@ namespace InDetAlignment {
     } //! containsGangedPixels
     else {
       ATH_MSG_DEBUG(" No refit was done for track # " << m_trkindex);
-      return 0;
+      return nullptr;
     }
 
     return SiOnlyTrack;
@@ -232,10 +232,10 @@ namespace InDetAlignment {
     for (DataVector<Trk::Track>::const_iterator it=tracks->begin(); 
    it!=tracks->end();++it) {
 
-      if(*it!=0){
+      if(*it!=nullptr){
   
         const Trk::Perigee* aMeasPer = (*it)->perigeeParameters();
-        if (aMeasPer==0){
+        if (aMeasPer==nullptr){
           ATH_MSG_ERROR( "Could not get Trk::MeasuredPerigee" );}
         else {
           double d0     = aMeasPer->parameters()[Trk::d0];
diff --git a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraint.cxx b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraint.cxx
index 2383c7ac36bd..5caff322d4c1 100755
--- a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraint.cxx
+++ b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/src/SurveyConstraint.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetSurveyConstraintTool/SurveyConstraint.h"
@@ -43,12 +43,12 @@ SurveyConstraint::SurveyConstraint(const std::string& type,
 				   const std::string& name, const IInterface* parent)
   : AthAlgTool(type,name,parent),
     m_idHelper{},
-    m_pixid(0),
-    m_sctid(0),
-    m_toolsvc(0),     
-    m_current_IDAlignDBTool(0),
-    m_survey_IDAlignDBTool(0),
-    m_randsvc(0), 
+    m_pixid(nullptr),
+    m_sctid(nullptr),
+    m_toolsvc(nullptr),     
+    m_current_IDAlignDBTool(nullptr),
+    m_survey_IDAlignDBTool(nullptr),
+    m_randsvc(nullptr), 
     m_SurveyWeightX(1.0),
     m_SurveyWeightY(1.0),
     m_SurveyWeightZ(1.0),
@@ -991,10 +991,10 @@ void SurveyConstraint::getSurveyCoordsPixEC(//const Identifier& ModuleID,
   const double SurveyTargetX = 17.8/2.0;
   const double SurveyTargetY = 59.8/2.0; 
  // 4 points
-  coords.push_back(Amg::Vector3D(-SurveyTargetX,-SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D(-SurveyTargetX, SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D( SurveyTargetX,-SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D( SurveyTargetX, SurveyTargetY,0.0));
+  coords.emplace_back(-SurveyTargetX,-SurveyTargetY,0.0);
+  coords.emplace_back(-SurveyTargetX, SurveyTargetY,0.0);
+  coords.emplace_back( SurveyTargetX,-SurveyTargetY,0.0);
+  coords.emplace_back( SurveyTargetX, SurveyTargetY,0.0);
 }
 
 //stupid implementation of Pixel barrel survey coordinates
@@ -1004,10 +1004,10 @@ void SurveyConstraint::getSurveyCoordsPixB(//const Identifier& ModuleID,
   const double SurveyTargetX = 17.8/2.0;
   const double SurveyTargetY = 59.8/2.0; 
  // 4 points
-  coords.push_back(Amg::Vector3D(-SurveyTargetX,-SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D(-SurveyTargetX, SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D( SurveyTargetX,-SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D( SurveyTargetX, SurveyTargetY,0.0));
+  coords.emplace_back(-SurveyTargetX,-SurveyTargetY,0.0);
+  coords.emplace_back(-SurveyTargetX, SurveyTargetY,0.0);
+  coords.emplace_back( SurveyTargetX,-SurveyTargetY,0.0);
+  coords.emplace_back( SurveyTargetX, SurveyTargetY,0.0);
 } 
 
 //stupid implementation of SCT EC survey coordinates
@@ -1017,10 +1017,10 @@ void SurveyConstraint::getSurveyCoordsSCTEC(//const Identifier& ModuleID,
   const double SurveyTargetX = 63.6/2.0;
   const double SurveyTargetY = 128.2/2.0; 
  // 4 points
-  coords.push_back(Amg::Vector3D(-SurveyTargetX,-SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D(-SurveyTargetX, SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D( SurveyTargetX,-SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D( SurveyTargetX, SurveyTargetY,0.0));
+  coords.emplace_back(-SurveyTargetX,-SurveyTargetY,0.0);
+  coords.emplace_back(-SurveyTargetX, SurveyTargetY,0.0);
+  coords.emplace_back( SurveyTargetX,-SurveyTargetY,0.0);
+  coords.emplace_back( SurveyTargetX, SurveyTargetY,0.0);
 }
 
 //stupid implementation of SCT barrel survey coordinates
@@ -1030,10 +1030,10 @@ void SurveyConstraint::getSurveyCoordsSCTB(//const Identifier& ModuleID,
   const double SurveyTargetX = 63.6/2.0;
   const double SurveyTargetY = 128.2/2.0; 
  // 4 points
-  coords.push_back(Amg::Vector3D(-SurveyTargetX,-SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D(-SurveyTargetX, SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D( SurveyTargetX,-SurveyTargetY,0.0));
-  coords.push_back(Amg::Vector3D( SurveyTargetX, SurveyTargetY,0.0));
+  coords.emplace_back(-SurveyTargetX,-SurveyTargetY,0.0);
+  coords.emplace_back(-SurveyTargetX, SurveyTargetY,0.0);
+  coords.emplace_back( SurveyTargetX,-SurveyTargetY,0.0);
+  coords.emplace_back( SurveyTargetX, SurveyTargetY,0.0);
 }
 
 
diff --git a/InnerDetector/InDetAlignment/InDetAlignDBTools/src/SiTrkAlignDBTool.cxx b/InnerDetector/InDetAlignment/InDetAlignDBTools/src/SiTrkAlignDBTool.cxx
index 40396b8a565d..b8737aea17db 100644
--- a/InnerDetector/InDetAlignment/InDetAlignDBTools/src/SiTrkAlignDBTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignDBTools/src/SiTrkAlignDBTool.cxx
@@ -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
 */
 
 
@@ -35,9 +35,9 @@ namespace InDet
 //________________________________________________________________________
 SiTrkAlignDBTool::SiTrkAlignDBTool(const std::string & type, const std::string & name, const IInterface * parent)
    : AthAlgTool(type,name,parent)
-   , m_pixHelper(0)
-   , m_sctHelper(0)
-   , m_idHelper(0)
+   , m_pixHelper(nullptr)
+   , m_sctHelper(nullptr)
+   , m_idHelper(nullptr)
    , m_writeSQLFile(true)
    , m_SQLiteTag("test_tag")
    , m_outputAlignFile("OutputSiAlignment.txt")
@@ -437,7 +437,7 @@ void SiTrkAlignDBTool::updateDB()
 
     ATH_MSG_DEBUG("Retrieved alignment constants for module "<<module->name());
     ATH_MSG_DEBUG("Module ID : "<<modID);
-    ATH_MSG_DEBUG("Expanded module ID : "<<m_idHelper->show_to_string(modID,0,'/'));
+    ATH_MSG_DEBUG("Expanded module ID : "<<m_idHelper->show_to_string(modID,nullptr,'/'));
 
     // get final alignment parameters
     DataVector<Trk::AlignPar> * fullAlignPars = m_alignModuleTool->getFullAlignPars(module);
@@ -644,7 +644,7 @@ void SiTrkAlignDBTool::updateAsL3(const Trk::AlignModule * module, const Amg::Tr
   const int level = 3;
 
   // transform from global frame to align frame
-  Amg::Transform3D globaltoalign = module->globalFrameToAlignFrame();
+  const Amg::Transform3D& globaltoalign = module->globalFrameToAlignFrame();
 
   // same code pplies to both Pixel and SCT
   for (unsigned int idet=0; idet<2; idet++) {
@@ -682,7 +682,7 @@ void SiTrkAlignDBTool::updateAsL3(const Trk::AlignModule * module, const Amg::Tr
       ATH_MSG_DEBUG("-----------------------------------------------------");
 
       ATH_MSG_DEBUG("ModuleID value: "<<elemID);
-      ATH_MSG_DEBUG("ModuleID: "<<m_idHelper->show_to_string(elemID,0,'/'));
+      ATH_MSG_DEBUG("ModuleID: "<<m_idHelper->show_to_string(elemID,nullptr,'/'));
 
       // this should work for both Pixel and SCT
       // module transform is the transform between the db frame and global frame
@@ -765,7 +765,7 @@ void SiTrkAlignDBTool::updateAsL2(const Trk::AlignModule * module, const Amg::Tr
     std::string key = m_IDAlignDBTool->dirkey(level_mod,level+1);
     
     ATH_MSG_DEBUG("TESTING value: "<<level_mod);
-    ATH_MSG_DEBUG("TESTING ID: "<<m_idHelper->show_to_string(level_mod,0,'/'));
+    ATH_MSG_DEBUG("TESTING ID: "<<m_idHelper->show_to_string(level_mod,nullptr,'/'));
     ATH_MSG_DEBUG("TESTING retrieved key: "<<key);
     std::vector<std::string>::const_iterator ix = find(level_mods.begin(),level_mods.end(),key); // check whether it is unique
     if (ix==level_mods.end()) {
@@ -774,11 +774,11 @@ void SiTrkAlignDBTool::updateAsL2(const Trk::AlignModule * module, const Amg::Tr
       ATH_MSG_DEBUG("-----------------------------------------------------");
       
       ATH_MSG_DEBUG("ModuleID value: "<<level_mod);
-      ATH_MSG_DEBUG("ModuleID: "<<m_idHelper->show_to_string(level_mod,0,'/'));
+      ATH_MSG_DEBUG("ModuleID: "<<m_idHelper->show_to_string(level_mod,nullptr,'/'));
       
       // for levels 1 and 2 the DB frame equals to the global frame but the align
       // frame doesnot, so we have to apply an additional transform
-      Amg::Transform3D dbFrameToAlignFrame = module->globalFrameToAlignFrame();
+      const Amg::Transform3D& dbFrameToAlignFrame = module->globalFrameToAlignFrame();
         
       ATH_MSG_DEBUG("DB to align");
       printTransform(dbFrameToAlignFrame);
@@ -797,7 +797,7 @@ void SiTrkAlignDBTool::updateAsL2(const Trk::AlignModule * module, const Amg::Tr
       }
     }
     else {
-      ATH_MSG_DEBUG("Skipping ModuleID: "<<m_idHelper->show_to_string(elemID,0,'/')<<" --> not unique");
+      ATH_MSG_DEBUG("Skipping ModuleID: "<<m_idHelper->show_to_string(elemID,nullptr,'/')<<" --> not unique");
     }
   } // end loop over detElements
 }
@@ -830,7 +830,7 @@ void SiTrkAlignDBTool::updateAsL16(const Trk::AlignModule * module, double bowx)
     Identifier elemID = sielem->identify();
     const int this_stave_phi = m_pixHelper->phi_module( elemID );
 
-    ATH_MSG_DEBUG("module ID: "<<m_idHelper->show_to_string(elemID,0,'/'));
+    ATH_MSG_DEBUG("module ID: "<<m_idHelper->show_to_string(elemID,nullptr,'/'));
     ATH_MSG_DEBUG("phi identifier: "<<m_pixHelper->phi_module( elemID )) ;    
 
     std::vector<int>::const_iterator ix = find(stave_phis.begin(),stave_phis.end(),this_stave_phi); // check whether it is unique
@@ -843,7 +843,7 @@ void SiTrkAlignDBTool::updateAsL16(const Trk::AlignModule * module, double bowx)
       }
     }
     else {
-      ATH_MSG_DEBUG("Skipping ModuleID: "<<m_idHelper->show_to_string(elemID,0,'/')<<" --> not unique");
+      ATH_MSG_DEBUG("Skipping ModuleID: "<<m_idHelper->show_to_string(elemID,nullptr,'/')<<" --> not unique");
     }
     
   } // end loop over detElements                                                                                                                                                 
diff --git a/InnerDetector/InDetAlignment/InDetAlignDBTools/src/TRTTrkAlignDBTool.cxx b/InnerDetector/InDetAlignment/InDetAlignDBTools/src/TRTTrkAlignDBTool.cxx
index f509d4a2f195..e4d244e09a52 100644
--- a/InnerDetector/InDetAlignment/InDetAlignDBTools/src/TRTTrkAlignDBTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignDBTools/src/TRTTrkAlignDBTool.cxx
@@ -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
 */
 
 #include "InDetIdentifier/TRT_ID.h"
@@ -28,8 +28,8 @@ namespace InDet
 //________________________________________________________________________
 TRTTrkAlignDBTool::TRTTrkAlignDBTool(const std::string & type, const std::string & name, const IInterface * parent)
    : AthAlgTool(type,name,parent)
-   , m_trtHelper(0)
-   , m_pixHelper(0)
+   , m_trtHelper(nullptr)
+   , m_pixHelper(nullptr)
    , m_outputAlignFile("OutputTRTAlignment.txt")
    , m_outputStrawAlignFile("OutputTRTStrawAlignment.txt")
    , m_oldAlignFile("OldTRTAlignment.txt")
@@ -58,7 +58,7 @@ TRTTrkAlignDBTool::TRTTrkAlignDBTool(const std::string & type, const std::string
    declareProperty("TRTGeometryManager",   m_trtGeoManager,     "Tool for handling the TRT alignment geometry");
    declareProperty("UpdateConstants",      m_updateConstants,   "Whether or no to update the alignment constants");
 
-   m_logStream = 0;
+   m_logStream = nullptr;
 }
 
 //________________________________________________________________________
diff --git a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetAlignModuleTool.cxx b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetAlignModuleTool.cxx
index 7ed094cbe211..2c2422afffd2 100644
--- a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetAlignModuleTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetAlignModuleTool.cxx
@@ -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
 */
 
 #include "InDetIdentifier/TRT_ID.h"
@@ -15,7 +15,7 @@ namespace InDet {
   //______________________________________________________________
   InDetAlignModuleTool::InDetAlignModuleTool(const std::string& type, const std::string& name, const IInterface* parent)
     : Trk::AlignModuleTool(type,name,parent)
-    , m_trtHelper(0)
+    , m_trtHelper(nullptr)
   {
     ATH_MSG_DEBUG("constructor of InDetAlignModuleTool");
   }
diff --git a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetGeometryManagerTool.cxx b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetGeometryManagerTool.cxx
index 963d88bdf9ac..06bbaf0e8bfe 100644
--- a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetGeometryManagerTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/InDetGeometryManagerTool.cxx
@@ -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
 */
 
 #include "AthContainers/DataVector.h"
@@ -35,9 +35,9 @@ namespace InDet {
                                      const std::string& name,
                                      const IInterface * parent)
     : AthAlgTool(type,name,parent)
-    , m_pixelDetManager(0)
-    , m_sctDetManager(0)
-    , m_trtDetManager(0)
+    , m_pixelDetManager(nullptr)
+    , m_sctDetManager(nullptr)
+    , m_trtDetManager(nullptr)
     , m_pixHelper()
     , m_sctHelper()
     , m_siHelper()
@@ -45,9 +45,9 @@ namespace InDet {
     , m_siGeoManager("")
     , m_trtGeoManager("")
     , m_alignModuleTool("Trk::AlignModuleTool/AlignModuleTool")
-    , m_idHashToAlignModuleMaps(Trk::AlignModule::NDetectorTypes,(Trk::AlignModuleList*)0)
-    , m_alignParList(0)
-    , m_fullAlignParList(0)
+    , m_idHashToAlignModuleMaps(Trk::AlignModule::NDetectorTypes,(Trk::AlignModuleList*)nullptr)
+    , m_alignParList(nullptr)
+    , m_fullAlignParList(nullptr)
   {
     declareInterface<IGeometryManagerTool>(this);
     declareProperty("AlignModuleTool",    m_alignModuleTool);
@@ -86,7 +86,7 @@ namespace InDet {
     m_alignLevelEndcaps = -1;
 
     m_hashCounter = 0;
-    m_logStream = 0;
+    m_logStream = nullptr;
   }
 
   //________________________________________________________________________
@@ -345,7 +345,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel: "<<pixelmaxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(pixelmaxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(pixelmaxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     // ==================================================================
@@ -393,7 +393,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT: "<<sctmaxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(sctmaxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(sctmaxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     // ================================================================
@@ -436,7 +436,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the TRT "<<trtmaxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)(trtmaxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)(trtmaxHash),nullptr);
     Trk::AlignModuleList * trtIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT);
 
     // ================================================================
diff --git a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/PixelGeometryManagerTool.cxx b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/PixelGeometryManagerTool.cxx
index 7d04636878c0..6e994c4dd6ab 100644
--- a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/PixelGeometryManagerTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/PixelGeometryManagerTool.cxx
@@ -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
 */
 
 #include "AthContainers/DataVector.h"
@@ -36,12 +36,12 @@ namespace InDet {
                                      const IInterface * parent)
     : AthAlgTool(type,name,parent)
     , m_etaCorrection{}
-    , m_detManager(0)
+    , m_detManager(nullptr)
     , m_idHelper()
     , m_alignModuleTool("Trk::AlignModuleTool/AlignModuleTool")
-    , m_idHashToAlignModuleMaps(Trk::AlignModule::NDetectorTypes,(Trk::AlignModuleList*)0)
-    , m_alignParList(0)
-    , m_fullAlignParList(0)
+    , m_idHashToAlignModuleMaps(Trk::AlignModule::NDetectorTypes,(Trk::AlignModuleList*)nullptr)
+    , m_alignParList(nullptr)
+    , m_fullAlignParList(nullptr)
     , m_rdbAccessSvc("RDBAccessSvc",name)
     , m_geoModelSvc("GeoModelSvc",name)
   {
@@ -109,7 +109,7 @@ namespace InDet {
     declareProperty("DumpGeometry",       m_dumpGeometry = true);
 
     m_hashCounter = 0;
-    m_logStream = 0;
+    m_logStream = nullptr;
     
   }
 
@@ -406,7 +406,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<pixelmaxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(pixelmaxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(pixelmaxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     // use the 'real' identifier of the Pixel
@@ -487,7 +487,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
     
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
          
     // create two AlignModules: IBL and rest of pixel
@@ -522,7 +522,7 @@ namespace InDet {
       }
       
       // check what we're filling
-      Trk::AlignModule * mod = 0;
+      Trk::AlignModule * mod = nullptr;
       if( m_idHelper->is_barrel(id) && m_idHelper->is_blayer(id) && m_idHelper->layer_disk(id)==0) {
         ATH_MSG_DEBUG("pixel element "<<id<<" at index "<<index<<" is in IBL-layer");
         mod = ibl;
@@ -587,7 +587,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     // create two AlignModules: top half and bottom half
@@ -664,7 +664,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     // create two AlignModules: top half and bottom half
@@ -695,7 +695,7 @@ namespace InDet {
         ATH_MSG_DEBUG("iPhi "<<iPhi);
 
         // check which half we're filling
-        Trk::AlignModule * mod = 0;
+        Trk::AlignModule * mod = nullptr;
         if(isTopHalf(iPhi,iLayer)) {
           ATH_MSG_DEBUG("iPhi "<<iPhi<<" is in top half of layer "<<iLayer);
           mod = top;
@@ -753,7 +753,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     for (int iEndcapIndex = 0; iEndcapIndex < m_detManager->numerology().numEndcaps(); iEndcapIndex++) {
@@ -835,7 +835,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
          
@@ -978,7 +978,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     for (int iLayer = 0; iLayer < m_detManager->numerology().numLayers(); iLayer++) {
@@ -1053,7 +1053,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     for (int iLayer = 0; iLayer < m_detManager->numerology().numLayers(); iLayer++) {
@@ -1093,7 +1093,7 @@ namespace InDet {
         ATH_MSG_DEBUG("iPhi "<<iPhi);
 
         // check which half we're filling
-        Trk::AlignModule * mod = 0;
+        Trk::AlignModule * mod = nullptr;
         if(isTopHalf(iPhi,iLayer)) {
           ATH_MSG_DEBUG("iPhi "<<iPhi<<" is in top half of layer "<<iLayer);
           mod = top;
@@ -1158,7 +1158,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     for (int iLayer = 0; iLayer < m_detManager->numerology().numLayers(); iLayer++) {
@@ -1289,7 +1289,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     for (int iLayer = 0; iLayer < m_detManager->numerology().numLayers(); iLayer++) {
@@ -1375,7 +1375,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     for (int iEndcapIndex = 0; iEndcapIndex < m_detManager->numerology().numEndcaps(); iEndcapIndex++) {
@@ -1451,7 +1451,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     for (int iLayer = 0; iLayer < m_detManager->numerology().numLayers(); iLayer++) {
@@ -1539,7 +1539,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     for (int iEndcapIndex = 0; iEndcapIndex < m_detManager->numerology().numEndcaps(); iEndcapIndex++) {
@@ -1624,7 +1624,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
  
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-    m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+    m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
     
     // create two AlignModules:
@@ -1659,7 +1659,7 @@ namespace InDet {
 //      ATH_MSG_DEBUG("DBM sector (phi module) "<< m_idHelper->phi_module(id));
       
       // check what we're filling
-      Trk::AlignModule * mod = 0;
+      Trk::AlignModule * mod = nullptr;
       if( m_idHelper->is_dbm(id) && m_idHelper->barrel_ec(id)==-4) {
         ATH_MSG_DEBUG("pixel element "<<id<<" at index "<<index<<" is in ECDBM");
         mod = dbm1;
@@ -1731,7 +1731,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
     
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-    m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+    m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
     
     std::vector<Trk::AlignModule*> mod_list;
@@ -1771,7 +1771,7 @@ namespace InDet {
       
       // check what we're filling
       unsigned int telescope = -1; // set to non existing telescope
-      Trk::AlignModule * mod = 0;
+      Trk::AlignModule * mod = nullptr;
       if( m_idHelper->is_dbm(id) && m_idHelper->barrel_ec(id)==-4) {
         ATH_MSG_DEBUG("pixel element "<<id<<" at index "<<index<<" with sector "<<m_idHelper->phi_module(id)<<" is in ECDBM");
         telescope = int(m_idHelper->phi_module(id));
@@ -1829,7 +1829,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel "<<maxHash);
     
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
     
     // ==================================================================
@@ -2124,8 +2124,8 @@ namespace InDet {
     ATH_MSG_INFO("Decode geometry version key");
     DecodeVersionKey versionKey(&*m_geoModelSvc, "Pixel");
     
-    std::string detectorKey  = versionKey.tag();
-    std::string detectorNode = versionKey.node();
+    const std::string& detectorKey  = versionKey.tag();
+    const std::string& detectorNode = versionKey.node();
 
     ATH_MSG_INFO("--------------------- decode version key " << detectorKey<<"  "<<detectorNode);
 
diff --git a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/SCTGeometryManagerTool.cxx b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/SCTGeometryManagerTool.cxx
index eeefee11dfee..f2cca50b40d9 100644
--- a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/SCTGeometryManagerTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/SCTGeometryManagerTool.cxx
@@ -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
 */
 
 #include "AthContainers/DataVector.h"
@@ -31,12 +31,12 @@ namespace InDet {
                                      const std::string& name,
                                      const IInterface * parent)
     : AthAlgTool(type,name,parent)
-    , m_detManager(0)
+    , m_detManager(nullptr)
     , m_idHelper()
     , m_alignModuleTool("Trk::AlignModuleTool/AlignModuleTool")
-    , m_idHashToAlignModuleMaps(Trk::AlignModule::NDetectorTypes,(Trk::AlignModuleList*)0)
-    , m_alignParList(0)
-    , m_fullAlignParList(0)
+    , m_idHashToAlignModuleMaps(Trk::AlignModule::NDetectorTypes,(Trk::AlignModuleList*)nullptr)
+    , m_alignParList(nullptr)
+    , m_fullAlignParList(nullptr)
   {
     declareInterface<IGeometryManagerTool>(this);
     declareProperty("AlignModuleTool",    m_alignModuleTool);
@@ -99,7 +99,7 @@ namespace InDet {
     declareProperty("DumpGeometry",       m_dumpGeometry = true);
 
     m_hashCounter = 0;
-    m_logStream = 0;
+    m_logStream = nullptr;
   }
 
   //________________________________________________________________________
@@ -358,7 +358,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT: "<<sctmaxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(sctmaxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(sctmaxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     // ================================================================
@@ -416,7 +416,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     // use the 'real' identifier of the Pixel
@@ -493,7 +493,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     for (int iEndcapIndex = 0; iEndcapIndex < m_detManager->numerology().numEndcaps(); iEndcapIndex++) {
@@ -575,7 +575,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     for (int iLayer = 0; iLayer < m_detManager->numerology().numLayers(); iLayer++) {
@@ -652,7 +652,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     for (int iLayer = 0; iLayer < m_detManager->numerology().numLayers(); iLayer++) {
@@ -750,7 +750,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     for (int iEndcapIndex = 0; iEndcapIndex < m_detManager->numerology().numEndcaps(); iEndcapIndex++) {
@@ -834,7 +834,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     for (int iEndcapIndex = 0; iEndcapIndex < m_detManager->numerology().numEndcaps(); iEndcapIndex++) {
@@ -910,7 +910,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     // first endcaap C
@@ -1091,7 +1091,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     for (int iLayer = 0; iLayer < m_detManager->numerology().numLayers(); iLayer++) {
@@ -1176,7 +1176,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT "<<maxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(maxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     for (int iEndcapIndex = 0; iEndcapIndex < m_detManager->numerology().numEndcaps(); iEndcapIndex++) {
diff --git a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/SiGeometryManagerTool.cxx b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/SiGeometryManagerTool.cxx
index 9feb9f4fe4ac..0869c5456b88 100644
--- a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/SiGeometryManagerTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/SiGeometryManagerTool.cxx
@@ -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
 */
 
 #include "AthContainers/DataVector.h"
@@ -31,17 +31,17 @@ namespace InDet {
                                      const std::string& name,
                                      const IInterface * parent)
     : AthAlgTool(type,name,parent)
-    , m_pixelDetManager(0)
-    , m_sctDetManager(0)
+    , m_pixelDetManager(nullptr)
+    , m_sctDetManager(nullptr)
     , m_pixHelper()
     , m_sctHelper()
     , m_idHelper()
     , m_pixelGeoManager("")
     , m_sctGeoManager("")
     , m_alignModuleTool("Trk::AlignModuleTool/AlignModuleTool")
-    , m_idHashToAlignModuleMaps(Trk::AlignModule::NDetectorTypes,(Trk::AlignModuleList*)0)
-    , m_alignParList(0)
-    , m_fullAlignParList(0)
+    , m_idHashToAlignModuleMaps(Trk::AlignModule::NDetectorTypes,(Trk::AlignModuleList*)nullptr)
+    , m_alignParList(nullptr)
+    , m_fullAlignParList(nullptr)
   {
     declareInterface<IGeometryManagerTool>(this);
     declareProperty("AlignModuleTool",      m_alignModuleTool);
@@ -77,7 +77,7 @@ namespace InDet {
     declareProperty("ActualGeometry",     m_actualGeom = false);
 
     m_hashCounter = 0;
-    m_logStream = 0;
+    m_logStream = nullptr;
   }
 
   //________________________________________________________________________
@@ -329,7 +329,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the Pixel: "<<pixelmaxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(pixelmaxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(pixelmaxHash),nullptr);
     Trk::AlignModuleList * pixelIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel);
 
     // ==================================================================
@@ -377,7 +377,7 @@ namespace InDet {
     ATH_MSG_DEBUG("maxHash for the SCT: "<<sctmaxHash);
 
     if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(sctmaxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(sctmaxHash),nullptr);
     Trk::AlignModuleList * sctIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT);
 
     // ================================================================
@@ -609,7 +609,7 @@ namespace InDet {
 
       // Loop over all detector elements of this align module:
       for(unsigned int j=0;j<nSi;j++) {
-        const SiDetectorElement * element=0;
+        const SiDetectorElement * element=nullptr;
         if(isPix) element = dynamic_cast<const SiDetectorElement*>(module->detElementCollection(Trk::AlignModule::Pixel)->at(j)); 
 	if(isSCT) element = dynamic_cast<const SiDetectorElement*>(module->detElementCollection(Trk::AlignModule::SCT)->at(j)); 
 	if (not element){
@@ -687,7 +687,7 @@ namespace InDet {
           ro[Si_count]->SetAngles(57.2957*ea[0],57.2957*ea[1],57.2957*ea[2]);
           mx[Si_count] = new TGeoCombiTrans(*tr[Si_count],*ro[Si_count]);
 
-	  TGeoVolume*   parrent_elem = 0; 
+	  TGeoVolume*   parrent_elem = nullptr; 
 	  switch(det)
 	    {
 	    case 1:
diff --git a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/TRTGeometryManagerTool.cxx b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/TRTGeometryManagerTool.cxx
index fe5cfeef4bec..07be72f5cfc4 100644
--- a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/TRTGeometryManagerTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/TRTGeometryManagerTool.cxx
@@ -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
 */
 
 #include "AthContainers/DataVector.h"
@@ -31,12 +31,12 @@ TRTGeometryManagerTool::TRTGeometryManagerTool(const std::string& type,
       const std::string& name,
       const IInterface * parent)
   : AthAlgTool(type,name,parent)
-      , m_trtDetManager(0)
+      , m_trtDetManager(nullptr)
       , m_idHelper()
       , m_alignModuleTool("Trk::AlignModuleTool/AlignModuleTool")
-      , m_idHashToAlignModuleMaps(Trk::AlignModule::NDetectorTypes,(Trk::AlignModuleList*)0)
-      , m_alignParList(0)
-      , m_fullAlignParList(0)
+      , m_idHashToAlignModuleMaps(Trk::AlignModule::NDetectorTypes,(Trk::AlignModuleList*)nullptr)
+      , m_alignParList(nullptr)
+      , m_fullAlignParList(nullptr)
 {
    declareInterface<IGeometryManagerTool>(this);
    declareProperty("AlignModuleTool",    m_alignModuleTool);
@@ -102,7 +102,7 @@ TRTGeometryManagerTool::TRTGeometryManagerTool(const std::string& type,
    declareProperty("DumpGeometry",       m_dumpGeometry = true);
 
    m_hashCounter = 0;
-   m_logStream = 0;
+   m_logStream = nullptr;
 }
 
 //________________________________________________________________________
@@ -363,7 +363,7 @@ void TRTGeometryManagerTool::buildL0()
    ATH_MSG_DEBUG("maxHash for the TRT "<<trtmaxHash);
 
    if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)(trtmaxHash),0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)(trtmaxHash),nullptr);
    Trk::AlignModuleList * trtIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT);
 
    // ================================================================
@@ -432,7 +432,7 @@ void TRTGeometryManagerTool::buildL1Barrel()
    ATH_MSG_DEBUG("maxHash for the TRT "<<maxHash);
 
    if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,nullptr);
    Trk::AlignModuleList * trtIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT);
 
    // for L1 alignment the alignment frame is equal to the global frame
@@ -507,7 +507,7 @@ void TRTGeometryManagerTool::buildL1Endcaps()
    ATH_MSG_DEBUG("maxHash for the TRT "<<maxHash);
 
    if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,nullptr);
    Trk::AlignModuleList * trtIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT);
 
    // for L1 alignment the alignment frame is equal to the global frame
@@ -598,7 +598,7 @@ void TRTGeometryManagerTool::buildL2Barrel()
    ATH_MSG_DEBUG("maxHash for the TRT "<<maxHash);
 
    if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,nullptr);
    Trk::AlignModuleList * trtIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT);
 
    // for the alignment frame we would like to use something like
@@ -748,7 +748,7 @@ void TRTGeometryManagerTool::buildL2Endcaps()
    ATH_MSG_DEBUG("maxHash for the TRT "<<maxHash);
 
    if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,nullptr);
    Trk::AlignModuleList * trtIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT);
 
    for (int iSide = 0; iSide < 2; iSide++) {
@@ -760,7 +760,7 @@ void TRTGeometryManagerTool::buildL2Endcaps()
       }
 
       int iRing(-1);
-      Trk::AlignModule * mod = 0;
+      Trk::AlignModule * mod = nullptr;
       for (unsigned int iWheel = 0; iWheel < m_trtDetManager->getNumerology()->getNEndcapWheels(); iWheel++) {
          ATH_MSG_DEBUG("Wheel : "<<iWheel);
          for (unsigned int iStrawLayer = 0; iStrawLayer < m_trtDetManager->getNumerology()->getNEndcapLayers(iWheel); iStrawLayer++) {
@@ -884,7 +884,7 @@ void TRTGeometryManagerTool::buildL2EndcapsOLD()
    ATH_MSG_DEBUG("maxHash for the TRT "<<maxHash);
 
    if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,nullptr);
    Trk::AlignModuleList * trtIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT);
 
    for (int iSide = 0; iSide < 2; iSide++) {
@@ -973,7 +973,7 @@ void TRTGeometryManagerTool::buildL3Barrel()
    ATH_MSG_DEBUG("maxHash for the TRT "<<maxHash);
 
    if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT))
-      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,0);
+      m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,nullptr);
    Trk::AlignModuleList * trtIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT);
 
    for (unsigned int iPhiModule = 0; iPhiModule < m_trtDetManager->getNumerology()->getNBarrelPhi(); iPhiModule++) { // modules in phi
@@ -1079,7 +1079,7 @@ void TRTGeometryManagerTool::buildL3Endcap()
    ATH_MSG_DEBUG("maxHash for the TRT "<<maxHash);
 
    if(!m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT))
-     m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,0);
+     m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)maxHash,nullptr);
    Trk::AlignModuleList * trtIdHashMap = m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT);
 
 
diff --git a/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/DetailedIDNtupleTool.cxx b/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/DetailedIDNtupleTool.cxx
index d95cd45abf70..09faf59fcbfb 100644
--- a/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/DetailedIDNtupleTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/DetailedIDNtupleTool.cxx
@@ -384,7 +384,7 @@ namespace InDet {
     const Trk::Perigee* startPerigee = alignTrack->perigeeParameters();
     const Trk::Perigee* measPer = startPerigee;
 
-    if (measPer == 0) {
+    if (measPer == nullptr) {
       ATH_MSG_DEBUG("No measured perigee parameters assigned to the track");
       return false;
     }
@@ -398,7 +398,7 @@ namespace InDet {
       TrackTruthCollection::const_iterator found = TruthMap->find(tracklink2);
       if ((found != TruthMap->end()) && (found->second.probability() > m_matchProbability)) {
         TrackTruth trtruth = found->second;
-        HepMcParticleLink HMPL = trtruth.particleLink();
+        const HepMcParticleLink& HMPL = trtruth.particleLink();
 
         if (HMPL.isValid()) {
 #ifdef HEPMC3
@@ -429,7 +429,7 @@ namespace InDet {
                   m_truth_prod_z = genparptr->production_vertex()->position().z();
 
                   delete  generatedTrackPerigee;
-                  m_truth_pt = 1. / std::fabs(m_truth_qoverpt);
+                  m_truth_pt = 1. / std::abs(m_truth_qoverpt);
                   m_truth_charge = 1;
                   if (m_truth_qoverpt < 0) m_truth_charge = -1;
                   if (m_truth_phi0 < 0) m_truth_phi0 += 2 * M_PI;
diff --git a/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx b/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx
index 803d454f5613..ac785d79b25d 100644
--- a/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.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 "TrkEventPrimitives/FitQuality.h"
@@ -442,7 +442,7 @@ namespace InDet {
       }
 
       // get local track parameters
-      const Trk::TrackParameters* trackPars = 0;
+      const Trk::TrackParameters* trackPars = nullptr;
       if (atsos->firstResidual()->residualType() == Trk::HitOnly) trackPars = atsos->trackParameters();
       else trackPars = atsos->unbiasedTrackPars();
 
@@ -455,7 +455,7 @@ namespace InDet {
         m_hit_eta[nhits] = 0.;
       } else {
         m_hit_cotth[nhits] = 1. / std::tan(pos.theta());
-        double etaval = -std::log(std::tan(std::atan(1. / std::fabs(m_hit_cotth[nhits])) / 2.));
+        double etaval = -std::log(std::tan(std::atan(1. / std::abs(m_hit_cotth[nhits])) / 2.));
         if (m_hit_cotth[nhits] < 0.) etaval *= -1.;
         m_hit_eta[nhits] = etaval;
       }
diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/BeamSpotPdf.cxx b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/BeamSpotPdf.cxx
index 60921d8c2424..92eadad0933a 100644
--- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/BeamSpotPdf.cxx
+++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/BeamSpotPdf.cxx
@@ -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
 */
 
 /***************************************************************************** 
@@ -13,10 +13,10 @@
 #include <Riostream.h> 
 
 #include "BeamSpotPdf.h" 
-#include <RooAbsReal.h> 
 #include <RooAbsCategory.h> 
-#include <math.h> 
+#include <RooAbsReal.h> 
 #include <TMath.h> 
+#include <cmath> 
 
 
 
diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.cxx b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.cxx
index 39937e185810..1fce6cfd73d9 100644
--- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.cxx
+++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetBeamSpotFinder.h"
@@ -255,7 +255,7 @@ StatusCode InDet::InDetBeamSpotFinder::performFits(){
     }
 
     for( unsigned int j = 0; j < m_beamSpotToolList.size(); j++){
-      IInDetBeamSpotTool * bs(0);
+      IInDetBeamSpotTool * bs(nullptr);
       bs = cloneTool(j);
       if(!bs){ return StatusCode::FAILURE; }
       if(not verticesToFit.empty()) { bsFitStatus = bs->fit(verticesToFit); }
diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotVertex.cxx b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotVertex.cxx
index c87bff1107f1..baa373ae140c 100644
--- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotVertex.cxx
+++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotVertex.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 "InDetBeamSpotVertex.h"
@@ -31,7 +31,7 @@ public:
   SortDistToMedian(double median): m_median(median) {}
 
   bool operator()(double a , double b) const {
-    return fabs(a - m_median) < fabs(b -m_median);
+    return std::abs(a - m_median) < std::abs(b -m_median);
   }
 };
 
@@ -594,13 +594,13 @@ bool InDetBeamSpotVertex::applyOutlierRemoval() {
   if (count) {
     meanx /= count;
     meanxSqr /=count;
-    rmsX = std::sqrt( std::fabs(meanxSqr - meanx*meanx));
+    rmsX = std::sqrt( std::abs(meanxSqr - meanx*meanx));
     meany /= count;
     meanySqr /=count;
-    rmsY = std::sqrt( std::fabs(meanySqr - meany*meany));
+    rmsY = std::sqrt( std::abs(meanySqr - meany*meany));
     meanz  /=count;
     meanzSqr /=count;
-    rmsZ = std::sqrt( std::fabs(meanzSqr - meanz*meanz));
+    rmsZ = std::sqrt( std::abs(meanzSqr - meanz*meanz));
   }
 
   if(m_setInitialRMS){
@@ -632,9 +632,9 @@ bool InDetBeamSpotVertex::applyOutlierRemoval() {
     if (!it->valid) continue;
     int fail=0;
     
-    if ( fabs( medianx - it->x ) > m_sigTr *rmsX) fail += 4;
-    if ( fabs( mediany - it->y ) > m_sigTr *rmsY) fail += 8;
-    if ( fabs( medianz - it->z ) > 10*rmsZ) fail += 16;
+    if ( std::abs( medianx - it->x ) > m_sigTr *rmsX) fail += 4;
+    if ( std::abs( mediany - it->y ) > m_sigTr *rmsY) fail += 8;
+    if ( std::abs( medianz - it->z ) > 10*rmsZ) fail += 16;
     
     
     if (  (medianx - it->x)*(medianx-it->x)/rmsX/rmsX + (mediany-it->y)*(mediany-it->y)/rmsY/rmsY > m_sigTr*m_sigTr) {
@@ -742,7 +742,7 @@ bool InDetBeamSpotVertex::applyOutlierRemoval() {
   
   
   
-  if ( llSolve == false || getSigmaX(0.) < m_widthFail || getSigmaY(0.) < m_widthFail || fabs(getRhoXY()) > m_rhoFail ) {
+  if ( llSolve == false || getSigmaX(0.) < m_widthFail || getSigmaY(0.) < m_widthFail || std::abs(getRhoXY()) > m_rhoFail ) {
     // ll solution not used, or not trusted
     // set a wide solution
     m_getLLres = false;
@@ -781,12 +781,12 @@ bool InDetBeamSpotVertex::applyOutlierRemoval() {
     fail = 0; // reset the fail value variable
     
     // selections
-    if ( std::fabs(it->x - (xbar + it->z*ax))  > m_sigTr * rmsX) fail += 1;
-    if ( std::fabs(it->y - (ybar + it->z*ay))  > m_sigTr * rmsY) fail += 2;
+    if ( std::abs(it->x - (xbar + it->z*ax))  > m_sigTr * rmsX) fail += 1;
+    if ( std::abs(it->y - (ybar + it->z*ay))  > m_sigTr * rmsY) fail += 2;
     
     if ( it->vxx >  m_maxVtxErTr*m_maxVtxErTr || it->vyy >  m_maxVtxErTr*m_maxVtxErTr) fail += 4;
 
-    if (  std::fabs(it->z - meanz)  > m_sigTr * rmsZ) fail += 8;
+    if (  std::abs(it->z - meanz)  > m_sigTr * rmsZ) fail += 8;
 
     // add all other selections above here:
     double increaseChi2(0);
@@ -983,23 +983,23 @@ bool InDetBeamSpotVertex::successfulFit( TMinuit * minuit,
   if ( m_doFitSanityCheck) {
     double x(0), ex(0);
     minuit->GetParameter(6,x,ex); // rhoxy
-    if ( std::fabs(x) > m_rhoFail){
+    if ( std::abs(x) > m_rhoFail){
       sanityPassed = false;
       ATH_MSG_DEBUG( "Fit Failed with rhoxy: " << x << " > " << m_rhoFail );
     }
     minuit->GetParameter(4,x,ex); // sigma x
-    if ( std::fabs(x) < m_widthFail ){
+    if ( std::abs(x) < m_widthFail ){
       sanityPassed = false;
       ATH_MSG_DEBUG( "Fit Failed with sigmaX:" << x << " > " << m_widthFail );
     }
     minuit->GetParameter(5,x,ex); // sigma y
-    if ( std::fabs(x) < m_widthFail ){
+    if ( std::abs(x) < m_widthFail ){
       sanityPassed = false;
       ATH_MSG_DEBUG( "Fit Failed with sigmaY: " << x << " > " <<m_widthFail  );
     }
     
     minuit->GetParameter(7,x,ex); // k
-    if ( std::fabs(x) < m_kMinFail || std::fabs(x) > m_kMaxFail ){
+    if ( std::abs(x) < m_kMinFail || std::abs(x) > m_kMaxFail ){
       sanityPassed = false;
       ATH_MSG_DEBUG( "Fit Failed with k: " << x << " > " << m_kMaxFail 
                  << ", or " << x << " < " << m_kMinFail  );
@@ -1029,7 +1029,7 @@ void BeamSpot::myFCN_LLsolver( Int_t &, Double_t *, Double_t &f, Double_t *par,
   
   f = 0;
   
-  typedef  std::vector<  BeamSpot::VrtHolder >  Vertices;
+  using Vertices = std::vector<BeamSpot::VrtHolder>;
   Vertices::const_iterator vit = BeamSpot::vertexData->begin();
   
   double temp =0;
@@ -1059,7 +1059,7 @@ void BeamSpot::myFCN_LLsolver( Int_t &, Double_t *, Double_t &f, Double_t *par,
     det = covXX * covYY - covXY*covXY;
     double recDet = 1./det;
 
-    //temp =  TMath::Log(2*Pi * sqrt(fabs(det)));
+    //temp =  TMath::Log(2*Pi * sqrt(std::abs(det)));
     temp  =  2*TMath::Log(2*Pi);
     temp  += TMath::Log(det);
     
diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/RefitTracksAndVertex.cxx b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/RefitTracksAndVertex.cxx
index 03fbb1a01a1b..33ed7ce1e21e 100644
--- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/RefitTracksAndVertex.cxx
+++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/RefitTracksAndVertex.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // @file RefitTracksAndVertex.cxx
@@ -127,7 +127,7 @@ StatusCode RefitTracksAndVertex::execute() {
   //---------------------------
   // Primary Vertex
   //---------------------------
-  const xAOD::VertexContainer* vertices = 0;
+  const xAOD::VertexContainer* vertices = nullptr;
   if ( !evtStore()->retrieve( vertices, m_vertexListInput ).isSuccess() ){ // retrieve arguments: container type, container key
     ATH_MSG_WARNING("execute() Failed to retrieve Reconstructed vertex container. " << m_vertexListInput );
     //ATH_MSG_ERROR(evtStore()->dump());
@@ -146,7 +146,7 @@ StatusCode RefitTracksAndVertex::execute() {
   CHECK( evtStore()->record(theVertexContainer,  m_outputVertexContainerName) );
   CHECK( evtStore()->record(theVertexAuxContainer, m_outputVertexContainerName + "Aux.") );
 
-  const xAOD::Vertex* primaryVertex = 0;  
+  const xAOD::Vertex* primaryVertex = nullptr;  
   for( const xAOD::Vertex* vertex: *vertices ) {
     if( vertex->vertexType() == xAOD::VxType::PriVtx ) {
       primaryVertex = vertex;
@@ -216,7 +216,7 @@ const Trk::PseudoMeasurementOnTrack* RefitTracksAndVertex::createPMfromSi ( cons
   std::vector<Trk::DefinedParameter> defPar ;
   defPar.push_back( z0    ) ;
   defPar.push_back( theta ) ;
-  if( !mp->covariance() )  return 0;
+  if( !mp->covariance() )  return nullptr;
   Trk::LocalParameters  parFromSi( defPar ) ;
   AmgSymMatrix(2) covFromSi;
   
@@ -251,14 +251,14 @@ Trk::Track* RefitTracksAndVertex::fitSCTOnlyTrack(const Trk::Track* track) {
   const Trk::Perigee* perTrk = track->perigeeParameters();
   if( !perTrk ) {
     ATH_MSG_WARNING("RefitTracksAndVertex() : No Perigee parameter on track!");
-    return NULL ;
+    return nullptr ;
   }
  
   if( perTrk->eta() < m_selEtaMin || perTrk->eta() > m_selEtaMax)
-    return NULL ;
+    return nullptr ;
 
   if( perTrk->pT() < m_selPtMin)
-    return NULL ;
+    return nullptr ;
     
   
   //store all silicon measurements into the measurementset
@@ -270,7 +270,7 @@ Trk::Track* RefitTracksAndVertex::fitSCTOnlyTrack(const Trk::Track* track) {
       //    << "  member! Skip it.." << endmsg;
     } else {
       const Trk::RIO_OnTrack* rio = dynamic_cast <const Trk::RIO_OnTrack*>(*it);
-      if (rio != 0) {
+      if (rio != nullptr) {
         const Identifier& surfaceID = (rio->identify()) ;
         if( m_idHelper->is_sct(surfaceID) ) {
           setSCT.push_back ( *it ) ;
@@ -284,7 +284,7 @@ Trk::Track* RefitTracksAndVertex::fitSCTOnlyTrack(const Trk::Track* track) {
   }
   
   if( (int)setSCT.size() <  m_selNHitSCTMin ) 
-    return NULL; 
+    return nullptr; 
 
   ATH_MSG_DEBUG("RefitTracksAndVertex() : Found " << setSCT.size()  << " SCT measurm's!" ) ;
   ATH_MSG_DEBUG("RefitTracksAndVertex() : Found " << setPix.size()  << " Pix measurm's!" ) ;
@@ -301,7 +301,7 @@ Trk::Track* RefitTracksAndVertex::fitSCTOnlyTrack(const Trk::Track* track) {
     const Trk::PseudoMeasurementOnTrack *pmFromSi = createPMfromSi( perTrk ) ;
     if( !pmFromSi ) {
       ATH_MSG_ERROR("RefitTracksAndVertex() : PseudoMeasurementOnTrack creation failed! " );
-      return NULL ;
+      return nullptr ;
     }
     ATH_MSG_DEBUG( "RefitTracksAndVertex() : pmFromSi " << *pmFromSi) ;
     Trk::MeasurementSet setSCT = addPM( setSCT, pmFromSi ) ;
@@ -330,7 +330,7 @@ Trk::Track* RefitTracksAndVertex::fitSCTOnlyTrack(const Trk::Track* track) {
                                        )).release() ;
   if( !trkSCT ) {
     ATH_MSG_DEBUG( "RefitTracksAndVertex() : Fit of SCT part of the track failed! " ) ;
-    return NULL ;
+    return nullptr ;
   }
   const Trk::Perigee* perSCT = trkSCT->perigeeParameters();
   ATH_MSG_VERBOSE( "RefitTracksAndVertex() : perSCT " << *perSCT) ;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelNtupleTracks.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelNtupleTracks.h
index f4d6d0a26af5..0f639ccd8cce 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelNtupleTracks.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelNtupleTracks.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 //////////////////////////////////////////////////////////
@@ -16,6 +16,7 @@
 #include <string>
 #include <cmath>
 #include <fstream>
+#include <iostream>
 #include <TROOT.h>
 #include <TChain.h>
 
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h
index 76931d0ad310..554aba045845 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h
@@ -1,7 +1,7 @@
 /** -*- c++ -*- */
 
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 /*
@@ -74,7 +74,7 @@ class SCTCalibWriteTool : public AthAlgTool {
       addDefect(const std::string& defectlist,const int defectBeginChannel,const int defectEndChannel) const;
 
       std::string
-      addNumber(const std::string numStr,const unsigned long long number) const;
+      addNumber(const std::string& numStr,const unsigned long long number) const;
 
       std::string
       createDefectString(const int defectBeginChannel,const int defectEndChannel) const;
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
index af4827cbe59f..27d19d1c7690 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -534,7 +534,7 @@ StatusCode SCTCalib::getNoisyStrip ATLAS_NOT_THREAD_SAFE () { // Thread unsafe w
 
    //--- Choice of threshold
    //three module lists: all, new, ref
-   typedef std::map< Identifier, std::set<Identifier> > ModuleList_t;
+   using ModuleList_t = std::map<Identifier, std::set<Identifier>>;
    ModuleList_t moduleLists[N_CATEGORIES];
    //Reading data from COOL
    // original code switched on this :if (m_noisyUpdate)
@@ -545,7 +545,7 @@ StatusCode SCTCalib::getNoisyStrip ATLAS_NOT_THREAD_SAFE () { // Thread unsafe w
    }
 
    //two bad strip lists: all, new
-   typedef std::set<Identifier> StripList_t;
+   using StripList_t = std::set<Identifier>;
    StripList_t stripIdLists[2];
 
    //--- Loop over wafers
@@ -1812,7 +1812,7 @@ StatusCode SCTCalib::getBSErrors ATLAS_NOT_THREAD_SAFE () { // Thread unsafe SCT
    unsigned long long nErrs_ECC_module[n_disks][2][n_etaBinsEC][n_phiBinsECOuter][15] = {{{{{0}}}}};
 
    //--- ErrorList
-   typedef std::map<int, std::string> IntStringMap;
+   using IntStringMap = std::map<int, std::string>;
    IntStringMap ErrMap_C, ErrMap;
    const int numberOfErrorTypes{12};
    std::array<std::string, numberOfErrorTypes> errorNames = {{
@@ -2390,8 +2390,8 @@ StatusCode SCTCalib::getLorentzAngle ATLAS_NOT_THREAD_SAFE () { // Thread unsafe
    }
 
    std::ofstream& file{m_outLASummary};
-   typedef std::pair<std::string, std::string> TwoStrings;
-   typedef std::map<std::string, TwoStrings > Names;
+   using TwoStrings = std::pair<std::string, std::string>;
+   using Names = std::map<std::string, TwoStrings>;
    Names nameAssociation;
    nameAssociation["LorentzAngle"]=TwoStrings(m_LorentzAngleSummaryFile, "LorentzAngleInfo.xsl");
    Names::iterator found{nameAssociation.find("LorentzAngle")};
@@ -2543,8 +2543,8 @@ StatusCode SCTCalib::openXML4DeadSummary(std::ofstream& file, const char* type,
 
 
 StatusCode SCTCalib::openXML4MonSummary(std::ofstream& file, const char* type) const {
-   typedef std::pair<std::string, std::string> TwoStrings;
-   typedef std::map<std::string, TwoStrings> Names;
+   using TwoStrings = std::pair<std::string, std::string>;
+   using Names = std::map<std::string, TwoStrings>;
    Names nameAssociation;
    nameAssociation["NoiseOccupancy"] = TwoStrings(m_noiseOccupancySummaryFile, "NoiseOccupancyInfo.xsl");
    nameAssociation["RawOccupancy"] = TwoStrings(m_rawOccupancySummaryFile, "RawOccupancyInfo.xsl");
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx
index 166b723a2aac..14bae6504ad5 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -212,7 +212,7 @@ SCTCalibWriteTool::createDefectString(const int defectBeginChannel, const int de
 ///////////////////////////////////////////////////////////////////////////////////////
 
 std::string
-SCTCalibWriteTool::addNumber(const string numStr, const unsigned long long number) const {
+SCTCalibWriteTool::addNumber(const string& numStr, const unsigned long long number) const {
    std::ostringstream num_string;
    // if it is empty then use createDefectString to make first entry.
    if (numStr.empty()) {
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.cxx
index 194339a69863..b95c2fba9d45 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -221,7 +221,7 @@ SCT_CalibLbTool::fillFromData() {
    m_numberOfEventsHisto->Fill(m_lumiBlock);
    bool result{true};
    //--- Retrieve the RDO container
-   typedef SCT_RDORawData SCTRawDataType;
+   using SCTRawDataType = SCT_RDORawData;
    SG::ReadHandle<SCT_RDO_Container> p_rdoContainer{m_rdoContainerKey};
    if (not p_rdoContainer.isValid()) {
       ATH_MSG_ERROR("Failed to retrieve SCT RDO container");
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.cxx
index c7d265112518..9067fc1e594c 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 /*
  *  XmlStreamer.cpp
@@ -11,8 +11,8 @@
 
 #include "XmlStreamer.h"
 
-typedef std::map<std::string, std::string> Attributes_t;
-typedef std::vector<std::string> NameValue_t;
+using Attributes_t = std::map<std::string, std::string>;
+using NameValue_t = std::vector<std::string>;
 static const Attributes_t empty;
 
 namespace SCT_CalibAlgs {
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.cxx b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.cxx
index 42838f6c098c..aa93b55f51b2 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.cxx
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.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
 */
 
 /* *******************************************************************
@@ -193,7 +193,7 @@ StatusCode TRTCalibrationMgr::execute() {
 
 			for (t=trks->begin();t!=trks->end();++t) {
 
-				if ( m_trackSelector->decision(*(*t), 0)) {
+				if ( m_trackSelector->decision(*(*t), nullptr)) {
 
 					m_ntrk++;
 					aTrack=*t;
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRT_StrawStatus.cxx b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRT_StrawStatus.cxx
index 561c1d10cf33..06226be55c23 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRT_StrawStatus.cxx
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRT_StrawStatus.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -46,8 +46,8 @@ InDet::TRT_StrawStatus::TRT_StrawStatus(const std::string& name, ISvcLocator* pS
 :
 AthAlgorithm(name,pSvcLocator),
 m_nEvents(0), m_runNumber(0),
-m_accumulateHits(0),
-m_TRTHelper(0),
+m_accumulateHits(nullptr),
+m_TRTHelper(nullptr),
 m_mapSvc("TRT_HWMappingSvc",name),
 m_DCSSvc("TRT_DCS_ConditionsSvc",name),
 m_TRTStrawNeighbourSvc("TRT_StrawNeighbourSvc", name), // use this service to retrieve barrel and end-cap straw number later on, as well as DTMROC,..
@@ -182,14 +182,14 @@ StatusCode InDet::TRT_StrawStatus::execute(){
         //=== select track
         const Trk::Perigee* perigee = (*trackIt)->perigeeParameters();
         if ( not perigee  ) { ATH_MSG_ERROR( "Trk::Perigee missing" ); continue; }
-        if ( std::fabs(perigee->pT())/CLHEP::GeV < 1. ) continue; // 1 GeV pT cut
+        if ( std::abs(perigee->pT())/CLHEP::GeV < 1. ) continue; // 1 GeV pT cut
 
         const DataVector<const Trk::TrackStateOnSurface>* trackStates = (**trackIt).trackStateOnSurfaces();
         if ( not trackStates  ) { ATH_MSG_ERROR( "Trk::TrackStateOnSurface empty" ); continue; }
 
         int n_pixel_hits(0), n_sct_hits(0), n_trt_hits(0);  // count hits, require minimal number of all hits
         for ( DataVector<const Trk::TrackStateOnSurface>::const_iterator trackStatesIt = trackStates->begin(); trackStatesIt != trackStates->end(); ++trackStatesIt ) {
-            if ( *trackStatesIt == 0 ) { ATH_MSG_ERROR( "*trackStatesIt == 0" ); continue; }
+            if ( *trackStatesIt == nullptr ) { ATH_MSG_ERROR( "*trackStatesIt == 0" ); continue; }
 
             if ( !((*trackStatesIt)->type(Trk::TrackStateOnSurface::Measurement)) ) continue; // this skips outliers
 
@@ -205,7 +205,7 @@ StatusCode InDet::TRT_StrawStatus::execute(){
 
         for ( DataVector<const Trk::TrackStateOnSurface>::const_iterator trackStatesIt = trackStates->begin(); trackStatesIt != trackStates->end(); ++trackStatesIt ) {
 
-            if ( *trackStatesIt == 0 ) { ATH_MSG_ERROR( "*trackStatesIt == 0" ); continue; }
+            if ( *trackStatesIt == nullptr ) { ATH_MSG_ERROR( "*trackStatesIt == 0" ); continue; }
 
             if ( !((*trackStatesIt)->type(Trk::TrackStateOnSurface::Measurement)) ) continue; // this skips outliers
 
@@ -219,10 +219,10 @@ StatusCode InDet::TRT_StrawStatus::execute(){
                                                                                           hit.measurementOnTrack()->localCovariance()).release();
 
 			double unbiased_locR = unbiased_track_parameters->parameters()[Trk::locR];
-			if ( fabs(unbiased_locR) > m_locR_cut ) continue; // same cut as the default hole search cut
+			if ( std::abs(unbiased_locR) > m_locR_cut ) continue; // same cut as the default hole search cut
 
             const InDet::TRT_DriftCircle *driftCircle = driftCircleOnTrack->prepRawData();
-            if ( driftCircle == 0 ) { ATH_MSG_ERROR( "driftCircle == 0" ); continue; }
+            if ( driftCircle == nullptr ) { ATH_MSG_ERROR( "driftCircle == 0" ); continue; }
 
             Identifier id = driftCircle->identify();
             int index[6]; myStrawIndex(id, index); // side, layer, phi, straw_layer, straw_within_layer, straw_index
@@ -234,7 +234,7 @@ StatusCode InDet::TRT_StrawStatus::execute(){
         // add holeIdentifiers - fill vector
 
         std::unique_ptr<const Trk::TrackStates> holes (m_trt_hole_finder->getHolesOnTrack( *track ));
-        if ( holes==0 ) continue; // no holes found
+        if ( holes==nullptr ) continue; // no holes found
         for (const Trk::TrackStateOnSurface* trackStates : *holes) {
 
             if ( !trackStates->type(   Trk::TrackStateOnSurface::Hole  )  ) { ATH_MSG_ERROR( "m_trt_hole_finder returned something that is not a hole" ); continue; }
@@ -246,7 +246,7 @@ StatusCode InDet::TRT_StrawStatus::execute(){
             if ( !(m_TRTHelper->is_trt(id)) ) { ATH_MSG_ERROR( "m_trt_hole_finder returned something that is not a TRT hole" ); continue; }
 
             // add se same 1.4 mm locR selection, in case it is not on by default
-            if ( std::fabs( track_parameters->parameters()[Trk::locR] ) > m_locR_cut ) continue;
+            if ( std::abs( track_parameters->parameters()[Trk::locR] ) > m_locR_cut ) continue;
 
             holeIdentifiers.push_back( id );
         } // end add holeIdentifiers
@@ -259,7 +259,7 @@ StatusCode InDet::TRT_StrawStatus::execute(){
 
     for (TRT_RDO_Container::const_iterator rdoIt = rdoContainer->begin(); rdoIt != rdoContainer->end(); ++rdoIt) {
         const InDetRawDataCollection<TRT_RDORawData>* TRTCollection(*rdoIt);
-        if (TRTCollection==0) continue;
+        if (TRTCollection==nullptr) continue;
         for (DataVector<TRT_RDORawData>::const_iterator trtIt = TRTCollection->begin(); trtIt != TRTCollection->end(); ++trtIt) {
             Identifier id = (*trtIt)->identify();
             int index[6]; myStrawIndex(id, index); // side, layer, phi, straw_layer, straw_within_layer, straw_index
diff --git a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/Calibrator.cxx b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/Calibrator.cxx
index 45c8936bf730..c293c72d8b38 100644
--- a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/Calibrator.cxx
+++ b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/Calibrator.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
 */
 
 /********************************************************************
@@ -160,7 +160,7 @@ RtGraph::RtGraph(TH2F* rtHist, int binvar, const char* binlabel, bool pflag, TDi
                              rtHist->ProjectionX(m_chname.data(),i+1,i+1);
     hslizes[i]->SetTitle(m_chtit.data());
     if (!pflag){
-      hslizes[i]->SetDirectory(0);
+      hslizes[i]->SetDirectory(nullptr);
     }
     
     m_maxbin[i]=1; m_maxval[i]=0;
@@ -503,7 +503,7 @@ std::string Calibrator::GetSelString(){
   return selstr;
 }
 
-std::string Calibrator::GetBinnedRt(std::string key){
+std::string Calibrator::GetBinnedRt(const std::string& key){
 
   int nbins=data[key].rtgraph->tval.size();
   double maxt=data[key].rtgraph->tval[nbins-1];
@@ -544,7 +544,7 @@ int Calibrator::UpdateOldConstants(){
   } 
 }
 
-float Calibrator::FitRt ATLAS_NOT_THREAD_SAFE (std::string key, std::string opt, TH2F* rtHist, TDirectory* dir){ // Global gStyle is used.
+float Calibrator::FitRt ATLAS_NOT_THREAD_SAFE (const std::string& key, const std::string& opt, TH2F* rtHist, TDirectory* dir){ // Global gStyle is used.
 
   float rtpars[4];
 
@@ -630,8 +630,8 @@ float Calibrator::FitRt ATLAS_NOT_THREAD_SAFE (std::string key, std::string opt,
     int maxtries = 500;
     float drdt;
     float driftradius = rtpars[0]+tdrift*(rtpars[1]+tdrift*(rtpars[2]));
-    float residual = fabs(rdrift) - driftradius;
-    while (fabs(residual) > precision) {
+    float residual = std::abs(rdrift) - driftradius;
+    while (std::abs(residual) > precision) {
       
       drdt = rtpars[1]+tdrift*(2*rtpars[2]);
       tdrift = tdrift + residual/drdt;
@@ -676,7 +676,7 @@ float Calibrator::FitRt ATLAS_NOT_THREAD_SAFE (std::string key, std::string opt,
 }
 
 
-float Calibrator::FitTimeResidual ATLAS_NOT_THREAD_SAFE (std::string key, TH1F* tresHist){ // Global gStyle is used.
+float Calibrator::FitTimeResidual ATLAS_NOT_THREAD_SAFE (const std::string& key, TH1F* tresHist){ // Global gStyle is used.
 
   float mean = tresHist->GetMean();
   float rms = tresHist->GetRMS();
@@ -693,7 +693,7 @@ float Calibrator::FitTimeResidual ATLAS_NOT_THREAD_SAFE (std::string key, TH1F*
 
   data[key].tresMean =  0;
   float fitmean=tresHist->GetBinCenter(maxbin);  
-  if (fabs(fitmean)>5.0){ 
+  if (std::abs(fitmean)>5.0){ 
     data[key].tresMean =  mean;
     data[key].t0err = rms;
     data[key].t0fittype = 1;
@@ -747,7 +747,7 @@ float Calibrator::FitTimeResidual ATLAS_NOT_THREAD_SAFE (std::string key, TH1F*
   data[key].t0fittype = 2;
  
   // protection against wrong fits:
-  if ( fabs(tresHist->GetFunction("gaus")->GetParameter(2))>10 || fabs(tresHist->GetFunction("gaus")->GetParameter(1))>10   ) {
+  if ( std::abs(tresHist->GetFunction("gaus")->GetParameter(2))>10 || std::abs(tresHist->GetFunction("gaus")->GetParameter(1))>10   ) {
     
     data[key].tres = tresHist->GetRMS();
     data[key].tresMean =  tresHist->GetMean();
@@ -763,7 +763,7 @@ float Calibrator::FitTimeResidual ATLAS_NOT_THREAD_SAFE (std::string key, TH1F*
   }
 
 
-float Calibrator::FitResidual ATLAS_NOT_THREAD_SAFE (std::string key, TH1F* resHist){ // Global gStyle is used.
+float Calibrator::FitResidual ATLAS_NOT_THREAD_SAFE (const std::string& key, TH1F* resHist){ // Global gStyle is used.
 
   float mean = resHist->GetMean();
   //float rms = resHist->GetRMS();
@@ -783,7 +783,7 @@ float Calibrator::FitResidual ATLAS_NOT_THREAD_SAFE (std::string key, TH1F* resH
 
 }
 
-TDirectory* Calibrator::Calibrate ATLAS_NOT_THREAD_SAFE (TDirectory* dir, std::string key, std::string opt, caldata * caldata_above){ // Thread unsafe FitResidual, FitRt, FitTimeResidual are used.
+TDirectory* Calibrator::Calibrate ATLAS_NOT_THREAD_SAFE (TDirectory* dir, std::string key, const std::string& opt, caldata * caldata_above){ // Thread unsafe FitResidual, FitRt, FitTimeResidual are used.
 
   //set some bool flags
   bool calrt=opt.find('R')!=std::string::npos;
@@ -816,7 +816,7 @@ TDirectory* Calibrator::Calibrate ATLAS_NOT_THREAD_SAFE (TDirectory* dir, std::s
       m_resHists[key]->SetBinContent(i+1,data[key].reshist[i]);
     }
     m_resHists[key]->SetEntries((int)data[key].nres);
-    if (bequiet) m_resHists[key]->SetDirectory(0);                                 
+    if (bequiet) m_resHists[key]->SetDirectory(nullptr);                                 
     
     FitResidual(key,m_resHists[key]);
 
@@ -846,7 +846,7 @@ TDirectory* Calibrator::Calibrate ATLAS_NOT_THREAD_SAFE (TDirectory* dir, std::s
       }
       m_rtHists[key]->SetEntries(data[key].nrt);
       if (bequiet) {
-        m_rtHists[key]->SetDirectory(0);
+        m_rtHists[key]->SetDirectory(nullptr);
       }
       data[key].rtt0=FitRt(key,opt,m_rtHists[key],m_hdirs[key]); //do the fit
       if (prnt) printf("RT    %7i (%8.1e) %8.1e %8.1e %8.1e, %3.2f  : ", data[key].nrt, data[key].rtpar[0], data[key].rtpar[1], data[key].rtpar[2], data[key]. rtpar[3], data[key].rtt0);     
@@ -892,7 +892,7 @@ TDirectory* Calibrator::Calibrate ATLAS_NOT_THREAD_SAFE (TDirectory* dir, std::s
         }
         m_tresHists[key]->SetEntries(data[key].ntres);
         if (bequiet) {
-          m_tresHists[key]->SetDirectory(0);
+          m_tresHists[key]->SetDirectory(nullptr);
         }      
 
         data[key].t0=data[key].oldt02 + FitTimeResidual(key,m_tresHists[key]) + data[key].rtt0 + m_t0shift; //do the fit and modify t0
@@ -910,7 +910,7 @@ TDirectory* Calibrator::Calibrate ATLAS_NOT_THREAD_SAFE (TDirectory* dir, std::s
         //TEMP FIX to dont destroy right T0s
        
       //add the short straw correction here. In this way, the shift is only done when contants at STRAW level come from level above.
-        if ((level == 6 && useshortstw) && fabs(data[key].det)<2  && (data[key].lay==0 && data[key].stl<9) )         data[key].t0=caldata_above->t0-0.75; 
+        if ((level == 6 && useshortstw) && std::abs(data[key].det)<2  && (data[key].lay==0 && data[key].stl<9) )         data[key].t0=caldata_above->t0-0.75; 
         data[key].t0err=caldata_above->t0err;
         data[key].t0off=data[key].t0-caldata_above->t0 + data[key].rtt0;
         data[key].t0fittype = 4;
@@ -931,7 +931,7 @@ TDirectory* Calibrator::Calibrate ATLAS_NOT_THREAD_SAFE (TDirectory* dir, std::s
 }
 
 
-int Calibrator::AddHit(std::string key, databundle d, int* binhist, bool makehist){
+int Calibrator::AddHit(const std::string& key, databundle d, int* binhist, bool makehist){
   
   int tresbin=Simple1dHist(m_mintres,m_maxtres,m_nbinstres,d.tres);
   int resbin=Simple1dHist(m_minres,m_maxres,m_nbinsres,d.res);
diff --git a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/Calibrator.h b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/Calibrator.h
index 99cbf614e020..99aa1a30d8c6 100755
--- a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/Calibrator.h
+++ b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/Calibrator.h
@@ -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
 */
 
 /********************************************************************
@@ -237,7 +237,7 @@ public:
      @param[in] binhist an integer arry containing the histogram data for a single straw
      @return 1 if the sub-module is seen for the first time and 0 if it has been seen before
   */
-  int AddHit(std::string,databundle,int*,bool);
+  int AddHit(const std::string&,databundle,int*,bool);
 
   /**
      Creates root histograms, performs the t0 and R-t calibration for a given sub-module and writes the resulting histograms to a root directory tree (if not told otherwise). The new t0 values are calculated here.
@@ -246,7 +246,7 @@ public:
      @param[in] caldata_above the caldata object from the sub-module above the one to be calibrated
      @return the root directory where the histgrams were written
   */
-  TDirectory* Calibrate ATLAS_NOT_THREAD_SAFE (TDirectory*, std::string, std::string, caldata*);
+  TDirectory* Calibrate ATLAS_NOT_THREAD_SAFE (TDirectory*, std::string, const std::string&, caldata*);
 
   /**
      Makes the R-t fit
@@ -254,7 +254,7 @@ public:
      @param[in] rtHist the 2D root histogram with the R-t data
      @return the t0 from the R-t fit
   */
-  float FitRt ATLAS_NOT_THREAD_SAFE (std::string,std::string,TH2F*,TDirectory*);
+  float FitRt ATLAS_NOT_THREAD_SAFE (const std::string&,const std::string&,TH2F*,TDirectory*);
 
   /**
      Makes the time residual fit
@@ -262,7 +262,7 @@ public:
      @param[in] tresHist the 1D root histogram with the time residuals
      @return the mean value of the time residual fit
   */
-  float FitTimeResidual ATLAS_NOT_THREAD_SAFE (std::string,TH1F*);
+  float FitTimeResidual ATLAS_NOT_THREAD_SAFE (const std::string&,TH1F*);
 
   /**
      Makes the residual fit
@@ -270,7 +270,7 @@ public:
      @param[in] resHist the 1D root histogram with the residuals
      @return the mean value of the residual fit
   */
-  float FitResidual ATLAS_NOT_THREAD_SAFE (std::string,TH1F*);
+  float FitResidual ATLAS_NOT_THREAD_SAFE (const std::string&,TH1F*);
 
   /**
      Creates an ntuple with entries containing data associated with the sub-modules in a sub level
@@ -282,7 +282,7 @@ public:
 
   /**
   */
-  std::string GetBinnedRt(std::string);
+  std::string GetBinnedRt(const std::string&);
 
   /**
      Prints some sub-level statistics
diff --git a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTRTHits.cxx b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTRTHits.cxx
index 1393b373b7f4..395bdd69495f 100755
--- a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTRTHits.cxx
+++ b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTRTHits.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
 */
 
 /********************************************************************
@@ -108,7 +108,7 @@ StatusCode FillAlignTRTHits::initialize(){
 		m_updator = &(*m_updatorHandle);
 	} else {
 		ATH_MSG_DEBUG ("No Updator for unbiased track states given, use normal states!");
-		m_updator = 0;
+		m_updator = nullptr;
 	}
 
 	// The tool to get the argon status:
@@ -150,8 +150,8 @@ bool FillAlignTRTHits::fill(const Trk::Track* aTrack, TRT::TrackInfo* output,
 	(*output)[TRT::Track::numberOfTRTHits] = 0;
 	// loop over the TrackStateonSurfaces
 
-	const Trk::TrackParameters *unbiasedTrkParameters(0);
-	const Trk::TrackStateOnSurface* HitOnTrackToRemove(0);
+	const Trk::TrackParameters *unbiasedTrkParameters(nullptr);
+	const Trk::TrackStateOnSurface* HitOnTrackToRemove(nullptr);
 
 	double timecor = 0.;
 	const Trk::Track* pTrack = aTrack ;
@@ -167,7 +167,7 @@ bool FillAlignTRTHits::fill(const Trk::Track* aTrack, TRT::TrackInfo* output,
 	if(mesp){
 		phi   = mesp->parameters()[Trk::phi0];
 		theta = mesp->parameters()[Trk::theta];
-		float ptinv = fabs(mesp->parameters()[Trk::qOverP]) / sin(theta);
+		float ptinv = std::abs(mesp->parameters()[Trk::qOverP]) / sin(theta);
 		qoverp = mesp->parameters()[Trk::qOverP];
 		if (ptinv != 0) {
 			pt = 1. / ptinv;
@@ -216,7 +216,7 @@ bool FillAlignTRTHits::fill(const Trk::Track* aTrack, TRT::TrackInfo* output,
 	for (; tsos != tsosEnd; ++tsos) {
 		mesb = (*tsos)->measurementOnTrack();
 		rotp = dynamic_cast<const Trk::RIO_OnTrack*>(mesb);
-		if(rotp != 0) {
+		if(rotp != nullptr) {
 			Identifier ident = rotp->identify();
 			if (m_DetID->is_sct(ident)) {
 				(*output)[TRT::Track::numberOfSCTHits]++;
@@ -224,15 +224,15 @@ bool FillAlignTRTHits::fill(const Trk::Track* aTrack, TRT::TrackInfo* output,
 				(*output)[TRT::Track::numberOfTRTHits]++;
 				++m_numOfHitsTotal;
 				trtcirc = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(rotp);
-				if (trtcirc != 0) {
+				if (trtcirc != nullptr) {
 					dcp = trtcirc->prepRawData();
 					tparp = ((*tsos)->trackParameters());
 					mparp = (tparp);
 
-					if (tparp == 0) {
+					if (tparp == nullptr) {
 						if (msgLvl(MSG::DEBUG)) msg() << "strange: trk parameters not available" << endmsg;
 					}
-					if (dcp == 0) {
+					if (dcp == nullptr) {
 						msg(MSG::ERROR)  << "strange: prepRawData not available" << endmsg;
 					}
 
@@ -286,7 +286,7 @@ bool FillAlignTRTHits::fill(const Trk::Track* aTrack, TRT::TrackInfo* output,
 						(*newhit)[TRT::Hit::errorTrackDriftRadius] = sqrt(Amg::error(*(mparp->covariance()),Trk::driftRadius));
 						// calculate the 'trktime' and the 'trkdriftvelocity'
 						if( rtrelation ) {
-							(*newhit)[TRT::Hit::trackDriftTime] = rtrelation->drifttime(fabs( (*newhit)[TRT::Hit::trackDriftRadius] )) ;
+							(*newhit)[TRT::Hit::trackDriftTime] = rtrelation->drifttime(std::abs( (*newhit)[TRT::Hit::trackDriftRadius] )) ;
 							(*newhit)[TRT::Hit::driftVelocity] = rtrelation->drdt( (*newhit)[TRT::Hit::trackDriftTime] ) ;
 						}
 
@@ -330,8 +330,8 @@ bool FillAlignTRTHits::fill(const Trk::Track* aTrack, TRT::TrackInfo* output,
 						float h_chiSquare = h_residual*h_residual/h_residualVariance ;
 
 						bool hitsel=false;
-						if( fabs( h_trkDistance )  < m_maxDistance &&
-						    fabs( h_timeResidual ) < m_maxTimeResidual &&
+						if( std::abs( h_trkDistance )  < m_maxDistance &&
+						    std::abs( h_timeResidual ) < m_maxTimeResidual &&
 						    h_trkVariance > 0 &&
 						    h_hasValidDriftTime &&
 						    h_timeOverThreshold/3.125 >= m_minTimebinsOverThreshold &&
@@ -364,7 +364,7 @@ bool FillAlignTRTHits::fill(const Trk::Track* aTrack, TRT::TrackInfo* output,
 								rtrackunbias  = unbiasedTrkParameters->parameters()[Trk::driftRadius];
 								drrtrackunbias = sqrt(Amg::error(*(unmparp->covariance()),Trk::driftRadius));
 								//drrtrackunbias = sqrt(unbiasedTrkParameters->localErrorMatrix().covValue(Trk::driftRadius));
-								if( rtrelation )  ttrackunbias = rtrelation->drifttime(fabs( rtrackunbias ));
+								if( rtrelation )  ttrackunbias = rtrelation->drifttime(std::abs( rtrackunbias ));
 								ATH_MSG_DEBUG("Unbiased TrackParameters 2: " << *unbiasedTrkParameters );
 								ATH_MSG_DEBUG("Radius : " << (*newhit)[TRT::Hit::trackDriftRadius] );
 								ATH_MSG_DEBUG("Radius 2: " << rtrackunbias );
diff --git a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTrkInfo.cxx b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTrkInfo.cxx
index bf70599abd18..0aa8c2082015 100755
--- a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTrkInfo.cxx
+++ b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTrkInfo.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
 */
 
 /********************************************************************
@@ -46,7 +46,7 @@ bool FillAlignTrkInfo::fill(const Trk::Track* aTrack, TRT::TrackInfo* output,
 //bool FillAlignTrkInfo::fill(const Trk::Track* aTrack, TRT::TrackInfo* output) const {
   // track parameters
   const Trk::Perigee* mesp=(aTrack->perigeeParameters());
-  if (mesp!=0) {
+  if (mesp!=nullptr) {
     (*output)[TRT::Track::d0]=mesp->parameters()[Trk::d0];
     (*output)[TRT::Track::z0]=mesp->parameters()[Trk::z0];
     (*output)[TRT::Track::phi]=mesp->parameters()[Trk::phi];
diff --git a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/TRTCalibTrackSelectionTool.cxx b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/TRTCalibTrackSelectionTool.cxx
index 1160ac288421..ae3c15036ad0 100755
--- a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/TRTCalibTrackSelectionTool.cxx
+++ b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/TRTCalibTrackSelectionTool.cxx
@@ -1,11 +1,13 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************************
 
 ********************************************************************/
 
+#include <cmath>
+
 #include "TRTCalibTrackSelectionTool.h"
 #include "TrkToolInterfaces/ITrackSummaryTool.h"
 #include "TrkTrackSummary/TrackSummary.h"
@@ -63,13 +65,13 @@ bool TRTCalibTrackSelectionTool::isAccepted(const Trk::Track* pTrack) const
   const Trk::Perigee* mesp=(pTrack->perigeeParameters());
   
   if(!mesp) return false;
-  if (m_DeltaPhi>0 && fabs(mesp->parameters()[Trk::phi]-m_PhiOffset) > m_DeltaPhi) return false;
+  if (m_DeltaPhi>0 && std::abs(mesp->parameters()[Trk::phi]-m_PhiOffset) > m_DeltaPhi) return false;
 
   float theta=mesp->parameters()[Trk::theta];
-  float ptinv = fabs(mesp->parameters()[Trk::qOverP])/sin(theta);
+  float ptinv = std::abs(mesp->parameters()[Trk::qOverP])/std::sin(theta);
   if(m_PtMin>0 && ptinv > 1/m_PtMin) return false;
   
-  float eta=-log(tan(theta/2));
+  float eta=-std::log(std::tan(theta/2));
   if (m_EtaMin< m_EtaMax && (eta < m_EtaMin || eta > m_EtaMax) ) return false;
 
   std::unique_ptr<const Trk::TrackSummary> summary = m_TrackSummaryTool->summary(*pTrack);
diff --git a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/TRTCalibrator.cxx b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/TRTCalibrator.cxx
index 4136c5bb016d..92a638886d23 100755
--- a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/TRTCalibrator.cxx
+++ b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/TRTCalibrator.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
 */
 
 /********************************************************************
@@ -113,7 +113,7 @@ StatusCode TRTCalibrator::initialize()
 {
   msg(MSG::INFO) << "initialize()" << endmsg;
   
-  m_trtmanager=0; 
+  m_trtmanager=nullptr; 
   
   if ((detStore()->retrieve(m_DetID,"AtlasID")).isFailure()) {
     msg(MSG::FATAL) << "Problem retrieving ATLASDetectorID helper" << endmsg;
@@ -175,20 +175,20 @@ StatusCode TRTCalibrator::initialize()
   m_config["all"].selections["Board"].insert(CALIB_NONE);
   m_config["all"].selections["Chip"].insert(CALIB_NONE);
   m_config["all"].selections["Straw"].insert(CALIB_NONE);
-  m_config["all"].CalibrateRt.push_back("TRT") ; //only calibrate R-t and T0 on TRT level
-  m_config["all"].CalibrateT0.push_back("TRT") ;
-  m_config["all"].PrintLog.push_back("TRT") ;
-  m_config["all"].PrintT0Out.push_back("TRT") ;
-  m_config["all"].PrintRtOut.push_back("TRT") ;
+  m_config["all"].CalibrateRt.emplace_back("TRT") ; //only calibrate R-t and T0 on TRT level
+  m_config["all"].CalibrateT0.emplace_back("TRT") ;
+  m_config["all"].PrintLog.emplace_back("TRT") ;
+  m_config["all"].PrintT0Out.emplace_back("TRT") ;
+  m_config["all"].PrintRtOut.emplace_back("TRT") ;
 
   //common for all barrel/ec
-  m_config["subdet"].CalibrateRt.push_back("TRT") ;  //calibrate R-t and T0 on TRT and barrel/ec level
-  m_config["subdet"].CalibrateRt.push_back("Detector") ;
+  m_config["subdet"].CalibrateRt.emplace_back("TRT") ;  //calibrate R-t and T0 on TRT and barrel/ec level
+  m_config["subdet"].CalibrateRt.emplace_back("Detector") ;
   m_config["subdet"].CalibrateT0=m_config["subdet"].CalibrateRt;
-  m_config["subdet"].NoHistograms.push_back("TRT") ; //don't write root histogram on TRT level
+  m_config["subdet"].NoHistograms.emplace_back("TRT") ; //don't write root histogram on TRT level
   m_config["subdet"].PrintLog=m_config["subdet"].CalibrateRt;
-  m_config["subdet"].PrintT0Out.push_back("Detector") ;
-  m_config["subdet"].PrintRtOut.push_back("Detector") ;
+  m_config["subdet"].PrintT0Out.emplace_back("Detector") ;
+  m_config["subdet"].PrintRtOut.emplace_back("Detector") ;
 
   //individual barrel/ec
   m_config["1"]=m_config["subdet"];
@@ -207,27 +207,27 @@ StatusCode TRTCalibrator::initialize()
   m_config["-1"].selections["Straw"].insert(CALIB_NONE);
 
   //common for all layers
-  m_config["layer"].CalibrateRt.push_back("TRT") ;  //calibrate R-t and T0 on all levels (except Straw level)
-  m_config["layer"].CalibrateRt.push_back("Detector") ;
-  m_config["layer"].CalibrateRt.push_back("Layer") ;
-  m_config["layer"].CalibrateRt.push_back("Module") ;
-  m_config["layer"].CalibrateRt.push_back("Board") ;
-  m_config["layer"].CalibrateRt.push_back("Chip") ;
+  m_config["layer"].CalibrateRt.emplace_back("TRT") ;  //calibrate R-t and T0 on all levels (except Straw level)
+  m_config["layer"].CalibrateRt.emplace_back("Detector") ;
+  m_config["layer"].CalibrateRt.emplace_back("Layer") ;
+  m_config["layer"].CalibrateRt.emplace_back("Module") ;
+  m_config["layer"].CalibrateRt.emplace_back("Board") ;
+  m_config["layer"].CalibrateRt.emplace_back("Chip") ;
   m_config["layer"].CalibrateT0=m_config["layer"].CalibrateRt;
-  m_config["layer"].NoHistograms.push_back("TRT") ; //don't write root histogram on TRT, barrel/ec, straw level
-  m_config["layer"].NoHistograms.push_back("Detector") ;
-  m_config["layer"].NoHistograms.push_back("Straw") ;
+  m_config["layer"].NoHistograms.emplace_back("TRT") ; //don't write root histogram on TRT, barrel/ec, straw level
+  m_config["layer"].NoHistograms.emplace_back("Detector") ;
+  m_config["layer"].NoHistograms.emplace_back("Straw") ;
   m_config["layer"].PrintLog=m_config["layer"].CalibrateRt;
-  m_config["layer"].PrintT0Out.push_back("Layer") ;
-  m_config["layer"].PrintT0Out.push_back("Module") ;
-  m_config["layer"].PrintT0Out.push_back("Board") ;
-  m_config["layer"].PrintT0Out.push_back("Chip") ;
-  m_config["layer"].PrintT0Out.push_back("Straw") ; //print txt output for each straw
-  m_config["layer"].PrintRtOut.push_back("Layer") ;
-  m_config["layer"].PrintRtOut.push_back("Module") ;
-  m_config["layer"].PrintRtOut.push_back("Board") ;
-  m_config["layer"].PrintRtOut.push_back("Chip") ;
-  m_config["layer"].PrintRtOut.push_back("Straw") ; //print txt output for each straw
+  m_config["layer"].PrintT0Out.emplace_back("Layer") ;
+  m_config["layer"].PrintT0Out.emplace_back("Module") ;
+  m_config["layer"].PrintT0Out.emplace_back("Board") ;
+  m_config["layer"].PrintT0Out.emplace_back("Chip") ;
+  m_config["layer"].PrintT0Out.emplace_back("Straw") ; //print txt output for each straw
+  m_config["layer"].PrintRtOut.emplace_back("Layer") ;
+  m_config["layer"].PrintRtOut.emplace_back("Module") ;
+  m_config["layer"].PrintRtOut.emplace_back("Board") ;
+  m_config["layer"].PrintRtOut.emplace_back("Chip") ;
+  m_config["layer"].PrintRtOut.emplace_back("Straw") ; //print txt output for each straw
 
   //individual layers
   m_config["1_0"]=m_config["layer"];
@@ -883,7 +883,7 @@ bool TRTCalibrator::calibrate ATLAS_NOT_THREAD_SAFE () {
           hitdata.res=r-rtrack; 
           //hitdata.t=t-t0+averageT0-20.0; 
           hitdata.t=t-t0; 
-          hitdata.r=fabs(rtrack);
+          hitdata.r=std::abs(rtrack);
           hitdata.t0=m_trtcaldbTool->getT0(ident);
           hitdata.rt0=reft0map[std::string(Form("_%i_%i_%i",hitdata.det,hitdata.brd,hitdata.chp))];
           hitdata.x=(strawelement->center(ident)).x();
diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/test/InDetBSErrContainerCnv_p1_test.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/test/InDetBSErrContainerCnv_p1_test.cxx
index bd062744caa6..b9e9126ecf7e 100644
--- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/test/InDetBSErrContainerCnv_p1_test.cxx
+++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/test/InDetBSErrContainerCnv_p1_test.cxx
@@ -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
 */
 
 // $Id$
@@ -17,7 +17,7 @@
 #include <cassert>
 
 
-typedef InDetBSErrContainer::base_value_type Elt;
+using Elt = InDetBSErrContainer::base_value_type;
 
 
 void compare (const InDetBSErrContainer& c1,
diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/test/TRT_BSIdErrContainerCnv_p1_test.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/test/TRT_BSIdErrContainerCnv_p1_test.cxx
index 949c59cbb414..1a7d83acfb6c 100644
--- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/test/TRT_BSIdErrContainerCnv_p1_test.cxx
+++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/test/TRT_BSIdErrContainerCnv_p1_test.cxx
@@ -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
 */
 
 // $Id$
@@ -18,7 +18,7 @@
 
 
 //  DataVector<std::pair<uint8_t, std::pair<uint32_t, uint8_t> > > TRT_BSIdErrContainer; 
-typedef TRT_BSIdErrContainer::base_value_type Elt;
+using Elt = TRT_BSIdErrContainer::base_value_type;
 
 
 void compare (const TRT_BSIdErrContainer& c1,
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadoutTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadoutTestAlg.cxx
index dbf7f778e8ca..bff699ecf875 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadoutTestAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadoutTestAlg.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
 */
 
 /**
@@ -98,5 +98,5 @@ SCT_Chip SCT_ReadoutTestAlg::initialiseChip(short id, std::string configString)
   std::reverse(configString.begin(), configString.end());
   short config{bin2dec(configString.c_str())};
   const int minus1{-1};
-  return SCT_Chip(id, config, minus1, minus1, minus1, minus1);
+  return {id, config, static_cast<uint32_t>(minus1), static_cast<uint32_t>(minus1), static_cast<uint32_t>(minus1), static_cast<uint32_t>(minus1)};
 }
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTCondWrite.cxx b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTCondWrite.cxx
index 2343b2e5caed..c4422a2127c5 100755
--- a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTCondWrite.cxx
+++ b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTCondWrite.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 <fstream>
@@ -672,9 +672,9 @@ const TRTCondWrite::StrawT0Container* TRTCondWrite::getT0Container() const {
 
 TRTCond::ExpandedIdentifier TRTCondWrite::trtcondid( const Identifier& id, int level) const
 {
-  return TRTCond::ExpandedIdentifier( m_trtid->barrel_ec(id),m_trtid->layer_or_wheel(id),
+  return { m_trtid->barrel_ec(id),m_trtid->layer_or_wheel(id),
 				      m_trtid->phi_module(id),m_trtid->straw_layer(id),
-				      m_trtid->straw(id),level ) ;
+				      m_trtid->straw(id),level } ;
 }
 
 
diff --git a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetCosmicsEventPhase.cxx b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetCosmicsEventPhase.cxx
index 4d80caa70c18..79fc1bda2492 100644
--- a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetCosmicsEventPhase.cxx
+++ b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetCosmicsEventPhase.cxx
@@ -57,7 +57,7 @@ namespace InDet
 
     m_phase = 0;
 
-    const Trk::Track* selected = 0;
+    const Trk::Track* selected = nullptr;
     int maxTRT = -1;
 
 // Sasa Nov 30
diff --git a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetCosmicsEventPhaseTool.cxx b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetCosmicsEventPhaseTool.cxx
index 6549c398cf32..953502dabd9c 100644
--- a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetCosmicsEventPhaseTool.cxx
+++ b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetCosmicsEventPhaseTool.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
  */
 
 ///////////////////////////////////////////////////////////////////
@@ -69,7 +69,7 @@ double InDet::InDetCosmicsEventPhaseTool::findPhase(Trk::Track const* track) con
     aT0=avgT0->get();
   }
 
-  TRTCond::RtRelation const* rtr = 0;
+  TRTCond::RtRelation const* rtr = nullptr;
   double timeresidualsum = 0;
   size_t ntrthits = 0;
   for (Trk::TrackStateOnSurface const* state : *track->trackStateOnSurfaces()) {
@@ -93,7 +93,7 @@ double InDet::InDetCosmicsEventPhaseTool::findPhase(Trk::Track const* track) con
     Trk::TrackParameters const* tparp = (state->trackParameters());
     if (!tparp) continue;
     double trkdistance = tparp->parameters()[Trk::driftRadius];
-    double trkdrifttime = rtr->drifttime(fabs(trkdistance));
+    double trkdrifttime = rtr->drifttime(std::abs(trkdistance));
 
     double timeresidual = rawdrifttime - t0 + aT0 - trkdrifttime;
     ATH_MSG_DEBUG("trkdistance=" << trkdistance
@@ -101,7 +101,7 @@ double InDet::InDetCosmicsEventPhaseTool::findPhase(Trk::Track const* track) con
                                  << "  timeresidual=" << timeresidual
                                  << " rawdrifttime=" << rawdrifttime);
 
-    if (timeresidual < 2000 && std::fabs(trkdistance) < 2.8) {
+    if (timeresidual < 2000 && std::abs(trkdistance) < 2.8) {
       timeresidualsum += timeresidual;
       ++ntrthits;
     }
@@ -121,7 +121,7 @@ double InDet::InDetCosmicsEventPhaseTool::findPhase(Trk::Segment const* segment)
   double sum_tr = 0.;
   double sum_goodhits = 0.;
 
-  TRTCond::RtRelation const* rtr = 0;
+  TRTCond::RtRelation const* rtr = nullptr;
   int nhits = segment->numberOfMeasurementBases();
   for (int i = 0; i < nhits; ++i) {
     Trk::RIO_OnTrack const* rio = dynamic_cast<Trk::RIO_OnTrack const*>(segment->measurement(i));
diff --git a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetFixedWindowTrackTimeTool.cxx b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetFixedWindowTrackTimeTool.cxx
index 09b3d7ce97da..07986d043ea0 100644
--- a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetFixedWindowTrackTimeTool.cxx
+++ b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetFixedWindowTrackTimeTool.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
  */
 
 ///////////////////////////////////////////////////////////////////
@@ -61,7 +61,7 @@ double InDet::InDetFixedWindowTrackTimeTool::findPhase(Trk::Track const* track)
   SG::ReadCondHandle<TRTCond::AverageT0> rhl{m_T0ReadKey};
   const TRTCond::AverageT0* avgT0{*rhl};
 
-  TRTCond::RtRelation const* rtr = 0;
+  TRTCond::RtRelation const* rtr = nullptr;
 
   double timeresidualsum = 0;
   size_t ntrthits = 0;
@@ -94,7 +94,7 @@ double InDet::InDetFixedWindowTrackTimeTool::findPhase(Trk::Track const* track)
     if (!tparp) continue;
 
     double trkdistance = tparp->parameters()[Trk::driftRadius];
-    double trkdrifttime = rtr->drifttime(fabs(trkdistance));
+    double trkdrifttime = rtr->drifttime(std::abs(trkdistance));
     double timeresidual = rawdrifttime - t0 + avgT0->get() - trkdrifttime;
 
     ATH_MSG_DEBUG("trkdistance=" << trkdistance
@@ -102,8 +102,8 @@ double InDet::InDetFixedWindowTrackTimeTool::findPhase(Trk::Track const* track)
                                  << "  timeresidual=" << timeresidual
                                  << " rawdrifttime=" << rawdrifttime);
 
-    if (fabs(timeresidual - m_windowCenter) < m_windowSize
-        && fabs(trkdistance) < 2.8) {
+    if (std::abs(timeresidual - m_windowCenter) < m_windowSize
+        && std::abs(trkdistance) < 2.8) {
       timeresidualsum += timeresidual;
       ++ntrthits;
     }
@@ -122,7 +122,7 @@ double InDet::InDetFixedWindowTrackTimeTool::findPhase(Trk::Segment const* segme
   double sum_tr = 0.;
   double sum_goodhits = 0.;
 
-  TRTCond::RtRelation const* rtr = 0;
+  TRTCond::RtRelation const* rtr = nullptr;
 
   int nhits = segment->numberOfMeasurementBases();
   for (int i = 0; i < nhits; ++i) {
diff --git a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetSlidingWindowTrackTimeTool.cxx b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetSlidingWindowTrackTimeTool.cxx
index cd0fd35f546e..fbf1cbf7fd3a 100644
--- a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetSlidingWindowTrackTimeTool.cxx
+++ b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/InDetSlidingWindowTrackTimeTool.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
  */
 
 ///////////////////////////////////////////////////////////////////
@@ -72,7 +72,7 @@ double InDet::InDetSlidingWindowTrackTimeTool::findPhase(Trk::Track const* track
   }
 
 
-  TRTCond::RtRelation const* rtr = 0;
+  TRTCond::RtRelation const* rtr = nullptr;
 
   double timeresidualsum = 0;
   size_t ntrthits = 0;
@@ -102,16 +102,16 @@ double InDet::InDetSlidingWindowTrackTimeTool::findPhase(Trk::Track const* track
       Trk::TrackParameters const* tparp = state->trackParameters();
       if (!tparp) continue;
       double trkdistance = tparp->parameters()[Trk::driftRadius];
-      double trkdrifttime = rtr->drifttime(fabs(trkdistance));
+      double trkdrifttime = rtr->drifttime(std::abs(trkdistance));
       double timeresidual = rawdrifttime - t0 + aT0 - trkdrifttime;
       ATH_MSG_DEBUG("trkdistance=" << trkdistance
                                    << "  trkdrifttime=" << trkdrifttime
                                    << "  timeresidual=" << timeresidual
                                    << " rawdrifttime=" << rawdrifttime);
       if (timeresidual < 2000
-          && std::fabs(trkdistance) < 2.8) {
+          && std::abs(trkdistance) < 2.8) {
         if (itr == 0
-            || std::fabs(timeresidual - windowCenter) < m_windowSize) {
+            || std::abs(timeresidual - windowCenter) < m_windowSize) {
           timeresidualsum += timeresidual;
           ++ntrthits;
         }
@@ -137,7 +137,7 @@ double InDet::InDetSlidingWindowTrackTimeTool::findPhase(Trk::Segment const* seg
   int nhits = segment->numberOfMeasurementBases();
 
   std::vector<double> data{0., 0.1, -0.00087,0.};
-  TRTCond::RtRelation const* rtr = 0;
+  TRTCond::RtRelation const* rtr = nullptr;
 
   for (int i = 0; i < nhits; ++i) {
     Trk::RIO_OnTrack const* rio = dynamic_cast<Trk::RIO_OnTrack const*>(segment->measurement(i));
diff --git a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/TRT_TrackTimingTool.cxx b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/TRT_TrackTimingTool.cxx
index 09d5b7e3fd31..520abc31e355 100644
--- a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/TRT_TrackTimingTool.cxx
+++ b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/src/TRT_TrackTimingTool.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
  */
 
 ///////////////////////////////////////////////////////////////////
@@ -73,7 +73,7 @@ StatusCode InDet::TRT_TrackTimingTool::finalize() {
 std::vector<Trk::SpaceTimePoint*> InDet::TRT_TrackTimingTool::timeMeasurements(const Trk::Track& track,
                                                                                const Trk::SegmentCollection* sgmColl)
 const {
-  if (sgmColl != 0) {
+  if (sgmColl != nullptr) {
     ATH_MSG_INFO("TRT_TrackTimingTool::timeMeasurements called with SegmentCollection != 0");
   }
 
@@ -99,18 +99,18 @@ const {
 
   if (!nTRTdriftCircles) return timeMeasurementsVector; // no TRT hits for this track, can not do anything
 
-  Trk::Track* newtrack = 0;
+  Trk::Track* newtrack = nullptr;
   if (nMissingTrackParameters) { // need to re-fit the track to get the track parameters
     newtrack = (m_ITrackFitter->fit(Gaudi::Hive::currentContext(),track, 
                                     false, track.info().particleHypothesis())).release();
 
-    if (newtrack == 0) {
+    if (newtrack == nullptr) {
       ATH_MSG_INFO("fit to unslim track has failed, giving up.");
       return timeMeasurementsVector;
     }
   }
 
-  const Trk::Track* track_ptr = (newtrack != 0) ? newtrack : &track;
+  const Trk::Track* track_ptr = (newtrack != nullptr) ? newtrack : &track;
 
   // there are TRT hits, and track parameters, use the tool to calculate the time
   ATH_MSG_DEBUG("timeMeasurements(): diagnosed that track has all information already.");
@@ -156,7 +156,7 @@ const {
 // The same functions but for TrackParticles
 std::vector<Trk::SpaceTimePoint*> InDet::TRT_TrackTimingTool::timeMeasurements(const Trk::TrackParticleBase& tpb) const
 {
-  if (tpb.originalTrack() == 0) {
+  if (tpb.originalTrack() == nullptr) {
     std::vector<Trk::SpaceTimePoint*> v;
     return v;
   }
@@ -188,8 +188,8 @@ float InDet::TRT_TrackTimingTool::getTrackTimeFromDriftRadius(const Trk::Track*
     if (!tparp) continue;
 
     float driftR = trtcirc->localParameters()[Trk::driftRadius];
-    if (fabs(driftR) < 0.000001) continue; // driftR == 0 => measurement not available, could be anything
-    if (fabs(driftR) > 2.) continue;
+    if (std::abs(driftR) < 0.000001) continue; // driftR == 0 => measurement not available, could be anything
+    if (std::abs(driftR) > 2.) continue;
 
     float trackR = tparp->parameters()[Trk::driftRadius];
 
@@ -199,8 +199,8 @@ float InDet::TRT_TrackTimingTool::getTrackTimeFromDriftRadius(const Trk::Track*
       ATH_MSG_WARNING("Rt relation pointer is null!");
       continue;
     }
-    float driftT = rtRelation->drifttime(fabs(driftR));
-    float trackT = rtRelation->drifttime(fabs(trackR));
+    float driftT = rtRelation->drifttime(std::abs(driftR));
+    float trackT = rtRelation->drifttime(std::abs(trackR));
 
 
     time += driftT - trackT;
@@ -226,7 +226,7 @@ float InDet::TRT_TrackTimingTool::etaCorrection(const Trk::Track& track) const {
 
   double eta = trackPar->eta();
   float correction = (1.3 * eta * eta - 1.9) * eta * eta;
-  if (fabs(eta) > 1. && correction > correctionLargeEta) correction = correctionLargeEta;
+  if (std::abs(eta) > 1. && correction > correctionLargeEta) correction = correctionLargeEta;
 
   ATH_MSG_DEBUG("eta correction: " << correction << " ns at eta = " << eta);
 
diff --git a/InnerDetector/InDetCosmics/InDetCosmicsFilters/src/TrackFilter.cxx b/InnerDetector/InDetCosmics/InDetCosmicsFilters/src/TrackFilter.cxx
index a8fd6a23927f..245129e21658 100755
--- a/InnerDetector/InDetCosmics/InDetCosmicsFilters/src/TrackFilter.cxx
+++ b/InnerDetector/InDetCosmics/InDetCosmicsFilters/src/TrackFilter.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 //////////////////////////////////////////////////////////////////
@@ -91,7 +91,7 @@ StatusCode InDet::TrackFilter::execute()
   for(;it!=itE && !passed;++it){
 
   // input TrackSegment Collection
-    const TrackCollection *tracks   = 0;
+    const TrackCollection *tracks   = nullptr;
     
     StatusCode sc = evtStore()->retrieve(tracks, *it);
     if(sc.isFailure()){
@@ -114,7 +114,7 @@ StatusCode InDet::TrackFilter::execute()
           
           const Trk::RIO_OnTrack* hitOnTrack = dynamic_cast <const Trk::RIO_OnTrack*>(tsos->measurementOnTrack());
           
-          if (hitOnTrack != 0) {
+          if (hitOnTrack != nullptr) {
             const Identifier& surfaceID = hitOnTrack->identify();
             
             if(m_idHelper->is_sct(surfaceID)){
diff --git a/InnerDetector/InDetCosmics/TRT_SegmentsToTrack/src/TRT_SegmentsToTrack.cxx b/InnerDetector/InDetCosmics/TRT_SegmentsToTrack/src/TRT_SegmentsToTrack.cxx
index 2dc0ad00b9ad..27a37d82610a 100755
--- a/InnerDetector/InDetCosmics/TRT_SegmentsToTrack/src/TRT_SegmentsToTrack.cxx
+++ b/InnerDetector/InDetCosmics/TRT_SegmentsToTrack/src/TRT_SegmentsToTrack.cxx
@@ -417,7 +417,7 @@ StatusCode InDet::TRT_SegmentsToTrack::execute()
 int InDet::TRT_SegmentsToTrack::getNumberReal(const InDet::TRT_DriftCircle* driftcircle,const EventContext& ctx) const
 {
   int numBarcodes = 0;
-  typedef PRD_MultiTruthCollection::const_iterator iter;
+  using iter = PRD_MultiTruthCollection::const_iterator;
 
   SG::ReadHandle<PRD_MultiTruthCollection> truthCollectionTRT(m_multiTruthCollectionTRTName,ctx);
 
diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/GeoModelXmlTool.h b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/GeoModelXmlTool.h
index ef451fe336e8..239276b29d8a 100644
--- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/GeoModelXmlTool.h
+++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/GeoModelXmlTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef GEOMODELSVC_GEOMODELXMLTOOL_H
@@ -21,10 +21,10 @@ public:
 
 protected:
 
-  std::string getBlob(std::string versionNode, std::string tableNode) const;
+  std::string getBlob(const std::string& versionNode, const std::string& tableNode) const;
   //returns a position in the world volume hierarchy
   // -1 represents the volume named by m_detectorName not being found
-  int createTopVolume(GeoPhysVol * worldVol, GmxInterface & interface,std::string versionNode, std::string tableNode) const; 
+  int createTopVolume(GeoPhysVol * worldVol, GmxInterface & interface,const std::string& versionNode, const std::string& tableNode) const; 
   //method for derived classes to initialize the services needed here
   StatusCode createBaseTool();
 
diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/GeoModelXmlTool.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/GeoModelXmlTool.cxx
index 89bf57c0c55a..33c0695b647a 100644
--- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/GeoModelXmlTool.cxx
+++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/GeoModelXmlTool.cxx
@@ -1,18 +1,19 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetGeoModelUtils/GeoModelXmlTool.h"
+#include <GeoModelInterfaces/IGeoDbTagSvc.h>
+#include <GeoModelKernel/GeoPhysVol.h>
 #include <GeoModelUtilities/DecodeVersionKey.h>
+#include <GeoModelXml/Gmx2Geo.h>
+#include <GeoModelXml/GmxInterface.h>
+#include <PathResolver/PathResolver.h>
 #include <RDBAccessSvc/IRDBAccessSvc.h>
 #include <RDBAccessSvc/IRDBRecord.h>
 #include <RDBAccessSvc/IRDBRecordset.h>
-#include <GeoModelInterfaces/IGeoDbTagSvc.h>
-#include <GeoModelXml/GmxInterface.h>
-#include <PathResolver/PathResolver.h>
-#include <GeoModelXml/Gmx2Geo.h>
-#include <GeoModelKernel/GeoPhysVol.h>
 #include <fstream>
+#include <utility>
 
 GeoModelXmlTool::GeoModelXmlTool(const std::string &type,
                                  const std::string &name,
@@ -29,7 +30,7 @@ StatusCode GeoModelXmlTool::createBaseTool(){
   return StatusCode::SUCCESS;
 }
 
-int GeoModelXmlTool::createTopVolume(GeoPhysVol *world, GmxInterface & gmxInterface, std::string vNode, std::string tableName) const {
+int GeoModelXmlTool::createTopVolume(GeoPhysVol *world, GmxInterface & gmxInterface, const std::string& vNode, const std::string& tableName) const {
   
   int flags{};
   std::string gmxInput;
@@ -78,7 +79,7 @@ int GeoModelXmlTool::createTopVolume(GeoPhysVol *world, GmxInterface & gmxInterf
   return childIndex;
 }
 
-std::string GeoModelXmlTool::getBlob(std::string vNode, std::string tableName) const {
+std::string GeoModelXmlTool::getBlob(const std::string& vNode, const std::string& tableName) const {
   DecodeVersionKey versionKey(&*m_geoDbTagSvc, vNode);
   const std::string& versionTag  = versionKey.tag();
   const std::string& versionNode = versionKey.node();
diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/InDetMaterialManager.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/InDetMaterialManager.cxx
index f8de9e7d01a1..79ccbfcb7fd7 100755
--- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/InDetMaterialManager.cxx
+++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/InDetMaterialManager.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
  */
 
 #include "InDetGeoModelUtils/InDetMaterialManager.h"
@@ -793,7 +793,7 @@ InDetMaterialManager::addTextFileMaterials() {
 
   msg(MSG::INFO) << "Extra materials being read in from text file." << endmsg;
 
-  typedef std::map<std::string, MaterialDef> MatMap;
+  using MatMap = std::map<std::string, MaterialDef>;
   MatMap materials;
 
   // read in material table
diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeSplitterUtils.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeSplitterUtils.cxx
index 506f97f16291..534d0d5734dd 100755
--- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeSplitterUtils.cxx
+++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeSplitterUtils.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
  */
 
 
@@ -137,13 +137,13 @@ namespace InDetDD {
   Point
   UnboundedZone::findEntry(const Ray&) const {
     // Will never be called.
-    return Point();
+    return {};
   }
 
   Point
   UnboundedZone::findExit(const Ray&) const {
     // Invalid means no exit point.
-    return Point();
+    return {};
   }
 
   TubeZone::TubeZone(const std::string& label, double zmin, double zmax, double rmin, double rmax, bool rotated)
@@ -197,7 +197,7 @@ namespace InDetDD {
       std::cout << "Unexpected case" << std::endl;
     }
     // Return invalid point since doesn't intersect.
-    return Point(); // invalid point
+    return {}; // invalid point
   }
 
 // Assume already inside.
@@ -219,7 +219,7 @@ namespace InDetDD {
       std::cout << "Unexpected case" << std::endl;
     }
     // ends with. Return invalid point.
-    return Point();
+    return {};
   }
 
   PconZone::PconZone(const std::string& label, bool rotated)
@@ -284,7 +284,7 @@ namespace InDetDD {
       std::cout << "Unexpected case" << std::endl;
     }
     // Return invalid point since doesn't intersect.
-    return Point(); // invalid point
+    return {}; // invalid point
   }
 
 // Assume already inside.
@@ -310,7 +310,7 @@ namespace InDetDD {
       std::cout << "Unexpected case" << std::endl;
     }
     // ends with. Return invalid point.
-    return Point();
+    return {};
   }
 
   Ray::Ray()
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx
index c73530757ca3..f3845e90314a 100644
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -218,7 +218,7 @@ namespace InDetDD {
   SiDetectorElement::localToModuleTransform() const
   {
     if (isModuleFrame()) {
-      return Amg::Transform3D(); // Identity
+      return {}; // Identity
     } else {
       return m_otherSide->transform().inverse() * transform();
     }
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/InDetServMatManager.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/InDetServMatManager.h
index 1dd2760de485..33604ce7e505 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/InDetServMatManager.h
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/InDetServMatManager.h
@@ -34,7 +34,7 @@ class InDetServMatManager : public GeoVDetectorManager  {
   virtual PVConstLink getTreeTop(unsigned int i) const;
 
   // Add a Tree top:
-  void addTreeTop(PVConstLink);
+  void addTreeTop(const PVConstLink&);
 
  private:  
   // prevent copy and assignment
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatManager.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatManager.cxx
index dea9349c08cd..fd878da4193d 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatManager.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatManager.cxx
@@ -34,7 +34,7 @@ InDetServMatManager::getTreeTop(unsigned int i) const
 }
 
 void 
-InDetServMatManager::addTreeTop(PVConstLink vol){
+InDetServMatManager::addTreeTop(const PVConstLink& vol){
   m_volume.push_back(vol);
 }
 
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx
index 7b8a115be8ce..84ac12b54af1 100644
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetServMatGeoModel/ServicesTracker.h"
@@ -83,7 +83,7 @@ void ServicesTracker::finaliseServices()
 
   std::map<const ServicesLayer*, ServiceMaterial> layerMaterial; // cache the layer services
 
-  typedef  std::vector<ServiceVolume*>::iterator VolumeIter;
+  using VolumeIter = std::vector<ServiceVolume *>::iterator;
   for (VolumeIter iv=m_volumes.begin(); iv!=m_volumes.end(); ++iv) {
     std::vector<ServiceMaterial> result; // = (**iv).materials(); // preserve already present mat. (EOS)
     if ((**iv).isEOS()) addEosMaterial(**iv, result);
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx
index d16481732d12..b7879e6fed55 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "GeoPrimitives/GeoPrimitives.h"
@@ -31,6 +31,7 @@
 #include "GeoModelKernel/GeoTubs.h"
 #include "GaudiKernel/SystemOfUnits.h"
 
+#include <memory>
 #include <sstream>
 
 GeoPixelLayer::GeoPixelLayer(InDetDD::PixelDetectorManager* ddmgr,
@@ -72,14 +73,14 @@ GeoVPhysVol* GeoPixelLayer::Build() {
   GeoPixelSiCrystal theSensor(m_DDmgr, m_gmt_mgr, isBLayer);
   std::unique_ptr<GeoPixelStaveSupport> staveSupport;
   if (staveLayout ==0 || staveLayout==1) {
-    staveSupport.reset( new GeoPixelTMT (m_DDmgr, m_gmt_mgr) );
+    staveSupport = std::make_unique<GeoPixelTMT>( m_DDmgr, m_gmt_mgr );
   }
   if (staveLayout == 3) {
-    staveSupport.reset( new GeoPixelSimpleStaveSupport (m_DDmgr, m_gmt_mgr) );
+    staveSupport = std::make_unique<GeoPixelSimpleStaveSupport>( m_DDmgr, m_gmt_mgr );
   }
   else if (staveLayout >3 && staveLayout <7)
   {
-    staveSupport.reset( new GeoPixelDetailedStaveSupport (m_DDmgr, m_gmt_mgr));
+    staveSupport = std::make_unique<GeoPixelDetailedStaveSupport>( m_DDmgr, m_gmt_mgr);
   }
 
   if (staveLayout >3 && staveLayout <7)
diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/ITkPixelReadoutManager.cxx b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/ITkPixelReadoutManager.cxx
index 7688def4a531..4870775e2651 100644
--- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/ITkPixelReadoutManager.cxx
+++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/ITkPixelReadoutManager.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "ITkPixelReadoutManager.h"
@@ -119,7 +119,7 @@ Identifier PixelReadoutManager::getPixelId(Identifier offlineId,
   const PixelModuleDesign *p_design = static_cast<const PixelModuleDesign *>(&element->design());
   if (p_design->getReadoutTechnology() != PixelReadoutTechnology::RD53) {
     ATH_MSG_ERROR("Non-RD53 readout technologies not supported!");
-    return Identifier();
+    return {};
   }
 
   unsigned int FEs = p_design->numberOfCircuits();
@@ -133,7 +133,7 @@ Identifier PixelReadoutManager::getPixelId(Identifier offlineId,
   if (row >= rowsPerFE || column >= columnsPerFE || FE >= FEs) {
     ATH_MSG_DEBUG("Illegal pixel requested OfflineID: " << std::hex << offlineId << std::dec << " FE: " << FE << " row: " << row << " column: " << column);
     ATH_MSG_DEBUG("Limits are: FE < " << FEs << ", row < " << rowsPerFE << ", column < " << columnsPerFE);
-    return Identifier(); // illegal Identifier, standardized for PixelRodDecoder
+    return {}; // illegal Identifier, standardized for PixelRodDecoder
   }
 
   // ---------------------
diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelReadoutManager.cxx b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelReadoutManager.cxx
index 783a4af37530..1a2cf59265bb 100644
--- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelReadoutManager.cxx
+++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelReadoutManager.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "PixelReadoutManager.h"
@@ -139,7 +139,7 @@ Identifier PixelReadoutManager::getPixelId(Identifier offlineId,
   const PixelModuleDesign *p_design = static_cast<const PixelModuleDesign *>(&element->design());
   if (p_design->getReadoutTechnology() == PixelReadoutTechnology::RD53) {
     ATH_MSG_ERROR("RD53 readout technologies not supported!");
-    return Identifier();
+    return {};
   }
 
   unsigned int columnsPerFE     = p_design->columnsPerCircuit();
@@ -167,7 +167,7 @@ Identifier PixelReadoutManager::getPixelId(Identifier offlineId,
   if (row>=rowsPerFE || column>=columnsPerFE || FE>=((moduleType == PixelModuleType::IBL_PLANAR || moduleType == PixelModuleType::IBL_3D || moduleType == PixelModuleType::DBM) ? FEsPerHalfModule:2*FEsPerHalfModule)) {
     ATH_MSG_DEBUG("Illegal pixel requested OfflineID: " << std::hex << offlineId << std::dec << " FE: " << FE << " row: " << row << " column: " << column);
     ATH_MSG_DEBUG("Limits are: FE < " << ((moduleType == PixelModuleType::IBL_PLANAR || moduleType == PixelModuleType::IBL_3D || moduleType == PixelModuleType::DBM) ? FEsPerHalfModule : 2*FEsPerHalfModule) << ", row < " << rowsPerFE << ", column < " << columnsPerFE);
-    return Identifier(); // illegal Identifier, standardized for PixelRodDecoder
+    return {}; // illegal Identifier, standardized for PixelRodDecoder
   }
 
   // ---------------------
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.cxx
index 7c11d56c4a07..81ae0e179d24 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 /**   
@@ -246,7 +246,7 @@ SCT_CablingCondAlgFromCoraCool::execute(const EventContext& ctx) const {
   // build rod-rob map, and store the crate/slot to RobId mapping
   CondAttrListVec::const_iterator rodIt{pRod->begin()};
   CondAttrListVec::const_iterator last_rod{pRod->end()};
-  typedef std::map<int, int> IntMap;
+  using IntMap = std::map<int, int>;
   IntMap slotMap;
   //there are now 16 crate slots, but they may be numbered (in the DB) as some non-monotonic sequence
   //so here we take whatever is in the database and map it onto numbers 0-15
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineIdType.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineIdType.cxx
index a9519cc5b21f..1bd89a1fc4d5 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineIdType.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineIdType.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 "SCT_OnlineIdType.h"
@@ -11,7 +11,7 @@ namespace SCT_Cabling{
   DataSource
   onlineIdType(const unsigned int rodId){
     const unsigned int rod(rodId & 0xFFFFFF);
-    typedef std::set<unsigned int> UintSet;
+    using UintSet = std::set<unsigned int>;
     // set of rod ids used in data and in montecarlo
     const UintSet commonSet={0x210000,  0x210001,  0x210002,  0x210003,  0x210004,  0x210005,  0x210006,
         0x210007,  0x210008,  0x210009,  0x21000a,  0x220000,  0x220001,  0x220002,  0x220003,  0x220004,
diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_BarrelModuleSideDesign.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_BarrelModuleSideDesign.cxx
index 9115e96f4cd4..f0067b911cc2 100755
--- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_BarrelModuleSideDesign.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_BarrelModuleSideDesign.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -236,13 +236,13 @@ SCT_BarrelModuleSideDesign::cellIdOfPosition(const SiLocalPosition & localPositi
 {
   // NB We do not distinguish between the two crystals anymore.
   // Check if we are in the active region. No bondgap check.
-  if (!inActiveArea(localPosition, false)) return SiCellId(); // return an invalid id
+  if (!inActiveArea(localPosition, false)) return {}; // return an invalid id
   double xPhi=localPosition.xPhi();
   double dstrip=(xPhi-m_xPhiStripPatternCentre)/m_stripPitch+0.5*diodes();
-  if (dstrip < 0) return SiCellId(); // return an invalid id
+  if (dstrip < 0) return {}; // return an invalid id
   int strip = static_cast<int>(dstrip);
-  if (strip > diodes())  return SiCellId();// return an invalid id if strip # greater than number of diodes.
-  return SiCellId(strip-shift()); // strip numbering starts from first readout strip. 
+  if (strip > diodes())  return {};// return an invalid id if strip # greater than number of diodes.
+  return {strip-shift()}; // strip numbering starts from first readout strip. 
                                    // Those to the left will have negative numbers.
 
 }
diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardFrameTransformation.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardFrameTransformation.cxx
index a7e3ca88d6fd..722091ea5803 100755
--- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardFrameTransformation.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardFrameTransformation.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -58,7 +58,7 @@ SCT_ForwardPolarPosition SCT_ForwardFrameTransformation::polarFromCartesian(cons
   const double deltaPhi = cartesian.xPhi()-m_phiCenter;
   const double deltaEta = cartesian.xEta()-m_etaCenter+m_radius;
   const double r = sqrt(deltaPhi*deltaPhi+deltaEta*deltaEta);
-  if (r<=0) return SCT_ForwardPolarPosition();
+  if (r<=0) return {};
   const double theta = asin((cartesian.xPhi()-m_phiCenter)/r);
   return SCT_ForwardPolarPosition(r,theta);
 }
diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardModuleSideDesign.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardModuleSideDesign.cxx
index bc02171ca7cd..7d805bf675b5 100755
--- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardModuleSideDesign.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardModuleSideDesign.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -247,18 +247,18 @@ SCT_ForwardModuleSideDesign::cellIdOfPosition(const SiLocalPosition & localPosit
 {
   // NB We do not distinguish between the two crystals anymore.
   // Check if we are in the active region. No bondgap check.
-  if (!inActiveArea(localPosition, false)) return SiCellId(); // return an invalid id
+  if (!inActiveArea(localPosition, false)) return {}; // return an invalid id
 
   const SCT_ForwardPolarPosition polar = m_frame.polarFromCartesian(localPosition);
   double theta = polar.theta();
 
   double dstrip = theta/angularPitch() + 0.5*diodes();
 
-  if (dstrip < 0) return SiCellId(); // return an invalid id
+  if (dstrip < 0) return {}; // return an invalid id
   int strip = static_cast<int>(dstrip);
-  if (strip > diodes())  return SiCellId();// return an invalid id if strip # greater 
+  if (strip > diodes())  return {};// return an invalid id if strip # greater 
                                            // than number of diodes.
-  return SiCellId(strip-shift()); // strip numbering starts from first readout strip. 
+  return {strip-shift()}; // strip numbering starts from first readout strip. 
                                    // Those to the left will have negative numbers.
 }
 
diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ModuleSideDesign.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ModuleSideDesign.cxx
index 9779710ff7ad..993b7bee3237 100755
--- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ModuleSideDesign.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ModuleSideDesign.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -99,7 +99,7 @@ SiLocalPosition SCT_ModuleSideDesign::positionFromStrip(const int stripNumber) c
 SiCellId SCT_ModuleSideDesign::cellIdInRange(const SiCellId &cellId) const {
     if (!cellId.isValid() ||
         cellId.strip() < 0 || cellId.strip() >= cells()) {
-        return SiCellId(); // Invalid
+        return {}; // Invalid
     }
     return cellId;
 }
diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ReadoutScheme.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ReadoutScheme.cxx
index 3ee1be8e5629..12c5715baeb8 100755
--- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ReadoutScheme.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ReadoutScheme.cxx
@@ -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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -57,11 +57,11 @@ SCT_ReadoutScheme::readoutIdOfCell(const SiCellId & cellId) const
 {
   // readout cell and diode numbering are the same.
   // The range can be different due to the unconnected edge strips (if m_shift != 0).
-  if (!cellId.isValid()) return SiReadoutCellId(); // return an invalid id. 
+  if (!cellId.isValid()) return {}; // return an invalid id. 
   int strip = cellId.strip();
   // I think this should be >= m_cells. But need to check if this has any implications.
-  if (strip < 0 || strip > m_cells) return SiReadoutCellId(); // return an invalid id.
-  return SiReadoutCellId(strip);
+  if (strip < 0 || strip > m_cells) return {}; // return an invalid id.
+  return {strip};
 }
 
 } // namespace InDetDD
diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripAnnulusDesign.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripAnnulusDesign.cxx
index 867715e08728..ad3e807d0efd 100644
--- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripAnnulusDesign.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripAnnulusDesign.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <stdexcept>
@@ -74,7 +74,7 @@ SiCellId StripAnnulusDesign::cellIdOfPosition(SiLocalPosition const &pos) const
 //    Find the strip
 //
     int strip = std::floor(phi / m_pitch) + m_nStrips * 0.5;
-    return SiCellId(strip);
+    return {strip};
 }
 
 SiLocalPosition StripAnnulusDesign::localPositionOfCell(SiCellId const &cellId) const {
@@ -162,11 +162,11 @@ SiLocalPosition StripAnnulusDesign::positionFromStrip(const int strip) const {
 SiCellId StripAnnulusDesign::cellIdInRange(const SiCellId &cellId) const {
 
     if (!cellId.isValid()) {
-        return SiCellId(); // Invalid
+        return {}; // Invalid
     }
     int strip = cellId.strip();
     if (strip < 0 ||  strip >= m_nStrips) {
-        return SiCellId(); // Invalid
+        return {}; // Invalid
     }
     return cellId;
 }
diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripBoxDesign.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripBoxDesign.cxx
index a91eb67971f9..acfaca87ac29 100644
--- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripBoxDesign.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripBoxDesign.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_ReadoutGeometry/StripBoxDesign.h"
@@ -94,19 +94,19 @@ SiCellId StripBoxDesign::cellIdOfPosition(SiLocalPosition const &pos) const {
     int strip = static_cast<int>(std::floor(pos.xPhi() / m_pitch) + m_nStrips / 2);
     if (strip < 0 || strip >= m_nStrips) {
 
-        return SiCellId(); // return an invalid id
+        return {}; // return an invalid id
     }
     int row=0;
     if(m_nRows>1){
       row = static_cast<int>(std::floor(pos.xEta() / m_length) + m_nRows / 2);
       if (row < 0 || row >= m_nRows) {
 	
-        return SiCellId(); // return an invalid id
+        return {}; // return an invalid id
       }
     }
     int strip1D = strip1Dim(strip, row);
     
-    return SiCellId(strip1D, 0);
+    return {strip1D, 0};
 }
 
 SiLocalPosition StripBoxDesign::localPositionOfCell(SiCellId const &cellId) const {
@@ -196,11 +196,11 @@ SiLocalPosition StripBoxDesign::positionFromStrip(const int stripNumber) const {
 SiCellId StripBoxDesign::cellIdInRange(const SiCellId &cellId) const {
 
     if (!cellId.isValid()) {
-        return SiCellId(); // Invalid
+        return {}; // Invalid
     }
     auto [strip, row] = getStripRow(cellId);
     if (strip < 0 || row < 0 || row >= m_nRows || strip >= m_nStrips) {
-        return SiCellId(); // Invalid
+        return {}; // Invalid
     }
     return cellId;
 }
diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripStereoAnnulusDesign.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripStereoAnnulusDesign.cxx
index b4356af7e9e9..a1e3d35f02b0 100644
--- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripStereoAnnulusDesign.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripStereoAnnulusDesign.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_ReadoutGeometry/StripStereoAnnulusDesign.h"
@@ -183,14 +183,14 @@ SiCellId StripStereoAnnulusDesign::cellIdOfPosition(SiLocalPosition const &pos)
 //
     double r = pos.r();
     if (r < m_stripStartRadius[0] || r >= m_stripEndRadius.back()) { 
-        return SiCellId(); // return an invalid id
+        return {}; // return an invalid id
     }
 
       std::vector<double>::const_iterator endPtr = upper_bound(m_stripStartRadius.begin(), m_stripStartRadius.end(), r);
       int row = distance(m_stripStartRadius.begin(), endPtr) - 1;
       // Following should never happen, check is done on r above
       if (row < 0 || row >= m_nRows) {
-        return SiCellId(); // return an invalid id
+        return {}; // return an invalid id
       }
     //
     //    Find the strip
@@ -205,14 +205,14 @@ SiCellId StripStereoAnnulusDesign::cellIdOfPosition(SiLocalPosition const &pos)
     double phiPrime = std::atan2(ySF, xSF); 
     int strip = std::floor(phiPrime / m_pitch[row]) + m_nStrips[row] *0.5;
     if (strip < 0) { // Outside
-      return SiCellId(); // return an invalid id
+      return {}; // return an invalid id
     }
     if (strip >= m_nStrips[row]) { // Outside
-      return SiCellId(); // return an invalid id
+      return {}; // return an invalid id
     }
     
     int strip1D = strip1Dim(strip, row);
-    return SiCellId(strip1D, 0);
+    return {strip1D, 0};
 }
   
 SiLocalPosition StripStereoAnnulusDesign::localPositionOfCell(SiCellId const &cellId) const {
@@ -375,12 +375,12 @@ SiLocalPosition StripStereoAnnulusDesign::positionFromStrip(const int stripNumbe
 SiCellId StripStereoAnnulusDesign::cellIdInRange(const SiCellId &cellId) const {
 
     if (!cellId.isValid()) {
-        return SiCellId(); // Invalid
+        return {}; // Invalid
     }
     int row = cellId.etaIndex();
     int strip = cellId.phiIndex();
     if (strip < 0 || row < 0 || row >= m_nRows || strip >= m_nStrips[row]) {
-        return SiCellId(); // Invalid
+        return {}; // Invalid
     }
     return cellId;
 }
diff --git a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingData.cxx b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingData.cxx
index 8c5c12dcc57f..a7e2e5c41358 100644
--- a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingData.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingData.cxx
@@ -8,11 +8,11 @@
 //
 
 #include "TRT_CablingData.h"
-#include <iostream>
+#include <algorithm>
+#include <cassert>
 #include <fstream>
+#include <iostream>
 #include <sstream>
-#include <algorithm>
-#include <assert.h>
 
   //Constructor
 TRT_CablingData::TRT_CablingData()
@@ -32,14 +32,14 @@ TRT_CablingData::~TRT_CablingData()
 
   // Fill m_identifierForAllStraws with zeros (TB case)
 void TRT_CablingData::zero_identifierForAllStraws
-(int, std::vector<Identifier> )
+(int, const std::vector<Identifier>& )
 {  
   return;
 }
 
   // Fill m_identifierHashForAllStraws with zeros (TB case)
 void TRT_CablingData::zero_identifierHashForAllStraws
-(int, std::vector<IdentifierHash> )
+(int, const std::vector<IdentifierHash>& )
 {
   return;
 }
@@ -87,7 +87,7 @@ void TRT_CablingData::set_identifierForAllStraws(int rod,
   int bufferPosition, Identifier strawID)
 {    
   find_idandhash (rod, bufferPosition).first = strawID;
-  m_BufferOffsetForAllIdentifiers.push_back(idpair (strawID, bufferPosition));
+  m_BufferOffsetForAllIdentifiers.emplace_back(strawID, bufferPosition);
   m_bofai_sorted = false;
 
    //   cout << "set m_BufferOffsetForAllIdentifiers[" 
diff --git a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingData.h b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingData.h
index 9c638934237b..882755059259 100644
--- a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingData.h
+++ b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingData.h
@@ -25,10 +25,10 @@ public:
   virtual ~TRT_CablingData();
   
     // Initialize m_identifierForAllStraws with zeros (TB case)
-  void zero_identifierForAllStraws(int rod, std::vector<Identifier> tempbuff);  
+  void zero_identifierForAllStraws(int rod, const std::vector<Identifier>& tempbuff);  
   
     // Initialize m_identifierHashForAllStraws with zeros (TB case)
-  void zero_identifierHashForAllStraws(int rod, std::vector<IdentifierHash> tempbuff);
+  void zero_identifierHashForAllStraws(int rod, const std::vector<IdentifierHash>& tempbuff);
   
     // Set value of Identifier for each straw (TB case)
   void set_identifierForAllStraws(int rod, int bufferPosition, 
diff --git a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingSvc.cxx b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingSvc.cxx
index 7a5f9d1fcd1e..cbdbc27e9549 100644
--- a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingSvc.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_CablingSvc.cxx
@@ -23,8 +23,8 @@ using eformat::helper::SourceIdentifier;
 TRT_CablingSvc::TRT_CablingSvc( const std::string& name, 
 			      ISvcLocator * pSvcLocator)
    : AthService( name, pSvcLocator ),
-     m_manager                    ( 0 ), 
-     m_idHelper                   ( 0 ),
+     m_manager                    ( nullptr ), 
+     m_idHelper                   ( nullptr ),
      m_cabling                    ( nullptr ),
      m_cablingTool_SR1_ECC        ( nullptr ),
      m_cablingTool_SR1            ( nullptr ),
diff --git a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_DC3.cxx b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_DC3.cxx
index 1d8efe197f15..59dd5fbfb985 100644
--- a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_DC3.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_DC3.cxx
@@ -35,7 +35,7 @@
 
 #undef ENDCAP_DEFINED
 
-#include <stdio.h>
+#include <cstdio>
 
 #include <iostream>
 #include "TRT_FillCablingData_DC3.h"
@@ -58,7 +58,7 @@ static const InterfaceID IID_ITRT_FillCablingData_DC3
   // Constructor
 TRT_FillCablingData_DC3::TRT_FillCablingData_DC3( const std::string& type, const std::string& 
 name,const IInterface* parent ):  AthAlgTool(type,name,parent),
-    m_TRTHelper(0), 
+    m_TRTHelper(nullptr), 
     m_PartialDetector(false)
 {
   declareInterface< TRT_FillCablingData_DC3 >( this );  
@@ -216,7 +216,7 @@ void TRT_FillCablingData_DC3::defineTables()
      int RodChannel, DtmChannel, strawnumber, HWaddr, GolNumber;
      string Board;
 
-     string::size_type loc = thisLine.find( "#" );
+     string::size_type loc = thisLine.find( '#' );
      if ( loc != string::npos )
      {
 	thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -265,7 +265,7 @@ void TRT_FillCablingData_DC3::defineTables()
      int RodChannel, DtmChannel, strawnumber, HWaddr, GolNumber;
      string Board;
 
-     string::size_type loc = thisLine.find( "#" );
+     string::size_type loc = thisLine.find( '#' );
      if ( loc != string::npos )
      {
 	thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -325,7 +325,7 @@ void TRT_FillCablingData_DC3::defineTables()
     int wheel, dtmaddr, dtmchannel, zlayer, phistraw, rodhalf, strawNumber;
 
 
-    string::size_type loc = thisLine.find( "#" );
+    string::size_type loc = thisLine.find( '#' );
     if ( loc != string::npos )
     {
       thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -393,7 +393,7 @@ void TRT_FillCablingData_DC3::defineTables()
     int wheel, dtmaddr, dtmchannel, zlayer, phistraw, rodhalf, strawNumber;
 
 
-    string::size_type loc = thisLine.find( "#" );
+    string::size_type loc = thisLine.find( '#' );
     if ( loc != string::npos )
     {
       thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -457,7 +457,7 @@ void TRT_FillCablingData_DC3::defineTables()
     int wheel, dtmaddr, dtmchannel, zlayer, phistraw, rodhalf, strawNumber;
 
 
-    string::size_type loc = thisLine.find( "#" );
+    string::size_type loc = thisLine.find( '#' );
     if ( loc != string::npos )
     {
       thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -525,7 +525,7 @@ void TRT_FillCablingData_DC3::defineTables()
     int wheel, dtmaddr, dtmchannel, zlayer, phistraw, rodhalf, strawNumber;
 
 
-    string::size_type loc = thisLine.find( "#" );
+    string::size_type loc = thisLine.find( '#' );
     if ( loc != string::npos )
     {
       thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -595,7 +595,7 @@ void TRT_FillCablingData_DC3::defineTables()
         {
 	   uint32_t SourceId;
 
-	   string::size_type loc = thisLine.find( "#" );
+	   string::size_type loc = thisLine.find( '#' );
 	   if ( loc != string::npos )
            {
 	      thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -1183,7 +1183,7 @@ void TRT_FillCablingData_DC3::defineTables_broken_FDR()
      int RodChannel, DtmChannel, strawnumber, HWaddr, GolNumber;
      string Board;
 
-     string::size_type loc = thisLine.find( "#" );
+     string::size_type loc = thisLine.find( '#' );
      if ( loc != string::npos )
      {
 	thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -1229,7 +1229,7 @@ void TRT_FillCablingData_DC3::defineTables_broken_FDR()
      int RodChannel, DtmChannel, strawnumber, HWaddr, GolNumber;
      string Board;
 
-     string::size_type loc = thisLine.find( "#" );
+     string::size_type loc = thisLine.find( '#' );
      if ( loc != string::npos )
      {
 	thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -1489,7 +1489,7 @@ void TRT_FillCablingData_DC3::defineTables_broken_FDR()
         {
 	   uint32_t SourceId;
 
-	   string::size_type loc = thisLine.find( "#" );
+	   string::size_type loc = thisLine.find( '#' );
 	   if ( loc != string::npos )
            {
 	      thisLine.replace( loc, thisLine.length(), 1, ' ' );
diff --git a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1.cxx b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1.cxx
index ceea4282cdd9..2b82be5c1627 100644
--- a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1.cxx
@@ -41,7 +41,7 @@ static const InterfaceID IID_ITRT_FillCablingData_SR1
   // Constructor
 TRT_FillCablingData_SR1::TRT_FillCablingData_SR1( const std::string& type, const std::string& 
 name,const IInterface* parent ):  AthAlgTool(type,name,parent),
-				  m_TRTHelper(0)
+				  m_TRTHelper(nullptr)
 {
   declareInterface< TRT_FillCablingData_SR1 >( this );   
 }
@@ -457,7 +457,7 @@ void TRT_FillCablingData_SR1::defineTables()
     if ( thisLine.length() == 0 )
       continue;
 
-    string::size_type loc = thisLine.find( "#" );
+    string::size_type loc = thisLine.find( '#' );
     if ( loc != string::npos )
     {
       thisLine.replace( loc, thisLine.length(), 1, ' ' );
diff --git a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1_ECC.cxx b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1_ECC.cxx
index 9748130fe47d..64b7fdfbed44 100644
--- a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1_ECC.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1_ECC.cxx
@@ -46,7 +46,7 @@ static const InterfaceID IID_ITRT_FillCablingData_SR1_ECC
   // Constructor
 TRT_FillCablingData_SR1_ECC::TRT_FillCablingData_SR1_ECC( const std::string& type, const std::string& 
 name,const IInterface* parent ):  AthAlgTool(type,name,parent),
-				  m_TRTHelper(0)
+				  m_TRTHelper(nullptr)
 {
   declareInterface< TRT_FillCablingData_SR1_ECC >( this );   
 }
@@ -215,7 +215,7 @@ void TRT_FillCablingData_SR1_ECC::defineTables()
       {
 	int rodgroup, rodline, dtmchannel, strawlayer, strawnumber;
 
-	string::size_type loc = thisLine.find( "#" );
+	string::size_type loc = thisLine.find( '#' );
 	if ( loc != string::npos )
 	  {
 	    thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -272,7 +272,7 @@ void TRT_FillCablingData_SR1_ECC::defineTables()
       {
 	int rodgroup, rodline, dtmchannel, strawlayer, strawnumber;
 
-	string::size_type loc = thisLine.find( "#" );
+	string::size_type loc = thisLine.find( '#' );
 	if ( loc != string::npos )
 	  {
 	    thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -329,7 +329,7 @@ void TRT_FillCablingData_SR1_ECC::defineTables()
       {
 	int rodgroup, rodline, dtmchannel, strawlayer, strawnumber;
 
-	string::size_type loc = thisLine.find( "#" );
+	string::size_type loc = thisLine.find( '#' );
 	if ( loc != string::npos )
 	  {
 	    thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -386,7 +386,7 @@ void TRT_FillCablingData_SR1_ECC::defineTables()
       {
 	int rodgroup, rodline, dtmchannel, strawlayer, strawnumber;
 
-	string::size_type loc = thisLine.find( "#" );
+	string::size_type loc = thisLine.find( '#' );
 	if ( loc != string::npos )
 	  {
 	    thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -443,7 +443,7 @@ void TRT_FillCablingData_SR1_ECC::defineTables()
       {
 	int rodgroup, rodline, dtmchannel, strawlayer, strawnumber;
 
-	string::size_type loc = thisLine.find( "#" );
+	string::size_type loc = thisLine.find( '#' );
 	if ( loc != string::npos )
 	  {
 	    thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -500,7 +500,7 @@ void TRT_FillCablingData_SR1_ECC::defineTables()
       {
 	int rodgroup, rodline, dtmchannel, strawlayer, strawnumber;
 
-	string::size_type loc = thisLine.find( "#" );
+	string::size_type loc = thisLine.find( '#' );
 	if ( loc != string::npos )
 	  {
 	    thisLine.replace( loc, thisLine.length(), 1, ' ' );
@@ -563,7 +563,7 @@ void TRT_FillCablingData_SR1_ECC::defineTables()
     if ( thisLine.length() == 0 )
       continue;
 
-    string::size_type loc = thisLine.find( "#" );
+    string::size_type loc = thisLine.find( '#' );
     if ( loc != string::npos )
     {
       thisLine.replace( loc, thisLine.length(), 1, ' ' );
diff --git a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_TB04.cxx b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_TB04.cxx
index a026add7b34b..37133b208d13 100644
--- a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_TB04.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_TB04.cxx
@@ -47,7 +47,7 @@ static const InterfaceID IID_ITRT_FillCablingData_TB04
   // Constructor
 TRT_FillCablingData_TB04::TRT_FillCablingData_TB04( const std::string& type, const std::string& 
 name,const IInterface* parent ):  AthAlgTool(type,name,parent),
-				  m_TRTHelper(0)
+				  m_TRTHelper(nullptr)
 {
   declareInterface< TRT_FillCablingData_TB04 >( this );   
 }
@@ -166,7 +166,7 @@ void TRT_FillCablingData_TB04::defineTables()
      for (int i = 0; i < 8*13*16; i++){
        Identifier id(0);
        tempbuff.push_back(id);
-       tempbuff2.push_back(0);
+       tempbuff2.emplace_back(0);
      }
      m_cabling->zero_identifierForAllStraws(rod, tempbuff);
      m_cabling->zero_identifierHashForAllStraws(rod, tempbuff2);
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx
index 464c2123ef81..42d239346b9f 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "GeoPrimitives/GeoPrimitives.h"
@@ -175,7 +175,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
   // Initialize the ID helper:
 //  bool idHelperInitialized=false;
 
-  const TRT_ID *idHelper = 0;
+  const TRT_ID *idHelper = nullptr;
 
   if (detStore()->retrieve(idHelper, "TRT_ID").isFailure()) {
     ATH_MSG_ERROR( "Could not retrieve TRT ID Helper");
@@ -390,11 +390,11 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
 
   GeoNodePtr<GeoNameTag> topLevelNameTag(new GeoNameTag("TRT"));
   // The top level volumes
-  GeoFullPhysVol *pBarrelVol = 0;
-  GeoFullPhysVol *pEndCapABPlus = 0;
-  GeoFullPhysVol *pEndCapCPlus = 0;
-  GeoFullPhysVol *pEndCapABMinus = 0;
-  GeoFullPhysVol *pEndCapCMinus = 0;
+  GeoFullPhysVol *pBarrelVol = nullptr;
+  GeoFullPhysVol *pEndCapABPlus = nullptr;
+  GeoFullPhysVol *pEndCapCPlus = nullptr;
+  GeoFullPhysVol *pEndCapABMinus = nullptr;
+  GeoFullPhysVol *pEndCapCMinus = nullptr;
 
 
 
@@ -433,7 +433,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
   //
   // End-cap volume AB:
   //
-  GeoLogVol * lEndCapVolumeAB = 0;
+  GeoLogVol * lEndCapVolumeAB = nullptr;
   if (endcapABPlusPresent || endcapABMinusPresent) {
     GeoTube * sEndCapVolumeAB_unshifted = new GeoTube (m_data->innerRadiusOfEndCapVolumeAB,
 						       m_data->outerRadiusOfEndCapVolumeAB,
@@ -477,7 +477,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
   //
   // End-cap volume C:
   //
-  GeoLogVol * lEndCapVolumeC = 0;
+  GeoLogVol * lEndCapVolumeC = nullptr;
   if (endcapCPlusPresent || endcapCMinusPresent) {
     GeoTube * sEndCapVolumeC_unshifted = new GeoTube (m_data->innerRadiusOfEndCapVolumeC,
 						      m_data->outerRadiusOfEndCapVolumeC,
@@ -702,8 +702,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
 
       // Create a shape for the modules of each layer (shell)
       // STS: Initialize raditator and shell LogVol
-      GeoLogVol  *lRad = 0;
-      GeoLogVol  *lShell = 0; 
+      GeoLogVol  *lRad = nullptr;
+      GeoLogVol  *lShell = nullptr; 
 
       // The shell volume:
       std::ostringstream shellstream;
@@ -1104,7 +1104,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
   double zdelta = 0.024; // try to make smaller gaps for Endcap Inner/OuterSupportGapper
   GeoTransform *xfRadiator, *xfPlane, *xfHeatExchanger, *xfFaradayFoilFront, *xfFaradayFoilBack;
   GeoTransform *xfInnerSupportGapperA,*xfOuterSupportGapperA, *xfInnerSupportGapperB, *xfOuterSupportGapperB; 
-  GeoFullPhysVol *childPlane = 0;
+  GeoFullPhysVol *childPlane = nullptr;
 
 
   double RotationsOfStrawPlanes[nStrawLayMaxEc]; //8 is hardcoded
@@ -1135,8 +1135,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
   // Create and initialize by 0 arrays of descriptors
   std::vector<InDetDD::TRT_EndcapDescriptor*> descriptorsAB[nSides][nStrawLayMaxEc];
   std::vector<InDetDD::TRT_EndcapDescriptor*> descriptorsC[nSides][nStrawLayMaxEc];
-  InDetDD::TRT_EndcapDescriptor* pDescriptor = 0;
-  InDetDD::TRT_EndcapElement* element = 0;
+  InDetDD::TRT_EndcapDescriptor* pDescriptor = nullptr;
+  InDetDD::TRT_EndcapElement* element = nullptr;
 
   for(iiSide = 0; iiSide<nSides; iiSide++) {
     for(iiPlane = 0; iiPlane < nStrawLayMaxEc; iiPlane++) {
@@ -1249,7 +1249,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
 
 	    GeoFullPhysVol* pWheelA = new GeoFullPhysVol(lWheelA);
 
-	    GeoAlignableTransform * xfAlignableModule = 0;
+	    GeoAlignableTransform * xfAlignableModule = nullptr;
 
 	    // Place planes in the wheel
 	    for (iiPlane = 0; iiPlane < m_data->endCapNumberOfStrawLayersPerWheelA; iiPlane++)
@@ -1568,7 +1568,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
 	    
 	    GeoFullPhysVol* pWheelB  = new GeoFullPhysVol(lWheelB);
 
-	    GeoAlignableTransform * xfAlignableModule = 0;	    
+	    GeoAlignableTransform * xfAlignableModule = nullptr;	    
 
 	    // Place planes in the wheel
 	    for (iiPlane = 0; iiPlane < m_data->endCapNumberOfStrawLayersPerWheelB; iiPlane++)
@@ -2006,7 +2006,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
   for (iiSide=0; iiSide<2; iiSide++)
     for(iiPhi=0; iiPhi<m_data->nEndcapPhi; iiPhi++)
       {
-	InDetDD::TRT_EndcapElement *prev = 0;
+	InDetDD::TRT_EndcapElement *prev = nullptr;
 	for (iiWheel=0; iiWheel<indexUpperBound; iiWheel++)
 	  for (iiPlane=0; iiPlane<m_detectorManager->getNumerology()->getNEndcapLayers(iiWheel); iiPlane++)
 	    {
@@ -2037,8 +2037,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
 
 /////////////////////////////////// makeModule ///////////////////////////////////
 //
-const GeoShape * TRTDetectorFactory_Full::makeModule ( double length, GeoTrf::Vector2D corner1, GeoTrf::Vector2D corner2,
-						       GeoTrf::Vector2D corner3, GeoTrf::Vector2D corner4, GeoTrf::Transform3D & modulePosition, double shrinkDist/*=0*/) const {
+const GeoShape * TRTDetectorFactory_Full::makeModule ( double length, const GeoTrf::Vector2D& corner1, const GeoTrf::Vector2D& corner2,
+						       const GeoTrf::Vector2D& corner3, const GeoTrf::Vector2D& corner4, GeoTrf::Transform3D & modulePosition, double shrinkDist/*=0*/) const {
 
 
   // This method takes the absolute coordinates of the four corners,
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h
index 5639c8a89ff6..2e6987b5119c 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 //-----------------------------------------------------------------------------//
@@ -83,8 +83,8 @@ class TRTDetectorFactory_Full : public InDetDD::DetectorFactoryBase  {
   ActiveGasMixture DecideGasMixture(int strawStatusHT);
 
   // private helper methods:
-  const GeoShape * makeModule ( double length, GeoTrf::Vector2D corner1 ,  GeoTrf::Vector2D corner2, GeoTrf::Vector2D corner3,
-				GeoTrf::Vector2D corner4, GeoTrf::Transform3D & absolutePosition, double shrinkDist=0 ) const;
+  const GeoShape * makeModule ( double length, const GeoTrf::Vector2D& corner1 ,  const GeoTrf::Vector2D& corner2, const GeoTrf::Vector2D& corner3,
+				const GeoTrf::Vector2D& corner4, GeoTrf::Transform3D & absolutePosition, double shrinkDist=0 ) const;
   //GeoPhysVol * makeStraw( double& activeGasZPosition, bool hasLargeDeadRegion=false ) const;
   GeoPhysVol * makeStraw( double& activeGasZPosition, bool hasLargeDeadRegion=false, ActiveGasMixture gasMixture = GM_XENON);
   //GeoFullPhysVol  *makeStrawPlane( size_t w ) const;
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Lite.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Lite.cxx
index 53b391a61bff..0fc6fb350829 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Lite.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Lite.cxx
@@ -157,7 +157,7 @@ void TRTDetectorFactory_Lite::create(GeoPhysVol *)
     shellPosVec.push_back(T);
   }
   //---------------------- Initialize ID Helper ------------------------------------//
-  const TRT_ID *idHelper = 0;
+  const TRT_ID *idHelper = nullptr;
 
   if (detStore()->retrieve(idHelper, "TRT_ID").isFailure()) {
     ATH_MSG_ERROR( "Could not retrieve TRT ID Helper");
@@ -632,7 +632,7 @@ void TRTDetectorFactory_Lite::create(GeoPhysVol *)
   const unsigned int nStrawLayMaxEc = 8;//hardcoded...
 
   unsigned int iiSide, iiWheel, iiPlane, iiPhi, counter;    //set of counters
-  GeoFullPhysVol *childPlane = 0;
+  GeoFullPhysVol *childPlane = nullptr;
 
 
   double RotationsOfStrawPlanes[nStrawLayMaxEc]; //8 is hardcoded
@@ -663,8 +663,8 @@ void TRTDetectorFactory_Lite::create(GeoPhysVol *)
   // Create and initialize by 0 arrays of descriptors
   std::vector<InDetDD::TRT_EndcapDescriptor*> descriptorsAB[nSides][nStrawLayMaxEc];
   std::vector<InDetDD::TRT_EndcapDescriptor*> descriptorsC[nSides][nStrawLayMaxEc];
-  InDetDD::TRT_EndcapDescriptor* pDescriptor = 0;
-  InDetDD::TRT_EndcapElement* element = 0;
+  InDetDD::TRT_EndcapDescriptor* pDescriptor = nullptr;
+  InDetDD::TRT_EndcapElement* element = nullptr;
 
   for(iiSide = 0; iiSide<nSides; iiSide++) {
     for(iiPlane = 0; iiPlane < nStrawLayMaxEc; iiPlane++) {
@@ -732,7 +732,7 @@ void TRTDetectorFactory_Lite::create(GeoPhysVol *)
 					     +std::to_string(iiSide)+"-"
 					     +std::to_string(iiWheel)];
 	    
-	    GeoAlignableTransform * xfAlignableModule = 0;
+	    GeoAlignableTransform * xfAlignableModule = nullptr;
 	    
 	    // Place planes in the wheel
 	    for (iiPlane = 0; iiPlane < m_data->endCapNumberOfStrawLayersPerWheelA; iiPlane++)
@@ -863,7 +863,7 @@ void TRTDetectorFactory_Lite::create(GeoPhysVol *)
 					     +std::to_string(iiSide)+"-"
 					     +std::to_string(iiWheel)];
 
-	    GeoAlignableTransform * xfAlignableModule = 0;	    
+	    GeoAlignableTransform * xfAlignableModule = nullptr;	    
 	    
 	    // Place planes in the wheel
 	    for (iiPlane = 0; iiPlane < m_data->endCapNumberOfStrawLayersPerWheelB; iiPlane++)
@@ -1055,7 +1055,7 @@ void TRTDetectorFactory_Lite::create(GeoPhysVol *)
   for (iiSide=0; iiSide<2; iiSide++)
     for(iiPhi=0; iiPhi<m_data->nEndcapPhi; iiPhi++)
       {
-	InDetDD::TRT_EndcapElement *prev = 0;
+	InDetDD::TRT_EndcapElement *prev = nullptr;
 	for (iiWheel=0; iiWheel<indexUpperBound; iiWheel++)
 	  for (iiPlane=0; iiPlane<m_detectorManager->getNumerology()->getNEndcapLayers(iiWheel); iiPlane++)
 	    {
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx
index 65baba4b4caa..71d9b8f77c5a 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.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 "TRT_DetDescrDB_ParameterInterface.h"
@@ -15,7 +15,7 @@
 
 //_________________________________________________________________________________________
 TRT_DetDescrDB_ParameterInterface::TRT_DetDescrDB_ParameterInterface(InDetDD::AthenaComps * athenaComps) :
-  TRTParameterInterface(),  m_athenaComps(athenaComps), m_distortedMatManager(0), m_placements(0)
+  TRTParameterInterface(),  m_athenaComps(athenaComps), m_distortedMatManager(nullptr), m_placements(nullptr)
 { SetValues(); }
 
 //_________________________________________________________________________________________
@@ -66,8 +66,8 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() {
  
   // Get tag key and corresponding node 
   DecodeVersionKey versionKey(m_athenaComps->geoDbTagSvc(),"TRT");
-  std::string detectorKey  = versionKey.tag();
-  std::string detectorNode = versionKey.node();
+  const std::string& detectorKey  = versionKey.tag();
+  const std::string& detectorNode = versionKey.node();
 
   // Get version tag and node for InnerDetector.
   DecodeVersionKey indetVersionKey(m_athenaComps->geoDbTagSvc(),"InnerDetector");
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx
index a80f693dc1ed..28651a2f8839 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TRT_DetectorTool.h"
@@ -40,8 +40,8 @@ TRT_DetectorTool::TRT_DetectorTool( const std::string& type, const std::string&
     m_doArgonMixture(1),
     m_doKryptonMixture(1),
     m_useDynamicAlignFolders(false),
-    m_manager(0),
-    m_athenaComps(0)
+    m_manager(nullptr),
+    m_athenaComps(nullptr)
 {
   declareProperty("UseOldActiveGasMixture", m_useOldActiveGasMixture = false );
   declareProperty("DC2CompatibleBarrelCoordinates",  m_DC2CompatibleBarrelCoordinates = false );
@@ -105,7 +105,7 @@ StatusCode TRT_DetectorTool::create()
   //
   if (sqliteReader) {
 
-    if ( 0 == m_detector ) {
+    if ( nullptr == m_detector ) {
 
       // Retrieve the Geometry DB Interface                                                                                                                                                                                                                                                                      
       ATH_CHECK( m_geometryDBSvc.retrieve() );
@@ -250,7 +250,7 @@ StatusCode TRT_DetectorTool::create()
     m_athenaComps->setGeometryDBSvc(&*m_geometryDBSvc);
     
     
-    if ( 0 == m_detector ) {
+    if ( nullptr == m_detector ) {
       
       ATH_MSG_INFO( " Building TRT geometry from GeoModel factory TRTDetectorFactory_Full" );
       
@@ -385,7 +385,7 @@ StatusCode TRT_DetectorTool::clear()
   SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<InDetDD::TRT_DetectorManager>::ID(),m_manager->getName());
   if(proxy) {
     proxy->reset();
-    m_manager = 0;
+    m_manager = nullptr;
   }
   return StatusCode::SUCCESS;
 }
diff --git a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_BarrelElement.cxx b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_BarrelElement.cxx
index 78a3ac8e52f5..c71c2d528dd4 100755
--- a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_BarrelElement.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_BarrelElement.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 "Identifier/Identifier.h"
@@ -122,7 +122,7 @@ HepGeom::Transform3D TRT_BarrelElement::calculateStrawTransform(int straw) const
     ////  * calculateLocalStrawTransform(straw);
  } else {
     std::cout << "calculateStrawTransform:  f is 0 !!!!" << std::endl;
-    return HepGeom::Transform3D();
+    return {};
   }
 }
 
@@ -174,7 +174,7 @@ HepGeom::Transform3D TRT_BarrelElement::defStrawTransform(int straw) const
       * HepGeom::RotateY3D(zAng)*HepGeom::TranslateZ3D(zPos);
   } else {
     std::cout << "calculateStrawTransform:  f is 0 !!!!" << std::endl;
-    return HepGeom::Transform3D();
+    return {};
   }
 
 }
diff --git a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/PixelIDDetDescrCnv.cxx b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/PixelIDDetDescrCnv.cxx
index 2b53f7869f1b..6651511c488d 100644
--- a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/PixelIDDetDescrCnv.cxx
+++ b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/PixelIDDetDescrCnv.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
 */
 
 /***************************************************************************
@@ -235,7 +235,7 @@ PixelIDDetDescrCnv::classID() {
 PixelIDDetDescrCnv::PixelIDDetDescrCnv(ISvcLocator* svcloc) 
     :
     DetDescrConverter(ClassID_traits<PixelID>::ID(), svcloc),
-    m_pixelId(0),
+    m_pixelId(nullptr),
     m_doChecks(false)
 
 {}
diff --git a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SCT_IDDetDescrCnv.cxx b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SCT_IDDetDescrCnv.cxx
index 61727d143076..52d9f92b32aa 100644
--- a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SCT_IDDetDescrCnv.cxx
+++ b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SCT_IDDetDescrCnv.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
 */
 
 /***************************************************************************
@@ -235,7 +235,7 @@ SCT_IDDetDescrCnv::classID() {
 SCT_IDDetDescrCnv::SCT_IDDetDescrCnv(ISvcLocator* svcloc) 
     :
     DetDescrConverter(ClassID_traits<SCT_ID>::ID(), svcloc),
-    m_sctId(0),
+    m_sctId(nullptr),
     m_doChecks(false)
 
 {}
diff --git a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SiliconIDDetDescrCnv.cxx b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SiliconIDDetDescrCnv.cxx
index 0e2ca54c944c..9d6228d75d35 100644
--- a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SiliconIDDetDescrCnv.cxx
+++ b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/SiliconIDDetDescrCnv.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
 */
 
 /***************************************************************************
@@ -195,7 +195,7 @@ SiliconIDDetDescrCnv::classID() {
 SiliconIDDetDescrCnv::SiliconIDDetDescrCnv(ISvcLocator* svcloc) 
     :
     DetDescrConverter(ClassID_traits<SiliconID>::ID(), svcloc),
-    m_siliconId(0)
+    m_siliconId(nullptr)
 
 {}
 
diff --git a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/TRT_IDDetDescrCnv.cxx b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/TRT_IDDetDescrCnv.cxx
index 97fba7cbc22e..d4aab38dae89 100644
--- a/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/TRT_IDDetDescrCnv.cxx
+++ b/InnerDetector/InDetDetDescrCnv/InDetIdCnv/src/TRT_IDDetDescrCnv.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
 */
 
 /***************************************************************************
@@ -235,7 +235,7 @@ TRT_IDDetDescrCnv::classID() {
 TRT_IDDetDescrCnv::TRT_IDDetDescrCnv(ISvcLocator* svcloc) 
     :
     DetDescrConverter(ClassID_traits<TRT_ID>::ID(), svcloc),
-    m_trtId(0),
+    m_trtId(nullptr),
     m_doChecks(false)
 {}
 
diff --git a/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.cxx b/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.cxx
index e6c50884c547..cdabf9c79c5b 100644
--- a/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.cxx
@@ -1,7 +1,9 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
+#include <cmath>
+
 #include "BCM_DigitizationTool.h"
 
 #include "AthenaKernel/errorcheck.h"
@@ -187,7 +189,7 @@ StatusCode BCM_DigitizationTool::processAllSubEvents(const EventContext& ctx)
 
   }
   else {
-    typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+    using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
     TimedHitCollList hitCollList;
     if (!(m_mergeSvc->retrieveSubEvtsData(m_inputObjectName, hitCollList).isSuccess()) && hitCollList.size()==0) {
       ATH_MSG_ERROR ( "Could not fill TimedHitCollList" );
@@ -236,7 +238,7 @@ StatusCode BCM_DigitizationTool::processBunchXing(int bunchXing,
                       << " event number : " << iEvt->ptr()->eventNumber()
                       << " run number : " << iEvt->ptr()->runNumber()
                       );
-    const SiHitCollection* seHitColl = 0;
+    const SiHitCollection* seHitColl = nullptr;
     CHECK(seStore.retrieve(seHitColl,m_inputObjectName));
     ATH_MSG_DEBUG ( "SiHitCollection found with " << seHitColl->size() << " hits" );
     SiHitCollection::const_iterator i = seHitColl->begin();
@@ -265,7 +267,7 @@ StatusCode BCM_DigitizationTool::mergeEvent(const EventContext& ctx)
 //----------------------------------------------------------------------
 // ComputeEnergy method:
 //----------------------------------------------------------------------
-float BCM_DigitizationTool::computeEnergy(float simEner, HepGeom::Point3D<double> startPos, HepGeom::Point3D<double> endPos)
+float BCM_DigitizationTool::computeEnergy(float simEner, const HepGeom::Point3D<double>& startPos, const HepGeom::Point3D<double>& endPos)
 {
   // Initialize output energy
   float calcEner = 0;
@@ -278,8 +280,8 @@ float BCM_DigitizationTool::computeEnergy(float simEner, HepGeom::Point3D<double
     if (xStep==0 && yStep==0) effStep = 1.;
     else {
       rStep = sqrt(pow(xStep,2)+pow(yStep,2));
-      r0Step = fabs(yStep)>fabs(xStep) ? rStep*m_effPrmDistance/fabs(yStep) : rStep*m_effPrmDistance/fabs(xStep);
-      effStep = 1/(1+exp((rStep-r0Step)/m_effPrmSharpness));
+      r0Step = std::abs(yStep)>std::abs(xStep) ? rStep*m_effPrmDistance/std::abs(yStep) : rStep*m_effPrmDistance/std::abs(xStep);
+      effStep = 1/(1+std::exp((rStep-r0Step)/m_effPrmSharpness));
     }
     calcEner+= 0.1*simEner*effStep;
   }
@@ -437,7 +439,7 @@ void BCM_DigitizationTool::findPulses(std::bitset<64> digital, int &p1x, int &p1
 //----------------------------------------------------------------------
 void BCM_DigitizationTool::fillRDO(unsigned int chan, int p1x, int p1w, int p2x, int p2w)
 {
-  BCM_RDO_Collection *RDOColl = 0;
+  BCM_RDO_Collection *RDOColl = nullptr;
   // Check if collection for this channel already exists
   bool collExists = false;
   BCM_RDO_Container::iterator it_coll = m_rdoContainer->begin();
diff --git a/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.h b/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.h
index 132b6b2fd8ff..d3aa17404809 100644
--- a/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.h
+++ b/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef BCM_DIGITIZATION_BCM_DIGITIZATIONTOOL_H
@@ -56,7 +56,7 @@ class BCM_DigitizationTool : public PileUpToolBase {
   void createRDOsAndSDOs(const EventContext& ctx);
 
   /** Compute energy deposit depending on hit position */
-  float computeEnergy(float simEner, HepGeom::Point3D<double> startPos, HepGeom::Point3D<double> endPos);
+  float computeEnergy(float simEner, const HepGeom::Point3D<double>& startPos, const HepGeom::Point3D<double>& endPos);
 
   /** Fill in hit pulses on analog waveform */
   std::vector<float> createAnalog(int mod, std::vector<float> enerVect, std::vector<float> timeVect);
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h
index ffacecc9c1fe..d2184fe70676 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -99,7 +99,7 @@ public:
     ClusterInfo calculateNewCluster(CLUSTER * clusterA, CLUSTER * clusterB);
 
   template<typename CLUSTER>
-    StatusCode FillTruthMap(PRD_MultiTruthCollection*, CLUSTER*, TimedHitPtr<SiHit>);
+    StatusCode FillTruthMap(PRD_MultiTruthCollection*, CLUSTER*, const TimedHitPtr<SiHit>&);
 
  private:
 
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
index 93f9466ba052..ca404dfd97f2 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ////////////////////////////////////////////////////////////////////////////
@@ -238,7 +238,7 @@ StatusCode PixelFastDigitizationTool::processBunchXing(int bunchXing,
   if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper )  { return StatusCode::SUCCESS; }
   if (m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; }
 
-  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
   TimedHitCollList hitCollList;
 
   if (!(m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
@@ -279,7 +279,7 @@ StatusCode PixelFastDigitizationTool::processAllSubEvents(const EventContext& ct
     return StatusCode::FAILURE;
   }
 
-  InDet::SiClusterContainer* symSiContainer=0;
+  InDet::SiClusterContainer* symSiContainer=nullptr;
 
   // --------------------------------------
   // Pixel Cluster container registration
@@ -318,7 +318,7 @@ StatusCode PixelFastDigitizationTool::processAllSubEvents(const EventContext& ct
 
 
   //  get the container(s)
-  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
 
   //this is a list<pair<time_t, DataLink<SCTUncompressedHitCollection> > >
   TimedHitCollList hitCollList;
@@ -397,7 +397,7 @@ StatusCode PixelFastDigitizationTool::mergeEvent(const EventContext& ctx)
     return StatusCode::FAILURE;
   }
 
-  InDet::SiClusterContainer* symSiContainer=0;
+  InDet::SiClusterContainer* symSiContainer=nullptr;
 
   // --------------------------------------
   // Pixel_Cluster container registration
@@ -432,7 +432,7 @@ StatusCode PixelFastDigitizationTool::mergeEvent(const EventContext& ctx)
 
   m_ambiguitiesMap =new PixelGangedClusterAmbiguities();
 
-  if (m_thpcsi != 0) {
+  if (m_thpcsi != nullptr) {
     if(digitize(ctx).isFailure()) {
       ATH_MSG_FATAL ( "Pixel digitize method failed!" );
       return StatusCode::FAILURE;
@@ -637,7 +637,7 @@ StatusCode PixelFastDigitizationTool::digitize(const EventContext& ctx)
 
 
       // the pixel positions and other needed stuff for the geometrical clustering
-      InDet::PixelCluster* pixelCluster = 0;
+      InDet::PixelCluster* pixelCluster = nullptr;
       Amg::Vector2D       clusterPosition(0.,0.);
 
       std::vector<Identifier>           rdoList;
@@ -851,7 +851,7 @@ StatusCode PixelFastDigitizationTool::digitize(const EventContext& ctx)
       }
 
       //Add all hit that was connected to the cluster
-      for(HepMcParticleLink p: hit_vector){
+      for(const HepMcParticleLink& p: hit_vector){
 
         m_pixPrdTruth->insert(std::make_pair(pixelCluster->identify(), p ));
       }
@@ -882,7 +882,7 @@ StatusCode PixelFastDigitizationTool::createAndStoreRIOs(const EventContext& ctx
   Pixel_detElement_RIO_map::iterator i = m_pixelClusterMap->begin();
   Pixel_detElement_RIO_map::iterator e = m_pixelClusterMap->end();
 
-  InDet::PixelClusterCollection* clusterCollection = 0;
+  InDet::PixelClusterCollection* clusterCollection = nullptr;
   IdentifierHash waferHash;
 
   for (; i != e; i = m_pixelClusterMap->upper_bound(i->first)){
@@ -1044,14 +1044,14 @@ Amg::Vector3D PixelFastDigitizationTool::CalculateIntersection(const Amg::Vector
   for(double parameter: parameters)
     {
       double z =  Point.z() + Direction.z() * parameter;
-      if( fabs(z) > halfthickness )
+      if( std::abs(z) > halfthickness )
         continue;
 
 
       double x = Point.x() + Direction.x() * parameter;
       double y = Point.y() + Direction.y() * parameter;
 
-      if(fabs(x) > PlaneBorder.x() || fabs(y) > PlaneBorder.y())
+      if(std::abs(x) > PlaneBorder.x() || std::abs(y) > PlaneBorder.y())
         continue;
 
 
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx
index 6ba88938b337..2ea952efafde 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "FastSiDigitization/SCT_FastDigitizationTool.h"
@@ -169,7 +169,7 @@ StatusCode SCT_FastDigitizationTool::processBunchXing(int bunchXing,
   if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper )  { return StatusCode::SUCCESS; }
   if (m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; }
 
-  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
   TimedHitCollList hitCollList;
 
   if (!(m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
@@ -216,7 +216,7 @@ StatusCode SCT_FastDigitizationTool::createOutputContainers()
 
   // --------------------------------------
   // symlink the SCT Container
-  InDet::SiClusterContainer* symSiContainer=0;
+  InDet::SiClusterContainer* symSiContainer=nullptr;
   CHECK(evtStore()->symLink(m_sctClusterContainer.ptr(),symSiContainer));
   ATH_MSG_DEBUG( "[ hitproc ] SCT_ClusterContainer symlinked to SiClusterContainer in StoreGate" );
   // --------------------------------------
@@ -240,7 +240,7 @@ StatusCode SCT_FastDigitizationTool::processAllSubEvents(const EventContext& ctx
   CHECK(this->createOutputContainers());
 
   //  get the container(s)
-  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
 
   //this is a list<pair<time_t, DataLink<SCTUncompressedHitCollection> > >
   TimedHitCollList hitCollList;
@@ -292,7 +292,7 @@ StatusCode SCT_FastDigitizationTool::mergeEvent(const EventContext& ctx)
 {
   CHECK(this->createOutputContainers());
 
-  if (m_thpcsi != 0)
+  if (m_thpcsi != nullptr)
     {
       CHECK(this->digitize(ctx));
     }
@@ -937,7 +937,7 @@ StatusCode SCT_FastDigitizationTool::digitize(const EventContext& ctx)
             }
 
 
-          for(HepMcParticleLink p: hit_vector){
+          for(const HepMcParticleLink& p: hit_vector){
             m_sctPrdTruth->insert(std::make_pair(potentialCluster->identify(), p ));
           }
 
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
index c90d77971f1f..2f74bebf3cb0 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ////////////////////////////////////////////////////////////////////////////
@@ -65,19 +65,19 @@ using namespace InDetDD;
 SiSmearedDigitizationTool::SiSmearedDigitizationTool(const std::string &type, const std::string &name,
                                                      const IInterface* parent):
   PileUpToolBase(type, name, parent),
-  m_thpcsi(NULL),
+  m_thpcsi(nullptr),
   m_rndmSvc("AtRndmGenSvc",name),
-  m_pixel_ID(0),
-  m_sct_ID(0),
-  m_randomEngine(0),
+  m_pixel_ID(nullptr),
+  m_sct_ID(nullptr),
+  m_randomEngine(nullptr),
   m_randomEngineName("SiSmearedDigitization"),
   m_pitch_X(0),
   m_pitch_Y(0),
   m_merge(false),
   m_nSigma(0.),
   m_useDiscSurface(false),
-  m_pixelClusterContainer(0),
-  m_sctClusterContainer(0),
+  m_pixelClusterContainer(nullptr),
+  m_sctClusterContainer(nullptr),
   m_mergeSvc("PileUpMergeSvc",name),
   m_HardScatterSplittingMode(0),
   m_HardScatterSplittingSkipper(false),
@@ -86,9 +86,9 @@ SiSmearedDigitizationTool::SiSmearedDigitizationTool(const std::string &type, co
   m_SmearPixel(true), //true: smear pixel --- false: smear SCT
   m_emulateAtlas(true), // error rotation for endcap SCT
   m_checkSmear(false),
-  m_thistSvc(NULL),
-  m_outputFile(NULL),
-  m_currentTree(NULL),
+  m_thistSvc(nullptr),
+  m_outputFile(nullptr),
+  m_currentTree(nullptr),
   m_x_pixel(0),
   m_y_pixel(0),
   m_x_exit_pixel(0),
@@ -295,7 +295,7 @@ StatusCode SiSmearedDigitizationTool::processBunchXing(int bunchXing,
   if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper )  { return StatusCode::SUCCESS; }
   if (m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; }
 
-  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
   TimedHitCollList hitCollList;
 
   if (!(m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
@@ -331,7 +331,7 @@ StatusCode SiSmearedDigitizationTool::processAllSubEvents(const EventContext& ct
 
   ATH_MSG_DEBUG( "--- SiSmearedDigitizationTool: in pixel processAllSubEvents() ---" );
 
-  InDet::SiClusterContainer* symSiContainer=0;
+  InDet::SiClusterContainer* symSiContainer=nullptr;
 
   if(m_SmearPixel){ // Smear Pixel
     m_pixelClusterContainer = new InDet::PixelClusterContainer(m_pixel_ID->wafer_hash_max());
@@ -395,7 +395,7 @@ StatusCode SiSmearedDigitizationTool::processAllSubEvents(const EventContext& ct
   }
 
   //  get the container(s)
-  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
 
   m_simHitColl = new SiHitCollection;
 
@@ -493,7 +493,7 @@ StatusCode SiSmearedDigitizationTool::retrieveTruth(){
 }
 
 template<typename CLUSTER>
-StatusCode SiSmearedDigitizationTool::FillTruthMap(PRD_MultiTruthCollection * map, CLUSTER * cluster, TimedHitPtr<SiHit> hit){
+StatusCode SiSmearedDigitizationTool::FillTruthMap(PRD_MultiTruthCollection * map, CLUSTER * cluster, const TimedHitPtr<SiHit>& hit){
 
   ATH_MSG_DEBUG("Truth map filling with cluster " << *cluster << " and link = " << hit->particleLink());
   if (hit->particleLink().isValid()){
@@ -538,10 +538,10 @@ double SiSmearedDigitizationTool::calculateDistance(CLUSTER * clusterA, CLUSTER
 template<typename CLUSTER>
 double SiSmearedDigitizationTool::calculateSigma(CLUSTER * clusterA, CLUSTER * clusterB){
   // take needed information on the first cluster
-  Amg::MatrixX clusterErr_a = clusterA->localCovariance();
+  const Amg::MatrixX& clusterErr_a = clusterA->localCovariance();
 
   // take needed information on the second clusters
-  Amg::MatrixX clusterErr_b = clusterB->localCovariance();
+  const Amg::MatrixX& clusterErr_b = clusterB->localCovariance();
 
   double sigmaX = sqrt(Amg::error(clusterErr_a,Trk::locX) * Amg::error(clusterErr_a,Trk::locX) +
                        Amg::error(clusterErr_b,Trk::locX) * Amg::error(clusterErr_b,Trk::locX));
@@ -556,11 +556,11 @@ template<typename CLUSTER>
 ClusterInfo SiSmearedDigitizationTool::calculateNewCluster(CLUSTER * clusterA, CLUSTER * clusterB) {
   // take needed information on the first clusters
   Amg::Vector2D intersection_a = clusterA->localPosition();
-  Amg::MatrixX clusterErr_a = clusterA->localCovariance();
+  const Amg::MatrixX& clusterErr_a = clusterA->localCovariance();
 
   // take needed information on the second clusters
   Amg::Vector2D intersection_b = clusterB->localPosition();
-  Amg::MatrixX clusterErr_b = clusterB->localCovariance();
+  const Amg::MatrixX& clusterErr_b = clusterB->localCovariance();
 
   double sigmaX = sqrt(Amg::error(clusterErr_a,Trk::locX) * Amg::error(clusterErr_a,Trk::locX) +
                        Amg::error(clusterErr_b,Trk::locX) * Amg::error(clusterErr_b,Trk::locX));
@@ -575,8 +575,8 @@ ClusterInfo SiSmearedDigitizationTool::calculateNewCluster(CLUSTER * clusterA, C
 
   ATH_MSG_DEBUG( "--- SiSmearedDigitizationTool: intersection = " << intersection);
 
-  InDet::SiWidth siWidth_a = clusterA->width();
-  InDet::SiWidth siWidth_b = clusterB->width();
+  const InDet::SiWidth& siWidth_a = clusterA->width();
+  const InDet::SiWidth& siWidth_b = clusterB->width();
 
   ATH_MSG_DEBUG( "--- SiSmearedDigitizationTool: siWidth_a = " << siWidth_a);
   ATH_MSG_DEBUG( "--- SiSmearedDigitizationTool: siWidth_b = " << siWidth_b);
@@ -649,7 +649,7 @@ StatusCode SiSmearedDigitizationTool::mergeClusters(Pixel_detElement_RIO_map * c
                                                                         rdoList,
                                                                         siWidth,
                                                                         hitSiDetElement,
-                                                                        std::move(clusterErr));
+                                                                        clusterErr);
             ((*inner_iter).second) = pixelCluster;
 
             cluster_map->erase(iter);
@@ -716,7 +716,7 @@ StatusCode SiSmearedDigitizationTool::mergeClusters(SCT_detElement_RIO_map * clu
                                                                     rdoList,
                                                                     siWidth,
                                                                     hitSiDetElement,
-                                                                    std::move(clusterErr));
+                                                                    clusterErr);
             ((*inner_iter).second) = sctCluster;
 
             cluster_map->erase(iter);
@@ -777,7 +777,7 @@ StatusCode SiSmearedDigitizationTool::digitize(const EventContext& ctx)
       int etaModule = hit->getEtaModule();
       int side      = 0;
 
-      const InDetDD::SiDetectorElement* hitSiDetElement = 0;
+      const InDetDD::SiDetectorElement* hitSiDetElement = nullptr;
 
       if(m_SmearPixel) { // Smear Pixel
         Identifier wafer_id = m_pixel_ID->wafer_id(barrelEC,layerDisk,phiModule,etaModule);
@@ -847,8 +847,8 @@ StatusCode SiSmearedDigitizationTool::digitize(const EventContext& ctx)
         localExitZ  = sct_localEndPosition.z();
       }
 
-      double distX = std::fabs(std::fabs(localExitX)-std::fabs(localEntryX));
-      double distY = std::fabs(std::fabs(localExitY)-std::fabs(localEntryY));
+      double distX = std::abs(std::abs(localExitX)-std::abs(localEntryX));
+      double distY = std::abs(std::abs(localExitY)-std::abs(localEntryY));
 
       if(m_SmearPixel) { // Smear Pixel
         ATH_MSG_DEBUG( "--- SiSmearedDigitizationTool: pixel start position --- " << localEntryX << ",  " << localEntryY << ",  " << localEntryZ );
@@ -987,7 +987,7 @@ StatusCode SiSmearedDigitizationTool::digitize(const EventContext& ctx)
 
         InDet::SiWidth siWidth(Amg::Vector2D(elementX,elementY), Amg::Vector2D(lengthX, lengthY));
 
-        InDet::PixelCluster* pixelCluster = 0;
+        InDet::PixelCluster* pixelCluster = nullptr;
 
         AmgSymMatrix(2) covariance;
         covariance.setIdentity();
@@ -1037,7 +1037,7 @@ StatusCode SiSmearedDigitizationTool::digitize(const EventContext& ctx)
       } else { // Smear SCT --> Create SCT Cluster
 
         // prepare the clusters
-        InDet::SCT_Cluster * sctCluster = 0;
+        InDet::SCT_Cluster * sctCluster = nullptr;
 
         // Pixel Design needed -------------------------------------------------------------
         const InDetDD::SCT_ModuleSideDesign* design_sct;
@@ -1052,7 +1052,7 @@ StatusCode SiSmearedDigitizationTool::digitize(const EventContext& ctx)
         // Find length of strip at centre
         double clusterWidth = rdoList.size()*hitSiDetElement->phiPitch(intersection);
         const std::pair<InDetDD::SiLocalPosition, InDetDD::SiLocalPosition> ends(design_sct->endsOfStrip(intersection));
-        double stripLength = fabs(ends.first.xEta()-ends.second.xEta());
+        double stripLength = std::abs(ends.first.xEta()-ends.second.xEta());
 
         InDet::SiWidth siWidth(Amg::Vector2D(int(rdoList.size()),1),
                                Amg::Vector2D(clusterWidth,stripLength) );
diff --git a/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx
index cc82b9657042..dc168405e527 100644
--- a/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -166,7 +166,7 @@ StatusCode TRTFastDigitizationTool::processBunchXing( int bunchXing,
   if ( m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper )  { return StatusCode::SUCCESS; }
   if ( m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; }
 
-  typedef PileUpMergeSvc::TimedList<TRTUncompressedHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<TRTUncompressedHitCollection>::type;
   TimedHitCollList hitCollList;
 
   if (!(m_mergeSvc->retrieveSubSetEvtData(m_trtHitCollectionKey, hitCollList, bunchXing,
@@ -355,7 +355,7 @@ StatusCode TRTFastDigitizationTool::produceDriftCircles(const EventContext& ctx)
 
       double sigmaTrt = m_trtSigmaDriftRadiusTail;
       if ( !isTail ) {
-        double driftTime = m_trtDriftFunctionTool->approxDriftTime( fabs( driftRadiusLoc ) );
+        double driftTime = m_trtDriftFunctionTool->approxDriftTime( std::abs( driftRadiusLoc ) );
         sigmaTrt = m_trtDriftFunctionTool->errorOfDriftRadius( driftTime, hit_id, m_NCollPerEvent );
       }
 
@@ -426,7 +426,7 @@ StatusCode TRTFastDigitizationTool::produceDriftCircles(const EventContext& ctx)
         new InDet::TRT_DriftCircle(straw_id,
                                    hitLocalPosition,
                                    rdoList,
-                                   std::move(hitErrorMatrix),
+                                   hitErrorMatrix,
                                    trtBaseElement,
                                    word);
       if (!trtDriftCircle)
@@ -458,7 +458,7 @@ StatusCode TRTFastDigitizationTool::processAllSubEvents(const EventContext& ctx)
 
   CHECK( this->createOutputContainers() );
 
-  typedef PileUpMergeSvc::TimedList< TRTUncompressedHitCollection >::type HitCollectionTimedList;
+  using HitCollectionTimedList = PileUpMergeSvc::TimedList<TRTUncompressedHitCollection>::type;
 
   HitCollectionTimedList hitCollectionTimedList;
   unsigned int numberOfSimHits = 0;
@@ -544,8 +544,8 @@ StatusCode TRTFastDigitizationTool::mergeEvent(const EventContext& ctx) {
 
 StatusCode TRTFastDigitizationTool::createAndStoreRIOs()
 {
-  typedef std::multimap< Identifier, InDet::TRT_DriftCircle * >::iterator DriftCircleMapItr;
-  typedef std::multimap< IdentifierHash, InDet::TRT_DriftCircle * >::iterator HashMapItr;
+  using DriftCircleMapItr = std::multimap<Identifier, InDet::TRT_DriftCircle *>::iterator;
+  using HashMapItr = std::multimap<IdentifierHash, InDet::TRT_DriftCircle *>::iterator;
 
   // empiric parameterization of the probability to merge to LT hits into a HT hit as a function of the number of collisions
   // TL - I first determined the value of highTRMergeProb which gives a good
@@ -637,7 +637,7 @@ double TRTFastDigitizationTool::getDriftRadiusFromXYZ( const TimedHitPtr< TRTUnc
   vecDir = vecDir.unit();
 
   double driftRadius = 0.;
-  if ( fabs( vecDir.x() ) < 1.0e-6 && fabs( vecDir.y() ) < 1.0e-6 ) {
+  if ( std::abs( vecDir.x() ) < 1.0e-6 && std::abs( vecDir.y() ) < 1.0e-6 ) {
     driftRadius = vecEnter.perp();
   }
   else {
@@ -753,7 +753,7 @@ HepGeom::Point3D< double > TRTFastDigitizationTool::getGlobalPosition( const Tim
   }
 
   ATH_MSG_WARNING( "Could not find global coordinate of a straw - drifttime calculation will be inaccurate" );
-  return HepGeom::Point3D< double >( 0., 0., 0. );
+  return { 0., 0., 0. };
 }
 
 
@@ -843,11 +843,11 @@ double TRTFastDigitizationTool::getProbHT( int particleEncoding, float kineticEn
   const double hitGlobalPositionMin[] = {   0.,  630.,  630. };
   const double hitGlobalPositionMax[] = { 720., 1030., 1030. };
 
-  if ( fabs(hitGlobalPosition) < hitGlobalPositionMin[ trtPart ] ) {
+  if ( std::abs(hitGlobalPosition) < hitGlobalPositionMin[ trtPart ] ) {
     ATH_MSG_WARNING( "hitGlobalPosition was below allowed range (will be adjusted): trtPart = " << trtPart << ", hitGlobalPosition = " << hitGlobalPosition );
     hitGlobalPosition = copysign(hitGlobalPositionMin[ trtPart ] + 0.001,hitGlobalPosition);
   }
-  if ( fabs(hitGlobalPosition) > hitGlobalPositionMax[ trtPart ] ) {
+  if ( std::abs(hitGlobalPosition) > hitGlobalPositionMax[ trtPart ] ) {
     ATH_MSG_WARNING( "hitGlobalPosition was above allowed range (will be adjusted): trtPart = " << trtPart << ", hitGlobalPosition = " << hitGlobalPosition );
     hitGlobalPosition = copysign(hitGlobalPositionMax[ trtPart ] - 0.001,hitGlobalPosition);
   }
@@ -884,7 +884,7 @@ double TRTFastDigitizationTool::HTProbabilityElectron_high_pt( double eta )
                                                      0.365              // > 1.82
                                                    };
 
-  return probability[ std::distance( bins.begin(), std::lower_bound( bins.begin(), bins.end(), fabs( eta ) ) ) ];
+  return probability[ std::distance( bins.begin(), std::lower_bound( bins.begin(), bins.end(), std::abs( eta ) ) ) ];
 }
 
 
@@ -908,7 +908,7 @@ double TRTFastDigitizationTool::HTProbabilityElectron_low_pt( double eta )
                                                      0.365              // > 1.82
                                                    };
 
-  return probability[ std::distance( bins.begin(), std::lower_bound( bins.begin(), bins.end(), fabs( eta ) ) ) ];
+  return probability[ std::distance( bins.begin(), std::lower_bound( bins.begin(), bins.end(), std::abs( eta ) ) ) ];
 }
 
 
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx
index a2705e349131..ccd16cb7ff52 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "PixelDigitizationTool.h"
@@ -66,7 +66,7 @@ StatusCode PixelDigitizationTool::processAllSubEvents(const EventContext& ctx) {
   ATH_CHECK(prepareEvent(ctx, 0));
 
   // Get the container(s)
-  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
   // In case of single hits container just load the collection using read handles
   if (!m_onlyUseContainerName) {
     SG::ReadHandle<SiHitCollection> hitCollection(m_hitsContainerKey, ctx);
@@ -171,7 +171,7 @@ StatusCode PixelDigitizationTool::digitizeEvent(const EventContext& ctx) {
     ///////////////////////////////////////////////////////////
     for (TimedHitCollection<SiHit>::const_iterator phit = firstHit; phit != lastHit; ++phit) {
       //skip hits which are more than 10us away
-      if (fabs((*phit)->meanTime()) < 10000.0 * CLHEP::ns) {
+      if (std::abs((*phit)->meanTime()) < 10000.0 * CLHEP::ns) {
         ATH_MSG_DEBUG("HASH = " <<
           m_detID->wafer_hash(m_detID->wafer_id((*phit)->getBarrelEndcap(), (*phit)->getLayerDisk(),
                                                 (*phit)->getPhiModule(), (*phit)->getEtaModule())));
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx
index 22352b264514..768b261b4b47 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_Amp.h"
@@ -77,7 +77,7 @@ float SCT_Amp::response(const list_t& Charges, const float timeOfThreshold) cons
     float tC{static_cast<float>(timeOfThreshold - charge.time())};
     if (tC > 0.0) {
       tC/=tp; //to avoid doing it four times
-      resp += ch*tC*tC*tC*exp(-tC); //faster than pow
+      resp += ch*tC*tC*tC*std::exp(-tC); //faster than pow
     }
   }
   return resp*m_NormConstCentral;
@@ -96,7 +96,7 @@ void SCT_Amp::response(const list_t& Charges, const float timeOfThreshold, std::
       float tC{bin_timeOfThreshold - ch_time};
       if (tC > 0.0) {
         tC/=tp; //to avoid doing it four times
-        response[bin+1] += ch*tC*tC*tC*exp(-tC); //faster than pow
+        response[bin+1] += ch*tC*tC*tC*std::exp(-tC); //faster than pow
       }
     }
   }
@@ -115,7 +115,7 @@ float SCT_Amp::crosstalk(const list_t& Charges, const float timeOfThreshold) con
     float tC{static_cast<float>(timeOfThreshold - charge.time())};
     if (tC > 0.0) {
       tC/=tp; //to avoid doing it four times
-      resp += ch*tC*tC*exp(-tC)*(3.0-tC); //faster than pow
+      resp += ch*tC*tC*std::exp(-tC)*(3.0-tC); //faster than pow
     }
   }
   return resp*m_NormConstNeigh;
@@ -134,7 +134,7 @@ void SCT_Amp::crosstalk(const list_t& Charges, const float timeOfThreshold, std:
       float tC{bin_timeOfThreshold - ch_time};
       if (tC > 0.0) {
         tC/=tp; //to avoid doing it four times
-        response[bin+1] += ch*tC*tC*exp(-tC)*(3.0-tC); //faster than pow
+        response[bin+1] += ch*tC*tC*std::exp(-tC)*(3.0-tC); //faster than pow
       }
     }
   }
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
index 305e0b5f4d45..bd0c53539fa6 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_DigitizationTool.h"
@@ -458,7 +458,7 @@ StatusCode SCT_DigitizationTool::processBunchXing(int bunchXing,
         m_HardScatterSplittingSkipper = true;
     }
 
-    typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+    using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
     TimedHitCollList hitCollList;
 
     if ((not (m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
@@ -704,7 +704,7 @@ std::unique_ptr<SCT_RDO_Collection> SCT_DigitizationTool::createRDO(SiChargedDio
 StatusCode SCT_DigitizationTool::getNextEvent(const EventContext& ctx) {
   ATH_MSG_DEBUG("SCT_DigitizationTool::getNextEvent");
   //  get the container(s)
-  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
   // this is a list<pair<time_t, DataLink<SiHitCollection> >
 
   // In case of single hits container just load the collection using read handles
@@ -759,7 +759,7 @@ StatusCode SCT_DigitizationTool::getNextEvent(const EventContext& ctx) {
 // Convert a SiTotalCharge to a InDetSimData, and store it.
 // -----------------------------------------------------------------------------------------------
 void SCT_DigitizationTool::addSDO(SiChargedDiodeCollection* collection, SG::WriteHandle<InDetSimDataCollection>* simDataCollMap) const {
-  typedef SiTotalCharge::list_t list_t;
+  using list_t = SiTotalCharge::list_t;
   std::vector<InDetSimData::Deposit> deposits;
   deposits.reserve(5); // no idea what a reasonable number for this would be
   // with pileup
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx
index e430b1b270bf..9acb8739592e 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_FrontEnd.h"
@@ -134,15 +134,15 @@ StatusCode SCT_FrontEnd::prepareGainAndOffset(SiChargedDiodeCollection& collecti
   // for generation of partially correlated random numbers
   float W = m_OGcorr * m_GainRMS * m_Ospread / (m_GainRMS * m_GainRMS - m_Ospread * m_Ospread);
   float A = 4.0f * W * W + 1.0f;
-  float x1 = (A - sqrt(A)) / (2.0f * A);
-  float sinfi = sqrt(x1);
+  float x1 = (A - std::sqrt(A)) / (2.0f * A);
+  float sinfi = std::sqrt(x1);
   float cosfi = sqrt(1.0 - x1);
 
   sinfi = sinfi * m_OGcorr / std::abs(m_OGcorr);
   float S = m_GainRMS * m_GainRMS + m_Ospread * m_Ospread;
   float D = (m_GainRMS * m_GainRMS - m_Ospread * m_Ospread) / (cosfi * cosfi - sinfi * sinfi);
-  float S1 = sqrt((S + D) * 0.5f);
-  float S2 = sqrt((S - D) * 0.5f);
+  float S1 = std::sqrt((S + D) * 0.5f);
+  float S2 = std::sqrt((S - D) * 0.5f);
   float Noise = 0;
   int mode = 1;
 
@@ -290,14 +290,14 @@ StatusCode SCT_FrontEnd::prepareGainAndOffset(SiChargedDiodeCollection& collecti
 
     float W = m_OGcorr * gainRMS * offsetRMS / (gainRMS * gainRMS - offsetRMS * offsetRMS);
     float A = 4.0f * W * W + 1.0f;
-    float x1 = (A - sqrt(A)) / (2.0f * A);
-    sinfi[i] = sqrt(x1);
-    cosfi[i] = sqrt(1.0f - x1);
+    float x1 = (A - std::sqrt(A)) / (2.0f * A);
+    sinfi[i] = std::sqrt(x1);
+    cosfi[i] = std::sqrt(1.0f - x1);
     sinfi[i] = sinfi[i] * m_OGcorr / std::abs(m_OGcorr);
     float S = gainRMS * gainRMS + offsetRMS * offsetRMS;
     float D = (gainRMS * gainRMS - offsetRMS * offsetRMS) / (cosfi[i] * cosfi[i] - sinfi[i] * sinfi[i]);
-    S1[i] = sqrt((S + D) / 2.0f);
-    S2[i] = sqrt((S - D) / 2.0f);
+    S1[i] = std::sqrt((S + D) / 2.0f);
+    S2[i] = std::sqrt((S - D) / 2.0f);
   }
 
   // Loop over collection and setup gain/offset/noise for the hit and neighbouring strips
@@ -658,7 +658,7 @@ void SCT_FrontEnd::process(SiChargedDiodeCollection& collection, CLHEP::HepRando
 }
 
 StatusCode SCT_FrontEnd::doSignalChargeForHits(SiChargedDiodeCollection& collection, SCT_FrontEndData& data, const int& strip_max) const {
-  typedef SiTotalCharge::list_t list_t;
+  using list_t = SiTotalCharge::list_t;
 
   // *****************************************************************************
   // Loop over the diodes (strips ) and for each of them define the total signal
diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/InducedChargeModel.h b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/InducedChargeModel.h
index de42bf536146..85251a906ca8 100644
--- a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/InducedChargeModel.h
+++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/InducedChargeModel.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef SIDIGITIZATION_INDUCEDCHARGEDMODEL_H
@@ -97,7 +97,7 @@ class InducedChargeModel {
                  const float vbias,
                  const InDetDD::SolidStateDetectorElementBase* element,
                  const AtlasFieldCacheCondObj* fieldCondObj,
-                 const ToolHandle<ISiliconConditionsTool> siConditionsTool,
+                 const ToolHandle<ISiliconConditionsTool>& siConditionsTool,
                  CLHEP::HepRandomEngine* rndmEngine,
                  const EventContext& ctx) const;
 
@@ -108,19 +108,19 @@ class InducedChargeModel {
                  const double x0, const double y0,
                  double* Q_m2, double* Q_m1, double* Q_00, double* Q_p1, double* Q_p2,
                  const IdentifierHash hashId,
-                 const ToolHandle<ISiPropertiesTool> siPropertiesTool,
+                 const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
                  const EventContext& ctx) const;
   void holeTransport(const SCT_InducedChargeModelData& data,
                      const double x0, const double y0,
                      double* Q_m2, double* Q_m1, double* Q_00, double* Q_p1, double* Q_p2,
                      const IdentifierHash hashId,
-                     const ToolHandle<ISiPropertiesTool> siPropertiesTool,
+                     const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
                      const EventContext& ctx) const;
   void electronTransport(const SCT_InducedChargeModelData& data,
                          const double x0, const double y0,
                          double* Q_m2, double* Q_m1, double* Q_00, double* Q_p1, double* Q_p2,
                          const IdentifierHash hashId,
-                         const ToolHandle<ISiPropertiesTool> siPropertiesTool,
+                         const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
                          const EventContext& ctx) const;
 
  private:
@@ -131,7 +131,7 @@ class InducedChargeModel {
                 const bool isElectron,
                 const double x, const double y, double& vx, double& vy, double& D,
                 const IdentifierHash hashId,
-                const ToolHandle<ISiPropertiesTool> siPropertiesTool,
+                const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
                 const EventContext& ctx) const;
   double induced(const SCT_InducedChargeModelData& data,
                  const int istrip, const double x, const double y) const;
diff --git a/InnerDetector/InDetDigitization/SiDigitization/src/InducedChargeModel.cxx b/InnerDetector/InDetDigitization/SiDigitization/src/InducedChargeModel.cxx
index bb1fe388ffca..da2370b815e8 100644
--- a/InnerDetector/InDetDigitization/SiDigitization/src/InducedChargeModel.cxx
+++ b/InnerDetector/InDetDigitization/SiDigitization/src/InducedChargeModel.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 //-----------------------------------------------
@@ -41,7 +41,7 @@ InducedChargeModel::setWaferData(const float vdepl,
                                      const float vbias,
                                      const InDetDD::SolidStateDetectorElementBase* element,
                                      const AtlasFieldCacheCondObj* fieldCondObj,
-                                     const ToolHandle<ISiliconConditionsTool> siConditionsTool,
+                                     const ToolHandle<ISiliconConditionsTool>& siConditionsTool,
                                      CLHEP::HepRandomEngine* rndmEngine,
                                      const EventContext& ctx) const {
   std::lock_guard<std::mutex> lock(m_mutex);
@@ -106,7 +106,7 @@ void InducedChargeModel::transport(const SCT_InducedChargeModelData& data,
                                        const double x0, const double y0,
                                        double* Q_m2, double* Q_m1, double* Q_00, double* Q_p1, double* Q_p2,
                                        const IdentifierHash hashId,
-                                       const ToolHandle<ISiPropertiesTool> siPropertiesTool,
+                                       const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
                                        const EventContext& ctx) const {
   // transport electrons and holes in the bulk
   // T. Kondo, 2010.9.9, 2017.7.20
@@ -192,7 +192,7 @@ void InducedChargeModel::holeTransport(const SCT_InducedChargeModelData& data,
                                            const double x0, const double y0,
                                            double* Q_m2, double* Q_m1, double* Q_00, double* Q_p1, double* Q_p2,
                                            const IdentifierHash hashId,
-                                           const ToolHandle<ISiPropertiesTool> siPropertiesTool,
+                                           const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
                                            const EventContext& ctx) const {
   // Q_m2[100],Q_m1[100],Q_00[100],Q_p1[100],Q_p2[100] NTransportSteps=100
   const bool isElectron = false;
@@ -212,7 +212,7 @@ void InducedChargeModel::electronTransport(const SCT_InducedChargeModelData& dat
                                                const double x0, const double y0,
                                                double* Q_m2, double* Q_m1, double* Q_00, double* Q_p1, double* Q_p2,
                                                const IdentifierHash hashId,
-                                               const ToolHandle<ISiPropertiesTool> siPropertiesTool,
+                                               const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
                                                const EventContext& ctx) const {
   // Q_m2[100],Q_m1[100],Q_00[100],Q_p1[100],Q_p2[100] NTransportSteps=100
   const bool isElectron = true;
@@ -232,7 +232,7 @@ bool InducedChargeModel::getVxVyD(const SCT_InducedChargeModelData& data,
                                       const bool isElectron,
                                       const double x, const double y, double& vx, double& vy, double& D,
                                       const IdentifierHash hashId,
-                                      const ToolHandle<ISiPropertiesTool> siPropertiesTool,
+                                      const ToolHandle<ISiPropertiesTool>& siPropertiesTool,
                                       const EventContext& ctx) const {
   double Ex, Ey;
   getEField(data, x, y, Ex, Ey); // [V/cm]
diff --git a/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx b/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx
index 1118e13afad8..ef6e5fd51a99 100755
--- a/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx
+++ b/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ SiChargedDiodeCollection::~SiChargedDiodeCollection()
 
 // Clean up the collection
 void SiChargedDiodeCollection::clear() {
-  m_sielement = 0;
+  m_sielement = nullptr;
   m_chargedDiodes.erase(m_chargedDiodes.begin(), m_chargedDiodes.end() );
   m_orderedChargedDiodes.clear();
 }
@@ -69,7 +69,7 @@ SiChargedDiode * SiChargedDiodeCollection::find(const InDetDD::SiCellId & siId)
   // get the compact Id to access the map
   SiChargedDiodeIterator theEl = m_chargedDiodes.find(siId);
   // if the diode exists return a pointer to it:
-  if (theEl == m_chargedDiodes.end() ) return NULL;
+  if (theEl == m_chargedDiodes.end() ) return nullptr;
   else return &( (*theEl).second);
 }		      
 
diff --git a/InnerDetector/InDetDigitization/StripDigitization/src/StripDigitizationTool.cxx b/InnerDetector/InDetDigitization/StripDigitization/src/StripDigitizationTool.cxx
index 1eec34e3f77c..f738d7ac30d3 100644
--- a/InnerDetector/InDetDigitization/StripDigitization/src/StripDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/StripDigitization/src/StripDigitizationTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "StripDigitizationTool.h"
@@ -570,7 +570,7 @@ StatusCode StripDigitizationTool::processBunchXing(int bunchXing,
         m_HardScatterSplittingSkipper = true;
     }
 
-    typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+    using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
     TimedHitCollList hitCollList;
 
     if ((not (m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
@@ -816,7 +816,7 @@ std::unique_ptr<SCT_RDO_Collection> StripDigitizationTool::createRDO(SiChargedDi
 StatusCode StripDigitizationTool::getNextEvent(const EventContext& ctx) {
   ATH_MSG_DEBUG("StripDigitizationTool::getNextEvent");
   //  get the container(s)
-  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
   // this is a list<pair<time_t, DataLink<SiHitCollection> >
 
   // In case of single hits container just load the collection using read handles
@@ -872,7 +872,7 @@ StatusCode StripDigitizationTool::getNextEvent(const EventContext& ctx) {
 // -----------------------------------------------------------------------------------------------
 void StripDigitizationTool::addSDO(SiChargedDiodeCollection* collection, SG::WriteHandle<InDetSimDataCollection>* simDataCollMap) const {
 
-  typedef SiTotalCharge::list_t list_t;
+  using list_t = SiTotalCharge::list_t;
   std::vector<InDetSimData::Deposit> deposits;
   deposits.reserve(5); // no idea what a reasonable number for this would be
   // with pileup
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigCondBase.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigCondBase.cxx
index 8405ae1ca464..a178d9199803 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigCondBase.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigCondBase.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 "TRTDigCondBase.h"
@@ -8,6 +8,7 @@
 
 #include <cmath>
 #include <cstdlib>
+#include <utility>
 
 #include "TRT_ReadoutGeometry/TRT_DetElementCollection.h"
 #include "TRT_ReadoutGeometry/TRT_DetectorManager.h"
@@ -38,7 +39,7 @@ TRTDigCondBase::TRTDigCondBase( const TRTDigSettings* digset,
     m_crosstalk_noiselevel_other_end(-1.0),
     m_msg ("TRTDigCondBase"),
     m_UseGasMix(UseGasMix),
-    m_sumTool(sumTool)
+    m_sumTool(std::move(sumTool))
 {
   m_crosstalk_noiselevel = m_settings->crossTalkNoiseLevel();
   m_crosstalk_noiselevel_other_end = m_settings->crossTalkNoiseLevelOtherEnd();
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigCondFakeMap.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigCondFakeMap.cxx
index 13693a143933..e34b48a03dc2 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigCondFakeMap.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigCondFakeMap.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TRTDigCondFakeMap.h"
@@ -19,6 +19,7 @@
 
 #include <cmath>
 #include <cstdlib>
+#include <utility>
 
 //________________________________________________________________________________
 TRTDigCondFakeMap::TRTDigCondFakeMap( const TRTDigSettings* digset,
@@ -27,7 +28,7 @@ TRTDigCondFakeMap::TRTDigCondFakeMap( const TRTDigSettings* digset,
                                       int UseGasMix,
                                       ToolHandle<ITRT_StrawStatusSummaryTool> sumTool
                                       )
-: TRTDigCondBase(digset, detmgr, trt_id, UseGasMix, sumTool)
+: TRTDigCondBase(digset, detmgr, trt_id, UseGasMix, std::move(sumTool))
 {
   m_average_noiselevel = m_settings->averageNoiseLevel();
 }
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigSettings.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigSettings.cxx
index b7209cbf9dad..61411186ed6c 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigSettings.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigSettings.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
 */
 
 /////////////////////////////////////////////////////////////////
@@ -355,9 +355,9 @@ void TRTDigSettings::defineNewUIntVariable(const std::string &name,unsigned int
   intboolparameter p;
 
   p.description = description;
-  p.directvaraddress_int = 0;
+  p.directvaraddress_int = nullptr;
   p.directvaraddress_uint = datamember;
-  p.directvaraddress_bool = 0;
+  p.directvaraddress_bool = nullptr;
   p.okrange_low = static_cast<int>(lowrange);
   p.okrange_high = static_cast<int>(highrange);
   p.valueSetByUser = m_propertyNotSetMagicNumber_int;
@@ -381,8 +381,8 @@ void TRTDigSettings::defineNewIntVariable(const std::string & name,int * datamem
 
   p.description = description;
   p.directvaraddress_int = datamember;
-  p.directvaraddress_uint = 0;
-  p.directvaraddress_bool = 0;
+  p.directvaraddress_uint = nullptr;
+  p.directvaraddress_bool = nullptr;
   p.okrange_low = lowrange;
   p.okrange_high = highrange;
   p.valueSetByUser = m_propertyNotSetMagicNumber_int;
@@ -401,8 +401,8 @@ void TRTDigSettings::defineNewBoolVariable(const std::string & name,bool * datam
   intboolparameter p;
 
   p.description = description;
-  p.directvaraddress_int = 0;
-  p.directvaraddress_uint = 0;
+  p.directvaraddress_int = nullptr;
+  p.directvaraddress_uint = nullptr;
   p.directvaraddress_bool = datamember;
   p.okrange_low = 0;
   p.okrange_high = 1;
@@ -526,7 +526,7 @@ void TRTDigSettings::fillDefaults(const InDetDD::TRT_DetectorManager* detmgr) {
   // Delta-ray suppression tune with backward compatibility with non suppressed delta-ray simulation tagged as 01-01-07
   // Delta-ray suppression HT middle-bit fraction tune - 2015 data; 01-01-16
   m_trtRangeCutProperty = m_doubleparMap["TrtRangeCutProperty"].valueSetByUser;//To avoid overwritting warning message and to use python configured value
-  if(fabs(m_trtRangeCutProperty-0.05) >= std::numeric_limits<double>::epsilon()){
+  if(std::abs(m_trtRangeCutProperty-0.05) >= std::numeric_limits<double>::epsilon()){
     m_lowThresholdBar        = 0.260*CLHEP::keV;
     m_lowThresholdEC         = 0.275*CLHEP::keV;
     m_highThresholdBarShort  = 5.195*CLHEP::keV;
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx
index 6e46740c828f..eea87410b9b1 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -202,7 +202,7 @@ StatusCode TRTDigitizationTool::processBunchXing(int bunchXing,
                                                  SubEventIterator bSubEvents,
                                                  SubEventIterator eSubEvents) {
 
-  m_seen.push_back(std::make_pair(std::distance(bSubEvents,eSubEvents), bunchXing));
+  m_seen.emplace_back(std::distance(bSubEvents,eSubEvents), bunchXing);
   //decide if this event will be processed depending on HardScatterSplittingMode & bunchXing
   if (m_HardScatterSplittingMode == 2 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; return StatusCode::SUCCESS; }
   if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper )  { return StatusCode::SUCCESS; }
@@ -211,7 +211,7 @@ StatusCode TRTDigitizationTool::processBunchXing(int bunchXing,
 
   //TRTUncompressedHit
 
-  typedef PileUpMergeSvc::TimedList<TRTUncompressedHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<TRTUncompressedHitCollection>::type;
   TimedHitCollList hitCollList;
 
   if (!(m_mergeSvc->retrieveSubSetEvtData(m_dataObjectName, hitCollList, bunchXing,
@@ -528,7 +528,7 @@ StatusCode TRTDigitizationTool::processAllSubEvents(const EventContext& ctx) {
   m_vDigits.clear();
 
   //  get the container(s)
-  typedef PileUpMergeSvc::TimedList<TRTUncompressedHitCollection>::type TimedHitCollList;
+  using TimedHitCollList = PileUpMergeSvc::TimedList<TRTUncompressedHitCollection>::type;
   TimedHitCollection<TRTUncompressedHit> thpctrt;
   // In case of single hits container just load the collection using read handles
   if (!m_onlyUseContainerName) {
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTNoise.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTNoise.cxx
index 1d26891dac31..4d1df20faac7 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTNoise.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTNoise.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 "TRTNoise.h"
@@ -26,6 +26,7 @@
 
 #include <algorithm>
 #include <exception>
+#include <utility>
 
 struct TRTDigitSorter {
   bool operator() (TRTDigit digit1, TRTDigit digit2) { return (digit1.GetStrawID()<digit2.GetStrawID());}
@@ -55,7 +56,7 @@ TRTNoise::TRTNoise( const TRTDigSettings* digset,
   m_digitPoolLength_nextaccessindex(0),
   m_msg("TRTNoise"),
   m_UseGasMix(UseGasMix),
-  m_sumTool(sumTool)
+  m_sumTool(std::move(sumTool))
 {
   if (msgLevel(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "TRTNoise::Constructor begin" << endmsg; }
   InitThresholdsAndNoiseAmplitudes_and_ProduceNoiseDigitPool(noiseRndmEngine,elecNoiseRndmEngine,elecProcRndmEngine);
@@ -359,7 +360,7 @@ void TRTNoise::appendPureNoiseToProperDigits( std::vector<TRTDigit>& digitVect,
     // If this strawID does not have a sim_hit, add a pure noise digit
     if ( sim_hitids.find(hitid) == sim_hitids_end ) {
       const int ndigit(m_digitPool[CLHEP::RandFlat::shootInt(noiseRndmEngine,m_digitPoolLength)]);
-      digitVect.push_back(TRTDigit(hitid,ndigit));
+      digitVect.emplace_back(hitid,ndigit);
     }
   };
 
@@ -372,7 +373,7 @@ void TRTNoise::appendPureNoiseToProperDigits( std::vector<TRTDigit>& digitVect,
 
 void TRTNoise::appendCrossTalkNoiseToProperDigits(std::vector<TRTDigit>& digitVect,
                                                   const std::set<Identifier>& simhitsIdentifiers,
-                                                  ServiceHandle<ITRT_StrawNeighbourSvc> TRTStrawNeighbourSvc,
+                                                  const ServiceHandle<ITRT_StrawNeighbourSvc>& TRTStrawNeighbourSvc,
                                                   CLHEP::HepRandomEngine* noiseRndmEngine) {
 
   //id helper:
@@ -422,7 +423,7 @@ void TRTNoise::appendCrossTalkNoiseToProperDigits(std::vector<TRTDigit>& digitVe
           //built hit id
           int hitid = hitid_helper->buildHitId( barrel_endcap, isneg, ringwheel, phisector,layer, straw);
           //add to digit vector
-          digitVect.push_back(TRTDigit(hitid,ndigit));
+          digitVect.emplace_back(hitid,ndigit);
         }
       }
     }
@@ -450,7 +451,7 @@ void TRTNoise::appendCrossTalkNoiseToProperDigits(std::vector<TRTDigit>& digitVe
           //built hit id
           int hitid = hitid_helper->buildHitId( barrel_endcap, isneg, ringwheel, phisector,layer, straw);
           //add to digit vector
-          digitVect.push_back(TRTDigit(hitid,ndigit));
+          digitVect.emplace_back(hitid,ndigit);
         }
       }
     }
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTNoise.h b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTNoise.h
index fd4152cbcf3a..87978db03796 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTNoise.h
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTNoise.h
@@ -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
 */
 
 #ifndef TRT_DIGITIZATION_TRTNOISE_H
@@ -74,7 +74,7 @@ public:
 
   void appendCrossTalkNoiseToProperDigits(std::vector<TRTDigit>& digitVect,
                                           const std::set<Identifier>& simhitsIdentifiers,
-                                          ServiceHandle<ITRT_StrawNeighbourSvc> m_TRTStrawNeighbourSvc,
+                                          const ServiceHandle<ITRT_StrawNeighbourSvc>& m_TRTStrawNeighbourSvc,
                                           CLHEP::HepRandomEngine* noiseRndmEngine);
 
   void sortDigits(std::vector<TRTDigit>& digitVect);
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx
index f1edfc8446c2..a15b8f06b5d4 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TRTProcessingOfStraw.h"
@@ -66,7 +66,7 @@ TRTProcessingOfStraw::TRTProcessingOfStraw(const TRTDigSettings* digset,
   m_pSimDriftTimeTool(simdrifttool),
 // m_time_y_eq_zero(0.0),
 // m_ComTime(NULL),
-  m_pTimeCorrection(NULL),
+  m_pTimeCorrection(nullptr),
   m_pElectronicsProcessing(ep),
   m_pNoise(noise),
   m_pDigConditions(digcond),
@@ -104,14 +104,14 @@ void TRTProcessingOfStraw::Initialize(const ITRT_CalDbTool* calDbTool)
 
   m_maxelectrons = 100; // 100 gives good Gaussian approximation
 
-  if (m_pPAItoolXe==NULL) {
+  if (m_pPAItoolXe==nullptr) {
     ATH_MSG_FATAL ( "TRT_PAITool for Xenon not defined! no point in continuing!" );
   }
-  if (m_pPAItoolKr==NULL) {
+  if (m_pPAItoolKr==nullptr) {
     ATH_MSG_ERROR ( "TRT_PAITool for Krypton is not defined!!! Xenon TRT_PAITool will be used for Krypton straws!" );
     m_pPAItoolKr = m_pPAItoolXe;
   }
-  if (m_pPAItoolAr==NULL) {
+  if (m_pPAItoolAr==nullptr) {
     ATH_MSG_ERROR ( "TRT_PAITool for Argon is not defined!!! Xenon TRT_PAITool will be used for Argon straws!" );
     m_pPAItoolAr = m_pPAItoolXe;
   }
@@ -243,10 +243,10 @@ void TRTProcessingOfStraw::addClustersFromStep ( const double& scaledKineticEner
 
       //Append cluster (the energy is given by the PAI model):
       double clusE(activePAITool->GetEnergyTransfer(scaledKineticEnergy, paiRndmEngine));
-      clusterlist.push_back(cluster(clusE, timeOfHit,
+      clusterlist.emplace_back(clusE, timeOfHit,
                                     prex + lambda * deltaX,
                                     prey + lambda * deltaY,
-                                    prez + lambda * deltaZ));
+                                    prez + lambda * deltaZ);
     }
 
   return;
@@ -371,7 +371,7 @@ void TRTProcessingOfStraw::ProcessStraw ( MagField::AtlasFieldCache& fieldCache,
               double hitx = TRThitGlobalPos[0];
               double hity = TRThitGlobalPos[1];
               double hitz = TRThitGlobalPos[2];
-              double hitEta = fabs(log(tan(0.5*atan2(sqrt(hitx*hitx+hity*hity),hitz))));
+              double hitEta = std::abs(log(tan(0.5*atan2(sqrt(hitx*hitx+hity*hity),hitz))));
               if ( hitEta < 0.5 ) { trEfficiencyBarrel *= ( 0.833333+0.6666667*hitEta*hitEta ); }
               // scale down the TR efficiency if we are emulating
               if ( strawGasType == 0 && emulationArflag ) { trEfficiencyBarrel *= ArEmulationScaling_BA; }
@@ -397,8 +397,7 @@ void TRTProcessingOfStraw::ProcessStraw ( MagField::AtlasFieldCache& fieldCache,
           } // energyDeposit < 30.0
 
           // Append this (usually highly energetic) cluster to the list:
-          m_clusterlist.push_back(
-                                  cluster( energyDeposit*CLHEP::keV, timeOfHit, (*theHit)->GetPostStepX(), (*theHit)->GetPostStepY(), (*theHit)->GetPostStepZ() )
+          m_clusterlist.emplace_back( energyDeposit*CLHEP::keV, timeOfHit, (*theHit)->GetPostStepX(), (*theHit)->GetPostStepY(), (*theHit)->GetPostStepZ() 
                                   );
 
           // Regarding the CLHEP::keV above: In TRT_G4_SD we converting the hits to keV,
@@ -410,8 +409,7 @@ void TRTProcessingOfStraw::ProcessStraw ( MagField::AtlasFieldCache& fieldCache,
                  (static_cast<int>(abs(particleEncoding)/100000) == 100) &&
                  (static_cast<int>((abs(particleEncoding))-10000000)/100>10)) )
         {
-          m_clusterlist.push_back(
-                                  cluster((*theHit)->GetEnergyDeposit()*CLHEP::keV, timeOfHit, (*theHit)->GetPostStepX(), (*theHit)->GetPostStepY(), (*theHit)->GetPostStepZ() )
+          m_clusterlist.emplace_back((*theHit)->GetEnergyDeposit()*CLHEP::keV, timeOfHit, (*theHit)->GetPostStepX(), (*theHit)->GetPostStepY(), (*theHit)->GetPostStepZ() 
                                   );
         }
       else { // It's not a photon, monopole or Qball with charge > 10, so we proceed with regular ionization using the PAI model
@@ -461,7 +459,7 @@ void TRTProcessingOfStraw::ProcessStraw ( MagField::AtlasFieldCache& fieldCache,
                 const double Mn(939.565*CLHEP::MeV);
 
                 particleCharge = (particleEncoding>0 ? 1. : -1.) * static_cast<double>(Z);
-                particleMass = fabs( Z*Mp+(A-Z)*Mn );
+                particleMass = std::abs( Z*Mp+(A-Z)*Mn );
 
                 if (!alreadyPrintedPDGcodeWarning)
                   {
@@ -754,8 +752,8 @@ void TRTProcessingOfStraw::ClustersToDeposits (MagField::AtlasFieldCache& fieldC
       // Finally, deposit the energy on the wire using the drift-time tool (diffusion is no longer available).
       double commondrifttime = m_pSimDriftTimeTool->getAverageDriftTime(cluster_r,effectiveField2,strawGasType);
       double dt = clusterTime + commondrifttime;
-      deposits.push_back(TRTElectronicsProcessing::Deposit(0.5*depositEnergy*expdirect,  timedirect+dt));
-      deposits.push_back(TRTElectronicsProcessing::Deposit(0.5*depositEnergy*expreflect, timereflect+dt));
+      deposits.emplace_back(0.5*depositEnergy*expdirect,  timedirect+dt);
+      deposits.emplace_back(0.5*depositEnergy*expreflect, timereflect+dt);
 
     } // end of cluster loop
 
@@ -831,19 +829,19 @@ double TRTProcessingOfStraw::setClusterZ(double cluster_z_in, bool isLong, bool
   const double  longBarrelStrawHalfLength(349.315*CLHEP::mm);
   const double shortBarrelStrawHalfLength(153.375*CLHEP::mm);
   const double      EndcapStrawHalfLength(177.150*CLHEP::mm);
-  if ( isLong  && fabs(cluster_z)>longBarrelStrawHalfLength+30 ) {
+  if ( isLong  && std::abs(cluster_z)>longBarrelStrawHalfLength+30 ) {
     double d = cluster_z<0 ? cluster_z+longBarrelStrawHalfLength : cluster_z-longBarrelStrawHalfLength;
     ATH_MSG_WARNING ("Long barrel straw cluster is outside the active gas volume z = +- 349.315 mm by " << d << " mm.");
     ATH_MSG_WARNING ("Setting cluster_z = 0.0");
     cluster_z = 0.0;
   }
-  if ( isShort && fabs(cluster_z)>shortBarrelStrawHalfLength+30 ) {
+  if ( isShort && std::abs(cluster_z)>shortBarrelStrawHalfLength+30 ) {
     double d = cluster_z<0 ? cluster_z+shortBarrelStrawHalfLength : cluster_z-shortBarrelStrawHalfLength;
     ATH_MSG_WARNING ("Short barrel straw cluster is outside the active gas volume z = +- 153.375 mm by " << d << " mm.");
     ATH_MSG_WARNING ("Setting cluster_z = 0.0");
     cluster_z = 0.0;
   }
-  if ( isEC    && fabs(cluster_z)>EndcapStrawHalfLength+30 ) {
+  if ( isEC    && std::abs(cluster_z)>EndcapStrawHalfLength+30 ) {
     double d = cluster_z<0 ? cluster_z+EndcapStrawHalfLength : cluster_z-EndcapStrawHalfLength;
     ATH_MSG_WARNING ("End cap straw cluster is outside the active gas volume z = +- 177.150 mm by " << d << " mm.");
     ATH_MSG_WARNING ("Setting cluster_z = 0.0");
diff --git a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.cxx b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.cxx
index c1c0b8313851..3bd8f778e5d6 100644
--- a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.cxx
+++ b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -69,7 +69,7 @@ long BCM_RawContByteStreamCnv::storageType() {
 StatusCode
 BCM_RawContByteStreamCnv::createRepConst(DataObject* pObj, IOpaqueAddress*& pAddr) const
 {
-  BCM_RDO_Container* cont = 0;
+  BCM_RDO_Container* cont = nullptr;
   SG::fromStorable(pObj,cont);
   if(!cont) {
     ATH_MSG_ERROR( "Can not cast to BCM_RDO_Container" );
diff --git a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamTool.cxx b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamTool.cxx
index c3dbb70f03bc..f6dffc4c6da8 100644
--- a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamTool.cxx
+++ b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamTool.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -19,7 +19,7 @@
 
 #include "BCM_RawDataByteStreamCnv/BCM_RodEncoder.h"
 
-#include <stdint.h>
+#include <cstdint>
 #include <map>
 
 ////////////////////////
@@ -79,7 +79,7 @@ StatusCode BCM_RawContByteStreamTool::convert(BCM_RDO_Container* cont) const
     const BCM_RDO_Collection* coll = (*it_coll);
 
     // get OfflineId (channel number) and RODID
-    if (coll != NULL) {
+    if (coll != nullptr) {
       unsigned int offlineId = coll->getChannel();
       uint32_t rodId = getSourceID(offlineId);
       if ( offlineId >= 16 ) {
diff --git a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodDecoder.cxx b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodDecoder.cxx
index f09a61f5141d..2606cd9aef52 100644
--- a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodDecoder.cxx
+++ b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodDecoder.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -14,7 +14,7 @@
 
 #include "BCM_RawDataByteStreamCnv/BCM_RodDecoder.h"
 
-#include <inttypes.h>
+#include <cinttypes>
 
 static const InterfaceID IID_IBCM_RodDecoder("BCM_RodDecoder", 1, 0);
 const InterfaceID& BCM_RodDecoder::interfaceID()
@@ -84,7 +84,7 @@ StatusCode BCM_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROB
 
   StatusCode sc = StatusCode::SUCCESS;
 
-  BCM_RDO_Collection* coll = 0;
+  BCM_RDO_Collection* coll = nullptr;
 
   // set the data pointer type
   OFFLINE_FRAGMENTS_NAMESPACE::PointerType vint;
diff --git a/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RDO_CollectionCnv_p0_test.cxx b/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RDO_CollectionCnv_p0_test.cxx
index 40bdc5069a34..1ef8be4dbe65 100644
--- a/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RDO_CollectionCnv_p0_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RDO_CollectionCnv_p0_test.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
 */
 
 /**
@@ -37,7 +37,7 @@ void compare (const BCM_RDO_Collection& p1,
 
 void testit (const BCM_RDO_Collection& trans1)
 {
-  MsgStream log (0, "test");
+  MsgStream log (nullptr, "test");
   BCM_RDO_CollectionCnv_p0 cnv;
   BCM_RDO_Collection_p0 pers;
   cnv.transToPers (&trans1, &pers, log);
diff --git a/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RDO_ContainerCnv_p0_test.cxx b/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RDO_ContainerCnv_p0_test.cxx
index d81a68aa2656..1ae51f1d5d1b 100644
--- a/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RDO_ContainerCnv_p0_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RDO_ContainerCnv_p0_test.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
 */
 
 /**
@@ -48,7 +48,7 @@ void compare (const BCM_RDO_Container& p1,
 
 void testit (const BCM_RDO_Container& trans1)
 {
-  MsgStream log (0, "test");
+  MsgStream log (nullptr, "test");
   BCM_RDO_ContainerCnv_p0 cnv;
   BCM_RDO_Container_p0 pers;
   cnv.transToPers (&trans1, &pers, log);
diff --git a/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RawDataCnv_p0_test.cxx b/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RawDataCnv_p0_test.cxx
index f7336f0891c9..0c36a9a5ad9e 100644
--- a/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RawDataCnv_p0_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/test/BCM_RawDataCnv_p0_test.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
 */
 
 /**
@@ -26,7 +26,7 @@ void compare (const BCM_RawData& p1,
 
 void testit (const BCM_RawData& trans1)
 {
-  MsgStream log (0, "test");
+  MsgStream log (nullptr, "test");
   BCM_RawDataCnv_p0 cnv;
   BCM_RawData_p0 pers;
   cnv.transToPers (&trans1, &pers, log);
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.cxx
index 3c183bd43463..ac4fca8aa557 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.cxx
@@ -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
 */
 
 #include "InDetLowBetaCandidateCnv.h"
@@ -30,7 +30,7 @@ InDet::InDetLowBetaCandidate* InDetLowBetaCandidateCnv::createTransient() {
   
   static const pool::Guid tlp1_guid("8C24589F-FBAA-4686-9254-B5C360A94733");
 
-  InDet::InDetLowBetaCandidate *trans_cont(0);
+  InDet::InDetLowBetaCandidate *trans_cont(nullptr);
   
   if (compareClassGuid(tlp1_guid) ) {
     ATH_MSG_DEBUG("InDetLowBetaCandidateCnv::reading tlp1 persistent object");
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.cxx
index cd92cb551649..7da9256ecc6d 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.cxx
@@ -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
 */
 
 #include "InDetLowBetaContainerCnv.h"
@@ -32,7 +32,7 @@ InDet::InDetLowBetaContainer *InDetLowBetaContainerCnv::createTransient() {
 
   static const pool::Guid tlp1_guid("2EBE2034-8157-477B-B327-D37BE8A0317D");
 
-  InDet::InDetLowBetaContainer *p_collection = 0;
+  InDet::InDetLowBetaContainer *p_collection = nullptr;
   if (compareClassGuid(tlp1_guid)) {
     poolReadObject<InDetLowBetaContainer_PERS>(*m_TPConverter_tlp1);
     p_collection = m_TPConverter_tlp1->createTransient(msg());
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCnv_p1.cxx
index 0c3b2b43efe5..7c4d83c984b8 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCnv_p1.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 "InDetSimData/InDetSimData.h"
@@ -11,7 +11,7 @@
 #include "AthenaBaseComps/AthMessaging.h"
 
 
-typedef std::vector<InDetSimData::Deposit>::const_iterator depositIterator;
+using depositIterator = std::vector<InDetSimData::Deposit>::const_iterator;
 
 InDetSimDataCnv_p1::InDetSimDataCnv_p1()
   : m_sg(nullptr)
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCnv_p2.cxx
index 1f9eaa87d05f..cb605c9bf234 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCnv_p2.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCnv_p2.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 "InDetSimData/InDetSimData.h"
@@ -11,7 +11,7 @@
 #include "AthenaBaseComps/AthMessaging.h"
 
 
-typedef std::vector<InDetSimData::Deposit>::const_iterator depositIterator;
+using depositIterator = std::vector<InDetSimData::Deposit>::const_iterator;
 
 InDetSimDataCnv_p2::InDetSimDataCnv_p2()
   : m_sg(nullptr)
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCollectionCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCollectionCnv.cxx
index 364f477ff0a8..67faf6afcfc8 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCollectionCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetSimDataCollectionCnv.h"
@@ -19,7 +19,7 @@ InDetSimDataCollection* InDetSimDataCollectionCnv::createTransient() {
     InDetSimDataCollectionCnv_p2   converter_p2;
     InDetSimDataCollectionCnv_p3   converter_p3;
 
-    InDetSimDataCollection       *trans_cont(0);
+    InDetSimDataCollection       *trans_cont(nullptr);
     static const pool::Guid   p3_guid("1430AA7B-EE92-5A41-92F3-5DD5367D6BAA");
     static const pool::Guid   p2_guid("C648CA66-013D-44AC-B0D9-99BFB0060E84");
     static const pool::Guid   p1_guid("333EF996-1672-4AB8-917D-187F908F1EDE");
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx
index 206204b82ce2..211adb09c211 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetRawData/Pixel1RawData.h"
@@ -31,7 +31,7 @@ void Pixel1RawDataContainerCnv_p1::transToPers(const PixelRDO_Container* transCo
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef PixelRDO_Container TRANS;
+    using TRANS = PixelRDO_Container;
 
     Pixel1RawDataCnv_p1  chanCnv;
     TRANS::const_iterator it_Coll     = transCont->begin();
@@ -89,7 +89,7 @@ void  Pixel1RawDataContainerCnv_p1::persToTrans(const InDetRawDataContainer_p1*
     // from the vector.
 
 
-    PixelRDO_Collection* coll = 0;
+    PixelRDO_Collection* coll = nullptr;
 
     Pixel1RawDataCnv_p1  chanCnv;
     MSG_DEBUG(log," Reading " << persCont->m_collections.size() << "Collections");
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p2.cxx
index 0ad5ef16fdff..b09cf36ed963 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p2.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p2.cxx
@@ -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
 */
 
 #include "InDetRawData/Pixel1RawData.h"
@@ -32,7 +32,7 @@ void Pixel1RawDataContainerCnv_p2::transToPers(const PixelRDO_Container* transCo
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef PixelRDO_Container TRANS;
+    using TRANS = PixelRDO_Container;
 
     Pixel1RawDataCnv_p2  chanCnv;
     TRANS::const_iterator it_Coll     = transCont->begin();
@@ -66,7 +66,7 @@ void Pixel1RawDataContainerCnv_p2::transToPers(const PixelRDO_Container* transCo
         for (unsigned int i = 0; i < collection.size(); ++i) {
             InDetRawData_p2* pchan = &(persCont->m_rawdata[i + chanBegin]);
             const Pixel1RawData* chan = dynamic_cast<const Pixel1RawData*>(collection[i]);
-            if (0 == chan) throw std::runtime_error("Pixel1RawDataContainerCnv_p2::transToPers: ***  UNABLE TO DYNAMIC CAST TO Pixel1RawData");
+            if (nullptr == chan) throw std::runtime_error("Pixel1RawDataContainerCnv_p2::transToPers: ***  UNABLE TO DYNAMIC CAST TO Pixel1RawData");
             chanCnv.transToPers(chan, pchan, log);
         }
     }
@@ -91,7 +91,7 @@ void  Pixel1RawDataContainerCnv_p2::persToTrans(const InDetRawDataContainer_p2*
     // from the vector.
 
 
-    PixelRDO_Collection* coll = 0;
+    PixelRDO_Collection* coll = nullptr;
 
     Pixel1RawDataCnv_p2  chanCnv;
     MSG_DEBUG(log," Reading " << persCont->m_collections.size() << "Collections");
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx
index a86f592cab7e..86653c92e473 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "StoreGate/StoreGateSvc.h"
@@ -36,7 +36,7 @@ StatusCode PixelClusterContainerCnv::initialize() {
    }
    
    // get DetectorStore service
-   StoreGateSvc *detStore(0);
+   StoreGateSvc *detStore(nullptr);
    if (service("DetectorStore", detStore).isFailure()) {
      ATH_MSG_FATAL("DetectorStore service not found !");
      return StatusCode::FAILURE;
@@ -45,7 +45,7 @@ StatusCode PixelClusterContainerCnv::initialize() {
    }
    
    // Get the pixel helper from the detector store
-   const PixelID* idhelper(0);
+   const PixelID* idhelper(nullptr);
    if (detStore->retrieve(idhelper, "PixelID").isFailure()) {
      ATH_MSG_FATAL("Could not get PixelID helper !");
      return StatusCode::FAILURE;
@@ -71,7 +71,7 @@ InDet::PixelClusterContainer* PixelClusterContainerCnv::createTransient() {
   static const pool::Guid   p2_guid("DE48E26B-9E03-4EAD-86B9-351AD88D060E"); // with pixelCluster_p2
   static const pool::Guid   p3_guid("7BF0F163-B227-434C-86A6-16130E005E6C"); // with pixelCluster_p3
   ATH_MSG_DEBUG("createTransient(): main converter");
-  InDet::PixelClusterContainer* p_collection(0);
+  InDet::PixelClusterContainer* p_collection(nullptr);
   if( compareClassGuid(p3_guid) ) {
     ATH_MSG_DEBUG("createTransient(): T/P version 3 detected");
     std::unique_ptr< InDet::PixelClusterContainer_p3 >  p_coll( poolReadObject< InDet::PixelClusterContainer_p3 >() );
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv_p0.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv_p0.cxx
index ef53e3dd3bd0..fe6ad0e99992 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv_p0.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv_p0.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "PixelClusterContainerCnv_p0.h"
@@ -78,7 +78,7 @@ InDet::PixelClusterContainer* PixelClusterContainerCnv_p0::createTransient(Pixel
 	 MSG_VERBOSE(log,"PixelClusterContainer successfully added to Container !");
       } else {
          log << MSG::ERROR << "Failed to add PixelClusterContainer to container" << endmsg;
-         return 0;
+         return nullptr;
       }
    }
   return trans.release();
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx
index 6c53cfd63f88..10d34691188c 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "PixelRDO_ContainerCnv.h"
@@ -53,7 +53,7 @@ StatusCode PixelRDO_ContainerCnv::initialize() {
    }
    
    // get DetectorStore service
-   StoreGateSvc *detStore(0);
+   StoreGateSvc *detStore(nullptr);
    if (service("DetectorStore", detStore).isFailure()) {
      ATH_MSG_FATAL("DetectorStore service not found !");
      return StatusCode::FAILURE;
@@ -62,7 +62,7 @@ StatusCode PixelRDO_ContainerCnv::initialize() {
    }
    
    // Get the pixel helper from the detector store
-   const PixelID* idhelper(0);
+   const PixelID* idhelper(nullptr);
    if (detStore->retrieve(idhelper, "PixelID").isFailure()) {
      ATH_MSG_FATAL("Could not get PixelID helper !");
      return StatusCode::FAILURE;
@@ -95,7 +95,7 @@ PixelRDO_Container_PERS* PixelRDO_ContainerCnv::createPersistent(PixelRDO_Contai
     while (it_Coll != it_CollEnd && (*it_Coll)->size() == 0 ) ++it_Coll;
     if(it_Coll != it_CollEnd) {
       const PixelRDORawData *test((**it_Coll)[0]);
-      if(dynamic_cast<const Pixel1RawData*>(test) != 0 ) {
+      if(dynamic_cast<const Pixel1RawData*>(test) != nullptr ) {
 	 ATH_MSG_DEBUG("Found container with Pixel1RawData concrete type objects");
          converter_num=1;
       } else {
@@ -110,7 +110,7 @@ PixelRDO_Container_PERS* PixelRDO_ContainerCnv::createPersistent(PixelRDO_Contai
   }
   // Switch facility depending on the concrete data type of the contained objects
   // Should do by getting the type_info of one of the contained objects
-  PixelRDO_Container_PERS *persObj(0);
+  PixelRDO_Container_PERS *persObj(nullptr);
   if(converter_num == 1) { 
      persObj = m_converter_PERS.createPersistent( transCont, msg() );
   } else {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT1_RawDataContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT1_RawDataContainerCnv_p1.cxx
index 12be5df32189..19673f48ff3c 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT1_RawDataContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT1_RawDataContainerCnv_p1.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT1_RawDataContainerCnv_p1.h"
@@ -33,7 +33,7 @@ void SCT1_RawDataContainerCnv_p1::transToPers(const SCT_RDO_Container* transCont
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef SCT_RDO_Container TRANS;
+    using TRANS = SCT_RDO_Container;
 
     SCT1_RawDataCnv_p1  chanCnv;
     TRANS::const_iterator it_Coll     = transCont->begin();
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p1.cxx
index b9dceb08aabd..6a29a40ee668 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p1.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_RawDataContainerCnv_p1.h"
@@ -36,7 +36,7 @@ void SCT_RawDataContainerCnv_p1::transToPers(const SCT_RDO_Container* transCont,
   // to the container's vector, saving the indexes in the
   // collection.
 
-  typedef SCT_RDO_Container TRANS;
+  using TRANS = SCT_RDO_Container;
 
   SCT1_RawDataCnv_p1  chan1Cnv;
   SCT3_RawDataCnv_p1  chan3Cnv;
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p2.cxx
index 5f4e9d744f65..4ff5154bd0e2 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p2.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p2.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_RawDataContainerCnv_p2.h"
@@ -38,7 +38,7 @@ void SCT_RawDataContainerCnv_p2::transToPers(const SCT_RDO_Container* transCont,
   /// to the container's vector, saving the indexes in the
   /// collection. 
   
-  typedef SCT_RDO_Container TRANS;
+  using TRANS = SCT_RDO_Container;
   
   SCT1_RawDataCnv_p1  chan1Cnv;
   SCT3_RawDataCnv_p2  chan3Cnv;
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p3.cxx
index 3e9a7321522e..93efa1fbb02b 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p3.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p3.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_RawDataContainerCnv_p3.h"
@@ -38,7 +38,7 @@ void SCT_RawDataContainerCnv_p3::transToPers(const SCT_RDO_Container* transCont,
   /// to the container's vector, saving the indexes in the
   /// collection.
   
-  typedef SCT_RDO_Container TRANS;
+  using TRANS = SCT_RDO_Container;
   
   SCT1_RawDataCnv_p2  chan1Cnv;
   SCT3_RawDataCnv_p3  chan3Cnv;
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p4.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p4.cxx
index 563f15ae5522..d40b12da45df 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p4.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p4.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_RawDataContainerCnv_p4.h"
@@ -38,7 +38,7 @@ void SCT_RawDataContainerCnv_p4::transToPers(const SCT_RDO_Container* transCont,
   /// to the container's vector, saving the indexes in the
   /// collection. 
   
-  typedef SCT_RDO_Container TRANS;
+  using TRANS = SCT_RDO_Container;
   
   SCT1_RawDataCnv_p2  chan1Cnv;
   SCT3_RawDataCnv_p4  chan3Cnv(m_sctId);
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx
index 5fcbdd78f0a5..c9f6389682b8 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TRT_DriftCircleContainerCnv.h"
@@ -35,7 +35,7 @@ StatusCode TRT_DriftCircleContainerCnv::initialize() {
    }
    
    // get DetectorStore service
-   StoreGateSvc *detStore(0);
+   StoreGateSvc *detStore(nullptr);
    if (service("DetectorStore", detStore).isFailure()) {
      ATH_MSG_FATAL("DetectorStore service not found !");
      return StatusCode::FAILURE;
@@ -44,7 +44,7 @@ StatusCode TRT_DriftCircleContainerCnv::initialize() {
    }
    
    // Get the trt helper from the detector store
-   const TRT_ID* idhelper(0);
+   const TRT_ID* idhelper(nullptr);
    if (detStore->retrieve(idhelper, "TRT_ID").isFailure()) {
      ATH_MSG_FATAL("Could not get TRT_ID helper !");
      return StatusCode::FAILURE;
@@ -70,7 +70,7 @@ InDet::TRT_DriftCircleContainer* TRT_DriftCircleContainerCnv::createTransient()
   static const pool::Guid   p1_guid("42B48D79-AF4E-4D45-AAA9-A2BA5A033534"); // with TRT_DriftCircle_tlp1
   static const pool::Guid   p2_guid("36195EDE-941C-424B-81A1-E04C867C35D8"); // with TRT_DriftCircle_p2
   ATH_MSG_DEBUG("createTransient(): main converter");
-  InDet::TRT_DriftCircleContainer* p_collection(0);
+  InDet::TRT_DriftCircleContainer* p_collection(nullptr);
   if( compareClassGuid(p2_guid) ) {
     ATH_MSG_DEBUG("createTransient(): T/P version 2 detected");  
     std::unique_ptr< InDet::TRT_DriftCircleContainer_p2 >   col_vect( poolReadObject< InDet::TRT_DriftCircleContainer_p2 >() );
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv_p0.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv_p0.cxx
index 35463271e5a2..862a4964a7bf 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv_p0.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv_p0.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 "TRT_DriftCircleContainerCnv_p0.h"
@@ -72,7 +72,7 @@ InDet::TRT_DriftCircleContainer* TRT_DriftCircleContainerCnv_p0::createTransient
 	 MSG_VERBOSE(log,"TRT_DriftCircleContainer successfully added to Container !");
       } else {
          log << MSG::ERROR << "Failed to add TRT_DriftCircleContainer to container" << endmsg;
-         return 0;
+         return nullptr;
       }
    }
   return(trans.release());
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p1.cxx
index 232ea2428d4c..5f0f32063e45 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p1.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetRawData/TRT_LoLumRawData.h"
@@ -31,7 +31,7 @@ void TRT_LoLumRawDataContainerCnv_p1::transToPers(const TRT_RDO_Container* trans
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef TRT_RDO_Container TRANS;
+    using TRANS = TRT_RDO_Container;
 
     TRT_LoLumRawDataCnv_p1  chanCnv;
     TRANS::const_iterator it_Coll     = transCont->begin();
@@ -89,7 +89,7 @@ void  TRT_LoLumRawDataContainerCnv_p1::persToTrans(const InDetRawDataContainer_p
     // from the vector.
 
 
-    TRT_RDO_Collection* coll = 0;
+    TRT_RDO_Collection* coll = nullptr;
 
     TRT_LoLumRawDataCnv_p1  chanCnv;
     MSG_DEBUG(log," Reading " << persCont->m_collections.size() << "Collections");
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p2.cxx
index b7d8d5b5dd66..5c80d74f346f 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p2.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p2.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetRawData/TRT_LoLumRawData.h"
@@ -31,7 +31,7 @@ void TRT_LoLumRawDataContainerCnv_p2::transToPers(const TRT_RDO_Container* trans
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef TRT_RDO_Container TRANS;
+    using TRANS = TRT_RDO_Container;
 
     TRT_LoLumRawDataCnv_p2  chanCnv;
     TRANS::const_iterator it_Coll     = transCont->begin();
@@ -65,7 +65,7 @@ void TRT_LoLumRawDataContainerCnv_p2::transToPers(const TRT_RDO_Container* trans
         for (unsigned int i = 0; i < collection.size(); ++i) {
             InDetRawData_p2* pchan = &(persCont->m_rawdata[i + chanBegin]);
             const TRT_LoLumRawData* chan = dynamic_cast<const TRT_LoLumRawData*>(collection[i]);
-            if (0 == chan) throw std::runtime_error("TRT_LoLumRawDataContainerCnv_p2::transToPers: ***  UNABLE TO DYNAMIC CAST TO TRT_LoLumRawData");
+            if (nullptr == chan) throw std::runtime_error("TRT_LoLumRawDataContainerCnv_p2::transToPers: ***  UNABLE TO DYNAMIC CAST TO TRT_LoLumRawData");
             chanCnv.transToPers(chan, pchan, log);
         }
     }
@@ -90,7 +90,7 @@ void  TRT_LoLumRawDataContainerCnv_p2::persToTrans(const InDetRawDataContainer_p
     // from the vector.
 
 
-    TRT_RDO_Collection* coll = 0;
+    TRT_RDO_Collection* coll = nullptr;
 
     TRT_LoLumRawDataCnv_p2  chanCnv;
     MSG_DEBUG(log," Reading " << persCont->m_collections.size() << "Collections");
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p3.cxx
index 24f3917c2a08..530cc5bac9e2 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p3.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p3.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 #include "InDetEventAthenaPool/InDetRawDataCollection_p1.h"
 #include "InDetRawData/TRT_RDO_Container.h"
@@ -37,7 +37,7 @@ void TRT_LoLumRawDataContainerCnv_p3::transToPers(const TRT_RDO_Container* trans
   unsigned int tchan_id;               // transient channel id from transCont
   unsigned int tchan_word;             // transient channel word from transCont
 
-  typedef TRT_RDO_Container TRANS;
+  using TRANS = TRT_RDO_Container;
   TRANS::const_iterator it_transColl     = transCont->begin(); // The transient container has an incomplete list of collections
   TRANS::const_iterator it_transCollEnd  = transCont->end();   // and channels, we can access them with this iterator
 
@@ -166,7 +166,7 @@ void  TRT_LoLumRawDataContainerCnv_p3::persToTrans(const InDetRawDataContainer_p
   unsigned int trt_channel_index=0;
   unsigned int trt_channel_index_old;
 
-  TRT_RDO_Collection* tcoll=0;         // transient collection to be constructed
+  TRT_RDO_Collection* tcoll=nullptr;         // transient collection to be constructed
 
   MSG_DEBUG(log," Reading " << persCont->m_collections.size() << "Collections");
   if (persCont->m_collections.size() != trt_number_of_collections)
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.cxx
index 33416aef62bc..99dd00e9bec1 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.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 "TRT_RDO_ContainerCnv.h"
@@ -52,7 +52,7 @@ StatusCode TRT_RDO_ContainerCnv::initialize() {
    }
    
    // get DetectorStore service
-   StoreGateSvc *detStore(0);
+   StoreGateSvc *detStore(nullptr);
      if (service("DetectorStore", detStore).isFailure()) {
      ATH_MSG_FATAL("DetectorStore service not found !");
      return StatusCode::FAILURE;
@@ -61,7 +61,7 @@ StatusCode TRT_RDO_ContainerCnv::initialize() {
    }
    
    // Get the trt helper from the detector store
-   const TRT_ID* idhelper(0);
+   const TRT_ID* idhelper(nullptr);
    if (detStore->retrieve(idhelper, "TRT_ID").isFailure()) {
      ATH_MSG_FATAL("Could not get TRT_ID helper !");
      return StatusCode::FAILURE;
@@ -95,7 +95,7 @@ TRT_RDO_Container_PERS* TRT_RDO_ContainerCnv::createPersistent(TRT_RDO_Container
     while (it_Coll != it_CollEnd && (*it_Coll)->size() == 0 ) ++it_Coll;
     if(it_Coll != it_CollEnd) {
       const TRT_RDORawData *test((**it_Coll)[0]);
-      if(dynamic_cast<const TRT_LoLumRawData*>(test) != 0 ) {
+      if(dynamic_cast<const TRT_LoLumRawData*>(test) != nullptr ) {
 	 ATH_MSG_DEBUG("Found container with TRT_LoLumRawData concrete type objects");
          converter_num=1;
       } else {
@@ -110,7 +110,7 @@ TRT_RDO_Container_PERS* TRT_RDO_ContainerCnv::createPersistent(TRT_RDO_Container
   }
   // Switch facility depending on the concrete data type of the contained objects
   // Should do by getting the type_info of one of the contained objects
-  TRT_RDO_Container_PERS *persObj(0);
+  TRT_RDO_Container_PERS *persObj(nullptr);
   if(converter_num == 1) { 
      persObj = m_converter_PERS.createPersistent( transCont, msg() );
   } else {
diff --git a/InnerDetector/InDetEventCnv/InDetEventCnvTools/src/InDetEventCnvTool.cxx b/InnerDetector/InDetEventCnv/InDetEventCnvTools/src/InDetEventCnvTool.cxx
index e5d052de008e..55aeea7d24ae 100755
--- a/InnerDetector/InDetEventCnv/InDetEventCnvTools/src/InDetEventCnvTool.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventCnvTools/src/InDetEventCnvTool.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 "InDetEventCnvTools/InDetEventCnvTool.h"
@@ -85,9 +85,9 @@ StatusCode InDet::InDetEventCnvTool::initialize() {
 void 
 InDet::InDetEventCnvTool::checkRoT( const Trk::RIO_OnTrack& rioOnTrack ) const {
   InDetConcreteType type=Unknown;
-  if (0!=dynamic_cast<const SCT_ClusterOnTrack*>(&rioOnTrack) )     type = SCT;
-  if (0!=dynamic_cast<const PixelClusterOnTrack*>(&rioOnTrack) )    type = Pixel;
-  if (0!=dynamic_cast<const TRT_DriftCircleOnTrack*>(&rioOnTrack) ) type = TRT;
+  if (nullptr!=dynamic_cast<const SCT_ClusterOnTrack*>(&rioOnTrack) )     type = SCT;
+  if (nullptr!=dynamic_cast<const PixelClusterOnTrack*>(&rioOnTrack) )    type = Pixel;
+  if (nullptr!=dynamic_cast<const TRT_DriftCircleOnTrack*>(&rioOnTrack) ) type = TRT;
   if (type==Unknown) {
     ATH_MSG_ERROR("Type does not match known concrete type of InDet! Dumping RoT:"<<rioOnTrack);
   } else {
@@ -101,8 +101,8 @@ std::pair<const Trk::TrkDetElementBase*, const Trk::PrepRawData*>
 InDet::InDetEventCnvTool::getLinks( Trk::RIO_OnTrack& rioOnTrack ) const
 {
   using namespace Trk;
-  const TrkDetElementBase* detEl = 0;
-  const PrepRawData*       prd   = 0;
+  const TrkDetElementBase* detEl = nullptr;
+  const PrepRawData*       prd   = nullptr;
   const Identifier& id           = rioOnTrack.identify();
    
   if (m_IDHelper->is_pixel(id) ) {
@@ -132,17 +132,17 @@ InDet::InDetEventCnvTool::getLinks( Trk::RIO_OnTrack& rioOnTrack ) const
 void InDet::InDetEventCnvTool::prepareRIO_OnTrack( Trk::RIO_OnTrack *RoT ) const {
     
   InDet::PixelClusterOnTrack* pixel = dynamic_cast<InDet::PixelClusterOnTrack*>(RoT);
-  if (pixel!=0) {
+  if (pixel!=nullptr) {
     prepareRIO_OnTrackElementLink<const InDet::PixelClusterContainer, InDet::PixelClusterOnTrack>(pixel);
     return;
   }
   InDet::SCT_ClusterOnTrack* sct = dynamic_cast<InDet::SCT_ClusterOnTrack*>(RoT);
-  if (sct!=0) {
+  if (sct!=nullptr) {
     prepareRIO_OnTrackElementLink<const InDet::SCT_ClusterContainer, InDet::SCT_ClusterOnTrack>(sct);
     return;
   }
   InDet::TRT_DriftCircleOnTrack* trt = dynamic_cast<InDet::TRT_DriftCircleOnTrack*>(RoT);
-  if (trt!=0) {
+  if (trt!=nullptr) {
     prepareRIO_OnTrackElementLink<const InDet::TRT_DriftCircleContainer, InDet::TRT_DriftCircleOnTrack>(trt);
     return;
   }
@@ -155,17 +155,17 @@ InDet::InDetEventCnvTool::prepareRIO_OnTrackLink( const Trk::RIO_OnTrack *RoT,
                                                   ELIndex_t& index) const
 {
   const InDet::PixelClusterOnTrack* pixel = dynamic_cast<const InDet::PixelClusterOnTrack*>(RoT);
-  if (pixel!=0) {
+  if (pixel!=nullptr) {
     prepareRIO_OnTrackElementLink<const InDet::PixelClusterContainer, InDet::PixelClusterOnTrack>(pixel, key, index);
     return;
   }
   const InDet::SCT_ClusterOnTrack* sct = dynamic_cast<const InDet::SCT_ClusterOnTrack*>(RoT);
-  if (sct!=0) {
+  if (sct!=nullptr) {
     prepareRIO_OnTrackElementLink<const InDet::SCT_ClusterContainer, InDet::SCT_ClusterOnTrack>(sct, key, index);
     return;
   }
   const InDet::TRT_DriftCircleOnTrack* trt = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(RoT);
-  if (trt!=0) {
+  if (trt!=nullptr) {
     prepareRIO_OnTrackElementLink<const InDet::TRT_DriftCircleContainer, InDet::TRT_DriftCircleOnTrack>(trt, key, index);
     return;
   }
@@ -181,7 +181,7 @@ void InDet::InDetEventCnvTool::recreateRIO_OnTrack( Trk::RIO_OnTrack *RoT ) cons
 const Trk::TrkDetElementBase* 
 InDet::InDetEventCnvTool::getDetectorElement(const Identifier& id, const IdentifierHash& idHash) const {
 
-  const Trk::TrkDetElementBase* detEl=0;
+  const Trk::TrkDetElementBase* detEl=nullptr;
 
   if (m_IDHelper->is_pixel(id)) {
 
@@ -210,7 +210,7 @@ InDet::InDetEventCnvTool::getDetectorElement(const Identifier& id, const Identif
 const Trk::TrkDetElementBase* 
 InDet::InDetEventCnvTool::getDetectorElement(const Identifier& id) const {
  
-  const Trk::TrkDetElementBase* detEl=0;
+  const Trk::TrkDetElementBase* detEl=nullptr;
  
   if (m_IDHelper->is_pixel(id) ) {
   
@@ -247,7 +247,7 @@ InDet::InDetEventCnvTool::pixelClusterLink( const Identifier& id,  const Identif
   SG::ReadHandle<PixelClusterContainer> h_pixClusCont (m_pixClusContName);
   if (!h_pixClusCont.isValid()) {
     ATH_MSG_ERROR("Pixel Cluster container not found at "<<m_pixClusContName);
-    return 0;
+    return nullptr;
   } else {
     ATH_MSG_DEBUG("Pixel Cluster Container found" );
   }
@@ -263,7 +263,7 @@ InDet::InDetEventCnvTool::pixelClusterLink( const Identifier& id,  const Identif
     }
   }
   ATH_MSG_DEBUG("No matching PRD found" );
-  return 0;
+  return nullptr;
 }
 
 const Trk::PrepRawData* 
@@ -276,7 +276,7 @@ InDet::InDetEventCnvTool::sctClusterLink( const Identifier& id,  const Identifie
   SG::ReadHandle<SCT_ClusterContainer> h_sctClusCont(m_sctClusContName);
   if (!h_sctClusCont.isValid()) {
     ATH_MSG_ERROR("SCT Cluster container not found at "<<m_sctClusContName);
-    return 0;
+    return nullptr;
   } else {
     ATH_MSG_DEBUG("SCT Cluster Container found" );
   }
@@ -292,7 +292,7 @@ InDet::InDetEventCnvTool::sctClusterLink( const Identifier& id,  const Identifie
     }
   }
   ATH_MSG_DEBUG("No matching PRD found" );
-  return 0;
+  return nullptr;
 }
 
 const Trk::PrepRawData* 
@@ -305,7 +305,7 @@ InDet::InDetEventCnvTool::trtDriftCircleLink( const Identifier& id,  const Ident
   SG::ReadHandle<TRT_DriftCircleContainer> h_trtDriftCircleCont (m_trtDriftCircleContName);
   if (!h_trtDriftCircleCont.isValid()) {
     ATH_MSG_ERROR("TRT Drift Circles container not found at "<<m_trtDriftCircleContName);
-    return 0;
+    return nullptr;
   } else {
     ATH_MSG_DEBUG("TRT Drift Circles Container found" );
   }
@@ -321,7 +321,7 @@ InDet::InDetEventCnvTool::trtDriftCircleLink( const Identifier& id,  const Ident
     }
   }
   ATH_MSG_DEBUG("No matching PRD found" );
-  return 0;
+  return nullptr;
 }
 
 const InDetDD::SiDetectorElement* InDet::InDetEventCnvTool::getPixelDetectorElement(const IdentifierHash& waferHash) const {
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterContainerCnv_p1.cxx
index d336842173c8..e013b6922054 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterContainerCnv_p1.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
 */
 
 // Athena
@@ -39,8 +39,8 @@ void InDet::PixelClusterContainerCnv_p1::transToPers(const InDet::PixelClusterCo
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef InDet::PixelClusterContainer TRANS;
-    typedef ITPConverterFor<Trk::PrepRawData> CONV;
+    using TRANS = InDet::PixelClusterContainer;
+    using CONV = ITPConverterFor<Trk::PrepRawData>;
 
     PixelClusterCnv_p1  chanCnv;
     TRANS::const_iterator it_Coll     = transCont->begin();
@@ -99,7 +99,7 @@ void  InDet::PixelClusterContainerCnv_p1::persToTrans(const InDet::InDetPRD_Cont
     InDet::PixelClusterCollection* coll = nullptr;
 
     PixelClusterCnv_p1  chanCnv;
-    typedef ITPConverterFor<Trk::PrepRawData> CONV;
+    using CONV = ITPConverterFor<Trk::PrepRawData>;
 
     for (unsigned int icoll = 0; icoll < persCont->m_collections.size(); ++icoll) {
 
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.cxx
index 53f49404af8d..e9dd1ef64aa8 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.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 "InDetPrepRawData/PixelGangedClusterAmbiguities.h"
@@ -87,7 +87,7 @@ void PixelGangedClusterAmbiguitiesCnv_p1::transToPers
       if (keyPixelCluster == keyPreviousPixelCluster) uintvector.push_back(gangedPixelCluster->getHashAndIndex().hashAndIndex());
       else if (keyPixelCluster != keyPreviousPixelCluster)
 	{
-	  persObj->m_ambiguityMap.push_back(std::pair<unsigned int, std::vector<unsigned int> >(keyPreviousPixelCluster->getHashAndIndex().hashAndIndex(), uintvector));
+	  persObj->m_ambiguityMap.emplace_back(keyPreviousPixelCluster->getHashAndIndex().hashAndIndex(), uintvector);
 	  uintvector.clear();
 	  uintvector.push_back(gangedPixelCluster->getHashAndIndex().hashAndIndex());
 	}
@@ -99,7 +99,7 @@ void PixelGangedClusterAmbiguitiesCnv_p1::transToPers
       //               << "\tGangedPixel: " << gangedPixelCluster->getHashAndIndex().hashAndIndex() << "\t" << gangedPixelCluster->localPosition()[Trk::x] << std::endl;
     }
     // pushback the last one!
-    persObj->m_ambiguityMap.push_back(std::pair<unsigned int, std::vector<unsigned int> >(keyPixelCluster->getHashAndIndex().hashAndIndex(), uintvector));
+    persObj->m_ambiguityMap.emplace_back(keyPixelCluster->getHashAndIndex().hashAndIndex(), uintvector);
   }
 }
 
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterContainerCnv_p1.cxx
index bd027a0a7ae8..bcc2cb34aefe 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterContainerCnv_p1.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 "InDetEventTPCnv/InDetPrepRawData/SCT_ClusterContainerCnv_p1.h"
@@ -40,8 +40,8 @@ void InDet::SCT_ClusterContainerCnv_p1::transToPers(const InDet::SCT_ClusterCont
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef InDet::SCT_ClusterContainer TRANS;
-    typedef ITPConverterFor<Trk::PrepRawData> CONV;
+    using TRANS = InDet::SCT_ClusterContainer;
+    using CONV = ITPConverterFor<Trk::PrepRawData>;
 
     SCT_ClusterCnv_p1  chanCnv;
     TRANS::const_iterator it_Coll     = transCont->begin();
@@ -103,7 +103,7 @@ void  InDet::SCT_ClusterContainerCnv_p1::persToTrans(const InDet::InDetPRD_Conta
     InDet::SCT_ClusterCollection* coll = nullptr;
 
     SCT_ClusterCnv_p1  chanCnv;
-    typedef ITPConverterFor<Trk::PrepRawData> CONV;
+    using CONV = ITPConverterFor<Trk::PrepRawData>;
 
 //     if (log.level() <= MSG::DEBUG) log << MSG::DEBUG  << " Reading " << persCont->m_collections.size() << "Collections" << endmsg;
     for (unsigned int icoll = 0; icoll < persCont->m_collections.size(); ++icoll) {
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/TRT_DriftCircleContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/TRT_DriftCircleContainerCnv_p1.cxx
index 941c1f0ccaec..399b63e2ac72 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/TRT_DriftCircleContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/TRT_DriftCircleContainerCnv_p1.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 "InDetPrepRawData/TRT_DriftCircle.h"
@@ -44,8 +44,8 @@ void InDet::TRT_DriftCircleContainerCnv_p1::transToPers(const InDet::TRT_DriftCi
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef InDet::TRT_DriftCircleContainer TRANS;
-    typedef ITPConverterFor<Trk::PrepRawData> CONV;
+    using TRANS = InDet::TRT_DriftCircleContainer;
+    using CONV = ITPConverterFor<Trk::PrepRawData>;
 
     TRT_DriftCircleCnv_p1  chanCnv;
     TRANS::const_iterator it_Coll     = transCont->begin();
@@ -97,7 +97,7 @@ void  InDet::TRT_DriftCircleContainerCnv_p1::persToTrans(const InDet::InDetPRD_C
     InDet::TRT_DriftCircleCollection* coll = nullptr;
 
     TRT_DriftCircleCnv_p1  chanCnv;
-    typedef ITPConverterFor<Trk::PrepRawData> CONV;
+    using CONV = ITPConverterFor<Trk::PrepRawData>;
 
 //     if (log.level() <= MSG::DEBUG) log << MSG::DEBUG  << " Reading " << persCont->m_collections.size() << "Collections" << endmsg;
     for (unsigned int icoll = 0; icoll < persCont->m_collections.size(); ++icoll) {
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p2.cxx
index dd3e95eb8787..28f39be10469 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p2.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p2.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
 */
 
 // Athena
@@ -40,7 +40,7 @@ void PixelClusterContainerCnv_p2::transToPers(const InDet::PixelClusterContainer
     // to the container's vector, saving the indexes in the
     // collection.
 
-    typedef InDet::PixelClusterContainer TRANS;
+    using TRANS = InDet::PixelClusterContainer;
 
     // this is the id of the latest collection read in
     // This starts from the base of the TRT identifiers
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p3.cxx
index 391d765529a9..98d1bcc13d96 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p3.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p3.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 "InDetEventTPCnv/PixelClusterContainerCnv_p3.h"
@@ -41,7 +41,7 @@ void PixelClusterContainerCnv_p3::transToPers(const InDet::PixelClusterContainer
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef InDet::PixelClusterContainer TRANS;
+    using TRANS = InDet::PixelClusterContainer;
         
     // this is the id of the latest collection read in
     // This starts from the base of the TRT identifiers
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p2.cxx
index 2fcfce938727..fba7fb0fa4fa 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p2.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p2.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 "InDetEventTPCnv/SCT_ClusterContainerCnv_p2.h"
@@ -39,7 +39,7 @@ void SCT_ClusterContainerCnv_p2::transToPers(const InDet::SCT_ClusterContainer*
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef InDet::SCT_ClusterContainer TRANS;
+    using TRANS = InDet::SCT_ClusterContainer;
         
     // this is the id of the latest collection read in
     // This starts from the base of the TRT identifiers
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx
index d22aa45f49cc..9391046f4bb9 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.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 "InDetEventTPCnv/SCT_ClusterContainerCnv_p3.h"
@@ -39,7 +39,7 @@ void SCT_ClusterContainerCnv_p3::transToPers(const InDet::SCT_ClusterContainer*
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef InDet::SCT_ClusterContainer TRANS;
+    using TRANS = InDet::SCT_ClusterContainer;
         
     // this is the id of the latest collection read in
     // This starts from the base of the TRT identifiers
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/TRT_DriftCircleContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/TRT_DriftCircleContainerCnv_p2.cxx
index 6cebc495ef9e..15302eb240d2 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/TRT_DriftCircleContainerCnv_p2.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/TRT_DriftCircleContainerCnv_p2.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 "InDetPrepRawData/TRT_DriftCircle.h"
@@ -48,7 +48,7 @@ void TRT_DriftCircleContainerCnv_p2::transToPers(const InDet::TRT_DriftCircleCon
     // to the container's vector, saving the indexes in the
     // collection. 
 
-    typedef InDet::TRT_DriftCircleContainer TRANS;
+    using TRANS = InDet::TRT_DriftCircleContainer;
         
     // this is the id of the latest collection read in
     // Thisstarts from the base of the TRT identifiers
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.cxx
index 6ad47f02be6f..f0200c2bbd31 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.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 "InDetJiveXML/PixelClusterRetriever.h"
@@ -71,7 +71,7 @@ namespace JiveXML {
     }
    
     //Retrieve the truth collection
-    const PRD_MultiTruthCollection* simClusterMap = NULL ;
+    const PRD_MultiTruthCollection* simClusterMap = nullptr ;
     if ( evtStore()->contains<PRD_MultiTruthCollection>(m_PixelTruthMapName) ){
       if ( evtStore()->retrieve(simClusterMap, m_PixelTruthMapName).isFailure() ){
         //Just write out a warning if this fails
@@ -141,11 +141,11 @@ namespace JiveXML {
         etaModule.push_back(DataType(m_geo->PixelIDHelper()->eta_module(clusterId)));
         
         //Only process truth if its there
-        if ( simClusterMap == NULL ) continue;
+        if ( simClusterMap == nullptr ) continue;
 
         // Count the number of associated truth particles, and store their barcodes
         unsigned long countBarcodes=0;
-        typedef PRD_MultiTruthCollection::const_iterator iter;
+        using iter = PRD_MultiTruthCollection::const_iterator;
         std::pair<iter,iter> range = simClusterMap->equal_range(clusterId);
         for (iter i = range.first; i != range.second; ++i) {
           ++countBarcodes;
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx
index 254345bbd151..9e2681bbabea 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelRDORetriever.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 "InDetJiveXML/PixelRDORetriever.h"
@@ -81,7 +81,7 @@ namespace JiveXML {
         const InDetDD::SiDetectorElement *element = elements->getDetectorElement(wafer_hash);
 
         //Make sure we got the detector element
-        if (element == NULL){
+        if (element == nullptr){
           msg(MSG::WARNING) << "Unable to obtain detector element for PixelRDO hit with id " << id << endmsg;
           continue;
         }
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx
index 61d65adb01c7..cc9288af4ee8 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.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 "InDetJiveXML/SiClusterRetriever.h"
@@ -66,7 +66,7 @@ namespace JiveXML {
     }
    
     //Retrieve the truth collection
-    const PRD_MultiTruthCollection* simClusterMap = NULL ;
+    const PRD_MultiTruthCollection* simClusterMap = nullptr ;
     if ( evtStore()->contains<PRD_MultiTruthCollection>(m_SiTruthMapName) ){
       if ( evtStore()->retrieve(simClusterMap, m_SiTruthMapName).isFailure() ){
         //Just write out a warning if this fails
@@ -147,11 +147,11 @@ namespace JiveXML {
         side.push_back(DataType(m_geo->SCTIDHelper()->side(clusterId)));
         
         //Only process truth if its there
-        if ( simClusterMap == NULL ) continue;
+        if ( simClusterMap == nullptr ) continue;
 
         // Count the number of associated truth particles, and store their barcodes
         unsigned long countBarcodes=0;
-        typedef PRD_MultiTruthCollection::const_iterator iter;
+        using iter = PRD_MultiTruthCollection::const_iterator;
         std::pair<iter,iter> range = simClusterMap->equal_range(clusterId);
         for (iter i = range.first; i != range.second; ++i) {
           ++countBarcodes;
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.cxx
index 5afd14920be1..029eadc1c3a4 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiSpacePointRetriever.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 "InDetJiveXML/SiSpacePointRetriever.h"
@@ -55,7 +55,7 @@ namespace JiveXML
     unsigned int getTruthBarcodes( const Identifier idFirst, const Identifier idSecond, const PRD_MultiTruthCollection* truthColl, DataVect& barcodes) {
       
       //Make life easier
-      typedef PRD_MultiTruthCollection::const_iterator  PRDTruthIter;
+      using PRDTruthIter = PRD_MultiTruthCollection::const_iterator;
 
 
       /**
@@ -133,16 +133,16 @@ namespace JiveXML
     /**
      * Now make a list of SpacePoint - PRDTruth collection pairs to run over
      */
-    typedef std::pair< const SpacePointContainer*, const PRD_MultiTruthCollection* > SpacePointTruthPair;
+    using SpacePointTruthPair = std::pair<const SpacePointContainer *, const PRD_MultiTruthCollection *>;
     std::vector<SpacePointTruthPair> SpacePointTruthPairList;
 
     //Add Pixel if there is a collection
     if (PixelSPContainer.isValid())
-      SpacePointTruthPairList.push_back(SpacePointTruthPair(PixelSPContainer.cptr(),PixelPRDTruthColl.cptr()));
+      SpacePointTruthPairList.emplace_back(PixelSPContainer.cptr(),PixelPRDTruthColl.cptr());
     
     //Add SCT if there is a collection
     if (SCTSPContainer.isValid())
-      SpacePointTruthPairList.push_back(SpacePointTruthPair(SCTSPContainer.cptr(),SCTPRDTruthColl.cptr()));
+      SpacePointTruthPairList.emplace_back(SCTSPContainer.cptr(),SCTPRDTruthColl.cptr());
     
     /**
      * Found out how much space we will need
@@ -218,7 +218,7 @@ namespace JiveXML
 
           //Stop here if there is no truth
           const PRD_MultiTruthCollection* PRDTruthColl = (*SpacePointTruthPairItr).second;
-          if ( PRDTruthColl == NULL ) continue ;
+          if ( PRDTruthColl == nullptr ) continue ;
 
           // Finally get barcodes of associated truth particles
           numBarcodes.push_back(SiSpacePointRetrieverHelpers::getTruthBarcodes(idFirst, idSecond, PRDTruthColl, barcodes));
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/TRTRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/TRTRetriever.cxx
index 7c39876c706c..fd1f0a4bf5af 100755
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/TRTRetriever.cxx
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/TRTRetriever.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 "InDetJiveXML/TRTRetriever.h"
@@ -154,7 +154,7 @@ namespace JiveXML {
         //Count number of barcodes we get
         int NBarcodes = 0;
         //Loop over associated truth tracks with same id
-        typedef PRD_MultiTruthCollection::const_iterator iter;
+        using iter = PRD_MultiTruthCollection::const_iterator;
         std::pair<iter,iter> equalIDRange = TRTMultiTruthMap->equal_range(id);
         for ( iter TRTMultiTruthMapItr = equalIDRange.first; TRTMultiTruthMapItr != equalIDRange.second; ++TRTMultiTruthMapItr){
           NBarcodes++;
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
index 762a9d07d889..749ff2b384c2 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -49,7 +49,7 @@ namespace {
 /////////////////////////////////////////////////////////////////////
 PixelPrepDataToxAOD::PixelPrepDataToxAOD(const std::string &name, ISvcLocator *pSvcLocator) :
   AthAlgorithm(name,pSvcLocator),
-  m_PixelHelper(0),
+  m_PixelHelper(nullptr),
   m_useSiHitsGeometryMatching(true),
   m_firstEventWarnings(true),
   m_need_sihits{false}
@@ -436,7 +436,7 @@ std::vector< std::vector< int > > PixelPrepDataToxAOD::addSDOInformation( xAOD::
       
       std::vector< int > sdoDepBC;
       std::vector< float > sdoDepEnergy;
-      for( auto deposit : pos->second.getdeposits() ){
+      for( const auto& deposit : pos->second.getdeposits() ){
         if(deposit.first){
           sdoDepBC.push_back( HepMC::barcode(deposit.first));
         } else {
@@ -481,7 +481,7 @@ void  PixelPrepDataToxAOD::addSiHitInformation( xAOD::TrackMeasurementValidation
   int hitNumber(0);
   const InDetDD::SiDetectorElement* de = prd->detectorElement();
   if(de){
-    for ( auto sihit : matchingHits ) {          
+    for ( const auto& sihit : matchingHits ) {          
       sihit_energyDeposit[hitNumber] =  sihit.energyLoss() ;
       sihit_meanTime[hitNumber] =  sihit.meanTime() ;
       sihit_barcode[hitNumber] =  sihit.particleLink().barcode() ;
@@ -606,18 +606,18 @@ std::vector<SiHit> PixelPrepDataToxAOD::findAllHitsCompatibleWithCluster( const
       }
       
       // Check to see if the SiHits are compatible with each other.
-      if (fabs((highestXPos->localEndPosition().x()-(*siHitIter2)->localStartPosition().x()))<0.00005 &&
-          fabs((highestXPos->localEndPosition().y()-(*siHitIter2)->localStartPosition().y()))<0.00005 &&
-          fabs((highestXPos->localEndPosition().z()-(*siHitIter2)->localStartPosition().z()))<0.00005 )
+      if (std::abs((highestXPos->localEndPosition().x()-(*siHitIter2)->localStartPosition().x()))<0.00005 &&
+          std::abs((highestXPos->localEndPosition().y()-(*siHitIter2)->localStartPosition().y()))<0.00005 &&
+          std::abs((highestXPos->localEndPosition().z()-(*siHitIter2)->localStartPosition().z()))<0.00005 )
       {
         highestXPos = *siHitIter2;
         ajoiningHits.push_back( *siHitIter2 );
         // Dont use hit  more than once
         // @TODO could invalidate siHitIter
         siHitIter2 = multiMatchingHits.erase( siHitIter2 );
-      }else if (fabs((lowestXPos->localStartPosition().x()-(*siHitIter2)->localEndPosition().x()))<0.00005 &&
-                fabs((lowestXPos->localStartPosition().y()-(*siHitIter2)->localEndPosition().y()))<0.00005 &&
-                fabs((lowestXPos->localStartPosition().z()-(*siHitIter2)->localEndPosition().z()))<0.00005)
+      }else if (std::abs((lowestXPos->localStartPosition().x()-(*siHitIter2)->localEndPosition().x()))<0.00005 &&
+                std::abs((lowestXPos->localStartPosition().y()-(*siHitIter2)->localEndPosition().y()))<0.00005 &&
+                std::abs((lowestXPos->localStartPosition().z()-(*siHitIter2)->localEndPosition().z()))<0.00005)
       {
         lowestXPos = *siHitIter2;
         ajoiningHits.push_back( *siHitIter2 );
@@ -649,7 +649,7 @@ std::vector<SiHit> PixelPrepDataToxAOD::findAllHitsCompatibleWithCluster( const
       }
       time /= (float)ajoiningHits.size();
        
-      matchingHits.push_back(  SiHit(lowestXPos->localStartPosition(), 
+      matchingHits.emplace_back(lowestXPos->localStartPosition(), 
                                      highestXPos->localEndPosition(),
                                      energyDep,
                                      time,
@@ -659,7 +659,7 @@ std::vector<SiHit> PixelPrepDataToxAOD::findAllHitsCompatibleWithCluster( const
                                      (*siHitIter)->getLayerDisk(),
                                      (*siHitIter)->getEtaModule(),
                                      (*siHitIter)->getPhiModule(),
-                                     (*siHitIter)->getSide() ) );
+                                     (*siHitIter)->getSide() );
      ATH_MSG_DEBUG("Finished Merging " << ajoiningHits.size() << " SiHits together." );
 
     }
@@ -741,7 +741,7 @@ void PixelPrepDataToxAOD::addNNInformation(xAOD::TrackMeasurementValidation* xpr
   ATH_MSG_VERBOSE( " Starting creating input from cluster "   );
 
   const InDetDD::SiDetectorElement* de = pixelCluster->detectorElement();
-  if (de==0) {
+  if (de==nullptr) {
     ATH_MSG_ERROR("Could not get detector element");
     return;
   }
@@ -1002,8 +1002,8 @@ void  PixelPrepDataToxAOD::addNNTruthInfo(  xAOD::TrackMeasurementValidation* xp
     // position lorentz shift corrected
     float YposC = averagePosition.y()-shift;
 
-    if (fabs(YposC)>design->width()/2 && 
-        fabs(averagePosition.y())<design->width()/2)
+    if (std::abs(YposC)>design->width()/2 && 
+        std::abs(averagePosition.y())<design->width()/2)
    { 
       if (YposC>design->width()/2)
       {
@@ -1146,15 +1146,15 @@ InDetDD::SiCellId PixelPrepDataToxAOD::getCellIdWeightedPosition(  const InDet::
 {
 
   const InDetDD::SiDetectorElement* de = pixelCluster->detectorElement();
-  if (de==0) {
+  if (de==nullptr) {
     ATH_MSG_ERROR("Could not get detector element");
-    return InDetDD::SiCellId();
+    return {};
   }
 
   const InDetDD::PixelModuleDesign* design(dynamic_cast<const InDetDD::PixelModuleDesign*>(&de->design()));
   if (not design) {
     ATH_MSG_WARNING("PixelModuleDesign was not retrieved in function 'getCellIdWeightedPosition'");
-    return InDetDD::SiCellId();
+    return {};
   }
   const std::vector<Identifier>& rdos  = pixelCluster->rdoList();  
 
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
index eeb8e5a334f7..3eaded67f4f4 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -432,7 +432,7 @@ void SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster(const InDet::SCT_Clust
       continue;
     } else if (ajoiningHits.size()==1) {
       // Copy Si Hit ready to return
-      matchingHits.push_back(SiHit(*ajoiningHits[0]));
+      matchingHits.emplace_back(*ajoiningHits[0]);
       continue;
     } else {
       //  Build new SiHit and merge information together.
@@ -444,7 +444,7 @@ void SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster(const InDet::SCT_Clust
         time += siHit->meanTime();
       }
       time /= static_cast<float>(ajoiningHits.size());
-      matchingHits.push_back(SiHit{lowestXPos->localStartPosition(), 
+      matchingHits.emplace_back(lowestXPos->localStartPosition(), 
             highestXPos->localEndPosition(),
             energyDep,
             time,
@@ -454,7 +454,7 @@ void SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster(const InDet::SCT_Clust
             (*siHitIter)->getLayerDisk(),
             (*siHitIter)->getEtaModule(),
             (*siHitIter)->getPhiModule(),
-            (*siHitIter)->getSide()});
+            (*siHitIter)->getSide());
     }
   }
 }
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/TRT_PrepDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/TRT_PrepDataToxAOD.cxx
index b038be6ae3b5..d3de749af387 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/TRT_PrepDataToxAOD.cxx
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/TRT_PrepDataToxAOD.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -46,8 +46,8 @@ TRT_PrepDataToxAOD::TRT_PrepDataToxAOD(const std::string &name, ISvcLocator *pSv
   m_trtcaldbTool("TRT_CalDbTool", this),
   m_neighbourSvc("TRT_StrawNeighbourSvc", name),
   m_TRTStrawSummaryTool("TRT_StrawStatusSummaryTool",this),
-  m_TRTHelper(0),
-  m_trtman(0),
+  m_TRTHelper(nullptr),
+  m_trtman(nullptr),
   m_firstEventWarnings(true)
 { 
   
@@ -109,7 +109,7 @@ StatusCode TRT_PrepDataToxAOD::execute()
   //This is optional for the algorithm. If not there, just print a one-time warning
   // On ESD 
 
-  const PRD_MultiTruthCollection* prdmtColl = 0; // to be used in the loop later
+  const PRD_MultiTruthCollection* prdmtColl = nullptr; // to be used in the loop later
   if (m_useTruthInfo && (!m_multiTruth.key().empty())  ) {
     SG::ReadHandle<PRD_MultiTruthCollection> h_prdmtColl(m_multiTruth);
     if (not h_prdmtColl.isValid()){
@@ -123,7 +123,7 @@ StatusCode TRT_PrepDataToxAOD::execute()
   //This is optional for the algorithm. If not there, just print a one-time warning
   // On RDO
 
-  const InDetSimDataCollection* sdoCollection = 0; // to be used in the loop later
+  const InDetSimDataCollection* sdoCollection = nullptr; // to be used in the loop later
   if (m_writeSDOs && m_useTruthInfo && (!m_SDOcontainer.key().empty()) ) {
     SG::ReadHandle<InDetSimDataCollection> h_sdoCollection(m_SDOcontainer);
     if (not h_sdoCollection.isValid()) {
diff --git a/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/src/SiHitCollectionCnv.cxx b/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/src/SiHitCollectionCnv.cxx
index 4359f4328ed5..66664145ddac 100644
--- a/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/src/SiHitCollectionCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/src/SiHitCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetSimEventTPCnv/InDetHits/SiHitCollectionCnv_p1.h"
@@ -29,7 +29,7 @@ SiHitCollection* SiHitCollectionCnv::createTransient() {
     static const pool::Guid   p3_guid("59E13FDA-2799-4362-8423-44D57F08734D");
     static const pool::Guid   old_guid("1EC39DA3-14F9-4901-88C7-F6909B064574");
 
-    SiHitCollection       *trans_cont(0);
+    SiHitCollection       *trans_cont(nullptr);
     if( this->compareClassGuid(p3_guid)) {
       std::unique_ptr< SiHitCollection_p3 >   col_vect( this->poolReadObject< SiHitCollection_p3 >() );
       trans_cont = converter_p3.createTransient( col_vect.get(), mlog );
diff --git a/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/src/TRTUncompressedHitCollectionCnv.cxx b/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/src/TRTUncompressedHitCollectionCnv.cxx
index 302922715d36..0c401d687dd4 100755
--- a/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/src/TRTUncompressedHitCollectionCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/src/TRTUncompressedHitCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetSimEventTPCnv/InDetHits/TRT_HitCollectionCnv_p1.h"
@@ -32,7 +32,7 @@ TRTUncompressedHitCollection* TRTUncompressedHitCollectionCnv::createTransient()
     static const pool::Guid   old_guid("35722E01-C4E3-420E-8A7E-E375C5E7989D");
 
 
-    TRTUncompressedHitCollection       *trans_cont(0);
+    TRTUncompressedHitCollection       *trans_cont(nullptr);
     if( this->compareClassGuid(p4_guid)) {
         std::unique_ptr< TRT_HitCollection_p4 >   col_vect( this->poolReadObject< TRT_HitCollection_p4 >() );
         trans_cont = converter_p4.createTransient( col_vect.get(), mlog );
diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p4.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p4.cxx
index c588daf8eec2..32b73f55c83b 100644
--- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p4.cxx
+++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p4.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetSimEvent/TRTUncompressedHit.h"
@@ -54,7 +54,7 @@ void TRT_HitCollectionCnv_p4::transToPers(const TRTUncompressedHitCollection* tr
 
   const EventContext& ctx = Gaudi::Hive::currentContext();
   const IProxyDict* proxy = Atlas::getExtendedEventContext(ctx).proxy();
-  const HepMcParticleLink * lastLink=NULL;
+  const HepMcParticleLink * lastLink=nullptr;
   int lastId = -1;
   double lastT = 0.0*CLHEP::ns;
   unsigned int idx = 0;
@@ -104,7 +104,7 @@ void TRT_HitCollectionCnv_p4::transToPers(const TRTUncompressedHitCollection* tr
     const HepGeom::Point3D<double> hitStart(trtHit->GetPreStepX(), trtHit->GetPreStepY(), trtHit->GetPreStepZ()); // mm
 
     const double meanTime = trtHit->GetGlobalTime(); // ns  // Time of flight from the I.P. to the center of the hit.
-    const double dTLast = fabs(meanTime - lastT);      // |d(meantime)| between the previous hit and the current one.
+    const double dTLast = std::abs(meanTime - lastT);      // |d(meantime)| between the previous hit and the current one.
     const double dRLast = lastEnd.distance(hitStart);  // Distance between end of previous hit and start of current one;
     // this is zero if the hit is a continuation of the same particle in the same straw.
 
diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCnv_p1_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCnv_p1_test.cxx
index 7f37bfa90a12..798649f3c882 100644
--- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCnv_p1_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCnv_p1_test.cxx
@@ -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
 */
 
 // $Id$
@@ -49,7 +49,7 @@ void compare (const SiHit& p1,
 
 void testit (const SiHit& trans1)
 {
-  MsgStream log (0, "test");
+  MsgStream log (nullptr, "test");
   SiHitCnv_p1 cnv;
   SiHit_p1 pers;
   cnv.transToPers (&trans1, &pers, log);
diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p2_test.cxx
index 8a7d58a199be..63702dca3549 100644
--- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p2_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p2_test.cxx
@@ -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
 */
 
 // $Id$
@@ -59,7 +59,7 @@ void compare (const SiHitCollection& p1,
 
 void testit (const SiHitCollection& trans1)
 {
-  MsgStream log (0, "test");
+  MsgStream log (nullptr, "test");
   SiHitCollectionCnv_p2 cnv;
   SiHitCollection_p2 pers;
   cnv.transToPers (&trans1, &pers, log);
diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p3_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p3_test.cxx
index 93ae567d15ea..e2e442a09a05 100644
--- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p3_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p3_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id$
@@ -58,7 +58,7 @@ void compare (const SiHitCollection& p1,
 
 void testit (const SiHitCollection& trans1)
 {
-  MsgStream log (0, "test");
+  MsgStream log (nullptr, "test");
   SiHitCollectionCnv_p3 cnv;
   SiHitCollection_p3 pers;
   cnv.transToPers (&trans1, &pers, log);
diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCnv_p1_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCnv_p1_test.cxx
index d329d637d354..a49bda165010 100644
--- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCnv_p1_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCnv_p1_test.cxx
@@ -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
 */
 
 // $Id$
@@ -54,7 +54,7 @@ void compare (const TRTUncompressedHit& p1,
 
 void testit (const TRTUncompressedHit& trans1)
 {
-  MsgStream log (0, "test");
+  MsgStream log (nullptr, "test");
   TRT_HitCnv_p1 cnv;
   TRT_Hit_p1 pers;
   cnv.transToPers (&trans1, &pers, log);
diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p2_test.cxx
index c53c6b22e72b..0698f169343e 100644
--- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p2_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p2_test.cxx
@@ -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
 */
 
 // $Id$
@@ -64,7 +64,7 @@ void compare (const TRTUncompressedHitCollection& p1,
 
 void testit (const TRTUncompressedHitCollection& trans1)
 {
-  MsgStream log (0, "test");
+  MsgStream log (nullptr, "test");
   TRT_HitCollectionCnv_p2 cnv;
   TRT_HitCollection_p2 pers;
   cnv.transToPers (&trans1, &pers, log);
diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p3_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p3_test.cxx
index d223bd0a6925..1987eb0c2ec4 100644
--- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p3_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p3_test.cxx
@@ -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
 */
 
 // $Id$
@@ -84,7 +84,7 @@ void compare (const TRTUncompressedHitCollection& p1,
 
 void testit (const TRTUncompressedHitCollection& trans1)
 {
-  MsgStream log (0, "test");
+  MsgStream log (nullptr, "test");
   TRT_HitCollectionCnv_p3 cnv;
   TRT_HitCollection_p3 pers;
   cnv.transToPers (&trans1, &pers, log);
diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p4_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p4_test.cxx
index eae9cee6f0f7..3260473a4636 100644
--- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p4_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p4_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id$
@@ -84,7 +84,7 @@ void compare (const TRTUncompressedHitCollection& p1,
 
 void testit (const TRTUncompressedHitCollection& trans1)
 {
-  MsgStream log (0, "test");
+  MsgStream log (nullptr, "test");
   TRT_HitCollectionCnv_p4 cnv;
   TRT_HitCollection_p4 pers;
   cnv.transToPers (&trans1, &pers, log);
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.cxx
index b6ad13efc883..5fab5857ecdd 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -73,7 +73,7 @@ long PixelRawContByteStreamCnv::storageType()
 ////////////////////////
 StatusCode PixelRawContByteStreamCnv::createRepConst(DataObject* pObj, IOpaqueAddress*& pAddr) const {
 
-  PixelRDO_Container* cont=0; 
+  PixelRDO_Container* cont=nullptr; 
   SG::fromStorable(pObj,cont); 
 
   if(!cont) {
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamTool.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamTool.cxx
index b6300584816d..2d1308fe5969 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamTool.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -87,7 +87,7 @@ StatusCode PixelRawContByteStreamTool::convert(PixelRDO_Container* cont) const {
     const InDetRawDataCollection<PixelRDORawData>* coll = (*it_coll) ;
 
     // get OfflineId and RODID
-    if (coll != NULL){
+    if (coll != nullptr){
       Identifier offlineId = coll->identify();
       uint32_t rodId = pixCabling->find_entry_offrob(offlineId);
       if (rodId<1) {
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx
index 3532873c795f..ec4c1dfb798f 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.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 "PixelRawDataProvider.h"
@@ -69,7 +69,7 @@ StatusCode PixelRawDataProvider::initialize() {
 // --------------------------------------------------------------------
 // Execute
 
-typedef EventContainers::IdentifiableContTemp<InDetRawDataCollection<PixelRDORawData>> DummyPixelRDO;
+using DummyPixelRDO = EventContainers::IdentifiableContTemp<InDetRawDataCollection<PixelRDORawData>>;
 
 StatusCode PixelRawDataProvider::execute(const EventContext& ctx) const {
 
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.cxx
index 225f6858101e..29a94c6b97f6 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.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 "SCTRawContByteStreamTool.h"
@@ -97,7 +97,7 @@ StatusCode SCTRawContByteStreamTool::convert(const SCT_RDO_Container* sctRDOCont
   }  // End loop over collections
 
   // Now encode data for each ROD in turn
-  for (auto rodToRDOs : rdoMap) {
+  for (const auto& rodToRDOs : rdoMap) {
     rod = fullEventAssembler->getRodData(rodToRDOs.first); // Get ROD data address
     m_encoder->fillROD(*rod, rodToRDOs.first, rodToRDOs.second); // Encode ROD data
   }
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.cxx
index 4e523738517f..d7650c09cf2d 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.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 "SCT_RodEncoder.h" 
@@ -384,7 +384,7 @@ int SCT_RodEncoder::getTimeBin(const SCT_RDORawData* rdo) const
 {
   int timeBin{0};
   const SCT3_RawData* rdoCosmic{dynamic_cast<const SCT3_RawData*>(rdo)};
-  if (rdoCosmic != 0) timeBin = rdoCosmic->getTimeBin();
+  if (rdoCosmic != nullptr) timeBin = rdoCosmic->getTimeBin();
   return timeBin;
 }
 
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/InDetUpdateCaches.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/InDetUpdateCaches.cxx
index 1d0b97849724..6dad35b1677a 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/src/InDetUpdateCaches.cxx
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/InDetUpdateCaches.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetDetDescrExample/InDetUpdateCaches.h"
@@ -33,7 +33,7 @@ InDetUpdateCaches::initialize(){
   msg(MSG::INFO) << "initialize()" << endmsg;  
   StatusCode sc;
   // Retrieve GeoModel managers
-  const InDetDD::SCT_DetectorManager * sctManager = 0;
+  const InDetDD::SCT_DetectorManager * sctManager = nullptr;
   sc=detStore()->retrieve(sctManager, "SCT");
   if (sc.isFailure() || !sctManager) {
     msg(MSG::WARNING) << "Could not find the SCT_DetectorManager" << endmsg;
@@ -41,7 +41,7 @@ InDetUpdateCaches::initialize(){
     msg(MSG::DEBUG) << "SCT_DetectorManager found" << endmsg;
     m_detManagers.push_back(sctManager);
   }
-  const InDetDD::PixelDetectorManager * pixelManager = 0;
+  const InDetDD::PixelDetectorManager * pixelManager = nullptr;
   sc=detStore()->retrieve(pixelManager, "Pixel");
   if (sc.isFailure() || !pixelManager) {
     msg(MSG::WARNING) << "Could not find the PixelDetectorManager" << endmsg;
@@ -49,7 +49,7 @@ InDetUpdateCaches::initialize(){
     msg(MSG::DEBUG) << "PixelDetectorManager found" << endmsg;
     m_detManagers.push_back(pixelManager);
  }
-  const InDetDD::TRT_DetectorManager * trtManager = 0;
+  const InDetDD::TRT_DetectorManager * trtManager = nullptr;
   sc=detStore()->retrieve(trtManager, "TRT");
   if (sc.isFailure() || !trtManager) {
     msg(MSG::WARNING) << "Could not find the TRT_DetectorManager" << endmsg;
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/PrintSiElements.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/PrintSiElements.cxx
index fcb052a4df5f..21b41d1ce472 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/src/PrintSiElements.cxx
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/PrintSiElements.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 "InDetDetDescrExample/PrintSiElements.h"
@@ -183,7 +183,7 @@ PrintSiElements::printElements(const std::string & managerName){
 StatusCode PrintSiElements::execute() {
   if (m_firstEvent) {
     m_firstEvent = false;
-    for(std::string detManagerName : m_detManagerNames){
+    for(const std::string& detManagerName : m_detManagerNames){
       printElements(detManagerName).ignore();
     }
   }
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
index 9bcf27e15990..f99bba42cd7b 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetDetDescrExample/ReadSiDetectorElements.h"
@@ -35,10 +35,10 @@ ReadSiDetectorElements::ReadSiDetectorElements(const std::string& name, ISvcLoca
   AthAlgorithm(name, pSvcLocator),
   m_managerName("Pixel"),  // or SCT
   m_doLoop(true),
-  m_manager(0),
-  m_idHelper(0),
-  m_pixelIdHelper(0),
-  m_sctIdHelper(0),
+  m_manager(nullptr),
+  m_idHelper(nullptr),
+  m_pixelIdHelper(nullptr),
+  m_sctIdHelper(nullptr),
   m_first(true)
 {  
   // Get parameter values from jobOptions file
@@ -387,20 +387,20 @@ void ReadSiDetectorElements::printRandomAccess(const bool accessDuringInitializa
       ATH_MSG_ALWAYS(" A Pixel Barrel element (non B-layer) "        );
       ATH_MSG_ALWAYS("----------------------------------------------");
       id = idHelper->wafer_id(0,1,15,-3);
-      cellIds.push_back(SiCellId(32,8)); // phi,eta
+      cellIds.emplace_back(32,8); // phi,eta
       //add a range of cells from 151 to 175
       for (int i(151);i != 176; ++i){
-        cellIds.push_back(SiCellId(i,8)); // phi,eta
+        cellIds.emplace_back(i,8); // phi,eta
       }
-      cellIds.push_back(SiCellId(-1,1)); // phi,eta
-      cellIds.push_back(SiCellId(0,1)); // phi,eta
-      cellIds.push_back(SiCellId(1,-1)); // phi,eta
-      cellIds.push_back(SiCellId(1,0)); // phi,eta
-      cellIds.push_back(SiCellId(327,1)); // phi,eta
-      cellIds.push_back(SiCellId(328,1)); // phi,eta
-      cellIds.push_back(SiCellId(1,143)); // phi,eta
-      cellIds.push_back(SiCellId(1,144)); // phi,eta
-      positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi
+      cellIds.emplace_back(-1,1); // phi,eta
+      cellIds.emplace_back(0,1); // phi,eta
+      cellIds.emplace_back(1,-1); // phi,eta
+      cellIds.emplace_back(1,0); // phi,eta
+      cellIds.emplace_back(327,1); // phi,eta
+      cellIds.emplace_back(328,1); // phi,eta
+      cellIds.emplace_back(1,143); // phi,eta
+      cellIds.emplace_back(1,144); // phi,eta
+      positions.emplace_back(12.727*CLHEP::mm, 4.534*CLHEP::mm); // eta,phi
       testElement(id, cellIds, positions, elements);
 
       // A barrel element (B-Layer)
@@ -410,8 +410,8 @@ void ReadSiDetectorElements::printRandomAccess(const bool accessDuringInitializa
       id = idHelper->wafer_id(0,0,7,-3);
       cellIds.clear();
       positions.clear();
-      cellIds.push_back(SiCellId(32,8)); // phi,eta
-      positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi
+      cellIds.emplace_back(32,8); // phi,eta
+      positions.emplace_back(12.727*CLHEP::mm, 4.534*CLHEP::mm); // eta,phi
       testElement(id, cellIds, positions, elements);
 
       // An endcap element
@@ -419,12 +419,12 @@ void ReadSiDetectorElements::printRandomAccess(const bool accessDuringInitializa
       ATH_MSG_ALWAYS(" A Pixel Endcap element"                       );
       ATH_MSG_ALWAYS("----------------------------------------------");
       id = idHelper->wafer_id(2,2,13,0);
-      cellIds.push_back(SiCellId(182,75)); // phi,eta
-      positions.push_back(Amg::Vector2D(0*CLHEP::mm, 0*CLHEP::mm)); // eta,phi
-      positions.push_back(Amg::Vector2D(30.4*CLHEP::mm, 8.2*CLHEP::mm)); // eta,phi - on edge
-      positions.push_back(Amg::Vector2D(12*CLHEP::mm, -8.15*CLHEP::mm)); // eta,phi - near edge
-      positions.push_back(Amg::Vector2D(12*CLHEP::mm, -8.25*CLHEP::mm)); // eta,phi - near edge
-      positions.push_back(Amg::Vector2D(12*CLHEP::mm, -8.35*CLHEP::mm)); // eta,phi - outside
+      cellIds.emplace_back(182,75); // phi,eta
+      positions.emplace_back(0*CLHEP::mm, 0*CLHEP::mm); // eta,phi
+      positions.emplace_back(30.4*CLHEP::mm, 8.2*CLHEP::mm); // eta,phi - on edge
+      positions.emplace_back(12*CLHEP::mm, -8.15*CLHEP::mm); // eta,phi - near edge
+      positions.emplace_back(12*CLHEP::mm, -8.25*CLHEP::mm); // eta,phi - near edge
+      positions.emplace_back(12*CLHEP::mm, -8.35*CLHEP::mm); // eta,phi - outside
       testElement(id, cellIds, positions, elements);
 
     }
@@ -447,17 +447,17 @@ void ReadSiDetectorElements::printRandomAccess(const bool accessDuringInitializa
       id = idHelper->wafer_id(0,1,15,-3,0);
       cellIds.clear();
       positions.clear();
-      cellIds.push_back(SiCellId(32)); // phi,eta
-      cellIds.push_back(SiCellId(1)); // phi,eta
-      cellIds.push_back(SiCellId(0)); // phi,eta
+      cellIds.emplace_back(32); // phi,eta
+      cellIds.emplace_back(1); // phi,eta
+      cellIds.emplace_back(0); // phi,eta
       if (m_managerName == "SCT") {
-        cellIds.push_back(SiCellId(-1)); // phi,eta
-        cellIds.push_back(SiCellId(-2)); // phi,eta
-        cellIds.push_back(SiCellId(-3)); // phi,eta
+        cellIds.emplace_back(-1); // phi,eta
+        cellIds.emplace_back(-2); // phi,eta
+        cellIds.emplace_back(-3); // phi,eta
       }
-      cellIds.push_back(SiCellId(767)); // phi,eta
-      cellIds.push_back(SiCellId(768)); // phi,eta
-      positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi
+      cellIds.emplace_back(767); // phi,eta
+      cellIds.emplace_back(768); // phi,eta
+      positions.emplace_back(12.727*CLHEP::mm, 4.534*CLHEP::mm); // eta,phi
       testElement(id, cellIds, positions, elements);
 
       // A barrel element (other side of above)
@@ -467,8 +467,8 @@ void ReadSiDetectorElements::printRandomAccess(const bool accessDuringInitializa
       id = idHelper->wafer_id(0,1,15,-3,1);
       cellIds.clear();
       positions.clear();
-      cellIds.push_back(SiCellId(32)); // phi,eta
-      positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi
+      cellIds.emplace_back(32); // phi,eta
+      positions.emplace_back(12.727*CLHEP::mm, 4.534*CLHEP::mm); // eta,phi
       testElement(id, cellIds, positions, elements);
 
       // A outer fwd
@@ -478,14 +478,14 @@ void ReadSiDetectorElements::printRandomAccess(const bool accessDuringInitializa
       id = idHelper->wafer_id(2,3,15,0,0);
       cellIds.clear();
       positions.clear();
-      cellIds.push_back(SiCellId(532)); // phi,eta
-      cellIds.push_back(SiCellId(0)); // phi,eta
-      if (m_managerName == "SCT") cellIds.push_back(SiCellId(-1)); // phi,eta
-      cellIds.push_back(SiCellId(767)); // phi,eta
-      cellIds.push_back(SiCellId(768)); // phi,eta
-      positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 20.534*CLHEP::mm)); // eta,phi
-      positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, -20.534*CLHEP::mm)); // eta,phi
-      positions.push_back(Amg::Vector2D(3*CLHEP::mm, -25*CLHEP::mm)); // eta,phi
+      cellIds.emplace_back(532); // phi,eta
+      cellIds.emplace_back(0); // phi,eta
+      if (m_managerName == "SCT") cellIds.emplace_back(-1); // phi,eta
+      cellIds.emplace_back(767); // phi,eta
+      cellIds.emplace_back(768); // phi,eta
+      positions.emplace_back(12.727*CLHEP::mm, 20.534*CLHEP::mm); // eta,phi
+      positions.emplace_back(12.727*CLHEP::mm, -20.534*CLHEP::mm); // eta,phi
+      positions.emplace_back(3*CLHEP::mm, -25*CLHEP::mm); // eta,phi
       testElement(id, cellIds, positions, elements);
 
       ATH_MSG_ALWAYS("----------------------------------------------");
@@ -494,10 +494,10 @@ void ReadSiDetectorElements::printRandomAccess(const bool accessDuringInitializa
       id = idHelper->wafer_id(2,3,15,0,1);
       cellIds.clear();
       positions.clear();
-      cellIds.push_back(SiCellId(532)); // phi,eta
-      positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 20.534*CLHEP::mm)); // eta,phi
-      positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, -20.534*CLHEP::mm)); // eta,phi
-      positions.push_back(Amg::Vector2D(3*CLHEP::mm, -25*CLHEP::mm)); // eta,phi
+      cellIds.emplace_back(532); // phi,eta
+      positions.emplace_back(12.727*CLHEP::mm, 20.534*CLHEP::mm); // eta,phi
+      positions.emplace_back(12.727*CLHEP::mm, -20.534*CLHEP::mm); // eta,phi
+      positions.emplace_back(3*CLHEP::mm, -25*CLHEP::mm); // eta,phi
       testElement(id, cellIds, positions, elements);
 
       // A middle fwd
@@ -507,8 +507,8 @@ void ReadSiDetectorElements::printRandomAccess(const bool accessDuringInitializa
       id = idHelper->wafer_id(2,1,15,1,0);
       cellIds.clear();
       positions.clear();
-      cellIds.push_back(SiCellId(532)); // phi,eta
-      positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi
+      cellIds.emplace_back(532); // phi,eta
+      positions.emplace_back(12.727*CLHEP::mm, 4.534*CLHEP::mm); // eta,phi
       testElement(id, cellIds, positions, elements);
 
       // A truncated middle
@@ -518,8 +518,8 @@ void ReadSiDetectorElements::printRandomAccess(const bool accessDuringInitializa
       id = idHelper->wafer_id(2,7,15,1,0);
       cellIds.clear();
       positions.clear();
-      cellIds.push_back(SiCellId(532)); // phi,eta
-      positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi
+      cellIds.emplace_back(532); // phi,eta
+      positions.emplace_back(12.727*CLHEP::mm, 4.534*CLHEP::mm); // eta,phi
       testElement(id, cellIds, positions, elements);
 
       // A inner fwd
@@ -529,8 +529,8 @@ void ReadSiDetectorElements::printRandomAccess(const bool accessDuringInitializa
       id = idHelper->wafer_id(2,1,15,2,0);
       cellIds.clear();
       positions.clear();
-      cellIds.push_back(SiCellId(532)); // phi,eta
-      positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi
+      cellIds.emplace_back(532); // phi,eta
+      positions.emplace_back(12.727*CLHEP::mm, 4.534*CLHEP::mm); // eta,phi
       testElement(id, cellIds, positions, elements);
     }
   } // if manager = Pixel,SCT
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadTRT_DetectorElements.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadTRT_DetectorElements.cxx
index 9930bb6eeda9..ce20f3f42cce 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadTRT_DetectorElements.cxx
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadTRT_DetectorElements.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetDetDescrExample/ReadTRT_DetectorElements.h"
@@ -33,8 +33,8 @@ namespace{
 ReadTRT_DetectorElements::ReadTRT_DetectorElements(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator),
   m_managerName("TRT"),
-  m_manager(0),
-  m_idHelper(0),
+  m_manager(nullptr),
+  m_idHelper(nullptr),
   m_maxdiff(0),
   m_first(true)
 {  
@@ -334,7 +334,7 @@ ReadTRT_DetectorElements::printStraw(const TRT_BaseElement * element, unsigned i
     return;
   }
 
-  Amg::Transform3D transform = element->strawTransform(strawNum);
+  const Amg::Transform3D& transform = element->strawTransform(strawNum);
   Amg::Vector3D strawCenter = transform * origin;
   cout << "strawNum = " << strawNum << ", "
        << "x = " << strawCenter.x() << ", "
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx
index 0047e056301d..fd8041165941 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetDetDescrExample/TestTRT_Alignment.h"
@@ -39,8 +39,8 @@ namespace{
 
 TestTRT_Alignment::TestTRT_Alignment(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator),
-  m_manager(0),
-  m_idHelper(0)
+  m_manager(nullptr),
+  m_idHelper(nullptr)
 {  
   // Get parameter values from jobOptions file
   declareProperty("ManagerName", m_managerName = "TRT");
@@ -225,8 +225,8 @@ void
 TestTRT_Alignment::compareStraw(const TRT_BaseElement * element, int straw){
   static const Amg::Vector3D zeroPoint(0., 0., 0.); 
   static const Amg::Vector3D zAxis(0., 0., 1.); 
-  Amg::Transform3D strawDefXF = element->strawTransform(straw);
-  Amg::Transform3D strawXF = element->strawTransform(straw);
+  const Amg::Transform3D& strawDefXF = element->strawTransform(straw);
+  const Amg::Transform3D& strawXF = element->strawTransform(straw);
   
   Amg::Transform3D globalDelta = strawXF * strawDefXF.inverse();
   // test if it is the identity transform within some error
diff --git a/InnerDetector/InDetG4/SCT_G4_SD/test/SctSensorSD_gtest.cxx b/InnerDetector/InDetG4/SCT_G4_SD/test/SctSensorSD_gtest.cxx
index 8b4589302274..a281d4c81652 100644
--- a/InnerDetector/InDetG4/SCT_G4_SD/test/SctSensorSD_gtest.cxx
+++ b/InnerDetector/InDetG4/SCT_G4_SD/test/SctSensorSD_gtest.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 "src/SctSensorSD.h"
@@ -121,7 +121,7 @@ TEST_F( SctSensorSDtest, indexMethod )
   G4LogicalVolume fLogical(box, material, name);
   G4String name1 = "physicalName";
   G4VPhysicalVolume* pPhysical = nullptr;
-  G4MyPhysicalVolume physicalVolume(0, G4ThreeVector(0,0,0), name1, &fLogical, pPhysical);
+  G4MyPhysicalVolume physicalVolume(nullptr, G4ThreeVector(0,0,0), name1, &fLogical, pPhysical);
   physicalVolume.SetCopyNo(1000);
   G4int nReplica = 2;
   navigationHistory->SetFirstEntry(&physicalVolume);
diff --git a/InnerDetector/InDetG4/TRT_G4Utilities/TRT_G4Utilities/TRTParameters.hh b/InnerDetector/InDetG4/TRT_G4Utilities/TRT_G4Utilities/TRTParameters.hh
index 025bbe958cc5..ad74a75f4d27 100644
--- a/InnerDetector/InDetG4/TRT_G4Utilities/TRT_G4Utilities/TRTParameters.hh
+++ b/InnerDetector/InDetG4/TRT_G4Utilities/TRT_G4Utilities/TRTParameters.hh
@@ -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
 */
 
 
@@ -16,13 +16,13 @@ class TRTParameters
 public:
   static const TRTParameters* GetPointer();
   
-  int GetInteger(std::string) const;
-  double GetDouble(std::string) const;
-  void GetIntegerArray(std::string, int, int*) const;
-  void GetDoubleArray(std::string, int, double*) const;
-  void GetPartOfIntegerArray(std::string, int, int*) const;
-  void GetPartOfDoubleArray(std::string, int, double*) const;
-  int GetElementOfIntegerArray(std::string, int) const;
+  int GetInteger(const std::string&) const;
+  double GetDouble(const std::string&) const;
+  void GetIntegerArray(const std::string&, int, int*) const;
+  void GetDoubleArray(const std::string&, int, double*) const;
+  void GetPartOfIntegerArray(const std::string&, int, int*) const;
+  void GetPartOfDoubleArray(const std::string&, int, double*) const;
+  int GetElementOfIntegerArray(const std::string&, int) const;
 
   MsgStream& msg (MSG::Level lvl) { return m_msg << lvl; }
   bool msgLevel (MSG::Level lvl) { return m_msg.get().level() <= lvl; }
@@ -31,7 +31,7 @@ private:
   TRTParameters();
   ~TRTParameters();
   
-  void ReadInputFile(std::string);
+  void ReadInputFile(const std::string&);
   void PrintListOfParameters() const;
   
   std::multimap<std::string, double, std::less<std::string> >
diff --git a/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParameters.cc b/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParameters.cc
index 2266c13306ea..ebf057f44869 100644
--- a/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParameters.cc
+++ b/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParameters.cc
@@ -44,7 +44,7 @@ TRTParameters::~TRTParameters()
 
   // Called by TRTParameters
 
-void TRTParameters::ReadInputFile(std::string fileName)
+void TRTParameters::ReadInputFile(const std::string& fileName)
 {
   if (msgLevel(MSG::VERBOSE)) msg(MSG::VERBOSE) << "######### Method TRTParameters::ReadInputFile" << endmsg;
 
@@ -169,7 +169,7 @@ void TRTParameters::PrintListOfParameters() const
 
   // Called on demand
 
-int TRTParameters::GetInteger(std::string parameterName) const
+int TRTParameters::GetInteger(const std::string& parameterName) const
 {
   int numberOfItems = m_multimapOfParameters.count(parameterName);
 
@@ -201,7 +201,7 @@ int TRTParameters::GetInteger(std::string parameterName) const
 
   // Called on demand
 
-double TRTParameters::GetDouble(std::string parameterName) const
+double TRTParameters::GetDouble(const std::string& parameterName) const
 {
   int numberOfItems = m_multimapOfParameters.count(parameterName);
 
@@ -233,7 +233,7 @@ double TRTParameters::GetDouble(std::string parameterName) const
 
   // Called on demand
 
-void TRTParameters::GetIntegerArray(std::string arrayName, int arraySize,
+void TRTParameters::GetIntegerArray(const std::string& arrayName, int arraySize,
                                     int* array) const
 {
   int numberOfItems = m_multimapOfParameters.count(arrayName);
@@ -267,7 +267,7 @@ void TRTParameters::GetIntegerArray(std::string arrayName, int arraySize,
 
   // Called on demand
 
-void TRTParameters::GetDoubleArray(std::string arrayName, int arraySize,
+void TRTParameters::GetDoubleArray(const std::string& arrayName, int arraySize,
                                    double* array) const
 {
   int numberOfItems = m_multimapOfParameters.count(arrayName);
@@ -301,7 +301,7 @@ void TRTParameters::GetDoubleArray(std::string arrayName, int arraySize,
 
   // Called on demand
 
-void TRTParameters::GetPartOfIntegerArray(std::string arrayName,
+void TRTParameters::GetPartOfIntegerArray(const std::string& arrayName,
                                           int numberOfDemandedElements, int* array) const
 {
   int numberOfItems = m_multimapOfParameters.count(arrayName);
@@ -336,7 +336,7 @@ void TRTParameters::GetPartOfIntegerArray(std::string arrayName,
 
   // Called on demand
 
-void TRTParameters::GetPartOfDoubleArray(std::string arrayName,
+void TRTParameters::GetPartOfDoubleArray(const std::string& arrayName,
                                          int numberOfDemandedElements, double* array) const
 {
   int numberOfItems = m_multimapOfParameters.count(arrayName);
@@ -371,7 +371,7 @@ void TRTParameters::GetPartOfDoubleArray(std::string arrayName,
 
   // Called on demand
 
-int TRTParameters::GetElementOfIntegerArray(std::string arrayName,
+int TRTParameters::GetElementOfIntegerArray(const std::string& arrayName,
                                             int elementIndex) const
 {
   int numberOfItems = m_multimapOfParameters.count(arrayName);
diff --git a/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParametersOfModulesB.cc b/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParametersOfModulesB.cc
index 9f6869cbe059..6f0379ce9b24 100644
--- a/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParametersOfModulesB.cc
+++ b/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParametersOfModulesB.cc
@@ -230,8 +230,8 @@ void TRTParametersOfModulesB::DefineParameters()
       m_zOfCoolingTubesB[i] -= m_zOfRadiatorB;
     }
 
-    m_xOfHolesForCoolingTubesB = NULL;
-    m_zOfHolesForCoolingTubesB = NULL;
+    m_xOfHolesForCoolingTubesB = nullptr;
+    m_zOfHolesForCoolingTubesB = nullptr;
   }
   else
   {
diff --git a/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParametersOfModulesC.cc b/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParametersOfModulesC.cc
index 1ddc9e2d40f3..c4e179a2623a 100644
--- a/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParametersOfModulesC.cc
+++ b/InnerDetector/InDetG4/TRT_G4Utilities/src/TRTParametersOfModulesC.cc
@@ -230,8 +230,8 @@ void TRTParametersOfModulesC::DefineParameters()
       m_zOfCoolingTubesC[i] -= m_zOfRadiatorC;
     }
 
-    m_xOfHolesForCoolingTubesC = NULL;
-    m_zOfHolesForCoolingTubesC = NULL;
+    m_xOfHolesForCoolingTubesC = nullptr;
+    m_zOfHolesForCoolingTubesC = nullptr;
   }
   else
   {
diff --git a/InnerDetector/InDetG4/TRT_G4_SD/test/TRTSensitiveDetector_gtest.cxx b/InnerDetector/InDetG4/TRT_G4_SD/test/TRTSensitiveDetector_gtest.cxx
index 3fcbd98db692..0d1a3207186c 100644
--- a/InnerDetector/InDetG4/TRT_G4_SD/test/TRTSensitiveDetector_gtest.cxx
+++ b/InnerDetector/InDetG4/TRT_G4_SD/test/TRTSensitiveDetector_gtest.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 "src/TRTSensitiveDetector.h"
@@ -73,7 +73,7 @@ TEST_F( TRTSensitiveDetectortest, Initialize)
 		    2,              -1,            -1,          
 		    0,               0,             0,             
 	      "gamma",               0,             0,          22,
-	      true,               -1.0,          NULL,
+	      true,               -1.0,          nullptr,
              false,           "photon",          22
 	      );
 
@@ -96,7 +96,7 @@ TEST_F( TRTSensitiveDetectortest, ProcessHits )
 		    2,              -1,            -1,          
 		    0,               0,             0,             
 	      "gamma1",               0,             0,          22,
-	      true,               -1.0,          NULL,
+	      true,               -1.0,          nullptr,
              false,           "photon1",          22
 	      );
 
@@ -163,7 +163,7 @@ TEST_F( TRTSensitiveDetectortest, AddHit )
                     2,              -1,            -1,
                     0,               0,             0,
               "gamma2",               0,             0,          22,
-              true,               -1.0,          NULL,
+              true,               -1.0,          nullptr,
              false,           "photon2",          22
               );
 
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h
index 7d9cd541ab7c..611a1065f42d 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h
@@ -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
 */
 
 /** 
@@ -48,7 +48,7 @@ class GetDetectorLocalFrames:public AthAlgorithm {
     void writeSCTFrames();
     void writeTRTFrames();
     void writeTransForm(const HepGeom::Transform3D& transform);
-    void writeVector(std::string name, const Amg::Vector3D& vector);
+    void writeVector(const std::string& name, const Amg::Vector3D& vector);
 
     /** Name of the Output file */
     std::string m_outputFileName;
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
index 9e59af2253e8..810f47efb085 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
@@ -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
 */
 
 /** 
@@ -28,8 +28,8 @@
 
 #include "StoreGate/ReadCondHandle.h"
 
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
 #include <vector>
 
 
@@ -50,8 +50,8 @@ GetDetectorLocalFrames::GetDetectorLocalFrames(std::string const&  name, ISvcLoc
   m_trt_straw(0),
 
   /** ID Tools */
-  m_TRTHelper(0),
-  m_TRTDetectorManager(0)
+  m_TRTHelper(nullptr),
+  m_TRTDetectorManager(nullptr)
 
 {
   declareProperty("OutputTextFile",m_outputFileName);
@@ -219,7 +219,7 @@ void GetDetectorLocalFrames::writeTRTFrames(){
   return;
 }
 
-void GetDetectorLocalFrames::writeVector(std::string name, const Amg::Vector3D& vector){
+void GetDetectorLocalFrames::writeVector(const std::string& name, const Amg::Vector3D& vector){
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "In writeVector()" << endmsg;
   
   m_outputFile << name << " " << vector.x() << " " << vector.y() << "  " << vector.z() << std::endl;
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx
index c80a6a4507d4..337d74c9325f 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.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
 */
 
 /** 
@@ -44,10 +44,10 @@ GetDetectorPositions::GetDetectorPositions(std::string const&  name, ISvcLocator
   m_outputFileName("IDgeometry.txt"),  
 
   /** ID Tools */
-  m_PixelHelper(0),
-  m_SCTHelper(0),
-  m_TRTHelper(0),
-  m_TRTDetectorManager(0)
+  m_PixelHelper(nullptr),
+  m_SCTHelper(nullptr),
+  m_TRTHelper(nullptr),
+  m_TRTDetectorManager(nullptr)
 
 {
   declareProperty("OutputTextFile",m_outputFileName);
diff --git a/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx b/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx
index 036412c008f0..a197d83eb3fe 100644
--- a/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx
+++ b/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <sstream>
@@ -10,7 +10,7 @@
 
 #include "CxxUtils/checker_macros.h"
 
-#include <math.h>
+#include <cmath>
 
 #include "TF1.h"
 #include "TCanvas.h"
@@ -64,7 +64,7 @@ StatusCode DiMuMon::initialize(){
   ATH_CHECK( m_muonCollection.initialize() );
 
   if (m_regions.empty()) {
-    m_regions.push_back("All");
+    m_regions.emplace_back("All");
   }
   // m_variables[] = {"eta","etaAll","etaPos","etaNeg","phi","phiAll","phiPos","phiNeg","pt","ptAll","ptPos","ptNeg","etaDiff","etaSumm","phiDiff","phiSumm","crtDiff"};
   m_varLabels["eta"] = "Dimuon #eta";
@@ -281,7 +281,7 @@ StatusCode DiMuMon::fillHistograms()
     m_stat->Fill("MuPtOK",1);
 
     double idTrkEta = idTrk->eta();
-    if (fabs(idTrkEta)>2.5) continue;
+    if (std::abs(idTrkEta)>2.5) continue;
     m_stat->Fill("eta<2.5",1);
 
     goodMuons.push_back(muon);
@@ -334,7 +334,7 @@ StatusCode DiMuMon::fillHistograms()
 
 	m_varValues["crtDiff"] = getCrtDiff(idPos,idNeg);
 	m_varValues["etaDiff"] = etaPos - etaNeg;
-	double phiDiff = fabs(phiPos - phiNeg);
+	double phiDiff = std::abs(phiPos - phiNeg);
 	if (phiDiff>Gaudi::Units::pi) phiDiff = 2*(Gaudi::Units::pi) - phiDiff;
 	m_varValues["phiDiff"] = phiDiff;
 	m_varValues["etaSumm"] = etaPos + etaNeg;
@@ -342,7 +342,7 @@ StatusCode DiMuMon::fillHistograms()
 
 	//determine which region muons are in
 	std::string region = "";
-	if ((fabs(etaPos)<1.05 || fabs(etaPos)==1.05) && (fabs(etaNeg)<1.05 || fabs(etaNeg)==1.05)) region="BB";
+	if ((std::abs(etaPos)<1.05 || std::abs(etaPos)==1.05) && (std::abs(etaNeg)<1.05 || std::abs(etaNeg)==1.05)) region="BB";
 	else if ((etaPos>1.05 && etaPos<2.5) && (etaNeg>1.05 && etaNeg<2.5)) region="EAEA";
 	else if ((etaPos<-1.05 && etaPos>-2.5) && (etaNeg<-1.05 && etaNeg>-2.5)) region="ECEC";
 
@@ -361,7 +361,7 @@ StatusCode DiMuMon::fillHistograms()
 
 	//fill 2D histos
 	//first, retrieve the overlap of the width and mean variable lists which by construction is the list of vars in the 2D histos map
-	std::map<std::string, TH2F*>* allVars = 0;
+	std::map<std::string, TH2F*>* allVars = nullptr;
 	if (fillAll){
 	  allVars = &m_2DinvmassVSx["All"];
 	} else {  //fillReg=true
@@ -523,7 +523,7 @@ void DiMuMon::iterativeGausFit (TH2F* hin, std::vector<TH1F*> hout, int mode){
 	//fit Z peak with a convolution of BreitWigner and Crystal Ball fns, fit by Louise, implementation by Jike taken from IDPerfMon
 	RooMsgService::instance().setGlobalKillBelow(RooFit::FATAL);
 	RooRealVar  m("mass", "dimuon invariant mass", 91.2, 71., 111., "GeV");
-	RooDataHist *data = 0;
+	RooDataHist *data = nullptr;
 	data = new RooDataHist("data", "data", m, htemp);
 	RooRealVar bwm0("bw_#mu",   "bw_#mu",   91.2, 85.2, 97.2) ;
 	RooRealVar bwsg("bw_#sigma","bw_#sigma", 2.4952) ;
@@ -608,7 +608,7 @@ bool DiMuMon::trackQuality(const xAOD::TrackParticle *idTrk){
   int nTRTout = idTrk->summaryValue( dummy, xAOD::numberOfTRTOutliers )? dummy :-1;
   int nTRThits = idTrk->summaryValue( dummy, xAOD::numberOfTRTHits )? dummy :-1;
   int n = nTRTout + nTRThits;
-  if (fabs(idTrk->eta())<1.9){
+  if (std::abs(idTrk->eta())<1.9){
     if (n>5 && nTRTout<(0.9*n)) countPass+=1;
   } else {
     if (n>5){
@@ -663,7 +663,7 @@ double DiMuMon::getCrtDiff(const xAOD::TrackParticle* id1, const xAOD::TrackPart
   double qoverpt1=id1->charge()/id1->pt();
   double qoverpt2=id2->charge()/id2->pt();
   double asym;
-  asym=fabs(qoverpt1)-fabs(qoverpt2);
+  asym=std::abs(qoverpt1)-std::abs(qoverpt2);
   return asym*1000;
 }
 
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalLRTMonAlg.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalLRTMonAlg.cxx
index aa0a514150a1..82945c453d0f 100644
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalLRTMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalLRTMonAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -141,7 +141,7 @@ StatusCode InDetGlobalLRTMonAlg::fillHistograms( const EventContext& ctx ) const
   
   for (const Trk::Track* track: *combined_tracks) {
     
-    if ( !track || track->perigeeParameters() == 0 )
+    if ( !track || track->perigeeParameters() == nullptr )
       {
 	ATH_MSG_DEBUG( "InDetGlobalMonitoringRun3Test: NULL track pointer in collection" );
 	continue;
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalTrackMonAlg.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalTrackMonAlg.cxx
index 90177eeb2184..59fdd039bc62 100644
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalTrackMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoringRun3Test/src/InDetGlobalTrackMonAlg.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
 */
 
 
@@ -144,7 +144,7 @@ StatusCode InDetGlobalTrackMonAlg::fillHistograms( const EventContext& ctx ) con
   
   for (const Trk::Track* track: *combined_tracks) {
     
-    if ( !track || track->perigeeParameters() == 0 )
+    if ( !track || track->perigeeParameters() == nullptr )
       {
 	ATH_MSG_DEBUG( "InDetGlobalMonitoringRun3Test: NULL track pointer in collection" );
 	continue;
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ElectronSelector.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ElectronSelector.cxx
index a7a964eb851d..e809d07ded55 100644
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ElectronSelector.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ElectronSelector.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 //==================================================================================
 //
@@ -59,7 +59,7 @@ void ElectronSelector::Init()
   IToolSvc* toolSvc;
   StatusCode sc = serviceLocator->service("ToolSvc", toolSvc, true);
   
-  if ( sc.isFailure() || toolSvc == 0 ) {
+  if ( sc.isFailure() || toolSvc == nullptr ) {
     (*m_msgStream) << MSG::ERROR << "  * ElectronSelector::Init * Unable to retrieve ToolSvc " << endmsg;
     return;
   }
@@ -106,7 +106,7 @@ void ElectronSelector::PrepareElectronList(const xAOD::ElectronContainer* pxElec
   (*m_msgStream) << MSG::DEBUG << " --ElectronSelector::PrepareElectronList -- START  -- " << endmsg;
   Clear(); // clear current list records
 
-  typedef xAOD::ElectronContainer::const_iterator electron_iterator;
+  using electron_iterator = xAOD::ElectronContainer::const_iterator;
   electron_iterator iter    = pxElecContainer->begin();
   electron_iterator iterEnd = pxElecContainer->end();
   
@@ -189,7 +189,7 @@ bool ElectronSelector::RecordElectron (const xAOD::Electron * thisElec)
 		   << endmsg;
   }
 
-  if (electronisgood && (fabs(cluster->eta())> m_etaCut || fabs(theTrackParticle->eta())> m_etaCut) ) { // cut in eta for the cluster and the track 
+  if (electronisgood && (std::abs(cluster->eta())> m_etaCut || std::abs(theTrackParticle->eta())> m_etaCut) ) { // cut in eta for the cluster and the track 
     electronisgood = false;
     (*m_msgStream) << MSG::DEBUG << "   -- electron fails eta cut  -- cluster_eta= " << cluster->eta() << endmsg;
   }
@@ -337,9 +337,9 @@ bool ElectronSelector::RetrieveVertices ()
 				     << ", " << m_goodElecPosTrackParticleList.at(iposi)->vertex()->y()
 				     << ", " << m_goodElecPosTrackParticleList.at(iposi)->vertex()->z()
 				     << ") " << std::endl;
-	    float delta_x = fabs( m_goodElecNegTrackParticleList.at(ielec)->vertex()->x()-m_goodElecPosTrackParticleList.at(iposi)->vertex()->x() );
-	    float delta_y = fabs( m_goodElecNegTrackParticleList.at(ielec)->vertex()->y()-m_goodElecPosTrackParticleList.at(iposi)->vertex()->y() );
-	    float delta_z = fabs( m_goodElecNegTrackParticleList.at(ielec)->vertex()->z()-m_goodElecPosTrackParticleList.at(iposi)->vertex()->z() );
+	    float delta_x = std::abs( m_goodElecNegTrackParticleList.at(ielec)->vertex()->x()-m_goodElecPosTrackParticleList.at(iposi)->vertex()->x() );
+	    float delta_y = std::abs( m_goodElecNegTrackParticleList.at(ielec)->vertex()->y()-m_goodElecPosTrackParticleList.at(iposi)->vertex()->y() );
+	    float delta_z = std::abs( m_goodElecNegTrackParticleList.at(ielec)->vertex()->z()-m_goodElecPosTrackParticleList.at(iposi)->vertex()->z() );
 
 	    if (delta_x < m_deltaXYcut && delta_y < m_deltaXYcut && delta_z < m_deltaZcut) {
 	      nverticesfound++;
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx
index 23f0897fb458..5d6d9e59ab77 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.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
 */
 
 /********************************************************************
@@ -69,7 +69,7 @@ IDPerfMonEoverP::IDPerfMonEoverP(const std::string& name,
   m_validationTreeName("EGrefitter"),
   m_validationTreeDescription("egamma track refitter caches"),
   m_validationTreeFolder("/eoverpValidation/efitterValidation"),
-  m_validationTree(0),
+  m_validationTree(nullptr),
   m_runNumber{},
   m_evtNumber{},
   m_lumi_block{},
@@ -81,23 +81,23 @@ IDPerfMonEoverP::IDPerfMonEoverP(const std::string& name,
   m_missingEt{},
   m_missingEtx{},
   m_missingEty{},
-  m_ZeeLooseMassOS_Cluster(0),
-  m_ZeeLooseMassSS_Cluster(0),
-  m_ZeeMediumMassOS_Cluster(0),
-  m_ZeeMediumMassSS_Cluster(0),
-  m_ZeeMediumOS_ClusterPtEta(0),
-  m_WenuLooseElectronET(0),
-  m_WenuTight_Met(0),
-  m_WenuTight_MT(0),
-  m_WenuTightMet_MT(0),
-  m_WenuTightElectronET(0),
-  m_WenuTightW_PT(0),
-  m_WenuTightElectron_PTEtaPos(0),
-  m_WenuTightElectron_PTEtaNeg(0),
+  m_ZeeLooseMassOS_Cluster(nullptr),
+  m_ZeeLooseMassSS_Cluster(nullptr),
+  m_ZeeMediumMassOS_Cluster(nullptr),
+  m_ZeeMediumMassSS_Cluster(nullptr),
+  m_ZeeMediumOS_ClusterPtEta(nullptr),
+  m_WenuLooseElectronET(nullptr),
+  m_WenuTight_Met(nullptr),
+  m_WenuTight_MT(nullptr),
+  m_WenuTightMet_MT(nullptr),
+  m_WenuTightElectronET(nullptr),
+  m_WenuTightW_PT(nullptr),
+  m_WenuTightElectron_PTEtaPos(nullptr),
+  m_WenuTightElectron_PTEtaNeg(nullptr),
   m_smallValidationTreeName("EGrefitterSmall"),
   m_smallValidationTreeDescription("Small Tree for E/p fits"),
   m_smallValidationTreeFolder("/eoverpValidation2/efitterValidation2"),
-  m_smallValidationTree(0),
+  m_smallValidationTree(nullptr),
   m_small_QoverP{},
   m_small1_QoverP{},
   m_small2_QoverP{},
@@ -246,7 +246,7 @@ StatusCode IDPerfMonEoverP::initialize()
   
   // If the validation nuptle has been requested Setup the ntuple
   if (m_validationMode){
-    if (m_validationTree == 0 ){
+    if (m_validationTree == nullptr ){
       // create the new Tree
       m_validationTree = new TTree(m_validationTreeName.c_str(), m_validationTreeDescription.c_str());
       std::string FitterNames[3] = {"GX2","Refitted1","Refitted2"};
@@ -337,7 +337,7 @@ StatusCode IDPerfMonEoverP::initialize()
     }
 
 
-    if(m_smallValidationTree == 0){
+    if(m_smallValidationTree == nullptr){
 
       m_smallValidationTree = new TTree(m_smallValidationTreeName.c_str(), m_smallValidationTreeDescription.c_str());
 
@@ -353,21 +353,21 @@ StatusCode IDPerfMonEoverP::initialize()
     }
 
       // now register the Tree
-    ITHistSvc* tHistSvc = 0;
+    ITHistSvc* tHistSvc = nullptr;
     if (service("THistSvc",tHistSvc).isFailure()){
       ATH_MSG_ERROR("initialize() Could not find Hist Service -> Switching ValidationMode Off !");
-      delete m_validationTree;      m_validationTree = 0;
-      delete m_smallValidationTree; m_smallValidationTree = 0;
+      delete m_validationTree;      m_validationTree = nullptr;
+      delete m_smallValidationTree; m_smallValidationTree = nullptr;
       m_validationMode = false;
     }
     if ((tHistSvc->regTree(m_validationTreeFolder, m_validationTree)).isFailure() ) {
       ATH_MSG_ERROR("initialize() Could not register the validation Tree -> Switching ValidationMode Off !");
-      delete m_validationTree; m_validationTree = 0;
+      delete m_validationTree; m_validationTree = nullptr;
       m_validationMode = false;
     }
     if ((tHistSvc->regTree(m_smallValidationTreeFolder, m_smallValidationTree)).isFailure() ) {
       ATH_MSG_ERROR("initialize() Could not register the validation Tree -> Switching ValidationMode Off !");
-      delete m_smallValidationTree; m_smallValidationTree = 0;
+      delete m_smallValidationTree; m_smallValidationTree = nullptr;
       m_validationMode = false;
     } else {
       m_ZeeLooseMassOS_Cluster = new TH1F("ZeeMassLooseOS","ZeeMassLooseOS", 120, 60000 ,120000);
@@ -512,7 +512,7 @@ StatusCode IDPerfMonEoverP::execute()
   m_refittedTracks_no2 = new TrackCollection;
 
 
-  typedef xAOD::ElectronContainer::const_iterator electron_iterator;
+  using electron_iterator = xAOD::ElectronContainer::const_iterator;
   electron_iterator iter    = ElectronInput_container->begin();
   electron_iterator iterEnd = ElectronInput_container->end();
 
@@ -818,7 +818,7 @@ void IDPerfMonEoverP::validationAction()
 bool IDPerfMonEoverP::storeMETinformation()
 {
   ATH_MSG_VERBOSE("In storeMETinformation()");
-  const xAOD::MissingETContainer *pMissingCont(0);
+  const xAOD::MissingETContainer *pMissingCont(nullptr);
   const xAOD::MissingET *MET;
   if (!evtStore()->contains<xAOD::MissingETContainer>(m_missingEtObjectName)){
     ATH_MSG_WARNING("No collection with name " << m_missingEtObjectName << " found in StoreGate");
@@ -862,7 +862,7 @@ bool IDPerfMonEoverP::fillVertexInformation(std::map<const xAOD::TrackParticle*,
                                             xAOD::Vertex const* & primaryVertexFirstCandidate)
 {
   ATH_MSG_DEBUG( "fillVertexInformation()" );
-  const xAOD::VertexContainer* vxContainer(0);
+  const xAOD::VertexContainer* vxContainer(nullptr);
   int npv = 0;
   StatusCode sc = evtStore()->retrieve(vxContainer, m_primaryVertexCollection);
   if (sc.isFailure()) {
@@ -988,27 +988,27 @@ bool IDPerfMonEoverP::fillLastMeasurement(const Trk::Track* track, const int fit
 {
   ATH_MSG_VERBOSE("In fillLastMeasurement()");
   if(!track) return false;
-  const Trk::TrackParameters* trkPara =0;
+  const Trk::TrackParameters* trkPara =nullptr;
 
   const DataVector<const Trk::TrackStateOnSurface>* oldTrackStates = track->trackStateOnSurfaces();
-  if (oldTrackStates == 0)
+  if (oldTrackStates == nullptr)
   {
     return false;
   }
 
   for ( DataVector<const Trk::TrackStateOnSurface>::const_reverse_iterator rItTSoS = oldTrackStates->rbegin(); rItTSoS != oldTrackStates->rend(); ++rItTSoS)
   {
-    if (trkPara!=0){
+    if (trkPara!=nullptr){
         break;
     }
 
-    if ( (*rItTSoS)->type(Trk::TrackStateOnSurface::Measurement) && (*rItTSoS)->trackParameters()!=0 && (*rItTSoS)->measurementOnTrack()!=0)
+    if ( (*rItTSoS)->type(Trk::TrackStateOnSurface::Measurement) && (*rItTSoS)->trackParameters()!=nullptr && (*rItTSoS)->measurementOnTrack()!=nullptr)
     {
        trkPara = (*rItTSoS)->trackParameters();
     }
   }
 
-  if (trkPara !=0 ){
+  if (trkPara !=nullptr ){
     m_electronLMQoverP[fitter][m_electronCounter] =  trkPara->parameters()[Trk::qOverP] ;
     return true;
   }
@@ -1049,7 +1049,7 @@ bool IDPerfMonEoverP::passZeeSelection(std::vector<int>& electrons)
     if (clusterEt <= 25000) continue;
 
     //Range
-    double absEta = std::fabs(m_ClusterEta[ele]);
+    double absEta = std::abs(m_ClusterEta[ele]);
     if (absEta >= 2.47 || ( absEta >= 1.37 && absEta <= 1.52 )) continue;
 
     //OTx ...
@@ -1144,7 +1144,7 @@ bool IDPerfMonEoverP::passWenuSelection(std::vector<int>& electrons)
     double clusterEt = cosh( m_ClusterEta[ele] ) != 0 ?  m_ClusterEnergy[ele] / std::cosh( m_ClusterEta[ele] ) : 0.;
     if (clusterEt <= 25000) continue;
     //Range
-    double absEta = std::fabs(m_ClusterEta[ele]);
+    double absEta = std::abs(m_ClusterEta[ele]);
     if (absEta >= 2.47 || ( absEta >= 1.37 && absEta <= 1.52 ) ) continue;
     //OTx ...
     if(!m_isGoodOQ[ele]) continue;
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonKshort.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonKshort.cxx
index 40713dbc03dd..9f7424c20413 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonKshort.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonKshort.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // **********************************************************************
@@ -365,7 +365,7 @@ void IDPerfMonKshort::RegisterHisto(MonGroup& mon, TGraph* graph) {
 StatusCode IDPerfMonKshort::fillHistograms()
 {
   ATH_MSG_VERBOSE( "IDPerfMonKshort fillHistogram() started");
-  const xAOD::TrackParticleContainer* tracks(0);
+  const xAOD::TrackParticleContainer* tracks(nullptr);
   StatusCode sc = evtStore()->retrieve(tracks,m_tracksName);
   if (sc.isFailure()) {
     ATH_MSG_DEBUG( "No Collection with name "<<m_tracksName<<" found in StoreGate" );
@@ -374,7 +374,7 @@ StatusCode IDPerfMonKshort::fillHistograms()
     ATH_MSG_DEBUG( "Collection with name "<<m_tracksName<<" found in StoreGate" );
   }
 
-  const xAOD::VertexContainer* PrimVxContainer(0);
+  const xAOD::VertexContainer* PrimVxContainer(nullptr);
   if(evtStore()->contains<xAOD::VertexContainer>(m_VxPrimContainerName)){
     if ( evtStore()->retrieve(PrimVxContainer,m_VxPrimContainerName).isFailure()) {
       ATH_MSG_DEBUG("Could not retrieve collection with name "<<m_VxPrimContainerName<<" found in StoreGate");
@@ -389,7 +389,7 @@ StatusCode IDPerfMonKshort::fillHistograms()
   }
   const xAOD::Vertex *primaryVertex= std::begin(*PrimVxContainer)[0];
 
-  const xAOD::VertexContainer* SecVxContainer(0);
+  const xAOD::VertexContainer* SecVxContainer(nullptr);
  if(evtStore()->contains<xAOD::VertexContainer>(m_VxContainerName)){
    if (evtStore()->retrieve(SecVxContainer,m_VxContainerName).isFailure()) {
      ATH_MSG_DEBUG("Could not retrieve collection with name "<<m_VxContainerName<<" found in StoreGate");
@@ -472,15 +472,15 @@ StatusCode IDPerfMonKshort::fillHistograms()
    double trackPos_d0_wrtPV = 0;
    double trackNeg_d0 = 0;
    double trackNeg_d0_wrtPV = 0;
-   const xAOD::TrackParticle* trackPos(0);
-   const xAOD::TrackParticle* trackNeg(0);
+   const xAOD::TrackParticle* trackPos(nullptr);
+   const xAOD::TrackParticle* trackNeg(nullptr);
 
    int ntrk(-1);
    ntrk = secVx_elem->nTrackParticles();
    ATH_MSG_DEBUG("track particles associated to vertex : "<<ntrk );
    if(ntrk>0){
      auto tpLinks = secVx_elem->trackParticleLinks();
-     for (auto link: tpLinks){
+     for (const auto& link: tpLinks){
        Info("execute()", "V0: TP link = %d %s ", link.isValid(), link.dataID().c_str() );
        if(ntrk == 2){
 	 ATH_MSG_DEBUG("Exactly two track particles!");
@@ -494,7 +494,7 @@ StatusCode IDPerfMonKshort::fillHistograms()
        }
      }//trackparticles
    }//ntrk
-   if(trackPos!=0) {
+   if(trackPos!=nullptr) {
       uint8_t dummy(-1);
       trackPos_nSVTHits = trackPos->summaryValue(  dummy , xAOD::numberOfSCTHits  )? dummy :-1;
       trackPos_d0 = trackPos->d0();
@@ -503,7 +503,7 @@ StatusCode IDPerfMonKshort::fillHistograms()
     }
     //std::cout <<"@todo : check (2) " << std::endl;
 
-    if(trackNeg!=0) {
+    if(trackNeg!=nullptr) {
       uint8_t dummy(-1);
       trackNeg_nSVTHits = trackNeg->summaryValue(  dummy , xAOD::numberOfSCTHits  )? dummy :-1;
       trackNeg_d0 = trackNeg->d0();
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx
index 03c9550b207c..c8ec9566a99e 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // **********************************************************************
@@ -526,7 +526,7 @@ const xAOD::CaloCluster* IDPerfMonWenu::getLeadingEMcluster(const xAOD::CaloClus
   float max_pt = 0.;
   for (const auto cl: *clusters) {
     if (cl == omitCluster) continue;
-    double deltaR = std::sqrt(std::pow(std::fabs(cl->phi() - omitCluster->phi()),2) + std::pow(std::fabs(cl->eta() - omitCluster->eta()),2));
+    double deltaR = std::sqrt(std::pow(std::abs(cl->phi() - omitCluster->phi()),2) + std::pow(std::abs(cl->eta() - omitCluster->eta()),2));
     if(deltaR < 0.005) continue;
     if (cl->pt()/Gaudi::Units::GeV < 10.) continue;
     if (cl->pt() > max_pt) {
@@ -538,7 +538,7 @@ const xAOD::CaloCluster* IDPerfMonWenu::getLeadingEMcluster(const xAOD::CaloClus
 }
 
 const xAOD::CaloCluster* IDPerfMonWenu::getLeadingEMcluster(const xAOD::PhotonContainer* /*photons*/, const xAOD::ElectronContainer* electrons, const xAOD::CaloCluster* omitCluster) const {
-  const xAOD::CaloCluster* leading_emcluster = 0;
+  const xAOD::CaloCluster* leading_emcluster = nullptr;
   bool LHSel;
   float max_pt = 0.;
   for (const auto em: *electrons) {
@@ -562,13 +562,13 @@ const xAOD::CaloCluster* IDPerfMonWenu::getLeadingEMcluster(const xAOD::PhotonCo
 }
 
 const xAOD::TrackParticle* IDPerfMonWenu::electronTrackMatch(const xAOD::TrackParticleContainer* tracks, const xAOD::CaloCluster* cluster, double dEta, double dPhi) const {
-  const xAOD::TrackParticle* matched_track = 0;
+  const xAOD::TrackParticle* matched_track = nullptr;
   double min_dR = 1.0e+20;
   for (const auto track: *tracks) {
     double deta = cluster->eta()-track->eta();
     double dphi = cluster->phi()-track->phi();
     double dr = std::sqrt(deta*deta + dphi*dphi);
-    if (dr < min_dR && std::fabs(deta) < dEta && std::fabs(dphi) < dPhi) {
+    if (dr < min_dR && std::abs(deta) < dEta && std::abs(dphi) < dPhi) {
       min_dR = dr;
       matched_track = track;
     }
@@ -577,22 +577,22 @@ const xAOD::TrackParticle* IDPerfMonWenu::electronTrackMatch(const xAOD::TrackPa
 }
 
 double IDPerfMonWenu::electronTrackMatchEta(const xAOD::TrackParticleContainer* tracks, const xAOD::CaloCluster* cluster, double dEta) const {
-  const xAOD::TrackParticle* matched_track = 0;
+  const xAOD::TrackParticle* matched_track = nullptr;
   double min_dEta = 1.0e+20;
   for (const auto track: *tracks) {
-    double deta = std::fabs(cluster->eta()-track->eta());
+    double deta = std::abs(cluster->eta()-track->eta());
     if (deta < min_dEta && deta < dEta) {
       min_dEta = deta;
       matched_track = track;
     }
   }
   double dPhi = 1.0e+20;
-  if (matched_track != 0) dPhi = signedDeltaPhi(cluster->phi(),matched_track->phi());
+  if (matched_track != nullptr) dPhi = signedDeltaPhi(cluster->phi(),matched_track->phi());
   return dPhi;
 }
 
 double IDPerfMonWenu::electronTrackMatchPhi(const xAOD::TrackParticleContainer* tracks, const xAOD::CaloCluster* cluster, double dPhi) const {
-  const xAOD::TrackParticle* matched_track = 0;
+  const xAOD::TrackParticle* matched_track = nullptr;
   double min_dPhi = 1.0e+20;
   for (const auto track : *tracks) {
     double dphi = std::abs(signedDeltaPhi(cluster->phi(),track->phi()));
@@ -602,7 +602,7 @@ double IDPerfMonWenu::electronTrackMatchPhi(const xAOD::TrackParticleContainer*
     }
   }
   double dEta = 1.0e+20;
-  if (matched_track != 0) dEta = cluster->eta()-matched_track->eta();
+  if (matched_track != nullptr) dEta = cluster->eta()-matched_track->eta();
   return dEta;
 
 }
@@ -613,7 +613,7 @@ int IDPerfMonWenu::isWenu(const xAOD::CaloCluster* em, const xAOD::CaloCluster*
   if(met/Gaudi::Units::GeV > 20.) --selected; // was at 0 for some reason?
   if(!m_rejectSecondCluster) return selected;
   // else check 2nd EM cluster veto
-  if(em2 != 0){
+  if(em2 != nullptr){
     if(em2->pt()/Gaudi::Units::GeV > 25.){
       ATH_MSG_DEBUG("Event rejected due to second EM cluster w/ pT > 25 GeV");
       selected++;
@@ -623,7 +623,7 @@ int IDPerfMonWenu::isWenu(const xAOD::CaloCluster* em, const xAOD::CaloCluster*
 }
 
 double IDPerfMonWenu::InvMass(const xAOD::CaloCluster* EM1, const xAOD::CaloCluster* EM2) const {
-  if (EM1 == 0 || EM2 == 0) return -99.;
+  if (EM1 == nullptr || EM2 == nullptr) return -99.;
   double invmass = 0.;
   if (EM1->pt() != 0 && EM2->pt() != 0.) {
     TLorentzVector particle1;
@@ -636,7 +636,7 @@ double IDPerfMonWenu::InvMass(const xAOD::CaloCluster* EM1, const xAOD::CaloClus
 }
 
 double IDPerfMonWenu::InvMass(const xAOD::TrackParticle* trk1, const xAOD::TrackParticle* trk2) const {
-  if (trk1 == 0 || trk2 == 0) return -99.;
+  if (trk1 == nullptr || trk2 == nullptr) return -99.;
   double invmass = 0.;
   if (trk1->pt() != 0 && trk2->pt() != 0.) {
     TLorentzVector particle1;
@@ -649,7 +649,7 @@ double IDPerfMonWenu::InvMass(const xAOD::TrackParticle* trk1, const xAOD::Track
 }
 
 double IDPerfMonWenu::TransMass(const xAOD::CaloCluster* EM, const xAOD::MissingET* met) const {
-  if (EM == 0 || met == 0) return -99.;
+  if (EM == nullptr || met == nullptr) return -99.;
   double transmass = 0.;
   float dphi = signedDeltaPhi(EM->phi(),met->phi());
   transmass = std::sqrt(2.*EM->et()*met->met()*(1.-std::cos(dphi)));
@@ -658,7 +658,7 @@ double IDPerfMonWenu::TransMass(const xAOD::CaloCluster* EM, const xAOD::Missing
 }
 
 double IDPerfMonWenu::TransMass(const xAOD::TrackParticle* track, const xAOD::MissingET* met) const {
-  if (track == 0 || met == 0) return -99.;
+  if (track == nullptr || met == nullptr) return -99.;
   double transmass = 0.;
   float dphi = signedDeltaPhi(track->phi(),met->phi());
   transmass = std::sqrt(2.*(track->p4().Et()/Gaudi::Units::GeV)*(met->met()/Gaudi::Units::GeV)*(1.-std::cos(dphi)));
@@ -667,10 +667,10 @@ double IDPerfMonWenu::TransMass(const xAOD::TrackParticle* track, const xAOD::Mi
 
 double IDPerfMonWenu::deltaR(const xAOD::CaloCluster* cluster, const xAOD::TrackParticle* track) const {
   double dr =-999.;
-  if (cluster == 0 || track == 0) return dr;
+  if (cluster == nullptr || track == nullptr) return dr;
   double deta = cluster->eta()-track->eta();
   double dphi = cluster->phi()-track->phi();
-  if(std::fabs(dphi) > M_PI) dphi = 2.*M_PI-std::fabs(dphi);
+  if(std::abs(dphi) > M_PI) dphi = 2.*M_PI-std::abs(dphi);
   dr = std::sqrt(deta*deta + dphi*dphi);
   return dr;
 
@@ -689,7 +689,7 @@ double IDPerfMonWenu::signedDeltaPhi(double phi1, double phi2) const {
 
 int IDPerfMonWenu::etaRegion(double eta) {
   int region = -99;
-  if (std::fabs(eta) <= 1.) region = barrel;
+  if (std::abs(eta) <= 1.) region = barrel;
   else if (eta > 1.) region = eca; // eca
   else if (eta < -1.) region = ecc; // ecc
   return region;
@@ -708,26 +708,26 @@ void IDPerfMonWenu::FillHistosPerCluster(const xAOD::CaloCluster* cluster, const
     // match in eta and phi separately and make dEta and dPhi plots
     if (dEta < 1.0e+20) {
       m_Wenu_deta[region]->Fill(dEta);
-      if (std::fabs(dEta < 0.05)) { // calculate mean only for those in matching window
+      if (std::abs(dEta < 0.05)) { // calculate mean only for those in matching window
         m_Wenu_deta_vs_eta[region]->Fill(cluster->eta(),dEta);
         m_Wenu_deta_vs_phi[region]->Fill(cluster->phi(),dEta);
-        m_Wenu_absdeta_vs_eta[region]->Fill(cluster->eta(),std::fabs(dEta));
-        m_Wenu_absdeta_vs_phi[region]->Fill(cluster->phi(),std::fabs(dEta));
+        m_Wenu_absdeta_vs_eta[region]->Fill(cluster->eta(),std::abs(dEta));
+        m_Wenu_absdeta_vs_phi[region]->Fill(cluster->phi(),std::abs(dEta));
       }
     }
     if (dPhi < 1.0e+20) {
       m_Wenu_dphi[region]->Fill(dPhi);
-      if (std::fabs(dPhi < 0.1)) { // calculate mean only for those in matching window
+      if (std::abs(dPhi < 0.1)) { // calculate mean only for those in matching window
         m_Wenu_dphi_vs_eta[region]->Fill(cluster->eta(),dPhi);
         m_Wenu_dphi_vs_phi[region]->Fill(cluster->phi(),dPhi);
-        m_Wenu_absdphi_vs_eta[region]->Fill(cluster->eta(),std::fabs(dPhi));
-        m_Wenu_absdphi_vs_phi[region]->Fill(cluster->phi(),std::fabs(dPhi));
+        m_Wenu_absdphi_vs_eta[region]->Fill(cluster->eta(),std::abs(dPhi));
+        m_Wenu_absdphi_vs_phi[region]->Fill(cluster->phi(),std::abs(dPhi));
       }
     }
 
   } // end inclusive only
 
-  if (track == 0) return;
+  if (track == nullptr) return;
   // TRACK-MATCHED
   float eoverp = 0.;
   float track_p = track->pt()*std::cosh(track->eta());
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx
index e0d0c0663e01..8c86d93eac3c 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // **********************************************************************
@@ -81,10 +81,10 @@ IDPerfMonZee::IDPerfMonZee( const std::string & type, const std::string & name,
   declareProperty("triggerChainName",m_triggerChainName);
   declareProperty("electronIDLevel",m_electronIDLevel = "Tight");
 
-  m_region_strings.push_back("incl");
-  m_region_strings.push_back("barrel");
-  m_region_strings.push_back("eca");
-  m_region_strings.push_back("ecc");
+  m_region_strings.emplace_back("incl");
+  m_region_strings.emplace_back("barrel");
+  m_region_strings.emplace_back("eca");
+  m_region_strings.emplace_back("ecc");
 
 }
 
@@ -593,7 +593,7 @@ const xAOD::CaloCluster* IDPerfMonZee::getLeadingEMcluster(const xAOD::CaloClust
   float max_pt = 0.;
   for (const auto cl: *clusters) {
     if (cl == omitCluster) continue;
-    double deltaR = std::sqrt(std::pow(std::fabs(cl->phi() - omitCluster->phi()),2) + std::pow(std::fabs(cl->eta() - omitCluster->eta()),2));
+    double deltaR = std::sqrt(std::pow(std::abs(cl->phi() - omitCluster->phi()),2) + std::pow(std::abs(cl->eta() - omitCluster->eta()),2));
     if(deltaR < 0.005) continue;
     if (cl->pt()/Gaudi::Units::GeV < 10.) continue;
     if (cl->pt() > max_pt) {
@@ -619,7 +619,7 @@ const xAOD::CaloCluster* IDPerfMonZee::getLeadingEMcluster(const xAOD::PhotonCon
     }
     const xAOD::CaloCluster* cl = em->caloCluster();
     if (cl == omitCluster) continue;
-    double deltaR = !omitCluster ? 1.0 : std::sqrt(std::pow(std::fabs(cl->phi() - omitCluster->phi()),2) + std::pow(std::fabs(cl->eta() - omitCluster->eta()),2));
+    double deltaR = !omitCluster ? 1.0 : std::sqrt(std::pow(std::abs(cl->phi() - omitCluster->phi()),2) + std::pow(std::abs(cl->eta() - omitCluster->eta()),2));
     if(deltaR < 0.005) continue;
     if (cl->pt()/Gaudi::Units::GeV < 20.) continue;
     if (cl->pt() > max_pt) {
@@ -639,7 +639,7 @@ const xAOD::TrackParticle* IDPerfMonZee::electronTrackMatch(const xAOD::TrackPar
     double deta = cluster->etaBE(2)-track->eta();
     double dphi = cluster->phi()-track->phi();
     double dr = std::sqrt(deta*deta + dphi*dphi);
-    if (dr < min_dR && std::fabs(deta) < dEta && std::fabs(dphi) < dPhi) {
+    if (dr < min_dR && std::abs(deta) < dEta && std::abs(dphi) < dPhi) {
       min_dR = dr;
       matched_track = track;
     }
@@ -651,14 +651,14 @@ double IDPerfMonZee::electronTrackMatchEta(const xAOD::TrackParticleContainer* t
   const xAOD::TrackParticle* matched_track{};
   double min_dEta = 1.0e+20;
   for (const auto track : *tracks){
-    double deta = std::fabs(cluster->etaBE(2)-track->eta());
+    double deta = std::abs(cluster->etaBE(2)-track->eta());
     if (deta < min_dEta && deta < dEta) {
       min_dEta = deta;
       matched_track = track;
     }
   }
   double dPhi = 1.0e+20;
-  if (matched_track != 0) dPhi = signedDeltaPhi(cluster->phi(),matched_track->phi());
+  if (matched_track != nullptr) dPhi = signedDeltaPhi(cluster->phi(),matched_track->phi());
   return dPhi;
 }
 
@@ -666,7 +666,7 @@ double IDPerfMonZee::electronTrackMatchPhi(const xAOD::TrackParticleContainer* t
   const xAOD::TrackParticle* matched_track{};
   double min_dPhi = 1.0e+20;
   for (const auto track : *tracks){
-    double dphi = std::fabs(signedDeltaPhi(cluster->phi(),track->phi()));
+    double dphi = std::abs(signedDeltaPhi(cluster->phi(),track->phi()));
     if (dphi < min_dPhi && dphi < dPhi) {
       min_dPhi = dphi;
       matched_track = track;
@@ -678,7 +678,7 @@ double IDPerfMonZee::electronTrackMatchPhi(const xAOD::TrackParticleContainer* t
 }
 
 double IDPerfMonZee::InvMass(const xAOD::CaloCluster* EM1, const xAOD::CaloCluster* EM2) const {
-  if (EM1 == 0 || EM2 == 0) return -99.;
+  if (EM1 == nullptr || EM2 == nullptr) return -99.;
   double invmass = 0.;
   if (EM1->pt() != 0 && EM2->pt() != 0.) {
     TLorentzVector particle1;
@@ -691,7 +691,7 @@ double IDPerfMonZee::InvMass(const xAOD::CaloCluster* EM1, const xAOD::CaloClust
 }
 
 double IDPerfMonZee::InvMass(const xAOD::TrackParticle* trk1, const xAOD::TrackParticle* trk2) const {
-  if (trk1 == 0 || trk2 == 0) return -99.;
+  if (trk1 == nullptr || trk2 == nullptr) return -99.;
   double invmass = 0.;
   if (trk1->pt() != 0 && trk2->pt() != 0.) {
     TLorentzVector particle1;
@@ -704,7 +704,7 @@ double IDPerfMonZee::InvMass(const xAOD::TrackParticle* trk1, const xAOD::TrackP
 }
 
 double IDPerfMonZee::TransMass(const xAOD::CaloCluster* EM, const xAOD::MissingET* met) const {
-  if (EM == 0 || met == 0) return -99.;
+  if (EM == nullptr || met == nullptr) return -99.;
   double transmass = 0.;
   float dphi = signedDeltaPhi(EM->phi(),met->phi());
   transmass = std::sqrt(2.*EM->et()*met->met()*(1.-std::cos(dphi)));
@@ -713,7 +713,7 @@ double IDPerfMonZee::TransMass(const xAOD::CaloCluster* EM, const xAOD::MissingE
 
 double IDPerfMonZee::deltaR(const xAOD::CaloCluster* cluster, const xAOD::TrackParticle* track) const {
   double dr =-999.;
-  if (cluster == 0 || track == 0) return dr;
+  if (cluster == nullptr || track == nullptr) return dr;
   double deta = cluster->etaBE(2)-track->eta();
   double dphi = cluster->phi()-track->phi();
   dr = std::sqrt(deta*deta + dphi*dphi);
@@ -752,7 +752,7 @@ double IDPerfMonZee::signedDeltaPhi(double phi1, double phi2) const {
 
 int IDPerfMonZee::etaRegion(double eta) {
   int region = -99;
-  if (std::fabs(eta) <= 1.) region = barrel;
+  if (std::abs(eta) <= 1.) region = barrel;
   else if (eta > 1.) region = eca; // eca
   else if (eta < -1.) region = ecc; // ecc
   return region;
@@ -760,7 +760,7 @@ int IDPerfMonZee::etaRegion(double eta) {
 }
 
 void IDPerfMonZee::FillHistosPerCluster(const xAOD::CaloCluster* cluster, const xAOD::TrackParticle* track, int region, float dEta, float dPhi) {
-  if (cluster == 0) return;
+  if (cluster == nullptr) return;
   if (region<0){
     throw(std::out_of_range("Region index has negative value in IDPerfMonZee::FillHistosPerCluster"));
   }
@@ -771,24 +771,24 @@ void IDPerfMonZee::FillHistosPerCluster(const xAOD::CaloCluster* cluster, const
     // match in eta and phi separately and make dEta and dPhi plots
     if (dEta < 1.0e+20) {
       m_Zee_deta[region]->Fill(dEta);
-      if (std::fabs(dEta) < 0.05) { // calculate mean only for those in matching window
+      if (std::abs(dEta) < 0.05) { // calculate mean only for those in matching window
         m_Zee_deta_vs_eta[region]->Fill(cluster->etaBE(2),dEta);
         m_Zee_deta_vs_phi[region]->Fill(cluster->phi(),dEta);
         m_Zee_deta_vs_eta_2d[region]->Fill(cluster->etaBE(2),dEta);
         m_Zee_deta_vs_phi_2d[region]->Fill(cluster->phi(),dEta);
-        m_Zee_absdeta_vs_eta[region]->Fill(cluster->etaBE(2),std::fabs(dEta));
-        m_Zee_absdeta_vs_phi[region]->Fill(cluster->phi(),std::fabs(dEta));
+        m_Zee_absdeta_vs_eta[region]->Fill(cluster->etaBE(2),std::abs(dEta));
+        m_Zee_absdeta_vs_phi[region]->Fill(cluster->phi(),std::abs(dEta));
       }
     }
     if (dPhi < 1.0e+20) {
       m_Zee_dphi[region]->Fill(dPhi);
-      if (std::fabs(dPhi) < 0.1) { // calculate mean only for those in matching window
+      if (std::abs(dPhi) < 0.1) { // calculate mean only for those in matching window
         m_Zee_dphi_vs_eta[region]->Fill(cluster->etaBE(2),dPhi);
         m_Zee_dphi_vs_phi[region]->Fill(cluster->phi(),dPhi);
         m_Zee_dphi_vs_eta_2d[region]->Fill(cluster->etaBE(2),dPhi);
         m_Zee_dphi_vs_phi_2d[region]->Fill(cluster->phi(),dPhi);
-        m_Zee_absdphi_vs_eta[region]->Fill(cluster->etaBE(2),std::fabs(dPhi));
-        m_Zee_absdphi_vs_phi[region]->Fill(cluster->phi(),std::fabs(dPhi));
+        m_Zee_absdphi_vs_eta[region]->Fill(cluster->etaBE(2),std::abs(dPhi));
+        m_Zee_absdphi_vs_phi[region]->Fill(cluster->phi(),std::abs(dPhi));
       }
     }
 
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZmumu.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZmumu.cxx
index 70ac712a1d8d..4742862b28b3 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZmumu.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZmumu.cxx
@@ -81,14 +81,14 @@ IDPerfMonZmumu::IDPerfMonZmumu(const std::string& name,
   m_FourMuTreeFolder ("/ZmumuValidation/fourmu"),
 
   m_commonTree (nullptr),
-  m_defaultTree(0),
-  m_IDTree(0),
-  m_refit1Tree(0),
-  m_refit2Tree(0),
-  m_truthTree(0),
-  m_combTree(0),
-  m_MSTree(0),
-  m_FourMuTree(0),
+  m_defaultTree(nullptr),
+  m_IDTree(nullptr),
+  m_refit1Tree(nullptr),
+  m_refit2Tree(nullptr),
+  m_truthTree(nullptr),
+  m_combTree(nullptr),
+  m_MSTree(nullptr),
+  m_FourMuTree(nullptr),
   m_doRemoval(true),
   m_doDebug(false),
   m_Trk2VtxAssociationTool("CP::TrackVertexAssociationTool", this)
@@ -336,7 +336,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
     m_commonTree->Branch("numberOfTRTHits"     , &m_nTRThits);
   }
 
-  if ( m_defaultTree == 0){
+  if ( m_defaultTree == nullptr){
     ATH_MSG_INFO("initialize() ** defining m_defaultTree with name: " << m_defaultTreeName.c_str());    
     m_defaultTree = new TTree((m_defaultTreeName).c_str(), m_ValidationTreeDescription.c_str());
 
@@ -388,7 +388,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
   }
   
   
-  if ( m_IDTree == 0 ){
+  if ( m_IDTree == nullptr ){
     ATH_MSG_INFO("initialize() ** defining m_IDTree with name: " << m_IDTreeName.c_str());    
     m_IDTree = new TTree((m_IDTreeName).c_str(), m_ValidationTreeDescription.c_str());
     
@@ -439,7 +439,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
     }
   }
   
-  if( m_doRefit && m_refit1Tree == 0){
+  if( m_doRefit && m_refit1Tree == nullptr){
     ATH_MSG_INFO("initialize() ** defining m_refit1Tree with name: " << m_refit1TreeName.c_str());    
     m_refit1Tree = new TTree((m_refit1TreeName).c_str(), m_ValidationTreeDescription.c_str()); 
     
@@ -491,7 +491,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
     }    
   }
 
-  if( m_doRefit && m_refit2Tree == 0){
+  if( m_doRefit && m_refit2Tree == nullptr){
     ATH_MSG_INFO("initialize() ** defining m_refit2Tree with name: " << m_refit2TreeName.c_str());
     m_refit2Tree = new TTree((m_refit2TreeName).c_str(), m_ValidationTreeDescription.c_str());
 
@@ -546,7 +546,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
     }    
   }
   
-  if( m_combTree == 0){
+  if( m_combTree == nullptr){
     ATH_MSG_INFO("initialize() ** defining m_combTree with name: " << m_combTreeName.c_str());
     m_combTree = new TTree((m_combTreeName).c_str(), m_ValidationTreeDescription.c_str());
 
@@ -600,7 +600,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
   }
 
   
-  if( m_MSTree == 0){
+  if( m_MSTree == nullptr){
     ATH_MSG_INFO("initialize() ** defining MSTree ");
 
     m_MSTree = new TTree(m_MSTreeName.c_str(), m_ValidationTreeDescription.c_str());
@@ -635,7 +635,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
     m_MSTree->Branch("Positive_sigma_pt",  &m_positive_sigma_pt,  "Positive_sigma_pt/D");
   }
 
-  if( m_isMC && m_truthTree == 0){
+  if( m_isMC && m_truthTree == nullptr){
     m_truthTree = new TTree(m_truthTreeName.c_str(), m_ValidationTreeDescription.c_str());
 
     m_truthTree->Branch("runNumber"      ,  &m_runNumber,  "runNumber/I");
@@ -668,7 +668,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
     m_truthTree->Branch("Positive_parent",  &m_positive_parent,  "Positive_parent/I");
   }
 
-  if (m_doFourMuAnalysis && m_FourMuTree == 0) {
+  if (m_doFourMuAnalysis && m_FourMuTree == nullptr) {
     ATH_MSG_INFO("initialize() ** defining m_FourMuTree ");
     m_FourMuTree = new TTree((m_FourMuTreeName).c_str(), "Four Muon monitoring");
 
@@ -765,7 +765,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
   
   // now register the Trees
   ATH_MSG_INFO("initialize() Going to register the mu+mu- trees");
-  ITHistSvc* tHistSvc = 0;
+  ITHistSvc* tHistSvc = nullptr;
   if (service("THistSvc",tHistSvc).isFailure()){
     ATH_MSG_ERROR("initialize() Could not find Hist Service -> Switching ValidationMode Off !");
     m_validationMode = false;
@@ -776,7 +776,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
   }
   else {
     ATH_MSG_ERROR("initialize() Could not register the validation commonTree -> Switching ValidationMode Off !");
-    delete m_commonTree; m_commonTree = 0;
+    delete m_commonTree; m_commonTree = nullptr;
     m_validationMode = false;
   }
 
@@ -785,7 +785,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
   }
   else {
     ATH_MSG_ERROR("initialize() Could not register the validation IDTree -> Switching ValidationMode Off !");
-    delete m_IDTree; m_IDTree = 0;
+    delete m_IDTree; m_IDTree = nullptr;
     m_validationMode = false;
   }
   
@@ -794,7 +794,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
   }
   else {
     ATH_MSG_ERROR("initialize() Could not register the validation combTree -> Switching ValidationMode Off !");
-    delete m_combTree; m_combTree = 0;
+    delete m_combTree; m_combTree = nullptr;
     m_validationMode = false;
   }
   
@@ -803,7 +803,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
   }
   else {
     ATH_MSG_ERROR("initialize() Could not register the validation MSTree -> Switching ValidationMode Off !");
-    delete m_MSTree; m_MSTree = 0;
+    delete m_MSTree; m_MSTree = nullptr;
     m_validationMode = false;
   }
 
@@ -813,7 +813,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
     }
     else{
       ATH_MSG_ERROR("initialize() Could not register the validation Tree -> Switching ValidationMode Off !");
-      delete m_refit1Tree; m_refit1Tree = 0;
+      delete m_refit1Tree; m_refit1Tree = nullptr;
       m_validationMode = false;
     }
 
@@ -822,7 +822,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
     }
     else {
       ATH_MSG_ERROR("initialize() Could not register the validation Tree -> Switching ValidationMode Off !");
-      delete m_refit2Tree; m_refit2Tree = 0;
+      delete m_refit2Tree; m_refit2Tree = nullptr;
       m_validationMode = false;
     }
   }
@@ -833,7 +833,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
     }
     else {
       ATH_MSG_ERROR("initialize() Could not register the validation truth Tree -> Switching ValidationMode Off !");
-      delete m_truthTree; m_truthTree = 0;
+      delete m_truthTree; m_truthTree = nullptr;
       m_validationMode = false;
     }
   }
@@ -844,7 +844,7 @@ StatusCode IDPerfMonZmumu::bookTrees()
     }
     else {
       ATH_MSG_ERROR("initialize() Could not register the validation FourMu Tree -> Switching ValidationMode Off !");
-      delete m_FourMuTree; m_FourMuTree = 0;
+      delete m_FourMuTree; m_FourMuTree = nullptr;
       m_validationMode = false;
     }
   }
@@ -1587,7 +1587,7 @@ StatusCode IDPerfMonZmumu::FillRecParametersTP(const xAOD::TrackParticle* trackp
     iPandSigma = m_trackToVertexIPEstimator->estimate(trackp_for_unbias, trackp, vertex, m_doRemoval);
     ATH_MSG_DEBUG("return from the trackToVertexIPEstimator->estimate()");
     
-    if( iPandSigma == NULL ){
+    if( iPandSigma == nullptr ){
       ATH_MSG_WARNING ("FillRecParametersTP::trackToVertexIPEstimator failed !");
       return StatusCode::FAILURE;
     }
@@ -1687,12 +1687,12 @@ StatusCode IDPerfMonZmumu::FillRecParameters(const Trk::Track* track, const xAOD
   
   
 
-  if (trkPerigee != NULL){
+  if (trkPerigee != nullptr){
     double qOverP   = trkPerigee->parameters()[Trk::qOverP];
     if (qOverP) {
       px = trkPerigee->momentum().x();
       py = trkPerigee->momentum().y();
-      pt = std::fabs(trkPerigee->pT()); 
+      pt = std::abs(trkPerigee->pT()); 
       pz = trkPerigee->momentum().z();
       phi= trkPerigee->parameters()[Trk::phi];
       eta= trkPerigee->eta();
@@ -1715,7 +1715,7 @@ StatusCode IDPerfMonZmumu::FillRecParameters(const Trk::Track* track, const xAOD
     if(qOverP){
       px = atBL->momentum().x();
       py = atBL->momentum().y();
-      pt = std::fabs(atBL->pT());
+      pt = std::abs(atBL->pT());
       pz = atBL->momentum().z();
       eta= trkPerigee->eta();
       phi= trkPerigee->parameters()[Trk::phi];
@@ -1732,9 +1732,9 @@ StatusCode IDPerfMonZmumu::FillRecParameters(const Trk::Track* track, const xAOD
   }
   
   if(m_doIP && vertex && track->perigeeParameters()){ //I assume that the vertex is the same of the original track
-    const Trk::ImpactParametersAndSigma* iPandSigma(NULL);
+    const Trk::ImpactParametersAndSigma* iPandSigma(nullptr);
     iPandSigma = m_trackToVertexIPEstimator->estimate(trk_for_unbiasPerigee,trkPerigee,vertex,m_doRemoval);
-    if( iPandSigma==0 ){
+    if( iPandSigma==nullptr ){
       ATH_MSG_WARNING ("FillRecParameters::trackToVertexIPEstimator failed !");
       return StatusCode::FAILURE;
     }
@@ -1836,7 +1836,7 @@ StatusCode IDPerfMonZmumu::FillTruthParameters(const xAOD::TrackParticle* trackP
   } 
 
   const Amg::Vector3D momentum(particle->px(), particle->py(), particle->pz());  
-  const xAOD::TruthVertex * ptruthVertex(0);
+  const xAOD::TruthVertex * ptruthVertex(nullptr);
   ptruthVertex=particle->prodVtx();
   if (!ptruthVertex){
     ATH_MSG_DEBUG("A production vertex pointer was retrieved, but it is NULL");
@@ -1919,7 +1919,7 @@ StatusCode IDPerfMonZmumu::FillTruthParameters(const xAOD::TrackParticle* trackP
       ATH_MSG_DEBUG("cand perig HEP particle (truth) pz : "<< tP->momentum().z());
       ATH_MSG_DEBUG("cand perig HEP particle (truth) d0 : "<< tP->parameters()[Trk::d0]);
       ATH_MSG_DEBUG("cand perig HEP particle (truth) z0 : "<< tP->parameters()[Trk::z0]);
-      delete tP;tP=0;
+      delete tP;tP=nullptr;
     }
   }
 
@@ -1995,18 +1995,18 @@ StatusCode IDPerfMonZmumu::FillTruthParameters(const xAOD::TrackParticle* trackP
 //==================================================================================
 const xAOD::TruthParticle* IDPerfMonZmumu::getTruthParticle( const xAOD::IParticle& p ) {
   /// A convenience type declaration
-  typedef ElementLink< xAOD::TruthParticleContainer > Link_t;
+  using Link_t = ElementLink<xAOD::TruthParticleContainer>;
   /// A static accessor for the information
   static const SG::AuxElement::ConstAccessor< Link_t > acc( "truthParticleLink" );
   // Check if such a link exists on the object:
   if( ! acc.isAvailable( p ) ) {
-    return 0;
+    return nullptr;
   }
   // Get the link:
   const Link_t& link = acc( p );
   // Check if the link is valid:
   if( ! link.isValid() ) {
-    return 0;
+    return nullptr;
   }
   // Everything has passed, let's return the pointer:
   return *link;
@@ -2076,8 +2076,8 @@ StatusCode IDPerfMonZmumu::CheckTriggerStatusAndPrescale ()
 //==================================================================================
 const xAOD::Vertex* IDPerfMonZmumu::GetDiMuonVertex(const xAOD::TrackParticle* muon1, const xAOD::TrackParticle* muon2) {
   
-  const xAOD::VertexContainer* vxContainer(0);
-  const xAOD::Vertex* myVtx(0);
+  const xAOD::VertexContainer* vxContainer(nullptr);
+  const xAOD::Vertex* myVtx(nullptr);
   vxContainer = PerfMonServices::getContainer<xAOD::VertexContainer> (PerfMonServices::VTX_COLLECTION);
   if (!vxContainer) { 
     return myVtx;
@@ -2430,7 +2430,7 @@ StatusCode IDPerfMonZmumu::RunFourLeptonAnalysis()
 	// Obtain MET 
 	std::string metName = "MET_Reference_AntiKt4LCTopo";
 	std::string metRefFinalName = "FinalClus";
-	const xAOD::MissingETContainer* final_met = 0;
+	const xAOD::MissingETContainer* final_met = nullptr;
 
 	m_met = -1; // default value
 	m_metphi = -1;
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx
index 6a98aa18c02d..fe341c4e08bf 100644
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 //==================================================================================
@@ -57,7 +57,7 @@ MuonSelector::MuonSelector():
   // EOC commented by Salva -- R22 test --
   unsigned int inst = ++m_uNumInstances;
   m_xSampleName     = "MuID_" + std::to_string(inst);
-  m_pxMuon = NULL;
+  m_pxMuon = nullptr;
   m_bLock  = false;
 
   
@@ -116,7 +116,7 @@ void MuonSelector::Init()
   IToolSvc* toolSvc;
   StatusCode sc = serviceLocator->service("ToolSvc", toolSvc, true);
 
-  if ( sc.isFailure() || toolSvc == 0 ) {
+  if ( sc.isFailure() || toolSvc == nullptr ) {
     (*m_msgStream) << MSG::ERROR << "  * MuonSelector::Init * Unable to retrieve ToolSvc " << endmsg;
     return;
   }
@@ -301,7 +301,7 @@ bool MuonSelector::passPtCuts()
     ptID  = pxMuonID ? pxMuonID->pt() : 0.0 ;
     ptMS  = pxMuonMS ? pxMuonMS->pt() : 0.0 ;
     ptCB  = pxMuonCB ? pxMuonCB->pt() : 0.0 ;
-    double fMEta = fabs( m_pxMuon->eta() );
+    double fMEta = std::abs( m_pxMuon->eta() );
 
     if(m_doDebug) std::cout << "    * MuonSelector::passPtCuts * pt of each segments of this muon pxMuon: " << pt << std::endl
 			    << "                                                                    ptID: " << ptID << std::endl 
@@ -315,7 +315,7 @@ bool MuonSelector::passPtCuts()
 	 && (ptMS  > m_ptMSCut || !pxMuonMS)
 	 && (ptID  > m_ptMSCut || !pxMuonID)
 	 ){
-      // warning one can check also the difference of pt: fabs(ptMS - ptID) < m_diffPtCut
+      // warning one can check also the difference of pt: std::abs(ptMS - ptID) < m_diffPtCut
       if(m_doDebug) std::cout << "    * MuonSelector::passPtCuts * this muon is in eta range |eta|= " << fMEta << " < EtaCut(" << m_fEtaCut << ") " << std::endl 
 			      << "                                 and passed the PtCuts (" << m_combPtCut <<") "<< std::endl;
       return true;
@@ -395,7 +395,7 @@ bool MuonSelector::passIPCuts()
   }
 
   // retrieve the vertices  
-  const xAOD::VertexContainer *  vxContainer(0);
+  const xAOD::VertexContainer *  vxContainer(nullptr);
   vxContainer = PerfMonServices::getContainer <xAOD::VertexContainer> ( PerfMonServices::VTX_COLLECTION );
   if (!vxContainer){
     if(m_doDebug) std::cout << "   * MuonSelector::passIPCuts ** fails because NO vertex collection "<< std::endl;
@@ -427,16 +427,16 @@ bool MuonSelector::passIPCuts()
 	const xAOD::Vertex* thisVtx  = (*vxContainer)[ivtx];
 	// if ( (thisVtx->vertexType() == 1) && thisVtx->nTrackParticles()>2 ) {
 	if ( thisVtx->nTrackParticles()>2 ) {
-	  if (fabs(extz0 - thisVtx->position().z()) < minDeltaZ) minDeltaZ = fabs(extz0 - thisVtx->position().z());
+	  if (std::abs(extz0 - thisVtx->position().z()) < minDeltaZ) minDeltaZ = std::abs(extz0 - thisVtx->position().z());
 
 	  // check the vertex is in the accepted Z range and that the muon is not far from the vertex
 	  if (m_doDebug) {
-	    std::cout << "           testing vtx: " << ivtx << "  vtx.z= " << thisVtx->position().z() << " trk.z= " << extz0 << "   deltaZ= " << fabs(extz0 - thisVtx->position().z()) << "  minDeltaZ= " << minDeltaZ << std::endl;
+	    std::cout << "           testing vtx: " << ivtx << "  vtx.z= " << thisVtx->position().z() << " trk.z= " << extz0 << "   deltaZ= " << std::abs(extz0 - thisVtx->position().z()) << "  minDeltaZ= " << minDeltaZ << std::endl;
 	  }
-	  if (fabs(thisVtx->position().z()) < m_pVZCut && fabs(extz0 - thisVtx->position().z()) < m_diffZCut){
+	  if (std::abs(thisVtx->position().z()) < m_pVZCut && std::abs(extz0 - thisVtx->position().z()) < m_diffZCut){
 	    goodmuonIP = true;
 	    if(m_doDebug) std::cout << "    * MuonSelector::passIPCuts * this muon has passed the IPCuts for vertex " << ivtx+1
-				    << "  pVZcut= " << fabs(extz0 - thisVtx->position().z()) << " < " << m_diffZCut << std::endl
+				    << "  pVZcut= " << std::abs(extz0 - thisVtx->position().z()) << " < " << m_diffZCut << std::endl
 				    << "                                 vtx (x,y,z): " 
 				    << " (" << thisVtx->position().x()
 				    << ", " << thisVtx->position().y()
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/PerfMonServices.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/PerfMonServices.cxx
index d0cf122499ae..3bb166eeb8fa 100644
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/PerfMonServices.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/PerfMonServices.cxx
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+ * Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
  */
 
 #include "InDetPerformanceMonitoring/PerfMonServices.h"
@@ -7,11 +7,11 @@
 #include "GaudiKernel/StatusCode.h"
 
 // NULL the static pointers
-ISvcLocator*    PerfMonServices::s_pxSvcLocator   = NULL;
-ITHistSvc*      PerfMonServices::s_pxTHistSvc     = NULL;
-IMessageSvc*    PerfMonServices::s_pxMessageSvc   = NULL;
-StoreGateSvc*   PerfMonServices::s_pxStoreGateSvc = NULL;
-INTupleSvc*     PerfMonServices::s_pxNtupleSvc    = NULL;
+ISvcLocator*    PerfMonServices::s_pxSvcLocator   = nullptr;
+ITHistSvc*      PerfMonServices::s_pxTHistSvc     = nullptr;
+IMessageSvc*    PerfMonServices::s_pxMessageSvc   = nullptr;
+StoreGateSvc*   PerfMonServices::s_pxStoreGateSvc = nullptr;
+INTupleSvc*     PerfMonServices::s_pxNtupleSvc    = nullptr;
 
 // Names of the various containers.
 const std::string PerfMonServices::s_sContainerNames[NUM_CONTAINERS] = { "MuidMuonCollection",
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx
index f48b5d983178..e5a6281ef858 100644
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // **********************************************************************
@@ -522,7 +522,7 @@ fillAllHistograms (const xAOD::TrackParticle *trkP, float mass, int PCand){
 
   for(;TSOSItBegin!=TSOSItEnd; ++TSOSItBegin)
   {
-    if((*TSOSItBegin)==0) continue;
+    if((*TSOSItBegin)==nullptr) continue;
     else if ((*TSOSItBegin)->type(Trk::TrackStateOnSurface::Measurement))
     {
       const InDet::TRT_DriftCircleOnTrack *trtCircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>((*TSOSItBegin)->measurementOnTrack());
@@ -539,7 +539,7 @@ fillAllHistograms (const xAOD::TrackParticle *trkP, float mass, int PCand){
 	bool isTubeHit = ( mesb->localCovariance()(Trk::locX,Trk::locX) > 1.0) ? 1 : 0;
 	float TRThitX = trtCircle->globalPosition().x();
 	float TRThitY = trtCircle->globalPosition().y();
-	float TRThitZ = fabs(trtCircle->globalPosition().z());
+	float TRThitZ = std::abs(trtCircle->globalPosition().z());
 	float zr = barrel_ec<2 ? TRThitZ : sqrt(pow(TRThitX,2)+pow(TRThitY,2));
 	int phi_or_plane   =  barrel_ec<2 ? m_pTRTHelper->phi_module(DCoTId) :m_pTRTHelper->straw_layer(DCoTId);
 	int layer_or_wheel = m_pTRTHelper->layer_or_wheel(DCoTId);
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx
index c89d00435073..4415823576ae 100644
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 //==================================================================================
@@ -88,8 +88,8 @@ void ZmumuEvent::Init()
 //==================================================================================
 const std::string ZmumuEvent::getRegion() const{
 
-  const double eta1 = fabs(m_pxRecMuon[m_muon1]->eta());
-  const double eta2 = fabs(m_pxRecMuon[m_muon2]->eta());
+  const double eta1 = std::abs(m_pxRecMuon[m_muon1]->eta());
+  const double eta2 = std::abs(m_pxRecMuon[m_muon2]->eta());
 
   if ( eta1 < m_etaCut && eta2 < m_etaCut )
     return "BB";
@@ -116,8 +116,8 @@ bool ZmumuEvent::Reco()
   // WARNING thus is necessary for data16 !!
   if (false) {
     for( auto muon :  *pxMuonContainer ){
-      const xAOD::TrackParticle* idtrk(0);
-      const xAOD::TrackParticle* metrk(0);
+      const xAOD::TrackParticle* idtrk(nullptr);
+      const xAOD::TrackParticle* metrk(nullptr);
       idtrk = muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
       metrk = muon->trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
       if (idtrk && metrk) {
@@ -321,7 +321,7 @@ bool ZmumuEvent::EventSelection(ZTYPE eType)
     if(m_doDebug) {
       std::cout << " * ZmumuEvent *  z0_muon1= " << z0_muon1 << "  z0_muon2= " << z0_muon2 << "  delta= " << z0_muon1-z0_muon2 << std::endl;
     }
-    if ( fabs(z0_muon1 - z0_muon2) > m_Z0GapCut) {
+    if ( std::abs(z0_muon1 - z0_muon2) > m_Z0GapCut) {
       if(m_doDebug) {
 	std::cout << " * ZmumuEvent * Failing common vertex cut. z.vtx1= " << m_pxIDTrack[m_muon1]->vz() << "  z.vtx2= " << m_pxIDTrack[m_muon2]->vz() << std::endl;
 	std::cout << " * ZmumuEvent * Failing common vertex cut. IDTrk.z0_1= " << m_pxIDTrack[m_muon1]->z0() << "  IDTrk.z0_2= " << m_pxIDTrack[m_muon2]->z0() << std::endl;
@@ -350,10 +350,10 @@ void ZmumuEvent::Clear()
   m_muon2 = MUON2;
 
   for ( unsigned int u = 0; u < NUM_MUONS; ++u ) {
-      m_pxRecMuon[u] = NULL;
-      m_pxMSTrack[u] = NULL;
-      m_pxMETrack[u] = NULL;
-      m_pxIDTrack[u] = NULL;
+      m_pxRecMuon[u] = nullptr;
+      m_pxMSTrack[u] = nullptr;
+      m_pxMETrack[u] = nullptr;
+      m_pxIDTrack[u] = nullptr;
   }
   for ( unsigned int v = 0; v < NUM_TYPES; ++v ) {
     m_fZPt[v]            = -999.9f;
@@ -563,8 +563,8 @@ const xAOD::TrackParticle*  ZmumuEvent::getLooseIDTk( unsigned int /*uPart*/ )
 	  const float fTrkPhi   = pxPerigee->parameters()[Trk::phi];
 	  const float fTrkEta   = pxPerigee->eta();
 
-	  float fDPhi = fabs( fTrkPhi -  m_pxMETrack[m_muon1]->phi() );
-	  float fDEta = fabs( fTrkEta -  m_pxMETrack[m_muon2]->eta() );
+	  float fDPhi = std::abs( fTrkPhi -  m_pxMETrack[m_muon1]->phi() );
+	  float fDEta = std::abs( fTrkEta -  m_pxMETrack[m_muon2]->eta() );
 	  float fDR = sqrt( fDPhi*fDPhi + fDEta*fDEta );
 
 	  if ( fDR < 0.3f )
@@ -576,7 +576,7 @@ const xAOD::TrackParticle*  ZmumuEvent::getLooseIDTk( unsigned int /*uPart*/ )
 	}
     }
   // if ()
-  return NULL;
+  return nullptr;
 }
 
 //==================================================================================
@@ -624,7 +624,7 @@ void ZmumuEvent::OrderMuonList()
 
   if (m_numberOfFullPassMuons >= 2) {
     for (int imuon=0; imuon < (int) m_numberOfFullPassMuons; imuon++) {
-      if (m_pxRecMuon[imuon] != NULL) {
+      if (m_pxRecMuon[imuon] != nullptr) {
 	
 	if (m_pxRecMuon[imuon]->charge()== 1 && m_pxRecMuon[imuon]->pt()> muPlusPt) {
 	  muPlusPt = m_pxRecMuon[imuon]->pt();
diff --git a/InnerDetector/InDetMonitoring/InDetVertexMonitoring/src/InDetVertexMonitoring.cxx b/InnerDetector/InDetMonitoring/InDetVertexMonitoring/src/InDetVertexMonitoring.cxx
index 01767f3ccf31..4a17e2c347a4 100644
--- a/InnerDetector/InDetMonitoring/InDetVertexMonitoring/src/InDetVertexMonitoring.cxx
+++ b/InnerDetector/InDetMonitoring/InDetVertexMonitoring/src/InDetVertexMonitoring.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <iostream>
@@ -27,15 +27,15 @@
 InDetVertexMonitoring::InDetVertexMonitoring( const std::string & type, const std::string & name, const IInterface* parent ) 
   : ManagedMonitorToolBase( type, name, parent )
 {
-  m_h_vxdist = 0;
-  m_h_Ntracks = 0;
-  m_h_sumpt = 0;
-  m_h_pvChiSq = 0;
-  m_h_pvDof = 0;
-  m_h_pvChiSqovDof = 0;
-  m_h_pvChiSqProb = 0;
-  m_h_cumulVx = 0;
-  m_h_deltaZpairs = 0;
+  m_h_vxdist = nullptr;
+  m_h_Ntracks = nullptr;
+  m_h_sumpt = nullptr;
+  m_h_pvChiSq = nullptr;
+  m_h_pvDof = nullptr;
+  m_h_pvChiSqovDof = nullptr;
+  m_h_pvChiSqProb = nullptr;
+  m_h_cumulVx = nullptr;
+  m_h_deltaZpairs = nullptr;
 }
 
 /////////////////////////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthClusterMonAlg.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthClusterMonAlg.cxx
index 3b78d0be4078..7a701db2a4a8 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthClusterMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthClusterMonAlg.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
  */
 
 #include "PixelAthClusterMonAlg.h"
@@ -345,8 +345,8 @@ StatusCode PixelAthClusterMonAlg::fillHistograms(const EventContext& ctx) const
 	    
 	    double mytrack_mag = mytrack.mag();
 	    double cosalpha = 0.;
-	    if (mytrack_mag != 0) cosalpha = fabs(trknormcomp / mytrack_mag);
-	    ClusterIDs.push_back(std::make_pair(clus->identify(), cosalpha));
+	    if (mytrack_mag != 0) cosalpha = std::abs(trknormcomp / mytrack_mag);
+	    ClusterIDs.emplace_back(clus->identify(), cosalpha);
 	  }
 	} // end of measurement case
 
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthMVAMonAlg.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthMVAMonAlg.cxx
index 52273ece0a26..6f1a1b5009c8 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthMVAMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthMVAMonAlg.cxx
@@ -266,7 +266,7 @@ StatusCode PixelAthMVAMonAlg::fillHistograms( const EventContext& ctx ) const {
 	    double trackp_mag     = trackp.mag();
 	    double cosalpha       = 0.;
 	    if (trackp_mag != 0) cosalpha = std::abs(trackpnormcomp / trackp_mag);
-	    ClusterIDs.push_back(std::make_pair(clus->identify(), cosalpha));
+	    ClusterIDs.emplace_back(clus->identify(), cosalpha);
 	  }
 	}
     } // end of TSOS loop
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx
index 4e70273a447f..97587b7ce9ac 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCTErrMonAlg.h"
@@ -309,8 +309,8 @@ SCTErrMonAlg::fillByteStreamErrors(const EventContext& ctx) const {
     if (ent->m_evt!=ctx.evt()) { // New event in this slot
       if (ent->m_mapSCT.empty()) { // First event
         for (int iProblem{0}; iProblem<numberOfProblemForCoverage; iProblem++) {
-          ent->m_mapSCT.push_back(TH2F(names[iProblem].c_str(), titles[iProblem].c_str(),
-                                       s_nBinsEta, -s_rangeEta, s_rangeEta, s_nBinsPhi, -M_PI, M_PI));
+          ent->m_mapSCT.emplace_back(names[iProblem].c_str(), titles[iProblem].c_str(),
+                                       s_nBinsEta, -s_rangeEta, s_rangeEta, s_nBinsPhi, -M_PI, M_PI);
           ent->m_mapSCT[iProblem].GetXaxis()->SetTitle("#eta");
           ent->m_mapSCT[iProblem].GetYaxis()->SetTitle("#phi");
         }
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonAlg.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonAlg.cxx
index 29be909d25eb..9a6d76e280fe 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonAlg.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 "SCTHitEffMonAlg.h"
@@ -377,7 +377,7 @@ StatusCode SCTHitEffMonAlg::fillHistograms(const EventContext& ctx) const {
                                     "track cut: inside-out only")) {
       continue;
     }
-    if (pthisTrack->perigeeParameters() == 0) {
+    if (pthisTrack->perigeeParameters() == nullptr) {
       continue;
     }
     const Trk::Perigee* perigee{pthisTrack->perigeeParameters()};
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx
index 1fb3a7ccbd3b..370d207d1169 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.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
 */
 
 /** Tool to measure the intrinsic single hit efficiency in the SCT
@@ -114,21 +114,21 @@ namespace {// anonymous namespace for functions at file scope
 //cppcheck-suppress uninitMemberVar
 SCTHitEffMonTool::SCTHitEffMonTool(const string& type, const string& name, const IInterface* parent) :
   ManagedMonitorToolBase(type, name, parent) {
-  m_Eff_summaryHisto.fill(0);
-  m_Eff_summaryHistoFirstBCID.fill(0);
-  m_Eff_LumiBlockHisto.fill(0);
+  m_Eff_summaryHisto.fill(nullptr);
+  m_Eff_summaryHistoFirstBCID.fill(nullptr);
+  m_Eff_LumiBlockHisto.fill(nullptr);
   // assume zero inefficiency
   for (unsigned int i{0}; i < m_ineffMap.size(); ++i) {
-    m_ineffMap[i].fill(0);
+    m_ineffMap[i].fill(nullptr);
   }
   for (unsigned int i{0}; i < m_effMap.size(); ++i) {
-    m_effMap[i].fill(0);
+    m_effMap[i].fill(nullptr);
   }
   for (unsigned int i{0}; i < m_effMapFirstBCID.size(); ++i) {
-    m_effMapFirstBCID[i].fill(0);
+    m_effMapFirstBCID[i].fill(nullptr);
   }
   for (unsigned int i{0}; i < m_effLumiBlock.size(); ++i) {
-    m_effLumiBlock[i].fill(0);
+    m_effLumiBlock[i].fill(nullptr);
   }
 }
 
@@ -548,7 +548,7 @@ SCTHitEffMonTool::fillHistograms() {
                                     "track cut: inside-out only")) {
       continue;
     }
-    if (pthisTrack->perigeeParameters() == 0) {
+    if (pthisTrack->perigeeParameters() == nullptr) {
       continue;
     }
     const Trk::Perigee* perigee{pthisTrack->perigeeParameters()};
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.cxx
index 4e8414a3ee35..01f2d35e5cf7 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.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 "SCTTracksMonAlg.h"
@@ -114,7 +114,7 @@ ATH_MSG_DEBUG("SCTTracksMonAlg::fillHistograms()");
         auto trk_chi2Acc{Monitored::Scalar<float>("trk_chi2", track->fitQuality()->chiSquared() / track->fitQuality()->numberDoF())};
         fill("SCTTracksMonitor", trk_chi2Acc);
     }
-    if (track->perigeeParameters() == 0) {
+    if (track->perigeeParameters() == nullptr) {
       continue;
     }
     double trackPerigeeTheta{track->perigeeParameters()->parameters()[Trk::theta]};
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx
index 1f3e3de634ed..e6209a3b660f 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 /**    @file SCTTracksMonTool.cxx
@@ -176,7 +176,7 @@ SCTTracksMonTool::fillHistograms() {
     if (track->fitQuality()->numberDoF() > 0.) { // Fill Track Chi2/ndf histogram
       m_trk_chi2->Fill(track->fitQuality()->chiSquared() / track->fitQuality()->numberDoF());
     }
-    if (track->perigeeParameters() == 0) {
+    if (track->perigeeParameters() == nullptr) {
       continue;
     }
     double trackPerigeeTheta{track->perigeeParameters()->parameters()[Trk::theta]};
diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.cxx b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.cxx
index c328ec2daed2..853da703f5ba 100644
--- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.cxx
+++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3ESD_Alg.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 "TRTMonitoringRun3/TRTMonitoringRun3ESD_Alg.h"
@@ -39,13 +39,13 @@ const int TRTMonitoringRun3ESD_Alg::s_moduleNum[2] = {96, 64};
 
 TRTMonitoringRun3ESD_Alg::TRTMonitoringRun3ESD_Alg( const std::string& name, ISvcLocator* pSvcLocator )
 :AthMonitorAlgorithm(name,pSvcLocator)
-,m_idHelper(0)
+,m_idHelper(nullptr)
 ,m_sumTool("TRT_StrawStatusSummaryTool", this)
 ,m_TRTStrawNeighbourSvc("TRT_StrawNeighbourSvc", name)
 ,m_TRTCalDbTool("TRT_CalDbTool", this)
 ,m_drifttool("TRT_DriftFunctionTool")
-,m_pTRTHelper(0)
-,m_mgr(0)
+,m_pTRTHelper(nullptr)
+,m_mgr(nullptr)
 ,m_isCosmics(false)
 ,m_minTRThits(10)
 ,m_minP(0)
@@ -511,7 +511,7 @@ StatusCode TRTMonitoringRun3ESD_Alg::fillTRTTracks(const xAOD::TrackParticleCont
     auto p_trk = trackCollection.begin();
 
     const Trk::Perigee *mPer = nullptr;
-    const DataVector<const Trk::TrackParameters> *AllTrkPar(0);
+    const DataVector<const Trk::TrackParameters> *AllTrkPar(nullptr);
     DataVector<const Trk::TrackParameters>::const_iterator p_trkpariter;
 
     int ntrackstack[2][64];
@@ -557,7 +557,7 @@ for (; p_trk != trackCollection.end(); ++p_trk) {
 
         const DataVector<const Trk::TrackStateOnSurface> *trackStates = ((*p_trk)->track())->trackStateOnSurfaces();
 
-        if (trackStates == 0) continue;
+        if (trackStates == nullptr) continue;
 
         DataVector<const Trk::TrackStateOnSurface>::const_iterator TSOSItBegin0    = trackStates->begin();
         DataVector<const Trk::TrackStateOnSurface>::const_iterator TSOSItBegin     = trackStates->begin();
@@ -627,7 +627,7 @@ for (; p_trk != trackCollection.end(); ++p_trk) {
         float phi2D[2] = {-100, -100};
 
         for (TSOSItBeginTemp = TSOSItBegin0; TSOSItBeginTemp != TSOSItEnd; ++TSOSItBeginTemp) {
-            if ((*TSOSItBeginTemp) == 0) continue;
+            if ((*TSOSItBeginTemp) == nullptr) continue;
 
             if (! ((*TSOSItBeginTemp)->type(Trk::TrackStateOnSurface::Measurement)) ) continue;
             const InDet::TRT_DriftCircleOnTrack *trtCircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack *>((*TSOSItBeginTemp)->measurementOnTrack());
@@ -681,7 +681,7 @@ for (; p_trk != trackCollection.end(); ++p_trk) {
 
         for (TSOSItBegin = TSOSItBegin0; TSOSItBegin != TSOSItEnd; ++TSOSItBegin) {
             // Select a TSOS which is non-empty, measurement type and contains  both drift circle and track parameters informations
-            if ((*TSOSItBegin) == 0) continue;
+            if ((*TSOSItBegin) == nullptr) continue;
 
             if ( !((*TSOSItBegin)->type(Trk::TrackStateOnSurface::Measurement)) ) continue;
 
@@ -856,7 +856,7 @@ for (; p_trk != trackCollection.end(); ++p_trk) {
                     }
                     else pull_b_fill = false;
                     const double thist0 = m_TRTCalDbTool->getT0(surfaceID);
-                    const double trkdrifttime = (!rtr) ? 0 : rtr->drifttime(fabs(locR));
+                    const double trkdrifttime = (!rtr) ? 0 : rtr->drifttime(std::abs(locR));
                     const double timeresidual = RawDriftCircle->rawDriftTime() - thist0 - trkdrifttime;
 
                     if (ibe == 0) {
@@ -972,21 +972,21 @@ for (; p_trk != trackCollection.end(); ++p_trk) {
                         if (isArgonStraw) {
                             if (m_isCosmics) {
                                 RtRelation_B_Ar_x = LE - EP - t0;
-                                RtRelation_B_Ar_y = fabs(locR);
+                                RtRelation_B_Ar_y = std::abs(locR);
                                 fill("ShiftTRTTrackHistograms"+std::to_string(ibe), RtRelation_B_Ar_x, RtRelation_B_Ar_y);
                             } else {
                                 RtRelation_B_Ar_x = LE - t0;
-                                RtRelation_B_Ar_y = fabs(locR);
+                                RtRelation_B_Ar_y = std::abs(locR);
                                 fill("ShiftTRTTrackHistograms"+std::to_string(ibe), RtRelation_B_Ar_x, RtRelation_B_Ar_y);
                             }
                         } else {
                             if (m_isCosmics) {
                                 RtRelation_B_x = LE - EP - t0;
-                                RtRelation_B_y = fabs(locR);
+                                RtRelation_B_y = std::abs(locR);
                                 fill("ShiftTRTTrackHistograms"+std::to_string(ibe), RtRelation_B_x, RtRelation_B_y);
                             } else {
                                 RtRelation_B_x = LE - t0;
-                                RtRelation_B_y = fabs(locR);
+                                RtRelation_B_y = std::abs(locR);
                                 fill("ShiftTRTTrackHistograms"+std::to_string(ibe), RtRelation_B_x, RtRelation_B_y);
                             }
                         }
@@ -994,21 +994,21 @@ for (; p_trk != trackCollection.end(); ++p_trk) {
                         if (isArgonStraw) {
                             if (m_isCosmics) {
                                 RtRelation_E_Ar_x = LE - EP - t0;
-                                RtRelation_E_Ar_y = fabs(locR);
+                                RtRelation_E_Ar_y = std::abs(locR);
                                 fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), RtRelation_E_Ar_x, RtRelation_E_Ar_y);
                             } else {
                                 RtRelation_E_Ar_x = LE - t0;
-                                RtRelation_E_Ar_y = fabs(locR);
+                                RtRelation_E_Ar_y = std::abs(locR);
                                 fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), RtRelation_E_Ar_x, RtRelation_E_Ar_y);
                             }
                         } else {
                             if (m_isCosmics) {
                                 RtRelation_E_x = LE - EP - t0;
-                                RtRelation_E_y = fabs(locR);
+                                RtRelation_E_y = std::abs(locR);
                                 fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), RtRelation_E_x, RtRelation_E_y);
                             } else {
                                 RtRelation_E_x = LE - t0;
-                                RtRelation_E_y = fabs(locR);
+                                RtRelation_E_y = std::abs(locR);
                                 fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), RtRelation_E_x, RtRelation_E_y);
                             }
                         }
@@ -1143,7 +1143,7 @@ for (; p_trk != trackCollection.end(); ++p_trk) {
                     nTrksperLB_B++;
                 }
                 if (comTimeObject) {
-                    if (m_doShift && (phi2D[ibe] > 0) && (std::fabs(timeCor) > 1e-8)) {
+                    if (m_doShift && (phi2D[ibe] > 0) && (std::abs(timeCor) > 1e-8)) {
                         EvtPhaseDetPhi_B_x = phi2D[ibe];
                         EvtPhaseDetPhi_B_y = timeCor;
                         fill("ShiftTRTTrackHistograms"+std::to_string(ibe), EvtPhaseDetPhi_B_x, EvtPhaseDetPhi_B_y);
@@ -1153,7 +1153,7 @@ for (; p_trk != trackCollection.end(); ++p_trk) {
                 for (int iside = 0; iside < 2; iside++) {
                     if (nTRTHitsW[ibe][iside] > 0) nTrksperLB_E[iside]++;
                     if (comTimeObject) {
-                        if (nTRTHits_side[ibe][iside] > 5 && (std::fabs(timeCor)
+                        if (nTRTHits_side[ibe][iside] > 5 && (std::abs(timeCor)
                                                                 > 1e-8)) {
                             if (m_doShift) {
                                 EvtPhaseDetPhi_E_x = phi2D[ibe];
@@ -1168,7 +1168,7 @@ for (; p_trk != trackCollection.end(); ++p_trk) {
     }
 
     if (comTimeObject) {
-        if (std::fabs(timeCor) > 1e-8) {
+        if (std::abs(timeCor) > 1e-8) {
             if (m_doShift) {
                 EvtPhase = timeCor;
                 fill("ShiftTRTTrackHistograms0", EvtPhase);
@@ -1299,8 +1299,8 @@ StatusCode TRTMonitoringRun3ESD_Alg::fillTRTHighThreshold(const xAOD::TrackParti
     auto Trackz_All = Monitored::Scalar<float>("Trackz_All", 0.0);
 
     auto p_trk = trackCollection.begin();
-    const Trk::Perigee *perigee = NULL;
-    const DataVector<const Trk::TrackParameters> *AllTrkPar(0);
+    const Trk::Perigee *perigee = nullptr;
+    const DataVector<const Trk::TrackParameters> *AllTrkPar(nullptr);
     DataVector<const Trk::TrackParameters>::const_iterator p_trkpariter;
 
     for (; p_trk != trackCollection.end(); ++p_trk) {
@@ -1319,10 +1319,10 @@ StatusCode TRTMonitoringRun3ESD_Alg::fillTRTHighThreshold(const xAOD::TrackParti
         }
 
         float track_eta  = perigee->eta();
-        float track_p    = (perigee->parameters()[Trk::qOverP] != 0.) ? fabs(1. / (perigee->parameters()[Trk::qOverP])) : 10e7;
+        float track_p    = (perigee->parameters()[Trk::qOverP] != 0.) ? std::abs(1. / (perigee->parameters()[Trk::qOverP])) : 10e7;
         const DataVector<const Trk::TrackStateOnSurface> *trackStates = ((*p_trk)->track())->trackStateOnSurfaces();
 
-        if (trackStates == 0) continue;
+        if (trackStates == nullptr) continue;
 
         DataVector<const Trk::TrackStateOnSurface>::const_iterator TSOSItBegin     = trackStates->begin();
         DataVector<const Trk::TrackStateOnSurface>::const_iterator TSOSItEnd       = trackStates->end();
@@ -1334,8 +1334,8 @@ StatusCode TRTMonitoringRun3ESD_Alg::fillTRTHighThreshold(const xAOD::TrackParti
         (*p_trk)->summaryValue(tempHitsVariable, xAOD::SummaryType::numberOfPixelHits);
         int pixel_hits = unsigned(tempHitsVariable);
 
-        if (fabs(track_eta) > 2.5) continue;
-        if (fabs(track_p) < 5000.) continue;
+        if (std::abs(track_eta) > 2.5) continue;
+        if (std::abs(track_p) < 5000.) continue;
         if (pixel_hits < 1.) continue;
         if (sct_hits < 6.) continue;
         if (trt_hits < 6.) continue;
@@ -1356,7 +1356,7 @@ StatusCode TRTMonitoringRun3ESD_Alg::fillTRTHighThreshold(const xAOD::TrackParti
         int straw_layer    = 0;
 
         for (; TSOSItBegin != TSOSItEnd; ++TSOSItBegin) {
-            if ((*TSOSItBegin) == 0) continue;
+            if ((*TSOSItBegin) == nullptr) continue;
             if ( !((*TSOSItBegin)->type(Trk::TrackStateOnSurface::Measurement)) ) continue;
 
             const InDet::TRT_DriftCircleOnTrack *trtCircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack *>((*TSOSItBegin)->measurementOnTrack());
@@ -1396,7 +1396,7 @@ StatusCode TRTMonitoringRun3ESD_Alg::fillTRTHighThreshold(const xAOD::TrackParti
             bool shortStraw = false;
             int InputBar = 0;
 
-            if (fabs(track_eta) < 2. && Ba_Ec == 0.) {
+            if (std::abs(track_eta) < 2. && Ba_Ec == 0.) {
                 if ((layer_or_wheel == 0) && (phi_module < 4 || (phi_module > 7 && phi_module < 12) || (phi_module > 15 && phi_module < 20) || (phi_module > 23 && phi_module < 28))) InputBar = 1;
                 else if ((runNumber >= 296939) && (layer_or_wheel == 0) && (phi_module > 27)) InputBar = 1;
                 else if (layer_or_wheel == 0)
diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3RAW_Alg.cxx b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3RAW_Alg.cxx
index 18174373ed55..dbceae7f5a6a 100644
--- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3RAW_Alg.cxx
+++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3RAW_Alg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #define FILLEVENTNORMALIZATION(NBINS, MIN, WIDTH, VALUE, VARPASSED, VAR, HISTGROUP) \
@@ -45,9 +45,9 @@ constexpr int TRTMonitoringRun3RAW_Alg::s_iChip_max[2] = {104, 240};
 
 TRTMonitoringRun3RAW_Alg::TRTMonitoringRun3RAW_Alg( const std::string& name, ISvcLocator* pSvcLocator )
 :AthMonitorAlgorithm(name,pSvcLocator)
-,m_idHelper(0)
-,m_pTRTHelper(0)
-,m_mgr(0)
+,m_idHelper(nullptr)
+,m_pTRTHelper(nullptr)
+,m_mgr(nullptr)
 ,m_sumTool("TRT_StrawStatusSummaryTool", this)
 ,m_TRTStrawNeighbourSvc("TRT_StrawNeighbourSvc", name)
 ,m_BSSvc("TRT_ByteStream_ConditionsSvc", name)
@@ -1794,7 +1794,7 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTEfficiency(const TrackCollection& co
         float p = 1.0e+08;
 
         if (perigee) {
-            p = (perigee->parameters()[Trk::qOverP] != 0.) ? fabs(1. / (perigee->parameters()[Trk::qOverP])) : 1.0e+08;
+            p = (perigee->parameters()[Trk::qOverP] != 0.) ? std::abs(1. / (perigee->parameters()[Trk::qOverP])) : 1.0e+08;
         }
 
         float min_pt_new = m_min_pT;
@@ -1804,11 +1804,11 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTEfficiency(const TrackCollection& co
         }
         // Preselect tracks
         const bool passed_track_preselection =
-            (fabs(perigee->parameters()[Trk::d0]) < m_max_abs_d0) &&
-            (fabs(perigee->parameters()[Trk::z0]) < m_max_abs_z0) &&
+            (std::abs(perigee->parameters()[Trk::d0]) < m_max_abs_d0) &&
+            (std::abs(perigee->parameters()[Trk::z0]) < m_max_abs_z0) &&
             (perigee->pT() > min_pt_new) &&
             (p > m_minP) &&
-            (fabs(perigee->eta()) < m_max_abs_eta) &&
+            (std::abs(perigee->eta()) < m_max_abs_eta) &&
             (n_pixel_hits >= m_min_pixel_hits) &&
             (n_sct_hits >= m_min_sct_hits) &&
             (n_trt_hits >= m_min_trt_hits);
@@ -1867,7 +1867,7 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTEfficiency(const TrackCollection& co
                 }
             }
 
-            if (fabs(locR) >= 1.3) continue;
+            if (std::abs(locR) >= 1.3) continue;
 
             int thisStrawNumber = 0;
             int chip = 0;
@@ -1979,7 +1979,7 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTEfficiency(const TrackCollection& co
                         }
                     }
 
-                    if (fabs(locR) >= 1.3) continue;
+                    if (std::abs(locR) >= 1.3) continue;
 
                     int thisStrawNumber = 0;
                     int chip = 0;
@@ -2117,7 +2117,7 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol
     auto p_trk = trackCollection.begin();
 
     const Trk::Perigee *mPer = nullptr;
-    const DataVector<const Trk::TrackParameters> *AllTrkPar(0);
+    const DataVector<const Trk::TrackParameters> *AllTrkPar(nullptr);
     DataVector<const Trk::TrackParameters>::const_iterator p_trkpariter;
 
     int ntrackstack[2][64];
@@ -2146,7 +2146,7 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol
         if (!mPer) continue;
 
         float theta   =  mPer->parameters()[Trk::theta];
-        float p       =  (mPer->parameters()[Trk::qOverP] != 0.) ? fabs(1. / (mPer->parameters()[Trk::qOverP])) : 10e7;
+        float p       =  (mPer->parameters()[Trk::qOverP] != 0.) ? std::abs(1. / (mPer->parameters()[Trk::qOverP])) : 10e7;
         float pT      =  (p * sin(theta));
         pT = pT * 1e-3;  // GeV
 
@@ -2154,7 +2154,7 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol
 
         const DataVector<const Trk::TrackStateOnSurface> *trackStates = (**p_trk).trackStateOnSurfaces();
 
-        if (trackStates == 0) continue;
+        if (trackStates == nullptr) continue;
 
         DataVector<const Trk::TrackStateOnSurface>::const_iterator TSOSItBegin0    = trackStates->begin();
         DataVector<const Trk::TrackStateOnSurface>::const_iterator TSOSItBegin     = trackStates->begin();
@@ -2220,7 +2220,7 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol
         float phi2D[2] = {-100, -100};
 
         for (TSOSItBeginTemp = TSOSItBegin0; TSOSItBeginTemp != TSOSItEnd; ++TSOSItBeginTemp) {
-            if ((*TSOSItBeginTemp) == 0) continue;
+            if ((*TSOSItBeginTemp) == nullptr) continue;
 
             if (! ((*TSOSItBeginTemp)->type(Trk::TrackStateOnSurface::Measurement)) ) continue;
             const InDet::TRT_DriftCircleOnTrack *trtCircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack *>((*TSOSItBeginTemp)->measurementOnTrack());
@@ -2274,7 +2274,7 @@ StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits(const TrackCollection& trackCol
 
         for (TSOSItBegin = TSOSItBegin0; TSOSItBegin != TSOSItEnd; ++TSOSItBegin) {
             // Select a TSOS which is non-empty, measurement type and contains both drift circle and track parameters informations
-            if ((*TSOSItBegin) == 0) continue;
+            if ((*TSOSItBegin) == nullptr) continue;
 
             if ( !((*TSOSItBegin)->type(Trk::TrackStateOnSurface::Measurement)) ) continue;
 
diff --git a/InnerDetector/InDetRawEvent/InDetSimData/InDetSimData/InDetSimData.h b/InnerDetector/InDetRawEvent/InDetSimData/InDetSimData/InDetSimData.h
index f53a25d95b2e..2d40d9523f35 100755
--- a/InnerDetector/InDetRawEvent/InDetSimData/InDetSimData/InDetSimData.h
+++ b/InnerDetector/InDetRawEvent/InDetSimData/InDetSimData/InDetSimData.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
 */
 
 /***************************************************************************
@@ -52,7 +52,7 @@ public:
     InDetSimData (std::vector< Deposit >&& deposits, int simDataWord = 0);
     InDetSimData (const InDetSimData& other);
     InDetSimData &operator=(const InDetSimData& other);
-    InDetSimData &operator=(InDetSimData&& other);
+    InDetSimData &operator=(InDetSimData&& other) noexcept;
     virtual ~InDetSimData();
     int word() const;                           // Get the packed simdata word
     void deposits(std::vector<Deposit>& deposits) const; // Get the Deposits
diff --git a/InnerDetector/InDetRawEvent/InDetSimData/src/InDetSimData.cxx b/InnerDetector/InDetRawEvent/InDetSimData/src/InDetSimData.cxx
index 18ae80461e9b..345a7a48cac5 100755
--- a/InnerDetector/InDetRawEvent/InDetSimData/src/InDetSimData.cxx
+++ b/InnerDetector/InDetRawEvent/InDetSimData/src/InDetSimData.cxx
@@ -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
 */
 
 /***************************************************************************
@@ -66,8 +66,7 @@ InDetSimData &InDetSimData::operator=(const InDetSimData& other)
   return *this;
 }
 
-InDetSimData &InDetSimData::operator=(InDetSimData&& other)
-{
+InDetSimData &InDetSimData::operator=(InDetSimData&& other) noexcept {
   if(&other != this) 
     { 
       m_word=other.m_word;
diff --git a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/InDetLowBetaFinder/TrtToolsBetaLiklihood.h b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/InDetLowBetaFinder/TrtToolsBetaLiklihood.h
index 3b251f7ef3f4..aaf0486199bd 100644
--- a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/InDetLowBetaFinder/TrtToolsBetaLiklihood.h
+++ b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/InDetLowBetaFinder/TrtToolsBetaLiklihood.h
@@ -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
 */
 
 #ifndef TRTCHAMP_H
@@ -79,7 +79,7 @@ public:
                    std::vector<float> TrackZ, float RecPt, float RecEta, std::vector<int> TRT_isTube);
   float TRT_CorrectFEbeta(float beta, float eta);                                                                 //applies bias correction to extracted FE beta.  
 
-  void TRT_LoadPriors(std::string priorFileName);                                                                 //loads priors, LBitTemplates.root in the run dir
+  void TRT_LoadPriors(const std::string& priorFileName);                                                                 //loads priors, LBitTemplates.root in the run dir
   
   // Load the default prior values
   int TRT_LoadDefaultPriors();
diff --git a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx
index ff96cba289ca..e376e683496c 100644
--- a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ////////////////////////////////////////////////////////////////////
@@ -32,8 +32,8 @@ namespace InDet
 
   LowBetaAlg::LowBetaAlg(const std::string& name, ISvcLocator* pSvcLocator) :
     AthAlgorithm(name, pSvcLocator),
-    m_trtId(0),
-    m_TRTdetMgr(0),
+    m_trtId(nullptr),
+    m_TRTdetMgr(nullptr),
     m_minTRThits(5),
     m_RcorrZero(11.0),
     m_RcorrOne(-3.0),
@@ -43,7 +43,7 @@ namespace InDet
     m_trackParticleCollection("InDetTrackParticles"),
     m_InDetLowBetaOutputName("InDetLowBetaCandidates"),
     m_trtconddbTool("TRT_CalDbTool",this),
-    m_TrtTool(0),
+    m_TrtTool(nullptr),
     m_TRTdEdxTool(),
     m_TrtToolsSuccess{},
     m_TrtToolInitSuccess{}
@@ -87,7 +87,7 @@ namespace InDet
       return StatusCode::FAILURE;
     }
 
-    EventContext ctx = Gaudi::Hive::currentContext();
+    const EventContext& ctx = Gaudi::Hive::currentContext();
     SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey, ctx};
     const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
     if (fieldCondObj == nullptr) {
@@ -244,7 +244,7 @@ namespace InDet
     }
 
     // output vector for the algorithms
-    typedef std::vector<float> CSMP_ind;
+    using CSMP_ind = std::vector<float>;
     CSMP_ind Discriminators;
 
     double pTrk = 0.0;
@@ -270,7 +270,7 @@ namespace InDet
       ATH_MSG_DEBUG( " Track momentum infinite! (i.e. q/p = 0) " );
       return Discriminators; // to allow RVO
     }
-    else pTrk = fabs(1.0 / qOverP);
+    else pTrk = std::abs(1.0 / qOverP);
     double trk_pt = pTrk*sin(theta);
     
 
@@ -349,7 +349,7 @@ namespace InDet
 	    double trackR = sqrt(trackx*trackx + tracky*tracky);
 
 	    double chordlength=sqrt(trackx*trackx+tracky*tracky+(trackz-trk_z0)*(trackz-trk_z0));
-	    double Rmom=fabs(trk_pt)*510.0/340;  // ( mm and MeV)
+	    double Rmom=std::abs(trk_pt)*510.0/340;  // ( mm and MeV)
 	    //double trackfullhalfangle=asin(1050.0/(2.0*Rmom));
 	    //double maxtrack=2*trackfullhalfangle*Rmom;
 	    //if(Rmom < 1050.0/2.0)maxtrack=3.1425*Rmom;
@@ -434,7 +434,7 @@ namespace InDet
 	      TOT = (TE_bit - LE_bit)+1;
 	      if(NHTbits > 0) HighThresholdHits++;
 	      HighTbits += NHTbits;
-	      double f_TrkAnodeDist = fabs(TrkAnodeDist);
+	      double f_TrkAnodeDist = std::abs(TrkAnodeDist);
 
 	      trailingbittime = double(TE_bit)*3.125-t0+m_TimingOffset;
 
@@ -480,8 +480,8 @@ namespace InDet
 	      //float sinth =  1./cosh(eta);
 	      //float costh = tanh(eta);
 	      //if (costh ==0) costh = 0.0001;
-	      if((bec!=1 && bec!=-1)&&fabs(eta)<0.7) Valid = false; //0.7
-	      if((bec==1 || bec ==-1)&&fabs(eta)>1.1) Valid = false;  //0.7
+	      if((bec!=1 && bec!=-1)&&std::abs(eta)<0.7) Valid = false; //0.7
+	      if((bec==1 || bec ==-1)&&std::abs(eta)>1.1) Valid = false;  //0.7
 	      
 	      float Rdrift =  TrkAnodeDist;
 	      float Rtrack = Rdrift;
@@ -491,14 +491,14 @@ namespace InDet
 	      // Add the cut on holes (from HO)
 	      if( Ttbit-Ltbit+1 != NLTbits)Valid = false;
 
-	      if ( (fabs(Rdrift)>0) && Valid && (trtdistance > 0.0)) {//rdrift condition
+	      if ( (std::abs(Rdrift)>0) && Valid && (trtdistance > 0.0)) {//rdrift condition
 		
 		//float length, projlength;
 		//float projlength;
 		//projlength = sqrt(4.- Rtrack*Rtrack);
 		
 		//if (bec == 1 || bec == -1) length = projlength/sinth; // track path length in a straw
-		//if (bec == 2 || bec == -2) length = fabs( projlength/costh); // track path length in a straw
+		//if (bec == 2 || bec == -2) length = std::abs( projlength/costh); // track path length in a straw
 		
 		hont += 1;  // #hits on track
 		
@@ -527,63 +527,63 @@ namespace InDet
 				
 		//  ========Barrel DATA ToTal=================================================
 		if (m_mcswitch ==0 &&(bec==1 || bec==-1)) {
-		  if (fabs(eta)<.1 && fabs(eta)>0.0) TGap = gap/((.00488801*pow(fabs(Rtrack),7.96055)-2.34833*pow(fabs(Rtrack),1.72825)+7.54480));
-		  if (fabs(eta)<.2 && fabs(eta)>0.1) TGap = gap/((.00670660*pow(fabs(Rtrack),7.50896)-2.34480*pow(fabs(Rtrack),1.73470)+7.52650));
-		  if (fabs(eta)<.3 && fabs(eta)>0.2) TGap = gap/((.00881969*pow(fabs(Rtrack),7.09242)-2.36686*pow(fabs(Rtrack),1.72337)+7.52207));
-		  if (fabs(eta)<.4 && fabs(eta)>0.3) TGap = gap/((.0131694*pow(fabs(Rtrack),6.59031)-2.39547*pow(fabs(Rtrack),1.72373)+7.52161));
-		  if (fabs(eta)<.5 && fabs(eta)>0.4) TGap = gap/((.0236602*pow(fabs(Rtrack),5.87639)-2.43456*pow(fabs(Rtrack),1.72005)+7.48029));
-		  if (fabs(eta)<.6 && fabs(eta)>0.5) TGap = gap/((.0547144*pow(fabs(Rtrack),4.99237)-2.47208*pow(fabs(Rtrack),1.74454)+7.36295));
-		  if (fabs(eta)<.7 && fabs(eta)>0.6) TGap = gap/((.0723406*pow(fabs(Rtrack),4.76311)-2.47704*pow(fabs(Rtrack),1.74222)+7.14952));
-		  if (fabs(eta)<.8 && fabs(eta)>0.7) TGap = gap/((.137036*pow(fabs(Rtrack),4.23644)-2.48428*pow(fabs(Rtrack),1.79610)+6.85699));
-		  if (fabs(eta)<.9 && fabs(eta)>0.8) TGap = gap/((.285357*pow(fabs(Rtrack),3.71480)-2.56711*pow(fabs(Rtrack),1.87888)+6.50990));
-		  if (fabs(eta)<1. && fabs(eta)>0.9) TGap = gap/((.241327*pow(fabs(Rtrack),3.91980)-2.43298*pow(fabs(Rtrack),1.87156)+6.08410));
-		  if (fabs(eta)<1.1 && fabs(eta)>1.) TGap = gap/((.442936*pow(fabs(Rtrack),3.59687)-2.60530*pow(fabs(Rtrack),1.98021)+5.78001));
+		  if (std::abs(eta)<.1 && std::abs(eta)>0.0) TGap = gap/((.00488801*pow(std::abs(Rtrack),7.96055)-2.34833*pow(std::abs(Rtrack),1.72825)+7.54480));
+		  if (std::abs(eta)<.2 && std::abs(eta)>0.1) TGap = gap/((.00670660*pow(std::abs(Rtrack),7.50896)-2.34480*pow(std::abs(Rtrack),1.73470)+7.52650));
+		  if (std::abs(eta)<.3 && std::abs(eta)>0.2) TGap = gap/((.00881969*pow(std::abs(Rtrack),7.09242)-2.36686*pow(std::abs(Rtrack),1.72337)+7.52207));
+		  if (std::abs(eta)<.4 && std::abs(eta)>0.3) TGap = gap/((.0131694*pow(std::abs(Rtrack),6.59031)-2.39547*pow(std::abs(Rtrack),1.72373)+7.52161));
+		  if (std::abs(eta)<.5 && std::abs(eta)>0.4) TGap = gap/((.0236602*pow(std::abs(Rtrack),5.87639)-2.43456*pow(std::abs(Rtrack),1.72005)+7.48029));
+		  if (std::abs(eta)<.6 && std::abs(eta)>0.5) TGap = gap/((.0547144*pow(std::abs(Rtrack),4.99237)-2.47208*pow(std::abs(Rtrack),1.74454)+7.36295));
+		  if (std::abs(eta)<.7 && std::abs(eta)>0.6) TGap = gap/((.0723406*pow(std::abs(Rtrack),4.76311)-2.47704*pow(std::abs(Rtrack),1.74222)+7.14952));
+		  if (std::abs(eta)<.8 && std::abs(eta)>0.7) TGap = gap/((.137036*pow(std::abs(Rtrack),4.23644)-2.48428*pow(std::abs(Rtrack),1.79610)+6.85699));
+		  if (std::abs(eta)<.9 && std::abs(eta)>0.8) TGap = gap/((.285357*pow(std::abs(Rtrack),3.71480)-2.56711*pow(std::abs(Rtrack),1.87888)+6.50990));
+		  if (std::abs(eta)<1. && std::abs(eta)>0.9) TGap = gap/((.241327*pow(std::abs(Rtrack),3.91980)-2.43298*pow(std::abs(Rtrack),1.87156)+6.08410));
+		  if (std::abs(eta)<1.1 && std::abs(eta)>1.) TGap = gap/((.442936*pow(std::abs(Rtrack),3.59687)-2.60530*pow(std::abs(Rtrack),1.98021)+5.78001));
 		}
 		//=========Barrel MC Total===============================
 		if (m_mcswitch ==1 && (bec==1 || bec==-1)) {
-		  if(fabs(eta)<.1 && fabs(eta)>0.0) TGap = gap/((.00000123128*pow(fabs(Rtrack),19.3147)-1.06782*pow(fabs(Rtrack),2.29312)+5.62686));
-		  if (fabs(eta)<.2 && fabs(eta)>0.1) TGap = gap/((.00000170888*pow(fabs(Rtrack),18.8841)-1.07002*pow(fabs(Rtrack),2.29326)+5.60175));
-		  if (fabs(eta)<.3 && fabs(eta)>0.2) TGap = gap/((.000000918115*pow(fabs(Rtrack),19.7785)-1.09601*pow(fabs(Rtrack),2.25662)+5.68679));
-		  if (fabs(eta)<.4 && fabs(eta)>0.3) TGap = gap/((.00000142286*pow(fabs(Rtrack),19.1558)-1.09694*pow(fabs(Rtrack),2.24469)+5.50375));
-		  if (fabs(eta)<.5 && fabs(eta)>0.4) TGap = gap/((.00000483637*pow(fabs(Rtrack),17.5425)-1.09179*pow(fabs(Rtrack),2.25701)+5.39363));
-		  if (fabs(eta)<.6 && fabs(eta)>0.5) TGap = gap/((.0000114224*pow(fabs(Rtrack),16.3431)-1.09874*pow(fabs(Rtrack),2.23981)+5.28368));
-		  if (fabs(eta)<.7 && fabs(eta)>0.6) TGap = gap/((.0000101658*pow(fabs(Rtrack),16.5468)-1.07799*pow(fabs(Rtrack),2.24312)+5.13952));
-		  if (fabs(eta)<.8 && fabs(eta)>0.7) TGap = gap/((.0000109867*pow(fabs(Rtrack),16.4814)-1.00968*pow(fabs(Rtrack),2.29445)+4.95406));
-		  if (fabs(eta)<.9 && fabs(eta)>0.8) TGap = gap/((.00000887578*pow(fabs(Rtrack),16.8073)-.945814*pow(fabs(Rtrack),2.32505)+4.76174));
-		  if (fabs(eta)<1. && fabs(eta)>0.9) TGap = gap/((.0000721159*pow(fabs(Rtrack),13.8838)-.794514*pow(fabs(Rtrack),2.52852)+4.48742));
-		  if (fabs(eta)<1.1 && fabs(eta)>1.) TGap = gap/((-.00147754*pow(fabs(Rtrack),2.05287)-.949485*pow(fabs(Rtrack),2.05281)+4.40570));
+		  if(std::abs(eta)<.1 && std::abs(eta)>0.0) TGap = gap/((.00000123128*pow(std::abs(Rtrack),19.3147)-1.06782*pow(std::abs(Rtrack),2.29312)+5.62686));
+		  if (std::abs(eta)<.2 && std::abs(eta)>0.1) TGap = gap/((.00000170888*pow(std::abs(Rtrack),18.8841)-1.07002*pow(std::abs(Rtrack),2.29326)+5.60175));
+		  if (std::abs(eta)<.3 && std::abs(eta)>0.2) TGap = gap/((.000000918115*pow(std::abs(Rtrack),19.7785)-1.09601*pow(std::abs(Rtrack),2.25662)+5.68679));
+		  if (std::abs(eta)<.4 && std::abs(eta)>0.3) TGap = gap/((.00000142286*pow(std::abs(Rtrack),19.1558)-1.09694*pow(std::abs(Rtrack),2.24469)+5.50375));
+		  if (std::abs(eta)<.5 && std::abs(eta)>0.4) TGap = gap/((.00000483637*pow(std::abs(Rtrack),17.5425)-1.09179*pow(std::abs(Rtrack),2.25701)+5.39363));
+		  if (std::abs(eta)<.6 && std::abs(eta)>0.5) TGap = gap/((.0000114224*pow(std::abs(Rtrack),16.3431)-1.09874*pow(std::abs(Rtrack),2.23981)+5.28368));
+		  if (std::abs(eta)<.7 && std::abs(eta)>0.6) TGap = gap/((.0000101658*pow(std::abs(Rtrack),16.5468)-1.07799*pow(std::abs(Rtrack),2.24312)+5.13952));
+		  if (std::abs(eta)<.8 && std::abs(eta)>0.7) TGap = gap/((.0000109867*pow(std::abs(Rtrack),16.4814)-1.00968*pow(std::abs(Rtrack),2.29445)+4.95406));
+		  if (std::abs(eta)<.9 && std::abs(eta)>0.8) TGap = gap/((.00000887578*pow(std::abs(Rtrack),16.8073)-.945814*pow(std::abs(Rtrack),2.32505)+4.76174));
+		  if (std::abs(eta)<1. && std::abs(eta)>0.9) TGap = gap/((.0000721159*pow(std::abs(Rtrack),13.8838)-.794514*pow(std::abs(Rtrack),2.52852)+4.48742));
+		  if (std::abs(eta)<1.1 && std::abs(eta)>1.) TGap = gap/((-.00147754*pow(std::abs(Rtrack),2.05287)-.949485*pow(std::abs(Rtrack),2.05281)+4.40570));
 		}
 		//============ENDCAP DATA===========================================
 		if (m_mcswitch==0 &&(bec!=1 && bec!=-1)){
-		  if (fabs(eta)<0.9 && fabs(eta)>0.8) TGap = gap/((.280989*pow(fabs(Rtrack),3.78618)-2.52785*pow(fabs(Rtrack),1.98014)+8.22240));
-		  if (fabs(eta)<1.0 && fabs(eta)>0.9) TGap = gap/((.0848913*pow(fabs(Rtrack),4.73693)-2.38324*pow(fabs(Rtrack),1.83445)+8.41772));
-		  if (fabs(eta)<1.1 && fabs(eta)>1.0) TGap = gap/((.0709059*pow(fabs(Rtrack),4.86962)-2.41818*pow(fabs(Rtrack),1.80467)+8.58839));
-		  if (fabs(eta)<1.2 && fabs(eta)>1.1) TGap = gap/((.0543339*pow(fabs(Rtrack),5.10085)-2.41581*pow(fabs(Rtrack),1.78433)+8.69492));
-		  if (fabs(eta)<1.3 && fabs(eta)>1.2) TGap = gap/((.0304298*pow(fabs(Rtrack),5.72427)-2.41395*pow(fabs(Rtrack),1.74796)+8.79894));
-		  if (fabs(eta)<1.4 && fabs(eta)>1.3) TGap = gap/((.0427503*pow(fabs(Rtrack),5.35505)-2.42229*pow(fabs(Rtrack),1.77298)+8.85050));
-		  if (fabs(eta)<1.5 && fabs(eta)>1.4) TGap = gap/((.0281426*pow(fabs(Rtrack),5.80661)-2.40467*pow(fabs(Rtrack),1.74990)+8.88722));
-		  if (fabs(eta)<1.6 && fabs(eta)>1.5) TGap = gap/((.0300813*pow(fabs(Rtrack),5.72420)-2.39001*pow(fabs(Rtrack),1.75507)+8.89574));
-		  if (fabs(eta)<1.7 && fabs(eta)>1.6) TGap = gap/((.0217449*pow(fabs(Rtrack),5.96287)-2.38264*pow(fabs(Rtrack),1.70580)+8.89384));
-		  if (fabs(eta)<1.8 && fabs(eta)>1.7) TGap = gap/((.0153687*pow(fabs(Rtrack),6.24080)-2.36323*pow(fabs(Rtrack),1.67239)+8.91872));
-		  if (fabs(eta)<1.9 && fabs(eta)>1.8) TGap = gap/((.0111157*pow(fabs(Rtrack),6.57710)-2.32227*pow(fabs(Rtrack),1.65943)+8.94240));
-		  if (fabs(eta)<2.0 && fabs(eta)>1.9) TGap = gap/((.00890940*pow(fabs(Rtrack),6.86340)-2.26815*pow(fabs(Rtrack),1.65027)+8.90461));
+		  if (std::abs(eta)<0.9 && std::abs(eta)>0.8) TGap = gap/((.280989*pow(std::abs(Rtrack),3.78618)-2.52785*pow(std::abs(Rtrack),1.98014)+8.22240));
+		  if (std::abs(eta)<1.0 && std::abs(eta)>0.9) TGap = gap/((.0848913*pow(std::abs(Rtrack),4.73693)-2.38324*pow(std::abs(Rtrack),1.83445)+8.41772));
+		  if (std::abs(eta)<1.1 && std::abs(eta)>1.0) TGap = gap/((.0709059*pow(std::abs(Rtrack),4.86962)-2.41818*pow(std::abs(Rtrack),1.80467)+8.58839));
+		  if (std::abs(eta)<1.2 && std::abs(eta)>1.1) TGap = gap/((.0543339*pow(std::abs(Rtrack),5.10085)-2.41581*pow(std::abs(Rtrack),1.78433)+8.69492));
+		  if (std::abs(eta)<1.3 && std::abs(eta)>1.2) TGap = gap/((.0304298*pow(std::abs(Rtrack),5.72427)-2.41395*pow(std::abs(Rtrack),1.74796)+8.79894));
+		  if (std::abs(eta)<1.4 && std::abs(eta)>1.3) TGap = gap/((.0427503*pow(std::abs(Rtrack),5.35505)-2.42229*pow(std::abs(Rtrack),1.77298)+8.85050));
+		  if (std::abs(eta)<1.5 && std::abs(eta)>1.4) TGap = gap/((.0281426*pow(std::abs(Rtrack),5.80661)-2.40467*pow(std::abs(Rtrack),1.74990)+8.88722));
+		  if (std::abs(eta)<1.6 && std::abs(eta)>1.5) TGap = gap/((.0300813*pow(std::abs(Rtrack),5.72420)-2.39001*pow(std::abs(Rtrack),1.75507)+8.89574));
+		  if (std::abs(eta)<1.7 && std::abs(eta)>1.6) TGap = gap/((.0217449*pow(std::abs(Rtrack),5.96287)-2.38264*pow(std::abs(Rtrack),1.70580)+8.89384));
+		  if (std::abs(eta)<1.8 && std::abs(eta)>1.7) TGap = gap/((.0153687*pow(std::abs(Rtrack),6.24080)-2.36323*pow(std::abs(Rtrack),1.67239)+8.91872));
+		  if (std::abs(eta)<1.9 && std::abs(eta)>1.8) TGap = gap/((.0111157*pow(std::abs(Rtrack),6.57710)-2.32227*pow(std::abs(Rtrack),1.65943)+8.94240));
+		  if (std::abs(eta)<2.0 && std::abs(eta)>1.9) TGap = gap/((.00890940*pow(std::abs(Rtrack),6.86340)-2.26815*pow(std::abs(Rtrack),1.65027)+8.90461));
 		}
 		//========ENDCAP MC===============================
 		if (m_mcswitch ==1 && (bec!=1 && bec!=-1)) {
-		  if (fabs(eta)<0.9 && fabs(eta)>0.8) TGap = gap/((.00000282950*pow(fabs(Rtrack),18.3737)-1.05569*pow(fabs(Rtrack),2.27545)+5.97535));
-		  if (fabs(eta)<1.0 && fabs(eta)>0.9) TGap = gap/((.00000719904*pow(fabs(Rtrack),16.9277)-1.13237*pow(fabs(Rtrack),2.25351)+6.25901));
-		  if (fabs(eta)<1.1 && fabs(eta)>1.0) TGap = gap/((.00000180076*pow(fabs(Rtrack),18.7808)-1.23004*pow(fabs(Rtrack),2.17603)+6.51411));
-		  if (fabs(eta)<1.2 && fabs(eta)>1.1) TGap = gap/((.000000652098*pow(fabs(Rtrack),20.1089)-1.32235*pow(fabs(Rtrack),2.11510)+6.74394));
-		  if (fabs(eta)<1.3 && fabs(eta)>1.2) TGap = gap/((.000000158218*pow(fabs(Rtrack),22.0124)-1.41428*pow(fabs(Rtrack),2.04860)+6.95308));
-		  if (fabs(eta)<1.4 && fabs(eta)>1.3) TGap = gap/((.0000000495484*pow(fabs(Rtrack),23.5834)-1.47129*pow(fabs(Rtrack),2.01003)+7.11830));
-		  if (fabs(eta)<1.5 && fabs(eta)>1.4) TGap = gap/((.000000393189*pow(fabs(Rtrack),20.5908)-1.51725*pow(fabs(Rtrack),1.98343)+7.25927));
-		  if (fabs(eta)<1.6 && fabs(eta)>1.5) TGap = gap/((.000000345984*pow(fabs(Rtrack),20.9028)-1.53850*pow(fabs(Rtrack),1.96704)+7.34837));
-		  if (fabs(eta)<1.7 && fabs(eta)>1.6) TGap = gap/((.000000777268*pow(fabs(Rtrack),19.7132)-1.54808*pow(fabs(Rtrack),1.93878)+7.37986));
-		  if (fabs(eta)<1.8 && fabs(eta)>1.7) TGap = gap/((.000000314758*pow(fabs(Rtrack),20.9848)-1.54640*pow(fabs(Rtrack),1.91034)+7.40800));
-		  if (fabs(eta)<1.9 && fabs(eta)>1.8) TGap = gap/((.000000850534*pow(fabs(Rtrack),19.6195)-1.52880*pow(fabs(Rtrack),1.90915)+7.43214));
-		  if (fabs(eta)<2.0 && fabs(eta)>1.9) TGap = gap/((.00000245275*pow(fabs(Rtrack),18.1615)-1.49520*pow(fabs(Rtrack),1.92057)+7.42649));
-		  if (fabs(eta)<2.1 && fabs(eta)>2.0) TGap = gap/((.0000271320*pow(fabs(Rtrack),14.8130)-1.50875*pow(fabs(Rtrack),1.90915)+7.38428));
-		  if (fabs(eta)<2.2 && fabs(eta)>2.1) TGap = gap/((.0000687527*pow(fabs(Rtrack),17.5651)-.0315462*pow(fabs(Rtrack),8.53188)+4.39271));
+		  if (std::abs(eta)<0.9 && std::abs(eta)>0.8) TGap = gap/((.00000282950*pow(std::abs(Rtrack),18.3737)-1.05569*pow(std::abs(Rtrack),2.27545)+5.97535));
+		  if (std::abs(eta)<1.0 && std::abs(eta)>0.9) TGap = gap/((.00000719904*pow(std::abs(Rtrack),16.9277)-1.13237*pow(std::abs(Rtrack),2.25351)+6.25901));
+		  if (std::abs(eta)<1.1 && std::abs(eta)>1.0) TGap = gap/((.00000180076*pow(std::abs(Rtrack),18.7808)-1.23004*pow(std::abs(Rtrack),2.17603)+6.51411));
+		  if (std::abs(eta)<1.2 && std::abs(eta)>1.1) TGap = gap/((.000000652098*pow(std::abs(Rtrack),20.1089)-1.32235*pow(std::abs(Rtrack),2.11510)+6.74394));
+		  if (std::abs(eta)<1.3 && std::abs(eta)>1.2) TGap = gap/((.000000158218*pow(std::abs(Rtrack),22.0124)-1.41428*pow(std::abs(Rtrack),2.04860)+6.95308));
+		  if (std::abs(eta)<1.4 && std::abs(eta)>1.3) TGap = gap/((.0000000495484*pow(std::abs(Rtrack),23.5834)-1.47129*pow(std::abs(Rtrack),2.01003)+7.11830));
+		  if (std::abs(eta)<1.5 && std::abs(eta)>1.4) TGap = gap/((.000000393189*pow(std::abs(Rtrack),20.5908)-1.51725*pow(std::abs(Rtrack),1.98343)+7.25927));
+		  if (std::abs(eta)<1.6 && std::abs(eta)>1.5) TGap = gap/((.000000345984*pow(std::abs(Rtrack),20.9028)-1.53850*pow(std::abs(Rtrack),1.96704)+7.34837));
+		  if (std::abs(eta)<1.7 && std::abs(eta)>1.6) TGap = gap/((.000000777268*pow(std::abs(Rtrack),19.7132)-1.54808*pow(std::abs(Rtrack),1.93878)+7.37986));
+		  if (std::abs(eta)<1.8 && std::abs(eta)>1.7) TGap = gap/((.000000314758*pow(std::abs(Rtrack),20.9848)-1.54640*pow(std::abs(Rtrack),1.91034)+7.40800));
+		  if (std::abs(eta)<1.9 && std::abs(eta)>1.8) TGap = gap/((.000000850534*pow(std::abs(Rtrack),19.6195)-1.52880*pow(std::abs(Rtrack),1.90915)+7.43214));
+		  if (std::abs(eta)<2.0 && std::abs(eta)>1.9) TGap = gap/((.00000245275*pow(std::abs(Rtrack),18.1615)-1.49520*pow(std::abs(Rtrack),1.92057)+7.42649));
+		  if (std::abs(eta)<2.1 && std::abs(eta)>2.0) TGap = gap/((.0000271320*pow(std::abs(Rtrack),14.8130)-1.50875*pow(std::abs(Rtrack),1.90915)+7.38428));
+		  if (std::abs(eta)<2.2 && std::abs(eta)>2.1) TGap = gap/((.0000687527*pow(std::abs(Rtrack),17.5651)-.0315462*pow(std::abs(Rtrack),8.53188)+4.39271));
 		  //=============================================================================================
 		}
 		
diff --git a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaLiklihood.cxx b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaLiklihood.cxx
index e49c33ec4ca1..8fce2dcb2974 100644
--- a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaLiklihood.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaLiklihood.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 <iostream>
@@ -52,7 +52,7 @@ std::vector<float> TrtToolBetaLiklihood::TRT_FEbeta(std::vector<int> TRT_bitpatt
   int binht[3] = {0};
   double radius, arclength, arcrad;
 
-  EtaBin = floor((fabs(RecEta)-ETAMIN)/etadelta);
+  EtaBin = floor((std::abs(RecEta)-ETAMIN)/etadelta);
   if (EtaBin >= TrtToolBetaLiklihood::NETABINS)
     EtaBin = TrtToolBetaLiklihood::NETABINS-1;
 
@@ -72,7 +72,7 @@ std::vector<float> TrtToolBetaLiklihood::TRT_FEbeta(std::vector<int> TRT_bitpatt
     TrtToolBetaLiklihood::TRT_BitPattern(TRT_bitpattern.at(ihit), binlt, binht, hit);
 
     hit.t0 = TRT_t0.at(ihit);
-    hit.estDrift = fabs(TRT_estDrift.at(ihit)); 
+    hit.estDrift = std::abs(TRT_estDrift.at(ihit)); 
     hit.hitR = TRT_R.at(ihit);
     hit.fitR = TRT_R_track.at(ihit);
    
@@ -95,12 +95,12 @@ std::vector<float> TrtToolBetaLiklihood::TRT_FEbeta(std::vector<int> TRT_bitpatt
 
     // Calculate delta distance the direct and reflected signals travel, given their position in z or r along the wire
     if (hit.becIdx == 0) { // Barrel
-      hit.dlD = 71.2 - fabs(TrackZ.at(ihit))/10.;
+      hit.dlD = 71.2 - std::abs(TrackZ.at(ihit))/10.;
       // Inner wires have 80cm dead 
       if ((TRT_strawlayer.at(ihit) < 9) && (TRT_layer.at(ihit) == 0)) {
-        hit.dlR = fabs(TrackZ.at(ihit))/10. - 80.;
+        hit.dlR = std::abs(TrackZ.at(ihit))/10. - 80.;
       } else {
-        hit.dlR = fabs(TrackZ.at(ihit))/10.;
+        hit.dlR = std::abs(TrackZ.at(ihit))/10.;
       }
     } else { // End cap
       hit.dlD = 101. - radius;
@@ -134,14 +134,14 @@ std::vector<float> TrtToolBetaLiklihood::TRT_FEbeta(std::vector<int> TRT_bitpatt
 float TrtToolBetaLiklihood::TRT_CorrectFEbeta(float beta, float eta){
 
   float corrBeta = 0;
-  if(fabs(eta)<1.0) corrBeta = febBAR[0] + febBAR[1]*beta + febBAR[2]*pow(beta,2) + febBAR[3]*pow(beta,3) + febBAR[4]*pow(beta,4);
+  if(std::abs(eta)<1.0) corrBeta = febBAR[0] + febBAR[1]*beta + febBAR[2]*pow(beta,2) + febBAR[3]*pow(beta,3) + febBAR[4]*pow(beta,4);
   else corrBeta = febEC[0] + febEC[1]*beta + febEC[2]*pow(beta,2) + febEC[3]*pow(beta,3) + febEC[4]*pow(beta,4);
 
   return corrBeta;
 }
 
 void TrtToolBetaLiklihood::TRT_SelectFEhits(){
-  if ( !((hit.BoT == 1) || (hit.LBit==23 && hit.LGap>0) || (hit.LBit==22 && hit.LGap>0)) && fabs(hit.fitR)<RFEMAX && hit.nHT==0 && hit.FBit > 3 && hit.cxnFail==0 && hit.isTube==0) {
+  if ( !((hit.BoT == 1) || (hit.LBit==23 && hit.LGap>0) || (hit.LBit==22 && hit.LGap>0)) && std::abs(hit.fitR)<RFEMAX && hit.nHT==0 && hit.FBit > 3 && hit.cxnFail==0 && hit.isTube==0) {
     LBitA.push_back(hit.LBit);
     pathlenA.push_back(hit.pathlen);
     dlReflectA.push_back(hit.dlR);
@@ -292,7 +292,7 @@ void TRT_FEbeta_fcn ATLAS_NOT_THREAD_SAFE // Global variables are used without p
    for (i=0; i<n; i++) {
 
      // radius bin
-     RBin = floor((fabs(TrkRF.at(i))-TrtToolBetaLiklihood::RFEMIN)/TrtToolBetaLiklihood::raddelta);
+     RBin = floor((std::abs(TrkRF.at(i))-TrtToolBetaLiklihood::RFEMIN)/TrtToolBetaLiklihood::raddelta);
      if (RBin >= TrtToolBetaLiklihood::NRFEBINS) RBin = TrtToolBetaLiklihood::NRFEBINS-1;
 
      // Time shift due to beta
@@ -352,7 +352,7 @@ void TRT_FEbeta_fcn ATLAS_NOT_THREAD_SAFE // Global variables are used without p
 }
 
 void TRT_solveCubic(float DCrad, float &estDrift){
-  double a = TrtToolBetaLiklihood::RT3; double b = TrtToolBetaLiklihood::RT2; double c = TrtToolBetaLiklihood::RT1; double d = TrtToolBetaLiklihood::RT0 - fabs(DCrad);
+  double a = TrtToolBetaLiklihood::RT3; double b = TrtToolBetaLiklihood::RT2; double c = TrtToolBetaLiklihood::RT1; double d = TrtToolBetaLiklihood::RT0 - std::abs(DCrad);
   if (a == 0){
     //std::cout << " ERROR! " << std::endl;
   }
@@ -376,10 +376,10 @@ void TRT_solveCubic(float DCrad, float &estDrift){
   }
   else{
     double R = g/(-2.) + sqrt(h);
-    double S = pow(fabs(R),1./3.);
+    double S = pow(std::abs(R),1./3.);
     if(R<0) S = -1.*S;
     double T = g/(-2.) - sqrt(h);
-    double U = pow(fabs(T),1./3.);
+    double U = pow(std::abs(T),1./3.);
     if(T<0) U = -1.*U;
     t1r = S+U-b/3./a;
     t2r = -1.*(S+U)/2. - b/3./a;  //t2i = (S-U)*sqrt(3.)/2.;
@@ -430,7 +430,7 @@ void TrtToolBetaLiklihood::TRT_PropLenCorr(TrtToolBetaLiklihood::HIT hit, int *c
     
 }
 
-void TrtToolBetaLiklihood::TRT_LoadPriors(std::string priorFileName) {
+void TrtToolBetaLiklihood::TRT_LoadPriors(const std::string& priorFileName) {
 
   int i, j, k, l;
   char name[50];
@@ -495,7 +495,7 @@ void TrtToolBetaLiklihood::TRT_FillPriors(std::vector<int> TRT_bitpattern, std::
   int binht[3] = {0};
   double radius, arclength, arcrad;
       
-  EtaBin = floor((fabs(RecEta)-ETAMIN)/etadelta); 
+  EtaBin = floor((std::abs(RecEta)-ETAMIN)/etadelta); 
   if (EtaBin >= TrtToolBetaLiklihood::NETABINS)
     EtaBin = TrtToolBetaLiklihood::NETABINS-1;
         
@@ -526,12 +526,12 @@ void TrtToolBetaLiklihood::TRT_FillPriors(std::vector<int> TRT_bitpattern, std::
 
     // Calculate delta distance the direct and reflected signals travel, given their position in z or r along the wire
     if (hit.becIdx == 0) { // Barrel
-      hit.dlD = 71.2 - fabs(TrackZ.at(ihit))/10.;
+      hit.dlD = 71.2 - std::abs(TrackZ.at(ihit))/10.;
       // Inner wires have 80cm dead
       if ((TRT_strawlayer.at(ihit) < 9) && (TRT_layer.at(ihit) == 0)) {
-        hit.dlR = fabs(TrackZ.at(ihit))/10. - 80.;
+        hit.dlR = std::abs(TrackZ.at(ihit))/10. - 80.;
       } else {
-        hit.dlR = fabs(TrackZ.at(ihit))/10.;
+        hit.dlR = std::abs(TrackZ.at(ihit))/10.;
       }
     } else { // End cap
       hit.dlD = 101. - radius;
@@ -552,12 +552,12 @@ void TrtToolBetaLiklihood::TRT_FillPriors(std::vector<int> TRT_bitpattern, std::
 void TrtToolBetaLiklihood::TRT_SelectFEpriors(TrtToolBetaLiklihood::HIT hit, int *corrLBits, float *corrLBitWeight){
 
   //where is this hit in the r-binning?
-  int Rbin = floor((fabs(hit.fitR)-RFEMIN)/TrtToolBetaLiklihood::raddelta);
+  int Rbin = floor((std::abs(hit.fitR)-RFEMIN)/TrtToolBetaLiklihood::raddelta);
   if (Rbin >= NRFEBINS) Rbin = NRFEBINS - 1;
 
   // Select Hits for Falling edge fit
   if (hit.FBit > 3) {
-    if ( !((hit.BoT == 1) || (hit.LBit==23 && hit.LGap>0) || (hit.LBit==22 && hit.LGap>0)) && fabs(hit.fitR)<RFEMAX && hit.nHT==0) {
+    if ( !((hit.BoT == 1) || (hit.LBit==23 && hit.LGap>0) || (hit.LBit==22 && hit.LGap>0)) && std::abs(hit.fitR)<RFEMAX && hit.nHT==0) {
       //if (nSCTHits>0) {  //this is weird, do track selection cuts outside the hit loop BM
         for (int i=0; i<2; i++) {
           LBitvsEta[Rbin][EtaBin][hit.becIdx]->Fill(corrLBits[i], corrLBitWeight[i]);
diff --git a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaWrapper.cxx b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaWrapper.cxx
index ad7cdebaf596..cb776e6156a2 100644
--- a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaWrapper.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaWrapper.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 "InDetLowBetaFinder/LowBetaAlg.h"
@@ -70,7 +70,7 @@ StatusCode InDet::LowBetaAlg::update(IOVSVC_CALLBACK_ARGS_P(I,keys))
 {
 	const bool doDebug = false;	// set to true to print to file below
 	const char* DEBUGFILE_C = "/afs/cern.ch/user/w/wmills/testarea/16.0.2/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/run/debugPriors.out";
-	FILE* dFile = NULL;
+	FILE* dFile = nullptr;
 	
 	ATH_MSG_INFO("Updating priors for the LowBetaAlg likelihood beta estimator");
 	
@@ -81,7 +81,7 @@ StatusCode InDet::LowBetaAlg::update(IOVSVC_CALLBACK_ARGS_P(I,keys))
 	// Read the priors
 	const CondAttrListCollection* collection;
 	StatusCode SC = detStore()->retrieve(collection, "/TRT/Calib/MLbetaPriors");
-	if (SC.isFailure() || collection == 0)
+	if (SC.isFailure() || collection == nullptr)
 	{
 	  ATH_MSG_ERROR("A problem occurred while reading a conditions database object.");
 	  return StatusCode::FAILURE;
@@ -97,7 +97,7 @@ StatusCode InDet::LowBetaAlg::update(IOVSVC_CALLBACK_ARGS_P(I,keys))
 	    // If debugging, open the output file and print the header
 	    if (doDebug)
 	      dFile = fopen(DEBUGFILE_C,"w");
-	    if (dFile != NULL)
+	    if (dFile != nullptr)
 	      fprintf(dFile,"#####\n##### prior[etaIndex][barrelOrEndcap][radiusIndex]\n#####\n\n");
 	    
 	    int channel;
@@ -165,21 +165,21 @@ StatusCode InDet::LowBetaAlg::update(IOVSVC_CALLBACK_ARGS_P(I,keys))
 	          sprintf(name,"TRT_bit_%d",i);
 	          bitValues[i] = list[name].data<double>();
 	          // If debug, print to file
-	          if (dFile != NULL)
+	          if (dFile != nullptr)
 	            fprintf(dFile,"prior[%d][%d][%d][TRT_bit_%d] = %10f\n",etaIndex,barrelOrEndcap,radiusIndex,i,list[name].data<double>());
 	        }
 	        // If debug, print a new line to file
-	        if (dFile != NULL)
+	        if (dFile != nullptr)
 	          fprintf(dFile,"\n");
 	        
 	        m_TrtTool->TRT_UpdatePriorValues(radiusIndex,etaIndex,barrelOrEndcap,bitValues);
 	        free(bitValues);
 	      }
-	      else if (dFile != NULL) // If debug, print a warning line to file
+	      else if (dFile != nullptr) // If debug, print a warning line to file
 	        fprintf(dFile,"Unexpected result!  Got channel of %d (eta=%d,BoE=%d,rad=%d)\n\n",channel,etaIndex,barrelOrEndcap,radiusIndex);
 	      
 	      // If debug, close the file, as we're done now
-	      if (dFile != NULL)
+	      if (dFile != nullptr)
 	        fclose(dFile);
 	    }
 	  }
@@ -347,7 +347,7 @@ StatusCode InDet::LowBetaAlg::parseDataForTrtToolBetaLiklihood(const Trk::Track&
 	  ATH_MSG_DEBUG("TrtToolBetaLiklihood aborting due to momentum value (q/p == 0)");
 	  return StatusCode::FAILURE;
 	}
-	double pt  = fabs(1.0/qOverP)*sin(theta);
+	double pt  = std::abs(1.0/qOverP)*sin(theta);
 	
 	// Set pt and eta
 	*RecPt  = pt;
@@ -455,7 +455,7 @@ StatusCode InDet::LowBetaAlg::parseDataForTrtToolBetaLiklihood(const Trk::Track&
 		  //std::cout << "break point 7.0" << std::endl;
 		  double estDrift = -999;
                   //solve 3rd order poly for t using DC R (thank you http://www.1728.com/cubic2.htm :)
-                  double a = pcal[3]; double b = pcal[2]; double c = pcal[1]; double d = pcal[0] - fabs(driftCircleRadius);
+                  double a = pcal[3]; double b = pcal[2]; double c = pcal[1]; double d = pcal[0] - std::abs(driftCircleRadius);
                   //std::cout << "r(t) = " << pcal[3] << "t^3 + " << pcal[2] << "t^2 + " << pcal[1] << "t + " << pcal[0] << "; t0 = " << t0 << std::endl;
 		  //std::cout << "break point 7.1" << std::endl;
 		  double f  =0.0;
@@ -473,7 +473,7 @@ StatusCode InDet::LowBetaAlg::parseDataForTrtToolBetaLiklihood(const Trk::Track&
 		       I = sqrt(g*g/4. - h);
 		       double J = pow(I,1./3.);
 		       double K =0.0;
-		       if (fabs(-1.*g/2./I) < 1.0)K = acos(-1.*g/2./I);
+		       if (std::abs(-1.*g/2./I) < 1.0)K = acos(-1.*g/2./I);
 		       
 		       double L = -1.*J;
 		       double M = cos(K/3.);
@@ -488,10 +488,10 @@ StatusCode InDet::LowBetaAlg::parseDataForTrtToolBetaLiklihood(const Trk::Track&
 		     }
 		     else{
 		       double R = g/(-2.) + sqrt(h);
-		       double S = pow(fabs(R),1./3.);
+		       double S = pow(std::abs(R),1./3.);
 		       if(R<0) S = -1.*S;
 		       double T = g/(-2.) - sqrt(h);
-		       double U = pow(fabs(T),1./3.);
+		       double U = pow(std::abs(T),1./3.);
 		       if(T<0) U = -1.*U;
 		       t1r = S+U-b/3./a;
 		       t2r = -1.*(S+U)/2. - b/3./a;  //t2i = (S-U)*sqrt(3.)/2.;
@@ -582,7 +582,7 @@ int printTrtToolBetaLiklihoodDebugFile
 	else
 	  outFile = fopen(FILENAME_C,"a");
 	
-	if (outFile == NULL)
+	if (outFile == nullptr)
 	  return -1;
 	
 	fprintf(outFile,"#\n#Track Number %d\n#RecPt = %f, RecEta = %f\n#\n",tn,RecPt,RecEta);
diff --git a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx
index 637aa0d4a63b..4825c591b285 100755
--- a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -237,7 +237,7 @@ StatusCode InDetV0Finder::execute()
              lbContainer, lbAuxContainer,
 					   primaryVertex, importedVxContainer.cptr());
 	//
-	typedef std::unique_ptr<xAOD::VertexContainer> Container_p;
+	using Container_p = std::unique_ptr<xAOD::VertexContainer>;
 	using Aux_p = std::unique_ptr<xAOD::VertexAuxContainer>;
 	//create unique pointers for all containers and aux containers
 	Container_p pV = Container_p(v0Container);
diff --git a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx
index a96ef8857bb4..cff69cc0140e 100644
--- a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx
+++ b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SiSPSeededTrackFinder/SiSPSeededTrackFinder.h"
@@ -518,7 +518,7 @@ StatusCode InDet::SiSPSeededTrackFinder::itkConvStrategy(const EventContext& ctx
   std::unique_ptr<RoiDescriptor> roiComp = std::make_unique<RoiDescriptor>(true);
 
   if(calo.isValid()) {
-    RoiDescriptor * roi =0;
+    RoiDescriptor * roi =nullptr;
     SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle{m_beamSpotKey, ctx};
     double beamZ = beamSpotHandle->beamVtx().position().z();
     roiComp->clear();
@@ -1095,6 +1095,6 @@ bool InDet::SiSPSeededTrackFinder::passEtaDepCuts(const Trk::Track* track,
 
   if(par->pT() < m_etaDependentCutsSvc->getMinPtAtEta(eta)) return false;
   if(!(*m)->type(Trk::TrackStateOnSurface::Perigee)) return true ;
-  if(fabs(par->localPosition()[0]) > m_etaDependentCutsSvc->getMaxPrimaryImpactAtEta(eta)) return false;
+  if(std::abs(par->localPosition()[0]) > m_etaDependentCutsSvc->getMaxPrimaryImpactAtEta(eta)) return false;
   return true;
 }
diff --git a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiTrajectoryElement_xk.cxx b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiTrajectoryElement_xk.cxx
index 21d54a22a16c..0826449ae939 100644
--- a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiTrajectoryElement_xk.cxx
+++ b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiTrajectoryElement_xk.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 "SiSPSeededTrackFinderData/SiTrajectoryElement_xk.h"
@@ -18,6 +18,7 @@
 #include "StoreGate/ReadCondHandle.h"
 
 #include <cmath>
+#include <memory>
 #include <stdexcept>
 
 ///////////////////////////////////////////////////////////////////
@@ -43,12 +44,12 @@ bool InDet::SiTrajectoryElement_xk::setDead(const Trk::Surface* SU)
   m_ndfForward         = 0                       ;
   m_ndfBackward        = 0                       ;
   m_ntsos              = 0                       ;
-  m_detelement   = 0                       ;
-  m_detlink      = 0                       ;
+  m_detelement   = nullptr                       ;
+  m_detlink      = nullptr                       ;
   m_surface      = SU                      ;
-  m_cluster      = 0                       ;
-  m_clusterOld   = 0                       ;
-  m_clusterNoAdd = 0                       ;
+  m_cluster      = nullptr                       ;
+  m_clusterOld   = nullptr                       ;
+  m_clusterNoAdd = nullptr                       ;
   noiseInitiate()                          ;
   m_radlength    = -1.                     ;
   m_inside       = -1                      ;
@@ -66,7 +67,7 @@ bool InDet::SiTrajectoryElement_xk::setDead(const Trk::Surface* SU)
 void InDet::SiTrajectoryElement_xk::setDeadRadLength(Trk::PatternTrackParameters& Tp)
 {
   if(m_radlength >= 0.) return;
-  double z = fabs(Tp.parameters()[1]);
+  double z = std::abs(Tp.parameters()[1]);
   if     (z <  250.) m_radlength = .004;
   else if(z <  500.) m_radlength = .018+(z- 250.)*.000048;
   else if(z < 1000.) m_radlength = .030+(z- 500.)*.000040;
@@ -262,9 +263,9 @@ bool InDet::SiTrajectoryElement_xk::lastTrajectorElementPrecise()
   m_nlinksBackward     =  0;
   m_nholesBackward     =  0;
   m_dholesBackward     =  0;
-  m_clusterNoAdd       =  0;
+  m_clusterNoAdd       =  nullptr;
   m_nclustersBackward  =  1;
-  m_clusterNoAdd       =  0;
+  m_clusterNoAdd       =  nullptr;
   m_npixelsBackward = m_ndf==2 ? 1 : 0;
   m_ndfBackward        =  m_ndf ;
   m_xi2Backward        =  m_xi2Forward;
@@ -416,7 +417,7 @@ bool InDet::SiTrajectoryElement_xk::ForwardPropagationWithoutSearchPreciseWithCo
   noiseProduction(1,m_parametersUpdatedBackward);
   m_status       = 1;
   m_nlinksForward = 0;
-  m_clusterNoAdd = 0;
+  m_clusterNoAdd = nullptr;
   return true;
 }
 
@@ -911,9 +912,9 @@ InDet::SiTrajectoryElement_xk::trackStateOnSurface (bool change,bool cov,bool mu
   std::unique_ptr<const Trk::MeasurementBase> ro{};
 
   if (m_status == 1) {
-    fq.reset(new Trk::FitQualityOnSurface(m_xi2Forward, m_ndf));
+    fq = std::make_unique<Trk::FitQualityOnSurface>(m_xi2Forward, m_ndf);
   } else {
-    fq.reset(new Trk::FitQualityOnSurface(m_xi2Backward, m_ndf));
+    fq = std::make_unique<Trk::FitQualityOnSurface>(m_xi2Backward, m_ndf);
   }
 
   std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> pat(
@@ -930,7 +931,7 @@ InDet::SiTrajectoryElement_xk::trackStateOnSurface (bool change,bool cov,bool mu
     0., 0., std::sqrt(m_noise.covarianceAzim()), std::sqrt(m_noise.covariancePola()));
 
   auto meTemplate = std::make_unique<const Trk::MaterialEffectsOnTrack>(
-    m_radlengthN, std::move(sa), tp->associatedSurface());
+    m_radlengthN, sa, tp->associatedSurface());
 
   pat.set(Trk::TrackStateOnSurface::Scatterer);
   Trk::TrackStateOnSurface* sos =
@@ -1003,19 +1004,19 @@ InDet::SiTrajectoryElement_xk::trackSimpleStateOnSurface
   Amg::MatrixX cv = cl->localCovariance();
 
   std::unique_ptr<const Trk::FitQualityOnSurface> fq{};
-  if     (m_status == 1) fq.reset(new Trk::FitQualityOnSurface(m_xi2Forward,m_ndf));
-  else                   fq.reset(new Trk::FitQualityOnSurface(m_xi2Backward,m_ndf));
+  if     (m_status == 1) fq = std::make_unique<Trk::FitQualityOnSurface>(m_xi2Forward,m_ndf);
+  else                   fq = std::make_unique<Trk::FitQualityOnSurface>(m_xi2Backward,m_ndf);
 
   if (m_ndf == 1) {
     const InDet::SCT_Cluster* sc = static_cast<const InDet::SCT_Cluster*>(cl);
     if (sc)
-      ro.reset(new InDet::SCT_ClusterOnTrack(sc, locp, cv, iH, sc->globalPosition()));
+      ro = std::make_unique<InDet::SCT_ClusterOnTrack>(sc, locp, cv, iH, sc->globalPosition());
   } else {
 
     const InDet::PixelCluster* pc = static_cast<const InDet::PixelCluster*>(cl);
     if (pc)
-      ro.reset(new InDet::PixelClusterOnTrack(
-        pc, locp, cv, iH, pc->globalPosition(), pc->gangedPixel()));
+      ro = std::make_unique<InDet::PixelClusterOnTrack>(
+        pc, locp, cv, iH, pc->globalPosition(), pc->gangedPixel());
   }
   return new Trk::TrackStateOnSurface(std::move(ro), std::move(tp), std::move(fq), nullptr, pat);
 }
@@ -1637,7 +1638,7 @@ bool  InDet::SiTrajectoryElement_xk::rungeKuttaToPlane
   const double dlt  = .001      ;
 
   /// Minimum momentum check 
-  if(fabs(globalPars[6]) > .05) return false;
+  if(std::abs(globalPars[6]) > .05) return false;
 
 
   int    it    =               0;
@@ -1648,14 +1649,14 @@ bool  InDet::SiTrajectoryElement_xk::rungeKuttaToPlane
   double* sA   =          &globalPars[42];            /// dA/ds
   double  Pi   =  149.89626*globalPars[6];            /// This is a conversion from p to half-curvature (1/2R), when multiplied with the orthogonal field component
                                                       /// Curvature = 2 * Pi x B x sin(angle)
-  double  Pa   = fabs      (globalPars[6]);           /// abs(qoverp)
+  double  Pa   = std::abs      (globalPars[6]);           /// abs(qoverp)
 
   /// projection of global direction onto local Z-axis                 
   double  a    = A[0]*m_localTransform[6]+A[1]*m_localTransform[7]+A[2]*m_localTransform[8]; 
   if(a==0.) return false; 
   /// distance orthogonal to surface in units of direction z-component 
   double  S    = ((m_localTransform[12]-R[0]*m_localTransform[6])-(R[1]*m_localTransform[7]+R[2]*m_localTransform[8]))/a; 
-  double  S0   = fabs(S)                                                ;
+  double  S0   = std::abs(S)                                                ;
 
   /// if we are sufficiently close in Z already, add a 
   /// final straight line step corresponding to the remaining difference 
@@ -1688,7 +1689,7 @@ bool  InDet::SiTrajectoryElement_xk::rungeKuttaToPlane
 
     bool Helix = false; 
     /// if the step is sifficiently small, we are allowed to use a helical model
-    if(fabs(S) < Shel) Helix = true;
+    if(std::abs(S) < Shel) Helix = true;
     double S3=(1./3.)*S;      /// S/3 
     double S4=.25*S;          /// S/4 
     double PS2=Pi*S;          /// 2 S/curvature radius, when multiplied with the appropriate field 
@@ -1770,7 +1771,7 @@ bool  InDet::SiTrajectoryElement_xk::rungeKuttaToPlane
     // Test approximation quality on give step and possible step reduction
     //
     if(!ste) {
-      double EST = fabs((A1+A6)-(A3+A4))+fabs((B1+B6)-(B3+B4))+fabs((C1+C6)-(C3+C4)); 
+      double EST = std::abs((A1+A6)-(A3+A4))+std::abs((B1+B6)-(B3+B4))+std::abs((C1+C6)-(C3+C4)); 
       if(EST>dlt) {
         S*=.6; 
         continue;
@@ -1779,7 +1780,7 @@ bool  InDet::SiTrajectoryElement_xk::rungeKuttaToPlane
 
     /// Parameters calculation
     /// if the step grew too small, or we traveled more than 2 meters, abort, this went badly wrong...   
-    if((!ste && S0 > fabs(S)*100.) || fabs(globalPars[45]+=S) > 2000.) return false;
+    if((!ste && S0 > std::abs(S)*100.) || std::abs(globalPars[45]+=S) > 2000.) return false;
     ste = true;
 	
     double A0arr[3]{A0,B0,C0}; 
@@ -1811,7 +1812,7 @@ bool  InDet::SiTrajectoryElement_xk::rungeKuttaToPlane
     double  a    = A[0]*m_localTransform[6]+A[1]*m_localTransform[7]+A[2]*m_localTransform[8]; 
     if(a==0.) return false;
     double  Sn   = ((m_localTransform[12]-R[0]*m_localTransform[6])-(R[1]*m_localTransform[7]+R[2]*m_localTransform[8]))/a;
-    double aSn = fabs(Sn);
+    double aSn = std::abs(Sn);
 
     /// if the remaining step is below threshold,
     /// we can finish with a small linear step 
@@ -1829,7 +1830,7 @@ bool  InDet::SiTrajectoryElement_xk::rungeKuttaToPlane
       return true;  
     }
 
-    double aS = fabs(S);
+    double aS = std::abs(S);
     
     /// if we ran past the surface and changed signs more than twice, abort 
     if     (  S*Sn < 0. ) {
diff --git a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx
index 9a0e85121d2c..241cf2f2a07a 100755
--- a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx
+++ b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetAssociationTools/InDetPRD_AssociationToolGangedPixels.h"
@@ -228,7 +228,7 @@ std::vector< const Trk::PrepRawData* >
 InDet::InDetPRD_AssociationToolGangedPixels::getPrdsOnTrack(const Maps& maps,
                                                             const Trk::Track& track) const
 {
-  typedef std::vector<const Trk::PrepRawData*> PRDs_t;
+  using PRDs_t = std::vector<const Trk::PrepRawData *>;
 
   // test caching
   TrackPrepRawDataMap::const_iterator itvec = maps.m_trackPrepRawDataMap.find(&track);
@@ -240,7 +240,7 @@ InDet::InDetPRD_AssociationToolGangedPixels::getPrdsOnTrack(const Maps& maps,
 
   if (track.measurementsOnTrack()==nullptr) {
     ATH_MSG_WARNING("Track has no RoTs");
-    return PRDs_t(); // return vector optimization
+    return {}; // return vector optimization
    }
 
 
diff --git a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRDtoTrackMapToolGangedPixels.cxx b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRDtoTrackMapToolGangedPixels.cxx
index 696b5fd04211..fac2e08a4630 100644
--- a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRDtoTrackMapToolGangedPixels.cxx
+++ b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRDtoTrackMapToolGangedPixels.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetAssociationTools/InDetPRDtoTrackMapToolGangedPixels.h"
@@ -168,7 +168,7 @@ InDet::InDetPRDtoTrackMapToolGangedPixels::getPrdsOnTrack(Trk::PRDtoTrackMap &vi
 {
   ensureType(virt_prd_to_track_map);
   PRDtoTrackMap &prd_to_track_map = static_cast<PRDtoTrackMap&>(virt_prd_to_track_map);
-  typedef std::vector<const Trk::PrepRawData*> PRDs_t;
+  using PRDs_t = std::vector<const Trk::PrepRawData *>;
 
   // test caching
   Trk::PRDtoTrackMap::TrackPrepRawDataMap::const_iterator itvec = prd_to_track_map.m_trackPrepRawDataMap.find(&track);
@@ -180,7 +180,7 @@ InDet::InDetPRDtoTrackMapToolGangedPixels::getPrdsOnTrack(Trk::PRDtoTrackMap &vi
 
   if (track.measurementsOnTrack()==nullptr) {
     ATH_MSG_WARNING("Track has no RoTs");
-    return PRDs_t(); // return vector optimization
+    return {}; // return vector optimization
    }
 
   // FIXME can I do this without copying the vector?
diff --git a/InnerDetector/InDetRecTools/InDetHardScatterSelectionTool/Root/InDetHardScatterSelectionTool.cxx b/InnerDetector/InDetRecTools/InDetHardScatterSelectionTool/Root/InDetHardScatterSelectionTool.cxx
index abfc62a3f2bd..4f62d70f1b18 100644
--- a/InnerDetector/InDetRecTools/InDetHardScatterSelectionTool/Root/InDetHardScatterSelectionTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetHardScatterSelectionTool/Root/InDetHardScatterSelectionTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // Local include(s):
@@ -224,7 +224,7 @@ ElementLink<xAOD::VertexContainer> InDet::InDetHardScatterSelectionTool::getHard
   SG::ReadHandle<xAOD::VertexContainer> vtxCont(m_vtxContKey, ctx);
   if (!vtxCont.isValid()) {
     ATH_MSG_ERROR("Could not open primary vertex container, returning empty ElementLink!");
-    return ElementLink<xAOD::VertexContainer>();
+    return {};
   }
   return getHardScatterLink(vtxCont.get());
 }
diff --git a/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx
index 3c402ebc844a..35dec9e943e8 100644
--- a/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 //Author: Lianyou Shan <lianyou.shan@cern.ch>
 
@@ -141,7 +141,7 @@ std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDetIterativeSecVt
   beamposition.setPosition(beamSpotHandle->beamVtx().position());
   beamposition.setCovariancePosition(beamSpotHandle->beamVtx().covariancePosition());
 
-  typedef DataVector<xAOD::TrackParticle>::const_iterator TrackParticleDataVecIter;
+  using TrackParticleDataVecIter = DataVector<xAOD::TrackParticle>::const_iterator;
 
   bool selectionPassed;
   m_trkdefiPars.clear() ;
@@ -1387,9 +1387,9 @@ bool InDetIterativeSecVtxFinderTool::V0kine( const std::vector< Amg::Vector3D >&
                  <<" "<< ( mGam >= 0 ? sqrt( mGam ) : sqrt( -mGam ) )
                  <<" "<< ( mLam >= 0 ? sqrt( mLam ) : sqrt( -mLam ) ) );
 
-  if (   ( fabs( mass - 497.614 ) < 100. )   // K short 
+  if (   ( std::abs( mass - 497.614 ) < 100. )   // K short 
       || ( mGam > 0 && sqrt( mGam ) < 40. )  // gamma conversion ;
-      || ( mLam > 0 && fabs( sqrt( mLam ) - 1115.683 ) < 200.  ) //  Lambda 
+      || ( mLam > 0 && std::abs( sqrt( mLam ) - 1115.683 ) < 200.  ) //  Lambda 
      )  return true ;
 
   return false ;
@@ -2074,7 +2074,7 @@ float InDetIterativeSecVtxFinderTool::removeTracksInBadSeed( xAOD::Vertex * myxA
     if ( measPerigee == nullptr ) continue ;
 
     tot ++ ;
-    bool hf = passHitsFilter( measPerigee, position.perp(), fabs( position.z() ) ) ;
+    bool hf = passHitsFilter( measPerigee, position.perp(), std::abs( position.z() ) ) ;
 
     float pt = 0. ;
     const Trk::TrackParameters * svperigee = (*tracksAtVertexIter).perigeeAtVertex() ;
@@ -2144,7 +2144,7 @@ const std::vector< Amg::Vector3D > InDetIterativeSecVtxFinderTool::getVertexMome
     {
       const Trk::TrackParameters* sv_perigee = (*tracksAtVertexIter).perigeeAtVertex() ;
 
-      double qp  = 1/fabs( sv_perigee->parameters()[Trk::qOverP] ) ;
+      double qp  = 1/std::abs( sv_perigee->parameters()[Trk::qOverP] ) ;
       double theta = sv_perigee->parameters()[Trk::theta];
       double phi = sv_perigee->parameters()[Trk::phi];
 
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
index 66017d334f5f..7ee708cd82fd 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -143,7 +143,7 @@ InDetAdaptiveMultiPriVxFinderTool::findVertex(
 
   std::vector<const Trk::ITrackLink*> selectedTracks;
 
-  typedef DataVector<Trk::Track>::const_iterator TrackDataVecIter;
+  using TrackDataVecIter = DataVector<Trk::Track>::const_iterator;
 
   bool selectionPassed;
   for (TrackDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end();
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
index 5b09605a921f..f07358c778f6 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
  */
 
 /***************************************************************************
@@ -148,7 +148,7 @@ InDetIterativePriVxFinderTool::findVertex(const EventContext& ctx,
 
   std::vector<Trk::ITrackLink*> selectedTracks;
 
-  typedef DataVector<Trk::Track>::const_iterator TrackDataVecIter;
+  using TrackDataVecIter = DataVector<Trk::Track>::const_iterator;
 
   bool selectionPassed;
   for (TrackDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end();
diff --git a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/JetFitterV0FinderTool.h b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/JetFitterV0FinderTool.h
index a5fdac257741..f9db7184f36a 100644
--- a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/JetFitterV0FinderTool.h
+++ b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/JetFitterV0FinderTool.h
@@ -1,5 +1,5 @@
 /*
- Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration  
+ Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration  
 */
 
 #ifndef JETFITTER_V0FINDER_TOOL_H
@@ -109,8 +109,8 @@ namespace InDet {
 	Gaudi::Property< double > m_cutPtSingleTrackForBSecondSelection {this,"cutPtSingleTrackForBSecondSelection",750,""};
 
 	Gaudi::Property< bool > m_useITkMaterialRejection {this,"useITkMaterialRejection",false,"Reject vertices from hadronic interactions in detector material using ITk layout"};
-	const BeamPipeDetectorManager*       m_beamPipeMgr;
-	const InDetDD::PixelDetectorManager* m_pixelManager;
+	const BeamPipeDetectorManager*       m_beamPipeMgr = nullptr;
+	const InDetDD::PixelDetectorManager* m_pixelManager = nullptr;
 	std::unique_ptr<TH2D> m_ITkPixMaterialMap;
 
     };
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetMaterialVeto.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetMaterialVeto.cxx
index db29f5c1efad..f50672be95d1 100644
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetMaterialVeto.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetMaterialVeto.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // Header include
@@ -46,7 +46,7 @@ namespace InDet {
     double beamPipeRadius = 0.;
     PVConstLink beamPipeTopVolume =  beamPipeMgr->getTreeTop(0);
     const GeoLogVol* beamPipeLogVolume = beamPipeTopVolume->getLogVol();
-    const GeoTube* beamPipeTube = 0;
+    const GeoTube* beamPipeTube = nullptr;
     
     if (beamPipeLogVolume){
       beamPipeTube = dynamic_cast<const GeoTube*>(beamPipeLogVolume->getShape());
@@ -57,7 +57,7 @@ namespace InDet {
 	  if(beamPipeTopVolume->getNameOfChildVol(i)=="SectionC03"){
 	    PVConstLink childTopVolume =  beamPipeTopVolume->getChildVol(i);
 	    const GeoLogVol* childLogVolume = childTopVolume->getLogVol();
-	    const GeoTube* childTube = 0;
+	    const GeoTube* childTube = nullptr;
 	    
 	    if (childLogVolume){
 	      childTube = dynamic_cast<const GeoTube*>(childLogVolume->getShape());
@@ -91,7 +91,7 @@ namespace InDet {
       
       PVConstLink childTopVolume =  pixelTopVolume->getChildVol(i);
       const GeoLogVol* childLogVolume = childTopVolume->getLogVol();
-      const GeoTube* childTube = 0;
+      const GeoTube* childTube = nullptr;
       
       if (childLogVolume){
 	childTube = dynamic_cast<const GeoTube*>(childLogVolume->getShape());
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx
index 731ee44ed926..c09a67b89099 100755
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 // Author: Vadim Kostyukhin (vadim.kostyukhin@cern.ch)
 
@@ -467,7 +467,7 @@ namespace InDet{
        pz +=          theta.cs*api;
        ee += std::sqrt( api*api + m_massPi*m_massPi);
      }
-     return TLorentzVector(px,py,pz,ee); 
+     return {px,py,pz,ee}; 
    }
 
   TLorentzVector InDetVKalVxInJetTool::totalMom(const std::vector<const xAOD::TrackParticle*>& InpTrk) 
@@ -492,7 +492,7 @@ namespace InDet{
      double py = phi.sn * theta.sn*api;
      double pz =          theta.cs*api;
      double ee = std::sqrt( api*api + m_massPi*m_massPi);
-     return TLorentzVector(px,py,pz,ee); 
+     return {px,py,pz,ee}; 
    }
 //
 //-- Perigee in xAOD::TrackParticle
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx
index fef18a322a52..b7a509f9674e 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 //***************************************************************************
@@ -173,7 +173,7 @@ PixelCluster* ClusterMakerTool::pixelCluster(
   // switches are more readable **OPT**
   // actually they're slower as well (so I'm told) so perhaps
   // this should be re-written at some point EJWM
-  double eta = fabs(globalPos.eta());
+  double eta = std::abs(globalPos.eta());
   double zPitch = width.z()/colRow.y();
   
   //const AtlasDetectorID* aid = element->getIdHelper();
@@ -230,7 +230,7 @@ PixelCluster* ClusterMakerTool::pixelCluster(
  PixelCluster* newCluster = 
    new PixelCluster(clusterID, locpos, globalPos,
                     rdoList, lvl1a, totList,chargeList, 
-                    width, element, std::move(errorMatrix), omegax, omegay,
+                    width, element, errorMatrix, omegax, omegay,
                     split,
                     splitProb1,
                     splitProb2);
@@ -379,7 +379,7 @@ PixelCluster* ClusterMakerTool::pixelCluster(
   // switches are more readable **OPT**
   // actually they're slower as well (so I'm told) so perhaps
   // this should be re-written at some point EJWM
-  double eta = fabs(globalPos.eta());
+  double eta = std::abs(globalPos.eta());
   double zPitch = width.z()/colRow.y();
   
   const AtlasDetectorID* aid = element->getIdHelper();
@@ -446,7 +446,7 @@ PixelCluster* ClusterMakerTool::pixelCluster(
                     chargeList,
                     width,
                     element,
-                    std::move(errorMatrix),
+                    errorMatrix,
                     omegax,
                     omegay,
                     split,
@@ -551,7 +551,7 @@ ClusterMakerTool::sctCluster(const Identifier& clusterID,
 	} //else if (designShape == InDetDD::PolarAnnulus) {// Polar rotation for endcap}
 
         SCT_Cluster* newCluster = new SCT_Cluster(
-          clusterID, locpos, rdoList, width, element, std::move(errorMatrix));
+          clusterID, locpos, rdoList, width, element, errorMatrix);
         return newCluster;
 }
 
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitter.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitter.cxx
index ab6a51ea9cd3..a6d4bd062009 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitter.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitter.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -114,19 +114,19 @@ std::vector<InDet::PixelClusterParts> InDet::NnPixelClusterSplitter::splitCluste
     const InDetDD::SiDetectorElement* element=origCluster.detectorElement();
     if (element==nullptr) {
       ATH_MSG_WARNING("Could not get detector element");
-      return std::vector<InDet::PixelClusterParts>();
+      return {};
     }
     const AtlasDetectorID* aid = element->getIdHelper();
     if (aid==nullptr)
     {
       ATH_MSG_WARNING("Could not get ATLASDetectorID");
-      return std::vector<InDet::PixelClusterParts>();
+      return {};
     }
     const PixelID* pixelIDp=dynamic_cast<const PixelID*>(aid);
     if (!pixelIDp)
     {
       ATH_MSG_WARNING("Could not get PixelID pointer");
-      return std::vector<InDet::PixelClusterParts>();
+      return {};
     } 
     //check if original pixel is on b-layer and if yes continue, otherwise interrupt...
     Identifier pixelId = origCluster.identify();
@@ -135,7 +135,7 @@ std::vector<InDet::PixelClusterParts> InDet::NnPixelClusterSplitter::splitCluste
       //return empty object...
       ATH_MSG_VERBOSE(" Cluster not on b-layer. Return empty object-->back to default clustering." );
       
-      return std::vector<InDet::PixelClusterParts>();
+      return {};
     }
   }
 
@@ -149,7 +149,7 @@ std::vector<InDet::PixelClusterParts> InDet::NnPixelClusterSplitter::splitCluste
  
   
 
-  if (splitProb.getHighestSplitMultiplicityStored()<3) return std::vector<InDet::PixelClusterParts>();
+  if (splitProb.getHighestSplitMultiplicityStored()<3) return {};
 
   double splitProb2=splitProb.splitProbability(2);
   double splitProb3rel=splitProb.splitProbability(3);
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx
index fc4743c16d0b..e71e56b6da43 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -706,7 +706,7 @@ namespace InDet {
 
       SiWidth siWidth{Amg::Vector2D(dnStrips,1.), Amg::Vector2D(width,stripL)};
 
-      SCT_Cluster* cluster = new SCT_Cluster{clusterId, locpos, *pGroup , siWidth, element, std::move(errorMatrix)};
+      SCT_Cluster* cluster = new SCT_Cluster{clusterId, locpos, *pGroup , siWidth, element, errorMatrix};
 
       cluster->setHashAndIndex(idHash, clusterNumber);
 
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitter.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitter.cxx
index acef72c50ee5..3ac0f2f9bb47 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitter.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitter.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -81,19 +81,19 @@ std::vector<InDet::PixelClusterParts> InDet::TruthPixelClusterSplitter::splitClu
     const InDetDD::SiDetectorElement* element=origCluster.detectorElement();
     if (element==nullptr) {
       ATH_MSG_WARNING("Could not get detector element");
-      return std::vector<InDet::PixelClusterParts>();
+      return {};
     }
     const AtlasDetectorID* aid = element->getIdHelper();
     if (aid==nullptr)
     {
       ATH_MSG_WARNING("Could not get ATLASDetectorID");
-      return std::vector<InDet::PixelClusterParts>();
+      return {};
     }
     const PixelID* pixelIDp=dynamic_cast<const PixelID*>(aid);
     if (!pixelIDp)
     {
       ATH_MSG_WARNING("Could not get PixelID pointer");
-      return std::vector<InDet::PixelClusterParts>();
+      return {};
     } 
     //check if original pixel is on b-layer and if yes continue, otherwise interrupt...
     Identifier pixelId = origCluster.identify();
@@ -101,7 +101,7 @@ std::vector<InDet::PixelClusterParts> InDet::TruthPixelClusterSplitter::splitClu
     {
       //return empty object...
       ATH_MSG_VERBOSE(" Cluster not on b-layer. Return empty object-->back to default clustering." );
-      return std::vector<InDet::PixelClusterParts>();
+      return {};
     }
   }
 
@@ -113,7 +113,7 @@ std::vector<InDet::PixelClusterParts> InDet::TruthPixelClusterSplitter::splitClu
   //fill lvl1group all with the same value... (not best way but ...)
   std::vector<int> lvl1group(rdos.size(),origCluster.LVL1A());
 
-  if (splitProb.getHighestSplitMultiplicityStored()<3) return std::vector<InDet::PixelClusterParts>();
+  if (splitProb.getHighestSplitMultiplicityStored()<3) return {};
 
   double splitProb2=splitProb.splitProbability(2);
   double splitProb3rel=splitProb.splitProbability(3);
diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx
index 0833ccfa6907..1750465eb642 100755
--- a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx
+++ b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -302,7 +302,7 @@ InDet::TRT_DriftCircleCollection* InDet::TRT_DriftCircleTool::convert(int Mode,c
       errmat(0,0) = error*error;
       Amg::Vector2D loc(radius, 0.);
       InDet::TRT_DriftCircle* tdc =
-        new InDet::TRT_DriftCircle(id, loc, std::move(errmat), pE, word);
+        new InDet::TRT_DriftCircle(id, loc, errmat, pE, word);
       if (tdc) {
         tdc->setHashAndIndex(rio->identifyHash(), rio->size());
         rio->push_back(tdc);
diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx
index e15bd91fb69d..92601bcd366e 100755
--- a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx
+++ b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -292,7 +292,7 @@ InDet::TRT_DriftCircleCollection* InDet::TRT_DriftCircleToolCosmics::convert(int
       // if(Mode<1) dvi.push_back(id);  we dont need this
 
       InDet::TRT_DriftCircle* tdc =
-        new InDet::TRT_DriftCircle(id, loc, std::move(errmat), pE, word);
+        new InDet::TRT_DriftCircle(id, loc, errmat, pE, word);
 
       if (tdc) {
 	     
diff --git a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx
index e9aa3ef557a7..55d55c58c2f2 100755
--- a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx
+++ b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -125,7 +125,7 @@ StatusCode InDet::SimpleTRT_SeededSpacePointFinder_ATL::finalize()
 std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> InDet::SimpleTRT_SeededSpacePointFinder_ATL::newRegion
 (const std::vector<IdentifierHash>& /*vPixel*/, const std::vector<IdentifierHash>& /*vSCT*/) const
 {
-   return std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData>();
+   return {};
 }
 
 std::list<std::pair<const Trk::SpacePoint*, const Trk::SpacePoint*> >
@@ -524,7 +524,7 @@ bool InDet::SimpleTRT_SeededSpacePointFinder_ATL::pairIsOk(const Trk::SpacePoint
 
 
   // Cut on angle between s1-s2 and parameter direction
-  double diffPhi= fabs(s1s2.phi()-v0.phi());
+  double diffPhi= std::abs(s1s2.phi()-v0.phi());
 
   if (diffPhi > CLHEP::pi ) diffPhi = 2.*CLHEP::pi - diffPhi;
   if (diffPhi > CLHEP::pi/2. ) diffPhi = CLHEP::pi - diffPhi;
@@ -534,7 +534,7 @@ bool InDet::SimpleTRT_SeededSpacePointFinder_ATL::pairIsOk(const Trk::SpacePoint
   msg(MSG::VERBOSE) << " Passed cut on direction phi deviation" <<endmsg;
 
   // cut on eta deviation
-  //if (fabs(s1s2.eta()-v0.eta()) > m_directionEtaCut) return false;
+  //if (std::abs(s1s2.eta()-v0.eta()) > m_directionEtaCut) return false;
   //msg(MSG::VERBOSE) << " Passed cut on direction eta deviation" <<endmsg;
 
 
@@ -543,7 +543,7 @@ bool InDet::SimpleTRT_SeededSpacePointFinder_ATL::pairIsOk(const Trk::SpacePoint
   double cosAng = s1s2.mag()*v0.mag();
   if (cosAng)
     {
-      cosAng = fabs(v0.dot(s1s2)/cosAng);
+      cosAng = std::abs(v0.dot(s1s2)/cosAng);
       msg(MSG::VERBOSE) << "Cosine of angle between SP-extrap. and momentum is " << cosAng << endmsg;
       if ( cosAng < cosAngleCut ) return false;
     }
@@ -555,7 +555,7 @@ bool InDet::SimpleTRT_SeededSpacePointFinder_ATL::pairIsOk(const Trk::SpacePoint
   Trk::GlobalPosition s1r0 = r0-s1;  // vector from s1 to r0
   Trk::GlobalPosition h = s1r0 - s1r0.dot(s1s2)/s1s2.mag();  // the part of s1r0 perp. to s1s2
   msg(MSG::VERBOSE) << "closest approach to Parameter Position is ( " << h.x() << ", "<< h.y() << ", " << h.z() << " )"<<endmsg; 
-  if (h.x()*h.x() + h.y()*h.y() > positionPhiCutSquared || fabs(h.z()) > positionZ_Cut) return false;
+  if (h.x()*h.x() + h.y()*h.y() > positionPhiCutSquared || std::abs(h.z()) > positionZ_Cut) return false;
   
   msg(MSG::VERBOSE) << " Passed cut on extrapolation to TRT" <<endmsg;
   */
diff --git a/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/src/TRT_TrackSegmentsMakerCondAlg_ATLxk.cxx b/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/src/TRT_TrackSegmentsMakerCondAlg_ATLxk.cxx
index 742197eddb0c..371947a5f532 100644
--- a/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/src/TRT_TrackSegmentsMakerCondAlg_ATLxk.cxx
+++ b/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/src/TRT_TrackSegmentsMakerCondAlg_ATLxk.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TRT_TrackSegmentsMakerCondAlg_ATLxk.h"
@@ -363,7 +363,7 @@ StatusCode InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::execute(const EventContex
     }
   }
 
-  if (writeHandle.record(rangeTrt, std::move(writeCdo)).isFailure()) {
+  if (writeHandle.record(rangeTrt, writeCdo).isFailure()) {
     ATH_MSG_FATAL("Could not record " << writeHandle.key()
                   << " with EventRange " << rangeTrt
                   << " into Conditions Store");
diff --git a/InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx b/InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx
index 6470b4fb17ea..b40606f996f5 100644
--- a/InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx
+++ b/InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // Includes from this package
@@ -37,7 +37,7 @@ namespace {
   // Return the AMVF fit weight for track assuming a given vertex as well as the largest weight seen by the track //
   // ------------------------------------------------------------------------------------------------------------ //
 
-  typedef std::pair<float, float> FitWeight; // (fit weight for a given vertex, max fit weight)
+  using FitWeight = std::pair<float, float>; // (fit weight for a given vertex, max fit weight)
 
   FitWeight fitWeight(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const AMVFVerticesAcc& vtxDeco, const AMVFWeightsAcc& wgtDeco) {
 
diff --git a/InnerDetector/InDetSimEvent/src/SiHit.cxx b/InnerDetector/InDetSimEvent/src/SiHit.cxx
index bd16a0ec5d1d..65ad4de1190a 100755
--- a/InnerDetector/InDetSimEvent/src/SiHit.cxx
+++ b/InnerDetector/InDetSimEvent/src/SiHit.cxx
@@ -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
 */
 
 #include "InDetSimEvent/SiHit.h"
@@ -145,17 +145,18 @@ bool SiHit::isPLR() const {
 
 HepGeom::Point3D<double> SiHit::localStartPosition() const
 {
-  //  return m_localEndPosition;
-  return HepGeom::Point3D<double>((double) m_stX, (double) m_stY, (double) m_stZ);
+  return { static_cast<double>(m_stX),
+           static_cast<double>(m_stY),
+           static_cast<double>(m_stZ) };
 }
 
 HepGeom::Point3D<double> SiHit::localEndPosition() const
 {
-  //  return m_localEndPosition;
-  return HepGeom::Point3D<double>((double) m_enX, (double) m_enY, (double) m_enZ);
+  return { static_cast<double>(m_enX),
+           static_cast<double>(m_enY),
+           static_cast<double>(m_enZ) };
 }
 
-
 int SiHit::getBarrelEndcap() const {
   return  SiHitIdHelper::GetHelper()->getBarrelEndcap(m_ID);
 }
diff --git a/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx b/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx
index c000f0e5e107..f068056326c4 100755
--- a/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx
+++ b/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <mutex>
@@ -26,14 +26,14 @@ void SiHitIdHelper::Initialize() {
   const PixelID* pix = nullptr;
   ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "SiHitIdHelper");
   if (detStore.retrieve().isSuccess()) {
-    if (detStore->retrieve(pix, "PixelID").isFailure()) { pix = 0; }
+    if (detStore->retrieve(pix, "PixelID").isFailure()) { pix = nullptr; }
   }
 
-  bool isDBM  = (pix != 0 && pix->dictionaryVersion() == "IBL-DBM");
+  bool isDBM  = (pix != nullptr && pix->dictionaryVersion() == "IBL-DBM");
   // check for ITk and HGTD
-  bool isITkHGTD = (pix !=0 &&  pix->dictionaryVersion() == "ITkHGTD");
+  bool isITkHGTD = (pix !=nullptr &&  pix->dictionaryVersion() == "ITkHGTD");
   // we might include PLR as well, then we have to increase endcap range to +/- 4
-  bool isITkHGTDPLR = (pix !=0 &&  pix->dictionaryVersion() == "ITkHGTDPLR");
+  bool isITkHGTDPLR = (pix !=nullptr &&  pix->dictionaryVersion() == "ITkHGTDPLR");
   // cache the HL-LHC decision
   m_isITkHGTD = isITkHGTD || isITkHGTDPLR;
 
diff --git a/InnerDetector/InDetSimUtils/TRT_PAI_Process/src/TRT_PAI_Process.cxx b/InnerDetector/InDetSimUtils/TRT_PAI_Process/src/TRT_PAI_Process.cxx
index 77221e85ca9d..594b15d339cd 100644
--- a/InnerDetector/InDetSimUtils/TRT_PAI_Process/src/TRT_PAI_Process.cxx
+++ b/InnerDetector/InDetSimUtils/TRT_PAI_Process/src/TRT_PAI_Process.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TRT_PAI_Process.h"
@@ -89,7 +89,7 @@ StatusCode TRT_PAI_Process::initialize() {
   const double tempK = 289.;  // At 289. degrees, we get same densities as Nevski had
 
   // Define elements
-  typedef std::map<std::string, TRT_PAI_element, std::less<std::string> > element_type;
+  using element_type = std::map<std::string, TRT_PAI_element, std::less<std::string>>;
 
   element_type elements;
   elements["Xe"] = TRT_PAI_element( "Xe", EXe , SXe , NXe , ZXe,  AXe);
@@ -113,7 +113,7 @@ StatusCode TRT_PAI_Process::initialize() {
 
   // Define gas components
 
-  typedef std::map<std::string, TRT_PAI_gasComponent, std::less<std::string> > component_type;
+  using component_type = std::map<std::string, TRT_PAI_gasComponent, std::less<std::string>>;
 
   component_type components;
 
diff --git a/InnerDetector/InDetSimUtils/TRT_PAI_Process/src/TRT_PAI_utils.cxx b/InnerDetector/InDetSimUtils/TRT_PAI_Process/src/TRT_PAI_utils.cxx
index 04a59d61de93..56e17bcf395d 100644
--- a/InnerDetector/InDetSimUtils/TRT_PAI_Process/src/TRT_PAI_utils.cxx
+++ b/InnerDetector/InDetSimUtils/TRT_PAI_Process/src/TRT_PAI_utils.cxx
@@ -1,14 +1,14 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TRT_PAI_utils.h"
 
-#include "math.h"
 #include <algorithm>
-#include <vector>
+#include <cmath>
 #include <iostream>
 #include <limits>
+#include <vector>
 //___________________________________________________________________________
 
 float TRT_PAI_utils::Interpolate(const float& xval,
diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.cxx b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.cxx
index 420cd588d42a..e8e894b27b70 100644
--- a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.cxx
+++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 // class header
@@ -49,7 +49,7 @@ void TRRegionXMLHandler::Process(const std::string& name)
       msg(MSG::ERROR) << "Unable to locate StoreGate! Stopping!" << endmsg;
     throw std::runtime_error("Unable to locate StoreGate!");
   }
-  StoreGateSvc* detStore = 0;
+  StoreGateSvc* detStore = nullptr;
   sc = svcLocator->service( "DetectorStore", detStore);
   if( sc.isFailure() ) {
     if (msgLevel(MSG::ERROR))
@@ -57,7 +57,7 @@ void TRRegionXMLHandler::Process(const std::string& name)
     throw std::runtime_error("Unable to locate DetectorStore!");
   }
 
-  const IdDictManager * idDictMgr = 0;
+  const IdDictManager * idDictMgr = nullptr;
   if (StatusCode::SUCCESS == detStore->retrieve(idDictMgr, "IdDict")) {
     if (idDictMgr) {
       std::string tag = idDictMgr->manager()->tag();
diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.cxx b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.cxx
index 3de21237c7fa..e44551b42692 100644
--- a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.cxx
+++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 //#define ARTRU          // Choice of TR generator
@@ -41,10 +41,10 @@
 // Constructor, destructor
 
 TRTTransitionRadiation::TRTTransitionRadiation( const G4String& processName, const std::string & xmlfilename) :
-  G4VDiscreteProcess(processName,fElectromagnetic),m_XMLhandler(NULL),m_xmlfilename(xmlfilename),
+  G4VDiscreteProcess(processName,fElectromagnetic),m_XMLhandler(nullptr),m_xmlfilename(xmlfilename),
   m_MinEnergyTR(0.0),m_MaxEnergyTR(0.0),m_NumBins(0),m_WplasmaGas(0.0),
-  m_WplasmaFoil(0.0),m_GammaMin(0.0),m_EkinMin(0.0),m_Ey(NULL),m_Sr(NULL),
-  m_om(NULL),m_Omg(NULL),m_sigmaGas(NULL),m_sigmaFoil(NULL),
+  m_WplasmaFoil(0.0),m_GammaMin(0.0),m_EkinMin(0.0),m_Ey(nullptr),m_Sr(nullptr),
+  m_om(nullptr),m_Omg(nullptr),m_sigmaGas(nullptr),m_sigmaFoil(nullptr),
   m_msg("TRTTransitionRadiation")
 {
   m_radiators.clear();
@@ -106,7 +106,7 @@ void TRTTransitionRadiation::Initialize() {
 
   // Get material information from storegate.
   ISvcLocator *svcLocator = Gaudi::svcLocator(); // from Bootstrap
-  StoreGateSvc *detStore(NULL);
+  StoreGateSvc *detStore(nullptr);
   if( StatusCode::SUCCESS != svcLocator->service( "DetectorStore", detStore ) ) {
     ATH_MSG_FATAL ( "Can not access Detector Store " );
     return;
@@ -183,7 +183,7 @@ void TRTTransitionRadiation::Initialize() {
 
 G4bool TRTTransitionRadiation::IsApplicable(const G4ParticleDefinition& particle) {
   //return true if PDG Charge and PDG Mass are non-zero.
-  return  ( fabs(particle.GetPDGCharge())>std::numeric_limits<double>::epsilon() && fabs(particle.GetPDGMass())>std::numeric_limits<double>::epsilon() ) ;
+  return  ( std::abs(particle.GetPDGCharge())>std::numeric_limits<double>::epsilon() && std::abs(particle.GetPDGMass())>std::numeric_limits<double>::epsilon() ) ;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -195,8 +195,8 @@ G4double TRTTransitionRadiation::GetMeanFreePath(const G4Track& aTrack,
                                                  G4double,
                                                  G4ForceCondition* condition) {
   const G4DynamicParticle *aParticle(aTrack.GetDynamicParticle());
-  if(fabs(aParticle->GetDefinition()->GetPDGCharge())< std::numeric_limits<double>::epsilon() ||
-     fabs(aParticle->GetDefinition()->GetPDGMass())<std::numeric_limits<double>::epsilon()  ) {
+  if(std::abs(aParticle->GetDefinition()->GetPDGCharge())< std::numeric_limits<double>::epsilon() ||
+     std::abs(aParticle->GetDefinition()->GetPDGMass())<std::numeric_limits<double>::epsilon()  ) {
     *condition = NotForced;
   } else {
     *condition = Forced;
@@ -256,7 +256,7 @@ G4VParticleChange* TRTTransitionRadiation::PostStepDoIt( const G4Track& aTrack,
   G4ThreeVector ParticleDirection(aParticle->GetMomentumDirection());
 
   if ( BEflag == ENDCAP ) {
-    G4double costh(fabs(ParticleDirection[2]));
+    G4double costh(std::abs(ParticleDirection[2]));
     FoilThickness /= costh;
     GasThickness  /= costh;
   }
@@ -367,7 +367,7 @@ G4VParticleChange* TRTTransitionRadiation::PostStepDoIt( const G4Track& aTrack,
                       << pos.y()/CLHEP::cm << " cm, " << pos.z()/CLHEP::cm << " cm )" );
 
     // Angle w.r.t. electron direction (this is not correct but anyway...)
-    Theta = fabs( CLHEP::RandGaussZiggurat::shoot( 0.0, M_PI/Gamma ) );
+    Theta = std::abs( CLHEP::RandGaussZiggurat::shoot( 0.0, M_PI/Gamma ) );
     if( Theta >= 0.1 ) Theta = 0.1;
 
     Phi = (2.*M_PI)*CLHEP::RandFlat::shoot();
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.cxx
index 516bfaf8f259..b424485b9e93 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigTrackingxAODCnvMT.h"
@@ -72,7 +72,7 @@ namespace InDet
 
       xAOD::TrackParticle* tp = m_particleCreatorTool->createParticle( trackLink, tpCont);
 
-      if(msgLvl(MSG::DEBUG) && (tp != 0)){
+      if(msgLvl(MSG::DEBUG) && (tp != nullptr)){
         int npix, nsct, ntrt, npixh, nscth;
         npix = nsct = ntrt = npixh = nscth = -1;
         const Trk::Track *tr = tp->track();
diff --git a/InnerDetector/InDetTruth/InDetTruthAlgs/src/InDetDetailedTrackTruthMaker.cxx b/InnerDetector/InDetTruth/InDetTruthAlgs/src/InDetDetailedTrackTruthMaker.cxx
index eccdd3a9556a..5ea18c57898f 100755
--- a/InnerDetector/InDetTruth/InDetTruthAlgs/src/InDetDetailedTrackTruthMaker.cxx
+++ b/InnerDetector/InDetTruth/InDetTruthAlgs/src/InDetDetailedTrackTruthMaker.cxx
@@ -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
 */
 
 // Algorithm producing truth info for PrepRawData, keeping all MC particles contributed to a PRD.
@@ -87,7 +87,7 @@ StatusCode InDetDetailedTrackTruthMaker::execute(const EventContext &ctx) const
   prdCollectionVector.reserve(3);
 
   if(!m_PRDTruthNamePixel.key().empty()) {
-    read_handle.push_back( SG::ReadHandle<PRD_MultiTruthCollection>(m_PRDTruthNamePixel,ctx) );
+    read_handle.emplace_back(m_PRDTruthNamePixel,ctx );
     if (!read_handle.back().isValid())  {
       ATH_MSG_WARNING ("Pixel PRD_MultiTruthCollection "<<m_PRDTruthNamePixel.key()<<" NOT found");
     }
@@ -98,7 +98,7 @@ StatusCode InDetDetailedTrackTruthMaker::execute(const EventContext &ctx) const
   }
 
   if(!m_PRDTruthNameSCT.key().empty()) {
-    read_handle.push_back( SG::ReadHandle<PRD_MultiTruthCollection>(m_PRDTruthNameSCT,ctx) );
+    read_handle.emplace_back(m_PRDTruthNameSCT,ctx );
     if (!read_handle.back().isValid())  {
       ATH_MSG_WARNING ("SCT PRD_MultiTruthCollection "<<m_PRDTruthNameSCT.key()<<" NOT found");
     } else {
@@ -108,7 +108,7 @@ StatusCode InDetDetailedTrackTruthMaker::execute(const EventContext &ctx) const
   }
 
   if(!m_PRDTruthNameTRT.key().empty()) {
-    read_handle.push_back( SG::ReadHandle<PRD_MultiTruthCollection>(m_PRDTruthNameTRT,ctx) );
+    read_handle.emplace_back(m_PRDTruthNameTRT,ctx );
     if (!read_handle.back().isValid())  {
       ATH_MSG_WARNING ("TRT PRD_MultiTruthCollection "<<m_PRDTruthNameTRT.key()<<" NOT found");
     } else {
diff --git a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx
index 05d8be030a32..5501ec66482c 100755
--- a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx
+++ b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx
@@ -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
 */
 
 #include "InDetTruthTools/PRD_MultiTruthBuilder.h"
@@ -22,7 +22,7 @@ namespace InDet {
 //================================================================
 PRD_MultiTruthBuilder::PRD_MultiTruthBuilder(const std::string& type, const std::string& name, const IInterface* parent)
   : AthAlgTool(type,name,parent)
-  , m_idHelperPixel(0)
+  , m_idHelperPixel(nullptr)
 {
   declareInterface<IPRD_MultiTruthBuilder>(this);
 }
@@ -95,7 +95,7 @@ void PRD_MultiTruthBuilder::addPrepRawDatum(PRD_MultiTruthCollection *prdTruth,
           // Associate the particle to the PRD. But don't add duplicates.
           // Note: it may be more efficient to filter out duplicates among particles for the current PRD, then check-and-add the reduced set to the large multimap.
           // But may be not for the typically small RDO/PRD ratio.
-          typedef PRD_MultiTruthCollection::iterator truthiter;
+          using truthiter = PRD_MultiTruthCollection::iterator;
           std::pair<truthiter, truthiter> r = prdTruth->equal_range(prd->identify());
                 if(r.second == std::find_if(r.first, r.second, 
                                 [ particleLink ](const PRD_MultiTruthCollection::value_type &prd_to_truth) {
diff --git a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectoryManipulatorID.cxx b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectoryManipulatorID.cxx
index 27c72473f55b..ff6d87b6e852 100644
--- a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectoryManipulatorID.cxx
+++ b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectoryManipulatorID.cxx
@@ -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
 */
 
 ///////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ StatusCode InDet::PRD_TruthTrajectoryManipulatorID::finalize() {
 bool InDet::PRD_TruthTrajectoryManipulatorID::manipulateTruthTrajectory( Trk::PRD_TruthTrajectory &prdvec) const {
 
   if( HepMC::barcode(*prdvec.genParticle) < 100000){
-      srand( static_cast< unsigned int >( time( 0 ) ) );
+      srand( static_cast< unsigned int >( time( nullptr ) ) );
       const int pdg_id = (*prdvec.genParticle).pdg_id();
       const double prob_pix = pdg_id == 2212 ? 4. : 0;
       const double prob_sct = 4.375;
diff --git a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx
index 51a4c470bf6d..a8ba3de3e7ab 100644
--- a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx
+++ b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx
@@ -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
 */
 
 ///////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ StatusCode InDet::PRD_TruthTrajectorySelectorID::finalize() {
 }
 
 ThreePointCircle::ThreePointCircle(const std::vector<Amg::Vector3D>& posVec) :
-	m_translation(0), m_d0(0.), m_z0(0.), m_phi0(0.), m_eta(0.), m_pt(0.)
+	m_translation(nullptr), m_d0(0.), m_z0(0.), m_phi0(0.), m_eta(0.), m_pt(0.)
 {
 	if (posVec.size() <3)
 		std::cout << "[WARNING] not enough points" << std::endl;
@@ -73,7 +73,7 @@ void ThreePointCircle::constructCircle(	const Amg::Vector3D& p1,
   double bc = (bx*bx + by*by - temp)/2.0;
   double cd = (temp - dx*dx - dy*dy)/2.0;
   double det = (bx-cx)*(cy-dy)-(cx-dx)*(by-cy);
-  //if (fabs(det) < 1.0e-6) {
+  //if (std::abs(det) < 1.0e-6) {
   //std::cout << "[WARNING] Determinant is close to 0 " << std::endl;
   //}
 
@@ -123,7 +123,7 @@ void ThreePointCircle::constructCircle(	const Amg::Vector3D& p1,
 	Amg::Vector3D pocaDir(poca.x(),poca.y(),0.);
 	Amg::Vector3D momDir(cos(m_phi0),sin(m_phi0),0.);
   double signD0 = pocaDir.cross(momDir).z() > 0. ? 1. : -1.;    
-	m_d0 = signD0 * fabs(m_d0);
+	m_d0 = signD0 * std::abs(m_d0);
 	    
 	// update the center for the translation
 	m_center += Amg::Vector2D(translationX,translationY);
diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx b/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx
index a986646f8680..80bd34d6673a 100755
--- a/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx
+++ b/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.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
 */
 
 //  file:   InDetRecStatisticsAlg.cxx
@@ -146,9 +146,9 @@ InDet::InDetRecStatisticsAlg::InDetRecStatisticsAlg(const std::string& name, ISv
   declareProperty("minREndSecondary",		m_minREndSecondary);
   declareProperty("minZEndPrimary",		m_minZEndPrimary);
   declareProperty("minZEndSecondary",	        m_minZEndSecondary);
-  m_idHelper  = NULL;
-  m_pixelID   = NULL;
-  m_sctID     = NULL;
+  m_idHelper  = nullptr;
+  m_pixelID   = nullptr;
+  m_sctID     = nullptr;
   m_UpdatorWarning = false;
   m_pullWarning = false;
 }
@@ -196,7 +196,7 @@ StatusCode InDet::InDetRecStatisticsAlg::initialize(){
   } else {
     ATH_MSG_DEBUG(
       "No Updator for unbiased track states given, use normal states!");
-    m_updator = 0;
+    m_updator = nullptr;
   }
 
 
@@ -329,7 +329,7 @@ StatusCode InDet::InDetRecStatisticsAlg::execute(const EventContext &ctx)  const
 
       ATH_MSG_DEBUG("Acessing TrackCollection " <<  m_RecTrackCollection_keys.at(rec_track_collections_iter - rec_track_collections.begin()).key());
       const TrackCollection       * RecCollection = &(**rec_track_collections_iter);
-      const TrackTruthCollection  * TruthMap  = NULL;
+      const TrackTruthCollection  * TruthMap  = nullptr;
 
       if (RecCollection)  ATH_MSG_DEBUG("Retrieved " << RecCollection->size() << " reconstructed tracks from storegate");
 
@@ -420,7 +420,7 @@ StatusCode InDet :: InDetRecStatisticsAlg :: finalize() {
 StatusCode InDet :: InDetRecStatisticsAlg :: getServices ()
 {
     // get the Particle Properties Service
-    IPartPropSvc* partPropSvc = 0;
+    IPartPropSvc* partPropSvc = nullptr;
     StatusCode sc = evtStore()->service("PartPropSvc", partPropSvc, true);
 
     if (sc.isFailure()) {
@@ -433,7 +433,7 @@ StatusCode InDet :: InDetRecStatisticsAlg :: getServices ()
     //Set up ATLAS ID helper to be able to identify the RIO's det-subsystem.
 
     // Get the dictionary manager from the detector store
-    const IdDictManager*  idDictMgr = 0;
+    const IdDictManager*  idDictMgr = nullptr;
     sc = detStore()->retrieve(idDictMgr, "IdDict");
     if (sc.isFailure()) {
       ATH_MSG_FATAL("Could not get IdDictManager !");
@@ -862,7 +862,7 @@ float InDet :: InDetRecStatisticsAlg :: calculatePull(const float residual,
 const Trk::TrackParameters *  InDet::InDetRecStatisticsAlg::getUnbiasedTrackParameters(const Trk::TrackParameters* trkParameters, const Trk::MeasurementBase* measurement ){
 
 
-  const Trk::TrackParameters *unbiasedTrkParameters = 0;
+  const Trk::TrackParameters *unbiasedTrkParameters = nullptr;
 
  // -----------------------------------------
   // use unbiased track states or normal ones?
@@ -902,7 +902,7 @@ const Trk::TrackParameters *  InDet::InDetRecStatisticsAlg::getUnbiasedTrackPara
 
 Identifier  InDet::InDetRecStatisticsAlg::getIdentifier(const Trk::MeasurementBase* measurement ){
   Identifier id;
-  const Trk::CompetingRIOsOnTrack *comprot = 0;
+  const Trk::CompetingRIOsOnTrack *comprot = nullptr;
   // identify by ROT:
   const Trk::RIO_OnTrack *rot =
     dynamic_cast<const Trk::RIO_OnTrack*>(measurement);
diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx b/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx
index 92b664a79cfd..0b4ebe9b17a9 100755
--- a/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx
+++ b/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.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
 */
 
 //////////////////////////////////////////////////////////////////
@@ -17,24 +17,25 @@
 //
 
 #include "InDetRecStatistics/TrackStatHelper.h"
-#include "TrkTrack/Track.h"
-#include "TrkParameters/TrackParameters.h"
-#include "TrkRIO_OnTrack/RIO_OnTrack.h"
-#include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h"
+#include "AtlasDetDescr/AtlasDetectorID.h"
+#include "AtlasHepMC/GenVertex.h"
+#include "CLHEP/Geometry/Point3D.h"
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
+#include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h"
+#include "TrkParameters/TrackParameters.h"
+#include "TrkRIO_OnTrack/RIO_OnTrack.h"
+#include "TrkToolInterfaces/ITrackSummaryTool.h"
+#include "TrkTrack/Track.h"
 #include "TrkTruthData/TrackTruth.h"
 #include "TrkTruthData/TrackTruthCollection.h"
-#include "AtlasHepMC/GenVertex.h"
+#include <cstring>
+#include <iomanip>
 #include <iostream>
+#include <map>
 #include <sstream>
+#include <utility>
 #include <vector>
-#include <iomanip>
-#include <map>
-#include <cstring>
-#include "AtlasDetDescr/AtlasDetectorID.h"
-#include "TrkToolInterfaces/ITrackSummaryTool.h"
-#include "CLHEP/Geometry/Point3D.h"
 
 namespace Trk {
 
@@ -113,8 +114,8 @@ static const std::string track_types_string[InDet::N_TRACKTYPES]= {"all",
 								   };//LT added 06.21
  
 InDet::TrackStatHelper::TrackStatHelper(std::string TrackCollectionKey, std::string TrackTruthCollectionKey, bool careAboutTruth):
-  m_TrackCollectionKey       (TrackCollectionKey),
-  m_TrackTruthCollectionKey  (TrackTruthCollectionKey),
+  m_TrackCollectionKey       (std::move(TrackCollectionKey)),
+  m_TrackTruthCollectionKey  (std::move(TrackTruthCollectionKey)),
   m_truthMissing             (false),
   m_careAboutTruth           (careAboutTruth)
 {
@@ -266,7 +267,7 @@ void InDet::TrackStatHelper::addEvent(const TrackCollection              * recTr
       else{   // no link  
 	  
 	// ME : change logic, secondaries from G4 processes are truncated, so Barcode 0 is possible 
-	const HepMcParticleLink HMPL=trtruth.particleLink();
+	const HepMcParticleLink& HMPL=trtruth.particleLink();
 	if (! HMPL.isValid()) {
 	  tracks.m_counter[kTracks_rec][TRACK_NOHEPMCPARTICLELINK][Region]++;
 	  tracks.m_counter[kTracks_rec][TRACK_NOHEPMCPARTICLELINK][ETA_ALL]++;
@@ -863,7 +864,7 @@ void InDet::TrackStatHelper::printRegionSecondary(MsgStream &out,
 
 bool InDet::TrackStatHelper::PassTrackCuts(const Trk::TrackParameters *para) const {
   bool passed = false;
-  if(para->pT() >  m_cuts.minPt && fabs(para->eta()) < m_cuts.maxEtaDBM)passed = true;
+  if(para->pT() >  m_cuts.minPt && std::abs(para->eta()) < m_cuts.maxEtaDBM)passed = true;
 
 
   return passed;
@@ -888,9 +889,9 @@ int InDet::TrackStatHelper::ClassifyParticle( HepMC::ConstGenParticlePtr particl
     HepGeom::Point3D<double>	startVertex(particle->production_vertex()->position().x(),
 			    particle->production_vertex()->position().y(),
 			    particle->production_vertex()->position().z());
-    if ( fabs(startVertex.perp()) < m_cuts.maxRStartPrimary 
-	 && fabs(startVertex.z()) < m_cuts.maxZStartPrimary) { 
-      if (particle->end_vertex() == 0) {  
+    if ( std::abs(startVertex.perp()) < m_cuts.maxRStartPrimary 
+	 && std::abs(startVertex.z()) < m_cuts.maxZStartPrimary) { 
+      if (particle->end_vertex() == nullptr) {  
 	primary=true;
       }
       else {
@@ -898,7 +899,7 @@ int InDet::TrackStatHelper::ClassifyParticle( HepMC::ConstGenParticlePtr particl
 			     particle->end_vertex()->position().y(),
 			     particle->end_vertex()->position().z());
 	if (  endVertex.perp()         > m_cuts.minREndPrimary 
-	      || fabs(startVertex.z()) > m_cuts.minZEndPrimary){
+	      || std::abs(startVertex.z()) > m_cuts.minZEndPrimary){
 	  primary=true;
 	}
 	else { 
@@ -907,8 +908,8 @@ int InDet::TrackStatHelper::ClassifyParticle( HepMC::ConstGenParticlePtr particl
       }
     }
     
-    else if ( startVertex.perp() <  m_cuts.maxRStartSecondary && fabs(startVertex.z()) <  m_cuts.maxZStartSecondary) {
-      if (particle->end_vertex() == 0) {  
+    else if ( startVertex.perp() <  m_cuts.maxRStartSecondary && std::abs(startVertex.z()) <  m_cuts.maxZStartSecondary) {
+      if (particle->end_vertex() == nullptr) {  
 	secondary=true;
       }
       else {
@@ -917,7 +918,7 @@ int InDet::TrackStatHelper::ClassifyParticle( HepMC::ConstGenParticlePtr particl
 			     particle->end_vertex()->position().z());
 
 	if (endVertex.perp()       	> m_cuts.minREndSecondary
-	    || fabs(endVertex.z())	> m_cuts.minZEndSecondary) {
+	    || std::abs(endVertex.z())	> m_cuts.minZEndSecondary) {
 	  secondary=true;
 	}
       }
diff --git a/InnerDetector/InDetValidation/InDetSecVertexValidation/Root/InDetSecVertexTruthMatchTool.cxx b/InnerDetector/InDetValidation/InDetSecVertexValidation/Root/InDetSecVertexTruthMatchTool.cxx
index d4d4555df77f..3776ed8731ed 100644
--- a/InnerDetector/InDetValidation/InDetSecVertexValidation/Root/InDetSecVertexTruthMatchTool.cxx
+++ b/InnerDetector/InDetValidation/InDetSecVertexValidation/Root/InDetSecVertexTruthMatchTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 #include "AthenaKernel/Units.h"
 
@@ -325,7 +325,7 @@ size_t indexOfMatchInfo( std::vector<VertexTruthMatchInfo> & matches, const Elem
       return i;
   }
   // This is the first time we've seen this truth vertex, so make a new entry
-  matches.push_back(  std::make_tuple( link, 0., 0. ) );
+  matches.emplace_back( link, 0., 0. );
   return matches.size() - 1;
 }
 
@@ -522,12 +522,12 @@ StatusCode InDetSecVertexTruthMatchTool::matchVertices( const xAOD::VertexContai
         if (matchTypeDecor( *vtxContainer[j] ) == FAKE) continue;
         if (info2.size() > 0 && std::get<0>(info2[0]).isValid() && std::get<0>(info[0]).key() == std::get<0>(info2[0]).key() && std::get<0>(info[0]).index() == std::get<0>(info2[0]).index() ) {
           //add split links; first between first one found and newest one
-          splitPartnerDecor( *vtxContainer[i] ).push_back( ElementLink<xAOD::VertexContainer>( vtxContainer, j ) );
-          splitPartnerDecor( *vtxContainer[j] ).push_back( ElementLink<xAOD::VertexContainer>( vtxContainer, i ) );
+          splitPartnerDecor( *vtxContainer[i] ).emplace_back( vtxContainer, j );
+          splitPartnerDecor( *vtxContainer[j] ).emplace_back( vtxContainer, i );
           //then between any others we found along the way
           for ( auto k : foundSplits ) { //k is a size_t in the vector of splits
-            splitPartnerDecor( *vtxContainer[k] ).push_back( ElementLink<xAOD::VertexContainer>( vtxContainer, j ) );
-            splitPartnerDecor( *vtxContainer[j] ).push_back( ElementLink<xAOD::VertexContainer>( vtxContainer, k ) );
+            splitPartnerDecor( *vtxContainer[k] ).emplace_back( vtxContainer, j );
+            splitPartnerDecor( *vtxContainer[j] ).emplace_back( vtxContainer, k );
           }
           //then keep track that we found this one
           foundSplits.push_back(j);
diff --git a/InnerDetector/InDetValidation/InDetSecVertexValidation/src/InDetSecVertexTruthMatchAlgorithm.cxx b/InnerDetector/InDetValidation/InDetSecVertexValidation/src/InDetSecVertexTruthMatchAlgorithm.cxx
index 33c46f7d5ec1..157c24ef731f 100644
--- a/InnerDetector/InDetValidation/InDetSecVertexValidation/src/InDetSecVertexTruthMatchAlgorithm.cxx
+++ b/InnerDetector/InDetValidation/InDetSecVertexValidation/src/InDetSecVertexTruthMatchAlgorithm.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetSecVertexTruthMatchAlgorithm.h"
@@ -34,11 +34,11 @@ StatusCode InDetSecVertexTruthMatchAlgorithm::initialize() {
 StatusCode InDetSecVertexTruthMatchAlgorithm::execute() {
 
   //Retrieve the vertices:
-  const xAOD::VertexContainer * inSecVert = 0;
+  const xAOD::VertexContainer * inSecVert = nullptr;
   ATH_CHECK( evtStore()->retrieve( inSecVert, m_secVtxSGKey ) );
 
   //Retrieve truth vertices:
-  const xAOD::TruthVertexContainer * inTruthVert = 0;
+  const xAOD::TruthVertexContainer * inTruthVert = nullptr;
   ATH_CHECK( evtStore()->retrieve( inTruthVert, m_truthVtxSGKey ) );
 
   //pass to the tool for decoration:
diff --git a/InnerDetector/InDetValidation/InDetSegmentDriftCircleAssValidation/src/SegmentDriftCircleAssValidation.cxx b/InnerDetector/InDetValidation/InDetSegmentDriftCircleAssValidation/src/SegmentDriftCircleAssValidation.cxx
index afad772dd61c..c9f99aed0d5c 100644
--- a/InnerDetector/InDetValidation/InDetSegmentDriftCircleAssValidation/src/SegmentDriftCircleAssValidation.cxx
+++ b/InnerDetector/InDetValidation/InDetSegmentDriftCircleAssValidation/src/SegmentDriftCircleAssValidation.cxx
@@ -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
 */
 
 #include "GaudiKernel/MsgStream.h"
@@ -69,7 +69,7 @@ StatusCode InDet::SegmentDriftCircleAssValidation::initialize()
 
   // get the Particle Properties Service
   //
-  IPartPropSvc* partPropSvc = 0;
+  IPartPropSvc* partPropSvc = nullptr;
   sc =  service("PartPropSvc", partPropSvc, true);
   if (sc.isFailure()) {
     msg(MSG::FATAL) << " Could not initialize Particle Properties Service" << endmsg;
@@ -393,7 +393,7 @@ void InDet::SegmentDriftCircleAssValidation::tracksComparison( const Trk::Segmen
   const HepMC::GenParticle*  GENPAR[200];
   for(int i=0;i<200;++i){
     KINE[i] =0; NKINE[i] = 0;
-    GENPAR[i] = 0;
+    GENPAR[i] = nullptr;
   }
 
   Trk::SegmentCollection::const_iterator iseg = origColTracks->begin();
@@ -510,7 +510,7 @@ std::list<int> InDet::SegmentDriftCircleAssValidation::kine
     //
     int pdg = pa->pdg_id();  
     const HepPDT::ParticleData* pd  = m_particleDataTable->particle(abs(pdg));
-    if(!pd ||  fabs(pd->charge()) < .5) continue;
+    if(!pd ||  std::abs(pd->charge()) < .5) continue;
   
     // pT cut
     //
@@ -523,7 +523,7 @@ std::list<int> InDet::SegmentDriftCircleAssValidation::kine
     
     // Rapidity cut
     //
-    double           t  = fabs(m.pz())/pt;
+    double           t  = std::abs(m.pz())/pt;
     if( t  > m_tcut ) continue;
 
     // Radius cut
@@ -565,7 +565,7 @@ std::list<PRD_MultiTruthCollection::const_iterator> InDet::SegmentDriftCircleAss
     //
     int pdg = pa->pdg_id();  
     const HepPDT::ParticleData* pd  = m_particleDataTable->particle(abs(pdg));
-    if(!pd ||  fabs(pd->charge()) < .5) continue;
+    if(!pd ||  std::abs(pd->charge()) < .5) continue;
   
     // pT cut
     //
@@ -580,7 +580,7 @@ std::list<PRD_MultiTruthCollection::const_iterator> InDet::SegmentDriftCircleAss
 
     // Rapidity cut
     //
-    double           t  = fabs(m.pz())/pt;
+    double           t  = std::abs(m.pz())/pt;
     if( t  > m_tcut ) continue;
 
     // Radius cut
@@ -624,7 +624,7 @@ InDet::SegmentDriftCircleAssValidation::findTruth (const InDet::TRT_DriftCircle*
   std::list<PRD_MultiTruthCollection::const_iterator> mc;
 
   if(d){
-    typedef PRD_MultiTruthCollection::const_iterator TruthIter;
+    using TruthIter = PRD_MultiTruthCollection::const_iterator;
 
     std::pair<TruthIter, TruthIter> r = prdCollection->equal_range(d->identify());
     for(TruthIter i=r.first; i!=r.second;++i){
diff --git a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx
index 08433a1db324..c537b8ec6dd8 100755
--- a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx
+++ b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "GaudiKernel/IPartPropSvc.h"
@@ -49,7 +49,7 @@ InDet::TrackClusterAssValidation::TrackClusterAssValidation
   m_useOutliers            = false                            ;
   m_pdg                    = 0                                ;
   m_tcut                   = 0.                               ;
-  m_particleDataTable      = 0                                ;
+  m_particleDataTable      = nullptr                                ;
 
   declareProperty("TracksLocation"        ,m_tracklocation         );
   declareProperty("SpacePointsSCTName"    ,m_spacepointsSCTname    );
@@ -103,7 +103,7 @@ StatusCode InDet::TrackClusterAssValidation::initialize()
 
   // get the Particle Properties Service
   //
-  IPartPropSvc* partPropSvc = 0;
+  IPartPropSvc* partPropSvc = nullptr;
   sc =  service("PartPropSvc", partPropSvc, true);
   if (sc.isFailure()) {
     msg(MSG::FATAL) << " Could not initialize Particle Properties Service" << endmsg;
@@ -169,7 +169,7 @@ StatusCode InDet::TrackClusterAssValidation::execute(const EventContext& ctx) co
   std::vector<SG::ReadHandle<PRD_MultiTruthCollection> > read_handle;
   read_handle.reserve(3);
   if(m_usePIX) {
-    read_handle.push_back(SG::ReadHandle<PRD_MultiTruthCollection>(m_truth_locationPixel,ctx));
+    read_handle.emplace_back(m_truth_locationPixel,ctx);
     if (not read_handle.back().isValid()) {
       ATH_MSG_FATAL( "Could not find TruthPIX" );
       return StatusCode::FAILURE;
@@ -178,7 +178,7 @@ StatusCode InDet::TrackClusterAssValidation::execute(const EventContext& ctx) co
   }
 
   if(m_useSCT) {
-    read_handle.push_back(SG::ReadHandle<PRD_MultiTruthCollection>(m_truth_locationSCT,ctx));
+    read_handle.emplace_back(m_truth_locationSCT,ctx);
     if (not read_handle.back().isValid()) {
       ATH_MSG_FATAL( "Could not find TruthSCT" );
       return StatusCode::FAILURE;
@@ -187,7 +187,7 @@ StatusCode InDet::TrackClusterAssValidation::execute(const EventContext& ctx) co
   }
 
   if(m_clcutTRT > 0) {
-    read_handle.push_back(SG::ReadHandle<PRD_MultiTruthCollection>(m_truth_locationTRT,ctx));
+    read_handle.emplace_back(m_truth_locationTRT,ctx);
     if (not read_handle.back().isValid()) {
       ATH_MSG_FATAL( "Could not find TruthTRT" );
       return StatusCode::FAILURE;
@@ -439,7 +439,7 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
     double ef2[6]; for(int i=0; i!=6; ++i) ef2[i] = double(m_trackCollectionStat[nc].m_efficiencyN  [i][2])/ne;
 
 
-    typedef std::array<double, 6> EffArray_t;
+    using EffArray_t = std::array<double, 6>;
     //
     auto makeEffArray = [](const auto & threeDimArray, const size_t secondIdx, const size_t thirdIdx, const double denom){
       EffArray_t result{};
@@ -888,7 +888,7 @@ void InDet::TrackClusterAssValidation::newSpacePointsEvent(const EventContext& c
   int Kine[1000];
 
   if(m_usePIX && !m_spacepointsPixelname.key().empty()) {
-    event_data.m_spacePointContainer.push_back(SG::ReadHandle<SpacePointContainer>(m_spacepointsPixelname,ctx));
+    event_data.m_spacePointContainer.emplace_back(m_spacepointsPixelname,ctx);
     if (!event_data.m_spacePointContainer.back().isValid()) {
       ATH_MSG_DEBUG( "Invalid Pixels space points container read handle for key " << m_spacepointsPixelname.key()  );
     }
@@ -916,7 +916,7 @@ void InDet::TrackClusterAssValidation::newSpacePointsEvent(const EventContext& c
   // Get sct space points containers from store gate
   //
   if(m_useSCT && !m_spacepointsSCTname.key().empty()) {
-    event_data.m_spacePointContainer.push_back(SG::ReadHandle<SpacePointContainer>(m_spacepointsSCTname,ctx));
+    event_data.m_spacePointContainer.emplace_back(m_spacepointsSCTname,ctx);
     if (!event_data.m_spacePointContainer.back().isValid()) {
       ATH_MSG_DEBUG( "Invalid SCT space points container read handle for key " << m_spacepointsSCTname.key() );
     }
@@ -1100,7 +1100,7 @@ void InDet::TrackClusterAssValidation::tracksComparison(const EventContext& ctx,
     if(++nc >= 100) return;
     event_data.m_tracks[nc].clear();
 
-    event_data.m_trackcontainer.push_back( SG::ReadHandle<TrackCollection>(track_key,ctx) );
+    event_data.m_trackcontainer.emplace_back(track_key,ctx );
     if (!event_data.m_trackcontainer.back().isValid()) {
       continue;
     }
@@ -1302,7 +1302,7 @@ int InDet::TrackClusterAssValidation::kine
 
     // Rapidity cut
     //
-    double           t  = fabs(pz)/pt;
+    double           t  = std::abs(pz)/pt;
     if( t  > m_tcut ) continue;
 
     // Radius cut
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx b/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx
index 954ac9448a3b..85511951542e 100755
--- a/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx
+++ b/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -329,7 +329,7 @@ StatusCode InDet::SCT_ClusterValidationNtupleWriter::execute() {
   }
 
   // RDO container
-  typedef SCT_RDORawData SCTRawDataType;
+  using SCTRawDataType = SCT_RDORawData;
   const SCT_RDO_Container* p_rdocontainer = nullptr;
   std::vector<Identifier> RDOsOnTracks;
   if (m_fillRDO.value()) {
diff --git a/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchTool.cxx b/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchTool.cxx
index dcc5f3100a88..496a33e05a9f 100644
--- a/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchTool.cxx
+++ b/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetTruthVertexValidation/InDetVertexTruthMatchTool.h"
@@ -113,13 +113,13 @@ size_t indexOfMatchInfo( std::vector<VertexTruthMatchInfo> & matches, ElementLin
       return i;
   }
   // This is the first time we've seen this truth vertex, so make a new entry
-  matches.push_back(  std::make_tuple( link, 0., 0. ) );
+  matches.emplace_back( link, 0., 0. );
   return matches.size() - 1;
 }
 
 
 //for sorting the container -> highest relative match weight first
-bool compareMatchPair(const VertexTruthMatchInfo a, const VertexTruthMatchInfo b ) { return std::get<1>(a) > std::get<1>(b); }
+bool compareMatchPair(const VertexTruthMatchInfo& a, const VertexTruthMatchInfo& b ) { return std::get<1>(a) > std::get<1>(b); }
 
 }
 
@@ -137,7 +137,7 @@ InDetVertexTruthMatchTool::findTrackParticleContainer( const xAOD::VertexContain
       }
     }
   }
-  return 0;
+  return nullptr;
 }
 
 StatusCode InDetVertexTruthMatchTool::matchVertices( const xAOD::VertexContainer & vxContainer ) const {
@@ -239,9 +239,9 @@ StatusCode InDetVertexTruthMatchTool::matchVertices( const xAOD::VertexContainer
     if (!trkAcc.isAvailable(*vxit) || !weightAcc.isAvailable(*vxit) ) {
       ATH_MSG_DEBUG("trackParticles or trackWeights not available, setting fake");
       // Add invalid link for fakes
-      matchinfo.push_back( std::make_tuple( ElementLink<xAOD::TruthEventBaseContainer>(), 1., 0. ) );
+      matchinfo.emplace_back( ElementLink<xAOD::TruthEventBaseContainer>(), 1., 0. );
       matchInfoDecor( *vxit ) = matchinfo;
-      rawMatchinfo.push_back( std::make_tuple( ElementLink<xAOD::TruthEventBaseContainer>(), 1., 0. ) );
+      rawMatchinfo.emplace_back( ElementLink<xAOD::TruthEventBaseContainer>(), 1., 0. );
       rawMatchInfoDecor( *vxit ) = rawMatchinfo;
       nHSTrkDecor( *vxit ) = 0;
       continue;
@@ -255,9 +255,9 @@ StatusCode InDetVertexTruthMatchTool::matchVertices( const xAOD::VertexContainer
     //double check
     if ( trkWeights.size() != ntracks ) {
       ATH_MSG_DEBUG("Vertex without same number of tracks and trackWeights, setting fake");
-      matchinfo.push_back( std::make_tuple( ElementLink<xAOD::TruthEventBaseContainer>(), 1., 0. ) );
+      matchinfo.emplace_back( ElementLink<xAOD::TruthEventBaseContainer>(), 1., 0. );
       matchInfoDecor( *vxit ) = matchinfo;
-      rawMatchinfo.push_back( std::make_tuple( ElementLink<xAOD::TruthEventBaseContainer>(), 1., 0. ) );
+      rawMatchinfo.emplace_back( ElementLink<xAOD::TruthEventBaseContainer>(), 1., 0. );
       rawMatchInfoDecor( *vxit ) = rawMatchinfo;
       nHSTrkDecor( *vxit ) = 0;
       continue;
@@ -328,8 +328,8 @@ StatusCode InDetVertexTruthMatchTool::matchVertices( const xAOD::VertexContainer
     }
     if ( totalFake > 0. )
     {
-      matchinfo.push_back( std::make_tuple( ElementLink<xAOD::TruthEventBaseContainer>(), totalFake, 0. ) );
-      rawMatchinfo.push_back( std::make_tuple( ElementLink<xAOD::TruthEventBaseContainer>(), totalFake, 0. ) );
+      matchinfo.emplace_back( ElementLink<xAOD::TruthEventBaseContainer>(), totalFake, 0. );
+      rawMatchinfo.emplace_back( ElementLink<xAOD::TruthEventBaseContainer>(), totalFake, 0. );
     }
 
     for ( auto & mit : matchinfo ) {
@@ -379,12 +379,12 @@ StatusCode InDetVertexTruthMatchTool::matchVertices( const xAOD::VertexContainer
         if (matchTypeDecor( *vxContainer[j] ) == FAKE || matchTypeDecor( *vxContainer[j] ) == DUMMY) continue;
         if (info2.size() > 0 && std::get<0>(info2[0]).isValid() && std::get<0>(info[0]).key() == std::get<0>(info2[0]).key() && std::get<0>(info[0]).index() == std::get<0>(info2[0]).index() ) {
           //add split links; first between first one found and newest one
-          splitPartnerDecor( *vxContainer[i] ).push_back( ElementLink<xAOD::VertexContainer>( vxContainer, j ) );
-          splitPartnerDecor( *vxContainer[j] ).push_back( ElementLink<xAOD::VertexContainer>( vxContainer, i ) );
+          splitPartnerDecor( *vxContainer[i] ).emplace_back( vxContainer, j );
+          splitPartnerDecor( *vxContainer[j] ).emplace_back( vxContainer, i );
           //then between any others we found along the way
           for ( auto k : foundSplits ) { //k is a size_t in the vector of splits
-            splitPartnerDecor( *vxContainer[k] ).push_back( ElementLink<xAOD::VertexContainer>( vxContainer, j ) );
-            splitPartnerDecor( *vxContainer[j] ).push_back( ElementLink<xAOD::VertexContainer>( vxContainer, k ) );
+            splitPartnerDecor( *vxContainer[k] ).emplace_back( vxContainer, j );
+            splitPartnerDecor( *vxContainer[j] ).emplace_back( vxContainer, k );
           }
           //then keep track that we found this one
           foundSplits.push_back(j);
diff --git a/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchUtils.cxx b/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchUtils.cxx
index cb0e6c6b0de8..44153ffb1cf7 100644
--- a/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchUtils.cxx
+++ b/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchUtils.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetTruthVertexValidation/InDetVertexTruthMatchUtils.h"
@@ -9,7 +9,7 @@ namespace InDetVertexTruthMatchUtils {
 
 namespace {
 
-bool isHardScatterEvent( const ElementLink<xAOD::TruthEventBaseContainer> evlink ) {
+bool isHardScatterEvent( const ElementLink<xAOD::TruthEventBaseContainer>& evlink ) {
   //good link of type "TruthEvent" (not truthpileupevent) and the first one in the collection
   return ( evlink.isValid() && (*evlink)->type() == xAOD::Type::TruthEvent && evlink.index() == 0 );
 }
@@ -54,7 +54,7 @@ const std::vector<std::pair<const xAOD::Vertex*, size_t> > hardScatterMatches( c
       }
       for ( size_t i = 0; i < info.size(); ++i ) {
         if ( isHardScatterEvent( std::get<0>(info[i]) ) ) {
-          result.push_back( std::make_pair(vxit, i) );
+          result.emplace_back(vxit, i );
           break;
         }
       }
diff --git a/InnerDetector/InDetValidation/InDetTruthVertexValidation/src/InDetVertexTruthMatchAlgorithm.cxx b/InnerDetector/InDetValidation/InDetTruthVertexValidation/src/InDetVertexTruthMatchAlgorithm.cxx
index 68fb4aa0efe9..b37984b560c7 100644
--- a/InnerDetector/InDetValidation/InDetTruthVertexValidation/src/InDetVertexTruthMatchAlgorithm.cxx
+++ b/InnerDetector/InDetValidation/InDetTruthVertexValidation/src/InDetVertexTruthMatchAlgorithm.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetVertexTruthMatchAlgorithm.h"
@@ -32,7 +32,7 @@ StatusCode InDetVertexTruthMatchAlgorithm::initialize() {
 StatusCode InDetVertexTruthMatchAlgorithm::execute() {
 
   //Retrieve the vertices:
-  const xAOD::VertexContainer * vxContainer = 0;
+  const xAOD::VertexContainer * vxContainer = nullptr;
   ATH_CHECK( evtStore()->retrieve( vxContainer, m_sgKey ) );
 
   //pass to the tool for decoration:
diff --git a/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetEventSplitter.cxx b/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetEventSplitter.cxx
index deac81721b72..f0862eb2dee1 100644
--- a/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetEventSplitter.cxx
+++ b/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetEventSplitter.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -25,11 +25,11 @@
 #include "TrkParticleBase/TrackParticleBaseCollection.h"
 
 #include <algorithm>
-#include <math.h>
-#include <map>
-#include <sstream>
+#include <cmath>
 #include <cstdlib>
 #include <ctime>
+#include <map>
+#include <sstream>
 
 //////////////////////////////////////////////////////////////////////////////////////
 /// Constructor
diff --git a/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetVertexSplitter.cxx b/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetVertexSplitter.cxx
index 89d2c2cd9495..766e7e8add30 100644
--- a/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetVertexSplitter.cxx
+++ b/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetVertexSplitter.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -125,7 +125,7 @@ StatusCode InDet::InDetVertexSplitter::split_vertices() {
 
   StatusCode sc = StatusCode::SUCCESS;
 
-  const VxContainer* vtxTES=0;
+  const VxContainer* vtxTES=nullptr;
   sc=evtStore()->retrieve( vtxTES, m_vertexContainerName);
   if( sc.isFailure()  ||  !vtxTES ) {
     ATH_MSG_WARNING("No VxContainer container found in TDS tried " << m_vertexContainerName);
@@ -134,8 +134,8 @@ StatusCode InDet::InDetVertexSplitter::split_vertices() {
  
   ATH_MSG_DEBUG("Vertex successfully retrieved");
 
-  const Rec::TrackParticleContainer* tpbTES=0;
-  const TrackCollection* trkTES=0;
+  const Rec::TrackParticleContainer* tpbTES=nullptr;
+  const TrackCollection* trkTES=nullptr;
 
   if (m_savetpb){
     sc=evtStore()->retrieve( tpbTES, m_tpbContainerName);
@@ -160,7 +160,7 @@ StatusCode InDet::InDetVertexSplitter::split_vertices() {
 //  We need to create every container for each event, even if we don't write to them
 
   for (const auto & thisKey : m_trackKeys){
-    TrackCollection* tempTracks = 0;
+    TrackCollection* tempTracks = nullptr;
     trackmap[thisKey] = tempTracks;
     if (evtStore()->contains<TrackCollection>(thisKey) && (evtStore()->retrieve(trackmap[thisKey],thisKey)).isSuccess()){
       //nop
@@ -170,7 +170,7 @@ StatusCode InDet::InDetVertexSplitter::split_vertices() {
   }  
 
   for (const auto & thisKey : m_trackKeys){
-    Trk::TrackParticleBaseCollection* tempTpbs = 0;
+    Trk::TrackParticleBaseCollection* tempTpbs = nullptr;
     tpbmap[thisKey] = tempTpbs;
     if (evtStore()->contains<Trk::TrackParticleBaseCollection>(thisKey) &&
   (evtStore()->retrieve(tpbmap[thisKey],thisKey)).isSuccess()){
diff --git a/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetVertexSplitterHist.cxx b/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetVertexSplitterHist.cxx
index f4f01e0efa51..10496d2c4ba2 100644
--- a/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetVertexSplitterHist.cxx
+++ b/InnerDetector/InDetValidation/InDetVertexSplitter/src/InDetVertexSplitterHist.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,10 +21,10 @@
 /// head file
 #include "InDetVertexSplitterHist.h"
 
+#include "TFitter.h"
 #include <algorithm>
-#include <math.h>
+#include <cmath>
 #include <sstream>
-#include "TFitter.h"
 
 //////////////////////////////////////////////////////////////////////////////////////
 /// Constructor
@@ -33,7 +33,7 @@ InDet::InDetVertexSplitterHist::InDetVertexSplitterHist(const std::string& name,
   ISvcLocator* pSvcLocator) : 
   AthAlgorithm(name, pSvcLocator), 
   m_thistSvc("THistSvc",name),
-  m_ntuple(0)
+  m_ntuple(nullptr)
 {
   declareProperty("SpitVxContainer",m_splitVxName = "SplitVxCandidates");
   declareProperty("HistService",m_thistSvc);
@@ -98,7 +98,7 @@ StatusCode InDet::InDetVertexSplitterHist::makeSplitHist() {
 
   StatusCode sc = StatusCode::SUCCESS;
 
-  const VxContainer* vxCont = 0;
+  const VxContainer* vxCont = nullptr;
   sc = evtStore()->retrieve(vxCont, m_splitVxName);
   if(sc.isSuccess()){
     ATH_MSG_DEBUG("Retrieved vertex container " << m_splitVxName);
diff --git a/InnerDetector/InDetValidation/PixelRTT/Application/doPixelValidation.cxx b/InnerDetector/InDetValidation/PixelRTT/Application/doPixelValidation.cxx
index 0a1c7a4c3824..5a581756e366 100644
--- a/InnerDetector/InDetValidation/PixelRTT/Application/doPixelValidation.cxx
+++ b/InnerDetector/InDetValidation/PixelRTT/Application/doPixelValidation.cxx
@@ -1,16 +1,17 @@
 /*
-  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 <iostream>
 #include <string>
+#include <utility>
 
 #include "CxxUtils/checker_macros.h"
 #include "PixelRTT/OfflineCalibOutputTrack.h"
 
 using namespace PixelValid;
 
-int doAll ATLAS_NOT_THREAD_SAFE (std::string input, std::string output, std::string reference, int maxentries);
+int doAll ATLAS_NOT_THREAD_SAFE (const std::string& input, const std::string& output, const std::string& reference, int maxentries);
 
 int main ATLAS_NOT_THREAD_SAFE (int argc, char *argv[]){ // Thread unsafe doAll function is used.
 
@@ -44,9 +45,9 @@ int main ATLAS_NOT_THREAD_SAFE (int argc, char *argv[]){ // Thread unsafe doAll
 
 
 /// the function that actually implements things!!
-int doAll ATLAS_NOT_THREAD_SAFE (std::string input, std::string output, std::string reference, int maxentries){ // Thread unsafe OfflineCalibOutputTrack class is used.
+int doAll ATLAS_NOT_THREAD_SAFE (const std::string& input, const std::string& output, const std::string& reference, int maxentries){ // Thread unsafe OfflineCalibOutputTrack class is used.
 
-	OfflineCalibOutputTrack *s = 0;
+	OfflineCalibOutputTrack *s = nullptr;
 
 	std::cout <<  "Allocating classes for calibration" << std::endl;
 	if(maxentries < 0){
diff --git a/InnerDetector/InDetValidation/PixelRTT/PixelRTT/OfflineCalibOutputTrack.h b/InnerDetector/InDetValidation/PixelRTT/PixelRTT/OfflineCalibOutputTrack.h
index 3e036c3edcd5..99a3fd19dcde 100644
--- a/InnerDetector/InDetValidation/PixelRTT/PixelRTT/OfflineCalibOutputTrack.h
+++ b/InnerDetector/InDetValidation/PixelRTT/PixelRTT/OfflineCalibOutputTrack.h
@@ -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
 */
 
 #ifndef OfflineCalibOutputTrack_h
@@ -30,12 +30,12 @@ class ATLAS_NOT_THREAD_SAFE OfflineCalibOutputTrack: public PixelNtupleTracks {
 public :
 	// Modified stuff
 	OfflineCalibOutputTrack(std::string input,
-				std::string output,
+				const std::string& output,
 				std::string collection = "Validation/CombinedInDetTracks");
 	virtual ~OfflineCalibOutputTrack();
 	void Iterate(long maxentries);
-	void ReadHistoFile(std::string input);
-	void Analyse(std::string output, std::string reference = "");
+	void ReadHistoFile(const std::string& input);
+	void Analyse(const std::string& output, const std::string& reference = "");
 
 
 private:
diff --git a/InnerDetector/InDetValidation/PixelRTT/PixelRTT/ResPullValidation.h b/InnerDetector/InDetValidation/PixelRTT/PixelRTT/ResPullValidation.h
index 550fbd631c81..44d69c89e2f8 100644
--- a/InnerDetector/InDetValidation/PixelRTT/PixelRTT/ResPullValidation.h
+++ b/InnerDetector/InDetValidation/PixelRTT/PixelRTT/ResPullValidation.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 ResPullValidation_h
@@ -18,7 +18,7 @@ class ResPullValidation{
 
 public:
 	ResPullValidation(std::string etaORphi = "phi", std::string pullORres = "res",
-			std::string cosmicORbeam = "beam");
+			const std::string& cosmicORbeam = "beam");
 	virtual ~ResPullValidation(){};
 	bool Fill(int Layer, double GeVTrkPt, double Angle,
 			double ClusterSize, double Residual);
diff --git a/InnerDetector/InDetValidation/PixelRTT/src/OfflineCalibOutputTrack.cxx b/InnerDetector/InDetValidation/PixelRTT/src/OfflineCalibOutputTrack.cxx
index 57b300bfe088..16bd732241f9 100644
--- a/InnerDetector/InDetValidation/PixelRTT/src/OfflineCalibOutputTrack.cxx
+++ b/InnerDetector/InDetValidation/PixelRTT/src/OfflineCalibOutputTrack.cxx
@@ -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 OfflineCalibOutputTrack_cxx
@@ -7,15 +7,16 @@
 #ifndef PixelNtupleTracks_cxx
 #define PixelNtupleTracks_cxx
 
-#include <iostream>
-#include <string>
-#include <TFile.h>
 #include "PixelRTT/OfflineCalibOutputTrack.h"
+#include "PathResolver/PathResolver.h"
 #include "PixelCalibAlgs/PixelChargeInterpolationCalibration.h"
 #include "PixelCalibAlgs/PixelChargeInterpolationValidation.h"
 #include "PixelConditionsData/PixelChargeInterpolationParameters.h"
 #include "PixelRTT/ResPullValidation.h"
-#include "PathResolver/PathResolver.h"
+#include <TFile.h>
+#include <iostream>
+#include <string>
+#include <utility>
 
 
 using namespace std;
@@ -24,9 +25,9 @@ using namespace std;
 namespace PixelValid{
 
 OfflineCalibOutputTrack::OfflineCalibOutputTrack(std::string input,
-				std::string output,
+				const std::string& output,
 				std::string collection):
-	PixelNtupleTracks(input,collection){
+	PixelNtupleTracks(std::move(input),std::move(collection)){
 
 	std::cout << "OfflineCalibOutputTrack()" << std::endl;
 	
@@ -51,7 +52,7 @@ OfflineCalibOutputTrack::OfflineCalibOutputTrack(std::string input,
 		new PixelCalib::PixelChargeInterpolationValidation("ChargeSharingConstants", *parametersModel);
 
 	delete parametersModel;
-	parametersModel = 0;
+	parametersModel = nullptr;
 	
 	m_ResPhiValid = new ResPullValidation("phi","res",datatype);
 	m_PullPhiValid = new ResPullValidation("phi","pull",datatype);
@@ -68,22 +69,22 @@ OfflineCalibOutputTrack::~OfflineCalibOutputTrack(){
 	
 	delete m_Calibration;
 	delete m_Validation;
-	m_Calibration = 0;
-	m_Validation  = 0;
+	m_Calibration = nullptr;
+	m_Validation  = nullptr;
 	
 	delete m_ResPhiValid;
 	delete m_PullPhiValid;
 	delete m_ResEtaValid;
 	delete m_PullEtaValid;
-	m_ResPhiValid = 0;
-	m_PullPhiValid = 0;
-	m_ResEtaValid = 0;
-	m_PullEtaValid = 0;
+	m_ResPhiValid = nullptr;
+	m_PullPhiValid = nullptr;
+	m_ResEtaValid = nullptr;
+	m_PullEtaValid = nullptr;
 }
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void OfflineCalibOutputTrack::ReadHistoFile(std::string input){
+void OfflineCalibOutputTrack::ReadHistoFile(const std::string& input){
 	
 	std::cout << "ReadHistoFile()" << std::endl;
 	TDirectory *olddir = gDirectory;
@@ -111,7 +112,7 @@ void OfflineCalibOutputTrack::ReadHistoFile(std::string input){
 void OfflineCalibOutputTrack::Iterate(long maxentries){
 
 	std::cout << "Iterate()" << std::endl;
-   if (fChain == 0) return;
+   if (fChain == nullptr) return;
    Long64_t nentries = fChain->GetEntriesFast();
    if(maxentries > 0) nentries = ( nentries < maxentries ) ? nentries : maxentries;
    Long64_t jentry=0, pixentries = 0;
@@ -166,13 +167,13 @@ void OfflineCalibOutputTrack::Iterate(long maxentries){
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void OfflineCalibOutputTrack::Analyse(std::string output, std::string reference){
+void OfflineCalibOutputTrack::Analyse(const std::string& output, const std::string& reference){
 
 	std::cout << "Analyse()" << std::endl;
 	std::string logfilename = output  + ".log";	
 
 	std::vector<std::string> references;
-	references.push_back("ChargeSharingConstants-Model");
+	references.emplace_back("ChargeSharingConstants-Model");
 	m_Calibration->Analyze("ChargeSharingConstants",references);
 
 
@@ -191,7 +192,7 @@ void OfflineCalibOutputTrack::Analyse(std::string output, std::string reference)
 
 	standard_htmlfile.close();
 	
-	TFile *ref_file = 0;
+	TFile *ref_file = nullptr;
 	if(reference != ""){
 		ref_file = TFile::Open(reference.c_str(),"READ");
 	}
@@ -200,14 +201,14 @@ void OfflineCalibOutputTrack::Analyse(std::string output, std::string reference)
 	m_ResEtaValid->Analyze(ref_file);
 	m_PullEtaValid->Analyze(ref_file);
 	m_Validation->Analyze(ref_file);
-	if(ref_file != 0 && ref_file->IsOpen()) ref_file->Close();
+	if(ref_file != nullptr && ref_file->IsOpen()) ref_file->Close();
 	delete ref_file;
 
 	myhtmlfile.close();
 	
 	std::string histofilename = output  + ".root";
 	TFile *histofile = TFile::Open(histofilename.c_str(),"RECREATE");
-	if(histofile !=0 ){
+	if(histofile !=nullptr ){
 		m_Calibration->Write();
 		m_Validation->Write();
 		TDirectory *old = gDirectory;
diff --git a/InnerDetector/InDetValidation/PixelRTT/src/ResPullValidation.cxx b/InnerDetector/InDetValidation/PixelRTT/src/ResPullValidation.cxx
index e77b1b47899e..8d7b76b0b98c 100644
--- a/InnerDetector/InDetValidation/PixelRTT/src/ResPullValidation.cxx
+++ b/InnerDetector/InDetValidation/PixelRTT/src/ResPullValidation.cxx
@@ -1,16 +1,17 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ResPullValidation_C
 #define ResPullValidation_C
 
-#include <vector>
-#include <string>
 #include <cmath>
 #include <iostream>
 #include <sstream>
 #include <stdexcept>
+#include <string>
+#include <utility>
+#include <vector>
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -25,8 +26,8 @@
 
 namespace PixelValid{
 
-ResPullValidation::ResPullValidation(std::string etaORphi, std::string pullORres, std::string cosmicORbeam):
-	m_respullname(pullORres),m_anglename(etaORphi){
+ResPullValidation::ResPullValidation(std::string etaORphi, std::string pullORres, const std::string& cosmicORbeam):
+	m_respullname(std::move(pullORres)),m_anglename(std::move(etaORphi)){
 
 
 	if(cosmicORbeam != "cosmic"){
@@ -44,14 +45,14 @@ ResPullValidation::ResPullValidation(std::string etaORphi, std::string pullORres
 	// first division (common to all!):
 	int nlayerBins = 6;
 	double *layerBins = IntegerBins(nlayerBins);
-	NameDiv.push_back("layer");
+	NameDiv.emplace_back("layer");
 	NDiv.push_back(nlayerBins);
 	BinsDiv.push_back(layerBins);
 	
 	// second division:
 	int nclusterSizeBins = 3;
 	double clusterSizeBins[4] = {2,3,4,10};
-	NameDiv.push_back("clustersize");
+	NameDiv.emplace_back("clustersize");
 	NDiv.push_back(nclusterSizeBins);
 	BinsDiv.push_back(clusterSizeBins);
 	
@@ -172,7 +173,7 @@ bool ResPullValidation::Fill(Int_t Layer, Double_t GeVTrkPt, Double_t Angle,
 	if(m_datatype == "cosmic") HighPtRes = 1;
 	else if(m_anglename == "phi") HighPtRes=0.05;
 	else HighPtRes=0.5;
-	if( fabs(Residual) < sqrt((0.5/GeVTrkPt)*(0.5/GeVTrkPt)
+	if( std::abs(Residual) < sqrt((0.5/GeVTrkPt)*(0.5/GeVTrkPt)
 				+ HighPtRes*HighPtRes) ){
                 std::vector<Double_t> Pars(3);
 		Pars[1] = ClusterSize;
@@ -192,14 +193,14 @@ int ResPullValidation::Analyze(TDirectory *ref_file){
 
 	TDirectory *old = gDirectory;
 
-	ResPullValidation *reference = 0;
-	if(ref_file != 0 ){
+	ResPullValidation *reference = nullptr;
+	if(ref_file != nullptr ){
 		ref_file->cd();
 		reference = new ResPullValidation(m_anglename,m_respullname);
 		reference->Read();
 	}
 
-	char *currpath = getcwd(NULL,0);
+	char *currpath = getcwd(nullptr,0);
         if (mkdir(m_globaldirname.c_str(),S_IRWXU | S_IRWXG | S_IRWXO)!=0) {
           std::stringstream message;
           message << "Failed to create directory: " << m_globaldirname;
@@ -222,7 +223,7 @@ int ResPullValidation::Analyze(TDirectory *ref_file){
 		swap->SetMarkerColor(4);
 		swap->SetMarkerStyle(27);
 		swap->Draw("P");
-		if(reference != 0 ){
+		if(reference != nullptr ){
 			RMSProfile *swap1 = reference->GetPtProfile(i);
 			swap1->SetLineColor(2);
 			swap1->SetMarkerColor(2);
@@ -243,7 +244,7 @@ int ResPullValidation::Analyze(TDirectory *ref_file){
 		swap->SetMarkerColor(4);
 		swap->SetMarkerStyle(27);
 		swap->Draw("P");
-		if(reference != 0 ){
+		if(reference != nullptr ){
 			RMSProfile *swap1 = reference->GetAngleProfile(i);
 			swap1->SetLineColor(2);
 			swap1->SetMarkerColor(2);
@@ -265,7 +266,7 @@ int ResPullValidation::Analyze(TDirectory *ref_file){
 		swap->SetMarkerColor(4);
 		swap->SetMarkerStyle(27);
 		swap->Draw("P");
-		if(reference != 0 ){
+		if(reference != nullptr ){
 			TH1D *swap1 = reference->GetHistogram(i);
 			swap1->SetLineColor(2);
 			swap1->SetMarkerColor(2);
@@ -277,7 +278,7 @@ int ResPullValidation::Analyze(TDirectory *ref_file){
 		delete c1;
 	}
 
-	if(currpath==NULL) {
+	if(currpath==nullptr) {
           std::stringstream message;
           message << "Invalid current directory! ";
           throw std::runtime_error(message.str());
diff --git a/InnerDetector/InDetValidation/PixelRTT/src/TrackValidation.cxx b/InnerDetector/InDetValidation/PixelRTT/src/TrackValidation.cxx
index 589120816c6f..58487a298701 100644
--- a/InnerDetector/InDetValidation/PixelRTT/src/TrackValidation.cxx
+++ b/InnerDetector/InDetValidation/PixelRTT/src/TrackValidation.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
 */
 
 #ifndef CosmicTrackValidation_C
@@ -36,7 +36,7 @@ CosmicTrackValidation::CosmicTrackValidation(){
 	// first division (common to all!):
 	int nlayerBins = 6;
 	double *layerBins = IntegerBins(nlayerBins);
-	NameDiv.push_back("layer");
+	NameDiv.emplace_back("layer");
 	NDiv.push_back(nlayerBins);
 	BinsDiv.push_back(layerBins);
 	
@@ -143,7 +143,7 @@ bool CosmicTrackValidation::Fill(Int_t Layer, Double_t GeVTrkPt, Double_t Angle,
 	//float HighPtRes=0;
 	//if(anglename == "phi") HighPtRes=0.01;
 	//else HighPtRes=0.1;
-	//if( fabs(Residual) < sqrt((0.5/GeVTrkPt)*(0.5/GeVTrkPt) 
+	//if( std::abs(Residual) < sqrt((0.5/GeVTrkPt)*(0.5/GeVTrkPt) 
         //    + 5*HighPtRes*5*HighPtRes) ){
 		passed = kTRUE;
                 std::vector<Double_t> Pars(3);
@@ -168,15 +168,15 @@ int CosmicTrackValidation::Analyze(TDirectory *ref_file){
 	TCanvas **c1;	
 	int nplots = PlotAll(&c1,0,"*h",1);
 
-	CosmicTrackValidation *reference = 0;
-	if(ref_file != 0 ){
+	CosmicTrackValidation *reference = nullptr;
+	if(ref_file != nullptr ){
 		ref_file->cd();
 		reference = new CosmicTrackValidation();
 		reference->Read();
 		reference->PlotAll(&c1,nplots,"E1 same",2);
 	}
 
-	char *currpath = getcwd(NULL,0);
+	char *currpath = getcwd(nullptr,0);
         if (mkdir(m_globaldirname.c_str(),S_IRWXU | S_IRWXG | S_IRWXO)!=0) {
           std::stringstream message;
           message << "Failed to create directory: " << m_globaldirname;
@@ -197,7 +197,7 @@ int CosmicTrackValidation::Analyze(TDirectory *ref_file){
 	delete[] c1;
         delete reference;
 
-        if(currpath==NULL) {
+        if(currpath==nullptr) {
           std::stringstream message;
           message << "Invalid current directory! ";
           throw std::runtime_error(message.str());
@@ -225,7 +225,7 @@ int CosmicTrackValidation::PlotAll(TCanvas ***c1, int ncanvas, Option_t* option,
 	int npthistograms =  m_PtHistogram->GetNhistos();
 	int nhistos =  npthistos + nanglehistos + netahistos + nanglehistograms + netahistograms + npthistograms;
 
-	if(ncanvas == 0 || *c1 == 0){
+	if(ncanvas == 0 || *c1 == nullptr){
 		*c1 = new TCanvas*[nhistos];
 		ncanvas = nhistos;
 		for(int i = 0 ; i < ncanvas ; i++) (*c1)[i] = new TCanvas();
-- 
GitLab