ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/runAll.sh
(Generate patch)

Comparing UserCode/VHbb/python/runAll.sh (file contents):
Revision 1.2 by nmohr, Thu Aug 9 13:03:29 2012 UTC vs.
Revision 1.8 by peller, Thu Sep 27 07:34:24 2012 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines