1 |
jengbou |
1.1 |
#! /bin/tcsh
|
2 |
|
|
## need make_table0.py and make_table1.py
|
3 |
|
|
if ( ! `klist |& grep -c "afs@FNAL.GOV"`) then
|
4 |
|
|
echo "No afs! Initializing..."
|
5 |
|
|
kinit -A -f jengbou@FNAL.GOV
|
6 |
|
|
aklog -cell fnal.gov -k FNAL.GOV
|
7 |
|
|
else
|
8 |
|
|
echo "Starting job"
|
9 |
|
|
|
10 |
jengbou |
1.3 |
set lint = ("10.93pb-1")
|
11 |
|
|
set njets = ("Incl0" "Incl1" "Incl2" "Incl3" "Incl4" "Excl1" "Excl2" "Excl3")
|
12 |
jengbou |
1.2 |
set categories = ("Data_RelIsogt0p1ORD0gt0p02")
|
13 |
|
|
set selects = ("Sel0" "Sel5")
|
14 |
jengbou |
1.3 |
set jetcolls = ("Calo" "JPT")
|
15 |
jengbou |
1.1 |
|
16 |
jengbou |
1.3 |
set baseDir = "/Users/jengbou/Desktop/TopWork/Analysis/CMSSW_3_8_4/Results_${lint}"
|
17 |
jengbou |
1.1 |
|
18 |
jengbou |
1.2 |
foreach jetcol ($jetcolls)
|
19 |
jengbou |
1.1 |
|
20 |
jengbou |
1.3 |
set publishdir1 = "~/home/www/IKS/Results_${lint}_${jetcol}"
|
21 |
|
|
set publishdir2 = "~/home/www/IKS/Results_${lint}_${jetcol}_KSopt"
|
22 |
jengbou |
1.1 |
|
23 |
jengbou |
1.2 |
mkdir -p $publishdir1
|
24 |
|
|
mkdir -p $publishdir2
|
25 |
|
|
mkdir -p $baseDir
|
26 |
|
|
mkdir -p ${baseDir}_tmp
|
27 |
|
|
|
28 |
|
|
python make_table0.py ${baseDir}_tmp/ $categories > ! tmp0.log
|
29 |
|
|
foreach selec ($selects)
|
30 |
|
|
cat ${baseDir}_tmp/Summary_Results0.txt > $selec/index.html
|
31 |
|
|
cat ${baseDir}_tmp/Summary_Results0.txt > ${selec}_KSopt/index.html
|
32 |
|
|
set idx = 1
|
33 |
|
|
|
34 |
|
|
echo "Making table for ${selec}"
|
35 |
|
|
mkdir -p $publishdir1/$selec
|
36 |
|
|
mkdir -p $publishdir2/$selec
|
37 |
|
|
mkdir -p $selec
|
38 |
|
|
mkdir -p ${selec}_KSopt
|
39 |
|
|
|
40 |
|
|
foreach njet ($njets)
|
41 |
|
|
python make_table1.py ${baseDir}_${njet}/ ${selec}_${jetcol} ${njet} $categories > ! tmp1.log
|
42 |
|
|
cat ${baseDir}_${njet}/Summary_Results1.txt >> $selec/index.html
|
43 |
|
|
|
44 |
|
|
python make_table1.py ${baseDir}_${njet}_KSopt/ ${selec}_${jetcol} ${njet} $categories > ! tmp2.log
|
45 |
|
|
cat ${baseDir}_${njet}_KSopt/Summary_Results1.txt >> ${selec}_KSopt/index.html
|
46 |
|
|
|
47 |
|
|
@ idx++
|
48 |
|
|
|
49 |
|
|
end
|
50 |
|
|
echo "</table>" >> $selec/index.html
|
51 |
|
|
echo "</table>" >> ${selec}_KSopt/index.html
|
52 |
|
|
cp $selec/index.html $publishdir1/$selec/index.html
|
53 |
|
|
cp ${selec}_KSopt/index.html $publishdir2/$selec/index.html
|
54 |
jengbou |
1.1 |
end
|
55 |
jengbou |
1.2 |
rm -rf ${baseDir}_tmp
|
56 |
|
|
rm -f tmp*.log
|
57 |
jengbou |
1.1 |
end
|
58 |
|
|
|
59 |
|
|
endif
|