diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx
index f7b4e3d8138b29605cc06257e78569977c9e8f4f..c58c63c9e4bee08a1b02a8f1cf29524da97ecd4c 100644
--- a/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx
+++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // System include(s):
@@ -17,7 +17,6 @@
 // Local include(s):
 #include "xAODRootAccess/Init.h"
 #include "xAODRootAccess/MakeTransientTree.h"
-#include "xAODRootAccess/tools/ReturnCheck.h"
 #include "xAODRootAccess/tools/Message.h"
 
 int main() {
@@ -26,7 +25,10 @@ int main() {
    static const char* APP_NAME = "ut_xaodrootaccess_transtree_test";
 
    // Initialise the environment:
-   RETURN_CHECK( APP_NAME, xAOD::Init( APP_NAME ) );
+   if( ! xAOD::Init( APP_NAME ).isSuccess() ) {
+      ::Error( APP_NAME, XAOD_MESSAGE( "Failed to call xAOD::Init()" ) );
+      return 1;
+   }
 
    // Open it using a TFile:
    std::unique_ptr< ::TFile > ifile( ::TFile::Open( "$ASG_TEST_FILE_MC",
diff --git a/DataQuality/GoodRunsLists/CMakeLists.txt b/DataQuality/GoodRunsLists/CMakeLists.txt
index 40364193734d17cd5ebaaa87188dcd1478b20142..cc83d9c442b469eae166e48be591a1647ec18510 100644
--- a/DataQuality/GoodRunsLists/CMakeLists.txt
+++ b/DataQuality/GoodRunsLists/CMakeLists.txt
@@ -15,12 +15,9 @@ atlas_add_root_dictionary( GoodRunsListsLib
    GoodRunsLists/DQHelperFunctions.h Root/LinkDef.h
    EXTERNAL_PACKAGES LibXml2 ROOT )
 
-if( NOT XAOD_STANDALONE )
-   if( XAOD_ANALYSIS )
-     set( extra_libs )
-   else()
-     set( extra_libs DerivationFrameworkInterfaces )
-   endif()
+set( extra_libs DerivationFrameworkInterfaces )
+if( XAOD_STANDALONE )
+   set( extra_libs )
 endif()
 
 atlas_add_library( GoodRunsListsLib
diff --git a/DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx b/DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx
index 38d0f9564ea22eacffd7af148dc1df66c6b43c56..afc0afd744c961cb1fb20ede5c1bde655f54777a 100644
--- a/DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx
+++ b/DataQuality/GoodRunsLists/src/GoodRunsListSelectorTool.cxx
@@ -1,5 +1,3 @@
-#ifndef XAOD_ANALYSIS
-
 /*
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
@@ -24,7 +22,7 @@
 
 using namespace std;
 
-GoodRunsListSelectorTool::GoodRunsListSelectorTool( const std::string& type, const std::string& name, const IInterface* parent ) 
+GoodRunsListSelectorTool::GoodRunsListSelectorTool( const std::string& type, const std::string& name, const IInterface* parent )
  : AthAlgTool( type, name, parent )
  , m_reader(0)
  , m_boolop(0)
@@ -66,7 +64,7 @@ GoodRunsListSelectorTool::~GoodRunsListSelectorTool()
 }
 
 
-StatusCode 
+StatusCode
 GoodRunsListSelectorTool::queryInterface( const InterfaceID& riid, void** ppvIf )
 {
   if ( riid == IGoodRunsListSelectorTool::interfaceID() )  {
@@ -126,7 +124,7 @@ GoodRunsListSelectorTool::initialize()
   /// start reading xml files
   if ( !m_goodrunslistVec.empty() ) {
     m_reader->Reset();
-    for (itr=m_goodrunslistVec.begin(); itr!=m_goodrunslistVec.end() && !m_usecool; ++itr) { 
+    for (itr=m_goodrunslistVec.begin(); itr!=m_goodrunslistVec.end() && !m_usecool; ++itr) {
       //const char* fname;
       std::string fname;
       if ( itr->find("/")==0 || itr->find("$")==0 || itr->find(".")==0 || itr->find(":")!=string::npos )  {
@@ -163,8 +161,8 @@ GoodRunsListSelectorTool::initialize()
 }
 
 
-bool 
-GoodRunsListSelectorTool::passEvent(const EventIDBase& pEvent) 
+bool
+GoodRunsListSelectorTool::passEvent(const EventIDBase& pEvent)
 {
   ATH_MSG_DEBUG ("passEvent() ");
 
@@ -224,7 +222,7 @@ GoodRunsListSelectorTool::passThisRunLB( const std::vector<std::string>& grlname
   if (m_passthrough) {
     ATH_MSG_DEBUG ("passThisRunLB() :: Pass through mode.");
     pass = true;
-  } 
+  }
   /// decide from XML files
   else {
     pass = this->passRunLB(runNumber,lumiBlockNr,grlnameVec,brlnameVec);
@@ -245,9 +243,9 @@ GoodRunsListSelectorTool::passRunLB( int runNumber, int lumiBlockNr,
   if (m_passthrough) {
     ATH_MSG_DEBUG ("passRunLB() :: Pass through mode.");
     return true;
-  } 
+  }
 
-  /// decision based on merged blackrunslist 
+  /// decision based on merged blackrunslist
   if ( m_rejectanybrl && m_eventselectormode ) {
     if ( m_brlcollection->HasRunLumiBlock(runNumber,lumiBlockNr) ) {
       ATH_MSG_DEBUG ("passRunLB() :: Event rejected by (_any_ of) merged black runs list.");
@@ -261,7 +259,7 @@ GoodRunsListSelectorTool::passRunLB( int runNumber, int lumiBlockNr,
       brlitr = m_brlcollection->find(brlnameVec[i]);
       if (brlitr!=m_brlcollection->end())
         reject = brlitr->HasRunLumiBlock(runNumber,lumiBlockNr);
-    }    
+    }
     if (reject) {
       ATH_MSG_DEBUG ("passRunLB() :: Event rejected by specific black runs list.");
       return false;
@@ -276,23 +274,23 @@ GoodRunsListSelectorTool::passRunLB( int runNumber, int lumiBlockNr,
       grlitr = m_grlcollection->find(grlnameVec[i]);
       if (grlitr!=m_grlcollection->end())
         pass = grlitr->HasRunLumiBlock(runNumber,lumiBlockNr);
-    } 
+    }
     if (pass) {
       ATH_MSG_DEBUG ("passRunLB() :: Event accepted by specific good runs list.");
       return true;
-    }    
-  /// decision based on merged goodrunslist 
+    }
+  /// decision based on merged goodrunslist
   } else if (m_grlcollection->HasRunLumiBlock(runNumber,lumiBlockNr)) {
     ATH_MSG_DEBUG ("passRunLB() :: Event accepted by (_any_ of) merged good runs list.");
     return true;
-  } 
+  }
 
   ATH_MSG_DEBUG ("passRunLB() :: Event rejected, not in (any) good runs list.");
   return false;
 }
 
 
-StatusCode 
+StatusCode
 GoodRunsListSelectorTool::finalize()
 {
   ATH_MSG_DEBUG ("finalize() ");
@@ -305,7 +303,7 @@ GoodRunsListSelectorTool::fileExists(const char* fileName)
 {
   struct stat info;
   int ret = -1;
- 
+
   //get the file attributes
   ret = stat(fileName, &info);
 
@@ -313,7 +311,7 @@ GoodRunsListSelectorTool::fileExists(const char* fileName)
     /// stat() is able to get the file attributes, so the file obviously exists
     /// if filesize==0 assume the copying failed.
     //if (info.st_size == 0) return false;
-    //else 
+    //else
     return true;
   } else {
     /// stat() is not able to get the file attributes, so the file obviously does not exist.
@@ -322,7 +320,7 @@ GoodRunsListSelectorTool::fileExists(const char* fileName)
 }
 
 
-bool 
+bool
 GoodRunsListSelectorTool::registerGRLSelector(const std::string& name, const std::vector<std::string>& grlnameVec, const std::vector<std::string>& brlnameVec)
 {
   if (m_registry.find(name)!=m_registry.end()) {
@@ -358,5 +356,3 @@ GoodRunsListSelectorTool::registerGRLSelector(const std::string& name, const std
   m_registry[name] = vvPair(grlnameVec,brlnameVec);
   return true;
 }
-
-#endif // XAOD_ANALYSIS
diff --git a/Event/xAOD/xAODCaloEventAthenaPool/CMakeLists.txt b/Event/xAOD/xAODCaloEventAthenaPool/CMakeLists.txt
index 94e47eebce8ad8af75fb63ae87971f985f75488d..c9651a3619579e8522eb4e3bffe3dda5f2f9d5c2 100644
--- a/Event/xAOD/xAODCaloEventAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODCaloEventAthenaPool/CMakeLists.txt
@@ -3,6 +3,12 @@
 # Declare the package name:
 atlas_subdir( xAODCaloEventAthenaPool )
 
+# Extra libraries, depending on the build environment.
+set( extra_libs )
+if( NOT XAOD_ANALYSIS )
+   set( extra_libs CaloInterfaceLib )
+endif()
+
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODCaloEventAthenaPoolPoolCnv
    src/*.h src/*.cxx
@@ -13,9 +19,8 @@ atlas_add_poolcnv_library( xAODCaloEventAthenaPoolPoolCnv
    TYPES_WITH_NAMESPACE xAOD::CaloClusterContainer xAOD::CaloClusterAuxContainer
                         xAOD::CaloTowerContainer xAOD::CaloTowerAuxContainer
    CNV_PFX xAOD
-   LINK_LIBRARIES CaloInterfaceLib AthContainers AthenaKernel
-                  AthenaPoolCnvSvcLib AthenaPoolUtilities xAODCaloEvent
-                  GaudiKernel )
+   LINK_LIBRARIES AthContainers AthenaKernel AthenaPoolCnvSvcLib
+                  AthenaPoolUtilities xAODCaloEvent GaudiKernel ${extra_libs} )
 
 # Install files from the package.
 atlas_install_joboptions( share/*.py )
diff --git a/Event/xAOD/xAODTracking/Root/NeutralParticle_v1.cxx b/Event/xAOD/xAODTracking/Root/NeutralParticle_v1.cxx
index a1e966310951471acfac32ef0bdd07e79c65fd26..e3e1bd851b8c4618af5e80177c6f0ba45832046c 100644
--- a/Event/xAOD/xAODTracking/Root/NeutralParticle_v1.cxx
+++ b/Event/xAOD/xAODTracking/Root/NeutralParticle_v1.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // Misc includes
@@ -30,9 +30,9 @@ namespace xAOD {
 
     if(!hasStore() ) makePrivateStore();
     this->IParticle::operator=( tp );
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
     m_perigeeParameters.reset();
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
     return *this;
   }
 
@@ -107,11 +107,11 @@ namespace xAOD {
   }
 
   void NeutralParticle_v1::setDefiningParameters(float d0, float z0, float phi0, float theta, float oneOverP) {
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
     if(m_perigeeParameters.isValid()) {
       m_perigeeParameters.reset();
     }
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
     static const Accessor< float > acc1( "d0" );
     acc1( *this ) = d0;
 
@@ -131,11 +131,11 @@ namespace xAOD {
   }
 
   void NeutralParticle_v1::setDefiningParametersCovMatrix(const xAOD::ParametersCovMatrix_t& cov){
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
     if(m_perigeeParameters.isValid()) {
       m_perigeeParameters.reset();
     }
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
 
     static const Accessor< std::vector<float> > acc( "definingParametersCovMatrix" );
     std::vector<float>& v = acc(*this);
@@ -184,7 +184,7 @@ namespace xAOD {
     acc3( *this ) = z;
   }
 
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
   const Trk::NeutralPerigee& NeutralParticle_v1::perigeeParameters() const {
 
     // Require the cache to be valid and check if the cached pointer has been set
@@ -210,12 +210,12 @@ namespace xAOD {
     m_perigeeParameters.set(tmpPerigeeParameters);
     return *(m_perigeeParameters.ptr());
   }
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
 
   void NeutralParticle_v1::resetCache() {
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
      m_perigeeParameters.reset();
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
   }
 
 } // namespace xAOD
diff --git a/Event/xAOD/xAODTracking/Root/TrackParticle_v1.cxx b/Event/xAOD/xAODTracking/Root/TrackParticle_v1.cxx
index 293206b7db312f7f7dcf1c7276cd22304848c209..862de111f020e9a736bb487482d0b3e350857406 100644
--- a/Event/xAOD/xAODTracking/Root/TrackParticle_v1.cxx
+++ b/Event/xAOD/xAODTracking/Root/TrackParticle_v1.cxx
@@ -61,10 +61,10 @@ namespace xAOD {
        makePrivateStore();
     }
     this->IParticle::operator=( tp );
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
     // assume that this copy will create new cache as needed
     m_perigeeParameters.reset();
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
     return *this;
   }
 
@@ -149,12 +149,12 @@ namespace xAOD {
   }
 
   void TrackParticle_v1::setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP) {
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
     // reset perigee cache if existing
     if(m_perigeeParameters.isValid()) {
       m_perigeeParameters.reset();
     }
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
     static const Accessor< float > acc1( "d0" );
     acc1( *this ) = d0;
 
@@ -180,12 +180,12 @@ namespace xAOD {
 
   void TrackParticle_v1::setDefiningParametersCovMatrix(const xAOD::ParametersCovMatrix_t& cov){
 
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
     // reset perigee cache if existing
     if(m_perigeeParameters.isValid()) {
       m_perigeeParameters.reset();
     }
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
 
     // Extract the diagonal elements from the matrix.
     std::vector< float > diagVec;
@@ -437,7 +437,7 @@ namespace xAOD {
     acc3( *this ) = z;
   }
 
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
   const Trk::Perigee& TrackParticle_v1::perigeeParameters() const {
 
     // Require the cache to be valid and check if the cached pointer has been set
@@ -470,7 +470,7 @@ namespace xAOD {
     m_perigeeParameters.set(tmpPerigeeParameters);
     return *(m_perigeeParameters.ptr());
   }
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
 
   AUXSTORE_PRIMITIVE_GETTER(TrackParticle_v1, float, chiSquared)
   AUXSTORE_PRIMITIVE_GETTER(TrackParticle_v1, float, numberDoF)
@@ -615,8 +615,8 @@ namespace xAOD {
     acc( *this ).at(index) = static_cast<uint8_t>(pos);
   }
 
-#ifndef XAOD_STANDALONE
-  const Trk::CurvilinearParameters TrackParticle_v1::curvilinearParameters(unsigned int index) const {    
+#ifndef XAOD_ANALYSIS
+  const Trk::CurvilinearParameters TrackParticle_v1::curvilinearParameters(unsigned int index) const {
 
     static const Accessor< std::vector<float>  > acc( "trackParameterCovarianceMatrices" );
     unsigned int offset = index*15;
@@ -631,7 +631,7 @@ namespace xAOD {
 
     return param;
   }
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
 
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(TrackParticle_v1, uint8_t, xAOD::TrackProperties,trackProperties)
   AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(TrackParticle_v1, uint8_t, xAOD::TrackProperties,trackProperties, setTrackProperties)
@@ -687,7 +687,7 @@ namespace xAOD {
   }
 
 
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
    /// The function will return an invalid ElementLink in case nothing was set
    /// for it yet. This is to avoid users having to always check both for
    /// the decoration being available, and the link being valid.
@@ -733,13 +733,13 @@ namespace xAOD {
       }
 
       return *( acc( *this ) );
-   } 
-#endif // not XAOD_STANDALONE
-   
+   }
+#endif // not XAOD_ANALYSIS
+
    void TrackParticle_v1::resetCache(){
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
      m_perigeeParameters.reset();
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
    }
 
 } // namespace xAOD
diff --git a/Event/xAOD/xAODTracking/Root/Vertex_v1.cxx b/Event/xAOD/xAODTracking/Root/Vertex_v1.cxx
index 3569fe59887aba3b09c9ea1207a3cc88da811db3..85c9c4d601056a8d084f805f9ea0e0f85d4f8f22 100644
--- a/Event/xAOD/xAODTracking/Root/Vertex_v1.cxx
+++ b/Event/xAOD/xAODTracking/Root/Vertex_v1.cxx
@@ -18,12 +18,12 @@ namespace xAOD {
 
    Vertex_v1::Vertex_v1()
       : SG::AuxElement(),
-        m_position(), 
+        m_position(),
         m_covariance() {
 
    }
 
-   Vertex_v1::Vertex_v1( const Vertex_v1& other ) 
+   Vertex_v1::Vertex_v1( const Vertex_v1& other )
       : SG::AuxElement(other),
         m_position( other.m_position ),
         m_covariance( other.m_covariance ){
@@ -157,7 +157,7 @@ namespace xAOD {
    AUXSTORE_PRIMITIVE_SETTER_WITH_CAST( Vertex_v1, short, VxType::VertexType,
                                         vertexType, setVertexType )
 
-#if ( ! defined(XAOD_STANDALONE) ) && ( ! defined(XAOD_MANACORE) )
+#ifndef XAOD_ANALYSIS
    /// Helper object for implementing the vxTrackAtVertex functions
    static const SG::AuxElement::Accessor< std::vector< Trk::VxTrackAtVertex > >
    vxVertAcc( "vxTrackAtVertex" );
@@ -202,7 +202,7 @@ namespace xAOD {
 
       return vxVertAcc.isAvailable( *this );
    }
-#endif // not XAOD_STANDALONE and not XAOD_MANACORE
+#endif // not XAOD_ANALYSIS
 
    /////////////////////////////////////////////////////////////////////////////
    //
diff --git a/Event/xAOD/xAODTracking/xAODTracking/ParticleCaloExtension.h b/Event/xAOD/xAODTracking/xAODTracking/ParticleCaloExtension.h
index 2e403e4086713ec2d44ac40c10ea2feb0e50d233..374b4fbda9ca1f0a1f5fa81a0812a7b9d5e2f1df 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/ParticleCaloExtension.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/ParticleCaloExtension.h
@@ -1,19 +1,17 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef XAOD_PARTICLECALOEXTENSION_H 
+#ifndef XAOD_PARTICLECALOEXTENSION_H
 #define XAOD_PARTICLECALOEXTENSION_H
 
-#include "xAODTracking/TrackingPrimitives.h" 
+#include "xAODTracking/TrackingPrimitives.h"
 #include "EventPrimitives/EventPrimitivesHelpers.h"
 
-#ifndef XAOD_STANDALONE
-#ifndef XAOD_MANACORE
+#ifndef XAOD_ANALYSIS
 // Athena includes
 #include "TrkParameters/TrackParameters.h"
-#endif // not XAOD_MANACORE
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
 
 #include <vector>
 class CaloCell;
@@ -24,9 +22,9 @@ namespace xAOD {
   class ParticleCaloExtension {
   public:
     /** constructor taking calo extrapolation as input. All vectors should be of the same length */
-    ParticleCaloExtension( float charge, 
-                           std::vector<std::vector<float> >&& parameters, 
-                           std::vector<std::vector<float> >&& parametersCovariance, 
+    ParticleCaloExtension( float charge,
+                           std::vector<std::vector<float> >&& parameters,
+                           std::vector<std::vector<float> >&& parametersCovariance,
                            std::vector<int>&& identifiers );
 
     /** destructor */
@@ -38,8 +36,8 @@ namespace xAOD {
     /** no assignment operator */
     ParticleCaloExtension& operator=(const ParticleCaloExtension&) = delete;
 
-    /// Returns the number of additional parameters stored in the Particle. 
-    size_t numberOfParameters() const; 
+    /// Returns the number of additional parameters stored in the Particle.
+    size_t numberOfParameters() const;
 
     /// Returns the track parameter vector at 'index'.
     const CurvilinearParameters_t trackParameters(unsigned int index) const;
@@ -50,11 +48,11 @@ namespace xAOD {
     /// @brief fill the matrix with the covariance at position 'index', returns false if the parameters at 'index' does not have a covariance
     bool trackParameterCovarianceMatrix(ParametersCovMatrix_t& matrix, unsigned int index) const;
 
-#if ( ! defined(XAOD_STANDALONE) ) && ( ! defined(XAOD_MANACORE) )
+#ifndef XAOD_ANALYSIS
     /// @brief Returns a curvilinear representation of the parameters at 'index'.
-    /// @note This is only available in Athena. 
-    const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const;          
-#endif // not XAOD_STANDALONE and not XAOD_MANACORE
+    /// @note This is only available in Athena.
+    const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const;
+#endif // not XAOD_ANALYSIS
 
     /** return whether cells were already associated or not */
     bool cellsAreAssociated() const;
@@ -77,13 +75,13 @@ namespace xAOD {
 
     /// identifiers of the intersections with detector layers
     std::vector<int> m_identifiers;
-   
+
     /** cell information */
     bool                   m_cellsAreSet; // bool to store whether already set
     std::vector<CaloCell*> m_caloCells;   // vector of cells
   };
 
-  /// Returns the number of additional parameters stored in the Particle. 
+  /// Returns the number of additional parameters stored in the Particle.
   inline size_t ParticleCaloExtension::numberOfParameters() const {
     return m_parameters.size();
   }
@@ -94,7 +92,7 @@ namespace xAOD {
     tmp << m_parameters[index][0],m_parameters[index][1],m_parameters[index][2],
       m_parameters[index][3],m_parameters[index][4],m_parameters[index][5];
     return tmp;
-  } 
+  }
 
   inline bool ParticleCaloExtension::trackParameterCovarianceMatrix(ParametersCovMatrix_t& cov, unsigned int index) const {
     const std::vector<float>& covVec = m_parametersCovariance[index];
@@ -105,12 +103,12 @@ namespace xAOD {
     }
     return true;
   }
-  
+
   /// @brief Return the ParameterPosition of the parameters at 'index'.
   inline int ParticleCaloExtension::parameterIdentifier(unsigned int index) const {
     return m_identifiers[index];
   }
-  
+
   inline bool ParticleCaloExtension::cellsAreAssociated() const {
     return m_cellsAreSet;
   }
@@ -124,13 +122,13 @@ namespace xAOD {
     m_cellsAreSet=true;
   }
 
-#if ( ! defined(XAOD_STANDALONE) ) && ( ! defined(XAOD_MANACORE) )
-  inline const Trk::CurvilinearParameters ParticleCaloExtension::curvilinearParameters(unsigned int index) const {    
+#ifndef XAOD_ANALYSIS
+  inline const Trk::CurvilinearParameters ParticleCaloExtension::curvilinearParameters(unsigned int index) const {
 
     // copy the correct values into the temp matrix
     ParametersCovMatrix_t* cov = 0;
     if( !m_parametersCovariance[index].empty() ) {
-      cov = new ParametersCovMatrix_t(); 
+      cov = new ParametersCovMatrix_t();
       trackParameterCovarianceMatrix(*cov,index);
     }
     // retrieve the parameters to build the curvilinear frame
@@ -140,7 +138,7 @@ namespace xAOD {
 
     return param;
   }
-#endif // not XAOD_STANDALONE and not XAOD_MANACORE
+#endif // not XAOD_ANALYSIS
 
 }
 
diff --git a/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticleAuxContainer_v1.h b/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticleAuxContainer_v1.h
index 2471aad6d1d16a7fb908e020b9c94ee36806adc1..da942e9e4bd82ac7b2ba80f3c9f5cc43245ec517 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticleAuxContainer_v1.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticleAuxContainer_v1.h
@@ -1,31 +1,19 @@
 // Dear emacs, this is -*- c++ -*-
-
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id: NeutralParticleAuxContainer_v1.h 573493 2013-12-03 13:05:51Z salzburg $
 #ifndef XAODTRACKING_VERSIONS_NEUTRALPARTICLEAUXCONTAINER_V1_H
 #define XAODTRACKING_VERSIONS_NEUTRALPARTICLEAUXCONTAINER_V1_H
- 
+
 // System include(s):
 #include <stdint.h>
 #include <vector>
- 
+
 // EDM include(s):
 #include "xAODCore/AuxContainerBase.h"
-#include "AthLinks/ElementLink.h"
-#ifndef XAOD_STANDALONE
-#ifndef XAOD_MANACORE
-#include "TrkTrack/TrackCollection.h"
-#endif // not XAOD_MANACORE
-#endif // not XAOD_STANDALONE
-
-// Want to be able to switch this off and on for the moment
-//#define XAODTRACKING_SUMMARYDYNAMIC      
 
 namespace xAOD {
- 
+
    /// Temporary container used until we have I/O for AuxStoreInternal
    ///
    /// This class is meant to serve as a temporary way to provide an auxiliary
@@ -35,17 +23,17 @@ namespace xAOD {
    /// @author Andreas Salzburger
    ///
    class NeutralParticleAuxContainer_v1 : public AuxContainerBase {
- 
+
    public:
       /// Default constructor
       NeutralParticleAuxContainer_v1();
- 
+
    private:
       /// Dumps contents (for debugging)
       void dump() const;
-        
+
       /// @name Defining parameters (perigee)
-      /// @{      
+      /// @{
       std::vector< float >                d0;
       std::vector< float >                z0;
       std::vector< float >                phi;
@@ -57,12 +45,11 @@ namespace xAOD {
       std::vector< float >                vx;
       std::vector< float >                vy;
       std::vector< float >                vz;
- 
 
    }; // class NeutralParticleAuxContainer_v1
- 
+
 } // namespace xAOD
- 
+
 #include "xAODCore/BaseInfo.h"
 SG_BASE( xAOD::NeutralParticleAuxContainer_v1, xAOD::AuxContainerBase );
 
diff --git a/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticle_v1.h b/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticle_v1.h
index e35519f6576b881f78ed32615e036b6800a3a29c..ed8187a3a2ac375bd6f2cd20917fc577af9a321a 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticle_v1.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticle_v1.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef XAODTRACKING_VERSIONS_NEUTRALPARTICLE_V1_H
@@ -15,15 +15,15 @@
 
 // xAOD include(s):
 #include "xAODBase/IParticle.h"
-#include "xAODTracking/TrackingPrimitives.h" 
-#include "xAODTracking/VertexContainerFwd.h" 
+#include "xAODTracking/TrackingPrimitives.h"
+#include "xAODTracking/VertexContainerFwd.h"
 
 #include <bitset>
 #include <stdint.h>
 
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
 #include "TrkNeutralParameters/NeutralParameters.h"
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
 
 // ROOT include(s):
 #include "Math/Vector4D.h"
@@ -36,7 +36,7 @@ namespace xAOD {
   ///
   /// @author Andreas Salzburger <Andreas.Salzburger@cern.ch>
   /// @nosubgrouping
-  
+
   class NeutralParticle_v1 : public IParticle {
 
     public:
@@ -49,7 +49,7 @@ namespace xAOD {
       NeutralParticle_v1(const NeutralParticle_v1& o );
       /// Assignment operator. This can involve creating and copying an Auxilary store, and so should be used sparingly.
       NeutralParticle_v1& operator=(const NeutralParticle_v1& tp );
-      
+
       /// @name xAOD::IParticle functions
       /// @{
       /// The transverse momentum (\f$p_T\f$) of the particle.
@@ -64,10 +64,10 @@ namespace xAOD {
       virtual double           e() const;
       /// The true rapidity (y) of the particle.
       virtual double           rapidity() const;
-      
+
       /// Definition of the 4-momentum type.
       typedef IParticle::FourMom_t FourMom_t;
-      
+
       /// The full 4-momentum of the particle.
       virtual FourMom_t p4() const;
 
@@ -76,11 +76,11 @@ namespace xAOD {
 
       /// The full 4-momentum of the particle : GenVector form
       GenVecFourMom_t genvecP4() const;
-      
+
       /// The type of the object as a simple enumeration
       virtual Type::ObjectType type() const;
       /// @}
-      
+
       /// @name Defining parameters functions
       /// The 'defining parameters' are key to the concept of a NeutralParticle, and give the values for the IParticle interface
       /// ( pt(), phi(), eta() etc.).
@@ -89,7 +89,7 @@ namespace xAOD {
       /// The parameters are expressed with respect to an origin (returned by vx(), vy() and vy() ), currently intended to be the 'beamspot'.
       /// This origin is expected to be the same for all track particles in a collection (and this may be be enforced).
       /// @{
-      
+
       /// Returns the \f$d_0\f$ parameter
       float d0() const;
       /// Returns the \f$z_0\f$ parameter
@@ -100,22 +100,22 @@ namespace xAOD {
       float theta() const;
       /// Returns the \f$q/p\f$  parameter
       float oneOverP() const;
-      /// @brief Returns a SVector of the Perigee track parameters. 
+      /// @brief Returns a SVector of the Perigee track parameters.
       /// i.e. a vector of
       ///  \f$\left(\begin{array}{c}d_0\\z_0\\\phi_0\\\theta\\q/p\end{array}\right)\f$
       const DefiningParameters_t definingParameters() const;
       /// Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
-      const ParametersCovMatrix_t definingParametersCovMatrix() const;  
+      const ParametersCovMatrix_t definingParametersCovMatrix() const;
       /// Returns the vector of the covariance values - 15 elements
       const std::vector<float>& definingParametersCovMatrixVec() const;
-      
-      /// Set the defining parameters.     
+
+      /// Set the defining parameters.
       void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP);
       /// Set the defining parameters covariance matrix.
       void setDefiningParametersCovMatrix(const ParametersCovMatrix_t& cov);
       /// Set the defining parameters covariance matrix using a length 15 vector.
       void setDefiningParametersCovMatrixVec(const std::vector<float>& cov);
-      
+
       /// The x origin for the parameters.
       float vx() const;
       /// The y origin for the parameters.
@@ -125,24 +125,24 @@ namespace xAOD {
       /// Set the origin for the parameters.
       void setParametersOrigin(float x, float y, float z);
 
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
       /// @brief Returns the Trk::NeutralPerigee track parameters.
       ///
       /// These are defined as:
       ///  \f$\left(\begin{array}{c}d_0\\z_0\\\phi_0\\\theta\\1/p\\\end{array}\right)\f$
-      /// @note This is only available in Athena. 
+      /// @note This is only available in Athena.
       const Trk::NeutralPerigee& perigeeParameters() const;
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
 
       /// Reset the internal cache of the object
       void resetCache();
- 
+
   private:
-#if ( ! defined(XAOD_STANDALONE) ) && ( ! defined(__CLING__) )
+#if ( ! defined(XAOD_ANALYSIS) ) && ( ! defined(__CLING__) )
       /// @brief Cached NeutralPerigee, built from this object.
       /// @note This is only available in Athena.
       CxxUtils::CachedValue<Trk::NeutralPerigee> m_perigeeParameters;
-#endif // not XAOD_STANDALONE and not __CLING__
+#endif // not XAOD_ANALYSIS and not __CLING__
 
     }; // class NeutralParticle_v1
 
diff --git a/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticle_v1.h b/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticle_v1.h
index b2b0a0c24c0b9afc481437347226aa5aa1b5ebe6..c4bbcf0f915e40f101d7fba6163156ac47e8dcbd 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticle_v1.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticle_v1.h
@@ -20,13 +20,13 @@ extern "C" {
 
 // xAOD include(s):
 #include "xAODBase/IParticle.h"
-#include "xAODTracking/TrackingPrimitives.h" 
+#include "xAODTracking/TrackingPrimitives.h"
 
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
 // Athena includes
 #include "TrkParameters/TrackParameters.h"
 #include "TrkTrack/TrackCollection.h"
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
 
 // ROOT include(s):
 #include "Math/Vector4D.h"
@@ -52,7 +52,7 @@ namespace xAOD {
     TrackParticle_v1(const TrackParticle_v1& o );
     /// Assignment operator. This can involve creating and copying an Auxilary store, and so should be used sparingly.
     TrackParticle_v1& operator=(const TrackParticle_v1& tp );
-    
+
       /// @name IParticle functions
       /// @{
         /// The transverse momentum (\f$p_T\f$) of the particle.
@@ -105,7 +105,7 @@ namespace xAOD {
         float theta() const;
         /// Returns the \f$q/p\f$  parameter
         float qOverP() const;
-        /// @brief Returns a SVector of the Perigee track parameters. 
+        /// @brief Returns a SVector of the Perigee track parameters.
         /// i.e. a vector of
         ///  \f$\left(\begin{array}{c}d_0\\z_0\\\phi_0\\\theta\\q/p\end{array}\right)\f$
         DefiningParameters_t definingParameters() const;
@@ -120,7 +120,7 @@ namespace xAOD {
         /// Returns the length 6 vector containing the elements of defining parameters covariance matrix.
         std::vector<float> definingParametersCovMatrixVec() const;
         bool definingParametersCovMatrixOffDiagCompr() const ;
-        /// Set the defining parameters.     
+        /// Set the defining parameters.
         void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP);
         /// Set the defining parameters covariance matrix.
         void setDefiningParametersCovMatrix(const ParametersCovMatrix_t& cov);
@@ -141,22 +141,22 @@ namespace xAOD {
         /// Set the origin for the parameters.
         void setParametersOrigin(float x, float y, float z);
 
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
         /// @brief Returns the Trk::MeasuredPerigee track parameters.
         ///
         /// These are defined as:
         ///  \f$\left(\begin{array}{c}d_0\\z_0\\\phi_0\\\theta\\q/p\\\end{array}\right)\f$
-        /// @note This is only available in Athena. 
+        /// @note This is only available in Athena.
         const Trk::Perigee& perigeeParameters() const;
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
       /// @}
 
       /// @name Curvilinear functions
       /// The set of functions which return other track parameters.
-      /// The remaining track parameters (i.e. not the 'defining parameters') use the 'curvilinear' coordinate system, 
+      /// The remaining track parameters (i.e. not the 'defining parameters') use the 'curvilinear' coordinate system,
       /// and are represented by the parameters @f$(x,y,z,p_x,p_y,p_z)@f$.
       /// The parameters can have an associated local 5x5 error/covariance matrix. They are expressed at various points through the
-      /// detector, which can be determined by the parameterPosition() method.      
+      /// detector, which can be determined by the parameterPosition() method.
       /// @code
       /// // Example code to use parameters
       /// unsigned int index=0;
@@ -165,8 +165,8 @@ namespace xAOD {
       /// }
       /// @endcode
       /// @{
-        /// Returns the number of additional parameters stored in the TrackParticle. 
-        size_t numberOfParameters() const; 
+        /// Returns the number of additional parameters stored in the TrackParticle.
+        size_t numberOfParameters() const;
         /// Returns the track parameter vector at 'index'.
         const CurvilinearParameters_t trackParameters(unsigned int index) const;
         /// Returns the parameter x position, for 'index'.
@@ -180,17 +180,17 @@ namespace xAOD {
         /// Returns the parameter y momentum component, for 'index'.
         float parameterPY(unsigned int index) const;
         /// Returns the parameter z momentum component, for 'index'.
-        float parameterPZ(unsigned int index) const; 
-        /// Set the parameters via the passed vector of vectors. 
+        float parameterPZ(unsigned int index) const;
+        /// Set the parameters via the passed vector of vectors.
         /// The vector<float> should be of size 6: x,y,z,px,py,pz (charge is stored elsewhere)
         void setTrackParameters(std::vector<std::vector<float> >& parameters);
-        /// @brief Returns the TrackParticleCovMatrix_t (covariance matrix) at 'index', 
+        /// @brief Returns the TrackParticleCovMatrix_t (covariance matrix) at 'index',
         /// which corresponds to the parameters at the same index.
         ParametersCovMatrix_t trackParameterCovarianceMatrix(unsigned int index) const;
         /// Set the cov matrix of the parameter at 'index', using a vector of floats.
-        /// The vector @f$\mathrm{v}(a1,a2,a3 ... a_{15})@f$ represents the lower diagonal, i.e. it gives a matrix of 
+        /// The vector @f$\mathrm{v}(a1,a2,a3 ... a_{15})@f$ represents the lower diagonal, i.e. it gives a matrix of
         /// \f$\left(\begin{array}{ccccc} a_1  & a_2  & a_4  & a_7  & a_{11} \\ a_2  & a_3  & a_5  & a_8  & a_{12} \\ a_4  & a_5  & a_6  & a_9  & a_{13} \\ a_7  & a_8  & a_9  & a_{10}  & a_{14} \\ a_{11} & a_{12} & a_{13} & a_{14} & a_{15} \end{array}\right)\f$
-        void setTrackParameterCovarianceMatrix(unsigned int index, std::vector<float>& cov);  
+        void setTrackParameterCovarianceMatrix(unsigned int index, std::vector<float>& cov);
         /// @brief Return the ParameterPosition of the parameters at 'index'.
         xAOD::ParameterPosition parameterPosition(unsigned int index) const;
         /// @brief Function to determine if this TrackParticle contains track parameters at a certain position, and if so, what the 'index' is.
@@ -198,30 +198,30 @@ namespace xAOD {
         /// @param[out] position The location in the detector of the required track parameters.
         /// @return Returns 'true' if the TrackParticle parameters at 'position', returns False otherwise.
         bool indexOfParameterAtPosition(unsigned int& index, ParameterPosition position) const;
-        /// Set the 'position' (i.e. where it is in ATLAS) of the parameter at 'index', using the ParameterPosition enum. 
+        /// Set the 'position' (i.e. where it is in ATLAS) of the parameter at 'index', using the ParameterPosition enum.
         void setParameterPosition(unsigned int index, ParameterPosition pos);
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
         /// @brief Returns a curvilinear representation of the parameters at 'index'.
-        /// @note This is only available in Athena. 
-        const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const;          
-#endif // not XAOD_STANDALONE
+        /// @note This is only available in Athena.
+        const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const;
+#endif // not XAOD_ANALYSIS
 
     /// Returns the radius of the first hit.
     float radiusOfFirstHit() const;
     /// Set the radius of the first hit.
     void setRadiusOfFirstHit(float radius);
-    
+
         /// Returns the offline identifier of the first hit.
     uint64_t identifierOfFirstHit() const;
     /// Set the offline identifier of the first hit.
     void setIdentifierOfFirstHit( uint64_t id);
-    
+
     float beamlineTiltX() const;
     void  setBeamlineTiltX(float tiltX);
-    
+
     float beamlineTiltY() const;
     void  setBeamlineTiltY(float tiltY);
-    
+
     uint32_t hitPattern() const;
     void setHitPattern(uint32_t hitpattern);
 
@@ -239,26 +239,26 @@ namespace xAOD {
         /// Returns the @f$ \chi^2 @f$ of the overall track fit.
         float chiSquared() const;
         /// Returns the number of degrees of freedom of the overall track or vertex fit as float.
-        float  numberDoF() const;   
+        float  numberDoF() const;
         /// Set the 'Fit Quality' information.
-        void setFitQuality(float chiSquared, float numberDoF);   
+        void setFitQuality(float chiSquared, float numberDoF);
       /// @}
 
       /// @name TrackInfo functions
       /// Contains information about the 'fitter' of this Trk::Track / TrackParticle.
-      /// Additionally there is some information about how the e.g. fit was configured. 
+      /// Additionally there is some information about how the e.g. fit was configured.
       /// Also the information on the properties of the  track fit is stored.
       /// @{
         /// Methods setting the TrackProperties.
         void setTrackProperties (const TrackProperties properties) ;
-        /// Method setting the pattern recognition algorithm, using a bitset. 
+        /// Method setting the pattern recognition algorithm, using a bitset.
         /// The bitset should be created using the TrackPatternRecoInfo enum as follows:
         /// @code
         /// const std::bitset<xAOD::NumberOfTrackRecoInfo> patternReco;
         /// patternReco.set(xAOD::Fatras);
         /// @endcode
         void setPatternRecognitionInfo(const std::bitset<xAOD::NumberOfTrackRecoInfo>& patternReco) ;
-        /// Method setting the pattern recognition algorithm, using a 64-bit int (which is faster than using a bitset). 
+        /// Method setting the pattern recognition algorithm, using a 64-bit int (which is faster than using a bitset).
         /// The bit set should be created using the TrackPatternRecoInfo enum as follows:
         /// @code
         /// uint64_t patternReco;
@@ -269,10 +269,10 @@ namespace xAOD {
         void setTrackFitter(const TrackFitter fitter)  ;
         /// Method for setting the particle type, using the ParticleHypothesis enum.
         void setParticleHypothesis(const ParticleHypothesis hypo);
-        ///Access methods for track properties, which returns 'true' 
+        ///Access methods for track properties, which returns 'true'
         /// if a logical AND of the parameter 'proprty' and the stored properties returns true.
-        /// i.e. you do: 
-        /// @code 
+        /// i.e. you do:
+        /// @code
         /// TrackProperties testProperty;
         /// testProperty.set(SOMEPROPERTY);
         /// if (trackParticle.trackProperties(testProperty)) doSomething();
@@ -289,17 +289,17 @@ namespace xAOD {
 
 
         /// Accessor for TrackSummary values.
-        /// If 'information' is stored in this TrackParticle and is of the correct templated type T, 
-        /// then the function fills 'value' and returns 'true', otherwise it returns 'false', and does not touch 'value'. 
+        /// If 'information' is stored in this TrackParticle and is of the correct templated type T,
+        /// then the function fills 'value' and returns 'true', otherwise it returns 'false', and does not touch 'value'.
         /// See below for an example of how this is intended to be used.
         /// @code
         /// int numberOfBLayerHits=0;
         /// if( myParticle.summaryValue(numberOfBLayerHits,xAOD::numberOfBLayerHits) ){
-        ///   ATH_MSG_INFO("Successfully retrieved the integer value, numberOfBLayerHits"); 
+        ///   ATH_MSG_INFO("Successfully retrieved the integer value, numberOfBLayerHits");
         /// }
         /// float numberOfCscPhiHits=0.0; //Wrong! This is actually an int too.
         /// if( !myParticle.summaryValue(numberOfCscPhiHits,xAOD::numberOfCscPhiHits) ){
-        ///   ATH_MSG_INFO("Types must match!"); 
+        ///   ATH_MSG_INFO("Types must match!");
         /// }
         /// @endcode
         /// @param[in] information The information being requested. This is not guaranteed to be stored in all TrackParticles.
@@ -313,26 +313,26 @@ namespace xAOD {
 		///  @copydoc TrackParticle_v1::setSummaryValue(uint8_t& value, const SummaryType &information)
         void setSummaryValue(float& value, const SummaryType &information);
       /// @}
-      
+
       /// @name Links
       /// @{
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
         /// @brief Returns a link (which can be invalid) to the Trk::Track which was used to make this TrackParticle.
-        /// @note This is only available in Athena. 
+        /// @note This is only available in Athena.
         const ElementLink< TrackCollection >& trackLink() const;
         /// @brief Set the link to the original track
         /// @note This is only available in Athena.
          void setTrackLink(const ElementLink< TrackCollection >& track);
         /// @brief Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
-        /// @note This is only available in Athena. 
-		 const Trk::Track* track() const; 
-#endif // not XAOD_STANDALONE
+        /// @note This is only available in Athena.
+		 const Trk::Track* track() const;
+#endif // not XAOD_ANALYSIS
 
       /// @}
 
       /// Reset the internal cache of the object
       void resetCache();
- 
+
 private:
 
       enum covMatrixIndex{d0_index=0, z0_index=1, phi_index=2, th_index=3, qp_index=4};
@@ -340,11 +340,11 @@ private:
       static const std::size_t COVMATRIX_OFFDIAG_VEC_COMPR_SIZE = 6;
 
 
-#if ( ! defined(XAOD_STANDALONE) ) && ( ! defined(__CLING__) )
+#if ( ! defined(XAOD_ANALYSIS) ) && ( ! defined(__CLING__) )
       /// @brief Cached MeasuredPerigee, built from this object.
       /// @note This is only available in Athena.
      CxxUtils::CachedValue<Trk::Perigee> m_perigeeParameters;
-#endif // not XAOD_STANDALONE and not __CLING__
+#endif // not XAOD_ANALYSIS and not __CLING__
 
     }; // class Track Particle
 
diff --git a/Event/xAOD/xAODTracking/xAODTracking/versions/Vertex_v1.h b/Event/xAOD/xAODTracking/xAODTracking/versions/Vertex_v1.h
index ee71bebc05ff37e4db2fec7f3cc0288bc72dd527..8d0c8ab17e816f1e5b25e91fa46d6f63b1ce4ef2 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/versions/Vertex_v1.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/versions/Vertex_v1.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef XAODTRACKING_VERSIONS_VERTEX_V1_H
@@ -17,11 +17,9 @@
 // EDM include(s):
 #include "EventPrimitives/EventPrimitives.h"
 #include "GeoPrimitives/GeoPrimitives.h"
-#ifndef XAOD_STANDALONE
-#ifndef XAOD_MANACORE
+#ifndef XAOD_ANALYSIS
 #  include "VxVertex/VxTrackAtVertex.h"
-#endif // not XAOD_MANACORE
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
 
 // xAOD include(s):
 #include "xAODTracking/TrackingPrimitives.h"
@@ -90,7 +88,7 @@ namespace xAOD {
       /// Returns the @f$ \chi^2 @f$ of the vertex fit as float.
       float chiSquared() const;
       /// Returns the number of degrees of freedom of the vertex fit as float.
-      float numberDoF() const;   
+      float numberDoF() const;
       /// Set the 'Fit Quality' information.
       void setFitQuality( float chiSquared, float numberDoF );
 
@@ -101,14 +99,14 @@ namespace xAOD {
       /// Set the type of the vertex
       void setVertexType( VxType::VertexType vType );
 
-#if ( ! defined(XAOD_STANDALONE) ) && ( ! defined(XAOD_MANACORE) )
+#ifndef XAOD_ANALYSIS
       /// Non-const access to the VxTrackAtVertex vector
       std::vector< Trk::VxTrackAtVertex >& vxTrackAtVertex();
       /// Const access to the vector of tracks fitted to the vertex (may not exist!)
       const std::vector< Trk::VxTrackAtVertex >& vxTrackAtVertex() const;
       /// Check if VxTrackAtVertices are attached to the object
       bool vxTrackAtVertexAvailable() const;
-#endif // not XAOD_STANDALONE and not XAOD_MANACORE
+#endif // not XAOD_ANALYSIS
 
       /// @name Track particle contents operations
       /// @{
diff --git a/Event/xAOD/xAODTracking/xAODTracking/xAODTrackingDict.h b/Event/xAOD/xAODTracking/xAODTracking/xAODTrackingDict.h
index 78f6ff384d6fdbf02003d1ed6a44c7095c6c426c..4d8baa0f69c19b00a1b8f46677db9f53da0d6ef8 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/xAODTrackingDict.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/xAODTrackingDict.h
@@ -4,7 +4,7 @@
 */
 #ifndef XAODTRACKING_XAODTRACKINGDICT_H
 #define XAODTRACKING_XAODTRACKINGDICT_H
- 
+
 // Local include(s).
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/TrackParticleContainer.h"
@@ -74,9 +74,9 @@ namespace {
                                            SCTRawHitValidationContainer_v1 );
 
       // Type(s) needed for the dictionary generation to succeed.
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
       XAOD_INSTANTIATE_CONTAINER_TYPES( TrackCollection );
-#endif // not XAOD_STANDALONE
+#endif // not XAOD_ANALYSIS
       xAOD::CurvilinearParameters_t dummy;
    };
 }
diff --git a/Event/xAOD/xAODTrackingCnv/CMakeLists.txt b/Event/xAOD/xAODTrackingCnv/CMakeLists.txt
index d48e57d6c758d15465cab18ea560221a7686d01b..a093942c0072680dd1aef773374a72d0ae5fb947 100644
--- a/Event/xAOD/xAODTrackingCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODTrackingCnv/CMakeLists.txt
@@ -3,17 +3,34 @@
 # Declare the package name:
 atlas_subdir( xAODTrackingCnv )
 
-# Component(s) in the package:
-atlas_add_library( xAODTrackingCnvLib
-   xAODTrackingCnv/*.h
-   INTERFACE
-   PUBLIC_HEADERS xAODTrackingCnv
-   LINK_LIBRARIES xAODTracking TrkTrack GaudiKernel )
-
-atlas_add_component( xAODTrackingCnv
-   src/*.h src/*.cxx src/components/*.cxx
-   LINK_LIBRARIES xAODTracking TrkTrack AthenaBaseComps AthenaKernel
-   EventPrimitives GaudiKernel GeneratorObjects MCTruthClassifierLib Particle
-   ParticleTruth TrkLinks TrkParticleBase TrkTruthData VxVertex 
-   TrkToolInterfaces xAODCore xAODTrackingCnvLib
-   PRIVATE_LINK_LIBRARIES CxxUtils )
+# Component(s) in the package. Built in a much more lightweight fashion for
+# AthAnalysis.
+if( XAOD_ANALYSIS )
+
+   atlas_add_library( xAODTrackingCnvLib
+      xAODTrackingCnv/ITrackParticleCompressorTool.h
+      INTERFACE
+      PUBLIC_HEADERS xAODTrackingCnv
+      LINK_LIBRARIES xAODTracking GaudiKernel )
+
+   atlas_add_component( xAODTrackingCnv
+      src/TrackParticleCompressorTool.* src/components/*.cxx
+      LINK_LIBRARIES AthenaBaseComps CxxUtils xAODTrackingCnvLib )
+
+else()
+
+   atlas_add_library( xAODTrackingCnvLib
+      xAODTrackingCnv/*.h
+      INTERFACE
+      PUBLIC_HEADERS xAODTrackingCnv
+      LINK_LIBRARIES xAODTracking TrkTrack GaudiKernel )
+
+   atlas_add_component( xAODTrackingCnv
+      src/*.h src/*.cxx src/components/*.cxx
+      LINK_LIBRARIES xAODTracking TrkTrack AthenaBaseComps AthenaKernel
+      EventPrimitives GaudiKernel GeneratorObjects MCTruthClassifierLib Particle
+      ParticleTruth TrkLinks TrkParticleBase TrkTruthData VxVertex
+      TrkToolInterfaces xAODCore xAODTrackingCnvLib
+      PRIVATE_LINK_LIBRARIES CxxUtils )
+
+endif()
diff --git a/Event/xAOD/xAODTrackingCnv/src/components/xAODTrackingCnv_entries.cxx b/Event/xAOD/xAODTrackingCnv/src/components/xAODTrackingCnv_entries.cxx
index 2e08c663b6c39cfee89cb0ddc5600f19508fd287..9c54f444966682fb2b9125bc0635a36958a2c5cc 100644
--- a/Event/xAOD/xAODTrackingCnv/src/components/xAODTrackingCnv_entries.cxx
+++ b/Event/xAOD/xAODTrackingCnv/src/components/xAODTrackingCnv_entries.cxx
@@ -1,12 +1,19 @@
-#include "../TrackCollectionCnvTool.h"
-#include "../RecTrackParticleContainerCnvTool.h"
-#include "../TrackParticleCnvAlg.h"
-#include "../VertexCnvAlg.h"
+//
+// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+//
+
+#ifndef XAOD_ANALYSIS
+#   include "../TrackCollectionCnvTool.h"
+#   include "../RecTrackParticleContainerCnvTool.h"
+#   include "../TrackParticleCnvAlg.h"
+#   include "../VertexCnvAlg.h"
+#endif // NOT XAOD_ANALYSIS
 #include "../TrackParticleCompressorTool.h"
 
-DECLARE_COMPONENT( xAODMaker::RecTrackParticleContainerCnvTool )
-DECLARE_COMPONENT( xAODMaker::TrackCollectionCnvTool )
+#ifndef XAOD_ANALYSIS
+   DECLARE_COMPONENT( xAODMaker::RecTrackParticleContainerCnvTool )
+   DECLARE_COMPONENT( xAODMaker::TrackCollectionCnvTool )
+   DECLARE_COMPONENT( xAODMaker::TrackParticleCnvAlg )
+   DECLARE_COMPONENT( xAODMaker::VertexCnvAlg )
+#endif // NOT XAOD_ANALYSIS
 DECLARE_COMPONENT( xAODMaker::TrackParticleCompressorTool )
-DECLARE_COMPONENT( xAODMaker::TrackParticleCnvAlg )
-DECLARE_COMPONENT( xAODMaker::VertexCnvAlg )
-
diff --git a/Event/xAOD/xAODTriggerAthenaPool/CMakeLists.txt b/Event/xAOD/xAODTriggerAthenaPool/CMakeLists.txt
index a9f51cd369034a5f26c96de41aedd7b3aa78424f..840ffb1469e87f8613e1421a73b81dbb76638e07 100644
--- a/Event/xAOD/xAODTriggerAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODTriggerAthenaPool/CMakeLists.txt
@@ -37,7 +37,7 @@ atlas_add_poolcnv_library( xAODTriggerAthenaPoolPoolCnv
    xAOD::BunchConfContainer xAOD::BunchConfAuxContainer
    xAOD::TrigPassBitsContainer xAOD::TrigPassBitsAuxContainer
    CNV_PFX xAOD
-   LINK_LIBRARIES TrigNavToolsLib AthContainers AthenaKernel AthenaPoolCnvSvcLib
+   LINK_LIBRARIES AthContainers AthenaKernel AthenaPoolCnvSvcLib
    AthenaPoolUtilities xAODTrigger )
 
 # Install files from the package.
diff --git a/LumiBlock/LumiBlockComps/CMakeLists.txt b/LumiBlock/LumiBlockComps/CMakeLists.txt
index 2e4d24ca88b7b992d403b8d711e1e1154eb51a36..b28292f863222e428be03ec5b20ea1ad9fedfe1d 100644
--- a/LumiBlock/LumiBlockComps/CMakeLists.txt
+++ b/LumiBlock/LumiBlockComps/CMakeLists.txt
@@ -17,7 +17,7 @@ if( NOT XAOD_ANALYSIS )
 endif()
 atlas_add_library( LumiBlockCompsLib
    LumiBlockComps/*.h src/*.h Root/*.cxx
-   src/CreateLumiBlockCollectionFromFile.cxx 
+   src/CreateLumiBlockCollectionFromFile.cxx
    ${extra_srcs}
    PUBLIC_HEADERS LumiBlockComps
    INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
@@ -48,17 +48,20 @@ atlas_install_python_modules( python/*.py
 atlas_install_joboptions( share/*.py )
 atlas_install_joboptions( share/*.txt )
 
-atlas_add_test( LBDurationCondAlg_test
-   SOURCES test/LBDurationCondAlg_test.cxx
-   LINK_LIBRARIES GaudiKernel LumiBlockCompsLib TestTools )
+if( NOT XAOD_ANALYSIS )
+   atlas_add_test( LBDurationCondAlg_test
+      SOURCES test/LBDurationCondAlg_test.cxx
+      LINK_LIBRARIES GaudiKernel LumiBlockData LumiBlockCompsLib TestTools )
 
-atlas_add_test( LuminosityCondAlg_test
-   SOURCES test/LuminosityCondAlg_test.cxx
-   LINK_LIBRARIES GaudiKernel LumiBlockCompsLib AthenaPoolUtilities TestTools )
+   atlas_add_test( LuminosityCondAlg_test
+      SOURCES test/LuminosityCondAlg_test.cxx
+      LINK_LIBRARIES GaudiKernel LumiBlockData LumiBlockCompsLib
+      AthenaPoolUtilities TestTools )
 
-atlas_add_test( TrigLiveFractionCondAlg_test
-   SOURCES test/TrigLiveFractionCondAlg_test.cxx
-   LINK_LIBRARIES GaudiKernel LumiBlockCompsLib TestTools )
+   atlas_add_test( TrigLiveFractionCondAlg_test
+      SOURCES test/TrigLiveFractionCondAlg_test.cxx
+      LINK_LIBRARIES GaudiKernel LumiBlockData LumiBlockCompsLib TestTools )
+endif()
 
 atlas_add_test( LuminosityCondAlgConfig_test
                 SCRIPT python -m LumiBlockComps.LuminosityCondAlgConfig
@@ -76,6 +79,6 @@ atlas_add_test( LumiBlockMuWriterConfig_test
                 SCRIPT python -m LumiBlockComps.LumiBlockMuWriterConfig
                 LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
 
-atlas_add_test( BunchCrossingCondAlg 
+atlas_add_test( BunchCrossingCondAlg
                 SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/python/BunchCrossingCondAlgTest.py
                 POST_EXEC_SCRIPT " /usr/bin/diff BCData.txt ${CMAKE_CURRENT_SOURCE_DIR}/share/BCData.txt.ref > BC_diff.log " )
diff --git a/LumiBlock/LumiBlockComps/util/getLumi.cxx b/LumiBlock/LumiBlockComps/util/getLumi.cxx
index 6d0d087351270c7ec801427c50f7157e689bf374..c2b9d4361d9d13cd86c3077d008e42b21fafc70d 100644
--- a/LumiBlock/LumiBlockComps/util/getLumi.cxx
+++ b/LumiBlock/LumiBlockComps/util/getLumi.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///getLumi - the lumi helper application
@@ -34,6 +34,7 @@ int main( int, char** ) {
 #include "TKey.h"
 #include "TDirectory.h"
 #include "TSystem.h"
+#include "TObjString.h"
 
 #include <getopt.h>
 #include <cstdlib>
@@ -56,7 +57,7 @@ struct lbx {
 int main(int argc, char* argv[]) {
    const char* optstring = "m";
    bool showMissing = false;
-static struct option long_options[] = 
+static struct option long_options[] =
   {
     /* name    has_arg       flag      val */
     {"showMissing", no_argument ,  NULL,     'm'}
@@ -73,9 +74,9 @@ static struct option long_options[] =
           case 'm' :
             showMissing = true;nOptions++;
             break;
-          case '?' : 
+          case '?' :
             printf("Please supply a valid option to the program.  Exiting\n");
-            exit(1); 
+            exit(1);
             break;
       }
   }
@@ -106,7 +107,7 @@ static struct option long_options[] =
       grlMaskReader.AddXMLFile( s );
       hasMask=true;
    }
-   Root::TGoodRunsList grlMask; 
+   Root::TGoodRunsList grlMask;
    if(hasMask) {
       grlMaskReader.Interpret();grlMask.AddGRL(grlMaskReader.GetMergedGoodRunsList());
    }
@@ -121,7 +122,7 @@ static struct option long_options[] =
       TFile *file = TFile::Open(argv[i]);
       if(file==0) continue;
       std::cout << s;
-      
+
       //check if this file is a LumiMetaData file ... if it is we add to the list for later
       TTree *tmp = (TTree*)file->Get( "LumiMetaData" );
       if(tmp) {
@@ -130,13 +131,13 @@ static struct option long_options[] =
         lumiFiles.push_back(s);
         continue;
       }
-      
+
       //try to get lumi
 
-      //if this is xAOD, it will have a MetaData tree ... 
+      //if this is xAOD, it will have a MetaData tree ...
       if(file->Get("MetaData")!=0) {
          TTree* metaTree = static_cast<TTree*>(file->Get("MetaData"));
-         //use TEvent if the MetaData tree contains an EventFormat branch and only 1 entry 
+         //use TEvent if the MetaData tree contains an EventFormat branch and only 1 entry
          //WB : 21/11/2016 - actually just always avoid using TEvent
          bool useTEvent(false);
          /*if(metaTree->GetEntries()==1 && metaTree->FindBranch("EventFormat")) {
@@ -192,12 +193,12 @@ static struct option long_options[] =
                   }
                }
 
-               //add lb to grl 
+               //add lb to grl
                for(auto lbr : *lbrs) {
                   for(uint runNum = lbr->startRunNumber(); runNum <= lbr->stopRunNumber(); runNum++) {
                      if(lbr->startLumiBlockNumber()!=lbr->stopLumiBlockNumber()) {std::cout << " Unexpected behaviour. Please report! " << std::endl; exit(1);}
                      for(uint lb = lbr->startLumiBlockNumber(); lb <= lbr->stopLumiBlockNumber(); lb++) {
-                        lbxs[runNum][lb].nSeen += lbr->eventsSeen(); 
+                        lbxs[runNum][lb].nSeen += lbr->eventsSeen();
                         if(lbxs[runNum][lb].nExpected!=0 && lbxs[runNum][lb].nExpected != lbr->eventsExpected()) {
                           std::cout << "...mismatch on expected events in [run,lb]=[" << runNum << "," << lb << "] got " << lbr->eventsExpected() << " but had " << lbxs[runNum][lb].nExpected << std::endl;
                           std::cout << "...PLEASE REPORT THIS to hn-atlas-PATHelp@cern.ch ... for now I will assume the larger number is correct" << std::endl;
@@ -251,12 +252,12 @@ static struct option long_options[] =
                   }
                }
 
-               //add lb to grl 
+               //add lb to grl
                for(auto lbr : *lbrs) {
                   for(uint runNum = lbr->startRunNumber(); runNum <= lbr->stopRunNumber(); runNum++) {
                      if(lbr->startLumiBlockNumber()!=lbr->stopLumiBlockNumber()) {std::cout << " Unexpected behaviour. Please report! " << std::endl; exit(1);}
                      for(uint lb = lbr->startLumiBlockNumber(); lb <= lbr->stopLumiBlockNumber(); lb++) {
-                        lbxs[runNum][lb].nSeen += lbr->eventsSeen(); 
+                        lbxs[runNum][lb].nSeen += lbr->eventsSeen();
                         if(lbxs[runNum][lb].nExpected!=0 && lbxs[runNum][lb].nExpected != lbr->eventsExpected()) {
                           std::cout << "...mismatch on expected events in [run,lb]=[" << runNum << "," << lb << "] got " << lbr->eventsExpected() << " but had " << lbxs[runNum][lb].nExpected << std::endl;
                           std::cout << "...PLEASE REPORT THIS to hn-atlas-PATHelp@cern.ch ... for now I will assume the larger number is correct" << std::endl;
@@ -311,12 +312,12 @@ static struct option long_options[] =
                      r->setEventsExpected(eventsExpected.at(j));r->setEventsSeen(eventsSeen.at(j));
                   }
                }
-               //add lb to grl 
+               //add lb to grl
                for(auto lbr : *lbrs) {
                   for(uint runNum = lbr->startRunNumber(); runNum <= lbr->stopRunNumber(); runNum++) {
                      if(lbr->startLumiBlockNumber()!=lbr->stopLumiBlockNumber()) {std::cout << " Unexpected behaviour. Please report! " << std::endl; exit(1);}
                      for(uint lb = lbr->startLumiBlockNumber(); lb <= lbr->stopLumiBlockNumber(); lb++) {
-                        lbxs[runNum][lb].nSeen += lbr->eventsSeen(); 
+                        lbxs[runNum][lb].nSeen += lbr->eventsSeen();
                         lbxs[runNum][lb].fromSuspect = true;
                         if(lbxs[runNum][lb].nExpected!=0 && lbxs[runNum][lb].nExpected != lbr->eventsExpected()) {
                           std::cout << "...mismatch on expected events in [run,lb]=[" << runNum << "," << lb << "] got " << lbr->eventsExpected() << " but had " << lbxs[runNum][lb].nExpected << std::endl;
@@ -381,14 +382,14 @@ static struct option long_options[] =
       for(auto& it2 : it.second) {
          uint lbn = it2.first;
          if(it2.second.nSeen > it2.second.nExpected) { fromXAODSuspect.AddRunLumiBlock(runNum,lbn); continue; }
-         
+
          if(it2.second.fromSuspect) { fromXAODPossiblySuspect.AddRunLumiBlock(runNum,lbn);}
-         
+
          if(it2.second.nSeen==it2.second.nExpected) { fromXAOD.AddRunLumiBlock(runNum,lbn); }
          else { fromXAODIncomplete.AddRunLumiBlock(runNum,lbn); }
       }
    }
-   
+
    Root::TGoodRunsList l;Root::TGoodRunsList lIncomplete;Root::TGoodRunsList lSuspect;Root::TGoodRunsList lPossiblySuspect;
    l.AddGRL(fromXAOD); lIncomplete.AddGRL(fromXAODIncomplete); lSuspect.AddGRL(fromXAODSuspect);lPossiblySuspect.AddGRL(fromXAODPossiblySuspect);//have to do this because of weird GRL behaviour
    if(readXML) {
@@ -400,10 +401,10 @@ static struct option long_options[] =
    std::map<UInt_t, float> missingRuns;std::map<UInt_t,bool> allRuns;std::set<UInt_t> incompleteRuns;std::set<UInt_t> suspectRuns;
    std::map<UInt_t, std::string> missingRunLB; //lumiblocks that are missing
 
-   
 
 
-   
+
+
 
    Root::TGoodRunsList providedL; //keeps track of what came from lumicalc file
 
@@ -420,13 +421,13 @@ static struct option long_options[] =
         std::cout << "Could not open lumicalc file: " << argv[1+nOptions] << std::endl;
         return 0;
     }
-  
+
     TTree *tmp = (TTree*)lumicalcFile->Get( "LumiMetaData" );
     if(!tmp) {
         std::cout << "Could not find LumiMetaData tree in lumicalc file: " << argv[1+nOptions] << std::endl;
         return 0;
     }
-  
+
     //structure expected is as given by iLumiCalc:
     //   RunNbr, AvergeInteractionPerXing, IntLumi
     UInt_t runNbr=0;Float_t intLumi=0;TBranch *b_runNbr;TBranch *b_intLumi;
@@ -441,9 +442,9 @@ static struct option long_options[] =
         std::cout << "Could not find IntLumi branch in Data TTree" << std::endl; return 0;
     }
     long nEntries = tmp->GetEntries();
-    
-    int startMissingBlock = -1;UInt_t lastRunNumber=0;int lastLb=0;double missingLumi=0; 
-  
+
+    int startMissingBlock = -1;UInt_t lastRunNumber=0;int lastLb=0;double missingLumi=0;
+
     for(long i=0;i<nEntries;i++) {
         b_runNbr->GetEntry(i);b_intLumi->GetEntry(i);b_lb->GetEntry(i);
         if(hasMask && !grlMask.HasRunLumiBlock(runNbr,lb)) continue;
@@ -452,9 +453,9 @@ static struct option long_options[] =
         if(hasLumi) totalLumi += intLumi;
         else if(lIncomplete.HasRunLumiBlock(runNbr,lb)) {hasLumi=true; totalLumiIncomplete += intLumi; incompleteRuns.insert(runNbr);} //else if ensures we never double count lumi
         else if(lSuspect.HasRunLumiBlock(runNbr,lb)) {hasLumi=true;totalLumiSuspect += intLumi; suspectRuns.insert(runNbr); definitelySuspect << "(" << runNbr << "," << lb << "),";}
-  
+
         if(lPossiblySuspect.HasRunLumiBlock(runNbr,lb)) {totalLumiPossiblySuspect += intLumi; possiblySuspect << "(" << runNbr << "," << lb << "),";  }
-  
+
         if(!hasLumi && intLumi==0.) hasLumi=true; //if there is no lumi, it's as good as having some
         if((lastRunNumber!=runNbr&&startMissingBlock>=0) || (hasLumi && startMissingBlock>=0)) {
           //print now, if startMissingBlock not negative
@@ -483,7 +484,7 @@ static struct option long_options[] =
    std::cout << "***************LUMI REPORT******************" << std::endl << std::endl;
 
 
-   
+
    if(possiblySuspect.str().size()) {
      std::cout << "Possibly suspect lumiblocks: " << possiblySuspect.str() << std::endl;
    }
@@ -522,7 +523,7 @@ static struct option long_options[] =
    if(allMissing) {
       std::cout << "(Missing Lumonisity = " << allMissing << " pb-1)   (this is luminosity in your lumicalc files that you appear not to have run over)"; //already divided by 1E6 in loop above
       //if(!showMissing) std::cout << " rerun with the '-m' option to see runs where this luminosity resides";
-      std::cout << std::endl; 
+      std::cout << std::endl;
    }
 
    /*
diff --git a/PhysicsAnalysis/AnalysisCommon/HDF5Utils/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/HDF5Utils/CMakeLists.txt
index 6f55e05d3ffb2215cddd37e9d8a7e9bec879632b..505f9ad07e01bf8860e20eb20ef8b50f5d4ffb43 100644
--- a/PhysicsAnalysis/AnalysisCommon/HDF5Utils/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/HDF5Utils/CMakeLists.txt
@@ -1,14 +1,16 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 # Set the project's name and version.
 atlas_subdir( HDF5Utils )
 
 # Grab HDF5 from AnalysisBaseExternals.
-find_package( HDF5 1.10.1 REQUIRED COMPONENTS C CXX )
+find_package( HDF5 1.10.1 COMPONENTS CXX )
 
 # find root
-find_package(ROOT REQUIRED COMPONENTS RIO Hist Tree Net Core TreePlayer)
+find_package(ROOT COMPONENTS RIO Hist Tree Net Core TreePlayer)
 
 # find boost
-find_package( Boost 1.54.0 REQUIRED COMPONENTS program_options)
+find_package( Boost 1.54.0 COMPONENTS program_options )
 
 # Add the hdf tuple library
 atlas_add_library(HDF5Utils
@@ -18,8 +20,9 @@ atlas_add_library(HDF5Utils
   Root/IH5Merger.cxx
   Root/MergeUtils.cxx
   PUBLIC_HEADERS HDF5Utils
-  INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}
-  LINK_LIBRARIES ${HDF5_LIBRARIES})
+  DEFINITIONS ${HDF5_CXX_DEFINITIONS}
+  INCLUDE_DIRS ${HDF5_CXX_INCLUDE_DIRS}
+  LINK_LIBRARIES ${HDF5_CXX_LIBRARIES})
 
 # build a translation utility
 set( _exe_sources
@@ -29,15 +32,17 @@ set( _exe_sources
   util/ttree2hdf5.cxx)
 
 atlas_add_executable(ttree2hdf5 ${_exe_sources}
-  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} util ${Boost_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS}
-  LINK_LIBRARIES HDF5Utils ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${HDF5_LIBRARIES} )
+  DEFINITIONS ${HDF5_CXX_DEFINITIONS}
+  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} util ${Boost_INCLUDE_DIRS} ${HDF5_CXX_INCLUDE_DIRS}
+  LINK_LIBRARIES HDF5Utils ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${HDF5_CXX_LIBRARIES} )
 
 unset(_exe_sources)
 
 # add the merge utility
 atlas_add_executable( hdf5-merge
   util/hdf5-merge.cxx
-  INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS}
-  LINK_LIBRARIES HDF5Utils ${Boost_LIBRARIES} ${HDF5_LIBRARIES} )
+  DEFINITIONS ${HDF5_CXX_DEFINITIONS}
+  INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HDF5_CXX_INCLUDE_DIRS}
+  LINK_LIBRARIES HDF5Utils ${Boost_LIBRARIES} ${HDF5_CXX_LIBRARIES} )
 
 atlas_install_scripts( bin/hdf5-merge-nolock )
diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/CMakeLists.txt b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/CMakeLists.txt
index 2d6618ffc57ea37daf080361679fe7a122eaa970..e375745d0b0a18a7db56de783d90d88092400bb4 100644
--- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/CMakeLists.txt
+++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/CMakeLists.txt
@@ -3,7 +3,6 @@
 # Declare the package name:
 atlas_subdir( xAODBTaggingEfficiency )
 
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core Hist RIO )
 
@@ -31,22 +30,31 @@ atlas_add_dictionary( xAODBTaggingEfficiencyDict
   LINK_LIBRARIES xAODBTaggingEfficiencyLib )
 
 # Executable(s) in the package (to be built only under AthAnalysis or in stand-alone mode):
-if( XAOD_ANALYSIS OR XAOD_STANDALONE )
+if( XAOD_ANALYSIS )
    atlas_add_executable( BTaggingEfficiencyToolTester
       util/BTaggingEfficiencyToolTester.cxx
-      LINK_LIBRARIES xAODBTaggingEfficiencyLib )
+      LINK_LIBRARIES xAODRootAccess AsgTools FTagAnalysisInterfacesLib )
 
    atlas_add_executable( BTaggingEigenVectorRecompositionToolTester
       util/BTaggingEigenVectorRecompositionToolTester.cxx
-      LINK_LIBRARIES xAODBTaggingEfficiencyLib )
+      LINK_LIBRARIES AsgTools FTagAnalysisInterfacesLib )
 
-  atlas_add_executable( BTaggingSelectionToolTester
+   atlas_add_executable( BTaggingSelectionToolTester
       util/BTaggingSelectionToolTester.cxx
-      LINK_LIBRARIES AsgMessagingLib xAODJet xAODBTagging xAODBTaggingEfficiencyLib )
+      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+      LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODJet xAODBTagging
+      PATInterfaces FTagAnalysisInterfacesLib )
+   if( XAOD_STANDALONE )
+      target_link_libraries( BTaggingSelectionToolTester
+         PRIVATE xAODRootAccess )
+   else()
+      target_link_libraries( BTaggingSelectionToolTester
+         PRIVATE POOLRootAccessLib )
+   endif()
 
     atlas_add_executable( BTaggingTruthTaggingTester
       util/BTaggingTruthTaggingTester.cxx
-      LINK_LIBRARIES AsgMessagingLib xAODJet xAODBTagging xAODBTaggingEfficiencyLib FTagAnalysisInterfacesLib )
+      LINK_LIBRARIES AsgTools AsgMessagingLib FTagAnalysisInterfacesLib )
 endif()
 
 # Install files from the package:
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx
index 576cfbf840cc49fc0cafa8192dab5e46600cb865..a4f0a384c00445eb92a221c179933e10f0039d46 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx
@@ -1,10 +1,7 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef ROOTCORE
-#ifdef XAOD_ANALYSIS
-
 #ifndef TAUANALYSISTOOLS_UT_TAUANALYSISTOOLS_TEST_H
 #define TAUANALYSISTOOLS_UT_TAUANALYSISTOOLS_TEST_H 1
 
@@ -33,6 +30,7 @@ using namespace asg::msgUserCode;  //messaging
 
 int main( int argc, char* argv[] )
 {
+  ANA_CHECK_SET_TYPE (int);
 
   IAppMgrUI* app = POOL::Init(); //important to do this first!
 
@@ -58,40 +56,40 @@ int main( int argc, char* argv[] )
   // TauSelectionTool
   // ===========================================================================
   ToolHandle<TauAnalysisTools::ITauSelectionTool> TauSelTool("TauAnalysisTools::TauSelectionTool/TauSelectionTool");
-  TauSelTool.retrieve(); //this will cause the tool to be created and initialized
+  ANA_CHECK(TauSelTool.retrieve()); //this will cause the tool to be created and initialized
 
   // ===========================================================================
   // TauSmearingTool
   // ===========================================================================
   ToolHandle<TauAnalysisTools::ITauSmearingTool> TauSmeTool("TauAnalysisTools::TauSmearingTool/TauSmearingTool");
-  TauSmeTool.retrieve();
+  ANA_CHECK(TauSmeTool.retrieve());
 
   // ===========================================================================
   // TauEfficiencyCorrectionsTool
   // ===========================================================================
   ToolHandle<TauAnalysisTools::ITauEfficiencyCorrectionsTool> TauEffCorrTool( "TauAnalysisTools::TauEfficiencyCorrectionsTool/TauEfficiencyCorrectionsTool" );
-  AthAnalysisHelper::setProperty(TauEffCorrTool, "TauSelectionTool", TauSelTool);
-  TauEffCorrTool.retrieve();
+  ANA_CHECK(AthAnalysisHelper::setProperty(TauEffCorrTool, "TauSelectionTool", TauSelTool));
+  ANA_CHECK(TauEffCorrTool.retrieve());
 
   // ===========================================================================
   // TauTruthMatchingTool
   // ===========================================================================
   ToolHandle<TauAnalysisTools::ITauTruthMatchingTool> T2MT( "TauAnalysisTools::TauTruthMatchingTool/TauTruthMatchingTool");
-  AthAnalysisHelper::setProperty(T2MT, "WriteTruthTaus", true);
-  T2MT.retrieve();
+  ANA_CHECK(AthAnalysisHelper::setProperty(T2MT, "WriteTruthTaus", true));
+  ANA_CHECK(T2MT.retrieve());
 
   // ===========================================================================
   // TauTruthTrackMatchingTool
   // ===========================================================================
   ToolHandle<TauAnalysisTools::ITauTruthTrackMatchingTool> T3MT( "TauAnalysisTools::TauTruthTrackMatchingTool/TauTruthTrackMatchingTool");
-  T3MT.retrieve();
+  ANA_CHECK(T3MT.retrieve());
 
   // defining needed Container
   const xAOD::TauJetContainer* xTauJetContainer = 0;
 
   //loop over input file with POOL
   POOL::TEvent evt;
-  evt.readFrom( fileName );
+  ANA_CHECK(evt.readFrom( fileName ));
 
   // for(int i=0;i < evt.getEntries(); i++) {
   for(int i=0; i < 100; i++)
@@ -102,7 +100,7 @@ int main( int argc, char* argv[] )
       continue;
     }
 
-    evt.retrieve( xTauJetContainer, "TauJets" );
+    ANA_CHECK(evt.retrieve( xTauJetContainer, "TauJets" ));
 
     for ( auto xTau : *xTauJetContainer )
     {
@@ -119,7 +117,7 @@ int main( int argc, char* argv[] )
                     << ", prong = " << int(xTau->nTracks())
                     << ", charge = " << int(xTau->charge()));
 
-      if ((bool)xTau->auxdata<char>("IsTruthMatched"))
+      if ((bool)xTau->auxdata<char>("IsTruthMatched") && (xTruthTau != nullptr))
       {
         if (xTruthTau->isTau())
         {
@@ -164,21 +162,11 @@ int main( int argc, char* argv[] )
     }
   }
   ServiceHandle<IProperty> toolSvc("ToolSvc","");
-  toolSvc->setProperty("OutputLevel","1");
+  ANA_CHECK(toolSvc->setProperty("OutputLevel","1"));
   asg::msgToolHandle::setMsgLevel(MSG::Level::DEBUG);
 
-  app->finalize(); //trigger finalization of all services and tools created by the Gaudi Application
+  ANA_CHECK(app->finalize()); //trigger finalization of all services and tools created by the Gaudi Application
   return 0;
 }
 
 #endif //> !TAUANALYSISTOOLS_UT_TAUANALYSISTOOLS_TEST_H
-
-#else
-int main()
-{
-  return 0;
-}
-
-#endif // XAOD_ANALYSIS
-
-#endif // not ROOTCORE
diff --git a/Projects/AthAnalysis/CMakeGraphVizOptions.cmake b/Projects/AthAnalysis/CMakeGraphVizOptions.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..4f6d416f611d2a909e75120f4cedd261ebd7f504
--- /dev/null
+++ b/Projects/AthAnalysis/CMakeGraphVizOptions.cmake
@@ -0,0 +1,5 @@
+# Options used by cmake --graphviz
+set( GRAPHVIZ_CUSTOM_TARGETS TRUE )
+set( GRAPHVIZ_GENERATE_DEPENDERS FALSE )
+set( GRAPHVIZ_GENERATE_PER_TARGET FALSE )
+set( GRAPHVIZ_IGNORE_TARGETS ".*Pkg$" ".*PkgPrivate$" "^__.*" )
diff --git a/Projects/AthAnalysis/CMakeLists.txt b/Projects/AthAnalysis/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..2750b1c54d0b346b0e6c93fd3e786c44cfb74d4f
--- /dev/null
+++ b/Projects/AthAnalysis/CMakeLists.txt
@@ -0,0 +1,85 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+# Set up the project.
+cmake_minimum_required( VERSION 3.6 )
+file( READ ${CMAKE_SOURCE_DIR}/version.txt _version )
+string( STRIP ${_version} _version )
+project( AthAnalysis VERSION ${_version} LANGUAGES C CXX Fortran )
+unset( _version )
+
+# Find the ATLAS CMake code:
+find_package( AtlasCMake QUIET )
+
+# Find the base project(s):
+find_package( AthAnalysisExternals ${_version} REQUIRED )
+find_package( Gaudi REQUIRED )
+
+# Additional externals needed for the build/runtime:
+find_package( Xrootd )
+find_package( GSL )
+find_package( Davix )
+find_package( PNG )
+find_package( BLAS )
+find_package( VDT )
+find_package( requests )
+
+# Compile flag(s).
+add_definitions( -DXAOD_ANALYSIS )
+
+# CMake cache variable(s).
+set( XAOD_ANALYSIS TRUE CACHE BOOL
+   "Flag specifying that this is an analysis release" )
+
+# Set up where to find the AthenaPoolUtilitiesTest CMake code.
+set( AthenaPoolUtilitiesTest_DIR
+   "${CMAKE_SOURCE_DIR}/../../Database/AthenaPOOL/AthenaPoolUtilities/cmake"
+   CACHE PATH "Directory holding the AthenaPoolUtilititesTest module" )
+
+# Set up where to find the xAODUtilities CMake code.
+set( xAODUtilities_DIR
+   "${CMAKE_SOURCE_DIR}/../../Event/xAOD/xAODCore/cmake"
+   CACHE PATH "Directory holding the xAODUtilities module" )
+
+# Make the local CMake files visible to AtlasCMake.
+list( INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake )
+
+# Set up CTest.
+atlas_ctest_setup()
+
+# Set up the ATLAS project.
+atlas_project( USE AthAnalysisExternals ${AthAnalysisExternals_VERSION}
+   PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ )
+
+# Generate the environment setup for the externals, to be used during the build.
+lcg_generate_env( SH_FILE ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh )
+
+# Generate replacement rules for the installed paths.
+set( _replacements )
+if( NOT "$ENV{NICOS_PROJECT_HOME}" STREQUAL "" )
+   get_filename_component( _buildDir $ENV{NICOS_PROJECT_HOME} PATH )
+   list( APPEND _replacements ${_buildDir} "\${AthAnalysis_DIR}/../../../.." )
+endif()
+
+# Now generate and install the installed setup files.
+lcg_generate_env(
+   SH_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/env_setup_install.sh
+   REPLACE ${_replacements} )
+install( FILES ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/env_setup_install.sh
+   DESTINATION . RENAME env_setup.sh )
+
+# Configure and install the project configuration file(s).
+configure_file( ${CMAKE_SOURCE_DIR}/cmake/PreConfig.cmake.in
+   ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PreConfig.cmake @ONLY )
+configure_file( ${CMAKE_SOURCE_DIR}/cmake/PostConfig.cmake.in
+   ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PostConfig.cmake @ONLY )
+install( FILES
+   ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PreConfig.cmake
+   ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PostConfig.cmake
+   DESTINATION ${CMAKE_INSTALL_CMAKEDIR} )
+
+# Install graphviz output if available.
+install( FILES ${CMAKE_BINARY_DIR}/packages.dot
+   DESTINATION . OPTIONAL )
+
+# Package up the release using CPack.
+atlas_cpack_setup()
diff --git a/Projects/AthAnalysis/README.md b/Projects/AthAnalysis/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b9f9ea40885b030dfb36e0210b29904e656c0721
--- /dev/null
+++ b/Projects/AthAnalysis/README.md
@@ -0,0 +1,56 @@
+The ATLAS Analysis Software Project
+===================================
+
+This is the configuration for building the analysis software of ATLAS,
+meant for performing final-stage analysis on DxAOD
+
+It shares much the same code with the Athena project, it just doesn't
+build a lot of things that are not needed for analysis jobs.
+
+Setup Instructions
+------------------
+
+You need a recent version of cmake and gcc set up. You can get this from
+setupATLAS with, for instance:
+
+    asetup none,gcc8,cmakesetup --cmakeversion=3.18.3
+
+Build Instructions
+------------------
+
+To build the externals necessary for building this project itself, use the
+
+    ./build_externals.sh -fc
+
+script. It will build all the externals necessary for this project into a
+subdirectory of the directory holding this repository, called `build`.
+
+The sources of the externals will be checked out under `build/src`, the
+build of the projects will commence under `build/build`, and the results of
+the build will be installed under `build/install`.
+
+RPMs created from the externals are copied under `build/` by the script.
+
+Once the externals have finished building, you can initiate the full build
+of the project against these newly built externals by executing the
+
+    ./build.sh -acmi
+
+script. It uses the same directory layout inside the `build` directory as
+was used for the externals.
+
+Finally, if you want to then *use* the release, you need to set it up by
+sourcing the setup script in the install area:
+
+    source ../../../build/install/AthAnalysis/*/InstallArea/*/setup.sh
+
+If you do this in a new shell you will need to lsetup cmake and gcc again
+though!
+
+In fact, instead of sourcing the setup script directly, you are advised to use
+the `asetup` command if it is available to you (which will source it on your
+behalf, as well as probably do some other things). E.g. you can do:
+
+    asetup AthAnalysis,22.2.4 --releasesarea=../../../build/install
+
+of course substitute in the correct version number and path to the install area.
diff --git a/Projects/AthAnalysis/build.sh b/Projects/AthAnalysis/build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c112b94640df2e2bd24cba0a580a0d1d12a0659f
--- /dev/null
+++ b/Projects/AthAnalysis/build.sh
@@ -0,0 +1,165 @@
+#!/bin/bash
+#
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# Script for building the release on top of externals built using one of the
+# scripts in this directory.
+#
+
+# Helper function for timing the various build steps.
+_time_() { local c="time -p " ; while test "X$1" != "X" ; do c+=" \"$1\"" ;
+           shift; done; ( eval "$c" ) 2>&1 |
+           sed "s,^real[[:space:]],time::${c}:: real ," ; }
+
+# Function printing the usage information for the script
+usage() {
+    echo "Usage: build.sh [-t build type] [-b build dir] [-c] [-m] [-i] [-p] [-a] [-x opt]"
+    echo " -c: Execute CMake step"
+    echo " -m: Execute make step"
+    echo " -i: Execute install step"
+    echo " -p: Execute CPack step"
+    echo " -a: Abort on error"
+    echo " -x: Extra configuration argument(s) for CMake"
+    echo ""
+    echo "If none of the c, m, i or p options are set then the script will do"
+    echo "*all* steps. Otherwise only the enabled steps are run - it's your"
+    echo "reponsibility to ensure that precusors are in good shape"
+}
+
+# Parse the command line arguments:
+BUILDDIR=""
+BUILDTYPE="RelWithDebInfo"
+EXE_CMAKE=""
+EXE_MAKE=""
+EXE_INSTALL=""
+EXE_CPACK=""
+NIGHTLY=true
+EXTRACMAKE=()
+while getopts ":t:b:hcmipax:" opt; do
+    case $opt in
+        t)
+            BUILDTYPE=$OPTARG
+            ;;
+        b)
+            BUILDDIR=$OPTARG
+            ;;
+        c)
+            EXE_CMAKE="1"
+            ;;
+        m)
+            EXE_MAKE="1"
+            ;;
+        i)
+            EXE_INSTALL="1"
+            ;;
+        p)
+            EXE_CPACK="1"
+            ;;
+        a)
+            NIGHTLY=false
+            ;;
+        x)
+            EXTRACMAKE+=($OPTARG)
+            ;;
+        h)
+            usage
+            exit 0
+            ;;
+        :)
+            echo "Argument -$OPTARG requires a parameter!"
+            usage
+            exit 1
+            ;;
+        ?)
+            echo "Unknown argument: -$OPTARG"
+            usage
+            exit 1
+            ;;
+    esac
+done
+
+# If no step was explicitly specified, turn them all on:
+if [ -z "$EXE_CMAKE" -a -z "$EXE_MAKE" -a -z "$EXE_INSTALL" \
+     -a -z "$EXE_CPACK" ]; then
+    EXE_CMAKE="1"
+    EXE_MAKE="1"
+    EXE_INSTALL="1"
+    EXE_CPACK="1"
+fi
+
+# Stop on errors from here on out:
+set -e
+# consider a pipe failed if ANY of the commands fails
+set -o pipefail
+
+# Source in our environment
+AthAnalysisSrcDir=$(dirname ${BASH_SOURCE[0]})
+if [ -z "$BUILDDIR" ]; then
+    BUILDDIR=${AthAnalysisSrcDir}/../../../build
+fi
+mkdir -p ${BUILDDIR}
+BUILDDIR=$(\cd ${BUILDDIR} && \pwd)
+source $AthAnalysisSrcDir/build_env.sh -b $BUILDDIR >& ${BUILDDIR}/build_env.log
+cat ${BUILDDIR}/build_env.log
+
+# create the actual build directory
+mkdir -p ${BUILDDIR}/build/AthAnalysis
+
+# CMake:
+if [ -n "$EXE_CMAKE" ]; then
+    # Remove the CMakeCache.txt file, to force CMake to find externals
+    # from scratch in an incremental build.
+    rm -f ${BUILDDIR}/build/AthAnalysis/CMakeCache.txt
+    # Now run the actual CMake configuration:
+    { _time_ cmake --graphviz=${BUILDDIR}/build/AthAnalysis/packages.dot \
+        -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \
+        -DCTEST_USE_LAUNCHERS:BOOL=TRUE \
+        ${EXTRACMAKE[@]} \
+        -B ${BUILDDIR}/build/AthAnalysis \
+        -S ${AthAnalysisSrcDir}; } \
+            2>&1 | tee ${BUILDDIR}/build/AthAnalysis/cmake_config.log
+fi
+
+# for nightly builds we want to get as far as we can
+if [ "$NIGHTLY" = true ]; then
+    # At this point stop worrying about errors:
+    set +e
+fi
+
+# make:
+if [ -n "$EXE_MAKE" ]; then
+    # Forcibly remove the merged CLID file from the previous build, to
+    # avoid issues with some library possibly changing the name/CLID
+    # of something during the build.
+    rm -f ${BUILDDIR}/build/AthAnalysis/*/share/clid.db
+    # Extra argument(s) for the build tool.
+    BUILDARGS=()
+    if [ "$NIGHTLY" = true ]; then
+        if [[ "${EXTRACMAKE[@]}" == *"Ninja"* ]]; then
+            BUILDARGS+=(-k0)
+        else
+            BUILDARGS+=(-k)
+        fi
+    fi
+    # Build the project.
+    { _time_ cmake --build ${BUILDDIR}/build/AthAnalysis -- ${BUILDARGS[@]}; } \
+        2>&1 | tee ${BUILDDIR}/build/AthAnalysis/cmake_build.log
+fi
+
+# Install the results:
+if [ -n "$EXE_INSTALL" ]; then
+    { DESTDIR=${BUILDDIR}/install _time_ \
+      cmake --install ${BUILDDIR}/build/AthAnalysis; } \
+	 2>&1 | tee ${BUILDDIR}/build/AthAnalysis/cmake_install.log
+fi
+
+# Build an RPM for the release:
+if [ -n "$EXE_CPACK" ]; then
+    cd ${BUILDDIR}/build/AthAnalysis
+    { _time_ cpack; } 2>&1 | tee ${BUILDDIR}/build/AthAnalysis/cmake_cpack.log
+    if [ "$BUILDTYPE" = "RelWithDebInfo" ]; then
+	    { _time_ cpack --config CPackDbgRPMConfig.cmake; } \
+            2>&1 | tee -a ${BUILDDIR}/build/AthAnalysis/cmake_cpack.log
+    fi
+    cp AthAnalysis*.rpm ${BUILDDIR}/
+fi
diff --git a/Projects/AthAnalysis/build_env.sh b/Projects/AthAnalysis/build_env.sh
new file mode 100644
index 0000000000000000000000000000000000000000..aede41bd025f72116c702564edaa6043728ac744
--- /dev/null
+++ b/Projects/AthAnalysis/build_env.sh
@@ -0,0 +1,98 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# This script sets up the build enironment for an AthAnalysis
+# build, on top of a built set of externals (including Gaudi)
+#
+# This script is kept separate from the build.sh
+# wrapper so it can be sourced separately from it when
+# clients want to manage their own build and just want
+# to setup the build environment
+
+env_usage() {
+    echo "Usage: build_env.sh [-b build dir]"
+}
+
+# This function actually sets up the environment for us
+# (factorise it here in case it needs skipped)
+env_setup() {
+    startdir=$(pwd)
+    # As this script can be sourced we need to support zsh and
+    # possibly other Bourne shells
+    if [ "x${BASH_SOURCE[0]}" = "x" ]; then
+    # This trick should do the right thing under ZSH:
+	thisdir=$(dirname `print -P %x`)
+	if [ $? != 0 ]; then
+            echo "ERROR: This script must be sourced from BASH or ZSH"
+            return 1
+	fi
+    else
+    # The BASH solution is a bit more straight forward:
+	thisdir=$(dirname ${BASH_SOURCE[0]})
+    fi
+    AthAnalysisSrcDir=$(cd ${thisdir};pwd)
+
+    # The directory holding the helper scripts:
+    scriptsdir=${AthAnalysisSrcDir}/../../Build/AtlasBuildScripts
+
+    # Go to the main directory of the repository:
+    cd ${AthAnalysisSrcDir}/../..
+
+    # Check if the user specified any source/build directories:
+    if [ "$BUILDDIR" = "" ]; then
+	BUILDDIR=${AthAnalysisSrcDir}/../../../build
+    fi
+
+    # Get the version of AthAnalysis for the build.
+    version=`cat ${AthAnalysisSrcDir}/version.txt`
+
+    # Set up the environment for the build:
+    export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AthAnalysis
+
+    # Set up the environment variables for finding LCG externals:
+    source ${scriptsdir}/LCG_RELEASE_BASE.sh
+
+    # Set up the AthAnalysisExternals project:
+    extDir=${BUILDDIR}/install/AthAnalysisExternals/${version}/InstallArea
+    if [ ! -d ${extDir} ]; then
+	echo "Didn't find the AthAnalysisExternals project under ${extDir}"
+    fi
+    echo "Setting up AthAnalysisExternals from: ${extDir}"
+    source ${extDir}/*/setup.sh
+
+    cd $startdir
+}
+
+# we need to reset the option index as we are sourcing this script
+# http://stackoverflow.com/questions/23581368/bug-in-parsing-args-with-getopts-in-bash
+OPTIND=1
+
+# Parse the command line arguments:
+BUILDDIR=""
+while getopts "b:h" opt; do
+    case $opt in
+        b)
+            BUILDDIR=$OPTARG
+            ;;
+	h)
+	    env_usage
+	    ABORT=1
+	    ;;
+        :)
+            echo "Argument -$OPTARG requires a parameter!"
+            env_usage
+	    ABORT=1
+            ;;
+        ?)
+            echo "Unknown argument: -$OPTARG"
+            env_usage
+	    ABORT=1
+            ;;
+    esac
+done
+
+# Put a big wrapper around bad argument case, because
+# a sourced script should not call "exit". This is quite
+# annoying...
+if [ -z "$ABORT" ]; then
+    env_setup
+fi
diff --git a/Projects/AthAnalysis/build_externals.sh b/Projects/AthAnalysis/build_externals.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a204d1b32c07e8ccaadcfb2bf722cf822254d3b0
--- /dev/null
+++ b/Projects/AthAnalysis/build_externals.sh
@@ -0,0 +1,145 @@
+#!/bin/bash
+#
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# Script building all the externals necessary for AthAnalysis.
+#
+
+# Function printing the usage information for the script
+usage() {
+    echo "Usage: build_externals.sh [-t build_type] [-b build_dir] [-f] [-c]"
+    echo " -f: Force rebuild of externals from scratch, otherwise if script"
+    echo "     finds an external build present it will only do an incremental"
+    echo "     build"
+    echo " -c: Build the externals for the continuous integration (CI) system,"
+    echo "     skipping the build of the externals RPMs."
+    echo " -x: Extra cmake argument(s) to provide for the build(configuration)"
+    echo "     of all externals needed by AthAnalysis."
+    echo "If a build_dir is not given the default is '../build'"
+    echo "relative to the athena checkout"
+}
+
+# Parse the command line arguments:
+BUILDDIR=""
+BUILDTYPE="RelWithDebInfo"
+FORCE=""
+CI=""
+EXTRACMAKE=(-DLCG_VERSION_NUMBER=98 -DLCG_VERSION_POSTFIX="python3_ATLAS_2"
+            -DATLAS_GAUDI_TAG="v35r0.001")
+while getopts ":t:b:x:fch" opt; do
+    case $opt in
+        t)
+            BUILDTYPE=$OPTARG
+            ;;
+        b)
+            BUILDDIR=$OPTARG
+            ;;
+        f)
+            FORCE="1"
+            ;;
+        c)
+            CI="1"
+            ;;
+        x)
+            EXTRACMAKE+=($OPTARG)
+            ;;
+        h)
+            usage
+            exit 0
+            ;;
+        :)
+            echo "Argument -$OPTARG requires a parameter!"
+            usage
+            exit 1
+            ;;
+        ?)
+            echo "Unknown argument: -$OPTARG"
+            usage
+            exit 1
+            ;;
+    esac
+done
+
+# Only stop on errors if we are in the CI. Otherwise just count them.
+if [ "$CI" = "1" ]; then
+    set -e
+    set -o pipefail
+fi
+ERROR_COUNT=0
+
+# We are in BASH, get the path of this script in a simple way:
+thisdir=$(dirname ${BASH_SOURCE[0]})
+thisdir=$(cd ${thisdir};pwd)
+
+# Go to the main directory of the repository:
+cd ${thisdir}/../..
+
+# Check if the user specified any source/build directories:
+if [ "$BUILDDIR" = "" ]; then
+    BUILDDIR=${thisdir}/../../../build
+fi
+mkdir -p ${BUILDDIR}
+BUILDDIR=$(cd $BUILDDIR; pwd)
+
+if [ "$FORCE" = "1" ]; then
+    echo "Force deleting existing build area..."
+    rm -fr ${BUILDDIR}/install/AthAnalysisExternals
+    rm -fr ${BUILDDIR}/src/AthAnalysisExternals
+    rm -fr ${BUILDDIR}/build/AthAnalysisExternals
+fi
+
+# Get the version of AthAnalysis for the build.
+version=`cat ${thisdir}/version.txt`
+# Generate hash of any extra cmake arguments.
+cmakehash=`echo -n "${EXTRACMAKE}" | openssl md5 | awk '{print $2}'`
+
+# Check if previous externals build can be reused:
+externals_stamp=${BUILDDIR}/build/AthAnalysisExternals/externals-${version}-${cmakehash}.stamp
+if [ -f ${externals_stamp} ]; then
+    if diff -q ${externals_stamp} ${thisdir}/externals.txt; then
+        echo "Correct version of externals already available in ${BUILDDIR}"
+        exit 0
+    else
+        rm ${externals_stamp}
+    fi
+fi
+
+# Create some directories:
+mkdir -p ${BUILDDIR}/{src,install}
+
+# The directory holding the helper scripts:
+scriptsdir=${thisdir}/../../Build/AtlasBuildScripts
+scriptsdir=$(cd ${scriptsdir}; pwd)
+
+# Set the environment variable for finding LCG releases:
+source ${scriptsdir}/LCG_RELEASE_BASE.sh
+
+# Flag for triggering the build of RPMs for the externals:
+RPMOPTIONS="-r ${BUILDDIR}"
+if [ "$CI" = "1" ]; then
+    RPMOPTIONS=
+fi
+
+# Read in the tag/branch to use for AthAnalysisExternals:
+AthAnalysisExternalsVersion=$(awk '/^AthAnalysisExternalsVersion/{print $3}' ${thisdir}/externals.txt)
+
+# Check out AthAnalysisExternals from the right branch/tag:
+${scriptsdir}/checkout_atlasexternals.sh \
+    -t ${AthAnalysisExternalsVersion} \
+    -s ${BUILDDIR}/src/AthAnalysisExternals 2>&1 | tee ${BUILDDIR}/src/checkout.AthAnalysisExternals.log
+
+# Build AthAnalysisExternals:
+${scriptsdir}/build_atlasexternals.sh \
+    -s ${BUILDDIR}/src/AthAnalysisExternals \
+    -b ${BUILDDIR}/build/AthAnalysisExternals \
+    -i ${BUILDDIR}/install \
+    -p AthAnalysisExternals ${RPMOPTIONS} -t ${BUILDTYPE} \
+    ${EXTRACMAKE[@]/#/-x } -v ${version} || ((ERROR_COUNT++))
+
+# Exit with the error count taken into account.
+if [ ${ERROR_COUNT} -ne 0 ]; then
+    echo "AthAnalysis externals build encountered ${ERROR_COUNT} error(s)"
+else
+    cp ${thisdir}/externals.txt ${externals_stamp}
+fi
+exit ${ERROR_COUNT}
diff --git a/Projects/AthAnalysis/cmake/PostConfig.cmake.in b/Projects/AthAnalysis/cmake/PostConfig.cmake.in
new file mode 100644
index 0000000000000000000000000000000000000000..931da4b36edb1260e8e7af9c2277e4d41e08c060
--- /dev/null
+++ b/Projects/AthAnalysis/cmake/PostConfig.cmake.in
@@ -0,0 +1,17 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# File taking care of pointing the downstream projects at the right
+# version of the externals.
+#
+
+# Set up a "quiet flag".
+set( _quietFlag )
+if( AthAnalysis_FIND_QUIETLY )
+   set( _quietFlag QUIET )
+endif()
+
+# CMake cache variable(s).
+set( CLHEP_ROOT "${CLHEP_LCGROOT}" CACHE PATH "Path to pick up CLHEP from" )
+
+# Find Gaudi.
+find_package( Gaudi @Gaudi_VERSION@ EXACT REQUIRED ${_quietFlag} )
diff --git a/Projects/AthAnalysis/cmake/PreConfig.cmake.in b/Projects/AthAnalysis/cmake/PreConfig.cmake.in
new file mode 100644
index 0000000000000000000000000000000000000000..5f56b636e732633cc202bd01206c423a7006dd40
--- /dev/null
+++ b/Projects/AthAnalysis/cmake/PreConfig.cmake.in
@@ -0,0 +1,17 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# Pre-config script to propagate variables to downstream projects
+#
+
+# Set up the project's flake8 usage.
+set( ATLAS_FLAKE8 @ATLAS_FLAKE8@
+   CACHE STRING "Default flake8 command" )
+set( ATLAS_PYTHON_CHECKER @ATLAS_PYTHON_CHECKER@
+   CACHE STRING "Python checker command to run during Python module compilation" )
+
+# Compilation flag(s).
+add_definitions( -DXAOD_ANALYSIS )
+
+# CMake cache variable(s).
+set( XAOD_ANALYSIS TRUE CACHE BOOL
+   "Flag specifying that this is an analysis release" )
diff --git a/Projects/AthAnalysis/cmake/README.txt.in b/Projects/AthAnalysis/cmake/README.txt.in
new file mode 100644
index 0000000000000000000000000000000000000000..5f5b373adc2905eaca231fe90eba46471c94f805
--- /dev/null
+++ b/Projects/AthAnalysis/cmake/README.txt.in
@@ -0,0 +1,5 @@
+
+  AthAnalysis - @CMAKE_PROJECT_VERSION@
+
+This package provides version @CMAKE_PROJECT_VERSION@ of the ATLAS
+analysis software.
diff --git a/Projects/AthAnalysis/externals.txt b/Projects/AthAnalysis/externals.txt
new file mode 100644
index 0000000000000000000000000000000000000000..3eab080a196206b8e710e1e7f958d51b271fb1ae
--- /dev/null
+++ b/Projects/AthAnalysis/externals.txt
@@ -0,0 +1,9 @@
+# Versions of the various externals to build before starting the build of
+# this project, when doing a full stack nightly build.
+#
+# Remember that when specifying the name of a branch, you *must* put
+# an "origin/" prefix before it. For tags however this is explicitly
+# forbidden.
+
+# The version of atlas/atlasexternals to use:
+AthAnalysisExternalsVersion = 2.0.92
diff --git a/Projects/AthAnalysis/package_filters.txt b/Projects/AthAnalysis/package_filters.txt
new file mode 100644
index 0000000000000000000000000000000000000000..dee4753b679ef9a44fa5a89f590cf68b7c7e31c7
--- /dev/null
+++ b/Projects/AthAnalysis/package_filters.txt
@@ -0,0 +1,213 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# Package filtering rules for the AthAnalysis project build.
+#
+
+# Testing package(s):
++ AsgExternal/Asg_Test
++ AtlasTest/TestTools
+
+# Core xAOD reading:
++ Control/AthContainersInterfaces
++ Control/AthContainersRoot
++ Control/AthContainers
++ Control/AthLinks
++ Control/AthToolSupport/.*
++ Control/CxxUtils
++ Control/xAODRootAccess.*
+
+# EDM:
++ Event/EventPrimitives
++ Event/FourMomUtils
++ Event/xAOD/xAODMetaDataCnv
++ Event/xAOD/xAODTriggerCnv
++ Event/xAOD/xAODTrackingCnv
++ Event/xAOD/xAODEventFormatCnv
++ Event/xAOD/xAODCoreCnv
++ Event/xAOD/xAODTruthCnv
+#+ Event/xAOD/xAODEventInfoCnv
+- Event/xAOD/.*Cnv
++ Event/xAOD/.*
+
+# Others:
++ Calorimeter/CaloGeoHelpers
++ DetectorDescription/GeoPrimitives
++ DetectorDescription/IRegionSelector
++ DetectorDescription/RoiDescriptor
+
+# Packages temporarily turned off:
+- Reconstruction/Jet/JetAnalysisTools/.*
+- Reconstruction/Jet/JetMomentTools
+
+# Analysis Tools:
++ DataQuality/GoodRunsLists
++ ForwardDetectors/ZDC/ZdcAnalysis
++ Generators/TruthUtils
++ InnerDetector/InDetRecTools/InDetTrackSelectionTool
++ InnerDetector/InDetRecTools/TrackVertexAssociationTool
++ MuonSpectrometer/MuonStationIndex
+- PhysicsAnalysis/Algorithms/StandaloneAnalysisAlgorithms
++ PhysicsAnalysis/Algorithms/.*
++ PhysicsAnalysis/AnalysisCommon/AssociationUtils
++ PhysicsAnalysis/AnalysisCommon/EventUtils
+#+ PhysicsAnalysis/AnalysisCommon/FakeBkgTools
++ PhysicsAnalysis/AnalysisCommon/FsrUtils
++ PhysicsAnalysis/AnalysisCommon/IsolationSelection
++ PhysicsAnalysis/AnalysisCommon/PATCore
++ PhysicsAnalysis/AnalysisCommon/PATInterfaces
++ PhysicsAnalysis/AnalysisCommon/PMGTools
++ PhysicsAnalysis/AnalysisCommon/ParticleJetTools
++ PhysicsAnalysis/AnalysisCommon/PileupReweighting
++ PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools
++ PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/GammaORTools
++ PhysicsAnalysis/AnalysisCommon/ReweightUtils
++ PhysicsAnalysis/AnalysisCommon/HDF5Utils
++ PhysicsAnalysis/AnalysisCommon/CutBookkeeperUtils
+#+ PhysicsAnalysis/AnalysisCommon/ThinningUtils
++ PhysicsAnalysis/AnalysisCommon/TruthClassification
+#+ PhysicsAnalysis/BPhys/BPhysTools
++ PhysicsAnalysis/D3PDTools/RootCoreUtils
++ PhysicsAnalysis/D3PDTools/SampleHandler
++ PhysicsAnalysis/D3PDTools/AnaAlgorithm
+- PhysicsAnalysis/D3PDTools/.*
++ PhysicsAnalysis/ElectronPhotonID/.*
++ PhysicsAnalysis/HeavyIonPhys/HIEventUtils
++ PhysicsAnalysis/HiggsPhys/Run2/HZZ/Tools/ZMassConstraint
++ PhysicsAnalysis/Interfaces/.*
++ PhysicsAnalysis/JetMissingEtID/JetSelectorTools
++ PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/CalibrationDataInterface
++ PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency
++ PhysicsAnalysis/JetTagging/FlavorTagDiscriminants
++ PhysicsAnalysis/MCTruthClassifier
++ PhysicsAnalysis/MuonID/MuonIDAnalysis/.*
++ PhysicsAnalysis/MuonID/MuonSelectorTools
+#+ PhysicsAnalysis/SUSYPhys/SUSYTools
++ PhysicsAnalysis/TauID/DiTauMassTools
++ PhysicsAnalysis/TauID/TauAnalysisTools
++ PhysicsAnalysis/TrackingID/.*
++ Reconstruction/EventShapes/EventShapeInterface
+#- Reconstruction/Jet/JetAnalysisTools/JetAnalysisEDM
+- Reconstruction/Jet/JetEvent.*
+- Reconstruction/Jet/JetMonitoring
++ Reconstruction/Jet/JetReclustering
+- Reconstruction/Jet/JetRec.+
+- Reconstruction/Jet/JetSimTools
+- Reconstruction/Jet/JetValidation
++ Reconstruction/Jet/Jet.*
+#+ Reconstruction/Jet/BoostedJetTaggers
++ Reconstruction/MET/METInterface
++ Reconstruction/MET/METUtilities
++ Reconstruction/MVAUtils
++ Reconstruction/PFlow/PFlowUtils
++ Reconstruction/egamma/egammaInterfaces
++ Reconstruction/egamma/egammaLayerRecalibTool
++ Reconstruction/egamma/egammaMVACalib
++ Reconstruction/egamma/egammaRecEvent
++ Reconstruction/egamma/egammaUtils
++ Reconstruction/tauRecTools
++ Tools/PathResolver
++ Tools/ART
++ Tools/DirectIOART
++ Trigger/TrigAnalysis/TrigAnalysisInterfaces
++ Trigger/TrigAnalysis/TrigBunchCrossingTool
++ Trigger/TrigAnalysis/TrigDecisionTool
++ Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection
++ Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching
++ Trigger/TrigAnalysis/TriggerMatchingTool
++ Trigger/TrigConfiguration/TrigConfBase
++ Trigger/TrigConfiguration/TrigConfData
++ Trigger/TrigConfiguration/TrigConfHLTData
++ Trigger/TrigConfiguration/TrigConfHLTUtils
++ Trigger/TrigConfiguration/TrigConfInterfaces
++ Trigger/TrigConfiguration/TrigConfL1Data
++ Trigger/TrigConfiguration/TrigConfxAOD
+#+ Trigger/TrigCost/EnhancedBiasWeighter
+#+ Trigger/TrigCost/RatesAnalysis
++ Trigger/TrigEvent/TrigDecisionInterface
++ Trigger/TrigEvent/TrigNavStructure
++ Trigger/TrigEvent/TrigRoiConversion
++ Trigger/TrigEvent/TrigSteeringEvent
++ Trigger/TrigSteer/TrigCompositeUtils
++ Trigger/TrigValidation/TrigAnalysisTest
+#+ Trigger/TriggerSimulation/TrigBtagEmulationTool
+#+ Reconstruction/RecoTools/IsolationTool
++ Reconstruction/RecoTools/RecoToolInterfaces
+
+### Here follows the Athena-specific parts of the analysis release
+
+# Core Athena (would like to reduce) :
++ Control/AthAllocators
++ Control/AthenaServices
++ Control/StoreGate
++ Control/SGComps
++ Control/SGTools
++ Control/StoreGateBindings
++ Control/SGMon/SGAudCore
++ Control/AthenaBaseComps
++ Control/AthAnalysisBaseComps
++ Control/AthenaCommon
++ Control/AthenaKernel
++ Control/AthenaPython
++ Control/CLID.*
++ Control/GaudiSequencer
++ Control/DataModelRoot
++ Control/RootUtils
++ Control/PerformanceMonitoring/PerfMonKernel
++ Control/PerformanceMonitoring/PerfMonComps
++ Control/PerformanceMonitoring/PerfMonEvent
++ Control/PerformanceMonitoring/PerfMonGPerfTools
++ Control/Navigation
+
+#scripts package contains useful commands like get_files
++ Tools/Scripts
+
++ Tools/PyUtils
+# Need IOVSvc for, at least, the file peeking (:-()
++ Control/IOVSvc
+
++ PhysicsAnalysis/POOLRootAccess
+
+# POOL Support (would like to decouple from core) :
++ Database/APR/.*
++ Database/AthenaRoot/.*
++ Database/ConnectionManagement/.*
+- Database/AthenaPOOL/AthenaPoolExample.*
+- Database/AthenaPOOL/.*Tools
++ Database/AthenaPOOL/DBDataModel
++ Database/AthenaPOOL/.*
++ Database/IOVDb.*
++ Database/PersistentDataModel.*
++ Database/TPTools
++ Database/CoraCool
++ Database/AtlasSTLAddReflex
++ Control/DataModelAthenaPool
+
+# Basic DF setup :
++ PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore
++ PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
++ PhysicsAnalysis/CommonTools/ExpressionEvaluation
+
+# EVNT support :
+#+ PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth
++ Generators/AtlasHepMC
++ Generators/GenInterfaces
++ Generators/GeneratorObjects.*
++ Generators/HepMCWeightSvc
+
+# Needed for CutFlowSvc when using filter algs
++ Event/EventBookkeeperTools
++ Event/EventBookkeeperMetaData
+
+# LumiBlockComps for the LumiBlockMetaDataTool
++ LumiBlock/LumiBlockComps
+
+# Other extras (would very much like to eliminate!) :
++ Event/EventInfo.*
++ Event/EventAthenaPool
++ Event/EventTPCnv
++ Event/EventPTCnv
++ DetectorDescription/Identifier
++ DetectorDescription/GeoModel/GeoModelInterfaces
+
+# Don't build anything else:
+- .*
diff --git a/Projects/AthAnalysis/version.txt b/Projects/AthAnalysis/version.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d4b369b4e5d8570b7a4ffd09e3e1336fcc9bc5e1
--- /dev/null
+++ b/Projects/AthAnalysis/version.txt
@@ -0,0 +1 @@
+22.2.4
diff --git a/Reconstruction/Jet/JetRec/CMakeLists.txt b/Reconstruction/Jet/JetRec/CMakeLists.txt
index 767c7545bc1890ba5453b871b06cc801277ea2b2..c37361923ea85d8f008a887adafc6276e62abed3 100644
--- a/Reconstruction/Jet/JetRec/CMakeLists.txt
+++ b/Reconstruction/Jet/JetRec/CMakeLists.txt
@@ -7,8 +7,11 @@ atlas_subdir( JetRec )
 set( extra_libs )
 if( NOT GENERATIONBASE )
    list( APPEND extra_libs xAODPFlow )
+   if( NOT XAOD_ANALYSIS )
+      list( APPEND extra_libs AthenaMonitoringKernelLib )
+   endif()
    if( NOT XAOD_STANDALONE )
-      list( APPEND extra_libs AthenaMonitoringKernelLib StoreGateLib )
+      list( APPEND extra_libs StoreGateLib )
    endif()
 endif()
 
diff --git a/Reconstruction/Jet/JetRec/JetRec/JetCopier.h b/Reconstruction/Jet/JetRec/JetRec/JetCopier.h
index 5d6f7f9855c4ce7ab7dad90e8cf15b36bfc16916..d6929efeb96d577afc4bc17fbeeb26c5404a7ec1 100644
--- a/Reconstruction/Jet/JetRec/JetRec/JetCopier.h
+++ b/Reconstruction/Jet/JetRec/JetRec/JetCopier.h
@@ -26,7 +26,7 @@
 
 // This class doesn't (yet) exist for AnalysisBase, so in that release
 // we will simply have to rerun modifiers if we need them.
-#ifndef XAOD_ANALYSIS
+#ifndef XAOD_STANDALONE
 #include "StoreGate/ShallowCopyDecorDeps.h"
 #endif
 
@@ -42,7 +42,7 @@ class JetCopier
     // Called in parent initialize()
     virtual StatusCode initialize() override;
 
-#ifndef XAOD_ANALYSIS
+#ifndef XAOD_STANDALONE
     // Needed to initialise the ShallowCopyDecorDeps object, which propagates
     // decorations on the original into the copy in StoreGate.
     // Override interface implementation in Athena only
@@ -64,7 +64,7 @@ class JetCopier
     Gaudi::Property<bool> m_shallowCopy {this, "ShallowCopy", true, "True for shallow copy, false for deep copy"};
     Gaudi::Property<bool> m_shallowIO {this, "ShallowIO", false, "True for storing only modified data"};
 
-#ifndef XAOD_ANALYSIS
+#ifndef XAOD_STANDALONE
     SG::ShallowCopyDecorDeps<xAOD::JetContainer> m_decorDeps { this, "DecorDeps", {},
           "List of decorations to propagate through the shallow copy." };
 #endif
diff --git a/Reconstruction/Jet/JetRec/JetRec/JetRecTool.h b/Reconstruction/Jet/JetRec/JetRec/JetRecTool.h
index 00063abd483a6c585782d3f566c99d4f18de3b4b..129c80e58daa9002ebf3f89aee068abb28704d2d 100644
--- a/Reconstruction/Jet/JetRec/JetRec/JetRecTool.h
+++ b/Reconstruction/Jet/JetRec/JetRec/JetRecTool.h
@@ -62,7 +62,7 @@
 #include "AsgDataHandles/WriteHandleKey.h"
 #include "JetEDM/PseudoJetVector.h"
 #include "JetRec/PseudoJetContainer.h"
-#if !defined(GENERATIONBASE) && !defined(XAOD_STANDALONE)
+#if !defined(GENERATIONBASE) && !defined(XAOD_ANALYSIS)
   #include "AthenaMonitoringKernel/GenericMonitoringTool.h"
 #endif
 
@@ -101,7 +101,7 @@ public:
   /// Default returns 0 and adds no names.
   int outputContainerNames(std::vector<std::string>& connames) override;
 
-  
+
   /// For trigger usage in grooming mode only : give the input ungroomed jet container.
   void setInputJetContainer(const xAOD::JetContainer* cont);
 
@@ -117,7 +117,7 @@ private:
   std::unique_ptr<xAOD::JetContainer> groomJets() const;
   std::unique_ptr<xAOD::JetContainer> copyJets() const;
 
-  
+
   // Properties.
   SG::WriteHandleKey<xAOD::JetContainer> m_outcoll {this, "OutputContainer", ""};
   SG::ReadHandleKey<xAOD::JetContainer> m_incoll {this, "InputContainer", ""};
@@ -158,7 +158,7 @@ private:
   mutable std::vector<TStopwatch> m_modclocks;
   mutable std::vector<TStopwatch> m_conclocks;
 
-#if !defined (GENERATIONBASE) && !defined (XAOD_STANDALONE)
+#if !defined (GENERATIONBASE) && !defined (XAOD_ANALYSIS)
   ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
 #endif
 
diff --git a/Reconstruction/Jet/JetRec/Root/JetCopier.cxx b/Reconstruction/Jet/JetRec/Root/JetCopier.cxx
index 07297e9e3787ebbdc43af43af0827671695a6e59..f198e1396a7ce1279d91ec36ef6040034f782ff2 100644
--- a/Reconstruction/Jet/JetRec/Root/JetCopier.cxx
+++ b/Reconstruction/Jet/JetRec/Root/JetCopier.cxx
@@ -36,7 +36,7 @@ StatusCode JetCopier::initialize() {
 }
 
 
-#ifndef XAOD_ANALYSIS
+#ifndef XAOD_STANDALONE
 // Setup helper to propagate decorations from original to copy
 StatusCode JetCopier::initWithOutput(const SG::WriteHandleKey<xAOD::JetContainer>& outputJets) {
   return m_decorDeps.initialize(m_inputJets, outputJets) ;
@@ -54,14 +54,14 @@ StatusCode JetCopier::getAndRecordJets(SG::WriteHandle<xAOD::JetContainer>& jetH
   if(m_shallowCopy){
     std::unique_ptr<xAOD::ShallowAuxContainer> auxCont_derived(static_cast<xAOD::ShallowAuxContainer*>(auxCont.release()));
     ATH_CHECK( jetHandle.record(std::move(jets), std::move(auxCont_derived)) );
-#ifndef XAOD_ANALYSIS
+#ifndef XAOD_STANDALONE
     ATH_CHECK( m_decorDeps.linkDecors (m_inputJets) );
 #endif
   }
   else{
     std::unique_ptr<xAOD::JetAuxContainer> auxCont_derived(static_cast<xAOD::JetAuxContainer*>(auxCont.release()));
     ATH_CHECK( jetHandle.record(std::move(jets), std::move(auxCont_derived)) );
-#ifndef XAOD_ANALYSIS
+#ifndef XAOD_STANDALONE
     ATH_CHECK( m_decorDeps.linkDecors (m_inputJets) );
 #endif
   }
diff --git a/Reconstruction/Jet/JetRec/Root/JetRecTool.cxx b/Reconstruction/Jet/JetRec/Root/JetRecTool.cxx
index 6a338e63035ac6c8fb951b7e051fc4827da5c6bb..bde191552fd91758a2108e4e77432b89aa970d8a 100644
--- a/Reconstruction/Jet/JetRec/Root/JetRecTool.cxx
+++ b/Reconstruction/Jet/JetRec/Root/JetRecTool.cxx
@@ -23,7 +23,7 @@
 #include "AsgDataHandles/ReadHandle.h"
 #include "AsgDataHandles/WriteHandle.h"
 
-#if !defined (GENERATIONBASE) && !defined (XAOD_STANDALONE)
+#if !defined (GENERATIONBASE) && !defined (XAOD_ANALYSIS)
   #include "AthenaMonitoringKernel/Monitored.h"
 #endif
 
@@ -42,7 +42,7 @@ using xAOD::Jet;
 JetRecTool::JetRecTool(std::string myname)
 : AsgTool(myname),
   m_intool("",this),
-#ifdef XAOD_STANDALONE
+#ifdef XAOD_ANALYSIS
   m_hpjr("",this),
 #else
   m_hpjr("JetPseudojetRetriever/jpjr",this),
@@ -114,7 +114,7 @@ StatusCode JetRecTool::initialize() {
       m_ppjr = new JetPseudojetRetriever(name()+"_retriever");
 #else
       m_ppjr = nullptr;
-#endif 
+#endif
   }
   ATH_MSG_INFO("Jet reconstruction mode: " << mode);
   // Check/set the input jet collection name.
@@ -207,7 +207,7 @@ StatusCode JetRecTool::initialize() {
   for ( auto& clk : m_conclocks) {
     clk.Reset();
   }
-  
+
   ATH_MSG_INFO(prefix << "Input collection names:");
   for (const auto& name : m_incolls) ATH_MSG_INFO(prefix << "  " << name);
   ATH_MSG_INFO(prefix << "Output collection names:");
@@ -219,7 +219,7 @@ StatusCode JetRecTool::initialize() {
   m_conclock.Reset();
   m_nevt = 0;
 
-#if !defined (GENERATIONBASE) && !defined (XAOD_STANDALONE)
+#if !defined (GENERATIONBASE) && !defined (XAOD_ANALYSIS)
   if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
 #endif
 
@@ -318,7 +318,7 @@ const JetContainer* JetRecTool::build() const {
   }
 
 
-#if !defined (GENERATIONBASE) && !defined (XAOD_STANDALONE)
+#if !defined (GENERATIONBASE) && !defined (XAOD_ANALYSIS)
   // monitor jet multiplicity and basic jet kinematics
   auto njets = Monitored::Scalar<int>("nJets");
   auto pt    = Monitored::Collection("pt",  *jetsHandle, [c=m_mevtogev]( const xAOD::Jet* jet ) { return jet->pt()*c; });
@@ -419,22 +419,22 @@ int JetRecTool::outputContainerNames(std::vector<std::string>& connames) {
 }
 
 //**********************************************************************
- 
+
  void JetRecTool::setInputJetContainer(const xAOD::JetContainer* cont) {
-   m_trigInputJetsForGrooming = cont; 
+   m_trigInputJetsForGrooming = cont;
  }
 
 //**********************************************************************
 
 std::unique_ptr<PseudoJetContainer> JetRecTool::collectPseudoJets() const{
-  // PseudoJetContainer used for jet finding 
-  
+  // PseudoJetContainer used for jet finding
+
   m_inpclock.Start(false);
-  
+
   auto allPseudoJets = std::make_unique<PseudoJetContainer>();
 
   ATH_MSG_DEBUG("Fetching pseudojet inputs.");
-    
+
   for (const auto& pjcontkey : m_psjsin) {
     SG::ReadHandle<PseudoJetContainer> h_newpsjs( pjcontkey );
     ATH_MSG_DEBUG("Adding PseudoJetContainers for: " << h_newpsjs.key());
@@ -452,9 +452,9 @@ std::unique_ptr<PseudoJetContainer> JetRecTool::collectPseudoJets() const{
 }
 
 //**********************************************************************
- 
+
 std::unique_ptr<xAOD::JetContainer> JetRecTool::fillOutputContainer() const{
-  
+
   if (!m_finder.empty()) {return findJets();}
   if (!m_groomer.empty()) {return groomJets();}
   return copyJets();
@@ -480,7 +480,7 @@ const xAOD::JetContainer* JetRecTool::getOldJets() const{
   if ( pjetsin == 0 ) {
     ATH_MSG_ERROR("Unable to retrieve input jet container: " << m_incoll.key());
   } else {
-    ATH_MSG_DEBUG("Input collection " << m_incoll.key() 
+    ATH_MSG_DEBUG("Input collection " << m_incoll.key()
                   << " jet multiplicity is "<< pjetsin->size());
   }
     m_totclock.Stop();
@@ -512,14 +512,14 @@ std::unique_ptr<xAOD::JetContainer> JetRecTool::makeOutputContainer() const{
 //**********************************************************************
 
 std::unique_ptr<xAOD::JetContainer> JetRecTool::findJets() const {
-  
+
   m_actclock.Start(false);
   ATH_MSG_DEBUG("Finding jets.");
-  
+
   // The new jet collection.
   auto jets = makeOutputContainer();
-  
-  // PseudoJetContainer used for jet finding 
+
+  // PseudoJetContainer used for jet finding
   auto pseudoJets = collectPseudoJets();
 
   m_finder->find(*pseudoJets, *jets, m_inputtype);
@@ -531,9 +531,9 @@ std::unique_ptr<xAOD::JetContainer> JetRecTool::findJets() const {
 //**********************************************************************
 
 std::unique_ptr<xAOD::JetContainer> JetRecTool::groomJets() const{
-  
+
   m_actclock.Start(false);
-  
+
   // The new jet collection.
   auto jets = makeOutputContainer();
 
@@ -544,16 +544,16 @@ std::unique_ptr<xAOD::JetContainer> JetRecTool::groomJets() const{
     ATH_MSG_WARNING("Grooming: but input jets not found ");
     return jets;
   }
-  
+
   ATH_MSG_DEBUG("Grooming " << jetsIn->size() << " jets.");
 
-  // PseudoJetContainer used for jet finding 
+  // PseudoJetContainer used for jet finding
   auto pseudoJets = collectPseudoJets();
-  
+
   for (const auto ijet : *jetsIn){ m_groomer->groom(*ijet,
                                                     *pseudoJets,
                                                     *jets);}
-  
+
   m_actclock.Stop();
   return jets;
 }
@@ -561,10 +561,10 @@ std::unique_ptr<xAOD::JetContainer> JetRecTool::groomJets() const{
 //**********************************************************************
 
 std::unique_ptr<xAOD::JetContainer> JetRecTool::copyJets() const{
-  
+
   // The new jet collection.
   auto jets = makeOutputContainer();
-  
+
   // Retrieve the old jet collection.
   auto jetsIn = getOldJets();
 
@@ -581,7 +581,7 @@ std::unique_ptr<xAOD::JetContainer> JetRecTool::copyJets() const{
     jets->push_back(pnewjet);
     *pnewjet = *poldjet;
   }
-  
+
   m_actclock.Stop();
   return jets;
 }
diff --git a/Reconstruction/PFlow/PFlowUtils/CMakeLists.txt b/Reconstruction/PFlow/PFlowUtils/CMakeLists.txt
index 75fb320d21bddaaedf21ceb196b0d0ce46bf1f1a..eb531fa72de07df9b45a9b6fe73b95f84c4c11cf 100644
--- a/Reconstruction/PFlow/PFlowUtils/CMakeLists.txt
+++ b/Reconstruction/PFlow/PFlowUtils/CMakeLists.txt
@@ -9,7 +9,7 @@ atlas_add_library( PFlowUtilsLib
    PUBLIC_HEADERS PFlowUtils
    LINK_LIBRARIES AsgTools xAODPFlow )
 
-if( NOT XAOD_STANDALONE )
+if( NOT XAOD_ANALYSIS )
    atlas_add_component( PFlowUtils
       src/*.h src/*.cxx src/components/*.cxx
       LINK_LIBRARIES AthContainers AthenaBaseComps xAODJet xAODPFlow xAODTruth
diff --git a/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt b/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt
index 8f109fdeabb79adba673a971fb22a4b6870d96ee..34bdc8b8dace5186dc108f50f9982d932ac1e63d 100644
--- a/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt
@@ -1,20 +1,24 @@
-################################################################################
-# Package: egammaInterfaces
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaInterfaces )
 
+# Extra libraries used by the interface library.
+set( extra_libs )
+if( NOT XAOD_ANALYSIS )
+   set( extra_libs TrkParameters TrkTrack TrkEventPrimitives
+      TrkNeutralParameters TrkCaloExtension egammaRecEvent )
+endif()
 
 # Component(s) in the package:
 atlas_add_library( egammaInterfacesLib
-                   egammaInterfaces/*.h
-                   INTERFACE
-                   PUBLIC_HEADERS egammaInterfaces
-                   LINK_LIBRARIES GaudiKernel TrkCaloExtension TrkEventPrimitives TrkNeutralParameters TrkParameters
-                   TrkTrack egammaRecEvent xAODCaloEvent xAODEgamma xAODTracking)
+   egammaInterfaces/*.h
+   INTERFACE
+   PUBLIC_HEADERS egammaInterfaces
+   LINK_LIBRARIES GaudiKernel xAODCaloEvent xAODEgamma xAODTracking
+   ${extra_libs} )
 
 atlas_add_dictionary( egammaInterfacesDict
-                      egammaInterfaces/egammaInterfacesDict.h
-                      egammaInterfaces/selection.xml
-                      LINK_LIBRARIES egammaInterfacesLib )
+   egammaInterfaces/egammaInterfacesDict.h
+   egammaInterfaces/selection.xml
+   LINK_LIBRARIES egammaInterfacesLib )
diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h
index 8a46b57f925ecb76dc94eec1fbdf73609c22faee..5edb3297dbc582b82ea737bdd10a7715b6d27e29 100644
--- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h
+++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h
@@ -18,10 +18,8 @@
 #include "egammaInterfaces/ICaloCluster_OnTrackBuilder.h"
 #include "egammaInterfaces/IEMClusterTool.h"
 #include "egammaInterfaces/IEMConversionBuilder.h"
-#include "egammaInterfaces/IEMExtrapolationTools.h"
 #include "egammaInterfaces/IEMFourMomBuilder.h"
 #include "egammaInterfaces/IEMShowerBuilder.h"
-#include "egammaInterfaces/IEMTrackMatchBuilder.h"
 #include "egammaInterfaces/IegammaBackShape.h"
 #include "egammaInterfaces/IegammaBaseTool.h"
 #include "egammaInterfaces/IegammaCheckEnergyDepositTool.h"
@@ -31,7 +29,12 @@
 #include "egammaInterfaces/IegammaShowerShape.h"
 #include "egammaInterfaces/IegammaStripsShape.h"
 #include "egammaInterfaces/IegammaSwTool.h"
-#include "egammaInterfaces/IegammaTrkRefitterTool.h"
 #include "egammaInterfaces/IegammaMVASvc.h"
 #include "egammaInterfaces/IegammaOQFlagsBuilder.h"
+#ifndef XAOD_ANALYSIS
+#   include "egammaInterfaces/IEMExtrapolationTools.h"
+#   include "egammaInterfaces/IEMTrackMatchBuilder.h"
+#   include "egammaInterfaces/IegammaTrkRefitterTool.h"
+#endif // not XAOD_ANALYSIS
+
 #endif // EGAMMAINTERFACES_EGAMMAINTERFACESDICT_H
diff --git a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt
index b072f20a3f31552677154f83f30b7c6151ea9e79..4897240610632899c0dce3e77319f8e229c6f2a4 100644
--- a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt
@@ -5,10 +5,8 @@ atlas_subdir( egammaMVACalib )
 
 # Extra dependencies for Athena capable builds:
 set( extra_libs )
-if( XAOD_STANDALONE )
-   set( extra_libs xAODRootAccess)
-else()
-   set( extra_libs GaudiKernel egammaInterfacesLib )
+if( NOT XAOD_STANDALONE )
+   set( extra_libs PRIVATE_LINK_LIBRARIES GaudiKernel )
 endif()
 
 # External dependencies:
@@ -19,7 +17,8 @@ atlas_add_library( egammaMVACalibLib
    egammaMVACalib/*.h Root/*.cxx
    PUBLIC_HEADERS egammaMVACalib
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgMessagingLib xAODCaloEvent xAODEgamma ${extra_libs} )
+   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgMessagingLib xAODCaloEvent xAODEgamma
+   ${extra_libs} )
 
 if( NOT XAOD_STANDALONE )
 atlas_add_component( egammaMVACalib
diff --git a/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx
index ba163a48625d79286de0d7beb99e425f6285cc82..a81f9ab8fac963677c2e33a0c60e5929e8492884 100644
--- a/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx
+++ b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx
@@ -5,7 +5,7 @@
 
 #include "egammaMVACalib/egammaMVAFunctions.h"
 
-#ifndef XAOD_ANALYSIS
+#ifndef XAOD_STANDALONE
 #include "GaudiKernel/SystemOfUnits.h"
 using Gaudi::Units::GeV;
 #else
@@ -20,12 +20,12 @@ namespace egammaMVAFunctions
 {
 
   // forward declarations
-  void initializeClusterFuncs(funcMap_t& funcLibrary, 
-			      const std::string& prefix, 
+  void initializeClusterFuncs(funcMap_t& funcLibrary,
+			      const std::string& prefix,
 			      bool useLayerCorrected);
 
   void initializeEgammaFuncs(funcMap_t& funcLibrary,
-			     const std::string& prefix, 
+			     const std::string& prefix,
 			     bool useLayerCorrected);
 
   /// A function to build the map for electrons
@@ -47,7 +47,7 @@ namespace egammaMVAFunctions
       { return compute_el_trackz0(*(static_cast<const xAOD::Electron*>(eg))); };
     funcLibrary["el_refittedTrack_qoverp"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
       { return compute_el_refittedTrack_qoverp(*(static_cast<const xAOD::Electron*>(eg))); };
-    
+
     return funcLibraryPtr;
   }
 
@@ -56,7 +56,7 @@ namespace egammaMVAFunctions
   {
     auto funcLibraryPtr = std::make_unique<funcMap_t>();
     funcMap_t& funcLibrary = *funcLibraryPtr;
- 
+
     initializeClusterFuncs(funcLibrary, "ph", useLayerCorrected);
     initializeEgammaFuncs(funcLibrary, "ph", useLayerCorrected);
 
@@ -69,32 +69,32 @@ namespace egammaMVAFunctions
   {
     auto funcLibraryPtr = std::make_unique<funcMap_t>();
     funcMap_t& funcLibrary = *funcLibraryPtr;
-    
+
     initializeClusterFuncs(funcLibrary, "ph", useLayerCorrected);
     initializeEgammaFuncs(funcLibrary, "ph", useLayerCorrected);
-    
+
 
     funcLibrary["ph_Rconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float
       { return xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(eg)); };
-    
+
     funcLibrary["convR"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float
-      { 
+      {
 	auto ph = static_cast<const xAOD::Photon*>(eg);
-	if (compute_ptconv(ph) > 3*GeV) { 
+	if (compute_ptconv(ph) > 3*GeV) {
 	  return xAOD::EgammaHelpers::conversionRadius(ph);
-	} 
+	}
 	  return 799.0;
-	
+
       };
     funcLibrary["ph_zconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
       { return static_cast<const xAOD::Photon*>(eg)->vertex()->position().z(); };
     funcLibrary["ph_pt1conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float
-      { return compute_pt1conv(static_cast<const xAOD::Photon*>(eg)); };    
+      { return compute_pt1conv(static_cast<const xAOD::Photon*>(eg)); };
     funcLibrary["ph_pt2conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float
-      { return compute_pt2conv(static_cast<const xAOD::Photon*>(eg)); }; 
+      { return compute_pt2conv(static_cast<const xAOD::Photon*>(eg)); };
     funcLibrary["ph_ptconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
       { return compute_ptconv(static_cast<const xAOD::Photon*>(eg)); };
-    
+
     funcLibrary["convPtRatio"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float
       {
 	auto ph = static_cast<const xAOD::Photon*>(eg);
@@ -102,43 +102,43 @@ namespace egammaMVAFunctions
 	  auto pt1 = compute_pt1conv(ph);
 	  auto pt2 = compute_pt2conv(ph);
 	  return std::max(pt1, pt2)/(pt1+pt2);
-	} 
+	}
 	  return 1.0f;
-	
+
       };
-    
+
     if (useLayerCorrected) {
       funcLibrary["convEtOverPt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*cl)->float
 	{
 	  auto ph = static_cast<const xAOD::Photon*>(eg);
-	  
+
 	  float rv = 0.0;
 	  if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) {
 	    rv = std::max(0.0f, compute_correctedcl_Eacc(*cl)/(std::cosh(compute_cl_eta(*cl))*compute_ptconv(ph)));
-	  } 
+	  }
 	  return std::min(rv, 2.0f);
 	};
     } else {
       funcLibrary["convEtOverPt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*cl)->float
 	{
 	  auto ph = static_cast<const xAOD::Photon*>(eg);
-	  
+
 	  float rv = 0.0;
 	  if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) {
 	    rv = std::max(0.0f, compute_rawcl_Eacc(*cl)/(std::cosh(compute_cl_eta(*cl))*compute_ptconv(ph)));
-	  } 
+	  }
 	  return std::min(rv, 2.0f);
 	};
     }
-    
+
     return funcLibraryPtr;
   }
 
 
   // Initialize the functions that just depend on the cluster.
   // This helper function is not meant for external use.
-  void initializeClusterFuncs(funcMap_t& funcLibrary, 
-			      const std::string& prefix, 
+  void initializeClusterFuncs(funcMap_t& funcLibrary,
+			      const std::string& prefix,
 			      bool useLayerCorrected)
   {
 
@@ -154,19 +154,19 @@ namespace egammaMVAFunctions
       { return compute_cl_phiCalo(*cl); };
     funcLibrary[prefix + "_cl_E_TileGap3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
       { return cl->eSample(CaloSampling::TileGap3); };
-    
+
     funcLibrary["cellIndexCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
       { return std::floor(std::abs(compute_cl_etaCalo(*cl))/0.025); };
     funcLibrary["phiModCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
-      { return ((abs(compute_cl_eta(*cl)) < 1.425) ? 
+      { return ((abs(compute_cl_eta(*cl)) < 1.425) ?
 		std::fmod(compute_cl_phiCalo(*cl), TMath::Pi()/512) :
-		std::fmod(compute_cl_phiCalo(*cl), TMath::Pi()/384)); 
+		std::fmod(compute_cl_phiCalo(*cl), TMath::Pi()/384));
       };
     funcLibrary["etaModCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
       { return std::fmod(std::abs(compute_cl_etaCalo(*cl)), 0.025); };
     funcLibrary["dPhiTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
       { return std::fmod(2.*TMath::Pi()+compute_cl_phi(*cl),TMath::Pi()/32.)-TMath::Pi()/64.0; };
-    
+
     if (useLayerCorrected) {
       funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
 	{ return compute_correctedcl_Es0(*cl); };
@@ -210,8 +210,8 @@ namespace egammaMVAFunctions
 
   // Initialize the variables that just depend on egamma.
   // This helper function is not meant for external use.
-  void initializeEgammaFuncs(funcMap_t& funcLibrary, 
-			     const std::string& prefix, 
+  void initializeEgammaFuncs(funcMap_t& funcLibrary,
+			     const std::string& prefix,
 			     bool /* useLayerCorrected */)
   {
     funcLibrary[prefix + "_e011"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
@@ -300,6 +300,6 @@ namespace egammaMVAFunctions
       { return eg->showerShapeValue(xAOD::EgammaParameters::Rhad1); };
     funcLibrary[prefix + "_DeltaE"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
       { return eg->showerShapeValue(xAOD::EgammaParameters::DeltaE); };
-    
+
   }
 }
diff --git a/Reconstruction/egamma/egammaUtils/CMakeLists.txt b/Reconstruction/egamma/egammaUtils/CMakeLists.txt
index ae76cabe806c99c6e5df52553a5f69c6b08e7ff3..4cd1cdaafba46bdaa61cc09d85a2b33061f49d68 100644
--- a/Reconstruction/egamma/egammaUtils/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaUtils/CMakeLists.txt
@@ -1,23 +1,20 @@
-################################################################################
-# Package: egammaUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaUtils )
 
 # External dependencies:
-find_package( ROOT COMPONENTS Tree Core  Hist)
+find_package( ROOT COMPONENTS Core Hist RIO )
 
 # Component(s in tne package:
 atlas_add_library( egammaUtils
-                   Root/*.cxx
-                   PUBLIC_HEADERS egammaUtils
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-		   PRIVATE_INCLUDE_DIRS
-         LINK_LIBRARIES  ${ROOT_LIBRARIES} AsgMessagingLib xAODCaloEvent xAODTracking xAODEgamma GeoPrimitives
-		   PRIVATE_LINK_LIBRARIES FourMomUtils PathResolver AnalysisUtilsLib)
+   egammaUtils/*.h Root/*.cxx
+   PUBLIC_HEADERS egammaUtils
+   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+   LINK_LIBRARIES ${ROOT_LIBRARIES} xAODCaloEvent xAODEgamma GeoPrimitives
+   PRIVATE_LINK_LIBRARIES PathResolver )
 
 atlas_add_dictionary( egammaUtilsDict
-		      egammaUtils/egammaUtilsDict.h
-		      egammaUtils/selection.xml
-		      LINK_LIBRARIES egammaUtils )
+   egammaUtils/egammaUtilsDict.h
+   egammaUtils/selection.xml
+   LINK_LIBRARIES egammaUtils )
diff --git a/Reconstruction/tauRecTools/CMakeLists.txt b/Reconstruction/tauRecTools/CMakeLists.txt
index ae8f23cedb7fae0703fdc373f37d088e40d313e0..ce207aee3150dc1566c4081be09667603d82e2ba 100644
--- a/Reconstruction/tauRecTools/CMakeLists.txt
+++ b/Reconstruction/tauRecTools/CMakeLists.txt
@@ -54,7 +54,7 @@ else()
       LINK_LIBRARIES ${ROOT_LIBRARIES} ${FASTJET_LIBRARIES} ${Boost_LIBRARIES}
       AthLinks AsgTools CxxUtils xAODCaloEvent xAODEventInfo xAODPFlow xAODTau
       xAODTracking xAODParticleEvent CaloUtilsLib Particle AsgDataHandlesLib MVAUtils
-      PRIVATE_LINK_LIBRARIES ${FASTJETCONTRIB_LIBRARIES} ${LWTNN_LIBRARIES} FourMomUtils xAODJet BeamSpotConditionsData 
+      PRIVATE_LINK_LIBRARIES ${FASTJETCONTRIB_LIBRARIES} ${LWTNN_LIBRARIES} FourMomUtils xAODJet BeamSpotConditionsData
       PathResolver )
 endif()
 
@@ -64,8 +64,8 @@ if( NOT XAOD_STANDALONE )
          src/*.h src/*.cxx src/components/*.cxx
          INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${LWTNN_INCLUDE_DIRS}
          LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${LWTNN_LIBRARIES} xAODTau
-         xAODTracking AthContainers FourMomUtils xAODCaloEvent xAODJet 
-         xAODPFlow xAODParticleEvent MVAUtils BeamSpotConditionsData GaudiKernel tauRecToolsLib )
+         xAODTracking AthContainers FourMomUtils xAODCaloEvent xAODJet
+         xAODPFlow xAODParticleEvent MVAUtils GaudiKernel tauRecToolsLib )
    else()
       atlas_add_component( tauRecTools
          src/*.h src/*.cxx src/components/*.cxx
@@ -80,4 +80,3 @@ if( NOT XAOD_STANDALONE )
          tauRecToolsLib )
    endif()
 endif()
-
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/CMakeLists.txt b/Trigger/TrigAnalysis/TrigDecisionTool/CMakeLists.txt
index cf38f59877df49be4223dfbf1440cb4703cbee32..d4520741f6d2405ff4f54950e863838cccc6b5d6 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/CMakeLists.txt
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/CMakeLists.txt
@@ -15,8 +15,8 @@ if( XAOD_STANDALONE )
       INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
       PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
       LINK_LIBRARIES ${Boost_LIBRARIES} AsgTools xAODBase xAODTrigger
-      TrigConfHLTData TrigConfL1Data TrigNavStructure TrigRoiConversionLib 
-      TrigConfInterfaces TrigDecisionInterface AsgDataHandlesLib 
+      TrigConfHLTData TrigConfL1Data TrigNavStructure TrigRoiConversionLib
+      TrigConfInterfaces TrigDecisionInterface AsgDataHandlesLib
       TrigCompositeUtilsLib
       PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TrigSteeringEvent  )
 else()
@@ -28,9 +28,9 @@ else()
          PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
          LINK_LIBRARIES ${Boost_LIBRARIES} AsgTools EventInfo xAODBase
          xAODTrigger GaudiKernel TrigConfHLTData TrigConfL1Data
-         TrigNavStructure StoreGateLib TrigRoiConversionLib TrigCompositeUtilsLib 
-         TrigConfInterfaces TrigDecisionEvent TrigDecisionInterface
-         PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AsgDataHandlesLib 
+         TrigNavStructure StoreGateLib TrigRoiConversionLib TrigCompositeUtilsLib
+         TrigConfInterfaces TrigDecisionInterface
+         PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AsgDataHandlesLib
          TrigSteeringEvent AthenaKernel )
    else()
       atlas_add_library( TrigDecisionToolLib
@@ -62,7 +62,7 @@ if( NOT XAOD_STANDALONE AND NOT XAOD_ANALYSIS )
    atlas_add_test( Templates_test
       SOURCES test/Templates_test.cxx
       LINK_LIBRARIES TrigNavigationLib AthenaKernel GaudiKernel AthContainers
-      AnalysisTriggerEvent TrigSteeringEvent TrigMuonEvent 
+      AnalysisTriggerEvent TrigSteeringEvent TrigMuonEvent
       TrigDecisionToolLib
       POST_EXEC_SCRIPT nopost.sh )
 endif()
@@ -72,4 +72,3 @@ atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_scripts( share/checkTriggerEDM.py
    share/checkTriggerProcessingErrors.py )
 atlas_install_joboptions( share/checkR3Trigger.py )
-
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx
index 6ab34b2b6a4bf3195c97c4d6a462fb118d4c2bcb..b0a9af102f73bb46f6f26c39a133dfd1d14ffb03 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx
@@ -11,7 +11,7 @@
  *
  * @author Michael Begel  <michael.begel@cern.ch> - Brookhaven National Laboratory
  * @author Lukas Heinrich <lukas.heinrich@cern.ch> - NYU
- * 
+ *
  ***********************************************************************************/
 
 #include <string>
@@ -57,7 +57,7 @@ Trig::CacheGlobalMemory::CacheGlobalMemory() :
   m_confChains(nullptr),
   m_expressStreamContainer(nullptr),
   m_decisionKeyPtr(nullptr),
-#if !defined(XAOD_STANDALONE) && !defined(XAOD_ANALYSIS) // Full Athena
+#ifndef XAOD_ANALYSIS // Full Athena
   m_oldDecisionKeyPtr(nullptr),
   m_oldEventInfoKeyPtr(nullptr),
 #endif
@@ -105,7 +105,7 @@ const Trig::ChainGroup* Trig::CacheGlobalMemory::createChainGroup(const std::vec
     if (m_chainGroupsRef.find(key_alias)==m_chainGroupsRef.end()) {
       m_chainGroupsRef[key_alias]=m_chainGroups[key];
     }
-    else { 
+    else {
       if (m_chainGroupsRef[key_alias]!=m_chainGroupsRef[key]) {
         throw std::runtime_error("TrigDecisionTool: The alias "+alias+" already exists and cannot be overwritten.");
       }
@@ -147,19 +147,19 @@ void Trig::CacheGlobalMemory::update(const TrigConf::HLTChainList* confChains,
                                                  0, 0, 0, prescales[ctpid]);
      ATH_MSG_DEBUG( " new configuration for item" << item->name() );
   }
-  ATH_MSG_DEBUG( "Updating configuration, done with L1" );  
-  
+  ATH_MSG_DEBUG( "Updating configuration, done with L1" );
+
   //clear cache completely becuase underlying config objects might have changed
   for(auto& c : m_l2chainsCache){delete c.second;}
-  m_l2chainsCache.clear(); 
+  m_l2chainsCache.clear();
   for(auto& c : m_efchainsCache){delete c.second;}
-  m_efchainsCache.clear(); 
+  m_efchainsCache.clear();
   m_mConfChains.clear();
   if ( ! confChains ) {
     ATH_MSG_WARNING( "No chains in configuration, probably run w/o HLT" );
   } else {
 
-    ATH_MSG_DEBUG("Updating Configuration chains. Number of conf chains: " << m_confChains->size()); 
+    ATH_MSG_DEBUG("Updating Configuration chains. Number of conf chains: " << m_confChains->size());
 
     // updating internal map of conf chains (this map is only used for fast lookup)
     for(auto ch : *m_confChains) {
@@ -170,7 +170,7 @@ void Trig::CacheGlobalMemory::update(const TrigConf::HLTChainList* confChains,
     for(auto ch : *m_confChains) {
       //    std::cerr << "CacheGlobalMemory::update updating chain" << (*cChIt)->chain_name() << std::endl;
       int cntr = ch->chain_counter();
-      if( ch->level()=="L2" ) {       
+      if( ch->level()=="L2" ) {
         m_l2chainsCache[cntr] = new HLT::Chain(ch);
       } else {//merged chains are stored in efchains
         m_efchainsCache[cntr] = new HLT::Chain(ch);
@@ -222,11 +222,11 @@ void Trig::CacheGlobalMemory::update(const TrigConf::HLTChainList* confChains,
           << alias );
         // cg already exists (from previous config, we need to update it)
         preIt->second->m_patterns = mstIt->second;
-        updateChainGroup(preIt->second);  
+        updateChainGroup(preIt->second);
       } else {
         createChainGroup(mstIt->second,alias);
       }
-      
+
     }
     for (mstIt=m_groups.begin(); mstIt != m_groups.end(); ++mstIt) {
       const std::string alias("GROUP_"+mstIt->first);
@@ -251,7 +251,7 @@ void Trig::CacheGlobalMemory::update(const TrigConf::HLTChainList* confChains,
        it!=m_chainGroups.end();
        it++) {
     updateChainGroup(it->second);
-  }   
+  }
    ATH_MSG_DEBUG( "Updating configuration, done with ChainGroups defined so "
                   "far" );
    ATH_MSG_DEBUG( "Updating configuration done" );
@@ -340,15 +340,15 @@ bool Trig::CacheGlobalMemory::assert_decision() {
   // here we unpack the decision. Note: the navigation will be unpacked only on demand (see navigation())
   bool contains_xAOD_decision = false;
 
-#if !defined(XAOD_STANDALONE) && !defined(XAOD_ANALYSIS) // Full Athena
+#ifndef XAOD_ANALYSIS // Full Athena
   bool is_l1result_configured = false;
   bool contains_decision = false;
   bool contains_old_event_info = false;
 #endif
-  
+
   if(!m_unpacker){
     ATH_MSG_INFO("decision not set on first (?) assert. deciding how to unpack");
-   
+
     //Lukas 26-06-2015: we're hard coding the configuration for now
     //but we have setters and getters for m_trigDecisionKey (as CGM datamemer)
     //so we could in the future use the ones set by the python configuration
@@ -360,7 +360,7 @@ bool Trig::CacheGlobalMemory::assert_decision() {
       contains_xAOD_decision = decisionReadHandle.isValid();
     }
 
-#if !defined(XAOD_STANDALONE) && !defined(XAOD_ANALYSIS) // Full Athena
+#ifndef XAOD_ANALYSIS // Full Athena
 
     if (!m_oldDecisionKeyPtr->empty()) {
       SG::ReadHandle<TrigDec::TrigDecision> oldDecisionReadHandle = SG::makeHandle(*m_oldDecisionKeyPtr, context);
@@ -395,27 +395,27 @@ bool Trig::CacheGlobalMemory::assert_decision() {
       setUnpacker(new DecisionUnpackerStandalone(m_decisionKeyPtr, m_run2NavigationKeyPtr));
     }
 #endif
-    
+
   }//if(!m_unpacker)
 
   if(!m_unpacker){
     std::stringstream extra;
-#if !defined(XAOD_STANDALONE) && !defined(XAOD_ANALYSIS) // Full Athena
+#ifndef XAOD_ANALYSIS // Full Athena
     extra << ". Looked for old TrigDec::TrigDecision? "
       << (m_oldDecisionKeyPtr->empty() ? "NO" : "YES")
-      << ", has TrigDec::TrigDecision? " 
+      << ", has TrigDec::TrigDecision? "
       << (contains_decision ? "YES" : "NO")
-      << ", TrigDec::TrigDecision has L1? " 
+      << ", TrigDec::TrigDecision has L1? "
       << (is_l1result_configured ? "YES" : "NO")
       << ". Looked for old EventInfo? "
       << (m_oldEventInfoKeyPtr->empty() ? "NO" : "YES")
-      << ", has old EventInto? "  
+      << ", has old EventInto? "
       << (contains_old_event_info ? "YES" : "NO");
 #endif
     ATH_MSG_ERROR("No source of Trigger Decision in file. "
       << "(Looked for xAOD::TrigDecision? "
       << (m_decisionKeyPtr->empty() ? "NO" : "YES")
-      << ", has xAOD::TrigDecision? " 
+      << ", has xAOD::TrigDecision? "
       << (contains_xAOD_decision ? "YES" : "NO")
       << extra.str()
       << ". Check UseRun1DecisionFormat and UseOldEventInfoDecisionFormat flags if reading pre-xAOD or BS input).");
@@ -440,7 +440,7 @@ StatusCode Trig::CacheGlobalMemory::unpackDecision() {
   ATH_MSG_DEBUG("Unpacking TrigDecision ");
   ATH_MSG_DEBUG("clearing the delete-end-of-event store");
   m_deleteAtEndOfEvent.clear();
-  
+
   bool unpackHLT = ( m_confChains != 0 );
   ATH_CHECK( m_unpacker->unpackDecision( m_itemsByName, m_itemsCache,
           m_l2chainsByName, m_l2chainsCache,
@@ -472,9 +472,7 @@ StatusCode Trig::CacheGlobalMemory::unpackNavigation() {
   return StatusCode::SUCCESS;
 }
 
-Trig::CacheGlobalMemory::AnyTypeDeleter::~AnyTypeDeleter() 
+Trig::CacheGlobalMemory::AnyTypeDeleter::~AnyTypeDeleter()
 {
   clear();
 }
- 
-
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h
index 9220505554ff14bdba7e84618ce0d4ce2f128cf4..fa4cbb104855812cec8790d0e663f02b6e9722be 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/CacheGlobalMemory.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRIGGER_DECISION_TOOL_CACHE_GLOBAL_MEMORY_H
@@ -43,7 +43,7 @@
 #include "xAODTrigger/TrigDecision.h"
 #include "xAODTrigger/TrigNavigation.h"
 
-#ifndef XAOD_STANDALONE
+#ifndef XAOD_ANALYSIS
 #include "EventInfo/EventInfo.h"
 #include "TrigDecisionEvent/TrigDecision.h"
 #endif
@@ -68,7 +68,7 @@ namespace Trig {
   class CacheGlobalMemory : public virtual Logger {
 
   using Logger::msgLvl;//resolve ambiguity from also inheriting from Logger
-  
+
   public:
     // constructors, destructor
     CacheGlobalMemory();
@@ -81,16 +81,16 @@ namespace Trig {
     /**
      * @brief creates new chain group
      * @param patterns list of patterns i.e. regexes, if chain groups already exists it is just given back
-     *        The chain group is considered to exist if the patterns are the same. 
+     *        The chain group is considered to exist if the patterns are the same.
      *        Patterns are stored and made unique i.e. "EF_mu4", "EF_mu6" is the same as "EF_mu6", "EF_mu4".
      *        It is not the same though as "EF_mu.*" even if in particular case that would mean the same 2 chains.
-     *        
+     *
      * @param alias is the short human readable name for the triggers which are in the group i.e. myMuons
      **/
     const Trig::ChainGroup* createChainGroup(const std::vector< std::string >& patterns,
                                              const std::string& alias="");
     /**
-     * @brief Updates configuration of the chain groups 
+     * @brief Updates configuration of the chain groups
      * (i.e. regexes are reapplied to new set of chains)
      **/
     void update(const TrigConf::HLTChainList* confChains,
@@ -100,7 +100,7 @@ namespace Trig {
     const LVL1CTP::Lvl1Item* item(const TrigConf::TriggerItem& i) const;     //!< CTP item from given config item
     const TrigConf::TriggerItem* config_item(const std::string& name) const; //!< CTP config item from given name
     float item_prescale(int ctpid) const;                                      //!< Prescale for CPT item
-    
+
     const HLT::Chain* chain(const std::string& name) const;                  //!< HLT chain object from given name (0 pointer returned if no match)
     const HLT::Chain* chain(const TrigConf::HLTChain& chIt) const;           //!< HLT chain object from given config chain
     const TrigConf::HLTChain* config_chain(const std::string& name) const;   //!< HLT config chain from given name
@@ -111,10 +111,10 @@ namespace Trig {
           ATH_MSG_WARNING("unpack Navigation failed");
 	      }
       }
-      return m_navigation; 
+      return m_navigation;
     }
     void navigation(HLT::TrigNavStructure* nav) { m_navigation = nav; }       //!< sets navigation object pointer
-    
+
     std::map< std::vector< std::string >, Trig::ChainGroup* >& getChainGroups() {return m_chainGroupsRef;};
     //    std::map<unsigned, const LVL1CTP::Lvl1Item*>  getItems() {return m_items;};
     //    std::map<unsigned, const LVL1CTP::Lvl1Item*>  getItems() const {return m_items;};
@@ -130,13 +130,13 @@ namespace Trig {
     /**
      * @brief cheks if new event arrived with the decision
      * Need tu use before any call to CacheGlobalMemory.
-     * @return true if all went fine about decision, false otherwise     
+     * @return true if all went fine about decision, false otherwise
      **/
     bool assert_decision();
 
     void setUnpacker( Trig::IDecisionUnpacker* up ){ m_unpacker = up; }
     Trig::IDecisionUnpacker* unpacker(){ return m_unpacker; }
-    
+
 
     /// Set the event store to be used by the object
     void setStore( EventPtr_t store ) { m_store = store; }
@@ -148,19 +148,19 @@ namespace Trig {
     void setRun3NavigationKeyPtr(SG::ReadHandleKey<TrigCompositeUtils::DecisionContainer>* k) { m_run3NavigationKeyPtr = k; }
     SG::ReadHandleKey<TrigCompositeUtils::DecisionContainer>& getRun3NavigationKeyPtr() { return *m_run3NavigationKeyPtr; }
 
-#if !defined(XAOD_STANDALONE) && !defined(XAOD_ANALYSIS) // Full Athena
+#ifndef XAOD_ANALYSIS // Full Athena
     void setOldDecisionKeyPtr(SG::ReadHandleKey<TrigDec::TrigDecision>* k) { m_oldDecisionKeyPtr = k; }
     void setOldEventInfoKeyPtr(SG::ReadHandleKey<EventInfo>* k) { m_oldEventInfoKeyPtr = k; }
 #endif
 
     SG::ReadHandleKey<xAOD::TrigDecision>* xAODTrigDecisionKey() { return m_decisionKeyPtr; }
 
-    // 
+    //
     template<class T>
     void deleteAtTheEndOfEvent(T t) const { m_deleteAtEndOfEvent.insert(t); }
 
 
-    
+
 
   private:
     friend class DecisionAccess;
@@ -185,14 +185,14 @@ namespace Trig {
 
     /// Pointer to the event store in use
     EventPtr_t m_store;
-    
+
     /// Trigger decision unpacker helper
     IDecisionUnpacker* m_unpacker;
 
     // Navigation owned by CGM
     HLT::TrigNavStructure* m_navigation;
-    
-    // chain groups 
+
+    // chain groups
     typedef std::map< std::vector< std::string >, Trig::ChainGroup* >::iterator ChGrIt;
     std::map< std::vector< std::string >, Trig::ChainGroup* > m_chainGroups;     //!< primary storage for chain groups
     std::map< std::vector< std::string >, Trig::ChainGroup* > m_chainGroupsRef;  //!< this map keeps the chain group more than once i.e. when alias is given
@@ -200,11 +200,11 @@ namespace Trig {
     //    std::map<CTPID, const LVL1CTP::Lvl1Item*>          m_items;    //!< items keyed by id (changing every event)
     //    std::map<CHAIN_COUNTER, const HLT::Chain*>         m_l2chains; //!< chains keyed by chain counter (chainging every event)
     //    std::map<CHAIN_COUNTER, const HLT::Chain*>         m_efchains;
-    
+
     std::unordered_map<std::string, const LVL1CTP::Lvl1Item*> m_itemsByName;     //!< items keyed by configuration name (chainging every event)
     std::unordered_map<std::string, const HLT::Chain*> m_l2chainsByName;  //!< L2 chains keyed by chain name (chainging every event)
     std::unordered_map<std::string, const HLT::Chain*> m_efchainsByName;  //!< L2 chains keyed by chain name (chainging every event)
-    
+
     typedef unsigned CTPID;
     typedef unsigned CHAIN_COUNTER;
     std::map<CTPID, LVL1CTP::Lvl1Item*>  m_itemsCache;               //!< cache of all CTP items possible (given configuration)
@@ -213,14 +213,14 @@ namespace Trig {
 
     std::map<std::string, std::vector<std::string> > m_groups;          //!< mapping from group to list of chains
     std::map<std::string, std::vector<std::string> > m_streams;         //!< mapping from stream to list of chains
-    
+
     const TrigConf::ItemContainer* m_confItems;             //!< items configuration
     const TrigConf::HLTChainList*  m_confChains;            //!< all chains configuration
     mutable const xAOD::TrigCompositeContainer* m_expressStreamContainer;
 
     SG::ReadHandleKey<xAOD::TrigDecision>* m_decisionKeyPtr; //!< Parent TDT's read handle key
 
-#if !defined(XAOD_STANDALONE) && !defined(XAOD_ANALYSIS) // Full Athena
+#ifndef XAOD_ANALYSIS // Full Athena
     SG::ReadHandleKey<TrigDec::TrigDecision>* m_oldDecisionKeyPtr; //!< Parent TDT's read handle key
     SG::ReadHandleKey<EventInfo>* m_oldEventInfoKeyPtr; //!< Parent TDT's read handle key
 #endif
@@ -230,29 +230,29 @@ namespace Trig {
 
     typedef std::unordered_map<std::string, const TrigConf::HLTChain*> ChainHashMap_t;
     ChainHashMap_t     m_mConfChains;            //!< map of conf chains
-  
+
     char     m_bgCode; //!< the encoded bunchgroup information
-    
-    
+
+
     class AnyTypeDeleter {
 
-      
+
       struct iholder {
         virtual ~iholder() {}
         virtual void* ptr() const { return 0;}
       };
 
       struct holder_comp {
-        bool operator()(iholder* lhs, iholder* rhs) const { 
-          return lhs->ptr() < rhs->ptr(); }      
+        bool operator()(iholder* lhs, iholder* rhs) const {
+          return lhs->ptr() < rhs->ptr(); }
       };
       template<class T>
-      class holder : public iholder {    
+      class holder : public iholder {
       public:
         holder(T& t): m_held(t) {}
-        virtual ~holder() { 
+        virtual ~holder() {
           delete m_held;
-          m_held = 0; }    
+          m_held = 0; }
         virtual void* ptr() const { return (void*)m_held;}
       private:
         T m_held;
@@ -266,14 +266,14 @@ namespace Trig {
       void clear() {
         for(iholder* i : m_todel) {
           delete i;
-        }    
+        }
         m_todel.clear();
       }
       ~AnyTypeDeleter();
-    private:  
+    private:
       std::set< iholder*, holder_comp > m_todel;
     };  // end of deleter
-    
+
     mutable AnyTypeDeleter m_deleteAtEndOfEvent;
 
     mutable std::recursive_mutex m_cgmMutex; //!< R3 MT protection only against --threads > 1. Needs refacotring...
diff --git a/Trigger/TrigEvent/TrigSteeringEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigSteeringEvent/CMakeLists.txt
index fbfdd079e2709b873728290a0b112a2858012c70..a8fcf7cffe3d27f20281fbebca911b0b1073d093 100644
--- a/Trigger/TrigEvent/TrigSteeringEvent/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigSteeringEvent/CMakeLists.txt
@@ -12,7 +12,8 @@ if( XAOD_STANDALONE )
       TrigConfHLTData )
 elseif( XAOD_ANALYSIS )
    atlas_add_library( TrigSteeringEvent
-      TrigSteeringEvent/*.h Root/*.cxx src/*.cxx
+      TrigSteeringEvent/*.h Root/*.cxx src/HLTExtraData.cxx src/*Result.cxx
+      src/StringSerializer.cxx src/*Info.cxx src/TrigSuperRoi.cxx
       PUBLIC_HEADERS TrigSteeringEvent
       LINK_LIBRARIES AthContainers AsgTools AthenaKernel CxxUtils RoiDescriptor
       xAODCore GaudiKernel TrigConfHLTData )
@@ -40,7 +41,7 @@ else()
 
    atlas_add_sercnv_library( TrigSteeringEventSerCnv
       FILES TrigSteeringEvent/TrigRoiDescriptor.h
-      TrigSteeringEvent/TrigSuperRoi.h 
+      TrigSteeringEvent/TrigSuperRoi.h
       TrigSteeringEvent/TrigPassFlags.h
       TrigSteeringEvent/TrigPassFlagsCollection.h
       TrigSteeringEvent/TrigRoiDescriptorCollection.h