From 8a45c95e9d9103095ffe3ef8636e01d71a8fc6d7 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Mon, 9 Nov 2020 16:27:36 +0100
Subject: [PATCH] HSG5DPDUtils: delete package and associated files

Delete unused HSG5DPDUtils package that was already disabled in the
build since a long time. Also delete a few related files in other
packages that reference this package and are clearly obsolete.
---
 .../D3PDMakerConfig/python/CoreCommonD3PD.py  |   6 -
 .../JetTagD3PDMaker/python/JetTagJSMaker.py   |  73 --
 .../share/JetTagD3PD_configFatJets.py         |  24 -
 .../PhysicsD3PDMaker/share/FatJetsConfig.py   |  34 -
 .../HSG5/HSG5DPDUtils/CMakeLists.txt          |  32 -
 .../HSG5DPDUtils/HSG5DPDUtils/LeptonFilter.h  |  40 -
 .../HSG5DPDUtils/LeptonJetsFilter.h           |  40 -
 .../HSG5DPDUtils/python/BoostedJetFilter.py   | 305 -------
 .../HSG5DPDUtils/python/GroomedJetsConfig.py  |  32 -
 .../HSG5/HSG5DPDUtils/python/HSG5D3PD.py      | 758 ------------------
 .../HSG5DPDUtils/python/HSG5D3PDProdFlags.py  | 153 ----
 .../HSG5/HSG5DPDUtils/python/HSG5Flags.py     | 162 ----
 .../HSG5/HSG5DPDUtils/python/HSG5Selectors.py | 161 ----
 .../HSG5/HSG5DPDUtils/python/JSD3PD.py        | 221 -----
 .../HSG5/HSG5DPDUtils/python/JSjets.py        | 251 ------
 .../HSG5/HSG5DPDUtils/python/LeptonFilter.py  | 609 --------------
 .../HSG5/HSG5DPDUtils/python/__init__.py      |   3 -
 .../share/AODToHSG5_WHlnubb_boosted_D3PD.py   |  49 --
 .../share/D2PD_ExampleSimpleTest.py           |  67 --
 .../HSG5DPDUtils/share/D2PD_topOptions.py     |  71 --
 .../HSG5/HSG5DPDUtils/share/FatJetsConfig.py  |  34 -
 ...5_WHlnubb_boosted_D3PD_prodJobOFragment.py |  65 --
 ...WHlnubb_unboosted_D3PD_prodJobOFragment.py |  76 --
 ..._unboosted_QCDbkg_D3PD_prodJobOFragment.py |  71 --
 ...G5_ZHllbb_boosted_D3PD_prodJobOFragment.py |  66 --
 ..._ZHllbb_unboosted_D3PD_prodJobOFragment.py |  66 --
 ..._ZHnunubb_boosted_D3PD_prodJobOFragment.py |  67 --
 ...Hnunubb_unboosted_D3PD_prodJobOFragment.py |  67 --
 .../HSG5_Zbb_boosted_D3PD_prodJobOFragment.py |  65 --
 ..._gammaHbb_boosted_D3PD_prodJobOFragment.py |   3 -
 ..._gammaZbb_boosted_D3PD_prodJobOFragment.py |  66 --
 .../share/WHlnubb_boostedFilter.py            |  75 --
 .../share/WHlnubb_unboostedFilter.py          |  86 --
 .../share/WHlnubb_unboostedFilterQCDbkg.py    |  86 --
 .../share/ZHllbb_boostedFilter.py             |  72 --
 .../share/ZHllbb_unboostedFilter.py           |  56 --
 .../share/ZHnunubb_boostedFilter.py           |  40 -
 .../share/ZHnunubb_unboostedFilter.py         |  31 -
 .../HSG5DPDUtils/share/Zbb_boostedFilter.py   |  37 -
 .../share/gammaHbb_boostedFilter.py           |   3 -
 .../share/gammaZbb_boostedFilter.py           |  89 --
 .../HSG5/HSG5DPDUtils/src/LeptonFilter.cxx    | 138 ----
 .../HSG5DPDUtils/src/LeptonJetsFilter.cxx     | 125 ---
 .../src/components/HSG5DPDUtils_entries.cxx   |   6 -
 Projects/Athena/package_filters.txt           |   2 -
 45 files changed, 4583 deletions(-)
 delete mode 100644 PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJSMaker.py
 delete mode 100644 PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/share/JetTagD3PD_configFatJets.py
 delete mode 100644 PhysicsAnalysis/D3PDMaker/PhysicsD3PDMaker/share/FatJetsConfig.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/CMakeLists.txt
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonFilter.h
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonJetsFilter.h
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/BoostedJetFilter.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/GroomedJetsConfig.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PD.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PDProdFlags.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Flags.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Selectors.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSD3PD.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSjets.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/LeptonFilter.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/__init__.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/AODToHSG5_WHlnubb_boosted_D3PD.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_ExampleSimpleTest.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_topOptions.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/FatJetsConfig.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_QCDbkg_D3PD_prodJobOFragment.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_boosted_D3PD_prodJobOFragment.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_Zbb_boosted_D3PD_prodJobOFragment.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaHbb_boosted_D3PD_prodJobOFragment.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_boostedFilter.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilter.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilterQCDbkg.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_boostedFilter.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_unboostedFilter.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_boostedFilter.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_unboostedFilter.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/Zbb_boostedFilter.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaHbb_boostedFilter.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaZbb_boostedFilter.py
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonFilter.cxx
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonJetsFilter.cxx
 delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/components/HSG5DPDUtils_entries.cxx

diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/CoreCommonD3PD.py b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/CoreCommonD3PD.py
index b829d14cc2a..43c38f292f7 100644
--- a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/CoreCommonD3PD.py
+++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/CoreCommonD3PD.py
@@ -189,12 +189,6 @@ from D3PDMakerConfig.CommonJSD3PD  import AddHadronicInfo
 #AddHadronicInfo(ExtendedJetD3PDObject, ['Tau1','Tau2','Tau3', 'ZCUT12', 'ZCUT23','ZCUT34','Dip12', 'Dip13', 'Dip23','DipExcl12','PlanarFlow','Angularity'], theblockname = 'substructureblocks', level=99)
 
 
-#from HSG5DPDUtils.HSG5D3PD  import addSTRUCTCalib
-#addSTRUCTCalib('AntiKt4TopoEMJetsReTagged', input='Topo', mainParam=0.4)
-#addSTRUCTCalib('AntiKt6TopoEMJetsReTagged', input='Topo', mainParam=0.6)
-#addSTRUCTCalib('AntiKt4LCTopoJetsReTagged', input='Topo', mainParam=0.4)
-#addSTRUCTCalib('AntiKt6LCTopoJetsReTagged', input='Topo', mainParam=0.6)
-
 
 #from JetD3PDMaker import JetMomentFillerTool
 #ExtendedJetD3PDObject.defineBlock(99, 'splitInfoBlock', JetMomentFillerTool,Moments= ['SPLIT12', 'SPLIT23', 'SPLIT34'])
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJSMaker.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJSMaker.py
deleted file mode 100644
index 6c67b681d58..00000000000
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJSMaker.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-from JetRec.JetGetters import *
-from JetRec.JetRecFlags import jetFlags
-from JetRecTools.JetRecToolsConf import *
-from AthenaCommon.AlgSequence import AlgSequence
-from JetRec.JetMomentGetter import  add_jetMoments_to_JetAlg, make_JetMomentGetter
-from JetRec.JetRecConf import JetSorterTool
-import JetSubStructure
-
-from HSG5DPDUtils.JSjets import *
-
-### overload function from HSG5DPDUtils.JSjets to be able tag truth jets
-
-def jtsetupTruthJets(myjetfinder, myjetdr, GroomedDicts, theseq):
-  if rec.doTruth():
-    myGroomingTools, catNames = getGroomingTools(GroomedDicts)   
-     
-    sortertool = JetSorterTool('myJetSorter', SortOrder="ByPtDown", OutputLevel=3)
-
-### tagging truth subjets
-    subjets_names = [x for x in catNames if "Subjets" in x]
-    btag_tool = []
-    if subjets_names != '':
-        from JetRec.JetGetters import getStandardBTaggerTool
-        from JetRec.JetRecFlags import jetFlags
-        jetFlags.doBTagging = True
-        _btag_tool = getStandardBTaggerTool('AntiKt', 0.4, 'Truth')
-        if len(_btag_tool) > 0:
-            btag_tool += [ JetSubStructure.JetAlgToolWrapper(name = 'JetBTagger_' + ''.join(subjets_names)
-                                                             , JetAlgTool = _btag_tool[0], 
-                                                             GroomedjetsAuthor = subjets_names ) ] 
-        jetFlags.doBTagging = False
-
-
-    assoc_tool_truth = JetSubStructure.JetAssociationTool(
-                        name = 'JetAssocToolTruth',
-                        GroomingTools = myGroomingTools, UsedSignalState = 2,
-                        JetAlgTools = [sortertool]+btag_tool, OutputLevel = 3
-                       )
-
-    myjetgetter_truth = make_StandardJetGetter(myjetfinder, 
-                                               myjetdr, 'Truth', 
-                                               seq = theseq, doCalib=False ,
-                                               addDefaultMoment=False)
-
-    truthcontname = myjetgetter_truth.outputKey() 
-
-    make_JetMomentGetter(truthcontname , [assoc_tool_truth], theseq )
-
-    return [ truthcontname, catNames ]
-  else:
-    return [ None, None ]
-
-
-def jtcreateJSJets( ParentDict, GroomedDicts,  theseq = AlgSequence()) :
- 
-  if type(ParentDict) != dict:
-    raise TypeError("ParentDict must be a dict!")
-
-  if type(GroomedDicts) != list:
-    raise TypeError("GroomedDicts must be a list!")
-
-  myjetfinder = ParentDict["JetFinder"]
-  myjetdr = ParentDict["JetdR"]
-  myjetinput = ParentDict["JetInput"]
-
-  if myjetinput == 'Truth':
-    return jtsetupTruthJets(myjetfinder, myjetdr, GroomedDicts, theseq)
-  elif myjetinput == 'Track':
-    return setupTrackJets(myjetfinder, myjetdr, GroomedDicts, theseq)
-  else :
-    return setupCaloJets(myjetfinder, myjetdr, myjetinput, GroomedDicts, theseq)
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/share/JetTagD3PD_configFatJets.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/share/JetTagD3PD_configFatJets.py
deleted file mode 100644
index 6b7f3986df8..00000000000
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/share/JetTagD3PD_configFatJets.py
+++ /dev/null
@@ -1,24 +0,0 @@
-include.block("JetTagD3PDMaker/JetTagD3PD_configFatJets.py")
-
-from JetRec.JetRecFlags import jetFlags
-jetFlags.doBTagging = False
-
-###
-from HSG5DPDUtils.JSjets import getGroomingTools
-
-from HSG5DPDUtils.GroomedJetsConfig import getGroomedJetsConfig
-dictsConfig = getGroomedJetsConfig()
-
-sj_n = []
-for dC in dictsConfig:
-    myjetfinder = dC[0]["JetFinder"]
-    myjetdr = dC[0]["JetdR"]
-    myjetinput = dC[0]["JetInput"]
-    myGroomingTools, catNames = getGroomingTools(dC[1])
-    sj_n += [(myjetfinder+"%d"%(myjetdr*10) + myjetinput+x) for x in catNames if "Subjets" in x]
-   
-from BTagging.BTaggingFlags import BTaggingFlags
-for sj in sj_n:
-   BTaggingFlags.Jets += [sj]
-   BTaggingFlags.JetsWithInfoPlus += [sj]
-   BTaggingFlags.CalibrationChannelAliases += [sj+"->AntiKt4LCTopo" ]
diff --git a/PhysicsAnalysis/D3PDMaker/PhysicsD3PDMaker/share/FatJetsConfig.py b/PhysicsAnalysis/D3PDMaker/PhysicsD3PDMaker/share/FatJetsConfig.py
deleted file mode 100644
index 7964da34f61..00000000000
--- a/PhysicsAnalysis/D3PDMaker/PhysicsD3PDMaker/share/FatJetsConfig.py
+++ /dev/null
@@ -1,34 +0,0 @@
-include.block("PhysicsD3PDMaker/FatJetsConfig.py")
-
-from JetRec.JetRecFlags import jetFlags
-jetFlags.doBTagging = False
-jetFlags.inputFileType = 'AOD'
-
-preseq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName())
-
-###
-from HSG5DPDUtils.JSjets import createJSJets,getGroomingTools
-
-from HSG5DPDUtils.GroomedJetsConfig import getGroomedJetsConfig
-dictsConfig = getGroomedJetsConfig()
-
-sj_n = []
-for dC in dictsConfig:
-    myjetfinder = dC[0]["JetFinder"]
-    myjetdr = dC[0]["JetdR"]
-    myjetinput = dC[0]["JetInput"]
-    myGroomingTools, catNames = getGroomingTools(dC[1])
-    sj_n += [(myjetfinder+"%d"%(myjetdr*10) + myjetinput+x) for x in catNames if "Subjets" in x]
-    
-from BTagging.BTaggingFlags import BTaggingFlags
-for sj in sj_n:
-   BTaggingFlags.Jets += [sj]
-   BTaggingFlags.JetsWithInfoPlus += [sj]
-   BTaggingFlags.CalibrationChannelAliases += [sj+"->AntiKt4LCTopo" ]
-
-include("BTagging/BTagging_LoadTools.py")
-
-myJetKeys = []
-for dC in dictsConfig:
-    xx = createJSJets(dC[0], dC[1], preseq)
-    myJetKeys += [xx]
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/CMakeLists.txt b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/CMakeLists.txt
deleted file mode 100644
index d701f17f067..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/CMakeLists.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-################################################################################
-# Package: HSG5DPDUtils
-################################################################################
-
-# Declare the package name:
-atlas_subdir( HSG5DPDUtils )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaPython
-                          PRIVATE
-                          Event/NavFourMom
-                          GaudiKernel
-                          Reconstruction/Jet/JetEvent
-                          Reconstruction/MuonIdentification/muonEvent )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
-# Component(s) in the package:
-atlas_add_component( HSG5DPDUtils
-                     src/*.cxx
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps NavFourMom GaudiKernel JetEvent muonEvent )
-
-# Install files from the package:
-atlas_install_headers( HSG5DPDUtils )
-atlas_install_python_modules( python/*.py )
-atlas_install_joboptions( share/*.py )
-
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonFilter.h b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonFilter.h
deleted file mode 100644
index 62a2d49ab53..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonFilter.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef HSG5DPDUTILS_LEPTONFILTER_H
-#define HSG5DPDUTILS_LEPTONFILTER_H
-
-#include "AthenaBaseComps/AthFilterAlgorithm.h"
-
-#include <string>
-
-class Algorithm;
-
-namespace HSG5 {
-
-  class LeptonFilter : public AthFilterAlgorithm {
-
-  public:
-    LeptonFilter(const std::string& name, ISvcLocator* pSvcLocator);
-    virtual ~LeptonFilter();
-
-    virtual StatusCode initialize();
-    virtual StatusCode execute();
-    virtual StatusCode finalize();
-
-  private:
-    std::string findType(std::string l_property);
-    std::string findName(std::string l_property);
-
-    Algorithm* m_electronFilter;
-    std::vector<Algorithm*> m_muonFilter;
-
-    std::string m_electronFilterNameAndType;
-    std::vector<std::string> m_muonFilterNameAndTypeVec;
-
-  };
-
-} // end namespace
-
-#endif // HSG5DPDUTILS_LEPTONFILTER_H
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonJetsFilter.h b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonJetsFilter.h
deleted file mode 100644
index 8b9bf220202..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonJetsFilter.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef HSG5DPDUTILS_LEPTONJETSFILTER_H
-#define HSG5DPDUTILS_LEPTONJETSFILTER_H
-
-#include "AthenaBaseComps/AthFilterAlgorithm.h"
-
-#include <string>
-
-
-namespace HSG5 {
-
-  class LeptonJetsFilter : public AthFilterAlgorithm {
-
-  public:
-
-    LeptonJetsFilter(const std::string& name, ISvcLocator* pSvcLocator);
-    virtual ~LeptonJetsFilter();
-
-    virtual StatusCode initialize();
-    virtual StatusCode execute();
-    virtual StatusCode finalize();
-
-  private:
-    
-    std::string m_selectedJetContainerName;
-    std::string m_selectedMuonContainerName;
-
-    int m_minSumJetsAndMuon;
-    int m_maxSumJetsAndMuon;
-    
-    int m_nProcessed;
-    int m_nEventPassTrigger;
-  };
-
-} // end namespace
-
-#endif // HSG5DPDUTILS_LEPTONJETSFILTER_H
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/BoostedJetFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/BoostedJetFilter.py
deleted file mode 100644
index 760832a522c..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/BoostedJetFilter.py
+++ /dev/null
@@ -1,305 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-__doc__ = """This is a short algorithm to select events that contain one 
-boosted jet which fulfills a certain set of criteria.
-"""
-__version__ = "0.0.1"
-__author__  = "Robert Harrington <R.Harrington@ed.ac.uk>"
-
-
-import AthenaPython.PyAthena as PyAthena
-from AthenaPython.PyAthena import StatusCode
-
-from PrimaryDPDMaker import PrimaryDPDHelpers
-
-import PyUtils.RootUtils as ru
-ROOT = ru.import_root()
-from ROOT import JetCollectionHelper
-
-## Import the module that allows to use named units, e.g. GeV
-import AthenaCommon.SystemOfUnits as Units
-
-class JetFilter( PyAthena.AthFilterAlgorithm ):
-    """
-    This class is a short algorithm to select events that contain one 
-    jet which fulfills a certain set of criteria.  All energies below
-    are uncalibrated (EM scale).  The possible criteria are (with
-    default values):
-    jetCollectionType       = "JetCollection"
-    jetCollectionName       = "CamKt12LCTopoJets"
-    useUncalibratedJets     = True
-    cutEtMin                = 60.0*Units.GeV
-    cutEtaMin               = 0
-    cutEtaMax               = 2.5
-    removeOverlap           = False
-    deltaR                  = 1.2
-    leptonContainerTypeList = []
-    leptonContainerNameList = []
-    nLeadingsForCheck       = 10000000
-    minNumberPassed         = 1
-    recordGoodJets          = False
-    goodJetCollectionName   = self.name()
-    passAll                 = False
-    """
-
-    def __init__ ( self, name = "JetFilter", **kw ):
-        ## initialize base class
-        kw['name'] = name
-        super(JetFilter, self).__init__(**kw)
-
-        ## Define the cuts
-        self.jetCollectionType       = kw.get('jetCollectionType', "JetCollection")
-        self.jetCollectionName       = kw.get('jetCollectionName', "CamKt12LCTopoJets")
-        self.useUncalibratedJets     = kw.get('useUncalibratedJets', True)
-        self.cutEtMin                = kw.get('cutEtMin', 60.0*Units.GeV)
-        self.cutEtaMin               = kw.get('cutEtaMin', 0.0)
-        self.cutEtaMax               = kw.get('cutEtaMax', 2.5)
-        self.removeOverlap           = kw.get('removeOverlap', False)
-        self.deltaR                  = kw.get('deltaR', 1.2)
-        self.leptonContainerTypeList = kw.get('leptonContainerTypeList', [])
-        self.leptonContainerNameList = kw.get('leptonContainerNameList', [])
-        self.nLeadingsForCheck       = kw.get('nLeadingsForCheck', 10000000)
-        self.minNumberPassed         = kw.get('minNumberPassed', 1)
-        self.recordGoodJets          = kw.get('recordGoodJets', False)
-        self.goodJetCollectionName   = kw.get('goodBoostedJetCollectionName', self.name() )
-        self.passAll                 = kw.get('passAll', False)
-
-        ## Get the storgate handle
-        self.storeGateSvc = None
-
-        ## Handle to JetSignalState
-        self.jss = None
-
-        return
-
-
-
-        
-    def initialize(self):
-        self.msg.info( '************************************' )
-        self.msg.info( '==> initialize %s...', self.name() )
-        self.msg.info( '  jetCollectionType       = %r', self.jetCollectionType )
-        self.msg.info( '  jetCollectionName       = %r', self.jetCollectionName )
-        self.msg.info( '  recordGoodJets          = %r', self.recordGoodJets )
-        self.msg.info( '  goodJetCollectionName   = %r', self.goodJetCollectionName )
-        self.msg.info( 'Will apply the following cuts:' )
-        self.msg.info( '  useUncalibratedJets     = %r', self.useUncalibratedJets )
-        self.msg.info( '  EtMin (GeV)             = %r', self.cutEtMin/Units.GeV )
-        self.msg.info( '  EtaMin                  = %r', self.cutEtaMin )
-        self.msg.info( '  EtaMax                  = %r', self.cutEtaMax )
-        self.msg.info( '  removeOverlap           = %r', self.removeOverlap )
-        self.msg.info( '  deltaR                  = %r', self.deltaR )
-        self.msg.info( '  leptonContainerTypeList = %r', self.leptonContainerTypeList )
-        self.msg.info( '  leptonContainerNameList = %r', self.leptonContainerNameList )
-        self.msg.info( '  nLeadingsForCheck       = %r', self.nLeadingsForCheck )
-        self.msg.info( '  minNumberPassed         = %r', self.minNumberPassed )
-        self.msg.info( '  passAll                 = %r', self.passAll )
-        self.msg.info( '************************************' )
-
-        ## Initialize the counters
-        self.nProcessed     = 0
-        self.nJets          = 0
-        self.nEventPassed   = 0
-
-        ## Import needed modules
-        import PyUtils.RootUtils as ru
-        ROOT = ru.import_root()
-
-        ## Get the StoreGate service
-        self.storeGateSvc = PyAthena.py_svc('StoreGateSvc')
-        if self.storeGateSvc is None:
-            self.msg.error("Problem retrieving StoreGateSvc pointer !!")
-            return StatusCode.Failure
-
-        ## Eagerly load library due to reflex bug (autoloading enums/namespaces doesn't work)
-        PyAthena.load_library ('FourMomUtils')
-
-        ## Get the JetSignalState helper
-        self.jss = PyAthena.SignalStateHelper(PyAthena.P4SignalState.JETFINAL)
-        
-        ## import some 4-mom utils
-        import FourMomUtils.Bindings
-        self.utils = { 'deltaR' : PyAthena.P4Helpers.deltaR }
-
-
-        return StatusCode.Success
-
-
-
-    def execute(self):
-        self.nProcessed+=1
-        self.msg.debug( '==> execute %s on %r. event...' % (self.name(), self.nProcessed) )
-        
-
-        ## If passAll is selected, accept all events
-        if self.passAll :
-            self.msg.debug( '%s event passed because passAll is true' % self.name() )
-            self.setFilterPassed(True)
-            self.nEventPassed += 1
-            return StatusCode.Success
-
-
-        # Load the jet collection from the input file
-        jetCollection = None
-        try:
-            jetCollection = self.storeGateSvc.retrieve( self.jetCollectionType, self.jetCollectionName )
-            self.msg.debug( 'Loading the jet collection %s from the input file.' % self.jetCollectionName )
-        except LookupError:
-            self.msg.warning( 'Collection %s not found' % self.jetCollectionName )           
-            self.setFilterPassed(True)
-            return StatusCode.Success   
-        
-        
-        # Load the lepton collections from the input file
-        self.msg.debug( 'Going to load the leptons of type %s and key %s.' % (self.leptonContainerTypeList, self.leptonContainerNameList) )
-        leptonList = []
-        if self.leptonContainerTypeList.__len__() == self.leptonContainerNameList.__len__() :
-            for i in range( self.leptonContainerTypeList.__len__() ) :
-                try:
-                    lepColl = self.storeGateSvc.retrieve( self.leptonContainerTypeList[i],
-                                                          self.leptonContainerNameList[i] )
-                    self.msg.debug( 'Loading the lepton collection %s from the input file.'
-                                    % self.leptonContainerNameList[i] )
-                    for lep in lepColl :
-                        leptonList.append(lep)
-                        pass
-                    pass
-                except LookupError:
-                    self.msg.warning( 'Collection %s not found' % self.leptonContainerNameList[i] )           
-                    self.setFilterPassed(True)
-                    return StatusCode.Success   
-                pass
-            pass
-        else :
-            self.msg.error( 'List of leptons type %s and key %s has different lenght!'
-                            % (self.leptonContainerTypeList, self.leptonContainerNameList) )
-            pass
-
-
-        ## Turn all jets into uncalibrated state
-        if self.useUncalibratedJets :
-            self.jss.setSignalState( PyAthena.P4SignalState.UNCALIBRATED)
-            self.msg.debug( 'Setting the jet state to uncalibrated jets.' )
-
-
-        # Create a class-member list of all jets that passed all cuts.
-        # This can then be used by other filters to do overlap removal, etc.
-        VIEW_ELEMENTS = 1
-        goodJets = PyAthena.JetCollection(VIEW_ELEMENTS)
-
-
-        # Print a debug message
-        self.msg.debug( 'Starting loop over all jets. In this event, there are %s jets' % jetCollection.size() )
-
-
-        ## Find leading Et
-        leadEt = 0.0*Units.GeV
-        jet_pass=0
-        jet_n=0
-
-        controlObject = self.jss.controlObject
-        releaseObject = self.jss.releaseObject
-
-        for jet in jetCollection :
-            controlObject(jet)            
-            self.msg.debug( ' jet = '+str(jet))
-            self.nJets += 1
-            jet_n += 1
-            if jet_n <= self.nLeadingsForCheck :
-                if abs(jet.eta()) >= self.cutEtaMin and abs(jet.eta()) < self.cutEtaMax :
-                    if jet.et() > self.cutEtMin :
-                        if self.removeOverlap :
-                            self.msg.debug( 'JetFilter: I am in overlap!' )
-                            doesOverlap = False
-                            for lep in leptonList :
-                                if self.utils['deltaR'](jet, lep) <= self.deltaR :
-                                    doesOverlap = True
-                                    break
-                                pass
-                            if not doesOverlap :
-                                if jet.et() > leadEt :
-                                    leadEt = jet.et()
-                                    pass
-                                jet_pass+=1
-                                jetCopy = jet
-                                goodJets.push_back( jetCopy )
-                                pass
-                            pass
-                        else :
-                            self.msg.debug( 'JetFilter: I am NOT in overlap!' )
-                            if jet.et() > leadEt :
-                                leadEt = jet.et()
-                                pass
-                            jet_pass+=1
-                            jetCopy = jet
-                            goodJets.push_back( jetCopy )
-                            pass
-                        pass
-                    pass
-                pass
-            pass
-
-        # Print a debug message
-        self.msg.debug( 'Done with the loop over the jets. Have %s jets in collection, put %s jets in goodJets, and the leading jet has et = %s GeV.' % ( jetCollection.size(), goodJets.__len__(), leadEt/Units.GeV ) )
-
-        releaseObject()
-
-
-        ## Record the good jets into StoreGate so that they can be retrieved by other algorithms
-        if self.recordGoodJets :
-            if JetCollectionHelper.record_jets( self.storeGateSvc, goodJets, self.goodJetCollectionName ).isFailure() :
-                self.msg.error( 'Could not record the goodJets into StoreGate with the key = %s' % self.goodJetCollectionName )
-                pass
-            pass
-
-        ## Check if the event is accepted
-        if  goodJets.__len__() >= self.minNumberPassed :
-            self.msg.debug( 'The %d leading jets are > %f GeV', jet_pass, self.cutEtMin/Units.GeV)
-            self.msg.debug( '%s event passed.' % self.name() )
-            self.setFilterPassed(True)
-            self.nEventPassed += 1
-            pass
-        else:
-            self.msg.debug( '%s event failed' % self.name() )
-            self.setFilterPassed(False)
-            pass
-        
-        return StatusCode.Success
-
-
-
-    def finalize(self):
-        ## Import needed modules
-        import math
-
-        ## Calculate the efficiencies and their errors
-        effiJets      = 0.0
-        effiEvents    = 0.0
-        effiErrJets   = 0.0
-        effiErrEvents = 0.0
-        try :
-            # Efficiencies
-            effiJets      = self.nJets / float(self.nProcessed)
-            effiEvents    = self.nEventPassed / float(self.nProcessed)
-
-            # Error on efficiencies
-            effiErrJets   = math.sqrt(self.nJets) / float(self.nProcessed)
-            effiErrEvents = 100.0*math.sqrt(effiEvents*(1.-effiEvents)/float(self.nProcessed))
-
-            effiEvents *= 100.
-            
-        except ZeroDivisionError :
-            self.msg.warning( 'Division by zero error when calculating the uncertainties on the pass efficiencies...' )
-
-
-        
-        self.msg.info( '==> finalize %s...' % self.name() )
-        self.msg.info( '***************************************************************' )
-        self.msg.info( 'Cut-flow table of %s skimming algorithm:' % self.name() )
-        self.msg.info( '-------------' )
-        self.msg.info( ' Number of processed events: %r' % self.nProcessed )
-        self.msg.info( ' Number of all jets:    %r and number of jets per event: %3.3f +/- %3.3f' % ( self.nJets, effiJets, effiErrJets ) )
-        self.msg.info( ' Events accepted:    %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventPassed, effiEvents, effiErrEvents ) )
-        self.msg.info( '***************************************************************' )
-
-        return StatusCode.Success
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/GroomedJetsConfig.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/GroomedJetsConfig.py
deleted file mode 100644
index 54837ab4f15..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/GroomedJetsConfig.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import copy
-
-def getGroomedJetsConfig():
-    
-    dictsConf = []
-
-    ParentDict = {
-                  'JetFinder'  :  'CamKt',
-                  'JetdR'      :   1.2,
-                  'JetInput'   :   'LCTopo',
-                 }                                                                                                          
-
-    GroomedDicts = [
-                     #{ 'Type' : 'BDRSFiltering', 'args' : { 'SaveSubjets' : True } } #,
-                     { 'Type' : 'BDRSFiltering', 'args' : { 'SaveSubjets' : True  , 'minSplitR' :0.} }
-                   ]
-
-
-    dictsConf += [ [ParentDict, GroomedDicts]  ]
-
-    ParentDict = {
-                  'JetFinder'  :  'CamKt',
-                  'JetdR'      :   1.2,
-                  'JetInput'   :   'Truth',
-                  }
-
-    dictsConf += [ [ParentDict, GroomedDicts]  ]
-
-
-    return dictsConf
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PD.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PD.py
deleted file mode 100644
index 8ae5f87e2a7..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PD.py
+++ /dev/null
@@ -1,758 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-#
-# @file HSG5D3PD.py
-# @author Robert Harrington <R.Harrington@ed.ac.uk> 
-# @date Oct, 2011
-# @brief Construct a boosted Higgs physics D3PD (copied from and based on SMWZD3PD).
-#
-
-
-import D3PDMakerCoreComps
-from D3PDMakerCoreComps.resolveSGKey                   import testSGKey
-
-from D3PDMakerConfig.D3PDMakerFlags                    import D3PDMakerFlags
-
-from OutputStreamAthenaPool.MultipleStreamManager      import MSMgr
-
-# local flags
-from HSG5Flags import *
-from D3PDMakerCoreComps.IndexMultiAssociation          import IndexMultiAssociation
-
-
-# event
-
-from EventCommonD3PDMaker.EventInfoD3PDObject          import EventInfoD3PDObject
-from EventCommonD3PDMaker.LBMetadataConfig             import LBMetadataConfig
-from TruthD3PDMaker.GenEventD3PDObject                 import GenEventD3PDObject
-
-from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
-
-
-# eletron/photon
-
-from egammaD3PDMaker.ElectronD3PDObject                import ElectronD3PDObject
-from egammaD3PDMaker.GSFElectronD3PDObject             import GSFElectronD3PDObject
-from egammaD3PDMaker.PhotonD3PDObject                  import PhotonD3PDObject
-from egammaD3PDMaker.egammaTriggerBitsD3PDObject       import egammaTriggerBitsD3PDObject
-
-# muons
-
-from MuonD3PDMaker.MuonD3PDObject                      import MuonD3PDObject
-from MuonD3PDMaker.MuonSegmentD3PDObject               import MuonSegmentD3PDObject
-from MuonD3PDMaker.MuonTriggerBitsD3PDObject           import MuonTriggerBitsD3PDObject
-
-# jet
-
-from JetD3PDMaker.JetD3PDObject                        import JetD3PDObject
-
-# tau, not for exclusion
-
-from TauD3PDMaker.makeTrackFilterAlg                   import makeTrackFilterAlg
-
-# calo
-
-from CaloD3PDMaker.MBTSD3PDObject                      import MBTSD3PDObject
-from CaloD3PDMaker.MBTSTimeD3PDObject                  import MBTSTimeD3PDObject
-from CaloD3PDMaker.MBTSTriggerBitsD3PDObject           import MBTSTriggerBitsD3PDObject
-from CaloD3PDMaker.LArCollisionTimeD3PDObject          import LArCollisionTimeD3PDObject
-from CaloD3PDMaker.CollisionDecisionD3PDObject         import CollisionDecisionD3PDObject
-from CaloD3PDMaker.ClusterD3PDObject                   import ClusterD3PDObject
-from CaloD3PDMaker.EMClusterD3PDObject                 import EMClusterD3PDObject
-from CaloD3PDMaker.makeClusterFilter                   import makeClusterFilter
-
-# baseline track config
-
-from TrackD3PDMaker.TrackD3PDMakerFlags                import TrackD3PDFlags
-
-#TrackD3PDFlags.doTruth = False # True
-TrackD3PDFlags.doTruth = True
-TrackD3PDFlags.storeDetailedTruth = False
-TrackD3PDFlags.storeDiagonalCovarianceAsErrors = True
-#TrackD3PDFlags.storeHitTruthMatching = False # True
-TrackD3PDFlags.storeHitTruthMatching = True
-TrackD3PDFlags.storePixelHitsOnTrack = False
-TrackD3PDFlags.storePixelHolesOnTrack = False
-TrackD3PDFlags.storePixelOutliersOnTrack = False
-TrackD3PDFlags.storeSCTHitsOnTrack = False
-TrackD3PDFlags.storeSCTHolesOnTrack = False
-TrackD3PDFlags.storeSCTOutliersOnTrack = False
-TrackD3PDFlags.storeTRTHitsOnTrack = False
-TrackD3PDFlags.storeTRTHolesOnTrack = False
-TrackD3PDFlags.storeTRTOutliersOnTrack = False
-TrackD3PDFlags.storeTrackFitQuality = True
-TrackD3PDFlags.storeTrackInfo = False
-TrackD3PDFlags.storeTrackMomentum = True
-TrackD3PDFlags.storeTrackPredictionAtBLayer = False
-#TrackD3PDFlags.storeTrackSummary = False # True
-TrackD3PDFlags.storeTrackSummary = True
-TrackD3PDFlags.trackParametersAtBeamSpotLevelOfDetails = 0
-TrackD3PDFlags.trackParametersAtGlobalPerigeeLevelOfDetails = 0
-TrackD3PDFlags.trackParametersAtPrimaryVertexLevelOfDetails = 1
-
-# setting specifically for HSG5D3PD
-TrackD3PDFlags.storeTrackSummary.IDSharedHits = True # IC
-TrackD3PDFlags.storeDetailedTruth=False
-TrackD3PDFlags.storeVertexKinematics=False
-TrackD3PDFlags.storeVertexPurity=False
-#TrackD3PDFlags.storeVertexTrackIndexAssociation=False
-TrackD3PDFlags.storeVertexTrackIndexAssociation=True
-TrackD3PDFlags.trackParametersAtPrimaryVertexLevelOfDetails=1
-TrackD3PDFlags.vertexPositionLevelOfDetails=1
-TrackD3PDFlags.storeTrackInfo=True # IC
-TrackD3PDFlags.storeTrackSummary=True # IC
-D3PDMakerFlags.TruthWriteHadrons = True
-# end HSG5D3PD configuration
-
-from TrackD3PDMaker.TrackD3PDObject                    import TrackParticleD3PDObject
-
-# PV config
-
-TrackD3PDFlags.storeVertexFitQuality = True
-TrackD3PDFlags.storeVertexKinematics = True
-TrackD3PDFlags.storeVertexPurity = False
-TrackD3PDFlags.storeVertexTrackAssociation = False
-TrackD3PDFlags.storeVertexTrackIndexAssociation = True
-TrackD3PDFlags.vertexPositionLevelOfDetails = 2
-
-from TrackD3PDMaker.VertexD3PDObject                   import PrimaryVertexD3PDObject
-
-# BeamSpot / MinBias
-
-from TrackD3PDMaker.BeamSpotD3PDObject                 import BeamSpotD3PDObject
-
-# MET
-
-from MissingETD3PDMaker.MissingETD3PDMakerFlags        import MissingETD3PDMakerFlags
-from MissingETD3PDMaker.MissingETD3PDObject            import *
-from MissingETD3PDMaker.MissingETD3PDTriggerBitsObject import *
-
-MissingETD3PDMakerFlags.doCellOutEflow=True
-MissingETD3PDMakerFlags.METDefaultJetCollectionSGKey = 'AntiKt4LCTopoJets'
-MissingETD3PDMakerFlags.METDefaultJetPrefix = "jet_AntiKt4LCTopo_MET_"
-
-# Trigger
-
-from TriggerD3PDMaker.TrigDecisionD3PDObject           import TrigDecisionD3PDObject
-from TriggerD3PDMaker.TrigConfMetadata                 import addTrigConfMetadata
-from TriggerD3PDMaker.BGCodeD3PDObject                 import BGCodeD3PDObject
-from TrigEgammaD3PDMaker.TrigEgammaD3PD                import TrigEgammaD3PDObjects
-from TrigMuonD3PDMaker.TrigMuonD3PD                    import TrigMuonD3PDObjects
-from TriggerD3PDMaker.EnergySumROID3PDObject           import EnergySumROID3PDObject
-from TrigMissingETD3PDMaker.TrigMETD3PDObject          import TrigMETD3PDObject
-from PhysicsD3PDMaker.SMWZTriggerBitsD3PDObject        import SMWZTriggerBitsD3PDObject
-
-from RecExConfig.RecFlags                              import rec
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-
-def _args (level, name, kwin, **kw):
-    kw = kw.copy()
-    kw['level'] = level
-    for (k, v) in kwin.items():
-        if k.startswith (name + '_'):
-            kw[k[len(name)+1:]] = v
-    return kw
-
-# Routine to write GSCFactor and WidthFraction jet moments
-#def addSTRUCTCalib(jetcoll , **options):
-#    from JetCalibTools.MakeCalibSequences import alternateCalibSequence
-#    emSeq = alternateCalibSequence('CAL:STRUCT1',options)
-#    StructSeq = emSeq.CalibToolSequence[-1]
-#    StructSeq.MomentTag = "GSCFactor"
-#    StructSeq.SimpleFactorCorrection = True
-#    for t in StructSeq.CalibToolSequence[:-1]: #switch off all moments writing but the last.                                                
-#        t.WriteMoments = False
-
-    #from JetRec.JetGetters import getJetCalibrationTool                                                                                    
-    #emToolFromDict = getJetCalibrationTool(emSeq, "STRUCTcalib",inPlaceCorr=False)                                                         
-
-#    from JetMomentTools.JetMomentToolsConf import JetMomentsFromCalib
-#    momTool = JetMomentsFromCalib()
-#    momTool.Calibrator = emSeq
-
-#    from JetRec.JetMomentGetter import  make_JetMomentGetter
-#    make_JetMomentGetter( jetcoll , [momTool])
-
-
-def HSG5D3PD (alg = None,
-              file = 'hsg5.root',
-              tuplename = 'physics',
-              streamname = 'd3pdstream',
-              flags=HSG5Flags,
-              **kw):
-
-    if flags.doTaus():
-        # tau
-        from TauD3PDMaker.TauD3PDObject                        import TauD3PDObject
-
-    # define associations
-    if flags.doPhotons() and not PhotonD3PDObject.allBlocknames().has_key('RecoveryMatch'):
-        from PhotonD3PDMaker.PhotonRecoveryAssociation import PhotonRecoveryAssociation
-        PhotonRecoveryAssoc = PhotonRecoveryAssociation(PhotonD3PDObject,
-                                                        'ElectronContainer',
-                                                        D3PDMakerFlags.ElectronSGKey(),
-                                                        prefix = 'el_',
-                                                        blockname = 'RecoveryMatch',
-                                                        target = 'ph_ElectronRecovered_')
-        
-
-    # define track and cluster filters
-
-    preseq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName())
-
-    if flags.doGoodTracks() and not hasattr( preseq, "GoodTracks" ):
-        filter1 = makeTrackFilterAlg(TracksName = D3PDMakerFlags.TrackSGKey(),
-                                     OutputTracksName='GoodTracks',
-                                     ptCut=0.,nSCTPix=4)
-        preseq += filter1
-                    
-    if flags.doHighPtTracks() and not hasattr( preseq, "HighPtTracks" ):
-        filter2 = makeTrackFilterAlg(TracksName = D3PDMakerFlags.TrackSGKey(),
-                                     OutputTracksName='HighPtTracks',
-                                     ptCut=5000.,nSCTPix=4)
-        preseq += filter2
-
-
-    if flags.doHighPtClusters() and not hasattr( preseq, "HighPtClusters" ):
-        filter3 = makeClusterFilter(InputName  = D3PDMakerFlags.ClusterSGKey(),
-                                    OutputName = 'HighPtClusters',
-                                    ptCut=10000.)
-        preseq += filter3
-
-    if flags.doHighPtEMClusters() and not hasattr( preseq, "HighPtEMClusters" ):
-        filter4 = makeClusterFilter(InputName  = D3PDMakerFlags.EMTopoClusterSGKey(),
-                                    OutputName = 'HighPtEMClusters',
-                                    ptCut=10000.)
-        preseq += filter4
-
-    # perform recoil calculation
-     
-    if flags.doHadronicRecoil(): 
-        from HadronicRecoil.HadronicRecoilConf import HadronicRecoil__ElectronSelector
-        from HadronicRecoil.HadronicRecoilConf import HadronicRecoil__MuonSelector
-        from HadronicRecoil.HadronicRecoilConf import HadronicRecoil__EflowSelector
-        from HadronicRecoil.HadronicRecoilConf import HadronicRecoil__RecoilCalculation
-        from HadronicRecoil.HadronicRecoilConf import HadronicRecoil__EflowRecoil
-        
-        if not hasattr( preseq, "HadronicRecoil::ElectronSelector" ):
-            preseq += HadronicRecoil__ElectronSelector()
-        if not hasattr( preseq, "HadronicRecoil::MuonSelector" ):
-            preseq += HadronicRecoil__MuonSelector()
-        if not hasattr( preseq, "HadronicRecoil::EflowSelector" ):
-            preseq += HadronicRecoil__EflowSelector()
-        if not hasattr( preseq, "HadronicRecoil::RecoilCalculation" ):
-            preseq += HadronicRecoil__RecoilCalculation( ConeSizes = [0.20] )
-        if not hasattr( preseq, "EflowRecoil_20" ):
-            preseq += HadronicRecoil__EflowRecoil("EflowRecoil_20", 
-                                                  TrackRough       = "RoughRecoil_track_20", 
-                                                  TrackUE          = "ueCorrection_track_20", 
-                                                  TrackRef         = "RefinedRecoil_track_20", 
-                                                  ClusNoTrackRough = "RoughRecoil_clusNoTrack_20", 
-                                                  ClusNoTrackUE    = "ueCorrection_clusNoTrack_20", 
-                                                  ClusNoTrackRef   = "RefinedRecoil_clusNoTrack_20", 
-                                                  RoughRecoil_out  = "RoughRecoil_Eflow_20", 
-                                                  ueCorrection_out = "ueCorrection_Eflow_20", 
-                                                  RefinedRecoil_out= "RefinedRecoil_Eflow_20", 
-                                                  MET_out          = "MET_HR_Eflow_20" ) 
-            
-    # now configure the D3PD
-    
-    if not alg:
-        alg = MSMgr.NewRootStream(StreamName = streamname, FileName = file, TreeName = tuplename)
-
-    
-    alg += EventInfoD3PDObject        (**_args (10, 'EventInfo', kw))
-    alg += LArCollisionTimeD3PDObject (**_args (10, 'LArCollisionTime', kw))
-
-    from TriggerD3PDMaker.BunchStructureMetadata import addBunchStructureMetadata
-    addBunchStructureMetadata (alg)
-
-    # Eta rings of energy
-    # FIXME brian crashing aod running
-    if not rec.readAOD:
-        from CaloD3PDMaker.RapgapD3PDObject       import EtaRingsNonTileD3PDObject
-        from CaloD3PDMaker.RapgapD3PDObject       import EtaRingsD3PDObject
-
-        alg += EtaRingsNonTileD3PDObject  ( **_args ( 0, 'EtaRings', kw) )
-        alg += EtaRingsD3PDObject         ( **_args ( 0, 'EtaRings', kw) )
-    
-    # Electron/Photon blocks
-    
-    alg += ElectronD3PDObject         (**_args (10, 'Electron', kw))
-
-    if testSGKey ('ElectronContainer', D3PDMakerFlags.GSFElectronSGKey()):
-        alg += GSFElectronD3PDObject  (**_args (10, 'GSFElectron', kw,
-                                                sgkey = D3PDMakerFlags.GSFElectronSGKey(),
-                                                prefix = 'el_gsf_'))
-
-    if flags.doPhotons():
-        print "adding photons"
-        alg += PhotonD3PDObject           (**_args (10, 'Photon', kw))
-
-
-    # Muon blocks
-
-     ### add the scattering significance filler - to be removed when added in the MuonD3PDMaker
-    if not MuonD3PDObject.allBlocknames().has_key("MuonScatteringAngleSignificance"):
-        from AthenaCommon.AppMgr import ToolSvc
-        muonScatteringSigTool=None
-        if hasattr(ToolSvc, "MuonScatteringSigTool"):
-            muonScatteringSigTool=ToolSvc.MuonScatteringSigTool
-        from JetTagD3PDMaker import MuonScatteringAngleSignificanceFillerTool
-        MuonD3PDObject.defineBlock (100, "MuonScatteringAngleSignificance",
-                                    MuonScatteringAngleSignificanceFillerTool,
-                                    ScatteringSigTool=muonScatteringSigTool)
-
-    alg += MuonD3PDObject             (**_args (10, 'MuidMuon', kw,
-                                                sgkey='MuidMuonCollection', prefix='mu_muid_',
-                                                include = ["EFCBInfoIndex", "EFMGInfoIndex", "EFMEInfoIndex",
-                                                           "L2CBInfoIndex", "L1InfoIndex"],
-                                                exclude = ["EFCBInfo", "EFMGInfo", "EFMEInfo", "L2CBInfo", "L1Info"],
-                                                allowMissing = True ))
-
-    alg += MuonD3PDObject             (**_args (10, 'StacoMuon', kw,
-                                                sgkey='StacoMuonCollection', prefix='mu_staco_',
-                                                include = ["EFCBInfoIndex", "EFMGInfoIndex", "EFMEInfoIndex",
-                                                           "L2CBInfoIndex", "L1InfoIndex"],
-                                                exclude = ["EFCBInfo", "EFMGInfo", "EFMEInfo", "L2CBInfo", "L1Info"],
-                                                allowMissing = True ))
-    
-    from AthenaCommon.KeyStore import CfgItemList
-    if CfgItemList("KeyStore_inputFile").has_item("Analysis::MuonContainer#Muons"):
-        alg += MuonD3PDObject             (**_args (10, 'Muons', kw,
-                                                    sgkey='Muons', prefix='mu_muons_',
-                                                    include = ["EFCBInfoIndex", "EFMGInfoIndex", "EFMEInfoIndex",
-                                                               "L2CBInfoIndex", "L1InfoIndex"],
-                                                    exclude = ["EFCBInfo", "EFMGInfo", "EFMEInfo", "L2CBInfo", "L1Info"],
-                                                    allowMissing = True ))
-
-    alg += MuonD3PDObject             (**_args (0, 'CaloMuon', kw, sgkey='CaloMuonCollection', prefix='mu_calo_',
-                                                include = ["MuonHitSummary", "Authors", "Likelihood",
-                                                           "Isolation", "CaloEnergyLoss", "Quality"] ))
-    
-    # Tau block
-
-    if flags.doTaus():
-        alg += TauD3PDObject              (**_args ( 1, 'Tau', kw))
-
-
-
-     # track and cluster blocks
-
-    # ... all clusters, very low LOD
-    
-    alg += ClusterD3PDObject          (**_args ( 0, 'Clusters1', kw,
-                                                 exclude='SamplingBasics'))
-
-    # ... higher LOD for pt>10 GeV
-    if flags.doHighPtClusters():
-        alg += ClusterD3PDObject          (**_args ( 2, 'Clusters2', kw,
-                                                     sgkey  = 'HighPtClusters',
-                                                     prefix = 'clpt10_'))
-
-    if flags.doHighPtEMClusters():    
-        alg += ClusterD3PDObject          (**_args ( 3, 'Clusters3', kw,
-                                                     sgkey  = 'HighPtEMClusters',
-                                                     prefix = 'emclpt10_'))
-
-    from TrackD3PDMaker.TrackD3PDObject import TrackD3PDObject    
-
-    # ... good tracks only (nSCT>3; no pt cut)
-
-    # use standard level of track info for 'GoodTracks'
-
-    if flags.doGoodTracks():
-        # use standard level of track info for 'GoodTracks'
-        alg += TrackParticleD3PDObject    (**_args ( 3, 'Tracks1', kw,
-                                                     sgkey  = 'GoodTracks',
-                                                     label  = 'trk',
-                                                     prefix = 'trk_'))
-            
-        # ... high-pt tracks (nSCT>3; pt>5 GeV)
-            
-    if flags.doHighPtTracks():
-        
-        from TrackD3PDMaker.TrackD3PDMakerFlags                import TrackD3PDFlags as highPtFlags
-        highPtFlags.doTruth = True
-        highPtFlags.storeDiagonalCovarianceAsErrors = True
-        highPtFlags.storeHitTruthMatching = True
-        highPtFlags.storePixelHitsOnTrack = False
-        highPtFlags.storePixelHolesOnTrack = False
-        highPtFlags.storePixelOutliersOnTrack = False
-        highPtFlags.storeSCTHitsOnTrack = False
-        highPtFlags.storeSCTHolesOnTrack = False
-        highPtFlags.storeSCTOutliersOnTrack = False
-        highPtFlags.storeTRTHitsOnTrack = False
-        highPtFlags.storeTRTHolesOnTrack = False
-        highPtFlags.storeTRTOutliersOnTrack = False
-        highPtFlags.storeTrackFitQuality = True
-        highPtFlags.storeTrackMomentum = True
-        highPtFlags.storeTrackSummary = True
-        highPtFlags.storeTrackSummary.IDOutliers = True
-        highPtFlags.storeTrackSummary.PixelInfoPlus = True
-        highPtFlags.storeTrackSummary.SCTInfoPlus = True
-        highPtFlags.storeTrackSummary.TRTInfoPlus = True
-        highPtFlags.storeTrackSummary.InfoPlus = True
-        highPtFlags.trackParametersAtBeamSpotLevelOfDetails = 0
-        highPtFlags.trackParametersAtGlobalPerigeeLevelOfDetails = 2
-        highPtFlags.trackParametersAtPrimaryVertexLevelOfDetails = 3  
-
-        HighPtTrackParticleD3PDObject = TrackD3PDObject(_label='trkpt5',
-                                                        _prefix='trkpt5_',
-                                                        _sgkey='HighPtTracks',
-                                                        typeName='Rec::TrackParticleContainer',
-                                                        flags=highPtFlags)
-            
-        alg += HighPtTrackParticleD3PDObject(**_args ( 3, 'Tracks2', kw,
-                                                       sgkey  = 'HighPtTracks',
-                                                       label  = 'trkpt5',
-                                                       prefix = 'trkpt5_'))
-
-  
-    # Jet blocks
-    
-    from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
-
-    # include list modified for HSG5D3PD
-    
-    includelist = JetTagD3PDFlags.StdInfoInclude()
-
-    from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
-    includelist += [JetTagD3PDKeys.BTagWeightsBlockName()]
-    #includelist += [JetTagD3PDKeys.JetFitterInfoBaseBlockName()] 
-    #includelist += [JetTagD3PDKeys.JetFitterTagInfoBlockName()] 
-    #includelist += [JetTagD3PDKeys.IP3DInfoBaseBlockName()] 
-    #includelist += [JetTagD3PDKeys.IP3DIPInfoBaseBlockName()] 
-    #includelist += [JetTagD3PDKeys.JetFitterCombInfoBaseBlockName()] 
-    includelist += [JetTagD3PDKeys.JetTrackAssocBlockName()] 
-    includelist += [JetTagD3PDKeys.JetTrackBlockName()] 
-    includelist += [JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName()] 
-    includelist += [JetTagD3PDKeys.IPInfoPlusTrackBlockName()] 
-    includelist += ['ConstituentScale']
-    
-    jetkw = kw
-    if not jetkw.has_key ( 'AK4TopoEMJet_'+JetTagD3PDKeys.JetTrackAssocBlockName()+'_target'):
-        jetkw['AK4TopoEMJet_'+JetTagD3PDKeys.JetTrackAssocBlockName()+'_target']= "trk" 
-    if not jetkw.has_key ( 'AK4TopoEMJet_'+JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName()+'_target'):
-        jetkw['AK4TopoEMJet_'+JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName()+'_target']= "trk" 
-
-    alg += JetD3PDObject              (**_args ( 3, 'AK4TopoEMJet', jetkw,
-                                                 sgkey='AntiKt4TopoEMJets', prefix='jet_AntiKt4TopoEM_',
-                                                 include = includelist,
-                                                 JetVertexFraction_FromUD=True,
-                                                 JetVertexFraction_FillFullJVF=True,
-                                                 allowMissing = True))
-
-    alg += JetD3PDObject              (**_args ( 3, 'AK6TopoEMJet', kw,
-                                                 sgkey='AntiKt6TopoEMJets', prefix='jet_AntiKt6TopoEM_',
-                                                 include = [JetTagD3PDFlags.StdInfoInclude(),'ConstituentScale'],
-                                                 JetVertexFraction_FromUD=True,
-                                                 JetVertexFraction_FillFullJVF=True,
-                                                 allowMissing = True))
-
-    alg += JetD3PDObject              (**_args ( 3, 'AK4LCTopoJet', kw,
-                                                 sgkey='AntiKt4LCTopoJets', prefix='jet_AntiKt4LCTopo_',
-                                                 exclude=['Layer'],
-                                                 include=['ConstituentScale'],
-                                                 JetVertexFraction_FromUD=True,
-                                                 JetVertexFraction_FillFullJVF=True,
-                                                 allowMissing = True))
-    
-    alg += JetD3PDObject              (**_args ( 3, 'AK6LCTopoJet', kw,
-                                                 sgkey='AntiKt6LCTopoJets', prefix='jet_AntiKt6LCTopo_',
-                                                 exclude=['Layer'],
-                                                 include=['ConstituentScale'],
-                                                 JetVertexFraction_FromUD=True,
-                                                 JetVertexFraction_FillFullJVF=True,
-                                                 allowMissing = True))
-
-
-    from TopInputsD3PDMaker.HforD3PDObject import HforD3PDObject
-    alg += HforD3PDObject(**_args (0, 'HforInfo', kw))
-
-
-    # MET blocks
-    # a whole mess to remove x,y components separately for all flavours
-
-    if flags.doAllMissingET() :
-        alg += MissingETD3PDObject        (**_args (10, 'MissingET', kw,
-                                                    exclude=['MET_Base', 'MET_Base0', 'MET_Truth_Int',
-                                                             'MET_RefFinal_Comps','MET_Calib_Comps','MET_CellOut_Comps',
-                                                             'MET_CorrTopo_Comps','MET_Cryo_Comps','MET_CryoCone_Comps',
-                                                             'MET_Final_Comps','MET_LocHadTopo_Comps',
-                                                             'MET_LocHadTopoObj_Comps',
-                                                             'MET_Muid_Comps','MET_Muid_Spectro_Comps','MET_Muid_Track_Comps',
-                                                             'MET_MuonBoy_Comps','MET_MuonBoy_Spectro_Comps','MET_MuonBoy_Track_Comps',
-                                                             'MET_Muons_Comps','MET_Muons_Spectro_Comps','MET_Muons_Track_Comps',
-                                                             'MET_MuonMuid_Comps',
-                                                             'MET_Muon_Comps','MET_Muon_Isol_Muid_Comps',
-                                                             'MET_Muon_Isol_Staco_Comps','MET_Muon_NonIsol_Muid_Comps',
-                                                             'MET_Muon_NonIsol_Staco_Comps','MET_Muon_Total_Muid_Comps',
-                                                             'MET_Muon_Total_Staco_Comps','MET_RefEle_Comps',
-                                                             'MET_RefEle_em_Comps','MET_RefGamma_Comps',
-                                                             'MET_RefGamma_em_Comps','MET_RefJet_Comps',
-                                                             'MET_RefJet_em_Comps','MET_RefMuon_Comps',
-                                                             'MET_RefMuon_Muid_Comps','MET_RefMons_Comps','MET_RefMuon_Staco_Comps',
-                                                             'MET_RefMuon_Track_Muid_Comps','MET_RefMuon_Track_Staco_Comps',
-                                                             'MET_RefMuon_Track_em_Comps','MET_RefMuon_Track_Comps',
-                                                             'MET_RefMuons_Track_Comps',
-                                                             'MET_RefMuon_em_Comps','MET_RefTau_Comps',
-                                                             'MET_RefTau_em_Comps','MET_SoftJets_Comps',
-                                                             'MET_SoftJets_em_Comps','MET_Topo_Comps',
-                                                             'MET_TopoObj_Comps','MET_Track_Comps','MET_Comps',
-                                                             'MET_Track_Weights','MET_Cluster_Weights'],
-                                                    allowMissing=True))
-    else :
-        alg += MissingETD3PDObject(0, sgkey = "MET_RefFinal",                prefix = "MET_RefFinal")
-
-        # MuonBoy terms used in RefFinal
-        alg += MissingETD3PDObject(0, sgkey = "MET_MuonBoy",                 prefix = "MET_MuonBoy")
-        alg += MissingETD3PDObject(0, sgkey = "MET_RefMuon",                 prefix = "MET_RefMuon")
-        alg += MissingETD3PDObject(0, sgkey = "MET_CellOut_Eflow",           prefix = "MET_CellOut_Eflow")
-
-        # terms needed to calculate RefFinal with Muid instead of Staco
-        alg += MissingETD3PDObject(0, sgkey = "MET_RefMuon_Muid",            prefix = "MET_RefMuon_Muid")
-        alg += MissingETD3PDObject(0, sgkey = "MET_MuonMuid",                prefix = "MET_MuonMuid")
-        alg += MissingETD3PDObject(0, sgkey = "MET_Muid",                    prefix = "MET_Muid")
-        alg += MissingETD3PDObject(0, sgkey = "MET_CellOut_Eflow_Muid",      prefix = "MET_CellOut_Eflow_Muid")
-
-        # terms needed to calculate RefFinal with third chain instead of Staco
-        from AthenaCommon.KeyStore import CfgItemList
-        keystore = CfgItemList("KeyStore_inputFile")
-        if keystore.has_item("MissingET#MET_Muons"):
-            alg += MissingETD3PDObject(0, sgkey = "MET_Muons",                    prefix = "MET_Muons")
-        if keystore.has_item("MissingET#MET_RefMuons"):
-            alg += MissingETD3PDObject(0, sgkey = "MET_RefMuons",                 prefix = "MET_RefMuons")
-        if keystore.has_item("MissingET#MET_CellOut_Eflow_Muons"):
-            alg += MissingETD3PDObject(0, sgkey = "MET_CellOut_Eflow_Muons",      prefix = "MET_CellOut_Eflow_Muons")
-        
-        # I have no idea what these are for
-        alg += MissingETD3PDObject(0, sgkey = "MET_SoftJets",                prefix = "MET_SoftJets")
-        alg += MissingETD3PDObject(0, sgkey = "MET_RefFinal_em",             prefix = "MET_RefFinal_em")
-        alg += MissingETD3PDObject(0, sgkey = "MET_CellOut_em",              prefix = "MET_CellOut_em")
-        alg += MissingETD3PDObject(0, sgkey = "MET_SoftJets_em",             prefix = "MET_SoftJets_em")
-                   
-
-    # HadronicRecoil blocks
-
-    if flags.doHadronicRecoil():
-        alg += ElectronD3PDObject(0,  sgkey = "HR_selectedElectrons",       prefix = "hr_el_")
-        alg += MuonD3PDObject( 0,     sgkey = "HR_selectedMuons",           prefix = "hr_mu_" )
-        
-        alg += MissingETD3PDObject(0, sgkey = "RoughRecoil_20",                prefix = "hr_roughRecoil_20", 
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "ueCorrection_20",               prefix = "hr_ueCorrection_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "RefinedRecoil_20",              prefix = "hr_corrRecoil_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "MET_HR_20",                     prefix = "hr_MET_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        
-        alg += MissingETD3PDObject(0, sgkey = "RoughRecoil_track_20",          prefix = "hr_roughRecoil_track_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "ueCorrection_track_20",         prefix = "hr_ueCorrection_track_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "RefinedRecoil_track_20",        prefix = "hr_corrRecoil_track_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "MET_HR_track_20",               prefix = "hr_MET_track_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        
-        alg += MissingETD3PDObject(0, sgkey = "RoughRecoil_clusNoTrack_20",    prefix = "hr_roughRecoil_clusNoTrack_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "ueCorrection_clusNoTrack_20",   prefix = "hr_ueCorrection_clusNoTrack_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "RefinedRecoil_clusNoTrack_20",  prefix = "hr_corrRecoil_clusNoTrack_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "MET_HR_clusNoTrack_20",         prefix = "hr_MET_clusNoTrack_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        
-        alg += MissingETD3PDObject(0, sgkey = "RoughRecoil_Eflow_20",          prefix = "hr_roughRecoil_Eflow_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "ueCorrection_Eflow_20",         prefix = "hr_ueCorrection_Eflow_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "RefinedRecoil_Eflow_20",        prefix = "hr_corrRecoil_Eflow_20",
-                                   exclude=['MET_Regions','MET_Comps'] )  
-        alg += MissingETD3PDObject(0, sgkey = "MET_HR_Eflow_20",               prefix = "hr_MET_Eflow_20", 
-                                   exclude=['MET_Regions','MET_Comps'] )  
-
-
-    """
-    # track and cluster blocks
-
-    # ... all clusters, very low LOD
-    
-    alg += ClusterD3PDObject          (**_args ( 0, 'Clusters1', kw,
-                                                 exclude='SamplingBasics'))
-
-    # ... higher LOD for pt>10 GeV
-    if flags.doHighPtClusters():
-        alg += ClusterD3PDObject          (**_args ( 2, 'Clusters2', kw,
-                                                     sgkey  = 'HighPtClusters',
-                                                     prefix = 'clpt10_'))
-
-    if flags.doHighPtEMClusters():    
-        alg += ClusterD3PDObject          (**_args ( 3, 'Clusters3', kw,
-                                                     sgkey  = 'HighPtEMClusters',
-                                                     prefix = 'emclpt10_'))
-
-    from TrackD3PDMaker.TrackD3PDObject import TrackD3PDObject    
-
-    # ... good tracks only (nSCT>3; no pt cut)
-
-    # use standard level of track info for 'GoodTracks'
-
-    if flags.doGoodTracks():
-        # use standard level of track info for 'GoodTracks'
-        alg += TrackParticleD3PDObject    (**_args ( 3, 'Tracks1', kw,
-                                                     sgkey  = 'GoodTracks',
-                                                     label  = 'trk',
-                                                     prefix = 'trk_'))
-            
-        # ... high-pt tracks (nSCT>3; pt>5 GeV)
-            
-    if flags.doHighPtTracks():
-        
-        from TrackD3PDMaker.TrackD3PDMakerFlags                import TrackD3PDFlags as highPtFlags
-        highPtFlags.doTruth = True
-        highPtFlags.storeDiagonalCovarianceAsErrors = True
-        highPtFlags.storeHitTruthMatching = True
-        highPtFlags.storePixelHitsOnTrack = False
-        highPtFlags.storePixelHolesOnTrack = False
-        highPtFlags.storePixelOutliersOnTrack = False
-        highPtFlags.storeSCTHitsOnTrack = False
-        highPtFlags.storeSCTHolesOnTrack = False
-        highPtFlags.storeSCTOutliersOnTrack = False
-        highPtFlags.storeTRTHitsOnTrack = False
-        highPtFlags.storeTRTHolesOnTrack = False
-        highPtFlags.storeTRTOutliersOnTrack = False
-        highPtFlags.storeTrackFitQuality = True
-        highPtFlags.storeTrackMomentum = True
-        highPtFlags.storeTrackSummary = True
-        highPtFlags.storeTrackSummary.IDOutliers = True
-        highPtFlags.storeTrackSummary.PixelInfoPlus = True
-        highPtFlags.storeTrackSummary.SCTInfoPlus = True
-        highPtFlags.storeTrackSummary.TRTInfoPlus = True
-        highPtFlags.storeTrackSummary.InfoPlus = True
-        highPtFlags.trackParametersAtBeamSpotLevelOfDetails = 0
-        highPtFlags.trackParametersAtGlobalPerigeeLevelOfDetails = 2
-        highPtFlags.trackParametersAtPrimaryVertexLevelOfDetails = 3  
-
-        HighPtTrackParticleD3PDObject = TrackD3PDObject(_label='trkpt5',
-                                                        _prefix='trkpt5_',
-                                                        _sgkey='HighPtTracks',
-                                                        typeName='Rec::TrackParticleContainer',
-                                                        flags=highPtFlags)
-            
-        alg += HighPtTrackParticleD3PDObject(**_args ( 3, 'Tracks2', kw,
-                                                       sgkey  = 'HighPtTracks',
-                                                       label  = 'trkpt5',
-                                                       prefix = 'trkpt5_'))
-    """       
-    
-    # Primary vertex block - May be missing in single-beam data.
-
-    alg += PrimaryVertexD3PDObject (**_args (1, 'PrimaryVertex', kw,
-                                             allowMissing = True,
-                                             sgkey = D3PDMakerFlags.VertexSGKey(),
-                                             prefix = 'vxp_'))
-            
-    # MBTS 
-            
-    alg += MBTSD3PDObject             (**_args (10, 'MBTS', kw))
-    alg += MBTSTimeD3PDObject         (**_args (10, 'MBTSTime', kw))
-    alg += MBTSTriggerBitsD3PDObject  (**_args (10, 'MBTSTriggerBits', kw))
-    #alg += CollisionDecisionD3PDObject(**_args (10, 'CollisionDecision', kw))
-    
-    # Truth
-
-    if rec.doTruth():
-
-        from TruthD3PDMaker.TruthParticleD3PDObject            import TruthParticleD3PDObject
-        from MuonD3PDMaker.TruthMuonD3PDObject                 import TruthMuonD3PDObject
-
-        alg += TruthMuonD3PDObject    (**_args ( 2, 'TruthMuon', kw))
-        alg += GenEventD3PDObject     (**_args ( 1, 'GenEvent', kw))
-        alg += TruthParticleD3PDObject(**_args ( 1, 'TruthParticle', kw))
-
-        # TruthJets
-        alg += JetD3PDObject          (**_args ( 1, 'AK4TruthJet', kw,
-                                                 sgkey='AntiKt4TruthJets',prefix='jet_AntiKt4Truth_',
-                                                 allowMissing = True))
-        alg += JetD3PDObject          (**_args ( 1, 'AK6TruthJet', kw,
-                                                 sgkey='AntiKt6TruthJets', prefix='jet_AntiKt6Truth_',
-                                                 allowMissing = True))
-        alg += JetD3PDObject          (**_args ( 1, 'AK4TruthJetALL', kw,
-                                                 sgkey='AntiKt4TruthJets_ALL', prefix='jet_AntiKt4TruthALL_',
-                                                 allowMissing = True))
-        alg += JetD3PDObject          (**_args ( 1, 'AK6TruthJetALL', kw,
-                                                 sgkey='AntiKt6TruthJets_ALL', prefix='jet_AntiKt6TruthALL_',
-                                                 allowMissing = True))
-        alg += JetD3PDObject          (**_args ( 1, 'AK4TruthJetWZ', kw,
-                                                 sgkey='AntiKt4TruthJets_WZ', prefix='jet_AntiKt4TruthWZ_',
-                                                 allowMissing = True))
-        alg += JetD3PDObject          (**_args ( 1, 'AK6TruthJetWZ', kw,
-                                                 sgkey='AntiKt6TruthJets_WZ', prefix='jet_AntiKt6TruthWZ_',
-                                                 allowMissing = True))
-        
-
-    if not rec.doTruth():
-        alg += BeamSpotD3PDObject(10)
-    
-
-    from TrigMissingETD3PDMaker.TrigMETD3PD import TrigMETD3PDObjects
-    TrigMETD3PDObjects(alg,10)
-    
-    # Trigger
-
-    if D3PDMakerFlags.DoTrigger():
-
-        alg += SMWZTriggerBitsD3PDObject      (**_args (10, 'SMWZTriggerBits', kw))
-        
-        # Trigger Decision + metadata
-
-        alg += TrigDecisionD3PDObject  (**_args(10, 'TrigDecision', kw))
-        addTrigConfMetadata(alg)
-        
-        # Bunch group info
-
-        alg += BGCodeD3PDObject (**_args (2, 'BGCode', kw))
-
-        # Egamma and Mu
-        
-        TrigEgammaD3PDObjects (alg, 1)
-        TrigMuonD3PDObjects( alg, 1)
-
-        # Esum
-
-        #alg += EnergySumROID3PDObject(**_args (2, 'EnergySumROI', kw,
-        #                                       prefix = "trig_L1_esum_"))
-
-        # The LVL2 information:
-
-        #alg += TrigMETD3PDObject(**_args( 2, 'TrigMETL2', kw,
-        #                                  prefix = "trig_L2_met_",
-        #                                  sgkey = "HLT_T2MissingET" ))
-        # The EF information:
-
-        #alg += TrigMETD3PDObject(**_args ( 2, 'TrigMETEF', kw,
-        #                                   prefix = "trig_EF_met_",
-        #                                   sgkey = "HLT_TrigEFMissingET" ))
-
-# Event metadata
-
-    alg.MetadataTools += [LBMetadataConfig()]
-
-# Invoke routine to write GSCFactor and WidthFraction jet moments
-
-    #addSTRUCTCalib('AntiKt4LCTopoJets', input='Topo', mainParam=0.4)
-    #addSTRUCTCalib('AntiKt6LCTopoJets', input='Topo', mainParam=0.6)
-    #addSTRUCTCalib('AntiKt4TopoEMJets', input='Topo', mainParam=0.4)
-    #addSTRUCTCalib('AntiKt6TopoEMJets', input='Topo', mainParam=0.6)
-    
-    if D3PDMakerFlags.FilterCollCand():
-        from CaloD3PDMaker.CollisionFilterAlg import CollisionFilterAlg
-        alg.filterSeq += CollisionFilterAlg (tuplename + '_CollCandFilter')
-
-    return alg
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PDProdFlags.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PDProdFlags.py
deleted file mode 100644
index 1afc2d9e08e..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PDProdFlags.py
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# $Id$
-#
-# @file HSG5DPDUtils/python/HSG5D3PDProdFlags.py
-# @author Robert Harrington <roberth@cern.ch>
-# @date March 16, 2012
-# @brief Define flags and configuration settings used when making 
-#        HSG5 D3PDs from production transforms.
-#
-# Any objects here with a name of the form Write*D3PD that derive
-# from JobProperty are added to D3PDProdFlags.
-#
-
-from AthenaCommon.JobProperties import JobProperty
-
-allowedD3PDList = []
-
-# WH D3PD
-class WriteHSG5WHD3PD (JobProperty):
-    """Produce the HSG5 BOOSTED WH D3PD."""
-    statusOn = True
-    allowedTypes = ['bool']
-    StoredValue = False
-    StreamName = 'StreamNTUP_HSG5WH'
-    FileName = ''
-    isVirtual = False
-    DPDMakerScript = "HSG5DPDUtils/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py"
-    TreeNames = ['physics']
-    SubSteps = ['a2d', 'e2d']
-allowedD3PDList.append('outputNTUP_HSG5WHFile')
-
-class WriteHSG5WHUD3PD (JobProperty):
-    """Produce the HSG5 UNBOOSTED WH D3PD."""
-    statusOn = True
-    allowedTypes = ['bool']
-    StoredValue = False
-    StreamName = 'StreamNTUP_HSG5WHU'
-    FileName = ''
-    isVirtual = False
-    DPDMakerScript = "HSG5DPDUtils/HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment.py"
-    TreeNames = ['physics']
-    SubSteps = ['a2d', 'e2d']
-allowedD3PDList.append('outputNTUP_HSG5WHUFile')
-
-class WriteHSG5WHQD3PD (JobProperty):
-    """Produce the HSG5 UNBOOSTED WH QCD D3PD."""
-    statusOn = True
-    allowedTypes = ['bool']
-    StoredValue = False
-    StreamName = 'StreamNTUP_HSG5WHQ'
-    FileName = ''
-    isVirtual = False
-    DPDMakerScript = "HSG5DPDUtils/HSG5_WHlnubb_unboosted_QCDbkg_D3PD_prodJobOFragment.py"
-    TreeNames = ['physics']
-    SubSteps = ['a2d', 'e2d']
-allowedD3PDList.append('outputNTUP_HSG5WHQFile')
-
-# ZHLL D3PD
-class WriteHSG5ZHLLD3PD (JobProperty):
-    """Produce the HSG5 BOOSTED ZH->llbb D3PD."""
-    statusOn = True
-    allowedTypes = ['bool']
-    StoredValue = False
-    StreamName = 'StreamNTUP_HSG5ZHLL'
-    FileName = ''
-    isVirtual = False
-    DPDMakerScript = "HSG5DPDUtils/HSG5_ZHllbb_boosted_D3PD_prodJobOFragment.py"
-    TreeNames = ['physics']
-    SubSteps = ['a2d', 'e2d']
-allowedD3PDList.append('outputNTUP_HSG5ZHLLFile')
-
-class WriteHSG5ZHLLUD3PD (JobProperty):
-    """Produce the HSG5 UNBOOSTED ZH->llbb D3PD."""
-    statusOn = True
-    allowedTypes = ['bool']
-    StoredValue = False
-    StreamName = 'StreamNTUP_HSG5ZHLLU'
-    FileName = ''
-    isVirtual = False
-    DPDMakerScript = "HSG5DPDUtils/HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment.py"
-    TreeNames = ['physics']
-    SubSteps = ['a2d', 'e2d']
-allowedD3PDList.append('outputNTUP_HSG5ZHLLUFile')
-
-# ZHMET D3PD
-class WriteHSG5ZHMETD3PD (JobProperty):
-    """Produce the HSG5 BOOSTED ZH->nunubb D3PD."""
-    statusOn = True
-    allowedTypes = ['bool']
-    StoredValue = False
-    StreamName = 'StreamNTUP_HSG5ZHMET'
-    FileName = ''
-    isVirtual = False
-    DPDMakerScript = "HSG5DPDUtils/HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment.py"
-    TreeNames = ['physics']
-    SubSteps = ['a2d', 'e2d']
-allowedD3PDList.append('outputNTUP_HSG5ZHMETFile')
-
-class WriteHSG5ZHMETUD3PD (JobProperty):
-    """Produce the HSG5 UNBOOSTED ZH->nunubb D3PD."""
-    statusOn = True
-    allowedTypes = ['bool']
-    StoredValue = False
-    StreamName = 'StreamNTUP_HSG5ZHMETU'
-    FileName = ''
-    isVirtual = False
-    DPDMakerScript = "HSG5DPDUtils/HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment.py"
-    TreeNames = ['physics']
-    SubSteps = ['a2d', 'e2d']
-allowedD3PDList.append('outputNTUP_HSG5ZHMETUFile')
-
-# GAMH D3PD (should no longer be used)
-class WriteHSG5GAMHD3PD (JobProperty):
-     """Produce the HSG5 boosted gamma-H D3PD."""
-     statusOn = True
-     allowedTypes = ['bool']
-     StoredValue = False
-     StreamName = 'StreamNTUP_HSG5GAMH'
-     FileName = ''
-     isVirtual = False
-     DPDMakerScript = "HSG5DPDUtils/HSG5_gammaHbb_boosted_D3PD_prodJobOFragment.py"
-     TreeNames = ['physics']
-     SubSteps = ['a2d', 'e2d']
-allowedD3PDList.append('outputNTUP_HSG5GAMHFile')
-
-# GAMZ D3PD
-class WriteHSG5GAMZD3PD (JobProperty):
-    """Produce the HSG5 boosted gamma-Z D3PD."""
-    statusOn = True
-    allowedTypes = ['bool']
-    StoredValue = False
-    StreamName = 'StreamNTUP_HSG5GAMZ'
-    FileName = ''
-    isVirtual = False
-    DPDMakerScript =  "HSG5DPDUtils/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py"
-    TreeNames = ['physics']
-    SubSteps = ['a2d', 'e2d']
-allowedD3PDList.append('outputNTUP_HSG5GAMZFile')
-
-# ZBB D3PD
-class WriteHSG5ZBBD3PD (JobProperty):
-     """Produce the HSG5 boosted Z->bb D3PD."""
-     statusOn = True
-     allowedTypes = ['bool']
-     StoredValue = False
-     StreamName = 'StreamNTUP_HSG5ZBB'
-     FileName = ''
-     isVirtual = False
-     DPDMakerScript = "HSG5DPDUtils/HSG5_Zbb_boosted_D3PD_prodJobOFragment.py"
-     TreeNames = ['physics']
-     SubSteps = ['a2d', 'e2d']
-allowedD3PDList.append('outputNTUP_HSG5ZBBFile')        
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Flags.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Flags.py
deleted file mode 100644
index e3657920c45..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Flags.py
+++ /dev/null
@@ -1,162 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# 
-## @file HSG5D3PDUtils/python/HSG5Flags.py
-## @purpose Python module to hold common flags to configure HSG5D3PD JobOptions
-##
-
-##-----------------------------------------------------------------------------
-## Import
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
-from AthenaCommon.JobProperties import jobproperties
-
-# General flags
-_flags = []
-
-class doHadronicRecoil(JobProperty):
-    """ Turn on filling of hadronic recoil branches
-    """
-    statusOn=True
-    allowedTypes=['bool']
-    StoredValue=False
-_flags.append(doHadronicRecoil)
-
-class doGoodTracks(JobProperty):
-    """ Turn on filling of hadronic recoil branches
-    """
-    statusOn=True
-    allowedTypes=['bool']
-    StoredValue=True
-_flags.append(doGoodTracks)
-
-class doHighPtTracks(JobProperty):
-    """ Turn on filling of HighPtTracks branches
-    """
-    statusOn=False
-    allowedTypes=['bool']
-    StoredValue=False
-_flags.append(doHighPtTracks)
-
-class doHighPtClusters(JobProperty):
-    """ Turn on filling of HighPtClusters branches
-    """
-    statusOn=False
-    allowedTypes=['bool']
-    StoredValue=False
-_flags.append(doHighPtClusters)
-
-class doHighPtEMClusters(JobProperty):
-    """ Turn on filling of HighPtEMClusters branches
-    """
-    statusOn=False
-    allowedTypes=['bool']
-    StoredValue=False
-_flags.append(doHighPtEMClusters)
-
-class doTaus(JobProperty):
-    """ Turn on filling of tau branches
-    """
-    statusOn=False
-    allowedTypes=['bool']
-    StoredValue=False
-_flags.append(doTaus)
-
-class doPhotons(JobProperty):
-    """ Turn on filling of photon branches
-    """
-    statusOn=False
-    allowedTypes=['bool']
-    StoredValue=False
-_flags.append(doPhotons)
-
-class doAllMissingET(JobProperty):
-    """ Turn on filling of all MissingET branches
-    """
-    statusOn=True
-    allowedTypes=['bool']
-    StoredValue=True
-_flags.append(doAllMissingET)
-
-# V0D3PDObject flags
-
-
-##-----------------------------------------------------------------------------
-## Definition of the HSG5 flag container
-
-class HSG5Flags(JobPropertyContainer):
-    """ The HSG5 base D3PD flag container
-    """
-
-class HSG5WHFlags(JobPropertyContainer):
-    """ The HSG5WH D3PD flag container
-    """
-
-class HSG5WHUFlags(JobPropertyContainer):
-    """ The HSG5WHU D3PD flag container
-    """
-
-class HSG5WHQFlags(JobPropertyContainer):
-    """ The HSG5WHU D3PD flag container
-    """
-
-class HSG5ZHLLFlags(JobPropertyContainer):
-    """ The HSG5ZHLL D3PD flag container
-    """
-
-class HSG5ZHLLUFlags(JobPropertyContainer):
-    """ The HSG5ZHLLU D3PD flag container
-    """
-        
-class HSG5ZHMETFlags(JobPropertyContainer):
-    """ The HSG5ZHMET D3PD flag container
-    """
-
-class HSG5ZHMETUFlags(JobPropertyContainer):
-    """ The HSG5ZHMETU D3PD flag container
-    """
-
-class HSG5GAMZFlags(JobPropertyContainer):
-    """ The HSG5GAMZ D3PD flag container
-    """
-
-class HSG5ZBBFlags(JobPropertyContainer):
-    """ The HSG5ZBB D3PD flag container
-    """
-
-# add the reconstruction flags container to the top containers
-jobproperties.add_Container(HSG5Flags)
-jobproperties.add_Container(HSG5WHFlags)
-jobproperties.add_Container(HSG5WHUFlags)
-jobproperties.add_Container(HSG5WHQFlags)
-jobproperties.add_Container(HSG5ZHLLFlags)
-jobproperties.add_Container(HSG5ZHLLUFlags)
-jobproperties.add_Container(HSG5ZHMETFlags)
-jobproperties.add_Container(HSG5ZHMETUFlags)
-jobproperties.add_Container(HSG5GAMZFlags)
-jobproperties.add_Container(HSG5ZBBFlags)
-
-for flag in _flags:
-    jobproperties.HSG5Flags.add_JobProperty(flag)
-    jobproperties.HSG5WHFlags.add_JobProperty(flag)
-    jobproperties.HSG5WHUFlags.add_JobProperty(flag)
-    jobproperties.HSG5WHQFlags.add_JobProperty(flag)
-    jobproperties.HSG5ZHLLFlags.add_JobProperty(flag)
-    jobproperties.HSG5ZHLLUFlags.add_JobProperty(flag)
-    jobproperties.HSG5ZHMETFlags.add_JobProperty(flag)
-    jobproperties.HSG5ZHMETUFlags.add_JobProperty(flag)
-    jobproperties.HSG5GAMZFlags.add_JobProperty(flag)
-    jobproperties.HSG5ZBBFlags.add_JobProperty(flag)
-del _flags
-
-HSG5Flags=jobproperties.HSG5Flags
-HSG5WHFlags=jobproperties.HSG5WHFlags
-HSG5WHUFlags=jobproperties.HSG5WHUFlags
-HSG5WHQFlags=jobproperties.HSG5WHQFlags
-HSG5ZHLLFlags=jobproperties.HSG5ZHLLFlags
-HSG5ZHLLUFlags=jobproperties.HSG5ZHLLUFlags
-HSG5ZHMETFlags=jobproperties.HSG5ZHMETFlags
-HSG5ZHMETUFlags=jobproperties.HSG5ZHMETUFlags
-HSG5GAMZFlags=jobproperties.HSG5GAMZFlags
-HSG5ZBBFlags=jobproperties.HSG5ZBBFlags
-
-
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Selectors.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Selectors.py
deleted file mode 100644
index e4e4ef8ccb2..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Selectors.py
+++ /dev/null
@@ -1,161 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import AthenaCommon.SystemOfUnits as Units
-from D2PDMaker.D2PDMakerConf import D2PDMuonSelector, D2PDElectronSelector
-
-from ROOT import egammaPID
-
-class MuonSelector( object ) :
-
-    def __init__( self,
-                  name = 'HSG5_MuonSelector',
-                  inputCollection = 'MuidMuonCollection',
-                  outputLinkCollection = 'HSG5_ElectronLinkCollection',
-                  minNumberPassed = 1,
-                  ptMin = 18.0,
-                  absEtaMax = 2.5,
-                  acceptIsCombined = False,
-                  acceptIsSegmentTagged = False,
-                  doRelPtCone20  = False,
-                  relPtCone20Max = 0.15,
-                  requireIsLoose = False,
-                  requireIsTight = False) :
-        
-        self.name = name
-        self.inputCollection = inputCollection
-        self.outputLinkCollection = outputLinkCollection
-        self.minNumberPassed = minNumberPassed
-        self.ptMin = ptMin
-        self.absEtaMax = absEtaMax
-        self.acceptIsCombined = acceptIsCombined
-        self.acceptIsSegmentTagged = acceptIsSegmentTagged
-        self.doRelPtCone20 = doRelPtCone20
-        self.relPtCone20Max = relPtCone20Max
-        self.muonRequireIsLoose = requireIsLoose
-        self.muonRequireIsTight = requireIsTight
-
-    def getMuonSelector ( self, name="", inputCollection="", outputLinkCollection="" ) :
-    
-        if name!="":
-            self.name=name
-        if inputCollection!="":
-            self.inputCollection=inputCollection
-        if outputLinkCollection!="":
-            self.outputLinkCollection=outputLinkCollection
-
-        muonParametersList = []
-        muonParametersMinList = []
-        muonParametersMaxList = []
-        muonParametersUseRelativeCutsList = []
-        if self.doRelPtCone20:
-            muonParametersList.append(17)   # ptcone20
-            muonParametersMinList.append(0.)  
-            muonParametersMaxList.append(self.relPtCone20Max)
-            muonParametersUseRelativeCutsList.append(True)
-            
-        return D2PDMuonSelector(self.name,
-                                inputCollection      = self.inputCollection,
-                                outputLinkCollection = self.outputLinkCollection,
-                                minNumberPassed      = self.minNumberPassed,
-                                ptMin                = self.ptMin*Units.GeV,
-                                absEtaMax            = self.absEtaMax,
-                                muonAcceptIsCombined = self.acceptIsCombined,
-                                muonAcceptIsSegmentTagged = self.acceptIsSegmentTagged,
-                                muonRequireIsLoose   = self.muonRequireIsLoose,
-                                muonRequireIsTight   = self.muonRequireIsTight,
-                                muonParametersList = muonParametersList,
-                                muonParametersMinList = muonParametersMinList,
-                                muonParametersMaxList = muonParametersMaxList,
-                                muonParametersUseRelativeCutsList = muonParametersUseRelativeCutsList )
-    
-    
-class ElectronSelector( object ) :
-    
-    def __init__( self,
-                  name = 'HSG5_ElectronSelector',
-                  outputLinkCollection = 'HSG5_ElectronLinkCollection',
-                  minNumberPassed = 1,
-                  ptMin = 20.0,
-                  clusterEtaMax = 2.5,
-                  requireTight = False) :
-
-        self.name = name
-        self.outputLinkCollection = outputLinkCollection
-        self.minNumberPassed = minNumberPassed
-        self.ptMin = ptMin
-        self.clusterEtaMax = clusterEtaMax
-        self.requireTight = requireTight
-
-    def getElectronSelector ( self, name="", outputLinkCollection="" ) :
-        
-        if name!="":
-            self.name=name
-        if outputLinkCollection!="":
-            self.outputLinkCollection=outputLinkCollection
-        
-        electronIsEM = egammaPID.isEM
-        if self.requireTight:
-            electronIsEM = egammaPID.ElectronTight
-
-        return D2PDElectronSelector( self.name,
-                                     inputCollection      = 'ElectronAODCollection',
-                                     outputLinkCollection = self.outputLinkCollection,
-                                     minNumberPassed      = self.minNumberPassed,
-                                     ptMin                = self.ptMin*Units.GeV,
-                                     clusterEtaMax        = self.clusterEtaMax,
-                                     electronIsEM         = electronIsEM )
-
-
-class JetSelector( object ) :
-    
-    def __init__( self,
-                  name = 'HSG5_JetSelector',
-                  inputCollection = 'AntiKt4TopoEMJets',
-                  outputLinkCollection = 'HSG5_JetLinkCollection',
-                  minNumberPassed = 1,
-                  ptMin = 20.0,
-                  etaMax = 2.5,
-                  emVeto = False,
-                  emCollection = 'HSG5_ElectronLinkCollection',
-                  emJetDeltaRMax = 0.3) :
-        
-        self.name = name
-        self.inputCollection = inputCollection,
-        self.outputLinkCollection = 'HSG5_JetLinkCollection'
-        self.minNumberPassed = minNumberPassed
-        self.ptMin = ptMin
-        self.etaMax = 2.5
-        self.emVeto = emVeto
-        self.emCollection = emCollection
-        self.emJetDeltaRMax = emJetDeltaRMax
-
-    def getJetSelector( self, name="", outputLinkCollection="") :
-        
-        if name!="":
-            self.name=name
-        if outputLinkCollection!="":
-            self.outputLinkCollection=outputLinkCollection
-
-            
-        outputAssociationContainerList = []
-        numberOfAssociationsContainerList = []
-        
-        if self.emVeto:
-            from AssociationComps.AssociationCompsConf import DeltaRAssociationTool
-            ToolSvc += DeltaRAssociationTool( self.name+"_emDeltaRAssocTool",
-                                              OutputLevel = INFO,
-                                              inputAssociateToCollection = self.emCollection,
-                                              deltaRMax = self.emJetDeltaRMax,
-                                              writeUserData = False)
-            outputAssociationContainerList.append(self.name+"_emDeltaRAssocTool")            
-            numberOfAssociationsContainerList.append(0)
-
-        return D2PDJetSelector( self.name,
-                                inputCollection      = self.inputCollection,
-                                outputLinkCollection = self.outputLinkCollection,
-                                associationToolList = [ ToolSvc.HSG5WHU_emDeltaRAssociationTool ],
-                                outputAssociationContainerList = outputAssociationContainerList,
-                                numberOfAssociationsMaxCutList = numberOfAssociationsMaxCutList,
-                                minNumberPassed      = self.minNumberPassed,
-                                ptMin                = self.ptMin*Units.GeV,
-                                etaMax               = self.etaMax)
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSD3PD.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSD3PD.py
deleted file mode 100644
index 292bbe42691..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSD3PD.py
+++ /dev/null
@@ -1,221 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-from JetD3PDMaker.JetD3PDObject             import getJetD3PDObject
-from D3PDMakerConfig.D3PDMakerFlags         import D3PDMakerFlags
-from RecExConfig.RecFlags                   import rec
-from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
-from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
-from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
-from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
-import JetSubstructureD3PDMaker
-from D3PDMakerCoreComps.D3PDObject          import make_SG_D3PDObject
-import EventCommonD3PDMaker
-#from JetTagD3PDMaker.AddBTagD3PDInfo import addBTagInfoToJetObject
-from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
-from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
-import JetTagD3PDMaker
-
-
-from AthenaCommon.AlgSequence               import AlgSequence
-topSequence = AlgSequence()
-
-def getJetCollectionD3PDObject(objectname = 'JetCollectionD3PDObject', prefix =	'jet_'):
-    return make_SG_D3PDObject('JetCollection','','jet_', objectname)
-
-
-def AddUniqueMoments(obj, momlist, theblockname = 'ConfigParams', level = 0):
-    obj.defineBlock(level, theblockname, JetSubstructureD3PDMaker.JetMomentUniqueFillerTool, Moments = momlist, OutputLevel=3)
-
-
-def AddHadronicInfo(obj, additionalMoments = [], theblockname = 'SubjetMomentsHadronic', level=0):
-
-   from JetD3PDMaker import JetMomentFillerTool
-   obj.defineBlock(level, theblockname, JetMomentFillerTool,Moments= [] + additionalMoments)
-
-def AddAssocJetsIndex(obj, jetassocname, jettarget, intermediate_names = [], level=0):
-   
-   JetAssocTrack = IndexMultiAssociation(obj, JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,jettarget,level = level,
-                                         prefix=jetassocname+'_',
-                                         blockname=jetassocname+'blockindex', AssociationName = jetassocname , IntermediateAssociationNames=intermediate_names, OutputLevel=3 )
-
-def AddConstitIndex(object, typename='CaloCluster', target='cl_', level=0):
- 
-   import EventCommonD3PDMaker
-   import D3PDMakerCoreComps
-   ConstitAssoc = ContainedVectorMultiAssociation \
-             (object,
-             EventCommonD3PDMaker.NavigableConstituentAssociationTool,
-             'constit_',
-             blockname=typename+'NavigableConstituentAssociationTool',
-             TypeName = typename, WriteWeight = True,
-             level = level)
-
-   ConstitAssoc.defineBlock (0, 'ConstitIndex'+typename, D3PDMakerCoreComps.IndexFillerTool, Target = target)
-
-def AddConstitTruthIndex(object, typename='TruthParticle', target='mc_', level=0):
-
-    import EventCommonD3PDMaker
-    import D3PDMakerCoreComps
-    import TruthD3PDMaker
-    ConstitAssoc = ContainedVectorMultiAssociation \
-            (object,
-             EventCommonD3PDMaker.NavigableConstituentAssociationTool,
-             'constit_',
-             blockname=typename+'NavigableConstituentAssociationTool',
-             TypeName = typename, WriteWeight = False,
-             level = level)
-            
-    genPart = SimpleAssociation(ConstitAssoc,TruthD3PDMaker.TruthParticleGenParticleAssociationTool)
-    trupart2 = IndexAssociation (genPart, TruthD3PDMaker.GenParticleTruthParticleAssociationTool,
-                                 target = 'mc_',
-                                 Target = 'mc_')
-
-
-
-def AddBTaggingInfo(obj, level = 0, block_prefix = "my"):
-
-    obj.defineBlock(level,block_prefix+JetTagD3PDKeys.BTagWeightsBlockName(),
-                              JetTagD3PDMaker.JetTagBTagWeightsFillerTool,
-                              prefix=JetTagD3PDKeys.BTagWeightsPrefix(),
-                              TaggerNames=JetTagD3PDFlags.Taggers())
-    #addBTagInfoToJetObject(obj,0)
-
-def AddBTaggingInfoFromSubjets(obj,  sj_assoc_name = 'SplitFiltSubjets', sj_prefix = "subjets", level=0):
-    t = ContainedVectorMultiAssociation(obj, JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,level = level, prefix= sj_prefix+"_",
-                                        blockname='blockbtag'+sj_assoc_name, nrowName = 'nsj', OutputLevel=3, AssociationName=sj_assoc_name, IntermediateAssociationNames=['Parent'])
-
-    #t.defineBlock(0, 'myKinematics', EventCommonD3PDMaker.FourMomFillerTool, WriteE  = True)
-   
-    AddBTaggingInfo(t, 0, "my"+sj_assoc_name)    
-
-myJSD3PD = []
-
-def JSD3PD(jetsToWrite, alg):
-
-    global myJSD3PD
-
-    if not alg:
-        raise TypeError("alg should be specified!")
-
-    jsD3PD=None    
-    for val in myJSD3PD:
-        if val[0]==jetsToWrite:
-            print "using existing JSD3PD"
-            jsD3PD=val[1]
-            break
-        
-    if jsD3PD==None:        
-        jsD3PD = JSD3PD_Tool(jetsToWrite)
-        myJSD3PD += [ (jetsToWrite, jsD3PD) ]
-
-    jsD3PD.addToAlg(alg)
-
-class JSD3PD_Tool(object):
-
-    def __init__(self,jetsToWrite):
-
-        self.commonExcludeList = ['El02Match','Mu02Match','L1Info','L2Info','EFInfo']
-        self.commonIncludeList = []
-
-        MyJetD3PDObject = getJetD3PDObject(objectname='MyJetD3PDObject')
-        MyGroomedJetD3PDObject = getJetD3PDObject(objectname='MyGroomedJetD3PDObject')
-    
-        import re
-        JetAlgPattern = re.compile(r'^(\D+)(\d{1,2})(\D+)Jets')  #assuming standard notation
-        ars = JetAlgPattern.match(jetsToWrite[0]).groups()
-    
-        self.parentJets = ''.join(ars)  #remove the 'Jets' at the end
-
-        self.groomedJetsList = jetsToWrite[1]
-            
-        if 'Track' in self.parentJets:
-            AddConstitIndex(MyGroomedJetD3PDObject, typename='Rec::TrackParticle', target='trk')
-            AddConstitIndex(MyJetD3PDObject, typename='Rec::TrackParticle', target='trk')
-        elif 'LCTopo' in self.parentJets:
-            AddConstitIndex(MyGroomedJetD3PDObject)
-            AddConstitIndex(MyJetD3PDObject)
-        elif 'Truth' in self.parentJets:
-            AddConstitTruthIndex(MyJetD3PDObject)
-            AddConstitTruthIndex(MyGroomedJetD3PDObject)
-
-        #if 'Track' not in self.parentJets and 'Truth' not in self.parentJets:
-        #    AddAssocJetsIndex(MyJetD3PDObject, 'TrackJets', 'jet_' + ars[0] + ars[1] + 'TrackZ_')
-        #    if rec.doTruth():
-        #       AddAssocJetsIndex(MyJetD3PDObject, 'TruthJets', 'jet_' + ars[0] + ars[1] + 'Truth_')
-        
-        self.JetQualInclude = []
-
-        if 'Topo' in self.parentJets or 'LCTopo' in self.parentJets:
-            self.commonIncludeList += ['ConstituentScale', 'EMScale']
-            AddHadronicInfo(MyJetD3PDObject, ['OriginIndex','nTrk','sumPtTrk','EtaOrigin'  , 'PhiOrigin'  ,  'MOrigin'], theblockname = 'OriginIndexBlock')
-            AddHadronicInfo(MyGroomedJetD3PDObject, ['EtaOrigin'  , 'PhiOrigin'  ,  'MOrigin' ], theblockname = 'OriginIndexBlock')
-
-
-            if (self.parentJets == 'AntiKt10LCTopo') or (self.parentJets == 'CamKt12LCTopo'):
-                AddHadronicInfo(MyJetD3PDObject, ['LCJES', 'LCJES_EtaCorr', 'LCJES_MassCorr' ], theblockname='LCJESBlock')
-                AddHadronicInfo(MyGroomedJetD3PDObject, ['LCJES', 'LCJES_EtaCorr', 'LCJES_MassCorr' ], theblockname='LCJESBlock')
-                
-        self.VtxInclude = []
-
-        if 'Topo' in self.parentJets:
-            self.VtxInclude += ['JVtx','JetVertexFraction']
-            
-        AddAssocJetsIndex(MyGroomedJetD3PDObject, 'Parent', 'jet_' + self.parentJets + '_')
-        for gr in self.groomedJetsList:
-            AddAssocJetsIndex(MyJetD3PDObject, gr, 'jet_' + self.parentJets + gr + '_')
-
-        MyGroomedJetCollectionD3PDObject = getJetCollectionD3PDObject(objectname = "MyGroomedJetCollectionD3PDObject")
-        AddUniqueMoments(MyGroomedJetCollectionD3PDObject,  ['SmallR','PtFrac', 'NSub'], theblockname = 'TrimConfigMoments', level=99)
-        AddUniqueMoments(MyGroomedJetCollectionD3PDObject,   ['NSubjets','ktycut2','massFraction','minRfilt','minSplitR'], theblockname = 'FiltConfigMoments', level = 99)
-        
-        AddHadronicInfo(MyGroomedJetD3PDObject, ['CORE_RBB','CORE_RFILT'], theblockname = 'FiltMoments', level=99)
-
-        ## in groomedJetsList, subjets name should follow the name of the 'full/composite' jet.
-        for idx,gr in enumerate(self.groomedJetsList):
-                ## names are unique
-            if 'Subjets' in gr and idx != 0 and 'Subjets' not in self.groomedJetsList[idx-1]:
-                AddBTaggingInfoFromSubjets(MyGroomedJetD3PDObject, sj_assoc_name = gr, sj_prefix = gr, level = 99)
-                AddAssocJetsIndex(MyGroomedJetD3PDObject, gr, 'jet_' + self.parentJets + gr + '_', intermediate_names = ['Parent'], level=99)              
-            elif 'Subjets' in gr:
-                raise ValueError("Subjets without full composite jet ?") ## not suppose to happen
-
-        self.MyJetD3PDObject = MyJetD3PDObject
-        self.MyGroomedJetD3PDObject = MyGroomedJetD3PDObject
-        self.MyGroomedJetCollectionD3PDObject = MyGroomedJetCollectionD3PDObject
-
-
-
-    def addToAlg(self,alg):
-               
-        alg += self.MyJetD3PDObject(0, prefix='jet_' + self.parentJets + '_', sgkey=self.parentJets+'Jets', exclude=self.commonExcludeList, include = self.commonIncludeList + self.VtxInclude + self.JetQualInclude)
- 
-        for idx,gr in enumerate(self.groomedJetsList):
-                        
-            kw = {}
-            includelist = []
-            includelist_unique = []
-            
-            if 'Trim' in gr:
-                includelist_unique += ['TrimConfigMoments']
-                
-            elif 'Filt' in gr and 'Subjets' not in gr:
-                includelist += ['FiltMoments']
-                includelist_unique += ['FiltConfigMoments']
-                if len(self.groomedJetsList) > idx+1 and 'Subjets' in self.groomedJetsList[idx+1]:
-                    includelist += ['blockbtag'+self.groomedJetsList[idx+1], self.groomedJetsList[idx+1]+'blockindex']
-                    
-            elif 'Subjets' in gr:
-                includelist += [JetTagD3PDKeys.BTagWeightsBlockName()]                
-                includelist += [JetTagD3PDKeys.JetTrackAssocBlockName()] 
-                includelist += [JetTagD3PDKeys.JetTrackBlockName()] 
-                includelist += [JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName()] 
-                includelist += [JetTagD3PDKeys.IPInfoPlusTrackBlockName()] 
-                
-                kw[JetTagD3PDKeys.JetTrackAssocBlockName()+'_target']= "trk" 
-                kw[JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName()+'_target']= "trk" 
-                
-            alg += self.MyGroomedJetD3PDObject(0, prefix='jet_' + self.parentJets + gr + '_', sgkey=self.parentJets + gr +'Jets', include = includelist + self.commonIncludeList,exclude=self.commonExcludeList,**kw)
-        
-            alg += self.MyGroomedJetCollectionD3PDObject( 0, prefix='jet_' + self.parentJets + gr + '_config_', sgkey=self.parentJets + gr +'Jets', include = includelist_unique)
-
-        return
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSjets.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSjets.py
deleted file mode 100644
index a1d79d7f552..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSjets.py
+++ /dev/null
@@ -1,251 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-#####Jet Reco ############
-
-# Before adding your algorithms to topSequence
-from JetRec.JetGetters import *
-from JetRec.JetRecFlags import jetFlags
-from JetRecTools.JetRecToolsConf import *
-from AthenaCommon.AlgSequence import AlgSequence
-from JetRec.JetMomentGetter import  add_jetMoments_to_JetAlg, make_JetMomentGetter
-from JetRec.JetRecConf import JetSorterTool
-#from JetMomentTools.JetMomentToolsConf import JetWidthTool
-
-import JetSubStructure
-
-_GroomingTool =  {
-     'Trimming'      : JetSubStructure.SimpleTrimmingTool,
-     'BDRSFiltering' : JetSubStructure.BDRSFilteringTool,
-}
-
-def buildName(GroomedDict):
-
-  if type(GroomedDict) != dict:
-     raise TypeError("GroomedDicts must contain dicts!")
-
-  if GroomedDict['Type'] in _GroomingTool:
-     strconfig = ""
-     theArgs = GroomedDict['args']
-     for k in theArgs.keys():
-         if type(theArgs[k]) == int:
-            strconfig += k + '%d' % theArgs[k]
-         elif type(theArgs[k]) == float:
-            strconfig += k + '%d' % (theArgs[k]*100)
-
-     toolname = strconfig
-
-     return toolname
-  else:
-      raise KeyError("Couldn't find grooming tool %s" % GroomedDict['Type'])
-
-
-def getGroomingTools(GroomedDicts):
-    
-  myGroomingTools = []
-  catNames = []
-  for gr in GroomedDicts:
-     toolname = buildName(gr)
-     defname =  _GroomingTool[gr['Type']].__slots__['Name']   ## safe hack ?
-
-     defsubjetsname = ''
-     if "SubjetsName" in _GroomingTool[gr['Type']].__slots__.keys():
-        defsubjetsname = _GroomingTool[gr['Type']].__slots__['SubjetsName']
-
-     kw = gr['args'].copy()
-     if 'Name' not in kw.keys():
-         kw['Name'] = defname
-     kw['Name'] += toolname
-
-     if 'SubjetsName' not in kw.keys() and defsubjetsname != '':
-         kw['SubjetsName'] = defsubjetsname
-     kw['SubjetsName'] += toolname
-
-     myGroomingTools += [_GroomingTool[gr['Type']](gr['Type']+toolname, StoreConfigParam = True, **kw)]
-
-     catNames += [ kw['Name'] ]
-
-     ## are we requesting subjets ?
-     if "SaveSubjets" in kw.keys():
-        if kw["SaveSubjets"] ==	True:
-       	   catNames += [ kw['SubjetsName'] ]
-
-  return myGroomingTools, catNames  
-
-
-######################
-##    Truth Jets    ##
-######################
-
-def setupTruthJets(myjetfinder, myjetdr, GroomedDicts, theseq):
-  if rec.doTruth():
-    myGroomingTools, catNames = getGroomingTools(GroomedDicts)    
-      
-    sortertool = JetSorterTool('myJetSorter', SortOrder="ByPtDown", OutputLevel=3)
-
-    assoc_tool_truth = JetSubStructure.JetAssociationTool(
-                        name = 'JetAssocToolTruth',
-                        GroomingTools = myGroomingTools, UsedSignalState = 2,
-                        JetAlgTools = [sortertool], OutputLevel = 3
-                       )
-
-    myjetgetter_truth = make_StandardJetGetter(myjetfinder, myjetdr, 'Truth', seq = theseq, doCalib=False ,addDefaultMoment=False)
-    truthcontname = myjetgetter_truth.outputKey() 
-
-    make_JetMomentGetter(truthcontname , [assoc_tool_truth], theseq )
-
-    return [ truthcontname, catNames ]
-  else:
-    return [ None, None ]
-
-######################
-##    Track Jets    ##
-######################
-
-def setupTrackJets(myjetfinder, myjetdr, GroomedDicts, theseq):
-
-  myGroomingTools, catNames = getGroomingTools(GroomedDicts)
-
-  sortertool = JetSorterTool('myJetSorter', SortOrder="ByPtDown", OutputLevel=3 )
-
-  assoc_tool_track = JetSubStructure.JetAssociationTool(                                                                                  
-                      name = 'JetAssocToolTrack',
-                      GroomingTools = myGroomingTools, UsedSignalState = 2, 
-                      JetAlgTools = [sortertool], OutputLevel = 3
-                     )
-
-
-  #---- TrackJet ----
-
-  from JetSubStructure.JSTrackJets import createJSTrackJets
-  mygetter = createJSTrackJets(theseq, myjetfinder,myjetdr)
-
-  trackjetcontname =  mygetter.outputKey()
-
-  #---- End TrackJet  ----
-
-  make_JetMomentGetter(trackjetcontname , [assoc_tool_track], theseq )
-
-  return [ trackjetcontname, catNames ]
-
-
-######################
-##    Calo Jets     ##
-######################
-
-def setupCaloJets(myjetfinder, myjetdr, myjetinput, GroomedDicts, theseq):
-
-  myGroomingTools, catNames = getGroomingTools(GroomedDicts)
-
-  sortertool = JetSorterTool('myJetSorter', SortOrder="ByPtDown", OutputLevel=3 )
-
-  grjets_calib = []
-
-  ## Origin correction / Eta-Mass-JES hack
-  
-  from JetSubStructure.mySetupJetCalibrators import doEtaMassJESCorrection
-  from JetCalibTools.MakeCalibSequences import calibTags
-  calibTags['ETAMASSJES'] = doEtaMassJESCorrection
-
-  mydoCalib = False
-  mycalibName = ''
-
-  if 'LCTopo' in myjetinput:
-    mydoCalib =	True
-    if (myjetfinder + '%d'%(myjetdr*10) == 'AntiKt10') or (myjetfinder + '%d'%(myjetdr*10) == 'CamKt12'):
-      mycalibName = 'LC:ORIGIN_ETAMASSJES'
-    else:
-      mycalibName = 'LC:ORIGIN'
-
-    stdcaliblist = []
-    allowedcalib = ['AntiKt10LCTopoTrimmedJets', 'AntiKt10LCTopoTrimmedPtFrac3SmallR30Jets','AntiKt10LCTopoTrimmedPtFrac5SmallR30Jets','CamKt12LCTopoTrimmedPtFrac5SmallR30Jets']
-    for x in catNames:
-       author  = myjetfinder + '%d'%(myjetdr*10) + myjetinput + x + 'Jets'
-       if author in allowedcalib :
-           grjets_calib += [JetSubStructure.JetAlgToolWrapper(name = 'calibtool_origin_etamassjes_'+x,
-                                                               JetAlgTool = getStandardCalibTool(myjetfinder,myjetdr, myjetinput+x, doCalib=True, calibName='LC:ORIGIN_ETAMASSJES')[0],
-                                                               GroomedjetsAuthor = [x] )]
-       else:
-           stdcaliblist += [x]
-                                                       
-    if stdcaliblist != [] :
-        grjets_calib += [JetSubStructure.JetAlgToolWrapper(name = 'calibtool_origin',
-                                                            JetAlgTool = getStandardCalibTool(myjetfinder,myjetdr, myjetinput, doCalib=True, calibName='LC:ORIGIN')[0],
-                                                            GroomedjetsAuthor = stdcaliblist )]
-  elif 'Topo' in myjetinput:
-    mydoCalib = True
-    mycalibName = 'EM:ORIGIN'
-    grjets_calib += getStandardCalibTool(myjetfinder,myjetdr, myjetinput, doCalib=True, calibName='EM:ORIGIN')
- 
-  assoc_tools = []
-  if rec.doTruth():
-    truthcontname = myjetfinder + '%dTruthJets' % (myjetdr*10)
-    if hasattr(theseq, truthcontname):
-      truthj_assoc = JetSubStructure.JetJetAssociatorTool("Truth_JetJetAssociatorTool", ContainerName = truthcontname, AssociationName = "TruthJets", MatchOrigin = False)
-      
-  trackjetcontname =  myjetfinder + '%dTrackZJets' % (myjetdr*10)
-  if hasattr(theseq, trackjetcontname):
-    trkj_assoc = JetSubStructure.JetJetAssociatorTool("Trk_JetJetAssociatorTool", ContainerName = trackjetcontname, AssociationName = "TrackJets", MatchOrigin = True)
-
-
-  ## batgging ##
-  subjets_names = [x for x in catNames if "Subjets" in x]
-  btag_tool = []
-  if subjets_names != '':
-    from JetRec.JetGetters import getStandardBTaggerTool
-    from JetRec.JetRecFlags import jetFlags
-    jetFlags.doBTagging = True
-    _btag_tool = getStandardBTaggerTool('AntiKt', 0.4, 'LCTopo')
-    if len(_btag_tool) > 0:
-      btag_tool += [ JetSubStructure.JetAlgToolWrapper(name = 'JetBTagger_' + ''.join(subjets_names), JetAlgTool = _btag_tool[0], 
-                                                       GroomedjetsAuthor = subjets_names ) ] 
-    jetFlags.doBTagging = False
-  
-  ## btagging end ##
-
-  assoc_tool = JetSubStructure.JetAssociationTool(                                                                                  
-                      name = 'JetAssocTool',
-                      AssociatorTools = assoc_tools, 
-                      GroomingTools = myGroomingTools, UsedSignalState = 2,
-                      JetAlgTools = grjets_calib +  [sortertool] + btag_tool, OutputLevel = 3
-                     )
-
-
-  myjetgetter = make_StandardJetGetter(myjetfinder, myjetdr, myjetinput, seq = theseq, doCalib=mydoCalib, calibName=mycalibName,addDefaultMoment=False)
-  contname = myjetgetter.outputKey()
-  
-
-  # ------------------------------------------------
-  # Associate a vertex and set the JVF moment. Must be placed AFTER vertex correction
-  # ------------------------------------------------
-  from AthenaCommon.DetFlags import DetFlags
-  from AthenaCommon.AppMgr import ToolSvc
-  noVertex = jobproperties.Beam.beamType == 'cosmics' or jobproperties.Beam.beamType == 'singlebeam'
-  if DetFlags.detdescr.ID_on() and jetFlags.doJVF() and 'Truth' not in myjetinput and not noVertex:
-     from JetSubStructure.mySetupJetMomentTools import mygetJetVertexAssociationTool
-     myjvatool = mygetJetVertexAssociationTool(myjetfinder, myjetdr,myjetinput,'Custom%d'%(myjetdr*10))
-     add_jetMoments_to_JetAlg(myjetgetter, [myjvatool])
-
-  make_JetMomentGetter(contname , [assoc_tool], theseq )
-
-  return [ contname, catNames ]
-
-
-def createJSJets( ParentDict, GroomedDicts,  theseq = AlgSequence()) :
- 
-  if type(ParentDict) != dict:
-    raise TypeError("ParentDict must be a dict!")
-
-  if type(GroomedDicts) != list:
-    raise TypeError("GroomedDicts must be a list!")
-
-  myjetfinder = ParentDict["JetFinder"]
-  myjetdr = ParentDict["JetdR"]
-  myjetinput = ParentDict["JetInput"]
-
-  if myjetinput == 'Truth':
-    return setupTruthJets(myjetfinder, myjetdr, GroomedDicts, theseq)
-  elif myjetinput == 'Track':
-    return setupTrackJets(myjetfinder, myjetdr, GroomedDicts, theseq)
-  else :
-    return setupCaloJets(myjetfinder, myjetdr, myjetinput, GroomedDicts, theseq)
-
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/LeptonFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/LeptonFilter.py
deleted file mode 100644
index 59622f931a9..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/LeptonFilter.py
+++ /dev/null
@@ -1,609 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-##=============================================================================
-## Name:        LeptonFilter.py
-##
-## Author:      Robert Harrington
-## Created:     July 2011
-##
-## Description: This is a short algorithm to select events that contain one
-##              electron or muon which fulfills a certain set of criteria.
-##=============================================================================
-
-__doc__ = """This is a short algorithm to select events that contain one 
-electron or muon which fulfills a certain set of criteria.
-"""
-__version__ = "0.0.1"
-__author__  = "Robert Harrington <roberth@cern.ch>"
-
-
-import AthenaPython.PyAthena as PyAthena
-from AthenaPython.PyAthena import StatusCode
-
-from PrimaryDPDMaker import PrimaryDPDHelpers
-
-## Import the module that allows to use named units, e.g. GeV
-import AthenaCommon.SystemOfUnits as Units
-
-class LeptonFilter( PyAthena.AthFilterAlgorithm ):
-
-    """
-    This class is a short algorithm to select events that contain one 
-    electron which fulfills a certain set of criteria.
-
-    The possible criteria for electrons are (with default values):
-
-    cutEtMin         = 20.0*Units.GeV)
-    cutIsEM          = 'None'    # Possible values: 'None', 'Loose', 'Medium', 'Tight', 'TightNoIsolation'
-    cutElAuthor      = 'either'  # Possible values: 'softe', 'egamma', 'either'
-    cutElEtaMax        = 2.5
-    removeEtaCrack   = False
-    crackEtaMin      = 1.37
-    crackEtaMax      = 1.52
-    minNumberPassedEl= 1
-    passAllEl        = False
-
-    The possible criteria for muons are (with default values):
-    
-    cutPtMinMu           = 0*Units.GeV
-    muonAuthors          = 'all'  # Possible values: 'lowpt', 'combined', 'calo', 'standalone', 'all'
-    cutContainerMu       = 'all'      # Possible values: 'staco', 'muid', 'calo','all'
-    cutEtaMuMax          = 3.0
-    passAllMu            = False
-    usingAOD             = True
-    doEtconeMu           = False
-    etconeMuMax          = 6.0*Units.GeV
-    doNoTrackIsolMu      = False
-    noTrackIsolMu        = 5
-    innerNoTrackRadiusMu = 0.05
-    outerNoTrackRadiusMu = 0.5
-    doPtTrackIsolMu      = False
-    ptTrackIsolMu        = 8.0*Units.GeV
-    innerPtTrackRadiusMu = 0.05
-    outerPtTrackRadiusMu = 0.5
-    doCaloIsolMu         = False
-    caloIsolMu           = 6.0*Units.GeV
-    innerCaloRadiusMu    = 0.05
-    outerCaloRadiusMu    = 0.5
-    doJetIsolMu          = False
-    jetIsolEtMu          = 15.0*Units.GeV
-    jetDistanceMu        = 0.5
-    minNumberPassedMu    = 1
-    """
-
-
-    def __init__ ( self, name = "LeptonFilter", **kw ):
-
-        ## initialize base class
-        kw['name'] = name
-        super(LeptonFilter, self).__init__(**kw)
-
-        ## Define the cuts
-        self.electronCollectionType     = kw.get('electronCollectionType', "ElectronContainer")
-        self.electronCollectionName     = kw.get('electronCollectionName', "ElectronAODCollection")
-        self.goodElectronCollectionName = kw.get('goodElectronCollectionName', self.name() )
-
-        self.cutEtMinEl        = kw.get('cutEtMinEl', 20.0*Units.GeV)
-        self.cutIsEM           = kw.get('cutIsEM', "None") # Possible values: "None", "Loose", 'Medium', 'Tight', 'TightNoIsolation'
-        self.cutElAuthor       = kw.get('cutElAuthor', "either") # Possible values: 'softe', 'egamma', 'either'
-        self.cutElEtaMax       = kw.get('cutElEtaMax', 2.5)
-        self.removeEtaCrack    = kw.get('removeEtaCrack', False)
-        self.crackEtaMin       = kw.get('crackEtaMin', 1.37)
-        self.crackEtaMax       = kw.get('crackEtaMax', 1.52)
-        self.minNumberPassedEl = kw.get('minNumberPassedEl', 1)
-        self.passAllEl         = kw.get('passAllEl', False)
-
-        ## muon
-        self.cutPtMinMu           = kw.get('cutPtMinMu', 0.0*Units.GeV)
-        self.muonAuthors          = kw.get('muonAuthors', "all") # Possible values: 'lowpt', 'combined', 'calo', 'standalone', 'all'
-        self.muonContainers       = kw.get('muonContainers', "all") # Possible values: 'staco', 'muid', 'calo','all'
-        self.goodMuonCollectionName = kw.get('goodMuonCollectionName', self.name() )
-        self.cutMuEtaMax          = kw.get('cutMuEtaMax', 3.0)
-        self.passAllMu            = kw.get('passAllMu', False)
-        self.doEtconeMu           = kw.get('doEtconeMu', False)
-        self.etconeMuMax          = kw.get('etconeMuMax', 6.0*Units.GeV)        
-        self.doNoTrackIsolMu      = kw.get('doNoTrackIsolMu', False)
-        self.noTrackIsolMu        = kw.get('noTrackIsolMu', 5)
-        self.innerNoTrackRadiusMu = kw.get('innerNoTrackRadiusMu', 0.05)
-        self.outerNoTrackRadiusMu = kw.get('outerNoTrackRadiusMu', 0.5)
-        self.doPtTrackIsolMu      = kw.get('doPtTrackIsolMu', False)
-        self.ptTrackIsolMu        = kw.get('ptTrackIsolMu', 8.0*Units.GeV)
-        self.innerPtTrackRadiusMu = kw.get('innerPtTrackRadiusMu', 0.05)
-        self.outerPtTrackRadiusMu = kw.get('outerPtTrackRadiusMu', 0.5)
-        self.doCaloIsolMu         = kw.get('doCaloIsolMu', False)
-        self.caloIsolMu           = kw.get('caloIsolMu', 6.0*Units.GeV)
-        self.innerCaloRadiusMu    = kw.get('innerCaloRadiusMu', 0.05)
-        self.outerCaloRadiusMu    = kw.get('outerCaloRadiusMu', 0.5)
-        self.doJetIsolMu          = kw.get('doJetIsolMu', False)
-        self.jetIsolEtMu          = kw.get('jetIsolEtMu', 15.0*Units.GeV)
-        self.jetDistanceMu        = kw.get('jetDistanceMu', 0.5)
-        self.jetContainerName     = kw.get('jetContainerName',"Cone4TowerJets")
-        self.muonIsolationTool    = kw.get('muonIsolation',None)
-        self.minNumberPassedMu    = kw.get('minNumberPassedMu', 1)
-
-        self.usingAOD           = kw.get('usingAOD', True)
-
-        ## Get the storgate handle
-        self.storeGateSvc     = None
-        self.muContainerNames = []
-        
-        return
-    
-
-    def initialize(self):
-        
-        self.msg.info( '************************************' )
-        self.msg.info( '==> initialize %s...', self.name() )
-        self.msg.info( 'Will apply the following electron cuts:' )
-        self.msg.info( '  EtMinEl            = %r', self.cutEtMinEl )
-        self.msg.info( '  IsEmEl             = %s', self.cutIsEM )
-        self.msg.info( '  AuthorEl           = %s', self.cutElAuthor )
-        self.msg.info( '  ElEtaMax           = %r', self.cutElEtaMax )
-        self.msg.info( '  removeEtaCrack     = %r', self.removeEtaCrack )
-        self.msg.info( '  crackEtaMin        = %r', self.crackEtaMin )
-        self.msg.info( '  crackEtaMax        = %r', self.crackEtaMax )
-        self.msg.info( '  minNumberPassedEl  = %r', self.minNumberPassedEl )
-        self.msg.info( '  passAllEl          = %r', self.passAllEl )
-
-        self.msg.info( 'And the following muon cuts:' )
-        self.msg.info( '  PtMinMu            = %r', self.cutPtMinMu )
-        self.msg.info( '  AuthorMu           = %s', self.muonAuthors )
-        self.msg.info( '  MuEtaMax           = %r', self.cutMuEtaMax )
-        if self.doEtconeMu: self.msg.info( '  muon etcone cut    = %r', self.etconeMuMax )
-        self.msg.info( '  passAllMu          = %r', self.passAllMu )
-        self.msg.info( '  minNumberPassedMu  = %r', self.minNumberPassedMu )
-        self.msg.info( '************************************' )
-
-        
-        ## Also, declare some counters and initialize them to zero
-        self.nProcessed         = 0
-        self.nEventMinNumPassed = 0
-
-        self.nElectrons         = 0
-        self.nEventElPassEta    = 0
-        self.nEventElPassEt     = 0
-        self.nEventElPassIsEM   = 0
-        self.nEventElPassAuthor = 0
-
-        self.nMuons                = 0
-        self.nEventMuPassEta       = 0
-        self.nEventMuPassPt        = 0
-        self.nEventMuPassAuthor    = 0
-        self.nEventMuPassPrescale  = 0
-        self.nEventMuPassIsolation = 0
-
-        ## Import needed modules
-        import PyUtils.RootUtils as ru
-        ROOT = ru.import_root()
-
-        if self.doNoTrackIsolMu or self.doPtTrackIsolMu or self.doCaloIsolMu :
-            if self.muonIsolationTool is None:
-                self.msg.warning("Problem retrieving MuonIsolationTool pointer ")
-                self.msg.warning("setting Track and Calo isolation to False ")
-                self.doNoTrackIsolMu = False
-                self.doPtTrackIsolMu = False
-                self.doCaloIsolMu = False
-
-        ## import some 4-mom utils
-        import FourMomUtils.Bindings
-        self.utils = { 'deltaR' : PyAthena.P4Helpers.deltaR }
-
-        _append = self.muContainerNames.append
-        if self.usingAOD :
-            if self.muonContainers.__contains__('staco') or self.muonContainers is 'all':
-                _append("StacoMuonCollection")
-            if self.muonContainers.__contains__('muid') or self.muonContainers is 'all':
-                _append("MuidMuonCollection")
-            if self.muonContainers.__contains__('calo') or self.muonContainers is 'all':
-                _append("CaloMuonCollection")
-        else :
-            if self.muonContainers.__contains__('staco') or self.muonContainers is 'all':
-                _append("StacoESDMuonCollection")
-                if self.muonAuthors is 'combined' or self.muonAuthors is 'all' :
-                    _append("StacoCombinedMuonContainer")
-                if self.muonAuthors is 'lowpt' or self.muonAuthors is 'all' :
-                    _append("StacoCombinedMuonContainerLowPt")
-                if self.muonAuthors is 'standalone' or self.muonAuthors is 'all':
-                    _append("MboyESDMuonContainer")
-            if self.muonContainers.__contains__('muid') or self.muonContainers is 'all':
-                _append("MuidESDMuonCollection")
-                if self.muonAuthors is 'combined' or self.muonAuthors is 'all' :
-                    _append("MuidCombinedMuonContainer")
-                if self.muonAuthors is 'lowpt' or self.muonAuthors is 'all' :
-                    _append("MuGirlCombinedMuonContainer")
-                if self.muonAuthors is 'standalone' or self.muonAuthors is 'all' :
-                    _append("MuidExtrMuonContainer")
-            if self.muonContainers.__contains__('calo') or self.muonContainers is 'all':
-                if self.muonAuthors is 'calo' or self.muonAuthors is 'all' :
-                    _append("CaloMuonIdContainer")
-                    _append("CaloESDMuonCollection")
-        del _append
-
-        ## Get the StoreGate service
-        self.storeGateSvc = PyAthena.py_svc('StoreGateSvc')
-        if self.storeGateSvc is None:
-            self.msg.error("Problem retrieving StoreGateSvc pointer !!")
-            return StatusCode.Failure
-        
-        return StatusCode.Success
-
-
-
-
-    def execute(self):
-        
-        self.nProcessed+=1
-        self.msg.debug( '==> execute %s on %r. event...' % (self.name(), self.nProcessed) )
-
-        passEl = self.passElectronSelection()
-        passMu = self.passMuonSelection()
-        
-        if ( passEl or passMu) :                         
-            self.nEventMinNumPassed += 1
-            self.msg.debug( '%s event passed.' % self.name() )
-            self.setFilterPassed(True)
-            pass
-        else :
-            self.msg.debug( '%s event failed.' % self.name() )
-            self.setFilterPassed(False)
-            pass
-
-  
-        return StatusCode.Success
-    
-
-    def finalize(self):
-        ## Import needed modules
-        import math
-
-        ## Calculate the efficiencies and their errors
-        effiElectrons    = 0.0
-        effiElPassEta    = 0.0
-        effiElPassEt     = 0.0
-        effiElPassAuthor = 0.0
-        effiElPassIsEM   = 0.0
-        effiMinNumPassed = 0.0
-        effiErrElectrons    = 0.0
-        effiErrElPassEta    = 0.0
-        effiErrElPassEt     = 0.0
-        effiErrElPassAuthor = 0.0
-        effiErrElPassIsEM   = 0.0
-        effiErrMinNumPassed = 0.0
-        try :
-            # Efficiencies
-            effiElectrons    = self.nElectrons / (1.0*self.nProcessed)
-            effiElPassEta    = self.nEventElPassEta / float(self.nProcessed)
-            effiElPassEt     = self.nEventElPassEt / float(self.nProcessed)
-            effiElPassAuthor = self.nEventElPassAuthor / float(self.nProcessed)
-            effiElPassIsEM   = self.nEventElPassIsEM / float(self.nProcessed)
-            effiMinNumPassed = self.nEventMinNumPassed / float(self.nProcessed)
-
-            # Error on efficiencies; use binomial errors
-            effiErrElectrons    = math.sqrt(self.nElectrons) / self.nElectrons
-            effiErrElPassEta    = 100.0 * math.sqrt( effiElPassEta*(1.0 - effiElPassEta) / float(self.nProcessed) )
-            effiErrElPassEt     = 100.0 * math.sqrt( effiElPassEt*(1.0 - effiElPassEt) / float(self.nProcessed) )
-            effiErrElPassAuthor = 100.0 * math.sqrt( effiElPassAuthor*(1.0 - effiElPassAuthor) / float(self.nProcessed) )
-            effiErrElPassIsEM   = 100.0 * math.sqrt( effiElPassIsEM*(1.0 - effiElPassIsEM) / float(self.nProcessed) )
-            effiErrMinNumPassed = 100.0 * math.sqrt( effiMinNumPassed*(1.0 - effiMinNumPassed) / float(self.nProcessed) )
-
-            effiElPassEta    *= 100.0
-            effiElPassEt     *= 100.0
-            effiElPassAuthor *= 100.0
-            effiElPassIsEM   *= 100.0
-            effiMinNumPassed *= 100.0
-
-        except ZeroDivisionError :
-            self.msg.warning( 'Division by zero error when calculating the uncertainties on the pass efficiencies...' )
-            pass
-
-        
-        self.msg.info( '==> finalize %s...' % self.name() )
-        self.msg.info( '***************************************************************' )
-        self.msg.info( 'Cut-flow table of %s skimming algorithm:' % self.name() )
-        self.msg.info( '-------------' )
-        self.msg.info( ' Number of processed events:  %r' % self.nProcessed )
-        self.msg.info( ' Number of all electrons:     %r and number of electrons per event: %3.3f +/- %3.3f' % ( self.nElectrons, effiElectrons, effiErrElectrons ) )
-        self.msg.info( ' Events after eta cut:        %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventElPassEta,    effiElPassEta,    effiErrElPassEta ) )
-        self.msg.info( ' Events after E_T cut:        %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventElPassEt,     effiElPassEt,     effiErrElPassEt ) )
-        self.msg.info( ' Events after author cut:     %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventElPassAuthor, effiElPassAuthor, effiErrElPassAuthor ) )
-        self.msg.info( ' Events after IsEM cut:       %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventElPassIsEM,   effiElPassIsEM,   effiErrElPassIsEM ) )
-        self.msg.info( ' Events after minNumberPassedEl %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMinNumPassed, effiMinNumPassed, effiErrMinNumPassed ) )
-        self.msg.info( '***************************************************************' )
-
-       ## Import needed modules
-        import math
-
-        ## Calculate the efficiencies and their errors
-        effiMuons        = 0.0
-        effiMuPassEta    = 0.0
-        effiMuPassPt     = 0.0
-        effiMuPassAuthor = 0.0
-        effiMuPassIsol   = 0.0
-        effiMinNumPassed = 0.0
-        effiErrMuons        = 0.0
-        effiErrMuPassEta    = 0.0
-        effiErrMuPassPt     = 0.0
-        effiErrMuPassAuthor = 0.0
-        effiErrMuPassIsol   = 0.0
-        effiErrMinNumPassed = 0.0
-        try :
-            # Efficiencies
-            effiMuons        = self.nMuons / (1.0*self.nProcessed)
-            effiMuPassEta    = self.nEventMuPassEta / float(self.nProcessed)
-            effiMuPassPt     = self.nEventMuPassPt / float(self.nProcessed)
-            effiMuPassAuthor = self.nEventMuPassAuthor / float(self.nProcessed)
-            effiMuPassIsol   = self.nEventMuPassIsolation / float(self.nProcessed)
-            effiMinNumPassed = self.nEventMinNumPassed / float(self.nProcessed)
-
-            # Error on efficiencies, use binomial errors
-            effiErrMuons        = math.sqrt(self.nMuons) / self.nMuons
-            effiErrMuPassEta    = 100.0 * math.sqrt( effiMuPassEta*(1.0 - effiMuPassEta) / float(self.nProcessed) )
-            effiErrMuPassPt     = 100.0 * math.sqrt( effiMuPassPt*(1.0 - effiMuPassPt) / float(self.nProcessed) )
-            effiErrMuPassAuthor = 100.0 * math.sqrt( effiMuPassAuthor*(1.0 - effiMuPassAuthor) / float(self.nProcessed) )
-            effiErrMuPassIsol   = 100.0 * math.sqrt( effiMuPassIsol*(1.0 - effiMuPassIsol) / float(self.nProcessed) )
-            effiErrMinNumPassed = 100.0 * math.sqrt( effiMinNumPassed*(1.0 - effiMinNumPassed) / float(self.nProcessed) )
-
-            effiMuPassEta    *= 100.0
-            effiMuPassPt     *= 100.0
-            effiMuPassAuthor *= 100.0
-            effiMuPassIsol   *= 100.0
-            effiMinNumPassed *= 100.0
-
-        except ZeroDivisionError :
-            self.msg.warning( 'Division by zero error when calculating the uncertainties on the pass efficiencies...' )
-            pass
-
-        
-        self.msg.info( '==> finalize %s...' % self.name() )
-        self.msg.info( '***************************************************************' )
-        self.msg.info( 'Cut-flow table of %s skimming algorithm:' % self.name() )
-        self.msg.info( '-------------' )
-        self.msg.info( ' Number of processed events: %r' % self.nProcessed )
-        self.msg.info( ' Number of all muons:  %r and number of muons per event: %3.3f +/- %3.3f' % ( self.nMuons, effiMuons, effiErrMuons ) )
-        self.msg.info( ' Events after eta cut:     %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMuPassEta,    effiMuPassEta,    effiErrMuPassEta ) )
-        self.msg.info( ' Events after p_T cut:     %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMuPassPt,     effiMuPassPt,     effiErrMuPassPt ) )
-        self.msg.info( ' Events after author cut:  %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMuPassAuthor, effiMuPassAuthor, effiErrMuPassAuthor ) )
-        self.msg.info( ' Events after isolation cut:  %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMuPassIsolation, effiMuPassIsol, effiErrMuPassIsol ) )
-        self.msg.info( ' Events after minNumberPassed %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMinNumPassed, effiMinNumPassed, effiErrMinNumPassed ) )
-        self.msg.info( '***************************************************************' )
-
-
-        return StatusCode.Success
-
-    
-    def passPresel(self,muon) :
-        if not self.doEtconeMu :
-            return True
-        if (muon.parameter(1)<self.etconeMax) :
-            return True
-        return False
-
-
-    def passCaloIsol(self,muon) :
-
-        if not self.doCaloIsolMu :
-            return True
-        outerConeEt = self.muonIsolationTool.caloIsolationEnergy(muon, dR, False,None)
-        innerConeEt = self.muonIsolationTool.caloIsolationEnergy(muon, dR, False,None)
-        
-        if (outerConeEt-innerConeEt) < self.caloIsolMu :
-            return True
-        return False
-
-    def passNoTracksIsol(self,muon) :
-
-        if not self.doNoTrackIsolMu :
-            return True
-        outerConeNoTracks = self.muonIsolationTool.trackIsolationNumberOfTrack(muon,self.outerNoTrackRadiusMu)
-        innerConeNoTracks = self.muonIsolationTool.trackIsolationNumberOfTrack(muon,self.innerNoTrackRadiusMu)
-        if (outerConeNoTracks-innerConeNoTracks) < self.noTracksIsolMu :
-            return True
-        return False
-
-    def passPtTracksIsol(self,muon) :
-
-        if not self.doPtTrackIsolMu :
-            return True
-        outerConePtTracks = self.muonIsolationTool.trackIsolationEnergy(muon,self.outerNoTrackRadiusMu)
-        innerConePtTracks = self.muonIsolationTool.trackIsolationEnergy(muon,self.innerNoTrackRadiusMu)
-        if (outerConePtTracks-innerConePtTracks) < self.ptTracksIsolMu :
-            return True
-        return False
-
-    def passJetIsol(self,muon,jetCollection) :
-
-        # Declare the utility to calculate the DeltaR between two objects
-        deltaR = self.utils['deltaR']
-
-        if not self.doJetIsolMu :
-            return True
-        for jet in jetCollection :
-            if deltaR(jet,muon) < self.jetDistanceMu and jet.et() > self.jetIsolEtMu :
-                return True
-        return False
-
-    def passElectronSelection(self) :
-
-        #######################################################
-        # electron selection
-        #######################################################        
-
-        nElPassEta    = 0
-        nElPassEt     = 0
-        nElPassIsEM   = 0
-        nElPassAuthor = 0
-
-        # Create a class-member list of all electrons that passed all cuts.
-        # This can then be used by other filters to do overlap removal, etc.
-        VIEW_ELEMENTS = 1
-        goodElectrons = PyAthena.ElectronContainer(VIEW_ELEMENTS)
-
-        ## If passAll is selected, accept all events
-        if self.passAllEl :
-            self.msg.debug( '%s event passed electron selection because passAll is true' % self.name() )
-            return True
-
-        # Get the electron collection from StoreGate
-        try:
-            electronCollection = self.storeGateSvc.retrieve( self.electronCollectionType, self.electronCollectionName )
-            pass
-        except LookupError:
-            self.msg.warning( 'Collection %s not found' % self.electronCollectionName )           
-            return True
-
-        # Loop over all electrons and make the selections cuts
-        for electron in electronCollection :
-            self.nElectrons += 1
-            # Use Et of CaloCluster.
-            cluster = None
-            cluster = electron.cluster()
-            if cluster == None :
-                self.msg.warning( 'Could not get the cluster for this electron!' )
-                pass
-            else :
-                if abs(cluster.etaBE(2)) < self.cutElEtaMax :
-                    # Check if the EM calorimeter barrel-encap crack should be removed.
-                    if not self.removeEtaCrack or ( self.removeEtaCrack and \
-                                                    ( abs(cluster.etaBE(2)) < self.crackEtaMin
-                                                      or abs(cluster.etaBE(2)) > self.crackEtaMax ) ):
-                        nElPassEta += 1
-                        # If the Et of this electron is larger than the minimum required Et
-                        # of the high-Et cut, then the high-Et electron is found.
-                        if cluster.et() > self.cutEtMinEl :
-                            nElPassEt += 1
-                            # Check that the electron in question comes from the right reconstruction algorithm using PrimaryDPDHelpers
-                            if PrimaryDPDHelpers.checkEgammaAuthor( electron, self.cutElAuthor ) :
-                                nElPassAuthor += 1
-                                # Check the quality of the electron using PrimaryDPDHelpers
-                                if PrimaryDPDHelpers.checkElectronIsEM( electron, self.cutIsEM ):
-                                    nElPassIsEM += 1
-                                    # goodElectrons.append( electron )
-                                    goodElectrons.push_back( electron) 
-                                    pass
-                                pass
-                            pass
-                        pass
-                    pass
-                pass
-            pass
-        
-
-        ## Translate the electron pass counters into event pass counters
-        if nElPassEta > 0 :    self.nEventElPassEta += 1
-        if nElPassEt > 0 :     self.nEventElPassEt += 1
-        if nElPassIsEM > 0 :   self.nEventElPassIsEM += 1
-        if nElPassAuthor > 0 : self.nEventElPassAuthor += 1
-
-        if self.storeGateSvc.record( goodElectrons, self.goodElectronCollectionName ) != StatusCode.Success :
-            self.msg.error( 'Could not record the goodElectrons into StoreGate with the key = ' % self.goodElectronCollectionName )
-            pass
-
-
-        ## Check if the event is accepted
-        if goodElectrons.__len__() >= self.minNumberPassedEl :
-            self.msg.debug( '%s event passed electron selection' % self.name() )
-            return True
-            
-        
-        self.msg.debug( '%s event failed electron selection' % self.name() )
-        return False
-
-
-    def passMuonSelection(self) :
-        
-        #######################################################
-        # muon selection
-        #######################################################
-
-        ## If passAll is selected, accept all events
-        if self.passAllMu :
-            self.msg.debug( '%s event passed muon selection because passAllMu is true' % self.name() )
-            return True
-
-        jetCollection = None
-        _retrieve = self.storeGateSvc.retrieve
-
-        if self.doJetIsolMu :
-            try :
-                jetCollection = _retrieve ('JetCollection', jetContainerName)
-            except LookupError :
-                self.msg.warning('%s container not found in StoreGate ' % self.jetContainerName)
-                self.msg.warning('Turning jet isolation off ')
-                self.doJetIsolMu = False
-
-        #Then... here we go!
-        hasMuon     = False
-        hasMuonPt   = False
-        hasMuonEta  = False
-
-        # Create a class-member list of all muons that passed all cuts.
-        # This can then be used by other filters to do overlap removal, etc.
-        VIEW_ELEMENTS = 1
-        goodMuons = PyAthena.Analysis.MuonContainer(VIEW_ELEMENTS)
-
-        _contains = self.storeGateSvc.contains
-        for name in self.muContainerNames :
-            if not _contains('Analysis::MuonContainer', name):
-                self.msg.debug('%s container not found in StoreGate ' % name)
-                continue
-            muonCollection = None
-            try :
-                muonCollection = _retrieve('Analysis::MuonContainer', name)
-                pass
-            except LookupError:
-                self.msg.warning( 'Collection %s not found' % name  )           
-                return false
-            
-            ##############
-            nMuPassEta       = 0
-            nMuPassPt        = 0
-            nMuPassAuthor    = 0
-            nMuPassIsolation = 0
-            
-            for muon in muonCollection :
-                self.nMuons += 1
-
-                # eta cut
-                if abs(muon.eta()) < self.cutMuEtaMax :
-                    nMuPassEta += 1
-
-                    # muon pT cut
-                    if muon.pt() > self.cutPtMinMu :
-                        nMuPassPt += 1
-
-                        # Check that the muon in question comes from the right reconstruction algorithm using PrimaryDPDHelpers
-                        if PrimaryDPDHelpers.checkMuonAuthor( muon, self.muonAuthors ) :
-                            nMuPassAuthor += 1
-
-                            if self.passCaloIsol(muon) and self.passNoTracksIsol(muon) and self.passPtTracksIsol(muon) and self.passJetIsol(muon, jetCollection) and self.passPresel(muon) :
-                                nMuPassIsolation += 1
-
-                                goodMuons.push_back(muon)
-                                pass
-                            pass
-                        pass
-                    pass
-                pass
-
-            
-            ## Translate the muon pass counters into event pass counters
-            if nMuPassEta    > 0    : self.nEventMuPassEta       += 1
-            if nMuPassPt     > 0    : self.nEventMuPassPt        += 1
-            if nMuPassAuthor > 0    : self.nEventMuPassAuthor    += 1
-            if nMuPassIsolation > 0 : self.nEventMuPassIsolation += 1
-
-            pass
-
-        ## Record the good muons into StoreGate so that they can be retrieved by other algorithms
-        if self.storeGateSvc.record( goodMuons, self.goodMuonCollectionName ) != StatusCode.Success :
-            self.msg.error( 'Could not record the goodMuons into StoreGate with the key = ' % self.goodMuonCollectionName )
-            pass
-
-
-        ## Check if the event is accepted
-        if goodMuons.__len__() >=  self.minNumberPassedMu :
-            self.msg.debug( '%s event passed muon selection' % self.name() )
-            return True
-        
-        self.msg.debug( '%s event failed muon selection' % self.name() )
-        return False
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/__init__.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/__init__.py
deleted file mode 100644
index 04a7917a89e..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# template __init__.py defined in the GaudiPolicy package.
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/AODToHSG5_WHlnubb_boosted_D3PD.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/AODToHSG5_WHlnubb_boosted_D3PD.py
deleted file mode 100644
index 98315dc4e16..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/AODToHSG5_WHlnubb_boosted_D3PD.py
+++ /dev/null
@@ -1,49 +0,0 @@
-###################################################################3
-# Define the input file here.
-#
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-#athenaCommonFlags.FilesInput= ["AOD.pool.root"]
-athenaCommonFlags.FilesInput= ["/tmp/roberth/AOD.324274._000001.pool.root.1"]
-
-
-###################################################################3
-# Define the output file here.
-#
-
-if not globals().get('tupleFileOutput'):
-    tupleFileOutput = 'hsg5_WHlnubb_boosted.root'
-
-from D3PDMakerConfig.D3PDProdFlags import prodFlags
-prodFlags.WriteSMWZD3PD = True
-prodFlags.WriteSMWZD3PD.FileName = tupleFileOutput
-prodFlags.WriteSMWZD3PD.lock()
-
-#prodFlags.WriteHSG5_WHlnubb_boosted_D3PD = True
-#prodFlags.WriteHSG5_WHlnubb_boosted_D3PD.FileName = tupleFileOutput
-#prodFlags.WriteHSG5_WHlnubb_boosted_D3PD.lock()
-
-###################################################################3
-# Define other job options here.
-#
-
-athenaCommonFlags.EvtMax = -1 
-
-# Example of changing D3PD maker flags.
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-#D3PDMakerFlags.DoTrigger = False
-
-
-###################################################################
-# Configure RecExCommon.
-#
-
-from RecExConfig.RecFlags import rec
-rec.DPDMakerScripts.append( "PhysicsD3PDMaker/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py" )
-rec.doCBNT.set_Value_and_Lock( False )
-rec.doWriteTAG.set_Value_and_Lock( False )
-
-include( "RecExCommon/RecExCommon_topOptions.py" )
-
-print "topSequence: "
-print topSequence
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_ExampleSimpleTest.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_ExampleSimpleTest.py
deleted file mode 100644
index d8d50504611..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_ExampleSimpleTest.py
+++ /dev/null
@@ -1,67 +0,0 @@
-##-----------------------------------------------------------------------------
-## Name: D2PD_Test.py
-##
-## Author: Elias Coniavitis (Uppsala), based on code by Karsten Koeneke (DESY)
-## Email:  elias.coniavitis@cern.ch; karsten.koeneke@desy.de
-##
-## Description: This defines the content of the D2PD example
-##              for HSG5
-##
-##-----------------------------------------------------------------------------
-
-## Import the module that allows to use named units, e.g. GeV
-import AthenaCommon.SystemOfUnits as Units
-
-## Include the job property flags for this package and from RecExCommon
-from D2PDMaker.D2PDFlags import D2PDFlags
-from RecExConfig.RecFlags import rec
-
-## This handels multiple output streams
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr 
-
-
-
-#====================================================================
-# Define the test DPD output stream
-#====================================================================
-from D2PDMaker.D2PDHelpers import buildFileName
-streamName = D2PDFlags.WriteExampleSimpleTestStream.StreamName
-fileName   = buildFileName( D2PDFlags.WriteExampleSimpleTestStream )
-ExampleTestStream = MSMgr.NewPoolStream( streamName, fileName )
-
-
-ExampleTestStream.AddItem( 'TruthParticleContainer#SpclMC' )
-ExampleTestStream.AddItem( 'MissingEtTruth#MET_Truth_PileUp' )
-ExampleTestStream.AddItem( 'MissingET#MET_RefFinal' )
-ExampleTestStream.AddItem( 'TrigDec::TrigDecision#TrigDecision' )
-ExampleTestStream.AddItem( 'MissingEtTruth#MET_Truth' )
-ExampleTestStream.AddItem( 'Analysis::MuonContainer#StacoMuonCollection' )
-ExampleTestStream.AddItem( 'CTP_Decision#CTP_Decision' )
-ExampleTestStream.AddItem( 'EventInfo#*' )
-ExampleTestStream.AddItem( 'Analysis::TauJetContainer#TauRecContainer' )
-ExampleTestStream.AddItem( 'JetCollection#Cone4TruthJets' )
-ExampleTestStream.AddItem( 'JetCollection#AntiKt4TruthJets' )
-ExampleTestStream.AddItem( 'JetCollection#Cone4H1TopoJets' )
-ExampleTestStream.AddItem( 'JetCollection#AntiKt4H1TopoJets' )
-ExampleTestStream.AddItem( 'Analysis::TauDetailsContainer#TauRecDetailsContainer' )
-ExampleTestStream.AddItem( 'ElectronContainer#ElectronAODCollection' )
-ExampleTestStream.AddItem( 'egDetailContainer#egDetailAOD' )
-ExampleTestStream.AddItem( 'JetKeyDescriptor#JetKeyMap' )
-ExampleTestStream.AddItem( 'McEventCollection#GEN_AOD' )
-ExampleTestStream.AddItem( 'HLT::HLTResult#HLTResult_L2' )
-ExampleTestStream.AddItem( 'HLT::HLTResult#HLTResult_EF' )
-
-
-
-### Yellow containers
-
-#Trigger stuff
-ExampleTestStream.AddItem( 'egammaContainer#HLT_egamma' )
-ExampleTestStream.AddItem( 'TrigMuonEFContainer#HLT_MuonEF' )
-ExampleTestStream.AddItem( 'TrigMuonEFInfoContainer#HLT_MuonEFInfo' )
-#ExampleTestStream.AddItem( 'TrigMissingETContainer#HLT_TrigEFMissingET' )
-#ExampleTestStream.AddItem( 'Analysis::TauJetContainer#HLT_TrigTauRecMerged' )
-ExampleTestStream.AddItem( 'egDetailContainer#HLT_egamma_Electrons' )
-#'Rerunning' stuff
-ExampleTestStream.AddItem( 'CaloClusterContainer#CaloCalTopoCluster')
-ExampleTestStream.AddItem( 'Rec::TrackParticleContainer#TrackParticleCandidate')
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_topOptions.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_topOptions.py
deleted file mode 100644
index 3ae13e3a9bd..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_topOptions.py
+++ /dev/null
@@ -1,71 +0,0 @@
-##=============================================================================
-## Name:        D2PD_topOptions.py
-##
-## Author:      Karsten Koeneke (DESY)
-## Created:     April 2009
-
-## Description: job options for all AOD->D2PD and D1PD->D2PD.
-##
-## Usage: Here, all neccessary job options for the D2PDs can be set.
-##        To run, type:
-##             athena D2PDMaker/D2PD_topOptions.py 2>&1 | tee log.txt
-##=============================================================================
-
-
-#==============================================================================
-## Include the job property flags for this package 
-#==============================================================================
-from D2PDMaker.D2PDFlags import D2PDFlags
-
-#==============================================================================
-# If you have your own DPD Maker scripts
-# (see:
-#                    share/D2PD_ExampleSimple*.py
-# for examples),
-# then just append your script (wherever it is) to this list:
-#
-#       D2PDFlags.DPDMakerScripts.append("MyPackage/MyScript")
-#
-# The example scripts are appended below, so you can see how it works!
-#==============================================================================
-
-D2PDFlags.DPDMakerScripts.append("D2PDMaker/D2PD_ExampleSimpleTest.py")
-
-
-#==============================================================================
-# Load your input file
-#==============================================================================
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-athenaCommonFlags.PoolAODInput=["AOD.079660._000094.pool.root.1"]
-
-
-
-#==============================================================================
-# Set the geometry for your input file
-#==============================================================================
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.DetDescrVersion.set_Value_and_Lock("ATLAS-GEO-08-00-01")
-
-
-#==============================================================================
-# You can change the location and name of your output file with
-# these three flags:
-#==============================================================================
-#D2PDFlags.OutputDirectoryName          = "/my/directory/with/enough/space/"
-#D2PDFlags.OutputPoolRootFileNamePrefix = "MyFirstD2PD"
-#D2PDFlags.OutputMiddleName             = "test1"
-
-
-#==============================================================================
-# Set the number of events that you want to process
-#==============================================================================
-#athenaCommonFlags.SkipEvents.set_Value_and_Lock(0)
-if not vars().has_key('EvtMax'): EvtMax = 50#250
-athenaCommonFlags.EvtMax=EvtMax
-
-
-#==============================================================================
-# Execute the dpd maker
-#==============================================================================
-include("D2PDMaker/aodtodpd.py")
-
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/FatJetsConfig.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/FatJetsConfig.py
deleted file mode 100644
index ab77cdcf945..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/FatJetsConfig.py
+++ /dev/null
@@ -1,34 +0,0 @@
-include.block("HSG5DPDUtils/FatJetsConfig.py")
-
-from JetRec.JetRecFlags import jetFlags
-jetFlags.doBTagging = False
-jetFlags.inputFileType = 'AOD'
-
-preseq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName())
-
-###
-from HSG5DPDUtils.JSjets import createJSJets,getGroomingTools
-
-from HSG5DPDUtils.GroomedJetsConfig import getGroomedJetsConfig
-dictsConfig = getGroomedJetsConfig()
-
-sj_n = []
-for dC in dictsConfig:
-    myjetfinder = dC[0]["JetFinder"]
-    myjetdr = dC[0]["JetdR"]
-    myjetinput = dC[0]["JetInput"]
-    myGroomingTools, catNames = getGroomingTools(dC[1])
-    sj_n += [(myjetfinder+"%d"%(myjetdr*10) + myjetinput+x) for x in catNames if "Subjets" in x]
-    
-from BTagging.BTaggingFlags import BTaggingFlags
-for sj in sj_n:
-   BTaggingFlags.Jets += [sj]
-   BTaggingFlags.JetsWithInfoPlus += [sj]
-   BTaggingFlags.CalibrationChannelAliases += [sj+"->AntiKt4LCTopo" ]
-
-include("BTagging/BTagging_LoadTools.py")
-
-myJetKeys = []
-for dC in dictsConfig:
-    xx = createJSJets(dC[0], dC[1], preseq)
-    myJetKeys += [xx]
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py
deleted file mode 100644
index 89b8fadf9e7..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs.
-
-# This jobO should not be included more than once:
-include.block( "HSG5DPDUtils/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py" )
-
-# Common import(s):
-from AthenaCommon.JobProperties import jobproperties
-prodFlags = jobproperties.D3PDProdFlags
-from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
-
-# Set up a logger:
-from AthenaCommon.Logging import logging
-HSG5D3PD_msg = logging.getLogger( 'HSG5_WHlnubb_boosted_D3PD_prodJobOFragment' )
-
-# Check if the configuration makes sense:
-if prodFlags.WriteHSG5WHD3PD.isVirtual:
-    HSG5D3PD_msg.error( "The HSG5 WH D3PD stream can't be virtual! " +
-                              "It's a configuration error!" )
-    raise NameError( "HSG5 D3PD set to be a virtual stream" )
-    pass
-
-# Create the D3PD streams:
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-
-# Construct the stream and file names for the SMWZ D3PD:
-streamName = prodFlags.WriteHSG5WHD3PD.StreamName
-fileName   = buildFileName( prodFlags.WriteHSG5WHD3PD )
-
-HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \
-                   ( streamName, fileName ) )
-
-HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" )
-
-# create stream
-
-if 'IS_SIMULATION' in inputFileSummary['evt_type']:
-    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-    D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True)
-
-# set flags
-from HSG5DPDUtils.HSG5Flags import HSG5WHFlags
-#HSG5WHFlags.doTaus = True
-#HSG5WHFlags.doPhotons = True
-
-from HSG5DPDUtils.HSG5D3PD import HSG5D3PD
-HSG5D3PD( HSG5D3PD_Stream, flags=HSG5WHFlags )
-
-include("HSG5DPDUtils/FatJetsConfig.py")
-
-from HSG5DPDUtils.JSD3PD import JSD3PD
-for xx in myJetKeys:
-   if xx[0] != None and xx[1] != None:
-       JSD3PD(xx, HSG5D3PD_Stream )
-
-# add filters
-HSG5D3PD_Stream.AcceptAlgs=[]
-HSG5D3PD_Stream.RequireAlgs=[]
-
-include ("HSG5DPDUtils/WHlnubb_boostedFilter.py")
-
-from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig
-HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)]
-
-ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment.py
deleted file mode 100644
index 03461249ef5..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment.py
+++ /dev/null
@@ -1,76 +0,0 @@
-'''
-Created on 28 Feb 2012
-
-@author: wvazquez
-'''
-#
-# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs.
-
-# This jobO should not be included more than once:
-include.block( "HSG5DPDUtils/HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment.py" )
-
-# Common import(s):
-from AthenaCommon.JobProperties import jobproperties
-prodFlags = jobproperties.D3PDProdFlags
-from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
-
-# Set up a logger:
-from AthenaCommon.Logging import logging
-HSG5D3PD_msg = logging.getLogger( 'HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment' )
-
-# Check if the configuration makes sense:
-if prodFlags.WriteHSG5WHUD3PD.isVirtual:
-    HSG5D3PD_msg.error( "The HSG5 WH unboosted D3PD stream can't be virtual! " +
-                              "It's a configuration error!" )
-    raise NameError( "HSG5 D3PD set to be a virtual stream" )
-    pass
-
-# Create the D3PD streams:
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-
-# Construct the stream and file names for the SMWZ D3PD:
-streamName = prodFlags.WriteHSG5WHUD3PD.StreamName
-fileName   = buildFileName( prodFlags.WriteHSG5WHUD3PD )
-
-HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \
-                   ( streamName, fileName ) )
-
-HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" )
-
-# create stream
-#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD
-#SMWZD3PD( HSG5D3PD_Stream )
-
-if 'IS_SIMULATION' in inputFileSummary['evt_type']:
-    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-    D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True)
-
-
-# set flags
-from HSG5DPDUtils.HSG5Flags import HSG5WHUFlags
-HSG5WHUFlags.doTaus = True
-HSG5WHUFlags.doPhotons = True
-
-print "HSG5WHUFlags.doPhotons()=",HSG5WHUFlags.doPhotons()
-
-from HSG5DPDUtils.HSG5D3PD import HSG5D3PD
-print "after import of HSG5D3PD, HSG5WHUFlags.doPhotons()=",HSG5WHUFlags.doPhotons()
-HSG5D3PD( HSG5D3PD_Stream, flags=HSG5WHUFlags )
-
-include("HSG5DPDUtils/FatJetsConfig.py")
-
-from HSG5DPDUtils.JSD3PD import JSD3PD    
-for xx in myJetKeys:
-    if xx[0] != None and xx[1] != None:
-        JSD3PD(xx, HSG5D3PD_Stream )
-        
-# add filters
-HSG5D3PD_Stream.AcceptAlgs=[]
-HSG5D3PD_Stream.RequireAlgs=[]
-
-include ("HSG5DPDUtils/WHlnubb_unboostedFilter.py")
-
-from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig
-HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)]
-
-ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_QCDbkg_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_QCDbkg_D3PD_prodJobOFragment.py
deleted file mode 100644
index e82650323bb..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_QCDbkg_D3PD_prodJobOFragment.py
+++ /dev/null
@@ -1,71 +0,0 @@
-'''
-Created on 28 Feb 2012
-
-@author: wvazquez
-'''
-#
-# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs.
-
-# This jobO should not be included more than once:
-include.block( "HSG5DPDUtils/HSG5_WHlnubb_unboosted_QCDbkg_D3PD_prodJobOFragment.py" )
-
-# Common import(s):
-from AthenaCommon.JobProperties import jobproperties
-prodFlags = jobproperties.D3PDProdFlags
-from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
-
-# Set up a logger:
-from AthenaCommon.Logging import logging
-HSG5D3PD_msg = logging.getLogger( 'HSG5_WHlnubb_unboosted_D3PD_QCDbkg_prodJobOFragment' )
-
-# Check if the configuration makes sense:
-if prodFlags.WriteHSG5WHQD3PD.isVirtual:
-    HSG5D3PD_msg.error( "The HSG5 WH QCD D3PD stream can't be virtual! " +
-                              "It's a configuration error!" )
-    raise NameError( "HSG5 QCD D3PD set to be a virtual stream" )
-    pass
-
-# Create the D3PD streams:
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-
-# Construct the stream and file names for the SMWZ D3PD:
-streamName = prodFlags.WriteHSG5WHQD3PD.StreamName
-fileName   = buildFileName( prodFlags.WriteHSG5WHQD3PD )
-
-HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \
-                   ( streamName, fileName ) )
-
-HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" )
-
-# create stream
-#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD
-#SMWZD3PD( HSG5D3PD_Stream )
-
-if 'IS_SIMULATION' in inputFileSummary['evt_type']:
-    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-    D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True)
-
-
-# set flags
-from HSG5DPDUtils.HSG5Flags import HSG5WHQFlags
-
-from HSG5DPDUtils.HSG5D3PD import HSG5D3PD
-HSG5D3PD( HSG5D3PD_Stream, flags=HSG5WHQFlags )
-
-include("HSG5DPDUtils/FatJetsConfig.py")
-
-from HSG5DPDUtils.JSD3PD import JSD3PD
-for xx in myJetKeys:
-   if xx[0] != None and xx[1] != None:
-       JSD3PD(xx, HSG5D3PD_Stream )
-
-# add filters
-HSG5D3PD_Stream.AcceptAlgs=[]
-HSG5D3PD_Stream.RequireAlgs=[]
-
-include ("HSG5DPDUtils/WHlnubb_unboostedFilterQCDbkg.py")
-
-from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig
-HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)]
-
-ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_boosted_D3PD_prodJobOFragment.py
deleted file mode 100644
index ff07dd11618..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_boosted_D3PD_prodJobOFragment.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs.
-
-# This jobO should not be included more than once:
-include.block( "HSG5DPDUtils/HSG5_ZHllbb_boosted_D3PD_prodJobOFragment.py" )
-
-# Common import(s):
-from AthenaCommon.JobProperties import jobproperties
-prodFlags = jobproperties.D3PDProdFlags
-from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
-
-# Set up a logger:
-from AthenaCommon.Logging import logging
-HSG5D3PD_msg = logging.getLogger( 'HSG5_ZHllbb_boosted_D3PD_prodJobOFragment' )
-
-# Check if the configuration makes sense:
-if prodFlags.WriteHSG5ZHLLD3PD.isVirtual:
-    HSG5D3PD_msg.error( "The HSG5 ZHLL D3PD stream can't be virtual! " +
-                              "It's a configuration error!" )
-    raise NameError( "HSG5 ZHLL D3PD set to be a virtual stream" )
-    pass
-
-# Create the D3PD streams:
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-
-# Construct the stream and file names for the HSG5 D3PD:
-streamName = prodFlags.WriteHSG5ZHLLD3PD.StreamName
-fileName   = buildFileName( prodFlags.WriteHSG5ZHLLD3PD )
-
-HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \
-                   ( streamName, fileName ) )
-
-HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" )
-
-# create stream
-#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD
-#SMWZD3PD( HSG5D3PD_Stream )
-
-if 'IS_SIMULATION' in inputFileSummary['evt_type']:
-    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-    D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True)
-
-# set flags
-from HSG5DPDUtils.HSG5Flags import HSG5ZHLLFlags
-HSG5ZHLLFlags.doTaus = True
-
-from HSG5DPDUtils.HSG5D3PD import HSG5D3PD
-HSG5D3PD( HSG5D3PD_Stream,flags=HSG5ZHLLFlags )
-
-include("HSG5DPDUtils/FatJetsConfig.py")
-
-from HSG5DPDUtils.JSD3PD import JSD3PD
-for xx in myJetKeys:
-   if xx[0] != None and xx[1] != None:
-       JSD3PD(xx, HSG5D3PD_Stream )
-
-# add filters
-HSG5D3PD_Stream.AcceptAlgs=[]
-HSG5D3PD_Stream.RequireAlgs=[]
-
-include ("HSG5DPDUtils/ZHllbb_boostedFilter.py")
-
-from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig
-HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)]
-
-ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment.py
deleted file mode 100644
index c2b1f89f03f..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs.
-
-# This jobO should not be included more than once:
-include.block( "HSG5DPDUtils/HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment.py" )
-
-# Common import(s):
-from AthenaCommon.JobProperties import jobproperties
-prodFlags = jobproperties.D3PDProdFlags
-from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
-
-# Set up a logger:
-from AthenaCommon.Logging import logging
-HSG5D3PD_msg = logging.getLogger( 'HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment' )
-
-# Check if the configuration makes sense:
-if prodFlags.WriteHSG5ZHLLUD3PD.isVirtual:
-    HSG5D3PD_msg.error( "The HSG5 ZHLL unboosted D3PD stream can't be virtual! " +
-                              "It's a configuration error!" )
-    raise NameError( "HSG5 ZHLL unboosted D3PD set to be a virtual stream" )
-    pass
-
-# Create the D3PD streams:
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-
-# Construct the stream and file names for the HSG5 D3PD:
-streamName = prodFlags.WriteHSG5ZHLLUD3PD.StreamName
-fileName   = buildFileName( prodFlags.WriteHSG5ZHLLUD3PD )
-
-HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \
-                   ( streamName, fileName ) )
-
-HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" )
-
-# create stream
-#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD
-#SMWZD3PD( HSG5D3PD_Stream )
-
-if 'IS_SIMULATION' in inputFileSummary['evt_type']:
-    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-    D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True)
-
-# set flags
-from HSG5DPDUtils.HSG5Flags import HSG5ZHLLUFlags
-HSG5ZHLLUFlags.doTaus = True
-
-from HSG5DPDUtils.HSG5D3PD import HSG5D3PD
-HSG5D3PD( HSG5D3PD_Stream, flags=HSG5ZHLLUFlags )
-
-include("HSG5DPDUtils/FatJetsConfig.py")
-
-from HSG5DPDUtils.JSD3PD import JSD3PD
-for xx in myJetKeys:
-   if xx[0] != None and xx[1] != None:
-       JSD3PD(xx, HSG5D3PD_Stream )
-
-# add filters
-HSG5D3PD_Stream.AcceptAlgs=[]
-HSG5D3PD_Stream.RequireAlgs=[]
-
-include ("HSG5DPDUtils/ZHllbb_unboostedFilter.py")
-
-from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig
-HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)]
-
-ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment.py
deleted file mode 100644
index 5d35c7ac409..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#
-# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs.
-
-# This jobO should not be included more than once:
-include.block( "HSG5DPDUtils/HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment.py" )
-
-# Common import(s):
-from AthenaCommon.JobProperties import jobproperties
-prodFlags = jobproperties.D3PDProdFlags
-from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
-
-# Set up a logger:
-from AthenaCommon.Logging import logging
-HSG5D3PD_msg = logging.getLogger( 'HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment' )
-
-# Check if the configuration makes sense:
-if prodFlags.WriteHSG5ZHMETD3PD.isVirtual:
-    HSG5D3PD_msg.error( "The HSG5 ZHMET D3PD stream can't be virtual! " +
-                              "It's a configuration error!" )
-    raise NameError( "HSG5 ZHMET D3PD set to be a virtual stream" )
-    pass
-
-# Create the D3PD streams:
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-
-# Construct the stream and file names for the HSG5 D3PD:
-streamName = prodFlags.WriteHSG5ZHMETD3PD.StreamName
-fileName   = buildFileName( prodFlags.WriteHSG5ZHMETD3PD )
-
-HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \
-                   ( streamName, fileName ) )
-
-HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" )
-
-# create stream
-#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD
-#SMWZD3PD( HSG5D3PD_Stream )
-
-if 'IS_SIMULATION' in inputFileSummary['evt_type']:
-    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-    D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True)
-
-# set flags
-from HSG5DPDUtils.HSG5Flags import HSG5ZHMETFlags
-#HSG5ZHMETFlags.doAllMissingET = True
-HSG5ZHMETFlags.doTaus = True
-
-from HSG5DPDUtils.HSG5D3PD import HSG5D3PD
-HSG5D3PD( HSG5D3PD_Stream,flags=HSG5ZHMETFlags  )
-
-include("HSG5DPDUtils/FatJetsConfig.py")
-
-from HSG5DPDUtils.JSD3PD import JSD3PD
-for xx in myJetKeys:
-   if xx[0] != None and xx[1] != None:
-       JSD3PD(xx, HSG5D3PD_Stream )
-
-# add filters
-HSG5D3PD_Stream.AcceptAlgs=[]
-HSG5D3PD_Stream.RequireAlgs=[]
-
-include ("HSG5DPDUtils/ZHnunubb_boostedFilter.py")
-
-from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig
-HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)]
-
-ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment.py
deleted file mode 100644
index 225ce7e5dd1..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#
-# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs.
-
-# This jobO should not be included more than once:
-include.block( "HSG5DPDUtils/HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment.py" )
-
-# Common import(s):
-from AthenaCommon.JobProperties import jobproperties
-prodFlags = jobproperties.D3PDProdFlags
-from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
-
-# Set up a logger:
-from AthenaCommon.Logging import logging
-HSG5D3PD_msg = logging.getLogger( 'HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment' )
-
-# Check if the configuration makes sense:
-if prodFlags.WriteHSG5ZHMETUD3PD.isVirtual:
-    HSG5D3PD_msg.error( "The HSG5 ZHMET unboosted D3PD stream can't be virtual! " +
-                              "It's a configuration error!" )
-    raise NameError( "HSG5 ZHMET unboosted D3PD set to be a virtual stream" )
-    pass
-
-# Create the D3PD streams:
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-
-# Construct the stream and file names for the HSG5 D3PD:
-streamName = prodFlags.WriteHSG5ZHMETUD3PD.StreamName
-fileName   = buildFileName( prodFlags.WriteHSG5ZHMETUD3PD )
-
-HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \
-                   ( streamName, fileName ) )
-
-HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" )
-
-# create stream
-#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD
-#SMWZD3PD( HSG5D3PD_Stream )
-
-if 'IS_SIMULATION' in inputFileSummary['evt_type']:
-    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-    D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True)
-
-# set flags
-from HSG5DPDUtils.HSG5Flags import HSG5ZHMETUFlags
-#HSG5ZHMETUFlags.doAllMissingET = True
-HSG5ZHMETUFlags.doTaus = True
-
-from HSG5DPDUtils.HSG5D3PD import HSG5D3PD
-HSG5D3PD( HSG5D3PD_Stream,flags=HSG5ZHMETUFlags )
-
-include("HSG5DPDUtils/FatJetsConfig.py")
-
-from HSG5DPDUtils.JSD3PD import JSD3PD
-for xx in myJetKeys:
-   if xx[0] != None and xx[1] != None:
-       JSD3PD(xx, HSG5D3PD_Stream )
-
-# add filters
-HSG5D3PD_Stream.AcceptAlgs=[]
-HSG5D3PD_Stream.RequireAlgs=[]
-
-include ("HSG5DPDUtils/ZHnunubb_unboostedFilter.py")
-
-from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig
-HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)]
-
-ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_Zbb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_Zbb_boosted_D3PD_prodJobOFragment.py
deleted file mode 100644
index 56a5155b191..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_Zbb_boosted_D3PD_prodJobOFragment.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs.
-
-# This jobO should not be included more than once:
-include.block( "HSG5DPDUtils/HSG5_Zbb_boosted_D3PD_prodJobOFragment.py" )
-
-# Common import(s):
-from AthenaCommon.JobProperties import jobproperties
-prodFlags = jobproperties.D3PDProdFlags
-from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
-
-# Set up a logger:
-from AthenaCommon.Logging import logging
-HSG5D3PD_msg = logging.getLogger( 'HSG5_Zbb_boosted_D3PD_prodJobOFragment' )
-
-# Check if the configuration makes sense:
-if prodFlags.WriteHSG5ZBBD3PD.isVirtual:
-    HSG5D3PD_msg.error( "The HSG5 ZBB D3PD stream can't be virtual! " +
-                              "It's a configuration error!" )
-    raise NameError( "HSG5 ZBB D3PD set to be a virtual stream" )
-    pass
-
-# Create the D3PD streams:
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-
-# Construct the stream and file names for the HSG5 D3PD:
-streamName = prodFlags.WriteHSG5ZBBD3PD.StreamName
-fileName   = buildFileName( prodFlags.WriteHSG5ZBBD3PD )
-
-HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \
-                   ( streamName, fileName ) )
-
-HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" )
-
-# create stream
-#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD
-#SMWZD3PD( HSG5D3PD_Stream )
-
-if 'IS_SIMULATION' in inputFileSummary['evt_type']:
-    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-    D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True)
-
-# set flags
-from HSG5DPDUtils.HSG5Flags import HSG5ZBBFlags
-
-from HSG5DPDUtils.HSG5D3PD import HSG5D3PD
-HSG5D3PD( HSG5D3PD_Stream,flags=HSG5ZBBFlags )
-
-include("HSG5DPDUtils/FatJetsConfig.py")
-
-from HSG5DPDUtils.JSD3PD import JSD3PD
-for xx in myJetKeys:
-   if xx[0] != None and xx[1] != None:
-       JSD3PD(xx, HSG5D3PD_Stream )
-
-# add filters
-HSG5D3PD_Stream.AcceptAlgs=[]
-HSG5D3PD_Stream.RequireAlgs=[]
-
-include ("HSG5DPDUtils/Zbb_boostedFilter.py")
-
-from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig
-HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)]
-
-ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaHbb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaHbb_boosted_D3PD_prodJobOFragment.py
deleted file mode 100644
index 202430c6c1d..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaHbb_boosted_D3PD_prodJobOFragment.py
+++ /dev/null
@@ -1,3 +0,0 @@
-include.block("HSG5DPDUtils/HSG5_gammaHbb_boosted_D3PD_prodJobOFragment.py")
-print "OBSOLETE WARNING please use HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py"
-include("HSG5DPDUtils/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py")
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py
deleted file mode 100644
index 0f009185da7..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs.
-
-# This jobO should not be included more than once:
-include.block( "HSG5DPDUtils/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py" )
-
-# Common import(s):
-from AthenaCommon.JobProperties import jobproperties
-prodFlags = jobproperties.D3PDProdFlags
-from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
-
-
-# Set up a logger:
-from AthenaCommon.Logging import logging
-HSG5D3PD_msg = logging.getLogger( 'HSG5_gammaZbb_boosted_D3PD_prodJobOFragment' )
-
-# Check if the configuration makes sense:
-if prodFlags.WriteHSG5GAMZD3PD.isVirtual:
-    HSG5D3PD_msg.error( "The HSG5 GAMZ D3PD stream can't be virtual! " +
-                              "It's a configuration error!" )
-    raise NameError( "HSG5 GAMZ D3PD set to be a virtual stream" )
-    pass
-
-# Create the D3PD streams:
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-
-# Construct the stream and file names for the HSG5 D3PD:
-streamName = prodFlags.WriteHSG5GAMZD3PD.StreamName
-fileName   = buildFileName( prodFlags.WriteHSG5GAMZD3PD )
-
-HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \
-                   ( streamName, fileName ) )
-
-HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" )
-
-# create stream
-#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD
-#SMWZD3PD( HSG5D3PD_Stream )
-if 'IS_SIMULATION' in inputFileSummary['evt_type']:
-    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-    D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True)
-
-# set flags
-from HSG5DPDUtils.HSG5Flags import HSG5GAMZFlags
-HSG5GAMZFlags.doPhotons = True
-
-from HSG5DPDUtils.HSG5D3PD import HSG5D3PD
-HSG5D3PD( HSG5D3PD_Stream,flags=HSG5GAMZFlags )
-
-include("HSG5DPDUtils/FatJetsConfig.py")
-
-from HSG5DPDUtils.JSD3PD import JSD3PD
-for xx in myJetKeys:
-   if xx[0] != None and xx[1] != None:
-       JSD3PD(xx, HSG5D3PD_Stream )
-
-# add filters
-HSG5D3PD_Stream.AcceptAlgs=[]
-HSG5D3PD_Stream.RequireAlgs=[]
-
-include ("HSG5DPDUtils/gammaZbb_boostedFilter.py")
-
-from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig
-HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)]
-
-ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_boostedFilter.py
deleted file mode 100644
index c8337a47ca7..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_boostedFilter.py
+++ /dev/null
@@ -1,75 +0,0 @@
-
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-
-from ROOT import egammaPID
-
-sequencer = AthSequencer("HSG5WH_Sequencer",
-                         StopOverride=False)
-
-from D2PDMaker.D2PDMakerConf import D2PDJetSelector
-sequencer += D2PDJetSelector( "HSG5WH_BoostedJetFilter",
-                              inputCollection      = 'CamKt12LCTopoJets',
-                              outputLinkCollection = 'HSG5WH_LooseBoostedJetLinkCollection',
-                              minNumberPassed      = 1,
-                              ptMin                = 150.0*Units.GeV)
-HSG5D3PD_Stream.RequireAlgs.append("HSG5WH_BoostedJetFilter")
-
-from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonFilter
-leptonFilter=HSG5__LeptonFilter("HSG5WH_SingleLeptonFilter",
-                                ElectronFilterNameAndType="D2PDElectronSelector/HSG5WH_ElectronSelector",
-                                MuonFilterNameAndTypeVec=["D2PDMuonSelector/HSG5WH_MuidMuonSelector",
-                                                          "D2PDMuonSelector/HSG5WH_StacoMuonSelector",
-                                                          "D2PDMuonSelector/HSG5WH_ThirdChainMuonSelector"])
-
-# create electron and muon selectors
-from D2PDMaker.D2PDMakerConf import D2PDElectronSelector
-leptonFilter += D2PDElectronSelector( "HSG5WH_ElectronSelector",
-                                      inputCollection      = 'ElectronAODCollection',
-                                      outputLinkCollection = 'HSG5WH_LooseElectronLinkCollection',
-                                      minNumberPassed      = 1,
-                                      etMin                = 15.0*Units.GeV,
-                                      clusterEtaMin        = -2.5,
-                                      clusterEtaMax        = 2.5
-                                      #clusterEtaVetoRanges = "[-1.52, -1.37], [1.37, 1.52]"
-                                      )
-
-from HSG5DPDUtils.HSG5Selectors import MuonSelector
-muSelector = MuonSelector( minNumberPassed = 1,
-                           ptMin = 18.0,
-                           absEtaMax = 2.5,
-                           requireIsLoose = True )
-
-leptonFilter += muSelector.getMuonSelector('HSG5WH_MuidMuonSelector','MuidMuonCollection',
-                                           'HSG5WH_LooseMuidMuonLinkCollection')
-leptonFilter += muSelector.getMuonSelector('HSG5WH_StacoMuonSelector','StacoMuonCollection',
-                                           'HSG5WH_LooseStacoMuonLinkCollection')
-leptonFilter += muSelector.getMuonSelector('HSG5WH_ThirdChainMuonSelector','Muons',
-                                           'HSG5WH_LooseThirdChainMuonLinkCollection')
-
-sequencer += leptonFilter
-
-HSG5D3PD_Stream.RequireAlgs.append("HSG5WH_SingleLeptonFilter")
-
-# MET selector
-from D2PDMaker.D2PDMakerConf import D2PDMissingEtSelector
-sequencer += D2PDMissingEtSelector( "HSG5WH_MissingEtFilter",
-                                    inputCollection  = 'MET_RefFinal',
-                                    outputCollection = 'HSG5WH_NeutrinoRefFinal',
-                                    minNumberPassed  = 1,
-                                    missingEtMin     = 15.0*Units.GeV)
-HSG5D3PD_Stream.RequireAlgs.append("HSG5WH_MissingEtFilter")
-
-
-if False:
-    # (for private production ony) insert in beginning of PreD3PDSequencer
-    mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(),
-                                StopOverride = False)
-
-    if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ):
-        topSequence += mainSequencer
-
-    mainSequencer.insert(0,sequencer)
-
-else:
-    topSequence+=sequencer
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilter.py
deleted file mode 100644
index 69dbacd6732..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilter.py
+++ /dev/null
@@ -1,86 +0,0 @@
-'''
-Created on 28 Feb 2012
-
-@author: wvazquez
-'''
-
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-
-from ROOT import egammaPID
-
-sequencer = AthSequencer("HSG5WHU_Sequencer",
-                         StopOverride=False)
-
-from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonFilter
-leptonFilter=HSG5__LeptonFilter("HSG5WHU_SingleLeptonFilter",
-                                ElectronFilterNameAndType="D2PDElectronSelector/HSG5WHU_ElectronSelector",
-                                MuonFilterNameAndTypeVec=["D2PDMuonSelector/HSG5WHU_MuidMuonSelector",
-                                                          "D2PDMuonSelector/HSG5WHU_StacoMuonSelector",
-                                                          "D2PDMuonSelector/HSG5WHU_ThirdChainMuonSelector" ])
-
-
-# create electron and muon selectors
-from D2PDMaker.D2PDMakerConf import D2PDElectronSelector
-leptonFilter += D2PDElectronSelector( "HSG5WHU_ElectronSelector",
-                                      inputCollection      = 'ElectronAODCollection',
-                                      outputLinkCollection = 'HSG5WHU_LooseElectronLinkCollection',
-                                      minNumberPassed      = 1,
-                                      ptMin                = 20.0*Units.GeV,
-                                      clusterEtaMin        = -2.5,
-                                      clusterEtaMax        = 2.5,
-                                      electronIsEM         = egammaPID.ElectronTight )
-
-from HSG5DPDUtils.HSG5Selectors import MuonSelector
-muSelector = MuonSelector( minNumberPassed = 1,
-                           ptMin = 18.0,
-                           absEtaMax = 2.5,
-                           acceptIsCombined = True,
-                           acceptIsSegmentTagged = True,
-                           doRelPtCone20  = True,
-                           relPtCone20Max = 0.15 )
-
-leptonFilter += muSelector.getMuonSelector('HSG5WHU_MuidMuonSelector','MuidMuonCollection',
-                                           'HSG5WHU_LooseMuidMuonLinkCollection')
-leptonFilter += muSelector.getMuonSelector('HSG5WHU_StacoMuonSelector','StacoMuonCollection',
-                                           'HSG5WHU_LooseStacoMuonLinkCollection')
-leptonFilter += muSelector.getMuonSelector('HSG5WHU_ThirdChainMuonSelector','Muons',
-                                           'HSG5WHU_LooseThirdChainMuonLinkCollection')
-
-sequencer += leptonFilter
-
-HSG5D3PD_Stream.RequireAlgs.append("HSG5WHU_SingleLeptonFilter")
-
-# jet selector
-from AssociationComps.AssociationCompsConf import DeltaRAssociationTool
-ToolSvc += DeltaRAssociationTool( "HSG5WHU_emDeltaRAssociationTool",
-                                  OutputLevel = INFO,
-                                  inputAssociateToCollection = 'HSG5WHU_LooseElectronLinkCollection',
-                                  deltaRMax = 0.3,
-                                  writeUserData = False)
-
-from D2PDMaker.D2PDMakerConf import D2PDJetSelector
-sequencer += D2PDJetSelector( "HSG5WHU_JetFilter",
-                              inputCollection      = 'AntiKt4TopoEMJets',
-                              outputLinkCollection = 'HSG5WHU_JetLinkCollection',
-                              associationToolList = [ ToolSvc.HSG5WHU_emDeltaRAssociationTool ],
-                              outputAssociationContainerList = [ "HSG5WHU_jetsMatchedToElectrons" ],
-                              numberOfAssociationsMaxCutList = [ 0 ],
-                              minNumberPassed      = 1,
-                              ptMin                = 20.0*Units.GeV,
-                              etaMax               = 2.5)
-
-HSG5D3PD_Stream.RequireAlgs.append("HSG5WHU_JetFilter")
-
-if False:
-    # (for private production ony) insert in beginning of PreD3PDSequencer
-    mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(),
-                                StopOverride = False)
-
-    if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ):
-        topSequence += mainSequencer
-
-    mainSequencer.insert(0,sequencer)
-
-else:
-    topSequence+=sequencer
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilterQCDbkg.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilterQCDbkg.py
deleted file mode 100644
index b9a744a74b8..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilterQCDbkg.py
+++ /dev/null
@@ -1,86 +0,0 @@
-'''
-Created on 28 Feb 2012
-
-@author: wvazquez
-'''
-
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-from ROOT import egammaPID
-
-sequencer = AthSequencer("HSG5WHQ_Sequencer",
-                         StopOverride=False)
-
-
-
-from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonFilter
-leptonFilter=HSG5__LeptonFilter("HSG5WHQ_SingleLeptonFilter",
-                                ElectronFilterNameAndType="D2PDElectronSelector/HSG5WHQ_ElectronSelector",
-                                MuonFilterNameAndTypeVec=["D2PDMuonSelector/HSG5WHQ_MuidMuonSelector",
-                                                          "D2PDMuonSelector/HSG5WHQ_StacoMuonSelector",
-                                                          "D2PDMuonSelector/HSG5WHQ_ThirdChainMuonSelector"])
-
-# create electron and muon selectors
-from D2PDMaker.D2PDMakerConf import D2PDElectronSelector
-leptonFilter += D2PDElectronSelector( "HSG5WHQ_ElectronSelector",
-                                      inputCollection      = 'ElectronAODCollection',
-                                      outputLinkCollection = 'HSG5WHQ_LooseElectronLinkCollection',
-                                      minNumberPassed      = 1,
-                                      ptMin                = 20.0*Units.GeV,
-                                      clusterEtaMin        = -2.5,
-                                      clusterEtaMax        = 2.5,
-                                      electronIsEM         = egammaPID.ElectronMedium )
-
-from HSG5DPDUtils.HSG5Selectors import MuonSelector
-muSelector = MuonSelector( minNumberPassed = 1,
-                           ptMin = 18.0,
-                           absEtaMax = 2.5,
-                           acceptIsCombined = True,
-                           acceptIsSegmentTagged = True,
-                           doRelPtCone20  = True,
-                           relPtCone20Max = 0.5 )
-
-leptonFilter += muSelector.getMuonSelector('HSG5WHQ_MuidMuonSelector','MuidMuonCollection',
-                                           'HSG5WHQ_LooseMuidMuonLinkCollection')
-leptonFilter += muSelector.getMuonSelector('HSG5WHQ_StacoMuonSelector','StacoMuonCollection',
-                                           'HSG5WHQ_LooseStacoMuonLinkCollection')
-leptonFilter += muSelector.getMuonSelector('HSG5WHQ_ThirdChainMuonSelector','Muons',
-                                           'HSG5WHQ_LooseThirdChainMuonLinkCollection')
-
-sequencer += leptonFilter
-
-HSG5D3PD_Stream.RequireAlgs.append("HSG5WHQ_SingleLeptonFilter")
-
-# jet selector
-from AssociationComps.AssociationCompsConf import DeltaRAssociationTool
-ToolSvc += DeltaRAssociationTool( "HSG5WHQ_emDeltaRAssociationTool",
-                                  OutputLevel = INFO,
-                                  inputAssociateToCollection = 'HSG5WHQ_LooseElectronLinkCollection',
-                                  deltaRMax = 0.3,
-                                  writeUserData = False)
-
-from D2PDMaker.D2PDMakerConf import D2PDJetSelector
-sequencer += D2PDJetSelector( "HSG5WHQ_JetFilter",
-                              inputCollection      = 'AntiKt4TopoEMJets',
-                              outputLinkCollection = 'HSG5WHQ_JetLinkCollection',
-                              associationToolList = [ ToolSvc.HSG5WHQ_emDeltaRAssociationTool ],
-                              outputAssociationContainerList = [ "HSG5WHQ_jetsMatchedToElectrons" ],
-                              numberOfAssociationsMaxCutList = [ 0 ],
-                              minNumberPassed      = 1,
-                              ptMin                = 20.0*Units.GeV,
-                              etaMax               = 2.5)
-
-HSG5D3PD_Stream.RequireAlgs.append("HSG5WHQ_JetFilter")
-
-if False:
-    # (for private production ony) insert in beginning of PreD3PDSequencer
-    mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(),
-                                StopOverride = False)
-
-    if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ):
-        topSequence += mainSequencer
-
-    mainSequencer.insert(0,sequencer)
-
-else:
-    topSequence+=sequencer
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_boostedFilter.py
deleted file mode 100644
index 31c83a84fae..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_boostedFilter.py
+++ /dev/null
@@ -1,72 +0,0 @@
-
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-from ROOT import egammaPID
-
-sequencer = AthSequencer("HSG5ZHLL_Sequencer",
-                         StopOverride=False)
-
-from D2PDMaker.D2PDMakerConf import D2PDJetSelector
-sequencer += D2PDJetSelector( "HSG5ZHLL_BoostedJetFilter",
-                              inputCollection      = 'CamKt12LCTopoJets',
-                              outputLinkCollection = 'HSG5ZHLL_LooseBoostedJetLinkCollection',
-                              minNumberPassed      = 1,
-                              ptMin                = 150.0*Units.GeV)
-HSG5D3PD_Stream.RequireAlgs.append("HSG5ZHLL_BoostedJetFilter")
-
-from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonFilter
-leptonFilter=HSG5__LeptonFilter("HSG5ZHLL_DileptonFilter",
-                               ElectronFilterNameAndType="D2PDElectronSelector/HSG5ZHLL_ElectronSelector",
-                               MuonFilterNameAndTypeVec=["D2PDMuonSelector/HSG5ZHLL_MuidMuonSelector",
-                                                         "D2PDMuonSelector/HSG5ZHLL_StacoMuonSelector"])
-
-# create electron and muon selectors
-from D2PDMaker.D2PDMakerConf import D2PDElectronSelector
-leptonFilter += D2PDElectronSelector( "HSG5ZHLL_ElectronSelector",
-                                      inputCollection      = 'ElectronAODCollection',
-                                      outputLinkCollection = 'HSG5ZHLL_LooseElectronLinkCollection',
-                                      minNumberPassed      = 2,
-                                      etMin                = 15.0*Units.GeV,
-                                      clusterEtaMin        = -2.5,
-                                      clusterEtaMax        = 2.5,
-                                      #clusterEtaVetoRanges = "[-1.52, -1.37], [1.37, 1.52]"
-                                      )
-
-from HSG5DPDUtils.HSG5Selectors import MuonSelector
-muSelector = MuonSelector( minNumberPassed = 2,
-                           ptMin = 15.0,
-                           absEtaMax = 2.6,
-                           requireIsTight = True)
-
-leptonFilter += muSelector.getMuonSelector('HSG5ZHLL_MuidMuonSelector', 'MuidMuonCollection',
-                                           'HSG5ZHLL_LooseMuidMuonLinkCollection')
-leptonFilter += muSelector.getMuonSelector('HSG5ZHLL_StacoMuonSelector', 'StacoMuonCollection',
-                                           'HSG5ZHLL_LooseStacoMuonLinkCollection')
-leptonFilter += muSelector.getMuonSelector('HSG5ZHLL_ThirdChainMuonSelector', 'Muons',
-                                           'HSG5ZHLL_LooseThirdChainMuonLinkCollection')
-
-sequencer += leptonFilter
-
-HSG5D3PD_Stream.AcceptAlgs.append("HSG5ZHLL_DileptonFilter")
-
-
-from D2PDMaker.D2PDMakerConf import D2PDMissingEtSelector
-sequencer += D2PDMissingEtSelector( "HSG5ZHLL_MissingEtFilter",
-                                    inputCollection      = 'MET_RefFinal',
-                                    outputCollection = 'HSG5ZHLL_NeutrinoRefFinal',
-                                    minNumberPassed      = 1,
-                                    missingEtMax         = 50.0*Units.GeV)
-HSG5D3PD_Stream.RequireAlgs.append("HSG5ZHLL_MissingEtFilter")
-
-if False:
-    # (for private production only) insert in beginning of PreD3PDSequencer
-    mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(),
-                                StopOverride = False)
-
-    if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ):
-        topSequence += mainSequencer
-
-    mainSequencer.insert(0,sequencer)
-
-else:
-    topSequence+=sequencer
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_unboostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_unboostedFilter.py
deleted file mode 100644
index d9e7e13f239..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_unboostedFilter.py
+++ /dev/null
@@ -1,56 +0,0 @@
-
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-from ROOT import egammaPID
-
-sequencer = AthSequencer("HSG5ZHLLunb_Sequencer",
-                         StopOverride=False)
-
-from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonFilter
-leptonFilter=HSG5__LeptonFilter("HSG5ZHLLunb_DileptonFilter",
-                               ElectronFilterNameAndType="D2PDElectronSelector/HSG5ZHLLunb_ElectronSelector",
-                               MuonFilterNameAndTypeVec=["D2PDMuonSelector/HSG5ZHLLunb_MuidMuonSelector",
-                                                         "D2PDMuonSelector/HSG5ZHLLunb_StacoMuonSelector"])
-
-
-# create electron and muon selectors
-from D2PDMaker.D2PDMakerConf import D2PDElectronSelector
-leptonFilter += D2PDElectronSelector( "HSG5ZHLLunb_ElectronSelector",
-                                      inputCollection      = 'ElectronAODCollection',
-                                      outputLinkCollection = 'HSG5ZHLLunb_LooseElectronLinkCollection',
-                                      minNumberPassed      = 2,
-                                      clusterEtMin         = 15.0*Units.GeV,
-                                      clusterEtaMin        = -2.6,
-                                      clusterEtaMax        = 2.6,
-                                      electronIsEM         = egammaPID.ElectronLoose
-                                      )
-
-from HSG5DPDUtils.HSG5Selectors import MuonSelector
-muSelector = MuonSelector( minNumberPassed = 2,
-                           ptMin = 15.0,
-                           absEtaMax = 2.6,
-                           requireIsTight = True)
-
-leptonFilter += muSelector.getMuonSelector('HSG5ZHLLunb_MuidMuonSelector', 'MuidMuonCollection',
-                                           'HSG5ZHLLunb_LooseMuidMuonLinkCollection')
-leptonFilter += muSelector.getMuonSelector('HSG5ZHLLunb_StacoMuonSelector', 'StacoMuonCollection',
-                                           'HSG5ZHLLunb_LooseStacoMuonLinkCollection')
-leptonFilter += muSelector.getMuonSelector('HSG5ZHLLunb_ThirdChainMuonSelector', 'Muons',
-                                           'HSG5ZHLLunb_LooseThirdChainMuonLinkCollection')
-
-sequencer += leptonFilter
-
-HSG5D3PD_Stream.AcceptAlgs.append("HSG5ZHLLunb_DileptonFilter")
-
-if False:
-    # (for private production only) insert in beginning of PreD3PDSequencer
-    mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(),
-                                StopOverride = False)
-
-    if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ):
-        topSequence += mainSequencer
-
-    mainSequencer.insert(0,sequencer)
-
-else:
-    topSequence+=sequencer
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_boostedFilter.py
deleted file mode 100644
index 2feb8ab76d1..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_boostedFilter.py
+++ /dev/null
@@ -1,40 +0,0 @@
-
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-
-sequencer = AthSequencer("HSG5ZHMET_Sequencer",
-                         StopOverride=False)
-
-# boosted jet selector
-from D2PDMaker.D2PDMakerConf import D2PDJetSelector
-sequencer += D2PDJetSelector( "HSG5ZHMET_BoostedJetFilter",
-                              inputCollection      = 'CamKt12LCTopoJets',
-                              outputLinkCollection = 'HSG5ZHMET_boosted_LooseBoostedJetLinkCollection',
-                              minNumberPassed      = 1,
-                              ptMin                = 20.0*Units.GeV)
-HSG5D3PD_Stream.RequireAlgs.append("HSG5ZHMET_BoostedJetFilter")
-
-
-# MET selector
-from D2PDMaker.D2PDMakerConf import D2PDMissingEtSelector
-sequencer += D2PDMissingEtSelector( "HSG5ZHMET_MissingEtFilter",
-                                    inputCollection      = 'MET_RefFinal',
-                                    outputCollection = 'HSG5ZHMET_NeutrinoRefFinal',
-                                    minNumberPassed      = 1,
-                                    missingEtMin         = 40.0*Units.GeV)
-                                    #missingEtSignificanceMin = 5.0)
-HSG5D3PD_Stream.RequireAlgs.append("HSG5ZHMET_MissingEtFilter")
-
-
-if False:
-    # (for private production only) insert in beginning of PreD3PDSequencer
-    mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(),
-                                StopOverride = False)
-
-    if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ):
-        topSequence += mainSequencer
-
-    mainSequencer.insert(0,sequencer)
-
-else:
-    topSequence+=sequencer
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_unboostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_unboostedFilter.py
deleted file mode 100644
index fe364512ae4..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_unboostedFilter.py
+++ /dev/null
@@ -1,31 +0,0 @@
-
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-
-# create electron and muon selectors
-sequencer = AthSequencer("HSG5ZHMETU_Sequencer",
-                         StopOverride=False)
-
-# MET selector
-from D2PDMaker.D2PDMakerConf import D2PDMissingEtSelector
-sequencer += D2PDMissingEtSelector( "HSG5ZHMETU_MissingEtFilter",
-                                    inputCollection      = 'MET_RefFinal',
-                                    outputCollection = 'HSG5ZHMETU_NeutrinoRefFinal',
-                                    minNumberPassed      = 1,
-                                    missingEtMin         = 40.0*Units.GeV)
-                                    #missingEtSignificanceMin = 5.0)
-HSG5D3PD_Stream.RequireAlgs.append("HSG5ZHMETU_MissingEtFilter")
-
-
-if False:
-    # (for private production only) insert in beginning of PreD3PDSequencer
-    mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(),
-                                StopOverride = False)
-
-    if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ):
-        topSequence += mainSequencer
-
-    mainSequencer.insert(0,sequencer)
-
-else:
-    topSequence+=sequencer
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/Zbb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/Zbb_boostedFilter.py
deleted file mode 100644
index 5f68fef1e36..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/Zbb_boostedFilter.py
+++ /dev/null
@@ -1,37 +0,0 @@
-
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-
-# create electron and muon selectors
-sequencer = AthSequencer("HSG5ZBB_Sequencer", StopOverride=False)
-
-from D2PDMaker.D2PDMakerConf import D2PDJetSelector
-boostedJetCollectionName = 'HSG5ZBB_boosted_LooseBoostedJetLinkCollection'
-sequencer += D2PDJetSelector( "HSG5ZBB_BoostedJetFilter",
-                              inputCollection      = 'CamKt12LCTopoJets',
-                              outputLinkCollection = boostedJetCollectionName,
-                              minNumberPassed      = 1,
-                              ptMin                = 150.0*Units.GeV)
-HSG5D3PD_Stream.RequireAlgs.append("HSG5ZBB_BoostedJetFilter")
-
-from AssociationComps.AssociationCompsConf import DeltaRAssociationTool
-ToolSvc += DeltaRAssociationTool( "HSG5ZBB_subjetBoostedJetDeltaRAssociationTool",
-                                  OutputLevel = INFO,
-                                  inputAssociateToCollection = boostedJetCollectionName,
-                                  deltaRMax = 1.3,
-                                  writeUserData = False)
-
-if not 'IS_SIMULATION' in inputFileSummary['evt_type']:
-    sequencer += D2PDJetSelector( "HSG5ZBB_btaggedSubjetFilter",
-                                  OutputLevel = DEBUG,
-                                  inputCollection      = 'CamKt12LCTopoSplitFiltSubjetsminSplitR0Jets',
-                                  outputLinkCollection = 'HSG5ZBB_btaggedSubjetLinkCollection',
-                                  associationToolList = [ ToolSvc.HSG5ZBB_subjetBoostedJetDeltaRAssociationTool ],
-                                  outputAssociationContainerList = [ "HSG5ZBB_subjetsMatchedToBoostedJets" ],
-                                  numberOfAssociationsMinCutList = [ 2 ],
-                                  jetFlavourTagName    = 'JetFitterCOMBNN',
-                                  jetFlavourTagWeightMin = -1.25,
-                                  minNumberPassed      = 2)
-    HSG5D3PD_Stream.RequireAlgs.append("HSG5ZBB_btaggedSubjetFilter")
-
-topSequence+=sequencer
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaHbb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaHbb_boostedFilter.py
deleted file mode 100644
index 30838719c34..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaHbb_boostedFilter.py
+++ /dev/null
@@ -1,3 +0,0 @@
-include.block("HSG5DPDUtils/gammaHbb_boostedFilter.py")
-print "OBSOLETE WARNING please use gammaZbb_boostedFilter.py"
-include ("HSG5DPDUtils/gammaZbb_boostedFilter.py")
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaZbb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaZbb_boostedFilter.py
deleted file mode 100644
index cc09f61141d..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaZbb_boostedFilter.py
+++ /dev/null
@@ -1,89 +0,0 @@
-
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-
-outputLevel=INFO
-
-# create electron and muon selectors
-sequencer = AthSequencer("HSG5GAMZ_Sequencer", StopOverride=False)
-
-if not 'IS_SIMULATION' in inputFileSummary['evt_type']:
-    print "applying trigger selection"
-    from PrimaryDPDMaker.TriggerFilter import TriggerFilter
-    sequencer += TriggerFilter( "HSG5GAMZ_triggerFilter",
-                                OutputLevel = outputLevel,
-                                trigger = "EF_g([2-9][0-9][0-9]|1[2-9][0-9]+).*") # 120 or higher
-
-    HSG5D3PD_Stream.RequireAlgs.append("HSG5GAMZ_triggerFilter")
-else:
-    print "no trigger selection"
-
-zbb_or_zllSequencer = AthSequencer("HSG5GAMZ_zbb_or_zllSequencer", StopOverride=True)
-    
-zbbSequencer = AthSequencer("HSG5GAMZ_zbbSequencer", StopOverride=False)
-
-boostedJetCollectionName='HSG5GAMZ_boosted_LooseBoostedJetLinkCollection'
-from D2PDMaker.D2PDMakerConf import D2PDJetSelector
-zbbSequencer += D2PDJetSelector( "HSG5GAMZ_BoostedJetFilter",
-                                 OutputLevel = outputLevel,
-                                 inputCollection      = 'CamKt12LCTopoJets',
-                                 outputLinkCollection = boostedJetCollectionName,
-                                 minNumberPassed      = 1,
-                                 ptMin                = 80.0*Units.GeV)
-
-from AssociationComps.AssociationCompsConf import DeltaRAssociationTool
-ToolSvc += DeltaRAssociationTool( "HSG5GAMZ_subjetBoostedJetDeltaRAssociationTool",
-                                  OutputLevel = outputLevel,
-                                  inputAssociateToCollection = boostedJetCollectionName,
-                                  deltaRMax = 1.3,
-                                  writeUserData = False)
-
-                                   
-zbbSequencer += D2PDJetSelector( "HSG5GAMZ_btaggedSubjetFilter",
-                                 OutputLevel = outputLevel,
-                                 inputCollection      = 'CamKt12LCTopoSplitFiltSubjetsminSplitR0Jets',
-                                 outputLinkCollection = 'HSG5GAMZ_btaggedSubjetLinkCollection',
-                                 associationToolList = [ ToolSvc.HSG5GAMZ_subjetBoostedJetDeltaRAssociationTool ],
-                                 outputAssociationContainerList = [ "HSG5GAMZ_subjetsMatchedToBoostedJets" ],
-                                 numberOfAssociationsMinCutList = [ 1 ],
-                                 jetFlavourTagName    = 'JetFitterCOMBNN',
-                                 jetFlavourTagWeightMin = -1.25,
-                                 minNumberPassed      = 1)
-zbb_or_zllSequencer+=zbbSequencer
-
-HSG5D3PD_Stream.AcceptAlgs.append("HSG5GAMZ_btaggedSubjetFilter")
-
-# add muon and jet algs, but don't add to RequireAlgs (they're used for LeptonJetsFilter)
-outputJetContainerName="HSG5GAMZ_jetLinkCollection"
-zbb_or_zllSequencer += D2PDJetSelector( "HSG5GAMZ_jetFilter",
-                                        OutputLevel = outputLevel,
-                                        inputCollection      = 'AntiKt4TopoEMJets',        
-                                        outputLinkCollection = outputJetContainerName,
-                                        ptMin                = 19.0*Units.GeV,
-                                        minNumberPassed      = 0)
-
-from D2PDMaker.D2PDMakerConf import D2PDMuonSelector
-outputMuonContainerName="HSG5GAMZ_muonLinkCollection"
-zbb_or_zllSequencer += D2PDMuonSelector( "HSG5GAMZ_muonFilter",
-                                         OutputLevel = outputLevel,
-                                         inputCollection      = 'StacoMuonCollection',
-                                         outputLinkCollection = outputMuonContainerName,
-                                         ptMin                = 19.0*Units.GeV,
-                                         muonRequireIsLoose   = True,
-                                         minNumberPassed      = 0)
-
-# now add LeptonJetsSelector
-from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonJetsFilter
-zbb_or_zllSequencer += HSG5__LeptonJetsFilter("HSG5GAMZ_leptonJetsFilter",
-                                              OutputLevel = outputLevel,
-                                              SelectedJetContainerName = outputJetContainerName,
-                                              SelectedMuonContainerName = outputMuonContainerName,
-                                              MinSumJetsAndMuon=3)
-
-sequencer+=zbb_or_zllSequencer
-HSG5D3PD_Stream.AcceptAlgs.append("HSG5GAMZ_leptonJetsFilter")
-
-topSequence+=sequencer
-
-print "printing topSequence"
-print topSequence
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonFilter.cxx b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonFilter.cxx
deleted file mode 100644
index 9df7fed9837..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonFilter.cxx
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "GaudiKernel/Algorithm.h"
-
-#include "HSG5DPDUtils/LeptonFilter.h"
-
-namespace HSG5 {
-
-//________________________________________________________________________
-LeptonFilter::LeptonFilter( const std::string& name,
-			    ISvcLocator* pSvcLocator ) 
-  : AthFilterAlgorithm(name,pSvcLocator),
-    m_electronFilter(0)
-{
-
-  declareProperty("ElectronFilterNameAndType", m_electronFilterNameAndType="D2PDElectronSelector/ElectronSelector");
-
-  //declareProperty("MuonFilterNameAndType", m_muonFilterNameAndType="D2PDMuonSelector/MuonSelector");
-
-  std::vector<std::string> defaultFilters;
-  defaultFilters.push_back("D2PDMuonSelector/MuonSelector");
-  declareProperty("MuonFilterNameAndTypeVec", m_muonFilterNameAndTypeVec=defaultFilters);
-
-}
-
-//________________________________________________________________________
-LeptonFilter::~LeptonFilter()
-{
-
-}
-
-//________________________________________________________________________
-StatusCode LeptonFilter::initialize()
-{
-  StatusCode sc = StatusCode::SUCCESS;
-
-  // get electron sub-algorithm type and instance names
-  std::string elType = findType(m_electronFilterNameAndType);
-  std::string elName = findName(m_electronFilterNameAndType);
-  ATH_MSG_INFO("Electron filter sub-algorithm type="<<elType
-	       <<" and instance name="<<elName);
-  sc = createSubAlgorithm(elType,elName,m_electronFilter);
-  if (sc.isFailure()) {
-    ATH_MSG_FATAL("Failed to create electron filter algorithm");
-    return sc;
-  }
-
-  // get muon sub-algorithms
-  int nfilters=m_muonFilterNameAndTypeVec.size();
-  m_muonFilter.resize(nfilters);
-
-  for (int ifilter=0;ifilter<nfilters;ifilter++) {
-    std::string muType = findType(m_muonFilterNameAndTypeVec[ifilter]);
-    std::string muName = findName(m_muonFilterNameAndTypeVec[ifilter]);
-    ATH_MSG_INFO("Muon filter sub-algorithm type="<<muType<<" and instance name="
-		 <<muName);
-    sc = createSubAlgorithm(muType,muName,m_muonFilter[ifilter]);
-    if (sc.isFailure()) {
-      ATH_MSG_FATAL("Failed to create muon filter algorithm");
-    }
-  }
-
-  return sc;
-}
-
-//________________________________________________________________________
-StatusCode LeptonFilter::finalize()
-{
-  return StatusCode::SUCCESS;
-}
-
-//________________________________________________________________________
-StatusCode LeptonFilter::execute()
-{
-  ATH_MSG_DEBUG("Start executing lepton filter");
-
-  StatusCode sc = StatusCode::SUCCESS;
-  
-  bool muonPassed=false;
-  for (int ifilter=0;ifilter<(int)m_muonFilter.size();ifilter++) {
-    sc = m_muonFilter[ifilter] -> execute();
-    if (sc.isFailure()) {
-      ATH_MSG_FATAL("Failure in muonFilter execute");
-      return sc;
-    }
-    if (m_muonFilter[ifilter]->filterPassed()) {
-      muonPassed=true;
-      break;
-    }
-  }
-
-  if (msgLvl(MSG::DEBUG)) {
-    if (muonPassed) ATH_MSG_DEBUG("passed muon selection");
-    else            ATH_MSG_DEBUG("failed muon selection");
-  }
-    
-  sc = m_electronFilter -> execute();
-  if (sc.isFailure()) {
-    ATH_MSG_FATAL("Failure in electronFilter execute");
-    return sc;
-  }
-
-  bool electronPassed = m_electronFilter->filterPassed();
-  if (msgLvl(MSG::DEBUG)) {
-    if (electronPassed) ATH_MSG_DEBUG("passed electron selection");
-    else                ATH_MSG_DEBUG("failed electron selection");
-  }
-
-  if (electronPassed || muonPassed) { 
-    ATH_MSG_DEBUG("passed lepton selection");
-    setFilterPassed(true);
-  }
-  else {
-    ATH_MSG_DEBUG("failed lepton selection");
-    setFilterPassed(false);
-  }
-  return StatusCode::SUCCESS;
-}
-
-//________________________________________________________________________
-std::string LeptonFilter::findType(std::string l_property)
-{
-  int slash_pos = l_property.find_first_of("/");
-  std::string type = l_property.substr( 0, slash_pos );
-  return type ;
-}
-
-//________________________________________________________________________
-std::string LeptonFilter::findName(std::string l_property){
-  int slash_pos = l_property.find_first_of("/");
-  std::string type = l_property.substr( 0, slash_pos );
-  std::string name = (slash_pos > 0) ? l_property.substr( slash_pos + 1) : type ;
-  return name ;
-}
-
-} // end namespace
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonJetsFilter.cxx b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonJetsFilter.cxx
deleted file mode 100644
index 96cdee9c709..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonJetsFilter.cxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "GaudiKernel/Algorithm.h"
-
-#include "HSG5DPDUtils/LeptonJetsFilter.h"
-
-#include "JetEvent/JetCollection.h"
-#include "muonEvent/MuonContainer.h"
-#include "NavFourMom/INav4MomLinkContainer.h"
-
-namespace HSG5 {
-
-//________________________________________________________________________
-LeptonJetsFilter::LeptonJetsFilter( const std::string& name,
-				    ISvcLocator* pSvcLocator ) 
-  : AthFilterAlgorithm(name,pSvcLocator)
-  , m_nProcessed(0)
-  , m_nEventPassTrigger(0)
-{
-  declareProperty("SelectedJetContainerName",  m_selectedJetContainerName="",  "Name of output jet container from JetSelector");
-  declareProperty("SelectedMuonContainerName", m_selectedMuonContainerName="", "Name of output muon container from MuonSelector");
-
-  declareProperty("MinSumJetsAndMuon", m_minSumJetsAndMuon=0,   "Minimum number of jets and muons combined");
-  declareProperty("MaxSumJetsAndMuon", m_maxSumJetsAndMuon=999, "Maximum number of jets and muons combined");
-
-}
-
-//________________________________________________________________________
-LeptonJetsFilter::~LeptonJetsFilter()
-{
-
-}
-
-//________________________________________________________________________
-StatusCode LeptonJetsFilter::initialize()
-{
-  StatusCode sc = StatusCode::SUCCESS;
-
-
-  return sc;
-}
-
-//________________________________________________________________________
-StatusCode LeptonJetsFilter::finalize()
-{
-  float effiPassTrigger = 100. * m_nEventPassTrigger / float(m_nProcessed);
-  float effiErrPassTrigger = 100. * std::sqrt(m_nEventPassTrigger) / float(m_nProcessed);
-
-  ATH_MSG_INFO("==> finalize "<<this->name()<<"...");
-  ATH_MSG_INFO("***************************************************************");
-  ATH_MSG_INFO("Cut-flow table of "<<this->name()<<" skimming algorithm");
-  ATH_MSG_INFO("-------------");
-  ATH_MSG_INFO(" Number of processed events: "<<m_nProcessed);
-  std::stringstream effstr;
-  effstr<<" Events passing selection:  "<<m_nEventPassTrigger<<" and resulting efficiency = ("
-	<<std::setw(3)<<effiPassTrigger<<" +/- "<<effiErrPassTrigger<<")";
-  ATH_MSG_INFO(effstr.str());
-
-  ATH_MSG_INFO("***************************************************************");
-   
-  return StatusCode::SUCCESS;
-}
-
-//________________________________________________________________________
-StatusCode LeptonJetsFilter::execute()
-{
-  ATH_MSG_DEBUG("Start executing lepton-jet filter");
-
-  ++m_nProcessed;
-
-  StatusCode sc = StatusCode::SUCCESS;
-
-  int sumJetsAndMuon=0;
-  
-  // get number output jets from StoreGate
-  const INav4MomLinkContainer* outputJetContainer=0;
-  if (evtStore()->contains<INav4MomLinkContainer>(m_selectedJetContainerName)) {
-    sc = evtStore()->retrieve(outputJetContainer, m_selectedJetContainerName);
-    if (sc.isFailure()) {
-      ATH_MSG_WARNING("No collection with name "<<m_selectedJetContainerName<<" found in StoreGate");
-    }  
-    else {
-      ATH_MSG_DEBUG("found jet container, adding "<<outputJetContainer->size()<<" to sum");
-      sumJetsAndMuon+=outputJetContainer->size();
-    }
-  }
-  else
-    ATH_MSG_DEBUG("StoreGate does not contain collection with name "<<m_selectedJetContainerName);
-
-  // get output muons from StoreGate
-  const INav4MomLinkContainer* outputMuonContainer=0;
-  if (evtStore()->contains<INav4MomLinkContainer>(m_selectedMuonContainerName)) {
-    sc = evtStore()->retrieve(outputMuonContainer, m_selectedMuonContainerName);
-    if (sc.isFailure()) {
-      ATH_MSG_WARNING("No collection with name "<<m_selectedMuonContainerName<<" found in StoreGate");
-    }  
-    else {
-      ATH_MSG_DEBUG("found muon container, adding "<<outputMuonContainer->size()<<" to sum");
-      sumJetsAndMuon+=outputMuonContainer->size();
-    }
-  }
-  else 
-    ATH_MSG_DEBUG("StoreGate does not contain collection with name "<<m_selectedMuonContainerName);
-
-
-  // check if passed selection cuts
-  ATH_MSG_DEBUG("sumJetsAndMuon="<<sumJetsAndMuon<<", min: "<<m_minSumJetsAndMuon
-		<<", max: "<<m_maxSumJetsAndMuon);
-  if (sumJetsAndMuon>=m_minSumJetsAndMuon &&
-      sumJetsAndMuon<=m_maxSumJetsAndMuon) {
-    ATH_MSG_DEBUG("passed lepton+jets filter");
-    setFilterPassed(true);
-    ++m_nEventPassTrigger;
-  }
-  else {
-    ATH_MSG_DEBUG("failed lepton+jets filter");
-    setFilterPassed(false);
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-} // end namespace
diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/components/HSG5DPDUtils_entries.cxx b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/components/HSG5DPDUtils_entries.cxx
deleted file mode 100644
index 8a73f998fe6..00000000000
--- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/components/HSG5DPDUtils_entries.cxx
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "HSG5DPDUtils/LeptonFilter.h"
-#include "HSG5DPDUtils/LeptonJetsFilter.h"
-
-DECLARE_COMPONENT( HSG5::LeptonFilter )
-DECLARE_COMPONENT( HSG5::LeptonJetsFilter )
-
diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt
index d53ba75d825..c8378cf2bc8 100644
--- a/Projects/Athena/package_filters.txt
+++ b/Projects/Athena/package_filters.txt
@@ -58,5 +58,3 @@
 # Don't build PerfMonVTune which has external Intel tool dependency
 - Control/PerformanceMonitoring/PerfMonVTune
 
-# Old packages that don't work with AthenaMT
-- PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils
-- 
GitLab