diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 956e7ddfc08701b43031229535276ede0c29d86f..5c314382ec1f7e2b339371ea6bd750c43dcc4452 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,7 +69,6 @@ common:detector: - ln -s "${LOCAL_DATA_PATH}/sim_output" sim_output - ln -s "${LOCAL_DATA_PATH}/datasets/data" data - ls -lrtha - - bash bin/get_calibrations retry: max: 2 when: diff --git a/benchmarks/clustering/options/full_cal_reco.py b/benchmarks/clustering/options/full_cal_reco.py index 1f7834536b34fec435f4ad6825c56a7b8af2cb43..fcf9ed628a8f0dffa53625930e51209053700049 100644 --- a/benchmarks/clustering/options/full_cal_reco.py +++ b/benchmarks/clustering/options/full_cal_reco.py @@ -14,7 +14,7 @@ detector_path = str(os.environ.get("DETECTOR_PATH", ".")) compact_path = os.path.join(detector_path, detector_name) # input arguments from calibration file -with open('config/emcal_barrel_calibration.json') as f: +with open(f'{detector_path}/calibrations/emcal_barrel_calibration.json') as f: calib_data = json.load(f)['electron'] print(calib_data) diff --git a/benchmarks/ecal/options/barrel.py b/benchmarks/ecal/options/barrel.py index 88fcea482956bf5dbd20457fbd90807a8e004dbd..f4bfd902d218f08950ca2849051a34ef9f0f7cf9 100644 --- a/benchmarks/ecal/options/barrel.py +++ b/benchmarks/ecal/options/barrel.py @@ -19,7 +19,7 @@ output_rec = str(os.environ["JUGGLER_REC_FILE"]) n_events = int(os.environ["JUGGLER_N_EVENTS"]) # input arguments from calibration file -with open('config/emcal_barrel_calibration.json') as f: +with open(f'{detector_path}/calibrations/emcal_barrel_calibration.json') as f: calib_data = json.load(f)['electron'] cb_ecal_sf = float(calib_data['sampling_fraction_img']) diff --git a/benchmarks/imaging_ecal/options/hybrid_cluster.py b/benchmarks/imaging_ecal/options/hybrid_cluster.py index 1e6405c8c7e58538a930b5b2fc245e7a4f155d47..1d62058e5ccc678c0a74b35882f8bdbe590cf716 100644 --- a/benchmarks/imaging_ecal/options/hybrid_cluster.py +++ b/benchmarks/imaging_ecal/options/hybrid_cluster.py @@ -15,8 +15,10 @@ 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_path = str(os.environ.get("DETECTOR_PATH", ".")) + # input arguments from calibration file -with open('config/emcal_barrel_calibration.json') as f: +with open(f'{detector_path}/calibrations/emcal_barrel_calibration.json') as f: calib_data = json.load(f)['electron'] #print(calib_data) diff --git a/benchmarks/imaging_ecal/options/imaging_2dcluster.py b/benchmarks/imaging_ecal/options/imaging_2dcluster.py index 70b66255a05c39414c0d256c26c6c0591c56130a..d7dd39bb3242ff3e931b0289c40360464d9d86ae 100644 --- a/benchmarks/imaging_ecal/options/imaging_2dcluster.py +++ b/benchmarks/imaging_ecal/options/imaging_2dcluster.py @@ -12,8 +12,10 @@ from Configurables import Jug__Reco__CalorimeterHitsEtaPhiProjector as CalHitsPr from Configurables import Jug__Reco__CalorimeterIslandCluster as IslandCluster from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG +detector_path = str(os.environ.get("DETECTOR_PATH", ".")) + # input arguments from calibration file -with open('config/emcal_barrel_calibration.json') as f: +with open(f'{detector_path}/calibrations/emcal_barrel_calibration.json') as f: calib_data = json.load(f)['electron'] kwargs = dict() diff --git a/benchmarks/imaging_ecal/options/imaging_topocluster.py b/benchmarks/imaging_ecal/options/imaging_topocluster.py index 414e65d2c83fafb33637b55983c86eca92779587..9117d9b34a8b701d0720a36f3e1409769918fc15 100644 --- a/benchmarks/imaging_ecal/options/imaging_topocluster.py +++ b/benchmarks/imaging_ecal/options/imaging_topocluster.py @@ -12,9 +12,10 @@ 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_path = str(os.environ.get("DETECTOR_PATH", ".")) # input arguments from calibration file -with open('config/emcal_barrel_calibration.json') as f: +with open(f'{detector_path}/calibrations/emcal_barrel_calibration.json') as f: calib_data = json.load(f)['electron'] kwargs = dict() diff --git a/benchmarks/imaging_ecal/options/scfi_cluster.py b/benchmarks/imaging_ecal/options/scfi_cluster.py index b7f52ac80ce2e55c92adbd589f47e90cd989c107..f356da04a105e4d92733c35a479b2e6179dc570f 100644 --- a/benchmarks/imaging_ecal/options/scfi_cluster.py +++ b/benchmarks/imaging_ecal/options/scfi_cluster.py @@ -12,8 +12,10 @@ 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_path = str(os.environ.get("DETECTOR_PATH", ".")) + # input arguments from calibration file -with open('config/emcal_barrel_calibration.json') as f: +with open(f'{detector_path}/calibrations/emcal_barrel_calibration.json') as f: calib_data = json.load(f)['electron'] kwargs = dict() diff --git a/bin/get_calibrations b/bin/get_calibrations deleted file mode 100755 index e23d619444ca84fb445a8696586a88e13e61d0c4..0000000000000000000000000000000000000000 --- a/bin/get_calibrations +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -branch=${1:-master} -detector_benchmarks=https://eicweb.phy.anl.gov/EIC/benchmarks/detector_benchmarks/-/jobs/artifacts/${branch}/raw/ - -mkdir -p config -for i in results/emcal_barrel_calibration.json results/material-maps.json ; do - curl --fail -sL ${detector_benchmarks}/${i}?job=deploy_results --output config/$(basename ${i}) - if [[ "$?" -ne "0" ]] ; then - if find ${DETECTOR_PATH} -name $(basename $i) ; then - echo "Warning: falling back to DETECTOR_PATH for calibration ${i}." - cp $(find ${DETECTOR_PATH} -name $(basename $i)) config/$(basename ${i}) - else - echo "Error: could not retrieve calibrations!" - exit 1 - fi - fi -done