diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt b/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt
index f8006b9f70bd80f9ea67406b789a60ba5f87716b..48e3a87cb8af2484fcedd850d4e87d94d56d1910 100644
--- a/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt
+++ b/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt
@@ -34,3 +34,10 @@ atlas_add_component( BeamPipeGeoModel
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
                      LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities SGTools StoreGateLib GaudiKernel BeamPipeGeoModelLib )
 
+atlas_add_test( BeamPipeGMConfig_test
+                SCRIPT test/BeamPipeGMConfig_test.py
+                PROPERTIES TIMEOUT 300 )
+
+# Install files from the package:
+atlas_install_python_modules( python/*.py )
+atlas_install_scripts( test/*.py )
diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/python/BeamPipeGMConfig.py b/AtlasGeometryCommon/BeamPipeGeoModel/python/BeamPipeGMConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..1f4b632cb636b8750db01a41c6052c0c1614b83d
--- /dev/null
+++ b/AtlasGeometryCommon/BeamPipeGeoModel/python/BeamPipeGMConfig.py
@@ -0,0 +1,10 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AtlasGeoModel.GeoModelConfig import GeoModelCfg
+
+def BeamPipeGeometryCfg(flags):
+    result,gms=GeoModelCfg(flags)
+    from BeamPipeGeoModel.BeamPipeGeoModelConf import BeamPipeDetectorTool
+    gms.DetectorTools += [ BeamPipeDetectorTool() ]
+    result.addService(gms)
+    return result
diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/test/BeamPipeGMConfig_test.py b/AtlasGeometryCommon/BeamPipeGeoModel/test/BeamPipeGMConfig_test.py
new file mode 100755
index 0000000000000000000000000000000000000000..a2db6f080f14fbb9e8b7b5328c66e9e726a0d78f
--- /dev/null
+++ b/AtlasGeometryCommon/BeamPipeGeoModel/test/BeamPipeGMConfig_test.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+"""Run tests on BeamPipeGeoModel configuration
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+if __name__ == "__main__":
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    from AthenaConfiguration.TestDefaults import defaultTestFiles
+
+    ConfigFlags.Input.Files = defaultTestFiles.HITS
+    ConfigFlags.Detector.SimulatePixel = False
+    ConfigFlags.Detector.SimulateSCT   = False
+    ConfigFlags.Detector.SimulateTRT   = False
+    ConfigFlags.GeoModel.Align.Dynamic    = False
+    ConfigFlags.lock()
+
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
+    acc = BeamPipeGeometryCfg(ConfigFlags)
+    f=open('BeamPipeGeometryCfg.pkl','w')
+    acc.store(f)
+    f.close()
diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py
index 135e9ca10c1e2026f31f605f8b129077447c1af0..dbabb4d27df526b17888a7957f37db33436fb7f8 100644
--- a/Control/AthenaConfiguration/python/AllConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AllConfigFlags.py
@@ -25,6 +25,14 @@ def _createCfgFlags():
 
     acf.addFlag('Common.isOnline', False ) #  Job runs in an online environment (access only to resources available at P1) # former global.isOnline
 
+    def _checkProject():
+        import os
+        if "AthSimulation_DIR" in os.environ:
+            return "AthSimulation"
+        #TODO expand this method.
+        return "Athena"
+    acf.addFlag('Common.Project', _checkProject())
+
     # replace global.Beam*
     acf.addFlag('Beam.BunchSpacing', 25) # former global.BunchSpacing
     acf.addFlag("Beam.NumberOfCollisions",0) # former global.NumberOfCollisions
@@ -36,17 +44,36 @@ def _createCfgFlags():
 
     acf.addFlag('Output.doESD', False) # produce ESD containers
 
-    acf.addFlag('Output.HITFileName','myHIT.pool.root')
+    acf.addFlag('Output.EVNTFileName','myEVNT.pool.root')
+    acf.addFlag('Output.HITSFileName','myHITS.pool.root')
     acf.addFlag('Output.RDOFileName','myROD.pool.root')
     acf.addFlag('Output.ESDFileName','myESD.pool.root')
     acf.addFlag('Output.AODFileName','myAOD.pool.root')
     acf.addFlag('Output.HISTFileName','myHIST.root')
 
 
+#Detector Flags:
+    acf.addFlag('Detector.SimulatePixel', False)
+    acf.addFlag("Detector.SimulateSCT",   False)
+    acf.addFlag("Detector.SimulateTRT",   False)
+    acf.addFlag("Detector.SimulateMuon",  False)
+    acf.addFlag("Detector.SimulateCavern",False)
+    acf.addFlag("Detector.Simulate", lambda prevFlags : (prevFlags.Detector.SimulatePixel or prevFlags.Detector.SimulateSCT or
+                                                         prevFlags.Detector.SimulateTRT or prevFlags.Detector.SimulateMuon or
+                                                         prevFlags.Detector.SimulateCavern))
+    acf.addFlag("Detector.OverlayPixel", False)
+    acf.addFlag("Detector.OverlaySCT",   False)
+    acf.addFlag("Detector.OverlayTRT",   False)
+    acf.addFlag("Detector.OverlayMuon",  False)
+    acf.addFlag("Detector.Overlay", lambda prevFlags : (prevFlags.Detector.OverlayPixel or prevFlags.Detector.OverlaySCT or
+                                                        prevFlags.Detector.OverlayTRT or prevFlags.Detector.OverlayMuon ))
+
 #Geo Model Flags:
     acf.addFlag('GeoModel.Layout', 'atlas') # replaces global.GeoLayout
     acf.addFlag("GeoModel.AtlasVersion", lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("Geometry","ATLAS-R2-2016-01-00-01")) #
-
+    acf.addFlag("GeoModel.Align.Dynamic", lambda prevFlags : (not prevFlags.Detector.Simulate))
+    acf.addFlag("GeoModel.StripGeoType", "GMX") # Based on CommonGeometryFlags.StripGeoType
+    acf.addFlag("GeoModel.Run","RUN2") # Based on CommonGeometryFlags.Run (InDetGeometryFlags.isSLHC replaced by GeoModel.Run=="RUN4")
 
 #IOVDbSvc Flags:
     acf.addFlag("IOVDb.GlobalTag",lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("ConditionsTag","CONDBR2-BLKPA-2017-05"))
@@ -56,13 +83,13 @@ def _createCfgFlags():
 
 #LAr Flags:
     try:
-        import LArCellRec # Suppress flake8 unused import warning: # noqa: F401
-        haveLArCellRec = True
+        import LArConfiguration # Suppress flake8 unused import warning: # noqa: F401
+        haveLArConfiguration = True
     except ImportError:
-        haveLArCellRec = False
+        haveLArConfiguration = False
 
-    if haveLArCellRec:
-        from LArCellRec.LArConfigFlags import createLArConfigFlags
+    if haveLArConfiguration:
+        from LArConfiguration.LArConfigFlags import createLArConfigFlags
         lcf=createLArConfigFlags()
         acf.join(lcf)
 
diff --git a/Control/AthenaConfiguration/python/TestDefaults.py b/Control/AthenaConfiguration/python/TestDefaults.py
index 0a984d5f1ed4e0f6a258a324e9431fe7a81e1205..17e7a4e639b851eb1d9ba024edb49541c98f33da 100644
--- a/Control/AthenaConfiguration/python/TestDefaults.py
+++ b/Control/AthenaConfiguration/python/TestDefaults.py
@@ -4,7 +4,9 @@ class defaultTestFiles():
     import os
     d = os.environ.get ('ATLAS_REFERENCE_DATA',
                        '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art')
+    EVNT= [d + "/SimCoreTests/mcatnlojimmy_ttbar_leptonfilter.19.2.5.37.EVNT.pool.root"] #find an official file.
+    HITS= [d + "/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1"]
     RAW = [d + "/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"]
     RDO = ["myRDO.pool.root"]#needs a test RDO
+    ESD = [d + '/RecExRecoTest/mc16_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s3170_r10572_homeMade.pool.root']
     AOD = [d + '/CommonInputs/data16_13TeV.00311321.physics_Main.recon.AOD.r9264/AOD.11038520._000001.pool.root.1']
-    ESD = ["myESD.pool.root"]#needs a test ESD
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt b/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt
index 925b09354115d151b178410073192c580579b751..8654ff91070d2ebb4801fef3adef6d1d56b0350f 100644
--- a/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt
@@ -8,7 +8,18 @@ atlas_subdir( AtlasGeoModel )
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
+atlas_install_scripts( test/*.py )
+
+atlas_add_test( EVNT_InputGeo_test
+                SCRIPT test/AtlasGeometryConfig_EVNT_test.py
+                PROPERTIES TIMEOUT 300 )
 
 if( NOT SIMULATIONBASE )
   atlas_add_test( AtlasGeoModelConfig    SCRIPT python -m AtlasGeoModel.GeoModelConfig POST_EXEC_SCRIPT nopost.sh )
+  atlas_add_test( HITS_InputGeo_test
+                  SCRIPT test/AtlasGeometryConfig_HITS_test.py
+                  PROPERTIES TIMEOUT 300 )
+  atlas_add_test( AOD_InputGeo_test
+                  SCRIPT test/AtlasGeometryConfig_AOD_test.py
+                  PROPERTIES TIMEOUT 300 )
 endif()
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/AtlasGeoModelConfig.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/AtlasGeoModelConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..cc2c90572cdd14e3006570aee09b722b9e4e3706
--- /dev/null
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/AtlasGeoModelConfig.py
@@ -0,0 +1,26 @@
+#
+#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.AthConfigFlags import AthConfigFlags
+
+def AtlasGeometryCfg (flags):
+    acc = ComponentAccumulator()
+
+    from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg
+    acc.merge(InDetGeometryCfg(flags))
+    from LArGeoAlgsNV.LArGMConfig import LArGMCfg
+    acc.merge(LArGMCfg(flags))
+    from TileGeoModel.TileGMConfig import TileGMCfg
+    acc.merge(TileGMCfg(flags))
+    from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
+    acc.merge(MuonGeoModelCfg(flags))
+    #from AtlasGeoModel.ForDetGeoModelConfig import ForDetGeometryCfg
+    #acc.merge(ForDetGeometryCfg(flags))
+    from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
+    acc.merge(BeamPipeGeometryCfg(flags))
+    if (flags.Detector.Simulate and flags.Beam.Type == "cosmics") or flags.Detector.SimulateCavern:
+        from CavernInfraGeoModel.CavernInfraGeoModelConf import CavernInfraDetectorTool
+        gms.DetectorTools += [ CavernInfraDetectorTool() ]
+    return acc
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/ForDetGeoModelConfig.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/ForDetGeoModelConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..d9cd05e268daa5a2bf0d207ece204d22a958781d
--- /dev/null
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/ForDetGeoModelConfig.py
@@ -0,0 +1,55 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.AthConfigFlags import AthConfigFlags
+from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
+
+# TODO This isn't used yet anywhere and the new style ConfigFlag
+# equivalents of the DetFlags used here have yet to be created.
+
+def ForDetGeometryCfg( flags ):
+    from AtlasGeoModel.GeoModelConfig import GeoModelCfg
+    acc,geoModelSvc = GeoModelCfg( flags )
+    from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
+    acc.addService(GeometryDBSvc("InDetGeometryDBSvc"))
+    # LUCID
+    if True:#( DetFlags.detdescr.Lucid_on() ):
+        from LUCID_GeoModel.LUCID_GeoModelConf import LUCID_DetectorTool
+        geoModelSvc.DetectorTools += [ LUCID_DetectorTool() ]
+    # ALFA
+    if True:#( DetFlags.detdescr.ALFA_on() ):
+        from ALFA_GeoModel.ALFA_GeoModel_joboption import getALFA_DetectorTool
+        #from ALFA_GeoModel.ALFA_GeoModelConf import ALFA_DetectorTool
+        theALFA_DetectorTool=ALFA_DetectorTool(name)
+        theALFA_DetectorTool.MetrologyType=3
+        theALFA_DetectorTool.B7L1U_MDGeometryType = 2
+        theALFA_DetectorTool.B7L1U_ODGeometryType = 2
+        theALFA_DetectorTool.B7L1L_MDGeometryType = 2
+        theALFA_DetectorTool.B7L1L_ODGeometryType = 2
+        theALFA_DetectorTool.A7L1U_MDGeometryType = 2
+        theALFA_DetectorTool.A7L1U_ODGeometryType = 2
+        theALFA_DetectorTool.A7L1L_MDGeometryType = 2
+        theALFA_DetectorTool.A7L1L_ODGeometryType = 2
+        theALFA_DetectorTool.A7R1U_MDGeometryType = 2
+        theALFA_DetectorTool.A7R1U_ODGeometryType = 2
+        theALFA_DetectorTool.A7R1L_MDGeometryType = 2
+        theALFA_DetectorTool.A7R1L_ODGeometryType = 2
+        theALFA_DetectorTool.B7R1U_MDGeometryType = 2
+        theALFA_DetectorTool.B7R1U_ODGeometryType = 2
+        theALFA_DetectorTool.B7R1L_MDGeometryType = 2
+        theALFA_DetectorTool.B7R1L_ODGeometryType = 2
+        geoModelSvc.DetectorTools += [ thALFA_DetectorTool ]
+        acc.merge(addFoldersSplitOnline(flags,'FWD','/FWD/Onl/ALFA/position_calibration','/FWD/ALFA/position_calibration'))
+    # ForwardRegion
+    if True:#( DetFlags.detdescr.FwdRegion_on() ):
+        from ForwardRegionGeoModel.ForwardRegionGeoModelConf import ForwardRegionGeoModelTool
+        geoModelSvc.DetectorTools += [ ForwardRegionGeoModelTool() ]
+    # ZDC
+    if True:#( DetFlags.detdescr.ZDC_on() ):
+        from ZDC_GeoM.ZDC_GeoMConf import ZDC_DetTool
+        geoModelSvc.DetectorTools += [ ZDC_DetTool() ]
+    # AFP
+    if True:#( DetFlags.detdescr.AFP_on() ):
+        from AFP_GeoModel.AFP_GeoModelConf import AFP_GeoModelTool
+        geoModelSvc.DetectorTools += [ AFP_GeoModelTool() ]
+    acc.addService(geoModelSvc)
+    return acc
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py
index 21cb0f410a2a9178216daac1ec3efdab595096a0..a2dd33956662e72948c194c6f685fa0eb7faa7b9 100644
--- a/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py
@@ -16,7 +16,9 @@ def GeoModelCfg(configFlags):
     from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
     gms=GeoModelSvc(AtlasVersion=version,
                     SupportedGeometry = int(relversion[0]))
-
+    if configFlags.Detector.Simulate:
+        ## Protects GeoModelSvc in the simulation from the AlignCallbacks
+        gms.AlignCallbacks = False
     result.addService(gms)
     
     from DetDescrCnvSvc.DetDescrCnvSvcConf import DetDescrCnvSvc
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGMConfig.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGMConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..35c4eefecfe1f476c8f600a0a3de1f2555d5fde5
--- /dev/null
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGMConfig.py
@@ -0,0 +1,76 @@
+#
+#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.AthConfigFlags import AthConfigFlags
+from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
+
+def InDetServiceMaterialCfg (flags):
+    from AtlasGeoModel.GeoModelConfig import GeoModelCfg
+    acc,geoModelSvc = GeoModelCfg( flags )
+    from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
+    acc.addService(GeometryDBSvc("InDetGeometryDBSvc"))
+    from InDetServMatGeoModel.InDetServMatGeoModelConf import InDetServMatTool
+    servMatTool = InDetServMatTool()
+    if flags.GeoModel.Run=="RUN4":
+        from InDetServMatGeoModel.InDetServMatGeoModelConf import InDetServMatBuilderToolSLHC
+        InDetServMatBuilderToolSLHC = InDetServMatBuilderToolSLHC()
+        acc.addPublicTool( InDetServMatBuilderToolSLHC )
+        servMatTool.ServiceBuilderTool = InDetServMatBuilderToolSLHC
+    geoModelSvc.DetectorTools += [ servMatTool ]
+    acc.addService(geoModelSvc)
+    return acc
+
+
+def InDetGeometryCfg (flags):
+    acc = ComponentAccumulator()
+    from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
+    acc.merge(PixelGeometryCfg( flags ))
+    from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
+    acc.merge(SCT_GeometryCfg( flags ))
+    if not flags.GeoModel.Run=="RUN4":
+        from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
+        acc.merge(TRT_GeometryCfg( flags ))
+    acc.merge(InDetServiceMaterialCfg( flags ))
+    return acc
+
+
+if __name__ == "__main__":
+  import os
+  from AthenaCommon.Logging import log
+  from AthenaCommon.Constants import DEBUG
+  from AthenaCommon.Configurable import Configurable
+  from AthenaConfiguration.AllConfigFlags import ConfigFlags
+  from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
+  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+  # Set up logging and new style config
+  log.setLevel(DEBUG)
+  Configurable.configurableRun3Behavior = True
+  from AthenaConfiguration.TestDefaults import defaultTestFiles
+  # Provide MC input
+  ConfigFlags.Input.Files = defaultTestFiles.HITS
+  ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
+  ConfigFlags.Detector.SimulatePixel = True
+  ConfigFlags.Detector.SimulateSCT   = True
+  ConfigFlags.Detector.SimulateTRT   = True
+  ConfigFlags.GeoModel.Align.Dynamic    = False
+  # Provide data input
+  ##from AthenaConfiguration.TestDefaults import defaultTestFiles
+  ##ConfigFlags.Input.Files = defaultTestFiles.AOD
+  ##ConfigFlags.GeoModel.Align.Dynamic    = True
+  #
+  ConfigFlags.lock()
+  # Construct ComponentAccumulator
+  acc = MainServicesSerialCfg()
+  acc.merge(PoolReadCfg(ConfigFlags))
+  acc.merge(InDetGeometryCfg(ConfigFlags)) # FIXME This sets up the whole ID geometry would be nicer just to set up min required
+  #acc.getService("StoreGateSvc").Dump=True
+  acc.getService("ConditionStore").Dump=True
+  acc.printConfig(withDetails=True)
+  f=open('InDetGMCfg2.pkl','w')
+  acc.store(f)
+  f.close()
+  ConfigFlags.dump()
+  # Execute and finish
+  acc.run(maxEvents=3)
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/test/AtlasGeometryConfig_AOD_test.py b/DetectorDescription/GeoModel/AtlasGeoModel/test/AtlasGeometryConfig_AOD_test.py
new file mode 100755
index 0000000000000000000000000000000000000000..cb09147b15697e108f2ee02c4b2f7ad484eddff7
--- /dev/null
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/test/AtlasGeometryConfig_AOD_test.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+"""Run a test on Atlas Geometry configuration using a HITS file as input
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+if __name__ == "__main__":
+    import os
+    from AthenaCommon.Logging import log
+    from AthenaCommon.Constants import DEBUG
+    from AthenaCommon.Configurable import Configurable
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
+    from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+    from AtlasGeoModel.AtlasGeoModelConfig import AtlasGeometryCfg
+    # Set up logging and new style config
+    log.setLevel(DEBUG)
+    Configurable.configurableRun3Behavior = True
+    from AthenaConfiguration.TestDefaults import defaultTestFiles
+    # Provide MC input
+    ConfigFlags.Input.Files = defaultTestFiles.AOD
+    ConfigFlags.GeoModel.Align.Dynamic    = True
+    ConfigFlags.lock()
+
+    # Construct ComponentAccumulator
+    acc = MainServicesSerialCfg()
+    acc.merge(PoolReadCfg(ConfigFlags))
+    acc.merge(AtlasGeometryCfg(ConfigFlags))
+    #acc.getService("StoreGateSvc").Dump=True
+    acc.getService("ConditionStore").Dump=True
+    acc.printConfig(withDetails=True)
+    f=open('AtlasGeoModelCfg_HITS.pkl','w')
+    acc.store(f)
+    f.close()
+    ConfigFlags.dump()
+    # Execute and finish
+    acc.run(maxEvents=3)
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/test/AtlasGeometryConfig_EVNT_test.py b/DetectorDescription/GeoModel/AtlasGeoModel/test/AtlasGeometryConfig_EVNT_test.py
new file mode 100755
index 0000000000000000000000000000000000000000..97619ecd1992a6560e0b0cb6d77d1722fbc66a9e
--- /dev/null
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/test/AtlasGeometryConfig_EVNT_test.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+"""Run a test on Atlas Geometry configuration using a EVNT file as input
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+if __name__ == "__main__":
+    import os
+    from AthenaCommon.Logging import log
+    from AthenaCommon.Constants import DEBUG
+    from AthenaCommon.Configurable import Configurable
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
+    from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+    from AtlasGeoModel.AtlasGeoModelConfig import AtlasGeometryCfg
+    # Set up logging and new style config
+    log.setLevel(DEBUG)
+    Configurable.configurableRun3Behavior = True
+    from AthenaConfiguration.TestDefaults import defaultTestFiles
+    # Provide MC input
+    ConfigFlags.Input.Files = defaultTestFiles.EVNT
+    ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01"
+    ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
+    ConfigFlags.Detector.SimulatePixel = True
+    ConfigFlags.Detector.SimulateSCT   = True
+    ConfigFlags.Detector.SimulateTRT   = True
+    ConfigFlags.GeoModel.Align.Dynamic    = False
+    ConfigFlags.lock()
+
+    # Construct ComponentAccumulator
+    acc = MainServicesSerialCfg()
+    acc.merge(PoolReadCfg(ConfigFlags))
+    acc.merge(AtlasGeometryCfg(ConfigFlags))
+    #acc.getService("StoreGateSvc").Dump=True
+    acc.getService("ConditionStore").Dump=True
+    acc.printConfig(withDetails=True)
+    f=open('AtlasGeoModelCfg_EVNT.pkl','w')
+    acc.store(f)
+    f.close()
+    ConfigFlags.dump()
+    # Execute and finish
+    acc.run(maxEvents=3)
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/test/AtlasGeometryConfig_HITS_test.py b/DetectorDescription/GeoModel/AtlasGeoModel/test/AtlasGeometryConfig_HITS_test.py
new file mode 100755
index 0000000000000000000000000000000000000000..e9217f3fbe9b06acc3b5cd8ccad06ba1ddf49ec2
--- /dev/null
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/test/AtlasGeometryConfig_HITS_test.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+"""Run a test on Atlas Geometry configuration using a HITS file as input
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+if __name__ == "__main__":
+    import os
+    from AthenaCommon.Logging import log
+    from AthenaCommon.Constants import DEBUG
+    from AthenaCommon.Configurable import Configurable
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
+    from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+    from AtlasGeoModel.AtlasGeoModelConfig import AtlasGeometryCfg
+    # Set up logging and new style config
+    log.setLevel(DEBUG)
+    Configurable.configurableRun3Behavior = True
+    from AthenaConfiguration.TestDefaults import defaultTestFiles
+    # Provide MC input
+    ConfigFlags.Input.Files = defaultTestFiles.HITS
+    ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
+    ConfigFlags.GeoModel.Align.Dynamic    = False
+    ConfigFlags.lock()
+
+    # Construct ComponentAccumulator
+    acc = MainServicesSerialCfg()
+    acc.merge(PoolReadCfg(ConfigFlags))
+    acc.merge(AtlasGeometryCfg(ConfigFlags))
+    #acc.getService("StoreGateSvc").Dump=True
+    acc.getService("ConditionStore").Dump=True
+    acc.printConfig(withDetails=True)
+    f=open('AtlasGeoModelCfg_HITS.pkl','w')
+    acc.store(f)
+    f.close()
+    ConfigFlags.dump()
+    # Execute and finish
+    acc.run(maxEvents=3)
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt
index 27c9c4eb52403a044bc4e1a34986a50e6a350e51..c7af047071c03e09a4ec183f323b2986f793f3dc 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt
@@ -45,5 +45,10 @@ atlas_add_component( PixelGeoModel
    src/components/*.cxx
    LINK_LIBRARIES GaudiKernel PixelGeoModelLib )
 
+atlas_add_test( PixelGMConfig_test
+                SCRIPT test/PixelGMConfig_test.py
+                PROPERTIES TIMEOUT 300 )
+
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
+atlas_install_scripts( test/*.py )
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/python/PixelGeoModelConfig.py b/InnerDetector/InDetDetDescr/PixelGeoModel/python/PixelGeoModelConfig.py
index f24fc6ec634f7f7d51dd50cee5f0cb373b8fb031..b2ae09a76fc71628533db53ccf1f90768524e2db 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/python/PixelGeoModelConfig.py
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/python/PixelGeoModelConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
 
@@ -10,3 +10,47 @@ def getPixelDetectorTool(name="PixelDetectorTool", **kwargs):
         kwargs.setdefault("ServiceBuilderTool",    "");
 
     return CfgMgr.PixelDetectorTool(name, **kwargs)
+
+
+############## ComponentAccumulator
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.AthConfigFlags import AthConfigFlags
+from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
+
+def PixelGeometryCfg( flags ):
+  from AtlasGeoModel.GeoModelConfig import GeoModelCfg
+  acc,geoModelSvc = GeoModelCfg( flags )
+  from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
+  acc.addService(GeometryDBSvc("InDetGeometryDBSvc"))
+  from PixelGeoModel.PixelGeoModelConf import PixelDetectorTool
+  pixelDetectorTool = PixelDetectorTool("PixelDetectorTool")
+  from BCM_GeoModel.BCM_GeoModelConf import InDetDD__BCM_Builder
+  bcmTool = InDetDD__BCM_Builder()
+  acc.addPublicTool( bcmTool )
+  pixelDetectorTool.BCM_Tool = bcmTool
+  from BLM_GeoModel.BLM_GeoModelConf import InDetDD__BLM_Builder
+  blmTool = InDetDD__BLM_Builder()
+  acc.addPublicTool( blmTool )
+  pixelDetectorTool.BLM_Tool = blmTool
+  if flags.GeoModel.Run=="RUN4":
+      from InDetServMatGeoModel.InDetServMatGeoModelConf import InDetServMatBuilderToolSLHC
+      InDetServMatBuilderToolSLHC = InDetServMatBuilderToolSLHC()
+      acc.addPublicTool( InDetServMatBuilderToolSLHC )
+      pixelDetectorTool.ServiceBuilderTool = InDetServMatBuilderToolSLHC
+  pixelDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
+  geoModelSvc.DetectorTools += [ pixelDetectorTool ]
+  acc.addService(geoModelSvc)
+  # Pixel module distortions
+  acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/PixelDist","/Indet/PixelDist")) # Not used ???
+  # IBL stave distortions
+  acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/IBLDist","/Indet/IBLDist",className="CondAttrListCollection"))
+  if flags.GeoModel.Align.Dynamic:
+    acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection"))
+    acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL2/PIX","/Indet/AlignL2/PIX",className="CondAttrListCollection"))
+    acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer"))
+  else:
+    if (not flags.Detector.SimulatePixel) or flags.Detector.OverlayPixel:
+      acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer"))
+    else:
+      acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align"))
+  return acc
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/test/PixelGMConfig_test.py b/InnerDetector/InDetDetDescr/PixelGeoModel/test/PixelGMConfig_test.py
new file mode 100755
index 0000000000000000000000000000000000000000..e045030a3ff0dd2d505fac422a8cf116a5a2439a
--- /dev/null
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/test/PixelGMConfig_test.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+"""Run tests on PixelGeoModel configuration
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+if __name__ == "__main__":
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    from AthenaConfiguration.TestDefaults import defaultTestFiles
+
+    ConfigFlags.Input.Files = defaultTestFiles.HITS
+    ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
+    ConfigFlags.Detector.SimulatePixel = False
+    ConfigFlags.Detector.SimulateSCT   = False
+    ConfigFlags.Detector.SimulateTRT   = False
+    ConfigFlags.GeoModel.Align.Dynamic    = False
+    ConfigFlags.lock()
+
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
+    acc = PixelGeometryCfg(ConfigFlags)
+    f=open('PixelGeometryCfg.pkl','w')
+    acc.store(f)
+    f.close()
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt
index edc57338d200d59973fab1aa4665782dfedbfbc2..3b2e0af643fc8258549aab021134f836b95ded81 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt
@@ -37,6 +37,10 @@ atlas_add_component( SCT_GeoModel
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} 
                      LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel InDetGeoModelUtils InDetReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions Identifier InDetIdentifier )
 
+atlas_add_test( SCT_GMConfig_test
+                SCRIPT test/SCT_GMConfig_test.py
+                PROPERTIES TIMEOUT 300 )
+
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
-
+atlas_install_scripts( test/*.py )
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py b/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py
index 6c8522d4cace79b1ba355c989cc57b9facd43743..579c6679a32f1a4beb930399e1c6f9383ca4eff4 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
 
@@ -10,3 +10,52 @@ def getSCT_DetectorTool(name="SCT_DetectorTool", **kwargs):
     kwargs.setdefault("GeoDbTagSvc",      "GeoDbTagSvc");
     from AthenaCommon.DetFlags      import DetFlags
     return CfgMgr.SCT_DetectorTool(name, **kwargs)
+
+
+###### ComponentAccumulator
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.AthConfigFlags import AthConfigFlags
+from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
+
+def SCT_GeometryCfg( flags ):
+    from AtlasGeoModel.GeoModelConfig import GeoModelCfg
+    acc,geoModelSvc = GeoModelCfg( flags )
+    from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
+    acc.addService(GeometryDBSvc("InDetGeometryDBSvc"))
+    if flags.GeoModel.Run=="RUN4":
+        if "GMX" == flags.GeoModel.StripGeoType():
+            from SCT_GeoModelXml.SCT_GeoModelXmlConf import SCT_GMX_DetectorTool
+            sctDetectorTool = SCT_GMX_DetectorTool()
+        else:
+            from SCT_SLHC_GeoModel.SCT_SLHC_GeoModelConf import SCT_SLHC_DetectorTool
+            sctDetectorTool = SCT_SLHC_DetectorTool()
+            from InDetServMatGeoModel.InDetServMatGeoModelConf import InDetServMatBuilderToolSLHC
+            InDetServMatBuilderToolSLHC = InDetServMatBuilderToolSLHC()
+            acc.addPublicTool( InDetServMatBuilderToolSLHC )
+            sctDetectorTool.ServiceBuilderTool = InDetServMatBuilderToolSLHC
+    else:
+        from SCT_GeoModel.SCT_GeoModelConf import SCT_DetectorTool
+        sctDetectorTool = SCT_DetectorTool()
+    sctDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
+    geoModelSvc.DetectorTools += [ sctDetectorTool ]
+    acc.addService(geoModelSvc)
+    if flags.GeoModel.Align.Dynamic:
+        acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection"))
+        acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL2/SCT","/Indet/AlignL2/SCT",className="CondAttrListCollection"))
+        acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer"))
+    else:
+        if (not flags.Detector.SimulateSCT) or flags.Detector.OverlaySCT:
+            acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer"))
+        else:
+            acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align"))
+    if flags.Common.Project is not "AthSimulation": # Protection for AthSimulation builds
+        if (not flags.Detector.SimulateSCT) or flags.Detector.OverlaySCT:
+            from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_AlignCondAlg
+            sctAlignCondAlg = SCT_AlignCondAlg(name = "SCT_AlignCondAlg",
+                                               UseDynamicAlignFolders = flags.GeoModel.Align.Dynamic)
+            acc.addCondAlgo(sctAlignCondAlg)
+            from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_DetectorElementCondAlg
+            sctDetectorElementCondAlg = SCT_DetectorElementCondAlg(name = "SCT_DetectorElementCondAlg")
+            acc.addCondAlgo(sctDetectorElementCondAlg)
+    return acc
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/test/SCT_GMConfig_test.py b/InnerDetector/InDetDetDescr/SCT_GeoModel/test/SCT_GMConfig_test.py
new file mode 100755
index 0000000000000000000000000000000000000000..b7dbd7f1137f6825d24947c607d254bd619035a4
--- /dev/null
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/test/SCT_GMConfig_test.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+"""Run tests on SCT_GeoModel configuration
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+if __name__ == "__main__":
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    from AthenaConfiguration.TestDefaults import defaultTestFiles
+
+    ConfigFlags.Input.Files = defaultTestFiles.HITS
+    ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
+    ConfigFlags.Detector.SimulatePixel = False
+    ConfigFlags.Detector.SimulateSCT   = False
+    ConfigFlags.Detector.SimulateTRT   = False
+    ConfigFlags.GeoModel.Align.Dynamic    = False
+    ConfigFlags.lock()
+
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
+    acc = SCT_GeometryCfg(ConfigFlags)
+    f=open('SCT_GeometryCfg.pkl','w')
+    acc.store(f)
+    f.close()
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt
index bb2815df1d421d5bdb167682ee4986afaaae4763..e5575eaeb154df43282bbc4625c7f4a59f8410f8 100644
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt
@@ -39,3 +39,11 @@ atlas_add_component( TRT_GeoModel
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} 
                      LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel TRT_ConditionsServicesLib InDetGeoModelUtils InDetReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions IdDictDetDescr TRT_ConditionsData InDetIdentifier )
 
+atlas_add_test( TRT_GMConfig_test
+                SCRIPT test/TRT_GMConfig_test.py
+                PROPERTIES TIMEOUT 300 )
+
+# Install files from the package:
+atlas_install_python_modules( python/*.py )
+atlas_install_scripts( test/*.py )
+
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/python/TRT_GeoModelConfig.py b/InnerDetector/InDetDetDescr/TRT_GeoModel/python/TRT_GeoModelConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..7f0d04275f2268b06e692d82bedf79f78861aeaa
--- /dev/null
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/python/TRT_GeoModelConfig.py
@@ -0,0 +1,53 @@
+#
+#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.AthConfigFlags import AthConfigFlags
+from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
+
+def TRT_GeometryCfg( flags ):
+    from AtlasGeoModel.GeoModelConfig import GeoModelCfg
+    acc,geoModelSvc = GeoModelCfg( flags )
+    from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
+    acc.addService(GeometryDBSvc("InDetGeometryDBSvc"))
+    from TRT_GeoModel.TRT_GeoModelConf import TRT_DetectorTool
+    trtDetectorTool = TRT_DetectorTool()
+    trtDetectorTool.DoXenonArgonMixture = flags.Detector.SimulateTRT
+    trtDetectorTool.DoKryptonMixture = flags.Detector.SimulateTRT
+    trtDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
+    geoModelSvc.DetectorTools += [ trtDetectorTool ]
+    acc.addService(geoModelSvc)
+    # Inner Detector alignment
+    acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Calib/DX","/TRT/Calib/DX"))
+    if flags.Detector.SimulateTRT: # revert to old style CondHandle in case of simulation
+        # Dead/Noisy Straw Lists
+        acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status"))
+        acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent"))
+        # Argon straw list
+        acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT"))
+    else:
+        # Dead/Noisy Straw Lists
+        acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status",className='TRTCond::StrawStatusMultChanContainer'))
+        acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent",className='TRTCond::StrawStatusMultChanContainer'))
+        # Argon straw list
+        acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT",className='TRTCond::StrawStatusMultChanContainer'))
+    # TRT Condition Algorithm
+    from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTAlignCondAlg
+    TRTAlignCondAlg = TRTAlignCondAlg(name = "TRTAlignCondAlg",
+                                      UseDynamicFolders = flags.GeoModel.Align.Dynamic)
+    if flags.GeoModel.Align.Dynamic:
+        acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/AlignL1/TRT","/TRT/AlignL1/TRT",className="CondAttrListCollection"))
+        acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/AlignL2","/TRT/AlignL2",className="AlignableTransformContainer"))
+        TRTAlignCondAlg.ReadKeyDynamicGlobal = "/TRT/AlignL1/TRT"
+        TRTAlignCondAlg.ReadKeyDynamicRegular = "/TRT/AlignL2"
+    else:
+        if (not flags.Detector.SimulateTRT) or flags.Detector.OverlayTRT:
+            acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Align","/TRT/Align",className="AlignableTransformContainer"))
+        else:
+            acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Align","/TRT/Align"))
+    if flags.Common.Project is not "AthSimulation": # Protection for AthSimulation builds
+        if (not flags.Detector.SimulateTRT) or flags.Detector.OverlayTRT:
+            acc.addCondAlgo(TRTAlignCondAlg)
+
+    return acc
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/test/TRT_GMConfig_test.py b/InnerDetector/InDetDetDescr/TRT_GeoModel/test/TRT_GMConfig_test.py
new file mode 100755
index 0000000000000000000000000000000000000000..4bd3f95734a230d6a8488ad479d154c80fe13457
--- /dev/null
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/test/TRT_GMConfig_test.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+"""Run tests on TRT_GeoModel configuration
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+if __name__ == "__main__":
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    from AthenaConfiguration.TestDefaults import defaultTestFiles
+
+    ConfigFlags.Input.Files = defaultTestFiles.HITS
+    ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
+    ConfigFlags.Detector.SimulatePixel = False
+    ConfigFlags.Detector.SimulateSCT   = False
+    ConfigFlags.Detector.SimulateTRT   = False
+    ConfigFlags.GeoModel.Align.Dynamic    = False
+    ConfigFlags.lock()
+
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
+    acc = TRT_GeometryCfg(ConfigFlags)
+    f=open('TRT_GeometryCfg.pkl','w')
+    acc.store(f)
+    f.close()
diff --git a/LArCalorimeter/LArConfiguration/CMakeLists.txt b/LArCalorimeter/LArConfiguration/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..39c8eb53fd2c2d782f296717e6cf4f000d1dbbe0
--- /dev/null
+++ b/LArCalorimeter/LArConfiguration/CMakeLists.txt
@@ -0,0 +1,10 @@
+################################################################################
+# Package: LArConfiguration
+################################################################################
+
+# Declare the package name:
+atlas_subdir( LArConfiguration )
+
+# Install files from the package:
+atlas_install_python_modules( python/*.py )
+
diff --git a/LArCalorimeter/LArCellRec/python/LArConfigFlags.py b/LArCalorimeter/LArConfiguration/python/LArConfigFlags.py
similarity index 100%
rename from LArCalorimeter/LArCellRec/python/LArConfigFlags.py
rename to LArCalorimeter/LArConfiguration/python/LArConfigFlags.py
diff --git a/LArCalorimeter/LArConfiguration/python/__init__.py b/LArCalorimeter/LArConfiguration/python/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..4e669a90b8bb38f0bfd2b2b839d01aa2194e673f
--- /dev/null
+++ b/LArCalorimeter/LArConfiguration/python/__init__.py
@@ -0,0 +1 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
diff --git a/MuonSpectrometer/MuonConfig/CMakeLists.txt b/MuonSpectrometer/MuonConfig/CMakeLists.txt
index b5ec0f265afecc5cf771639a7a7585d5eccbfada..75e9962eb281e4ac9cf4e781350fd53c0e6f0264 100644
--- a/MuonSpectrometer/MuonConfig/CMakeLists.txt
+++ b/MuonSpectrometer/MuonConfig/CMakeLists.txt
@@ -10,31 +10,33 @@ atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 atlas_install_data( share/*.ref )
 
-# Configure unit tests
-# Cache alignment will change depending on whether FRONTIER_SERVER is defined.
-file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_MuonDataDecodeTest )
-atlas_add_test( MuonDataDecodeTest
-                PROPERTIES TIMEOUT 1000
-                PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_MuonDataDecodeTest
-                EXTRA_PATTERNS "GeoModelSvc.MuonDetectorTool.*SZ=|Cache alignment|Range of input|recorded new|map from|DEBUG Reconciled configuration"
-                SCRIPT test/testMuonDataDecode.sh )
+if( NOT SIMULATIONBASE )
+   # Configure unit tests
+   # Cache alignment will change depending on whether FRONTIER_SERVER is defined.
+   file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_MuonDataDecodeTest )
+   atlas_add_test( MuonDataDecodeTest
+                   PROPERTIES TIMEOUT 1000
+                   PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_MuonDataDecodeTest
+                   EXTRA_PATTERNS "GeoModelSvc.MuonDetectorTool.*SZ=|Cache alignment|Range of input|recorded new|map from|DEBUG Reconciled configuration"
+                   SCRIPT test/testMuonDataDecode.sh )
 
-# Adding an identical test for the ByteStream identifiable caches (and future RDO caches)
-file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_MuonDataDecodeTest_Cache )
-atlas_add_test( MuonDataDecodeTest_Cache
-                PROPERTIES TIMEOUT 1000
-                PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_MuonDataDecodeTest_Cache
-                EXTRA_PATTERNS "GeoModelSvc.MuonDetectorTool.*SZ=|Cache alignment|Range of input|recorded new|map from"
-                SCRIPT test/testMuonDataDecode_Cache.sh )
+   # Adding an identical test for the ByteStream identifiable caches (and future RDO caches)
+   file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_MuonDataDecodeTest_Cache )
+   atlas_add_test( MuonDataDecodeTest_Cache
+                   PROPERTIES TIMEOUT 1000
+                   PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_MuonDataDecodeTest_Cache
+                   EXTRA_PATTERNS "GeoModelSvc.MuonDetectorTool.*SZ=|Cache alignment|Range of input|recorded new|map from"
+                   SCRIPT test/testMuonDataDecode_Cache.sh )
 
-atlas_add_test( MuonCablingConfigTest
-   SCRIPT python -m MuonConfig.MuonCablingConfig
-   POST_EXEC_SCRIPT nopost.sh )
+   atlas_add_test( MuonCablingConfigTest
+                   SCRIPT python -m MuonConfig.MuonCablingConfig
+                   POST_EXEC_SCRIPT nopost.sh )
 
-atlas_add_test( MuonReconstructionConfigTest
-   SCRIPT python -m MuonConfig.MuonReconstructionConfig
-   POST_EXEC_SCRIPT nopost.sh )
+   atlas_add_test( MuonReconstructionConfigTest
+                   SCRIPT python -m MuonConfig.MuonReconstructionConfig
+                   POST_EXEC_SCRIPT nopost.sh )
 
-atlas_add_test( MuonSegmentFindingConfigTest
-   SCRIPT python -m MuonConfig.MuonSegmentFindingConfig
-   POST_EXEC_SCRIPT nopost.sh )
+   atlas_add_test( MuonSegmentFindingConfigTest
+                   SCRIPT python -m MuonConfig.MuonSegmentFindingConfig
+                   POST_EXEC_SCRIPT nopost.sh )
+endif()
diff --git a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
index d3c05941d48d12a53f639c1cc8b1f39c3c21e2fe..fe628090392997c2f8fc80a4d0c399c5a5afd4ae 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
@@ -1,9 +1,11 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-from AtlasGeoModel.GeoModelConfig import GeoModelCfg    
+from AtlasGeoModel.GeoModelConfig import GeoModelCfg
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
 from MuonIdHelpers.MuonIdHelpersConf import Muon__MuonIdHelperTool
+from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc
+from MuonAGDD.MuonAGDDConf import MuonAGDDTool, NSWAGDDTool
 from StoreGate.StoreGateConf import StoreGateSvc
 
 def MuonGeoModelCfg(flags):
@@ -15,7 +17,35 @@ def MuonGeoModelCfg(flags):
 
     detTool = MuonDetectorTool()
     detTool.UseConditionDb = 1
-    detTool.UseIlinesFromGM = 1    
+    detTool.UseIlinesFromGM = 1
+    if ( ( not flags.Detector.SimulateMuon or flags.Detector.OverlayMuon ) and flags.Common.Project is not "AthSimulation" ):
+        # Needs configuration from MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonAlignConfig.py to be migrated
+        #detTool.TheMuonAlignmentTool = "MuonAlignmentDbTool/MGM_AlignmentDbTool"
+        pass
+    else:
+        detTool.TheMuonAlignmentTool = ""
+        detTool.UseConditionDb = 0
+        detTool.UseAsciiConditionData = 0
+        if flags.Detector.SimulateMuon:
+            detTool.FillCacheInitTime = 0
+            if flags.GeoModel.Run=="RUN3" or flags.GeoModel.Run=="RUN4":
+                MuonDetectorTool.StationSelection  = 2
+                MuonDetectorTool.SelectedStations  = [ "EIL1", "EIL2", "EIL6", "EIL7",
+                                                       "EIS*", "EIL10", "EIL11", "EIL12",
+                                                       "EIL17", "CSS*", "CSL*", "T4E*",
+                                                       "T4F*" ]
+            ## Additional material in the muon system
+            AGDD2Geo = AGDDtoGeoSvc()
+            muonAGDDTool = MuonAGDDTool("MuonSpectrometer", BuildNSW=False)
+            acc.addPublicTool(muonAGDDTool)
+            AGDD2Geo.Builders += [ muonAGDDTool ]
+            if flags.GeoModel.Run=="RUN3" or flags.GeoModel.Run=="RUN4":
+                nswAGDDTool = NSWAGDDTool("NewSmallWheel", Locked=False)
+                nswAGDDTool.Volumes = ["NewSmallWheel"]
+                nswAGDDTool.DefaultDetector = "Muon"
+                acc.addPublicTool(nswAGDDTool)
+            acc.addService(AGDD2Geo)
+
     gms.DetectorTools += [ detTool ]
     acc.addService(gms)
 
diff --git a/Projects/AthSimulation/package_filters.txt b/Projects/AthSimulation/package_filters.txt
index 6f692506e4b23e1367cd0266c9a02b4d84000af1..9cb90575f32a1d9216643ebd483bf225a673380f 100644
--- a/Projects/AthSimulation/package_filters.txt
+++ b/Projects/AthSimulation/package_filters.txt
@@ -202,6 +202,7 @@
 + LArCalorimeter/LArCnv/LArIdCnv
 + LArCalorimeter/LArCnv/LArSimEventAthenaPool
 + LArCalorimeter/LArCnv/LArSimEventTPCnv
++ LArCalorimeter/LArConfiguration
 + LArCalorimeter/LArDetDescr
 + LArCalorimeter/LArElecCalib
 + LArCalorimeter/LArExample/LArConditionsCommon
@@ -237,6 +238,7 @@
 + MuonSpectrometer/MuonCnv/MuonIdCnv
 + MuonSpectrometer/MuonCnv/MuonSimEventAthenaPool
 + MuonSpectrometer/MuonCnv/MuonSimEventTPCnv
++ MuonSpectrometer/MuonConfig
 + MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface
 + MuonSpectrometer/MuonDetDescr/MuonAGDD
 + MuonSpectrometer/MuonDetDescr/MuonAGDDBase
diff --git a/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py b/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py
index 1ed6d0576816fdc0cf38e2d516ad6c19ab96e1b2..c94e0699ec6190c5b900d3d68321746dcef30ce6 100755
--- a/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py
+++ b/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py
@@ -156,7 +156,7 @@ if __name__ == "__main__":
  
 
     # Specify output
-    ConfigFlags.Output.HITFileName = "myHITS.pool.root" #todo change the flag name in AllConfigFlags
+    ConfigFlags.Output.HITSFileName = "myHITS.pool.root"
 
     #set the source of vertex positioning
     #ConfigFlags.Vertex.Source = "VertexOverrideFile.txt"# Vertex.OverrideFile/Vertex.OverrideEventFile