diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/EGammaPassSelectionWrapper.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/EGammaPassSelectionWrapper.h
deleted file mode 100644
index 547df92ee7b718e4686bd3d541a35f5c0c398e22..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/EGammaPassSelectionWrapper.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////
-// EGammaPassSelectionWrapper.h  (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#ifndef DERIVATIONFRAMEWORK_EGAMMAPASSSELECTONWRAPPER_H
-#define DERIVATIONFRAMEWORK_EGAMMAPASSSELECTONWRAPPER_H 1
-
-#include<string>
-
-// Gaudi & Athena basics
-#include "AthenaBaseComps/AthAlgTool.h"
-
-// DerivationFramework includes
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-
-namespace DerivationFramework {
-
-  /** @class EGammaPassSelectionWrapper
- 
-      the code used in this implementation is kindly stolen from:
-      atlasoff:: ISF/ISF_Core/ISF_Tools
-
-      @author James Catmore -at- cern.ch
-     */
-  class EGammaPassSelectionWrapper : public AthAlgTool, public IAugmentationTool {
-   
-  public: 
-    /** Constructor with parameters */
-    EGammaPassSelectionWrapper( const std::string& t, const std::string& n, const IInterface* p );
-   
-    /** Destructor */
-    ~EGammaPassSelectionWrapper();
-   
-    // Athena algtool's Hooks
-    StatusCode  initialize();
-    StatusCode  finalize();
- 
-    /** Check that the current event passes this filter */
-    virtual StatusCode addBranches() const;
-
-  private:
-    std::vector<std::string> m_qualFlags;
-    std::string m_collName;
-    std::string m_sgPrefix;
-
-  }; 
- 
-}
-
-#endif
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/ElectronLikelihoodPIDTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/ElectronLikelihoodPIDTool.h
deleted file mode 100644
index db8c806c4fb5833fae3a727d35cb5924d4c3dbff..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/ElectronLikelihoodPIDTool.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// ElectronLikelihoodPIDTool.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#ifndef DERIVATIONFRAMEWORK_ELECTRONLIKELIHOODPIDTOOL_H
-#define DERIVATIONFRAMEWORK_ELECTRONLIKELIHOODPIDTOOL_H
-
-#include <string>
-
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-#include "ElectronPhotonSelectorTools/TElectronLikelihoodTool.h"
-
-namespace DerivationFramework {
- 
-  struct LLHInputs {
-            double eta; 	
-            double eT; 		
-            double f3; 		
-            double rHad; 	
-            double rHad1; 	
-            double Reta; 	
-            double w2; 		
-            double f1; 		
-            double eratio; 	
-            double deltaEta; 	
-            double d0; 		
-            double TRratio; 	
-            double d0sigma; 	
-            double rphi; 	
-            double deltaPoverP; 
-            double deltaphires; 
-            double ip; 		
-            int nSi; 		
-            int nSiDeadSensors; 
-            int nPix; 		
-            int nPixDeadSensors;
-            int nBlayer; 	
-            int nBlayerOutliers;
-            bool expectBlayer; 	
-            int convBit; 	
-  }; 
-
-  class ElectronLikelihoodPIDTool : public AthAlgTool, public IAugmentationTool {
-    public: 
-      ElectronLikelihoodPIDTool(const std::string& t, const std::string& n, const IInterface* p);
-
-      StatusCode initialize();
-      StatusCode finalize();
-      virtual StatusCode addBranches() const;
-      bool runLLHTool(LLHInputs) const;
-
-    private:
-      std::string m_sgName;
-      std::string m_pdfRootFile;
-      Root::TElectronLikelihoodTool* m_lhTool;
-  }; 
-}
-
-#endif // DERIVATIONFRAMEWORK_ELECTRONLIKELIHOODPIDTOOL_H
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/ElectronMultiLeptonTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/ElectronMultiLeptonTool.h
deleted file mode 100644
index d36ff34ce3f33b1fd45cb42f1112ab2cc2f33106..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/ElectronMultiLeptonTool.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// ElectronMultiLeptonTool.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#ifndef DERIVATIONFRAMEWORK_ELECTRONMULTILEPTONTOOL_H
-#define DERIVATIONFRAMEWORK_ELECTRONMULTILEPTONTOOL_H
-
-#include <string>
-
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-#include "ElectronPhotonSelectorTools/TElectronMultiLeptonSelector.h"
-
-namespace DerivationFramework {
-
-  class ElectronMultiLeptonTool : public AthAlgTool, public IAugmentationTool {
-    public: 
-      ElectronMultiLeptonTool(const std::string& t, const std::string& n, const IInterface* p);
-
-      StatusCode initialize();
-      StatusCode finalize();
-      virtual StatusCode addBranches() const;
-
-    private:
-      std::string m_sgName;
-      Root::TElectronMultiLeptonSelector* m_mlTool;
-  }; 
-}
-
-#endif // DERIVATIONFRAMEWORK_ELECTRONMULTILEPTONTOOL_H
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/ElectronsDirectionTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/ElectronsDirectionTool.h
deleted file mode 100644
index a414792df388de72b8afc5e25b710643ecee3cfb..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/ElectronsDirectionTool.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// ElectronsDirectionTool.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#ifndef DERIVATIONFRAMEWORK_ELECTRONSDIRECTIONTOOL_H
-#define DERIVATIONFRAMEWORK_ELECTRONSDIRECTIONTOOL_H
-
-#include <string>
-
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-
-namespace DerivationFramework {
-
-  class ElectronsDirectionTool : public AthAlgTool, public IAugmentationTool {
-    public: 
-      ElectronsDirectionTool(const std::string& t, const std::string& n, const IInterface* p);
-
-      StatusCode initialize();
-      StatusCode finalize();
-      virtual StatusCode addBranches() const;
-
-    private:
-      std::string m_sgEta;
-      std::string m_sgPhi;
-      std::string m_sgEt;
-      std::string m_sgPt;
-      std::string m_sgnPrecisionHits;
-      std::string m_collName;
-  }; 
-}
-
-#endif // DERIVATIONFRAMEWORK_ELECTRONSDIRECTIONTOOL_H
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/cmt/requirements b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/cmt/requirements
deleted file mode 100644
index 4dd9162e55edec35075a8160f91dbc1155107e92..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package DerivationFrameworkEGamma
-author James Catmore <james.catmore@cern.ch>
-
-#################################################################
-# public use statements
-use AtlasPolicy                 AtlasPolicy-*
-use AthenaBaseComps             AthenaBaseComps-*       Control
-use DerivationFrameworkInterfaces   DerivationFrameworkInterfaces-*    PhysicsAnalysis/DerivationFramework
-use ElectronPhotonSelectorTools     ElectronPhotonSelectorTools-*      PhysicsAnalysis/ElectronPhotonID
-private
-use GaudiInterface              GaudiInterface-*        External
-use PathResolver      		PathResolver-*       	Tools
-use xAODEgamma                  xAODEgamma-*            Event/xAOD
-use xAODCaloEvent		xAODCaloEvent-*		Event/xAOD
-################################################################
-#
-public
-
-## declare the directories CMT should know about
-branches python share src
-
-apply_pattern dual_use_library files= " *.cxx "
-apply_pattern declare_joboptions files=" *.py"
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py
deleted file mode 100644
index 8a1360d3997a9291ba08c14384d8dcd954bde1bf..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-#********************************************************************
-# EGammaCommon.py 
-# Schedules all tools needed for e-gamma object selection and writes
-# results into SG. These may then be accessed along the train   
-#********************************************************************
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
-
-#====================================================================
-# ELECTRON 4-MOMENTA CORRECTION
-#====================================================================
-from DerivationFrameworkEGamma.DerivationFrameworkEGammaConf import DerivationFramework__ElectronsDirectionTool
-DFCommonElectronsDirection = DerivationFramework__ElectronsDirectionTool(name = "DFCommonElectronsDirection",
-                                                                        EtaSGEntry = "DFCommonElectrons_eta",
-                                                                        PtSGEntry = "DFCommonElectrons_pt",
-                                                                        nPrecisionHitsSGEntry = "DFCommonElectronsnPrecisionHits"
-                                                                    )
-ToolSvc += DFCommonElectronsDirection
-
-#====================================================================
-# ELECTRON SELECTION (loose LLH)
-#====================================================================
-import PyCintex
-PyCintex.loadDictionary('ElectronPhotonSelectorToolsDict')
-from ROOT import LikeEnum
-#from ElectronPhotonSelectorTools.ElectronLikelihoodToolMapping import electronLHmenu
-from ElectronPhotonSelectorTools.ConfiguredAsgElectronLikelihoodTools import ConfiguredAsgElectronLikelihoodTool
-LhoodSelectorLoose = ConfiguredAsgElectronLikelihoodTool("LhoodSelectorLoose",
-                                                         LikeEnum.Loose
-                                                         )
-LhoodSelectorLoose.primaryVertexContainer = "PrimaryVertices"
-ToolSvc += LhoodSelectorLoose
-
-#====================================================================
-# ELECTRON SELECTION (multi lepton)
-#====================================================================
-from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgElectronMultiLeptonSelector
-MLSelector = AsgElectronMultiLeptonSelector("MLSelector")
-ToolSvc += MLSelector
-
-#=======================================
-# EGAMMA PASS SELECTION WRAPPERS
-#=======================================
-from DerivationFrameworkEGamma.DerivationFrameworkEGammaConf import DerivationFramework__EGammaPassSelectionWrapper
-DFCommonElectronsSelection = DerivationFramework__EGammaPassSelectionWrapper( name = "DFCommonElectronsSelection",
-                                                               		 SelectionVariables = ["Loose","Medium","Tight"],
-									 CollectionName = "ElectronCollection", 
-									 SGPrefix = "DFCommonElectrons"
-                                                             	       )
-ToolSvc += DFCommonElectronsSelection
-print DFCommonElectronsSelection
-
-#====================================================================
-# AUGMENTATION TOOLS
-#====================================================================
-from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__AsgSelectionToolWrapper
-ElectronPassLHLoose = DerivationFramework__AsgSelectionToolWrapper( name = "ElectronPassLHLoose",
-                                                                    AsgSelectionTool = LhoodSelectorLoose,
-                                                                    CutType = "",
-                                                                    StoreGateEntryName = "DFCommonElectronsLHLoose",
-                                                                    ContainerName = "ElectronCollection")
-ToolSvc += ElectronPassLHLoose
-print ElectronPassLHLoose
-
-from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__AsgSelectionToolWrapper
-ElectronPassML = DerivationFramework__AsgSelectionToolWrapper( name = "ElectronPassML",
-                                                                    AsgSelectionTool = MLSelector,
-                                                                    CutType = "",
-                                                                    StoreGateEntryName = "DFCommonElectronsML",
-                                                                    ContainerName = "ElectronCollection")
-ToolSvc += ElectronPassML
-print ElectronPassML
-
-#=======================================
-# CREATE THE DERIVATION KERNEL ALGORITHM   
-#=======================================
-
-from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
-DerivationFrameworkJob += CfgMgr.DerivationFramework__CommonAugmentation("EGammaCommonKernel",
-                                                                         AugmentationTools = [DFCommonElectronsDirection,DFCommonElectronsSelection,ElectronPassLHLoose,ElectronPassML]
-                                                                         )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/__init__.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/__init__.py
deleted file mode 100644
index 74583d364ec2ca794156596c7254d9b234a940c6..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAMMA1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAMMA1.py
deleted file mode 100644
index 42fb4eb87ab365adb2aac9be94e0ecb2bc505653..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAMMA1.py
+++ /dev/null
@@ -1,140 +0,0 @@
-#********************************************************************
-# EGAMMA1.py 
-# reductionConf flag EGAMMA1 in Reco_tf.py   
-# author: giovanni.marchiori@cern.ch                                                                                                                                                       
-#********************************************************************
-
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
-from DerivationFrameworkEGamma.EGammaCommon import *
-
-#====================================================================
-# Z->ee selection for electron probes with pT>20 GeV 
-# (calib: medium e, OS; T&P: e, OS+SS)
-# it would be nice if we could add a tag-bit to flag
-# events passing the T&P selection, perhaps using an augmentation
-# tool?
-#====================================================================
-
-requirement = 'DFCommonElectronsMedium && DFCommonElectrons_pt > 10*GeV'
-from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__InvariantMassTool
-EGAMMA1MassTool = DerivationFramework__InvariantMassTool( name = "EGAMMA1MassTool",
-                                                                ObjectRequirements = requirement,
-                                                                StoreGateEntryName = "EGAMMA1DiElectronMass",
-                                                                MassHypothesis = 0.511*MeV,
-                                                                ContainerName = "ElectronCollection" )
-ToolSvc += EGAMMA1MassTool
-
-#requirement_tag = '(el_tightPP || isLLHElectron_Tight) && (recommendedEl_pt > 25*GeV) && abs(recommendedEl_eta)<2.5'
-#requirement_probe = '(el_mediumPP || isLLHElectron_Medium) && (recommendedEl_pt > 20*GeV)'
-#requirement_probe = '(recommendedEl_pt > 20*GeV)'
-
-#from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__InvariantMassTool2
-#EGAMMA_ZEE_EEMassTool = DerivationFramework__InvariantMassTool2( name = "EGAMMA_ZEE_EEMassTool",
-#                                                                 Object1Requirements = requirement_tag,
-#                                                                 Object2Requirements = requirement_probe,
-#                                                                 StoreGateEntryName = "ZEE_DiElectronMass",
-#                                                                 Mass1Hypothesis = 0.511*MeV,
-#                                                                 Mass2Hypothesis = 0.511*MeV,
-#                                                                 Pt1BranchName = "recommendedEl_pt",
-#                                                                 Eta1BranchName = "recommendedEl_eta",
-#                                                                 Phi1BranchName = "recommendedEl_phi",
-#                                                                 Q1BranchName = "el_charge",
-#                                                                 Pt2BranchName = "recommendedEl_pt",
-#                                                                 Eta2BranchName = "recommendedEl_eta",
-#                                                                 Phi2BranchName = "recommendedEl_phi",
-#                                                                 Q2BranchName = "el_charge",
-#                                                                 CheckCharge = False,
-                                                                 #CheckCharge = True,
-#                                                                 RemoveOverlaps = False)
-#ToolSvc += EGAMMA_ZEE_EEMassTool
-
-
-#====================================================================
-# Z->ee selection for electron probes with 10<pT<20 GeV
-#====================================================================
-#requirement_tag = '(el_tightPP || isLLHElectron_Tight) && (recommendedEl_pt > 25*GeV) && abs(recommendedEl_eta)<2.5'
-#requirement_probe = '(recommendedEl_pt > 10*GeV && recommendedEl_pt<20*GeV) && abs(recommendedEl_eta)<2.5'
-
-#from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__InvariantMassTool2
-#EGAMMA_ZEE_EEMassTool2 = DerivationFramework__InvariantMassTool2( name = "EGAMMA_ZEE_EEMassTool2",
-#                                                                  Object1Requirements = requirement_tag,
-#                                                                  Object2Requirements = requirement_probe,
-#                                                                  StoreGateEntryName = "ZEE_DiElectronMass2",
-#                                                                  Mass1Hypothesis = 0.511*MeV,
-#                                                                  Mass2Hypothesis = 0.511*MeV,
-#                                                                  Pt1BranchName = "recommendedEl_pt",
-#                                                                  Eta1BranchName = "recommendedEl_eta",
-#                                                                  Phi1BranchName = "recommendedEl_phi",
-#                                                                  Q1BranchName = "el_charge",
-#                                                                  Pt2BranchName = "recommendedEl_pt",
-#                                                                  Eta2BranchName = "recommendedEl_eta",
-#                                                                  Phi2BranchName = "recommendedEl_phi",
-#                                                                  Q2BranchName = "el_charge",
-#                                                                  CheckCharge = False,
-#                                                                  RemoveOverlaps = False)
-#ToolSvc += EGAMMA_ZEE_EEMassTool2
-
-
-#====================================================================
-# Z->eg selection for T&P
-#====================================================================
-#requirement_tag = '(el_tightPP || isLLHElectron_Tight) && (recommendedEl_pt > 25*GeV) && abs(recommendedEl_eta)<2.5'
-#requirement_probe = '(ph_cl_E/cosh(ph_etas2) > 20*GeV)'
-
-#from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__InvariantMassTool2
-#EGAMMA_ZEE_EGMassTool = DerivationFramework__InvariantMassTool2( name = "EGAMMA_ZEE_EGMassTool",
-#                                                                 Object1Requirements = requirement_tag,
-#                                                                 Object2Requirements = requirement_probe,
-#                                                                 StoreGateEntryName = "ZEE_ElectronGammaMass",
-#                                                                 Mass1Hypothesis = 0.511*MeV,
-#                                                                 Mass2Hypothesis = 0.511*MeV,
-#                                                                 Pt1BranchName = "recommendedEl_pt",
-#                                                                 Eta1BranchName = "recommendedEl_eta",
-#                                                                 Phi1BranchName = "recommendedEl_phi",
-#                                                                 Q1BranchName = "el_charge",
-#                                                                 Pt2BranchName = "ph_cl_pt",
-#                                                                 Eta2BranchName = "ph_cl_eta",
-#                                                                 Phi2BranchName = "ph_cl_phi",
-#                                                                 Q2BranchName = "",
-#                                                                 CheckCharge = False,
-#                                                                 RemoveOverlaps = False)
-#ToolSvc += EGAMMA_ZEE_EGMassTool
-
-
-
-#====================================================================
-# Skimming criteria
-#====================================================================
-expression = 'count(EGAMMA1DiElectronMass > 60.0*GeV)>=1'
-#expression = 'count(ZEE_DiElectronMass > 60.0*GeV)>=1 || count(ZEE_DiElectronMass2 > 60.0*GeV)>=1 || count(ZEE_ElectronGammaMass > 60.0*GeV)>=1'
-from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
-EGAMMA1SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = "EGAMMA1SkimmingTool",
-                                                                   expression = expression)
-ToolSvc += EGAMMA1SkimmingTool
-print EGAMMA1SkimmingTool
-
-
-#=======================================
-# CREATE THE DERIVATION KERNEL ALGORITHM   
-#=======================================
-
-from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
-DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("EGAMMA1Kernel",
-                                                                       AugmentationTools = [EGAMMA1MassTool],
-                                                                       #AugmentationTools = [EGAMMA_ZEE_EEMassTool, EGAMMA_ZEE_EEMassTool2, EGAMMA_ZEE_EGMassTool],
-                                                                       SkimmingTools = [EGAMMA1SkimmingTool]
-                                                                       )
-
-
-#====================================================================
-# SET UP STREAM   
-#====================================================================
-streamName = derivationFlags.WriteDAOD_EGAMMA1Stream.StreamName
-fileName   = buildFileName( derivationFlags.WriteDAOD_EGAMMA1Stream )
-EGAMMA1Stream = MSMgr.NewPoolRootStream( streamName, fileName )
-# Only events that pass the filters listed below are written out.
-# Name must match that of the kernel above
-# AcceptAlgs  = logical OR of filters
-# RequireAlgs = logical AND of filters
-EGAMMA1Stream.AcceptAlgs(["EGAMMA1Kernel"])
-
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/EGammaPassSelectionWrapper.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/EGammaPassSelectionWrapper.cxx
deleted file mode 100644
index bea8a8475eaa0415acf8da585d2d2631ddaa211e..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/EGammaPassSelectionWrapper.cxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// EGammaPassSelectionWrapper.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-// Author: James Catmore (James.Catmore@cern.ch)
-// Wrapper around the passSelection() method of xAOD egamma
-// Writes result to SG for later selection by string parser
-
-#include "DerivationFrameworkEGamma/EGammaPassSelectionWrapper.h"
-#include "xAODEgamma/EgammaContainer.h"
-#include <vector>
-#include <string>
-
-// Constructor
-DerivationFramework::EGammaPassSelectionWrapper::EGammaPassSelectionWrapper( const std::string& t,
-                                                 const std::string& n,
-                                                 const IInterface* p ) :
-  AthAlgTool(t,n,p),
-  m_collName("ElectronCollection"),
-  m_sgPrefix("")
-  {
-    declareInterface<DerivationFramework::IAugmentationTool>(this);
-    declareProperty("SelectionVariables",m_qualFlags);
-    declareProperty("CollectionName", m_collName);
-    declareProperty("SGPrefix", m_sgPrefix);
-  }
- 
-// Destructor
-DerivationFramework::EGammaPassSelectionWrapper::~EGammaPassSelectionWrapper() {
-} 
-
-// Athena initialize and finalize
-StatusCode DerivationFramework::EGammaPassSelectionWrapper::initialize()
-{
-     if (m_qualFlags.size()==0) {
-        ATH_MSG_ERROR("No selection variables for the egamma passSelection wrapper tool!");
-        return StatusCode::FAILURE;
-     }
-     ATH_MSG_VERBOSE("initialize() ...");
-     return StatusCode::SUCCESS;
-}
-StatusCode DerivationFramework::EGammaPassSelectionWrapper::finalize()
-{
-     ATH_MSG_VERBOSE("finalize() ...");
-     return StatusCode::SUCCESS;
-}
-
-// Augmentation
-StatusCode DerivationFramework::EGammaPassSelectionWrapper::addBranches() const
-{
-
-     // Retrieve data
-     const xAOD::EgammaContainer* egammas =  evtStore()->retrieve< const xAOD::EgammaContainer >( m_collName );
-     if( ! egammas ) {
-	ATH_MSG_ERROR("Couldn't retrieve e-gamma container with key: " << m_collName);
-	return StatusCode::FAILURE;
-     }
-	
-     // Make vectors for the cut results
-     std::vector<std::vector<int>* > allSelectionResults;
-     for (std::vector<std::string>::const_iterator strItr = m_qualFlags.begin(); strItr!=m_qualFlags.end(); ++strItr) {
-	std::vector<int> *passEgamma = new std::vector<int>();  
-	allSelectionResults.push_back(passEgamma);
-     }  
-     // Loop over egammas, set decisions   
-     for (xAOD::EgammaContainer::const_iterator eIt = egammas->begin(); eIt!=egammas->end(); ++eIt) {
-	unsigned int itr(0);
-	for (std::vector<std::string>::const_iterator strItr = m_qualFlags.begin(); strItr!=m_qualFlags.end(); ++strItr, ++itr) {
-	        bool val(0);
-	        if ( (*eIt)->passSelection(val,*strItr) ) {
-			if (val) {allSelectionResults[itr]->push_back(1);}
-			else {allSelectionResults[itr]->push_back(0);}
-	 	} else {
-			ATH_MSG_WARNING("Evident problem with quality flag " << *strItr << " so setting to false!");
-			allSelectionResults[itr]->push_back(0); 
-	        }
-	}
-     }     
-
-     // Write decision to SG for access by downstream algs 
-     unsigned int itr(0);
-     for (std::vector<std::string>::const_iterator strItr = m_qualFlags.begin(); strItr!=m_qualFlags.end(); ++strItr, ++itr) {
-	std::string sgKey("");
-	if (m_sgPrefix=="") {
-		sgKey = *strItr;
-	} else {
-		sgKey = m_sgPrefix+*strItr;
-	}   
-     	if (evtStore()->contains<std::vector<int> >(sgKey)) {
-        	ATH_MSG_ERROR("Tool is attempting to write a StoreGate key " << sgKey << " which already exists. Please use a different key");
-        	return StatusCode::FAILURE;
-     	}
-     	CHECK(evtStore()->record(allSelectionResults[itr],sgKey));       
-     }
-     return StatusCode::SUCCESS;
-
-}
-
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/ElectronLikelihoodPIDTool.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/ElectronLikelihoodPIDTool.cxx
deleted file mode 100644
index 6423f965f245b5ea6c7f63891642e1901ea16c66..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/ElectronLikelihoodPIDTool.cxx
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/////////////////////////////////////////////////////////////////
-// ElectronLikelihoodPIDTool.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-// Author: James Catmore (james.catmore@cern.ch)
-//
-
-#include "DerivationFrameworkEGamma/ElectronLikelihoodPIDTool.h"
-#include "PathResolver/PathResolver.h"
-#include<unistd.h>
-#include <vector>
-#include <string>
-
-
-namespace DerivationFramework {
-    
-    ElectronLikelihoodPIDTool::ElectronLikelihoodPIDTool(const std::string& t,
-                                                         const std::string& n,
-                                                         const IInterface* p) :
-    AthAlgTool(t,n,p),
-    m_sgName(""),
-    m_pdfRootFile("ElectronPhotonSelectorTools/ElectronLikelihoodPdfs.root")
-    {
-        declareInterface<DerivationFramework::IAugmentationTool>(this);
-        declareProperty("StoreGateEntryName",m_sgName);
-	declareProperty("PDFRootFile",m_pdfRootFile);
-    }
-    
-    StatusCode ElectronLikelihoodPIDTool::initialize()
-    {
-	// Did the user provide an output SG name?
-	if (m_sgName=="") {
-		ATH_MSG_ERROR("No output SG name provided!");
-		return StatusCode::FAILURE;
-	}
-	// Find the full path to the input file
-	std::string file = PathResolver::find_file(m_pdfRootFile,"XMLPATH");
-	ATH_MSG_INFO("Complete path to PDF input file: " << file);
-	// Test whether the input PDF file is accessible
-	if (access(file.c_str(),0)==-1) {
-		ATH_MSG_ERROR("Input PDF file does not exist!");
-		return StatusCode::FAILURE;
-	}
-        m_lhTool = new Root::TElectronLikelihoodTool();
-        m_lhTool->setPDFFileName(file); 
-        m_lhTool->setOperatingPoint(LikeEnum::Loose);
-        m_lhTool->initialize();
-        return StatusCode::SUCCESS;
-    }
-    
-    StatusCode ElectronLikelihoodPIDTool::finalize()
-    {
-        return StatusCode::SUCCESS;
-    }
-   
-    StatusCode ElectronLikelihoodPIDTool::addBranches() const
-    {
-        std::vector<int> *passLH = new std::vector<int>();
-        
-        // D3PD branches
-        std::vector<float>* el_etas2;
-        std::vector<float>* el_cl_E;
-        std::vector<float>* el_f3;
-        std::vector<float>* el_Ethad;
-        std::vector<float>* el_Ethad1;
-        std::vector<float>* el_reta;
-        std::vector<float>* el_weta2;
-        std::vector<float>* el_f1;
-        std::vector<float>* el_wstot;
-        std::vector<float>* el_emaxs1;
-        std::vector<float>* el_Emax2;
-        std::vector<float>* el_deltaeta1;
-        std::vector<float>* el_trackd0pvunbiased;
-        std::vector<float>* el_TRTHighTOutliersRatio;
-        std::vector<float>* el_tracksigd0pvunbiased;
-        std::vector<float>* el_rphi;
-        std::vector<float>* el_deltaphiRescaled;
-        std::vector<int>* el_nSiHits;
-        std::vector<int>* el_nPixelDeadSensors;
-        std::vector<int>* el_nSCTDeadSensors;
-        std::vector<int>* el_nPixHits;
-        std::vector<int>* el_nBLHits;
-        std::vector<int>* el_nBLayerOutliers;
-        std::vector<float>* el_expectHitInBLayer;
-        std::vector<unsigned int>* el_isEM;
-        std::vector<std::vector<float> >* el_refittedTrack_LMqoverp;
-        std::vector<std::vector<int> >* el_refittedTrack_author;
-        std::vector<float>* el_trackqoverp;
-        
-        int* vxp_n;
-        std::vector<int>* vxp_trk_n;
-        
-        // Retrieve data
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_etas2,"el_etas2"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_cl_E,"el_cl_E"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_f3,"el_f3"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_Ethad,"el_Ethad"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_Ethad1,"el_Ethad1"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_reta,"el_reta"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_weta2,"el_weta2"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_f1,"el_f1"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_wstot,"el_wstot"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_emaxs1,"el_emaxs1"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_Emax2,"el_Emax2"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_deltaeta1,"el_deltaeta1"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_trackd0pvunbiased,"el_trackd0pvunbiased"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_TRTHighTOutliersRatio,"el_TRTHighTOutliersRatio"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_tracksigd0pvunbiased,"el_tracksigd0pvunbiased"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_rphi,"el_rphi"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_deltaphiRescaled,"el_deltaphiRescaled"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nSiHits,"el_nSiHits"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nPixelDeadSensors,"el_nPixelDeadSensors"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nSCTDeadSensors,"el_nSCTDeadSensors"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nPixHits,"el_nPixHits"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nBLHits,"el_nBLHits"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nBLayerOutliers,"el_nBLayerOutliers"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_expectHitInBLayer,"el_expectHitInBLayer"));
-        CHECK(evtStore()->retrieve((const std::vector<unsigned int>*&)el_isEM,"el_isEM"));
-        CHECK(evtStore()->retrieve((const std::vector<std::vector<float> >*&)el_refittedTrack_LMqoverp,"el_refittedTrack_LMqoverp"));
-        CHECK(evtStore()->retrieve((const std::vector<std::vector<int> >*&)el_refittedTrack_author,"el_refittedTrack_author"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_trackqoverp,"el_trackqoverp"));
-        
-        CHECK(evtStore()->retrieve((const int*&)vxp_n,"vxp_n"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)vxp_trk_n,"vxp_trk_n"));
-        
-        // primary vertices with more than 2 tracks (not dependent on electrons)
-        float ip(0.0);
-        for (int pvItr=0; pvItr < *vxp_n; ++pvItr) {
-            if ( (*vxp_trk_n)[pvItr] >= 2 ) ip += 1.0;
-        }
-        
-        // LOOP OVER ELECTRONS
-        unsigned int nElectrons = el_etas2->size();
-        for (unsigned int eItr=0; eItr<nElectrons; ++eItr) {
-            
-            // Prepare variables
-            float eta = (*el_etas2)[eItr];
-            float eT = (*el_cl_E)[eItr]/cosh( (*el_etas2)[eItr]);
-            float f3 = (*el_f3)[eItr];
-            float rHad = (*el_Ethad)[eItr]/eT;
-            float rHad1 = (*el_Ethad1)[eItr]/eT;
-            float Reta = (*el_reta)[eItr];
-            float w2 = (*el_weta2)[eItr];
-            float f1 = (*el_f1)[eItr];
-            //float wstot = (*el_wstot)[eItr];
-            float eratio = ( (*el_emaxs1)[eItr]+(*el_Emax2)[eItr] == 0.0 ) ? 0.0 : ( (*el_emaxs1)[eItr]-(*el_Emax2)[eItr] )/( (*el_emaxs1)[eItr]+(*el_Emax2)[eItr] );
-            float deltaEta = (*el_deltaeta1)[eItr];
-            float d0 = (*el_trackd0pvunbiased)[eItr];
-            float TRratio = (*el_TRTHighTOutliersRatio)[eItr];
-            float d0sigma = (*el_tracksigd0pvunbiased)[eItr];
-            float rphi = (*el_rphi)[eItr];
-            float deltaPoverP(0.0);
-            for (unsigned int i = 0; i<(*el_refittedTrack_LMqoverp)[eItr].size();++i) {
-                if(((*el_refittedTrack_author)[eItr]).at(i)== 4) {
-                    deltaPoverP= 1.-( (*el_trackqoverp)[eItr]/((*el_refittedTrack_LMqoverp)[eItr].at(i)));
-                }
-            }
-            float deltaphires = (*el_deltaphiRescaled)[eItr];
-            int nSi = (*el_nSiHits)[eItr];
-            int nSiDeadSensors = (*el_nPixelDeadSensors)[eItr]+(*el_nSCTDeadSensors)[eItr];
-            int nPix = (*el_nPixHits)[eItr];
-            int nPixDeadSensors = (*el_nPixelDeadSensors)[eItr];
-            int nBlayer = (*el_nBLHits)[eItr];
-            int nBlayerOutliers = (*el_nBLayerOutliers)[eItr];
-            bool expectBlayer(false);
-            if ( (*el_expectHitInBLayer)[eItr]>-999.5 && (*el_expectHitInBLayer)[eItr]<-998.5 ) expectBlayer=true;
-            if ( (*el_expectHitInBLayer)[eItr] > -0.5 && (*el_expectHitInBLayer)[eItr] < 0.5 ) expectBlayer=false;
-            if ( (*el_expectHitInBLayer)[eItr] > 0.5 && (*el_expectHitInBLayer)[eItr] < 1.5 ) expectBlayer=true;
-            int convBit = (*el_isEM)[eItr] & (0x1 << 1);
-	    LLHInputs inputs; 
-	    inputs.eta = (double)eta;
-	    inputs.eT = (double)eT;
-	    inputs.f3 = (double)f3;
-	    inputs.rHad = (double)rHad;
-	    inputs.rHad1 = (double)rHad1;
-            inputs.Reta = (double)Reta;
-            inputs.w2 = (double)w2;
-	    inputs.f1 = (double)f1;
-	    inputs.eratio = (double)eratio;
-	    inputs.deltaEta = (double)deltaEta;
-	    inputs.d0 = (double)d0;
-	    inputs.TRratio = (double)TRratio;
-            inputs.d0sigma = (double)d0sigma;
-            inputs.rphi = (double)rphi;
-	    inputs.deltaPoverP = (double)deltaPoverP;
-	    inputs.deltaphires = (double)deltaphires;
-            inputs.ip = (double)ip;
-            inputs.nSi = (int)nSi;
-	    inputs.nSiDeadSensors = (int)nSiDeadSensors;
-            inputs.nPix = (int)nPix;
-	    inputs.nPixDeadSensors = (int)nPixDeadSensors;
-            inputs.nBlayer = (int)nBlayer;
-            inputs.nBlayerOutliers = (int)nBlayerOutliers;
-            inputs.expectBlayer = (bool)expectBlayer,
-            inputs.convBit = (int)convBit;	
-	    m_lhTool->setOperatingPoint(LikeEnum::VeryLoose);
-	    bool veryloose = runLLHTool(inputs);
-	    m_lhTool->setOperatingPoint(LikeEnum::Loose);
-	    bool loose = runLLHTool(inputs);
-	    m_lhTool->setOperatingPoint(LikeEnum::Medium);
-	    bool medium = runLLHTool(inputs);
-	    m_lhTool->setOperatingPoint(LikeEnum::Tight);
-	    bool tight = runLLHTool(inputs);
-	    m_lhTool->setOperatingPoint(LikeEnum::VeryTight); 
-            bool verytight = runLLHTool(inputs);
- 	    bool ePassesLH = veryloose || loose || medium || tight || verytight;
-            if (ePassesLH) passLH->push_back(1);
-            if (!ePassesLH) passLH->push_back(0);
-            
-        } // end of loop over electrons
-        
-        // Write masses to SG for access by downstream algs
-        if (evtStore()->contains<std::vector<int> >(m_sgName)) {
-            ATH_MSG_ERROR("Tool is attempting to write a StoreGate key " << m_sgName << " which already exists. Please use a different key");
-            return StatusCode::FAILURE;
-        }
-        CHECK(evtStore()->record(passLH, m_sgName));
-        return StatusCode::SUCCESS;
-        
-    }
-
-    bool ElectronLikelihoodPIDTool::runLLHTool(	LLHInputs in) const {
-	double discriminant = m_lhTool->calculate(	in.eta,in.eT,in.f3,in.rHad,in.rHad1,in.Reta,in.w2,in.f1,in.eratio,in.deltaEta,in.d0,in.TRratio,
-							in.d0sigma,in.rphi,in.deltaPoverP,in.deltaphires,in.ip);
-	bool ePassesLH = (bool)m_lhTool->accept(	discriminant,in.eta,in.eT,in.nSi,in.nSiDeadSensors,in.nPix,in.nPixDeadSensors,in.nBlayer,in.nBlayerOutliers,
-							in.expectBlayer,in.convBit,in.ip);
- 	return ePassesLH;
-    }
-    
-} // end of namespace
-
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/ElectronMultiLeptonTool.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/ElectronMultiLeptonTool.cxx
deleted file mode 100644
index 91d91ef1c56bd5bb73bcf5a0384ef7c9ba3e9afa..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/ElectronMultiLeptonTool.cxx
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/////////////////////////////////////////////////////////////////
-// ElectronMultiLeptonTool.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-// Author: James Catmore (james.catmore@cern.ch)
-//
-
-#include "DerivationFrameworkEGamma/ElectronMultiLeptonTool.h"
-#include "PathResolver/PathResolver.h"
-#include<unistd.h>
-#include <vector>
-#include <string>
-
-
-namespace DerivationFramework {
-    
-    ElectronMultiLeptonTool::ElectronMultiLeptonTool(const std::string& t,
-                                                         const std::string& n,
-                                                         const IInterface* p) :
-    AthAlgTool(t,n,p),
-    m_sgName("")
-    {
-        declareInterface<DerivationFramework::IAugmentationTool>(this);
-        declareProperty("StoreGateEntryName",m_sgName);
-    }
-    
-    StatusCode ElectronMultiLeptonTool::initialize()
-    {
-	// Did the user provide an output SG name?
-	if (m_sgName=="") {
-		ATH_MSG_ERROR("No output SG name provided!");
-		return StatusCode::FAILURE;
-	}
-        m_mlTool = new Root::TElectronMultiLeptonSelector();
-        m_mlTool->initialize();
-        return StatusCode::SUCCESS;
-    }
-    
-    StatusCode ElectronMultiLeptonTool::finalize()
-    {
-        return StatusCode::SUCCESS;
-    }
-    
-    StatusCode ElectronMultiLeptonTool::addBranches() const
-    {
-        std::vector<int> *passML = new std::vector<int>();
-        
-        // D3PD branches
-        std::vector<float>* el_etas2;
-        std::vector<float>* el_cl_E;
-        std::vector<float>* el_f3;
-        std::vector<float>* el_Ethad;
-        std::vector<float>* el_Ethad1;
-        std::vector<float>* el_reta;
-        std::vector<float>* el_weta2;
-        std::vector<float>* el_f1;
-        std::vector<float>* el_wstot;
-        std::vector<float>* el_emaxs1;
-        std::vector<float>* el_Emax2;
-        std::vector<float>* el_deltaeta1;
-        std::vector<float>* el_TRTHighTOutliersRatio;
-        std::vector<float>* el_deltaphiRescaled;
-        std::vector<int>* el_nSiHits;
-        std::vector<int>* el_nPixelDeadSensors;
-        std::vector<int>* el_nSCTDeadSensors;
-        std::vector<int>* el_nPixHits;
-        std::vector<int>* el_nBLHits;
-        std::vector<float>* el_expectHitInBLayer;
-        std::vector<int>* el_nTRTHits;
-	std::vector<int>* el_nTRTOutliers;
-        std::vector<std::vector<float> >* el_refittedTrack_LMqoverp;
-        std::vector<std::vector<int> >* el_refittedTrack_author;
-        std::vector<float>* el_trackqoverp;
-        
-        int* vxp_n;
-        std::vector<int>* vxp_trk_n;
-        
-        // Retrieve data
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_etas2,"el_etas2"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_cl_E,"el_cl_E"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_f3,"el_f3"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_Ethad,"el_Ethad"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_Ethad1,"el_Ethad1"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_reta,"el_reta"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_weta2,"el_weta2"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_f1,"el_f1"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_wstot,"el_wstot"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_emaxs1,"el_emaxs1"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_Emax2,"el_Emax2"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_deltaeta1,"el_deltaeta1"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_TRTHighTOutliersRatio,"el_TRTHighTOutliersRatio"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_deltaphiRescaled,"el_deltaphiRescaled"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nSiHits,"el_nSiHits"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nPixelDeadSensors,"el_nPixelDeadSensors"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nSCTDeadSensors,"el_nSCTDeadSensors"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nPixHits,"el_nPixHits"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nBLHits,"el_nBLHits"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_expectHitInBLayer,"el_expectHitInBLayer"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nTRTHits,"el_nTRTHits"));
-	CHECK(evtStore()->retrieve((const std::vector<int>*&)el_nTRTOutliers,"el_nTRTOutliers"));         
-        CHECK(evtStore()->retrieve((const std::vector<std::vector<float> >*&)el_refittedTrack_LMqoverp,"el_refittedTrack_LMqoverp"));
-        CHECK(evtStore()->retrieve((const std::vector<std::vector<int> >*&)el_refittedTrack_author,"el_refittedTrack_author"));
-        CHECK(evtStore()->retrieve((const std::vector<float>*&)el_trackqoverp,"el_trackqoverp"));
-        
-        CHECK(evtStore()->retrieve((const int*&)vxp_n,"vxp_n"));
-        CHECK(evtStore()->retrieve((const std::vector<int>*&)vxp_trk_n,"vxp_trk_n"));
-        
-        // primary vertices with more than 2 tracks (not dependent on electrons)
-        float ip(0.0);
-        for (int pvItr=0; pvItr < *vxp_n; ++pvItr) {
-            if ( (*vxp_trk_n)[pvItr] >= 2 ) ip += 1.0;
-        }
-        
-        // LOOP OVER ELECTRONS
-        unsigned int nElectrons = el_etas2->size();
-        for (unsigned int eItr=0; eItr<nElectrons; ++eItr) {
-            
-            // Prepare variables
-            float eta = (*el_etas2)[eItr];
-            float eT = (*el_cl_E)[eItr]/cosh( (*el_etas2)[eItr]);
-            float f3 = (*el_f3)[eItr];
-            float rHad = (*el_Ethad)[eItr]/eT;
-            float rHad1 = (*el_Ethad1)[eItr]/eT;
-            float Reta = (*el_reta)[eItr];
-            float w2 = (*el_weta2)[eItr];
-            float f1 = (*el_f1)[eItr];
-            float wstot = (*el_wstot)[eItr];
-            float eratio = ( (*el_emaxs1)[eItr]+(*el_Emax2)[eItr] == 0.0 ) ? 0.0 : ( (*el_emaxs1)[eItr]-(*el_Emax2)[eItr] )/( (*el_emaxs1)[eItr]+(*el_Emax2)[eItr] );
-            float deltaEta = (*el_deltaeta1)[eItr];
-            float TRratio = (*el_TRTHighTOutliersRatio)[eItr];
-            float deltaPoverP(0.0);
-            for (unsigned int i = 0; i<(*el_refittedTrack_LMqoverp)[eItr].size();++i) {
-                if(((*el_refittedTrack_author)[eItr]).at(i)== 4) {
-                    deltaPoverP= 1.-( (*el_trackqoverp)[eItr]/((*el_refittedTrack_LMqoverp)[eItr].at(i)));
-                }
-            }
-            float deltaphires = (*el_deltaphiRescaled)[eItr];
-            int nSi = (*el_nSiHits)[eItr];
-            int nSiDeadSensors = (*el_nPixelDeadSensors)[eItr]+(*el_nSCTDeadSensors)[eItr];
-            int nPix = (*el_nPixHits)[eItr];
-            int nPixDeadSensors = (*el_nPixelDeadSensors)[eItr];
-            int nBlayer = (*el_nBLHits)[eItr];
-            bool expectBlayer(false);
-            if ( (*el_expectHitInBLayer)[eItr]>-999.5 && (*el_expectHitInBLayer)[eItr]<-998.5 ) expectBlayer=true;
-            if ( (*el_expectHitInBLayer)[eItr] > -0.5 && (*el_expectHitInBLayer)[eItr] < 0.5 ) expectBlayer=false;
-            if ( (*el_expectHitInBLayer)[eItr] > 0.5 && (*el_expectHitInBLayer)[eItr] < 1.5 ) expectBlayer=true;
-	    int nTRTTotal = (*el_nTRTHits)[eItr] + (*el_nTRTOutliers)[eItr];
-            bool ePassesML = (bool)m_mlTool->accept( 	(double)eta, (double)eT, (double)rHad, (double)rHad1, (double)Reta,
-						     	(double)w2, (double)f1, (double)f3, (double)wstot, (double)eratio,
-							(double)deltaEta, (int)nSi, (int)nSiDeadSensors, (int)nPix, 
-							(int)nPixDeadSensors, (double)deltaphires, (double)deltaPoverP, 
-							(double)TRratio, (int)nTRTTotal, (int)nBlayer, (bool)expectBlayer, false);
-            
-            if (ePassesML) passML->push_back(1);
-            if (!ePassesML) passML->push_back(0);
-            
-        } // end of loop over electrons
-        
-        // Write masses to SG for access by downstream algs
-        if (evtStore()->contains<std::vector<int> >(m_sgName)) {
-            ATH_MSG_ERROR("Tool is attempting to write a StoreGate key " << m_sgName << " which already exists. Please use a different key");
-            return StatusCode::FAILURE;
-        }
-        CHECK(evtStore()->record(passML, m_sgName));
-        return StatusCode::SUCCESS;
-        
-    }
-    
-} // end of namespace
-
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/ElectronsDirectionTool.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/ElectronsDirectionTool.cxx
deleted file mode 100644
index 65b5cd975da461036c67e2bb3e8cbd67fa82875d..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/ElectronsDirectionTool.cxx
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/////////////////////////////////////////////////////////////////
-// ElectronsDirectionTool.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-// Author: James Catmore (james.catmore@cern.ch)
-//
-
-#include "DerivationFrameworkEGamma/ElectronsDirectionTool.h"
-#include "xAODEgamma/ElectronContainer.h"
-#include "xAODCaloEvent/CaloCluster.h"
-#include <vector>
-#include <string>
-
-namespace DerivationFramework {
-    
-    ElectronsDirectionTool::ElectronsDirectionTool(const std::string& t,
-                                                         const std::string& n,
-                                                         const IInterface* p) :
-    AthAlgTool(t,n,p),
-    m_sgEta(""),
-    m_sgPhi(""),
-    m_sgEt(""),
-    m_sgPt(""),
-    m_sgnPrecisionHits(""),
-    m_collName("ElectronCollection")
-    {
-        declareInterface<DerivationFramework::IAugmentationTool>(this);
-	declareProperty("EtaSGEntry",m_sgEta);
-	declareProperty("PhiSGEntry",m_sgPhi);
-	declareProperty("EtSGEntry",m_sgEt);
-	declareProperty("PtSGEntry",m_sgPt);
-	declareProperty("nPrecisionHitsSGEntry",m_sgnPrecisionHits);
-	declareProperty("ElectronContainer",m_collName);
-    }
-    
-    StatusCode ElectronsDirectionTool::initialize()
-    {
-	if (m_sgEta=="" && m_sgPhi=="" && m_sgEt=="" && m_sgPt=="") {
-		ATH_MSG_ERROR("You are requesting the ElectronsDirectionTool but have provided no SG names for the results");
-		return StatusCode::FAILURE;
-	}
-        return StatusCode::SUCCESS;
-    }
-    
-    StatusCode ElectronsDirectionTool::finalize()
-    {
-        return StatusCode::SUCCESS;
-    }
-    
-    StatusCode ElectronsDirectionTool::addBranches() const
-    {
-	std::vector<float> *recEta = new std::vector<float>();
-	std::vector<float> *recPhi = new std::vector<float>();
-	std::vector<float> *recEt = new std::vector<float>();    
-	std::vector<float> *recPt = new std::vector<float>();    
-	std::vector<int> *recnPrecisionHits = new std::vector<int>();
-	
-        // Retrieve data
-	const xAOD::ElectronContainer* electrons =  evtStore()->retrieve< const xAOD::ElectronContainer >(m_collName);
-	if( !electrons ) {
-        	ATH_MSG_ERROR("Couldn't retrieve electron container with key: " << m_collName);
-        	return StatusCode::FAILURE;
-     	}
- 
-        // LOOP OVER ELECTRONS
-	for (xAOD::ElectronContainer::const_iterator eIt = electrons->begin(); eIt!=electrons->end(); ++eIt) {           
- 
-            // Prepare variables
-            float mElectron(0.511); 
-            float eta(0.0), phi(0.0), et(0.0); 
-            const xAOD::TrackParticle* eTrack(0);
-	    const xAOD::CaloCluster* eCluster(0);
-	    if ( (*eIt)->nTrackParticles() > 0) {eTrack = (*eIt)->trackParticle(0);}
-	    else {continue;}
-	    if ( (*eIt)->nCaloClusters() > 0) {eCluster = (*eIt)->caloCluster(0);}		
-	    else {continue;}
-            uint8_t numberOfPixelHits(0);
-	    if( !eTrack->summaryValue(numberOfPixelHits,xAOD::numberOfPixelHits) ){
-        	ATH_MSG_ERROR("Unable to retrieve numberOfPixelHits");
-		return StatusCode::FAILURE;
-       	    }
-	    uint8_t numberOfSCTHits(0);
-	    if( !eTrack->summaryValue(numberOfSCTHits,xAOD::numberOfSCTHits) ){
-                ATH_MSG_ERROR("Unable to retrieve numberOfSCTHits");
-		return StatusCode::FAILURE;
-            }	
-            if ( numberOfPixelHits+numberOfSCTHits >= 4.0) {
-		eta = eTrack->eta(); 
-            	phi = eTrack->phi();
-		et = eCluster->e() / cosh(eTrack->eta());
-	    } else {
-		eta = eCluster->eta();
-		phi = eCluster->phi();
-		et = eCluster->e() / cosh( eCluster->eta() );
-	    }
-	    float pt = sqrt( et*et - mElectron*mElectron );
-	    recEta->push_back(eta);
-	    recPhi->push_back(phi);
-	    recEt->push_back(et);
-	    recPt->push_back(pt);		            
-	    
-	    int nPrecisionHits(0);
-	    nPrecisionHits = numberOfPixelHits + numberOfSCTHits;
-	    recnPrecisionHits->push_back(nPrecisionHits);
-	    
-        } // end of loop over electrons
-        
-        // Write SG for access by downstream algs
-	if (m_sgEta!="") {
-        	if (evtStore()->contains<std::vector<float> >(m_sgEta)) {
-        	    ATH_MSG_ERROR("Tool is attempting to write a StoreGate key " << m_sgEta << " which already exists. Please use a different key");
-        	    return StatusCode::FAILURE;
-        	}
-        	CHECK(evtStore()->record(recEta, m_sgEta));
-	}
-        if (m_sgPhi!="") {
-		if (evtStore()->contains<std::vector<float> >(m_sgPhi)) {
-	            ATH_MSG_ERROR("Tool is attempting to write a StoreGate key " << m_sgPhi << " which already exists. Please use a different key");
-	            return StatusCode::FAILURE;
-	        }
-	        CHECK(evtStore()->record(recPhi, m_sgPhi));
-	}
-	if (m_sgEt!="") {
-	        if (evtStore()->contains<std::vector<float> >(m_sgEt)) {
-	            ATH_MSG_ERROR("Tool is attempting to write a StoreGate key " << m_sgEt << " which already exists. Please use a different key");
-	            return StatusCode::FAILURE;
-	        }
-	        CHECK(evtStore()->record(recEt, m_sgEt));
-	}
-	if (m_sgPt!="") {
-		if (evtStore()->contains<std::vector<float> >(m_sgPt)) {
-	            ATH_MSG_ERROR("Tool is attempting to write a StoreGate key " << m_sgPt << " which already exists. Please use a different key");
-	            return StatusCode::FAILURE;
-	        }
-	        CHECK(evtStore()->record(recPt, m_sgPt));
-	}
-	if (m_sgnPrecisionHits!="") {
-		if (evtStore()->contains<std::vector<float> >(m_sgnPrecisionHits)) {
-		  ATH_MSG_ERROR("Tool is attempting to write a StoreGate key " << m_sgnPrecisionHits << " which already exists. Please use a different key");
-		  return StatusCode::FAILURE;
-	        }
-	        CHECK(evtStore()->record(recnPrecisionHits, m_sgnPrecisionHits));
-	}
-
-        return StatusCode::SUCCESS;
-        
-    }
-    
-} // end of namespace
-
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/components/DerivationFrameworkEGamma_entries.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/components/DerivationFrameworkEGamma_entries.cxx
deleted file mode 100644
index cb2058778e84130661557c196839d2517cf0d978..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/components/DerivationFrameworkEGamma_entries.cxx
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "GaudiKernel/DeclareFactoryEntries.h"
-#include "DerivationFrameworkEGamma/ElectronLikelihoodPIDTool.h"
-#include "DerivationFrameworkEGamma/ElectronsDirectionTool.h"
-#include "DerivationFrameworkEGamma/ElectronMultiLeptonTool.h"
-#include "DerivationFrameworkEGamma/EGammaPassSelectionWrapper.h"
-using namespace DerivationFramework;
- 
-DECLARE_TOOL_FACTORY( ElectronLikelihoodPIDTool )
-DECLARE_TOOL_FACTORY( ElectronsDirectionTool )
-DECLARE_TOOL_FACTORY( ElectronMultiLeptonTool )
-DECLARE_TOOL_FACTORY( EGammaPassSelectionWrapper )
- 
-DECLARE_FACTORY_ENTRIES( DerivationFrameworkEGamma ) {
-   DECLARE_TOOL( ElectronLikelihoodPIDTool )
-   DECLARE_TOOL( ElectronsDirectionTool )
-   DECLARE_TOOL( ElectronMultiLeptonTool )
-   DECLARE_TOOL( EGammaPassSelectionWrapper ) 
-}
- 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/components/DerivationFrameworkEGamma_load.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/components/DerivationFrameworkEGamma_load.cxx
deleted file mode 100644
index d9b178feb04b0587bddd3a8f8e24e1a71b0f9fb0..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/src/components/DerivationFrameworkEGamma_load.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "GaudiKernel/LoadFactoryEntries.h"
- 
-LOAD_FACTORY_ENTRIES( DerivationFrameworkEGamma )