Comparing freezes 12.29 and 12.30.

Differences found for the following packages:

Differences between Geant4 version 10.1.03.01 and 10.1.03.00

bin/downloadData.sh

diff --git a/bin/downloadData.sh b/bin/downloadData.sh
index 3098120..e6f72fd 100755
--- a/bin/downloadData.sh
+++ b/bin/downloadData.sh
@@ -29,7 +29,7 @@ if [ ! -d ${TAR_DIR} ] ; then
 fi
 
 cd ${TAR_DIR}
-wget -np -nd -r -A "*.gz" -N ${ND280_DOWNLOADS}/G4Data/${DATA_VERSION}/
+wget -nv -np -nd -r -A "*.gz" -N ${ND280_DOWNLOADS}/G4Data/${DATA_VERSION}/
 
 echo " Now unpack the tar files in ${TAR_DIR} into ${DATA_DIR}"
 for file in `ls *.tar.gz`

cmake/Geant4Config.cmake

diff --git a/cmake/Geant4Config.cmake b/cmake/Geant4Config.cmake
index ba5bb41..171c7aa 100644
--- a/cmake/Geant4Config.cmake
+++ b/cmake/Geant4Config.cmake
@@ -1,14 +1,21 @@
 machineDependentOutput(OutputDirectory)
 get_filename_component(_currentDirectory "${CMAKE_CURRENT_LIST_FILE}" PATH)
 include(${_currentDirectory}/Geant4-DataVersion.cmake)
-#set(includeFile ${_currentDirectory}/../${OutputDirectory}/src/Geant4-build/Geant4Config.cmake)
-set(includeFile ${_currentDirectory}/../${OutputDirectory}/lib64/Geant4-${DATA_VERSION}/Geant4Config.cmake)
-if (EXISTS ${includeFile} ) 
-  include(${includeFile})
+
+# Check for the installed Geant4 location.
+foreach(includeFile
+    ${_currentDirectory}/../${OutputDirectory}/lib64
+    ${_currentDirectory}/../${OutputDirectory}/lib)
+  if (EXISTS ${includeFile}/Geant4-${DATA_VERSION}/Geant4Config.cmake)
+    include(${includeFile}/Geant4-${DATA_VERSION}/Geant4Config.cmake)
+    break()
   endif()
+endforeach()
+
 if (EXISTS ${_currentDirectory}/../cmake/Geant4ND280_USE.cmake)
   include("${_currentDirectory}/../cmake/Geant4ND280_USE.cmake")
 endif()
+
 #
 # Use an environment variable to flag that we do not want the
 # long list of Geant4 include directories including in the list of

cmake/Geant4ConfigVersion.cmake

diff --git a/cmake/Geant4ConfigVersion.cmake b/cmake/Geant4ConfigVersion.cmake
index edb586a..144dff3 100644
--- a/cmake/Geant4ConfigVersion.cmake
+++ b/cmake/Geant4ConfigVersion.cmake
@@ -9,7 +9,7 @@
 #-----------------------------------------------------------------------
 
 # - Installed Version as set from CMake
-set(PACKAGE_VERSION "10.1.3")
+set(PACKAGE_VERSION "10.1.3.1")
  
 #-----------------------------------------------------------------------
 # Check whether the requested PACKAGE_FIND_VERSION is compatible with this

cmake/Geant4ND280_PostProcess.cmake

diff --git a/cmake/Geant4ND280_PostProcess.cmake b/cmake/Geant4ND280_PostProcess.cmake
index 12b437b..e56ec93 100644
--- a/cmake/Geant4ND280_PostProcess.cmake
+++ b/cmake/Geant4ND280_PostProcess.cmake
@@ -9,11 +9,27 @@ execute_process(COMMAND uname -m
                 OUTPUT_VARIABLE cpu_type
                 OUTPUT_STRIP_TRAILING_WHITESPACE
                 )
-set(libraryDir "lib")
-if(${cpu_type} STREQUAL "x86_64")
-  set(libraryDir "lib64")
+
+# Check for where the library files actually are.
+set(libraryDir "none")
+if(NOT EXISTS "${libraryDir}" AND "${cpu_type}" STREQUAL "x86_64")
+  if (EXISTS "${Geant4ROOT}/${Geant4CONFIG}/lib64")
+    set(libraryDir "${Geant4ROOT}/${Geant4CONFIG}/lib64")
   endif()
-set(temp "-L ${Geant4ROOT}/${Geant4CONFIG}/${libraryDir}")
+endif()
+if (NOT EXISTS "${libraryDir}")
+  if (EXISTS "${Geant4ROOT}/${Geant4CONFIG}/lib")
+    set(libraryDir "${Geant4ROOT}/${Geant4CONFIG}/lib")
+  endif()
+endif()
+if (NOT EXISTS "${libraryDir}")
+  message("Geant4ROOT=${Geant4ROOT}")
+  message("Geant4CONFIG=${Geant4CONFIG}")
+  message("Cannot find the necessary GEANT4 library directory")
+  return()
+endif()
+
+set(temp "-L${libraryDir}")
 foreach(lib ${Geant4_LIBRARIES})
  set(temp ${temp} "-l${lib}")
 endforeach()

cmake/Geant4PackageVersion.cmake

diff --git a/cmake/Geant4PackageVersion.cmake b/cmake/Geant4PackageVersion.cmake
index 5e1e9c5..c2fe6c8 100644
--- a/cmake/Geant4PackageVersion.cmake
+++ b/cmake/Geant4PackageVersion.cmake
@@ -1,2 +1,2 @@
-set(PACKAGE_VERSION 10.1.03.00)
+set(PACKAGE_VERSION 10.1.03.01)
 

doc/GEANTHistory.dox

diff --git a/doc/GEANTHistory.dox b/doc/GEANTHistory.dox
index fac115c..b2c85cc 100644
--- a/doc/GEANTHistory.dox
+++ b/doc/GEANTHistory.dox
@@ -45,4 +45,12 @@ Freeze information:
    Apply patch provided by Vladimir Ivantchenko to fix Landau fluctuation
    bug in the G4UniversalFluctuation model.
 
+\section GEANT_v10r3p0n01_history Version 10.3.00.01
+
+Freeze information:
+   - Freeze Date: Thu Mar   26 12:00:00 2020
+   - Freeze User: Alex Finch
+   - Freeze Host: finchresearchlaptop
+
+   Improve calculation of location of libraryDir in Geant4ND280_Post_Process.cmake.
 */

Differences between externalsMaster version 1.78 and 1.74

.gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..8bbf61b
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,63 @@
+# This file is a template, and might need editing before it works on your project.
+# Using job token: https://docs.gitlab.com/ee/user/project/new_ci_build_permissions_model.html#job-token
+
+# Templace for the job definition
+.job_template: &job_definition  # Hidden key that defines an anchor named 'job_definition'
+  # Official docker image.
+  image: docker:latest
+  timeout: 3 hours
+  stage: build
+  # variables:
+  #   GIT_STRATEGY: clone
+  services:
+    - docker:dind
+  before_script:
+    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
+
+# Build the master branch when there is no tag
+# Use "master" for docker image $POLICY_VERSION
+docker-build-master:
+  <<: *job_definition
+  script:
+    # - docker build --pull --build-arg SOFTPILOT_IMAGE_VERSION=${CI_ND280PILOT_VERSION} --build-arg GIT_T2K_TOKEN=$CI_JOB_TOKEN --build-arg GIT_T2K_USERNAME=gitlab-ci-token --build-arg VERSION_ARG="latest" -t "$CI_REGISTRY_IMAGE:latest" .
+    - docker build --pull --build-arg SOFTPILOT_IMAGE_VERSION=latest --build-arg VERSION_ARG=latest --build-arg GIT_T2K_TOKEN=$CI_REGISTRY_PASSWORD --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER -t "$CI_REGISTRY_IMAGE:latest" .
+    - docker push "$CI_REGISTRY_IMAGE:latest"
+  only:
+    - master
+# Additional build when a tag is made (required an additional build step on top of the master build)
+# Added the policy_version as build-arg in order to produce the right folders
+# Use tag for docker image $POLICY_VERSION
+docker-build-tags:
+  <<: *job_definition
+  script:
+    # - docker build --pull --build-arg SOFTPILOT_IMAGE_VERSION=${CI_ND280PILOT_VERSION} --build-arg GIT_T2K_TOKEN=$CI_JOB_TOKEN --build-arg GIT_T2K_USERNAME=gitlab-ci-token --build-arg VERSION_ARG=$CI_COMMIT_TAG -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" .
+    - docker build --pull --build-arg SOFTPILOT_IMAGE_VERSION=${CI_ND280PILOT_VERSION} --build-arg VERSION_ARG=$CI_COMMIT_TAG --build-arg GIT_T2K_TOKEN=$CI_REGISTRY_PASSWORD --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" .
+    - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
+  only:
+    - tags
+
+# Steps for the merge request: no push to registry
+# Use default version if on merge_request
+docker-build-mr:
+  <<: *job_definition
+  script:
+    # - docker build --pull --build-arg SOFTPILOT_IMAGE_VERSION=${CI_ND280PILOT_VERSION} --build-arg GIT_T2K_TOKEN=$CI_JOB_TOKEN --build-arg GIT_T2K_USERNAME=gitlab-ci-token -t "$CI_REGISTRY_IMAGE" .
+    - docker build --pull --build-arg SOFTPILOT_IMAGE_VERSION=latest --build-arg VERSION_ARG=latest --build-arg GIT_T2K_TOKEN=$CI_REGISTRY_PASSWORD --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
+  only:
+    - merge_requests
+
+# Standard branch build: this happens every time a new branch is pushed: is that necessary?
+# docker-build:
+  # <<: *job_definition
+  # script:
+  #   - export
+  #   - docker build --pull --build-arg GIT_T2K_TOKEN=$CI_JOB_TOKEN --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
+  # except:
+  #   - master
+  #   - tags
+  #   - merge_requests
+    
+variables:
+  DOCKER_DRIVER: overlay2
+  DOCKER_TLS_CERTDIR: ""
+  #DOCKER_HOST: tcp://docker:2375

Dockerfile

diff --git a/Dockerfile b/Dockerfile
index d2e6f9e..450c7cc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,40 +1,51 @@
-FROM git.t2k.org:8088/nd280/framework/nd280softwarepolicy:v3.0
-
-ENV EXTERNAL_MASTER_VERSION 5.3.5.0
-ENV EXTERNAL_MASTER_PATH /usr/local/t2k/current/externalMaster_${EXTERNALMASTER_VERSION}
-
-ENV CERNLIB_VERSION 2005.7
-ENV CLHEP_VERSION 2.1.1.0
-ENV GEANT4_VERSION 10.1.03.00
-ENV GSL_VERSION 1.15.0.00 
-ENV MYSQL_VERSION 5.6.20.01
-ENV NEUT_VERSION 5.3.5.0
-ENV ROOT_VERSION 5.34.34.00
-
-ENV CERNLIB_PATH /usr/local/t2k/current/CERNLIB_${CERNLIB_VERSION}
-ENV CLHEP_PATH /usr/local/t2k/current/CLHEP_${CLHEP_VERSION}
-ENV GEANT4_PATH /usr/local/t2k/current/Geant4_${GEANT4_VERSION}
-ENV GSL_PATH /usr/local/t2k/current/GSL_${GSL_VERSION}
-ENV MYSQL_PATH /usr/local/t2k/current/MYSQL_${MYSQL_VERSION}
-ENV NEUT_PATH /usr/local/t2k/current/NEUT_${NEUT_VERSION}
-ENV ROOT_PATH /usr/local/t2k/current/ROOT_${ROOT_VERSION}
-
-COPY --from=git.t2k.org:8088/nd280/externals/clhep:2.1.1.0 ${CLHEP_PATH} ${CLHEP_PATH}
-COPY --from=git.t2k.org:8088/nd280/externals/cernlib:2005.7 ${CERNLIB_PATH} ${CERNLIB_PATH}
-COPY --from=git.t2k.org:8088/nd280/externals/geant4:10.1.03.00 ${GEANT4_PATH} ${GEANT4_PATH}
-COPY --from=git.t2k.org:8088/nd280/externals/mysql:5.6.20.01 ${MYSQL_PATH} ${MYSQL_PATH}
-COPY --from=git.t2k.org:8088/nd280/externals/root:5.34.34.00 ${ROOT_PATH} ${ROOT_PATH}
-COPY --from=git.t2k.org:8088/nd280/externals/gsl:1.15.0.00  ${GSL_PATH} ${GSL_PATH}
-COPY --from=git.t2k.org:8088/nd280/externals/neut:5.3.5.0  ${NEUT_PATH} ${NEUT_PATH}
-
-COPY build $EXTERNALMASTER_PATH/build
-COPY cmake $EXTERNALMASTER_PATH/cmake
-
-RUN mkdir $EXTERNALMASTER_PATH/$LINUX_INSTALL_FOLDER
-
-WORKDIR $EXTERNALMASTER_PATH/$LINUX_INSTALL_FOLDER
+ARG SOFTPILOT_IMAGE_VERSION
+FROM git.t2k.org:8088/nd280/pilot/nd280softwarepilot:${SOFTPILOT_IMAGE_VERSION} as pre_master
+
+ARG VERSION_ARG=1.75
+ENV EXTERNALSMASTER_VERSION=${VERSION_ARG}
+ENV ND280_VER $EXTERNALSMASTER_VERSION
+ENV EXTERNALSMASTER_PATH /usr/local/t2k/current/externalsMaster_${EXTERNALSMASTER_VERSION}
+
+FROM pre_master as installed_master
+
+ARG GIT_T2K_USERNAME
+ARG GIT_T2K_TOKEN
+
+COPY build $EXTERNALSMASTER_PATH/build
+COPY cmake $EXTERNALSMASTER_PATH/cmake
+
+ENV ND280_NJOBS 5
+
+RUN source $COMMON_BUILD_PREFIX/setup.sh &&\
+    ND280_GIT="https://${GIT_T2K_USERNAME}:${GIT_T2K_TOKEN}@git.t2k.org/nd280/" &&\
+    nd280-find-dependencies externals externalsMaster ${EXTERNALSMASTER_VERSION} &&\
+    ls -altrh $COMMON_BUILD_PREFIX
+
+RUN mkdir $EXTERNALSMASTER_PATH/$LINUX_INSTALL_FOLDER
+
+WORKDIR $EXTERNALSMASTER_PATH/$LINUX_INSTALL_FOLDER
 
 # EXTERNALMASTER
 RUN source $COMMON_BUILD_PREFIX/setup.sh &&\
-    cmake ../cmake &&\
-    make -j3
+    cmake -D ND280_DEBUG_MODE=DEBUG ../cmake &&\
+    ./../bin/makeAll.sh &&\
+    # ls -r \
+    #     -I "*Policy.sh" \
+    #     -I "*All.sh" \
+    #     -I "setup.sh" \
+    #     ../bin | xargs -I NAME -P 1 /bin/bash -c "ND280_NJOBS=3 /bin/bash ../bin/NAME $1" &&\
+    cd ${COMMON_BUILD_PREFIX} &&\
+    rm -rf CERNLIB_*/$LINUX_INSTALL_FOLDER/src/200*/build &&\
+    rm -rf GSL_*/src &&\
+    rm -rf ROOT_*/$LINUX_INSTALL_FOLDER/tmp_build ROOT_*/.git ROOT_*/src &&\
+    rm -rf Geant4_*/downloads Geant4_*/tar Geant4_*/geant4_source Geant4_*/$LINUX_INSTALL_FOLDER/src &&\  
+    rm -rf MYSQL_*/src MYSQL_*/$LINUX_INSTALL_FOLDER/tmp_build &&\
+    # rm -rf NEUT_*/.git NEUT_*/${LINUX_INSTALL_FOLDER}/src/neut_*/src &&\ if we remove this folder, some files will be missing later on (like necardev.h); need to move needed files elsewhere...
+    rm -rf CLHEP_*/tmp_build CLHEP_*/downloads CLHEP_*/src 
+
+RUN du -d1 -h $COMMON_BUILD_PREFIX
+
+FROM pre_master
+
+COPY --from=installed_master ${COMMON_BUILD_PREFIX} ${COMMON_BUILD_PREFIX}
+

cmake/CMakeLists.txt

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index b192ba2..6a5ed40 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -1,7 +1,7 @@
 # CMakeLists.txt for externalsMaster package. It creates a library with dictionary and a main program
 cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
 
-find_package(nd280SoftwarePolicy 3.1)
+find_package(nd280SoftwarePolicy 3.2)
 if( NOT nd280SoftwarePolicy_FOUND) 
   message(FATAL_ERROR " nd280SoftwarePolicy not found - abort ")
 endif()

cmake/externalsMasterND280_USE.cmake

diff --git a/cmake/externalsMasterND280_USE.cmake b/cmake/externalsMasterND280_USE.cmake
index 15bf2e3..8d001ea 100644
--- a/cmake/externalsMasterND280_USE.cmake
+++ b/cmake/externalsMasterND280_USE.cmake
@@ -1,5 +1,6 @@
+ND280_USE(nd280SoftwarePolicy 3.5 ) # framework
 ND280_USE(CLHEP  2.1.1.0 ) 
-ND280_USE(Geant4 10.1.03.00 REQUIRED COMPONENTS ui_tcsh )
+ND280_USE(Geant4 10.1.03.01 REQUIRED COMPONENTS ui_tcsh )
 ND280_USE(MYSQL  5.6.20.01 ) 
 ND280_USE(ROOT 5.34.34.00 ) 
 ND280_USE(GSL  1.15.0.00 ) 

cmake/externalsMasterPackageVersion.cmake

diff --git a/cmake/externalsMasterPackageVersion.cmake b/cmake/externalsMasterPackageVersion.cmake
index 8ee70fc..cbd7001 100644
--- a/cmake/externalsMasterPackageVersion.cmake
+++ b/cmake/externalsMasterPackageVersion.cmake
@@ -1 +1 @@
-set(PACKAGE_VERSION "1.74" )
+set(PACKAGE_VERSION "1.78" )

doc/externalsMasterHistory.dox

diff --git a/doc/externalsMasterHistory.dox b/doc/externalsMasterHistory.dox
index 84ecba4..3bb68b2 100644
--- a/doc/externalsMasterHistory.dox
+++ b/doc/externalsMasterHistory.dox
@@ -475,7 +475,7 @@ To fix issues with
  newer versions of gcc and glibc.
 
 
-\section externalsMaster_1.73_history Version 1.73
+\section externalsMaster_1_73_history Version 1_73
 
 Freeze information:
    - Freeze Date: Sun Sep  1 19:30:15 2019
@@ -497,7 +497,7 @@ git.t2k.org/nd280/renaming.
 
 The name of this package was changed from nd280Tools to externalsMaster.
 
-\section externalsMaster_1.74_history Version 1.74
+\section externalsMaster_1_74_history Version 1_74
 
 Freeze information:
    - Freeze Date: Fri Oct 11 15:16:19 2019
@@ -507,4 +507,53 @@ Freeze information:
 
 CERNLIB 2005.8
 
+
+\section externalsMaster_1_75_history Version 1_75
+
+Freeze information:
+   - Freeze Date: Thu Mar  5 14:26:01 2020
+   - Freeze User: Mathieu Guigue
+   - Freeze Host: lpn143.local
+
+
+nd280SoftwarePolicy is a dependency of this package (and no longer installed by
+the nd280SoftwarePilot): currently using 3.2 as minimum.
+Dockerfile have been added, along with Continuous Integration via T2K Gitlab instance.
+
+
+\section externalsMaster_1_76_history Version 1_76
+
+Freeze information:  
+   - Freeze Date: Thu Mar 26 13:50:48 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+nd280SoftwarePolicy added to externalsMaster and version bumped up to 3.3.
+
+
+
+\section externalsMaster_1_77_history Version 1_77
+
+Freeze information:  
+   - Freeze Date: Thu Mar 26 14:58:58 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+
+ Bumped up versions of nd280SoftwarePolicy and Geant4  
+  
+
+
+\section externalsMaster_1_78_history Version 1_78
+
+Freeze information:  
+   - Freeze Date: Fri Mar 27 15:46:28 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+ version 3.5 of nd280SoftwarePilot  
+
 */
\ No newline at end of file

Differences between oaEvent version 8.16.1 and 8.16

cmake/CMakeLists.txt

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 367d96b..ca6266f 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -12,11 +12,17 @@ ND280_PROJECT(oaEvent ${PACKAGE_VERSION})
 include(oaEventND280_USE.cmake)
 
 #EXACT REQUIRED COMPONENTS RIO Net Geom EG XMLIO XMLParser Minuit Gui TMVA Hist Spectrum RooFit)
+
 ND280_STANDARD_LIBRARY()
 ND280_EXECUTABLE(dump-event dump-event.cxx)
+ND280_EXECUTABLE(plot-event plot-event.cxx)
+ND280_EXECUTABLE(strip-geom strip-geom.cxx)
+ND280_EXECUTABLE(check-fits check-fits.cxx)
+ND280_EXECUTABLE(validate-geometry validate-geometry.cxx )
 
 ND280_TEST(oaEventTUT oaEventTUT.cxx ../test/tut*.cxx)
-ND280_TEST(plot-event ../app/plot-event.cxx)
+ND280_TEST(testSplit testSplit.cxx)
+ND280_TEST(testGeomId testGeomId.cxx)
 
 ND280_END_PROJECT()
 

cmake/oaEventPackageVersion.cmake

diff --git a/cmake/oaEventPackageVersion.cmake b/cmake/oaEventPackageVersion.cmake
index 5d91e8c..f14e6df 100644
--- a/cmake/oaEventPackageVersion.cmake
+++ b/cmake/oaEventPackageVersion.cmake
@@ -1 +1 @@
-set(PACKAGE_VERSION "8.16" )
+set(PACKAGE_VERSION "8.16.1" )

doc/oaEventHistory.dox

diff --git a/doc/oaEventHistory.dox b/doc/oaEventHistory.dox
index d1e5f25..17f0112 100644
--- a/doc/oaEventHistory.dox
+++ b/doc/oaEventHistory.dox
@@ -1049,7 +1049,7 @@ fYokeFieldModel fBasketFieldModel fCoilFieldModel. The values
 correspond to the FieldType enum defined in TOAMagneticField.hxx.
 
 
-\section oaEvent_8.15_history Version 8.15
+\section oaEvent_8_15_history Version 8_15
 
 Freeze information:
    - Freeze Date: Sun Sep  1 19:31:19 2019
@@ -1069,7 +1069,7 @@ clearer. This has affected some class and function names in the code too. For mo
 information on the files changed by the package renaming, go to 
 git.t2k.org/nd280/renaming.
 
-\section oaEvent_8.16_history Version 8.16
+\section oaEvent_8_16_history Version 8_16
 
 Freeze information:
    - Freeze Date: Fri Oct 11 13:35:07 2019
@@ -1096,4 +1096,15 @@ BUG FIXES:
 
 ** Use "official" C99 integer types to work with C++11.
 
+
+\section oaEvent_8_16_1_history Version 8_16_1
+
+Freeze information:  
+   - Freeze Date: Thu Mar 26 13:24:16 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+Add commands to build all executables/test programs.  
+
 */
\ No newline at end of file

Differences between nd280SoftwareControl version 2.2 and 2.0.2

.gitignore

diff --git a/.gitignore b/.gitignore
index 7f0e1eb..18a6510 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 *.bak
 .*
 !/.gitignore
+!/.gitlab-ci.yml
 *_history.txt
 *.old~

.gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..5e2a5b9
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,57 @@
+# This file is a template, and might need editing before it works on your project.
+# Using job token: https://docs.gitlab.com/ee/user/project/new_ci_build_permissions_model.html#job-token
+
+# Templace for the job definition
+.job_template: &job_definition  # Hidden key that defines an anchor named 'job_definition'
+  # Official docker image.
+  image: docker:latest
+  stage: build
+  services:
+    - docker:dind
+  before_script:
+    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
+
+# Build the master branch when there is no tag
+# Use "master" for docker image $POLICY_VERSION
+docker-build-master:
+  <<: *job_definition
+  script:
+    - docker build --pull --build-arg GIT_T2K_TOKEN=$CI_REGISTRY_PASSWORD --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER --build-arg VERSION_ARG="master" -t "$CI_REGISTRY_IMAGE:latest" .
+    - docker push "$CI_REGISTRY_IMAGE:latest"
+  only:
+    - master
+# Additional build when a tag is made (required an additional build step on top of the master build)
+# Added the policy_version as build-arg in order to produce the right folders
+# Use tag for docker image $POLICY_VERSION
+docker-build-tags:
+  <<: *job_definition
+  script:
+    - docker build --pull --build-arg GIT_T2K_TOKEN=$CI_REGISTRY_PASSWORD --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER --build-arg VERSION_ARG=$CI_COMMIT_TAG -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" .
+    - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
+  only:
+    - tags
+
+# Steps for the merge request: no push to registry
+# Use default version if on merge_request
+docker-build-mr:
+  <<: *job_definition
+  script:
+    - docker build --pull --build-arg GIT_T2K_TOKEN=$CI_REGISTRY_PASSWORD --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER -t "$CI_REGISTRY_IMAGE" .
+  only:
+    - merge_requests
+
+# Standard branch build: this happens every time a new branch is pushed: is that necessary?
+# docker-build:
+#   <<: *job_definition
+#   script:
+#     - docker build --pull --build-arg GIT_T2K_TOKEN=$CI_REGISTRY_PASSWORD --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
+#     - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
+#   except:
+#     - master
+#     - tags
+#     - merge_requests
+    
+variables:
+  DOCKER_DRIVER: overlay2
+  DOCKER_TLS_CERTDIR: ""
+  #DOCKER_HOST: tcp://docker:2375

Dockerfile

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..66c0efd
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,24 @@
+FROM git.t2k.org:8088/nd280/framework/nd280softwarepolicy:3.3 AS pre_control
+
+ARG VERSION_ARG=2.0.2
+ENV CONTROL_VERSION=${VERSION_ARG}
+ENV CONTROL_PATH /usr/local/t2k/current/nd280SoftwareControl_${CONTROL_VERSION}
+
+##########################
+FROM pre_control as install_control
+
+COPY . ${CONTROL_PATH}
+
+RUN mkdir ${CONTROL_PATH}/${LINUX_INSTALL_FOLDER}
+WORKDIR ${CONTROL_PATH}/${LINUX_INSTALL_FOLDER}
+ENV ND280_NJOBS 3
+
+RUN source $COMMON_BUILD_PREFIX/setup.sh &&\
+    cmake ../cmake &&\
+    ./../bin/makeAll.sh &&\
+    source ../bin/setup.sh &&\
+    runND280 --help
+
+FROM pre_control
+
+COPY --from=install_control ${CONTROL_PATH} ${CONTROL_PATH}

bin/createControlOptions.sh

diff --git a/bin/createControlOptions.sh b/bin/createControlOptions.sh
new file mode 100755
index 0000000..c09b6f3
--- /dev/null
+++ b/bin/createControlOptions.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+. ../bin/setup.sh
+. ../setup_script/setup_python.sh
+../app/dumpCommands
+cp nd280controlOptions.list ../doc
+echo " The command list has been updated in ../doc"

bin/dumpCommands

diff --git a/bin/dumpCommands b/bin/dumpCommands

deleted file mode 120000

deleted file mode 120000
index 66afd2c..0000000
--- a/bin/storeND280FileCatalogue
+++ /dev/null
@@ -1 +0,0 @@
-../app/storeND280FileCatalogue
\ No newline at end of file

bin/queryND280Catalogue

diff --git a/bin/queryND280Catalogue b/bin/queryND280Catalogue

bin/queryND280Catalogue_www

diff --git a/bin/queryND280Catalogue_www b/bin/queryND280Catalogue_www

bin/runND280

diff --git a/bin/runND280 b/bin/runND280

bin/runND280ControlSample

diff --git a/bin/runND280ControlSample b/bin/runND280ControlSample

bin/setup.sh

diff --git a/bin/setup.sh b/bin/setup.sh

deleted file mode 100755

deleted file mode 100755
index 5e8951e..0000000
--- a/bin/setup.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-# Setup the PATH and LD_LIBRARY_PATH environment variables 
-# and run all setup scripts
-HERE=`pwd` 
-ND280_SYSTEM=`nd280-system` 
-unset -f path_remove 
-unset -f path_append 
-unset -f ld_remove 
-unset -f ld_append 
-path_remove ()  { export PATH=`echo -n $PATH | awk -v RS=: -v ORS=: '$0 != "'$1'"' | sed 's/:$//'`; } 
-path_append ()  { path_remove $1; export PATH="$PATH:$1" ;} 
-ld_remove ()  { export LD_LIBRARY_PATH=`echo -n $LD_LIBRARY_PATH | awk -v RS=: -v ORS=: '$0 != "'$1'"' | sed 's/:$//'`; } 
-ld_append ()  { ld_remove $1; export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$1" ;} 
-path_append /vols/build/t2k/ws1216/test_old/nd280SoftwareControl_2.00/bin 
-ld_append /vols/build/t2k/ws1216/test_old/nd280SoftwareControl_2.00/${ND280_SYSTEM}/lib 
-path_append /vols/build/t2k/ws1216/test_old/nd280SoftwareControl_2.00/${ND280_SYSTEM}/bin 
-ld_append /vols/build/t2k/ws1216/test_old/nd280SoftwareControl_2.00/`nd280-system`/lib 
-export ND280SOFTWARECONTROLROOT=/vols/build/t2k/ws1216/test_old/nd280SoftwareControl_2.00 
-export ND280SOFTWARECONTROLCONFIG=`nd280-system`  
-for file in `ls /vols/build/t2k/ws1216/test_old/nd280SoftwareControl_2.00/setup_script/*.sh 2>/dev/null` ; do . $file ; done 
-export LD_LIBRARY_PATH=`echo $LD_LIBRARY_PATH | sed 's/^://g'`
-cd $HERE 

bin/storeND280FileCatalogue

diff --git a/bin/storeND280FileCatalogue b/bin/storeND280FileCatalogue

cmake/CMakeLists.txt

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 6679bf9..f5af2c0 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -9,8 +9,35 @@ endif()
 include(nd280SoftwareControlPackageVersion.cmake)
 ND280_PROJECT(nd280SoftwareControl ${PACKAGE_VERSION})
 include(nd280SoftwareControlND280_USE.cmake)
+
+ND280_PYTHON_LIBRARY(modules/*.py)
+
+ND280_PYTHON_LIBRARY(modules/FileCatalogue)
+ND280_PYTHON_LIBRARY(modules/pymysql)
+
+ND280_SCRIPT(dumpCommands)
+ND280_SCRIPT(queryND280Catalogue)
+ND280_SCRIPT(queryND280Catalogue_www)
+ND280_SCRIPT(runND280)
+ND280_SCRIPT(runND280ControlSample)
+ND280_SCRIPT(storeND280FileCatalogue)
+
 ND280_END_PROJECT(NOCONFIG)
-ND280_PATH_APPEND(app)
 
+machineDependentOutput(ND280_SYSTEM)
+ND280_PATH_APPEND(${ND280_SYSTEM}/bin)
+
+#
+# make sure the command listing is generated ( needed for documentation )
+#
+#ADD_CUSTOM_TARGET(nd280controlOptions.list  ALL
+#                  COMMAND ../bin/createControlOptions.sh
+#                  COMMENT "Create the list of command options for documentation")
+#ADD_CUSTOM_COMMAND(OUTPUT nd280controlOptions.list#
+#              COMMAND ../bin/createControlOptions.sh
+#                  COMMENT "Create the list of command options for documentation")
+#ADD_CUSTOM_TARGET(Extras ALL
+#          DEPENDS nd280controlOptions.list)
+execute_process(COMMAND ../bin/createControlOptions.sh)
 
                   
\ No newline at end of file

cmake/nd280SoftwareControlPackageVersion.cmake

diff --git a/cmake/nd280SoftwareControlPackageVersion.cmake b/cmake/nd280SoftwareControlPackageVersion.cmake
index d045a7e..fcccb48 100644
--- a/cmake/nd280SoftwareControlPackageVersion.cmake
+++ b/cmake/nd280SoftwareControlPackageVersion.cmake
@@ -1 +1 @@
-set(PACKAGE_VERSION "2.0.2" )
+set(PACKAGE_VERSION "2.2" )

doc/nd280SoftwareControlHistory.dox

diff --git a/doc/nd280SoftwareControlHistory.dox b/doc/nd280SoftwareControlHistory.dox
index 2d5fdfd..b9985d4 100644
--- a/doc/nd280SoftwareControlHistory.dox
+++ b/doc/nd280SoftwareControlHistory.dox
@@ -762,7 +762,7 @@ Freeze information:
 
 
 
-\section nd280SoftwareControl_2.0_history Version 2.0
+\section nd280SoftwareControl_2_0_history Version 2_0
 
 Freeze information:
    - Freeze Date: Sun Sep  1 19:30:51 2019
@@ -787,7 +787,7 @@ The name of this package was changed from nd280Control to nd280SoftwareControl.
 The use of CMT in this package has had to change since the switch to CMake. The 
 path CMTPATH has now been switched to CMAKE_PREFIX_PATH.
 
-\section nd280SoftwareControl_2.0.1_history Version 2.0.1
+\section nd280SoftwareControl_2_0_1_history Version 2_0_1
 
 Freeze information:
    - Freeze Date: Fri Oct 11 14:28:52 2019
@@ -802,7 +802,7 @@ old data. Also, some tweaks were made in certain places of the code to keep
 things to C++11 standards (or later), which is now enforced in                  
 nd280SoftwarePolicy.
 
-\section nd280SoftwareControl_2.0.2_history Version 2.0.2
+\section nd280SoftwareControl_2_0_2_history Version 2_0_2
 
 Freeze information:
    - Freeze Date: Wed Oct 16 13:32:23 2019
@@ -815,4 +815,32 @@ A minor change.
 As PYTHONPATH is set up in setup_script/setup_python.sh no need to also do it
 in CMakeLists.txt.
 
+
+\section nd280SoftwareControl_2_1_history Version 2_1
+
+Freeze information:  
+   - Freeze Date: Thu Mar 26 14:43:39 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+Add controls for 2019/2020 running.
+Move python modules to lib/ and binaries to bin/ under $nd280_system
+for consistency with other packages.
+Regenerate the list of commands for documentation when cmake is run.
+  
+  
+
+
+\section nd280SoftwareControl_2_2_history Version 2_2
+
+Freeze information:  
+   - Freeze Date: Fri Mar 27 15:54:48 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+Change the way the list of controls and options is generated. Use a script
+which is run by cmake command execute_process.  
+
 */
\ No newline at end of file

doc/nd280controlOptions.list

diff --git a/doc/nd280controlOptions.list b/doc/nd280controlOptions.list

deleted file mode 100644

deleted file mode 100644
index a6885ea..0000000
--- a/doc/nd280controlOptions.list
+++ /dev/null
@@ -1,1054 +0,0 @@
-============
-filenaming :
-============
-Options to control filenaming, within the standard conventions
-
-Available Commands:
-
-run_number : 
-A unique integer used to help specify a unique run number for output.
-This must be 8 digits of less, and will be zero padded to 8 digits. The
---runnumber command line option will override this if set.
-
-
-subrun : 
-A unique integer used to split a run into multiple jobs/files. If not
-specified for Monte Carlo this will not appear in the filename. This must
-be 3 digits of less, and will be zero padded to 3 digits.
-
-
-comment : 
-A comment to be added to the file name, space permitting. The maximum
-recommended length of the filename is 80 characters.
-
-
-replace_comment : 
-Set to 1 to force the comment from an input file to be overridden by the
-comment from the cfg file.
-
-
-version_number : 
-An integer used to specify the version of processing of the file. This can
-be used to for example identify two reconstruction versions of the same Monte
-Carlo.
-
-
-=========
-nd280Geant4Sim :
-=========
-Control of the nd280 Monte Carlo. All generation options and particle
-gun settings are controlled here
-
-Available Commands:
-
-num_events : 
-The number of Monte Carlo events to generate.
-
-
-random_seed : 
-Random number control of the Monte Carlo. Set to TIME or an integer
-
-
-mc_type : 
-The Monte Carlo Type. Available options are:
-        ParticleGun
-        Nuance
-        Neut
-        Neut_RooTracker
-        Genie 
-        Cosmics
-        ParticleGun_MacFile
-
-
-mc_particle : 
-Used by particle Gun Monte Carlos to speficy the particle type. The particle
-names used are those of GEANT4
-
-
-mc_verbose : 
-Specify the verbosity level. Set as OFF or MEDIUM or HIGH. OFF by default.
-
-
-physicslist : 
-Use the -p option to choose a physics list.
-
-
-bunchswitch : 
-Changes the bunch characteristics for the DsEcal testbeam. OFF by default.
-
-
-mc_full_spill : 
-Enable or disable a full spill Monte Carlo. Do not use this option to embed
-events in a full spill, use EMBED_EVENT instead.
-
-
-count_type : 
-Set the count type to mean or fixed - note only takes effect for neutrino 
-generator inputs if mc_full_spill is set to true.
-
-
-use_generator_positions : 
-When running neutrino Monte Carlo in Full Spill mode use the event positions
-from the generator. True/False. Defaults to true, use this if the generator
-does not have positions, then density will be used.
-
-
-time_offset : 
-Set the time offset in ns of the Full Spill Monte Carlo.
-
-
-bunch_seperation : 
-Set the time offset between bunches in ns for full spill Monte Carlos.
-
-
-bunch_duration : 
-Set the duration of bunches in ns for full spill Monte Carlo.
-
-
-mc_position : 
-The Monte Carlo Position. A list of arguments is provided to specify the
-generated positon. Options are as follows:
-        Subdetector Detector    : Generate events as neutrino events in the
-                                  specified subdetector. Only All, FGD, FGD1,
-                                  FGD2, P0D, DS_ECAL and Barrel_ECAL options
-                                  available.
-                                  for now. Only this option is valid for
-                                  neutrino interactions.
-        Geometry Region         : Specify a specific geometry region, must be
-                                  a valid region in the G4 geometry.
-        Point x y z             : Generate events at a point, x, y, z given
-                                  in cm.
-        ECAL detector.          : Generate particles at the front face of one
-                                  of the ecal modules. Particles start 15cm in
-                                  front of the desired detector. Options are
-                                  downstream, barrel_top, barrel_bottom,
-                                  barrel_left, barrel_right, p0d_top,
-                                  p0d_bottom, p0d_left, p0d_right.
-        Free                    : Use the positions on the input interactions
-                              file.
-
-
-mc_energy : 
-The Monte Carlo Energy for a Particle Gun. A list of arguments is provided
-to specify the energy distribution. All energyies should be specified in MeV.
-Available options are:
-        Mono energy             : Monoenergetic Particles.
-        Uniform emin emax       : The energy is drawn from a flat distribution.
-
-
-mc_direction : 
-The Particle Gun Monte Carlo Direction. A list of arguments is provided to
-to specify the direction type and parameters. Available options are:
-        Beam dx dy dz          : All particles generated in the same direction.
-                                 dx dy dz is a vector of the direction.
-        Cone axis min max      : Generate the particles in a cone.
-                                 Axis defines the direction of the cone.
-                                 Due to limitiation of the way this is
-                                 currently implemented this can be set to +x ,
-                                 -x, +y, -y, +z, -z .
-                                 min defines the minium angular opening and max
-                                 defines the maximum angular opening of the
-                                 cone, in degrees. For a filled cone set min to
-                                 zero.
-        Isotropic              : An isotropic distribution.
-
-
-embed_event : 
-Embed the requested event in a full spill Monte Carlo using the requested
-generator.
-
-
-embed_type : 
-The type of full spill event to be embeded into. TRACKER or NEUT.
-
-
-embed_file : 
-The neut or tracker file containing the interactions of the full spill event.
-
-
-embed_skip : 
-Skip the first N events of the specified neut or tracker(kin) file used to
-create full spill in which events are embedded.
-
-
-interactions_per_spill : 
-Specify the number of interactons per spill. This defaults to 64.
-
-
-pot_per_spill : 
-Specify the POT per spill. This defaults to 0 (not actually used in MC generation).
-
-
-nbunches : 
-Specify the number of bunches per spill. This defaults to 8.
-
-
-append_mac_file : 
-        Specify a user defined macro (.mac) file to append to the one automatically generated by nd280.
-        
-
-particle_gun_mac_file : 
-        Specify a user defined macro (.mac) file be used to define the particle gun configuration.
-        
-
-===============
-dead_channels :
-===============
-Section to add various switches related to dead channels
-
-Available Commands:
-
-tpc_periods_to_activate : 
-Switches On TPC dead channel list for particular run set. (Runs2-3 or Runs 2-3-4
-
-
-ecal_periods_to_activate : 
-Set ECal dead channel settings for a specific run period. Valid values include "run1-2" and "run3-4".
-
-
-===============
-sandPropagate :
-===============
-Control of sandGeant4Sim.
-
-Available Commands:
-
-num_events : 
-The number of events to process with sandPropagate.
-
-
-============
-grid_tools :
-============
-Control of grid tool usage with nd280SoftwareControl.
-
-Available Commands:
-
-use_grid : 
-Enable the use of grid tools. If this is not set grid tools will not be used. Set true or false.
-
-
-storage_address : 
-Set the storage address for files if they are to be stored after each job step. Note that the log file will be lost for these files if the job dies in a subseqent step. Example Address: srm:// srm-t2k.gridpp.rl.ac.uk/castor/ads.rl.ac.uk/prod/t2k.org/nd280/test/ The code will work out the remaining path itself.  grid_tools/use_grid must be set for this option to be used.
-
-
-register_files : 
-Enable the grid registration of data files after storage. Set true/false. Defaults to true. The options grid_tools/usegrid and grid_tools/storage_address must be set.
-
-
-register_catalogue_files : 
-Enable the grid registration of catalogue files after storage. Set true/false. Defaults to false. The options grid_tools/usegrid and grid_tools/storage_address must be set.
-
-
-register_address : 
-Define an address for the registering of grid files. Example address /grid/t2k.org/nd280/test
-
-
-lfc_host : 
-The LFC Host to use when using the grid.
-
-
-lcg_gfal_infosys : 
-The value of LCG_GFAL_INFOSYS to use when using the grid.
-
-
-==========
-geometry :
-==========
-Control of the geometry of the nd280 detector
-
-Available Commands:
-
-baseline : 
-Use the specified baseline geometry from nd280Geant4Sim. This overrides all
-other options except standalone detectors, p0d water/air fill and if
-the magnet is open.
-Options currently are:
-                - Full    The default geometry
-                - 2010-02 The baseline from Feb 2010 (Startup)
-                - 2010-11 The Geometry as of Nov 2010 (With the full ECAL added)
-                - 2015-08 The Geometry as of August 2015 (With the empty water target layer)
-
-
-alignfgd1 : 
-Use to specify translations, rotations to FGD1
-Format: dx dy dz ux uy uz theta
-Translation defined by dx, dy, dz (millimeters)
-Axis defined by ux, uy, uz (unitless), theta is in milliradian
-
-
-alignfgd2 : 
-Use to specify translations, rotations to FGD2
-Format: dx dy dz ux uy uz theta
-Translation defined by dx, dy, dz (millimeters)
-Axis defined by ux, uy, uz (unitless), theta is in milliradian
-
-
-aligntpc1 : 
-Use to specify translations, rotations to TPC1
-Format: dx dy dz ux uy uz theta
-Translation defined by dx, dy, dz (millimeters)
-Axis defined by ux, uy, uz (unitless), theta is in milliradian
-
-
-aligntpc2 : 
-Use to specify translations, rotations to TPC2
-Format: dx dy dz ux uy uz theta
-Translation defined by dx, dy, dz (millimeters)
-Axis defined by ux, uy, uz (unitless), theta is in milliradian
-
-
-aligntpc3 : 
-Use to specify translations, rotations to TPC3
-Format: dx dy dz ux uy uz theta
-Translation defined by dx, dy, dz (millimeters)
-Axis defined by ux, uy, uz (unitless), theta is in milliradian
-
-
-aligndsecal : 
-Use to specify translations, rotations to DsECal
-Format: dx dy dz ux uy uz theta
-Translation defined by dx, dy, dz (millimeters)
-Axis defined by ux, uy, uz (unitless), theta is in milliradian
-
-
-magnet_open : 
-Specify if the magnet is open or closed in the geometry. Set to 0
-(closed) or 1 (open). Default to closed.
-
-
-ecal_config : 
-Set the ECAL Configuration. Set to
-             Full      : The Full ECAL
-             DSOnly    : The DS ECAL Only. Use this with nd280 versions v7r7 and later.
-             DSOnly_v0 : The DS ECAL Only. Use this with nd280 versions v7r5 and earlier.
-             Year1    : The year 1 configuration with DS and Top Left only. Use this with nd280 versions v7r7 and later.
-
-
-p0d_water_fill : 
-Use this logical command to fill the p0d with water or air. When set true
-the p0d will be filled with water and with air when false.
-
-
-fgd2_empty_module : 
-Use this logical command to decide if there is water in upstream-most FGD2 water module.
-When set true there will not be water in upstream-most FGD2 water module.
-
-
-disable_tpc1 : 
-Disable the upstream TPC True/False
-
-
-standalone : 
-Run the Monte Carlo with a standalone subdetector.
-Options are TPC, FGD, P0D and DSECAL
-
-
-magneticfieldswitch : 
-Enable or disable the magnetic field.
-Set to 1 to enable (using default value), and set to 0 to disable.
-Defaults to on
-
-
-===============
-cherry_picker :
-===============
-Control of selectEventSim
-
-Available Commands:
-
-inputfile_list : 
-A white space seperated list of input files to be used by selectEventSim. This is the list of rooTracker files that contains the library to be selected from.
-
-
-region : 
-The region in the geometry for interactions to be selected. For multiple regions seperate with ; and don't use whitespace.
-
-
-num_leptons : 
-The number of charged leptons to be selected.
-
-
-num_mesons : 
-The number of mesons to be selected.
-
-
-num_pizero : 
-The number of pi zeros to be selected.
-
-
-num_nucleons : 
-The number of nucleons to be selected.
-
-
-num_piplus : 
-The number of piplus to be selected.
-
-
-num_piminus : 
-The number of piminus to be selected.
-
-
-num_e_plus : 
-The number of positrons to be selected.
-
-
-num_e_minus : 
-The number of electrons to be selected.
-
-
-num_mu_plus : 
-The number of mu+ to be selected.
-
-
-num_mu_minus : 
-The number of mu- to be selected.
-
-
-num_protons : 
-The number of protons to be selected.
-
-
-num_neutrons : 
-The number of neutrons to be selected.
-
-
-pdg_type : 
-Specify the pdg code of a particle to be selected. Use in conjunction with cherry_piker/num_pdg
-
-
-num_pdg : 
-The number of particles of the specified PDG type to be selected. Use in conjunction with cherry_picker/pdg_type
-
-
-=========
-cosmics :
-=========
-Control of Cosmics Monte Carlo
-
-Available Commands:
-
-kinfile : 
-Specify the name of a kinfile for input. This is used instead of being generated internally.
-
-
-randomize_kinfile : 
-If set to TRUE the input kin file is randomised.
-
-
-skip : 
-Skip the first N events of the specified neut or tracker(kin) file. Only to
-be used when reading in pregenerated neutrino interactions
-
-
-==========
-analysis :
-==========
-Control of eventAnalysis
-
-Available Commands:
-
-num_events : 
-The number of events to process with eventAnalysis. Will process all events in a file is not set.
-
-
-skip_events : 
-The number of events to skip before processing with eventAnalysis. Will process from the start of a file is not set.
-
-
-find_run_event : 
-The run,event combination to skip to before processing with eventAnalysis. Will process from the start of a file if not set. Often useful with num_events = 1.
-
-
-pass_through_dir : 
-Specify a directory to look for neutrino mc pass-through files - specify this if you are not running with them in the crrent working directory.
-
-
-enable_modules : 
-Specify modules that should be enabled in eventAnalysis
-
-
-disable_modules : 
-Specify modules that should be disabled in eventAnalysis
-
-
-production : 
-Run eventAnalysis in production mode. True/False
-
-
-save_geometry : 
-Save ND280 geometry in analysis file. True/False
-
-
-set_software_version : 
-Force usage of a specific software version (will be saved into eventAnalysis file). Useful for checks with HEAD versions.
-
-
-===========
-calibrate :
-===========
-Control of eventCalib, except unpacking aspects.
-
-Available Commands:
-
-num_events : 
-The number of events to process with eventCalib (or eventCalibMC). Will process all events in a file if not set.
-
-
-skip_events : 
-The number of events to skip before processing with eventCalib (or eventCalibMC). Will process from the start of a file if not set.
-
-
-find_run_event : 
-The run,event combination to skip to before processing with eventCalib (or eventCalibMC). Will process from the start of a file if not set. Often useful with num_events = 1.
-
-
-par_override : 
-The name of an eventCalib parameters file to overide default.
-
-
-save_digits : 
-Save or Delete the digits on eventCalibMC. True/False. Defaults to False (deletion)
-
-
-==============
-user_modules :
-==============
-Control of user modules
-
-Available Commands:
-
-command : 
-Set the command line command for the user module. This is should include the
-absolute path is appropriate, and any command line options apart from input and
-output files. Input and out put files must be specified as for all event loop
-programs, no options for the input file and -o for the output file.
-For example myCommand.exe -c option -o outputfile inputfile would be
-myCommand.exe -c option .
-Do NOT use this option for the your user module, instead specify the user
-module number with the command command_x, where x =0-9.
-
-
-module_name : 
-Sets the name for the module. This will appear as the step in the output
-filename. Try and obey usual filenaming rules and restrict this to 4
-alphanumeric characters. The name in the file will contain a step field of
-user-xxxx.
-Do NOT use this option for the your user module, instead specify the user
-module number with the command module_name_x, where x =0-9.
-
-
-num_events : 
-The number of events to process with the user module. Will process all events in a file is not set.
-Do NOT use this option for the your user module, instead specify the user
-module number with the command module_name_x, where x =0-9.
-
-
-skip_events : 
-The number of events to skip before processing with the user module. Will process from the start of a file is not set.
-Do NOT use this option for the your user module, instead specify the user
-module number with the command module_name_x, where x =0-9.
-
-
-find_run_event : 
-The run,event combination to skip to before processing with the user module. Will process from the start of a file is not set.
-Do NOT use this option for the your user module, instead specify the user
-module number with the command module_name_x, where x =0-9.
-
-
-================
-reconstruction :
-================
-Control of reconstruction
-
-Available Commands:
-
-num_events : 
-The number of events to process with eventRecon (or ecalRecon/trexRecon). Will process all events in a file if not set.
-
-
-skip_events : 
-The number of events to skip before processing with eventRecon (or ecalRecon/trexRecon). Will process from the start of a file if not set.
-
-
-find_run_event : 
-The run,event combination to skip to before processing with eventRecon (or ecalRecon/trexRecon). Will process from the start of a file if not set. Often useful with num_events = 1.
-
-
-event_select : 
-The event types to select from the input file.
-     Set to ALL, SPILL, COSMIC, FGDCOSMIC, TRIPTCOSMIC, PEDESTAL or OTHER
-
-
-ecal_incremental_matching : 
-Turn on or off incremental matching in the ECAL.
-
-
-ecal_cluser_matching_mode : 
-Set the cluster matching mode (2D->3D) for the ECAL.
-    1 = Simple
-    2 = Full
-    3 = 3D
-    4 = 3D + TPC/FGD Seeded
-
-
-ecal_3d_matching_threshold : 
-Set the likelihood threshold for ECAL 3D matching
-
-
-ecal_3d_matching_rematch : 
-Turn on or off the rematching of remaining hits in ECAL 3D matching
-
-
-ecal_test_beam : 
-Let ECALRecon know that it is reconstruction test beam data. True / False
-
-
-run_tpc_recon : 
-            Set eventRecon.RunTpcRecon parameter. True / False
-            
-
-run_fgd_recon : 
-            Set eventRecon.RunFgdRecon parameter. True / False
-            
-
-run_ecal_recon : 
-            Set eventRecon.RunEcalRecon parameter. True / False
-            
-
-run_p0decal_recon : 
-            Set eventRecon.RunP0DEcalRecon parameter. True / False
-            
-
-run_p0d_recon : 
-            Set eventRecon.RunP0DRecon parameter. True / False
-            
-
-run_smrd_recon : 
-            Set eventRecon.RunSmrdRecon parameter. True / False
-            
-
-force_run_subdetector_recon : 
-            Set eventRecon.ForceRunSubdetectorRecon parameter. True / False
-            
-
-force_run_global_recon : 
-            Set eventRecon.ForceRunGlobalRecon parameter. True / False
-            
-
-================
-geant4_options :
-================
-Section to add custom GEANT4 commands that will go into the .mac file
-
-Available Commands:
-
-mumsc : Specify "on" or "off" for the muon multiple scattering.
-
-msc : Specify "on" or "off" for the electron/proton multiple scattering.
-
-custom : any custom string command.
-
-==========
-neutrino :
-==========
-Control of the neutrino interaction Monte Carlo
-
-Available Commands:
-
-kinfile : 
-Specify the name of a kinfile for input. This is used instead of being 
-generated internally.
-
-
-randomize_kinfile : 
-If set to TRUE the input kin file is randomised.
-
-
-neutfile : 
-Specify the name of a neut file for input. This is used instead of being
-generated internally.
-
-
-neutrino_type : 
-Specify the neutrino types for the neutrino Monte Carlo. Must be one of NUE, 
-NUEBAR, NUMU, NUMUBAR or BEAM for all.
-
-
-skip : 
-Skip the first N events of the specified neut or tracker(kin) file. Only to
-be used when reading in pregenerated neutrino interactions
-
-
-flux_file : 
-The flux file from jnubeam for used as input to neutrino Monte Carlo.
-Genie uses a single file as input. NEUT also accepts single file.
-
-
-flux_file_path : 
-The path to the flux files from jnubeam for used as input to neutrino Monte
-Carlo. Neut can use the entire set of flux files. The path is specified in
-the form dir/nu.nd280 
-
-
-flux_file_pot : 
-Override the default POT normalisation of the input flux file. Default in GENIE
-is 1E21 corresponding to jnubeam 07a fluxfiles. Use this if you are using 
-fluxfiles with a different POT normalisation. This may be because you are 
-using different fluxfiles or because you have merged a number of fluxfiles 
-into one. If in doubt speak to someone who knows as this can mess up the 
-POT / sample that GENIE will give you!
-
-
-flux_file_start : 
-The ID number of the first flux file to use in flux_file_path
-
-
-flux_file_stop : 
-The ID number of the last flux file to use in flux_file_path
-
-
-genie_generator_list :
-Specify an Event Generator List from Genie to obtain special interaction samples.
-Default behaviour is simulate a comprehensive set of interaction models, 
-but this can be overridden with this parameter.
-
-See the documentation, configuring genie for nd280SoftwareControl for details.
-
-
-genie_freenucl_splines : 
-Free nucleon cross section splines. These are needed if generating 
-cross-section table for all the elements present in the nd280 geometry.
-Not required but if missing add >24h to job length. 
-
-See the documentation, configuring genie for nd280SoftwareControl for details.
-
-
-genie_xs_table : 
-Specify a cross section table from Genie designed to speed up processing.
-Contains cross section splines for all the elements in the nd280 geometry. 
-Should be used for event generation (genieMC module), and setup jobs 
-(genieSetup module) when pre-generating flux interaction probabilities. 
-Not required but if missing add >24h to job length.
-
-See the documentation, configuring genie for nd280SoftwareControl for details.
-
-
-genie_generate_flux_probs : 
-Pre-generate flux interaction probabilities for a given flux input file 
-and master volume when running genieSetup. These can then be used in 
-event generation using the genie_flux_probs_file_name file name. The 
-flux probabilities are saved to a root file with a default name:  
-${flux_file}.${master_volume}.flxprobs.root. 
-You can override ${flux_file} with the  genie_flux_probs_file_name command.
-
-Pre-generating the flux interaction probabilities is recommended when 
-processing large flux files (>1M entries). 
-
-See the documentation, configuring genie for nd280SoftwareControl for details.
-
-
-genie_flux_probs_file_name : 
-Specify a pre-generated flux interaction probabilities file to be used
-for event generation. See the genie_generate_flux_probs command 
-for details on how to generate this file. Also doubles as command to 
-override the default output file name when pre-generating the flux 
-interaction probabilities file.
-
-See the documentation, configuring genie for nd280SoftwareControl for details.
-
-
-genie_generate_paths : 
-Generate path lengths (for use as input to event generation job) when 
-running genieSetup module. The paths are saved as: 
- genie_nd280_${mastervolume}_paths_${genie_version}.xml
-
-See the genie_paths command for details of how and when to use.
-
-
-genie_paths : 
-Specify a path length table from GENIE used to speed up event generation. See
-the genie_generate_paths command for creating this table. Using this option 
-will revert back to the old method where maximum path lengths are used to 
-optimise event generation (as opposed to the current method using actual 
-interaction probabilities).
-
-N.B. This is a non-default way to run GENIE for ND280 and will result in
-much slower event generation (between 4 and 300 times!) and should only 
-be used for cross checks and debugging. 
-
-See the documentation, configuring genie for nd280SoftwareControl for details.
-
-
-neut_norm_factor : 
-The maximum probability reported by neutSetup for this job.
-It should be specifed in units of x10^-38. 
-
-
-neut_pot_exp : 
-The expected number of events per 1e21pot for neut.
-This value can be obtained from neutSetup.
-
-
-random_seed : 
-Set the genie random seed. An integer value. This also acts as the 
-random seed used by both genie and neut when choosing the random
-start point in a flux file when the neutrino/random_start option is 
-used. 
-
-
-num_events : 
-The number of Neutrino Monte Carlo events to generate.
-This is overridden by the pot setting.
-
-
-cleanup : 
-Remove intermediate files once neutrino Monte Carlo has completed.
-Default is true.
-
-
-pot : 
-Set the required number of protons on target (pot) for this processing.
-This overrides the num_events setting.
-
-
-num_cycles : 
-Set the required number of flux cycles for this processing.
-This does not override either the num_events or the pot setting.
-
-
-master_volume : 
-Set the master volume name in the geometry for neutrino generation. Use this
-option only if you know what you're doing, it defaults to the entire geometry.
-
-
-force_volume_name : 
-Force a given master_volume name for event generation. If this is set to true 
-then we do not require that master_volume is included in list defined in 
-geomNameCheck module. Value can be true or false.
-
-
-verbose : 
-Enable/Disable verbose output.
-
-
-neut_version : 
-Set the neut version id. Sets the version in the catalouge cards
-
-
-flux_region : 
-Set the region for the flux used by neut or genie. Use this only if running with 
-10a fluxes or newer. Options are Basket or Magnet (default)
-
-
-flux_tree : 
-Set the tree name for the flux tree in the jnubeam flux files.
-
-
-maxint_file : 
-Set the filename for maxint file for event_rate (output) and genev (input).
-
-
-neut_card : 
-Set the path for input neut card.
-
-
-neut_seed1 : 
-Set the first seed for NEUT.
-
-
-neut_seed2 : 
-Set the second seed for NEUT.
-
-
-neut_seed3 : 
-Set the third seed for NEUT.
-
-
-random_start : 
-Set the flag for starting at a random position in the input flux file/chain.
-For both genie and neut the seed used to generate this random start point is
-set using the neutrino/random_seed command.
-
-
-force_geometry : 
-Forces neutrino simulation to use external geometry; temporary; for sand simulation.
-
-
-===============
-configuration :
-===============
-A series of options to control the job configuration, including the
-module list
-
-Available Commands:
-
-module_list : 
-The list of nd280 modules to run. The default is: nd280Geant4Sim detResponseSim eventRecon.
-Available Modules:
-     nd280Geant4Sim
-     detResponseSim
-     nuance
-     neut
-     neutSetup
-     neutMC
-     genie
-     genieSetup
-     genieMC
-     genieConvert
-     cosmic
-     eventRecon
-     eventAnalysis
-     eventDisplay
-     eventUnpack
-     sandPropagate
-     selectEventSim
-     ecalRecon
-     examineEcalHits
-     trexRecon
-     userModule*
-     
-
-
-inputfile : 
-Specify an input file to resume processing a job with the same job hash
-
-database_rollback_date : 
-Specify a date for database rollback. Constants loaded after this date
-will not be used.
-The date format is:  yyyy-mm-dd hh:mm:ss
-Do not use this option if you want to use the current datebase.
-
-dq_database_rollback_date : 
-Specify a date for data quality database rollback. Constants loaded after
-this date will not be used.
-The date format is:  yyyy-mm-dd hh:mm:ss
-Do not use this option if you want to use the current datebase.
-
-========
-unpack :
-========
-Control of eventUnpack and unpacking aspect of calibration.
-
-Available Commands:
-
-midas_file : 
-Specify the midas file to be used in eventUnpack
-
-
-geometry_file : 
-Specify the geometry file to be used in eventUnpack
-
-
-keep_digits : 
-Turn on or off the storing of digits in eventCalib. (Default off).
-
-
-num_events : 
-The number of events to process with eventUnpack. Will process all events in a file is not set.
-
-
-skip_events : 
-The number of events to skip before processing with eventUnpack. Will process from the start of a file is not set.
-
-
-find_run_event : 
-The run,event combination to skip to before processing with eventUnpack. Will process from the start of a file if not set. Often useful with num_events = 1.
-
-
-event_select : 
-The event types to select from the input midas file.
-     Set to ALL, SPILL, COSMIC, PEDESTAL or OTHER
-
-
-process_truncated : 
-Force processing of truncated midas files. True/False. False by default.
-
-
-=============
-electronics :
-=============
-Control of detResponseSim
-
-Available Commands:
-
-new_sim : 
-Specify whether to use the new electronics simulation. Set 1 (to use) or 0 (not to use). Default is not to use.
-
-
-num_events : 
-The number of events to process with detResponseSim. Will process all events in a file is not set.
-
-
-skip_events : 
-The number of events to skip before processing with detResponseSim. Will process from the start of a file is not set.
-
-
-find_run_event : 
-The run,event combination to skip to before processing with detResponseSim. Will process from the start of a file if not set. Often useful with num_events = 1.
-
-
-random_seed : 
-The random seed for detResponseSim. A non zero integer.
-
-
-ecaltestbeam : 
-Use elecsim with settings appropriate to the ecal test beam instead of the pit
-Set to 1 to use or 0 to use default.
-
-
-ingrid_only : 
-Turn off electronic simulation for all detectors except Ingrid. True/False. Defaults to false.
-
-
-==========
-software :
-==========
-A series of options to control the configuration and running of the nd280
-software
-
-Available Commands:
-
-cmtpath : 
-The CMTPATH enviroment variable. The directory(s) where the nd280 software
-is installed. This will be taken from the environment if not set, or set to
-ENVIRONMENT.
-
-
-cmtroot : 
-The CMTROOT enviroment variable. The direcotry in which CMT is installed.
-This will be taken from the environment if not set, or set to ENVIRONMENT.
-
-
-nd280ver : 
-The nd280 package version. This will be selected from the most appropriate
-version in CMTPATH if not set.
-
-
-nd280setup : 
-The package initialization setup script. Useful when individual packages are
-checked out for development purposes.
-This will be selected from the most appropriate version in CMTPATH if not set.
-
-
-nd280package : 
-The nd280 software package version. This should in general not be used as
-the default package (nd280) is appopriate. This switch gives the control if
-desired however. The ND280VER card refers to the package specified here.
-
-
-platform : 
-The platform name where the executables are stored. This gives flexibilty
-on the choice of executables via the CMTCONFIG environmental varaible; however
-it is usually better to use the system default. Only use this option if you
-know what you are doing.
-
-
-genie_setup_script : 
-A bash script that configures the enviroment for running genie. See the documentation, configuring genie for nd280SoftwareControl for details.
-
-
-neut_setup_script : 
-A bash script that configures the enviroment for running neut. See the documentation, configuring neut for nd280SoftwareControl for details.
-
-

modules/ecalRecon.py

diff --git a/modules/ecalRecon.py b/modules/ecalRecon.py
index 718713b..acef906 100644
--- a/modules/ecalRecon.py
+++ b/modules/ecalRecon.py
@@ -77,6 +77,8 @@ class ecalRecon(nd280Module.nd280Module):
                 deadtfbs = []
             elif period == "3-4":
                 deadtfbs = [(9, 25), (9, 13)]
+            elif period == "2020-01-06":
+                  deadtfbs = [(9, 25), (9, 13), (1,1)]
             else:
                 self.config.log.stop("Config file has an invalid value for dead_channels ecal_periods_to_activate (" + str(period) + ")")
             parfilename = "ecalRecon_parameter_%s_override.txt" % self.moduleHash

modules/eventRecon.py

diff --git a/modules/eventRecon.py b/modules/eventRecon.py
index b44d618..0b45c91 100644
--- a/modules/eventRecon.py
+++ b/modules/eventRecon.py
@@ -149,6 +149,8 @@ class eventRecon(nd280Module.nd280Module):
                     deadtfbs = []
                 elif period == "3-4":
                     deadtfbs = [(9, 25), (9, 13)]
+                elif period == "2020-01-06":
+                      deadtfbs = [(9, 25), (9, 13), (1,1)]
                 else:
                     self.config.log.stop("Config file has an invalid value for dead_channels ecal_periods_to_activate ("+str(period)+")")
                 opt = "< ecalRecon.DeadChannel.DeadTFB = "

modules/nd280Commands.py

diff --git a/modules/nd280Commands.py b/modules/nd280Commands.py
index beb1ac9..9b8b87d 100644
--- a/modules/nd280Commands.py
+++ b/modules/nd280Commands.py
@@ -663,7 +663,9 @@ Options currently are:
                 - Full    The default geometry
                 - 2010-02 The baseline from Feb 2010 (Startup)
                 - 2010-11 The Geometry as of Nov 2010 (With the full ECAL added)
-                - 2015-08 The Geometry as of August 2015 (With the empty water target layer)
+                - 2015-08 The Geometry as of August 2015 (With the empty water target layer Number 1)
+                - 2019-08 The Geometry as of August 2019 (With the empty water target layers Numbers 1 and 5)
+                - 2019-11 The Geometry as of November 2019 (With the magnet half open)
 """)
 
         self.help.set("geometry","alignfgd1","""

modules/nd280Geometry.py

diff --git a/modules/nd280Geometry.py b/modules/nd280Geometry.py
index c1f6f4c..1e0e64e 100644
--- a/modules/nd280Geometry.py
+++ b/modules/nd280Geometry.py
@@ -38,6 +38,13 @@ class nd280Geometry(object):
             elif(baseline == "2015-08"):
                 contents += "/t2k/control baseline-2015-08 1.0\n"
                 self.config.log.output("ND280 Geometry 2015-08 Selected")
+            elif(baseline == "2019-08"):
+                contents += "/t2k/control baseline-2019-08 1.0\n"
+                self.config.log.output("ND280 Geometry 2019-08 Selected")
+            elif(baseline == "2019-11"):
+                contents += "/t2k/control baseline-2019-11 1.0\n"
+                self.config.log.output("ND280 Geometry 2019-01 Selected")
+
             else:
                 self.config.log.stop("Unknown ND280 Geometry Baseline "+baseline+" selected. Cannot continue")
                 

setup_script/setup_python.sh

diff --git a/setup_script/setup_python.sh b/setup_script/setup_python.sh
index 273936f..d14e50b 100644
--- a/setup_script/setup_python.sh
+++ b/setup_script/setup_python.sh
@@ -3,7 +3,7 @@ unset -f pythonpath_prepend
 pythonpath_remove ()  { export PYTHONPATH=`echo -n $PYTHONPATH | awk -v RS=: -v ORS=: '$0 != "'$1'"' | sed 's/:$//'`; } 
 pythonpath_prepend ()  { pythonpath_remove $1; export PYTHONPATH=`echo $1:$PYTHONPATH | sed -e 's/^://' -e 's/:$//' ` ;} 
 
-pythonpath_prepend  "${ND280SOFTWARECONTROLROOT}/modules"
+pythonpath_prepend  "${ND280SOFTWARECONTROLROOT}/${ND280_SYSTEM}/lib"
 
 #echo $PYTHONPATH
 

Differences between baseMaster version 1.67 and 1.65

.Dockerignore

diff --git a/.Dockerignore b/.Dockerignore
new file mode 100644
index 0000000..a87200e
--- /dev/null
+++ b/.Dockerignore
@@ -0,0 +1,3 @@
+.git
+.gitlab-ci.yml
+Dockerfile
\ No newline at end of file

.gitignore

diff --git a/.gitignore b/.gitignore
index 7f0e1eb..3077a6c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
 *.bak
 .*
 !/.gitignore
+!/.gitlab-ci.yml
+!/.Dockerignore
 *_history.txt
 *.old~

.gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..f532b5b
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,58 @@
+# This file is a template, and might need editing before it works on your project.
+# Using job token: https://docs.gitlab.com/ee/user/project/new_ci_build_permissions_model.html#job-token
+
+# Templace for the job definition
+.job_template: &job_definition  # Hidden key that defines an anchor named 'job_definition'
+  # Official docker image.
+  image: docker:latest
+  stage: build
+  services:
+    - docker:dind
+  before_script:
+    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
+    - echo "Using externalsMaster version ${CI_EXTERNALSMASTER_VERSION}"
+
+# Build the master branch when there is no tag
+# Use "master" for docker image $POLICY_VERSION
+docker-build-master:
+  <<: *job_definition
+  script:
+    - docker build --pull --build-arg EXTMASTER_IMAGE_VERSION=${CI_EXTERNALSMASTER_VERSION} --build-arg GIT_T2K_TOKEN=$CI_REGISTRY_PASSWORD --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER --build-arg VERSION_ARG="latest" -t "$CI_REGISTRY_IMAGE:latest" .
+    - docker push "$CI_REGISTRY_IMAGE:latest"
+  only:
+    - master
+# Additional build when a tag is made (required an additional build step on top of the master build)
+# Added the policy_version as build-arg in order to produce the right folders
+# Use tag for docker image $POLICY_VERSION
+docker-build-tags:
+  <<: *job_definition
+  script:
+    - docker build --pull --build-arg EXTMASTER_IMAGE_VERSION=${CI_EXTERNALSMASTER_VERSION} --build-arg GIT_T2K_TOKEN=$CI_REGISTRY_PASSWORD --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER --build-arg VERSION_ARG=$CI_COMMIT_TAG -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" .
+    - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
+  only:
+    - tags
+
+# Steps for the merge request: no push to registry
+# Use default version if on merge_request
+docker-build-mr:
+  <<: *job_definition
+  script:
+    - docker build --pull --build-arg EXTMASTER_IMAGE_VERSION=${CI_EXTERNALSMASTER_VERSION} --build-arg GIT_T2K_TOKEN=$CI_REGISTRY_PASSWORD --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER -t "$CI_REGISTRY_IMAGE" .
+  only:
+    - merge_requests
+
+# Standard branch build: this happens every time a new branch is pushed: is that necessary?
+# docker-build:
+#   <<: *job_definition
+#   script:
+#     - docker build --pull --build-arg GIT_T2K_TOKEN=$CI_REGISTRY_PASSWORD --build-arg GIT_T2K_USERNAME=$CI_REGISTRY_USER -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
+#     - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
+#   except:
+#     - master
+#     - tags
+#     - merge_requests
+    
+variables:
+  DOCKER_DRIVER: overlay2
+  DOCKER_TLS_CERTDIR: ""
+  #DOCKER_HOST: tcp://docker:2375

Dockerfile

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..1634da9
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,43 @@
+ARG EXTMASTER_IMAGE_VERSION=1.74
+FROM git.t2k.org:8088/nd280/master-packages/externalsmaster:${EXTMASTER_IMAGE_VERSION} AS intermediate_basemaster
+
+ARG VERSION_ARG=1.65
+ENV BASEMASTER_VERSION=${VERSION_ARG}
+ENV ND280_VER $BASEMASTER_VERSION
+ENV BASEMASTER_PATH $COMMON_BUILD_PREFIX/baseMaster_${BASEMASTER_VERSION}
+
+########################################
+
+FROM intermediate_basemaster as built_basemaster
+
+ENV ND280_NJOBS 3
+
+ARG GIT_T2K_USERNAME
+ARG GIT_T2K_TOKEN
+
+COPY cmake ${BASEMASTER_PATH}/cmake
+
+RUN source $COMMON_BUILD_PREFIX/setup.sh &&\
+    ND280_GIT="https://${GIT_T2K_USERNAME}:${GIT_T2K_TOKEN}@git.t2k.org/nd280/" &&\
+    nd280-find-dependencies base baseMaster ${BASEMASTER_VERSION}
+
+RUN mkdir ${BASEMASTER_PATH}/${LINUX_INSTALL_FOLDER}
+WORKDIR ${BASEMASTER_PATH}/${LINUX_INSTALL_FOLDER}
+
+RUN source $COMMON_BUILD_PREFIX/setup.sh &&\
+    cmake \
+        # -D ND280_DEBUG_MODE=DEBUG \
+        ../cmake &&\
+    ls -r \
+      -I "*Geant4*" \
+      -I "*ROOT*" \
+      -I "*GSL*" \
+      -I "*CERNLIB*" \
+      -I "*NEUT*" \
+      -I "*CLHEP*" \
+      -I "*MYSQL*" \
+      -I "*All.sh" \
+      -I "setup.sh" \
+      ../bin | xargs -I NAME -P 1 /bin/bash -c "ND280_NJOBS=3 /bin/bash ../bin/NAME $1"
+
+RUN du -d1 -h $COMMON_BUILD_PREFIX

cmake/baseMasterND280_USE.cmake

diff --git a/cmake/baseMasterND280_USE.cmake b/cmake/baseMasterND280_USE.cmake
index 0ec2e49..2e891d1 100644
--- a/cmake/baseMasterND280_USE.cmake
+++ b/cmake/baseMasterND280_USE.cmake
@@ -1,11 +1,11 @@
 ND280_USE(testBase  1.17.1 )
-ND280_USE(oaEvent  8.16 )
+ND280_USE(oaEvent  8.16.1 )
 ND280_USE(oaUtility  5.13.1 )
 ND280_USE(oaRawEvent  3.31.1 )
 ND280_USE(oaRuntimeParams  0.9.1 )
 ND280_USE(oaSlowControlDatabase  1.15.1 )
 ND280_USE(oaOfflineDatabase  2.15.1 )
-ND280_USE(nd280SoftwareControl  2.0.2 )
+ND280_USE(nd280SoftwareControl  2.2 ) # framework
 ND280_USE(oaCalibTables  1.27.1 )
 ND280_USE(oaIngridUtils  1.7.1 )
 ND280_USE(oaGeomInfo  5.9.1 )

cmake/baseMasterPackageVersion.cmake

diff --git a/cmake/baseMasterPackageVersion.cmake b/cmake/baseMasterPackageVersion.cmake
index fa53463..6924b9d 100644
--- a/cmake/baseMasterPackageVersion.cmake
+++ b/cmake/baseMasterPackageVersion.cmake
@@ -1 +1 @@
-set(PACKAGE_VERSION "1.65" )
+set(PACKAGE_VERSION "1.67" )

doc/baseMasterHistory.dox

diff --git a/doc/baseMasterHistory.dox b/doc/baseMasterHistory.dox
index 901f73a..6d0ca1f 100644
--- a/doc/baseMasterHistory.dox
+++ b/doc/baseMasterHistory.dox
@@ -457,7 +457,7 @@ Freeze information:
 oaChanInfo -> v1r15
 
 
-\section baseMaster_1.63_history Version 1.63
+\section baseMaster_1_63_history Version 1_63
 
 Freeze information:
    - Freeze Date: Sun Sep  1 19:29:21 2019
@@ -479,7 +479,7 @@ git.t2k.org/nd280/renaming.
 
 The name of this package was changed from nd280Base to baseMaster.
 
-\section baseMaster_1.64_history Version 1.64
+\section baseMaster_1_64_history Version 1_64
 
 Freeze information:
    - Freeze Date: Fri Oct 11 15:14:11 2019
@@ -504,7 +504,7 @@ oaApplyAlign  2.5.1
 oaMagnetCalib 4.17.1 
 
 
-\section baseMaster_1.65_history Version 1.65
+\section baseMaster_1_65_history Version 1_65
 
 Freeze information:
    - Freeze Date: Thu Oct 17 14:35:54 2019
@@ -514,4 +514,26 @@ Freeze information:
 
 nd280SoftwareControl --> 2.0.2
 
+
+\section baseMaster_1_66_history Version 1_66
+
+Freeze information:  
+   - Freeze Date: Thu Mar 26 15:03:53 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+Bump up versions of oaEvent and nd280SoftwareControl  
+
+
+\section baseMaster_1_67_history Version 1_67
+
+Freeze information:  
+   - Freeze Date: Fri Mar 27 16:04:32 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+nd280SoftwareControl to 2.2  
+
 */
\ No newline at end of file

Differences between nd280Geant4Sim version 6.11 and 6.10

.gitignore

diff --git a/.gitignore b/.gitignore
index 7f0e1eb..970bd8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,3 @@
 .*
 !/.gitignore
 *_history.txt
-*.old~

README.md

diff --git a/README.md b/README.md
index fafddf5..a08c4d7 100644
--- a/README.md
+++ b/README.md
@@ -1,28 +1,15 @@
-# The ND280 Energy Deposition Simulation
+This page was created from the documentation at [nd280.lancs.ac.uk](http://nd280.lancs.ac.uk)
 
-The energy deposition simulation is a wrapper around the GEANT4 particle
-propagation simulation and is intended as a tool to simulate all of the
-particle propagation and geometry related issues.  Be aware that the
-sequence of random numbers depends on the floating point accuracy of the
-machine, so given runs are machine dependent and may not be reproducible.
 
-This documentation assumes that you have a passing familiarity with how to
-write GEANT4 macro control files.
   
-Input file translators are provided for several standard input file
-formats.  In particular, this support input from both NEUT and GENIE.  The
-GENIE input is read using the RooTracker format.
+### Introduction
 
-## Introduction
-
-The ND280 off-axis detector simulation was formerly known as ND280MC,
-and any documentation that refers to ND280MC is applicable.  The
-simulation uses GEANT4, and NEUT to simulate particle propagation and
-geometry in the ND280 detector complex.  This MC is intended to be
-detailed and general enough to become part of the final T2K physics
+The ND280 off-axis detector simulation is intended to simulate all of the
+particle propagation and geometry related issues.  This MC is intended to
+be detailed and general enough to become part of the final T2K physics
 analysis.  Be aware that the sequence of random numbers depends on the
-floating point accuracy of the machine, so given runs are machine
-dependent and may not be reproducible.
+floating point accuracy of the machine, so given runs are machine dependent
+and may not be reproducible.
 
 This uses the oaEvent library to save events.  The Geant 4 macro
 language can be used to control the program execution and the reference
@@ -34,13 +21,13 @@ General Particle Source (GPS).  Since the main documentation for GPS is a
 bit sparse, there is information specific to our code at nd280Geant4SimGPS
 which covers many of the cases we need to simulate.  
 
-See Related pages for the release history, command
-list, bug list and to do list.  The related pages also provides
-information about adjusting the "alignment" of the MC geometry.
+See Related pages for the release history, nd280Geant4Sim command list, bug list and
+to do list.  The related pages also provides information about adjusting
+the "alignment" of the MC geometry.
 
 ### Running the ND280 Detector Simulation
 
-The detector simulation is run using the ND280GEANT4SIM.exe program which
+The ND280 detector simulation is run using the ND280GEANT4SIM.exe program which
 is a standard GEANT main program with minimal customization for T2K.  This
 can be run in any directory.  You will need to provide some sort of event
 kinematics generator (NEUT, NUANCE, NEUGEN, GPS, &c).  The preferred input
@@ -49,79 +36,10 @@ input format (NUANCE may be the only program in the world still using this
 format.  It was developed as a standard kinematics format for the IMB III
 experiment in about 1990)
 
-## Running the Detector Simulation
-
-The detector simulation is run using the ND280GEANT4SIM.exe program which
-is a standard GEANT main program with minimal customization.  This
-can be run in any directory.  You will need to provide some sort of event
-kinematics generator (NEUT, NUANCE, NEUGEN, GPS, &c).  The preferred input
-format is a rooTracker tree, but you can also use the text based tracker
-input format (NUANCE may be the only program in the world still using this
-format.  It was developed as a standard kinematics format for the IMB3
-experiment in about 1990)
-
-The program is generally run from the command line:
-```bash
-ND280GEANT4SIM.exe [options] macro-file.mac [macro-file.mac] ...
-```
-
-with one or more macro files.  The output file will be in the oaEvent
-format with a TGeoManager object summarizing the simulated geometry.
-
-Some important options:
-
-* -o <output-file> : Write the output to the root file.  This is equivalent
-        to the `/db/open` macro command.
-* -e <n>  : Add a `/run/beamOn <n>` command after the last macro is
-        processed so that `n` events are generated.
-* -u      : Add a `/t2k/update` command before the first macro is
-        processed.
-* -s      : Set the random seed based on the clock.  The seed can also
-        be set in the macro file.
-* -p <physics-list> : Set the physics list (see G4 documentation for the
-        available lists).
-* -C      : Toggle checking for overlaps in the geometry.
-
-If simulation is run with the `-h` option, it will print a help message.
-There are example macro files in the "inputs" subdirectory.
-
-The simulation uses some GEANT4 macro files to control how it is run.
-These are installed in the system dependent directory,
-
-An example of a command line is
-
-```bash
-ND280GEANT4SIM.exe -o my-output.root -u -e 100 muon-500.mac
-```
-
-There are example macro files in the "inputs" subdirectory, but the
-muon-500.mac might contain: 
-```
-####################################################################
-#
-# Generate a 10000 MeV muon beamed in the down stream direction.
-#
-
-# Define the particle and it's energy.
-/gps/particle mu+
-/gps/energy 10000 MeV
-
-# Set the position of the particle gun.
-/gps/position 0.0 0.0 -10.0 m
-
-# This generates the direction of the muon.  This aims
-# the particle downstream with the directions uniformly distributed in
-# a 5 deg cone around the Z axis.
-/gps/ang/type iso
-/gps/ang/maxtheta 5 deg
-/gps/ang/rot1 1 0 0
-/gps/ang/rot2 0 -1 0
-```
 ### Controlling the ND280 Detector Geometry.
 
-The coordinate system for the simulation is relative to the
-center of the unloaded (and undeflected) basket as defined in
-T2K-TN-10.
+The coordinate system for the ND280GEANT4SIM is centered around the center of the
+unloaded (and undeflected) basket as defined in T2K-TN-10.
 
 The nd280Geant4SimCommandList documents how to get low level control over the
 detector geometry, but most standard geometries can be simulated using
@@ -146,340 +64,11 @@ set.
 /t2k/control p0d-with-air 1.0
 ```
 
+
+
 GEANT 4 defines a simple macro language that is used to control the
 execution of the detector simulation.  All of the commands defined in the 
 ND280GEANT4SIM.exe executable are defined below.
 
-### Using GPS (The General Particle Source)
-
-This describes how to use the GPS particle source provided by GEANT.
-It is part of GEANT, so deviates from the normal way that the
-simulation accepts kinemtics.
-
-This particle source is incredibly useful, but extremely is idiosyncratic.
-It's also has relatively little documentation, and the documentation that
-exists is often misleading.  This page attempts to cover the basics of
-using GPS to write GEANT macros that produce samples of events to be used
-for testing ND280 software (meaning I got annoyed enough at the GPS
-documentation make notes).
-
-The general particle source as developed for the ESA, so it tends to use
-astronomical conventions.  This is particularly relevant with describing
-angles and directions.  Astronomers (and apparently space scientists) tend
-to speak about where the particle is coming from, not where it is going.
-This makes for an odd match when dealing with a particle simulation which
-is concerned with tracking the particles, and not determining the position
-of the source.  Once you get beyond the idiosyncratic definitions (which
-are at odds with the rest of GEANT), the GPS can be used to create almost
-any sort of particle distribution for testing programs.
-
-#### Controlling the Simulated Particle
-
-The particle being simulated is set using the `/gps/particle` command.  The
-particles are set by name, and can be any of the ones simulated by GEANT.
-The most common particles are `mu-`, `mu+`, `pi+`, `pi-, `e-`,
-`e+`, `gamma`, and `proton`.  For example
-
-```
-/gps/particle mu-
-/gps/particle pi+
-/gps/particle gamma
-/gps/particle proton
-```
-
-#### Controlling the Position Distribution
-
-The vertex position is controlled using the commands in the /gps/pos/
-subdirectory.  The most useful distributions are the Point, Plane, and
-Volume.  To generate a point source the following commands are used
-
-##### Making a point source
-
-```
-/gps/position 0 0 -50 cm
-/gps/pos/type Point
-```
-
-where the first line specifies that this is a point and the second line
-specifies the position.  Notice that all three coordinates must have the
-same units.  For a point source, it's not necessary to specify the type.
-GEANT is very inconsistent about the spelling of `centre` vs `center` with
-19 classes using `centre` and 33 using `center`.  You just have to check
-which version is being used by which class.  For consistency, avoid the
-problem by prefering `/gps/position` and avoiding `/gps/pos/centre`.
-
-##### Making a rectangular or circular source
-
-Since a point source can bias tests, vertices should usually be spread over
-a plane or a volume.  The vertices can be distributed over a flat surface
-by setting
-
-```
-/gps/position 0 0 -50 cm
-/gps/pos/type Plane
-/gps/pos/shape Rectangle
-/gps/pos/halfx 1 cm
-/gps/pos/halfy 1 cm
-/gps/pos/rot1 0 0 -1
-/gps/pos/rot2 0 1 0
-```
-
-##### Making a volume source
-
-To distribute the vertices over a volume the type is changed to Volume, and
-a volumetric shape must be chosen.  The following commands will generate a
-box
-
-```
-/gps/position 0 0 -50 cm
-/gps/pos/type Volume
-/gps/pos/shape Para
-/gps/pos/halfx 1 cm
-/gps/pos/halfy 1 cm
-/gps/pos/halfz 1 cm
-```
-
-that is 100 by 100 by 10 cm.  It's important that the /gps/position command
-comes first.  The other shapes that might be useful are Sphere and Cylinder
-which are specified as
-
-```
-/gps/position 0 0 -50 cm
-/gps/pos/type Volume
-/gps/pos/shape Sphere
-/gps/pos/radius 1 cm
-```
-
-and
-
-```
-/gps/position 0 0 -50 cm
-/gps/pos/type Volume
-/gps/pos/shape Cylinder
-/gps/pos/radius 1 cm
-/gps/pos/halfz 1 cm
-```
-
-#### Controlling the Direction Distribution
-
-The direction distribution is set using the commands in the /gps/ang/
-subdirectory.  When specifying the direction, be aware that the code was
-written under contract to the ESA, and no effort was made to be consistent
-with the rest of the GEANT code base.  As a result, the directions use a
-different angle convention when compared to the rest of GEANT.  In fact,
-while the documentation says that the /gps/ang/ commands control the
-angular distribution of the source, they actually control the direction
-from a point along an initial particle direction ray back to where the
-source is found [note that the mathematics are very poorly defined].  To be
-honest, it's an odd and poorly thought out mix of definitions used by
-physicists and astronomers.  Specifically, to get a particle traveling in
-the positive Z direction, you specify a theta of 180 degree.
-
-The coordinate system used to generate the direction can be changed by
-using the /gps/ang/rot1 and /gps/ang/rot2 commands.  The X axis of the
-direction coordinate system is defined by the /gps/ang/rot1 command, and
-the XY plane is determined by the /gps/ang/rot2 command.  Neither of the
-axes need to be unit vectors, and the rot2 vector doesn't need to be
-perpendicular to rot1 (the normal will be determined by rot1 cross rot2).
-The directions will then be distributed around the negative Z axis in the
-rotated coordinate system.  This means that
-
-```
-/gps/ang/rot1 0 0 1
-/gps/ang/rot2 0 1 0
-```
-
-will rotate the direction coordinate system so that the local Z axis points
-along to global negative X axis.  This will cause the generated particles
-to travel along the positive X axis (i.e. along the local negative Z axis).
-Note: The default for /gps/ang/rot2 is [0 1 0], so it doesn't need to be
-specified.
-
-##### Setting a fixed particle direction
-
-A fixed particle direction can be specified using
-
-```
-/gps/direction 0 0 1
-```
-
-where this specifies the direction that the particle is traveling.  In this
-case, the particle is traveling along the positive Z axis.  Notice unlike
-the rest of the gps direction commands, this uses the same convention as
-the rest of GEANT.
-
-##### Making directions with a Gaussian spread
-
-The problem with specifying a fixed direction is that it may bias a test.
-A Gaussian direction spread can be created using a one dimensional beam
-traveling along the local negative Z axis (yes, it is a bizarre choice).
-For instance, to create a beam traveling along the Z axis with a 10 degree
-divergence (sigma) the following commands would be used.
-
-```
-/gps/ang/type beam1d
-/gps/ang/sigma_r 10 deg
-/gps/ang/rot1 0 0 1
-/gps/ang/rot2 0 1 0
-```
-
-The first line specifies that a 1D beam should be generated where this
-means that the generated directions have a spread around the negative Z
-axis.  The second line specifies a 10 degree spread around the negative Z
-axis.  The third line fixes the screwball convention that the beam travels
-along the negative Z axis by reversing the coordinate system (this aligns
-the direction coordinate system so that it's negative Z axis points along
-the global Z axis).  You should be aware that (for reasons completely
-beyond me, but I've verified it in the source code) the /gps/ang/maxtheta
-and /gps/ang/mintheta commands have no effect on the beam distributions.
-
-##### Generating directions in a cone
-
-To spread the directions isotropically over all direction, the following
-command is used
-
-```
-/gps/ang/type iso
-```
-
-The directions can then be limited to a cone using the max and min
-commands.  By default, the maximum angle is 180 degree and the minimum is 0
-degree.  Bear in mind that 180 degrees points along the positive Z axis and
-0 degrees points along the negative Z axis (these guys failed high school
-geometry).  To create a 10 degree cone of directions along the Z axis use
-
-```
-/gps/ang/type iso
-/gps/ang/mintheta 170 deg
-```
-
-or alternatively
-
-```
-/gps/ang/type iso
-/gps/ang/maxtheta 10 deg
-/gps/ang/rot1 0 0 1
-/gps/ang/rot2 0 1 0
-```
-
-where the final line deals with the wacky angle convention.
-
-#### Controlling the Energy Distribution
-
-The energy distribution is set using the commands in the /gps/ene/
-subdirectory.  There are many options available, but for testing programs
-the most useful ones are to create a mono-energetic, Gaussian, or uniform
-energy source.  By default the energy is specified as the kinetic energy of
-the created particle.
-
-##### Making a monoenergetic source
-
-To create a monoenergetic source, the energy is specified
-like this:
-
-```
-/gps/ene/mono 100 MeV
-```
-
-where you must specify both the energy value and the unit.  This create a
-monoenergetic source with 100 MeV of kinetic energy.
-
-##### Making a uniform energy distribution.
-
-A uniform energy distribution can be created using:
-
-```
-/gps/ene/type Lin
-/gps/ene/gradient 0
-/gps/ene/intercept 1
-/gps/ene/min 100 MeV
-/gps/ene/max 500 MeV
-```
-
-where this creates a source with a uniform kinetic energy distribution
-between 100 MeV and 500 MeV of kinetic energy.  The gradient is specified
-in MeV^{-1}.  The intercept is a pure number, and the final distribution
-does not need to be normalized.
-
-##### Making a Gaussian energy distribution
-
-A Gaussian energy distribution can be created using
-
-```
-/gps/ene/type Gauss
-/gps/ene/mono 400 MeV
-/gps/ene/sigmae 30 MeV
-```
-
-where this create a source with a Gaussian spread of 30 MeV around 400 MeV.
-
-#### Creating Multiple Particle Events
-
-The GPS is very inflexible when it comes to handling multiple particles in
-a single event, so it's not possible to handle the general case with
-multiple particles coming from the same vertex.  This is overcome in detSim by implementing the `/generator/combine` command which is discussed below.
-
-For the simple case of generating multiple particles
-drawn from the same angle and energy distributions, but with the same position, use `/gps/number` command.  For instance
-
-```
-/gps/number 2
-```
-
-would create two particles at the vertex.  Note that both particles have
-the same energy and position distributions.
-
-If you need control over the individual particles, then you have to
-use the /gps/source commands in combination with the /generator/combine
-command.  For instance, to create an event with a mu- and a proton from the
-same vertex position (notice there will be two "primary vertexes" with the
-same position coordinates), you could create a macro:
-
-```
-# Clear the source and tell GPS to make multiple vertices
-/gps/source/clear
-/gps/source/multiplevertex true
-
-# Create the first particle.  This can be done using any of the GPS macro
-# commands.
-/gps/source/add 1
-/gps/particle mu-
-/gps/energy 500 MeV
-/gps/direction 0 1 1
-/gps/position 0.0 0.0 -50 cm
-/gps/pos/type Volume
-/gps/pos/shape Para
-/gps/pos/halfx 1 cm
-/gps/pos/halfy 1 cm
-/gps/pos/halfz 1 cm
-
-# Create the second particle.  This can be done using any of the GPS macro
-# commands.  The position will be overridden below.
-/gps/source/add 2
-/gps/particle proton
-/gps/energy 300 MeV
-/gps/direction 0 0 1
-/gps/position 0 0 0
-
-# Add the GPS generator.  It will create two primary vertices
-# (G4PrimaryVertex objects).
-/generator/add
-
-# Copy the vertex position from the first G4PrimaryVertex object to the
-# second.  Notice that the vertices in GPS are numbered from one, but that
-# the G4PrimaryVertex objects are numbered from zero.
-
-/generator/combine 0 1
-```
+\verbinclude nd280Geant4Sim-command.list
 
-The `/generator/combine` command copies the vertex position from the first
-vertex to the second, and takes three arguments.  The first argument is the
-vertex number to copy the position, the second argument is the vertex
-number to copy the position into, and the optional third argument is a
-boolean flag specifying if the position of the second vertex should be
-relative to the first.  If the argument is true, then the position is of
-the second particle is adjusted to be relative to the position of the first
-(default: false).  This can be used to simulate displaced vertices.  As an
-example, if the optional third argument is true, the first vertex position
-is [1,1,1], and the second vertex position is [0,1,0], then the simulated
-vertex positions will be [1,1,1] and [1,2,1].

app/nd280Geant4Sim.cc

diff --git a/app/nd280Geant4Sim.cc b/app/nd280Geant4Sim.cc
index 4315119..b42f4b3 100644
--- a/app/nd280Geant4Sim.cc
+++ b/app/nd280Geant4Sim.cc
@@ -1,93 +1,47 @@
+
+#include <iostream>
+#include <fstream>
+
 #include <csignal>
 #include <cstdlib>
-#include <iostream>
-#include <map>
-#include <string>
 
 #include "TND280Log.hxx"
 
 #include "globals.hh"
 #include "G4RunManager.hh"
 #include "G4UImanager.hh"
-#include "G4UIExecutive.hh"
+#include "G4UIterminal.hh"
+#include "G4UItcsh.hh"
 
 #include "ND280CreateRunManager.hh"
 #include "ND280PersistencyManager.hh"
 #include "ND280RootPersistencyManager.hh"
 
+// The physics lists that can be used.
+#include "ND280PhysicsList.hh"
+
 #ifdef G4VIS_USE
 #include <G4VisExecutive.hh>
 #endif
 
-void usage (std::string message) {
-    std::cout << "Usage: edep-sim [options] [macros]" << std::endl;
-    std::cout << "    -C      -- Toggle geometry validation [Default: false]"
-              << std::endl;
-    std::cout << "    -d      -- Increase the debug level" << std::endl;
-    std::cout << "    -D <name>=[error,severe,warn,debug,trace]"
-              << std::endl
-              << "            -- Change the named debug level"
-              << std::endl;
-    std::cout << "    -e <n>  -- Add /run/beamOn <n> after last macro."
-              << std::endl;
-    std::cout << "    -o      -- Set the output file" << std::endl;
-    std::cout << "    -p <l>  -- Select the physics list" << std::endl;
-    std::cout << "    -q      -- Decrease the verbosity level" << std::endl;
-    std::cout << "    -s      -- Set the seed from the time" << std::endl;
-    std::cout << "    -t      -- No tcsh-style interface" << std::endl;
-    std::cout << "    -u      -- Do update before running the macros"
-              << std::endl;
-    std::cout << "    -U      -- Start an interactive run after the macros"
-              << std::endl
-              << "               are processed."
-              << std::endl;
-    std::cout << "    -v      -- Increase the verbosity" << std::endl;
-    std::cout << "    -V <name>=[quiet,log,info,verbose]" << std::endl
-              << "            -- Change the named log level"
-              << std::endl;
-    std::cout << "    -h      -- This help message." << std::endl;
-
-    if (message.length() > 0) {
-        std::cout << "ERROR: " << message << std::endl;
-    }
-    std::exit(1);
-}
-
 int main(int argc,char** argv) {
-
     G4String outputFilename;
     G4String physicsList = "";
 
+    G4int errflg = 0;
     G4int c = 0;
-    G4bool useUI = false;
-    bool setSeed=false;
-    bool doUpdate=false;
-    bool validateGeometry=false;
-
+    G4bool useUItcsh = true;
     int debugLevel = 0;
     std::map<std::string, ND::TND280Log::ErrorPriority> namedDebugLevel;
-
     int logLevel = -1; // Will choose default logging level...
     std::map<std::string, ND::TND280Log::LogPriority> namedLogLevel;
-
-    // If filled, run this many events.  The command line argument must be an
-    // integer or G4 will give an error.  There could be error checking here,
-    // but assume the user is "intelligent", and won't try to run "-e ten"
-    // instead of "-e 10".
-    std::string beamOnCount = "";
-
-    while ((c=getopt(argc,argv,"CdD:e:o:p:qstuUvV:h")) != -1) {
+    while (!errflg && ((c=getopt(argc,argv,"dD:o:p:qtvV:")) != -1)) {
         switch (c) {
-        case 'C': {
-            // Toggle the validateGeometry flag.  The default value is set
-            // above.
-            validateGeometry = !validateGeometry;
-            break;
-        }
         case 'd':
             ++debugLevel;
             break;
-        case 'D': {
+        case 'D':
+        {
             // Set the debug level for a named trace.
             std::string arg(optarg);
             std::size_t sep = arg.find("=");
@@ -111,15 +65,10 @@ int main(int argc,char** argv) {
                     namedDebugLevel[name.c_str()] = ND::TND280Log::TraceLevel;
                     break;
                 default:
-                    usage("Unknown debug level for -D");
-                }
+                    ++errflg;
+                    G4cout << "Option not implemented" << G4endl;
                 }
-            break;
             }
-        case 'e': {
-            // Add a /run/beamOn command after the last macro has been
-            // processed.
-            beamOnCount = optarg;
             break;
         }
         case 'o':
@@ -133,26 +82,16 @@ int main(int argc,char** argv) {
             if (logLevel>0) --logLevel;
             else logLevel = 0;
             break;
-        case 's': {
-            // Force a '/t2k/random/timeRandomSeed'
-            setSeed = true;
-            break;
-        }
-        case 'u': {
-            // Force a '/t2k/update' before running the first macro.
-            doUpdate = true;
-            break;
-        }
-        case 'U':
-            // Fall back to the user command line interface.
-            useUI = true;
+        case 't': // Don't use a tcsh-style command line interface
+            useUItcsh = false;
             break;
         case 'v':
             // increase the verbosity level.
             if (logLevel>0) ++logLevel;
             else logLevel = 2;
             break;
-        case 'V': {
+        case 'V':
+        {
             // Set the debug level for a named trace.
             std::string arg(optarg);
             std::size_t sep = arg.find("=");
@@ -173,21 +112,20 @@ int main(int argc,char** argv) {
                     namedLogLevel[name.c_str()] = ND::TND280Log::VerboseLevel;
                     break;
                 default:
-                    usage("Unknown log level for -V");
+                    errflg++;
+                    G4cout << "Option not implemented" << G4endl;
                 }
             }
             break;
         }
-        case 'h':
-            usage("");
         default:
-            usage("Unknown option");
+            errflg++;
+            G4cout << "Option not implemented" << G4endl;
         }
     }
 
     ND::TND280Log::Configure();
 
-    // Set the global log level.
     if (logLevel == 0) {
         ND::TND280Log::SetLogLevel(ND::TND280Log::QuietLevel);
     }
@@ -204,7 +142,6 @@ int main(int argc,char** argv) {
         ND280Verbose("Set log level to VerboseLevel");
     }
     
-    // Set the name log levels.
     for (std::map<std::string,ND::TND280Log::LogPriority>::iterator i 
              = namedLogLevel.begin();
          i != namedLogLevel.end();
@@ -212,7 +149,6 @@ int main(int argc,char** argv) {
         ND::TND280Log::SetLogLevel(i->first.c_str(), i->second);
     }
          
-    // Set the global debug level.
     if (debugLevel == 1) {
         ND::TND280Log::SetDebugLevel(ND::TND280Log::WarnLevel);
         ND280Warn("Set debug level to WarnLevel");
@@ -226,7 +162,6 @@ int main(int argc,char** argv) {
         ND280Trace("Set debug level to TraceLevel");
     }
 
-    // Set the named debug levels.
     for (std::map<std::string,ND::TND280Log::ErrorPriority>::iterator i 
              = namedDebugLevel.begin();
          i != namedDebugLevel.end();
@@ -234,6 +169,7 @@ int main(int argc,char** argv) {
         ND::TND280Log::SetDebugLevel(i->first.c_str(), i->second);
     }
          
+    // Set the mandatory initialization classes
     // Construct the default run manager
     G4RunManager* runManager = ND280CreateRunManager(physicsList);
     
@@ -253,52 +189,34 @@ int main(int argc,char** argv) {
     // Set the defaults for the simulation.
     UI->ApplyCommand("/t2k/control nd280Geant4Sim-defaults 1.0");
 
-    // Open the output file.
     if (persistencyManager && outputFilename != "") {
         G4String command = "/db/open ";
         UI->ApplyCommand(command+outputFilename);
     }
     
-    // Make sure that signals use the default handling.  This makes sure that
-    // other libraries (ROOT, I'm looking at you) aren't trapping errors.
     std::signal(SIGILL,  SIG_DFL);
     std::signal(SIGBUS,  SIG_DFL);
     std::signal(SIGSEGV, SIG_DFL);
 
-    // Set the random seed from the time.
-    if (setSeed) UI->ApplyCommand("/t2k/random/timeRandomSeed");
-
-    // Signal that the geometry should be validated for overlaps before
-    // generating the first event.  This causes the executable to throw an
-    // exception if the geometry has overlaps.
-    if (validateGeometry) UI->ApplyCommand("/t2k/validateGeometry");
-
-    // Set the defaults for the simulation and get ready to run.  This needs
-    // to be done before the first event is generated, but can also be done in
-    // the users macro file.  It's executed here if the "-u" option was
-    // provided on the command line.
-    if (doUpdate) UI->ApplyCommand("/t2k/update");
-
-    // Run the macros from the command line.
+    if (optind < argc) {
+        G4String command = "/control/execute ";
         for (int i=optind; i<argc; ++i) {
-        std::string macroFilename = argv[i];
-        UI->ApplyCommand("/control/execute " +macroFilename);
+            G4String macroFilename = argv[i];
+            UI->ApplyCommand(command+macroFilename);
         }
-
-    // If a event count was provided with the -e format, then add a beamOn
-    // command.  The beamOn command can also be in the users macro, but
-    // this makes it a little more convenient to write generic macros and
-    // then specify the number of interactions to simulate from the
-    // command line.
-    if (!beamOnCount.empty()) {
-        UI->ApplyCommand("/run/beamOn " + beamOnCount);
     }
-
-    // Make a command line available if one was requested.
-    if (useUI) {
-        G4UIExecutive* ui = new G4UIExecutive(argc, argv);
-        ui->SessionStart();
-        delete ui;
+    else {
+        // G4UIterminal is a (dumb) terminal.
+        G4UIsession * session;
+        if(useUItcsh) {
+            // G4UIterminal is a terminal with tcsh-like control.
+            session = new G4UIterminal(new G4UItcsh);
+        }
+        else {
+            session = new G4UIterminal();
+        }
+        session->SessionStart();
+        delete session;
     }
     
     // job termination

cmake/CMakeLists.txt

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 8c677b9..4dc2f81 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -1,7 +1,7 @@
 # CMakeLists.txt for nd280Geant4Sim package. It creates a library with dictionary and a main program
 cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
 
-find_package(nd280SoftwarePolicy 3)
+find_package(nd280SoftwarePolicy 3.0)
 if( NOT nd280SoftwarePolicy_FOUND) 
   message(FATAL_ERROR " nd280SoftwarePolicy not found - abort ")
 endif()

cmake/nd280Geant4SimPackageVersion.cmake

diff --git a/cmake/nd280Geant4SimPackageVersion.cmake b/cmake/nd280Geant4SimPackageVersion.cmake
index e7e49f1..6aeb705 100644
--- a/cmake/nd280Geant4SimPackageVersion.cmake
+++ b/cmake/nd280Geant4SimPackageVersion.cmake
@@ -1 +1 @@
-set(PACKAGE_VERSION "6.10" )
+set(PACKAGE_VERSION "6.11" )

doc/nd280Geant4SimHistory.dox

diff --git a/doc/nd280Geant4SimHistory.dox b/doc/nd280Geant4SimHistory.dox
index 362f5ab..f72a67a 100644
--- a/doc/nd280Geant4SimHistory.dox
+++ b/doc/nd280Geant4SimHistory.dox
@@ -951,7 +951,7 @@ Remove an unneccesary line of output left over from earlier debugging.
 
 
 
-\section nd280Geant4Sim_6.9_history Version 6.9
+\section nd280Geant4Sim_6_9_history Version 6_9
 
 Freeze information:
    - Freeze Date: Sun Sep  1 19:30:48 2019
@@ -973,36 +973,25 @@ git.t2k.org/nd280/renaming.
 
 The name of this package was changed from nd280mc to nd280Geant4Sim.
 
-\section nd280Geant4Sim_6.10_history Version 6.10
+\section nd280Geant4Sim_6_11_history Version 6_11
 
 Freeze information:
-   - Freeze Date: Fri Oct 11 14:30:40 2019
+   - Freeze Date: Wed Feb 12 12:53:58 2020
    - Freeze User: Clark McGrew
    - Freeze Host: boxer
 
 
-FEATURES
+MAINTENANCE FREEZE
 
-** Deprecate ND280CombinationGenerator: The suggested replacement
-   is the ND280CopyVertexGenerator. This generator uses "iffy" C++
-   coding techniques that are explicitly deprecated starting in C++11.
+This is a freeze of the 6.9.x branch to create a new 6.11.x branch.
+This is being done so that going forward all of the 6.x.x branchs will
+be exactly what should be run for production 7 (pre upgrade work).
+All of the upgrade work will be done in version 7, or later.
 
-** ND280CopyVertexGenerator: Add a generator to copy the vertex
-   position and time from one primary vertex to another.  This works
-   with newer C++ standards.  It has slightly different sematics than
-   the combination generator that it replaces.  The combination
-   generator copied the particles from one vertex to another and then
-   removed the source vertex, the copy generator simply changes the
-   position of one of the vertices.
-
-** ND280Scintillation: Add a new process to implement scintillation.
-   This adds Birks constant definitions for all of the current
-   scintillator materials.
-
-** Track the amount of energy going into non-ionizing energy
-   deposition.  This is used to track the amount of energy that gets
-   changed into optical photons inside of a scintillator.  If this is
-   used with a later version of oaEvent (8.16 or later), the amount of
-   secondary energy deposition is saved in the output file.
+Notice that this has orphaned the 6.10 release.  That release contains
+changes for the upgrade, which have all been imported into master, and
+will be included in all later versions.
 
+It includes all changes needed to simulate the 2019 geometry which
+have been cherry picked from the master branch.
 */

inc/ND280FGDConstructor.hh

diff --git a/inc/ND280FGDConstructor.hh b/inc/ND280FGDConstructor.hh
index d703ee6..1f477ed 100644
--- a/inc/ND280FGDConstructor.hh
+++ b/inc/ND280FGDConstructor.hh
@@ -9,6 +9,8 @@ class G4LogicalVolume;
 
 #include "ND280ModuleConstructor.hh"
 
+#include <vector>
+
 /// Create a bounding box to contain the FGD Detector.  The method
 /// GetPiece() constructs a new unplaced FGD that is facing along the Z
 /// axis.  The calling code should and place the object into a large mother
@@ -58,6 +60,10 @@ public:
         return G4ThreeVector();
     }
 
+    void AddMissingWaterLayer(int layer) {
+        fMissingWaterLayers.push_back(layer);
+    }
+
 private:
 
     void Init(void);
@@ -87,5 +93,7 @@ private:
     /// Only the first 2 components (dx, dy) can be modified by the command.
     G4ThreeVector fFGDModuleTrans[15];
 
+    /// A vector of missing water layers
+    std::vector<int> fMissingWaterLayers;
 };
 #endif

inc/ND280HitSegment.hh

diff --git a/inc/ND280HitSegment.hh b/inc/ND280HitSegment.hh
index 99a0be3..dd251bb 100644
--- a/inc/ND280HitSegment.hh
+++ b/inc/ND280HitSegment.hh
@@ -22,10 +22,10 @@ using namespace CLHEP;
 /// This is a base class used to save G4Hit objects into a root output file.
 /// It contains the global position of the starting point and stopping point
 /// of the track segment that created the hit, plus the any fields provided by
-/// ND::TG4VHit.  The ND280GEANT4SIM expects the electronics response to be
-/// simulated off-line, and to assign the sensor identifiers to each hit.
-/// This class is used with the ND280SegmentSD sensitive detector class, and
-/// can be requested using the "segment" name from
+/// ND::TG4VHit.  The ND280GEANT4SIM expects the electronics response to be simulated
+/// off-line, and to assign the sensor identifiers to each hit.  This class is
+/// used with the ND280SegmentSD sensitive detector class, and can be
+/// requested using the "segment" name from
 /// ND280SensitiveDetectorFactor::MakeSD().
 class ND280HitSegment : public ND::TG4HitSegment, public G4VHit {
 public:

inc/ND280Scintillation.hh

diff --git a/inc/ND280Scintillation.hh b/inc/ND280Scintillation.hh

deleted file mode 100644

deleted file mode 100644
index f9c44df..0000000
--- a/src/kinem/ND280CopyVertexGenerator.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <G4PrimaryVertex.hh>
-#include <G4Event.hh>
-
-#include <TND280Log.hxx>
-#include "kinem/ND280CopyVertexGenerator.hh"
-
-ND280CopyVertexGenerator::ND280CopyVertexGenerator(int src, int dest,
-                                                       bool relative)
-    : fSource(src), fDestination(dest), fRelative(relative) { }
-
-ND280CopyVertexGenerator::~ND280CopyVertexGenerator(void) {}
-
-void ND280CopyVertexGenerator::GeneratePrimaryVertex(G4Event* evt) {
-
-    if (fSource < 0 || fSource >= evt->GetNumberOfPrimaryVertex()) {
-        abort();
-    }
-
-    if (fDestination < 0 || fDestination >= evt->GetNumberOfPrimaryVertex()) {
-        abort();
-    }
-
-    G4ThreeVector src = evt->GetPrimaryVertex(fSource)->GetPosition();
-    double srcTime = evt->GetPrimaryVertex(fSource)->GetT0();
-
-    if (fRelative) {
-        G4ThreeVector dest = evt->GetPrimaryVertex(fDestination)->GetPosition();
-        double destTime = evt->GetPrimaryVertex(fDestination)->GetT0();
-        src = src + dest;
-        srcTime = srcTime + destTime;
-    }
-
-    evt->GetPrimaryVertex(fDestination)->SetPosition(src.x(),src.y(),src.z());
-    evt->GetPrimaryVertex(fDestination)->SetT0(srcTime);
-
-}
-
-G4String ND280CopyVertexGenerator::GetName() {
-    return "copyVertex";
-}

inc/ND280UserPrimaryGeneratorMessenger.hh

diff --git a/inc/ND280UserPrimaryGeneratorMessenger.hh b/inc/ND280UserPrimaryGeneratorMessenger.hh
index 252f67d..789b559 100644
--- a/inc/ND280UserPrimaryGeneratorMessenger.hh
+++ b/inc/ND280UserPrimaryGeneratorMessenger.hh
@@ -105,7 +105,6 @@ private:
 
     G4UIcmdWithoutParameter* fClearCMD;
     G4UIcmdWithoutParameter* fAddCMD;
-    G4UIcommand* fCopyVertexCMD;
     G4UIcmdWithoutParameter* fCombineCMD;
     G4UIcmdWithAString* fSetKinematicsCMD;
     G4UIcmdWithAString* fSetCountCMD;

inc/kinem/ND280CopyVertexGenerator.hh

diff --git a/inc/kinem/ND280CopyVertexGenerator.hh b/inc/kinem/ND280CopyVertexGenerator.hh

inputs/nd280Geant4Sim-command-html.sh

diff --git a/inputs/nd280Geant4Sim-command-html.sh b/inputs/nd280Geant4Sim-command-html.sh
index a75945a..de0727b 100755
--- a/inputs/nd280Geant4Sim-command-html.sh
+++ b/inputs/nd280Geant4Sim-command-html.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 DIR=`pwd`/html
 

inputs/nd280Geant4Sim-command-list.sh

diff --git a/inputs/nd280Geant4Sim-command-list.sh b/inputs/nd280Geant4Sim-command-list.sh
index f58a312..164cdf4 100755
--- a/inputs/nd280Geant4Sim-command-list.sh
+++ b/inputs/nd280Geant4Sim-command-list.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-cosmics-gun.sh

diff --git a/inputs/nd280Geant4Sim-cosmics-gun.sh b/inputs/nd280Geant4Sim-cosmics-gun.sh
index 62379dd..1e5d250 100755
--- a/inputs/nd280Geant4Sim-cosmics-gun.sh
+++ b/inputs/nd280Geant4Sim-cosmics-gun.sh
@@ -40,7 +40,7 @@ if [ "x$1" != "x" ]; then
     shift
 fi
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-double-particle-gun.sh

diff --git a/inputs/nd280Geant4Sim-double-particle-gun.sh b/inputs/nd280Geant4Sim-double-particle-gun.sh
index eb95944..4118dc7 100755
--- a/inputs/nd280Geant4Sim-double-particle-gun.sh
+++ b/inputs/nd280Geant4Sim-double-particle-gun.sh
@@ -4,7 +4,7 @@
 # per event. 
 
 COUNT="10"
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-export-geometry.sh

diff --git a/inputs/nd280Geant4Sim-export-geometry.sh b/inputs/nd280Geant4Sim-export-geometry.sh
index cbc827c..322afd4 100755
--- a/inputs/nd280Geant4Sim-export-geometry.sh
+++ b/inputs/nd280Geant4Sim-export-geometry.sh
@@ -50,6 +50,6 @@ ND280GEANT4SIM.exe $MACRO
 
 rm $MACRO
 
-VERS=`(cd $ND280GEANT4SIMROOT/cmt ; cmt show version)`
+VERS=`(cat $ND280GEANT4SIMROOT/cmake/nd280Geant4SimPackageVersion.cmake |awk '{print $2}' | sed s/\"//g)`
 
 strip-geom.exe -p ${VERS}${haveControl} $OUTPUT

inputs/nd280Geant4Sim-fg-fgd-bunch.sh

diff --git a/inputs/nd280Geant4Sim-fg-fgd-bunch.sh b/inputs/nd280Geant4Sim-fg-fgd-bunch.sh
index 61d2ca5..52d46ae 100755
--- a/inputs/nd280Geant4Sim-fg-fgd-bunch.sh
+++ b/inputs/nd280Geant4Sim-fg-fgd-bunch.sh
@@ -32,7 +32,7 @@ else
     COUNT=10
 fi
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-fg-p0d-bunch.sh

diff --git a/inputs/nd280Geant4Sim-fg-p0d-bunch.sh b/inputs/nd280Geant4Sim-fg-p0d-bunch.sh
index 621df6e..d7c6758 100755
--- a/inputs/nd280Geant4Sim-fg-p0d-bunch.sh
+++ b/inputs/nd280Geant4Sim-fg-p0d-bunch.sh
@@ -32,7 +32,7 @@ else
     COUNT=10
 fi
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-fg-test-neut.sh

diff --git a/inputs/nd280Geant4Sim-fg-test-neut.sh b/inputs/nd280Geant4Sim-fg-test-neut.sh
index 1b08cd7..4a8f439 100755
--- a/inputs/nd280Geant4Sim-fg-test-neut.sh
+++ b/inputs/nd280Geant4Sim-fg-test-neut.sh
@@ -21,7 +21,7 @@ else
     COUNT=10
 fi
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-fg-test-sample.sh

diff --git a/inputs/nd280Geant4Sim-fg-test-sample.sh b/inputs/nd280Geant4Sim-fg-test-sample.sh
index 6a64be3..705f8d4 100755
--- a/inputs/nd280Geant4Sim-fg-test-sample.sh
+++ b/inputs/nd280Geant4Sim-fg-test-sample.sh
@@ -6,7 +6,7 @@
 # exhaustive. 
 
 COUNT="10"
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-fg-test-source.sh

diff --git a/inputs/nd280Geant4Sim-fg-test-source.sh b/inputs/nd280Geant4Sim-fg-test-source.sh
index e25be2e..37d235a 100755
--- a/inputs/nd280Geant4Sim-fg-test-source.sh
+++ b/inputs/nd280Geant4Sim-fg-test-source.sh
@@ -6,7 +6,7 @@
 
 COUNT="10"
 SPOT="-50"
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-fg-test-spill.sh

diff --git a/inputs/nd280Geant4Sim-fg-test-spill.sh b/inputs/nd280Geant4Sim-fg-test-spill.sh
index 59704e8..8b72fca 100755
--- a/inputs/nd280Geant4Sim-fg-test-spill.sh
+++ b/inputs/nd280Geant4Sim-fg-test-spill.sh
@@ -6,7 +6,7 @@
 # exhaustive. 
 
 COUNT="10"
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-fg-test-tracker.sh

diff --git a/inputs/nd280Geant4Sim-fg-test-tracker.sh b/inputs/nd280Geant4Sim-fg-test-tracker.sh
index 984c047..52e2c62 100755
--- a/inputs/nd280Geant4Sim-fg-test-tracker.sh
+++ b/inputs/nd280Geant4Sim-fg-test-tracker.sh
@@ -21,7 +21,7 @@ else
     COUNT=10
 fi
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-fg-test-tracking.sh

diff --git a/inputs/nd280Geant4Sim-fg-test-tracking.sh b/inputs/nd280Geant4Sim-fg-test-tracking.sh
index ed9b6c8..bebec9c 100755
--- a/inputs/nd280Geant4Sim-fg-test-tracking.sh
+++ b/inputs/nd280Geant4Sim-fg-test-tracking.sh
@@ -6,7 +6,7 @@
 # exhaustive. 
 
 COUNT="500"
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-particle.sh

diff --git a/inputs/nd280Geant4Sim-particle.sh b/inputs/nd280Geant4Sim-particle.sh
new file mode 100755
index 0000000..00c62a3
--- /dev/null
+++ b/inputs/nd280Geant4Sim-particle.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+COUNT=$1
+shift
+if [ "${COUNT}"x = x ] ; then
+    COUNT=10;
+fi
+
+PARTICLE=$1
+shift
+if [ "${PARTICLE}"x = x ] ; then
+    PARTICLE="mu+";
+fi
+
+KE=$1
+shift
+if [ "${KE}"x = x ] ; then
+    KE=500;
+fi
+
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
+
+MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
+cat >> $MACRO <<EOF
+/t2k/control baseline 1.0
+/t2k/update
+
+/gps/verbose 2
+/gps/particle ${PARTICLE}
+/gps/ene/mono ${KE} MeV
+/gps/ang/type iso
+
+/generator/position/density/sample Basket
+/generator/position/set density
+
+/run/beamOn ${COUNT}
+
+EOF
+
+OUTPUT=nd280Geant4Sim-${PARTICLE}-${KE}MeV
+
+if [ -f $OUTPUT ]; then
+    rm $OUTPUT
+fi
+
+ND280GEANT4SIM.exe -o $OUTPUT $MACRO 
+
+rm $MACRO

inputs/nd280Geant4Sim-randomseed.sh

diff --git a/inputs/nd280Geant4Sim-randomseed.sh b/inputs/nd280Geant4Sim-randomseed.sh
index 143e6dc..a3fd1ec 100644
--- a/inputs/nd280Geant4Sim-randomseed.sh
+++ b/inputs/nd280Geant4Sim-randomseed.sh
@@ -4,7 +4,7 @@
 # correctly tracked by the MC.  This is intended as a quick sanity
 # check, and is not exhaustive.
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-single-particle-gun.sh

diff --git a/inputs/nd280Geant4Sim-single-particle-gun.sh b/inputs/nd280Geant4Sim-single-particle-gun.sh
index 34ec5c2..b883fb2 100755
--- a/inputs/nd280Geant4Sim-single-particle-gun.sh
+++ b/inputs/nd280Geant4Sim-single-particle-gun.sh
@@ -1,7 +1,7 @@
 # Macro that use G4 particle gun to create a single particle
 
 COUNT="10"
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-standard-geometries.sh

diff --git a/inputs/nd280Geant4Sim-standard-geometries.sh b/inputs/nd280Geant4Sim-standard-geometries.sh
index 4dc1bd3..9099018 100755
--- a/inputs/nd280Geant4Sim-standard-geometries.sh
+++ b/inputs/nd280Geant4Sim-standard-geometries.sh
@@ -17,3 +17,8 @@ ${ND280GEANT4SIMROOT}/inputs/nd280Geant4Sim-export-geometry.sh baseline-2010-11
 ${ND280GEANT4SIMROOT}/inputs/nd280Geant4Sim-export-geometry.sh baseline-2015-08 1.0
 ${ND280GEANT4SIMROOT}/inputs/nd280Geant4Sim-export-geometry.sh baseline-2015-08 1.0 p0d-with-air 1.0
 
+${ND280GEANT4SIMROOT}/inputs/nd280Geant4Sim-export-geometry.sh baseline-2019-08 1.0
+${ND280GEANT4SIMROOT}/inputs/nd280Geant4Sim-export-geometry.sh baseline-2019-08 1.0 p0d-with-air 1.0
+ 
+${ND280GEANT4SIMROOT}/inputs/nd280Geant4Sim-export-geometry.sh baseline-2019-11 1.0
+${ND280GEANT4SIMROOT}/inputs/nd280Geant4Sim-export-geometry.sh baseline-2019-11 1.0 p0d-with-air 1.0

inputs/nd280Geant4Sim-test-empty.sh

diff --git a/inputs/nd280Geant4Sim-test-empty.sh b/inputs/nd280Geant4Sim-test-empty.sh
index 3e83bed..da47a5c 100755
--- a/inputs/nd280Geant4Sim-test-empty.sh
+++ b/inputs/nd280Geant4Sim-test-empty.sh
@@ -1,7 +1,7 @@
 # Macro that use G4 particle gun to create a single particle
 
 COUNT="10"
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-test-rootracker.sh

diff --git a/inputs/nd280Geant4Sim-test-rootracker.sh b/inputs/nd280Geant4Sim-test-rootracker.sh
index b1c90c6..0237c04 100755
--- a/inputs/nd280Geant4Sim-test-rootracker.sh
+++ b/inputs/nd280Geant4Sim-test-rootracker.sh
@@ -21,7 +21,7 @@ else
     COUNT=3
 fi
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -p . -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-test-thresholds.sh

diff --git a/inputs/nd280Geant4Sim-test-thresholds.sh b/inputs/nd280Geant4Sim-test-thresholds.sh
index 71ff53e..c20575f 100755
--- a/inputs/nd280Geant4Sim-test-thresholds.sh
+++ b/inputs/nd280Geant4Sim-test-thresholds.sh
@@ -39,7 +39,7 @@ else
     usage
 fi
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-test-trajectory.sh

diff --git a/inputs/nd280Geant4Sim-test-trajectory.sh b/inputs/nd280Geant4Sim-test-trajectory.sh
index e6f410f..ed1f9af 100755
--- a/inputs/nd280Geant4Sim-test-trajectory.sh
+++ b/inputs/nd280Geant4Sim-test-trajectory.sh
@@ -6,7 +6,7 @@
 # exhaustive. 
 
 COUNT="10"
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/nd280Geant4Sim-tracker.sh

diff --git a/inputs/nd280Geant4Sim-tracker.sh b/inputs/nd280Geant4Sim-tracker.sh
index f1d0e75..20a2c0b 100755
--- a/inputs/nd280Geant4Sim-tracker.sh
+++ b/inputs/nd280Geant4Sim-tracker.sh
@@ -40,7 +40,7 @@ EOF
 
 cat $MACRO
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 ND280GEANT4SIM.exe -o $OUTPUT $MACRO 
 
 rm $MACRO

inputs/nd280Geant4Sim-triple-particle-gun.sh

diff --git a/inputs/nd280Geant4Sim-triple-particle-gun.sh b/inputs/nd280Geant4Sim-triple-particle-gun.sh
new file mode 100755
index 0000000..d67ee57
--- /dev/null
+++ b/inputs/nd280Geant4Sim-triple-particle-gun.sh
@@ -0,0 +1,108 @@
+#!/bin/bash
+# 
+# Macro that use G4 particle gun to create two particles 
+# per event.  In particular creates 500 MeV/c muon and 
+# 200 MeV/c proton, with common vertex point
+# near the start of FGD1. The muon is initially pointing
+# in +z direction and proton is initially pointing 
+# at 45 degrees to +z direction.
+
+COUNT="10"
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
+
+MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
+cat >> $MACRO <<EOF
+/t2k/control baseline 1.0
+/t2k/update
+
+# Make sure that the GPS generator is it's default state.
+/gps/source/clear
+
+# Enable generating multiple particle guns per event.
+/gps/source/multiplevertex true
+
+#######################################
+# Create the first particle source
+#######################################
+/gps/source/add 1
+
+# This source will be used to specify the position of the vertex.  The
+# any of the GPS direction and energy commands can be used.
+/gps/particle mu+
+/gps/energy 600 MeV
+
+# This generates the position of the first particle gun.  It will be
+# used for the other particle guns.  The /gps/position command must
+# come first.
+/gps/position 0.0 0.0 -280.0 cm
+/gps/pos/type Volume
+/gps/pos/shape Para
+/gps/pos/halfx 50 cm
+/gps/pos/halfy 50 cm
+/gps/pos/halfz 10 cm
+
+# This generates the direction of the first particle gun.  This aims
+# the particle downstream with the directions uniformly distributed in
+# a 45 deg cone.
+/gps/ang/type iso
+/gps/ang/maxtheta 45 deg
+/gps/ang/rot1 -1 0 0 
+/gps/ang/rot2  0 1 0
+
+#########################################
+# Create the second particle source.
+#########################################
+/gps/source/add 2
+/gps/particle mu-
+/gps/energy 500 MeV
+
+# This generates the direction of the second particle gun.  This aims
+# the particle downstream with the directions uniformly distributed in
+# a 45 deg cone.
+/gps/ang/type iso
+/gps/ang/maxtheta 45 deg
+/gps/ang/rot1 -1 0 0 
+/gps/ang/rot2  0 1 0
+
+#########################################
+# Create the third particle source.
+#########################################
+/gps/source/add 3
+/gps/particle mu-
+/gps/energy 1000 MeV
+
+# This generates the direction of the second particle gun.  This aims
+# the particle downstream with the directions uniformly distributed in
+# a 20 deg cone.
+/gps/ang/type iso
+/gps/ang/maxtheta 20 deg
+/gps/ang/rot1 -1 0 0 
+/gps/ang/rot2  0 1 0
+
+# Create the GPS particle generator so it exists.  This isn't necessary for a
+# single particle generator since ND280GEANT4SIM will create it by default,
+# but it must be done explicitly when generating multiple GPS
+# particles
+/generator/add
+
+
+# The GPS particles will be created like a "stack".  The combine
+# command takes the last two particles and combines them into a single
+# vertex.  If you have more than two particles, you can use multiple
+# combine commands until you get a single vertex.
+/generator/combine
+/generator/combine
+
+/run/beamOn ${COUNT}
+
+EOF
+
+OUTPUT=nd280Geant4Sim-triple-particle-gun
+
+if [ -f $OUTPUT ]; then
+    rm $OUTPUT
+fi
+
+ND280GEANT4SIM.exe -o $OUTPUT $MACRO 
+
+rm $MACRO

inputs/neut-event.sh

diff --git a/inputs/neut-event.sh b/inputs/neut-event.sh
index 898efe5..ec2601e 100755
--- a/inputs/neut-event.sh
+++ b/inputs/neut-event.sh
@@ -29,7 +29,7 @@ else
     usage
 fi
 
-source ${ND280GEANT4SIMROOT}/cmt/setup.sh
+source ${ND280GEANT4SIMROOT}/bin/setup.sh
 
 MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
 cat >> $MACRO <<EOF

inputs/sim-particle.sh

diff --git a/inputs/sim-particle.sh b/inputs/sim-particle.sh

deleted file mode 100755

deleted file mode 100755
index 65a0018..0000000
--- a/inputs/sim-triple-particle.sh
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/bin/bash
-#
-# Macro that use G4 particle gun to create two particles
-# per event.  In particular creates 500 MeV/c muon and
-# 200 MeV/c proton, with common vertex point
-# near the start of FGD1. The muon is initially pointing
-# in +z direction and proton is initially pointing
-# at 45 degrees to +z direction.
-
-COUNT="10"
-
-MACRO=`mktemp -t nd280Geant4Sim.XXXXXXXXXX` || exit 1
-cat >> $MACRO <<EOF
-/t2k/control baseline 1.0
-/t2k/update
-
-# Make sure that the GPS generator is it's default state.
-/gps/source/clear
-
-# Enable generating multiple particle guns per event.
-/gps/source/multiplevertex true
-
-#######################################
-# Create the first particle source
-#######################################
-/gps/source/add 1
-
-# This source will be used to specify the position of the vertex.  The
-# any of the GPS direction and energy commands can be used.
-/gps/particle mu+
-/gps/energy 600 MeV
-
-# This generates the position of the first particle gun.  It will be
-# used for the other particle guns.  The /gps/position command must
-# come first.
-/gps/position 0.0 0.0 -280.0 cm
-/gps/pos/type Volume
-/gps/pos/shape Para
-/gps/pos/halfx 50 cm
-/gps/pos/halfy 50 cm
-/gps/pos/halfz 10 cm
-
-# This generates the direction of the first particle gun.  This aims
-# the particle downstream with the direction uniformly distributed in
-# a 45 deg cone.
-/gps/ang/type iso
-/gps/ang/maxtheta 45 deg
-/gps/ang/rot1 -1 0 0
-/gps/ang/rot2  0 1 0
-
-#########################################
-# Create the second particle source.
-#########################################
-/gps/source/add 2
-/gps/particle mu-
-/gps/energy 500 MeV
-
-# This generates the direction of the second particle gun.  This aims
-# the particle downstream with the directions uniformly distributed in
-# a 45 deg cone.
-/gps/ang/type iso
-/gps/ang/maxtheta 45 deg
-/gps/ang/rot1 -1 0 0
-/gps/ang/rot2  0 1 0
-
-#########################################
-# Create the third particle source.
-#########################################
-/gps/source/add 3
-/gps/particle e+
-/gps/energy 1000 MeV
-
-# This generates the direction of the third particle gun.  This aims
-# the particle downstream with the directions uniformly distributed in
-# a 20 deg cone.
-/gps/ang/type iso
-/gps/ang/maxtheta 20 deg
-/gps/ang/rot1 -1 0 0
-/gps/ang/rot2  0 1 0
-
-# Create the GPS particle generator so it exists.  This isn't necessary for a
-# single particle generator since ND280GEANT4SIM will create it by default,
-# but it must be done explicitly when generating multiple GPS
-# particles
-/generator/add
-
-# Copy the vertex position and time of the first particle into the
-# second.  The sources are numbered from 0.
-/generator/copy 0 1
-
-# Copy the vertex position and time of the first particle in to the third.
-/generator/copy 0 2
-
-/run/beamOn ${COUNT}
-
-EOF
-
-OUTPUT=sim-triple-particle-gun
-
-if [ -f $OUTPUT ]; then
-    rm $OUTPUT
-fi
-
-ND280GEANT4SIM.exe -o $OUTPUT $MACRO
-
-rm $MACRO

inputs/sim-triple-particle.sh

diff --git a/inputs/sim-triple-particle.sh b/inputs/sim-triple-particle.sh

src/ND280ExtraPhysics.cc

diff --git a/src/ND280ExtraPhysics.cc b/src/ND280ExtraPhysics.cc
index e9150a2..8b7f6f3 100644
--- a/src/ND280ExtraPhysics.cc
+++ b/src/ND280ExtraPhysics.cc
@@ -3,7 +3,6 @@
 #include <G4ParticleDefinition.hh>
 #include <G4ParticleWithCuts.hh>
 #include <G4ProcessManager.hh>
-#include <G4LossTableManager.hh>
 #include <G4ProcessVector.hh>
 #include <G4ParticleTypes.hh>
 #include <G4ParticleTable.hh>
@@ -14,7 +13,6 @@
 #include "TND280Log.hxx"
 
 #include "ND280ExtraPhysics.hh"
-#include "ND280Scintillation.hh"
 
 #include <stdexcept>
 
@@ -28,16 +26,6 @@ void ND280ExtraPhysics::ConstructParticle() { }
 void ND280ExtraPhysics::ConstructProcess() {
     ND280Log("ND280ExtraPhysics:: Add Extra Physics Processes");
 
-    // Construct the scintillation process that will be applied to particles.
-    // This uses G4EmSaturation to calculate the Birks saturation correction.
-    // See ND280Scintillation for details.  The Birks constant is set for each
-    // material using "mat->GetIonisation()->SetBirksConstant()".
-    // Scintillation is applied if the Birks constant is defined (greater than
-    // zero).
-    ND280Scintillation* scintillationProcess = new ND280Scintillation();
-    scintillationProcess->AddSaturation(
-        G4LossTableManager::Instance()->EmSaturation());
-
     G4ParticleTable::G4PTblDicIterator* particleIterator
         = theParticleTable->GetIterator();
     particleIterator->reset();
@@ -55,19 +43,10 @@ void ND280ExtraPhysics::ConstructProcess() {
             throw std::runtime_error("Particle without a Process Manager.");
         }
 
-        if (std::abs(charge) < 0.1) continue;
-
         // All charged particles should have a step limiter to make sure that
         // the steps do not get too long.
+        if (std::abs(charge) > 0.1) {
             pman->AddDiscreteProcess(new G4StepLimiter("Step Limit"));
-
-        // All charged particles should have scintillation.  It's checked for
-        // applicability, but that *SHOULD* just be a formality.
-        if (scintillationProcess->IsApplicable(*particle)) {
-            pman->AddProcess(scintillationProcess,
-                             ordDefault,
-                             ordInActive,
-                             ordDefault);
         }
     }
 }

src/ND280FGDConstructor.cc

diff --git a/src/ND280FGDConstructor.cc b/src/ND280FGDConstructor.cc
index e13aea3..0f51a61 100644
--- a/src/ND280FGDConstructor.cc
+++ b/src/ND280FGDConstructor.cc
@@ -15,6 +15,8 @@
 #include "ND280BeamConstructor.hh"
 #include "ND280IBeamConstructor.hh"
 
+#include <algorithm>
+
 class ND280FGDMessenger : public ND280ModuleConstructorMessenger {
 
 private:
@@ -23,6 +25,7 @@ private:
     G4UIcmdWithADoubleAndUnit* fTargetLengthCMD;
     G4UIcmdWithABool*       fHasWaterTargetCMD;
     G4UIcmdWithABool*       fHasFirstWaterLayerCMD;
+    G4UIcmdWithAnInteger*   fAddMissingWaterLayerCMD;
 
     // Array of commands to translate FGD scintillator modules.
     G4UIcmdWith3VectorAndUnit* fFGDModuleTransCMD[15];
@@ -52,6 +55,11 @@ public:
         fHasFirstWaterLayerCMD->SetGuidance("Set false if FGD has no water in the first layer.");
         fHasFirstWaterLayerCMD->SetParameterName("FirstWaterLayer",true);
 
+        fAddMissingWaterLayerCMD
+            = new G4UIcmdWithAnInteger(CommandName("addMissingWaterLayer"),this);
+        fAddMissingWaterLayerCMD->SetGuidance("Set the index of a missing water layer (number from zero).");
+        fAddMissingWaterLayerCMD->SetParameterName("layer",true);
+
     // Construct new commands to translate FGD modules.
     // There are 15 modules in FGD1, 7 modules in FGD2.
     char moduleNum[100];
@@ -108,7 +116,14 @@ public:
         }
         else if (cmd == fHasFirstWaterLayerCMD) {
             bool water = fHasFirstWaterLayerCMD->GetNewBoolValue(val);
-            if (!water) fConstructor->SetNoWaterFirstLayer();
+            if (!water) {
+                fConstructor->AddMissingWaterLayer(0);
+                fConstructor->SetNoWaterFirstLayer();
+            }
+        }
+        else if (cmd == fAddMissingWaterLayerCMD) {
+            int missing = fAddMissingWaterLayerCMD->GetNewIntValue(val);
+            fConstructor->AddMissingWaterLayer(missing);
         }
         else {
             ND280ModuleConstructorMessenger::SetNewValue(cmd,val);
@@ -297,7 +312,7 @@ void ND280FGDConstructor::BuildWaterTarget(void) {
     //  = 0.232mm + 0.188mm + 9.61mm + 0.190mm + 9.61mm + 0.188mm + 0.232mm +
     //      2.0mm = 22.25mm
 
-    if (fNoWaterFirstLayer) {
+    for (int i=0; i<6; ++i) {
         AddComponent("G10Gap");
         AddComponent("GlueGap1");
         AddComponent("ScintX");
@@ -308,47 +323,19 @@ void ND280FGDConstructor::BuildWaterTarget(void) {
         AddComponent("AirGap1");
         AddComponent("PropyleneGap");
         AddComponent("GlueGap3");
+        if (std::find(fMissingWaterLayers.begin(),fMissingWaterLayers.end(),i)
+            != fMissingWaterLayers.end()) {
+            ND280Log("Add EMPTY FGD water target in layer " << i );
             AddComponent("ActiveAirGap");
-       AddComponent("GlueGap3");
-       AddComponent("PropyleneGap");
-       AddComponent("AirGap2");
-
-       AddComponent("G10Gap");
-       AddComponent("GlueGap1");
-       AddComponent("ScintX");
-       AddComponent("GlueGap2");
-       AddComponent("ScintY");
-       AddComponent("GlueGap1");
-       AddComponent("G10Gap");
-       AddComponent("AirGap1");
-       AddComponent("PropyleneGap");
-       AddComponent("GlueGap3");
-       AddComponent("WaterGap");
-       AddComponent("GlueGap3");
-       AddComponent("PropyleneGap");
-       AddComponent("AirGap2");
-
-       SetRepetitions(5,14);
-    }else{
-       AddComponent("G10Gap");
-       AddComponent("GlueGap1");
-       AddComponent("ScintX");
-       AddComponent("GlueGap2");
-       AddComponent("ScintY");
-       AddComponent("GlueGap1");
-       AddComponent("G10Gap");
-       AddComponent("AirGap1");
-       AddComponent("PropyleneGap");
-       AddComponent("GlueGap3");
+        }
+        else {
             AddComponent("WaterGap");
+        }
         AddComponent("GlueGap3");
         AddComponent("PropyleneGap");
         AddComponent("AirGap2");
-
-       SetRepetitions(6,14);
     }
 
- 
     AddComponent("G10Gap");
     AddComponent("GlueGap1");
     AddComponent("ScintX");
@@ -399,7 +386,6 @@ void ND280FGDConstructor::BuildNoWaterTarget(void) {
     AddComponent("GlueGap1");
     AddComponent("G10Gap");
 
- 
     int compPerModule = 8;
     int compToTranslate = 7;
     // Check all 15 modules in FGD1 for translation parameters.
@@ -414,7 +400,6 @@ void ND280FGDConstructor::BuildNoWaterTarget(void) {
 }
 
 G4LogicalVolume *ND280FGDConstructor::GetPiece(void) {
-
     if (HasWaterTarget()) BuildWaterTarget();
     else BuildNoWaterTarget();
 

src/ND280HitSegment.cc

diff --git a/src/ND280HitSegment.cc b/src/ND280HitSegment.cc
index bfbc1a9..d361e15 100644
--- a/src/ND280HitSegment.cc
+++ b/src/ND280HitSegment.cc
@@ -87,7 +87,6 @@ void ND280HitSegment::AddStep(G4Step* theStep, double start, double end) {
     double energyDeposit = theStep->GetTotalEnergyDeposit();
     double stepLength = (prePos-postPos).mag();
     double trackLength = theStep->GetStepLength();
-    double nonIonizingDeposit = theStep->GetNonIonizingEnergyDeposit();
 
     if (trackLength < 0.75*stepLength || trackLength < stepLength - 1*mm) {
         ND280Warn("Track length shorter than step: " 
@@ -187,11 +186,6 @@ void ND280HitSegment::AddStep(G4Step* theStep, double start, double end) {
     }
 
     fEnergyDeposit += energyDeposit;
-#ifdef TG4HitSegment_HasSecondaryDeposit
-    fSecondaryDeposit += nonIonizingDeposit;
-#else
-#warning Secondary energy deposit value will not be saved.
-#endif
     fTrackLength += trackLength;
 }
 

src/ND280RootPersistencyManager.cc

diff --git a/src/ND280RootPersistencyManager.cc b/src/ND280RootPersistencyManager.cc
index 7e00447..a4d93eb 100644
--- a/src/ND280RootPersistencyManager.cc
+++ b/src/ND280RootPersistencyManager.cc
@@ -598,6 +598,7 @@ void ND280RootPersistencyManager::MakeMCHeader(ND::TND280Event& dest,
 #endif
 
 #if not BEFORE_oaEvent(8,12,0)
+    if(field){
     int ND280GEANT4SIMFieldModelType=field->GetBasketFieldModel();
     if(ND280GEANT4SIMFieldModelType==0)mcHeader->SetBasketFieldModel(ND::TOAMagneticField::kMCSimple);
     if(ND280GEANT4SIMFieldModelType==3)mcHeader->SetBasketFieldModel(ND::TOAMagneticField::kCOMSOL_MC);
@@ -610,6 +611,16 @@ void ND280RootPersistencyManager::MakeMCHeader(ND::TND280Event& dest,
     if(ND280GEANT4SIMFieldModelType==0) mcHeader->SetYokeFieldModel(ND::TOAMagneticField::kZeroField);
     if(ND280GEANT4SIMFieldModelType==1) mcHeader->SetYokeFieldModel(ND::TOAMagneticField::kMCSimple);
     if(ND280GEANT4SIMFieldModelType==3) mcHeader->SetYokeFieldModel(ND::TOAMagneticField::kCOMSOL_MC);
+    }
+    else
+    {
+        // Set a default value in case there is no field set, which happens if
+        // strength is 0
+        mcHeader->SetBasketFieldModel(ND::TOAMagneticField::kMCSimple);
+        mcHeader->SetCoilFieldModel(ND::TOAMagneticField::kMCSimple);
+        mcHeader->SetYokeFieldModel(ND::TOAMagneticField::kMCSimple);
+
+    }
     #else
 #warning Not saving Field Model Type in MC Header.
 #endif

src/ND280Scintillation.cc

diff --git a/src/ND280Scintillation.cc b/src/ND280Scintillation.cc

src/ND280UserDetectorConstruction.cc

diff --git a/src/ND280UserDetectorConstruction.cc b/src/ND280UserDetectorConstruction.cc
index f07d8e6..585e341 100644
--- a/src/ND280UserDetectorConstruction.cc
+++ b/src/ND280UserDetectorConstruction.cc
@@ -327,33 +327,6 @@ void ND280UserDetectorConstruction::DefineMaterials() {
     polystyrene->AddElement(elH, 8);
     gMan->SetDrawAtt(polystyrene,kGray+3);
     
-    // Default Scintillator Properties -- This defines the baseline properties
-    // for all of the scintillator objects.
-    //
-    // The default value for Birks constant of polystyrene is from:
-    //
-    // M.Hirschberg et al., IEEE Trans. Nuc. Sci. 39 (1992) 511
-    // SCSN-38: kB = (0.806 +/- 0.012)E-2 g/cm^2/MeV
-    // SCSN-28: kB = (0.877 +/- 0.03)E-2 g/cm^2/MeV
-    // GS 2003: kB = (0.844 +/- 0.015)E-2 g/cm^2/MeV
-    // NE 102A: kB = (0.882 +/- 0.012)E-2 g/cm^2/MeV
-    // NE 102A: kB = (0.888 +/- 0.025)E-2 g/cm^2/MeV
-    // KSTI 390: kB = (1.09 +/- 0.015)E-2 g/cm^2/MeV
-    // Simple average: (0.898 +/- 0.099)E-2 g/cm^2/MeV
-    // Average excluding KSTI 390: (0.859 +/- 0.034)E-2 g/cm^2/MeV
-    //
-    // Also: M. Bongrand AIP Conf. Proc. 807 (2007) 14: kB = 9E-2 g/cm^2/MeV
-    //
-    // Wikipedia give a value of 0.126 mm/MeV for polystyrene based
-    // scintillator, and this value seems to pop up in various places.  It
-    // comes from a measurement of 1 mm scintillating fibers
-    //
-    // Leverington, Anelli, Campana, and Rosellini, arxiv:1106.5649 (2011))
-    //
-    // As best I can tell, the value was not fit to data, and is simply what
-    // was used in their simulation.  I don't find any supporting
-    // information in the paper.
-
     // Scintillator -- This is the average polystyrene plastic scintillator as
     // defined in the PDG C6H5CH=CH2 (this is a net C8H8).  The SMRD and ECal
     // geometries have been tuned to this value.  The 1.05 value represents a
@@ -363,8 +336,6 @@ void ND280UserDetectorConstruction::DefineMaterials() {
         = new G4Material(name="Scintillator", density, nel=2);
     scintillator->AddElement(elC, 8);
     scintillator->AddElement(elH, 8);
-    scintillator->GetIonisation()->SetBirksConstant(
-        (0.898E-2)*g/cm2/MeV/density);
     gMan->SetDrawAtt(scintillator,kGreen);
 
     // P0D Scintillator -- This has the average polystyrene plastic
@@ -380,8 +351,6 @@ void ND280UserDetectorConstruction::DefineMaterials() {
         = new G4Material(name="P0DScintillator", density, nel=2);
     p0dScintillator->AddElement(elC, 8);
     p0dScintillator->AddElement(elH, 8);
-    p0dScintillator->GetIonisation()->SetBirksConstant(
-        (0.898E-2)*g/cm2/MeV/density);
     gMan->SetDrawAtt(p0dScintillator,kGreen);
 
     // FGD Scintillator -- This is the average polystyrene scintillator for
@@ -393,8 +362,6 @@ void ND280UserDetectorConstruction::DefineMaterials() {
         = new G4Material(name="FGDScintillator", density, nel=2);
     fgdScintillator->AddElement(elC, 8);
     fgdScintillator->AddElement(elH, 8);
-    fgdScintillator->GetIonisation()->SetBirksConstant(
-        (0.898E-2)*g/cm2/MeV/density);
     gMan->SetDrawAtt(fgdScintillator,kGreen);
 
     // Scintillator coating.  This is the coating that goes around the average
@@ -407,7 +374,6 @@ void ND280UserDetectorConstruction::DefineMaterials() {
         = new G4Material(name="ScintillatorCoating", density, ncomponents=2);
     scintillatorCoating->AddMaterial(TIO2        ,fractionmass = 15*perCent);
     scintillatorCoating->AddMaterial(scintillator,fractionmass = 85*perCent);
-    scintillatorCoating->GetIonisation()->SetBirksConstant(0.0);
     gMan->SetDrawAtt(scintillatorCoating,kGreen);
     
     // PVC -- Polyvinyl Chloride CH2=CHCl = C3H3Cl

src/ND280UserPrimaryGeneratorMessenger.cc

diff --git a/src/ND280UserPrimaryGeneratorMessenger.cc b/src/ND280UserPrimaryGeneratorMessenger.cc
index 98f83c6..ee37871 100644
--- a/src/ND280UserPrimaryGeneratorMessenger.cc
+++ b/src/ND280UserPrimaryGeneratorMessenger.cc
@@ -1,12 +1,15 @@
-#include <G4UIdirectory.hh>
-#include <G4UIcmdWithoutParameter.hh>
-#include <G4UIcmdWithADoubleAndUnit.hh>
-#include <G4UIcmdWith3VectorAndUnit.hh>
-#include <G4UIcmdWith3Vector.hh>
-#include <G4UIcmdWithABool.hh>
-#include <G4UIcmdWithAString.hh>
-#include <G4UIcmdWithAnInteger.hh>
-#include <G4UIcommand.hh>
+////////////////////////////////////////////////////////////
+// $Id$
+//
+
+#include "G4UIdirectory.hh"
+#include "G4UIcmdWithoutParameter.hh"
+#include "G4UIcmdWithADoubleAndUnit.hh"
+#include "G4UIcmdWith3VectorAndUnit.hh"
+#include "G4UIcmdWith3Vector.hh"
+#include "G4UIcmdWithABool.hh"
+#include "G4UIcmdWithAString.hh"
+#include "G4UIcmdWithAnInteger.hh"
 
 #include <TND280Log.hxx>
 
@@ -15,7 +18,6 @@
 
 #include "kinem/ND280PrimaryGenerator.hh"
 #include "kinem/ND280CombinationGenerator.hh"
-#include "kinem/ND280CopyVertexGenerator.hh"
 #include "kinem/ND280VKinematicsFactory.hh"
 #include "kinem/ND280GPSKinematicsFactory.hh"
 #include "kinem/ND280NeutKinematicsFactory.hh"
@@ -91,13 +93,6 @@ ND280UserPrimaryGeneratorMessenger::ND280UserPrimaryGeneratorMessenger(
     fAddCMD = new G4UIcmdWithoutParameter("/generator/add",this);
     fAddCMD->SetGuidance("Add a generator using the current factories.");
 
-    fCopyVertexCMD = new G4UIcommand("/generator/copy",this);
-    fCopyVertexCMD->SetGuidance("Copy the src position and time to dest.");
-    fCopyVertexCMD->SetParameter(new G4UIparameter("src",'i',false));
-    fCopyVertexCMD->SetParameter(new G4UIparameter("dest",'i',false));
-    fCopyVertexCMD->SetParameter(new G4UIparameter("relative",'b',true));
-    fCopyVertexCMD->GetParameter(2)->SetDefaultValue("false");
-
     fCombineCMD = new G4UIcmdWithoutParameter("/generator/combine",this);
     fCombineCMD->SetGuidance("Combine the previous two vertices into one.");
 
@@ -152,7 +147,6 @@ ND280UserPrimaryGeneratorMessenger::~ND280UserPrimaryGeneratorMessenger() {
     delete fTimeDir;
     delete fClearCMD;
     delete fAddCMD;
-    delete fCopyVertexCMD;
     delete fCombineCMD;
     delete fSetKinematicsCMD;
     delete fSetCountCMD;
@@ -171,16 +165,6 @@ void ND280UserPrimaryGeneratorMessenger::SetNewValue(G4UIcommand* command,
         ND280PrimaryGenerator* generator = CreateGenerator();
         fAction->AddGenerator(generator);
     }
-    else if (command == fCopyVertexCMD) {
-        int src, dest;
-        std::string relative;
-        std::istringstream is(newValue);
-        is >> src >> dest >> relative;
-        ND280CopyVertexGenerator* generator
-            = new ND280CopyVertexGenerator(
-                src,dest,G4UIcommand::ConvertToBool(relative.c_str()));
-        fAction->AddGenerator(generator);
-    }
     else if (command == fCombineCMD) {
         ND280CombinationGenerator* generator = new ND280CombinationGenerator();
         fAction->AddGenerator(generator);

src/ND280UserRunAction.cc

diff --git a/src/ND280UserRunAction.cc b/src/ND280UserRunAction.cc
index bb3c73c..74f26b8 100644
--- a/src/ND280UserRunAction.cc
+++ b/src/ND280UserRunAction.cc
@@ -65,10 +65,9 @@ void ND280UserRunAction::EndOfRunAction(const G4Run* aRun) {
 
 void ND280UserRunAction::SetSeed(long seed) {
     if (seed<0) seed = -seed;
-    ND280Log("### Random seed set to: " << seed);
+    ND280Log("### Random seed number set to: " << seed);
     CLHEP::HepRandom::setTheSeed(seed);
-    // Condition the seed.
-    for (int i=0; i<10000000; ++i) G4UniformRand();
+    for (int i=0; i<100000; ++i) G4UniformRand();
 }
 
 long ND280UserRunAction::GetSeed(void) const {
@@ -86,8 +85,6 @@ void ND280UserRunAction::SetTimeSeed() {
 #else
 #warning Using seconds since epoch to seed the random generator.
     seed = time(NULL);
-    ND280Log("### Set seed from local time in seconds: " << seed);
-    ND280Error("Crude seed being used.  Multiple jobs may share this seed.")
 #endif
     // Make sure the seed is positive;
     if (seed<0) seed = -seed;

src/baseline-2019-08-1.0.mac

diff --git a/src/baseline-2019-08-1.0.mac b/src/baseline-2019-08-1.0.mac
new file mode 100644
index 0000000..82cf12a
--- /dev/null
+++ b/src/baseline-2019-08-1.0.mac
@@ -0,0 +1,23 @@
+############################################################
+# Baseline conditions for the nd280 detectors.
+#
+# This describes the detectors as of the start of run in
+#  October/November 2019.
+#
+# Changes from default geometry.
+#
+#   * LOTS!!!!
+#
+# This is loaded using the /t2k/control directive.
+#
+
+# Set the nominal field (The current is 0A).
+/t2k/field 0.0 tesla
+
+# No water in the first FGD2 plane.
+/t2k/OA/Magnet/Basket/Tracker/FGD2/addMissingWaterLayer 0
+/t2k/OA/Magnet/Basket/Tracker/FGD2/addMissingWaterLayer 4
+
+# Move the magnet to the correct position relative to the basket.
+/t2k/OA/Magnet/leftSplit -1.0 centimeter
+/t2k/OA/Magnet/rightSplit +1.0 centimeter

src/baseline-2019-11-1.0.mac

diff --git a/src/baseline-2019-11-1.0.mac b/src/baseline-2019-11-1.0.mac
new file mode 100644
index 0000000..1b77835
--- /dev/null
+++ b/src/baseline-2019-11-1.0.mac
@@ -0,0 +1,22 @@
+############################################################
+# Baseline conditions for the nd280 detectors.
+#
+# This describes the detectors as of middle of November 2019.  
+#
+# Changes from default geometry.
+#
+#   * LOTS!!!!
+#
+# This is loaded using the /t2k/control directive.
+#
+
+# Set the nominal field (The current is 0A).
+/t2k/field 0.0 tesla
+
+# No water in the first FGD2 plane.
+/t2k/OA/Magnet/Basket/Tracker/FGD2/addMissingWaterLayer 0
+/t2k/OA/Magnet/Basket/Tracker/FGD2/addMissingWaterLayer 4
+
+# Move the magnet to the correct position relative to the basket.
+/t2k/OA/Magnet/leftSplit -1.0 centimeter
+/t2k/OA/Magnet/rightSplit 400.0 centimeter

src/kinem/ND280CombinationGenerator.cc

diff --git a/src/kinem/ND280CombinationGenerator.cc b/src/kinem/ND280CombinationGenerator.cc
index 2044a5e..11b3d14 100644
--- a/src/kinem/ND280CombinationGenerator.cc
+++ b/src/kinem/ND280CombinationGenerator.cc
@@ -1,34 +1,21 @@
-#include <TND280Log.hxx>
-
-#include "ND280CombinationGenerator.hh"
-
 // There isn't any standard interface to remove particles from the vertex,
 // or vertices from the event.  This has to grunge around in the G4
 // internals.  This depends on an evil hack.
-
 #define private public
 #include <G4PrimaryParticle.hh>
 #include <G4PrimaryVertex.hh>
 #include <G4Event.hh>
 #undef private
 
+#include <TND280Log.hxx>
+
+#include "ND280CombinationGenerator.hh"
+
 ND280CombinationGenerator::ND280CombinationGenerator() {}
 
 ND280CombinationGenerator::~ND280CombinationGenerator(void) {}
 
 void ND280CombinationGenerator::GeneratePrimaryVertex(G4Event* evt) {
-#if __cplusplus > 201103L
-#warning Add deprecation warning for the ND280CombinationGenerator
-    std::cout << std::endl
-              << "#################################################"
-              << std::endl
-              << "# WARNING: the ND280CombinationGenerator is deprecated."
-              << std::endl
-              << "#   use /generator/copy (i.e. ND280CopyVertexGenerator)"
-              << std::endl
-              << "#################################################"
-              << std::endl;
-#else
     ND280Info("# Combine previous two vertices");
 
     // Find the second to last vertex.
@@ -70,7 +57,7 @@ void ND280CombinationGenerator::GeneratePrimaryVertex(G4Event* evt) {
     lastVtx->tailVertex = NULL;
     delete lastVtx;
     --evt->numberOfPrimaryVertex;
-#endif
+
 }
 
 G4String ND280CombinationGenerator::GetName() {

src/kinem/ND280CopyVertexGenerator.cc

diff --git a/src/kinem/ND280CopyVertexGenerator.cc b/src/kinem/ND280CopyVertexGenerator.cc

Differences between simMaster version 2.19 and 2.18

cmake/simMasterND280_USE.cmake

diff --git a/cmake/simMasterND280_USE.cmake b/cmake/simMasterND280_USE.cmake
index 1d2af69..16b0ff6 100644
--- a/cmake/simMasterND280_USE.cmake
+++ b/cmake/simMasterND280_USE.cmake
@@ -1,4 +1,4 @@
-ND280_USE(nd280Geant4Sim 6.10 )
+ND280_USE(nd280Geant4Sim 6.11 )
 ND280_USE(selectEventSim 0.15.1 )
 ND280_USE(cosmicTriggerGeant4Sim 1.9.1 )
 ND280_USE(atmPitSim 1.9.1 )

cmake/simMasterPackageVersion.cmake

diff --git a/cmake/simMasterPackageVersion.cmake b/cmake/simMasterPackageVersion.cmake
index 632d27d..0529099 100644
--- a/cmake/simMasterPackageVersion.cmake
+++ b/cmake/simMasterPackageVersion.cmake
@@ -1 +1 @@
-set(PACKAGE_VERSION "2.18" )
+set(PACKAGE_VERSION "2.19" )

doc/simMasterHistory.dox

diff --git a/doc/simMasterHistory.dox b/doc/simMasterHistory.dox
index 6121324..f8eabc8 100644
--- a/doc/simMasterHistory.dox
+++ b/doc/simMasterHistory.dox
@@ -302,4 +302,15 @@ atmPitSim 1.9.1
 sandGeant4Sim 0.9.1 
 neutGeant4CascadeInterface 1.5.1 
 
+
+\section simMaster_2_19_history Version 2_19
+
+Freeze information:  
+   - Freeze Date: Thu Mar 26 15:06:27 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+Bump up version of nd280Geant4Sim  
+
 */
\ No newline at end of file

Differences between calibMaster version 1.62 and 1.60

cmake/calibMasterND280_USE.cmake

diff --git a/cmake/calibMasterND280_USE.cmake b/cmake/calibMasterND280_USE.cmake
index 97e703b..ab7133b 100644
--- a/cmake/calibMasterND280_USE.cmake
+++ b/cmake/calibMasterND280_USE.cmake
@@ -6,5 +6,5 @@ ND280_USE(beamData 0.32)
 ND280_USE(eventCalib 4.11.1)
 ND280_USE(smrdApplyCalib 1.35.1)
 ND280_USE(fgdExtractCalib 0.15.1)
-ND280_USE(detResponseSim 6.29.1)
+ND280_USE(detResponseSim 6.29.1) # sim
 ND280_USE(tpcExtractCalib 0.7.1)

cmake/calibMasterPackageVersion.cmake

diff --git a/cmake/calibMasterPackageVersion.cmake b/cmake/calibMasterPackageVersion.cmake
index 31a79a0..c212e52 100644
--- a/cmake/calibMasterPackageVersion.cmake
+++ b/cmake/calibMasterPackageVersion.cmake
@@ -1 +1 @@
-set(PACKAGE_VERSION "1.60" )
+set(PACKAGE_VERSION "1.62" )

doc/calibMasterHistory.dox

diff --git a/doc/calibMasterHistory.dox b/doc/calibMasterHistory.dox
index 47baa4c..4c9ec75 100644
--- a/doc/calibMasterHistory.dox
+++ b/doc/calibMasterHistory.dox
@@ -411,7 +411,7 @@ Freeze information:
  smrdCalib  -> v1r33
  
 
-\section calibMaster_1.59_history Version 1.59
+\section calibMaster_1_59_history Version 1_59
 
 Freeze information:
    - Freeze Date: Sun Sep  1 19:29:27 2019
@@ -433,7 +433,7 @@ git.t2k.org/nd280/renaming.
 
 The name of this package was changed from nd280Calib to calibMaster.
 
-\section calibMaster_1.60_history Version 1.60
+\section calibMaster_1_60_history Version 1_60
 
 Freeze information:
    - Freeze Date: Fri Oct 11 15:10:36 2019
@@ -452,4 +452,26 @@ fgdExtractCalib 0.15.1
 detResponseSim 6.29.1
 tpcExtractCalib 0.7.1
 
+
+\section calibMaster_1_61_history Version 1_61
+
+Freeze information:
+   - Freeze Date: Thu Mar 26 10:07:10 2020
+   - Freeze User: Alex Finch
+   - Freeze Host: finchresearchlaptop
+
+
+Specify the git subproject for detResponseSim to be sim by adding a comment in calibMasterND280_USE.cmake
+
+
+\section calibMaster_1_62_history Version 1_62
+
+Freeze information:  
+   - Freeze Date: Thu Mar 26 15:10:20 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+Add comment to indicate that detResponseSim lives in sim git subproject.  
+
 */
\ No newline at end of file

Differences between soffTasks version 1.56 and 1.55.1

cmake/CMakeLists.txt

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 3cda5e3..90e2334 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -61,6 +61,17 @@ ND280_SCRIPT(tpc-ped-plot)
 ND280_SCRIPT(tpc-td-plot)
 ND280_SCRIPT(triggerword-check)
 
+ND280_PYTHON_LIBRARY(share/fgd/*.py)
+ND280_PYTHON_LIBRARY(share/tpc/*.py)
+ND280_PYTHON_LIBRARY(share/p0d/*.py)
+ND280_PYTHON_LIBRARY(share/ecal/*.py)
+ND280_PYTHON_LIBRARY(share/smrd/*.py)
+ND280_PYTHON_LIBRARY(share/tript/*.py)
+ND280_PYTHON_LIBRARY(share/nd280/*.py)
+ND280_PYTHON_LIBRARY(share/daemon/*.py)
+ND280_PYTHON_LIBRARY(share/runinfo/*.py)
+ND280_PYTHON_LIBRARY(share/summaryjob/*.py)
+
 ND280_EXECUTABLE(bcdataquality bcdataquality.cxx)
 ND280_EXECUTABLE(tpcdedx tpcdedx.cxx)
 ND280_EXECUTABLE(peddataquality peddataquality.cxx)

cmake/soffTasksPackageVersion.cmake

diff --git a/cmake/soffTasksPackageVersion.cmake b/cmake/soffTasksPackageVersion.cmake
index 8553903..7346b2e 100644
--- a/cmake/soffTasksPackageVersion.cmake
+++ b/cmake/soffTasksPackageVersion.cmake
@@ -1 +1 @@
-set(PACKAGE_VERSION "1.55.1" )
+set(PACKAGE_VERSION "1.56" )

doc/soffTasksHistory.dox

diff --git a/doc/soffTasksHistory.dox b/doc/soffTasksHistory.dox
index ad3bdd0..a1ff2ec 100644
--- a/doc/soffTasksHistory.dox
+++ b/doc/soffTasksHistory.dox
@@ -518,7 +518,7 @@ Freeze information:
 
 Gather up a year's worth of changes for housekeeping reasons.
 
-\section soffTasks_1.55.0_history Version 1.55.0
+\section soffTasks_1_55_0_history Version 1_55_0
 
 Freeze information:
    - Freeze Date: Wed Sep 18 17:42:19 2019
@@ -539,7 +539,7 @@ git.t2k.org/nd280/renaming.
 
 
 
-\section soffTasks_1.55_history Version 1.55
+\section soffTasks_1_55_history Version 1_55
 
 Freeze information:
    - Freeze Date: Fri Oct  4 18:13:47 2019
@@ -560,7 +560,7 @@ git.t2k.org/nd280/renaming.
 
 
 
-\section soffTasks_1.55.1_history Version 1.55.1
+\section soffTasks_1_55_1_history Version 1_55_1
 
 Freeze information:
    - Freeze Date: Fri Oct 11 14:31:05 2019
@@ -574,4 +574,17 @@ are changed from the new package name to the old one to keep compatibility with
 old data. Also, some tweaks were made in certain places of the code to keep     
 things to C++11 standards (or later), which is now enforced in                  
 nd280SoftwarePolicy.
+
+\section soffTasks_1_56_history Version 1_56
+
+Freeze information:  
+   - Freeze Date: Thu Mar 26 15:21:24 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+Minor updates to the fgd plotting scripts.  
+Don't plot fgd pulse heights from channels with failed fits.
+Use new ND280_PYTHON_LIBRARY() function to install python modules.  
+
 */
\ No newline at end of file

setup_script/setupPython.sh

diff --git a/setup_script/setupPython.sh b/setup_script/setupPython.sh
new file mode 100644
index 0000000..3604db4
--- /dev/null
+++ b/setup_script/setupPython.sh
@@ -0,0 +1,6 @@
+unset -f path_remove 
+unset -f path_prepend 
+path_remove ()  { export PYTHONPATH=`echo -n $PYTHONPATH | awk -v RS=: -v ORS=: '$0 != "'$1'"' | sed 's/:$//'`; } 
+path_prepend ()  { path_remove $1; export PYTHONPATH="$1:$PYTHONPATH" ;} 
+
+path_prepend ${SOFFTASKSROOT}/${ND280_SYSTEM}/lib

share/examples/fgd/ctcheck

diff --git a/share/examples/fgd/ctcheck b/share/examples/fgd/ctcheck
index 1c8b421..e921538 100755
--- a/share/examples/fgd/ctcheck
+++ b/share/examples/fgd/ctcheck
@@ -261,12 +261,12 @@ class UI:
                         checker.SetYMinMax(float(ymin),float(ymax))
                     elif key == ord('r'):
                         checker.ResetAxis()
-                    else:
+                    elif 0<key and key<256:
                         self.showMenu('Unknown command: %s' % chr(key), 3, clear=False)
                         clr=False
                 elif key == ord('q'):
                     break
-                else:
+                elif 0<key and key<256:
                     self.showMenu('Unknown command: %s' % chr(key), 3, clear=False)
                     clr=False
             except Exception, e:

share/examples/fgd/dncheck

diff --git a/share/examples/fgd/dncheck b/share/examples/fgd/dncheck
index 439fd01..177fc66 100755
--- a/share/examples/fgd/dncheck
+++ b/share/examples/fgd/dncheck
@@ -325,13 +325,19 @@ class UI:
                     checker.SetYMinMax(float(ymin),float(ymax))
                 elif key == ord('r'):
                     checker.ResetAxis()
-                else:
+                elif 0 <= key and key < 256:
                     self.showMenu('Unknown command: %s' % chr(key), 3, clear=False)
                     clr=False
+                else:
+                    self.showMenu('Unknown command', 3, clear=False)
+                    clr=False
             elif key == ord('q'):
                 break
             else:
+                if 0 <= key and key < 256:
                     self.showMenu('Unknown command: %s' % chr(key), 3, clear=False)
+                else:
+                    self.showMenu('Unknown command', 3, clear=False)
                 clr=False
         curses.endwin()
 

share/examples/fgd/dnfitcheck

diff --git a/share/examples/fgd/dnfitcheck b/share/examples/fgd/dnfitcheck
index e0788e8..bfe2c70 100755
--- a/share/examples/fgd/dnfitcheck
+++ b/share/examples/fgd/dnfitcheck
@@ -98,6 +98,7 @@ class DNFile:
         else:
             data_dir = None
             data_dirs = ['/t2k/dataquality/fgd/',
+                         os.path.expanduser('~/mnt/soffdata/t2k/dataquality/fgd/'),
                          os.path.expanduser('~/soffdata/t2k/dataquality/fgd/')]
             for d in data_dirs:
                 if os.path.exists( d ):

share/examples/fgd/tmcheck

diff --git a/share/examples/fgd/tmcheck b/share/examples/fgd/tmcheck
index d421806..cb8d507 100755
--- a/share/examples/fgd/tmcheck
+++ b/share/examples/fgd/tmcheck
@@ -11,9 +11,10 @@ import array
 def setupXAxis( xa ):
     xa.SetTimeDisplay(1)
     #xa.SetTimeOffset(0,'gmt')
+    xa.SetTimeOffset(0, 'local') # relative to 1970.01.01 00:00:00 (Asia/Tokyo)
     xa.SetTimeFormat('#splitline{%m-%d}{%H:%M}')
     xa.SetLabelOffset(0.03)
-    xa.SetNdivisions(920)
+    #xa.SetNdivisions(920)
     xa.SetTitleOffset(1.9)
     xa.SetTitle('(#splitline{mm-dd}{HH:MM})')
 
@@ -114,10 +115,12 @@ class TMPlotter:
             if tm > 0.0:
                 self.plots[i].addPair([t0,t1],[tm,tm])
                 s+= ' & %.2f' % float(tm)
-                s+='\\\\\n'
+                #s+='\\\\\n'
             else:
                 print 'WARNING: peiod with 0.0 timing marker not plotted.'
+
         self.table += s
+        self.table += '\\\\\n'
 
     def draw(self):
         c = ROOT.TCanvas('c0','c0', 1200, 560)

share/fgd/FGDPlot.py

diff --git a/share/fgd/FGDPlot.py b/share/fgd/FGDPlot.py
index 9a9df20..471fb57 100644
--- a/share/fgd/FGDPlot.py
+++ b/share/fgd/FGDPlot.py
@@ -361,6 +361,10 @@ class FGDFitPulseHeightPlot(FGDPulseHeightPlot):
         self.varname = 'pulse_height_fit'
         self.vartitle = 'Pulse height (fit)'
         self.SetNameTitle('hfgd%i_%s' % (self.fgd,self.varname), 'FGD%i %s' % (self.fgd,self.vartitle) )
+
+    def Cut( self ):
+        return FGDPulseHeightPlot.Cut(self) and self.chan_data.fitmean > 0.0 and self.chan_data.fitstatus == 0
+
     def Var( self, chan_data ):
 
         if chan_data.fitmean < 0.0: # Seems the fit failed... avoid completely blowing out the plot scale

Differences between analysisTools version 1.18 and 1.17

AnalysisTools/makeAnalysisTools.py

diff --git a/AnalysisTools/makeAnalysisTools.py b/AnalysisTools/makeAnalysisTools.py
index 8abfefc..8acf646 100644
--- a/AnalysisTools/makeAnalysisTools.py
+++ b/AnalysisTools/makeAnalysisTools.py
@@ -37,6 +37,7 @@ except ImportError:
     print "Failed to load pyROOT, falling back to compileAnalysisTools.C"
     UsePython = False
 
+if not UsePython:
     print "[INFO]: Checking for CMT"
     try:
         subprocess.check_call(['cmt', 'version'], shell=False,
@@ -68,6 +69,10 @@ if UsePython:
     file = open('input-file.list','r')
     line = file.readline()
     line = string.strip(line)
+    if not os.path.isfile(line):
+        print "The file %s ,named in input-file.list does not exist" % line
+        print " Can not continue building analysis tools."
+        exit()
     command.append(line)
 else:
     command = ['root','-l','-b','compileAnalysisTools.C']

cmake/CMakeLists.txt

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 6f5cba7..81a9d85 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -1,6 +1,23 @@
 # CMakeLists.txt for analysisTools package. It creates a library with dictionary and a main program
 cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
-
+#
+# check that the file ../AnalysisTools/input-file.list contains something other than
+# ../src/ToCompile.root
+# if it does then do nothing at all
+# 
+file(READ ../AnalysisTools/input-file.list contents)
+string(STRIP ${contents} contents)
+if( ${contents} STREQUAL "../src/ToCompile.root")
+  message("")
+  message(" WARNING  WARNING WARNING  WARNING ")
+  message("")
+  message(" As the file ./AnalysisTools/input-file.list contains the line ../src/ToCompile.root nothing will be built here.")
+  message(" To build analysis tools replace this with the name of an oaAnalysis format file then rerun cmake and make.")
+  message(" ")
+  message(" If you are not going to use analysisTools you can ignore this message.")
+  message("")
+  return()
+endif()
 find_package(nd280SoftwarePolicy 3.1)
 if( NOT nd280SoftwarePolicy_FOUND) 
   message(FATAL_ERROR " nd280SoftwarePolicy not found - abort ")

cmake/analysisToolsPackageVersion.cmake

diff --git a/cmake/analysisToolsPackageVersion.cmake b/cmake/analysisToolsPackageVersion.cmake
index 2b46c09..85acb37 100644
--- a/cmake/analysisToolsPackageVersion.cmake
+++ b/cmake/analysisToolsPackageVersion.cmake
@@ -1 +1 @@
-set(PACKAGE_VERSION "1.17" )
+set(PACKAGE_VERSION "1.18" )

doc/analysisToolsHistory.dox

diff --git a/doc/analysisToolsHistory.dox b/doc/analysisToolsHistory.dox
index 8aa5866..d2a066b 100644
--- a/doc/analysisToolsHistory.dox
+++ b/doc/analysisToolsHistory.dox
@@ -216,7 +216,7 @@ Add three files which mysteriously failed to get included.
 
 
 
-\section analysisTools_1.17_history Version 1.17
+\section analysisTools_1_17_history Version 1_17
 
 Freeze information:
    - Freeze Date: Thu Oct 17 14:45:34 2019
@@ -237,4 +237,18 @@ cmake ../cmake
 ../bin/makeAll.sh
 
 
+
+\section analysisTools_1_18_history Version 1_18
+
+Freeze information:
+   - Freeze Date: Thu Mar 26 10:56:37 2020
+   - Freeze User: Alex Finch
+   - Freeze Host: finchresearchlaptop
+
+
+This ensures this package can be included when building all software
+without blocking the build. It is up to the user to provide the necessary
+file and rebuild.
+
+
 */
\ No newline at end of file

Differences between analysisMaster version 1.80 and 1.77

cmake/analysisMasterND280_USE.cmake

diff --git a/cmake/analysisMasterND280_USE.cmake b/cmake/analysisMasterND280_USE.cmake
index f9495fb..60a5a9a 100644
--- a/cmake/analysisMasterND280_USE.cmake
+++ b/cmake/analysisMasterND280_USE.cmake
@@ -1,11 +1,11 @@
 ND280_USE(tfbExtractCalib  1.43.1 )
 ND280_USE(mppcExtractCalib  1.25.1 )
 ND280_USE(ecalApplyCalib  2.23.1 )
-ND280_USE(soffTasks  1.55.1 )
+ND280_USE(soffTasks  1.56 )
 ND280_USE(alignTools  0.15.1 )
 ND280_USE(fgdHighLevelCalib  0.3.1 )
-ND280_USE(eventDisplay  3.87.1 )
-ND280_USE(eventAnalysis  6.9.1 )
+ND280_USE(eventDisplay  3.88 )
+ND280_USE(eventAnalysis  6.9.2 )
 ND280_USE(ecalTestBeamAnalysis  0.9.1 )
 ND280_USE(selectControlSample  1.9.1 )
-ND280_USE(analysisTools 1.17 )
+ND280_USE(analysisTools 1.18 )

cmake/analysisMasterPackageVersion.cmake

diff --git a/cmake/analysisMasterPackageVersion.cmake b/cmake/analysisMasterPackageVersion.cmake
index 897841f..e19c8b4 100644
--- a/cmake/analysisMasterPackageVersion.cmake
+++ b/cmake/analysisMasterPackageVersion.cmake
@@ -1 +1 @@
-set(PACKAGE_VERSION "1.77" )
+set(PACKAGE_VERSION "1.80" )

doc/analysisMasterHistory.dox

diff --git a/doc/analysisMasterHistory.dox b/doc/analysisMasterHistory.dox
index 7d23ea2..e43d2cd 100644
--- a/doc/analysisMasterHistory.dox
+++ b/doc/analysisMasterHistory.dox
@@ -573,7 +573,7 @@ eventDisplay -> v3r85
 
 
 
-\section analysisMaster_1.75_history Version 1.75
+\section analysisMaster_1_75_history Version 1_75
 
 Freeze information:
    - Freeze Date: Sun Sep  1 19:29:15 2019
@@ -595,7 +595,7 @@ git.t2k.org/nd280/renaming.
 
 The name of this package was changed from nd280Analysis to analysisMaster.
 
-\section analysisMaster_1.76_history Version 1.76
+\section analysisMaster_1_76_history Version 1_76
 
 Freeze information:
    - Freeze Date: Fri Oct 11 15:08:26 2019
@@ -615,7 +615,7 @@ ecalTestBeamAnalysis 0.9.1
 selectControlSample 1.9.1
 
 
-\section analysisMaster_1.77_history Version 1.77
+\section analysisMaster_1_77_history Version 1_77
 
 Freeze information:
    - Freeze Date: Thu Oct 17 14:34:10 2019
@@ -625,4 +625,28 @@ Freeze information:
 
 Added analysisTools 1.17 to the build
 
+
+\section analysisMaster_1_80_history Version 1_80
+
+Freeze information:  
+   - Freeze Date: Fri Mar 27 17:27:35 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+Bump version of analysisTools to 1.18  
+  
+
+
+\section analysisMaster_1_80_history Version 1_80
+
+Freeze information:  
+   - Freeze Date: Tue Mar 31 12:55:54 2020  
+   - Freeze User: Alex Finch  
+   - Freeze Host: finchresearchlaptop
+  
+  
+Bump version of analysisTools to 1.18  
+  
+
 */
\ No newline at end of file

Differences between nd280SoftwareMaster version and 12.29

cmake/nd280SoftwareMasterND280_USE.cmake

diff --git a/cmake/nd280SoftwareMasterND280_USE.cmake b/cmake/nd280SoftwareMasterND280_USE.cmake
index 51077c2..587ff25 100644
--- a/cmake/nd280SoftwareMasterND280_USE.cmake
+++ b/cmake/nd280SoftwareMasterND280_USE.cmake
@@ -1,6 +1,6 @@
-ND280_USE(externalsMaster 1.74 )
-ND280_USE(baseMaster 1.65 )
-ND280_USE(simMaster 2.18 )
-ND280_USE(calibMaster 1.60 )
+ND280_USE(externalsMaster 1.78 )
+ND280_USE(baseMaster 1.67 )
+ND280_USE(simMaster 2.19 )
+ND280_USE(calibMaster 1.62 )
 ND280_USE(reconMaster 4.46 )
-ND280_USE(analysisMaster 1.77 )
+ND280_USE(analysisMaster 1.80 )

doc/nd280SoftwareMasterHistory.dox

diff --git a/doc/nd280SoftwareMasterHistory.dox b/doc/nd280SoftwareMasterHistory.dox
index c706d74..c375976 100644
--- a/doc/nd280SoftwareMasterHistory.dox
+++ b/doc/nd280SoftwareMasterHistory.dox
@@ -1841,7 +1841,7 @@ to the move to GIT/CMAKE.
 
 
 
-\section nd280SoftwareMaster_12.27_history Version 12.27
+\section nd280SoftwareMaster_12_27_history Version 12_27
 
 Freeze information:
    - Freeze Date: Sun Sep  1 19:30:55 2019
@@ -1861,7 +1861,7 @@ clearer. This has affected some class and function names in the code too. For mo
 information on the files changed by the package renaming, go to 
 git.t2k.org/nd280/renaming.
 
-\section nd280SoftwareMaster_12.28_history Version 12.28
+\section nd280SoftwareMaster_12_28_history Version 12_28
 
 Freeze information:
    - Freeze Date: Fri Oct 11 15:22:54 2019
@@ -1877,7 +1877,7 @@ reconMaster 4.46
 analysisMaster 1.76 
 
 
-\section nd280SoftwareMaster_12.29_history Version 12.29
+\section nd280SoftwareMaster_12_29_history Version 12_29
 
 Freeze information:
    - Freeze Date: Thu Oct 17 14:38:06 2019