Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-29 08:37:26

0001 #!/bin/bash
0002 #SBATCH --array=1-42
0003 
0004 ## SL: uncomment this line to test the script locally before submission.
0005 # SLURM_ARRAY_TASK_ID=5
0006 
0007 # Path to the EPIC install that provides setup_local.sh.
0008 setup_dir="parent_path_to_epic"
0009 matmap=""
0010 # matmap="-Pacts:MaterialMap=${setup_dir}/scripts/material_map/material-map.cbor" 
0011 tag="GoldCoating"
0012 
0013 nev=10000
0014 nskip=0
0015 mom=("0.5" "1" "2" "5" "10" "15")
0016 mom_index=$((($SLURM_ARRAY_TASK_ID-1) % 6))
0017 momentum="${mom[$mom_index]}"
0018 
0019 # Array of theta ranges as strings "min max"
0020 eta_ranges=("-3.5 -3.0" "-3.0 -2.5" "-2.5 -1" "-1 1"  "1 2.5" "2.5 3.0" "3.0 3.5")
0021 
0022 eta_index=$((($SLURM_ARRAY_TASK_ID-1) / 6 % 7))
0023 eta="${eta_ranges[$eta_index]}"
0024 eta_min="$(echo $eta | cut -d ' ' -f 1)"
0025 eta_max="$(echo $eta | cut -d ' ' -f 2)"
0026 
0027 echo "Running simulation with settings:"
0028 echo "Momentum: $momentum GeV"
0029 echo "Eta Range: $eta_min to $eta_max"
0030 echo "Setup dir: $setup_dir"
0031 echo "Material Map: ${matmap}"
0032 
0033 ## -----first time using the shifter image, do------
0034 shifter --image=eicweb/eic_xl:26.02.0-stable /opt/local/bin/eic-shell "\
0035   export eta_min=${eta_min} eta_max=${eta_max} mom=${momentum} matmap=\"${matmap}\"; \
0036   mkdir -p log; \
0037   run_sim_nohup.sh \
0038     ${setup_dir} ${tag} ${nev} ${nskip} ${matmap}"