]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/bash | |
2 | ||
3 | # defaults | |
4 | isMC=kFALSE | |
5 | run=no | |
6 | correct=no | |
7 | nev=-1 | |
8 | offset=0 | |
9 | debug=kFALSE | |
10 | runmode=1 | |
11 | dataset=/alice/sim/LHC10f8a_130844 | |
12 | ropt="-l" | |
13 | option="DCA,SAVE" | |
14 | workers=26 | |
15 | analysismode=9; #SPD + field on | |
16 | centrBin=-1 | |
17 | centrEstimator="V0M" | |
18 | runTriggerStudy=no | |
19 | customSuffix="" | |
20 | ntrackletsTrigger=50 | |
21 | rejectBGV0Trigger=kFALSE | |
22 | useTrackCentralityCut=0 | |
23 | trackMin=0 | |
24 | trackMax=100 | |
25 | dataDir="" | |
26 | mcDir="" | |
27 | vzMin=-10 | |
28 | vzMax=10 | |
29 | etaMin=-0.5 | |
30 | etaMax=0.5 | |
31 | npart=381.188 | |
32 | weakFactor=-1 | |
33 | useSingleBin=kTRUE | |
34 | #OUTPATH=output.BAK2010 | |
35 | OUTPATH=output | |
36 | ||
37 | give_help() { | |
38 | ||
39 | cat <<ENDOFGUIDE | |
40 | This scripts runs the mupliplicity analysis and the trigger study task | |
41 | ||
42 | Available options: | |
43 | Mode control, at least one of the following options should be used | |
44 | -r <mode> Run the task | |
45 | Modes [default=$runmode]: | |
46 | 0 local | |
47 | 1 caf | |
48 | 2 grid | |
49 | -c <data,mc> Run the correction data and MC are names of the folders. | |
50 | ./output/ is added automatically in front of the folder names | |
51 | -s Run the trigger study task (by default it runs the multiplicity analysis) | |
52 | Proof settings | |
53 | -w nworkers Set the number of worker nodes (0 == 1 worker per node) | |
54 | -n <nev> Number of events to be analized | |
55 | Misc | |
56 | -d <dataset> Dataset or data collection (according to run mode) [default=$dataset] | |
57 | - local mode: a single ESD file, an xml collection of files on | |
58 | grid or a text file with a ESD per line | |
59 | - caf mode: a dataset | |
60 | - grid mode: a directory on alien | |
61 | -h This help | |
62 | Options specific to the multiplicity analysis | |
63 | -l Run over all centrality bins | |
64 | -o <option> Misc option [default=$option] | |
65 | Available options: | |
66 | - SAVE: Move results to a different output folder* | |
67 | - DCA: Use DCA cut with global tracks | |
68 | - ITSsa: Use ITSsa tracks | |
69 | - TPC: Use TPC only tracks | |
70 | - NOMCKINE: Skip MC kinematics (runs way faster) | |
71 | * == can be used in trigger studies task | |
72 | -t <option> Command line option for root [defaul=$ropt] | |
73 | -m Use this to run on Monte Carlo | |
74 | -x <suffix> Set a custom suffix in the histo manager | |
75 | -g Debug mode | |
76 | == The following options are only valid if running on a single bin == | |
77 | -b <bin> Set centrality bin [default=$centrBin] | |
78 | -e <estimator> Set centrality estimator [default=$centrEstimator] | |
79 | Available choiches: | |
80 | - V0M = V0 multiplicity | |
81 | - FMD = FMD raw multiplicity | |
82 | - TRK = N. of tracks | |
83 | - TKL = N. of tracklets | |
84 | - CL0 = N. of clusters in layer 0 | |
85 | - V0MvsFMD = correlation between V0 and FMD | |
86 | - TKLvsV0 = correlation between tracklets and V0 | |
87 | - ZEMvsZDC = correlation between ZEM and ZDC | |
88 | -y <min,max> Select centrality based on "good tracks" rather than on centrality | |
89 | estimator [off by default] | |
90 | -0 <min,max> Select centrality based on v0 amplitude range rather than on centrality | |
91 | estimator [off by default] | |
92 | -2 <min,max> Select centrality based on SPD outer layer clusters rather than on centrality | |
93 | estimator [off by default] | |
94 | ||
95 | Options specific to the trigger study task | |
96 | -k <ntracklets> Max number of tracklets to fill eta and pt | |
97 | distributions [default=$ntrackletsTrigger] | |
98 | -v Reject BG with the V0 | |
99 | Options specific for the corrections | |
100 | -z <zmin,zmax> Change vertex Z range [default = $vzMin,$vzMax] | |
101 | -a <etamin,etamax> Change eta range [default = $etaMin,$etaMax] | |
102 | -p <npart> Number of participants, used only for dNdeta/npart [default=$npart] | |
103 | -k <weakFrac> Scale ration secondaries from strangeness/all rec by this factor [default=$weakFactor] | |
104 | -b <bin> Set centrality bin to be corrected. Only valid if you processed multiple | |
105 | bins at one (it changes the suffix of the multPbPbtracks.root file). It it's -1, | |
106 | a file without suffix is searched for. This options applyies both to the data and to the | |
107 | MC file. [default=$centrBin] | |
108 | ENDOFGUIDE | |
109 | ||
110 | } | |
111 | ||
112 | while getopts "x:sr:c:gmd:o:w:n:e:b:t:k:vy:0:2:hz:a:lp:" opt; do | |
113 | case $opt in | |
114 | r) | |
115 | run=yes | |
116 | runmode=$OPTARG | |
117 | ;; | |
118 | l) | |
119 | useSingleBin=kFALSE | |
120 | ;; | |
121 | y) | |
122 | useTrackCentralityCut=1 | |
123 | trackMin=${OPTARG%%,*} | |
124 | trackMax=${OPTARG##*,} | |
125 | ;; | |
126 | 0) | |
127 | useTrackCentralityCut=2 | |
128 | trackMin=${OPTARG%%,*} | |
129 | trackMax=${OPTARG##*,} | |
130 | ;; | |
131 | 2) | |
132 | useTrackCentralityCut=3 | |
133 | trackMin=${OPTARG%%,*} | |
134 | trackMax=${OPTARG##*,} | |
135 | ;; | |
136 | x) | |
137 | customSuffix=$OPTARG | |
138 | ;; | |
139 | p) | |
140 | npart=$OPTARG | |
141 | ;; | |
142 | k) | |
143 | ntrackletsTrigger=$OPTARG | |
144 | weakFactor=$OPTARG | |
145 | ;; | |
146 | s) | |
147 | runTriggerStudy=yes | |
148 | ;; | |
149 | v) | |
150 | rejectBGV0Trigger=kTRUE | |
151 | ;; | |
152 | c) | |
153 | correct=yes | |
154 | dataDir="./$OUTPATH/${OPTARG%%,*}" | |
155 | mcDir="./$OUTPATH/${OPTARG##*,}" | |
156 | ;; | |
157 | z) | |
158 | vzMin=${OPTARG%%,*} | |
159 | vzMax=${OPTARG##*,} | |
160 | ;; | |
161 | a) | |
162 | etaMin=${OPTARG%%,*} | |
163 | etaMax=${OPTARG##*,} | |
164 | ;; | |
165 | g) | |
166 | debug=kTRUE; | |
167 | ;; | |
168 | m) | |
169 | isMC=kTRUE | |
170 | ;; | |
171 | d) | |
172 | dataset=$OPTARG | |
173 | ;; | |
174 | e) | |
175 | centrEstimator=$OPTARG | |
176 | ;; | |
177 | b) | |
178 | centrBin=$OPTARG | |
179 | ;; | |
180 | o) | |
181 | option=$OPTARG | |
182 | ;; | |
183 | t) | |
184 | ropt=$OPTARG | |
185 | ;; | |
186 | w) | |
187 | workers=$OPTARG | |
188 | ;; | |
189 | n) | |
190 | nev=$OPTARG | |
191 | ;; | |
192 | h) | |
193 | give_help | |
194 | exit 1 | |
195 | ;; | |
196 | \?) | |
197 | echo "Invalid option: -$OPTARG" >&2 | |
198 | give_help | |
199 | exit 1 | |
200 | ;; | |
201 | :) | |
202 | echo "Option -$OPTARG requires an argument." >&2 | |
203 | give_help | |
204 | exit 1 | |
205 | ;; | |
206 | esac | |
207 | done | |
208 | ||
209 | if [ "$run" = "$correct" ] | |
210 | then | |
211 | echo "One and only one option between -r and -c must be selected" | |
212 | give_help | |
213 | exit 1 | |
214 | fi | |
215 | ||
216 | ||
217 | if [ "$run" = "yes" ] | |
218 | then | |
219 | if [ "$runTriggerStudy" = "yes" ] | |
220 | then | |
221 | root $ropt runTriggerStudy.C\(\"$dataset\",$nev,$offset,$debug,$runmode,$isMC,$ntrackletsTrigger,$rejectBGV0Trigger,\"$option\",$workers\) | |
222 | else | |
223 | root $ropt run.C\(\"$dataset\",$nev,$offset,$debug,$runmode,$isMC,$centrBin,\"$centrEstimator\",$useTrackCentralityCut,$trackMin,$trackMax,\"$option\",\"$customSuffix\",$workers,$useSingleBin\) | |
224 | fi | |
225 | fi | |
226 | ||
227 | if [ "$correct" = "yes" ] | |
228 | then | |
229 | root $ropt correct.C+\(\"$dataDir\",\"$mcDir\",$vzMin,$vzMax,$etaMin,$etaMax,$npart,$weakFactor,$centrBin\); | |
230 | fi |