From a744f84586a90ba5d22f067076ab5ab757dcb454 Mon Sep 17 00:00:00 2001 From: Whitney Armstrong <warmstrong@anl.gov> Date: Thu, 22 Jul 2021 18:37:17 -0500 Subject: [PATCH] Replaced JUGGLER_DETECTOR_PATH with DETECTOR_PATH. - Not sure why JUGGLER_DETECTOR_PATH was introduced but only JUGGLER_INSTALL_PREFIX and JUGGLER_DETECTOR should be used. - JUGGLER_DETECTOR could probably have a different name but it is historical --- benchmarks/clustering/full_cal_clusters.sh | 8 ++++---- benchmarks/clustering/options/full_cal_reco.py | 2 +- benchmarks/clustering/options/full_trackpluscalo_reco.py | 2 +- benchmarks/ecal/options/barrel.py | 2 +- benchmarks/ecal/options/endcap_e.py | 2 +- benchmarks/ecal/options/endcap_i.py | 2 +- benchmarks/ecal/run_emcal_benchmarks.py | 2 +- benchmarks/full/full_reconstruction.sh | 8 ++------ benchmarks/full/options/full_reconstruction.py | 4 ++-- benchmarks/imaging_shower_ML/sim_rec_tag.py | 2 +- benchmarks/rich/forward_hadrons.sh | 2 +- benchmarks/rich/options/rich_reco.py | 4 ++-- benchmarks/tracking/central_electrons.sh | 2 +- benchmarks/tracking/options/tracker_reconstruction.py | 4 ++-- 14 files changed, 21 insertions(+), 25 deletions(-) diff --git a/benchmarks/clustering/full_cal_clusters.sh b/benchmarks/clustering/full_cal_clusters.sh index f4dce6fc..5f135014 100644 --- a/benchmarks/clustering/full_cal_clusters.sh +++ b/benchmarks/clustering/full_cal_clusters.sh @@ -71,11 +71,11 @@ if [[ ! -n "${FULL_CAL_PMAX}" ]] ; then export FULL_CAL_PMIN=10.0 fi -if [[ ! -n "${JUGGLER_DETECTOR_PATH}" ]] ; then - export JUGGLER_DETECTOR_PATH=${DETECTOR_PATH} +if [[ ! -n "${DETECTOR_PATH}" ]] ; then + export DETECTOR_PATH=${DETECTOR_PATH} fi -compact_path=${JUGGLER_DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml +compact_path=${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml export JUGGLER_FILE_NAME_TAG="${nametag}" export JUGGLER_GEN_FILE="gen_${JUGGLER_FILE_NAME_TAG}.hepmc" @@ -84,7 +84,7 @@ export JUGGLER_DIGI_FILE="digi_${JUGGLER_FILE_NAME_TAG}.root" export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root" echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" -echo "JUGGLER_DETECTOR_PATH = ${JUGGLER_DETECTOR_PATH}" +echo "DETECTOR_PATH = ${DETECTOR_PATH}" echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" # Generate the input events diff --git a/benchmarks/clustering/options/full_cal_reco.py b/benchmarks/clustering/options/full_cal_reco.py index 3e63bf56..6e1d3691 100644 --- a/benchmarks/clustering/options/full_cal_reco.py +++ b/benchmarks/clustering/options/full_cal_reco.py @@ -10,7 +10,7 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, G from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) -detector_path = str(os.environ.get("JUGGLER_DETECTOR_PATH", ".")) +detector_path = str(os.environ.get("DETECTOR_PATH", ".")) compact_path = os.path.join(detector_path, detector_name) # get sampling fractions from system environment variable, 1.0 by default diff --git a/benchmarks/clustering/options/full_trackpluscalo_reco.py b/benchmarks/clustering/options/full_trackpluscalo_reco.py index 0d742ab4..fc016724 100644 --- a/benchmarks/clustering/options/full_trackpluscalo_reco.py +++ b/benchmarks/clustering/options/full_trackpluscalo_reco.py @@ -10,7 +10,7 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, G from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) -detector_path = str(os.environ.get("JUGGLER_DETECTOR_PATH", ".")) +detector_path = str(os.environ.get("DETECTOR_PATH", ".")) compact_path = os.path.join(detector_path, detector_name) # get sampling fractions from system environment variable, 1.0 by default diff --git a/benchmarks/ecal/options/barrel.py b/benchmarks/ecal/options/barrel.py index f44bf58f..c71d5775 100644 --- a/benchmarks/ecal/options/barrel.py +++ b/benchmarks/ecal/options/barrel.py @@ -10,7 +10,7 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, G from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) -detector_path = str(os.environ.get("JUGGLER_DETECTOR_PATH", ".")) +detector_path = str(os.environ.get("DETECTOR_PATH", ".")) compact_path = str(os.environ.get("JUGGLER_COMPACT_PATH", "{}.xml".format(os.path.join(detector_path, detector_name)))) # input and output diff --git a/benchmarks/ecal/options/endcap_e.py b/benchmarks/ecal/options/endcap_e.py index b70f0d80..609c83da 100644 --- a/benchmarks/ecal/options/endcap_e.py +++ b/benchmarks/ecal/options/endcap_e.py @@ -10,7 +10,7 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, G from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) -detector_path = str(os.environ.get("JUGGLER_DETECTOR_PATH", ".")) +detector_path = str(os.environ.get("DETECTOR_PATH", ".")) compact_path = str(os.environ.get("JUGGLER_COMPACT_PATH", "{}.xml".format(os.path.join(detector_path, detector_name)))) # input and output diff --git a/benchmarks/ecal/options/endcap_i.py b/benchmarks/ecal/options/endcap_i.py index 7e5553b6..e03f8ad9 100644 --- a/benchmarks/ecal/options/endcap_i.py +++ b/benchmarks/ecal/options/endcap_i.py @@ -11,7 +11,7 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, G from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) -detector_path = str(os.environ.get("JUGGLER_DETECTOR_PATH", ".")) +detector_path = str(os.environ.get("DETECTOR_PATH", ".")) compact_path = str(os.environ.get("JUGGLER_COMPACT_PATH", "{}.xml".format(os.path.join(detector_path, detector_name)))) ci_ecal_sf = float(os.environ.get("CI_ECAL_SAMP_FRAC", 0.253)) diff --git a/benchmarks/ecal/run_emcal_benchmarks.py b/benchmarks/ecal/run_emcal_benchmarks.py index 3526ca58..f3ecf610 100755 --- a/benchmarks/ecal/run_emcal_benchmarks.py +++ b/benchmarks/ecal/run_emcal_benchmarks.py @@ -31,7 +31,7 @@ default_type = { # ['EcalEndcapNClusters', 'EcalEndcapPClusters', 'EcalBarrelClusters']], } -default_compact = os.path.join(os.environ.get('JUGGLER_DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')), +default_compact = os.path.join(os.environ.get('DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')), '{}.xml'.format(os.environ.get('JUGGLER_DETECTOR', ''))) parser = argparse.ArgumentParser() parser.add_argument('run_type', help='Run type, support {}'.format(list(default_type.keys()))) diff --git a/benchmarks/full/full_reconstruction.sh b/benchmarks/full/full_reconstruction.sh index f8482b08..6feabb14 100644 --- a/benchmarks/full/full_reconstruction.sh +++ b/benchmarks/full/full_reconstruction.sh @@ -110,15 +110,11 @@ if [[ ! -n "${JUGGLER_DETECTOR}" ]] ; then export JUGGLER_DETECTOR="athena" fi -if [[ ! -n "${JUGGLER_DETECTOR_PATH}" ]] ; then - export JUGGLER_DETECTOR_PATH="/opt/detector/share/athena" -fi - if [[ ! -n "${JUGGLER_INSTALL_PREFIX}" ]] ; then export JUGGLER_INSTALL_PREFIX="/usr/local" fi -compact_path=${JUGGLER_DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml +compact_path=${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml export JUGGLER_FILE_NAME_TAG="${nametag}" export JUGGLER_GEN_FILE="gen_${JUGGLER_FILE_NAME_TAG}.hepmc" @@ -126,7 +122,7 @@ export JUGGLER_SIM_FILE="sim_${JUGGLER_FILE_NAME_TAG}.root" export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root" echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" -echo "JUGGLER_DETECTOR_PATH = ${JUGGLER_DETECTOR_PATH}" +echo "DETECTOR_PATH = ${DETECTOR_PATH}" echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" # Generate the input events diff --git a/benchmarks/full/options/full_reconstruction.py b/benchmarks/full/options/full_reconstruction.py index 26f07b04..6195d49b 100644 --- a/benchmarks/full/options/full_reconstruction.py +++ b/benchmarks/full/options/full_reconstruction.py @@ -10,8 +10,8 @@ if "JUGGLER_DETECTOR" in os.environ : detector_name = str(os.environ["JUGGLER_DETECTOR"]) detector_path = "" -if "JUGGLER_DETECTOR_PATH" in os.environ : - detector_path = str(os.environ["JUGGLER_DETECTOR_PATH"]) +if "DETECTOR_PATH" in os.environ : + detector_path = str(os.environ["DETECTOR_PATH"]) compact_path = os.path.join(detector_path, detector_name) diff --git a/benchmarks/imaging_shower_ML/sim_rec_tag.py b/benchmarks/imaging_shower_ML/sim_rec_tag.py index 1f7c4b28..3a7aaedb 100755 --- a/benchmarks/imaging_shower_ML/sim_rec_tag.py +++ b/benchmarks/imaging_shower_ML/sim_rec_tag.py @@ -11,7 +11,7 @@ import subprocess import argparse -default_compact = os.path.join(os.environ.get('JUGGLER_DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')), +default_compact = os.path.join(os.environ.get('DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')), '{}.xml'.format(os.environ.get('JUGGLER_DETECTOR', ''))) parser = argparse.ArgumentParser() parser.add_argument('-n', '--numberOfEvents', dest='nev', type=int, default=100, help='Number of events to process.') diff --git a/benchmarks/rich/forward_hadrons.sh b/benchmarks/rich/forward_hadrons.sh index 4338a011..03f83143 100644 --- a/benchmarks/rich/forward_hadrons.sh +++ b/benchmarks/rich/forward_hadrons.sh @@ -11,7 +11,7 @@ ## You can ready options/env.sh for more in-depth explanations of the variables ## and how they can be controlled. source options/env.sh -export JUGGLER_DETECTOR_PATH=${DETECTOR_PATH} +export DETECTOR_PATH=${DETECTOR_PATH} if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then export JUGGLER_N_EVENTS=100 diff --git a/benchmarks/rich/options/rich_reco.py b/benchmarks/rich/options/rich_reco.py index a230fae6..640fb8de 100644 --- a/benchmarks/rich/options/rich_reco.py +++ b/benchmarks/rich/options/rich_reco.py @@ -7,8 +7,8 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc detector_name = "topside" if "JUGGLER_DETECTOR" in os.environ : detector_name = str(os.environ["JUGGLER_DETECTOR"]) -if "JUGGLER_DETECTOR_PATH" in os.environ : - detector_name = str(os.environ["JUGGLER_DETECTOR_PATH"])+"/"+detector_name +if "DETECTOR_PATH" in os.environ : + detector_name = str(os.environ["DETECTOR_PATH"])+"/"+detector_name # todo add checks input_sim_file = str(os.environ["JUGGLER_SIM_FILE"]) diff --git a/benchmarks/tracking/central_electrons.sh b/benchmarks/tracking/central_electrons.sh index 98ba76d6..a9c2262b 100644 --- a/benchmarks/tracking/central_electrons.sh +++ b/benchmarks/tracking/central_electrons.sh @@ -49,7 +49,7 @@ print_env.sh ## ## You can ready options/env.sh for more in-depth explanations of the variables ## and how they can be controlled. -export JUGGLER_DETECTOR_PATH=${DETECTOR_PATH} +export DETECTOR_PATH=${DETECTOR_PATH} if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then export JUGGLER_N_EVENTS=100 diff --git a/benchmarks/tracking/options/tracker_reconstruction.py b/benchmarks/tracking/options/tracker_reconstruction.py index 6c27c691..ba2cbf0b 100644 --- a/benchmarks/tracking/options/tracker_reconstruction.py +++ b/benchmarks/tracking/options/tracker_reconstruction.py @@ -9,8 +9,8 @@ if "JUGGLER_DETECTOR" in os.environ : detector_name = str(os.environ["JUGGLER_DETECTOR"]) detector_path = "" -if "JUGGLER_DETECTOR_PATH" in os.environ : - detector_path = str(os.environ["JUGGLER_DETECTOR_PATH"]) +if "DETECTOR_PATH" in os.environ : + detector_path = str(os.environ["DETECTOR_PATH"]) # todo add checks input_sim_file = str(os.environ["JUGGLER_SIM_FILE"]) -- GitLab