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

Remove bin/get_calibrations

parent b18a05d3
No related branches found
No related tags found
1 merge request!243Remove bin/get_calibrations
......@@ -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:
......
......@@ -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)
......
......@@ -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'])
......
......@@ -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)
......
......@@ -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()
......
......@@ -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()
......
......@@ -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()
......
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment