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.19 by bortigno, Fri Jan 11 13:29:45 2013 UTC vs.
Revision 1.21 by peller, Wed Jan 16 16:22:47 2013 UTC

# Line 43 | Line 43 | printenv
43   cd -
44  
45   #Parsing the path form the config
46 < pathAna=`python << EOF
47 < import os
48 < from BetterConfigParser import BetterConfigParser
49 < config = BetterConfigParser()
50 < config.read('./pathConfig$energy')
51 < print config.get('Directories','samplepath')
52 < EOF`
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 <
46 > #pathAna=`python << EOF
47 > #import os
48 > #from BetterConfigParser import BetterConfigParser
49 > #config = BetterConfigParser()
50 > #config.read('./pathConfig$energy')
51 > #print config.get('Directories','samplepath')
52 > #EOF`
53 > #echo $pathAna
54 >
55 > #configFile=config$energy
56 >
57 > #storagesamples=`python << EOF
58 > #import os
59 > #from BetterConfigParser import BetterConfigParser
60 > #config = BetterConfigParser()
61 > #config.read('./pathConfig$energy')
62 > #print config.get('Directories','samplepath')
63 > #EOF`
64  
65   MVAList=`python << EOF
66   import os
67   from BetterConfigParser import BetterConfigParser
68   config = BetterConfigParser()
69 < config.read('./config$energy')
69 > config.read('./${energy}config/training')
70   print config.get('MVALists','List_for_submitscript')
71   EOF`
72 configFile=config$energy
72  
73 + pathAnaEnv=$pathAna/env
74 + pathAnaSys=$pathAnaEnv/sys
75 + pathAnaMVAout=$pathAnaSys/MVAout
76  
77   #Create subdirs where processed samples will be stored
78 < if [ ! -d $pathAna/env ]
79 <    then
80 <    mkdir $pathAna/env
81 < fi
82 < if [ ! -d $pathAna/env/sys ]
83 <    then
84 <    mkdir $pathAna/env/sys
85 < fi
86 < if [ ! -d $pathAna/env/sys/MVAout ]
87 <    then
88 <    mkdir $pathAna/env/sys/MVAout
89 < fi
78 > #if [ ! -d $pathAna/env ]
79 > #    then
80 > #    mkdir $pathAna/env
81 > #fi
82 > #if [ ! -d $pathAna/env/sys ]
83 > #    then
84 > #    mkdir $pathAna/env/sys
85 > #fi
86 > #if [ ! -d $pathAna/env/sys/MVAout ]
87 > #    then
88 > #    mkdir $pathAna/env/sys/MVAout
89 > #fi
90  
91   #Run the scripts
92  
93   if [ $task = "prep" ]; then
94 <    ./prepare_environment_with_config.py -I $storagesamples -O $pathAna/env/ -C ${energy}samples_nosplit.cfg
94 >    ./prepare_environment_with_config.py -C ${energy}config/samples_nosplit.cfg -C ${energy}config/paths
95   fi
96   if [ $task = "sys" ]; then
97 <    ./write_regression_systematics.py -P $pathAna/env/ -S $sample -C $configFile -C pathConfig$energy
97 >    ./write_regression_systematics.py -S $sample -C ${energy}config/general -C ${energy}config/paths
98   fi
99   if [ $task = "eval" ]; then
100 <    ./evaluateMVA.py -D $MVAList -S $sample -U 0 -C ${configFile} -C pathConfig$energy
100 >    ./evaluateMVA.py -D $MVAList -S $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/training
101   fi
102   if [ $task = "syseval" ]; then
103 <    ./write_regression_systematics.py -P $pathAna/env/ -S $sample -C $configFile -C pathConfig$energy
104 <    ./evaluateMVA.py -D $MVAList -S $sample -U 0 -C ${configFile} -C pathConfig$energy
103 >    ./write_regression_systematics.py -S $sample -C ${energy}config/general -C ${energy}config/paths
104 >    ./evaluateMVA.py -D $MVAList -S $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/training
105   fi
106   if [ $task = "plot" ]; then
107 <    ./tree_stack.py -P $pathAna/env/sys/MVAout/ -C ${configFile} -C pathConfig$energy -R $sample
107 >    ./tree_stack.py -R $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/plots
108   fi
109   if [ $task = "dc" ]; then
110 <    ./workspace_datacard.py -P $pathAna/env/sys/MVAout/ -C ${configFile} -C pathConfig$energy -V $sample
110 >    ./workspace_datacard.py -V $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/datacards
111   fi
112  
113   rm -rf $TMPDIR

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines