-
Notifications
You must be signed in to change notification settings - Fork 0
/
CTA.mainRunScriptsReduced.sh
executable file
·71 lines (61 loc) · 2.07 KB
/
CTA.mainRunScriptsReduced.sh
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
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
#
# wrapper analysis script to run
# different multiplicity cut dependent
# steps
#
if [ $# -lt 2 ]; then
echo "
./CTA.mainRunScripts.sh <data set> <run mode>
data sets:
Prod3b analysis:
prod3b-S20deg-SCTAlpha
Prod5 analysis:
prod5-South-20deg prod5-South-40deg prod5-South-60deg
prod5-South-20deg-moon prod5-South-40deg-moon prod5-South-60deg-moon
prod5b-North-20deg prod5b-North-40deg prod5b-North-60deg
prod5b-North-20deg-moon prod5b-North-40deg-moon prod5b-North-60deg-moon
Prod6 analysis:
prod6-North-20deg prod6-North-40deg prod6-North-52deg prod6-North-60deg
prod6-North-20deg-moon prod6-North-40deg-moon prod6-North-52deg-moon prod6-North-60deg-moon
prod6-South-20deg
run modes:
MAKETABLES DISPBDT ANATABLES PREPARETMVA TRAIN ANGRES QC CUTS PHYS
"
exit
fi
# site
P2="$1"
# run mode
RUN="$2"
SITE="South"
if [[ $P2 == *"North"* ]]; then
SITE="North"
fi
RECID="0"
# run scripts are collected here
RUNSCRIPTDIR="${CTA_USER_LOG_DIR}/jobs/$(uuidgen)"
mkdir -p ${RUNSCRIPTDIR}
if [[ ${RUN} == "MAKETABLES" ]] || [[ ${RUN} == "DISPBDT" ]] || [[ ${RUN} == "ANATABLES" ]] || [[ ${RUN} == "PREPARETMVA" ]]; then
./CTA.runAnalysis.sh ${P2} ${RUN} ${RECID} 2 2 2 2 ${RUNSCRIPTDIR}
if [[ $SITE == "South" ]] || [[ $P2 == *"prod6"* ]]; then
./CTA.runAnalysis.sh ${P2}-sub ${RUN} ${RECID} 2 2 2 2 ${RUNSCRIPTDIR}
elif [[ $SITE == *"North"* ]]; then
./CTA.runAnalysis.sh ${P2}-LST ${RUN} ${RECID} 2 2 2 2 ${RUNSCRIPTDIR}
fi
else
while IFS= read -r mult
do
./CTA.runAnalysis.sh ${P2} ${RUN} ${RECID} $mult ${RUNSCRIPTDIR}
done < NIM-${SITE}.dat
if [[ $SITE == "South" ]]; then
while IFS= read -r mult
do
./CTA.runAnalysis.sh ${P2}-sub ${RUN} ${RECID} $mult ${RUNSCRIPTDIR}
done < NIM-${SITE}-sub.dat
elif [[ $SITE == "North" ]]; then
./CTA.runAnalysis.sh ${P2}-LST ${RUN} ${RECID} 2 2 2 2 ${RUNSCRIPTDIR}
fi
fi
echo "#####"
echo "RUNSCRIPTDIR: ${RUNSCRIPTDIR}/${RUN}"