diff --git a/Control/AthenaServices/src/DecisionSvc.cxx b/Control/AthenaServices/src/DecisionSvc.cxx
index c7c97f29fad9cb9cc02d632b596bfc65d4f0a037..8b908983aab9e2033e907ec5a35b6291f7cc04d2 100644
--- a/Control/AthenaServices/src/DecisionSvc.cxx
+++ b/Control/AthenaServices/src/DecisionSvc.cxx
@@ -30,8 +30,8 @@ DecisionSvc::DecisionSvc(const std::string& name,
   m_cutflowSvc("",name),
 #else
   m_cutflowSvc("CutFlowSvc/CutFlowSvc",name),
-  m_algstateSvc("AlgExecStateSvc",name),
 #endif
+  m_algstateSvc("AlgExecStateSvc",name),
   m_eventCount(0)
 {
   declareProperty("CalcStats",m_calcStats);
diff --git a/Event/EventKernel/CMakeLists.txt b/Event/EventKernel/CMakeLists.txt
index 619d812697a34ada91caaee18cdeb47804d6a6d9..47f636f93ee89074087394f9e4f5c1b3b8b54b6b 100644
--- a/Event/EventKernel/CMakeLists.txt
+++ b/Event/EventKernel/CMakeLists.txt
@@ -5,12 +5,20 @@
 # Declare the package name:
 atlas_subdir( EventKernel )
 
+# Possible extra dependencies:
+set( extra_dep )
+set( extra_lib )
+if( NOT SIMULATIONBASE )
+   set( extra_dep Tracking/TrkEvent/VxVertex )
+   set( extra_lib VxVertex )
+endif()
+
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
                           Control/DataModel
                           Control/Navigation
                           Control/SGTools
-                          Tracking/TrkEvent/VxVertex )
+                          ${extra_dep} )
 
 # External dependencies:
 find_package( CLHEP )
@@ -23,14 +31,14 @@ atlas_add_library( EventKernel
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} DataModel Navigation SGTools VxVertex
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} DataModel Navigation SGTools ${extra_lib}
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
 
 atlas_add_dictionary( EventKernelDict
                       EventKernel/EventKernelDict.h
                       EventKernel/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} DataModel Navigation SGTools VxVertex EventKernel )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} DataModel Navigation SGTools ${extra_lib} EventKernel )
 
 # Install files from the package:
 atlas_install_python_modules( python/__init__.py python/ParticleDataType.py )
diff --git a/Event/EventKernel/EventKernel/IParticle.h b/Event/EventKernel/EventKernel/IParticle.h
index c6bb8ddfdfa9e137cdec7d6baeb79800b272c5f4..f1c4d5954440f7d0c9547edccc478f47693ebdac 100755
--- a/Event/EventKernel/EventKernel/IParticle.h
+++ b/Event/EventKernel/EventKernel/IParticle.h
@@ -20,8 +20,12 @@
 #include "EventKernel/PdtPdg.h"
 #include "DataModel/ElementLink.h"
 
+#ifndef SIMULATIONBASE
+#ifndef XAOD_ANALYSIS
 // VxVertex includes
 #include "VxVertex/VxContainer.h"
+#endif
+#endif
 
 // Forward declarations
 namespace Trk { class RecVertex; }
@@ -50,8 +54,12 @@ class IParticle : public virtual INavigable4Momentum
   /** Return a RecVertex corresponding to particle Origin  */
   virtual const Trk::RecVertex* origin() const = 0;
 
+#ifndef SIMULATIONBASE
+#ifndef XAOD_ANALYSIS
   /** Return an ElementLink corresponding to particle's Origin */
   virtual const ElementLink<VxContainer>& originLink() const = 0;
+#endif
+#endif
 
   /** method to check if charge information is available*/
   virtual bool hasCharge()         const  = 0;
diff --git a/Event/EventKernel/cmt/requirements b/Event/EventKernel/cmt/requirements
deleted file mode 100755
index e41ed195897f65114b34308856432e56bd9e5fbc..0000000000000000000000000000000000000000
--- a/Event/EventKernel/cmt/requirements
+++ /dev/null
@@ -1,34 +0,0 @@
-package EventKernel
-
-author Many People <many.people@cern.ch>
-
-use AtlasPolicy AtlasPolicy-* 
-use AtlasCLHEP  AtlasCLHEP-*	External
-use DataModel   DataModel-*   Control
-use SGTools     SGTools-*    	Control
-use Navigation	 Navigation-*  Control 
-use VxVertex    VxVertex-*    Tracking/TrkEvent
-
-library EventKernel *.cxx
-apply_pattern installed_library
-
-private 
-use AtlasReflex	AtlasReflex-*	External -no_auto_imports
-
-# Pattern to build the dict lib. User should create a single header
-# file: <package>Dict.h which includes all other .h files. See MissingETDict
-# A selection file must be created by hand. This file lists the
-# classes to be added to the dictionary, and which fields are
-# transient. It should be put in ../<package> dir and is conventionally called
-# selection.xml.
-
-# Must temporarily omit emission of methods - fails to compile
-#removed navigables
-apply_pattern lcgdict dict=EventKernel \
- selectionfile=selection.xml \
- headerfiles="../EventKernel/EventKernelDict.h" 
-
-apply_pattern declare_python_modules files="__init__.py ParticleDataType.py"
-end_private
-
-
diff --git a/Projects/AthSimulation/CMakeLists.txt b/Projects/AthSimulation/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..4dcbed2b229f932dbc311a38fd641ec58d726e17
--- /dev/null
+++ b/Projects/AthSimulation/CMakeLists.txt
@@ -0,0 +1,79 @@
+
+# The minimum required CMake version:
+cmake_minimum_required( VERSION 3.2 FATAL_ERROR )
+
+# Read in the project's version from a file called version.txt. But let it be
+# overridden from the command line if necessary.
+file( READ ${CMAKE_SOURCE_DIR}/version.txt _version )
+string( STRIP ${_version} _version )
+set( ATHSIMULATION_PROJECT_VERSION ${_version}
+   CACHE STRING "Version of the AthSimulation project to build" )
+unset( _version )
+
+# Find the ATLAS CMake code:
+find_package( AtlasCMake QUIET )
+
+# Find the base project(s):
+find_package( AthSimulationExternals REQUIRED )
+find_package( Gaudi REQUIRED )
+
+# Temporarily setting additional compile flags here:
+add_definitions( -DSIMULATIONBASE )
+
+set( SIMULATIONBASE TRUE CACHE BOOL
+   "Flag specifying that this is a simulation release build" )
+
+# Load all the files from the externals/ subdirectory:
+file( GLOB _externals "${CMAKE_CURRENT_SOURCE_DIR}/externals/*.cmake" )
+foreach( _external ${_externals} )
+   include( ${_external} )
+   get_filename_component( _extName ${_external} NAME_WE )
+   string( TOUPPER ${_extName} _extNameUpper )
+   message( STATUS "Taking ${_extName} from: ${${_extNameUpper}_ROOT}" )
+   unset( _extName )
+   unset( _extNameUpper )
+endforeach()
+unset( _external )
+unset( _externals )
+
+# Set up CTest:
+atlas_ctest_setup()
+
+# Declare project name and version
+atlas_project( AthSimulation ${ATHSIMULATION_PROJECT_VERSION}
+   USE AthSimulationExternals 0.0.1
+   PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../
+   FORTRAN )
+
+# Install the external configurations:
+install( DIRECTORY ${CMAKE_SOURCE_DIR}/externals
+   DESTINATION ${CMAKE_INSTALL_CMAKEDIR} USE_SOURCE_PERMISSIONS )
+
+# Generate the environment setup for the externals, to be used during the build:
+lcg_generate_env( SH_FILE ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh )
+
+# Generate replacement rules for the installed paths:
+set( _replacements )
+if( NOT "$ENV{NICOS_PROJECT_HOME}" STREQUAL "" )
+   get_filename_component( _buildDir $ENV{NICOS_PROJECT_HOME} PATH )
+   list( APPEND _replacements ${_buildDir} "\${AthSimulation_DIR}/../../../.." )
+endif()
+if( NOT "$ENV{NICOS_PROJECT_RELNAME}" STREQUAL "" )
+   list( APPEND _replacements $ENV{NICOS_PROJECT_RELNAME}
+      "\${AthSimulation_VERSION}" )
+endif()
+
+# Now generate and install the installed setup files:
+lcg_generate_env( SH_FILE ${CMAKE_BINARY_DIR}/env_setup_install.sh
+   REPLACE ${_replacements} )
+install( FILES ${CMAKE_BINARY_DIR}/env_setup_install.sh
+   DESTINATION . RENAME env_setup.sh )
+
+# Configure and install the post-configuration file:
+configure_file( ${CMAKE_SOURCE_DIR}/PostConfig.cmake.in
+   ${CMAKE_BINARY_DIR}/PostConfig.cmake @ONLY )
+install( FILES ${CMAKE_BINARY_DIR}/PostConfig.cmake
+   DESTINATION ${CMAKE_INSTALL_CMAKEDIR} )
+
+# Package up the release using CPack:
+atlas_cpack_setup()
diff --git a/Projects/AthSimulation/PostConfig.cmake.in b/Projects/AthSimulation/PostConfig.cmake.in
new file mode 100644
index 0000000000000000000000000000000000000000..6a201c5346f60ee4fc64c726dbcfd38da47a4f0c
--- /dev/null
+++ b/Projects/AthSimulation/PostConfig.cmake.in
@@ -0,0 +1,30 @@
+#
+# File taking care of pointing the downstream projects at the right
+# version of the externals.
+#
+
+# Find Gaudi:
+find_package( Gaudi REQUIRED )
+
+# Temporarily setting additional compile flags here:
+add_definitions( -DSIMULATIONBASE )
+
+set( SIMULATIONBASE TRUE CACHE BOOL
+   "Flag specifying that this is a simulation release build" )
+
+# Load all the files from the externals/ subdirectory:
+get_filename_component( _thisdir ${CMAKE_CURRENT_LIST_FILE} PATH )
+file( GLOB _externals "${_thisdir}/externals/*.cmake" )
+unset( _thisdir )
+foreach( _external ${_externals} )
+   include( ${_external} )
+   get_filename_component( _extName ${_external} NAME_WE )
+   string( TOUPPER ${_extName} _extNameUpper )
+   if( NOT AthSimulation_FIND_QUIETLY )
+      message( STATUS "Taking ${_extName} from: ${${_extNameUpper}_ROOT}" )
+   endif()
+   unset( _extName )
+   unset( _extNameUpper )
+endforeach()
+unset( _external )
+unset( _externals )
diff --git a/Projects/AthSimulation/README.md b/Projects/AthSimulation/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..9ad8649db0581f69e9cccb57cd074478b7f89db4
--- /dev/null
+++ b/Projects/AthSimulation/README.md
@@ -0,0 +1,38 @@
+The AthSimulation Project
+=======================================
+
+This is the configuration for building the parts of the offline
+software necessary to run G4 simulation from the repository.
+
+Build Instructions
+------------------
+
+To build the externals necessary for building this project itself, use the
+
+    build_externals.sh
+
+script. It will build all the externals necessary for this project into a
+subdirectory of the directory holding this repository, called `build`.
+
+The sources of the externals will be checked out under `build/src`, the
+build of the projects will commence under `build/build`, and the results of
+the build will be installed under `build/install`.
+
+RPMs created from the externals are copied under `build/` by the script.
+
+Once the externals have finished building, you can initiate the full build
+of the project against these newly built externals by executing the
+
+    build.sh
+
+script. It uses the same directory layout inside the `build` directory as
+was used for the externals.
+
+Custom Builds
+-------------
+
+Of course it is perfectly allowed to set up a build by hand, not using the
+`build.sh` script as well. In that case you have to make sure to have a
+functional version of AthSimulationExternals set up in your environment, and point
+the `GAUDI_ROOT` environment variable against the Gaudi version that you
+want to use for the build.
diff --git a/Projects/AthSimulation/build.sh b/Projects/AthSimulation/build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..b972dd68c32665c1bdf8b5074fbdd3405ad0666e
--- /dev/null
+++ b/Projects/AthSimulation/build.sh
@@ -0,0 +1,126 @@
+#!/bin/bash
+#
+# Script for building the release on top of externals built using one of the
+# scripts in this directory.
+#
+
+# Function printing the usage information for the script
+usage() {
+    echo "Usage: build.sh [-t build type] [-b build dir] [-c] [-m] [-i] [-p] [-a]"
+    echo " -c: Execute CMake step"
+    echo " -m: Execute make step"
+    echo " -i: Execute install step"
+    echo " -p: Execute CPack step"
+    echo " -a: Abort on error"
+    echo "If none of the c, m, i or p options are set then the script will do"
+    echo "*all* steps. Otherwise only the enabled steps are run - it's your"
+    echo "reponsibility to ensure that precusors are in good shape"
+}
+
+# Parse the command line arguments:
+BUILDDIR=""
+BUILDTYPE="RelWithDebInfo"
+EXE_CMAKE=""
+EXE_MAKE=""
+EXE_INSTALL=""
+EXE_CPACK=""
+NIGHTLY=true
+while getopts ":t:b:hcmipa" opt; do
+    case $opt in
+        t)
+            BUILDTYPE=$OPTARG
+            ;;
+        b)
+            BUILDDIR=$OPTARG
+            ;;
+	c)
+	    EXE_CMAKE="1"
+	    ;;
+	m)
+	    EXE_MAKE="1"
+	    ;;
+	i)
+	    EXE_INSTALL="1"
+	    ;;
+	p)
+	    EXE_CPACK="1"
+	    ;;
+	a)
+	    NIGHTLY=false
+	    ;;
+        h)
+            usage
+            exit 0
+            ;;
+        :)
+            echo "Argument -$OPTARG requires a parameter!"
+            usage
+            exit 1
+            ;;
+        ?)
+            echo "Unknown argument: -$OPTARG"
+            usage
+            exit 1
+            ;;
+    esac
+done
+
+# If no step was explicitly specified, turn them all on:
+if [ -z "$EXE_CMAKE" -a -z "$EXE_MAKE" -a -z "$EXE_INSTALL" -a -z "$EXE_CPACK" ]; then
+    EXE_CMAKE="1"
+    EXE_MAKE="1"
+    EXE_INSTALL="1"
+    EXE_CPACK="1"
+fi
+
+# Stop on errors from here on out:
+set -e
+# consider a pipe failed if ANY of the commands fails
+set -o pipefail
+
+# Source in our environment
+AthSimulationSrcDir=$(dirname ${BASH_SOURCE[0]})
+if [ -z "$BUILDDIR" ]; then
+    BUILDDIR=${AthSimulationSrcDir}/../../../build
+fi
+mkdir -p ${BUILDDIR}
+BUILDDIR=$(cd ${BUILDDIR} && pwd)
+source $AthSimulationSrcDir/build_env.sh -b $BUILDDIR
+
+# create the actual build directory
+mkdir -p ${BUILDDIR}/build/AthSimulation
+cd ${BUILDDIR}/build/AthSimulation
+
+# CMake:
+if [ -n "$EXE_CMAKE" ]; then
+    # Remove the CMakeCache.txt file, to force CMake to find externals
+    # from scratch in an incremental build.
+    rm -f CMakeCache.txt
+    # Now run the actual CMake configuration:
+    time cmake -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \
+        -DCTEST_USE_LAUNCHERS:BOOL=TRUE \
+        ${AthSimulationSrcDir} 2>&1 | tee cmake_config.log
+fi
+
+# for nightly builds we want to get as far as we can
+if [ "$NIGHTLY" = true ]; then
+    # At this point stop worrying about errors:
+    set +e
+fi
+
+# make:
+if [ -n "$EXE_MAKE" ]; then
+    time make -k 2>&1 | tee cmake_build.log
+fi
+
+# Install the results:
+if [ -n "$EXE_INSTALL" ]; then
+    time make install/fast \
+	DESTDIR=${BUILDDIR}/install/AthSimulation/${NICOS_PROJECT_VERSION} 2>&1 | tee cmake_install.log
+fi
+
+# Build an RPM for the release:
+if [ -n "$EXE_CPACK" ]; then
+    time cpack 2>&1 | tee cmake_cpack.log
+    cp AthSimulation*.rpm ${BUILDDIR}/
+fi
diff --git a/Projects/AthSimulation/build_env.sh b/Projects/AthSimulation/build_env.sh
new file mode 100644
index 0000000000000000000000000000000000000000..42c66666b0eeeb0affc52d3c31a9d64838913b86
--- /dev/null
+++ b/Projects/AthSimulation/build_env.sh
@@ -0,0 +1,104 @@
+# This script sets up the build enironment for an AthSimulation
+# build, on top of a built set of externals (including Gaudi)
+#
+# This script is kept separate from the build.sh
+# wrapper so it can be sourced separately from it when
+# clients want to manage their own build and just want
+# to setup the build environment
+
+env_usage() {
+    echo "Usage: build_env.sh [-b build dir]"
+}
+
+# This function actually sets up the environment for us
+# (factorise it here in case it needs skipped)
+env_setup() {
+    startdir=$(pwd)
+    # As this script can be sourced we need to support zsh and
+    # possibly other Bourne shells
+    if [ "x${BASH_SOURCE[0]}" = "x" ]; then
+    # This trick should do the right thing under ZSH:
+	thisdir=$(dirname `print -P %x`)
+	if [ $? != 0 ]; then
+            echo "ERROR: This script must be sourced from BASH or ZSH"
+            return 1
+	fi
+    else
+    # The BASH solution is a bit more straight forward:
+	thisdir=$(dirname ${BASH_SOURCE[0]})
+    fi
+    AthSimulationSrcDir=$(cd ${thisdir};pwd)
+
+    # The directory holding the helper scripts:
+    scriptsdir=${AthSimulationSrcDir}/../../Build/AtlasBuildScripts
+
+    # Go to the main directory of the repository:
+    cd ${AthSimulationSrcDir}/../..
+
+    # Check if the user specified any source/build directories:
+    if [ "$BUILDDIR" = "" ]; then
+	BUILDDIR=${AthSimulationSrcDir}/../../../build
+    fi
+
+    # Set up the environment for the build:
+    export NICOS_PROJECT_VERSION=`cat ${AthSimulationSrcDir}/version.txt`
+    export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION}
+    export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION}
+    export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AthSimulation
+
+    # Set up the environment variables for finding LCG externals:
+    source ${scriptsdir}/LCG_RELEASE_BASE.sh
+
+    # Set up the AthSimulationExternals project:
+    extDir=${BUILDDIR}/install/AthSimulationExternals/${NICOS_PROJECT_VERSION}/InstallArea
+    if [ ! -d ${extDir} ]; then
+	echo "Didn't find the AthSimulationExternals project under ${extDir}"
+    fi
+    echo "Setting up AthSimulationExternals from: ${extDir}"
+    source ${extDir}/*/setup.sh
+
+    # Get the "platform name" from the directory created by the AthSimulationExternals
+    # build:
+    platform=$(cd ${extDir};ls)
+
+    # Point to Gaudi:
+    export GAUDI_ROOT=${BUILDDIR}/install/GAUDI/${NICOS_PROJECT_VERSION}/InstallArea/${platform}
+    echo "Taking Gaudi from: ${GAUDI_ROOT}"
+
+    cd $startdir
+}
+
+# we need to reset the option index as we are sourcing this script
+# http://stackoverflow.com/questions/23581368/bug-in-parsing-args-with-getopts-in-bash
+OPTIND=1
+
+# Parse the command line arguments:
+BUILDDIR=""
+while getopts "b:h" opt; do
+    case $opt in
+        b)
+            BUILDDIR=$OPTARG
+            ;;
+	h)
+	    env_usage
+	    ABORT=1
+	    ;;
+        :)
+            echo "Argument -$OPTARG requires a parameter!"
+            env_usage
+	    ABORT=1
+            ;;
+        ?)
+            echo "Unknown argument: -$OPTARG"
+            env_usage
+	    ABORT=1
+            ;;
+    esac
+done
+
+# Put a big wrapper around bad argument case, because
+# a sourced script should not call "exit". This is quite
+# annoying...
+if [ -z "$ABORT" ]; then
+    env_setup
+fi
diff --git a/Projects/AthSimulation/build_externals.sh b/Projects/AthSimulation/build_externals.sh
new file mode 100755
index 0000000000000000000000000000000000000000..16b6543574c735452a3f22a47877799270a481ff
--- /dev/null
+++ b/Projects/AthSimulation/build_externals.sh
@@ -0,0 +1,154 @@
+#!/bin/bash
+#
+# Script building all the externals necessary for the nightly build.
+#
+
+# Function printing the usage information for the script
+usage() {
+    echo "Usage: build_externals.sh [-t build_type] [-b build_dir] [-f] [-c]"
+    echo " -f: Force rebuild of externals from scratch, otherwise if script"
+    echo "     finds an external build present it will only do an incremental"
+    echo "     build"
+    echo " -c: Build the externals for the continuous integration (CI) system,"
+    echo "     skipping the build of the externals RPMs."
+    echo "If a build_dir is not given the default is '../build'"
+    echo "relative to the athena checkout"
+}
+
+# Parse the command line arguments:
+BUILDDIR=""
+BUILDTYPE="RelWithDebInfo"
+FORCE=""
+CI=""
+while getopts ":t:b:fch" opt; do
+    case $opt in
+        t)
+            BUILDTYPE=$OPTARG
+            ;;
+        b)
+            BUILDDIR=$OPTARG
+            ;;
+        f)
+            FORCE="1"
+            ;;
+        c)
+            CI="1"
+            ;;
+        h)
+            usage
+            exit 0
+            ;;
+        :)
+            echo "Argument -$OPTARG requires a parameter!"
+            usage
+            exit 1
+            ;;
+        ?)
+            echo "Unknown argument: -$OPTARG"
+            usage
+            exit 1
+            ;;
+    esac
+done
+
+# Version comparison function. Taken from a StackOverflow article.
+verlte() {
+    if [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; then
+        return 1
+    fi
+    return 0
+}
+
+# First off, check that we are using a new enough version of Git. We need
+# at least version 1.8.1.
+git_min_version=1.8.1
+git_version=`git --version | awk '{print $3}'`
+verlte "${git_min_version}" "${git_version}"
+if [ $? = 0 ]; then
+    echo "Detected git version (${git_version}) not new enough."
+    echo "Need at least: ${git_min_version}"
+    exit 1
+fi
+
+# Stop on errors from here on out:
+set -e
+
+# We are in BASH, get the path of this script in a simple way:
+thisdir=$(dirname ${BASH_SOURCE[0]})
+thisdir=$(cd ${thisdir};pwd)
+
+# Go to the main directory of the repository:
+cd ${thisdir}/../..
+
+# Check if the user specified any source/build directories:
+if [ "$BUILDDIR" = "" ]; then
+    BUILDDIR=${thisdir}/../../../build
+fi
+mkdir -p ${BUILDDIR}
+BUILDDIR=$(cd $BUILDDIR; pwd)
+
+if [ "$FORCE" = "1" ]; then
+    echo "Force deleting existing build area..."
+    rm -fr ${BUILDDIR}/install/AthSimulationExternals ${BUILDDIR}/install/GAUDI
+    rm -fr ${BUILDDIR}/src/AthSimulationExternals ${BUILDDIR}/src/GAUDI
+    rm -fr ${BUILDDIR}/build/AthSimulationExternals ${BUILDDIR}/build/GAUDI
+fi
+
+# Create some directories:
+mkdir -p ${BUILDDIR}/install
+
+# Set some environment variables that the builds use internally:
+export NICOS_PROJECT_VERSION=`cat ${thisdir}/version.txt`
+export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION}
+export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION}
+
+# The directory holding the helper scripts:
+scriptsdir=${thisdir}/../../Build/AtlasBuildScripts
+scriptsdir=$(cd ${scriptsdir}; pwd)
+
+# Set the environment variable for finding LCG releases:
+source ${scriptsdir}/LCG_RELEASE_BASE.sh
+
+# Flag for triggering the build of RPMs for the externals:
+RPMOPTIONS="-r ${BUILDDIR}"
+if [ "$CI" = "1" ]; then
+    RPMOPTIONS=
+fi
+
+# Read in the tag/branch to use for AthSimulationExternals:
+AthSimulationExternalsVersion=$(awk '/^AthSimulationExternalsVersion/{print $3}' ${thisdir}/externals.txt)
+
+# Check out AthSimulationExternals from the right branch/tag:
+${scriptsdir}/checkout_atlasexternals.sh \
+    -t ${AthSimulationExternalsVersion} \
+    -s ${BUILDDIR}/src/AthSimulationExternals
+
+# Build AthSimulationExternals:
+export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AthSimulationExternals
+${scriptsdir}/build_atlasexternals.sh \
+    -s ${BUILDDIR}/src/AthSimulationExternals \
+    -b ${BUILDDIR}/build/AthSimulationExternals \
+    -i ${BUILDDIR}/install/AthSimulationExternals/${NICOS_PROJECT_VERSION} \
+    -p AthSimulationExternals ${RPMOPTIONS} -t ${BUILDTYPE} \
+    -v ${NICOS_PROJECT_VERSION}
+
+# Get the "platform name" from the directory created by the AthSimulationExternals
+# build:
+platform=$(cd ${BUILDDIR}/install/AthSimulationExternals/${NICOS_PROJECT_VERSION}/InstallArea;ls)
+
+# Read in the tag/branch to use for Gaudi:
+GaudiVersion=$(awk '/^GaudiVersion/{print $3}' ${thisdir}/externals.txt)
+
+# Check out Gaudi from the right branch/tag:
+${scriptsdir}/checkout_Gaudi.sh \
+    -t ${GaudiVersion} \
+    -s ${BUILDDIR}/src/GAUDI
+
+# Build Gaudi:
+export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/GAUDI
+${scriptsdir}/build_Gaudi.sh \
+    -s ${BUILDDIR}/src/GAUDI \
+    -b ${BUILDDIR}/build/GAUDI \
+    -i ${BUILDDIR}/install/GAUDI/${NICOS_PROJECT_VERSION} \
+    -e ${BUILDDIR}/install/AthSimulationExternals/${NICOS_PROJECT_VERSION}/InstallArea/${platform} \
+    -p AthSimulationExternals -f ${platform} ${RPMOPTIONS} -t ${BUILDTYPE}
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
new file mode 100644
index 0000000000000000000000000000000000000000..58117f98dafaa88392c8f5a0861d111bc34b0df2
--- /dev/null
+++ b/Projects/AthSimulation/externals.txt
@@ -0,0 +1,9 @@
+# Versions of the various externals to build before starting the build of
+# this project, when doing a full stack nightly build.
+#
+# Remember that when specifying the name of a branch, you *must* put
+# an "origin/" prefix before it. For tags however this is explicitly
+# forbidden.
+
+AthSimulationExternalsVersion = 8d075c9c
+GaudiVersion = v28r1.conditions.009
diff --git a/Projects/AthSimulation/externals/HEPUtils.cmake b/Projects/AthSimulation/externals/HEPUtils.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..f16c2e48e92c56530f74d9e87b43b7109d860a3e
--- /dev/null
+++ b/Projects/AthSimulation/externals/HEPUtils.cmake
@@ -0,0 +1,7 @@
+#
+# File specifying the location of HEPUtils to use.
+#
+
+set( HEPUTILS_VERSION 1.1.0 )
+set( HEPUTILS_ROOT
+   ${LCG_RELEASE_DIR}/MCGenerators/heputils/${HEPUTILS_VERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthSimulation/externals/MCUtils.cmake b/Projects/AthSimulation/externals/MCUtils.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..5fd191cfe6159b5c67aef98b53b8d38960e2d47a
--- /dev/null
+++ b/Projects/AthSimulation/externals/MCUtils.cmake
@@ -0,0 +1,7 @@
+#
+# File specifying the location of MCUtils to use.
+#
+
+set( MCUTILS_VERSION 1.2.1 )
+set( MCUTILS_ROOT
+   ${LCG_RELEASE_DIR}/MCGenerators/mcutils/${MCUTILS_VERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthSimulation/externals/README.md b/Projects/AthSimulation/externals/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..fefec01c5dd69345aaed504db51b2499744f3e1e
--- /dev/null
+++ b/Projects/AthSimulation/externals/README.md
@@ -0,0 +1,20 @@
+Directory collecting external package declarations
+==================================================
+
+This directory is used to collect simple CMake files that get included by
+the CMake configuration to set up the locations of all the externals used
+for the offline release build.
+
+Each external should be defined by its own CMake file. The files should
+have a name <Bla> corresponding to the Find<Bla> module name used to find
+the external in question.
+
+The files should define all the variables expected by the Find<Bla> modules,
+which normally boil down to variables:
+
+`EXTNAME_ROOT`
+`EXTNAME_VERSION`
+
+But some modules may require other variables. In which case the `_ROOT`
+variable should still be set, to get a nice printout from the Athena
+project during the build about the location of the used external.
diff --git a/Projects/AthSimulation/externals/YODA.cmake b/Projects/AthSimulation/externals/YODA.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..9d7213d9cd010538e07fc581667dae8ffc240a48
--- /dev/null
+++ b/Projects/AthSimulation/externals/YODA.cmake
@@ -0,0 +1,7 @@
+#
+# File specifying the location of YODA to use.
+#
+
+set( YODA_VERSION 1.6.6 )
+set( YODA_ROOT
+   ${LCG_RELEASE_DIR}/MCGenerators/yoda/${YODA_VERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthSimulation/package_filters.txt b/Projects/AthSimulation/package_filters.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c2997cfde700503f8a145f2c7bdb63a084fdaa23
--- /dev/null
+++ b/Projects/AthSimulation/package_filters.txt
@@ -0,0 +1,361 @@
+#
+# Package filtering rules for the AthSimulation project build.
+#
+
++ AtlasGeometryCommon/BeamPipeGeoModel
++ AtlasGeometryCommon/GeoModelEnvelopes
++ AtlasGeometryCommon/Interpreters
++ AtlasGeometryCommon/SubDetectorEnvelopes
++ AtlasTest/NightlyTestTools/ATNight
++ AtlasTest/NightlyTestTools/Nicos
++ AtlasTest/TestTools
++ Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv
++ Calorimeter/CaloCnv/CaloIdCnv
++ Calorimeter/CaloCnv/CaloSimEventAthenaPool
++ Calorimeter/CaloCnv/CaloSimEventTPCnv
++ Calorimeter/CaloCondBlobAlgs
++ Calorimeter/CaloCondBlobObjs
++ Calorimeter/CaloConditions
++ Calorimeter/CaloDetDescr
++ Calorimeter/CaloDmDetDescr
++ Calorimeter/CaloG4Sim
++ Calorimeter/CaloGeoHelpers
++ Calorimeter/CaloIdentifier
++ Calorimeter/CaloSimEvent
++ Control/AthAllocators
++ Control/AthContainers
++ Control/AthContainersInterfaces
++ Control/AthContainersRoot
++ Control/AthLinks
++ Control/AthToolSupport/AsgTools
++ Control/AthenaBaseComps
++ Control/AthenaCommon
++ Control/AthenaInterprocess
++ Control/AthenaKernel
++ Control/AthenaMP
++ Control/AthenaMPTools
++ Control/AthenaPython
++ Control/AthenaServices
++ Control/CLIDComps
++ Control/CLIDSvc
++ Control/CxxUtils
++ Control/DataModel
++ Control/DataModelAthenaPool
++ Control/DataModelRoot
++ Control/GaudiSequencer
++ Control/IOVSvc
++ Control/MinimalRunTime
++ Control/Navigation
++ Control/PerformanceMonitoring/PerfMonAna
++ Control/PerformanceMonitoring/PerfMonComps
++ Control/PerformanceMonitoring/PerfMonEvent
++ Control/PerformanceMonitoring/PerfMonKernel
++ Control/PyKernel
++ Control/RngComps
++ Control/RootUtils
++ Control/SGComps
++ Control/SGMon/SGAudCore
++ Control/SGMon/SGAudSvc
++ Control/SGTools
++ Control/StoreGate
++ Control/StoreGateBindings
++ Control/xAODRootAccess
++ Control/xAODRootAccessInterfaces
++ Database/APR/CollectionBase
++ Database/APR/CollectionUtilities
++ Database/APR/FileCatalog
++ Database/APR/ImplicitCollection
++ Database/APR/POOLCore
++ Database/APR/PersistencySvc
++ Database/APR/RelationalCollection
++ Database/APR/RootCollection
++ Database/APR/RootStorageSvc
++ Database/APR/StorageSvc
++ Database/APR/TrigCollQuery
++ Database/APR/XMLCatalog
++ Database/AthenaPOOL/AthenaPoolCnvSvc
++ Database/AthenaPOOL/AthenaPoolKernel
++ Database/AthenaPOOL/AthenaPoolServices
++ Database/AthenaPOOL/AthenaPoolUtilities
++ Database/AthenaPOOL/DBDataModel
++ Database/AthenaPOOL/EventSelectorAthenaPool
++ Database/AthenaPOOL/OutputStreamAthenaPool
++ Database/AthenaPOOL/PoolSvc
++ Database/AthenaPOOL/RDBAccessSvc
++ Database/AthenaPOOL/RootConversions
++ Database/AthenaPOOL/RootFileTools
++ Database/AthenaPOOL/StlAthenaPoolCnv
++ Database/AthenaRoot/AthenaRootComps
++ Database/AthenaRoot/AthenaRootKernel
++ Database/AthenaRoot/RootAuxDynIO
++ Database/AtlasSTLAddReflex
++ Database/AtlasSealCLHEP
++ Database/CondDBObjects
++ Database/ConnectionManagement/AtlasAuthentication
++ Database/ConnectionManagement/DBReplicaSvc
++ Database/CoraCool
++ Database/IOVDbAthenaPool
++ Database/IOVDbDataModel
++ Database/IOVDbMetaDataTools
++ Database/IOVDbPTCnv
++ Database/IOVDbSvc
++ Database/IOVDbTPCnv
++ Database/PersistentDataModel
++ Database/PersistentDataModelAthenaPool
++ Database/PersistentDataModelTPCnv
++ Database/RegistrationServices
++ Database/TPTools
++ DetectorDescription/AGDD/AGDD2GeoSvc
++ DetectorDescription/AGDD/AGDDControl
++ DetectorDescription/AGDD/AGDDHandlers
++ DetectorDescription/AGDD/AGDDKernel
++ DetectorDescription/AGDD/AGDDModel
++ DetectorDescription/AtlasDetDescr
++ DetectorDescription/DetDescrCnvSvc
++ DetectorDescription/DetDescrCond/DetDescrCondAthenaPool
++ DetectorDescription/DetDescrCond/DetDescrCondTPCnv
++ DetectorDescription/DetDescrCond/DetDescrCondTools
++ DetectorDescription/DetDescrCond/DetDescrConditions
++ DetectorDescription/DetDescrDictionary
++ DetectorDescription/GeoModel/AtlasGeoModel
++ DetectorDescription/GeoModel/GeoModelInterfaces
++ DetectorDescription/GeoModel/GeoModelKernel
++ DetectorDescription/GeoModel/GeoModelSvc
++ DetectorDescription/GeoModel/GeoModelUtilities
++ DetectorDescription/GeoModel/GeoSpecialShapes
++ DetectorDescription/GeoPrimitives
++ DetectorDescription/GeometryDBSvc
++ DetectorDescription/IdDict
++ DetectorDescription/IdDictDetDescr
++ DetectorDescription/IdDictDetDescrCnv
++ DetectorDescription/IdDictParser
++ DetectorDescription/Identifier
++ Event/EventAthenaPool
++ Event/EventBookkeeperAthenaPool
++ Event/EventBookkeeperMetaData
++ Event/EventBookkeeperTPCnv
++ Event/EventCommonAthenaPool
++ Event/EventCommonTPCnv
++ Event/EventContainers
++ Event/EventInfo
++ Event/EventInfoMgt
++ Event/EventKernel
++ Event/EventPTCnv
++ Event/EventPrimitives
++ Event/EventTPCnv
++ Event/FourMom
++ Event/NavFourMom
++ Event/xAOD/xAODBase
++ Event/xAOD/xAODCaloEvent
++ Event/xAOD/xAODCore
++ Event/xAOD/xAODCoreAthenaPool
++ Event/xAOD/xAODCoreCnv
++ Event/xAOD/xAODEventFormat
++ Event/xAOD/xAODEventInfo
++ Event/xAOD/xAODJet
++ Event/xAOD/xAODJetAthenaPool
++ Event/xAOD/xAODPrimitives
++ Event/xAOD/xAODTruth
++ Event/xAOD/xAODTruthAthenaPool
++ Event/xAOD/xAODTruthCnv
++ External/AtlasDataArea
++ External/AtlasPyFwdBwdPorts
++ External/CheckerGccPlugins
++ External/pyAMI
++ Generators/GeneratorObjects
++ Generators/GeneratorObjectsAthenaPool
++ Generators/GeneratorObjectsTPCnv
++ Generators/HepMCWeightSvc
++ Generators/McEventSelector
++ Generators/TruthUtils
++ InnerDetector/InDetConditions/InDetBeamSpotService
++ InnerDetector/InDetConditions/InDetByteStreamErrors
++ InnerDetector/InDetConditions/InDetCondFolders
++ InnerDetector/InDetConditions/InDetCondServices
++ InnerDetector/InDetConditions/InDetConditionsAthenaPool
++ InnerDetector/InDetConditions/InDetConditionsSummaryService
++ InnerDetector/InDetConditions/InDetCoolCoralClientUtils
++ InnerDetector/InDetConditions/PixelConditionsData
++ InnerDetector/InDetConditions/PixelConditionsTools
++ InnerDetector/InDetConditions/PixelCoralClientUtils
++ InnerDetector/InDetConditions/SCT_ConditionsData
++ InnerDetector/InDetConditions/SiPropertiesSvc
++ InnerDetector/InDetConditions/TRT_ConditionsAlgs
++ InnerDetector/InDetConditions/TRT_ConditionsData
++ InnerDetector/InDetConditions/TRT_ConditionsServices
++ InnerDetector/InDetDetDescr/BCM_GeoModel
++ InnerDetector/InDetDetDescr/BLM_GeoModel
++ InnerDetector/InDetDetDescr/InDetGeoModelUtils
++ InnerDetector/InDetDetDescr/InDetIdDictFiles
++ InnerDetector/InDetDetDescr/InDetIdentifier
++ InnerDetector/InDetDetDescr/InDetReadoutGeometry
++ InnerDetector/InDetDetDescr/InDetServMatGeoModel
++ InnerDetector/InDetDetDescr/PixelGeoModel
++ InnerDetector/InDetDetDescr/SCT_GeoModel
++ InnerDetector/InDetDetDescr/TRT_GeoModel
++ InnerDetector/InDetDetDescrCnv/InDetIdCnv
++ InnerDetector/InDetEventCnv/InDetSimEventAthenaPool
++ InnerDetector/InDetEventCnv/InDetSimEventTPCnv
++ InnerDetector/InDetG4/BCM_G4_SD
++ InnerDetector/InDetG4/BLM_G4_SD
++ InnerDetector/InDetG4/PixelG4_SD
++ InnerDetector/InDetG4/SCT_G4_SD
++ InnerDetector/InDetG4/TRT_G4Utilities
++ InnerDetector/InDetG4/TRT_G4_SD
++ InnerDetector/InDetSimEvent
++ InnerDetector/InDetSimUtils/TRT_TR_Process
++ LArCalorimeter/LArCOOLConditions
++ LArCalorimeter/LArCabling
++ LArCalorimeter/LArCnv/LArDetMgrDetDescrCnv
++ LArCalorimeter/LArCnv/LArIdCnv
++ LArCalorimeter/LArCnv/LArSimEventAthenaPool
++ LArCalorimeter/LArCnv/LArSimEventTPCnv
++ LArCalorimeter/LArDetDescr
++ LArCalorimeter/LArElecCalib
++ LArCalorimeter/LArExample/LArConditionsCommon
++ LArCalorimeter/LArG4/LArG4Barrel
++ LArCalorimeter/LArG4/LArG4Code
++ LArCalorimeter/LArG4/LArG4EC
++ LArCalorimeter/LArG4/LArG4FCAL
++ LArCalorimeter/LArG4/LArG4FastSimulation
++ LArCalorimeter/LArG4/LArG4HEC
++ LArCalorimeter/LArG4/LArG4MiniFCAL
++ LArCalorimeter/LArG4/LArG4RunControl
++ LArCalorimeter/LArG4/LArG4SD
++ LArCalorimeter/LArG4/LArG4ShowerLib
++ LArCalorimeter/LArG4/LArG4ShowerLibData
++ LArCalorimeter/LArG4/LArG4ShowerLibSvc
++ LArCalorimeter/LArGeoModel/LArGeoAlgsNV
++ LArCalorimeter/LArGeoModel/LArGeoBarrel
++ LArCalorimeter/LArGeoModel/LArGeoCode
++ LArCalorimeter/LArGeoModel/LArGeoEndcap
++ LArCalorimeter/LArGeoModel/LArGeoFcal
++ LArCalorimeter/LArGeoModel/LArGeoHec
++ LArCalorimeter/LArGeoModel/LArGeoMiniFcal
++ LArCalorimeter/LArGeoModel/LArGeoRAL
++ LArCalorimeter/LArGeoModel/LArGeoTBBarrel
++ LArCalorimeter/LArGeoModel/LArHV
++ LArCalorimeter/LArGeoModel/LArReadoutGeometry
++ LArCalorimeter/LArIdentifier
++ LArCalorimeter/LArSimEvent
++ MagneticField/BFieldData
++ MagneticField/MagFieldInterfaces
++ MagneticField/MagFieldServices
++ MagneticField/MagFieldUtils
++ MuonSpectrometer/MuonAlignment/MuonAlignmentData
++ MuonSpectrometer/MuonCnv/MuonIdCnv
++ MuonSpectrometer/MuonCnv/MuonSimEventAthenaPool
++ MuonSpectrometer/MuonCnv/MuonSimEventTPCnv
++ MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface
++ MuonSpectrometer/MuonDetDescr/MuonAGDD
++ MuonSpectrometer/MuonDetDescr/MuonAGDDBase
++ MuonSpectrometer/MuonDetDescr/MuonAGDDDescription
++ MuonSpectrometer/MuonDetDescr/MuonDetDescrUtils
++ MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
++ MuonSpectrometer/MuonG4/MuonG4SD
++ MuonSpectrometer/MuonG4/NSW_Sim
++ MuonSpectrometer/MuonGMdbObjects
++ MuonSpectrometer/MuonGeoModel
++ MuonSpectrometer/MuonIdHelpers
++ MuonSpectrometer/MuonSimEvent
++ Reconstruction/RecAlgs
++ Reconstruction/RecEvent
++ Reconstruction/RecEventAthenaPool
++ Reconstruction/RecEventTPCnv
++ Simulation/Barcode/BarcodeEvent
++ Simulation/Barcode/BarcodeInterfaces
++ Simulation/Barcode/BarcodeServices
++ Simulation/BeamEffects
++ Simulation/G4Atlas/G4AtlasAlg
++ Simulation/G4Atlas/G4AtlasApps
++ Simulation/G4Atlas/G4AtlasControl
++ Simulation/G4Atlas/G4AtlasInterfaces
++ Simulation/G4Atlas/G4AtlasServices
++ Simulation/G4Atlas/G4AtlasTools
++ Simulation/G4Atlas/G4AtlasUtilities
++ Simulation/G4Sim/FADS/FadsKinematics
++ Simulation/G4Sim/FADS/FadsMaterial
++ Simulation/G4Sim/FADS/FadsPackageLoader
++ Simulation/G4Sim/FADS/FadsUtilities
++ Simulation/G4Sim/FADS/FadsXMLParser
++ Simulation/G4Sim/MCTruth
++ Simulation/G4Sim/MCTruthBase
++ Simulation/G4Sim/SimHelpers
++ Simulation/G4Sim/TrackRecord
++ Simulation/G4SimCnv/G4SimAthenaPOOL
++ Simulation/G4SimCnv/G4SimTPCnv
++ Simulation/G4Utilities/G4DebuggingTools
++ Simulation/G4Utilities/G4FastSimulation
++ Simulation/G4Utilities/G4PhysicsLists
++ Simulation/G4Utilities/G4ProfilingTools
++ Simulation/G4Utilities/G4StepLimitation
++ Simulation/G4Utilities/G4TruthStrategies
++ Simulation/G4Utilities/G4UserActions
++ Simulation/G4Utilities/Geo2G4
++ Simulation/G4Utilities/GeoMaterial2G4
++ Simulation/G4Utilities/TrackWriteFastSim
++ Simulation/HitManagement
++ Simulation/ISF/ISF_Config
++ Simulation/ISF/ISF_Core/ISF_Algorithms
++ Simulation/ISF/ISF_Core/ISF_Event
++ Simulation/ISF/ISF_Core/ISF_Interfaces
++ Simulation/ISF/ISF_Core/ISF_Services
++ Simulation/ISF/ISF_Core/ISF_Tools
++ Simulation/ISF/ISF_Example
++ Simulation/ISF/ISF_Geant4/ISF_Geant4CommonServices
++ Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools
++ Simulation/ISF/ISF_Geant4/ISF_Geant4Event
++ Simulation/ISF/ISF_Geant4/ISF_Geant4Interfaces
++ Simulation/ISF/ISF_Geant4/ISF_Geant4Services
++ Simulation/ISF/ISF_Geant4/ISF_Geant4Tools
++ Simulation/ISF/ISF_HepMC/ISF_HepMC_Interfaces
++ Simulation/ISF/ISF_HepMC/ISF_HepMC_Services
++ Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools
++ Simulation/ISF/ISF_SimulationSelectors
++ Simulation/ISF/ISF_Tracking/ISF_TrackingInterfaces
++ Simulation/ISF/ISF_Validation
++ Simulation/Interfaces/HepMC_Interfaces
++ Simulation/RunDependentSim/RunDependentSimComps
++ Simulation/SimuJobTransforms
++ Simulation/SimulationJobOptions
++ Simulation/Tools/AtlasCLHEP_RandomGenerators
++ Simulation/Tools/McEventCollectionFilter
++ TileCalorimeter/TileCalib/TileCalibBlobObjs
++ TileCalorimeter/TileConditions
++ TileCalorimeter/TileDetDescr
++ TileCalorimeter/TileG4/TileAncillary/DeadMaterial
++ TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator
++ TileCalorimeter/TileG4/TileAncillary/TileG4DetDescr
++ TileCalorimeter/TileG4/TileGeoG4Calib
++ TileCalorimeter/TileG4/TileGeoG4SD
++ TileCalorimeter/TileGeoModel
++ TileCalorimeter/TileIdentifier
++ TileCalorimeter/TileSimEvent
++ TileCalorimeter/TileSimUtils
++ TileCalorimeter/TileSvc/TileIdCnv
++ TileCalorimeter/TileSvc/TileSimEventAthenaPool
++ TileCalorimeter/TileSvc/TileSimEventTPCnv
++ Tools/AtlasDoxygen
++ Tools/CodeCheck
++ Tools/JobTransforms
++ Tools/KitValidation
++ Tools/PathResolver
++ Tools/PmbCxxUtils
++ Tools/PyCmt
++ Tools/PyJobTransforms
++ Tools/PyUtils
++ Tools/Scripts
++ Tools/XMLCoreParser
++ Tracking/TrkDetDescr/TrkDetDescrUtils
++ Tracking/TrkDetDescr/TrkDetElementBase
++ Tracking/TrkDetDescr/TrkDistortedSurfaces
++ Tracking/TrkDetDescr/TrkSurfaces
++ Tracking/TrkEvent/TrkEventPrimitives
++ Tracking/TrkEvent/TrkNeutralParameters
++ Tracking/TrkEvent/TrkParameters
++ Tracking/TrkEvent/TrkParametersBase
++ Tracking/TrkEvent/TrkTrackLink
+
+
+# Ignore everything else
+- .*
diff --git a/Projects/AthSimulation/version.txt b/Projects/AthSimulation/version.txt
new file mode 100644
index 0000000000000000000000000000000000000000..1d975bef24600397fac77d1374026127c59eb85f
--- /dev/null
+++ b/Projects/AthSimulation/version.txt
@@ -0,0 +1 @@
+22.0.0
diff --git a/Simulation/SimulationJobOptions/share/pileup/postInclude.CavernBackgroundPostBeamDump.py b/Simulation/SimulationJobOptions/share/pileup/postInclude.CavernBackgroundPostBeamDump.py
index 2cd1e452c9c7b76c34a91def9eb81fde03646e41..fb826e0eb86abf2c593aa015a122a023d48aaa06 100644
--- a/Simulation/SimulationJobOptions/share/pileup/postInclude.CavernBackgroundPostBeamDump.py
+++ b/Simulation/SimulationJobOptions/share/pileup/postInclude.CavernBackgroundPostBeamDump.py
@@ -11,7 +11,7 @@
 # all MuonSpectrometer sub-detectors.
 #
 # This job option should be added via the postInclude
-# command line argument. 
+# command line argument.
 #
 #########################################################
 
@@ -29,7 +29,7 @@ if DetFlags.digitize.CSC_on():
         cscxingFolder = ServiceMgr.PileUpMergeSvc.Intervals['CscRange']
         cscxingFolder.FirstXing = -800
         cscxingFolder.LastXing = 800
-        
+
 if DetFlags.digitize.MDT_on():
     if DetFlags.pileup.MDT_on():
         #changing the range of the MDT
@@ -38,7 +38,7 @@ if DetFlags.digitize.MDT_on():
         MDTxingFolder = ServiceMgr.PileUpMergeSvc.Intervals['MdtRange']
         MDTxingFolder.FirstXing = -800
         MDTxingFolder.LastXing = 800
-        
+
 if DetFlags.digitize.RPC_on():
     if DetFlags.pileup.RPC_on():
         #changing the range of the RPC
@@ -47,7 +47,7 @@ if DetFlags.digitize.RPC_on():
         rpcxingFolder = ServiceMgr.PileUpMergeSvc.Intervals['RpcRange']
         rpcxingFolder.FirstXing = -800
         rpcxingFolder.LastXing = 800
-        
+
 if DetFlags.digitize.TGC_on():
     if DetFlags.pileup.TGC_on():
         #changing the range of the TGC
diff --git a/Simulation/SimulationJobOptions/share/pileup/preInclude.CavernBackgroundPostBeamDump.py b/Simulation/SimulationJobOptions/share/pileup/preInclude.CavernBackgroundPostBeamDump.py
index 21fdad2efe1d5f868fbfd325732f90071f4e8075..90433abf9b06ba734360c63f8b8381a4e5bd9bdf 100644
--- a/Simulation/SimulationJobOptions/share/pileup/preInclude.CavernBackgroundPostBeamDump.py
+++ b/Simulation/SimulationJobOptions/share/pileup/preInclude.CavernBackgroundPostBeamDump.py
@@ -250,9 +250,10 @@ JobMaker=[
 ]
 if 'runArgs' in dir():
     if hasattr(runArgs,"jobNumber") and hasattr(runArgs,"maxEvents"):
-    trfJobNumber = runArgs.jobNumber
-    trfMaxEvents = runArgs.maxEvents
-    else: digilog.error('Tried to include RunLumiOverride configuration without knowing this runArgs.jobNumber or runArgs.maxEvents!')
+        trfJobNumber = runArgs.jobNumber
+        trfMaxEvents = runArgs.maxEvents
+    else:
+        digilog.error('Tried to include RunLumiOverride configuration without knowing this runArgs.jobNumber or runArgs.maxEvents!')
 else:
     #this is a test job not a trf job
     trfJobNumber=0