6 |
|
#sqrt(s) you want to run |
7 |
|
energy=$2 |
8 |
|
|
9 |
< |
if [ $# -lt 2 ] |
9 |
> |
task=$3 |
10 |
> |
|
11 |
> |
if [ $# -lt 3 ] |
12 |
|
then |
13 |
< |
echo "ERROR: You passed " $# "arguments while the script needs at least 2 arguments." |
13 |
> |
echo "ERROR: You passed " $# "arguments while the script needs at least 3 arguments." |
14 |
|
echo "Exiting..." |
15 |
|
echo " ---------------------------------- " |
16 |
< |
echo " Usage : ./runAll.sh sample energy" |
16 |
> |
echo " Usage : ./runAll.sh sample energy task" |
17 |
|
echo " ---------------------------------- " |
18 |
|
exit |
19 |
|
fi |
49 |
|
echo $pathAna |
50 |
|
configFile=config$energy |
51 |
|
|
52 |
+ |
MVAList=`python << EOF |
53 |
+ |
import os |
54 |
+ |
from BetterConfigParser import BetterConfigParser |
55 |
+ |
config = BetterConfigParser() |
56 |
+ |
config.read('./config$energy') |
57 |
+ |
print config.get('MVALists','List_for_submitscript') |
58 |
+ |
EOF` |
59 |
+ |
configFile=config$energy |
60 |
+ |
|
61 |
+ |
|
62 |
|
#Create subdirs where processed samples will be stored |
63 |
+ |
if [ ! -d $pathAna/env ] |
64 |
+ |
then |
65 |
+ |
mkdir $pathAna/env |
66 |
+ |
fi |
67 |
|
if [ ! -d $pathAna/env/sys ] |
68 |
|
then |
69 |
|
mkdir $pathAna/env/sys |
84 |
|
fi |
85 |
|
|
86 |
|
#Run the scripts |
87 |
< |
#./step1_prepare_trees.sh |
88 |
< |
#./write_regression_systematics.py -P $pathAna/env/ -S $sample -C $configFile -C pathConfig$energy |
89 |
< |
./evaluateMVA.py -P $pathAna/env/sys/ -D RTight_ZH110_may,RTight_ZH115_may,RTight_ZH120_may,RTight_ZH125_may,RTight_ZH130_may,RTight_ZH135_may,RMed_ZH110_may,RMed_ZH115_may,RMed_ZH120_may,RMed_ZH125_may,RMed_ZH130_may,RMed_ZH135_may,RPt50_ZZ_may,RIncl_ZZ_may -S $sample -U 0 -C ${configFile} -C pathConfig$energy |
90 |
< |
#./showinfo.py $pathAna/env/sys |
91 |
< |
#./evaluateMVA.py -P $pathAna/env/sys/ -D RTight_ZH110_may,RTight_ZH115_may,RTight_ZH120_may,RTight_ZH125_may,RTight_ZH130_may,RTight_ZH135_may,RMed_ZH110_may,RMed_ZH115_may,RMed_ZH120_may,RMed_ZH125_may,RMed_ZH130_may,RMed_ZH135_may -S $sample -U 0 -C ${configFile} -C pathConfig$energy |
87 |
> |
|
88 |
> |
if [ $task = "prep" ]; then |
89 |
> |
./prepare_environment_with_config.py -I $pathAna -O $pathAna/env/ -C ${energy}samples_nosplit.cfg |
90 |
> |
fi |
91 |
> |
if [ $task = "sys" ]; then |
92 |
> |
./write_regression_systematics.py -P $pathAna/env/ -S $sample -C $configFile -C pathConfig$energy |
93 |
> |
fi |
94 |
> |
if [ $task = "eval" ]; then |
95 |
> |
./evaluateMVA.py -P $pathAna/env/sys/ -D $MVAList -S $sample -U 0 -C ${configFile} -C pathConfig$energy |
96 |
> |
fi |
97 |
> |
if [ $task = "plot" ]; then |
98 |
> |
./tree_stack.py -P $pathAna/env/sys/MVAout/ -C ${configFile} -C pathConfig$energy -V $sample |
99 |
> |
fi |
100 |
> |
if [ $task = "dc" ]; then |
101 |
> |
./workspace_datacard.py -P $pathAna/env/sys/MVAout/ -C ${configFile} -C pathConfig$energy -V $sample |
102 |
> |
fi |