Skip to content
Snippets Groups Projects
Commit 6553a832 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

fix: migrate from JUGGLER_DETECTOR to simply DETECTOR

parent 61baeb2d
Branches
No related tags found
1 merge request!167fix: migrate from JUGGLER_DETECTOR to simply DETECTOR
......@@ -32,7 +32,7 @@ Here we setup to use our local build of the `juggler` library.
First set some environment variables.
```
export JUGGLER_INSTALL_PREFIX=/usr/local
export JUGGLER_DETECTOR=athena # athena is the default
export DETECTOR=epic # athena is the default
export BEAMLINE_CONFIG=ip6 # ip6 is the default
```
......
......@@ -30,9 +30,9 @@ void synchrotron_sim(const char* fname = "sim_synchrotron.edm4hep.root"){
// Detector version
std::string detector_version("default");
const char* juggler_detector_version = gSystem->Getenv("JUGGLER_DETECTOR_VERSION");
if (juggler_detector_version) {
detector_version = juggler_detector_version;
const char* getenv_detector_version = gSystem->Getenv("DETECTOR_VERSION");
if (getenv_detector_version) {
detector_version = getenv_detector_version;
}
if (detector_version == "acadia") {
......
......@@ -79,12 +79,12 @@ export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root"
echo "FILE_NAME_TAG = ${FILE_NAME_TAG}"
echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}"
echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
echo "DETECTOR = ${DETECTOR}"
## To run the reconstruction, we need the following global variables:
## - JUGGLER_INSTALL_PREFIX: Install prefix for Juggler (simu/recon)
## - JUGGLER_DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions
## Step 1. Get the data
......@@ -105,7 +105,7 @@ if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
--filter.tracker edep0 \
-v ERROR \
--numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \
--inputFiles ${JUGGLER_MC_FILE} \
--outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then
......
......@@ -27,7 +27,7 @@ source parse_cmd.sh $@
## To run the reconstruction, we need the following global variables:
## - JUGGLER_INSTALL_PREFIX: Install prefix for Juggler (simu/recon)
## - JUGGLER_DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions
##
......@@ -62,7 +62,7 @@ echo "Running Geant4 simulation"
# --filter.tracker edep0 \
# -v WARNING \
# --numberOfEvents ${JUGGLER_N_EVENTS} \
# --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
# --compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \
# --inputFiles ${GEN_FILE} \
# --outputFile ${SIM_FILE}
#if [ "$?" -ne "0" ] ; then
......@@ -79,7 +79,7 @@ echo "Running Geant4 simulation"
## - JUGGLER_SIM_FILE: input detector simulation
## - JUGGLER_REC_FILE: output reconstructed data
## - JUGGLER_N_EVENTS: number of events to process (part of global environment)
## - JUGGLER_DETECTOR: detector package (part of global environment)
## - DETECTOR: detector package (part of global environment)
#export JUGGLER_SIM_FILE=${SIM_FILE}
#export JUGGLER_REC_FILE=${REC_FILE}
#gaudirun.py options/tracker_reconstruction.py
......@@ -103,7 +103,7 @@ CONFIG="${TMP_PATH}/${PLOT_TAG}.json"
cat << EOF > ${CONFIG}
{
"rec_file": "${REC_FILE}",
"detector": "${JUGGLER_DETECTOR}",
"detector": "${DETECTOR}",
"output_prefix": "${RESULTS_PATH}/${PLOT_TAG}",
"test_tag": "${BEAM_TAG}"
}
......
......@@ -28,7 +28,7 @@ source ${LOCAL_PREFIX}/bin/parse_cmd.sh $@
## To run the reconstruction, we need the following global variables:
## - JUGGLER_INSTALL_PREFIX: Install prefix for Juggler (simu/recon)
## - JUGGLER_DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions
##
## defined in common_bench repo
......@@ -67,7 +67,7 @@ ddsim --runType batch \
--filter.tracker edep0 \
-v INFO \
--numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \
--inputFiles ${GEN_FILE} \
--outputFile ${SIM_FILE}
if [ "$?" -ne "0" ] ; then
......@@ -85,7 +85,7 @@ echo "Running the digitization and reconstruction"
## - JUGGLER_SIM_FILE: input detector simulation
## - JUGGLER_REC_FILE: output reconstructed data
## - JUGGLER_N_EVENTS: number of events to process (part of global environment)
## - JUGGLER_DETECTOR: detector package (part of global environment)
## - DETECTOR: detector package (part of global environment)
export JUGGLER_SIM_FILE=${SIM_FILE}
export JUGGLER_REC_FILE=${REC_FILE}
for rec in options/*.py ; do
......@@ -107,7 +107,7 @@ CONFIG="${TMP_PATH}/${PLOT_TAG}.json"
cat << EOF > ${CONFIG}
{
"rec_file": "${REC_FILE}",
"detector": "${JUGGLER_DETECTOR}",
"detector": "${DETECTOR}",
"output_prefix": "${RESULTS_PATH}/${PLOT_TAG}",
"ebeam": ${EBEAM},
"pbeam": ${PBEAM},
......@@ -132,7 +132,7 @@ CONFIG="${TMP_PATH}/${PLOT_TAG}.raw.json"
cat << EOF > ${CONFIG}
{
"rec_file": "${REC_FILE/.root/.raw.root}",
"detector": "${JUGGLER_DETECTOR}",
"detector": "${DETECTOR}",
"output_prefix": "${RESULTS_PATH}/${PLOT_TAG}",
"ebeam": ${EBEAM},
"pbeam": ${PBEAM},
......@@ -150,7 +150,7 @@ CONFIG="${TMP_PATH}/${PLOT_TAG}.ecal.json"
cat << EOF > ${CONFIG}
{
"rec_file": "${REC_FILE/.root/.ecal.root}",
"detector": "${JUGGLER_DETECTOR}",
"detector": "${DETECTOR}",
"output_prefix": "${RESULTS_PATH}/${PLOT_TAG}",
"ebeam": ${EBEAM},
"pbeam": ${PBEAM},
......@@ -168,7 +168,7 @@ CONFIG="${TMP_PATH}/${PLOT_TAG}.hcal.json"
cat << EOF > ${CONFIG}
{
"rec_file": "${REC_FILE/.root/.hcal.root}",
"detector": "${JUGGLER_DETECTOR}",
"detector": "${DETECTOR}",
"output_prefix": "${RESULTS_PATH}/${PLOT_TAG}",
"ebeam": ${EBEAM},
"pbeam": ${PBEAM},
......
......@@ -79,12 +79,12 @@ export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root"
echo "FILE_NAME_TAG = ${FILE_NAME_TAG}"
echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}"
echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
echo "DETECTOR = ${DETECTOR}"
## To run the reconstruction, we need the following global variables:
## - JUGGLER_INSTALL_PREFIX: Install prefix for Juggler (simu/recon)
## - JUGGLER_DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions
## Step 1. Get the data
......@@ -105,7 +105,7 @@ if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
--filter.tracker edep0 \
-v ERROR \
--numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \
--inputFiles "${JUGGLER_MC_FILE}" \
--outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then
......
......@@ -65,7 +65,7 @@ ddsim --runType batch \
--filter.tracker edep0 \
-v WARNING \
--numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \
--inputFiles ${GEN_FILE} \
--outputFile ${SIM_FILE}
if [ "$?" -ne "0" ] ; then
......@@ -82,7 +82,7 @@ echo "Running the digitization and reconstruction"
## - JUGGLER_SIM_FILE: input detector simulation
## - JUGGLER_REC_FILE: output reconstructed data
## - JUGGLER_N_EVENTS: number of events to process (part of global environment)
## - JUGGLER_DETECTOR: detector package (part of global environment)
## - DETECTOR: detector package (part of global environment)
export JUGGLER_SIM_FILE=${SIM_FILE}
export JUGGLER_REC_FILE=${REC_FILE}
for rec in options/*.py ; do
......@@ -106,7 +106,7 @@ cat << EOF > ${CONFIG}
"rec_file": "${REC_FILE}",
"vm_name": "${LEADING}",
"decay": "${DECAY}",
"detector": "${JUGGLER_DETECTOR_CONFIG}",
"detector": "${DETECTOR_CONFIG}",
"output_prefix": "${RESULTS_PATH}/${PLOT_TAG}",
"test_tag": "${LEADING}_${DECAY}_${BEAM_TAG}"
}
......
......@@ -11,7 +11,7 @@ ddsim --runType run \
--numberOfEvents ${JUGGLER_N_EVENTS} \
--part.minimalKineticEnergy 1*TeV \
--filter.tracker edep0 \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \
--outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running ddsim"
......
......@@ -100,12 +100,12 @@ export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root"
echo "FILE_NAME_TAG = ${FILE_NAME_TAG}"
echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}"
echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
echo "DETECTOR = ${DETECTOR}"
## To run the reconstruction, we need the following global variables:
## - JUGGLER_INSTALL_PREFIX: Install prefix for Juggler (simu/recon)
## - JUGGLER_DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions
## Step 1. Get the data
......@@ -126,7 +126,7 @@ if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
--filter.tracker edep0 \
-v ERROR \
--numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \
--inputFiles "${JUGGLER_MC_FILE}" \
--outputFile ${JUGGLER_SIM_FILE}
if [ "$?" -ne "0" ] ; then
......
......@@ -79,11 +79,11 @@ export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root"
echo "FILE_NAME_TAG = ${FILE_NAME_TAG}"
echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}"
echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
echo "DETECTOR = ${DETECTOR}"
## To run the reconstruction, we need the following global variables:
## - JUGGLER_INSTALL_PREFIX: Install prefix for Juggler (simu/recon)
## - JUGGLER_DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions
## Step 1. Get the data
......@@ -104,7 +104,7 @@ if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
--filter.tracker edep0 \
-v ERROR \
--numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \
--inputFiles "${JUGGLER_MC_FILE}" \
--outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then
......
......@@ -7,20 +7,20 @@ from GaudiKernel.SystemOfUnits import eV, MeV, GeV, mm, cm, mrad
import json
detector_name = "athena"
if "JUGGLER_DETECTOR" in os.environ:
detector_name = str(os.environ["JUGGLER_DETECTOR"])
if "DETECTOR" in os.environ:
detector_name = str(os.environ["DETECTOR"])
detector_config = detector_name
if "JUGGLER_DETECTOR_CONFIG" in os.environ:
detector_config = str(os.environ["JUGGLER_DETECTOR_CONFIG"])
if "DETECTOR_CONFIG" in os.environ:
detector_config = str(os.environ["DETECTOR_CONFIG"])
detector_path = ""
if "DETECTOR_PATH" in os.environ:
detector_path = str(os.environ["DETECTOR_PATH"])
detector_version = "default"
if "JUGGLER_DETECTOR_VERSION" in os.environ:
env_version = str(os.environ["JUGGLER_DETECTOR_VERSION"])
if "DETECTOR_VERSION" in os.environ:
env_version = str(os.environ["DETECTOR_VERSION"])
if "acadia" in env_version:
detector_version = "acadia"
......
......@@ -7,20 +7,20 @@ from GaudiKernel.SystemOfUnits import eV, MeV, GeV, mm, cm, mrad
import json
detector_name = "athena"
if "JUGGLER_DETECTOR" in os.environ:
detector_name = str(os.environ["JUGGLER_DETECTOR"])
if "DETECTOR" in os.environ:
detector_name = str(os.environ["DETECTOR"])
detector_config = detector_name
if "JUGGLER_DETECTOR_CONFIG" in os.environ:
detector_config = str(os.environ["JUGGLER_DETECTOR_CONFIG"])
if "DETECTOR_CONFIG" in os.environ:
detector_config = str(os.environ["DETECTOR_CONFIG"])
detector_path = ""
if "DETECTOR_PATH" in os.environ:
detector_path = str(os.environ["DETECTOR_PATH"])
detector_version = "default"
if "JUGGLER_DETECTOR_VERSION" in os.environ:
env_version = str(os.environ["JUGGLER_DETECTOR_VERSION"])
if "DETECTOR_VERSION" in os.environ:
env_version = str(os.environ["DETECTOR_VERSION"])
if "acadia" in env_version:
detector_version = "acadia"
......
......@@ -7,20 +7,20 @@ from GaudiKernel.SystemOfUnits import eV, MeV, GeV, mm, cm, mrad
import json
detector_name = "athena"
if "JUGGLER_DETECTOR" in os.environ:
detector_name = str(os.environ["JUGGLER_DETECTOR"])
if "DETECTOR" in os.environ:
detector_name = str(os.environ["DETECTOR"])
detector_config = detector_name
if "JUGGLER_DETECTOR_CONFIG" in os.environ:
detector_config = str(os.environ["JUGGLER_DETECTOR_CONFIG"])
if "DETECTOR_CONFIG" in os.environ:
detector_config = str(os.environ["DETECTOR_CONFIG"])
detector_path = ""
if "DETECTOR_PATH" in os.environ:
detector_path = str(os.environ["DETECTOR_PATH"])
detector_version = "default"
if "JUGGLER_DETECTOR_VERSION" in os.environ:
env_version = str(os.environ["JUGGLER_DETECTOR_VERSION"])
if "DETECTOR_VERSION" in os.environ:
env_version = str(os.environ["DETECTOR_VERSION"])
if "acadia" in env_version:
detector_version = "acadia"
......
......@@ -7,20 +7,20 @@ from GaudiKernel.SystemOfUnits import eV, MeV, GeV, mm, cm, mrad
import json
detector_name = "athena"
if "JUGGLER_DETECTOR" in os.environ:
detector_name = str(os.environ["JUGGLER_DETECTOR"])
if "DETECTOR" in os.environ:
detector_name = str(os.environ["DETECTOR"])
detector_config = detector_name
if "JUGGLER_DETECTOR_CONFIG" in os.environ:
detector_config = str(os.environ["JUGGLER_DETECTOR_CONFIG"])
if "DETECTOR_CONFIG" in os.environ:
detector_config = str(os.environ["DETECTOR_CONFIG"])
detector_path = ""
if "DETECTOR_PATH" in os.environ:
detector_path = str(os.environ["DETECTOR_PATH"])
detector_version = "default"
if "JUGGLER_DETECTOR_VERSION" in os.environ:
env_version = str(os.environ["JUGGLER_DETECTOR_VERSION"])
if "DETECTOR_VERSION" in os.environ:
env_version = str(os.environ["DETECTOR_VERSION"])
if "acadia" in env_version:
detector_version = "acadia"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment