-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunSimBatchEne.sh
More file actions
61 lines (41 loc) · 1.36 KB
/
runSimBatchEne.sh
File metadata and controls
61 lines (41 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
EICSHELL=./eic-shell
CONDOR_DIR=condorSim
OUT_DIR=output
mkdir ${CONDOR_DIR}
mkdir "${CONDOR_DIR}/${OUT_DIR}"
## Pass commands to eic-shell
#${EICSHELL} <<EOF
# set energy values to simulate
ENERGY_TAB=(0.1 0.5 1.0 5.0 10.0)
#cd epic
#rm -rf build
#cmake -B build -S . -DCMAKE_INSTALL_PREFIX=install
#cmake --build build -j8 -- install
#cd ../
## Set environment
source /opt/detector/epic-main/bin/thisepic.sh
#source /opt/detector/setup.sh
#source epic/install/setup.sh
#export LOCAL_PREFIX=/gpfs02/eic/lkosarzew/Calorimetry/nHcalDev
#source ${LOCAL_PREFIX}/install/bin/thisepic.sh
#source ${LOCAL_PREFIX}/epic/install/setup.sh
#export DETECTOR_PATH=/gpfs02/eic/lkosarzew/Calorimetry/nHcalDev/epic/install/share/epic
## Export detector libraries
#export LD_LIBRARY_PATH=${LOCAL_PREFIX}/epic/install/lib:$LD_LIBRARY_PATH
## Set geometry and events to simulate
DETECTOR_CONFIG=epic_calorimeters
N_EVENTS=10
for ene in "${ENERGY_TAB[@]}"
do
# Set seed based on date
SEED=$(date +%N)
#echo $SEED
OPTIONS="--compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml --numberOfEvents ${N_EVENTS} --random.seed ${SEED} --enableGun \
--gun.particle proton --gun.thetaMin 170*degree --gun.thetaMax 180*degree --gun.distribution uniform \
--gun.energy ${ene}*GeV --outputFile ${CONDOR_DIR}/${OUT_DIR}/output_E${ene}GeV_${1}"
echo $OPTIONS
npsim $OPTIONS
done
exit
#EOF