]>
Commit | Line | Data |
---|---|---|
d26e8ef3 | 1 | #include <Riostream.h> |
2 | #include <TFile.h> | |
3 | #include <AliRDHFCutsDplustoKpipi.h> | |
4 | #include <TClonesArray.h> | |
5 | #include <TParameter.h> | |
6 | ||
7 | //macro to make a .root file which contains an AliRDHFCutsDplustoKpipi with loose set of cuts (for significance maximization) and TParameter with the tighest value of these cuts | |
7a9d85af | 8 | //Needed for AliAnalysisTaskSEDplus, AliCFTaskVertexingHF3Prong, AliAnalysisTaskSESignificance |
d26e8ef3 | 9 | |
10 | //Use: | |
11 | //Set hard coded commented with //set this!! | |
7a9d85af | 12 | |
13 | //.L makeTFile4CutsDplustoKpipi.C | |
14 | // makeInputAliAnalysisTaskSEDplus() | |
15 | // makeInputAliAnalysisTaskSESignificanceMaximization() | |
d26e8ef3 | 16 | |
17 | //similar macros for the other D mesons | |
18 | ||
19 | //Author: Chiara Bianchin, cbianchi@pd.infn.it | |
20 | // Giacomo Ortona, ortona@to.infn.it | |
7a9d85af | 21 | // Renu Bala [Dplus Analysis and CF] |
22 | ||
5754362c | 23 | void makeInputAliAnalysisTaskSEDplusPP(){ |
7a9d85af | 24 | |
25 | // gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/PWG3 -I$ALICE_ROOT/PWG3/vertexingHF -I$ALICE_ROOT/PWG3/vertexingH/macros -g"); | |
d26e8ef3 | 26 | |
d26e8ef3 | 27 | |
7a9d85af | 28 | AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts(); |
29 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
30 | //default | |
31 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
32 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
33 | //esdTrackCuts->SetMinNClustersITS(4); // default is 5 | |
34 | esdTrackCuts->SetMinNClustersTPC(70); | |
35 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
36 | AliESDtrackCuts::kAny); | |
37 | // default is kBoth, otherwise kAny | |
38 | esdTrackCuts->SetMinDCAToVertexXY(0.); | |
39 | esdTrackCuts->SetPtRange(0.3,1.e10); | |
40 | ||
41 | ||
42 | ||
5754362c | 43 | const Int_t nptbins=14; |
7a9d85af | 44 | Float_t* ptbins; |
45 | ptbins=new Float_t[nptbins+1]; | |
46 | ptbins[0]=0.; | |
47 | ptbins[1]=1.; | |
48 | ptbins[2]=2.; | |
49 | ptbins[3]=3.; | |
50 | ptbins[4]=4.; | |
51 | ptbins[5]=5.; | |
52 | ptbins[6]=6.; | |
5754362c | 53 | ptbins[7]=7.; |
54 | ptbins[8]=8.; | |
55 | ptbins[9]=9.; | |
56 | ptbins[10]=10.; | |
57 | ptbins[11]=12.; | |
58 | ptbins[12]=14.; | |
59 | ptbins[13]=16.; | |
60 | ptbins[14]=24.; | |
61 | const Int_t nvars=14; | |
7a9d85af | 62 | |
63 | ||
64 | Float_t** prodcutsval; | |
65 | prodcutsval=new Float_t*[nvars]; | |
66 | for(Int_t ic=0;ic<nvars;ic++){prodcutsval[ic]=new Float_t[nptbins];} | |
67 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
68 | prodcutsval[0][ipt]=0.2; | |
69 | prodcutsval[1][ipt]=0.3; | |
70 | prodcutsval[2][ipt]=0.3; | |
71 | prodcutsval[3][ipt]=0.; | |
72 | prodcutsval[4][ipt]=0.; | |
73 | prodcutsval[5][ipt]=0.01; | |
74 | prodcutsval[6][ipt]=0.06; | |
75 | prodcutsval[7][ipt]=0.02; | |
76 | prodcutsval[8][ipt]=0.; | |
77 | prodcutsval[9][ipt]=0.85; | |
78 | prodcutsval[10][ipt]=0.; | |
79 | prodcutsval[11][ipt]=10000000.0; | |
5754362c | 80 | prodcutsval[12][ipt]=0.0; |
81 | prodcutsval[13][ipt]=0.0; | |
7a9d85af | 82 | |
83 | } | |
84 | ||
85 | ||
86 | Float_t** anacutsval; | |
87 | anacutsval=new Float_t*[nvars]; | |
88 | ||
89 | for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];} | |
90 | //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.}; | |
91 | Int_t ic=0; | |
92 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
93 | anacutsval[ic][ipt]=0.2; | |
94 | } | |
5754362c | 95 | ic=1; |
96 | for(Int_t ipt=3;ipt<nptbins;ipt++){ | |
97 | anacutsval[ic][ipt]=0.4; | |
98 | } | |
99 | anacutsval[1][0]=0.3; | |
100 | anacutsval[1][1]=0.3; | |
101 | anacutsval[1][2]=0.4; | |
102 | ||
103 | ic=2; | |
104 | for(Int_t ipt=3;ipt<nptbins;ipt++){ | |
105 | anacutsval[ic][ipt]=0.4; | |
106 | } | |
107 | ||
108 | anacutsval[2][0]=0.3; | |
109 | anacutsval[2][1]=0.3; | |
110 | anacutsval[2][2]=0.4; | |
7a9d85af | 111 | |
1959ae1f | 112 | ic=3; |
7a9d85af | 113 | for(Int_t ipt=0;ipt<nptbins;ipt++){ |
114 | anacutsval[ic][ipt]=0.; | |
115 | } | |
5754362c | 116 | |
1959ae1f | 117 | ic=4; |
7a9d85af | 118 | for(Int_t ipt=0;ipt<nptbins;ipt++){ |
119 | anacutsval[ic][ipt]=0.; | |
120 | } | |
5754362c | 121 | |
1959ae1f | 122 | ic=5; |
7a9d85af | 123 | for(Int_t ipt=0;ipt<nptbins;ipt++){ |
124 | anacutsval[ic][ipt]=0.01; | |
125 | } | |
7a9d85af | 126 | |
127 | ||
5754362c | 128 | ic=6; |
129 | for(Int_t ipt=5;ipt<nptbins;ipt++){ | |
130 | anacutsval[ic][ipt]=0.023333; | |
7a9d85af | 131 | } |
7a9d85af | 132 | |
133 | anacutsval[6][0]=0.022100; | |
134 | anacutsval[6][1]=0.022100; | |
135 | anacutsval[6][2]=0.034; | |
136 | anacutsval[6][3]=0.020667; | |
137 | anacutsval[6][4]=0.020667; | |
5754362c | 138 | |
139 | ||
140 | ic=7; | |
141 | for(Int_t ipt=5;ipt<nptbins;ipt++){ | |
142 | anacutsval[ic][ipt]=0.115; | |
143 | } | |
144 | ||
7a9d85af | 145 | anacutsval[7][0]=0.08; |
146 | anacutsval[7][1]=0.08; | |
147 | anacutsval[7][2]=0.09; | |
148 | anacutsval[7][3]=0.095; | |
149 | anacutsval[7][4]=0.095; | |
5754362c | 150 | |
151 | ic=8; | |
152 | for(Int_t ipt=3;ipt<nptbins;ipt++){ | |
153 | anacutsval[ic][ipt]=0.5; | |
154 | } | |
1959ae1f | 155 | |
7a9d85af | 156 | anacutsval[8][0]=0.5; |
157 | anacutsval[8][1]=0.5; | |
158 | anacutsval[8][2]=1.0; | |
5754362c | 159 | |
160 | ||
161 | ic=9; | |
162 | for(Int_t ipt=9;ipt<nptbins;ipt++){ | |
163 | anacutsval[ic][ipt]=0.90; | |
164 | } | |
1959ae1f | 165 | |
7a9d85af | 166 | anacutsval[9][0]=0.95; |
167 | anacutsval[9][1]=0.95; | |
168 | anacutsval[9][2]=0.95; | |
169 | anacutsval[9][3]=0.95; | |
170 | anacutsval[9][4]= 0.95; | |
171 | anacutsval[9][5]=0.92; | |
172 | anacutsval[9][6]=0.92; | |
173 | anacutsval[9][7]=0.92; | |
174 | anacutsval[9][8]=0.92; | |
5754362c | 175 | |
176 | ||
177 | ic=10; | |
178 | for(Int_t ipt=3;ipt<nptbins;ipt++){ | |
179 | anacutsval[ic][ipt]=0.000883; | |
180 | } | |
1959ae1f | 181 | |
7a9d85af | 182 | anacutsval[10][0]=0.0055; |
183 | anacutsval[10][1]=0.0055; | |
184 | anacutsval[10][2]= 0.0028; | |
5754362c | 185 | |
186 | ||
187 | ||
188 | ||
189 | ic=11; | |
190 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
191 | anacutsval[ic][ipt]=10000000000.; | |
192 | } | |
193 | ||
194 | ic=12; | |
195 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
196 | anacutsval[ic][ipt]=0.; | |
197 | } | |
198 | ||
199 | ic=13; | |
200 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
201 | anacutsval[ic][ipt]=0.; | |
202 | } | |
7a9d85af | 203 | |
5754362c | 204 | |
7a9d85af | 205 | |
206 | AliRDHFCutsDplustoKpipi *prodcuts = new AliRDHFCutsDplustoKpipi(); | |
207 | prodcuts->SetName("ProdCuts"); | |
208 | prodcuts->SetPtBins(nptbins+1,ptbins); | |
209 | prodcuts->SetCuts(nvars,nptbins,prodcutsval); | |
210 | ||
211 | ||
212 | AliRDHFCutsDplustoKpipi* analysiscuts=new AliRDHFCutsDplustoKpipi(); | |
213 | analysiscuts->SetName("AnalysisCuts"); | |
214 | analysiscuts->SetTitle("Cuts for Dplus Analysis and CF"); | |
215 | analysiscuts->SetPtBins(nptbins+1,ptbins); | |
216 | analysiscuts->SetCuts(nvars,nptbins,anacutsval); | |
217 | analysiscuts->AddTrackCuts(esdTrackCuts); | |
218 | analysiscuts->SetUsePID(kTRUE); | |
5754362c | 219 | analysiscuts->SetUseImpParProdCorrCut(kFALSE); |
7a9d85af | 220 | cout<<"This is the odject I'm going to save:"<<nptbins<<endl; |
221 | ||
222 | analysiscuts->PrintAll(); | |
223 | TFile* fout=new TFile("DplustoKpipiCuts.root","recreate"); | |
224 | fout->cd(); | |
225 | prodcuts->Write(); | |
226 | analysiscuts->Write(); | |
227 | fout->Close(); | |
228 | ||
229 | ||
230 | } | |
231 | ||
232 | ||
5754362c | 233 | |
234 | ||
235 | ||
236 | ||
237 | void makeInputAliAnalysisTaskSEDplusPbPb(){ | |
238 | ||
239 | // gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/PWG3 -I$ALICE_ROOT/PWG3/vertexingHF -I$ALICE_ROOT/PWG3/vertexingH/macros -g"); | |
240 | ||
241 | AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts(); | |
242 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
243 | //default | |
244 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
245 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
246 | //esdTrackCuts->SetMinNClustersITS(4); // default is 5 | |
247 | esdTrackCuts->SetMinNClustersTPC(70); | |
248 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
249 | AliESDtrackCuts::kAny); | |
250 | // default is kBoth, otherwise kAny | |
251 | esdTrackCuts->SetMinDCAToVertexXY(0.); | |
252 | esdTrackCuts->SetPtRange(0.8,1.e10); | |
253 | ||
254 | TString cent=""; | |
255 | //centrality selection (Pb-Pb) | |
256 | Float_t minc=0.,maxc=20.; | |
257 | const Int_t nptbins=12; | |
258 | Float_t* ptbins; | |
259 | ptbins=new Float_t[nptbins+1]; | |
260 | ptbins[0]=0.; | |
261 | ptbins[1]=1.; | |
262 | ptbins[2]=2.; | |
263 | ptbins[3]=3.; | |
264 | ptbins[4]=4.; | |
265 | ptbins[5]=5.; | |
266 | ptbins[6]=6.; | |
267 | ptbins[7]=8.; | |
268 | ptbins[8]=9.; | |
269 | ptbins[9]=10.; | |
270 | ptbins[10]=12.; | |
271 | ptbins[11]=16.; | |
272 | ptbins[12]=24.; | |
273 | const Int_t nvars=14; | |
274 | ||
275 | ||
276 | ||
277 | Float_t** prodcutsval; | |
278 | prodcutsval=new Float_t*[nvars]; | |
279 | for(Int_t ic=0;ic<nvars;ic++){prodcutsval[ic]=new Float_t[nptbins];} | |
280 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
281 | prodcutsval[0][ipt]=0.2; | |
282 | prodcutsval[1][ipt]=0.8; | |
283 | prodcutsval[2][ipt]=0.8; | |
284 | prodcutsval[3][ipt]=0.; | |
285 | prodcutsval[4][ipt]=0.; | |
286 | prodcutsval[5][ipt]=0.01; | |
287 | prodcutsval[6][ipt]=0.06; | |
288 | prodcutsval[7][ipt]=0.02; | |
289 | prodcutsval[8][ipt]=1.; | |
290 | prodcutsval[9][ipt]=0.90; | |
291 | prodcutsval[10][ipt]=0.; | |
292 | prodcutsval[11][ipt]=10000000.0; | |
293 | prodcutsval[12][ipt]=0.0; | |
294 | prodcutsval[13][ipt]=0.0; | |
295 | ||
296 | } | |
297 | ||
298 | ||
299 | ||
300 | ||
301 | Float_t** anacutsval; | |
302 | anacutsval=new Float_t*[nvars]; | |
303 | for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];} | |
304 | ||
305 | ||
306 | Int_t ic=0; | |
307 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
308 | anacutsval[ic][ipt]=0.2; | |
309 | } | |
310 | ||
311 | ||
312 | ic=1; | |
313 | ||
314 | for(Int_t ipt=7;ipt<nptbins;ipt++){ | |
315 | anacutsval[1][ipt]=1.0; | |
316 | } | |
317 | ||
318 | anacutsval[1][0]=0.8; | |
319 | anacutsval[1][1]=0.8; | |
320 | anacutsval[1][2]=0.8; | |
321 | anacutsval[1][3]=0.8; | |
322 | anacutsval[1][4]=0.9; | |
323 | anacutsval[1][5]=0.9; | |
324 | anacutsval[1][6]=0.8; | |
325 | ||
326 | ||
327 | ||
328 | ||
329 | ic=2; | |
330 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
331 | anacutsval[ic][ipt]=0.8; | |
332 | } | |
333 | ||
334 | ||
335 | ||
336 | ||
337 | ic=3; | |
338 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
339 | anacutsval[ic][ipt]=0.; | |
340 | } | |
341 | ic=4; | |
342 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
343 | anacutsval[ic][ipt]=0.; | |
344 | } | |
345 | ic=5; | |
346 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
347 | anacutsval[ic][ipt]=0.01; | |
348 | } | |
349 | ||
350 | ||
351 | ic=6; | |
352 | for(Int_t ipt=5;ipt<nptbins;ipt++){ | |
353 | anacutsval[ic][ipt]=0.023333; | |
354 | } | |
355 | anacutsval[6][0]=0.022100; | |
356 | anacutsval[6][1]=0.022100; | |
357 | anacutsval[6][2]=0.034; | |
358 | anacutsval[6][3]=0.020667; | |
359 | anacutsval[6][4]=0.020667; | |
360 | ||
361 | ||
362 | ic=7; | |
363 | for(Int_t ipt=7;ipt<nptbins;ipt++){ | |
364 | anacutsval[ic][ipt]=0.19; | |
365 | } | |
366 | ||
367 | anacutsval[7][0]=0.08; | |
368 | anacutsval[7][1]=0.08; | |
369 | anacutsval[7][2]=0.17; | |
370 | anacutsval[7][3]=0.14; | |
371 | anacutsval[7][4]=0.14; | |
372 | anacutsval[7][5]=0.19; | |
373 | anacutsval[7][6]=0.14; | |
374 | ||
375 | ||
376 | ||
377 | ||
378 | ic=8; | |
379 | for(Int_t ipt=5;ipt<nptbins;ipt++){ | |
380 | anacutsval[ic][ipt]=2.0; | |
381 | } | |
382 | ||
383 | anacutsval[8][0]=0.8; | |
384 | anacutsval[8][1]=0.8; | |
385 | anacutsval[8][2]=1.1; | |
386 | anacutsval[8][3]=0.5; | |
387 | anacutsval[8][4]=0.5; | |
388 | ||
389 | ||
390 | ||
391 | ic=9; | |
392 | for(Int_t ipt=7;ipt<nptbins;ipt++){ | |
393 | anacutsval[ic][ipt]=0.997; | |
394 | } | |
395 | ||
396 | anacutsval[9][0]=0.995; | |
397 | anacutsval[9][1]=0.995; | |
398 | anacutsval[9][2]=0.997; | |
399 | anacutsval[9][3]=0.998; | |
400 | anacutsval[9][4]= 0.998; | |
401 | anacutsval[9][5]=0.995; | |
402 | anacutsval[9][6]=0.995; | |
403 | ||
404 | ||
405 | ||
406 | ||
407 | ||
408 | ||
409 | ic=10; | |
410 | for(Int_t ipt=3;ipt<nptbins;ipt++){ | |
411 | anacutsval[ic][ipt]=0.000883; | |
412 | } | |
413 | ||
414 | anacutsval[10][0]=0.0055; | |
415 | anacutsval[10][1]=0.0055; | |
416 | anacutsval[10][2]= 0.0028; | |
417 | ||
418 | ||
419 | ||
420 | ic=11; | |
421 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
422 | anacutsval[ic][ipt]=10000000000.; | |
423 | } | |
424 | ||
425 | ||
426 | ic=12; | |
427 | for(Int_t ipt=7;ipt<nptbins;ipt++){ | |
428 | anacutsval[ic][ipt]=0.; | |
429 | } | |
430 | ||
431 | anacutsval[12][0]=0.; | |
432 | anacutsval[12][1]=0.; | |
433 | ||
434 | anacutsval[12][2]=0.; | |
435 | anacutsval[12][3]=12.; | |
436 | anacutsval[12][4]=12.; | |
437 | anacutsval[12][5]=12.0; | |
438 | anacutsval[12][6]=10.; | |
439 | ||
440 | ||
441 | ||
442 | ic=13; | |
443 | for(Int_t ipt=7;ipt<nptbins;ipt++){ | |
444 | anacutsval[ic][ipt]=0.; | |
445 | } | |
446 | ||
447 | anacutsval[13][0]=0.; | |
448 | anacutsval[13][1]=0.; | |
449 | ||
450 | anacutsval[13][2]=0.; | |
451 | anacutsval[13][3]=0.998571; | |
452 | anacutsval[13][4]=0.998571; | |
453 | anacutsval[13][5]=0.998571; | |
454 | anacutsval[13][6]=0.997143; | |
455 | ||
456 | ||
457 | ||
458 | AliRDHFCutsDplustoKpipi *prodcuts = new AliRDHFCutsDplustoKpipi(); | |
459 | prodcuts->SetName("ProdCuts"); | |
460 | prodcuts->SetPtBins(nptbins+1,ptbins); | |
461 | prodcuts->SetCuts(nvars,nptbins,prodcutsval); | |
462 | ||
463 | ||
464 | AliRDHFCutsDplustoKpipi* analysiscuts=new AliRDHFCutsDplustoKpipi(); | |
465 | analysiscuts->SetName("AnalysisCuts"); | |
466 | analysiscuts->SetTitle("Cuts for Dplus Analysis and CF"); | |
467 | analysiscuts->SetPtBins(nptbins+1,ptbins); | |
468 | analysiscuts->SetCuts(nvars,nptbins,anacutsval); | |
469 | analysiscuts->AddTrackCuts(esdTrackCuts); | |
470 | ||
471 | analysiscuts->SetUsePID(kTRUE); | |
472 | analysiscuts->SetUseImpParProdCorrCut(kFALSE); | |
473 | analysiscuts->SetOptPileup(kFALSE); | |
474 | analysiscuts->SetUseAOD049(kTRUE); | |
475 | analysiscuts->SetMinCentrality(minc); | |
476 | analysiscuts->SetMaxCentrality(maxc); | |
477 | cent=Form("%.0f%.0f",minc,maxc); | |
478 | analysiscuts->SetUseCentrality(AliRDHFCuts::kCentV0M); //kCentOff,kCentV0M,kCentTRK,kCentTKL,kCentCL1,kCentInvalid | |
479 | analysiscuts->SetMinPtCandidate(3.); | |
480 | analysiscuts->SetMaxPtCandidate(10000.); | |
481 | cout<<"This is the odject I'm going to save:"<<nptbins<<endl; | |
482 | ||
483 | analysiscuts->PrintAll(); | |
484 | TFile* fout=new TFile("DplustoKpipiCuts.root","recreate"); | |
485 | fout->cd(); | |
486 | prodcuts->Write(); | |
487 | analysiscuts->Write(); | |
488 | fout->Close(); | |
489 | ||
490 | } | |
491 | ||
492 | ||
493 | ||
7a9d85af | 494 | void makeInputAliAnalysisTaskSESignificanceMaximization(){ |
495 | ||
d26e8ef3 | 496 | AliRDHFCutsDplustoKpipi* RDHFDplustoKpipi=new AliRDHFCutsDplustoKpipi(); |
497 | RDHFDplustoKpipi->SetName("loosercuts"); | |
498 | RDHFDplustoKpipi->SetTitle("Cuts for significance maximization"); | |
499 | ||
0d4398a2 | 500 | AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts(); |
501 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
502 | //default | |
503 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
504 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
7a9d85af | 505 | //esdTrackCuts->SetMinNClustersITS(4); // default is 5 |
506 | esdTrackCuts->SetMinNClustersTPC(70); | |
0d4398a2 | 507 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, |
7a9d85af | 508 | AliESDtrackCuts::kAny); |
509 | // default is kBoth, otherwise kAny | |
0d4398a2 | 510 | esdTrackCuts->SetMinDCAToVertexXY(0.); |
511 | esdTrackCuts->SetPtRange(0.3,1.e10); | |
7a9d85af | 512 | |
0d4398a2 | 513 | RDHFDplustoKpipi->AddTrackCuts(esdTrackCuts); |
d26e8ef3 | 514 | |
515 | const Int_t nvars=12; | |
516 | ||
517 | const Int_t nptbins=4; | |
518 | Float_t* ptbins; | |
519 | ptbins=new Float_t[nptbins+1]; | |
520 | ptbins[0]=0.; | |
521 | ptbins[1]=2.; | |
522 | ptbins[2]=3.; | |
523 | ptbins[3]=5.; | |
524 | ptbins[4]=99999.; | |
525 | ||
526 | RDHFDplustoKpipi->SetPtBins(nptbins+1,ptbins); | |
527 | ||
528 | //setting my cut values | |
529 | ||
530 | Float_t** prodcutsval; | |
531 | prodcutsval=new Float_t*[nvars]; | |
532 | for(Int_t ic=0;ic<nvars;ic++){prodcutsval[ic]=new Float_t[nptbins];} | |
533 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
534 | prodcutsval[0][ipt]=0.2; | |
535 | prodcutsval[1][ipt]=0.4; | |
536 | prodcutsval[2][ipt]=0.4; | |
537 | prodcutsval[3][ipt]=0.; | |
538 | prodcutsval[4][ipt]=0.; | |
539 | prodcutsval[5][ipt]=0.01; | |
540 | prodcutsval[6][ipt]=0.06; | |
541 | prodcutsval[7][ipt]=0.02; | |
542 | prodcutsval[8][ipt]=0.; | |
543 | prodcutsval[9][ipt]=0.85; | |
544 | prodcutsval[10][ipt]=0.; | |
545 | prodcutsval[11][ipt]=10000000.0; | |
546 | ||
547 | } | |
548 | ||
549 | RDHFDplustoKpipi->SetCuts(nvars,nptbins,prodcutsval); | |
550 | ||
551 | Int_t nvarsforopt=RDHFDplustoKpipi->GetNVarsForOpt(); | |
552 | const Int_t dim=5; //set this!! | |
553 | Bool_t *boolforopt; | |
554 | boolforopt=new Bool_t[nvars]; | |
555 | if(dim>nvarsforopt){ | |
556 | cout<<"Number of variables for optimization has probably changed, check and edit accordingly"<<endl; | |
557 | return; | |
558 | } else { | |
559 | if(dim==nvarsforopt){ | |
560 | boolforopt=RDHFDplustoKpipi->GetVarsForOpt(); | |
561 | }else{ | |
562 | TString *names; | |
563 | names=new TString[nvars]; | |
564 | TString answer=""; | |
565 | Int_t checktrue=0; | |
566 | names=RDHFDplustoKpipi->GetVarNames(); | |
567 | for(Int_t i=0;i<nvars;i++){ | |
568 | cout<<names[i]<<" for opt? (y/n)"<<endl; | |
569 | cin>>answer; | |
570 | if(answer=="y") { | |
571 | boolforopt[i]=kTRUE; | |
572 | checktrue++; | |
573 | } | |
574 | else boolforopt[i]=kFALSE; | |
575 | } | |
576 | if (checktrue!=dim) { | |
577 | cout<<"Error! You set "<<checktrue<<" kTRUE instead of "<<dim<<endl; | |
578 | return; | |
579 | } | |
580 | RDHFDplustoKpipi->SetVarsForOpt(dim,boolforopt); | |
581 | } | |
582 | } | |
583 | ||
584 | ||
585 | Float_t tighterval[dim][nptbins]; | |
586 | //sigmavert | |
587 | //declength | |
588 | //Pmax | |
589 | //costhetapoint | |
590 | //sumd02 | |
591 | ||
592 | //number of steps for each variable is 4 now | |
593 | //set this!! | |
594 | ||
595 | // tighterval[var][ptbin] | |
596 | tighterval[0][0]=0.022100; | |
597 | tighterval[0][1]=0.034; | |
598 | tighterval[0][2]=0.020667; | |
599 | tighterval[0][3]=0.023333; | |
600 | ||
601 | tighterval[1][0]=0.08; | |
602 | tighterval[1][1]=0.09; | |
603 | tighterval[1][2]=0.095; | |
604 | tighterval[1][3]=0.115; | |
605 | ||
606 | tighterval[2][0]=1.; | |
607 | tighterval[2][1]=1.; | |
608 | tighterval[2][2]=1.; | |
609 | tighterval[2][3]=1.; | |
610 | ||
611 | tighterval[3][0]=0.979; | |
612 | tighterval[3][1]=0.9975; | |
613 | tighterval[3][2]=0.995; | |
614 | tighterval[3][3]=0.9975; | |
615 | ||
616 | tighterval[4][0]=0.0055; | |
617 | tighterval[4][1]=0.0028; | |
618 | tighterval[4][2]=0.000883; | |
619 | tighterval[4][3]=0.000883; | |
620 | ||
621 | TString name=""; | |
622 | Int_t arrdim=dim*nptbins; | |
623 | TClonesArray max("TParameter<float>",arrdim); | |
624 | for (Int_t ipt=0;ipt<nptbins;ipt++){ | |
625 | for(Int_t ival=0;ival<dim;ival++){ | |
626 | name=Form("par%dptbin%d",ival,ipt); | |
627 | new(max[ipt*dim+ival])TParameter<float>(name.Data(),tighterval[ival][ipt]); | |
628 | } | |
629 | } | |
630 | ||
631 | TFile* fout=new TFile("cuts4SignifMaximDplus.root","recreate"); //set this!! | |
632 | fout->cd(); | |
633 | RDHFDplustoKpipi->Write(); | |
634 | max.Write(); | |
635 | fout->Close(); | |
636 | ||
637 | } |