From 6bbcc86c02cba93855bac9ed2ace2b14555fef74 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck <wdconinc@gmail.com> Date: Thu, 28 Jul 2022 18:50:14 -0500 Subject: [PATCH] fix: migrate from JUGGLER_DETECTOR to simply DETECTOR --- README.md | 2 +- benchmarks/clustering/full_cal_clusters.sh | 4 ++-- .../clustering/options/full_cal_reco.py | 6 ++--- benchmarks/ecal/options/barrel.py | 6 ++--- benchmarks/ecal/options/endcap_e.py | 2 +- benchmarks/ecal/options/endcap_i.py | 2 +- benchmarks/ecal/run_emcal_benchmarks.py | 2 +- benchmarks/far_forward/far_forward_protons.sh | 8 +++---- .../options/far_forward_reconstruction.py | 2 +- benchmarks/far_forward/run_zdc.sh | 10 ++++---- .../emcal_barrel_pion_rejection_analysis.cxx | 4 ++-- benchmarks/imaging_ecal/config.yml | 4 ++-- .../imaging_ecal/options/hybrid_cluster.py | 6 ++--- .../imaging_ecal/options/scfi_cluster.py | 6 ++--- benchmarks/imaging_ecal/run_emcal_barrel.sh | 6 ++--- .../imaging_ecal/run_emcal_barrel_pion_rej.sh | 6 ++--- benchmarks/imaging_ecal/run_imcal_pion0.sh | 2 +- benchmarks/imaging_shower_ML/config.yml | 24 +++++++++---------- benchmarks/imaging_shower_ML/sim_rec_tag.py | 2 +- benchmarks/rich/forward_hadrons.sh | 14 +++++------ benchmarks/rich/options/rich_reco.py | 4 ++-- benchmarks/track_finding/multiple_tracks.sh | 8 +++---- .../options/track_reconstruction.py | 8 +++---- .../options/track_reconstruction.py | 8 +++---- benchmarks/track_fitting/single_tracks.sh | 8 +++---- benchmarks/tracking/central_electrons.sh | 8 +++---- benchmarks/tracking/central_pions.sh | 8 +++---- benchmarks/tracking/multiple_tracks.sh | 8 +++---- .../tracking/options/track_reconstruction.py | 8 +++---- .../tracking/run_tracking_benchmarks.py | 4 ++-- .../scripts/gen_central_electrons.cxx | 4 ++-- 31 files changed, 97 insertions(+), 97 deletions(-) diff --git a/README.md b/README.md index 91de2697..ec3ff4cf 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,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 # epic is the default export BEAMLINE_CONFIG=ip6 # ip6 is the default ``` diff --git a/benchmarks/clustering/full_cal_clusters.sh b/benchmarks/clustering/full_cal_clusters.sh index 07b0efd2..2feb65ae 100644 --- a/benchmarks/clustering/full_cal_clusters.sh +++ b/benchmarks/clustering/full_cal_clusters.sh @@ -75,7 +75,7 @@ if [[ ! -n "${DETECTOR_PATH}" ]] ; then export DETECTOR_PATH=${DETECTOR_PATH} fi -compact_path=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml +compact_path=${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml export JUGGLER_FILE_NAME_TAG="${nametag}" export JUGGLER_GEN_FILE="gen_${JUGGLER_FILE_NAME_TAG}.hepmc" @@ -85,7 +85,7 @@ export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root" echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" echo "DETECTOR_PATH = ${DETECTOR_PATH}" -echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" +echo "DETECTOR = ${DETECTOR}" # Generate the input events python benchmarks/imaging_ecal/scripts/gen_particles.py ${JUGGLER_GEN_FILE} -n ${JUGGLER_N_EVENTS}\ diff --git a/benchmarks/clustering/options/full_cal_reco.py b/benchmarks/clustering/options/full_cal_reco.py index e2d29aed..f933359c 100644 --- a/benchmarks/clustering/options/full_cal_reco.py +++ b/benchmarks/clustering/options/full_cal_reco.py @@ -9,9 +9,9 @@ import ROOT from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad -detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) -detector_config = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", detector_name)) -detector_version = str(os.environ.get("JUGGLER_DETECTOR_VERSION", "master")) +detector_name = str(os.environ.get("DETECTOR", "athena")) +detector_config = str(os.environ.get("DETECTOR_CONFIG", detector_name)) +detector_version = str(os.environ.get("DETECTOR_VERSION", "master")) detector_path = str(os.environ.get("DETECTOR_PATH", ".")) compact_path = os.path.join(detector_path, detector_config) diff --git a/benchmarks/ecal/options/barrel.py b/benchmarks/ecal/options/barrel.py index 149dfb6d..1ed18456 100644 --- a/benchmarks/ecal/options/barrel.py +++ b/benchmarks/ecal/options/barrel.py @@ -9,9 +9,9 @@ import ROOT from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad -detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) -detector_config = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", detector_name)) -detector_version = str(os.environ.get("JUGGLER_DETECTOR_VERSION", "master")) +detector_name = str(os.environ.get("DETECTOR", "athena")) +detector_config = str(os.environ.get("DETECTOR_CONFIG", detector_name)) +detector_version = str(os.environ.get("DETECTOR_VERSION", "master")) 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)))) diff --git a/benchmarks/ecal/options/endcap_e.py b/benchmarks/ecal/options/endcap_e.py index 28df778f..1aab4beb 100644 --- a/benchmarks/ecal/options/endcap_e.py +++ b/benchmarks/ecal/options/endcap_e.py @@ -8,7 +8,7 @@ import ROOT from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad -detector_name = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", "athena")) +detector_name = str(os.environ.get("DETECTOR_CONFIG", "athena")) 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)))) diff --git a/benchmarks/ecal/options/endcap_i.py b/benchmarks/ecal/options/endcap_i.py index d7730acf..63469090 100644 --- a/benchmarks/ecal/options/endcap_i.py +++ b/benchmarks/ecal/options/endcap_i.py @@ -9,7 +9,7 @@ import ROOT from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad -detector_name = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", "athena")) +detector_name = str(os.environ.get("DETECTOR_CONFIG", "athena")) 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 f22ff9e7..24a277f5 100755 --- a/benchmarks/ecal/run_emcal_benchmarks.py +++ b/benchmarks/ecal/run_emcal_benchmarks.py @@ -32,7 +32,7 @@ default_type = { } default_compact = os.path.join(os.environ.get('DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')), - '{}.xml'.format(os.environ.get('JUGGLER_DETECTOR_CONFIG', ''))) + '{}.xml'.format(os.environ.get('DETECTOR_CONFIG', ''))) parser = argparse.ArgumentParser() parser.add_argument('run_type', help='Run type, support {}'.format(list(default_type.keys()))) parser.add_argument('-n', '--numberOfEvents', dest='nev', type=int, default=100, help='Number of events to process.') diff --git a/benchmarks/far_forward/far_forward_protons.sh b/benchmarks/far_forward/far_forward_protons.sh index d589f990..acd693d6 100644 --- a/benchmarks/far_forward/far_forward_protons.sh +++ b/benchmarks/far_forward/far_forward_protons.sh @@ -43,8 +43,8 @@ print_env.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 -## - JUGGLER_DETECTOR_VERSION: the detector package we want to use for this benchmark +## - DETECTOR: the detector package we want to use for this benchmark +## - DETECTOR_VERSION: the detector package we want to use for this benchmark ## - DETECTOR_PATH: full path to the detector definitions ## ## You can ready options/env.sh for more in-depth explanations of the variables @@ -63,7 +63,7 @@ export JUGGLER_SIM_FILE="sim_${JUGGLER_FILE_NAME_TAG}.edm4hep.root" export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root" echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" -echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" +echo "DETECTOR = ${DETECTOR}" if [[ -z "${REC_ONLY}" && -z "${ANALYSIS_ONLY}" ]] ; @@ -83,7 +83,7 @@ then --filter.tracker edep0 \ -v WARNING \ --numberOfEvents ${JUGGLER_N_EVENTS} \ - --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \ + --compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --outputFile ${JUGGLER_SIM_FILE} if [[ "$?" -ne "0" ]] ; then diff --git a/benchmarks/far_forward/options/far_forward_reconstruction.py b/benchmarks/far_forward/options/far_forward_reconstruction.py index 363f61d8..9b52a4fd 100644 --- a/benchmarks/far_forward/options/far_forward_reconstruction.py +++ b/benchmarks/far_forward/options/far_forward_reconstruction.py @@ -3,7 +3,7 @@ from Gaudi.Configuration import * from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad -detector_name = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", "athena")) +detector_name = str(os.environ.get("DETECTOR_CONFIG", "athena")) 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)))) diff --git a/benchmarks/far_forward/run_zdc.sh b/benchmarks/far_forward/run_zdc.sh index 816319e3..e9dc1666 100644 --- a/benchmarks/far_forward/run_zdc.sh +++ b/benchmarks/far_forward/run_zdc.sh @@ -50,8 +50,8 @@ print_env.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 -## - JUGGLER_DETECTOR_VERSION: the detector package we want to use for this benchmark +## - DETECTOR: the detector package we want to use for this benchmark +## - DETECTOR_VERSION: the detector package we want to use for this benchmark ## - DETECTOR_PATH: full path to the detector definitions ## ## You can ready options/env.sh for more in-depth explanations of the variables @@ -74,7 +74,7 @@ if [[ ! -n "${ZDC_SCI_SAMP_FRAC}" ]] ; then export ZDC_PbSCI_SAMP_FRAC=1.0 fi -export DETECTOR_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml +export DETECTOR_COMPACT_PATH=${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml export JUGGLER_FILE_NAME_TAG="zdc_${PARTICLE}" export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc" @@ -86,7 +86,7 @@ export RESULTS_PATH="results/far_forward/zdc/${PARTICLE}" mkdir -p ${RESULTS_PATH} echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" -echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" +echo "DETECTOR = ${DETECTOR}" if [[ -z "${REC_ONLY}" && -z "${ANALYSIS_ONLY}" ]] ; then @@ -103,7 +103,7 @@ then --filter.tracker edep0 \ -v WARNING \ --numberOfEvents ${JUGGLER_N_EVENTS} \ - --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \ + --compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --outputFile ${JUGGLER_SIM_FILE} if [[ "$?" -ne "0" ]] ; then diff --git a/benchmarks/imaging_ecal/analysis/emcal_barrel_pion_rejection_analysis.cxx b/benchmarks/imaging_ecal/analysis/emcal_barrel_pion_rejection_analysis.cxx index af988b9b..584cb99d 100644 --- a/benchmarks/imaging_ecal/analysis/emcal_barrel_pion_rejection_analysis.cxx +++ b/benchmarks/imaging_ecal/analysis/emcal_barrel_pion_rejection_analysis.cxx @@ -95,8 +95,8 @@ void emcal_barrel_pion_rejection_analysis( if(std::getenv("DETECTOR_PATH")) { detector_path = std::getenv("DETECTOR_PATH"); } - if(std::getenv("JUGGLER_DETECTOR_CONFIG")) { - detector_name = std::getenv("JUGGLER_DETECTOR_CONFIG"); + if(std::getenv("DETECTOR_CONFIG")) { + detector_name = std::getenv("DETECTOR_CONFIG"); } // MCParticles Functions///////////////////////////////////////////////////////////////////////////////////// diff --git a/benchmarks/imaging_ecal/config.yml b/benchmarks/imaging_ecal/config.yml index 1688f2e6..02930ac5 100644 --- a/benchmarks/imaging_ecal/config.yml +++ b/benchmarks/imaging_ecal/config.yml @@ -45,7 +45,7 @@ imaging_ecal_pion_rejection:bench: - ls -lhtR - compile_analyses.py imaging_ecal - | - if [[ ${JUGGLER_DETECTOR} =~ athena - || ${JUGGLER_DETECTOR} =~ ecce && ${JUGGLER_DETECTOR_CONFIG} =~ imaging ]] ; then + if [[ ${DETECTOR} =~ athena + || ${DETECTOR} =~ ecce && ${DETECTOR_CONFIG} =~ imaging ]] ; then root -b -q benchmarks/imaging_ecal/analysis/emcal_barrel_pion_rejection_analysis.cxx+ fi diff --git a/benchmarks/imaging_ecal/options/hybrid_cluster.py b/benchmarks/imaging_ecal/options/hybrid_cluster.py index 731c33d3..9125f418 100644 --- a/benchmarks/imaging_ecal/options/hybrid_cluster.py +++ b/benchmarks/imaging_ecal/options/hybrid_cluster.py @@ -15,9 +15,9 @@ from Configurables import Jug__Reco__ImagingPixelReco as ImagingPixelReco from Configurables import Jug__Reco__ImagingTopoCluster as ImagingTopoCluster from Configurables import Jug__Reco__ImagingClusterReco as ImagingClusterReco -detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) -detector_config = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", detector_name)) -detector_version = str(os.environ.get("JUGGLER_DETECTOR_VERSION", "master")) +detector_name = str(os.environ.get("DETECTOR", "athena")) +detector_config = str(os.environ.get("DETECTOR_CONFIG", detector_name)) +detector_version = str(os.environ.get("DETECTOR_VERSION", "master")) detector_path = str(os.environ.get("DETECTOR_PATH", ".")) diff --git a/benchmarks/imaging_ecal/options/scfi_cluster.py b/benchmarks/imaging_ecal/options/scfi_cluster.py index 802cf6b4..8cd2259f 100644 --- a/benchmarks/imaging_ecal/options/scfi_cluster.py +++ b/benchmarks/imaging_ecal/options/scfi_cluster.py @@ -12,9 +12,9 @@ from Configurables import Jug__Reco__CalorimeterHitsMerger as CalHitsMerger from Configurables import Jug__Reco__CalorimeterIslandCluster as IslandCluster from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG -detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) -detector_config = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", detector_name)) -detector_version = str(os.environ.get("JUGGLER_DETECTOR_VERSION", "master")) +detector_name = str(os.environ.get("DETECTOR", "athena")) +detector_config = str(os.environ.get("DETECTOR_CONFIG", detector_name)) +detector_version = str(os.environ.get("DETECTOR_VERSION", "master")) detector_path = str(os.environ.get("DETECTOR_PATH", ".")) diff --git a/benchmarks/imaging_ecal/run_emcal_barrel.sh b/benchmarks/imaging_ecal/run_emcal_barrel.sh index c89bc7f4..11318440 100644 --- a/benchmarks/imaging_ecal/run_emcal_barrel.sh +++ b/benchmarks/imaging_ecal/run_emcal_barrel.sh @@ -47,7 +47,7 @@ do done set -- "${POSITIONAL[@]}" # restore positional parameters -export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml +export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml if [[ ! -n "${CB_EMCAL_NUMEV}" ]] ; then export CB_EMCAL_NUMEV=1000 @@ -127,8 +127,8 @@ for iev in "${ADDR[@]}"; do continue fi - if [[ ${JUGGLER_DETECTOR} =~ athena - || ${JUGGLER_DETECTOR} =~ ecce && ${JUGGLER_DETECTOR_CONFIG} =~ imaging ]] ; then + if [[ ${DETECTOR} =~ athena + || ${DETECTOR} =~ ecce && ${DETECTOR_CONFIG} =~ imaging ]] ; then python ${CB_EMCAL_SCRIPT_DIR}/draw_cluster_layers.py \ ${CB_EMCAL_REC_FILE} -e ${iev} --topo-size=1.0 --compact=${CB_EMCAL_COMPACT_PATH} -o results/${particle} if [[ "$?" -ne "0" ]] ; then diff --git a/benchmarks/imaging_ecal/run_emcal_barrel_pion_rej.sh b/benchmarks/imaging_ecal/run_emcal_barrel_pion_rej.sh index a4a9c7dc..96a7752a 100755 --- a/benchmarks/imaging_ecal/run_emcal_barrel_pion_rej.sh +++ b/benchmarks/imaging_ecal/run_emcal_barrel_pion_rej.sh @@ -47,7 +47,7 @@ do done set -- "${POSITIONAL[@]}" # restore positional parameters -export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml +export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml if [[ ! -n "${CB_EMCAL_NUMEV}" ]] ; then export CB_EMCAL_NUMEV=1000 @@ -128,8 +128,8 @@ for iev in "${ADDR[@]}"; do continue fi - if [[ ${JUGGLER_DETECTOR} =~ athena - || ${JUGGLER_DETECTOR} =~ ecce && ${JUGGLER_DETECTOR_CONFIG} =~ imaging ]] ; then + if [[ ${DETECTOR} =~ athena + || ${DETECTOR} =~ ecce && ${DETECTOR_CONFIG} =~ imaging ]] ; then python ${CB_EMCAL_SCRIPT_DIR}/draw_cluster_layers.py \ ${CB_EMCAL_REC_FILE} -e ${iev} --topo-size=1.0 --compact=${CB_EMCAL_COMPACT_PATH} -o results/${particle} if [[ "$?" -ne "0" ]] ; then diff --git a/benchmarks/imaging_ecal/run_imcal_pion0.sh b/benchmarks/imaging_ecal/run_imcal_pion0.sh index d4396e00..2c9ff8dd 100644 --- a/benchmarks/imaging_ecal/run_imcal_pion0.sh +++ b/benchmarks/imaging_ecal/run_imcal_pion0.sh @@ -47,7 +47,7 @@ do done set -- "${POSITIONAL[@]}" # restore positional parameters -export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml +export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml if [[ ! -n "${CB_EMCAL_NUMEV}" ]] ; then export CB_EMCAL_NUMEV=1000 diff --git a/benchmarks/imaging_shower_ML/config.yml b/benchmarks/imaging_shower_ML/config.yml index 458a6842..15730f2c 100644 --- a/benchmarks/imaging_shower_ML/config.yml +++ b/benchmarks/imaging_shower_ML/config.yml @@ -5,8 +5,8 @@ ml_shower:tagging_epimuphka_100: - pwd - ls -l - | - if [[ ${JUGGLER_DETECTOR} =~ athena - || ${JUGGLER_DETECTOR} =~ ecce && ${JUGGLER_DETECTOR_CONFIG} =~ imaging ]] ; then + if [[ ${DETECTOR} =~ athena + || ${DETECTOR} =~ ecce && ${DETECTOR_CONFIG} =~ imaging ]] ; then python3 benchmarks/imaging_shower_ML/sim_rec_tag.py -t imcal_epimuphka_100 -n 100 --particles "electron,pion-,muon,photon,kaon-" --pmin 0.5 --pmax 10 fi @@ -17,8 +17,8 @@ ml_shower:tagging_epimuphka: script: - ls -hal - | - if [[ ${JUGGLER_DETECTOR} =~ athena - || ${JUGGLER_DETECTOR} =~ ecce && ${JUGGLER_DETECTOR_CONFIG} =~ imaging ]] ; then + if [[ ${DETECTOR} =~ athena + || ${DETECTOR} =~ ecce && ${DETECTOR_CONFIG} =~ imaging ]] ; then python3 benchmarks/imaging_shower_ML/sim_rec_tag.py -t imcal_epimuphka -n 10000 --particles "electron,pion-,muon,photon,kaon-" --pmin 0.5 --pmax 10 fi @@ -28,8 +28,8 @@ ml_shower:tagging_e: stage: benchmarks1 script: - | - if [[ ${JUGGLER_DETECTOR} =~ athena - || ${JUGGLER_DETECTOR} =~ ecce && ${JUGGLER_DETECTOR_CONFIG} =~ imaging ]] ; then + if [[ ${DETECTOR} =~ athena + || ${DETECTOR} =~ ecce && ${DETECTOR_CONFIG} =~ imaging ]] ; then python3 benchmarks/imaging_shower_ML/sim_rec_tag.py -t imcal_e -n 100 --particles "electron" --pmin 0.5 --pmax 10 fi @@ -39,8 +39,8 @@ ml_shower:tagging_pi: stage: benchmarks1 script: - | - if [[ ${JUGGLER_DETECTOR} =~ athena - || ${JUGGLER_DETECTOR} =~ ecce && ${JUGGLER_DETECTOR_CONFIG} =~ imaging ]] ; then + if [[ ${DETECTOR} =~ athena + || ${DETECTOR} =~ ecce && ${DETECTOR_CONFIG} =~ imaging ]] ; then python3 benchmarks/imaging_shower_ML/sim_rec_tag.py -t imcal_pi -n 100 --particles "pion-" --pmin 0.5 --pmax 10 fi @@ -51,8 +51,8 @@ ml_shower:training_100: script: - python3 -m pip install tensorflow particle - | - if [[ ${JUGGLER_DETECTOR} =~ athena - || ${JUGGLER_DETECTOR} =~ ecce && ${JUGGLER_DETECTOR_CONFIG} =~ imaging ]] ; then + if [[ ${DETECTOR} =~ athena + || ${DETECTOR} =~ ecce && ${DETECTOR_CONFIG} =~ imaging ]] ; then python3 benchmarks/imaging_shower_ML/scripts/ml_training.py -t imcal_epimuphka_100 --pmin 0.5 --pmax 10 fi @@ -64,8 +64,8 @@ ml_shower:training: script: - python3 -m pip install tensorflow particle - | - if [[ ${JUGGLER_DETECTOR} =~ athena - || ${JUGGLER_DETECTOR} =~ ecce && ${JUGGLER_DETECTOR_CONFIG} =~ imaging ]] ; then + if [[ ${DETECTOR} =~ athena + || ${DETECTOR} =~ ecce && ${DETECTOR_CONFIG} =~ imaging ]] ; then python3 benchmarks/imaging_shower_ML/scripts/ml_training.py -t imcal_epimuphka --pmin 0.5 --pmax 10 fi diff --git a/benchmarks/imaging_shower_ML/sim_rec_tag.py b/benchmarks/imaging_shower_ML/sim_rec_tag.py index bc767fda..80234793 100755 --- a/benchmarks/imaging_shower_ML/sim_rec_tag.py +++ b/benchmarks/imaging_shower_ML/sim_rec_tag.py @@ -12,7 +12,7 @@ import argparse default_compact = os.path.join(os.environ.get('DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')), - '{}.xml'.format(os.environ.get('JUGGLER_DETECTOR_CONFIG', ''))) + '{}.xml'.format(os.environ.get('DETECTOR_CONFIG', ''))) parser = argparse.ArgumentParser() parser.add_argument('-n', '--numberOfEvents', dest='nev', type=int, default=100, help='Number of events to process.') parser.add_argument('-t', '--nametag', type=str, default='IMCAL_ML', help='Name tag for output files.') diff --git a/benchmarks/rich/forward_hadrons.sh b/benchmarks/rich/forward_hadrons.sh index f91d985c..edbda5e9 100644 --- a/benchmarks/rich/forward_hadrons.sh +++ b/benchmarks/rich/forward_hadrons.sh @@ -4,8 +4,8 @@ ## 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 -## - JUGGLER_DETECTOR_VERSION: the detector package we want to use for this benchmark +## - DETECTOR: the detector package we want to use for this benchmark +## - DETECTOR_VERSION: the detector package we want to use for this benchmark ## - DETECTOR_PATH: full path to the detector definitions ## ## You can ready options/env.sh for more in-depth explanations of the variables @@ -24,7 +24,7 @@ export JUGGLER_SIM_FILE="sim_${JUGGLER_FILE_NAME_TAG}.edm4hep.root" export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root" echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" -echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" +echo "DETECTOR = ${DETECTOR}" # generate the input events @@ -45,7 +45,7 @@ fi # This script appears to be missing ## run geant4 simulations #python benchmakrs/options/ForwardRICH/simu.py \ -# --compact=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \ +# --compact=${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \ # -i ${JUGGLER_FILE_NAME_TAG}.hepmc \ # -o ${JUGGLER_SIM_FILE} # -n ${JUGGLER_N_EVENTS} @@ -63,7 +63,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 ${JUGGLER_FILE_NAME_TAG}.hepmc \ --outputFile ${JUGGLER_SIM_FILE} if [[ "$?" -ne "0" ]] ; then @@ -79,11 +79,11 @@ if [[ "$?" -ne "0" ]] ; then fi # @TODO add analysis scripts -#root_filesize=$(stat --format=%s "${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}") +#root_filesize=$(stat --format=%s "${DETECTOR}/${JUGGLER_REC_FILE}") #if [[ "${JUGGLER_N_EVENTS}" -lt "500" ]] ; then # # file must be less than 10 MB to upload # if [[ "${root_filesize}" -lt "10000000" ]] ; then -# cp ${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE} results/. +# cp ${DETECTOR}/${JUGGLER_REC_FILE} results/. # fi #fi diff --git a/benchmarks/rich/options/rich_reco.py b/benchmarks/rich/options/rich_reco.py index 39a989e3..f3cbb495 100644 --- a/benchmarks/rich/options/rich_reco.py +++ b/benchmarks/rich/options/rich_reco.py @@ -4,8 +4,8 @@ from GaudiKernel import SystemOfUnits as units from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc detector_name = "topside" -if "JUGGLER_DETECTOR_CONFIG" in os.environ : - detector_name = str(os.environ["JUGGLER_DETECTOR_CONFIG"]) +if "DETECTOR_CONFIG" in os.environ : + detector_name = str(os.environ["DETECTOR_CONFIG"]) if "DETECTOR_PATH" in os.environ : detector_name = str(os.environ["DETECTOR_PATH"])+"/"+detector_name diff --git a/benchmarks/track_finding/multiple_tracks.sh b/benchmarks/track_finding/multiple_tracks.sh index e1ac8756..fc1c19c1 100644 --- a/benchmarks/track_finding/multiple_tracks.sh +++ b/benchmarks/track_finding/multiple_tracks.sh @@ -35,8 +35,8 @@ print_env.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 -## - JUGGLER_DETECTOR_VERSION: the detector package we want to use for this benchmark +## - DETECTOR: the detector package we want to use for this benchmark +## - DETECTOR_VERSION: the detector package we want to use for this benchmark ## - DETECTOR_PATH: full path to the detector definitions if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then @@ -52,7 +52,7 @@ export JUGGLER_SIM_FILE="sim_${JUGGLER_FILE_NAME_TAG}.edm4hep.root" export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root" echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" -echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" +echo "DETECTOR = ${DETECTOR}" ## generate the input events root -b -q "benchmarks/track_finding/scripts/gen_multiple_tracks.cxx+(${JUGGLER_N_EVENTS}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")" @@ -68,7 +68,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 ${JUGGLER_FILE_NAME_TAG}.hepmc \ --outputFile ${JUGGLER_SIM_FILE} if [[ "$?" -ne "0" ]] ; then diff --git a/benchmarks/track_finding/options/track_reconstruction.py b/benchmarks/track_finding/options/track_reconstruction.py index 40091d0e..5fa41b5b 100644 --- a/benchmarks/track_finding/options/track_reconstruction.py +++ b/benchmarks/track_finding/options/track_reconstruction.py @@ -4,16 +4,16 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc from GaudiKernel import SystemOfUnits as units detector_name = "topside" -if "JUGGLER_DETECTOR_CONFIG" in os.environ : - detector_name = str(os.environ["JUGGLER_DETECTOR_CONFIG"]) +if "DETECTOR_CONFIG" in os.environ : + detector_name = 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' diff --git a/benchmarks/track_fitting/options/track_reconstruction.py b/benchmarks/track_fitting/options/track_reconstruction.py index a0716fc4..c1f949eb 100644 --- a/benchmarks/track_fitting/options/track_reconstruction.py +++ b/benchmarks/track_fitting/options/track_reconstruction.py @@ -4,16 +4,16 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc from GaudiKernel import SystemOfUnits as units detector_name = "athena" -if "JUGGLER_DETECTOR_CONFIG" in os.environ : - detector_name = str(os.environ["JUGGLER_DETECTOR_CONFIG"]) +if "DETECTOR_CONFIG" in os.environ : + detector_name = 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' diff --git a/benchmarks/track_fitting/single_tracks.sh b/benchmarks/track_fitting/single_tracks.sh index 7d00f739..89b8f2cc 100644 --- a/benchmarks/track_fitting/single_tracks.sh +++ b/benchmarks/track_fitting/single_tracks.sh @@ -38,8 +38,8 @@ print_env.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 -## - JUGGLER_DETECTOR_VERSION: the detector package we want to use for this benchmark +## - DETECTOR: the detector package we want to use for this benchmark +## - DETECTOR_VERSION: the detector package we want to use for this benchmark ## - DETECTOR_PATH: full path to the detector definitions if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then @@ -55,7 +55,7 @@ export JUGGLER_SIM_FILE="sim_${JUGGLER_FILE_NAME_TAG}.edm4hep.root" export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root" echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" -echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" +echo "DETECTOR = ${DETECTOR}" ## generate the input events root -b -q "benchmarks/track_fitting/scripts/gen_single_tracks.cxx+(${JUGGLER_N_EVENTS}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")" @@ -71,7 +71,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 ${JUGGLER_FILE_NAME_TAG}.hepmc \ --outputFile ${JUGGLER_SIM_FILE} if [[ "$?" -ne "0" ]] ; then diff --git a/benchmarks/tracking/central_electrons.sh b/benchmarks/tracking/central_electrons.sh index ecb92768..d3c3cace 100644 --- a/benchmarks/tracking/central_electrons.sh +++ b/benchmarks/tracking/central_electrons.sh @@ -43,8 +43,8 @@ print_env.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 -## - JUGGLER_DETECTOR_VERSION: the detector package we want to use for this benchmark +## - DETECTOR: the detector package we want to use for this benchmark +## - DETECTOR_VERSION: the detector package we want to use for this benchmark ## - DETECTOR_PATH: full path to the detector definitions ## ## You can ready options/env.sh for more in-depth explanations of the variables @@ -64,7 +64,7 @@ export JUGGLER_SIM_FILE="sim_${JUGGLER_FILE_NAME_TAG}.edm4hep.root" export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root" echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" -echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" +echo "DETECTOR = ${DETECTOR}" if [[ -z "${REC_ONLY}" && -z "${ANALYSIS_ONLY}" ]] ; @@ -84,7 +84,7 @@ then --filter.tracker edep0 \ -v WARNING \ --numberOfEvents ${JUGGLER_N_EVENTS} \ - --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \ + --compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --outputFile ${JUGGLER_SIM_FILE} if [[ "$?" -ne "0" ]] ; then diff --git a/benchmarks/tracking/central_pions.sh b/benchmarks/tracking/central_pions.sh index f0d21710..587ec115 100644 --- a/benchmarks/tracking/central_pions.sh +++ b/benchmarks/tracking/central_pions.sh @@ -43,8 +43,8 @@ print_env.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 -## - JUGGLER_DETECTOR_VERSION: the detector package we want to use for this benchmark +## - DETECTOR: the detector package we want to use for this benchmark +## - DETECTOR_VERSION: the detector package we want to use for this benchmark ## - DETECTOR_PATH: full path to the detector definitions ## ## You can ready options/env.sh for more in-depth explanations of the variables @@ -63,7 +63,7 @@ export JUGGLER_SIM_FILE="sim_${JUGGLER_FILE_NAME_TAG}.edm4hep.root" export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root" echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" -echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" +echo "DETECTOR = ${DETECTOR}" if [[ -z "${REC_ONLY}" && -z "${ANALYSIS_ONLY}" ]] ; @@ -83,7 +83,7 @@ then --filter.tracker edep0 \ -v WARNING \ --numberOfEvents ${JUGGLER_N_EVENTS} \ - --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \ + --compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --outputFile ${JUGGLER_SIM_FILE} if [[ "$?" -ne "0" ]] ; then diff --git a/benchmarks/tracking/multiple_tracks.sh b/benchmarks/tracking/multiple_tracks.sh index 71735463..11500869 100644 --- a/benchmarks/tracking/multiple_tracks.sh +++ b/benchmarks/tracking/multiple_tracks.sh @@ -43,8 +43,8 @@ print_env.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 -## - JUGGLER_DETECTOR_VERSION: the detector package we want to use for this benchmark +## - DETECTOR: the detector package we want to use for this benchmark +## - DETECTOR_VERSION: the detector package we want to use for this benchmark ## - DETECTOR_PATH: full path to the detector definitions ## ## You can ready options/env.sh for more in-depth explanations of the variables @@ -64,7 +64,7 @@ export JUGGLER_SIM_FILE="sim_${JUGGLER_FILE_NAME_TAG}.edm4hep.root" export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root" echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}" -echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" +echo "DETECTOR = ${DETECTOR}" if [[ -z "${REC_ONLY}" && -z "${ANALYSIS_ONLY}" ]] ; @@ -84,7 +84,7 @@ then --filter.tracker edep0 \ -v WARNING \ --numberOfEvents ${JUGGLER_N_EVENTS} \ - --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \ + --compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --outputFile ${JUGGLER_SIM_FILE} if [[ "$?" -ne "0" ]] ; then diff --git a/benchmarks/tracking/options/track_reconstruction.py b/benchmarks/tracking/options/track_reconstruction.py index 63be8445..dbd72179 100644 --- a/benchmarks/tracking/options/track_reconstruction.py +++ b/benchmarks/tracking/options/track_reconstruction.py @@ -4,16 +4,16 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc from GaudiKernel import SystemOfUnits as units detector_name = "topside" -if "JUGGLER_DETECTOR_CONFIG" in os.environ : - detector_name = str(os.environ["JUGGLER_DETECTOR_CONFIG"]) +if "DETECTOR_CONFIG" in os.environ : + detector_name = 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' diff --git a/benchmarks/tracking/run_tracking_benchmarks.py b/benchmarks/tracking/run_tracking_benchmarks.py index 9deaec95..754338bb 100755 --- a/benchmarks/tracking/run_tracking_benchmarks.py +++ b/benchmarks/tracking/run_tracking_benchmarks.py @@ -12,8 +12,8 @@ import argparse default_compact = os.path.join( - os.environ.get('JUGGLER_DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')), - '{}.xml'.format(os.environ.get('JUGGLER_DETECTOR_CONFIG', ''))) + os.environ.get('DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')), + '{}.xml'.format(os.environ.get('DETECTOR_CONFIG', ''))) parser = argparse.ArgumentParser() parser.add_argument('-n', '--numberOfEvents', dest='nev', type=int, default=100, help='Number of events to process.') diff --git a/benchmarks/tracking/scripts/gen_central_electrons.cxx b/benchmarks/tracking/scripts/gen_central_electrons.cxx index 455c799d..b338f13b 100644 --- a/benchmarks/tracking/scripts/gen_central_electrons.cxx +++ b/benchmarks/tracking/scripts/gen_central_electrons.cxx @@ -19,8 +19,8 @@ using namespace HepMC3; void gen_central_electrons(int n_events = 100, const char* out_fname = "central_electrons.hepmc") { - double cos_theta_min = std::cos( 140.0*(M_PI/180.0)); - double cos_theta_max = std::cos(170.0*(M_PI/180.0)); + double cos_theta_min = std::cos( 45.0*(M_PI/180.0)); + double cos_theta_max = std::cos(135.0*(M_PI/180.0)); WriterAscii hepmc_output(out_fname); int events_parsed = 0; -- GitLab