1 |
bortigno |
1.5 |
#!/bin/bash
|
2 |
|
|
|
3 |
|
|
#Input argument:
|
4 |
|
|
#sample you want to run on. It has to match the naming in sample.info.
|
5 |
nmohr |
1.1 |
sample=$1
|
6 |
bortigno |
1.5 |
#sqrt(s) you want to run
|
7 |
nmohr |
1.4 |
energy=$2
|
8 |
bortigno |
1.5 |
|
9 |
|
|
#Set the environment for the batch job execution
|
10 |
nmohr |
1.4 |
cd $CMSSW_BASE/src/
|
11 |
nmohr |
1.1 |
source /swshare/psit3/etc/profile.d/cms_ui_env.sh
|
12 |
|
|
export SCRAM_ARCH="slc5_amd64_gcc462"
|
13 |
|
|
source $VO_CMS_SW_DIR/cmsset_default.sh
|
14 |
|
|
eval `scramv1 runtime -sh`
|
15 |
|
|
unset TMP
|
16 |
|
|
unset TMPDIR
|
17 |
bortigno |
1.5 |
|
18 |
|
|
#Path where the script write_regression_systematic.py and evaluateMVA.py are stored
|
19 |
|
|
#execute=$PWD/UserCode/VHbb/python/
|
20 |
|
|
#execute=/shome/bortigno/VHbbAnalysis/VHbbTest/python
|
21 |
|
|
#cd $execute
|
22 |
|
|
|
23 |
|
|
#back to the working dir
|
24 |
|
|
cd -
|
25 |
|
|
|
26 |
|
|
#Parsing the path form the config
|
27 |
nmohr |
1.4 |
pathAna=`python << EOF
|
28 |
|
|
import os
|
29 |
|
|
from BetterConfigParser import BetterConfigParser
|
30 |
|
|
config = BetterConfigParser()
|
31 |
|
|
config.read('./pathConfig$energy')
|
32 |
|
|
print config.get('Directories','samplepath')
|
33 |
|
|
EOF`
|
34 |
|
|
echo $pathAna
|
35 |
|
|
configFile=config$energy
|
36 |
bortigno |
1.5 |
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
#Create subdirs where processed samples will be stored
|
40 |
|
|
if [ ! -d $pathAna/env/sys ]
|
41 |
|
|
then
|
42 |
|
|
mkdir $pathAna/env/sys
|
43 |
|
|
fi
|
44 |
|
|
if [ ! -d $pathAna/env/sys ]
|
45 |
|
|
then
|
46 |
|
|
mkdir $pathAna/env/sys/MVAout
|
47 |
|
|
fi
|
48 |
|
|
|
49 |
|
|
#Create the link to th sample information in the new sudfolders
|
50 |
|
|
if [ ! -f $pathAna/env/sys/samples.info ]
|
51 |
|
|
then
|
52 |
|
|
ln -s $pathAna/env/samples.info $pathAna/env/sys/samples.info
|
53 |
|
|
fi
|
54 |
|
|
if [ ! -f $pathAna/sys/MVAout/samples.info ]
|
55 |
|
|
then
|
56 |
|
|
ln -s $pathAna/env/samples.info $pathAna/env/sys/MVAout/samples.info
|
57 |
|
|
fi
|
58 |
|
|
|
59 |
|
|
#Run the scripts
|
60 |
nmohr |
1.4 |
./write_regression_systematics.py -P $pathAna/env/ -S $sample -C $configFile -C pathConfig$energy
|
61 |
|
|
./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
|
62 |
|
|
#./showinfo.py $pathAna/env/sys
|