From f32ffd86c8b573f9b87ffd6e1f4f408ed93ea274 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Thu, 19 Nov 2020 17:59:29 +0100
Subject: [PATCH] EventUtils: delete some unused algorithms

Delete unused AddVarAlg+Tool, ParticleCombinerAlg+Tool,
ParticleSortingAlg+Tool. These depend on the deprecated `IJobOptionsSvc`
interface. If these algorithms turn out to be useful they can be
resurrected and migrated.

Also delete unused `MergeContainers.py` and cleanup cmake configuration.
---
 .../AnalysisCommon/EventUtils/CMakeLists.txt  |  15 +-
 .../EventUtils/python/MergeContainers.py      | 190 ----
 .../EventUtils/src/AddVarAlg.cxx              | 159 ---
 .../AnalysisCommon/EventUtils/src/AddVarAlg.h | 154 ---
 .../EventUtils/src/AddVarTool.cxx             | 288 ------
 .../EventUtils/src/AddVarTool.h               | 114 ---
 .../EventUtils/src/ParticleCombinerAlg.cxx    | 209 ----
 .../EventUtils/src/ParticleCombinerAlg.h      | 190 ----
 .../EventUtils/src/ParticleCombinerTool.cxx   | 902 ------------------
 .../EventUtils/src/ParticleCombinerTool.h     | 189 ----
 .../EventUtils/src/ParticleSortingAlg.cxx     | 162 ----
 .../EventUtils/src/ParticleSortingAlg.h       | 153 ---
 .../EventUtils/src/ParticleSortingTool.cxx    | 327 -------
 .../EventUtils/src/ParticleSortingTool.h      | 184 ----
 .../src/components/EventUtils_entries.cxx     |  12 -
 15 files changed, 4 insertions(+), 3244 deletions(-)
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/python/MergeContainers.py
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarAlg.cxx
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarAlg.h
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarTool.cxx
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarTool.h
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerAlg.cxx
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerAlg.h
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.cxx
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.h
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h

diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/EventUtils/CMakeLists.txt
index d10c9c4b3bc..73a5d549f74 100644
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/CMakeLists.txt
@@ -1,21 +1,14 @@
-################################################################################
-# Package: EventUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EventUtils )
 
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( Boost )
 
 # Component(s) in the package:
 atlas_add_component( EventUtils
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthAnalysisBaseCompsLib AthContainers AthLinks AthenaBaseComps AthenaKernel CxxUtils EventInfo xAODBTagging xAODBase xAODCaloEvent xAODCore xAODCutFlow xAODEgamma xAODEventInfo xAODJet xAODMissingET xAODMuon xAODPFlow xAODParticleEvent xAODTau xAODTracking xAODTruth GaudiKernel PATCoreLib ExpressionEvaluationLib TrigDecisionToolLib DerivationFrameworkInterfaces )
-
-# Install files from the package:
-atlas_install_python_modules( python/*.py )
-
+                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${Boost_LIBRARIES} AthAnalysisBaseCompsLib AthContainers AthContainersInterfaces AthLinks AthenaBaseComps AthenaKernel EventInfo xAODBase xAODCaloEvent xAODCore xAODCutFlow xAODEgamma xAODEventInfo xAODJet xAODMuon xAODPFlow xAODParticleEvent xAODTau xAODTracking xAODTruth GaudiKernel PATCoreLib ExpressionEvaluationLib TrigDecisionToolLib DerivationFrameworkInterfaces )
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/python/MergeContainers.py b/PhysicsAnalysis/AnalysisCommon/EventUtils/python/MergeContainers.py
deleted file mode 100644
index f3f6571e4c4..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/python/MergeContainers.py
+++ /dev/null
@@ -1,190 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-##=============================================================================
-## Name:        MergeContainers
-##
-## Author:      Carsten Burgard
-## Created:     April 2015
-##
-## Description: This short algorithm can add a list of input
-##              containers of the SAME TYPE together and record the
-##              resulting container back into StoreGate. This is based
-##              upon the defunct AddContainers algorithm from Karsten Koeneke.
-## =============================================================================
-
-__doc__ = """This short algorithm can add a list of input containers of the
-SAME TYPE together and record the resulting container back into StoreGate.
-"""
-__version__ = "0.0.1"
-__author__  = "Carsten Burgard <cburgard@cern.ch>"
-
-
-# Import the needed modules
-import AthenaPython.PyAthena as PyAthena
-from AthenaPython.PyAthena import StatusCode
-import gc
-
-class MergeContainers( PyAthena.Alg ):
-    """
-    This short algorithm can add a list of input containers of the
-    SAME TYPE together and record the resulting container back into StoreGate.
-    """
-
-    def __init__ ( self, name = "MergeContainers", **kw ):
-        ## initialize base class
-        kw['name'] = name
-        super(MergeContainers, self).__init__(**kw)
-
-        # try to figure out the particle type
-        ptype = kw.get( 'ParticleType', "xAOD::IParticle" )
-        try:
-            self.particleType         = getattr( PyAthena.xAOD, ptype )
-            self.particleTypeName     = ptype
-        except AttributeError:
-            found = False
-            d = dict(PyAthena.xAOD.__dict__)
-            for key in d.__dict__.keys():
-                print(key)
-                if key.startswith(ptype+"_v"):
-                    self.particleType = getattr( PyAthena.xAOD, key )
-                    self.particleTypeName     = key
-                    found = True
-                    break
-            if not found:
-                raise RuntimeError("unknown particle type '{:s}'".format(ptype))
-
-        ## Define the container types
-        self.inputContainerType   = kw.get( 'InputContainerType',  "" )
-        self.inputContainerNames  = kw.get( 'InputContainerNames', [] )
-        self.outputContainerName  = kw.get( 'OutputContainerName', "" )
-
-        self.printInternalCutflow = kw.get( 'PrintInternalCutflow', False )
-        self.minNumberPassed      = kw.get( 'MinNumberPassed', float("-inf") )
-        self.maxNumberPassed      = kw.get( 'MaxNumberPassed', float("inf") )
-        ## Get the storgate handle
-        self.storeGateSvc = None
-
-        return
-
-    def initialize(self):
-        self.msg.debug( '************************************' )
-        self.msg.debug( '==> initialize %s...',       self.name() )
-        self.msg.debug( '  inputContainerType  = %r', self.inputContainerType  )
-        self.msg.debug( '  particleType        = %r', self.particleTypeName    )
-        self.msg.debug( '  inputContainerNames = %r', self.inputContainerNames )
-        self.msg.debug( '  outputContainerName = %r', self.outputContainerName )
-        self.msg.debug( '************************************' )
-
-        ## Also, declare some counters and initialize them to zero
-        self.nProcessed        = 0
-        self.nObjectsProcessed = 0
-        self.nObjectsPassed    = 0
-        self.nEventAccepted    = 0
-
-        ## Import needed modules
-        import PyUtils.RootUtils as ru
-        ROOT = ru.import_root()
-
-        ## Get the StoreGate service
-        self.storeGateSvc = PyAthena.py_svc('StoreGateSvc')
-        if self.storeGateSvc is None:
-            self.msg.error("Problem retrieving StoreGateSvc pointer!")
-            return StatusCode.Failure
-
-        gc.disable()
-        return StatusCode.Success
-
-    def execute(self):
-        self.outCont = None
-        self.nProcessed+=1
-        self.msg.debug( '==> execute %s on %r. event...' % (self.name(), self.nProcessed) )
-        
-        # Get the input collections from StoreGate and add each to the list of containers for this event
-        nInputElements = 0
-        inContList = []
-        for i in xrange( self.inputContainerNames.__len__() ) :
-            inCont = None
-            try:
-                inCont = self.storeGateSvc.retrieve( self.inputContainerType, self.inputContainerNames[i] )
-            except LookupError:
-                if self.nProcessed < 100:
-                    self.msg.warning( 'Collection of type %s with key %s not found' % (self.inputContainerType, self.inputContainerNames[i]) )
-                    pass #continue
-                pass
-            if inCont:
-                inContList.append( inCont )
-                nInputElements += inCont.size()
-            pass
-        self.msg.debug( 'Found %s input containers.' % len(inContList) )
-        
-        self.msg.debug( 'allocating containers')
-        # Create the new output container
-        # for now, we only create view containers, because deep copies are not yet supported
-        self.outCont = PyAthena.DataVector( self.particleType )(1)
-        self.outCont.reserve( nInputElements )
-
-        self.msg.debug( 'recording containers')
-        # Record the merged output container into StoreGate so that they can be retrieved by other algorithms
-        if self.storeGateSvc.record( self.outCont, self.outputContainerName ) != StatusCode.Success :
-            self.msg.error( 'Could not record the output container into StoreGate with the key = ' % self.outputContainerName )
-            pass
-
-        #Then... here we go!
-
-        # Get the input collections from StoreGate
-        for inCont in inContList :
-            self.msg.verbose( 'Processing input container with %s elements...' % len(inCont) )
-        
-            # Loop over all objects in the input container and add them to the output
-            for obj in inCont :
-                self.nObjectsProcessed += 1
-                self.msg.verbose( '  Processing object in input container...' )
-                # TODO: maybe reimplement removeIdentical/removeNearby functionality here
-                self.outCont.push_back( obj )
-            pass
-
-        # Determine if this events passes the minimum/maximum number of required objects
-        nPassedObject = self.outCont.size()
-        self.nObjectsPassed += nPassedObject
-        if nPassedObject >= self.minNumberPassed and nPassedObject <= self.maxNumberPassed :
-            self.msg.debug( 'Found %s objects in this event... passing it.' % nPassedObject )
-            self.nEventAccepted += 1
-            self.setFilterPassed(True)
-            pass
-        else:
-            self.setFilterPassed(False)
-            pass
-
-        self.msg.debug( 'returning')
-        if gc.isenabled():
-            self.msg.debug( 'garbage collection is enabled' )
-        else:
-            self.msg.debug( 'garbage collection is disabled' )
-        return StatusCode.Success
-
-    def finalize(self):
-        ## Import needed modules
-        import math
-        import PyUtils.Logging
-
-        # Only dump the summary if requested or in DEBUG/VERBOSE mode
-        if self.printInternalCutflow or self.msg.isEnabledFor( PyUtils.Logging.logging.DEBUG ) :
-            # First calcultate the ratios
-            objRatio = 0.0
-            if self.nObjectsProcessed != 0 : objRatio = self.nObjectsPassed / self.nObjectsProcessed
-            evtRatio = 0.0
-            if self.nProcessed != 0 : evtRatio = self.nEventAccepted / self.nProcessed
-
-            # Now, do the printout
-            self.msg.info( '================================================================== begin ===================================================================' )
-            self.msg.info( '                                                                                           ::         objects       ::         events       ' )
-            self.msg.info( 'Event filter description                                                                   :: N accepted : ratio[%] :: N accepted : ratio[%]' )
-            self.msg.info( '--------------------------------------------------------------------------------------------------------------------------------------------' )
-            self.msg.info( 'Total number of objects/events processed                                                   :: %10u :  100.000 :: %10u :  100.000'
-                           % ( self.nObjectsProcessed, self.nProcessed ) )
-            self.msg.info( 'Final count                                                                                :: %10u : %8.5g :: %10u : %8.5g'
-                           % ( self.nObjectsPassed, objRatio, self.nEventAccepted, evtRatio ) )
-            self.msg.info( '=================================================================== end ====================================================================' )
-            pass
-
-        return StatusCode.Success
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarAlg.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarAlg.cxx
deleted file mode 100644
index 4ac57f25a55..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarAlg.cxx
+++ /dev/null
@@ -1,159 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// AddVarAlg.cxx
-// Implementation file for class AddVarAlg
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-
-// EventUtils includes
-#include "AddVarAlg.h"
-
-// STL includes
-
-// FrameWork includes
-#include "Gaudi/Property.h"
-#include "GaudiKernel/IJobOptionsSvc.h"
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-
-
-
-///////////////////////////////////////////////////////////////////
-// Public methods:
-///////////////////////////////////////////////////////////////////
-
-// Constructors
-////////////////
-AddVarAlg::AddVarAlg( const std::string& name,
-                      ISvcLocator* pSvcLocator ) :
-  ::AthAlgorithm( name, pSvcLocator ),
-  m_jos("JobOptionsSvc", name),
-  m_tool("AddVarTool/AddVarTool", this),
-  m_setInCollKey(false),
-  m_setVarName(false),
-  m_setVarType(false),
-  m_setSelection(false),
-  m_nEventsProcessed(0)
-{
-  declareProperty("JobOptionsSvc",       m_jos, "The JobOptionService instance.");
-
-  declareProperty("AddVarTool",          m_tool, "The private AddVarTool" );
-
-  declareProperty("AddVarTo",   m_inCollKey="",
-                  "Name of the container or object where the new variable will be added to" );
-  m_inCollKey.declareUpdateHandler( &AddVarAlg::setupInputContainer, this );
-
-  declareProperty("VarName",             m_varName="",   "The name of the new variable" );
-  m_varName.declareUpdateHandler( &AddVarAlg::setupVarName, this );
-
-  declareProperty("VarType",             m_varType="float",
-                  "The type of the new variable (allowed values are: 'bool', 'int', 'float')" );
-  m_varType.declareUpdateHandler( &AddVarAlg::setupVarType, this );
-
-  declareProperty("Selection",         m_selection="",
-                  "The selection string that defines which xAOD::IParticles to select from the container" );
-  m_selection.declareUpdateHandler( &AddVarAlg::setupSelection, this );
-}
-
-
-
-// Destructor
-///////////////
-AddVarAlg::~AddVarAlg()
-{}
-
-
-
-// Athena Algorithm's Hooks
-////////////////////////////
-StatusCode AddVarAlg::initialize()
-{
-  ATH_MSG_DEBUG ("Initializing " << name() << "...");
-
-  // Print out the used configuration
-  ATH_MSG_DEBUG ( " using = " << m_jos );
-  ATH_MSG_DEBUG ( " using = " << m_tool );
-  ATH_MSG_DEBUG ( " using = " << m_inCollKey );
-  ATH_MSG_DEBUG ( " using = " << m_varName );
-  ATH_MSG_DEBUG ( " using = " << m_varType );
-  ATH_MSG_DEBUG ( " using = " << m_selection );
-
-
-  // Initialize the counters to zero
-  m_nEventsProcessed = 0 ;
-
-
-  // Get the JobOptionService
-  // We will use this to set the properties of our private skimming tool
-  // from the properties of this algorithm.
-  ATH_MSG_VERBOSE( "Getting the JobOptionService");
-  ATH_CHECK( m_jos.retrieve() );
-
-  // Get the full name of the private skimTool
-  ATH_MSG_VERBOSE( "Getting the full name of the tool");
-  const std::string& fullToolName = this->name() + "." + m_tool.name();
-  ATH_MSG_DEBUG( "Got the full name of the tool: " << fullToolName );
-
-
-  // Now, set all properties of the private skimTool that were acutally configured
-  if (m_setInCollKey) {
-    ATH_MSG_DEBUG( "Setting property" << m_inCollKey
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_inCollKey) );
-  }
-  if (m_setVarName) {
-    ATH_MSG_DEBUG( "Setting property" << m_varName
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_varName) );
-  }
-  if (m_setVarType) {
-    ATH_MSG_DEBUG( "Setting property" << m_varType
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_varType) );
-  }
-  if (m_setSelection) {
-    ATH_MSG_DEBUG( "Setting property" << m_selection
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_selection) );
-  }
-  ATH_MSG_DEBUG( "Done setting properties of the tool");
-
-  // Get the skimming tool
-  ATH_CHECK( m_tool.retrieve() );
-
-  ATH_MSG_DEBUG ( "==> done with initialize " << name() << "..." );
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-StatusCode AddVarAlg::finalize()
-{
-  ATH_MSG_DEBUG ("Finalizing " << name() << "...");
-
-  // Release all tools and services
-  ATH_CHECK( m_jos.release() );
-  ATH_CHECK( m_tool.release() );
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-StatusCode AddVarAlg::execute()
-{
-  // Increase the event counter
-  ++m_nEventsProcessed;
-
-  // Simple status message at the beginning of each event execute,
-  ATH_MSG_DEBUG ( "==> execute " << name() << " on " << m_nEventsProcessed << ". event..." );
-
-  // Call the tool
-  ATH_CHECK( m_tool->addBranches() );
-
-  return StatusCode::SUCCESS;
-}
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarAlg.h b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarAlg.h
deleted file mode 100644
index a0099b1ad5c..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarAlg.h
+++ /dev/null
@@ -1,154 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// AddVarAlg.h
-// Header file for class AddVarAlg
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-#ifndef EVENTUTILS_ADDVARALG_H
-#define EVENTUTILS_ADDVARALG_H 1
-
-// STL includes
-#include <string>
-
-// FrameWork includes
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "AthenaBaseComps/AthFilterAlgorithm.h"
-
-
-// forward declarations
-class IJobOptionsSvc;
-namespace DerivationFramework {
-  class IAugmentationTool;
-}
-
-
-
-class AddVarAlg
-  : public ::AthAlgorithm
-{
-
-  ///////////////////////////////////////////////////////////////////
-  // Public methods:
-  ///////////////////////////////////////////////////////////////////
- public:
-
-  // Copy constructor:
-
-  /// Constructor with parameters:
-  AddVarAlg( const std::string& name, ISvcLocator* pSvcLocator );
-
-  /// Destructor:
-  virtual ~AddVarAlg();
-
-  /// Athena algorithm's initalize hook
-  virtual StatusCode  initialize();
-
-  /// Athena algorithm's execute hook
-  virtual StatusCode  execute();
-
-  /// Athena algorithm's finalize hook
-  virtual StatusCode  finalize();
-
-
-private:
-  // The update handlers
-
-  /// This internal method will realize if a user sets the 'AddVarTo' property
-  void setupInputContainer( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'VarName' property
-  void setupVarName( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'VarType' property
-  void setupVarType( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'Selection' property
-  void setupSelection( Gaudi::Details::PropertyBase& /*prop*/ );
-
-
-
-  ///////////////////////////////////////////////////////////////////
-  // Private data:
-  ///////////////////////////////////////////////////////////////////
- private:
-  /// The job options service (will be used to forward this algs properties to
-  /// the private tool)
-  ServiceHandle<IJobOptionsSvc> m_jos;
-
-  /// The ToolHandle to the augmentation tool
-  ToolHandle<DerivationFramework::IAugmentationTool> m_tool;
-
-
-  /// Input container name
-  StringProperty m_inCollKey;
-
-  /// This boolean is true if the user sets the 'InputContainer' property
-  bool m_setInCollKey;
-
-
-  /// The name of the new variable
-  StringProperty m_varName;
-
-  /// This boolean is true if the user sets the 'OutputContainer' property
-  bool m_setVarName;
-
-
-  /// The type of the new variable (allowed values are: 'bool', 'int', 'float')
-  StringProperty m_varType;
-
-  /// This boolean is true if the user sets the 'OutputLinkContainer' property
-  bool m_setVarType;
-
-
-  /// The string that describes how the new variable should be calculated
-  StringProperty m_selection;
-
-  /// This boolean is true if the user sets the 'Cut' property
-  bool m_setSelection;
-
-
-
-  /// Internal event counter
-  unsigned long m_nEventsProcessed;
-
-
-};
-
-// I/O operators
-//////////////////////
-
-///////////////////////////////////////////////////////////////////
-// Inline methods:
-///////////////////////////////////////////////////////////////////
-
-/// This internal method will realize if a user sets the 'AddVarTo' property
-inline void AddVarAlg::setupInputContainer( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setInCollKey = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'VarName' property
-inline void AddVarAlg::setupVarName( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setVarName = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'VarType' property
-inline void AddVarAlg::setupVarType( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setVarType = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'Selection' property
-inline void AddVarAlg::setupSelection( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setSelection = true;
-  return;
-}
-
-
-#endif //> !EVENTUTILS_ADDVARALG_H
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarTool.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarTool.cxx
deleted file mode 100644
index b659562aa4d..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarTool.cxx
+++ /dev/null
@@ -1,288 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// AddVarTool.cxx
-// Implementation file for class AddVarTool
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-
-// EventUtils includes
-#include "AddVarTool.h"
-
-// STL includes
-#include <vector>
-#include <string>
-
-// FrameWork includes
-#include "ExpressionEvaluation/ExpressionParser.h"
-#include "ExpressionEvaluation/SGxAODProxyLoader.h"
-#include "ExpressionEvaluation/SGNTUPProxyLoader.h"
-#include "ExpressionEvaluation/MultipleProxyLoader.h"
-#include "ExpressionEvaluation/StackElement.h"
-#include "TrigDecisionTool/TrigDecisionTool.h"
-#include "ExpressionEvaluation/TriggerDecisionProxyLoader.h"
-
-// EDM includes
-#include "AthContainers/AuxElement.h"
-#include "xAODEventInfo/EventInfo.h"
-#include "xAODBase/IParticleContainer.h"
-#include "xAODMissingET/MissingETContainer.h"
-#include "xAODTracking/VertexContainer.h"
-#include "xAODTruth/TruthEventContainer.h"
-#include "xAODTruth/TruthVertexContainer.h"
-#include "xAODBTagging/BTaggingContainer.h"
-// #include "xAODBTagging/BTagVertexContainer.h"
-
-
-
-///////////////////////////////////////////////////////////////////
-// Public methods:
-///////////////////////////////////////////////////////////////////
-
-// Constructors
-////////////////
-AddVarTool::AddVarTool( const std::string& type,
-                        const std::string& name,
-                        const IInterface* parent ) :
-  ::AthAlgTool  ( type, name, parent ),
-  m_trigDecisionTool("Trig::TrigDecisionTool/TrigDecisionTool"),
-  m_parser(0),
-  m_inCollKey(""),
-  m_selection(""),
-  m_varTypeIndex(-1),
-  //m_inContIdx(-1),
-  m_nEventsProcessed(0)
-{
-  declareInterface< DerivationFramework::IAugmentationTool >(this);
-
-  declareProperty("AddVarTo",          m_inCollKey="",
-                  "Name of the container or object where the new variable will be added to" );
-
-  declareProperty("VarName",           m_varName="",   "The name of the new variable" );
-  declareProperty("VarType",           m_varType="float",
-                  "The type of the new variable (allowed values are: 'bool', 'int', 'float')" );
-
-  declareProperty("Selection",         m_selection="",
-                  "The selection string that defines which xAOD::IParticles to select from the container" );
-}
-
-// Destructor
-///////////////
-AddVarTool::~AddVarTool()
-{}
-
-
-
-// Athena algtool's Hooks
-////////////////////////////
-StatusCode AddVarTool::initialize()
-{
-  ATH_MSG_DEBUG ("Initializing " << name() << "...");
-
-  // Print out the used configuration
-  ATH_MSG_DEBUG ( " using = " << m_inCollKey );
-  ATH_MSG_DEBUG ( " using = " << m_varName );
-  ATH_MSG_DEBUG ( " using = " << m_varType );
-  ATH_MSG_DEBUG ( " using = " << m_selection );
-
-  // Try to decode the variable type
-  if ( m_varType.value() == "int" ) {
-    m_varTypeIndex = 1;
-  }
-  else if ( m_varType.value() == "bool" ) {
-    m_varTypeIndex = 2;
-  }
-  else if ( m_varType.value() == "float" ) {
-    m_varTypeIndex = 11;
-  }
-  else {
-    ATH_MSG_ERROR("Didn't recognize the variable type. "
-                  << "Allowed values for the property 'VarType' are: "
-                  << "'bool', 'int', 'float'");
-    return StatusCode::FAILURE;
-  }
-
-  // initialize proxy loaders for expression parsing
-  ExpressionParsing::MultipleProxyLoader *proxyLoaders = new ExpressionParsing::MultipleProxyLoader();
-  proxyLoaders->push_back(new ExpressionParsing::TriggerDecisionProxyLoader(m_trigDecisionTool));
-  proxyLoaders->push_back(new ExpressionParsing::SGxAODProxyLoader(evtStore()));
-  proxyLoaders->push_back(new ExpressionParsing::SGNTUPProxyLoader(evtStore()));
-
-  // load the expressions
-  m_parser = new ExpressionParsing::ExpressionParser(proxyLoaders);
-  m_parser->loadExpression( m_selection.value() );
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-StatusCode AddVarTool::finalize()
-{
-  ATH_MSG_DEBUG ("Finalizing " << name() << "...");
-
-  if (m_parser) {
-    delete m_parser;
-    m_parser = 0;
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-#define EVALUATE_CONTAINERTYPE( CONTAINERTYPE )                                                        \
-else if ( evtStore()->contains< CONTAINERTYPE >( m_inCollKey.value() ) ) {                             \
-  const CONTAINERTYPE* inContainer(0);                                                                 \
-  ATH_CHECK( evtStore()->retrieve( inContainer, m_inCollKey.value() ) );                               \
-  ATH_MSG_DEBUG ( "Input collection = '" << m_inCollKey.value()                                        \
-                  << "' retrieved from StoreGate which has " << inContainer->size() << " entries." );  \
-  if ( !inContainer ) {                                                                                \
-    ATH_MSG_ERROR( "We don't have a valid pointer to "#CONTAINERTYPE"." );                             \
-    return StatusCode::FAILURE;                                                                        \
-  }                                                                                                    \
-  ExpressionParsing::StackElement selectionResult = m_parser->evaluate();                              \
-  if ( !(selectionResult.isVector()) ) {                                                               \
-    ATH_MSG_ERROR ("Some unexpected format of the expression parser result. Should be vector-type.");  \
-    return StatusCode::FAILURE;                                                                        \
-  }                                                                                                    \
-  if ( m_varTypeIndex == 1 ) {                                                                         \
-    const std::vector<int>& resultVec( selectionResult.vectorValue<int>() );                           \
-    if ( resultVec.size() != inContainer->size() ) {                                                   \
-      ATH_MSG_ERROR("The result vector doesn't have the same size as the container to decorate!");     \
-      return StatusCode::FAILURE;                                                                      \
-    }                                                                                                  \
-    SG::AuxElement::Decorator<int> intDeco (m_varName.value());                                                \
-    for ( std::size_t i=0; i<resultVec.size(); ++i ) {                                                 \
-      ATH_MSG_VERBOSE("Got a container integer result: " << resultVec.at(i) );                         \
-      const auto* part = inContainer->at(i);                                                           \
-      intDeco(*part) = resultVec.at(i);                                                                \
-    }                                                                                                  \
-  }                                                                                                    \
-  else if ( m_varTypeIndex == 2 ) {                                                                    \
-    const std::vector<int>& resultVec( selectionResult.vectorValue<int>() );                           \
-    if ( resultVec.size() != inContainer->size() ) {                                                   \
-      ATH_MSG_ERROR("The result vector doesn't have the same size as the container to decorate!");     \
-      return StatusCode::FAILURE;                                                                      \
-    }                                                                                                  \
-    SG::AuxElement::Decorator<bool> boolDeco (m_varName.value());                                              \
-    for ( std::size_t i=0; i<resultVec.size(); ++i ) {                                                 \
-      ATH_MSG_VERBOSE("Got a container boolean result: " << static_cast<bool>(resultVec.at(i)) );      \
-      const auto* part = inContainer->at(i);                                                           \
-      boolDeco(*part) = static_cast<bool>(resultVec.at(i));                                            \
-    }                                                                                                  \
-  }                                                                                                    \
-  else if ( m_varTypeIndex == 11 ) {                                                                   \
-    const std::vector<double>& resultVec( selectionResult.vectorValue<double>() );                     \
-    if ( resultVec.size() != inContainer->size() ) {                                                   \
-      ATH_MSG_ERROR("The result vector doesn't have the same size as the container to decorate!");     \
-      return StatusCode::FAILURE;                                                                      \
-    }                                                                                                  \
-    SG::AuxElement::Decorator<float> floatDeco (m_varName.value());                                            \
-    for ( std::size_t i=0; i<resultVec.size(); ++i ) {                                                 \
-      ATH_MSG_VERBOSE("Got a container float result: " << static_cast<float>(resultVec.at(i)) );       \
-      const auto* part = inContainer->at(i);                                                           \
-      floatDeco(*part) = static_cast<float>(resultVec.at(i));                                          \
-    }                                                                                                  \
-  }                                                                                                    \
-}
-
-
-
-StatusCode AddVarTool::addBranches() const
-{
-  // Increase the event counter
-  ++m_nEventsProcessed;
-
-  // Simple status message at the beginning of each event execute,
-  ATH_MSG_DEBUG ( "==> addBranches " << name() << " on " << m_nEventsProcessed << ". event..." );
-
-
-  //-----------------------------------------
-  // Get the input container where we want to add the variable to
-  //-----------------------------------------
-  const SG::AuxElement* inAuxElement(0);
-
-  // if ( evtStore()->contains< SG::AuxElement >( m_inCollKey.value() ) ) {
-  //   // This file holds an SG::AuxElement
-  //   ATH_CHECK( evtStore()->retrieve( inAuxElement, m_inCollKey.value() ) );
-  //   ATH_MSG_DEBUG ( "Input SG::AuxElement = '" << m_inCollKey.value() << "' retrieved from StoreGate" );
-  // }
-  if ( evtStore()->contains< xAOD::EventInfo >( m_inCollKey.value() ) ) {
-    // This file holds an xAOD::EventInfo
-    const xAOD::EventInfo* eventInfo;
-    ATH_CHECK( evtStore()->retrieve( eventInfo, m_inCollKey.value() ) );
-    ATH_MSG_DEBUG ( "Input xAOD::EventInfo = '" << m_inCollKey.value() << "' retrieved from StoreGate" );
-    inAuxElement = dynamic_cast<const xAOD::EventInfo*>(eventInfo);
-    ATH_CHECK( this->evaluateAuxElement(inAuxElement) );
-  }
-
-  // Use a pre-processor macro do generate the code for all container types,
-  // i.e., DataVector< SomeObjectInheritingFrom : public SG::AuxElement >
-  EVALUATE_CONTAINERTYPE(xAOD::IParticleContainer)
-  EVALUATE_CONTAINERTYPE(xAOD::VertexContainer)
-  //EVALUATE_CONTAINERTYPE(xAOD::BTagVertexContainer)
-  EVALUATE_CONTAINERTYPE(xAOD::BTaggingContainer)
-  //EVALUATE_CONTAINERTYPE(xAOD::MissingETComponentMap)
-  EVALUATE_CONTAINERTYPE(xAOD::MissingETContainer)
-  EVALUATE_CONTAINERTYPE(xAOD::TruthEventContainer)
-  EVALUATE_CONTAINERTYPE(xAOD::TruthVertexContainer)
-
-  else {
-    if ( m_nEventsProcessed <= 10 ) {
-      ATH_MSG_WARNING ( "Input collection  = '" << m_inCollKey.value()
-                        << "' could not be retrieved from StoreGate! "
-                        << " This message will only be repeated 10 times..." );
-    }
-    else {
-      ATH_MSG_DEBUG ( "Input collection  = '" << m_inCollKey.value()
-                      << "' could not be retrieved from StoreGate! " );
-    }
-    return StatusCode::SUCCESS;
-  } // End: if/elif/else on input container type
-
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-StatusCode AddVarTool::evaluateAuxElement( const SG::AuxElement* inAuxElement ) const
-{
-  if ( !inAuxElement ) {
-    ATH_MSG_ERROR( "We don't have a valid pointer to SG::AuxElement" );
-    return StatusCode::FAILURE;
-  }
-
-  // Evaluate the string expression for this event
-  ExpressionParsing::StackElement selectionResult = m_parser->evaluate();
-  if ( !(selectionResult.isScalar()) ) {
-    ATH_MSG_ERROR ("Some unexpected format of the expression parser result. Should be scalar-type.");
-    return StatusCode::FAILURE;
-  }
-
-  // Now, get the result and record it to the object
-  if ( m_varTypeIndex == 1 ) { // This is an integer
-    int result = selectionResult.scalarValue<int>();
-    ATH_MSG_VERBOSE("Got an integer result: " << result );
-    inAuxElement->auxdecor<int> (m_varName.value()) = result;
-  }
-  else if ( m_varTypeIndex == 2 ) { // This is a boolean
-    bool result = selectionResult.scalarValue<bool>();
-    ATH_MSG_VERBOSE("Got a boolean result: " << result );
-    inAuxElement->auxdecor<bool> (m_varName.value()) = result;
-  }
-  else if ( m_varTypeIndex == 11 ) { // This is a float
-    float result = selectionResult.scalarValue<float>();
-    ATH_MSG_VERBOSE("Got a float result: " << result );
-    inAuxElement->auxdecor<float> (m_varName.value()) = result;
-  }
-
-  return StatusCode::SUCCESS;
-}
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarTool.h b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarTool.h
deleted file mode 100644
index 2cb652d0ae9..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/AddVarTool.h
+++ /dev/null
@@ -1,114 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// AddVarTool.h
-// Header file for class AddVarTool
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-#ifndef EVENTUTILS_ADDVARTOOL_H
-#define EVENTUTILS_ADDVARTOOL_H 1
-
-// STL includes
-#include <vector>
-#include <string>
-
-// FrameWork includes
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-#include "TrigDecisionTool/TrigDecisionTool.h"
-
-// Forward declarations
-namespace ExpressionParsing {
-  class ExpressionParser;
-}
-namespace SG {
-  class AuxElement;
-}
-
-
-
-
-class AddVarTool
-  : virtual public ::DerivationFramework::IAugmentationTool,
-            public ::AthAlgTool
-{
-
-  ///////////////////////////////////////////////////////////////////
-  // Public methods:
-  ///////////////////////////////////////////////////////////////////
-public:
-
-  // Copy constructor:
-
-  /// Constructor with parameters:
-  AddVarTool( const std::string& type,
-              const std::string& name,
-              const IInterface* parent );
-
-  /// Destructor:
-  virtual ~AddVarTool();
-
-  /// Athena algtool's initialize
-  virtual StatusCode  initialize() override;
-
-  /// Athena algtool's finalize
-  virtual StatusCode  finalize() override;
-
-
-  /// Implement the method from the ISkimmingTool interface
-  virtual StatusCode addBranches() const final override;
-
-
-
-// Private methods
-private:
-  /// Helper methods
-  StatusCode evaluateAuxElement( const SG::AuxElement* inAuxElement ) const;
-
-
-
-  ///////////////////////////////////////////////////////////////////
-  // Private data:
-  ///////////////////////////////////////////////////////////////////
-private:
-  /// The trigger decision tool
-  ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool;
-
-  /// The expression parser
-  ExpressionParsing::ExpressionParser *m_parser;
-
-
-  /// Input container name
-  StringProperty m_inCollKey;
-
-  /// The name of the new variable
-  StringProperty m_varName;
-
-  /// The type of the new variable (allowed values are: 'bool', 'int', 'float')
-  StringProperty m_varType;
-
-  /// The string that describes how the new variable should be calculated
-  StringProperty m_selection;
-
-
-  /// Index to specify the variable type
-  mutable int m_varTypeIndex;
-
-  /// An internal integer to keep track of the type of the input container
-  //mutable int m_inContIdx;
-
-  /// Internal event counter
-  mutable unsigned long m_nEventsProcessed;
-
-
-};
-
-///////////////////////////////////////////////////////////////////
-// Inline methods:
-///////////////////////////////////////////////////////////////////
-
-
-#endif //> !EVENTUTILS_ADDVARTOOL_H
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerAlg.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerAlg.cxx
deleted file mode 100644
index cefd3a3788f..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerAlg.cxx
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//============================================================================
-// Name: ParticleCombinerAlg.cxx
-//
-/**
-   @class ParticleCombinerAlg
-
-   @author Karsten Koeneke <karsten.koeneke@cernSPAMNOT.ch>
-
-   @date July 2014
-
-   @brief Combine particles to composite particles
-
-   Class to combine two or more particles from a given list of
-   input containers. All combinations will be tried and only the
-   ones passing the used selections will be written to StoreGate.
-*/
-//=============================================================================
-
-// This classes header
-#include "ParticleCombinerAlg.h"
-
-// STL includes
-#include <string>
-#include <vector>
-#include <cfloat>
-#include <climits>
-
-// Framework includes
-#include "GaudiKernel/IJobOptionsSvc.h"
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-
-
-
-//=============================================================================
-// Constructor
-//=============================================================================
-ParticleCombinerAlg::ParticleCombinerAlg(const std::string& name,
-                                         ISvcLocator* pSvcLocator) :
-  AthAlgorithm( name, pSvcLocator ),
-  m_jos("JobOptionsSvc", name),
-  m_tool("ParticleCombinerTool/ParticleCombinerTool", this),
-  m_inCollKeyList(),
-  m_setInCollKeyList(false),
-  m_metName(""),
-  m_setMetName(false),
-  m_outCollKey(""),
-  m_setOutCollKey(false),
-  m_writeSplitAux(false),
-  m_setWriteSplitAux(false),
-  m_pdgId(0),
-  m_setPdgId(false),
-  m_setSort(false),
-  m_nEventsProcessed(0)
-{
-  declareProperty("JobOptionsSvc", m_jos, "The JobOptionService instance.");
-
-  declareProperty("ParticleCombinerTool",  m_tool, "The private tool that will do the particle combinatorics" );
-
-  declareProperty("InputContainerList", m_inCollKeyList,   "List of input collection keys" );
-  m_inCollKeyList.declareUpdateHandler( &ParticleCombinerAlg::setupInputContainerList, this );
-
-  declareProperty("MissingETObject",    m_metName="Final", "The name of the xAOD::MissingET object (default: 'Final'" );
-  m_metName.declareUpdateHandler( &ParticleCombinerAlg::setupMissingETObject, this );
-
-  declareProperty("OutputContainer",    m_outCollKey="",   "The name of the output container" );
-  m_outCollKey.declareUpdateHandler( &ParticleCombinerAlg::setupOutputContainer, this );
-
-  declareProperty("WriteSplitOutputContainer", m_writeSplitAux=false,
-                  "Decide if we want to write a fully-split AuxContainer such that we can remove any variables" );
-  m_writeSplitAux.declareUpdateHandler( &ParticleCombinerAlg::setupWriteSplitOutputContainer, this );
-
-  declareProperty("SetPdgId",           m_pdgId=0,         "PDG ID of the new output xAOD::CompositeParticle" );
-  m_pdgId.declareUpdateHandler( &ParticleCombinerAlg::setupSetPdgId, this );
-
-  declareProperty("SortConstituents",   m_sortConstit=false, "If true: sort the constituents in decending pt order" );
-  m_sortConstit.declareUpdateHandler( &ParticleCombinerAlg::setupSort, this );
-}
-
-
-
-
-
-
-
-//=============================================================================
-// Destructor
-//=============================================================================
-ParticleCombinerAlg::~ParticleCombinerAlg()
-{
-}
-
-
-
-//=============================================================================
-// Athena initialize method
-//=============================================================================
-StatusCode ParticleCombinerAlg::initialize()
-{
-  // Print the used configuration
-  ATH_MSG_DEBUG ( "==> initialize " << name() << "..." );
-
-  // Print out the used configuration
-  ATH_MSG_DEBUG ( " using = " << m_jos );
-  ATH_MSG_DEBUG ( " using = " << m_tool );
-  ATH_MSG_DEBUG ( " using = " << m_inCollKeyList );
-  ATH_MSG_DEBUG ( " using = " << m_metName );
-  ATH_MSG_DEBUG ( " using = " << m_outCollKey );
-  ATH_MSG_DEBUG ( " using = " << m_writeSplitAux );
-  ATH_MSG_DEBUG ( " using = " << m_pdgId );
-  ATH_MSG_DEBUG ( " using = " << m_sortConstit );
-
-
-  // Initialize the counters to zero
-  m_nEventsProcessed = 0 ;
-
-
-  // Get the JobOptionService
-  // We will use this to set the properties of our private tool
-  // from the properties of this algorithm.
-  ATH_MSG_VERBOSE( "Getting the JobOptionService");
-  ATH_CHECK( m_jos.retrieve() );
-
-  // Get the full name of the private skimTool
-  ATH_MSG_VERBOSE( "Getting the full name of the tool");
-  const std::string& fullToolName = this->name() + "." + m_tool.name();
-  ATH_MSG_DEBUG( "Got the full name of the tool: " << fullToolName );
-
-  // Now, set all properties of the private skimTool that were acutally configured
-  if (m_setInCollKeyList) {
-    ATH_MSG_DEBUG( "Setting property" << m_inCollKeyList
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_inCollKeyList) );
-  }
-  if (m_setMetName) {
-    ATH_MSG_DEBUG( "Setting property" << m_metName
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_metName) );
-  }
-  if (m_setOutCollKey) {
-    ATH_MSG_DEBUG( "Setting property" << m_outCollKey
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_outCollKey) );
-  }
-  if (m_setWriteSplitAux) {
-    ATH_MSG_DEBUG( "Setting property" << m_writeSplitAux
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_writeSplitAux) );
-  }
-  if (m_setPdgId) {
-    ATH_MSG_DEBUG( "Setting property" << m_pdgId
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_pdgId) );
-  }
-  if (m_setSort) {
-    ATH_MSG_DEBUG( "Setting property" << m_sortConstit
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_sortConstit) );
-  }
-  ATH_MSG_DEBUG( "Done setting properties of the tool");
-
-  // Get the tool
-  ATH_CHECK( m_tool.retrieve() );
-
-  ATH_MSG_DEBUG ( "==> done with initialize " << name() << "..." );
-  return StatusCode::SUCCESS;
-}
-
-
-
-//=============================================================================
-// Athena execute method
-//=============================================================================
-StatusCode ParticleCombinerAlg::execute()
-{
-  // Increase the event counter
-  ++m_nEventsProcessed;
-
-  // Simple status message at the beginning of each event execute,
-  ATH_MSG_DEBUG ( "==> execute " << name() << " on " << m_nEventsProcessed << ". event..." );
-
-  // Call the tool to build the particle combinatorics and record the result to StoreGate
-  ATH_CHECK( m_tool->addBranches() );
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-
-//=============================================================================
-// Athena finalize method
-//=============================================================================
-StatusCode ParticleCombinerAlg::finalize()
-{
-  ATH_MSG_DEBUG ( "FINALIZING AFTER ALL EVENTS ARE PROCESSED. "
-                  << "Saw " << m_nEventsProcessed << " events." );
-
-  // Release all tools and services
-  ATH_CHECK( m_jos.release() );
-  ATH_CHECK( m_tool.release() );
-
-
-  return StatusCode::SUCCESS;
-}
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerAlg.h b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerAlg.h
deleted file mode 100644
index 1b550bbbb19..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerAlg.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-#ifndef EVENTUTILS_PARTICLECOMBINERALG_H
-#define EVENTUTILS_PARTICLECOMBINERALG_H
-
-//============================================================================
-// Name: ParticleCombinerAlg.h
-//
-/**
-   @class ParticleCombinerAlg
-
-   @author Karsten Koeneke <karsten.koeneke@cernSPAMNOT.ch>
-
-   @date July 2014
-
-   @brief Combine particles to composite particles
-
-   Class to combine two or more particles from a given list of
-   input containers. All combinations will be tried and only the
-   ones passing the used selections will be written to StoreGate.
-*/
-//=============================================================================
-
-
-// STL includes
-#include <string>
-#include <vector>
-
-// Gaudi includes
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
-
-// Athena includes
-#include "AthenaBaseComps/AthAlgorithm.h"
-
-
-// forward declarations
-class IJobOptionsSvc;
-namespace DerivationFramework {
-  class IAugmentationTool;
-}
-
-
-
-class ParticleCombinerAlg : public AthAlgorithm
-{
-public:
-
-  /** Default constructor */
-  ParticleCombinerAlg(const std::string& name, ISvcLocator* pSvcLocator);
-
-  /** Default destructor */
-  virtual ~ParticleCombinerAlg() ;
-
-
-public:
-  /** Gaudi Service Interface method implementations - initialize */
-  StatusCode initialize() ;
-
-  /** Gaudi Service Interface method implementations - execute */
-  StatusCode execute() ;
-
-  /** Gaudi Service Interface method implementations - finalize */
-  StatusCode finalize() ;
-
-
-private:
-  // The update handlers
-
-  /// This internal method will realize if a user sets the 'InputContainerList' property
-  void setupInputContainerList( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'MissingETObject' property
-  void setupMissingETObject( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'OutputContainer' property
-  void setupOutputContainer( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'WriteSplitOutputContainer' property
-  void setupWriteSplitOutputContainer( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'SetPdgId' property
-  void setupSetPdgId( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'SortConstituents' property
-  void setupSort( Gaudi::Details::PropertyBase& /*prop*/ );
-
-
-
-private:
-  /// The job options service (will be used to forward this algs properties to
-  /// the private tool)
-  ServiceHandle<IJobOptionsSvc> m_jos;
-
-  /// The ToolHandle to the AugmentationTool
-  ToolHandle<DerivationFramework::IAugmentationTool> m_tool;
-
-  /// List of input collection names
-  StringArrayProperty m_inCollKeyList;
-
-  /// This boolean is true if the user sets the 'InputContainerList' property
-  bool m_setInCollKeyList;
-
-
-  /// The name of the missing ET object, e.g., "Final"
-  StringProperty m_metName;
-
-  /// This boolean is true if the user sets the 'MissingETObject' property
-  bool m_setMetName;
-
-
-  /// Output collection name (the composite particles)
-  StringProperty m_outCollKey;
-
-  /// This boolean is true if the user sets the 'OutputContainer' property
-  bool m_setOutCollKey;
-
-
-  /// Decide if we want to write a fully-split AuxContainer such that we can remove any variables
-  BooleanProperty m_writeSplitAux;
-
-  /// This boolean is true if the user sets the 'WriteSplitOutputContainer' property
-  bool m_setWriteSplitAux;
-
-
-  /// The PDG_ID of the CompositeParticle
-  IntegerProperty m_pdgId;
-
-  /// This boolean is true if the user sets the 'SetPdgId' property
-  bool m_setPdgId;
-
-
-  /// If true: sort the constituents in decending pt order
-  BooleanProperty m_sortConstit;
-
-  /// This boolean is true if the user sets the 'SortConstituents' property
-  bool m_setSort;
-
-
-
-  /// Internal event counter
-  unsigned long m_nEventsProcessed;
-
-
-}; // End class ParticleCombinerAlg
-
-
-// Inline methods
-
-/// This internal method will realize if a user sets the 'InputContainerList' property
-inline void ParticleCombinerAlg::setupInputContainerList( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setInCollKeyList = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'MissingETObject' property
-inline void ParticleCombinerAlg::setupMissingETObject( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setMetName = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'OutputContainer' property
-inline void ParticleCombinerAlg::setupOutputContainer( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setOutCollKey = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'WriteSplitOutputContainer' property
-inline void ParticleCombinerAlg::setupWriteSplitOutputContainer( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setWriteSplitAux = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'SetPdgId' property
-inline void ParticleCombinerAlg::setupSetPdgId( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setPdgId = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'SortConstituents' property
-inline void ParticleCombinerAlg::setupSort( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setSort = true;
-  return;
-}
-
-
-#endif // EVENTUTILS_PARTICLECOMBINERALG_H
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.cxx
deleted file mode 100644
index e9d6acaaf5f..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.cxx
+++ /dev/null
@@ -1,902 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//============================================================================
-// Name: ParticleCombinerTool.cxx
-//
-/**
-   @class ParticleCombinerTool
-
-   @author Karsten Koeneke <karsten.koeneke@cernSPAMNOT.ch>
-
-   @date July 2014
-
-   @brief Combine particles to composite particles
-
-   Class to combine two or more particles from a given list of
-   input containers. All combinations will be tried and only the
-   ones passing the used selections will be written to StoreGate.
-*/
-//=============================================================================
-
-// This classes header
-#include "ParticleCombinerTool.h"
-
-// STL includes
-#include <string>
-#include <vector>
-#include <cfloat>
-#include <climits>
-#include <algorithm>
-
-// The composite particle
-#include "xAODParticleEvent/CompositeParticle.h"
-#include "xAODParticleEvent/CompositeParticleContainer.h"
-#include "xAODParticleEvent/CompositeParticleAuxContainer.h"
-
-// Other EDM includes
-#include "AthLinks/ElementLink.h"
-#include "xAODBase/IParticle.h"
-#include "xAODBase/IParticleContainer.h"
-#include "xAODParticleEvent/IParticleLink.h"
-#include "xAODParticleEvent/IParticleLinkContainer.h"
-#include "xAODMissingET/MissingET.h"
-#include "xAODMissingET/MissingETContainer.h"
-#include "xAODParticleEvent/Particle.h"
-#include "xAODEgamma/Electron.h"
-#include "xAODMuon/Muon.h"
-#include "xAODTau/TauJet.h"
-#include "xAODTracking/NeutralParticle.h"
-#include "xAODTracking/TrackParticle.h"
-// #include "xAODTruth/TruthParticle.h"
-#include "xAODPFlow/PFO.h"
-#include "xAODJet/Jet.h"
-
-// include other stuff
-#include "CxxUtils/fpcompare.h"
-#include "PATCore/CombinatoricsOdometer.h"
-
-
-
-//=============================================================================
-// Constructor
-//=============================================================================
-ParticleCombinerTool::ParticleCombinerTool(const std::string& type,
-                                           const std::string& name,
-                                           const IInterface* parent ) :
-  AthAlgTool( type, name, parent ),
-  m_inCollKeyList(),
-  m_metName(""),
-  m_outCollKey(""),
-  m_writeSplitAux(false),
-  m_pdgId(0),
-  m_nEventsProcessed(0),
-  m_anIPartLinkList(),
-  m_inputLinkContainerList(),
-  m_inputLinkContainerListToDelete(),
-  m_inputLinkContainerNames(),
-  m_alreadyUsedInputContainers(),
-  m_containerLabels(),
-  m_containerMaxN(),
-  m_alreadyUsedContainers()
-{
-  declareInterface<DerivationFramework::IAugmentationTool>(this);
-
-  declareProperty("InputContainerList", m_inCollKeyList,   "List of input collection keys" );
-  declareProperty("MissingETObject",    m_metName="Final", "The name of the xAOD::MissingET object (default: 'Final'" );
-
-  declareProperty("OutputContainer",    m_outCollKey="DefaultCompositeParticleContainer",
-                  "The name of the output container (default: 'DefaultCompositeParticleContainer')" );
-  declareProperty("WriteSplitOutputContainer", m_writeSplitAux=false,
-                  "Decide if we want to write a fully-split AuxContainer such that we can remove any variables" );
-
-  declareProperty("SetPdgId",           m_pdgId=0,         "PDG ID of the new output xAOD::CompositeParticle" );
-  declareProperty("SortConstituents",   m_sortConstit=false, "If true: sort the constituents in decending pt order" );
-
-}
-
-
-
-
-
-
-
-//=============================================================================
-// Destructor
-//=============================================================================
-ParticleCombinerTool::~ParticleCombinerTool()
-{
-}
-
-
-
-
-
-
-//=============================================================================
-// Athena initialize method
-//=============================================================================
-StatusCode ParticleCombinerTool::initialize()
-{
-  // Print the used configuration
-  ATH_MSG_DEBUG ( "==> initialize " << name() << "..." );
-
-  // Print out the used configuration
-  ATH_MSG_DEBUG ( " using = " << m_inCollKeyList );
-  ATH_MSG_DEBUG ( " using = " << m_metName );
-  ATH_MSG_DEBUG ( " using = " << m_outCollKey );
-  ATH_MSG_DEBUG ( " using = " << m_writeSplitAux );
-  ATH_MSG_DEBUG ( " using = " << m_pdgId );
-  ATH_MSG_DEBUG ( " using = " << m_sortConstit );
-
-  // ATH_MSG_DEBUG ( " using mcTruthRequireSameMotherPdgID   = " << m_mcTruthRequireSameMotherPdgID );
-  // ATH_MSG_DEBUG ( " using mcTruthRequireSameMotherBarcode = " << m_mcTruthRequireSameMotherBarcode );
-
-  // Initialize the counters to zero
-  m_nEventsProcessed = 0 ;
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-//=============================================================================
-// Run once per event
-//=============================================================================
-StatusCode ParticleCombinerTool::addBranches() const
-{
-  // Increase the event counter
-  ++m_nEventsProcessed;
-
-  // Simple status message at the beginning of each event execute,
-  ATH_MSG_DEBUG ( "==> addBranches " << name() << " on " << m_nEventsProcessed << ". event..." );
-
-
-  //-----------------------------------------
-  // Retrieve and store the input containers
-  //-----------------------------------------
-
-  // Create some objects that are needed later on
-  bool allInputContainersAreFull = true;
-  const xAOD::MissingET* metObject(0);
-  int nMet(0);
-
-  // Clear the vector of LinkContainers and a map of their names.
-  //  use a map to determine if a given input container
-  //  has already been seen, and simply point to the
-  //  link container corresponding to  that already-used
-  //  input container
-  m_inputLinkContainerListToDelete.clear();
-  m_inputLinkContainerList.clear();
-  m_inputLinkContainerNames.clear();
-  m_alreadyUsedInputContainers.clear();
-
-  // Loop over the list of input containers
-  for ( const std::string& anInputCollName  :  m_inCollKeyList.value() ) {
-    // Check if the current input container name is a LinkContainer
-    if ( evtStore()->contains< xAOD::IParticleLinkContainer >( anInputCollName ) ) {
-      // Actually retrieve the LinkContainer from StoreGate
-      const xAOD::IParticleLinkContainer* aLinkContainer(0);
-      ATH_CHECK( evtStore()->retrieve( aLinkContainer , anInputCollName ) );
-      ATH_MSG_DEBUG ( "Input link collection = '" << anInputCollName
-                      << "' retrieved from StoreGate which has " << aLinkContainer->size() << " entries." );
-
-      // If any input container has zero size, we won't be able to build a
-      // CompositeParticle. Thus, we can stop here.
-      if ( aLinkContainer->size() == 0 ) {
-        allInputContainersAreFull &= false;
-        ATH_MSG_VERBOSE("Found an empty input link container");
-        break;
-      }
-
-      if ( m_inputLinkContainerNames.find(aLinkContainer)  == m_inputLinkContainerNames.end() ) {
-        m_inputLinkContainerNames[ aLinkContainer ] = &anInputCollName;
-      }
-      m_inputLinkContainerList.push_back( aLinkContainer );
-    }
-    else if ( evtStore()->contains< xAOD::IParticleContainer >( anInputCollName ) ) {
-      // This container holds an xAOD::IParticleContainer
-      const xAOD::IParticleContainer* aContainer(0);
-      ATH_CHECK( evtStore()->retrieve( aContainer, anInputCollName ) );
-      ATH_MSG_DEBUG ( "Input collection = '" << anInputCollName
-                      << "' retrieved from StoreGate which has " << aContainer->size() << " entries." );
-
-      // If any input container has zero size, we won't be able to build a
-      // CompositeParticle. Thus, we can stop here.
-      if (aContainer->size() == 0) {
-        allInputContainersAreFull &= false;
-        ATH_MSG_VERBOSE("Found an empty input container");
-        break;
-      }
-
-      // Now, create the vector of ElementLinks pointing to the real container
-      if ( m_alreadyUsedInputContainers.find( aContainer ) == m_alreadyUsedInputContainers.end() ) {
-        xAOD::IParticleLinkContainer* newLinkContainer = new xAOD::IParticleLinkContainer();
-        newLinkContainer->reserve( aContainer->size() );
-        m_inputLinkContainerListToDelete.push_back( newLinkContainer );
-
-        for ( const auto* aPart : *aContainer ) {
-          // Have to use the container() and index() method to be able to also
-          // use an input container with SG::VIEW_ELEMENTS, i.e., this way,
-          // the IParticleLink will correctly point to the element in the
-          // original SG::OWN_ELEMENTS container.
-          xAOD::IParticleLink iPartLink( static_cast<const xAOD::IParticleContainer&>(*(aPart->container())),
-                                         aPart->index() );
-          newLinkContainer->push_back( iPartLink );
-        }
-
-        m_alreadyUsedInputContainers[ aContainer ] = newLinkContainer;
-
-
-        if ( m_inputLinkContainerNames.find( newLinkContainer ) == m_inputLinkContainerNames.end() ) {
-          m_inputLinkContainerNames[ newLinkContainer ] = &anInputCollName;
-        }
-        // Add this new container of ElementLinks to the vector
-        m_inputLinkContainerList.push_back( newLinkContainer );
-      }
-      else {
-        // Add an already existing container of ElementLinks again to the vector
-        m_inputLinkContainerList.push_back( m_alreadyUsedInputContainers[ aContainer ] );
-      }
-    }
-    else if ( evtStore()->contains< xAOD::MissingETContainer >( anInputCollName ) ) {
-      // This container holds an xAOD::IParticleContainer
-      const xAOD::MissingETContainer* aMetContainer(0);
-      ATH_CHECK( evtStore()->retrieve( aMetContainer, anInputCollName ) );
-      ATH_MSG_DEBUG ( "Input missing et container = '" << anInputCollName
-                      << "' retrieved from StoreGate." );
-
-      nMet += 1;
-      metObject = (*aMetContainer)[m_metName.value()];
-      if ( !metObject ) {
-        ATH_MSG_WARNING( "There was a problem getting the xAOD::MissingET "
-                         << " object with name '" << m_metName
-                         << "' from the xAOD::MissingETContainer with "
-                         << "name '" << anInputCollName << "'." );
-      }
-    }
-    else {
-      if ( m_nEventsProcessed <= 10 ) {
-        ATH_MSG_WARNING ( "Input link collection  = '" << anInputCollName
-                          << "' could not be retrieved from StoreGate! "
-                          << " This message will only be repeated 10 times..." );
-      }
-      else {
-        ATH_MSG_DEBUG ( "Input link collection  = '" << anInputCollName
-                        << "' could not be retrieved from StoreGate! " );
-      }
-      return StatusCode::SUCCESS;
-    } // End: if/elif/else is link container
-  } // End: Loop over the list of input containers
-
-  // Make sure that we have at most one missing ET container
-  if ( nMet > 1 ) {
-    ATH_MSG_ERROR( "We seem to have gotten " << nMet << " xAOD::MissingETContainers "
-                   << "in the InputContainerList. At most one is allowed... exiting!" );
-    return StatusCode::FAILURE;
-  }
-
-  // One more sanity check that we didn't loose a container in between
-  if ( m_inCollKeyList.value().size() != ( m_inputLinkContainerList.size() + nMet ) ) {
-    ATH_MSG_DEBUG( "Inconsistent number of input containers after some processing!"
-                   << " This should only happen when any of the input containers has zero size." );
-    ATH_MSG_DEBUG( "  m_inCollKeyList.size() = " << m_inCollKeyList.value().size() );
-    ATH_MSG_DEBUG( "  m_inputLinkContainerList.size() = " << m_inputLinkContainerList.size() );
-    ATH_MSG_DEBUG( "  nMet = " << nMet );
-    ATH_MSG_DEBUG( "  allInputContainersAreFull = " << allInputContainersAreFull );
-  }
-
-
-  // //-----------------------------------------
-  // // Retrieve the MCEventCollection, if needed
-  // //-----------------------------------------
-  // if ( !m_mcEventCollKey.empty() && (
-  //                                    m_mcTruthRequireSameMotherPdgID  ||
-  //                                    m_mcTruthRequireSameMotherBarcode
-  //                                    )
-  //      )
-  //   {
-  //     ATH_CHECK( evtStore()->retrieve( m_mcEventColl, m_mcEventCollKey ) );
-  //     ATH_MSG_DEBUG ( "MCEventCollection = '" << m_mcEventCollKey << "' retrieved from StoreGate" );
-  //   } // End: need to retrieve MCEventCollection
-
-
-
-
-  //-----------------------------------------
-  // Create the output composite particle container and record it in StoreGate
-  //-----------------------------------------
-  xAOD::CompositeParticleContainer* outContainer = new xAOD::CompositeParticleContainer( SG::OWN_ELEMENTS );
-  ATH_CHECK( evtStore()->record ( outContainer, m_outCollKey.value() ) );
-  if ( m_writeSplitAux.value() ) {
-    xAOD::AuxContainerBase* outAuxContainer = new xAOD::AuxContainerBase();
-    ATH_CHECK( evtStore()->record( outAuxContainer, m_outCollKey.value() + "Aux." ) );
-    outContainer->setStore( outAuxContainer );
-  }
-  else {
-    xAOD::CompositeParticleAuxContainer* compPartAuxCont = new xAOD::CompositeParticleAuxContainer();
-    ATH_CHECK( evtStore()->record( compPartAuxCont, m_outCollKey.value() + "Aux." ) );
-    outContainer->setStore( compPartAuxCont );
-  }
-  ATH_MSG_DEBUG( "Recorded xAOD composite particles with key: " << m_outCollKey.value() );
-
-
-
-  //-----------------------------------------
-  // In case at least one of the input containers has zero size,
-  //  no CompositeParticle can be found. So only try building
-  //  CompositeParticles if every input container has at least
-  //  one entry.
-  //-----------------------------------------
-  if ( allInputContainersAreFull ) {
-
-    //-----------------------------------------
-    // Do the combinations of particles
-    //-----------------------------------------
-
-    // Use the odometer algorithm to perform the combination of particles
-    //  m_inputLinkContainerList is the std::vector of links
-
-    // get the label and number of elements in each link container.
-    // pass those to the OdoMeter, and ask the OdoMeter to return
-    // the unique sets of indices for objects in the containers
-
-    // To create the odometer object, we need to assign each container pointer
-    // a string name that uniquely idenfies that container. The same container
-    // (even used multiple times) will always have the same name. The name/entries
-    // info will be used to initialize the odometer.
-    ATH_MSG_DEBUG ( "Input LinkContainer list contains " << m_inputLinkContainerList.size() << " entries." );
-
-    // Clear needed vectors and maps
-    m_containerLabels.clear();
-    m_containerMaxN.clear();
-    m_alreadyUsedContainers.clear();
-
-    for ( const xAOD::IParticleLinkContainer* aLinkContainer  :  m_inputLinkContainerList ) {
-      const std::string& containerName = *(m_inputLinkContainerNames[ aLinkContainer ]);
-
-      // determine if this container has already been used in the list.
-      // if not, assign it a unique name. If so, get the name of the existing container
-      if ( m_containerLabels.size() == 0 ||
-           m_alreadyUsedContainers.find( aLinkContainer ) == m_alreadyUsedContainers.end() ) {
-        m_containerLabels.push_back( containerName );
-        m_containerMaxN[ containerName ] = aLinkContainer->size();
-        m_alreadyUsedContainers[ aLinkContainer ] = containerName;
-      }
-      else {
-        // already used this container. Use the old container's name
-        m_containerLabels.push_back( containerName );
-      }
-      ATH_MSG_DEBUG ( "A container/size pair for the Odometer: "
-                      << m_containerLabels.at( m_containerLabels.size() - 1) << "/"
-                      << m_containerMaxN[ m_containerLabels.at( m_containerLabels.size() - 1) ] );
-    }
-
-
-    // Create and initialize an instance of the odometer
-    OdoMeter anOdometer(m_containerLabels, m_containerMaxN);
-
-    // find all unique groupings and build composites
-    while ( anOdometer.increment() ) {
-      // Clear the vector
-      m_anIPartLinkList.clear();
-
-      // Get the current combinatoric
-      std::vector<int> aUniqueChoice = anOdometer.getVector();
-      int nContainers = static_cast<int>(aUniqueChoice.size());
-
-      if (msgLvl(MSG::VERBOSE)) {
-        msg(MSG::VERBOSE) << "Odometer - using this unique combination: ";
-        for ( unsigned int ichoice = 0; ichoice < aUniqueChoice.size(); ichoice++ ) {
-          msg(MSG::VERBOSE)  << aUniqueChoice.at(ichoice) << ",";
-        }
-        msg(MSG::VERBOSE) << endmsg;
-      }
-
-      // Loop over all containers
-      for( int aContainerIndex = 0; aContainerIndex < nContainers; ++aContainerIndex ) {
-        const xAOD::IParticleLinkContainer* aLinkContainer = m_inputLinkContainerList.at( aContainerIndex );
-        int indexInContainer = aUniqueChoice.at( aContainerIndex );
-
-        const xAOD::IParticleLink& aPartLink = aLinkContainer->at( indexInContainer );
-
-        const xAOD::IParticleContainer* ptrIPartCont =
-        dynamic_cast< const xAOD::IParticleContainer* >( aPartLink.getStorableObjectPointer() );
-
-        if ( ptrIPartCont != NULL ) {
-          const xAOD::IParticleLink aParticleLink(*ptrIPartCont, aPartLink.index());
-          m_anIPartLinkList.push_back( aParticleLink );
-        }
-      } // end the loop over the available containers to build INav4MomLink objects
-
-      // Now, actually build the CompositeParticle from the list of ElementLinks to INavigable4Momentum
-      ATH_MSG_DEBUG("building composite particle");
-      ATH_CHECK( buildComposite( outContainer, m_anIPartLinkList, metObject ) );
-      ATH_MSG_DEBUG("done");
-
-    } // End: while ( anOdometer.increment() )
-
-  } // End: Found an empty input collection; thus no CompositeParticle can be possible... do nothing.
-
-
-  //-----------------------------------------
-  // Set the output container of composite particles as const
-  // Actually, for now, don't do this as analyzers might want to decorate the
-  // new xAOD::CompositeParticles further downstream.
-  //-----------------------------------------
-  // ATH_CHECK( evtStore()->setConst( outContainer ) );
-  // ATH_CHECK( evtStore()->setConst( compPartAuxCont ) );
-  // ATH_MSG_DEBUG ( "Output collection = '" << m_outCollKey.value() << "' set to const in StoreGate" );
-
-  // Print a final message about the composite particles
-  ATH_MSG_DEBUG ( "Found " << outContainer->size() << " composite particles in event number " << m_nEventsProcessed );
-
-  // // Delete needed things
-  for ( std::size_t i=0; i<m_inputLinkContainerListToDelete.size(); ++i ) {
-    if ( m_inputLinkContainerListToDelete[i] ) {
-      delete m_inputLinkContainerListToDelete[i];
-    }
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-
-//=============================================================================
-// Athena finalize method
-//=============================================================================
-StatusCode ParticleCombinerTool::finalize()
-{
-  ATH_MSG_DEBUG ( "FINALIZING AFTER ALL EVENTS ARE PROCESSED" );
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-
-
-//=============================================================================
-// Building the composite particle
-// Here, we check if any of the potential constituents (anIPartLinkList) is
-// overlapping (is the same or share the same constituent) with any of the other
-// potential constituents
-//=============================================================================
-StatusCode ParticleCombinerTool::buildComposite( xAOD::CompositeParticleContainer* outContainer,
-                                                 xAOD::IParticleLinkContainer& anIPartLinkList,
-                                                 const xAOD::MissingET* metObject ) const
-{
-  // Check if the vector does not have zero size
-  if ( anIPartLinkList.size() == 0 ) {
-    return StatusCode::SUCCESS;
-  }
-
-  // Create a list of all ParticleLinks that are already checked
-  std::vector< const xAOD::IParticleLink* > theParticleLinks;
-
-  bool ParticlesAreValid = true;
-
-  ATH_MSG_VERBOSE("Now in buildComposite with outContainer size=" << outContainer->size()
-                  << ", anIPartLinkList size=" << anIPartLinkList.size() << ", and a met object with address=" << metObject );
-  
-  //Loop over all ElementLinks to INavigable4Momenta and get the INavigable4Momenta
-  for ( const xAOD::IParticleLink& aParticleLink  :  anIPartLinkList ) {
-    ATH_MSG_VERBOSE("buildComposite: Looping over a particle link");
-    // Check if this ElementLink is valid
-    if ( aParticleLink.isValid() ) {
-      // Get the particle from the ElementLink
-      const xAOD::IParticle* aParticle = *aParticleLink;
-      ATH_MSG_VERBOSE("buildComposite: Particle is valid");
-
-      if (aParticle) {
-        ATH_MSG_VERBOSE("buildComposite: Have a particle");
-        // determine if the particle has any daughter in common with
-        // a previous particle in the composite:
-        for ( const xAOD::IParticleLink* otherPartLink  :  theParticleLinks ) {
-          ATH_MSG_VERBOSE("Looking for shared daughters");
-          // Now, make the check for having any constituent shared.
-          // Note that we don't need to check if the otherPartLink is valid
-          // since this happened already when we filled that vector
-          if ( this->shareSameConstituents( aParticle, **otherPartLink ) ) {
-            ATH_MSG_DEBUG ( "buildComposite: Found aParticle overlaps with another INavigable4Momentum in the composite!" );
-            ParticlesAreValid &= false;
-            break;
-          }
-        } // End: loop over all already checked particle links
-
-        // push the particle onto the candidate's input list
-        if ( ParticlesAreValid ) {
-          ATH_MSG_VERBOSE("buildComposite: Particles are valid");
-          theParticleLinks.push_back( &aParticleLink );
-        }
-      }
-      else {
-        ATH_MSG_DEBUG ( "buildComposite: Found non-valid particle at an ElementLink location!" );
-        ParticlesAreValid &= false;
-      } // check if aParticle exists at all
-    }
-    else {
-      ATH_MSG_DEBUG ( "buildComposite: Found non-valid ElementLink for a particle!" );
-      ParticlesAreValid &= false;
-    } // check the link to a particle
-
-    if ( false == ParticlesAreValid ) {
-      ATH_MSG_VERBOSE("buildComposite: particles are not valid");
-      break;
-    }
-  } // End: loop over vector of ElementLinks
-
-
-  ATH_MSG_VERBOSE("buildComposite: Done looping over vector of ElementLinks");
-  
-  //-----------------------------------------
-  // Do the combination
-  //-----------------------------------------
-  if ( ParticlesAreValid ) {
-    ATH_MSG_VERBOSE("buildComposite: Particles are valid");  
-    // Sort the constituents in decending pt order, if requested
-    if ( m_sortConstit.value() ) {
-      std::sort( anIPartLinkList.begin(), anIPartLinkList.end(),
-                 [](const xAOD::IParticleLink& a, const xAOD::IParticleLink& b) {
-                   return CxxUtils::fpcompare::greater( (*a)->pt(), (*b)->pt() );
-                 } );
-    }
-    ATH_MSG_VERBOSE("buildComposite: Particles are sorted");
-
-    // Actually create the composite particle
-    //--------------------------------------------------------------
-    // Try to inferr the charge from the constituents
-    bool hasCharge(true);
-    float chargeSum(0.0);
-    xAOD::CompositeParticle* compPart = new xAOD::CompositeParticle();
-    compPart->makePrivateStore();
-    for ( const xAOD::IParticleLink& aParticleLink  :  anIPartLinkList ) {
-      ATH_MSG_VERBOSE("buildComposite: Adding constituet");
-      chargeSum += this->getCharge( aParticleLink, hasCharge );
-      compPart->addPart( aParticleLink );
-    }
-    // Add also the missing ET object to the composite particle, if we have one
-    if (metObject) {
-      ATH_MSG_VERBOSE("buildComposite: Adding met object");
-      compPart->setMissingET(metObject);
-    }
-    // Set the PDG ID for this composite particle
-    compPart->setPdgId( m_pdgId.value() );
-    // Set the charge (if we were able to calculate it) for this composite particle
-    if ( hasCharge ) {
-      ATH_MSG_VERBOSE("buildComposite: Setting the charge of the current composite particle to " << chargeSum );
-      compPart->setCharge(chargeSum);
-    }
-    else {
-      ATH_MSG_DEBUG("buildComposite: Couldn't set the charge of the composite particle");
-    }
-
-    // Check if this composite particle has been found before
-    if ( !compositeParticleAlreadyFound( outContainer, compPart ) ) {
-      // Add this composite particle to the output container
-      // if it passes all the selections
-      //--------------------------------------------------------------
-//      bool passAll = true;
-
-      // // charge selection
-      // if ( passAll ) {
-      //   passAll = m_filterTool->chargeFilter( compPart,
-      //                                         m_chargeMin,
-      //                                         m_chargeMax,
-      //                                         m_allowChargeConj );
-      // }
-
-      // // MC Truth selection
-      // // ONLY run this if MCTruth information is available AND
-      // // MCTruth selections are configured!
-      // if ( !m_mcEventCollKey.empty() && (
-      //                                    m_mcTruthRequireSameMotherPdgID  ||
-      //                                    m_mcTruthRequireSameMotherBarcode
-      //                                    )
-      //      )
-      //   {
-      //     if ( passAll )
-      //       {
-      //         passAll = mcTruthSelections( compPart );
-      //       }
-      //   }
-
-
-
-      // Write out the composite particles if all cuts are passed
-      // AK: Commented the conditional statements until "passAll" is actually
-      //     used here. To silence a Coverity warning.
-//      if ( passAll ) {
-      ATH_MSG_VERBOSE("buildComposite: Adding composite particle to container");
-      outContainer->push_back( compPart );
-    }
-    else {
-      ATH_MSG_VERBOSE("buildComposite: deleting composite particle");
-      delete compPart;
-    }
-    
-    ATH_MSG_VERBOSE("buildComposite: End: if compositeParticleAlreadyFound");
-    
-  } // End: Saveguard check if all particles are valide
-
-  ATH_MSG_VERBOSE("Returning from buildComposite");
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-// Try to get the charge for all types
-float ParticleCombinerTool::getCharge( const xAOD::IParticleLink& aParticleLink,
-                                       bool& hasCharge ) const
-{
-  if (!hasCharge) { return 0.0; }
-  if (!aParticleLink.isValid()) {
-    hasCharge = false;
-    return 0.0;
-  }
-
-  // Now, start testing the different particle types
-  const xAOD::CompositeParticle* compPart = dynamic_cast<const xAOD::CompositeParticle*>(*aParticleLink);
-  if ( compPart ) {
-    if ( !(compPart->hasCharge()) ) {
-      hasCharge = false;
-      return 0.0;
-    }
-    return compPart->charge();
-  }
-  const xAOD::Particle* part = dynamic_cast<const xAOD::Particle*>(*aParticleLink);
-  if ( part ) {
-    if ( !(part->hasCharge()) ) {
-      hasCharge = false;
-      return 0.0;
-    }
-    return part->charge();
-  }
-  if ( (*aParticleLink)->type() == xAOD::Type::Electron ) {
-    const xAOD::Electron* ele = static_cast<const xAOD::Electron*>(*aParticleLink);
-    return ele->charge();
-  }
-  if ( (*aParticleLink)->type() == xAOD::Type::Photon ) {
-    return 0.0;
-  }
-  if ( (*aParticleLink)->type() == xAOD::Type::Muon ) {
-    const xAOD::Muon* muon = static_cast<const xAOD::Muon*>(*aParticleLink);
-    return muon->charge();
-  }
-  if ( (*aParticleLink)->type() == xAOD::Type::Tau ) {
-    const xAOD::TauJet* tau = static_cast<const xAOD::TauJet*>(*aParticleLink);
-    return tau->charge();
-  }
-  if ( (*aParticleLink)->type() == xAOD::Type::Jet ) {
-    // jets don't have a charge (yet?)
-    return 0.0;
-  }
-  if ( (*aParticleLink)->type() == xAOD::Type::TrackParticle ) {
-    const xAOD::TrackParticle* trk = static_cast<const xAOD::TrackParticle*>(*aParticleLink);
-    return trk->charge();
-  }
-  if ( (*aParticleLink)->type() == xAOD::Type::NeutralParticle ) {
-    return 0.0;
-  }
-  // if ( (*aParticleLink)->type() == xAOD::Type::TruthParticle ) {
-  //   const xAOD::TruthParticle* tp = static_cast<const xAOD::TruthParticle*>(*aParticleLink);
-  //   return static_cast<float>(tp->charge());
-  // }
-  if ( (*aParticleLink)->type() == xAOD::Type::ParticleFlow ) {
-    const xAOD::PFO* pfo = static_cast<const xAOD::PFO*>(*aParticleLink);
-    return pfo->charge();
-  }
-  // If we couldn't determine the type, do this:
-  hasCharge = false;
-  return 0.0;
-}
-
-
-
-
-//=============================================================================
-// Check if the composite particle at hand was already found before
-//=============================================================================
-bool ParticleCombinerTool::compositeParticleAlreadyFound( xAOD::CompositeParticleContainer* compContainer,
-                                                          xAOD::CompositeParticle* compPart ) const
-{
-  // default return
-  bool foundIdentical = false;
-
-  // Count the number of constituents of the test particle
-  std::size_t nConstituentsTest = compPart->nParts();
-
-  // Get the first input container and loop over it
-  for ( const xAOD::CompositeParticle* contCompPart : *compContainer ) {
-    // Check if an identical composite particle is already found
-    if ( !foundIdentical ) {
-      // Count the number of constituents of the reference particle
-      std::size_t nConstituentsReference = contCompPart->nParts();
-
-      // Check that both have the same number of constituents
-      if ( nConstituentsTest==nConstituentsReference ) {
-        // Loop over all constituents of the composite particle to be tested
-        bool allConstituentsSame = true;
-        for ( const xAOD::IParticleLink& constitLink : compPart->partLinks() ) {
-          if ( allConstituentsSame && contCompPart->contains(constitLink) ) {
-            allConstituentsSame = true;
-          }
-          else {
-            allConstituentsSame = false;
-          }
-        } // End: loop over constituents
-
-        // Now, propagete the decission
-        if ( allConstituentsSame ) {
-          foundIdentical = true;
-        }
-        else {
-          foundIdentical = false;
-        }
-      } // End: if ( nConstituentsTest==nConstituentsReference )
-      else {
-        foundIdentical = false;
-      } // End: if/else ( nConstituentsTest==nConstituentsReference )
-    } // End: if ( !foundIdentical )
-  } // End: loop over container
-
-  // Output message
-  ATH_MSG_VERBOSE ( "Checking if this composite particle was already found before..."
-                    << " foundIdentical=" << foundIdentical );
-
-  return foundIdentical;
-}
-
-
-// The test if two particles are equal.
-// One would need a barcode to do this proper
-bool ParticleCombinerTool::isEqual( const xAOD::IParticle* part1,
-                                    const xAOD::IParticle* part2 ) const
-{
-  // TODO: Add special implementation for TruthParticle, i.e., check barcode
-
-  // Since we don't have a barcode here, we have to rely on pointer equality
-  if ( part1  &&  part1 == part2 ) {
-    return true;
-  }
-  else {
-    return false;
-  }
-  // This would be better:
-  // part1->hasSameAthenaBarCodeExceptVersion(*part2);
-}
-
-
-
-//=============================================================================
-// Check that two particles are not the same or, if they are
-// composite particles, that they don't share the same constitutents
-//=============================================================================
-bool ParticleCombinerTool::shareSameConstituents( const xAOD::IParticle* part1,
-                                                    const xAOD::IParticle* part2 ) const
-{
-  const xAOD::CompositeParticle* compPart1 =
-    dynamic_cast<const xAOD::CompositeParticle*> (part1) ;
-  const xAOD::CompositeParticle* compPart2 =
-    dynamic_cast<const xAOD::CompositeParticle*> (part2) ;
-  ATH_MSG_VERBOSE("in shareSameConstituents('IParticle','IParticle')");
-
-  // Neither of the two is a composite particle
-  if ( !compPart1 && !compPart2 ) {
-    return this->isEqual( part1, part2 );
-  }
-  // One of them is a composite
-  else if ( compPart1 && !compPart2 ) {
-    return this->shareSameConstituents( part2, compPart1 );
-  }
-  else if ( !compPart1 && compPart2 ) {
-    return this->shareSameConstituents( part1, compPart2 );
-  }
-  // Both are composite candidates
-  // AK: By this time only one options remains: That both of them are composite
-  //     particles. So it's not necessary to do any more checks. This silences
-  //     a Covery warning.
-  else {
-    return this->shareSameConstituents( compPart1, compPart2 );
-  }
-}
-
-
-
-//=============================================================================
-// Check that two particles are not the same or, if they are
-// composite particles, that they don't share the same constitutents
-// -------------------------- HELPER ---------------------
-//=============================================================================
-bool ParticleCombinerTool::shareSameConstituents( const xAOD::IParticle* part1,
-                                                  const xAOD::CompositeParticle* compPart2 ) const
-{
-  // Default return
-  bool isConstituent = false;
-  ATH_MSG_VERBOSE("in shareSameConstituents('IParticle','CompositeParticle')");
-  
-  // Loop over all constituents of the composite particle to be tested
-  const std::size_t nConstit = compPart2->nParts();
-  for( std::size_t i=0; i<nConstit; ++i ) {
-    const xAOD::IParticle* part2 = compPart2->part(i);
-
-    // Check if this constituent itself is a composite particle
-    const xAOD::CompositeParticle* constitCP =
-      dynamic_cast<const xAOD::CompositeParticle*> (part2) ;
-
-    if ( !constitCP ) {
-      isConstituent = this->isEqual( part1, part2 );
-    }
-    else {
-      isConstituent = shareSameConstituents( part1, constitCP );
-    }
-    if ( isConstituent ) {
-      return true;
-    }
-  } // End: loop over constituents
-
-  return isConstituent;
-}
-
-
-
-//=============================================================================
-// Check that two particles are not the same or, if they are
-// composite particles, that they don't share the same constitutents
-// -------------------------- HELPER ---------------------
-//=============================================================================
-bool ParticleCombinerTool::shareSameConstituents( const xAOD::CompositeParticle* compPart1,
-                                                  const xAOD::CompositeParticle* compPart2 ) const
-{
-  // Default return
-  bool isConstituent = false;
-  ATH_MSG_VERBOSE("in shareSameConstituents('CompositeParticle','CompositeParticle')");
-
-  // Loop over all constituents of the composite particle to be tested
-  const std::size_t nConstit1 = compPart1->nParts();
-  const std::size_t nConstit2 = compPart2->nParts();
-  for( std::size_t i=0; i<nConstit1; ++i ) {
-    const xAOD::IParticle* part1 = compPart1->part(i);
-    ATH_MSG_VERBOSE("looking at compositeParticle1 constituent " << i << "/" << nConstit1);
-    
-    // Check if this constituent itself is a composite particle
-    const xAOD::CompositeParticle* constitCP1 =
-      dynamic_cast<const xAOD::CompositeParticle*> (part1) ;
-
-    for( std::size_t j=0; j<nConstit2; ++j ) {
-      ATH_MSG_VERBOSE("looking at compositeParticle2 constituent " << j << "/" << nConstit2);
-      const xAOD::IParticle* part2 = compPart2->part(j);
-
-      // Check if this constituent itself is a composite particle
-      const xAOD::CompositeParticle* constitCP2 =
-        dynamic_cast<const xAOD::CompositeParticle*> (part2) ;
-
-      if ( !constitCP1 && !constitCP2 ) {
-        isConstituent = this->isEqual( part1, part2 );
-      }
-      if ( !constitCP1 && constitCP2 ) {
-        isConstituent = this->shareSameConstituents( part1, constitCP2 );
-      }
-      if ( constitCP1 && !constitCP2 ) {
-        isConstituent = this->shareSameConstituents( part2, constitCP1 );
-      }
-      if ( constitCP1 && constitCP2 ) {
-        isConstituent = this->shareSameConstituents( constitCP1, constitCP2 );
-      }
-      if ( isConstituent ) {
-        return true;
-      }
-    } // End: loop over constituents 2
-  } // End: loop over constituents 1
-
-  return isConstituent;
-}
-
-
-
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.h b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.h
deleted file mode 100644
index 7f57a6101af..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-#ifndef EVENTUTILS_PARTICLECOMBINERTOOL_H
-#define EVENTUTILS_PARTICLECOMBINERTOOL_H
-
-//============================================================================
-// Name: ParticleCombinerTool.h
-//
-/**
-   @class ParticleCombinerTool
-
-   @author Karsten Koeneke <karsten.koeneke@cernSPAMNOT.ch>
-
-   @date July 2014
-
-   @brief Combine particles to composite particles
-
-   Class to combine two or more particles from a given list of
-   input containers. All combinations will be tried and the unique ones will
-   be written to StoreGate.
-*/
-//=============================================================================
-
-
-// STL includes
-#include <string>
-#include <vector>
-
-// Athena includes
-#include "Gaudi/Property.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-
-// CompositeParticle
-#include "xAODParticleEvent/CompositeParticleContainerFwd.h"
-#include "xAODParticleEvent/CompositeParticleFwd.h"
-#include "xAODParticleEvent/IParticleLinkContainer.h"
-#include "xAODParticleEvent/IParticleLink.h"
-#include "xAODMissingET/MissingET.h"
-
-// MC Truth
-// #include "GeneratorObjects/McEventCollection.h"
-
-
-class ParticleCombinerTool : public AthAlgTool,
-                             virtual public DerivationFramework::IAugmentationTool
-{
-public:
-
-  /** Default constructor */
-  ParticleCombinerTool(const std::string& type,
-                       const std::string& name,
-                       const IInterface* parent);
-
-  /** Default destructor */
-  virtual ~ParticleCombinerTool() ;
-
-
-public:
-  /** Gaudi Service Interface method implementations - initialize */
-  virtual StatusCode initialize() override;
-
-  /** Gaudi Service Interface method implementations - finalize */
-  virtual StatusCode finalize() override;
-
-  /// Implement the method from the IAugmentationTool interface
-  virtual StatusCode addBranches() const final override;
-
-
-
-
-private:
-  /// The test if two particles are equal.
-  /// One would need a barcode, i.e., particle-unique identifier, to do this proper
-  bool isEqual( const xAOD::IParticle* part1, const xAOD::IParticle* part2 ) const;
-
-  /** Build the composite candidates */
-  StatusCode buildComposite( xAOD::CompositeParticleContainer* outContainer,
-                             xAOD::IParticleLinkContainer& anIPartLinkList,
-                             const xAOD::MissingET* metObject ) const;
-
-  /** Check if the composite particle at hand was already found before */
-  bool compositeParticleAlreadyFound( xAOD::CompositeParticleContainer* compContainer,
-                                      xAOD::CompositeParticle* compPart ) const;
-
-  /** Check that two particles are not the same or, if they are
-      composite particles, that they don't share the same constitutents */
-  bool shareSameConstituents( const xAOD::IParticle* part1,
-                              const xAOD::IParticle* part2 ) const;
-
-  /** Check that two particles are not the same or, if they are
-      composite particles, that they don't share the same constitutents */
-  bool shareSameConstituents( const xAOD::IParticle* part1,
-                              const xAOD::CompositeParticle* compPart2 ) const;
-
-  /** Check that two particles are not the same or, if they are
-      composite particles, that they don't share the same constitutents */
-  bool shareSameConstituents( const xAOD::CompositeParticle* compPart1,
-                              const xAOD::CompositeParticle* compPart2 ) const;
-
-  /// Try to get the charge for all types
-  float getCharge( const xAOD::IParticleLink& aParticleLink, bool& hasCharge ) const;
-
-  /** Do the MC Truth selections */
-  // bool mcTruthSelections( const xAOD::CompositeParticle* compPart );
-
-
-
-private:
-  //------------------------------------------------------
-  // Tools and Containers
-  //------------------------------------------------------
-
-  /// List of input collection names
-  StringArrayProperty m_inCollKeyList;
-
-  /// The name of the missing ET object, e.g., "Final"
-  StringProperty m_metName;
-
-  /// Output collection name (the composite particles)
-  StringProperty m_outCollKey;
-
-  /// Decide if we want to write a fully-split AuxContainer such that we can remove any variables
-  BooleanProperty m_writeSplitAux;
-
-  /// The PDG_ID of the CompositeParticle
-  IntegerProperty m_pdgId;
-
-  /// If true: sort the constituents in decending pt order
-  BooleanProperty m_sortConstit;
-
-  // /** MCEventCollection name */
-  // StringProperty m_mcEventCollKey;
-  //
-  // /** MCEventCollection */
-  // const McEventCollection* m_mcEventColl;
-
-
-
-private:
-  /** Internal event counter */
-  mutable unsigned long m_nEventsProcessed;
-
-
-private:
-  //------------------------------------------------------
-  // Internal variables
-  //------------------------------------------------------
-  /** Create a vector that will hold all the INav4MomLinks for one CompositeParticle */
-  mutable xAOD::IParticleLinkContainer m_anIPartLinkList;
-
-
-  /** Create a vector of LinkContainers and a map of their names */
-  mutable std::vector< const xAOD::IParticleLinkContainer* > m_inputLinkContainerList;
-
-  /** create a vector that will contain pointers to the
-   *  xAOD::IParticleLinkContainers that need to be deleted manually.
-   *  This is because these containers never get registered to StoreGate and
-   *  thus, the ownership resides inside this class instance. */
-  mutable std::vector< const xAOD::IParticleLinkContainer* > m_inputLinkContainerListToDelete;
-
-  /** A map to store the name associated to each input link container object */
-  mutable std::map< const xAOD::IParticleLinkContainer*, const std::string* > m_inputLinkContainerNames;
-
-  /** A map to store the input container that are already used.
-   *  use a map to determine if a given input container
-   *  has already been seen, and simply point to the
-   *  link container corresponding to  that already-used
-   *  input container   */
-  mutable std::map< const xAOD::IParticleContainer*, const xAOD::IParticleLinkContainer* > m_alreadyUsedInputContainers;
-
-
-  /** Vector of the labels/keys of all input containers (all converted to link containers) */
-  mutable std::vector<std::string> m_containerLabels;
-
-  /** A map to store the size of each input container */
-  mutable std::map<std::string, int> m_containerMaxN;
-
-  /** A map to store the container that are already used */
-  mutable std::map< const xAOD::IParticleLinkContainer*, std::string > m_alreadyUsedContainers;
-
-
-}; // End class ParticleCombinerTool
-
-
-#endif // EVENTUTILS_PARTICLECOMBINERTOOL_H
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
deleted file mode 100644
index 5c8aa14ebbc..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
+++ /dev/null
@@ -1,162 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// ParticleSortingAlg.cxx
-// Implementation file for class ParticleSortingAlg
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-
-// EventUtils includes
-#include "ParticleSortingAlg.h"
-
-// STL includes
-
-// FrameWork includes
-#include "Gaudi/Property.h"
-#include "GaudiKernel/IJobOptionsSvc.h"
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-
-
-
-///////////////////////////////////////////////////////////////////
-// Public methods:
-///////////////////////////////////////////////////////////////////
-
-// Constructors
-////////////////
-ParticleSortingAlg::ParticleSortingAlg( const std::string& name,
-                                        ISvcLocator* pSvcLocator ) :
-  ::AthAlgorithm( name, pSvcLocator ),
-  m_jos("JobOptionsSvc", name),
-  m_tool("ParticleSortingTool/ParticleSortingTool", this),
-  m_inCollKey(""),
-  m_setInCollKey(false),
-  m_outCollKey(""),
-  m_setOutCollKey(false),
-  m_sortVar("pt"),
-  m_setSortVar(false),
-  m_sortDescending(true),
-  m_setSortDescending(false),
-  m_nEventsProcessed(0)
-{
-  declareProperty("JobOptionsSvc",   m_jos, "The JobOptionService instance.");
-
-  declareProperty("SortingTool",        m_tool, "The private ParticleSortingTool" );
-
-  declareProperty("InputContainer",  m_inCollKey="",   "Input container name" );
-  m_inCollKey.declareUpdateHandler( &ParticleSortingAlg::setupInputContainer, this );
-
-  declareProperty("OutputContainer", m_outCollKey="",
-                  "The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects" );
-  m_outCollKey.declareUpdateHandler( &ParticleSortingAlg::setupOutputContainer, this );
-
-  declareProperty("SortVariable",    m_sortVar="pt",
-                  "Define by what parameter to sort (default: 'pt'; allowed: 'pt', 'eta', 'phi', 'm', 'e', 'rapidity')" );
-  m_sortVar.declareUpdateHandler( &ParticleSortingAlg::setupSortVar, this );
-
-  declareProperty("SortDescending",   m_sortDescending=true,
-                  "Define if the container should be sorted in a descending order (default=true)" );
-  m_sortDescending.declareUpdateHandler( &ParticleSortingAlg::setupSortDescending, this );
-}
-
-
-
-// Destructor
-///////////////
-ParticleSortingAlg::~ParticleSortingAlg()
-{}
-
-
-
-// Athena Algorithm's Hooks
-////////////////////////////
-StatusCode ParticleSortingAlg::initialize()
-{
-  ATH_MSG_DEBUG ("Initializing " << name() << "...");
-
-  // Print out the used configuration
-  ATH_MSG_DEBUG ( " using = " << m_jos );
-  ATH_MSG_DEBUG ( " using = " << m_tool );
-  ATH_MSG_DEBUG ( " using = " << m_inCollKey );
-  ATH_MSG_DEBUG ( " using = " << m_outCollKey );
-  ATH_MSG_DEBUG ( " using = " << m_sortVar );
-  ATH_MSG_DEBUG ( " using = " << m_sortDescending );
-
-
-  // Initialize the counters to zero
-  m_nEventsProcessed = 0 ;
-
-
-  // Get the JobOptionService
-  // We will use this to set the properties of our private skimming tool
-  // from the properties of this algorithm.
-  ATH_MSG_VERBOSE( "Getting the JobOptionService");
-  ATH_CHECK( m_jos.retrieve() );
-
-  // Get the full name of the private skimTool
-  ATH_MSG_VERBOSE( "Getting the full name of the tool");
-  const std::string& fullToolName = this->name() + "." + m_tool.name();
-  ATH_MSG_DEBUG( "Got the full name of the tool: " << fullToolName );
-
-  // Now, set all properties of the private skimTool that were acutally configured
-  if (m_setInCollKey) {
-    ATH_MSG_DEBUG( "Setting property" << m_inCollKey
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_inCollKey) );
-  }
-  if (m_setOutCollKey) {
-    ATH_MSG_DEBUG( "Setting property" << m_outCollKey
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_outCollKey) );
-  }
-  if (m_setSortVar) {
-    ATH_MSG_DEBUG( "Setting property" << m_sortVar
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_sortVar) );
-  }
-  if (m_setSortDescending) {
-    ATH_MSG_DEBUG( "Setting property" << m_sortDescending
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_sortDescending) );
-  }
-  ATH_MSG_DEBUG( "Done setting properties of the tool");
-
-  // Get the skimming tool
-  ATH_CHECK( m_tool.retrieve() );
-
-  ATH_MSG_DEBUG ( "==> done with initialize " << name() << "..." );
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-StatusCode ParticleSortingAlg::finalize()
-{
-  ATH_MSG_DEBUG ("Finalizing " << name() << "...");
-
-  // Release all tools and services
-  ATH_CHECK( m_jos.release() );
-  ATH_CHECK( m_tool.release() );
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-StatusCode ParticleSortingAlg::execute()
-{
-  // Increase the event counter
-  ++m_nEventsProcessed;
-
-  // Simple status message at the beginning of each event execute,
-  ATH_MSG_DEBUG ( "==> execute " << name() << " on " << m_nEventsProcessed << ". event..." );
-
-  // Call the tool
-  ATH_CHECK( m_tool->addBranches() );
-
-  return StatusCode::SUCCESS;
-}
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
deleted file mode 100644
index a9ec50eccda..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
+++ /dev/null
@@ -1,153 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// ParticleSortingAlg.h
-// Header file for class ParticleSortingAlg
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-#ifndef EVENTUTILS_PARTICLESORTINGALG_H
-#define EVENTUTILS_PARTICLESORTINGALG_H 1
-
-// STL includes
-#include <string>
-
-// FrameWork includes
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "AthenaBaseComps/AthAlgorithm.h"
-
-
-// forward declarations
-class IJobOptionsSvc;
-namespace DerivationFramework {
-  class IAugmentationTool;
-}
-
-
-
-
-class ParticleSortingAlg
-  : public ::AthAlgorithm
-{
-
-  ///////////////////////////////////////////////////////////////////
-  // Public methods:
-  ///////////////////////////////////////////////////////////////////
- public:
-
-  // Copy constructor:
-
-  /// Constructor with parameters:
-  ParticleSortingAlg( const std::string& name, ISvcLocator* pSvcLocator );
-
-  /// Destructor:
-  virtual ~ParticleSortingAlg();
-
-  /// Athena algorithm's initalize hook
-  virtual StatusCode  initialize();
-
-  /// Athena algorithm's execute hook
-  virtual StatusCode  execute();
-
-  /// Athena algorithm's finalize hook
-  virtual StatusCode  finalize();
-
-
-private:
-  // The update handlers
-
-  /// This internal method will realize if a user sets the 'InputContainer' property
-  void setupInputContainer( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'OutputContainer' property
-  void setupOutputContainer( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'SortVariable' property
-  void setupSortVar( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'SortDeceding' property
-  void setupSortDescending( Gaudi::Details::PropertyBase& /*prop*/ );
-
-
-
-  ///////////////////////////////////////////////////////////////////
-  // Private data:
-  ///////////////////////////////////////////////////////////////////
- private:
-  /// The job options service (will be used to forward this algs properties to
-  /// the private tool)
-  ServiceHandle<IJobOptionsSvc> m_jos;
-
-  /// The ToolHandle to the private ParticleSortingTool
-  ToolHandle<DerivationFramework::IAugmentationTool> m_tool;
-
-  /// Input container name
-  StringProperty m_inCollKey;
-
-  /// This boolean is true if the user sets the 'InputContainer' property
-  bool m_setInCollKey;
-
-
-  /// The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects
-  StringProperty m_outCollKey;
-
-  /// This boolean is true if the user sets the 'OutputContainer' property
-  bool m_setOutCollKey;
-
-
-  /// Define by what parameter to sort (default: 'pt')
-  StringProperty m_sortVar;
-
-  /// This boolean is true if the user sets the 'SortVariable' property
-  bool m_setSortVar;
-
-
-  /// Define if the container should be sorted in a descending order (default=true)
-  BooleanProperty m_sortDescending;
-
-  /// This boolean is true if the user sets the 'SortDescending' property
-  bool m_setSortDescending;
-
-
-  /// Internal event counter
-  unsigned long m_nEventsProcessed;
-
-};
-
-
-
-///////////////////////////////////////////////////////////////////
-// Inline methods:
-///////////////////////////////////////////////////////////////////
-
-/// This internal method will realize if a user sets the 'InputContainer' property
-inline void ParticleSortingAlg::setupInputContainer( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setInCollKey = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'OutputContainer' property
-inline void ParticleSortingAlg::setupOutputContainer( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setOutCollKey = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'SortVariable' property
-inline void ParticleSortingAlg::setupSortVar( Gaudi::Details::PropertyBase& /*prop*/ )
-{
-  m_setSortVar = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'SortDeceding' property
-inline void ParticleSortingAlg::setupSortDescending( Gaudi::Details::PropertyBase& /*prop*/ )
-{
-  m_setSortDescending = true;
-  return;
-}
-
-
-#endif //> !EVENTUTILS_PARTICLESORTINGALG_H
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx
deleted file mode 100644
index 66e180f0977..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx
+++ /dev/null
@@ -1,327 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// ParticleSortingTool.cxx
-// Implementation file for class ParticleSortingTool
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-
-
-// EventUtils includes
-#include "ParticleSortingTool.h"
-
-// STL includes
-#include <vector>
-#include <string>
-
-// FrameWork includes
-
-// EDM includes
-#include "xAODBase/IParticle.h"
-#include "xAODBase/IParticleContainer.h"
-#include "xAODMuon/MuonContainer.h"
-#include "xAODJet/JetContainer.h"
-#include "xAODEgamma/ElectronContainer.h"
-#include "xAODEgamma/PhotonContainer.h"
-#include "xAODTau/TauJetContainer.h"
-#include "xAODPFlow/PFOContainer.h"
-#include "xAODTracking/NeutralParticleContainer.h"
-#include "xAODTracking/TrackParticleContainer.h"
-#include "xAODTruth/TruthParticleContainer.h"
-#include "xAODParticleEvent/CompositeParticleContainer.h"
-#include "xAODParticleEvent/ParticleContainer.h"
-#include "xAODCaloEvent/CaloClusterContainer.h"
-#include "AthContainers/ConstDataVector.h"
-
-
-
-// Constructors
-////////////////
-ParticleSortingTool::ParticleSortingTool( const std::string& type,
-                                          const std::string& name,
-                                          const IInterface* parent ) :
-  ::AthAlgTool  ( type, name, parent ),
-  m_inCollKey(""),
-  m_outCollKey(""),
-  m_sortVar("pt"),
-  m_sortDescending(true),
-  m_contID(0),
-  m_sortID(0),
-  m_nEventsProcessed(0)
-{
-  declareInterface< DerivationFramework::IAugmentationTool >(this);
-
-  declareProperty("InputContainer",  m_inCollKey="",   "Input container name" );
-
-  declareProperty("OutputContainer", m_outCollKey="",
-                  "The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects" );
-
-  declareProperty("SortVariable",    m_sortVar="pt",
-                  "Define by what parameter to sort (default: 'pt'; allowed: 'pt', 'eta', 'phi', 'm', 'e', 'rapidity')" );
-
-  declareProperty("SortDescending",   m_sortDescending=true,
-                  "Define if the container should be sorted in a descending order (default=true)" );
-}
-
-
-// Destructor
-///////////////
-ParticleSortingTool::~ParticleSortingTool()
-{}
-
-
-
-// Athena algtool's Hooks
-////////////////////////////
-StatusCode ParticleSortingTool::initialize()
-{
-  ATH_MSG_DEBUG ("Initializing " << name() << "...");
-
-  // Print out the used configuration
-  ATH_MSG_DEBUG ( " using = " << m_inCollKey );
-  ATH_MSG_DEBUG ( " using = " << m_outCollKey );
-
-  // initialize the counters
-  m_contID           = 0;
-  m_sortID           = 0;
-  m_nEventsProcessed = 0;
-
-  // Figure out how to sort
-  if ( m_sortVar.value() == "pt" )            { m_sortID = 1; }
-  else if ( m_sortVar.value() == "eta" )      { m_sortID = 2; }
-  else if ( m_sortVar.value() == "phi" )      { m_sortID = 3; }
-  else if ( m_sortVar.value() == "m" )        { m_sortID = 4; }
-  else if ( m_sortVar.value() == "e" )        { m_sortID = 5; }
-  else if ( m_sortVar.value() == "rapidity" ) { m_sortID = 6; }
-  else {
-    ATH_MSG_INFO("Didn't find a valid value for SortVariable=" << m_sortVar.value() << "."
-                 << " Assuming it's an auxdata member");
-    m_sortID = 7;
-  }
-  if ( m_sortDescending.value() ) { m_sortID *= -1; }
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-StatusCode ParticleSortingTool::finalize()
-{
-  ATH_MSG_DEBUG ("Finalizing " << name() << "...");
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-// Declare a short pre-processor macro to deal with the different container types
-#define COPY_AND_SORT_CONTAINER( CONTAINERTYPE )                                       \
-else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) {               \
-  ATH_MSG_DEBUG("Trying to copy, sort, and record container of type "#CONTAINERTYPE ); \
-  const CONTAINERTYPE* inCont;                                                         \
-  ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) );                    \
-  CONTAINERTYPE* outCont = new CONTAINERTYPE( SG::VIEW_ELEMENTS );                     \
-  *outCont = *inCont;                                                                  \
-  ATH_CHECK( evtStore()->record ( outCont, m_outCollKey.value() ) );                   \
-  ATH_CHECK( this->doSort(outCont) );                                                  \
-}
-
-
-// Declare a short pre-processor macro to deal with the different container types
-#define OVERWRITE_AND_SORT_CONTAINER( CONTAINERTYPE )                                                \
-else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) {                             \
-  ATH_MSG_DEBUG("Trying to copy, sort, and overwrite container of type "#CONTAINERTYPE );            \
-  const CONTAINERTYPE* inCont;                                                                       \
-  ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) );                                  \
-  ConstDataVector<CONTAINERTYPE>* outCont = new ConstDataVector<CONTAINERTYPE>( SG::VIEW_ELEMENTS ); \
-  for ( const CONTAINERTYPE::base_value_type* inPart : *inCont ){                                    \
-    outCont->push_back(inPart);                                                                      \
-  }                                                                                                  \
-  ATH_CHECK( evtStore()->overwrite( outCont, m_inCollKey.value() ) );                                \
-  ATH_CHECK( this->doSortConst<CONTAINERTYPE>(outCont) );                                            \
-}
-
-
-
-StatusCode ParticleSortingTool::addBranches() const
-{
-  // Increase the event counter
-  ++m_nEventsProcessed;
-
-  // Simple status message at the beginning of each event execute,
-  ATH_MSG_DEBUG ( "==> addBranches " << name() << " on " << m_nEventsProcessed << ". event..." );
-
-  if ( m_outCollKey.value().empty() ) {
-    // Try to get the input container as non-const
-    ATH_MSG_DEBUG("Got an empty 'OutputCollection' property. "
-                  << "Trying to retrieve a non-const version of the 'InputContainer'...");
-    xAOD::IParticleContainer* inCont = evtStore()->tryRetrieve<xAOD::IParticleContainer>( m_inCollKey.value() );
-    if (inCont){ ATH_CHECK( this->doSort(inCont) ); }
-    else {
-      ATH_MSG_DEBUG("We couldn't retrieve a non-const version of the input container... try const.");
-      const xAOD::IParticleContainer* inCont2 = nullptr;
-      ATH_CHECK( evtStore()->retrieve( inCont2, m_inCollKey.value()) );
-      // Now, do the copy and sorting and overwriting of all known container types
-      if (false) {
-      }
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::MuonContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::ElectronContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::PhotonContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::TauJetContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::JetContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::PFOContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::NeutralParticleContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::TrackParticleContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::TruthParticleContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::CompositeParticleContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::ParticleContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::CaloClusterContainer)
-      else {
-        ATH_MSG_ERROR("Couln't find the provided intput container in store gate for later overwriting");
-        return StatusCode::FAILURE;
-      }
-    }
-  }
-  else {
-    ATH_MSG_DEBUG("Got a non-empty 'OutputCollection' property. "
-                  << "Trying to retrieve a const version of the 'InputContainer'...");
-
-    // Now, do the copy and sorting of all known container types
-    if (false) {
-    }
-    COPY_AND_SORT_CONTAINER(xAOD::MuonContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::ElectronContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::PhotonContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::TauJetContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::JetContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::PFOContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::NeutralParticleContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::TrackParticleContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::TruthParticleContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::CompositeParticleContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::ParticleContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::CaloClusterContainer)
-    else {
-      ATH_MSG_ERROR("Couln't find the provided intput container in store gate");
-      return StatusCode::FAILURE;
-    }
-
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-StatusCode ParticleSortingTool::doSort( xAOD::IParticleContainer* cont ) const
-{
-  if ( !cont ) {
-    ATH_MSG_ERROR("No container to be sorted");
-    return StatusCode::FAILURE;
-  }
-  // Actually do the sorting, using a C++11 lambda function construct
-  // to be able to use the member function here
-  if ( abs(m_sortID) == 1 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->comparePt(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 2 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareEta(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 3 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->comparePhi(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 4 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareMass(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 5 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareEnergy(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 6 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareRapidity(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 7 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareAuxData(a,b);
-                } );
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-
-bool ParticleSortingTool::comparePt( const xAOD::IParticle* partA,
-                                     const xAOD::IParticle* partB ) const
-{
-  const double a = partA->pt();
-  const double b = partB->pt();
-  return this->compareDouble(a,b);
-}
-
-
-bool ParticleSortingTool::compareEta( const xAOD::IParticle* partA,
-                                      const xAOD::IParticle* partB ) const
-{
-  const double a = partA->eta();
-  const double b = partB->eta();
-  return this->compareDouble(a,b);
-}
-
-
-bool ParticleSortingTool::comparePhi( const xAOD::IParticle* partA,
-                                      const xAOD::IParticle* partB ) const
-{
-  const double a = partA->phi();
-  const double b = partB->phi();
-  return this->compareDouble(a,b);
-}
-
-
-bool ParticleSortingTool::compareMass( const xAOD::IParticle* partA,
-                                       const xAOD::IParticle* partB ) const
-{
-  const double a = partA->m();
-  const double b = partB->m();
-  return this->compareDouble(a,b);
-}
-
-
-bool ParticleSortingTool::compareEnergy( const xAOD::IParticle* partA,
-                                         const xAOD::IParticle* partB ) const
-{
-  const double a = partA->e();
-  const double b = partB->e();
-  return this->compareDouble(a,b);
-}
-
-
-bool ParticleSortingTool::compareRapidity( const xAOD::IParticle* partA,
-                                           const xAOD::IParticle* partB ) const
-{
-  const double a = partA->rapidity();
-  const double b = partB->rapidity();
-  return this->compareDouble(a,b);
-}
-
-bool ParticleSortingTool::compareAuxData( const xAOD::IParticle* partA,
-                                       const xAOD::IParticle* partB ) const
-{
-  const double a = partA->auxdata<float>( this->m_sortVar.value() );
-  const double b = partB->auxdata<float>( this->m_sortVar.value() );
-  return this->compareDouble(a,b);
-}
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h
deleted file mode 100644
index 8700fabf0ce..00000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h
+++ /dev/null
@@ -1,184 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// ParticleSortingTool.h
-// Header file for class ParticleSortingTool
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-#ifndef EVENTUTILS_PARTICLESORTINGTOOL_H
-#define EVENTUTILS_PARTICLESORTINGTOOL_H 1
-
-// STL includes
-#include <vector>
-#include <string>
-
-// FrameWork includes
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-#include "CxxUtils/fpcompare.h"
-
-// EDM inlcudes
-#include "xAODBase/IParticle.h"
-#include "xAODBase/IParticleContainer.h"
-#include "AthContainers/ConstDataVector.h"
-
-
-
-class ParticleSortingTool
-  : virtual public ::DerivationFramework::IAugmentationTool,
-            public ::AthAlgTool
-{
-
-  ///////////////////////////////////////////////////////////////////
-  // Public methods:
-  ///////////////////////////////////////////////////////////////////
-public:
-
-  // Copy constructor:
-
-  /// Constructor with parameters:
-  ParticleSortingTool( const std::string& type,
-                       const std::string& name,
-                       const IInterface* parent );
-
-  /// Destructor:
-  virtual ~ParticleSortingTool();
-
-  /// Athena algtool's initialize
-  virtual StatusCode  initialize() override;
-
-  /// Athena algtool's finalize
-  virtual StatusCode  finalize() override;
-
-
-  /// Implement the method from the ISkimmingTool interface
-  virtual StatusCode addBranches() const final override;
-
-
-
-// Private methods
-private:
-
-  /// Helper method that implements the call to the right sort function
-  StatusCode doSort( xAOD::IParticleContainer* cont ) const;
-
-  /// Helper method to sort a ConstDataVector
-  template<class CONTAINERTYPE>
-  StatusCode doSortConst( ConstDataVector<CONTAINERTYPE>* cont ) const;
-
-  /// The method to compare the particle's pt
-  bool comparePt( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare the particle's eta
-  bool compareEta( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare the particle's phi
-  bool comparePhi( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare the particle's mass
-  bool compareMass( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare the particle's energy
-  bool compareEnergy( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare the particle's rapidity
-  bool compareRapidity( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare an auxdata member of the particle
-  bool compareAuxData( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// Method to compare two doubles
-  inline bool compareDouble( double a, double b ) const;
-
-
-  ///////////////////////////////////////////////////////////////////
-  // Private data:
-  ///////////////////////////////////////////////////////////////////
-private:
-
-  /// Input container name
-  StringProperty m_inCollKey;
-
-  /// The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects
-  StringProperty m_outCollKey;
-
-  /// Define by what parameter to sort (default: 'pt')
-  StringProperty m_sortVar;
-
-  /// Define if the container should be sorted in a descending order (default=true)
-  BooleanProperty m_sortDescending;
-
-
-  /// Internal container type identifier
-  mutable unsigned int m_contID;
-
-  /// Internal identifier for the type of sorting
-  mutable int m_sortID;
-
-  /// Internal event counter
-  mutable unsigned long m_nEventsProcessed;
-
-};
-
-
-inline bool ParticleSortingTool::compareDouble( double a, double b ) const
-{
-  if ( m_sortID < 0 ) { return CxxUtils::fpcompare::greater(a,b); }
-  else { return CxxUtils::fpcompare::less(a,b); }
-}
-
-
-template<class CONTAINERTYPE>
-StatusCode ParticleSortingTool::doSortConst( ConstDataVector<CONTAINERTYPE>* cont ) const
-{
-  if ( !cont ) {
-    ATH_MSG_ERROR("No ConstDataVector to be sorted");
-    return StatusCode::FAILURE;
-  }
-  // Actually do the sorting, using a C++11 lambda function construct
-  // to be able to use the member function here
-  if ( abs(m_sortID) == 1 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->comparePt(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 2 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareEta(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 3 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->comparePhi(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 4 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareMass(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 5 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareEnergy(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 6 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareRapidity(a,b);
-                } );
-  }
-  else if ( abs(m_sortID) == 7 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareAuxData(a,b);
-                } );
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-#endif //> !EVENTUTILS_PARTICLESORTINGTOOL_H
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx
index fc82b6c1fde..4a60ef060d8 100644
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx
@@ -1,28 +1,16 @@
-#include "../ParticleSortingTool.h"
-#include "../ParticleSortingAlg.h"
-#include "../AddVarTool.h"
-#include "../AddVarAlg.h"
 #include "../CutTool.h"
 #include "../CutAlg.h"
 #include "../ParticleSelectionTool.h"
 #include "../ParticleSelectionAlg.h"
-#include "../ParticleCombinerTool.h"
-#include "../ParticleCombinerAlg.h"
 #include "../EventQualityFilterAlg.h"
 #include "../ParticleRemoverAlg.h"
 #include "../TriggerSelectionAlg.h"
 #include "../EventDecisionAlg.h"
 
-DECLARE_COMPONENT( ParticleSortingTool )
-DECLARE_COMPONENT( ParticleSortingAlg )
-DECLARE_COMPONENT( AddVarTool )
-DECLARE_COMPONENT( AddVarAlg )
 DECLARE_COMPONENT( CutTool )
 DECLARE_COMPONENT( CutAlg )
 DECLARE_COMPONENT( ParticleSelectionTool )
 DECLARE_COMPONENT( ParticleSelectionAlg )
-DECLARE_COMPONENT( ParticleCombinerTool )
-DECLARE_COMPONENT( ParticleCombinerAlg )
 DECLARE_COMPONENT( EventQualityFilterAlg )
 DECLARE_COMPONENT( ParticleRemoverAlg )
 DECLARE_COMPONENT( TriggerSelectionAlg )
-- 
GitLab