-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproduce_plots.sh
executable file
·44 lines (35 loc) · 1.8 KB
/
produce_plots.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
#!/bin/bash
# execute as ./produce_plots.sh <Run> <Luminosity>
args=("$@")
if [ $# -lt 2 ] ; then
echo "Please provide 'Run Era' and 'Recorded Luminosity': "
fi
if [ $# -eq 2 ] ; then
run_era=${args[0]}
luminosity=${args[1]}
fi
mc="/eos/uscms/store/group/lpcjme/L1Offset/UltraLegacy17_scalefactors/jetSort/Total_MC_UL2017${run_era}_R4.root"
data="/eos/uscms/store/group/lpcjme/L1Offset/UltraLegacy17_scalefactors/jetSort/Total_Data_UL2017${run_era}_R4.root"
outname="UL17${run_era}_DataMC_R4_"
n1=10
n2=52
topX=52
topY=52
var="nPU"
ratio="true"
label="Run 2017${run_era} - ${luminosity} fb^{-1} (13 TeV)"
cmds=( "root -l -b -q 'plot_histos.c (\"$mc\", \"$data\", \"$outname\", \"$label\")'"
"root -l -b -q 'plot_profile.c (\"$mc\", \"$data\", \"$outname\", $n1, $n2, $topX, $topY, \"$label\")'"
"root -l -b -q 'offsetpT_stack.c (\"$mc\", \"$data\", \"$outname\", \"$var\", "all", $ratio, \"$label\")'"
"root -l -b -q 'offsetpT_stack.c (\"$mc\", \"$data\", \"$outname\", \"$var\", "ne", $ratio, \"$label\")'"
"root -l -b -q 'offsetpT_stack.c (\"$mc\", \"$data\", \"$outname\", \"$var\", "hfe", $ratio, \"$label\")'"
"root -l -b -q 'offsetpT_stack.c (\"$mc\", \"$data\", \"$outname\", \"$var\", "nh", $ratio, \"$label\")'"
"root -l -b -q 'offsetpT_stack.c (\"$mc\", \"$data\", \"$outname\", \"$var\", "hfh", $ratio, \"$label\")'"
"root -l -b -q 'offsetpT_stack.c (\"$mc\", \"$data\", \"$outname\", \"$var\", "chu", $ratio, \"$label\")'"
"root -l -b -q 'offsetpT_stack.c (\"$mc\", \"$data\", \"$outname\", \"$var\", "chm", $ratio, \"$label\")'"
"root -l -b -q 'offsetpT_stack.c (\"$mc\", \"$data\", \"$outname\", \"$var\", "untrk", $ratio, \"$label\")'"
)
for cmd in "${cmds[@]}"
do
eval $cmd
done