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.6 by bortigno, Thu Sep 20 08:52:54 2012 UTC vs.
Revision 1.24 by peller, Wed Feb 13 10:06:17 2013 UTC

# Line 6 | Line 6 | sample=$1
6   #sqrt(s) you want to run
7   energy=$2
8  
9 + task=$3
10 +
11 + if [ $# -lt 3 ]
12 +    then
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 task"
17 +    echo " ---------------------------------- "
18 +    exit
19 + fi
20 +
21   #Set the environment for the batch job execution
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
33 <
34 < #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
31 > #export LD_PRELOAD="libglobus_gssapi_gsi_gcc64pthr.so.0":${LD_PRELOAD}
32 > export LD_LIBRARY_PATH=/swshare/glite/globus/lib/:/swshare/glite/d-cache/dcap/lib64/:$LD_LIBRARY_PATH
33 > export LD_PRELOAD="libglobus_gssapi_gsi_gcc64pthr.so.0:${LD_PRELOAD}"
34 > mkdir $TMPDIR
35  
36   #back to the working dir
37 < #cd -
37 > cd -
38  
39 < #Parsing the path form the config
27 < pathAna=`python << EOF
39 > MVAList=`python << EOF
40   import os
41 < from BetterConfigParser import BetterConfigParser
41 > from myutils import BetterConfigParser
42   config = BetterConfigParser()
43 < config.read('./pathConfig$energy')
44 < print config.get('Directories','samplepath')
43 > config.read('./${energy}config/training')
44 > print config.get('MVALists','List_for_submitscript')
45   EOF`
34 echo $pathAna
35 configFile=config$energy
46  
47 < #Create subdirs where processed samples will be stored
48 < if [ ! -d $pathAna/env/sys ]
49 <    then
50 <    mkdir $pathAna/env/sys
47 > #Run the scripts
48 >
49 > if [ $task = "prep" ]; then
50 >    ./prepare_environment_with_config.py -C ${energy}config/samples_nosplit.cfg -C ${energy}config/paths
51   fi
52 < if [ ! -d $pathAna/env/sys ]
53 <    then
44 <    mkdir $pathAna/env/sys/MVAout
52 > if [ $task = "sys" ]; then
53 >    ./write_regression_systematics.py -S $sample -C ${energy}config/general -C ${energy}config/paths
54   fi
55 <
56 < #Create the link to th sample information in the new sudfolders
48 < if [ ! -f $pathAna/env/sys/samples.info ]
49 <    then
50 <    ln -s $pathAna/env/samples.info  $pathAna/env/sys/samples.info
55 > if [ $task = "eval" ]; then
56 >    ./evaluateMVA.py -D $MVAList -S $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/training
57   fi
58 < if [ ! -f $pathAna/sys/MVAout/samples.info ]
59 <    then
60 <    ln -s $pathAna/env/samples.info $pathAna/env/sys/MVAout/samples.info
58 > if [ $task = "syseval" ]; then
59 >    ./write_regression_systematics.py -S $sample -C ${energy}config/general -C ${energy}config/paths
60 >    ./evaluateMVA.py -D $MVAList -S $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/training
61 > fi
62 > if [ $task = "train" ]; then
63 >    ./train.py -T $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/training
64 > fi
65 > if [ $task = "plot" ]; then
66 >    ./tree_stack.py -R $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/plots
67 > fi
68 > if [ $task = "dc" ]; then
69 >    ./workspace_datacard.py -V $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/datacards
70   fi
71  
72 < #Run the scripts
58 < ./write_regression_systematics.py -P $pathAna/env/ -S $sample -C $configFile -C pathConfig$energy
59 < ./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
60 < #./showinfo.py $pathAna/env/sys
72 > rm -rf $TMPDIR

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines