diff --git a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/CMakeLists.txt
index 5f934fcd6f0af52d328bbce19ba9c4c13d063f4f..8681b0e32097705a902daee95cc504dfc6cfbb3a 100644
--- a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/CMakeLists.txt
+++ b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/CMakeLists.txt
@@ -15,6 +15,6 @@ atlas_add_component( MissingETD3PDMaker
                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent StoreGateLib EventKernel GaudiKernel D3PDMakerInterfaces D3PDMakerUtils JetEvent MissingETEvent MissingETGoodnessLib MissingETPerformanceLib Particle AthenaKernel FourMomUtils xAODMissingET muonEvent egammaEvent tauEvent )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/METGetterTrack.py b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/METGetterTrack.py
deleted file mode 100644
index 69d30a442ef5e5fa26e199c0a34019456beed525..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/METGetterTrack.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-##############################################################################################
-#
-# METTrack Getters for MissingET.METAlg
-#
-# Author : Jet Goodson after S. Resconi
-# Date :   27 March  2010
-#
-#How to run this:
-#include this file
-#then add the line:
-#METGetterTrack()
-#before your alg (ie, the d3pd)
-##############################################################################################
-
-from AthenaCommon.SystemOfUnits import *  # loads MeV etc...
-from AthenaCommon.Constants import *      # Loads DEBUG INFO etc..
-from AthenaCommon.Logging import logging  # loads logger
-import traceback                          # to allow printout of trace back
-
-from RecExConfig.Configured import Configured            # import base class
-
-from MissingET.METRefGetter import getStandardCalibTool  # to get calib from DB
-
-from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault           
-theCaloNoiseTool=CaloNoiseToolDefault()                                   
-from AthenaCommon.AppMgr import ToolSvc                                   
-ToolSvc+=theCaloNoiseTool
-
-class METGetterTrack ( Configured ):
-	   
-    def configure(self):
-        mlog = logging.getLogger ('METGetterTrack::configure:')
-        mlog.info ('entering')
-        
-        # now configure the algorithm       
-        try:
-            from MissingET.MissingETConf import METAlg
-            theMETAlg=METAlg("METAlg")
-        except:                                               
-            mlog.error("could not import MissingET.METAlg")   
-            mlog.error(traceback.format_exc())
-            return False       
-	        
-                
-        from AthenaCommon.DetFlags import DetFlags
-        if DetFlags.detdescr.ID_on():   
-            try:                                                                     
-                from MissingET.MissingETConf import METTrackTool                             
-                theMETTrackTool = METTrackTool("METTrack");                           
-
-                
-                # if doFastCaloSim set calibrator tool for ATLFAST2                           
-                from CaloRec.CaloCellFlags import jobproperties                               
-                if jobproperties.CaloCellFlags.doFastCaloSim:                                 
-                    doAtlfastII=True                                                         
-                else:                                                                         
-                    doAtlfastII=False
-                    
-                cellcalibtool  = getStandardCalibTool(doAtlfastII);
-                calibtool_name = cellcalibtool.name();
-                  
-                # add track select user interface                                             
-                theMETTrackTool.trackd0          = 1.5            # cut on trackd0           
-                theMETTrackTool.trackz0          = 1.50            # cut on trackz0           
-                theMETTrackTool.trackPtMin       = 500.0           # cut on trackPtMin       
-                theMETTrackTool.trackPtMax       = 9999999.0                                 
-                theMETTrackTool.trackPixelHits   = 1                                         
-                theMETTrackTool.trackSCTHits     = 6                                         
-                theMETTrackTool.trackChi2OverNdf = 999999                                     
-                theMETTrackTool.UseInsideOut     = 1
-                
-                theMETTrackTool.outKey           = "MET_Track"                                                           
-                
-            except:                                                                           
-                mlog.error("could not get handle to METTrackTool Quit")                       
-                mlog.error(traceback.format_exc())
-                return False                                                                 
-	       
-            # add cellcalibtool                                                               
-            theMETTrackTool += cellcalibtool                                                 
-            
-            # add  METTrackTool to list of tools                                             
-            theMETAlg.AlgTools+= [ theMETTrackTool.getFullName() ]                     
-            
-            # add tools to alg                                                               
-            theMETAlg += theMETTrackTool
-
-
-#------------------------------------------------------------------------------------------------
-	        # add algorithm to topSequence (this should always come at the end)
-	
-        mlog.info(" now adding to topSequence")       
-        from AthenaCommon.AlgSequence import AlgSequence
-        topSequence = AlgSequence()               
-        topSequence += theMETAlg
-	                   
-        return True     
-            
diff --git a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETCompAssociation.py b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETCompAssociation.py
deleted file mode 100644
index 27b3d46d3622300dde190c5bd379d56bb20f94fc..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETCompAssociation.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# $Id$
-#
-# @file MissingETD3PDMaker/python/MissingETAssociation.py
-# @author Jet Goodson <jgoodson@cern.ch>
-# @date September, 2010
-# @brief Helper for setting up a MissingET association to a contained object.
-#
-
-import D3PDMakerCoreComps
-import MissingETD3PDMaker
-from D3PDMakerCoreComps.D3PDObject import D3PDObject
-
-
-def MissingETCompAssociation (parent,
-                              type_name,
-                              default_sgkey,
-                              assocTool = MissingETD3PDMaker.MissingETCompAssociationTool,
-                              prefix = '',
-                              matched = '',
-                              level = 0,
-                              objectType = 'egamma',
-                              blockname = None,
-                              allowMissing = False,
-                              *args, **kw):
-   
-    if blockname == None:
-        blockname = prefix + 'METCompAssoc'
-
-    def maker (name, prefix, object_name,
-               sgkey = default_sgkey,
-               getter = None,
-               assoc = None):
-
-        if not getter:
-            getter = D3PDMakerCoreComps.SGObjGetterTool \
-                     (name + '_Getter',
-                      TypeName = type_name,
-                      SGKey = sgkey)
-        
-        assoc = assocTool (name + 'Assoc',
-                           Getter = getter,
-                           ObjectType = objectType,
-                           AllowMissing = allowMissing)
-        
-        return D3PDMakerCoreComps.ContainedAssociationFillerTool (name,
-                                                                  Prefix = prefix,
-                                                                  Associator = assoc,
-                                                                  Matched = matched)
-
-    obj = D3PDObject (maker, prefix)
-    parent.defineBlock (level, blockname, obj)
-    return obj
diff --git a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PD.py b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PD.py
index 8ddaf7dbed5eb50ca7fd5d24c11d26fae85895b0..c37c458c371f499de43a2afedb449bfc532aaa2c 100644
--- a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PD.py
+++ b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PD.py
@@ -1,67 +1,20 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 import D3PDMakerCoreComps
-from D3PDMakerConfig.D3PDMakerFlags           import D3PDMakerFlags
-from RecExConfig.RecFlags import rec
-from MissingETD3PDMaker.MissingETD3PDMakerFlags import *
-from MissingETD3PDMaker.MissingETD3PDObject   import *
-from MissingETD3PDMaker.MissingETGoodnessD3PDObject import 	MissingETGoodnessD3PDObject
-## from TrackD3PDMaker.TrackD3PDMakerFlags              import *
-## from CaloD3PDMaker.ClusterD3PDObject                 import ClusterD3PDObject
-## from egammaD3PDMaker.ElectronD3PDObject              import ElectronD3PDObject
-## from egammaD3PDMaker.PhotonD3PDObject                import PhotonD3PDObject
-## from MuonD3PDMaker.MuonD3PDObject                    import MuonD3PDObject
-## from JetD3PDMaker.JetD3PDObject                      import JetD3PDObject
-## from TauD3PDMaker.TauD3PDObject                      import TauD3PDObject
+from MissingETD3PDMaker.MissingETD3PDObject import MissingETD3PDObject
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
-		
+
 def MissingETD3PD (file,
                    level = 10,
                    tuplename = 'METD3PD',
                    seq = topSequence,
                    D3PDSvc = 'D3PD::RootD3PDSvc'):
-	
+
     alg = D3PDMakerCoreComps.MakerAlg(tuplename, seq,
                                       file = file, D3PDSvc = D3PDSvc)
 
-    alg += MissingETD3PDObject (level=level, allowMissing = True, exclude=['MET_Base', 'MET_Truth_Int', 'MET_RefFinal_Phi', 'MET_MuonBoy_Et', 'MET_RefJet_SumEt'])#, exclude = ['MET_Muon_Isol_Muid', 'MET_Muon_Total_Muid', 'MET_Muon_NonIsol_Muid','MET_Muon_Isol_Staco', 'MET_Muon_Total_Staco', 'MET_Muon_NonIsol_Staco', 'MET_SoftJets', 'MET_RefMuon_Muid', 'MET_RefMuon_Staco', 'MET_RefMuon_Track_Muid', 'MET_RefMuon_Track_Staco'])
-    ##the terms in the exclude before this are specialized terms used by MET experts. They're not in regular AODs or ESDs [yet?], just specialized datasets used for the Pisa Hadronic Cal Workshop - so you may want to exclude them, otherwise they may show up as zeroed sets
-  #  alg += MissingETGoodnessD3PDObject (level=level, allowMissing = True) 
-
-    ##Example of a custom object
-    #alg += MissingETD3PDObject (level=level, sgkey = MissingETD3PDMakerFlags.METRefEleSGKey(), prefix=MissingETD3PDMakerFlags.METRefEleSGKey(), allowMissing = True)
-
-   ##  #More involved custom example - these are setup for custom MET D3PDs for the Pisa Hadronic Cal Workshop
-##     customMETs_Staco = ['MET_RefFinal', 'MET_RefGamma', 'MET_RefEle', 'MET_RefTau', 'MET_RefJet', 'MET_RefMuon' ,'MET_RefMuon_Staco', 'MET_CellOut', 'MET_Cryo', 'MET_Muon_Isol_Staco', 'MET_Muon_NonIsol_Staco', 'MET_Muon_Total_Staco', 'MET_SoftJets', 'MET_RefMuon_Track', 'MET_RefMuon_Track_Staco']
-
-
-##     customMETs_Muid = ['MET_RefFinal', 'MET_RefGamma', 'MET_RefEe', 'MET_RefTau', 'MET_RefJet', 'MET_RefMuon' ,'MET_RefMuon_Muid', 'MET_CellOut', 'MET_Cryo', 'MET_Muon_Isol_Muid', 'MET_Muon_NonIsol_Muid', 'MET_Muon_Total_Muid', 'MET_SoftJets', 'MET_RefMuon_Track', 'MET_RefMuon_Track_Muid']
-
-
-##     for custom in customMETs_Staco:
-##         alg += MissingETD3PDObject (level=0, sgkey = custom+'_LCW_pt20', prefix=custom+'_LCW_pt20', allowMissing = True)
-##         alg += MissingETD3PDObject (level=0, sgkey = custom+'_GCW_pt20', prefix=custom+'_GCW_pt20', allowMissing = True)
-##         alg += MissingETD3PDObject (level=0, sgkey = custom+'_LCW_NI_pt20_noSoftJets_eflow', prefix=custom+'_LCW_NI_pt20_noSoftJets_eflow', allowMissing = True)
-
-##     for custom in customMETs_Muid: 
-##         alg += MissingETD3PDObject (level=0, sgkey = custom+'_GCW_NI_pt20_Muid', prefix=custom+'_GCW_NI_pt20_Muid', allowMissing = True)
-##         alg += MissingETD3PDObject (level=0, sgkey = custom+'_LCW_NI_pt20_Muid_eflow', prefix=custom+'_LCW_NI_pt20_Muid_eflow', allowMissing = True)
-        
-        
-   ##  alg += ElectronD3PDObject(0)
-##     alg += PhotonD3PDObject(0)
-##     alg += TauD3PDObject(0)
-##     alg += MuonD3PDObject(0, sgkey='StacoMuonCollection', prefix="mu_staco_")
-##     alg += MuonD3PDObject(0, sgkey='MuidMuonCollection', prefix="mu_muid_")
-##     alg += JetD3PDObject(0, sgkey=MissingETD3PDMakerFlags.METDefaultJetCollectionSGKey(), prefix="jet_"+MissingETD3PDMakerFlags.METDefaultJetCollectionSGKey()[:-4].lower()+"_")
-##     alg += ClusterD3PDObject(0, prefix='cl_')
-##     #TrackD3PDMakerFlags.stor    eTrackPredictionAtBLayer = False
-    ##If you want a custom objecto MissingEtCalo type use MissingETCaloD3PDObject
-    ##Or TruthMETD3PDObject
-    ##JetsInfoMETD3PDObject
-    ##EtaRingsMETD3PDObject
-    ##those and MissingETD3PDObject are the distinct types
+    alg += MissingETD3PDObject (level=level, allowMissing = True, exclude=['MET_Base', 'MET_Truth_Int', 'MET_RefFinal_Phi', 'MET_MuonBoy_Et', 'MET_RefJet_SumEt'])
 
     return alg
diff --git a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PDMakerFlags.py b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PDMakerFlags.py
index 72875c15b0ce71921c46566026a4cd50059bea17..70553395ae129eac9978889a6c3b39bb9a27d342 100644
--- a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PDMakerFlags.py
+++ b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PDMakerFlags.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # $Id$
 #
@@ -97,9 +97,9 @@ _sgkey_prop ('METMuonsSpectroSGKey', 'MET_Muons_Spectro') # 3rd chain
 _sgkey_prop ('METMuonsTrackSGKey', 'MET_Muons_Track') # 3rd chain
 
 _sgkey_prop ('METTruthPileUpSGKey', 'MET_Truth_PileUp')
-_sgkey_prop ('AllCaloCellsSGKey',  'AllCalo');##change to AllCalo for ESD use AODCellContainer for AOD
-_sgkey_prop ('METDefaultJetCollectionSGKey', 'AntiKt4LCTopoJets,Cone4H1TopoJets'); ##probably want to key to default later
-_sgkey_prop ('METDefaultTrackCollectionSGKey', 'TrackParticleCandidate'); ##probably want to key to default later
+_sgkey_prop ('AllCaloCellsSGKey',  'AllCalo') ##change to AllCalo for ESD use AODCellContainer for AOD
+_sgkey_prop ('METDefaultJetCollectionSGKey', 'AntiKt4LCTopoJets,Cone4H1TopoJets') ##probably want to key to default later
+_sgkey_prop ('METDefaultTrackCollectionSGKey', 'TrackParticleCandidate') ##probably want to key to default later
 _sgkey_prop ('METRefFinalEMSGKey', 'MET_RefFinal_em')
 _sgkey_prop ('METRefEleEMSGKey', 'MET_RefEle_em')
 _sgkey_prop ('METRefJetEMSGKey', 'MET_RefJet_em')
@@ -131,11 +131,11 @@ _sgkey_prop ('METDefaultJetPrefix', 'jet_antikt4LCtopo_MET_')
 _sgkey_prop ('METDefaultTrackPrefix', 'trk_MET_')
 
 ##########Trigger Flags
-_sgkey_prop ('METL1SGKey' , 'LVL1_ROI');
-_sgkey_prop ('METL2SGKey' , 'HLT_T2MissingET');
-_sgkey_prop ('METEFSGKey' , 'HLT_TrigEFMissingET');
-_sgkey_prop ('METEFNoiseSGKey' , 'HLT_TrigEFMissingET_noiseSupp');
-_sgkey_prop ('METEFFEBSGKey' , 'HLT_TrigEFMissingET_FEB');
+_sgkey_prop ('METL1SGKey' , 'LVL1_ROI')
+_sgkey_prop ('METL2SGKey' , 'HLT_T2MissingET')
+_sgkey_prop ('METEFSGKey' , 'HLT_TrigEFMissingET')
+_sgkey_prop ('METEFNoiseSGKey' , 'HLT_TrigEFMissingET_noiseSupp')
+_sgkey_prop ('METEFFEBSGKey' , 'HLT_TrigEFMissingET_FEB')
 
 class DoTruth (JobProperty):
     """If true, put truth information in D3PD."""
diff --git a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PDTriggerBitsObject.py b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PDTriggerBitsObject.py
deleted file mode 100644
index b6e6c9a9b53d34f592cc1548b38c0c06e5d6a597..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PDTriggerBitsObject.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# $Id$
-#
-#@file     MissingETD3PDMaker/python/MissingETD3PDTriggerBitsObject.py
-#@author   Jet Goodson <jgoodson@cern.ch> (copied Haifeng Li's & Scott Snyder's tool in egamma)
-#@date     12 Nov, 2009
-#@brief    Define trigger bit blocks for MissingET
-#
-
-from D3PDMakerCoreComps.D3PDObject  import make_Void_D3PDObject
-
-
-METD3PDTriggerBitsObject = \
-                         make_Void_D3PDObject (default_name = 'MissingETTriggerBitsFiller')
-
-#
-# The MET trigger bits are now added in MissingETD3PDObject;
-# this file is kept just for backwards compatibility.
diff --git a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PD_GoodnessModule.py b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PD_GoodnessModule.py
deleted file mode 100644
index 74163f63b95259b74d5402e8e81fe30f6f84136d..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETD3PD_GoodnessModule.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import D3PDMakerCoreComps
-from D3PDMakerConfig.D3PDMakerFlags           import D3PDMakerFlags
-from RecExConfig.RecFlags import rec
-from MissingETD3PDMaker.MissingETD3PDMakerFlags import *
-from MissingETD3PDMaker.MissingETD3PDGoodnessD3PDObject   import *
-	
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-## config file in case one only wishes to add the met goodness module
-		
-def METPhysicsD3PDGoodness (file,
-	                level = 4,
-	                tuplename = 'METPhysicsD3PD',
-	                seq = topSequence,
-	                D3PDSvc = 'D3PD::RootD3PDSvc'):
-	
-    alg = D3PDMakerCoreComps.MakerAlg(tuplename, seq,
-                                      file = file, D3PDSvc = D3PDSvc)
-
-    ## goodness filler 
-    alg += MissingETGoodnessD3PDObject (level, allow_missing = True) 
-    #Level 4 Objects ---- MetPerf Cleaning Variables
-    
-    alg += JetsInfoMETD3PDObject  (level, allow_missing = True) 
-    
-    return alg
-
diff --git a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETGoodnessD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETGoodnessD3PDObject.py
index e748bea49aa65dd8b59354cb2115a9c3c992e029..392680b5549d5eedc7522e2f16942c68ccdff31b 100644
--- a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETGoodnessD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/MissingETGoodnessD3PDObject.py
@@ -1,11 +1,9 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 import MissingETD3PDMaker
-import D3PDMakerCoreComps
 from D3PDMakerCoreComps.D3PDObject import make_SG_D3PDObject
 from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from MissingETD3PDMaker.MissingETD3PDMakerFlags import *
-from MissingETD3PDMaker.MissingETD3PDMakerConf import *
+from MissingETD3PDMaker.MissingETD3PDMakerFlags import MissingETD3PDMakerFlags
 
 MissingETGoodnessD3PDObject = \
                       make_SG_D3PDObject ('MissingET',
diff --git a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/STVFMETGetter.py b/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/STVFMETGetter.py
deleted file mode 100644
index b55512488d4e1e2f93cfea032ed5b909e7e02f2f..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/MissingETD3PDMaker/python/STVFMETGetter.py
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# $Id: STVFMETGetter.py 525597 2012-11-13 12:54:50Z ssnyder $
-#
-# This configurable can schedule the STVF MET reconstruction if it's needed
-# by the D3PDMaker job.
-
-# Gaudi/Athena import(s):
-from AthenaCommon.Logging import logging
-from AthenaCommon.AlgSequence import AlgSequence
-from RecExConfig.Configured import Configured
-
-# D3PDMaker import(s):
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-
-##
-# @short Class decorator for implementing the singleton pattern
-#
-# I just copy-pasted this code from the TauDiscriGetter code.
-# The idea is the same. The STVF MET reconstruction should only be
-# scheduled once into a job.
-#
-def singleton( cls ):
-
-    __log = logging.getLogger( "%s::__init__" % cls.__name__ )
-    __instances = {}
-
-    def getinstance( *args, **kwargs ):
-
-        # Check if the singleton has already been created:
-        if cls in __instances:
-            __log.debug( "STVF MET reconstruction already configured" )
-            return __instances[ cls ]
-
-        # Create the singleton:
-        obj = cls( *args, **kwargs )
-        __instances[ cls ] = obj
-        return obj
-
-    return getinstance
-
-##
-# @short Singleton class setting up the STVF MET reconstruction
-#
-# This class is responsible for setting up the STVF MET reconstruction for
-# D3PDMaker jobs.
-#
-# @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-#
-# $Revision: 525597 $
-# $Date: 2012-11-13 13:54:50 +0100 (Tue, 13 Nov 2012) $
-@singleton
-class STVFMETGetter( Configured ):
-
-    def __init__( self,
-                  name = "STVFMETGetter",
-                  sequence = AlgSequence( D3PDMakerFlags.PreD3PDAlgSeqName() ),
-                  **kw):
-
-        # Remember the parameter(s):
-        self.__name = name
-        self.__sequence = sequence
-        Configured.__init__( self, **kw )
-
-    def configure( self ):
-
-        # Let the user know what we're doing:
-        __log = logging.getLogger( "STVFMETGetter" )
-        __log.info( "Configuring STVF MET reconstruction" )
-
-        # Sort out the sequence first. This is not pretty, but is needed
-        # in order to be able to use the default configurable nicely outside
-        # of D3PDMaker jobs.
-        topSeq = AlgSequence()
-        if self.__sequence != topSeq and \
-           not hasattr( topSeq, self.__sequence._name ):
-            topSeq += self.__sequence
-            pass
-
-        # Turn on MET reconstruction:
-        from RecExConfig.RecAlgsFlags import recAlgs
-        recAlgs.doMissingET.set_Value_and_Lock( True )
-
-        # Schedule the reconstruction of the STVF objects:
-        from MissingET.METRefGetter_newplup import make_METRefAlg
-        from AthenaCommon.SystemOfUnits import GeV
-        METalg_STVF = make_METRefAlg( _suffix = '_STVF' )
-        METalg_STVF.sequence                  = self.__sequence
-        METalg_STVF.jet_JetInputCollectionKey = 'AntiKt4LCTopoJets'
-        METalg_STVF.jet_JetPtCut              = 20.0 * GeV
-        METalg_STVF.jet_ApplyJetScale         = "Yes"
-        METalg_STVF.jet_UseJetMomentForScale  = True
-        METalg_STVF.jet_JetMomentForScale     = "LCJES"
-        METalg_STVF.jet_ApplyJetJVF           = "Yes"
-        METalg_STVF.jet_RunSoftJetsTool       = False
-        METalg_STVF.jet_calibType             = 'LocHad'
-        METalg_STVF.ele_calibType             = 'RefCalib'
-        METalg_STVF.gamma_calibType           = 'EmScale'
-        METalg_STVF.plupSuppCorr              = 'STVF'
-        METalg_STVF.celloutCorrection         = 'STVF'
-        METalg_STVF.cellout_calibType         = 'Eflow'
-        METalg_STVF.tau_calibType             = 'ExclRefCalib'
-        METalg_STVF.cryo_ApplyCorrection      = "Off"
-        METalg_STVF.muon_algorithm            = "Staco"
-        METalg_STVF.muon_isolationAlg         = "dRJet"
-
-        # Only run this if MET_RefFinal_STVF doesn't exist already.
-        METalg_STVF._output = {'MissingET' : ['MET_RefFinal_STVF']}
-
-        METalg_STVF()
-
-        # Signal that everything went okay:
-        return True