22 |
|
|
23 |
|
#cd /shome/peller/CMSSW_5_2_4_patch4/src/ |
24 |
|
# this doesnt work for me..? |
25 |
+ |
|
26 |
|
cd $CMSSW_BASE/src/ |
27 |
|
source /swshare/psit3/etc/profile.d/cms_ui_env.sh |
28 |
|
export SCRAM_ARCH="slc5_amd64_gcc462" |
29 |
|
source $VO_CMS_SW_DIR/cmsset_default.sh |
30 |
|
eval `scramv1 runtime -sh` |
31 |
< |
unset TMP |
32 |
< |
unset TMPDIR |
31 |
> |
export LD_PRELOAD="libglobus_gssapi_gsi_gcc64pthr.so.0":${LD_PRELOAD} |
32 |
> |
|
33 |
> |
mkdir $TMPDIR |
34 |
> |
|
35 |
> |
printenv |
36 |
|
|
37 |
|
#Path where the script write_regression_systematic.py and evaluateMVA.py are stored |
38 |
|
#execute=$PWD/UserCode/VHbb/python/ |
53 |
|
echo $pathAna |
54 |
|
configFile=config$energy |
55 |
|
|
56 |
+ |
storagesamples=`python << EOF |
57 |
+ |
import os |
58 |
+ |
from BetterConfigParser import BetterConfigParser |
59 |
+ |
config = BetterConfigParser() |
60 |
+ |
config.read('./pathConfig$energy') |
61 |
+ |
print config.get('Directories','samplepath') |
62 |
+ |
EOF` |
63 |
+ |
|
64 |
+ |
|
65 |
|
MVAList=`python << EOF |
66 |
|
import os |
67 |
|
from BetterConfigParser import BetterConfigParser |
86 |
|
mkdir $pathAna/env/sys/MVAout |
87 |
|
fi |
88 |
|
|
76 |
– |
#Create the link to th sample information in the new sudfolders. |
77 |
– |
#It always update the link. |
78 |
– |
ln -s -f $pathAna/env/samples.info $pathAna/env/sys/samples.info |
79 |
– |
ln -s -f $pathAna/env/samples.info $pathAna/env/sys/MVAout/samples.info |
80 |
– |
|
89 |
|
#Run the scripts |
90 |
|
|
91 |
|
if [ $task = "prep" ]; then |
92 |
< |
./prepare_environment_with_config.py -I $pathAna -O $pathAna/env/ -C ${energy}samples_nosplit.cfg |
92 |
> |
./prepare_environment_with_config.py -I $storagesamples -O $pathAna/env/ -C ${energy}samples_nosplit.cfg |
93 |
|
fi |
94 |
|
if [ $task = "sys" ]; then |
95 |
|
./write_regression_systematics.py -P $pathAna/env/ -S $sample -C $configFile -C pathConfig$energy |
96 |
|
fi |
97 |
|
if [ $task = "eval" ]; then |
98 |
< |
./evaluateMVA.py -P $pathAna/env/sys/ -D $MVAList -S $sample -U 0 -C ${configFile} -C pathConfig$energy |
98 |
> |
./evaluateMVA.py -D $MVAList -S $sample -U 0 -C ${configFile} -C pathConfig$energy |
99 |
|
fi |
100 |
|
if [ $task = "syseval" ]; then |
101 |
|
./write_regression_systematics.py -P $pathAna/env/ -S $sample -C $configFile -C pathConfig$energy |
102 |
< |
./evaluateMVA.py -P $pathAna/env/sys/ -D $MVAList -S $sample -U 0 -C ${configFile} -C pathConfig$energy |
102 |
> |
./evaluateMVA.py -D $MVAList -S $sample -U 0 -C ${configFile} -C pathConfig$energy |
103 |
|
fi |
104 |
|
if [ $task = "plot" ]; then |
105 |
|
./tree_stack.py -P $pathAna/env/sys/MVAout/ -C ${configFile} -C pathConfig$energy -R $sample |
107 |
|
if [ $task = "dc" ]; then |
108 |
|
./workspace_datacard.py -P $pathAna/env/sys/MVAout/ -C ${configFile} -C pathConfig$energy -V $sample |
109 |
|
fi |
110 |
+ |
|
111 |
+ |
rm -rf $TMPDIR |