diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/AltMuJetOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/AltMuJetOverlapTool.h
index ccda06622e3933203630d0f18ded78c1b543f619..b5e5a0e3fa0e2c3b4a91f2866d01193a0033ec05 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/AltMuJetOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/AltMuJetOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_ALTMUJETOVERLAPTOOL_H
 #define ASSOCIATIONUTILS_ALTMUJETOVERLAPTOOL_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/AssociationUtilsDict.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/AssociationUtilsDict.h
new file mode 100644
index 0000000000000000000000000000000000000000..3265ebe0a1a8f545e3310ede2b2bafe5a6336be0
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/AssociationUtilsDict.h
@@ -0,0 +1,33 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef ASSOCIATIONUTILSDICT_H
+#define ASSOCIATIONUTILSDICT_H
+
+#include "AssociationUtils/IOverlapTool.h"
+#include "AssociationUtils/IOverlapRemovalTool.h"
+#include "AssociationUtils/IObjectAssociator.h"
+#include "AssociationUtils/OverlapRemovalTool.h"
+#include "AssociationUtils/BaseOverlapTool.h"
+#include "AssociationUtils/DeltaROverlapTool.h"
+#include "AssociationUtils/EleEleOverlapTool.h"
+#include "AssociationUtils/EleJetOverlapTool.h"
+#include "AssociationUtils/EleMuSharedTrkOverlapTool.h"
+#include "AssociationUtils/MuJetOverlapTool.h"
+#include "AssociationUtils/MuPFJetOverlapTool.h"
+#include "AssociationUtils/AltMuJetOverlapTool.h"
+#include "AssociationUtils/TauLooseEleOverlapTool.h"
+#include "AssociationUtils/TauLooseMuOverlapTool.h"
+#include "AssociationUtils/TauJetOverlapTool.h"
+#include "AssociationUtils/TauAntiTauJetOverlapTool.h"
+#include "AssociationUtils/ObjLinkOverlapTool.h"
+#include "AssociationUtils/ToolBox.h"
+#include "AssociationUtils/BJetHelper.h"
+#include "AssociationUtils/DeltaRMatcher.h"
+#include "AssociationUtils/MuJetGhostDRMatcher.h"
+#include "AssociationUtils/OverlapDecorationHelper.h"
+#include "AssociationUtils/OverlapLinkHelper.h"
+#include "AssociationUtils/OverlapRemovalGenUseAlg.h"
+
+#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/BJetHelper.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/BJetHelper.h
index f888152f590f61da488b6106a0735f93b3b44289..fe649138fb20491d804d2de71b3eee7de5527871 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/BJetHelper.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/BJetHelper.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_BJETHELPER_H
 #define ASSOCIATIONUTILS_BJETHELPER_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/BaseOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/BaseOverlapTool.h
index 6e8c507772e4d3ff2d41fe7507d301f7f3638f63..0ba04bd504461ada7b6878ef61634c92b58eb352 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/BaseOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/BaseOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_BASEOVERLAPTOOL_H
 #define ASSOCIATIONUTILS_BASEOVERLAPTOOL_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/DeltaRMatcher.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/DeltaRMatcher.h
index 355ab3549b53827a26c6b9e12c998420ff4f4ac2..626f7b5db9a9dd7ebe908030b72db627e6630f03 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/DeltaRMatcher.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/DeltaRMatcher.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_DELTARMATCHER_H
 #define ASSOCIATIONUTILS_DELTARMATCHER_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/DeltaROverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/DeltaROverlapTool.h
index 8a8029556cf6b62f2f5b043f348bccd726a3d14f..c75222c90ce38e6385cde77e86f0156cfd7e3f22 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/DeltaROverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/DeltaROverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_OVERLAPTOOLDR_H
 #define ASSOCIATIONUTILS_OVERLAPTOOLDR_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleEleOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleEleOverlapTool.h
index 714f84640a14678c22278813d9182bd19ac5ef36..48d491997f00ede394526ac2c34552927e46e9f0 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleEleOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleEleOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_ELEELEOVERLAPTOOL_H
 #define ASSOCIATIONUTILS_ELEELEOVERLAPTOOL_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleJetOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleJetOverlapTool.h
index b1808b22b37dbf0a536fca0c6c3b770cd766f3da..e011b1fd70a912a650417359b2d92f1966e40c2d 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleJetOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleJetOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_ELEJETOVERLAPTOOL_H
 #define ASSOCIATIONUTILS_ELEJETOVERLAPTOOL_H
 
@@ -47,9 +48,10 @@ namespace ORUtils
       EleJetOverlapTool(const std::string& name);
 
       /// @brief Identify overlapping electrons and jets.
-      /// First, electrons are flagged for removal if they overlap with
-      /// non-b-labeled jets within the inner dR cone. Next, jets are flagged
-      /// for removal if they overlap with remaining electrons in the outer dR cone.
+      /// First, non-b-labeled jets are flagged for removal if they overlap
+      /// with electrons within the inner dR cone.
+      /// Next, electrons are flagged for removal if they overlap with the
+      /// remaining jets in the outer dR cone.
       virtual StatusCode
       findOverlaps(const xAOD::IParticleContainer& cont1,
                    const xAOD::IParticleContainer& cont2) const override;
@@ -73,6 +75,9 @@ namespace ORUtils
       /// Input jet decoration which labels a bjet
       std::string m_bJetLabel;
 
+      /// Max electron PT for b-tag aware OR
+      double m_maxElePtForBJetAwareOR;
+
       /// Toggle PT ratio criteria
       bool m_applyPtRatio;
       /// Minimum e/jet pt ratio to remove a jet
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleMuSharedTrkOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleMuSharedTrkOverlapTool.h
index 0345e7b2d4bacc0c29559fe709dc46e4cadfbf5d..e359ce6c5ebc6c5c5183d7076ceaa3ab0dbc99d3 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleMuSharedTrkOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/EleMuSharedTrkOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_SHAREDTRKOVERLAPTOOL_H
 #define ASSOCIATIONUTILS_SHAREDTRKOVERLAPTOOL_H
 
@@ -14,17 +15,24 @@
 // Local includes
 #include "AssociationUtils/IOverlapTool.h"
 #include "AssociationUtils/BaseOverlapTool.h"
+#include "AssociationUtils/DeltaRMatcher.h"
 
 namespace ORUtils
 {
 
   /// @class EleMuSharedTrkOverlapTool
   /// @brief Tool for removing overlaps between electrons and muons that
-  /// share a track.
+  /// share a track or are DR matched.
   ///
   /// I don't yet know if it's straightforward to generalize to any kind of
   /// particles.
   ///
+  /// The procedure works as follows.
+  ///   1. Remove muons if they share a track with an electron, they are
+  ///      calorimeter-tagged and removeCaloMuons is activated.
+  ///   2. Remove electrons if they share a track with a muon or if they
+  ///      are DR matched to a muon and useDRMatching is activated.
+  ///
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
   class EleMuSharedTrkOverlapTool : public virtual IOverlapTool,
@@ -64,10 +72,20 @@ namespace ORUtils
       /// Flag to remove calo-muons overlapping with electrons
       bool m_removeCaloMuons;
 
+      /// Flag to remove electrons in a dR cone of muons (default: false)
+      bool m_useDRMatching;
+      /// Maximum dR between electrons and muons if m_useDRMatching is used
+      float m_maxDR;
+      /// Calculate delta-R using rapidity
+      bool m_useRapidity;
+
       //
       // Utilities
       //
 
+      /// Delta-R matcher
+      std::unique_ptr<DeltaRMatcher> m_dRMatcher;
+
   }; // class EleMuSharedTrkOverlapTool
 
 } // namespace ORUtils
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IObjectAssociator.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IObjectAssociator.h
index 5db21b79844b93ac0642630fda4fd53f9cd5d0f9..07b5812b3f81e38689665c9f8c620db4f2e4248e 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IObjectAssociator.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IObjectAssociator.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_IOBJECTASSOCIATOR_H
 #define ASSOCIATIONUTILS_IOBJECTASSOCIATOR_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IOverlapRemovalTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IOverlapRemovalTool.h
index 160bfccdc7b66d495eee3f5bd19e1361726ba472..ae4cd1a1e59c190d72d72428dd8652b642246df9 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IOverlapRemovalTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IOverlapRemovalTool.h
@@ -1,8 +1,9 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
-#ifndef ASSOCIATIONUTILS_IOVERLAPREMOVALTOOL2_H
-#define ASSOCIATIONUTILS_IOVERLAPREMOVALTOOL2_H
+
+#ifndef ASSOCIATIONUTILS_IOVERLAPREMOVALTOOL_H
+#define ASSOCIATIONUTILS_IOVERLAPREMOVALTOOL_H
 
 // Framework includes
 #include "AsgTools/IAsgTool.h"
@@ -14,9 +15,6 @@
 #include "xAODMuon/MuonContainer.h"
 #include "xAODTau/TauJetContainer.h"
 
-// Backwards compatibility
-#include "AssociationUtils/IOverlapRemovalToolLegacy.h"
-
 
 namespace ORUtils
 {
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IOverlapRemovalToolLegacy.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IOverlapRemovalToolLegacy.h
deleted file mode 100644
index d7e56186f01fc036b1095d12eea27343815e7760..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IOverlapRemovalToolLegacy.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-#ifndef ASSOCIATIONUTILS_IOVERLAPREMOVALTOOL_H
-#define ASSOCIATIONUTILS_IOVERLAPREMOVALTOOL_H
-
-// Framework includes
-#include "AsgTools/IAsgTool.h"
-
-// EDM includes
-#include "xAODEgamma/ElectronContainer.h"
-#include "xAODEgamma/PhotonContainer.h"
-#include "xAODJet/JetContainer.h"
-#include "xAODMuon/MuonContainer.h"
-#include "xAODTau/TauJetContainer.h"
-
-
-/// Interface for the overlap removal tool
-///
-/// @author Steve Farrell <steven.farrell@cern.ch>
-///
-class IOverlapRemovalTool : public virtual asg::IAsgTool
-{
-
-    /// Declare the interface
-    ASG_TOOL_INTERFACE(IOverlapRemovalTool)
-
-  public:
-
-    /// Top-level method for performing full overlap-removal.
-    /// The individual OR methods will be called in the recommended order,
-    /// and the considered objects will be decorated with the output result.
-    /// Use this method form when the electron and muon containers are
-    /// sufficiently loose for the tau-lep overlap removal.
-    virtual StatusCode removeOverlaps(const xAOD::ElectronContainer* electrons,
-                                      const xAOD::MuonContainer* muons,
-                                      const xAOD::JetContainer* jets,
-                                      const xAOD::TauJetContainer* taus = 0,
-                                      const xAOD::PhotonContainer* photons = 0) = 0;
-
-    /// Top-level method for performing full overlap-removal.
-    /// The individual OR methods will be called in the recommended order,
-    /// and the considered objects will be decorated with the output result.
-    /// Use this method form when you're using view-containers or subset
-    /// containers in order to provide the loose electrons and muons for the
-    /// tau-lep overlap removal.
-    virtual StatusCode removeOverlaps(const xAOD::ElectronContainer* electrons,
-                                      const xAOD::MuonContainer* muons,
-                                      const xAOD::JetContainer* jets,
-                                      const xAOD::TauJetContainer* taus,
-                                      const xAOD::ElectronContainer* looseElectrons,
-                                      const xAOD::MuonContainer* looseMuons,
-                                      const xAOD::PhotonContainer* photons = 0) = 0;
-
-    /// Remove overlapping electrons and jets.
-    /// This method will decorate both the electrons and jets according to
-    /// both the e-jet and jet-e overlap removal prescriptions
-    virtual StatusCode removeEleJetOverlap(const xAOD::ElectronContainer& electrons,
-                                           const xAOD::JetContainer& jets) = 0;
-
-    /// Remove overlapping muons and jets
-    virtual StatusCode removeMuonJetOverlap(const xAOD::MuonContainer& muons,
-                                            const xAOD::JetContainer& jets) = 0;
-
-    /// Remove overlapping electrons and muons
-    virtual StatusCode removeEleMuonOverlap(const xAOD::ElectronContainer& electrons,
-                                            const xAOD::MuonContainer& muons) = 0;
-
-    /// Remove jets overlapping with taus
-    virtual StatusCode removeTauJetOverlap(const xAOD::TauJetContainer& taus,
-                                           const xAOD::JetContainer& jets) = 0;
-
-    /// Remove overlapping taus and electrons
-    virtual StatusCode removeTauEleOverlap(const xAOD::TauJetContainer& taus,
-                                           const xAOD::ElectronContainer& electrons) = 0;
-
-    /// Remove overlapping taus and muons
-    virtual StatusCode removeTauMuonOverlap(const xAOD::TauJetContainer& taus,
-                                            const xAOD::MuonContainer& muons) = 0;
-
-    /// Remove overlapping photons and electrons
-    virtual StatusCode removePhotonEleOverlap(const xAOD::PhotonContainer& photons,
-                                              const xAOD::ElectronContainer& electrons) = 0;
-
-    /// Remove overlapping photons and muons
-    virtual StatusCode removePhotonMuonOverlap(const xAOD::PhotonContainer& photons,
-                                               const xAOD::MuonContainer& muons) = 0;
-
-    /// Remove overlapping photons
-    virtual StatusCode removePhotonPhotonOverlap(const xAOD::PhotonContainer& photons) = 0;
-
-    /// Remove overlapping photons and jets
-    virtual StatusCode removePhotonJetOverlap(const xAOD::PhotonContainer& photons,
-                                              const xAOD::JetContainer& jets) = 0;
-
-}; // class IOverlapRemovalTool
-
-#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IOverlapTool.h
index 946d1451375350802df63e69471843b891de2f35..96e18e1fb13a18b8a183a427b7264aaba1f0cbcb 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/IOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_IOVERLAPTOOL_H
 #define ASSOCIATIONUTILS_IOVERLAPTOOL_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MacroChecks.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MacroChecks.h
index 683dc97b1bf9004eee9cdefc8e42f893e60dab46..8521da074f86dfbdc2b02302378b5a3f42710d76 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MacroChecks.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MacroChecks.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_MACROCHECKS_H
 #define ASSOCIATIONUTILS_MACROCHECKS_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetGhostDRMatcher.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetGhostDRMatcher.h
index 205eefa1851782b08883d7104d89bcaa0d32daba..e174c3254514163cb7a45359ba5ca6ed8dec148b 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetGhostDRMatcher.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetGhostDRMatcher.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_MUJETGHOSTMATCHER_H
 #define ASSOCIATIONUTILS_MUJETGHOSTMATCHER_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetOverlapTool.h
index 5d779cee00bacf6ce1f03c023577c66abee881ac..2f562ac15635d1b0be2aaf6f4650e9e158efbbd2 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuJetOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_MUJETOVERLAPTOOL_H
 #define ASSOCIATIONUTILS_MUJETOVERLAPTOOL_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuPFJetOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuPFJetOverlapTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..c89596c8a112c622f20408a052891db4f01f1842
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/MuPFJetOverlapTool.h
@@ -0,0 +1,143 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef ASSOCIATIONUTILS_MUPFJETOVERLAPTOOL_H
+#define ASSOCIATIONUTILS_MUPFJETOVERLAPTOOL_H
+
+// Framework includes
+#include "AsgTools/AsgTool.h"
+
+// EDM includes
+#include "xAODMuon/MuonContainer.h"
+#include "xAODJet/JetContainer.h"
+#include "xAODTracking/VertexContainer.h"
+
+// Local includes
+#include "AssociationUtils/IOverlapTool.h"
+#include "AssociationUtils/BaseOverlapTool.h"
+#include "AssociationUtils/IObjectAssociator.h"
+
+namespace ORUtils
+{
+
+  /// @class MuPFJetOverlapTool
+  /// @brief A tool implementing the recommended removal of PFlow jets which 
+  ///        are reconstructed from muon ID tracks.
+  ///
+  /// This tool takes muons and jets and removes jets based on
+  /// various criteria including delta-R, jet track multiplicity, mu_ID_pt/jet_SumTrkPt
+  /// ratio and muon calo isolation (topoetcone40 variable).
+  ///
+  /// The variable used for calo isolation is topoetcone40 and must be present.
+  /// For the jets the variables NumTrkPt500 and SumPtTrkPt500 must be present.
+  ///
+  /// The procedure works as follows.
+  ///   - Remove jets that overlap with muons which satisfy a variety of criteria.
+  ///     Two different windows in nTrk are used, and in each a cut is performed of the form
+  ///     topoetcone40<y0
+  ///     OR topoetcone40<y0+(y2-y1)/(x2-x1)*(mu_id_pt/jet_SumPtTrkPt500-x1)
+  ///     OR mu_id_pt/jet_SumPtTrkPt500>x2
+  ///    
+  ///   - Note no muons are removed in this procedure
+  ///
+  /// To determine jet track properties, the primary vertex is retrieved
+  /// and used to query the NumTrkPt500 and SumPtTrkPt500 jet attribute.
+  ///
+  /// Some special configuration properties
+  ///   UseSlidingDR     - activate sliding dR cone (c1 + c2/muPt)
+  ///   
+  ///
+  /// These properties are useful for specifying PV-related quantities so that
+  /// the tool doesn't need to retrieve the PV:
+  ///   JetNumTrackDecoration   - user-defined numTrk decoration
+  ///   JetSumTrackPTDecoration - user-defined sumTrkPt decoration
+  ///
+  /// @author Chris Young <christopher.young@cern.ch>
+  ///
+  class MuPFJetOverlapTool : public virtual IOverlapTool,
+                           public BaseOverlapTool
+  {
+
+      /// Create proper constructor for Athena
+      ASG_TOOL_CLASS(MuPFJetOverlapTool, IOverlapTool)
+
+    public:
+
+      /// Standalone constructor
+      MuPFJetOverlapTool(const std::string& name);
+
+      /// @brief Identify overlapping muons and jets.
+      /// First, low-track-multiplicity jets are flagged if they overlap with
+      /// muons. Second, muons are flagged if they overlap with the remaining
+      /// jets.
+      virtual StatusCode
+      findOverlaps(const xAOD::IParticleContainer& cont1,
+                   const xAOD::IParticleContainer& cont2) const override;
+
+      /// @brief Identify overlapping muons and jets.
+      /// The above method calls this one.
+      virtual StatusCode
+      findOverlaps(const xAOD::MuonContainer& muons,
+                   const xAOD::JetContainer& jets) const;
+
+    protected:
+
+      /// Initialize the tool
+      virtual StatusCode initializeDerived() override;
+
+    private:
+
+      /// Retrieve the primary vertex used to count jet tracks
+      const xAOD::Vertex* getPrimVtx() const;
+
+      /// Get the number of tracks in a jet w.r.t. requested vertex
+      int getNumTracks(const xAOD::Jet& jet, size_t vtxIdx) const;
+
+      /// Get the sum trk pt in a jet w.r.t. requested vertex
+      float getSumTrackPt(const xAOD::Jet& jet, size_t vtxIdx) const;
+
+      /// @name Configurable properties
+      /// @{
+
+      /// Minimum number of jet tracks to use the looser jet rejection criteria
+      int m_numJetTrk;
+      /// The 5 parameters that define the low nTrk criteria for removing jets.
+      float m_muPFJet_lowNtrk_x1;
+      float m_muPFJet_lowNtrk_x2;
+      float m_muPFJet_lowNtrk_y0;
+      float m_muPFJet_lowNtrk_y1;
+      float m_muPFJet_lowNtrk_y2;
+      /// The 5 parameters that define the high nTrk criteria for removing jets.
+      float m_muPFJet_highNtrk_x1;
+      float m_muPFJet_highNtrk_x2;
+      float m_muPFJet_highNtrk_y0;
+      float m_muPFJet_highNtrk_y1;
+      float m_muPFJet_highNtrk_y2;
+
+      /// Optional user decoration for jet numTrack of type 'int'
+      std::string m_jetNumTrkDec;
+      /// Optional user decoration for jet sumTrackPT of type 'float'
+      std::string m_jetSumTrkPtDec;
+
+      /// dR cone within which jets can get removed
+      float m_coneDR;
+
+      /// Calculate deltaR using rapidity
+      bool m_useRapidity;
+
+      /// @}
+
+      /// @name Utilities
+      /// @{
+
+      /// Delta-R matcher for the cone
+      std::unique_ptr<IParticleAssociator> m_dRMatchCone;
+
+      /// @}
+
+  }; // class MuPFJetOverlapTool
+
+} // namespace ORUtils
+
+#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ORToolBox.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ORToolBox.h
deleted file mode 100644
index 8dd068ec2bdeeb290c4f6db282c74c357a812a6f..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ORToolBox.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-#ifndef ASSOCIATIONUTILS_ORTOOLBOX_H
-#define ASSOCIATIONUTILS_ORTOOLBOX_H
-
-// This code should only be used in RootCore
-#ifdef ROOTCORE
-
-// Framework includes
-#include "AsgTools/AsgTool.h"
-#include "AsgTools/AnaToolHandle.h"
-
-// Local includes
-#include "AssociationUtils/IOverlapTool.h"
-#include "AssociationUtils/IOverlapRemovalTool.h"
-
-
-namespace ORUtils
-{
-
-  /// @class ToolBoxBase
-  /// @brief A generic helper class for holding tools.
-  ///
-  /// This is being replaced by the new ToolBox class.
-  ///
-  /// @author Steve Farrell <Steven.Farrell@cern.ch>
-  ///
-  class ToolBoxBase
-  {
-
-    public:
-
-      // Tool-map typedefs
-      using MapType_t = std::map< std::string, std::unique_ptr<asg::AsgTool> >;
-      using const_iterator = typename MapType_t::const_iterator;
-
-      /// Initializes all tools in the toolbox
-      StatusCode initialize();
-
-      /// Set message level of all tools in one go
-      void setMsgLevel(MSG::Level lvl);
-
-      /// @brief Retrieve an AsgTool pointer
-      /// Returns NULL in case the tool isn't found.
-      asg::AsgTool* getTool(const std::string& key, bool quiet=false);
-
-      /// @brief Add a tool to the box.
-      /// Overwrites a pre-existing tool.
-      void setTool(const std::string& key, std::unique_ptr<asg::AsgTool> tool);
-
-      /// Read-only iteration over the map elements
-      const_iterator begin() const;
-      /// Read-only iteration over the map elements
-      const_iterator end() const;
-
-    private:
-
-      /// @brief Map of key to tool pointer.
-      /// Key does not necessarily need to be the tool name, though using the
-      /// tool name might make the most sense in most situations.
-      MapType_t m_tools;
-
-  }; // class ToolBoxBase
-
-
-
-  /// @class ORToolBox
-  /// @brief Specialized toolbox for overlap tools and a master tool.
-  ///
-  /// This is being replaced by the new ToolBox class.
-  ///
-  /// @author Steve Farrell <Steven.Farrell@cern.ch>
-  ///
-  class ORToolBox : public ToolBoxBase
-  {
-
-    public:
-
-      /// Get AsgTool ptr to the master tool
-      asg::AsgTool* getMasterTool();
-
-      /// Set the master tool (uses key="master")
-      void setMasterTool(std::unique_ptr<asg::AsgTool> tool);
-
-      /// @brief Add one overlap tool.
-      /// If master tool is already added, then the tool will also be
-      /// assigned to the master tool using the key. The tool name will
-      /// be used in case the key is empty (default).
-      StatusCode addOverlapTool(std::unique_ptr<asg::AsgTool> tool,
-                                std::string key = "");
-
-      /// Get a ToolHandle to an IOverlapTool
-      ToolHandle<IOverlapTool> getHandle(const std::string& key);
-
-      /// Get a ToolHandle to the master IOverlapRemovalTool
-      ToolHandle<IOverlapRemovalTool> getMasterHandle();
-
-  }; // class ORToolBox
-
-} // namespace ORUtils
-
-#endif // ROOTCORE
-
-#endif // ASSOCIATIONUTILS_ORTOOLBOX_H
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ObjLinkOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ObjLinkOverlapTool.h
index ae7ab7ea9c38c1247507fb2660ede939883a5c61..4239f067003d48378218695e9d07374c5d997ad4 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ObjLinkOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ObjLinkOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_OBJLINKOVERLAPTOOL_H
 #define ASSOCIATIONUTILS_OBJLINKOVERLAPTOOL_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapDecorationHelper.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapDecorationHelper.h
index 6f9f6ae7d20aa79e17b3742658c69df7bfd587b8..81e68eba940466a36c58a7a395de0a6959b3df74 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapDecorationHelper.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapDecorationHelper.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_OVERLAPDECORATIONHELPER_H
 #define ASSOCIATIONUTILS_OVERLAPDECORATIONHELPER_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapLinkHelper.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapLinkHelper.h
index 2bc506f08dbe81b9467af83f9695dc7b7d81e5c7..890514a262ff131a56593aba156fcb5a0b561d3e 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapLinkHelper.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapLinkHelper.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_OVERLAPLINKHELPER_H
 #define ASSOCIATIONUTILS_OVERLAPLINKHELPER_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalDefs.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalDefs.h
index b9c1ad05630271d30f2a0e151614f282dcbd8aed..91812ae21fe54db30089cb5633f06d18ca190b81 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalDefs.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalDefs.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_OVERLAPREMOVALDEFS_H
 #define ASSOCIATIONUTILS_OVERLAPREMOVALDEFS_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalGenUseAlg.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalGenUseAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..cabafffe2a68fab46e26d8e27d14d0da4c280f2a
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalGenUseAlg.h
@@ -0,0 +1,76 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef ASSOCIATIONUTILS_OVERLAPREMOVALGENUSEALG_H
+#define ASSOCIATIONUTILS_OVERLAPREMOVALGENUSEALG_H
+
+// Framework includes
+#include "AsgTools/ToolHandle.h"
+#include "AnaAlgorithm/AnaAlgorithm.h"
+
+// EDM includes
+#include "xAODBase/IParticleContainer.h"
+
+// Local includes
+#include "AssociationUtils/IOverlapRemovalTool.h"
+
+/// Algorithm to implement basic OR procedure as a prerequisite for event cleaning
+///
+/// @author Julia Gonski <j.gonski@cern.ch>
+///
+class OverlapRemovalGenUseAlg : public EL::AnaAlgorithm
+{
+
+  public:
+
+    /// Standard algorithm constructor
+    OverlapRemovalGenUseAlg(const std::string& name, ISvcLocator* svcLoc);
+
+    /// Initialize the algorithm
+    virtual StatusCode initialize();
+
+    /// Execute the algorithm
+    virtual StatusCode execute();
+
+  private:
+
+    /// Simple object selection
+    template<class ContainerType>
+    void applySelection(const ContainerType& container);
+
+    // Reset decorations to failing
+    template<class ContainerType>
+    void setDefaultDecorations(const ContainerType& container);
+
+    /// Simple object selection
+    template<class ObjType>
+    bool selectObject(const ObjType& obj);
+
+    /// Print object info
+    void printObjects(const xAOD::IParticleContainer& container,
+                      const std::string& type);
+
+    /// Handle to the tool
+    ToolHandle<ORUtils::IOverlapRemovalTool> m_orTool;
+
+    /// Configuration
+    std::string m_selectionLabel;
+    std::string m_overlapLabel;
+    std::string m_jetKey;
+    std::string m_bJetLabel;
+    std::string m_electronKey;
+    std::string m_electronLabel;
+    std::string m_photonKey;
+    std::string m_photonLabel;
+    std::string m_muonKey;
+    std::string m_muonLabel;
+    std::string m_tauKey;
+    std::string m_tauLabel;
+    bool m_defaultValue;
+    double m_ptCut;
+    double m_etaCut;
+
+};
+
+#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalInit.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalInit.h
index b40e325f2f44ae8147f4e9a07e04294eafbf105a..b29235d471231c7bd3914a5484924b6a359bcf67 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalInit.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalInit.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_OVERLAPREMOVALINIT_H
 #define ASSOCIATIONUTILS_OVERLAPREMOVALINIT_H
 
@@ -17,7 +18,6 @@
 
 // Local includes
 #include "AssociationUtils/ToolBox.h"
-#include "AssociationUtils/ORToolBox.h"
 
 namespace ORUtils
 {
@@ -41,6 +41,9 @@ namespace ORUtils
 
     /// B-jet decoration
     std::string bJetLabel = "";
+    /// Set the maximum electron pT for which b-tag aware overlap removal
+    /// is done. Set to negative value to use for all electrons.
+    double maxElePtForBJetAwareOR = 100. * 1000;
     /// Activate boosted-lepton recommendations (sliding dR cones)
     bool boostedLeptons = false;
     /// Output value to assign passing objects.
@@ -50,6 +53,8 @@ namespace ORUtils
     bool linkOverlapObjects = false;
     /// Do electron-electron overlap
     bool doEleEleOR = false;
+    /// Do PFlow muon-jet removal
+    bool doMuPFJetOR = false;
 
     /// @name Objects to configure tools for
     /// @{
@@ -70,10 +75,10 @@ namespace ORUtils
   /// by Will Buttinger: https://indico.cern.ch/event/457238/
   ///
   /// The tools are returned uninitialized; the user can override properties
-  /// and initialize all the tools with a call to ORToolBox::initialize.
+  /// and initialize all the tools with a call to ToolBox::initialize.
   ///
-  /// This function uses the new ORFlags object to communicate common
-  /// configuration options and the new ToolBox design based on AnaToolHandle.
+  /// This function uses the ORFlags object to communicate common configuration
+  /// options and the ToolBox design based on AnaToolHandle.
   ///
   /// Users can replace overlap tools with their own configured versions by
   /// setting ToolBox handles prior to calling this method. Right now the way
@@ -94,61 +99,6 @@ namespace ORUtils
   ///
   StatusCode recommendedTools(const ORFlags& flags, ToolBox& toolBox);
 
-#ifdef ROOTCORE
-
-  /// @brief Pre-configured standard recommended OR tools.
-  ///
-  /// This function has the same default behavior as the one above, but is
-  /// overloaded for the familiar interface which has been around for a while.
-  ///
-  /// DEPRECATED - please use the above function instead.
-  ///
-  /// @param[out] toolBox Container to be filled with tools.
-  /// @param[in] name Name of the master tool and prefix for the sub-tools.
-  /// @param[in] inputLabel Decoration name specifying input objects.
-  /// @param[in] outputLabel Output decoration applied to objects.
-  /// @param[in] bJetLabel Decoration name which specifies b-jets. Leave blank
-  ///            to disable btag-aware overlap removal.
-  /// @param[in] boostedLeptons activate sliding delta-R cones recommended for
-  ///            analyses with boosted leptons.
-  /// @param[in] outputPassValue Specifies the output flag logic. I.e., it
-  ///            specifies the value assigned to objects that pass OR.
-  /// @param[in] doTaus Toggles initialization of tau OR.
-  /// @param[in] doPhotons Toggles initialization of photon OR.
-  ///
-  StatusCode recommendedTools(ORToolBox& toolBox,
-                              const std::string& name,
-                              const std::string& inputLabel = "selected",
-                              const std::string& outputLabel = "overlaps",
-                              const std::string& bJetLabel = "",
-                              bool boostedLeptons = false,
-                              bool outputPassValue = false,
-                              bool doTaus=true, bool doPhotons=true)
-  __attribute__((deprecated));
-
-
-  /// @brief Pre-configured harmonization recommended OR tools.
-  ///
-  /// This function provides the tool configuration corresponding to the
-  /// overlap removal recommendations in the harmonization document. The
-  /// recommendations have been more recently updated. See the recommendedTools
-  /// function above.
-  ///
-  /// DEPRECATED - these recommendations are no longer supported.
-  ///
-  /// Refer to the recommendedTools function documentation for more details,
-  /// including explanation of the arguments.
-  ///
-  StatusCode harmonizedTools(ORToolBox& toolBox,
-                             const std::string& name,
-                             const std::string& inputLabel = "selected",
-                             const std::string& outputLabel = "overlaps",
-                             bool outputPassValue = false,
-                             bool doTaus=true, bool doPhotons=true)
-  __attribute__((deprecated));
-
-#endif // ROOTCORE
-
 } // namespace ORUtils
 
 #endif
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalTool.h
index 1ced8868109189dd078ef36bfe055e424743b0cf..f448a8924fcb0b938a963ba02b6f2a91fc56349d 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalTool.h
@@ -1,8 +1,9 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
-#ifndef ASSOCIATIONUTILS_OVERLAPREMOVALTOOL2_H
-#define ASSOCIATIONUTILS_OVERLAPREMOVALTOOL2_H
+
+#ifndef ASSOCIATIONUTILS_OVERLAPREMOVALTOOL_H
+#define ASSOCIATIONUTILS_OVERLAPREMOVALTOOL_H
 
 // Framework includes
 #include "AsgTools/AsgTool.h"
@@ -14,8 +15,6 @@
 #include "AssociationUtils/OverlapRemovalDefs.h"
 #include "AssociationUtils/OverlapDecorationHelper.h"
 
-// Backwards compatibility
-#include "AssociationUtils/OverlapRemovalToolLegacy.h"
 
 namespace ORUtils
 {
@@ -24,10 +23,7 @@ namespace ORUtils
   /// @brief top-level tool for performing overlap removal.
   ///
   /// This tool will apply the overlap removals specified by the user in the
-  /// form of IOverlapTools in the recommended order. It implements the
-  /// harmonized object overlap removal recommendations from the harmonization
-  /// study group 5, given in
-  /// https://cds.cern.ch/record/1700874
+  /// form of IOverlapTools in the recommended order.
   ///
   /// @author Steve Farrell <steven.farrell@cern.ch>
   ///
@@ -94,6 +90,9 @@ namespace ORUtils
       // Overlap tool handles
       //
 
+      /// PFlow-Mu-jet overlap handle
+      ToolHandle<IOverlapTool> m_muPFJetORT;
+
       /// Ele-ele overlap handle
       ToolHandle<IOverlapTool> m_eleEleORT;
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalToolLegacy.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalToolLegacy.h
deleted file mode 100644
index 6f75cc5ca9cb5839552d552b8e8ff002944fd042..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/OverlapRemovalToolLegacy.h
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-#ifndef ASSOCIATIONUTILS_OVERLAPREMOVALTOOL_H
-#define ASSOCIATIONUTILS_OVERLAPREMOVALTOOL_H
-
-// Framework includes
-#include "AsgTools/AsgTool.h"
-
-// EDM includes
-#include "xAODBase/IParticle.h"
-
-// Local includes
-#include "AssociationUtils/IOverlapRemovalTool.h"
-#include "AssociationUtils/OverlapRemovalDefs.h"
-
-/// Overlap removal tool
-///
-/// This tool implements the harmonized object overlap removal
-/// recommendations from the harmonization study group 5, given in
-/// https://cds.cern.ch/record/1700874
-///
-/// This tool is deprecated and will no longer be supported. Please consider
-/// using the new OverlapRemovalTool in the ORUtils namespace.
-///
-/// @author Steve Farrell <steven.farrell@cern.ch>
-///
-class OverlapRemovalTool : public virtual IOverlapRemovalTool,
-                           public asg::AsgTool
-{
-
-    /// Create a proper constructor for Athena
-    ASG_TOOL_CLASS(OverlapRemovalTool, IOverlapRemovalTool)
-
-  public:
-
-    /// Constructor for standalone usage
-    OverlapRemovalTool(const std::string& name);
-    /// Destructor
-    ~OverlapRemovalTool();
-
-    /// @name Methods implementing the asg::IAsgTool interface
-    /// @{
-
-    /// Initialize the tool
-    virtual StatusCode initialize() override;
-
-    /// @}
-
-    /// @name Methods implementing the IOverlapRemovalTool interface
-    /// @{
-
-    /// Top-level method for performing full overlap-removal.
-    /// The individual OR methods will be called in the recommended order,
-    /// and the considered objects will be decorated with the output result.
-    /// Use this method form when the electron and muon containers are
-    /// sufficiently loose for the tau-lep overlap removal.
-    virtual StatusCode removeOverlaps(const xAOD::ElectronContainer* electrons,
-                                      const xAOD::MuonContainer* muons,
-                                      const xAOD::JetContainer* jets,
-                                      const xAOD::TauJetContainer* taus = 0,
-                                      const xAOD::PhotonContainer* photons = 0) override;
-
-    /// Top-level method for performing full overlap-removal.
-    /// The individual OR methods will be called in the recommended order,
-    /// and the considered objects will be decorated with the output result.
-    /// Use this method form when you're using view-containers or subset
-    /// containers in order to provide the loose electrons and muons for the
-    /// tau-lep overlap removal.
-    virtual StatusCode removeOverlaps(const xAOD::ElectronContainer* electrons,
-                                      const xAOD::MuonContainer* muons,
-                                      const xAOD::JetContainer* jets,
-                                      const xAOD::TauJetContainer* taus,
-                                      const xAOD::ElectronContainer* looseElectrons,
-                                      const xAOD::MuonContainer* looseMuons,
-                                      const xAOD::PhotonContainer* photons = 0) override;
-
-    /// Remove overlapping electrons and jets
-    /// This method will decorate both the electrons and jets according to
-    /// both the e-jet and jet-e overlap removal prescriptions.
-    virtual StatusCode removeEleJetOverlap(const xAOD::ElectronContainer& electrons,
-                                           const xAOD::JetContainer& jets) override;
-
-    /// Remove overlapping muons and jets
-    virtual StatusCode removeMuonJetOverlap(const xAOD::MuonContainer& muons,
-                                            const xAOD::JetContainer& jets) override;
-
-    /// Remove overlapping electrons and muons
-    /// TODO: make it possible to veto event based on this.
-    virtual StatusCode removeEleMuonOverlap(const xAOD::ElectronContainer& electrons,
-                                            const xAOD::MuonContainer& muons) override;
-
-    /// Remove jets overlapping with taus
-    virtual StatusCode removeTauJetOverlap(const xAOD::TauJetContainer& taus,
-                                           const xAOD::JetContainer& jets) override;
-
-    /// Remove overlapping taus and electrons
-    virtual StatusCode removeTauEleOverlap(const xAOD::TauJetContainer& taus,
-                                           const xAOD::ElectronContainer& electrons) override;
-
-    /// Remove overlapping taus and muons
-    virtual StatusCode removeTauMuonOverlap(const xAOD::TauJetContainer& taus,
-                                            const xAOD::MuonContainer& muons) override;
-
-    /// Remove overlapping photons and electrons
-    virtual StatusCode removePhotonEleOverlap(const xAOD::PhotonContainer& photons,
-                                              const xAOD::ElectronContainer& electrons) override;
-
-    /// Remove overlapping photons and muons
-    virtual StatusCode removePhotonMuonOverlap(const xAOD::PhotonContainer& photons,
-                                               const xAOD::MuonContainer& muons) override;
-
-    /// Remove overlapping photons
-    virtual StatusCode removePhotonPhotonOverlap(const xAOD::PhotonContainer& photons) override;
-
-    /// Remove overlapping photons and jets
-    virtual StatusCode removePhotonJetOverlap(const xAOD::PhotonContainer& photons,
-                                              const xAOD::JetContainer& jets) override;
-
-    /// @}
-
-  protected:
-
-    // I might use these next methods for the loose lepton ID
-
-    /// Loose electron ID for tau-electron OR
-    StatusCode isLooseEleForTauEleOR(const xAOD::Electron* electron, bool& pass);
-    /// Loose muon ID for tau-muon OR
-    StatusCode isLooseMuonForTauMuonOR(const xAOD::Muon* muon, bool& pass);
-
-    /// Determine if jet is flagged as a b-jet
-    /// TODO: Use StatusCode?
-    bool isBJet(const xAOD::Jet* jet);
-
-    /// Generic dR-based overlap check between one object and a container.
-    bool objectOverlaps(const xAOD::IParticle* obj,
-                        const xAOD::IParticleContainer& container,
-                        double dR);
-
-    /// Determine if objects overlap by a simple dR comparison
-    bool objectsOverlap(const xAOD::IParticle* p1, const xAOD::IParticle* p2,
-                        double dRMax, double dRMin = 0);
-
-    /// Decorate p1 with an overlap object link to p2
-    StatusCode addOverlapObjectLink(const xAOD::IParticle* p1,
-                                    const xAOD::IParticle* p2);
-
-    /// Recommended calculation of overlap distance parameter, (delta R)^2.
-    /// dR^2 = (y1-y2)^2 + (phi1-phi2)^2
-    /// Note this is calculated with the rapidity rather than the
-    /// pseudorapidity. TLorentzVector::DeltaR uses the latter.
-    double deltaR2(const xAOD::IParticle* p1, const xAOD::IParticle* p2);
-    /// deltaR = sqrt( deltaR2 )
-    double deltaR(const xAOD::IParticle* p1, const xAOD::IParticle* p2);
-
-    /// Check if object is flagged as input for OR
-    bool isInputObject(const xAOD::IParticle* obj);
-
-    /// Check if object has been rejected by decoration
-    bool isRejectedObject(const xAOD::IParticle* obj);
-
-    /// Check if object is surviving OR thus far
-    bool isSurvivingObject(const xAOD::IParticle* obj)
-    { return isInputObject(obj) && !isRejectedObject(obj); }
-
-    /// Set output decoration on object, pass or fail
-    void setOverlapDecoration(const xAOD::IParticle* obj, bool result);
-
-    /// Shorthand way to set an object as pass
-    void setObjectPass(const xAOD::IParticle* obj)
-    { setOverlapDecoration(obj, false); }
-
-    /// Shorthand way to set an object as fail
-    void setObjectFail(const xAOD::IParticle* obj)
-    { setOverlapDecoration(obj, true); }
-
-    /// Check if output decoration has been applied to a container.
-    /// Returns false if the container is empty.
-    /// Output logic independent.
-    bool isDecorated(const xAOD::IParticleContainer& container);
-
-    /// Helper method for ensuring proper initialization of output decoration.
-    /// This implementation takes advantage of the default initialization of
-    /// the decoration value. So, 'overlaps' is by default false. This method
-    /// will not change the decoration value if it exists.
-    void initializeDecorations(const xAOD::IParticleContainer& container);
-
-    /// Helper method for setting all objects as passing
-    void resetDecorations(const xAOD::IParticleContainer& container);
-
-    /// Following methods can be used to decorate an electron with an appropriate flag if it
-    /// shares a track with a muon. It enables to rerun the full OR on skimmed/slimmed xAODs
-    /// which do not contain the TrackParticleLinks anymore. The flag-writing and flag-running
-    /// modes can be enabled via setProperty methods.
-
-    /// Check if TrackParticleLinks are available in the input.
-    /// Mainly needed if flag-running mode should be set automatically.
-    bool checkTrackParticles(const xAOD::ElectronContainer& container);
-    /// Check if input electron container is decorated with the flag for flag-running mode.
-    bool checkSharesTrackDecoration(const xAOD::ElectronContainer& container);
-    /// Check if electron shares track with a muon based on decoration.
-    bool sharesTrack(const xAOD::IParticle* obj);
-    /// Set output decoration on electron indicating if it shares a track with a muon.
-    StatusCode setSharesTrackDecoration(const xAOD::IParticle* obj, bool sharesTrack);
-    /// Set output decoration on all electrons also those not qualified for OR. Default is false.
-    void initializeSharesTrackDecoration(const xAOD::ElectronContainer& container);   //need wrapper?
-
-  private:
-
-    //
-    // Configurable properties
-    //
-
-    /// Input object decoration which specifies which objects to look at
-    std::string m_inputLabel;
-    /// Output object decoration which specifies overlapping objects
-    std::string m_overlapLabel;
-
-    /// Input jet decoration which labels a bjet
-    std::string m_bJetLabel;
-
-    /// Flag to toggle overlap object links
-    bool m_linkOverlapObjects;
-
-    /// electron-jet overlap cone (removes electron)
-    float m_electronJetDR;
-    /// jet-electron overlap cone (removes jet)
-    float m_jetElectronDR;
-    /// muon-jet overlap cone
-    float m_muonJetDR;
-    /// tau-jet overlap cone
-    float m_tauJetDR;
-    /// tau-electron overlap cone
-    float m_tauElectronDR;
-    /// tau-muon overlap cone
-    float m_tauMuonDR;
-    /// photon-electron overlap cone
-    float m_photonElectronDR;
-    /// photon-muon overlap cone
-    float m_photonMuonDR;
-    /// photon-photon overlap cone
-    float m_photonPhotonDR;
-    /// photon-jet overlap cone
-    float m_photonJetDR;
-
-    /// Electron ID selection for tau-ele OR
-    std::string m_tauEleOverlapID;
-    /// Muon pt threshold for tau-mu OR
-    float m_tauMuOverlapMuPt;
-    /// Tau pt criteria divider for tau-mu OR
-    float m_tauMuOverlapTauPt;
-
-    /// Flag to decorate electron if it shares
-    /// a track with a muon
-    bool m_writeSharedTrackFlag;
-    /// Flag to enable flag-running mode
-    bool m_useSharedTrackFlag;
-
-    //
-    // Accessors and decorators
-    //
-
-    /// Input label accessor
-    ort::inputAccessor_t* m_inputAccessor;
-    /// Output decorator
-    ort::outputDecorator_t* m_outputDecorator;
-    /// B-jet label accessor
-    ort::inputAccessor_t* m_bJetAccessor;
-    /// Object link decorator
-    ort::objLinkDecorator_t* m_overlapLinkDecorator;
-    /// Output decorator for flag-running mode of ele-muon overlap removal
-    ort::sharedTrackDecorator_t* m_sharedTrackDecorator;
-    /// Input accessor for flag-running mode of ele-muon overlap removal
-    ort::sharedTrackAccessor_t* m_sharedTrackAccessor;
-
-}
-#if not defined(__GCCXML__) and not defined(__ROOTCLING__) and not defined(__MAKECINT__) and not defined(R__DICTIONARY_FILENAME)
-__attribute__((deprecated))
-#endif
-; // class OverlapRemovalTool
-
-#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauAntiTauJetOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauAntiTauJetOverlapTool.h
index 4f53f961e8d4d6a914ce5e79b0066d601ee6bccc..e69b0f444f32a2232e3b364903103356c3e09b49 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauAntiTauJetOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauAntiTauJetOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_TAU_ANTITAU_JET_OVERLAPTOOL_H
 #define ASSOCIATIONUTILS_TAU_ANTITAU_JET_OVERLAPTOOL_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauJetOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauJetOverlapTool.h
index 958c524b268bb7de8795ea7f20b578f8868dcc92..67651c2fbe1ff37530c6a88afb95e0d4456be959 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauJetOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauJetOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_TAUJETOVERLAPTOOL_H
 #define ASSOCIATIONUTILS_TAUJETOVERLAPTOOL_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauLooseEleOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauLooseEleOverlapTool.h
index d9a8db61e2a6b4f80a45e018ebe82a0348c5e542..61002a6b134c0021e4d77df434be022a42fa8aae 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauLooseEleOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauLooseEleOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_TAULOOSEELEOVERLAPTOOL_H
 #define ASSOCIATIONUTILS_TAULOOSEELEOVERLAPTOOL_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauLooseMuOverlapTool.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauLooseMuOverlapTool.h
index b0f82101c6dfc260a8aeceb2c5d3ed2ac552af06..916d8a1c4941c84dcb7bfabc26eccac73d9a4277 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauLooseMuOverlapTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/TauLooseMuOverlapTool.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_TAULOOSEMUOVERLAPTOOL_H
 #define ASSOCIATIONUTILS_TAULOOSEMUOVERLAPTOOL_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ToolBox.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ToolBox.h
index ecddb9d71cce76a9aa5f22ee531184266056289e..f3bad7e5d13a27ffd1e660cbf9cce2b2f2b08ee4 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ToolBox.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/ToolBox.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_TOOLBOX_H
 #define ASSOCIATIONUTILS_TOOLBOX_H
 
@@ -40,11 +41,7 @@ namespace ORUtils
     public:
 
       /// Aliases
-#ifdef ROOTCORE
-      using parentType_t = asg::AsgTool;
-#else
       using parentType_t = INamedInterface;
-#endif
       using MasterHandle_t = asg::AnaToolHandle<IOverlapRemovalTool>;
       using OverlapHandle_t = asg::AnaToolHandle<IOverlapTool>;
 
@@ -68,6 +65,7 @@ namespace ORUtils
 
       /// @name overlap tool handles
       /// @{
+      OverlapHandle_t muPFJetORT;
       OverlapHandle_t eleEleORT;
       OverlapHandle_t eleMuORT;
       OverlapHandle_t eleJetORT;
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/selection.xml b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/selection.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ab90f049a1d4e0143d912908173be13c1bfdcd9a
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/AssociationUtils/selection.xml
@@ -0,0 +1,33 @@
+<lcgdict>
+
+  <!-- Tools -->
+  <namespace name="ORUtils" />
+  <class name="ORUtils::IOverlapTool" />
+  <class name="ORUtils::IOverlapRemovalTool" />
+  <class name="ORUtils::IParticleAssociator" />
+  <class name="ORUtils::BaseOverlapTool" />
+  <class name="ORUtils::OverlapRemovalTool" />
+  <class name="ORUtils::DeltaROverlapTool" />
+  <class name="ORUtils::EleEleOverlapTool" />
+  <class name="ORUtils::EleJetOverlapTool" />
+  <class name="ORUtils::EleMuSharedTrkOverlapTool" />
+  <class name="ORUtils::MuJetOverlapTool" />
+  <class name="ORUtils::MuPFJetOverlapTool" />
+  <class name="ORUtils::AltMuJetOverlapTool" />
+  <class name="ORUtils::TauLooseEleOverlapTool" />
+  <class name="ORUtils::TauLooseMuOverlapTool" />
+  <class name="ORUtils::TauJetOverlapTool" />
+  <class name="ORUtils::TauAntiTauJetOverlapTool" />
+  <class name="ORUtils::ObjLinkOverlapTool" />
+  <class name="ORUtils::ToolBox" />
+  <class name="ORUtils::BJetHelper" />
+  <class name="ORUtils::DeltaRMatcher" />
+  <class name="ORUtils::SlidingDeltaRMatcher" />
+  <class name="ORUtils::MuJetGhostDRMatcher" />
+  <class name="ORUtils::OverlapDecorationHelper" />
+  <class name="ORUtils::OverlapLinkHelper" />
+
+  <!-- Dual-use alg -->
+  <class name="OverlapRemovalGenUseAlg" />
+
+</lcgdict>
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt
index 0c72ac7d2cc1a891f11fdcef5c2d1d3c4c4cecea..ffe4785437b6c5a0b34ddeb8811b1c15c0647e06 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt
@@ -1,5 +1,3 @@
-# $Id: CMakeLists.txt 793296 2017-01-21 01:09:39Z sfarrell $
-
 # The name of the package:
 atlas_subdir( AssociationUtils )
 
@@ -24,7 +22,10 @@ atlas_depends_on_subdirs(
    Event/xAOD/xAODMuon
    Event/xAOD/xAODTau
    Event/xAOD/xAODTracking
+   PhysicsAnalysis/D3PDTools/AnaAlgorithm
    PRIVATE
+   Control/AthToolSupport/AsgTesting
+   Control/CxxUtils
    Event/FourMomUtils
    Event/xAOD/xAODEventInfo
    ${extra_dep} )
@@ -35,33 +36,18 @@ find_package( Boost COMPONENTS program_options )
 find_package( GTest )
 
 # Libraries in the package:
-atlas_add_root_dictionary( AssociationUtilsLib AssociationUtilsLibDict
-   ROOT_HEADERS AssociationUtils/OverlapRemovalTool.h
-   AssociationUtils/BaseOverlapTool.h AssociationUtils/DeltaROverlapTool.h
-   AssociationUtils/EleEleOverlapTool.h
-   AssociationUtils/EleMuSharedTrkOverlapTool.h
-   AssociationUtils/EleJetOverlapTool.h AssociationUtils/MuJetOverlapTool.h
-   AssociationUtils/AltMuJetOverlapTool.h
-   AssociationUtils/TauLooseEleOverlapTool.h
-   AssociationUtils/TauLooseMuOverlapTool.h AssociationUtils/TauJetOverlapTool.h
-   AssociationUtils/TauAntiTauJetOverlapTool.h
-   AssociationUtils/ObjLinkOverlapTool.h AssociationUtils/ToolBox.h
-   AssociationUtils/BJetHelper.h AssociationUtils/DeltaRMatcher.h
-   AssociationUtils/MuJetGhostDRMatcher.h
-   AssociationUtils/OverlapDecorationHelper.h
-   AssociationUtils/OverlapLinkHelper.h
-   AssociationUtils/IOverlapRemovalToolLegacy.h
-   AssociationUtils/OverlapRemovalToolLegacy.h
-   Root/LinkDef.h
-   EXTERNAL_PACKAGES ROOT )
-
 atlas_add_library( AssociationUtilsLib
-   AssociationUtils/*.h Root/*.cxx ${AssociationUtilsLibDict}
+   AssociationUtils/*.h Root/*.cxx
    PUBLIC_HEADERS AssociationUtils
-   INCLUDE_DIRS ${ROOT_ICNLUDE_DIRS}
+   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
    LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODBase xAODEgamma xAODJet
-   xAODMuon xAODTau xAODTracking AthContainers AthLinks
-   PRIVATE_LINK_LIBRARIES FourMomUtils )
+   xAODMuon xAODTau xAODTracking AthContainers AthLinks AnaAlgorithmLib
+   PRIVATE_LINK_LIBRARIES CxxUtils FourMomUtils )
+
+atlas_add_dictionary( AssociationUtilsDict
+    AssociationUtils/AssociationUtilsDict.h
+    AssociationUtils/selection.xml
+    LINK_LIBRARIES AssociationUtilsLib )
 
 if( NOT XAOD_STANDALONE )
    atlas_add_component( AssociationUtils
@@ -77,12 +63,6 @@ if( XAOD_STANDALONE )
       LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} xAODRootAccess
       xAODEventInfo xAODEgamma xAODMuon xAODJet xAODTau xAODEgamma
       AssociationUtilsLib )
-
-   atlas_add_executable( OverlapRemovalTesterLegacy
-      util/OverlapRemovalTesterLegacy.cxx
-      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODRootAccess xAODEventInfo xAODEgamma
-      xAODMuon xAODJet xAODTau xAODEgamma AssociationUtilsLib )
 endif()
 
 # Tests in the package:
@@ -103,13 +83,12 @@ endmacro( _add_gtest )
 # Define the google unit tests.
 # Disabling some which don't work in Athena.
 foreach( test gt_AnaToolHandle_test ) # gt_OverlapRemovalInit_test gt_toolbox_test
-   _add_gtest( ${test} )
+   _add_gtest( ${test} LINK_LIBRARIES AsgTestingLib )
 endforeach()
 
 if( XAOD_STANDALONE )
    atlas_add_test( ut_assocUtilsDict SCRIPT test/ut_assocUtilsDict.py )
    atlas_add_test( ut_ort_tester SCRIPT test/ut_ort_tester.sh )
-   atlas_add_test( ut_ort_tester_legacy SCRIPT test/ut_ort_tester_legacy.sh )
 endif()
 
 # Install files from the package:
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/README.rst b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/README.rst
index 898eff6a713ca9d309a0ed56cb1cc723d0cbc33f..39c18322be04ae1d35490f36b527141b302f4277 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/README.rst
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/README.rst
@@ -13,15 +13,23 @@ Introduction
 
 This package contains a set of tools to provide users with the recommended
 overlap removal prescriptions for analysis-level objects (electrons, muons,
-jets, photons, and fat-jets). This document covers a wide range of technical
-details about how the package is structured, but if you're just looking for
-the quick answers of how to set things up and use the tools, you can skip
-ahead to the `Configuration helpers`_ section.
+taus, jets, photons, and fat-jets). This document covers a wide range of
+technical details about how the package is structured, but if you're just
+looking for the quick answers of how to set things up and use the tools, you
+can skip ahead to the `Configuration helpers`_ section.
+
+The current recommendations were summarized by me in these slides from the
+flavour-tagging and Hbb workshop on Sep 6, 2017:
+https://indico.cern.ch/event/631313/contributions/2683959/
+
+For some history you may also refer to the slides at these meetings:
+
+* 2016-11-14 in physics coordination: https://indico.cern.ch/event/587852/
+* 2016-10-21 in ASG: https://indico.cern.ch/event/576538/
+* 2016-06-03 (for ICHEP): https://indico.cern.ch/event/539619/
 
-The current features and recommendations (for ICHEP) are summarized in my
-ASG presentation on 2016-06-03 here: https://indico.cern.ch/event/539619/.
 The configuration is quite flexible and a lot of features are supported,
-but in summary it is recommended that analyses adopt one of ~four "working
+but in summary it is recommended that analyses adopt one of the "working
 points" depending on the type of analysis:
 
 * **Standard** - covers normal analyses not falling into the other categories.
@@ -30,26 +38,25 @@ points" depending on the type of analysis:
 * **Boosted+Heavy-flavor** - for analyses with both HF jets and boosted
   objects.
 
+See the above slides for a good summary of these working points.
+There are some variations on the above which favor leptons or photons more,
+but I won't cover those details here.
+
 For a quick example of how to use the tools with the configuration helper
 code in RootCore, take a look at the tester executable:
 
 * `util/OverlapRemovalTester.cxx <../util/OverlapRemovalTester.cxx>`_
 
-For a corresponding example in Athena (or AthAnalysisBase), look at the
+For a corresponding example in Athena (e.g. in AthAnalysis), look at the
 tester algorithm and job options:
 
 * `src/OverlapRemovalTestAlg.h <../src/OverlapRemovalTestAlg.h>`_
 * `src/OverlapRemovalTestAlg.cxx <../src/OverlapRemovalTestAlg.cxx>`_
 * `share/OverlapRemovalTest_jobOptions.py <../share/OverlapRemovalTest_jobOptions.py>`_
 
-The design of this package has undergone some upgrades since its initial
-offering. See for example the following JIRA ticket describing the upgrade
-to the current modular tool design:
-https://its.cern.ch/jira/browse/ATLASG-182.
-For details on the deprecated legacy implementation (which provided OR
-prescriptions in a single monolithic tool), refer to
-`doc/README_legacy.rst <README_legacy.rst>`_.
-However, that code is no longer maintained.
+For documentation of legacy features, refer to the original package README
+in the SVN area:
+https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/AnalysisCommon/AssociationUtils/trunk/doc/README.rst
 
 ---------------------
 Overlap removal tools
@@ -81,14 +88,15 @@ type-specific and do a runtime type check.
 * EleJetOverlapTool - Implements the recommended ele-jet overlap removal
   based on dR cones, JVT, and user-set btagging decorations.
 * EleMuSharedTrkOverlapTool - Removes (input) electrons that share an ID track
-  with (input) muons. By default vetoes overlapping calo-muons.
+  with (input) muons. By default vetoes overlapping calo-muons. If activated,
+  electrons in a DR cone of a muon can be removed.
 * MuJetOverlapTool - Implements the recommended mu-jet overlap removal based
   on dR, jet track multiplicity, mu-jet PT ratios, and user-specified btagging.
 * TauLooseEleOverlapTool - Implements overlap removal between taus and loose
   electrons based on the LooseLH ID of the electron and a dR cone.
 * TauLooseMuOverlapTool - Implements overlap removal between taus and loose
   muons. The criteria considers muons based on PT and isCombined as
-  recommended in the harmonization document.
+  recommended in the run-2 harmonization document (`ATL-PHYS-INT-2014-018 <https://cds.cern.ch/record/1743654>`_).
 * ObjLinkOverlapTool - A generic tool which flags overlaps by looking for
   ElementLinks to other particles. This tool can be used to find overlaps in
   two stages. For example, one might use the EleMuSharedTrkOverlapTool to
@@ -148,10 +156,16 @@ in Athena environments. There are three pieces:
 
 **How to setup the working points**
 
-*Important note*: in the following snippets, the ORFlags and ToolBox
-objects are declared as locals. In your actual setup you will likely make
-these private members of some EventLoop algorithm or a parent tool or
-something like that.
+*Important notes*:
+
+* In the following snippets, the ORFlags and ToolBox objects are declared as
+  locals. In your actual setup you will likely make these private members of
+  some EventLoop algorithm or a parent tool or something like that.
+
+* The working points calculate delta-R using _rapidity_ instead of
+  pseudo-rapidity, as recommended in the run-2 harmonization note (more details about the motivations for
+  using rapidity can be found in `arXiv:1802.05356 [hep-ph] <https://arxiv.org/abs/1802.05356>`_).
+  You can override this with the UseRapdity property that all relevant tools support.
 
 *Standard working point* - you only need to set the tool and
 decoration names:
@@ -187,8 +201,8 @@ that you will apply to label bjets:
 *Heavy flavor and boosted object working point* - just combine the above
 settings and set both the bJetLabel and the boostedLeptons flag.
 
-*HSG2 overlap removal prescription* - HSG2 uses a modified overlap removal
-prescription including electron-electron overlap removal and the disabling
+*Lepton favored working point* - HSG2 uses a modified overlap removal
+prescription including electron-electron cluster matching and the disabling
 of the electron and muon rejections by jets. To configure this setup,
 do the following:
 
@@ -196,7 +210,6 @@ do the following:
 
     ORUtils::ORFlags orFlags(masterToolName, inputLabel, outputLabel);
     ORUtils::ToolBox toolBox;
-    orFlags.doEleEleOR = true;
     CHECK( ORUtils::recommendedTools(orFlags, toolBox) );
     CHECK( toolBox.eleEleORT.setProperty("UseClusterMatch", true) );
     CHECK( toolBox.eleJetORT.setProperty("OuterDR", 0.) );
@@ -260,8 +273,7 @@ in the RootCore examples above. Configure like thus:
     from AssociationUtils.config import recommended_tools
     orTool = recommended_tools(masterName=masterToolName,
                                inputLabel=inputLabel,
-                               outputLabel=outputLabel,
-                               doEleEleOR=True)
+                               outputLabel=outputLabel)
     orTool.EleEleORT.UseClusterMatch = True
     orTool.EleJetORT.OuterDR = 0.
     orTool.MuJetORT.OuterDR = 0.
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/AltMuJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/AltMuJetOverlapTool.cxx
index 995ab3009d9533ecd7a9ea69f7f48b6aa8d78869..99614287f44cb756e67b4ab8ad028919c974a327 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/AltMuJetOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/AltMuJetOverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // System includes
 #include <typeinfo>
 #include <limits>
@@ -53,18 +54,16 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   StatusCode AltMuJetOverlapTool::initializeDerived()
   {
-    using std::make_unique;
-
     // Initialize the b-jet helper
     if(!m_bJetLabel.empty())
-      m_bJetHelper = make_unique<BJetHelper> (m_bJetLabel);
+      m_bJetHelper = std::make_unique<BJetHelper> (m_bJetLabel);
 
     // Initialize the inner cone dR matcher
     m_dRMatchCone1 =
-      make_unique<DeltaRMatcher> (m_innerDR, m_useRapidity);
+      std::make_unique<DeltaRMatcher> (m_innerDR, m_useRapidity);
     // Initialize the sliding dR matcher
     m_dRMatchCone2 =
-      make_unique<SlidingDeltaRMatcher>
+      std::make_unique<SlidingDeltaRMatcher>
         (m_slidingDRC1, m_slidingDRC2, m_slidingDRMaxCone, m_useRapidity);
 
     return StatusCode::SUCCESS;
@@ -137,7 +136,7 @@ namespace ORUtils
         }
       }
     }
-    
+
     return StatusCode::SUCCESS;
   }
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/BJetHelper.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/BJetHelper.cxx
index 9ddcd1c6d9f6d025359ffcaf73d6f16fef3b8f35..7b2d634a3bcb6756c797d1b253b184a21dd36365 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/BJetHelper.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/BJetHelper.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 // Local includes
 #include "AssociationUtils/BJetHelper.h"
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/BaseOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/BaseOverlapTool.cxx
index 8fbf423c26b02818a8499462e9b601f521a37fbf..56e3ac2347063b012d7e29f00ec4ad8a32d49be4 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/BaseOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/BaseOverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // Local includes
 #include "AssociationUtils/BaseOverlapTool.h"
 
@@ -36,16 +37,19 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   StatusCode BaseOverlapTool::initialize()
   {
-    using std::make_unique;
     ATH_MSG_DEBUG("Initializing " << name());
+    ATH_MSG_DEBUG("Base config options: InputLabel " << m_inputLabel <<
+                  " OutputLabel " << m_outputLabel <<
+                  " OutputPassValue " << m_outputPassValue <<
+                  " UserPrio " << m_enableUserPrio);
 
     // Initialize the decoration helper
-    m_decHelper = make_unique<OverlapDecorationHelper>
+    m_decHelper = std::make_unique<OverlapDecorationHelper>
       (m_inputLabel, m_outputLabel, m_outputPassValue);
 
     // Initialize the obj-link helper
     if(m_linkOverlapObjects)
-      m_objLinkHelper = make_unique<OverlapLinkHelper>("overlapObject");
+      m_objLinkHelper = std::make_unique<OverlapLinkHelper>("overlapObject");
 
     // Initialize the derived tool
     ATH_CHECK( initializeDerived() );
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaRMatcher.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaRMatcher.cxx
index ee75a83eaf7b1f3168602d0f510657f141f901b7..cc7b150fec5e1b879f98b3e58bf477e7c6266dc1 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaRMatcher.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaRMatcher.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 // Framework includes
 #include "FourMomUtils/xAODP4Helpers.h"
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaROverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaROverlapTool.cxx
index dbc39aaacb0f877fa348cbf22513d13fb4a390d2..b6344c3c2f2eda6518f46ef1d67a9202331565a1 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaROverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaROverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // Primary include
 #include "AssociationUtils/DeltaROverlapTool.h"
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx
index 80dcdb09ec009cb62e1c51b7a8582e90ebc26389..4e6ceef19bb0712a5dd2e4166335c0d6cf330ecd 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // System includes
 #include <typeinfo>
 #include <exception>
@@ -61,6 +62,11 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   StatusCode EleEleOverlapTool::initializeDerived()
   {
+    ATH_MSG_DEBUG("UseTrackMatch " << m_useTrackMatch <<
+                  " UseClusterMatch " << m_useClusterMatch <<
+                  " ClusterDeltaEta " << m_clusterDeltaEta <<
+                  " ClusterDeltaPhi " << m_clusterDeltaPhi);
+
     // Sanity check
     if(!m_useTrackMatch && !m_useClusterMatch) {
       ATH_MSG_ERROR("You must enable at least one: UseTrackMatch or UseClusterMatch");
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleJetOverlapTool.cxx
index ecdbddeadca8851c5ce1dc771649e2898f2cd8c3..21d4244dcc3be10b4fbaa59afae9abc38bb63e75 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleJetOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleJetOverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // System includes
 #include <typeinfo>
 
@@ -27,6 +28,8 @@ namespace ORUtils
   {
     declareProperty("BJetLabel", m_bJetLabel = "",
                     "Input b-jet flag. Disabled by default.");
+    declareProperty("MaxElePtForBJetAwareOR", m_maxElePtForBJetAwareOR = 100.*GeV,
+                    "Max electron PT for b-tag aware OR. 100 GeV by default.");
     declareProperty("ApplyPtRatio", m_applyPtRatio = false,
                     "Toggle ele/jet PT ratio requirement");
     declareProperty("EleJetPtRatio", m_eleJetPtRatio = 0.8,
@@ -52,26 +55,41 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   StatusCode EleJetOverlapTool::initializeDerived()
   {
-    using std::make_unique;
-
     // Initialize the b-jet helper
     if(!m_bJetLabel.empty()) {
-      ATH_MSG_DEBUG("Configuring btag-aware OR with btag label: " << m_bJetLabel);
-      m_bJetHelper = make_unique<BJetHelper>(m_bJetLabel);
+
+      if (m_maxElePtForBJetAwareOR < 0){
+        m_maxElePtForBJetAwareOR = std::numeric_limits<double>::max();
+        ATH_MSG_DEBUG("Configuring btag-aware OR with btag label " <<
+                      m_bJetLabel << " for all electrons");
+      }
+      else{
+        ATH_MSG_DEBUG("Configuring btag-aware OR with btag label " <<
+                      m_bJetLabel << " for electrons below "
+                      << m_maxElePtForBJetAwareOR/GeV << " GeV");
+      }
+      m_bJetHelper = std::make_unique<BJetHelper>(m_bJetLabel);
     }
 
     // Initialize the dR matchers
-    m_dRMatchCone1 = make_unique<DeltaRMatcher>(m_innerDR, m_useRapidity);
+    ATH_MSG_DEBUG("Configuring ele-jet inner cone size " << m_innerDR);
+    m_dRMatchCone1 = std::make_unique<DeltaRMatcher>(m_innerDR, m_useRapidity);
     if(m_useSlidingDR) {
       ATH_MSG_DEBUG("Configuring sliding outer cone for ele-jet OR with " <<
                     "constants C1 = " << m_slidingDRC1 << ", C2 = " <<
                     m_slidingDRC2 << ", MaxCone = " << m_slidingDRMaxCone);
       m_dRMatchCone2 =
-        make_unique<SlidingDeltaRMatcher>
+        std::make_unique<SlidingDeltaRMatcher>
           (m_slidingDRC1, m_slidingDRC2, m_slidingDRMaxCone, m_useRapidity);
     }
     else {
-      m_dRMatchCone2 = make_unique<DeltaRMatcher>(m_outerDR, m_useRapidity);
+      ATH_MSG_DEBUG("Configuring ele-jet outer cone size " << m_outerDR);
+      m_dRMatchCone2 = std::make_unique<DeltaRMatcher>(m_outerDR, m_useRapidity);
+    }
+
+    // Additional debug printouts
+    if(m_applyPtRatio) {
+      ATH_MSG_DEBUG("Apply ele/jet PT ratio requirement at " << m_eleJetPtRatio);
     }
 
     return StatusCode::SUCCESS;
@@ -119,8 +137,9 @@ namespace ORUtils
 
       for(const auto jet : jets){
         if(!m_decHelper->isSurvivingObject(*jet)) continue;
-        // Don't reject user-defined b-tagged jets
-        if(m_bJetHelper && m_bJetHelper->isBJet(*jet)) continue;
+        // Don't reject user-defined b-tagged jets below an electron pT threshold
+        if(m_bJetHelper && m_bJetHelper->isBJet(*jet) &&
+           electron->pt() < m_maxElePtForBJetAwareOR) continue;
         // Don't reject jets with high relative PT
         if(m_applyPtRatio && (electron->pt()/jet->pt() < m_eleJetPtRatio)) continue;
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleMuSharedTrkOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleMuSharedTrkOverlapTool.cxx
index 686b532575a45760d69de9dc30c9124455f4e4f5..df0850f03a887dbe33a6e026bc601bfe66b0d360 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleMuSharedTrkOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleMuSharedTrkOverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // System includes
 #include <typeinfo>
 
@@ -22,9 +23,14 @@ namespace ORUtils
   EleMuSharedTrkOverlapTool::EleMuSharedTrkOverlapTool(const std::string& name)
     : BaseOverlapTool(name)
   {
-
     declareProperty("RemoveCaloMuons", m_removeCaloMuons = true,
                     "Turn on removal of overlapping calo muons");
+    declareProperty("UseDRMatching", m_useDRMatching = false,
+                    "Remove electrons in DR cone of muons");
+    declareProperty("DR", m_maxDR = 0.01,
+                    "Delta-R cone for flagging overlaps");
+    declareProperty("UseRapidity", m_useRapidity = true,
+                    "Calculate delta-R using rapidity");
   }
 
   //---------------------------------------------------------------------------
@@ -32,6 +38,16 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   StatusCode EleMuSharedTrkOverlapTool::initializeDerived()
   {
+
+    if(m_removeCaloMuons) {
+      ATH_MSG_DEBUG("Configuring removal of overlapping calo muons");
+    }
+
+    if(m_useDRMatching){
+      ATH_MSG_DEBUG("Configuring removal of electrons in delta R cone of " << m_maxDR);
+      m_dRMatcher = std::make_unique<DeltaRMatcher>(m_maxDR, m_useRapidity);
+    }
+
     return StatusCode::SUCCESS;
   }
 
@@ -117,7 +133,13 @@ namespace ORUtils
           xAOD::EgammaHelpers::getOriginalTrackParticle(electron);
 
         // Flag the electron as overlapping if they share the track
-        if(elTrk == muTrk) {
+        // or if they are DR matched
+        bool removeEle = (elTrk == muTrk);
+        if( (m_useDRMatching)
+            && (m_dRMatcher->objectsMatch(*electron, *muon)) ){
+          removeEle = true;
+        }
+        if(removeEle){
           ATH_CHECK( handleOverlap(electron, muon) );
         }
       }
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/LinkDef.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/LinkDef.h
deleted file mode 100644
index 6de3cc4588024a5c4eaf39c222507bd40e1383ed..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/LinkDef.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-#ifndef ASSOCIATIONUTILS_LINKDEF_H
-#define ASSOCIATIONUTILS_LINKDEF_H
-
-#ifdef __CLING__
-
-#include "AssociationUtils/OverlapRemovalTool.h"
-#include "AssociationUtils/BaseOverlapTool.h"
-#include "AssociationUtils/DeltaROverlapTool.h"
-#include "AssociationUtils/EleEleOverlapTool.h"
-#include "AssociationUtils/EleMuSharedTrkOverlapTool.h"
-#include "AssociationUtils/EleJetOverlapTool.h"
-#include "AssociationUtils/MuJetOverlapTool.h"
-#include "AssociationUtils/AltMuJetOverlapTool.h"
-#include "AssociationUtils/TauLooseEleOverlapTool.h"
-#include "AssociationUtils/TauLooseMuOverlapTool.h"
-#include "AssociationUtils/TauJetOverlapTool.h"
-#include "AssociationUtils/TauAntiTauJetOverlapTool.h"
-#include "AssociationUtils/ObjLinkOverlapTool.h"
-//#include "AssociationUtils/ORToolBox.h"
-#include "AssociationUtils/ToolBox.h"
-#include "AssociationUtils/BJetHelper.h"
-#include "AssociationUtils/DeltaRMatcher.h"
-#include "AssociationUtils/MuJetGhostDRMatcher.h"
-#include "AssociationUtils/OverlapDecorationHelper.h"
-#include "AssociationUtils/OverlapLinkHelper.h"
-
-#include "AssociationUtils/IOverlapRemovalToolLegacy.h"
-#include "AssociationUtils/OverlapRemovalToolLegacy.h"
-
-#pragma link off all globals;
-#pragma link off all classes;
-#pragma link off all functions;
-#pragma link C++ nestedclass;
-
-#pragma link C++ namespace ORUtils;
-#pragma link C++ class ORUtils::IOverlapRemovalTool+;
-#pragma link C++ class ORUtils::IOverlapTool+;
-#pragma link C++ class ORUtils::BaseOverlapTool+;
-#pragma link C++ class ORUtils::OverlapRemovalTool+;
-
-#pragma link C++ class ORUtils::DeltaROverlapTool+;
-#pragma link C++ class ORUtils::EleEleOverlapTool+;
-#pragma link C++ class ORUtils::EleJetOverlapTool+;
-#pragma link C++ class ORUtils::EleMuSharedTrkOverlapTool+;
-#pragma link C++ class ORUtils::MuJetOverlapTool+;
-#pragma link C++ class ORUtils::AltMuJetOverlapTool+;
-#pragma link C++ class ORUtils::TauLooseEleOverlapTool+;
-#pragma link C++ class ORUtils::TauLooseMuOverlapTool+;
-#pragma link C++ class ORUtils::TauJetOverlapTool+;
-#pragma link C++ class ORUtils::TauAntiTauJetOverlapTool+;
-#pragma link C++ class ORUtils::ObjLinkOverlapTool+;
-
-// Helpers
-#pragma link C++ class ORUtils::ToolBox+;
-//#pragma link C++ class ORUtils::ToolBoxBase+;
-//#pragma link C++ class ORUtils::ORToolBox+;
-#pragma link C++ class ORUtils::BJetHelper+;
-#pragma link C++ class ORUtils::DeltaRMatcher+;
-#pragma link C++ class ORUtils::SlidingDeltaRMatcher+;
-#pragma link C++ class ORUtils::MuJetGhostDRMatcher+;
-#pragma link C++ class ORUtils::OverlapDecorationHelper+;
-#pragma link C++ class ORUtils::OverlapLinkHelper+;
-
-// Legacy tools
-#pragma link C++ class IOverlapRemovalTool+;
-#pragma link C++ class OverlapRemovalTool+;
-
-#endif // __CLING__
-
-#endif // ASSOCIATIONUTILS_LINKDEF_H
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetGhostDRMatcher.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetGhostDRMatcher.cxx
index 2e9f6152da7e0b64b8e4173be945d65c53a2fe9c..f8571bcab7184756728bcf2f37406027ad5a8bf2 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetGhostDRMatcher.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetGhostDRMatcher.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // Infrastructure
 #include "AthContainers/AuxElement.h"
 #include "AthLinks/ElementLink.h"
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetOverlapTool.cxx
index 6293bf5259b0268869041a15a96ac665f17dbf0e..64c4a14e69c72b03fa8b2b4b9389a9e21672fd62 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetOverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // System includes
 #include <typeinfo>
 
@@ -64,21 +65,21 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   StatusCode MuJetOverlapTool::initializeDerived()
   {
-    using std::make_unique;
-
     // Initialize the b-jet helper
     if(!m_bJetLabel.empty()) {
       ATH_MSG_DEBUG("Configuring btag-aware OR with btag label: " << m_bJetLabel);
-      m_bJetHelper = make_unique<BJetHelper>(m_bJetLabel);
+      m_bJetHelper = std::make_unique<BJetHelper>(m_bJetLabel);
     }
 
     // Initialize the matcher for the 'inner' cone.
     if(m_useGhostAssociation) {
-      ATH_MSG_DEBUG("Configuring ghost association + dR matching for jet-mu OR");
-      m_dRMatchCone1 = make_unique<MuJetGhostDRMatcher>(m_innerDR, m_useRapidity);
+      ATH_MSG_DEBUG("Configuring ghost association + dR matching for jet-mu OR "
+                    "with inner cone size " << m_innerDR);
+      m_dRMatchCone1 = std::make_unique<MuJetGhostDRMatcher>(m_innerDR, m_useRapidity);
     }
     else {
-      m_dRMatchCone1 = make_unique<DeltaRMatcher>(m_innerDR, m_useRapidity);
+      ATH_MSG_DEBUG("Configuring mu-jet inner cone size " << m_innerDR);
+      m_dRMatchCone1 = std::make_unique<DeltaRMatcher>(m_innerDR, m_useRapidity);
     }
 
     // Use sliding dR or flat dR for the 'outer' cone.
@@ -87,12 +88,26 @@ namespace ORUtils
                     "constants C1 = " << m_slidingDRC1 << ", C2 = " <<
                     m_slidingDRC2 << ", MaxCone = " << m_slidingDRMaxCone);
       m_dRMatchCone2 =
-        make_unique<SlidingDeltaRMatcher>
+        std::make_unique<SlidingDeltaRMatcher>
           (m_slidingDRC1, m_slidingDRC2, m_slidingDRMaxCone, m_useRapidity);
     }
     else {
-      m_dRMatchCone2 = make_unique<DeltaRMatcher>(m_outerDR, m_useRapidity);
+      ATH_MSG_DEBUG("Configuring mu-jet outer cone size " << m_outerDR);
+      m_dRMatchCone2 = std::make_unique<DeltaRMatcher>(m_outerDR, m_useRapidity);
+    }
+
+    // Additional config printouts
+    ATH_MSG_DEBUG("Mu-jet matching config: NumJetTrk " << m_numJetTrk <<
+                  " ApplyRelPt " << m_applyRelPt <<
+                  " MuJetPtRatio " << m_muJetPtRatio <<
+                  " MuJetTrkPtRatio " << m_muJetTrkPtRatio);
+    if(!m_jetNumTrkDec.empty()) {
+      ATH_MSG_DEBUG("Using user-defined JetNumTrackDecoration " << m_jetNumTrkDec);
+    }
+    if(!m_jetSumTrkPtDec.empty()) {
+      ATH_MSG_DEBUG("Using user-defined JetSumTrackPTDecoration " << m_jetSumTrkPtDec);
     }
+
     return StatusCode::SUCCESS;
   }
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuPFJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuPFJetOverlapTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..81102ac4420fd23eb70985e41cde1a0b7e888785
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuPFJetOverlapTool.cxx
@@ -0,0 +1,223 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+// System includes
+#include <typeinfo>
+
+// Framework includes
+#include "AthContainers/ConstDataVector.h"
+
+// Local includes
+#include "AssociationUtils/MuPFJetOverlapTool.h"
+#include "AssociationUtils/DeltaRMatcher.h"
+
+namespace
+{
+  /// Unit conversion constants
+  const double GeV = 1e3;
+}
+
+namespace ORUtils
+{
+
+  //---------------------------------------------------------------------------
+  // Constructor
+  //---------------------------------------------------------------------------
+  MuPFJetOverlapTool::MuPFJetOverlapTool(const std::string& name)
+    : BaseOverlapTool(name)
+  {
+    declareProperty("NumJetTrk", m_numJetTrk = 4,
+                    "Min number of jet tracks to keep jet and remove muon");
+    declareProperty("JetNumTrackDecoration", m_jetNumTrkDec = "",
+                    "User-defined decoration for jet numTrack");
+    declareProperty("JetSumTrackPTDecoration", m_jetSumTrkPtDec = "",
+                    "User-defined decoration for jet sumTrackPT");
+    declareProperty("ConeDR", m_coneDR = 0.4,
+                    "Cone for removing jets");
+    declareProperty("MuPFJet_lowNtrk_x1", m_muPFJet_lowNtrk_x1 = 0.7,"");
+    declareProperty("MuPFJet_lowNtrk_x2", m_muPFJet_lowNtrk_x2 = 0.85,"");
+    declareProperty("MuPFJet_lowNtrk_y0", m_muPFJet_lowNtrk_y0 = 15.*GeV,"");
+    declareProperty("MuPFJet_lowNtrk_y1", m_muPFJet_lowNtrk_y1 = 15.*GeV,"");
+    declareProperty("MuPFJet_lowNtrk_y2", m_muPFJet_lowNtrk_y2 = 30.*GeV,"");
+    declareProperty("MuPFJet_highNtrk_x1", m_muPFJet_highNtrk_x1 = 0.6,"");
+    declareProperty("MuPFJet_highNtrk_x2", m_muPFJet_highNtrk_x2 = 0.9,"");
+    declareProperty("MuPFJet_highNtrk_y0", m_muPFJet_highNtrk_y0 = 5.*GeV,"");
+    declareProperty("MuPFJet_highNtrk_y1", m_muPFJet_highNtrk_y1 = 5.*GeV,"");
+    declareProperty("MuPFJet_highNtrk_y2", m_muPFJet_highNtrk_y2 = 30.*GeV,"");
+
+    declareProperty("UseRapidity", m_useRapidity = true,
+                    "Calculate delta-R using rapidity");
+  }
+
+  //---------------------------------------------------------------------------
+  // Initialize
+  //---------------------------------------------------------------------------
+  StatusCode MuPFJetOverlapTool::initializeDerived()
+  {
+
+    ATH_MSG_DEBUG("Configuring mu-pflow-jet cone size " << m_coneDR);
+    m_dRMatchCone = std::make_unique<DeltaRMatcher>(m_coneDR, m_useRapidity);
+
+    // Additional config printouts
+    ATH_MSG_DEBUG("PFlow jet removal which are identified as muons config: NumJetTrk " << m_numJetTrk <<
+                  " MuPFJet_lowNtrk_x1 " << m_muPFJet_lowNtrk_x1 <<
+                  " MuPFJet_lowNtrk_x2 " << m_muPFJet_lowNtrk_x2 <<
+                  " MuPFJet_lowNtrk_y0 " << m_muPFJet_lowNtrk_y0 <<
+                  " MuPFJet_lowNtrk_y1 " << m_muPFJet_lowNtrk_y1 <<
+                  " MuPFJet_lowNtrk_y2 " << m_muPFJet_lowNtrk_y2 <<
+                  " MuPFJet_highNtrk_x1 " << m_muPFJet_highNtrk_x1 <<
+                  " MuPFJet_highNtrk_x2 " << m_muPFJet_highNtrk_x2 <<
+                  " MuPFJet_highNtrk_y0 " << m_muPFJet_highNtrk_y0 <<
+                  " MuPFJet_highNtrk_y1 " << m_muPFJet_highNtrk_y1 <<
+                  " MuPFJet_highNtrk_y2 " << m_muPFJet_highNtrk_y2);
+    if(!m_jetNumTrkDec.empty()) {
+      ATH_MSG_DEBUG("Using user-defined JetNumTrackDecoration " << m_jetNumTrkDec);
+    }
+    if(!m_jetSumTrkPtDec.empty()) {
+      ATH_MSG_DEBUG("Using user-defined JetSumTrackPTDecoration " << m_jetSumTrkPtDec);
+    }
+
+    return StatusCode::SUCCESS;
+  }
+
+  //---------------------------------------------------------------------------
+  // Identify overlaps
+  //---------------------------------------------------------------------------
+  StatusCode MuPFJetOverlapTool::
+  findOverlaps(const xAOD::IParticleContainer& cont1,
+               const xAOD::IParticleContainer& cont2) const
+  {
+    // Check the container types
+    if(typeid(cont1) != typeid(xAOD::MuonContainer) &&
+       typeid(cont1) != typeid(ConstDataVector<xAOD::MuonContainer>)) {
+      ATH_MSG_ERROR("First container arg is not of type MuonContainer!");
+      return StatusCode::FAILURE;
+    }
+    if(typeid(cont2) != typeid(xAOD::JetContainer) &&
+       typeid(cont2) != typeid(ConstDataVector<xAOD::JetContainer>)) {
+      ATH_MSG_ERROR("Second container arg is not of type JetContainer!");
+      return StatusCode::FAILURE;
+    }
+    ATH_CHECK( findOverlaps(static_cast<const xAOD::MuonContainer&>(cont1),
+                            static_cast<const xAOD::JetContainer&>(cont2)) );
+    return StatusCode::SUCCESS;
+  }
+
+  //---------------------------------------------------------------------------
+  // Identify overlaps
+  //---------------------------------------------------------------------------
+  StatusCode MuPFJetOverlapTool::
+  findOverlaps(const xAOD::MuonContainer& muons,
+               const xAOD::JetContainer& jets) const
+  {
+    ATH_MSG_DEBUG("Removing overlapping muons and jets");
+
+    // Initialize output decorations if necessary
+    m_decHelper->initializeDecorations(muons);
+    m_decHelper->initializeDecorations(jets);
+
+    // Retrieve the primary vertex for later reference
+    size_t vtxIdx = 0;
+    if(m_jetNumTrkDec.empty() && m_jetSumTrkPtDec.empty()) {
+      auto vtx = getPrimVtx();
+      ATH_CHECK(vtx != nullptr);
+      vtxIdx = vtx->index();
+    }
+
+    // Remove suspicious jets that overlap with muons.
+    for(const xAOD::Muon* muon : muons){
+      if(!m_decHelper->isSurvivingObject(*muon)) continue;
+
+      for(const xAOD::Jet* jet : jets){
+        if(!m_decHelper->isSurvivingObject(*jet)) continue;
+
+        // Get the number of tracks and the sumPT of those tracks
+        int nTrk = getNumTracks(*jet, vtxIdx);
+        float sumTrkPt = getSumTrackPt(*jet, vtxIdx);
+
+        // Find muon ID track pT
+        float mu_id_pt(0);
+        typedef ElementLink<xAOD::TrackParticleContainer> TrackLink;
+        if(muon->isAvailable<TrackLink>("inDetTrackParticleLink")){
+          const TrackLink link = muon->auxdata<TrackLink>("inDetTrackParticleLink");
+          if(link.isValid() && muon->auxdata<unsigned short>("muonType")!=xAOD::Muon::SiliconAssociatedForwardMuon){
+            mu_id_pt=(*link)->pt();
+          }
+        }
+
+        // Find muon topoetcone40
+        static const SG::AuxElement::ConstAccessor< float > topoetcone40_acc("topoetcone40");
+        float mu_topoetcone40 = topoetcone40_acc(*muon);
+
+        bool removeJet=false;
+        if(m_dRMatchCone->objectsMatch(*muon, *jet)){
+          // determine if we are in the low or high nTrk
+          if (nTrk < m_numJetTrk){
+            if (mu_topoetcone40 < m_muPFJet_lowNtrk_y0) removeJet=true;
+            if (mu_topoetcone40<m_muPFJet_lowNtrk_y0+(m_muPFJet_lowNtrk_y2-m_muPFJet_lowNtrk_y1)/(m_muPFJet_lowNtrk_x2-m_muPFJet_lowNtrk_x1)*(mu_id_pt/sumTrkPt-m_muPFJet_lowNtrk_x1)) removeJet=true;
+            if (mu_id_pt/sumTrkPt>m_muPFJet_lowNtrk_x2) removeJet=true;
+          }else{
+            if (mu_topoetcone40 < m_muPFJet_highNtrk_y0) removeJet=true;
+            if (mu_topoetcone40<m_muPFJet_highNtrk_y0+(m_muPFJet_highNtrk_y2-m_muPFJet_highNtrk_y1)/(m_muPFJet_highNtrk_x2-m_muPFJet_highNtrk_x1)*(mu_id_pt/sumTrkPt-m_muPFJet_highNtrk_x1)) removeJet=true;
+            if (mu_id_pt/sumTrkPt>m_muPFJet_highNtrk_x2) removeJet=true;
+          }
+        }
+        if (removeJet==true) ATH_CHECK( handleOverlap(jet, muon) );
+
+      }
+    }
+
+    return StatusCode::SUCCESS;
+  }
+
+  //---------------------------------------------------------------------------
+  // Retrieve the primary vertex
+  //---------------------------------------------------------------------------
+  const xAOD::Vertex* MuPFJetOverlapTool::getPrimVtx() const
+  {
+    const char* contName = "PrimaryVertices";
+    const xAOD::VertexContainer* vertices = nullptr;
+    if(evtStore()->retrieve(vertices, contName).isSuccess()) {
+      for(const xAOD::Vertex* vtx : *vertices) {
+        if(vtx->vertexType() == xAOD::VxType::PriVtx)
+          return vtx;
+      }
+    }
+    else {
+      ATH_MSG_WARNING("Failed to retrieve " << contName);
+    }
+    // No PV found. We cannot execute the OR recommendations.
+    ATH_MSG_FATAL("No primary vertex in the PrimaryVertices container!");
+    return nullptr;
+  }
+
+  //---------------------------------------------------------------------------
+  // Get the number of tracks in a jet
+  //---------------------------------------------------------------------------
+  int MuPFJetOverlapTool::getNumTracks(const xAOD::Jet& jet, size_t vtxIdx) const
+  {
+    // Use the user decoration if configured
+    if(!m_jetNumTrkDec.empty()) {
+      static const SG::AuxElement::ConstAccessor< int > acc(m_jetNumTrkDec);
+      return acc(jet);
+    }
+    static const SG::AuxElement::ConstAccessor< std::vector<int> > acc("NumTrkPt500");
+    return acc(jet).at(vtxIdx);
+  }
+
+  //---------------------------------------------------------------------------
+  // Get the sum track pt of a jet
+  //---------------------------------------------------------------------------
+  float MuPFJetOverlapTool::getSumTrackPt(const xAOD::Jet& jet, size_t vtxIdx) const
+  {
+    // Use the user decoration if configured
+    if(!m_jetSumTrkPtDec.empty()) {
+      static const SG::AuxElement::ConstAccessor< float > acc(m_jetSumTrkPtDec);
+      return acc(jet);
+    }
+    static const SG::AuxElement::ConstAccessor< std::vector<float> > acc("SumPtTrkPt500");
+    return acc(jet).at(vtxIdx);
+  }
+
+} // namespace ORUtils
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/ORToolBox.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/ORToolBox.cxx
deleted file mode 100644
index ac8df74fb8b16f23b22c2e92390f1ec1bf6a2705..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/ORToolBox.cxx
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-// This should only be compiled in RootCore
-#ifdef ROOTCORE
-
-// ROOT includes
-#include "TError.h"
-
-// Local includes
-#include "AssociationUtils/ORToolBox.h"
-
-static const std::string masterKey = "master";
-
-namespace ORUtils
-{
-
-  //---------------------------------------------------------------------------
-  // Initialize all tools in the toolbox
-  //---------------------------------------------------------------------------
-  StatusCode ToolBoxBase::initialize()
-  {
-    for(auto& keyTool : m_tools) {
-      if(keyTool.second->initialize().isFailure())
-        return StatusCode::FAILURE;
-    }
-    return StatusCode::SUCCESS;
-  }
-
-  //---------------------------------------------------------------------------
-  // Set message levels
-  //---------------------------------------------------------------------------
-  void ToolBoxBase::setMsgLevel(MSG::Level lvl)
-  {
-    for(auto& keyTool : m_tools)
-      keyTool.second->msg().setLevel(lvl);
-  }
-
-  //---------------------------------------------------------------------------
-  // Retrieve a tool pointer
-  //---------------------------------------------------------------------------
-  asg::AsgTool* ToolBoxBase::getTool(const std::string& key, bool quiet)
-  {
-    auto itr = m_tools.find(key);
-    if(itr == m_tools.end()) {
-      if(!quiet){
-        ::Warning("ToolBoxBase::getTool",
-                  "Failed to retrieve tool with key %s", key.c_str());
-      }
-      return nullptr;
-    }
-    return itr->second.get();
-  }
-
-  //---------------------------------------------------------------------------
-  // Add tool to the toolbox
-  //---------------------------------------------------------------------------
-  void ToolBoxBase::setTool(const std::string& key,
-                        std::unique_ptr<asg::AsgTool> tool)
-  { m_tools[key] = std::move(tool); }
-
-  //---------------------------------------------------------------------------
-  // Const-iterate over map elements
-  //---------------------------------------------------------------------------
-  ToolBoxBase::const_iterator ToolBoxBase::begin() const
-  { return m_tools.begin(); }
-  //---------------------------------------------------------------------------
-  ToolBoxBase::const_iterator ToolBoxBase::end() const
-  { return m_tools.end(); }
-
-  //---------------------------------------------------------------------------
-  // Get ptr to master tool
-  //---------------------------------------------------------------------------
-  asg::AsgTool* ORToolBox::getMasterTool()
-  { return getTool(masterKey); }
-
-  //---------------------------------------------------------------------------
-  // Set ptr to master tool
-  //---------------------------------------------------------------------------
-  void ORToolBox::setMasterTool(std::unique_ptr<asg::AsgTool> tool)
-  {
-    setTool( masterKey, std::move(tool) );
-  }
-
-  //---------------------------------------------------------------------------
-  // Add one overlap tool to the toolbox
-  //---------------------------------------------------------------------------
-  StatusCode ORToolBox::addOverlapTool(std::unique_ptr<asg::AsgTool> tool,
-                                       std::string key)
-  {
-    if(key.empty()) key = tool->name();
-    // Assign to master tool if available
-    auto masterTool = getMasterTool();
-    if(masterTool) {
-      ToolHandle<IOverlapTool> handle( tool->name() );
-      if(masterTool->setProperty(key, handle).isFailure()) {
-        ::Error("ORToolBox::addOverlapTool",
-                "Failed to assign tool to master with key %s", key.c_str());
-        return StatusCode::FAILURE;
-      }
-    }
-    // Consume the tool
-    setTool( key, std::move(tool) );
-    return StatusCode::SUCCESS;
-  }
-
-  //---------------------------------------------------------------------------
-  // Get a tool handle
-  //---------------------------------------------------------------------------
-  ToolHandle<IOverlapTool> ORToolBox::getHandle(const std::string& key)
-  {
-    auto tool = dynamic_cast<IOverlapTool*>( getTool(key) );
-    if(!tool) {
-      ::Error("ORToolBox::getHandle",
-              "Failed to cast tool with key %s to IOverlapTool", key.c_str());
-    }
-    return ToolHandle<IOverlapTool>(tool);
-  }
-
-  //---------------------------------------------------------------------------
-  // Get master tool handle
-  //---------------------------------------------------------------------------
-  ToolHandle<IOverlapRemovalTool> ORToolBox::getMasterHandle()
-  {
-    auto tool = dynamic_cast<IOverlapRemovalTool*>( getTool(masterKey) );
-    if(!tool) {
-      ::Error("ORToolBox::getMasterHandle",
-              "Failed to cast master tool to IOverlapRemovalTool");
-    }
-    return ToolHandle<IOverlapRemovalTool>(tool);
-  }
-
-} // namespace ORUtils
-
-#endif // ROOTCORE
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/ObjLinkOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/ObjLinkOverlapTool.cxx
index 9b5d8eb27e0180c674de0712fb583da22d71370e..934aa2d19f8ba589993465e0893b6ba588d3bfe2 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/ObjLinkOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/ObjLinkOverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // Local includes
 #include "AssociationUtils/ObjLinkOverlapTool.h"
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapDecorationHelper.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapDecorationHelper.cxx
index 6b4028c1f6277cc50afe7b66fee3f7012745a85f..2c0c831f936fa2a680537ea16c70a5eacd0f8649 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapDecorationHelper.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapDecorationHelper.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 // Local includes
 #include "AssociationUtils/OverlapDecorationHelper.h"
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapLinkHelper.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapLinkHelper.cxx
index 7b4e7c4a26f20a5286a593e74c8662d78c0f5e45..8b3db4e9f74f2314f6005934de7286a507bdbbf0 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapLinkHelper.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapLinkHelper.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 // Local includes
 #include "AssociationUtils/OverlapLinkHelper.h"
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalGenUseAlg.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalGenUseAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b60460a5a9b32657c477d4923e707127b9fb63a7
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalGenUseAlg.cxx
@@ -0,0 +1,252 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// EDM includes
+
+// Local includes
+#include "AssociationUtils/OverlapRemovalDefs.h"
+#include "AssociationUtils/OverlapRemovalGenUseAlg.h"
+
+namespace
+{
+  /// Unit conversion constants
+  const float GeV = 1000.;
+  const float invGeV = 1./GeV;
+}
+
+//-----------------------------------------------------------------------------
+// Constructor
+//-----------------------------------------------------------------------------
+OverlapRemovalGenUseAlg::OverlapRemovalGenUseAlg(const std::string& name,
+		ISvcLocator* svcLoc)
+	: EL::AnaAlgorithm(name, svcLoc),
+	m_orTool("OverlapRemovalTool", this)
+{
+    declareProperty("OverlapRemovalTool", m_orTool);
+    declareProperty("SelectionLabel", m_selectionLabel="selected",
+                    "Input label for the OverlapRemovalTool");
+    declareProperty("OverlapLabel", m_overlapLabel="overlaps",
+                    "Output label for the OverlapRemovalTool");
+    declareProperty("DefaultValue", m_defaultValue=true,
+                    "Default value for objects failing OR");
+    declareProperty("JetKey", m_jetKey="AntiKt4EMTopoJets",
+                    "StoreGate/TEvent key for jets");
+    declareProperty("BJetLabel", m_bJetLabel="",
+                    "Input label for b-tagged jets");
+    declareProperty("ElectronKey", m_electronKey="Electrons",
+                    "StoreGate/TEvent key for electrons");
+    declareProperty("ElectronLabel", m_electronLabel="DFCommonElectronsLHLoose",
+                    "Input label for passing electrons");
+    declareProperty("PhotonKey", m_photonKey="Photons",
+                    "StoreGate/TEvent key for photons");
+    declareProperty("PhotonLabel", m_photonLabel="DFCommonPhotonsIsEMLoose",
+                    "Input label for passing photons");
+    declareProperty("MuonKey", m_muonKey="Muons",
+                    "StoreGate/TEvent key for muons");
+    declareProperty("MuonLabel", m_muonLabel="DFCommonGoodMuon",
+                    "Input label for passing muons");
+    declareProperty("TauKey", m_tauKey="TauJets",
+                    "StoreGate/TEvent key for taus");
+    declareProperty("TauLabel", m_tauLabel="DFCommonTausLoose",
+                    "Input label for passing taus");
+    declareProperty("PtCut", m_ptCut = 20.0,
+                    "Minimum pt for consideration");
+    declareProperty("EtaCut", m_etaCut = 4.5,
+                    "Maximum eta for consideration");
+
+}
+
+
+//-----------------------------------------------------------------------------
+// Initialize
+//-----------------------------------------------------------------------------
+StatusCode OverlapRemovalGenUseAlg::initialize()
+{
+	ATH_MSG_INFO("Initialize");
+
+	// Try to retrieve the tool
+	ATH_CHECK( m_orTool.retrieve() );
+
+	return StatusCode::SUCCESS;
+}
+
+//-----------------------------------------------------------------------------
+// Execute
+//-----------------------------------------------------------------------------
+StatusCode OverlapRemovalGenUseAlg::execute()
+{
+    // Electrons
+    const xAOD::ElectronContainer* electrons = 0;
+    ATH_CHECK( evtStore()->retrieve(electrons, m_electronKey) );
+    applySelection(*electrons);
+    // Muons
+    const xAOD::MuonContainer* muons = 0;
+    ATH_CHECK( evtStore()->retrieve(muons, m_muonKey) );
+    applySelection(*muons);
+    // Jets
+    const xAOD::JetContainer* jets = 0;
+    ATH_CHECK( evtStore()->retrieve(jets, m_jetKey) );
+    applySelection(*jets);
+    // Taus
+    const xAOD::TauJetContainer* taus = 0;
+    if(!m_tauKey.empty()) {
+        ATH_CHECK( evtStore()->retrieve(taus, m_tauKey) );
+        applySelection(*taus);
+    }
+    // Photons
+    const xAOD::PhotonContainer* photons = 0;
+    if(!m_photonKey.empty()) {
+        ATH_CHECK( evtStore()->retrieve(photons, m_photonKey) );
+        applySelection(*photons);
+    }
+
+    // Primary Vertices
+    const xAOD::VertexContainer* vertices = nullptr;
+    int checkVtx = 0;
+    if(evtStore()->retrieve(vertices, "PrimaryVertices").isSuccess()) {
+        for(auto vtx : *vertices) {
+            if(vtx->vertexType() == xAOD::VxType::PriVtx)
+                checkVtx = 1;
+        }
+    }
+
+    if(checkVtx==1){
+        // Apply the overlap removal
+        ATH_CHECK( m_orTool->removeOverlaps(electrons, muons, jets, taus, photons) );}
+    else{
+        // Reset all decorations to failing
+        ATH_MSG_DEBUG("No primary vertices found, cannot do overlap removal! Will return all fails.");
+        setDefaultDecorations(*jets);
+        setDefaultDecorations(*electrons);
+        setDefaultDecorations(*muons);
+        if(taus)      setDefaultDecorations(*taus);
+        if(photons)   setDefaultDecorations(*photons);
+    }
+
+    // Dump the objects
+    ATH_MSG_VERBOSE("Dumping results");
+#ifdef XAOD_STANDALONE
+    auto msglvl = msg().level();
+#else
+    auto msglvl = msgLevel();
+#endif
+    if(msglvl >= MSG::VERBOSE){
+        printObjects(*electrons, "ele");
+        printObjects(*muons, "muo");
+        printObjects(*jets, "jet");
+        if(taus) printObjects(*taus, "tau");
+        if(photons) printObjects(*photons, "pho");
+    }
+
+    return StatusCode::SUCCESS;
+}
+
+//---------------------------------------------------------------------------
+// Reset output decoration
+//---------------------------------------------------------------------------
+	template<class ContainerType>
+void OverlapRemovalGenUseAlg::setDefaultDecorations(const ContainerType& container)
+{
+	static ort::inputDecorator_t defaultDec(m_overlapLabel);
+	for(auto obj : container){
+		defaultDec(*obj) = m_defaultValue; //default to all objects being overlaps if we can't get primary vertices. Ensures the event cleaning decision fails.
+	}
+}
+
+
+//-----------------------------------------------------------------------------
+// Apply selection to a container
+//-----------------------------------------------------------------------------
+	template<class ContainerType>
+void OverlapRemovalGenUseAlg::applySelection(const ContainerType& container)
+{
+	static ort::inputDecorator_t selDec(m_selectionLabel);
+	for(auto obj : container){
+		selDec(*obj) = selectObject(*obj);
+        ATH_MSG_VERBOSE("  Obj " << obj->index() << " of type " << obj->type()
+                        << " selected? " << int(selDec(*obj)));
+	}
+}
+//-----------------------------------------------------------------------------
+template<class ObjType>
+bool OverlapRemovalGenUseAlg::selectObject(const ObjType& obj)
+{
+  if(obj.pt() < m_ptCut*GeV || std::abs(obj.eta()) > m_etaCut) return false;
+  return true;
+}
+//-----------------------------------------------------------------------------
+template<>
+bool OverlapRemovalGenUseAlg::selectObject<xAOD::Jet>(const xAOD::Jet& obj)
+{
+  // Label bjets
+  //const static SG::AuxElement::ConstAccessor<float> acc_applyBTag("DFCommonJets_FixedCutBEff_85_MV2c10");
+  //static ort::inputDecorator_t bJetDec(m_bJetLabel);
+  //bJetDec(obj) = acc_applyBTag(obj);
+  // Selection
+  if(obj.pt() < m_ptCut*GeV || std::abs(obj.eta()) > m_etaCut) return false;
+  return true;
+}
+
+//-----------------------------------------------------------------------------
+template<>
+bool OverlapRemovalGenUseAlg::selectObject<xAOD::Electron>(const xAOD::Electron& obj)
+{
+  const static SG::AuxElement::ConstAccessor<char> acc_ElectronPass(m_electronLabel);
+  if(m_electronLabel.empty()) return true;    //disable selection for objects with empty labels
+  if(obj.pt() < m_ptCut*GeV || std::abs(obj.eta()) > m_etaCut) return false;
+  if(!acc_ElectronPass(obj)) return false;
+  return true;
+}
+
+//-----------------------------------------------------------------------------
+template<>
+bool OverlapRemovalGenUseAlg::selectObject<xAOD::Photon>(const xAOD::Photon& obj)
+{
+  const static SG::AuxElement::ConstAccessor<char> acc_PhotonPass(m_photonLabel);
+  if(m_photonLabel.empty()) return true;    //disable selection for objects with empty labels
+  if(obj.pt() < m_ptCut*GeV || std::abs(obj.eta()) > m_etaCut) return false;
+  if(!acc_PhotonPass(obj)) return false;
+  return true;
+}
+
+//-----------------------------------------------------------------------------
+template<>
+bool OverlapRemovalGenUseAlg::selectObject<xAOD::Muon>(const xAOD::Muon& obj)
+{
+  const static SG::AuxElement::ConstAccessor<char> acc_MuonPass(m_muonLabel);
+  if(m_muonLabel.empty()) return true;    //disable selection for objects with empty labels
+  if(obj.pt() < m_ptCut*GeV || std::abs(obj.eta()) > m_etaCut) return false;
+  if(!acc_MuonPass(obj)) return false;
+  return true;
+}
+
+//-----------------------------------------------------------------------------
+template<>
+bool OverlapRemovalGenUseAlg::selectObject<xAOD::TauJet>(const xAOD::TauJet& obj)
+{
+  const static SG::AuxElement::ConstAccessor<char> acc_TauPass(m_tauLabel);
+  if(m_tauLabel.empty()) return true;    //disable selection for objects with empty labels
+  if(obj.pt() < m_ptCut*GeV || std::abs(obj.eta()) > m_etaCut) return false;
+  if(!acc_TauPass(obj)) return false;
+  return true;
+}
+
+
+//-----------------------------------------------------------------------------
+// Print object
+//-----------------------------------------------------------------------------
+void OverlapRemovalGenUseAlg::printObjects(const xAOD::IParticleContainer& container,
+                                         const std::string& type)
+{
+  static ort::inputAccessor_t selectAcc(m_selectionLabel);
+  static ort::outputAccessor_t overlapAcc(m_overlapLabel);
+  for(auto obj : container){
+    if(selectAcc(*obj)){
+      bool overlaps = overlapAcc(*obj);
+      ATH_MSG_VERBOSE("  " << type << " pt " << obj->pt()*invGeV
+                    << " eta " << obj->eta() << " phi " << obj->phi()
+                    << " overlaps " << overlaps);
+    }
+  }
+}
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalInit.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalInit.cxx
index 3cc69bdceaf7ac894356e9eea3585d0a6419b470..911f8eb66d050cf780eab51ae240ba3ef23a9805 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalInit.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalInit.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // System includes
 #include <limits>
 
@@ -13,6 +14,7 @@
 #include "AssociationUtils/EleMuSharedTrkOverlapTool.h"
 #include "AssociationUtils/EleJetOverlapTool.h"
 #include "AssociationUtils/MuJetOverlapTool.h"
+#include "AssociationUtils/MuPFJetOverlapTool.h"
 #include "AssociationUtils/TauLooseEleOverlapTool.h"
 #include "AssociationUtils/TauLooseMuOverlapTool.h"
 #include "AssociationUtils/OverlapRemovalTool.h"
@@ -52,6 +54,12 @@ namespace ORUtils
     tbox.masterTool.setTypeAndName("ORUtils::OverlapRemovalTool/" +
                                    flags.masterName);
 
+    // Muon-PFlow fake-jet
+    if(flags.doMuPFJetOR && tbox.muPFJetORT.empty()) {
+      tbox.muPFJetORT.setTypeAndName("ORUtils::MuPFJetOverlapTool/" +
+                                   flags.masterName + ".MuPFJetORT");
+    }
+
     // El-el
     if(flags.doElectrons && flags.doEleEleOR && tbox.eleEleORT.empty()) {
       tbox.eleEleORT.setTypeAndName("ORUtils::EleEleOverlapTool/" +
@@ -68,6 +76,7 @@ namespace ORUtils
       tbox.eleJetORT.setTypeAndName("ORUtils::EleJetOverlapTool/" +
                                     flags.masterName + ".EleJetORT");
       ORT_CHECK( tbox.eleJetORT.setProperty("BJetLabel", flags.bJetLabel) );
+      ORT_CHECK( tbox.eleJetORT.setProperty("MaxElePtForBJetAwareOR", flags.maxElePtForBJetAwareOR) );
       ORT_CHECK( tbox.eleJetORT.setProperty("UseSlidingDR", flags.boostedLeptons) );
     }
     // Mu-jet
@@ -140,142 +149,6 @@ namespace ORUtils
     return StatusCode::SUCCESS;
   }
 
-#ifdef ROOTCORE
-
-  //---------------------------------------------------------------------------
-  // Preconfigured harmonization tools
-  //---------------------------------------------------------------------------
-  StatusCode recommendedTools(ORToolBox& tbox,
-                              const std::string& name,
-                              const std::string& inputLabel,
-                              const std::string& outputLabel,
-                              const std::string& bJetLabel,
-                              bool boostedLeptons,
-                              bool outputPassValue,
-                              bool doTaus, bool doPhotons)
-  {
-    using std::make_unique;
-
-    // The master tool
-    tbox.setMasterTool( make_unique<OverlapRemovalTool>(name) );
-
-    // El-mu overlap
-    auto eleMuORT = make_unique<EleMuSharedTrkOverlapTool>(name + "_EleMuORT");
-    ORT_CHECK( tbox.addOverlapTool(std::move(eleMuORT), "EleMuORT") );
-    // El-jet overlap tool
-    auto eleJetORT = make_unique<EleJetOverlapTool>(name + "_EleJetORT");
-    ORT_CHECK( eleJetORT->setProperty("BJetLabel", bJetLabel) );
-    ORT_CHECK( eleJetORT->setProperty("UseSlidingDR", boostedLeptons) );
-    ORT_CHECK( tbox.addOverlapTool(std::move(eleJetORT), "EleJetORT") );
-    // Mu-jet overlap tool
-    auto muJetORT = make_unique<MuJetOverlapTool>(name + "_MuJetORT");
-    ORT_CHECK( muJetORT->setProperty("BJetLabel", bJetLabel) );
-    ORT_CHECK( muJetORT->setProperty("UseSlidingDR", boostedLeptons) );
-    ORT_CHECK( tbox.addOverlapTool(std::move(muJetORT), "MuJetORT") );
-
-    if(doTaus) {
-
-      // Tau-ele overlap tool
-      auto tauEleORT = make_unique<DeltaROverlapTool>(name + "_TauEleORT");
-      ORT_CHECK( tauEleORT->setProperty("DR", 0.2) );
-      ORT_CHECK( tbox.addOverlapTool(std::move(tauEleORT), "TauEleORT") );
-
-      // Tau-mu overlap tool
-      auto tauMuORT = make_unique<DeltaROverlapTool>(name + "_TauMuORT");
-      ORT_CHECK( tauMuORT->setProperty("DR", 0.2) );
-      ORT_CHECK( tbox.addOverlapTool(std::move(tauMuORT), "TauMuORT") );
-
-      // Tau-jet overlap tool
-      auto tauJetORT = make_unique<DeltaROverlapTool>(name + "_TauJetORT");
-      ORT_CHECK( tauJetORT->setProperty("DR", 0.2) );
-      ORT_CHECK( tbox.addOverlapTool(std::move(tauJetORT), "TauJetORT") );
-
-    }
-
-    if(doPhotons) {
-      // Pho-ele overlap tool
-      auto phoEleORT = make_unique<DeltaROverlapTool>(name + "_PhoEleORT");
-      ORT_CHECK( tbox.addOverlapTool(std::move(phoEleORT), "PhoEleORT") );
-      // Pho-mu overlap tool
-      auto phoMuORT = make_unique<DeltaROverlapTool>(name + "_PhoMuORT");
-      ORT_CHECK( tbox.addOverlapTool(std::move(phoMuORT), "PhoMuORT") );
-      // Pho-jet overlap tool
-      auto phoJetORT = make_unique<DeltaROverlapTool>(name + "_PhoJetORT");
-      ORT_CHECK( tbox.addOverlapTool(std::move(phoJetORT), "PhoJetORT") );
-    }
-
-    // For now, input and output labels are set on all tools equally
-    for(auto& keyToolPair : tbox) {
-      ORT_CHECK( keyToolPair.second->setProperty("InputLabel", inputLabel) );
-      ORT_CHECK( keyToolPair.second->setProperty("OutputLabel", outputLabel) );
-      ORT_CHECK( keyToolPair.second->setProperty("OutputPassValue", outputPassValue) );
-    }
-
-    return StatusCode::SUCCESS;
-  }
-
-  //---------------------------------------------------------------------------
-  // Preconfigured harmonization tools
-  //---------------------------------------------------------------------------
-  StatusCode harmonizedTools(ORToolBox& tbox,
-                             const std::string& name,
-                             const std::string& inputLabel,
-                             const std::string& outputLabel,
-                             bool outputPassValue,
-                             bool doTaus, bool doPhotons)
-  {
-    // Get the standard pre-configured tools
-    const std::string bJetLabel = "";
-    const bool boostedLeptons = false;
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-    ORT_CHECK( recommendedTools(tbox, name, inputLabel, outputLabel, bJetLabel,
-                                boostedLeptons, outputPassValue, false, doPhotons) );
-#pragma GCC diagnostic pop
-
-    // Override some properties to disable features
-    auto eleMuORT = tbox.getTool("EleMuORT");
-    ORT_CHECK( eleMuORT != nullptr );
-    ORT_CHECK( eleMuORT->setProperty("RemoveCaloMuons", false) );
-
-    auto eleJetORT = tbox.getTool("EleJetORT");
-    ORT_CHECK( eleJetORT != nullptr );
-
-    auto muJetORT = tbox.getTool("MuJetORT");
-    ORT_CHECK( muJetORT != nullptr );
-    ORT_CHECK( muJetORT->setProperty("ApplyRelPt", false) );
-    ORT_CHECK( muJetORT->setProperty("UseGhostAssociation", false) );
-    ORT_CHECK( muJetORT->setProperty("InnerDR", 0.4) );
-
-    // Fill the tau loose-lepton OR recommendations
-    if(doTaus) {
-      using std::make_unique;
-      // Tau-ele overlap tool
-      auto tauEleORT = make_unique<TauLooseEleOverlapTool>(name + "_TauEleORT");
-      ORT_CHECK( tauEleORT->setProperty("InputLabel", inputLabel) );
-      ORT_CHECK( tauEleORT->setProperty("OutputLabel", outputLabel) );
-      ORT_CHECK( tauEleORT->setProperty("OutputPassValue", outputPassValue) );
-      ORT_CHECK( tbox.addOverlapTool(std::move(tauEleORT), "TauEleORT") );
-      // Tau-mu overlap tool
-      auto tauMuORT = make_unique<TauLooseMuOverlapTool>(name + "_TauMuORT");
-      ORT_CHECK( tauMuORT->setProperty("InputLabel", inputLabel) );
-      ORT_CHECK( tauMuORT->setProperty("OutputLabel", outputLabel) );
-      ORT_CHECK( tauMuORT->setProperty("OutputPassValue", outputPassValue) );
-      ORT_CHECK( tbox.addOverlapTool(std::move(tauMuORT), "TauMuORT") );
-      // Tau-jet overlap tool
-      auto tauJetORT = make_unique<DeltaROverlapTool>(name + "_TauJetORT");
-      ORT_CHECK( tauJetORT->setProperty("InputLabel", inputLabel) );
-      ORT_CHECK( tauJetORT->setProperty("OutputLabel", outputLabel) );
-      ORT_CHECK( tauJetORT->setProperty("OutputPassValue", outputPassValue) );
-      ORT_CHECK( tauJetORT->setProperty("DR", 0.2) );
-      ORT_CHECK( tbox.addOverlapTool(std::move(tauJetORT), "TauJetORT") );
-    }
-
-    return StatusCode::SUCCESS;
-  }
-
-#endif // ROOTCORE
-
 }
 
 #undef ORT_CHECK
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalTool.cxx
index ebf6bbd98867092fe9415594a79a8bf11de36262..20557e7ca432b4f2711f1dc6fd01eecdc31466c3 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // Local includes
 #include "AssociationUtils/OverlapRemovalTool.h"
 #include "AssociationUtils/MacroChecks.h"
@@ -14,12 +15,13 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   OverlapRemovalTool::OverlapRemovalTool(const std::string& name)
     : asg::AsgTool(name),
-      m_eleEleORT("", this),
+      m_muPFJetORT("", this), m_eleEleORT("", this),
       m_eleMuORT("", this), m_eleJetORT("", this), m_muJetORT("", this),
       m_tauEleORT("", this), m_tauMuORT("", this), m_tauJetORT("", this),
       m_phoEleORT("", this), m_phoMuORT("", this), m_phoJetORT("", this),
       m_eleFatJetORT("", this), m_jetFatJetORT("", this)
   {
+    declareProperty("MuPFJetORT", m_muPFJetORT, "Muon-jet overlap tool");
     declareProperty("EleEleORT", m_eleEleORT, "Electron-electron overlap tool");
     declareProperty("EleMuORT", m_eleMuORT, "Electron-muon overlap tool");
     declareProperty("EleJetORT", m_eleJetORT, "Electron-jet overlap tool");
@@ -49,7 +51,10 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   StatusCode OverlapRemovalTool::initialize()
   {
-    ATH_MSG_DEBUG("initialize");
+    ATH_MSG_DEBUG("Initializing master tool " << name());
+    ATH_MSG_DEBUG("Master tool config: InputLabel " << m_inputLabel <<
+                  " OutputLabel " << m_outputLabel <<
+                  " OutputPassValue " << m_outputPassValue);
 
     // Initialize the decoration helper
     m_decHelper =
@@ -57,6 +62,7 @@ namespace ORUtils
         (m_inputLabel, m_outputLabel, m_outputPassValue);
 
     // Retrieve the configured tools
+    if(!m_muPFJetORT.empty())  ATH_CHECK( m_muPFJetORT.retrieve() );
     if(!m_eleEleORT.empty()) ATH_CHECK( m_eleEleORT.retrieve() );
     if(!m_eleMuORT.empty())  ATH_CHECK( m_eleMuORT.retrieve() );
     if(!m_eleJetORT.empty()) ATH_CHECK( m_eleJetORT.retrieve() );
@@ -96,6 +102,8 @@ namespace ORUtils
     // NOTE: some details are still unspecific in the recommendations.
     // Talk to me if this does not support your needs.
 
+    // PFlow-Muon-jet OR
+    ATH_CHECK( removeOverlap(m_muPFJetORT, muons, jets) );
     // Electron-electron OR
     ATH_CHECK( removeOverlap(m_eleEleORT, electrons, electrons) );
     // Tau-electron OR
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalToolLegacy.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalToolLegacy.cxx
deleted file mode 100644
index 95cba9aab4749d50bbcc248838e0c08cb6eabf94..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/OverlapRemovalToolLegacy.cxx
+++ /dev/null
@@ -1,705 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-// EDM includes
-#include "AthContainers/AuxElement.h"
-#include "xAODEgamma/ElectronxAODHelpers.h"
-
-// Local includes
-#include "AssociationUtils/OverlapRemovalTool.h"
-
-const float invGeV = 0.001;
-
-//-----------------------------------------------------------------------------
-// Standard constructor
-//-----------------------------------------------------------------------------
-OverlapRemovalTool::OverlapRemovalTool(const std::string& name)
-        : asg::AsgTool(name),
-          m_inputAccessor(nullptr),
-          m_outputDecorator(nullptr),
-          m_bJetAccessor(nullptr),
-          m_overlapLinkDecorator(nullptr),
-          m_sharedTrackDecorator(nullptr),
-          m_sharedTrackAccessor(nullptr)
-{
-  // Input/output labels
-  declareProperty("InputLabel", m_inputLabel = "selected");
-  declareProperty("OverlapLabel", m_overlapLabel = "overlaps",
-                  "Decoration given to objects that fail OR");
-  // BJet label
-  declareProperty("BJetLabel", m_bJetLabel = "",
-                  "Input b-jet flag. Disable by default.");
-  // Overlap object link decorations
-  declareProperty("LinkOverlapObjects", m_linkOverlapObjects = false,
-                  "Turn on overlap object link decorations");
-  // El-mu shared track decorations
-  declareProperty("WriteSharedTrackFlag", m_writeSharedTrackFlag = false,
-                 "Turn on electron flag if track overlaps with muon track");
-  declareProperty("UseSharedTrackFlag", m_useSharedTrackFlag = false,
-                 "Read electron flag for muon-electron track OR.");
-  // dR cones for defining overlap
-  declareProperty("ElectronJetDRCone",    m_electronJetDR    = 0.2);
-  declareProperty("JetElectronDRCone",    m_jetElectronDR    = 0.4);
-  declareProperty("MuonJetDRCone",        m_muonJetDR        = 0.4);
-  declareProperty("TauJetDRCone",         m_tauJetDR         = 0.2);
-  declareProperty("TauElectronDRCone",    m_tauElectronDR    = 0.2);
-  declareProperty("TauMuonDRCone",        m_tauMuonDR        = 0.2);
-  declareProperty("PhotonElectronDRCone", m_photonElectronDR = 0.4);
-  declareProperty("PhotonMuonDRCone",     m_photonMuonDR     = 0.4);
-  declareProperty("PhotonPhotonDRCone",   m_photonPhotonDR   = 0.4);
-  declareProperty("PhotonJetDRCone",      m_photonJetDR      = 0.4);
-
-  // Selection properties
-  const float GeV = 1000.;
-  declareProperty("TauElectronOverlapID", m_tauEleOverlapID = "LHLoose",
-                  "Electron ID selection for tau-ele OR");
-  declareProperty("TauMuonOverlapMuPtMin", m_tauMuOverlapMuPt = 2.*GeV,
-                  "Muon pt threshold for tau-muon OR");
-  declareProperty("TauMuonOverlapTauPt", m_tauMuOverlapTauPt = 50.*GeV,
-                  "Tau pt above which only combined muons are considered");
-}
-
-//-----------------------------------------------------------------------------
-// Destructor
-//-----------------------------------------------------------------------------
-OverlapRemovalTool::~OverlapRemovalTool()
-{
-  delete m_inputAccessor;
-  delete m_outputDecorator;
-  delete m_bJetAccessor;
-  delete m_overlapLinkDecorator;
-  delete m_sharedTrackDecorator;
-  delete m_sharedTrackAccessor;
-}
-
-//-----------------------------------------------------------------------------
-// Initialize the tool
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::initialize()
-{
-  if(!m_inputLabel.empty())
-    m_inputAccessor = new ort::inputAccessor_t(m_inputLabel);
-  if(!m_bJetLabel.empty())
-    m_bJetAccessor = new ort::inputAccessor_t(m_bJetLabel);
-  m_outputDecorator = new ort::outputDecorator_t(m_overlapLabel);
-  m_overlapLinkDecorator = new ort::objLinkDecorator_t("overlapObject");
-  // These flags could be done optional as well
-  m_sharedTrackDecorator = new ort::sharedTrackDecorator_t("hasSharedTrack");
-  m_sharedTrackAccessor = new ort::sharedTrackAccessor_t("hasSharedTrack");
-
-  // Consistency check
-  if(m_writeSharedTrackFlag && m_useSharedTrackFlag) {
-    ATH_MSG_ERROR("Need to decide: either write or read flag " <<
-                  "on muon-electron track OR!");
-    return StatusCode::FAILURE;
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Remove all overlapping objects according to the official
-// harmonization prescription
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::
-removeOverlaps(const xAOD::ElectronContainer* electrons,
-               const xAOD::MuonContainer* muons,
-               const xAOD::JetContainer* jets,
-               const xAOD::TauJetContainer* taus,
-               const xAOD::PhotonContainer* photons)
-{
-  return removeOverlaps(electrons, muons, jets, taus,
-                        electrons, muons, photons);
-}
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::
-removeOverlaps(const xAOD::ElectronContainer* electrons,
-               const xAOD::MuonContainer* muons,
-               const xAOD::JetContainer* jets,
-               const xAOD::TauJetContainer* taus,
-               const xAOD::ElectronContainer* looseElectrons,
-               const xAOD::MuonContainer* looseMuons,
-               const xAOD::PhotonContainer* photons)
-{
-  // Check pointer validity. I can add more flexibility later,
-  // but for now, if users don't want to use one of these object types,
-  // they can use the lower-level methods instead.
-  if(!electrons || !muons || !jets){
-    ATH_MSG_ERROR("Encountered NULL pointer in required object");
-    return StatusCode::FAILURE;
-  }
-  if(taus && !(looseElectrons && looseMuons)){
-    ATH_MSG_ERROR("Taus provided but loose leptons are NULL!");
-    return StatusCode::FAILURE;
-  }
-
-  // Reset all decorations to passing
-  resetDecorations(*electrons);
-  resetDecorations(*muons);
-  resetDecorations(*jets);
-  if(photons) resetDecorations(*photons);
-  if(taus) resetDecorations(*taus);
-
-  // Check that we have what we need for the track-sharing decoration
-  if(m_useSharedTrackFlag){
-    // Check that electron is decorated for this mode
-    if(!checkSharesTrackDecoration(*electrons)){
-      ATH_MSG_ERROR("Flag for electron-muon track OR not found in input!");
-      if(checkTrackParticles(*electrons))
-        ATH_MSG_ERROR("But TrackParticles are available in input to run " <<
-                      "nominal muon-electron OR!");
-      return StatusCode::FAILURE;
-    }
-  }
-
-  // Following recommended removal sequence from harmonization note.
-  // NOTE: some details are still unspecific in the recommendations.
-  // Talk to me if this does not support your needs.
-
-  // Tau and loose ele/mu OR
-  if(taus){
-    ATH_CHECK( removeTauEleOverlap(*taus, *looseElectrons) );
-    ATH_CHECK( removeTauMuonOverlap(*taus, *looseMuons) );
-  }
-  // e-mu OR
-  ATH_CHECK( removeEleMuonOverlap(*electrons, *muons) );
-  // photon and e/mu OR
-  if(photons){
-    // TODO: need a pho-tau OR?
-    // Turning off pho-pho for now. Resolved by reco..?
-    //ATH_CHECK( removePhotonPhotonOverlap(*photons) );
-    ATH_CHECK( removePhotonEleOverlap(*photons, *electrons) );
-    ATH_CHECK( removePhotonMuonOverlap(*photons, *muons) );
-  }
-  // lep/photon and jet OR
-  ATH_CHECK( removeEleJetOverlap(*electrons, *jets) );
-  ATH_CHECK( removeMuonJetOverlap(*muons, *jets) );
-  if(taus) ATH_CHECK( removeTauJetOverlap(*taus, *jets) );
-  if(photons) ATH_CHECK( removePhotonJetOverlap(*photons, *jets) );
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Remove overlapping electrons and jets
-// Need two steps so as to avoid using rejected jets in the 2nd step.
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::removeEleJetOverlap
-(const xAOD::ElectronContainer& electrons, const xAOD::JetContainer& jets)
-{
-  ATH_MSG_DEBUG("Removing overlapping electrons and jets");
-
-  // Initialize output decoration if necessary
-  initializeDecorations(electrons);
-  initializeDecorations(jets);
-
-  // Remove jets that overlap with electrons
-  for(const auto jet : jets){
-    // Check that this jet passes the input selection
-    if(isSurvivingObject(jet) && !isBJet(jet)){
-      // Use the generic OR method
-      if(objectOverlaps(jet, electrons, m_electronJetDR)){
-        ATH_MSG_DEBUG("  Found overlap jet: " << jet->pt()*invGeV);
-        setObjectFail(jet);
-      }
-    }
-  }
-
-  // Remove electrons that overlap with surviving jets
-  // Maybe this should get its own method.
-  for(const auto electron : electrons){
-    // Check that this electron passes the input selection
-    if(isSurvivingObject(electron)){
-      // Use the generic OR method
-      if(objectOverlaps(electron, jets, m_jetElectronDR)){
-        ATH_MSG_DEBUG("  Found overlap ele: " << electron->pt()*invGeV);
-        setObjectFail(electron);
-      }
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Remove overlapping muons and jets
-// Note that because of the numTrack requirement on the jet,
-// we are able to do this in just one double loop, unlike ele-jet.
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::removeMuonJetOverlap
-(const xAOD::MuonContainer& muons, const xAOD::JetContainer& jets)
-{
-  ATH_MSG_DEBUG("Removing overlapping muons and jets");
-
-  // Initialize output decoration if necessary
-  initializeDecorations(muons);
-  initializeDecorations(jets);
-
-  // Convenience macro
-  #define numTrk(jet) \
-    jet->getAttribute< std::vector<int> >(xAOD::JetAttribute::NumTrkPt500)[0]
-
-  // Remove jets that overlap with muons
-  for(const auto jet : jets){
-    // Only remove low-trk-multiplicity jets
-    if(isSurvivingObject(jet) && numTrk(jet) <= 2){
-      if(objectOverlaps(jet, muons, m_muonJetDR)){
-        ATH_MSG_DEBUG("  Found overlap jet: " << jet->pt()*invGeV);
-        setObjectFail(jet);
-      }
-    }
-  }
-  // Remove muons that overlap with jets
-  for(const auto muon : muons){
-    if(isSurvivingObject(muon)){
-      for(const auto jet : jets){
-        // Only remove from high-trk-multiplicity jets
-        if(isSurvivingObject(jet) && numTrk(jet) > 2){
-          if(objectsOverlap(muon, jet, m_muonJetDR)){
-            ATH_MSG_DEBUG("  Found overlap muon: " << muon->pt()*invGeV);
-            setObjectFail(muon);
-          }
-        }
-      }
-    }
-  }
-
-  #undef numTrk
-
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Remove overlapping electrons and muons
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::removeEleMuonOverlap
-(const xAOD::ElectronContainer& electrons, const xAOD::MuonContainer& muons)
-{
-  ATH_MSG_DEBUG("Removing electrons that overlap with muons");
-
-  // Initialize output decorations if necessary
-  initializeDecorations(electrons);
-  initializeDecorations(muons);
-  if(m_writeSharedTrackFlag)
-    initializeSharesTrackDecoration(electrons);
-
-  // Loop over electrons
-  for(const auto electron : electrons){
-    if(isSurvivingObject(electron)){
-      if(m_useSharedTrackFlag){
-        if(sharesTrack(electron)) setObjectFail(electron);
-      }
-      else{
-        const xAOD::TrackParticle* elTrk =
-          xAOD::EgammaHelpers::getOriginalTrackParticle(electron);
-        bool sharesTrack = false;
-        // Loop over muons
-        for(const auto muon : muons){
-          const xAOD::TrackParticle* muTrk =
-            muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
-          // Discard electron if they share an ID track
-          if(isSurvivingObject(muon) && (elTrk == muTrk)){
-            ATH_MSG_DEBUG("  Found overlap ele: " << electron->pt()*invGeV
-                          << " with mu: " << muon->pt()*invGeV);
-            if(m_linkOverlapObjects){
-              ATH_CHECK( addOverlapObjectLink(electron, muon) );
-            }
-            setObjectFail(electron);
-            sharesTrack = true;
-            break;
-          }
-        }
-        if(m_writeSharedTrackFlag){
-          ATH_CHECK( setSharesTrackDecoration(electron,sharesTrack) );
-        }
-      }
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Remove overlapping hadronic taus and jets
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::removeTauJetOverlap(const xAOD::TauJetContainer& taus,
-                                                   const xAOD::JetContainer& jets)
-{
-  ATH_MSG_DEBUG("Removing jets that overlap with taus");
-
-  // Initialize output decoration if necessary
-  initializeDecorations(taus);
-  initializeDecorations(jets);
-
-  // Loop over jets
-  for(const auto jet : jets){
-    // Check that this jet passes the input selection
-    if(isSurvivingObject(jet)){
-      if(objectOverlaps(jet, taus, m_tauJetDR)){
-        ATH_MSG_DEBUG("  Found overlap jet: " << jet->pt()*invGeV);
-        setObjectFail(jet);
-      }
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Remove overlapping hadronic taus and electrons
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::removeTauEleOverlap
-(const xAOD::TauJetContainer& taus, const xAOD::ElectronContainer& electrons)
-{
-  ATH_MSG_DEBUG("Removing taus that overlap with loose electrons");
-
-  // Initialize output decoration if necessary
-  initializeDecorations(taus);
-  initializeDecorations(electrons);
-
-  // Remove tau if overlaps with a loose electron
-  for(const auto tau : taus){
-    if(isSurvivingObject(tau)){
-      for(const auto electron : electrons){
-        // Loose electron criteria doesn't use the input label
-        // decoration. For now we use our own custom criteria.
-        if(!isRejectedObject(electron)){
-          // TODO: use faster method. This is slow.
-          bool passID = false;
-          // TODO: move to helper method: isLooseEleForTauEleOR
-          if(!electron->passSelection(passID, m_tauEleOverlapID)){
-            ATH_MSG_ERROR("Electron ID for tau-ele OR not available: "
-                          << m_tauEleOverlapID);
-            return StatusCode::FAILURE;
-          }
-          if(passID && objectsOverlap(tau, electron, m_tauElectronDR)){
-            ATH_MSG_DEBUG("  Found overlapping tau with pt "
-                          << tau->pt()*invGeV);
-            setObjectFail(tau);
-            break;
-          } // electron overlaps
-        } // is surviving electron
-      } // electron loop
-    } // is surviving tau
-  } // tau loop
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Remove overlapping hadronic taus and muons
-// This function loop could be combined with the electron one above for speed.
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::removeTauMuonOverlap
-(const xAOD::TauJetContainer& taus, const xAOD::MuonContainer& muons)
-{
-  ATH_MSG_DEBUG("Removing taus that overlap with loose muons");
-
-  // Initialize output decoration if necessary
-  initializeDecorations(taus);
-  initializeDecorations(muons);
-
-  // Remove tau if overlaps with a loose muon
-  for(const auto tau : taus){
-    if(isSurvivingObject(tau)){
-      for(const auto muon : muons){
-        // Loose muon criteria doesn't use the input label
-        // decoration. For now we use own own custom criteria.
-        if(!isRejectedObject(muon) && muon->pt() > m_tauMuOverlapMuPt){
-          // Higher pt taus only rejected if overlapping with combined muon
-          if(tau->pt() < m_tauMuOverlapTauPt ||
-             muon->muonType() == xAOD::Muon::Combined)
-          {
-            if(objectsOverlap(tau, muon, m_tauMuonDR)){
-              ATH_MSG_DEBUG("  Found overlapping tau with pt "
-                            << tau->pt()*invGeV);
-              setObjectFail(tau);
-              break;
-            } // mu-tau overlap
-          } // soft tau or combined muon
-        } // is loose muon
-      } // muon loop
-    } // is surviving tau
-  } // tau loop
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Remove overlapping photons and electrons
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::removePhotonEleOverlap
-(const xAOD::PhotonContainer& photons, const xAOD::ElectronContainer& electrons)
-{
-  ATH_MSG_DEBUG("Removing photons overlapping with electrons");
-
-  // Initialize output decoration if necessary
-  initializeDecorations(photons);
-  initializeDecorations(electrons);
-
-  for(const auto photon : photons){
-    if(isSurvivingObject(photon)){
-      if(objectOverlaps(photon, electrons, m_photonElectronDR)){
-        ATH_MSG_DEBUG("  Found overlap pho: " << photon->pt()*invGeV);
-        setObjectFail(photon);
-      }
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Remove overlapping photons and muons
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::removePhotonMuonOverlap
-(const xAOD::PhotonContainer& photons, const xAOD::MuonContainer& muons)
-{
-  ATH_MSG_DEBUG("Removing photons overlapping with muons");
-
-  // Initialize output decoration if necessary
-  initializeDecorations(photons);
-  initializeDecorations(muons);
-
-  for(const auto photon : photons){
-    if(isSurvivingObject(photon)){
-      if(objectOverlaps(photon, muons, m_photonMuonDR)){
-        ATH_MSG_DEBUG("  Found overlap pho: " << photon->pt()*invGeV);
-        setObjectFail(photon);
-      }
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Remove overlapping photons and electrons
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::removePhotonPhotonOverlap
-(const xAOD::PhotonContainer& photons)
-{
-  ATH_MSG_DEBUG("Removing overlapping photons");
-
-  // Initialize output decoration if necessary
-  initializeDecorations(photons);
-
-  for(const auto photon : photons){
-    if(isSurvivingObject(photon)){
-      if(objectOverlaps(photon, photons, m_photonPhotonDR)){
-        ATH_MSG_DEBUG("  Found overlap pho: " << photon->pt()*invGeV);
-        setObjectFail(photon);
-      }
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Remove overlapping photons and jets
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::removePhotonJetOverlap
-(const xAOD::PhotonContainer& photons, const xAOD::JetContainer& jets)
-{
-  ATH_MSG_DEBUG("Removing jets overlapping with photons");
-
-  // Initialize output decoration if necessary
-  initializeDecorations(photons);
-  initializeDecorations(jets);
-
-  for(const auto jet : jets){
-    if(isSurvivingObject(jet)){
-      if(objectOverlaps(jet, photons, m_photonJetDR)){
-        ATH_MSG_DEBUG("  Found overlap jet: " << jet->pt()*invGeV);
-        setObjectFail(jet);
-      }
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Generic dR-based overlap check between one object and a container
-//-----------------------------------------------------------------------------
-bool OverlapRemovalTool::objectOverlaps(const xAOD::IParticle* obj,
-                                        const xAOD::IParticleContainer& container,
-                                        double dR)
-{
-  for(const auto contObj : container){
-    if(isSurvivingObject(contObj)){
-      // Make sure these are not the same object
-      if(obj == contObj) continue;
-      if(objectsOverlap(obj, contObj, dR)) return true;
-    }
-  }
-  return false;
-}
-
-//-----------------------------------------------------------------------------
-// Loose lepton IDs for tau-lepton OR
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::isLooseEleForTauEleOR
-(const xAOD::Electron* electron, bool& pass)
-{
-  if(!electron->passSelection(pass, m_tauEleOverlapID)){
-    ATH_MSG_ERROR("Electron ID for tau-ele OR not available: "
-                  << m_tauEleOverlapID);
-    return StatusCode::FAILURE;
-  }
-  return StatusCode::SUCCESS;
-}
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::isLooseMuonForTauMuonOR
-(const xAOD::Muon* muon, bool& pass)
-{
-  if(muon->pt() > m_tauMuOverlapMuPt) pass = true;
-  else pass = false;
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Check if jet is labeled as a b-jet
-//-----------------------------------------------------------------------------
-bool OverlapRemovalTool::isBJet(const xAOD::Jet* jet)
-{
-  return m_bJetAccessor && (*m_bJetAccessor)(*jet);
-}
-
-//-----------------------------------------------------------------------------
-// Check if two objects overlap in a dR window
-//-----------------------------------------------------------------------------
-bool OverlapRemovalTool::objectsOverlap(const xAOD::IParticle* p1,
-                                        const xAOD::IParticle* p2,
-                                        double dRMax, double dRMin)
-{
-  double dR2 = deltaR2(p1, p2);
-  // TODO: use fpcompare utilities
-  if(dR2 < (dRMax*dRMax) && dR2 >= (dRMin*dRMin)){
-    // Is this the best place for setting the link?
-    if(m_linkOverlapObjects){
-      ATH_CHECK( addOverlapObjectLink(p1, p2), false );
-    }
-    return true;
-  }
-  return false;
-}
-
-//-----------------------------------------------------------------------------
-// Add overlap object link
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::addOverlapObjectLink(const xAOD::IParticle* p1,
-                                                    const xAOD::IParticle* p2)
-{
-  // For first simple implementation, use a single object link.
-  // Might migrate to an array of links, to allow future expansion of the
-  // functionality to include all possible object overlaps.
-  const xAOD::IParticleContainer* overlapContainer =
-    static_cast<const xAOD::IParticleContainer*>(p2->container());
-  (*m_overlapLinkDecorator)(*p1) =
-    ort::objLink_t(*overlapContainer, p2->index());
-
-  return StatusCode::SUCCESS;
-}
-
-//-----------------------------------------------------------------------------
-// Calculate delta R between two particles
-//-----------------------------------------------------------------------------
-double OverlapRemovalTool::deltaR2(const xAOD::IParticle* p1,
-                                   const xAOD::IParticle* p2)
-{
-  double dY = p1->rapidity() - p2->rapidity();
-  double dPhi = TVector2::Phi_mpi_pi(p1->phi() - p2->phi());
-  return dY*dY + dPhi*dPhi;
-}
-//-----------------------------------------------------------------------------
-double OverlapRemovalTool::deltaR(const xAOD::IParticle* p1,
-                                  const xAOD::IParticle* p2)
-{ return sqrt(deltaR2(p1, p2)); }
-
-//-----------------------------------------------------------------------------
-// Determine if object is currently OK for input to OR
-//-----------------------------------------------------------------------------
-bool OverlapRemovalTool::isInputObject(const xAOD::IParticle* obj)
-{
-  // Input label is turned off if empty string
-  if(m_inputLabel.empty()) return true;
-  return (*m_inputAccessor)(*obj);
-}
-
-//-----------------------------------------------------------------------------
-// Determine if object is currently rejected by OR.
-//-----------------------------------------------------------------------------
-bool OverlapRemovalTool::isRejectedObject(const xAOD::IParticle* obj)
-{
-  if((*m_outputDecorator)(*obj) == true) return true;
-  return false;
-}
-
-//-----------------------------------------------------------------------------
-void OverlapRemovalTool::setOverlapDecoration(const xAOD::IParticle* obj,
-                                              bool overlaps)
-{ (*m_outputDecorator)(*obj) = overlaps; }
-
-//-----------------------------------------------------------------------------
-// Check if output decoration has been applied to a container
-//-----------------------------------------------------------------------------
-bool OverlapRemovalTool::isDecorated(const xAOD::IParticleContainer& container)
-{
-  return container.size() > 0 &&
-         (*m_outputDecorator).isAvailable(*container[0]);
-}
-
-//-----------------------------------------------------------------------------
-// Initialize output decoration
-//-----------------------------------------------------------------------------
-void OverlapRemovalTool::initializeDecorations
-(const xAOD::IParticleContainer& container)
-{
-  if(!isDecorated(container))
-    resetDecorations(container);
-}
-//-----------------------------------------------------------------------------
-// Reset output decoration
-//-----------------------------------------------------------------------------
-void OverlapRemovalTool::resetDecorations
-(const xAOD::IParticleContainer& container)
-{
-  for(auto obj : container) setObjectPass(obj);
-}
-
-//-----------------------------------------------------------------------------
-// Determine from / decorate flag if electron shares track with muon
-//-----------------------------------------------------------------------------
-bool OverlapRemovalTool::checkTrackParticles(const xAOD::ElectronContainer& container)
-{
-  if(container.size()){
-    const xAOD::TrackParticle* elTrk = 0;
-    elTrk = container[0]->trackParticle();
-    if(!elTrk) return false;
-  }
-  return true;
-}
-//-----------------------------------------------------------------------------
-
-bool OverlapRemovalTool::checkSharesTrackDecoration(const xAOD::ElectronContainer& container)
-{
-  if(container.size())
-    return (*m_sharedTrackAccessor).isAvailable(*container[0]);
-
-  return true;
-}
-
-//-----------------------------------------------------------------------------
-void OverlapRemovalTool::initializeSharesTrackDecoration
-(const xAOD::ElectronContainer& container)
-{
-  for(auto obj : container){
-    (*m_sharedTrackDecorator)(*obj) = false;
-  }
-}
-//-----------------------------------------------------------------------------
-StatusCode OverlapRemovalTool::setSharesTrackDecoration(const xAOD::IParticle* obj,
-                                                        bool sharesTrack)
-
-{
-  (*m_sharedTrackDecorator)(*obj) = sharesTrack;
-  return StatusCode::SUCCESS;
-}
-//-----------------------------------------------------------------------------
-bool OverlapRemovalTool::sharesTrack(const xAOD::IParticle* obj)
-{
-  if((*m_sharedTrackAccessor)(*obj) == true) return true;
-  return false;
-}
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauAntiTauJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauAntiTauJetOverlapTool.cxx
index bc0cfe35f0f47438ce3ac999001a96790b0b38f1..96bef46bbd35d5e2a572df45f3d4da13c2411f90 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauAntiTauJetOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauAntiTauJetOverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // System includes
 #include <typeinfo>
 
@@ -41,22 +42,20 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   StatusCode TauAntiTauJetOverlapTool::initializeDerived()
   {
-    using std::make_unique;
-
     // Initialize the b-jet helper
     if(!m_bJetLabel.empty()) {
       ATH_MSG_DEBUG("Configuring btag-aware OR with btag label: " << m_bJetLabel);
-      m_bJetHelper = make_unique<BJetHelper>(m_bJetLabel);
+      m_bJetHelper = std::make_unique<BJetHelper>(m_bJetLabel);
     }
 
     // Initialize the dR matcher
-    m_dRMatcher = make_unique<DeltaRMatcher>(m_dR, m_useRapidity);
+    m_dRMatcher = std::make_unique<DeltaRMatcher>(m_dR, m_useRapidity);
 
     // Initialize the anti-tau decoration helper
     if(!m_antiTauLabel.empty()) {
       ATH_MSG_DEBUG("Configuring anti-tau OR with label: " << m_antiTauLabel);
       m_antiTauDecHelper =
-        make_unique<OverlapDecorationHelper>
+        std::make_unique<OverlapDecorationHelper>
           (m_antiTauLabel, m_outputLabel, m_outputPassValue);
     }
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauJetOverlapTool.cxx
index 423188a608bb6e892018ab6ff2e3131d1b892851..d3c4f6117124b41a30b8c5fa015b8760d86d10b0 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauJetOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauJetOverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // System includes
 #include <typeinfo>
 
@@ -32,16 +33,14 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   StatusCode TauJetOverlapTool::initializeDerived()
   {
-    using std::make_unique;
-
     // Initialize the b-jet helper
     if(!m_bJetLabel.empty()) {
       ATH_MSG_DEBUG("Configuring btag-aware OR with btag label: " << m_bJetLabel);
-      m_bJetHelper = make_unique<BJetHelper>(m_bJetLabel);
+      m_bJetHelper = std::make_unique<BJetHelper>(m_bJetLabel);
     }
 
     // Initialize the dR matcher
-    m_dRMatcher = make_unique<DeltaRMatcher>(m_dR, m_useRapidity);
+    m_dRMatcher = std::make_unique<DeltaRMatcher>(m_dR, m_useRapidity);
 
     return StatusCode::SUCCESS;
   }
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseEleOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseEleOverlapTool.cxx
index 3339c81d6932f6838207faded7a546c5ad04ad60..ca796c113c6e5e5b34bc82e31d16ed7263d8b1b1 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseEleOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseEleOverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // System includes
 #include <typeinfo>
 
@@ -34,10 +35,8 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   StatusCode TauLooseEleOverlapTool::initializeDerived()
   {
-    using std::make_unique;
-
     // Initialize the dR matcher
-    m_dRMatcher = make_unique<DeltaRMatcher>(m_maxDR, m_useRapidity);
+    m_dRMatcher = std::make_unique<DeltaRMatcher>(m_maxDR, m_useRapidity);
 
     return StatusCode::SUCCESS;
   }
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseMuOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseMuOverlapTool.cxx
index 3b4ab104e90fb805fd533c82fddf452e5fa2b8f1..a0dfc9c23e584f637c91ea3e453309c019f3d4ce 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseMuOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseMuOverlapTool.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
+
 // System includes
 #include <typeinfo>
 
@@ -40,10 +41,9 @@ namespace ORUtils
   //---------------------------------------------------------------------------
   StatusCode TauLooseMuOverlapTool::initializeDerived()
   {
-    using std::make_unique;
 
     // Initialize the dR matcher
-    m_dRMatcher = make_unique<DeltaRMatcher> (m_maxDR, m_useRapidity);
+    m_dRMatcher = std::make_unique<DeltaRMatcher> (m_maxDR, m_useRapidity);
 
     return StatusCode::SUCCESS;
   }
@@ -105,7 +105,7 @@ namespace ORUtils
           ATH_CHECK( handleOverlap(tau, muon) );
         }
       }
-    }  
+    }
 
     return StatusCode::SUCCESS;
   }
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/ToolBox.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/ToolBox.cxx
index 0d0ac9f913ea040db727f7b2d28e282db8b8fd47..f27707b70f49c3efbb768ac1f280f2e079c68987 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/ToolBox.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/ToolBox.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 // Local includes
 #include "AssociationUtils/ToolBox.h"
 
@@ -13,6 +14,7 @@ namespace ORUtils
   ToolBox::ToolBox(const std::string& name, parentType_t* theParent)
     : asg::AsgMessaging(name),
       masterTool("", theParent),
+      muPFJetORT("", theParent),
       eleEleORT("", theParent),
       eleMuORT("", theParent),
       eleJetORT("", theParent),
@@ -45,6 +47,7 @@ namespace ORUtils
 #endif
 
     // Initialize the overlap tools
+    ATH_CHECK( initTool(muPFJetORT, "MuPFJetORT") );
     ATH_CHECK( initTool(eleEleORT, "EleEleORT") );
     ATH_CHECK( initTool(eleMuORT, "EleMuORT") );
     ATH_CHECK( initTool(eleJetORT, "EleJetORT") );
@@ -71,7 +74,8 @@ namespace ORUtils
   {
     // This is somewhat error prone, but better than not having it.
     std::vector<OverlapHandle_t*> tools;
-    tools.reserve(11);
+    tools.reserve(13);
+    if(!muPFJetORT.empty())  tools.push_back(&muPFJetORT);
     if(!eleEleORT.empty()) tools.push_back(&eleEleORT);
     if(!eleMuORT.empty())  tools.push_back(&eleMuORT);
     if(!eleJetORT.empty()) tools.push_back(&eleJetORT);
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py
index 2e2b86eb9b1a49f3a556721c60dc0967ae8b0901..842c6d20ad5cb6e41abdcaad1d0ced9fed912c68 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py
@@ -1,3 +1,5 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
 """ AssociationUtils/config.py
     This file contains the configuration helper code for the overlap removal
     tools in Athena. It is a work in progress. It may in fact be possible to
@@ -11,6 +13,7 @@ from AthenaCommon.Constants import INFO
 from AssociationUtils.AssociationUtilsConf import (
     ORUtils__OverlapRemovalTool as OverlapRemovalTool,
     ORUtils__DeltaROverlapTool as DeltaROverlapTool,
+    ORUtils__MuPFJetOverlapTool as MuPFJetOverlapTool,
     ORUtils__EleEleOverlapTool as EleEleOverlapTool,
     ORUtils__EleJetOverlapTool as EleJetOverlapTool,
     ORUtils__EleMuSharedTrkOverlapTool as EleMuSharedTrkOverlapTool,
@@ -22,12 +25,13 @@ from AssociationUtils.AssociationUtilsConf import (
 #-------------------------------------------------------------------------------
 def recommended_tools(masterName='OverlapRemovalTool',
                       inputLabel='selected', outputLabel='overlaps',
-                      bJetLabel='', boostedLeptons=False,
+                      bJetLabel='', maxElePtForBJetAwareOR = 100. * 1000,
+                      boostedLeptons=False,
                       outputPassValue=False,
                       linkOverlapObjects=False,
                       doEleEleOR=False,
                       doElectrons=True, doMuons=True, doJets=True,
-                      doTaus=True, doPhotons=True, doFatJets=False,
+                      doTaus=True, doPhotons=True, doFatJets=False, doMuPFJetOR=False,
                       **kwargs):
     """
     Provides the pre-configured overlap removal recommendations.
@@ -40,6 +44,9 @@ def recommended_tools(masterName='OverlapRemovalTool',
       outputLabel        - set the OutputLabel property for all tools.
       bJetLabel          - set user bjet decoration name. Leave blank to
                            disable btag-aware overlap removal.
+      maxElePtForBJetAwareOR  - set the maximum electron pT for which b-tag
+                           aware overlap removal is done. Set to negative
+                           value to use for all electrons.
       boostedLeptons     - enable sliding dR cones for boosted lepton
                            analyses.
       outputPassValue    - set the OutputPassValue property for all tools
@@ -47,6 +54,7 @@ def recommended_tools(masterName='OverlapRemovalTool',
                            marked with true or false.
       linkOverlapObjects - enable ElementLinks to overlap objects.
       doEleEleOR         - enable electron-electron overlap removal.
+      doMuPFJetOR        - enable the pflow jet removal for muons
       doXXXX             - these flags enable/disable object types to
                            configure tools for: doElectrons, doMuons,
                            doJets, doTaus, doPhotons, doFatJets.
@@ -69,6 +77,10 @@ def recommended_tools(masterName='OverlapRemovalTool',
     # Overlap tools share an additional common property for object linking
     common_args['LinkOverlapObjects'] = linkOverlapObjects
 
+    # Muon-PFlow fake-jet
+    if doMuPFJetOR:
+        orTool.MuPFJetORT = MuPFJetOverlapTool('MuPFJetORT', **common_args)
+
     # Electron-electron
     if doElectrons and doEleEleOR:
         orTool.EleEleORT = EleEleOverlapTool('EleEleORT', **common_args)
@@ -80,6 +92,7 @@ def recommended_tools(masterName='OverlapRemovalTool',
     if doElectrons and doJets:
         orTool.EleJetORT = EleJetOverlapTool('EleJetORT',
                                              BJetLabel=bJetLabel,
+                                             MaxElePtForBJetAwareOR=maxElePtForBJetAwareOR,
                                              UseSlidingDR=boostedLeptons,
                                              **common_args)
     # Muon-jet
@@ -117,42 +130,3 @@ def recommended_tools(masterName='OverlapRemovalTool',
         orTool.JetFatJetORT = DeltaROverlapTool('JetFatJetORT', DR=1.0, **common_args)
 
     return orTool
-
-
-#-------------------------------------------------------------------------------
-def harmonized_tools(name='OverlapRemovalTool', OutputLevel=INFO,
-                     input_label='selected', output_label='overlaps',
-                     output_pass_value=False, do_taus=True, do_photons=True):
-    """
-    Provides the pre-configured overlap removal tools according to the
-    recommendations of the harmonization document. The recommended_tools
-    function gives the updated recommendations.
-
-    DEPRECATED - please update to latest recommendations.
-    """
-    from warnings import warn
-    warn('The harmoinzation OR recommendations are deprecated')
-
-    # Call the above function for standard pre-configured tools
-    orTool = recommended_tools(name, OutputLevel, input_label, output_label,
-                               output_pass_value=output_pass_value,
-                               do_taus=do_taus, do_photons=do_photons)
-
-    # TODO: RESTORE TAU-LOOSE-LEP
-    # Use tau loose-lep OR implementations
-    if do_taus:
-        tau_args = {
-            'InputLabel' : inputLabel,
-            'OutputLabel' : outputLabel,
-            'OutputPassValue' : outputPassValue
-        }
-        orTool.TauEleORT = TauLooseEleOverlapTool('TauEleORT', **tau_args)
-        orTool.TauMuORT = TauLooseMuOverlapTool('TauMuORT', **tau_args)
-
-    # Override properties
-    orTool.EleMuORT.RemoveCaloMuons = False
-    orTool.MuJetORT.ApplyRelPt = False
-    orTool.MuJetORT.UseGhostAssociation = False
-    orTool.MuJetORT.InnerDR = 0.4
-
-    return orTool
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/share/gt_AnaToolHandle_test.ref b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/share/gt_AnaToolHandle_test.ref
deleted file mode 100644
index c42fe4de84a6bdacbc6899860e6f908d5c006ef5..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/share/gt_AnaToolHandle_test.ref
+++ /dev/null
@@ -1,16 +0,0 @@
-[==========] Running 4 tests from 1 test case.
-[----------] Global test environment set-up.
-[----------] 4 tests from AnaToolHandleTest
-[ RUN      ] AnaToolHandleTest.OverlapTools
-[       OK ] AnaToolHandleTest.OverlapTools (42 ms)
-[ RUN      ] AnaToolHandleTest.MasterTools
-[       OK ] AnaToolHandleTest.MasterTools (0 ms)
-[ RUN      ] AnaToolHandleTest.ToolAssignment
-[       OK ] AnaToolHandleTest.ToolAssignment (0 ms)
-[ RUN      ] AnaToolHandleTest.ToolAssignment2
-[       OK ] AnaToolHandleTest.ToolAssignment2 (0 ms)
-[----------] 4 tests from AnaToolHandleTest (42 ms total)
-
-[----------] Global test environment tear-down
-[==========] 4 tests from 1 test case ran. (42 ms total)
-[  PASSED  ] 4 tests.
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.cxx
index 2f1cde97bf05a38cb89384c727ce052912d055d9..d809185dc1c4140c494a5e23df22697982ce88fc 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #include "ORToolBoxTestAlg.h"
 #include "AssociationUtils/OverlapRemovalDefs.h"
 #include "AssociationUtils/OverlapRemovalInit.h"
@@ -103,9 +104,9 @@ bool ORToolBoxTestAlg::selectObject<xAOD::Jet>(const xAOD::Jet& jet)
   // Label bjets
   static ort::inputDecorator_t bJetDec(m_flags.bJetLabel);
   bJetDec(jet) = false;
-  double mv2c20 = 0.;
-  if(jet.btagging()->MVx_discriminant("MV2c20", mv2c20)){
-    if(mv2c20 > -0.5911) bJetDec(jet) = true;
+  double mv2c10 = 0.;
+  if(jet.btagging()->MVx_discriminant("MV2c10", mv2c10)){
+    if(mv2c10 > -0.1416) bJetDec(jet) = true;
   }
   else ATH_MSG_WARNING("BTag info unavailable!");
   if(jet.pt() < 20.*GeV) return false;
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.h
index 176fcca099827e758031ef1e9608cb0edab009ff..a03a5c0fceb02d28ae265c630c8c1471a68b5b75 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/ORToolBoxTestAlg.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_ORTOOLBOXTESTALG_H
 #define ASSOCIATIONUTILS_ORTOOLBOXTESTALG_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.cxx
index f27b03125e4cc6e72fa519a08a86d0028759c517..10c7203dc19c255483fba5cd13d4c96bcbd45e7b 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 // EDM includes
 
 // Local includes
@@ -110,9 +111,10 @@ bool OverlapRemovalTestAlg::selectObject<xAOD::Jet>(const xAOD::Jet& jet)
   // Label bjets
   static ort::inputDecorator_t bJetDec(m_bJetLabel);
   bJetDec(jet) = false;
-  double mv2c20 = 0.;
-  if(jet.btagging()->MVx_discriminant("MV2c20", mv2c20)){
-    if(mv2c20 > -0.5911) bJetDec(jet) = true;
+  double mv2c10 = 0.;
+  auto btag = jet.btagging();
+  if(btag && btag->MVx_discriminant("MV2c10", mv2c10)){
+    if(mv2c10 > -0.1416) bJetDec(jet) = true;
   }
   else ATH_MSG_WARNING("BTag info unavailable!");
   if(jet.pt() < 20.*GeV) return false;
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.h b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.h
index 1a928c202154f1263621902e47b1fa51cf847366..cd4e2369667f7daf41c1d8981d50387981a91d45 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.h
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/OverlapRemovalTestAlg.h
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 #ifndef ASSOCIATIONUTILS_OVERLAPREMOVALTESTALG_H
 #define ASSOCIATIONUTILS_OVERLAPREMOVALTESTALG_H
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/components/AssociationUtils_entries.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/components/AssociationUtils_entries.cxx
index 6fc57ca08f7cbcab74aa808822b2a84fbea39069..dee3e3697394c87399ca2dba934881833f90883a 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/components/AssociationUtils_entries.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/src/components/AssociationUtils_entries.cxx
@@ -4,6 +4,7 @@
 #include "AssociationUtils/EleJetOverlapTool.h"
 #include "AssociationUtils/EleMuSharedTrkOverlapTool.h"
 #include "AssociationUtils/MuJetOverlapTool.h"
+#include "AssociationUtils/MuPFJetOverlapTool.h"
 #include "AssociationUtils/AltMuJetOverlapTool.h"
 #include "AssociationUtils/ObjLinkOverlapTool.h"
 #include "AssociationUtils/TauLooseEleOverlapTool.h"
@@ -13,17 +14,15 @@
 
 #include "../OverlapRemovalTestAlg.h"
 #include "../ORToolBoxTestAlg.h"
+#include "AssociationUtils/OverlapRemovalGenUseAlg.h"
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-DECLARE_COMPONENT( OverlapRemovalTool )
-#pragma GCC diagnostic pop
 DECLARE_COMPONENT( ORUtils::OverlapRemovalTool )
 DECLARE_COMPONENT( ORUtils::DeltaROverlapTool )
 DECLARE_COMPONENT( ORUtils::EleEleOverlapTool )
 DECLARE_COMPONENT( ORUtils::EleJetOverlapTool )
 DECLARE_COMPONENT( ORUtils::EleMuSharedTrkOverlapTool )
 DECLARE_COMPONENT( ORUtils::MuJetOverlapTool )
+DECLARE_COMPONENT( ORUtils::MuPFJetOverlapTool )
 DECLARE_COMPONENT( ORUtils::AltMuJetOverlapTool )
 DECLARE_COMPONENT( ORUtils::ObjLinkOverlapTool )
 DECLARE_COMPONENT( ORUtils::TauLooseEleOverlapTool )
@@ -32,9 +31,5 @@ DECLARE_COMPONENT( ORUtils::TauJetOverlapTool )
 DECLARE_COMPONENT( ORUtils::TauAntiTauJetOverlapTool )
 
 DECLARE_COMPONENT( OverlapRemovalTestAlg )
+DECLARE_COMPONENT( OverlapRemovalGenUseAlg )
 DECLARE_COMPONENT( ORToolBoxTestAlg )
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#pragma GCC diagnostic pop
-
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_AnaToolHandle_test.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_AnaToolHandle_test.cxx
index a6969064d99d8eb7f474199637061c3c14d66ab4..f34dfe50ef808903b58dac14cebe18e56dc4f9c7 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_AnaToolHandle_test.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_AnaToolHandle_test.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 /** Unit tests for AssociationUtils tools in AnaToolHandle
  */
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_OverlapRemovalInit_test.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_OverlapRemovalInit_test.cxx
index db11282930bcd590152184be0a20d5bd386c159b..0b6305b170e09855f971df2cb233ef8385aeb13b 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_OverlapRemovalInit_test.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_OverlapRemovalInit_test.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 /** @brief Unit tests for c++ config helper functions.
  *
  *  @todo Test more features:
@@ -35,26 +36,6 @@ namespace
     EXPECT_SUCCESS( ORUtils::recommendedTools(flags, tools) );
     EXPECT_SUCCESS( tools.initialize() );
   }
-
-#ifdef ROOTCORE
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-  TEST(OverlapRemovalInitTest, LegacyHelper)
-  {
-    ORUtils::ORToolBox tools;
-    EXPECT_SUCCESS( ORUtils::recommendedTools(tools, "OverlapRemovalTool") );
-    EXPECT_SUCCESS( tools.initialize() );
-  }
-
-  TEST(OverlapRemovalInitTest, HarmonizedHelper)
-  {
-    ORUtils::ORToolBox tools;
-    EXPECT_SUCCESS( ORUtils::harmonizedTools(tools, "OverlapRemovalTool") );
-    EXPECT_SUCCESS( tools.initialize() );
-  }
-#pragma GCC diagnostic pop
-#endif
-
 }
 
 int main(int argc, char** argv)
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_toolbox_test.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_toolbox_test.cxx
index 19d96c9f22895ae083038f7d8a4bd5c3f253642d..ccb6afcb888794881f53254e27e84ee8a210f31f 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_toolbox_test.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/gt_toolbox_test.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 /** Unit tests for the ORUtils::ToolBox
  */
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/ut_assocUtilsDict.py b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/ut_assocUtilsDict.py
index 581a1b2a7da0a3791dfa5522602ffa2d80bde652..03dd766b26fd6e55fb86f420bf39cbc418839ff2 100755
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/ut_assocUtilsDict.py
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/ut_assocUtilsDict.py
@@ -1,5 +1,7 @@
 #!/usr/bin/env python
 
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
 # Test the reflex dictionary usage in PyROOT to
 # instantiate and configure the overlap removal tool(s).
 
@@ -11,7 +13,7 @@ from ROOT import gROOT
 gROOT.Macro('$ROOTCOREDIR/scripts/load_packages.C')
 
 # Import using the PyROOT bindings and reflex dictionary
-from ROOT import ORUtils, OverlapRemovalTool
+from ROOT import ORUtils
 
 # Define some testing helper functions
 
@@ -30,14 +32,6 @@ def test_tool_init(tool_type, verbose=False):
         print '  => Success'
     return tool
 
-# Configure the legacy tool
-orToolLegacy = OverlapRemovalTool('OverlapRemovalToolLegacy')
-
-test_sc( orToolLegacy.setProperty('OverlapLabel', 'overlaps') )
-test_sc( orToolLegacy.setProperty(bool)('LinkOverlapObjects', True) )
-# Initialize the tool
-test_sc( orToolLegacy.initialize() )
-
 # Configure the new master tool
 orTool = ORUtils.OverlapRemovalTool('OverlapRemovalTool')
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/ut_ort_tester_legacy.sh b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/ut_ort_tester_legacy.sh
deleted file mode 100755
index 1382029e4babb159836b9e5a999c1629c06b1a50..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/test/ut_ort_tester_legacy.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-if test "$ROOTCORE_AUTO_UT" == "1" -a "$ROOTCORE_SLOW_UT" != "1"
-then
-    exit 0
-fi
-
-set -e
-set -u
-
-OverlapRemovalTesterLegacy $ASG_TEST_FILE_MC 50
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTester.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTester.cxx
index 96720ed4d1d3472eb4e1750cdf7917f22bcb84d1..ee0db33e22db8d051df6352de0f6f1547e61f960 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTester.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTester.cxx
@@ -1,6 +1,7 @@
 /*
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
+
 /// @file OverlapRemovalTester.cxx
 /// @brief Contains RootCore testing code for the overlap removal tools.
 ///
@@ -91,11 +92,11 @@ template<> void selectObjects<xAOD::JetContainer>
     bool pass = (jet->pt() > 20000. && fabs(jet->eta()) < 2.5);
     selectDec(*jet) = pass;
     // Label bjets
-    double mv2c20 = 0.;
-    if(!jet->btagging()->MVx_discriminant("MV2c20", mv2c20))
-      throw std::runtime_error("MV2c20 unavailable");
-    // This is the 80% efficiency working point
-    bJetDec(*jet) = (mv2c20 > -0.5911);
+    double mv2c10 = 0.;
+    if(!jet->btagging()->MVx_discriminant("MV2c10", mv2c10))
+      throw std::runtime_error("MV2c10 unavailable");
+    // This is the 85% efficiency working point
+    bJetDec(*jet) = (mv2c10 > -0.1416);
   }
 }
 //-----------------------------------------------------------------------------
@@ -192,7 +193,6 @@ int main(int argc, char* argv[])
   if(optEntries >= 0) entries = std::min(entries, optEntries);
   Info(APP_NAME, "Processing %lli entries", entries);
 
-
   // Overlap removal tool configuration flags
   ORUtils::ORFlags orFlags("OverlapRemovalTool", inputLabel, outputLabel);
 
@@ -287,13 +287,12 @@ int main(int argc, char* argv[])
     selectObjects(taus);
     selectObjects(photons);
 
-    Info(APP_NAME,
-         "nEle %lu, nMuo %lu, nJet %lu, nTau %lu, nPho %lu",
+    Info(APP_NAME, "nEle %lu, nMuo %lu, nJet %lu, nTau %lu, nPho %lu",
          electrons->size(), muons->size(),
          jets->size(), taus->size(),
          photons->size());
 
-    // Apply the overlap removal to all objects (dumb example)
+    // Apply the overlap removal to all objects
     CHECK( orTool->removeOverlaps(electrons, muons, jets, taus, photons) );
 
     //
@@ -360,15 +359,15 @@ int main(int argc, char* argv[])
   Info(APP_NAME, "=====================================");
   Info(APP_NAME, "End of event processing");
   Info(APP_NAME, "Object count summaries: nOverlap / nSelected / nTotal");
-  Info(APP_NAME, "Number overlap elecs:   %4i / %4i / %5i",
+  Info(APP_NAME, "Number overlap elecs:   %5i / %5i / %5i",
        nOverlapElectrons, nSelectedElectrons, nTotalElectrons);
-  Info(APP_NAME, "Number overlap muons:   %4i / %4i / %5i",
+  Info(APP_NAME, "Number overlap muons:   %5i / %5i / %5i",
        nOverlapMuons, nSelectedMuons, nTotalMuons);
-  Info(APP_NAME, "Number overlap jets:    %4i / %4i / %5i",
+  Info(APP_NAME, "Number overlap jets:    %5i / %5i / %5i",
        nOverlapJets, nSelectedJets, nTotalJets);
-  Info(APP_NAME, "Number overlap taus:    %4i / %4i / %5i",
+  Info(APP_NAME, "Number overlap taus:    %5i / %5i / %5i",
        nOverlapTaus, nSelectedTaus, nTotalTaus);
-  Info(APP_NAME, "Number overlap photons: %4i / %4i / %5i",
+  Info(APP_NAME, "Number overlap photons: %5i / %5i / %5i",
        nOverlapPhotons, nSelectedPhotons, nTotalPhotons);
 
   Info(APP_NAME, "Application finished successfully");
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTesterLegacy.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTesterLegacy.cxx
deleted file mode 100644
index b25566654eeca23812d3ed501edbe25677ac3444..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTesterLegacy.cxx
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-/// @file OverlapRemovalTesterLegacy.cxx
-/// @brief Contains RootCore testing code for the legacy OverlapRemovalTool.
-/// It is recommended to use instead the more advanced set of tools
-/// demonstrated in OverlapRemovalTester.cxx
-///
-/// @author Steve Farrell <Steven.Farrell@cern.ch>
-///
-
-// System includes
-#include <memory>
-#include <cstdlib>
-
-// ROOT includes
-#include "TFile.h"
-#include "TError.h"
-#include "TString.h"
-
-// Infrastructure includes
-#ifdef ROOTCORE
-#   include "xAODRootAccess/Init.h"
-#   include "xAODRootAccess/TEvent.h"
-#endif // ROOTCORE
-
-// EDM includes
-#include "xAODEventInfo/EventInfo.h"
-#include "xAODEgamma/ElectronContainer.h"
-#include "xAODMuon/MuonContainer.h"
-#include "xAODJet/JetContainer.h"
-#include "xAODTau/TauJetContainer.h"
-#include "xAODEgamma/PhotonContainer.h"
-
-// Local includes
-#include "AssociationUtils/OverlapRemovalTool.h"
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
-//-----------------------------------------------------------------------------
-// Error checking macro
-//-----------------------------------------------------------------------------
-#define CHECK( ARG )                                 \
-  do {                                               \
-    const bool result = ARG;                         \
-    if(!result) {                                    \
-      ::Error(APP_NAME, "Failed to execute: \"%s\"", \
-              #ARG );                                \
-      return 1;                                      \
-    }                                                \
-  } while( false )
-
-
-//-----------------------------------------------------------------------------
-// Global accessors and decorators
-//-----------------------------------------------------------------------------
-ort::inputAccessor_t selectAcc("selected");
-ort::inputDecorator_t selectDec("selected");
-ort::outputAccessor_t overlapAcc("overlaps");
-ort::inputDecorator_t bJetDec("isBJet");
-ort::objLinkAccessor_t objLinkAcc("overlapObject");
-
-//-----------------------------------------------------------------------------
-// Functions for applying a dumb object selection
-//-----------------------------------------------------------------------------
-template<class ContainerType>
-void selectObjects(const ContainerType* container)
-{
-  for(auto obj : *container){
-    if(obj->pt() > 10000. && fabs(obj->eta()) < 2.5)
-      selectDec(*obj) = true;
-    else selectDec(*obj) = false;
-  }
-}
-//-----------------------------------------------------------------------------
-template<> void selectObjects<xAOD::JetContainer>
-(const xAOD::JetContainer* jets)
-{
-  for(auto jet : *jets){
-    bool pass = (jet->pt() > 20000. && fabs(jet->eta()) < 2.5);
-    selectDec(*jet) = pass;
-    // Label bjets
-    double mv2c20 = 0.;
-    if(!jet->btagging()->MVx_discriminant("MV2c20", mv2c20))
-      throw std::runtime_error("MV2c20 unavailable");
-    // This is the 80% efficiency working point
-    bJetDec(*jet) = (mv2c20 > -0.5911);
-  }
-}
-//-----------------------------------------------------------------------------
-template<> void selectObjects<xAOD::TauJetContainer>
-(const xAOD::TauJetContainer* taus)
-{
-  for(auto tau : *taus){
-    bool pass = (tau->isTau(xAOD::TauJetParameters::JetBDTSigLoose) &&
-                 tau->isTau(xAOD::TauJetParameters::EleBDTLoose) &&
-                 tau->pt() > 20000. && fabs(tau->eta()) < 2.5);
-    selectDec(*tau) = pass;
-  }
-}
-
-//-----------------------------------------------------------------------------
-// Function for printing object results
-//-----------------------------------------------------------------------------
-void printObj(const char* APP_NAME, const char* type,
-              const xAOD::IParticle* obj)
-{
-
-  // Safety check
-  if(!overlapAcc.isAvailable(*obj)){
-    Error(APP_NAME, "Overlap decoration missing for object");
-    abort();
-  }
-
-  // Print selected objects
-  if(selectDec(*obj)){
-    Info(APP_NAME, "  %s pt %6.2f eta %5.2f phi %5.2f selected %i overlaps %i",
-                   type, obj->pt()*0.001, obj->eta(), obj->phi(),
-                   selectAcc(*obj), overlapAcc(*obj));
-    // Check for overlap object link
-    if(objLinkAcc.isAvailable(*obj) && objLinkAcc(*obj).isValid()){
-      const xAOD::IParticle* overlapObj = *objLinkAcc(*obj);
-      std::stringstream ss; ss << overlapObj->type();
-      Info(APP_NAME, "    Overlap: type %s pt %6.2f",
-                     ss.str().c_str(), overlapObj->pt()*0.001);
-    }
-  }
-}
-
-//-----------------------------------------------------------------------------
-// Main function
-//-----------------------------------------------------------------------------
-int main( int argc, char* argv[] )
-{
-
-  // The application's name
-  const char* APP_NAME = argv[ 0 ];
-
-  // Check if we received a file name
-  if(argc < 2) {
-    Error( APP_NAME, "No file name received!" );
-    Error( APP_NAME, "  Usage: %s [xAOD file name] [num events]", APP_NAME );
-    return 1;
-  }
-
-  // Initialise the application
-  CHECK( xAOD::Init(APP_NAME) );
-  StatusCode::enableFailure();
-
-  // Open the input file
-  const TString fileName = argv[ 1 ];
-  Info(APP_NAME, "Opening file: %s", fileName.Data());
-  std::unique_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
-  CHECK( ifile.get() );
-
-  // Create a TEvent object
-  xAOD::TEvent event(xAOD::TEvent::kAthenaAccess);
-  CHECK( event.readFrom(ifile.get()) );
-  Info(APP_NAME, "Number of events in the file: %i",
-       static_cast<int>(event.getEntries()));
-
-  // Decide how many events to run over
-  Long64_t entries = event.getEntries();
-  if(argc > 2) {
-    const Long64_t e = atoll(argv[2]);
-    entries = std::min(e, entries);
-  }
-
-  // Create and configure the tool
-  OverlapRemovalTool orTool("OverlapRemovalTool");
-  CHECK( orTool.setProperty("InputLabel", "selected") );
-  // Turn on the object links for debugging
-  CHECK( orTool.setProperty("LinkOverlapObjects", true) );
-  // Turn on special b-jet handling for e-jet OR
-  CHECK( orTool.setProperty("BJetLabel", "isBJet") );
-  //CHECK( orTool.setProperty("OutputLevel", MSG::DEBUG) );
-
-  // Initialize the tool
-  CHECK( orTool.initialize() );
-
-  // Some object and event counters to help roughly
-  // evaluate the effects of changes in the OR tool.
-  unsigned int nInputElectrons = 0;
-  unsigned int nInputMuons = 0;
-  unsigned int nInputJets = 0;
-  unsigned int nInputTaus = 0;
-  unsigned int nInputPhotons = 0;
-  unsigned int nOverlapElectrons = 0;
-  unsigned int nOverlapMuons = 0;
-  unsigned int nOverlapJets = 0;
-  unsigned int nOverlapTaus = 0;
-  unsigned int nOverlapPhotons = 0;
-
-  // Loop over the events
-  std::cout << "Starting loop" << std::endl;
-  for(Long64_t entry = 0; entry < entries; ++entry){
-
-    event.getEntry(entry);
-
-    // Print some event information for fun
-    const xAOD::EventInfo* evtInfo = 0;
-    CHECK( event.retrieve(evtInfo, "EventInfo") );
-    Info(APP_NAME, "===>>>  Processing entry %lli, run %u, event %llu  <<<===",
-         entry, evtInfo->runNumber(), evtInfo->eventNumber());
-
-    // Get electrons
-    const xAOD::ElectronContainer* electrons = 0;
-    CHECK( event.retrieve(electrons, "Electrons") );
-    // Get muons
-    const xAOD::MuonContainer* muons = 0;
-    CHECK( event.retrieve(muons, "Muons") );
-    // Get jets
-    const xAOD::JetContainer* jets = 0;
-    CHECK( event.retrieve(jets, "AntiKt4EMTopoJets") );
-    // Get taus
-    const xAOD::TauJetContainer* taus = 0;
-    CHECK( event.retrieve(taus, "TauJets") );
-    // Get photons
-    const xAOD::PhotonContainer* photons = 0;
-    CHECK( event.retrieve(photons, "Photons") );
-
-    // Set input decorations
-    selectObjects(electrons);
-    selectObjects(muons);
-    selectObjects(jets);
-    selectObjects(taus);
-    selectObjects(photons);
-
-    Info(APP_NAME,
-         "nEle %lu, nMuo %lu, nJet %lu, nTau %lu, nPho %lu",
-         electrons->size(), muons->size(),
-         jets->size(), taus->size(),
-         photons->size());
-
-    // Apply the overlap removal to all "selected" objects
-    CHECK( orTool.removeOverlaps(electrons, muons, jets, taus, photons) );
-
-    //
-    // Now, dump all of the results
-    //
-
-    // electrons
-    Info(APP_NAME, "Now dumping the electrons");
-    for(auto electron : *electrons){
-      printObj(APP_NAME, "ele", electron);
-      if(overlapAcc(*electron)) nOverlapElectrons++;
-      nInputElectrons++;
-    }
-
-    // muons
-    Info(APP_NAME, "Now dumping the muons");
-    for(auto muon : *muons){
-      printObj(APP_NAME, "muo", muon);
-      if(overlapAcc(*muon)) nOverlapMuons++;
-      nInputMuons++;
-    }
-
-    // jets
-    Info(APP_NAME, "Now dumping the jets");
-    for(auto jet : *jets){
-      printObj(APP_NAME, "jet", jet);
-      if(overlapAcc(*jet)) nOverlapJets++;
-      nInputJets++;
-    }
-
-    // taus
-    Info(APP_NAME, "Now dumping the taus");
-    for(auto tau : *taus){
-      printObj(APP_NAME, "tau", tau);
-      if(overlapAcc(*tau)) nOverlapTaus++;
-      nInputTaus++;
-    }
-
-    // photons
-    Info(APP_NAME, "Now dumping the photons");
-    for(auto photon : *photons){
-      printObj(APP_NAME, "pho", photon);
-      if(overlapAcc(*photon)) nOverlapPhotons++;
-      nInputPhotons++;
-    }
-
-  }
-  Info(APP_NAME, "=====================================");
-  Info(APP_NAME, "End of event processing");
-  Info(APP_NAME, "Number overlap elecs:   %i / %i", nOverlapElectrons, nInputElectrons);
-  Info(APP_NAME, "Number overlap muons:   %i / %i", nOverlapMuons, nInputMuons);
-  Info(APP_NAME, "Number overlap jets:    %i / %i", nOverlapJets, nInputJets);
-  Info(APP_NAME, "Number overlap taus:    %i / %i", nOverlapTaus, nInputTaus);
-  Info(APP_NAME, "Number overlap photons: %i / %i", nOverlapPhotons, nInputPhotons);
-
-  Info(APP_NAME, "Application finished successfully");
-
-  return 0;
-
-}
-
-#pragma GCC diagnostic pop
diff --git a/Projects/AnalysisBase/package_filters.txt b/Projects/AnalysisBase/package_filters.txt
index b94e298797b264e6b3ac8664947dbaa27f8c4ef8..7a145470c05677b390b5d0d09480a34d7273143e 100644
--- a/Projects/AnalysisBase/package_filters.txt
+++ b/Projects/AnalysisBase/package_filters.txt
@@ -22,6 +22,7 @@
 + Event/xAOD/.*
 + Generators/TruthUtils
 + MuonSpectrometer/MuonStationIndex
++ PhysicsAnalysis/AnalysisCommon/AssociationUtils
 + PhysicsAnalysis/AnalysisCommon/PATCore
 + PhysicsAnalysis/AnalysisCommon/PATInterfaces
 + PhysicsAnalysis/D3PDTools/.*