]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/SPECTRA/LambdaK0PbPb/run.sh
Updated values of sigmas for truncated mean approach (L. Milano). Updated responses...
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / LambdaK0PbPb / run.sh
CommitLineData
e886738f 1#!/bin/bash
2
3run=137161
4pass=pass1_5plus
5mc=0
6mode="full"
7nev=1234566789
8workers=26
9ROPT=""
10listfile=""
11offset=0
12debug=kTRUE
13option="SAVE" #FIXME:set option
14suffix=""
39eb6410 15fitFolder="LHC10h_000137161_p1_5plus"
16fitBin="00"
17partID=1
18task=no
19fit=no
20
e886738f 21
22give_help() {
23
24cat <<ENDOFGUIDE
25This scripts runs the the physics selection and centrality on a specified run/dataset
26
27Available options:
39eb6410 28 * Run the task *
e886738f 29 -r <mode> Run the task
30 Modes (compulsory):
31 0 local
32 1 caf
33 2 grid
34 -d <run or dataset> Run number(s) (grid) or dataset (caf) or file name (local)
35 Local filename can be an xml collection of files on alies,
36 a single esd, or a text file with an ESD filename per line
37 -m Set if runnning on MC
38 -t <rootopt> Options passed to root
39 -l <list.txt> Process sequentially all runs/dataset listed in the file
40 (one entry per line). If you use this option you don't
41 need the -d. in the case you are running on CAF, they
42 must have the same path
39eb6410 43 -x <suffix> Add extra suffix to files
e886738f 44 Grid only options
45 -g <gridmode> Plugin Mode [default=$mode]
46 -p <recopass> Reconstruction pass [default=$pass]
47 CAF only options
48 -p <path> Data set path
49 -n <nev> Number of events
50 -w <workers> Number of workers [default=$workers]
39eb6410 51
52 * Fit the results *
53 -f <folder> Run the fitting macro in the subfolder of ./output
54 -b <bin> Centrality bin index [default=$fitBin]
55 -p <particleID> Fit particle defined by particleID [default=$partID]
56 0=K0
57 1=Lambda
58 2=Anti-Lambda
59 3=Lambda + Anti-Lambda,
60 4=Csi
61 6=Omega
62 -x <suffix> Add extra suffix to files
e886738f 63ENDOFGUIDE
64
65}
66
39eb6410 67while getopts "r:hd:mg:p:n:w:t:l:f:b:x:" opt; do
e886738f 68 case $opt in
69 r)
70 runMode=$OPTARG
39eb6410 71 task=yes
72 ;;
73 f)
74 fitFolder=$OPTARG
75 fit=yes
76 ;;
77 b)
78 fitBin=`printf %2.2d $OPTARG`
e886738f 79 ;;
80 d)
81 run=$OPTARG
82 ;;
83 l)
84 listfile=$OPTARG
85 ;;
86 t)
87 ROPT=$OPTARG
88 ;;
89 n)
90 nev=$OPTARG
91 ;;
92 w)
93 workers=$OPTARG
94 ;;
95 m)
96 mc=kTRUE
97 ;;
98 g)
99 mode=$OPTARG
100 ;;
101 p)
102 pass=$OPTARG
39eb6410 103 partID=$OPTARG
104 ;;
105 x)
106 suffix=$OPTARG
e886738f 107 ;;
108 h)
109 give_help
110 exit 1
111 ;;
112 \?)
113 echo "Invalid option: -$OPTARG" >&2
114 give_help
115 exit 1
116 ;;
117 :)
118 echo "Option -$OPTARG requires an argument." >&2
119 give_help
120 exit 1
121 ;;
122 esac
123done
124
125
39eb6410 126if [ "$task" = "yes" ]
e886738f 127 then
39eb6410 128 runlist=$run
129 if [ "$listfile" != "" ]
130 then
131 runlist=""
132 while read line
133 do
134 runlist="$runlist $line"
135 done < $listfile
136 fi
e886738f 137
39eb6410 138 echo "Run list: $runlist"
139
e886738f 140
39eb6410 141 if [ "$runMode" = "2" ]
142 then
e886738f 143 echo root $ROPT run.C\(\"$run\",\"$pass\",$nev,$offset,$debug,$runMode,$mc,$option,$suffix,$workers,\"$mode\"\)
144 root $ROPT run.C\(\"$run\",\"$pass\",$nev,$offset,$debug,$runMode,$mc,\"$option\",\"$suffix\",$workers,\"$mode\"\)
39eb6410 145 else
146 for run in $runlist
147 do
148 echo root $ROPT run.C\(\"$run\",\"$pass\",$nev,$offset,$debug,$runMode,$mc,$option,$suffix,$workers,\"$mode\"\)
149 root $ROPT run.C\(\"$run\",\"$pass\",$nev,$offset,$debug,$runMode,$mc,\"$option\",\"$suffix\",$workers,\"$mode\"\)
150 done
151 fi
152elif [ "$fit" = "yes" ]
153then
154 root FitSpectrum.C\(\"./output/$fitFolder/lambdak0_${fitBin}.root\",\"clambdak0Histo_${fitBin}\",\"$suffix\",$partID\)
155else
156 give_help
e886738f 157fi
39eb6410 158
159
160