Changes to the DEtaDPhi corr fun (making 0 in the center of the bin in the histogram...
[u/mrichter/AliRoot.git] / ANALYSIS / AliCentralitySelectionTask.cxx
CommitLineData
01974bd1 1/**************************************************************************
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16//*****************************************************
17// Class AliCentralitySelectionTask
18// Class to analyze determine centrality
19// author: Alberica Toia
20//*****************************************************
21
22#include "AliCentralitySelectionTask.h"
23
24#include <TTree.h>
25#include <TList.h>
26#include <TH1F.h>
27#include <TH2F.h>
28#include <TF1.h>
29#include <TProfile.h>
30#include <TFile.h>
31#include <TObjString.h>
32#include <TString.h>
33#include <TCanvas.h>
34#include <TROOT.h>
35#include <TDirectory.h>
36#include <TSystem.h>
37#include <iostream>
38
39#include "AliAnalysisManager.h"
40#include "AliHeader.h"
41#include "AliVEvent.h"
42#include "AliESD.h"
43#include "AliESDEvent.h"
44#include "AliESDHeader.h"
45#include "AliESDInputHandler.h"
46#include "AliESDZDC.h"
47#include "AliESDFMD.h"
48#include "AliESDTZERO.h"
49#include "AliESDVZERO.h"
50#include "AliESDtrackCuts.h"
51#include "AliESDVertex.h"
52#include "AliCentrality.h"
53#include "AliOADBCentrality.h"
54#include "AliOADBContainer.h"
55#include "AliMultiplicity.h"
56#include "AliAODHandler.h"
57#include "AliAODHeader.h"
58#include "AliAODEvent.h"
59#include "AliAODVertex.h"
60#include "AliAODVZERO.h"
61#include "AliAODTracklets.h"
62#include "AliAODMCHeader.h"
63#include "AliMCEventHandler.h"
64#include "AliMCEvent.h"
65#include "AliAODMCParticle.h"
66#include "AliMCParticle.h"
67#include "AliStack.h"
68#include "AliAnalysisTaskSE.h"
69#include "AliGenEventHeader.h"
70#include "AliGenHijingEventHeader.h"
8432b617 71#include "AliGenDPMjetEventHeader.h"
72#include "AliGenCocktailEventHeader.h"
01974bd1 73#include "AliPhysicsSelectionTask.h"
74#include "AliPhysicsSelection.h"
75#include "AliBackgroundSelection.h"
76#include "AliESDUtils.h"
77
78ClassImp(AliCentralitySelectionTask)
79
80
81//________________________________________________________________________
82AliCentralitySelectionTask::AliCentralitySelectionTask():
83AliAnalysisTaskSE(),
84 fAnalysisInput("ESD"),
85 fIsMCInput(kFALSE),
86 fCurrentRun(-1),
87 fUseScaling(0),
88 fUseCleaning(0),
89 fFillHistos(0),
90 fV0MScaleFactor(0),
91 fSPDScaleFactor(0),
92 fTPCScaleFactor(0),
93 fV0MScaleFactorMC(0),
94 fV0MSPDOutlierPar0(0),
95 fV0MSPDOutlierPar1(0),
96 fV0MTPCOutlierPar0(0),
97 fV0MTPCOutlierPar1(0),
98 fV0MSPDSigmaOutlierPar0(0),
99 fV0MSPDSigmaOutlierPar1(0),
100 fV0MSPDSigmaOutlierPar2(0),
101 fV0MTPCSigmaOutlierPar0(0),
102 fV0MTPCSigmaOutlierPar1(0),
103 fV0MTPCSigmaOutlierPar2(0),
104 fV0MZDCOutlierPar0(0),
105 fV0MZDCOutlierPar1(0),
106 fV0MZDCEcalOutlierPar0(0),
107 fV0MZDCEcalOutlierPar1(0),
108 fTrackCuts(0),
2d27827d 109 fEsdTrackCuts(0),
110 fEsdTrackCutsExtra1(0),
111 fEsdTrackCutsExtra2(0),
01974bd1 112 fZVCut(10),
113 fOutliersCut(5),
114 fQuality(999),
115 fIsSelected(0),
116 fMSL(0),
117 fMSH(0),
118 fMUL(0),
119 fMLL(0),
120 fEJE(0),
121 fEGA(0),
122 fPHS(0),
123 fMB(0),
124 fCVHN(0),
125 fCVLN(0),
126 fCVHNbit(0),
127 fCVLNbit(0),
128 fCCENT(0),
129 fCSEMI(0),
130 fCCENTbit(0),
131 fCSEMIbit(0),
132 fCentV0M(0),
133 fCentV0A(0),
2d12adde 134 fCentV0A123(0),
01974bd1 135 fCentV0C(0),
f9a774f9 136 fCentV0MEq(0),
137 fCentV0AEq(0),
138 fCentV0CEq(0),
01974bd1 139 fCentFMD(0),
140 fCentTRK(0),
141 fCentTKL(0),
142 fCentCL0(0),
143 fCentCL1(0),
144 fCentCND(0),
99029fba 145 fCentZNA(0),
f9a774f9 146 fCentZNC(0),
3a19f64f 147 fCentZPA(0),
148 fCentZPC(0),
39a3e400 149 fCentNPA(0),
01974bd1 150 fCentV0MvsFMD(0),
151 fCentTKLvsV0M(0),
152 fCentZEMvsZDC(0),
39a3e400 153 fCentV0Mtrue(0),
154 fCentV0Atrue(0),
155 fCentV0Ctrue(0),
f9a774f9 156 fCentV0MEqtrue(0),
157 fCentV0AEqtrue(0),
158 fCentV0CEqtrue(0),
39a3e400 159 fCentFMDtrue(0),
160 fCentTRKtrue(0),
161 fCentTKLtrue(0),
162 fCentCL0true(0),
163 fCentCL1true(0),
164 fCentCNDtrue(0),
165 fCentZNAtrue(0),
f9a774f9 166 fCentZNCtrue(0),
3a19f64f 167 fCentZPAtrue(0),
168 fCentZPCtrue(0),
01974bd1 169 fHtempV0M(0),
170 fHtempV0A(0),
2d12adde 171 fHtempV0A123(0),
01974bd1 172 fHtempV0C(0),
f9a774f9 173 fHtempV0MEq(0),
174 fHtempV0AEq(0),
175 fHtempV0CEq(0),
01974bd1 176 fHtempFMD(0),
177 fHtempTRK(0),
178 fHtempTKL(0),
179 fHtempCL0(0),
180 fHtempCL1(0),
181 fHtempCND(0),
99029fba 182 fHtempZNA(0),
f9a774f9 183 fHtempZNC(0),
3a19f64f 184 fHtempZPA(0),
185 fHtempZPC(0),
01974bd1 186 fHtempV0MvsFMD(0),
187 fHtempTKLvsV0M(0),
188 fHtempZEMvsZDC(0),
39a3e400 189 fHtempNPA(0),
190 fHtempV0Mtrue(0),
191 fHtempV0Atrue(0),
192 fHtempV0Ctrue(0),
f9a774f9 193 fHtempV0MEqtrue(0),
194 fHtempV0AEqtrue(0),
195 fHtempV0CEqtrue(0),
39a3e400 196 fHtempFMDtrue(0),
197 fHtempTRKtrue(0),
198 fHtempTKLtrue(0),
199 fHtempCL0true(0),
200 fHtempCL1true(0),
201 fHtempCNDtrue(0),
202 fHtempZNAtrue(0),
f9a774f9 203 fHtempZNCtrue(0),
3a19f64f 204 fHtempZPAtrue(0),
205 fHtempZPCtrue(0),
01974bd1 206 fOutputList(0),
39a3e400 207 fHOutCentV0M(0),
208 fHOutCentV0A(0),
2d12adde 209 fHOutCentV0A123(0),
39a3e400 210 fHOutCentV0C(0),
f9a774f9 211 fHOutCentV0MEq(0),
212 fHOutCentV0AEq(0),
213 fHOutCentV0CEq(0),
01974bd1 214 fHOutCentV0MCVHN(0),
215 fHOutCentV0MCVLN(0),
216 fHOutCentV0MCVHNinMB(0),
217 fHOutCentV0MCVLNinMB(0),
218 fHOutCentV0MCCENT(0),
219 fHOutCentV0MCSEMI(0),
220 fHOutCentV0MCCENTinMB(0),
221 fHOutCentV0MCSEMIinMB(0),
222 fHOutCentV0MMSL(0),
223 fHOutCentV0MMSH(0),
224 fHOutCentV0MMUL(0),
225 fHOutCentV0MMLL(0),
226 fHOutCentV0MEJE(0),
227 fHOutCentV0MEGA(0),
228 fHOutCentV0MPHS(0),
229 fHOutCentV0MMSLinMB(0),
230 fHOutCentV0MMSHinMB(0),
231 fHOutCentV0MMULinMB(0),
232 fHOutCentV0MMLLinMB(0),
233 fHOutCentV0MEJEinMB(0),
234 fHOutCentV0MEGAinMB(0),
235 fHOutCentV0MPHSinMB(0),
39a3e400 236 fHOutCentFMD(0),
237 fHOutCentTRK(0),
238 fHOutCentTKL(0),
239 fHOutCentCL0(0),
240 fHOutCentCL1(0),
241 fHOutCentCND(0),
242 fHOutCentNPA(0),
243 fHOutCentZNA(0),
f9a774f9 244 fHOutCentZNC(0),
3a19f64f 245 fHOutCentZPA(0),
246 fHOutCentZPC(0),
01974bd1 247 fHOutCentV0MvsFMD(0),
248 fHOutCentTKLvsV0M(0),
249 fHOutCentZEMvsZDC(0),
250 fHOutCentV0MvsCentCL1(0),
251 fHOutCentV0MvsCentTRK(0),
252 fHOutCentTRKvsCentCL1(0),
253 fHOutCentV0MvsCentZDC(0),
254 fHOutCentV0AvsCentV0C(0),
255 fHOutCentV0AvsCentTRK(0),
256 fHOutCentV0AvsCentCND(0),
257 fHOutCentV0AvsCentCL1(0),
258 fHOutCentV0CvsCentTRK(0),
259 fHOutCentV0CvsCentCND(0),
260 fHOutCentV0CvsCentCL1(0),
8432b617 261 fHOutCentNPAvsCentV0A(0),
262 fHOutCentNPAvsCentV0C(0),
263 fHOutCentNPAvsCentTRK(0),
264 fHOutCentNPAvsCentCND(0),
265 fHOutCentNPAvsCentCL1(0),
99029fba 266 fHOutCentZNAvsCentV0A(0),
267 fHOutCentZNAvsCentV0C(0),
268 fHOutCentZNAvsCentTRK(0),
269 fHOutCentZNAvsCentCND(0),
270 fHOutCentZNAvsCentCL1(0),
bfbc1975 271 fHOutCentZNAvsCentZPA(0),
01974bd1 272 fHOutMultV0AC(0),
273 fHOutMultV0M(0),
274 fHOutMultV0A(0),
2d12adde 275 fHOutMultV0A123(0),
01974bd1 276 fHOutMultV0C(0),
f9a774f9 277 fHOutMultV0MEq(0),
278 fHOutMultV0AEq(0),
279 fHOutMultV0CEq(0),
e1d58f75 280 fHOutMultV0Mnc(0),
281 fHOutMultV0Anc(0),
282 fHOutMultV0Cnc(0),
01974bd1 283 fHOutMultV0O(0),
284 fHOutMultV0Cells(0),
285 fHOutMultFMD(0),
286 fHOutMultTRK(0),
287 fHOutMultTKL(0),
288 fHOutMultCL0(0),
289 fHOutMultCL1(0),
290 fHOutMultCND(0),
8432b617 291 fHOutMultNPA(0),
99029fba 292 fHOutMultZNA(0),
f9a774f9 293 fHOutMultZNC(0),
3a19f64f 294 fHOutMultZPA(0),
295 fHOutMultZPC(0),
01974bd1 296 fHOutMultV0MvsZDN(0),
297 fHOutMultZEMvsZDN(0),
298 fHOutMultV0MvsZDC(0),
299 fHOutMultZEMvsZDC(0),
300 fHOutMultZEMvsZDCw(0),
301 fHOutMultV0MvsCL1(0),
302 fHOutMultV0MvsTRK(0),
303 fHOutMultTRKvsCL1(0),
304 fHOutMultV0MvsV0O(0),
305 fHOutMultV0OvsCL1(0),
306 fHOutMultV0OvsTRK(0),
307 fHOutMultCL1vsTKL(0),
bfbc1975 308 fHOutMultZNAvsZPA(0),
01974bd1 309 fHOutCentV0Mqual1(0),
310 fHOutCentTRKqual1(0),
311 fHOutCentCL1qual1(0),
312 fHOutMultV0MvsCL1qual1(0),
313 fHOutMultV0MvsTRKqual1(0),
314 fHOutMultTRKvsCL1qual1(0),
315 fHOutCentV0Mqual2(0),
316 fHOutCentTRKqual2(0),
317 fHOutCentCL1qual2(0),
318 fHOutMultV0MvsCL1qual2(0),
319 fHOutMultV0MvsTRKqual2(0),
320 fHOutMultTRKvsCL1qual2(0),
321 fHOutQuality(0),
322 fHOutVertex(0),
323 fHOutVertexT0(0)
324{
325 // Default constructor
326 AliInfo("Centrality Selection enabled.");
327
328 fUseScaling=kTRUE;
329 fUseCleaning=kTRUE;
330 fFillHistos=kFALSE;
331 fBranchNames="ESD:AliESDRun.,AliESDHeader.,AliESDZDC.,AliESDFMD.,AliESDVZERO.,AliESDTZERO."
332 ",SPDVertex.,TPCVertex.,PrimaryVertex.,AliMultiplicity.,Tracks ";
333}
334
335//________________________________________________________________________
336AliCentralitySelectionTask::AliCentralitySelectionTask(const char *name):
337 AliAnalysisTaskSE(name),
338 fAnalysisInput("ESD"),
339 fIsMCInput(kFALSE),
340 fCurrentRun(-1),
341 fUseScaling(0),
342 fUseCleaning(0),
343 fFillHistos(0),
344 fV0MScaleFactor(0),
345 fSPDScaleFactor(0),
346 fTPCScaleFactor(0),
347 fV0MScaleFactorMC(0),
348 fV0MSPDOutlierPar0(0),
349 fV0MSPDOutlierPar1(0),
350 fV0MTPCOutlierPar0(0),
351 fV0MTPCOutlierPar1(0),
352 fV0MSPDSigmaOutlierPar0(0),
353 fV0MSPDSigmaOutlierPar1(0),
354 fV0MSPDSigmaOutlierPar2(0),
355 fV0MTPCSigmaOutlierPar0(0),
356 fV0MTPCSigmaOutlierPar1(0),
357 fV0MTPCSigmaOutlierPar2(0),
358 fV0MZDCOutlierPar0(0),
359 fV0MZDCOutlierPar1(0),
360 fV0MZDCEcalOutlierPar0(0),
361 fV0MZDCEcalOutlierPar1(0),
362 fTrackCuts(0),
2d27827d 363 fEsdTrackCuts(0),
364 fEsdTrackCutsExtra1(0),
365 fEsdTrackCutsExtra2(0),
01974bd1 366 fZVCut(10),
367 fOutliersCut(5),
368 fQuality(999),
369 fIsSelected(0),
370 fMSL(0),
371 fMSH(0),
372 fMUL(0),
373 fMLL(0),
374 fEJE(0),
375 fEGA(0),
376 fPHS(0),
377 fMB(0),
378 fCVHN(0),
379 fCVLN(0),
380 fCVHNbit(0),
381 fCVLNbit(0),
382 fCCENT(0),
383 fCSEMI(0),
384 fCCENTbit(0),
385 fCSEMIbit(0),
386 fCentV0M(0),
387 fCentV0A(0),
2d12adde 388 fCentV0A123(0),
01974bd1 389 fCentV0C(0),
f9a774f9 390 fCentV0MEq(0),
391 fCentV0AEq(0),
392 fCentV0CEq(0),
01974bd1 393 fCentFMD(0),
394 fCentTRK(0),
395 fCentTKL(0),
396 fCentCL0(0),
397 fCentCL1(0),
398 fCentCND(0),
99029fba 399 fCentZNA(0),
f9a774f9 400 fCentZNC(0),
3a19f64f 401 fCentZPA(0),
402 fCentZPC(0),
39a3e400 403 fCentNPA(0),
01974bd1 404 fCentV0MvsFMD(0),
405 fCentTKLvsV0M(0),
406 fCentZEMvsZDC(0),
39a3e400 407 fCentV0Mtrue(0),
408 fCentV0Atrue(0),
409 fCentV0Ctrue(0),
f9a774f9 410 fCentV0MEqtrue(0),
411 fCentV0AEqtrue(0),
412 fCentV0CEqtrue(0),
39a3e400 413 fCentFMDtrue(0),
414 fCentTRKtrue(0),
415 fCentTKLtrue(0),
416 fCentCL0true(0),
417 fCentCL1true(0),
418 fCentCNDtrue(0),
419 fCentZNAtrue(0),
f9a774f9 420 fCentZNCtrue(0),
3a19f64f 421 fCentZPAtrue(0),
422 fCentZPCtrue(0),
01974bd1 423 fHtempV0M(0),
424 fHtempV0A(0),
2d12adde 425 fHtempV0A123(0),
01974bd1 426 fHtempV0C(0),
f9a774f9 427 fHtempV0MEq(0),
428 fHtempV0AEq(0),
429 fHtempV0CEq(0),
01974bd1 430 fHtempFMD(0),
431 fHtempTRK(0),
432 fHtempTKL(0),
433 fHtempCL0(0),
434 fHtempCL1(0),
435 fHtempCND(0),
99029fba 436 fHtempZNA(0),
f9a774f9 437 fHtempZNC(0),
3a19f64f 438 fHtempZPA(0),
439 fHtempZPC(0),
01974bd1 440 fHtempV0MvsFMD(0),
441 fHtempTKLvsV0M(0),
442 fHtempZEMvsZDC(0),
39a3e400 443 fHtempNPA(0),
444 fHtempV0Mtrue(0),
445 fHtempV0Atrue(0),
446 fHtempV0Ctrue(0),
f9a774f9 447 fHtempV0MEqtrue(0),
448 fHtempV0AEqtrue(0),
449 fHtempV0CEqtrue(0),
39a3e400 450 fHtempFMDtrue(0),
451 fHtempTRKtrue(0),
452 fHtempTKLtrue(0),
453 fHtempCL0true(0),
454 fHtempCL1true(0),
455 fHtempCNDtrue(0),
456 fHtempZNAtrue(0),
f9a774f9 457 fHtempZNCtrue(0),
3a19f64f 458 fHtempZPAtrue(0),
459 fHtempZPCtrue(0),
01974bd1 460 fOutputList(0),
39a3e400 461 fHOutCentV0M(0),
462 fHOutCentV0A(0),
2d12adde 463 fHOutCentV0A123(0),
39a3e400 464 fHOutCentV0C(0),
f9a774f9 465 fHOutCentV0MEq(0),
466 fHOutCentV0AEq(0),
467 fHOutCentV0CEq(0),
01974bd1 468 fHOutCentV0MCVHN(0),
469 fHOutCentV0MCVLN(0),
470 fHOutCentV0MCVHNinMB(0),
471 fHOutCentV0MCVLNinMB(0),
472 fHOutCentV0MCCENT(0),
473 fHOutCentV0MCSEMI(0),
474 fHOutCentV0MCCENTinMB(0),
475 fHOutCentV0MCSEMIinMB(0),
476 fHOutCentV0MMSL(0),
477 fHOutCentV0MMSH(0),
478 fHOutCentV0MMUL(0),
479 fHOutCentV0MMLL(0),
480 fHOutCentV0MEJE(0),
481 fHOutCentV0MEGA(0),
482 fHOutCentV0MPHS(0),
483 fHOutCentV0MMSLinMB(0),
484 fHOutCentV0MMSHinMB(0),
485 fHOutCentV0MMULinMB(0),
486 fHOutCentV0MMLLinMB(0),
487 fHOutCentV0MEJEinMB(0),
488 fHOutCentV0MEGAinMB(0),
489 fHOutCentV0MPHSinMB(0),
39a3e400 490 fHOutCentFMD(0),
491 fHOutCentTRK(0),
492 fHOutCentTKL(0),
493 fHOutCentCL0(0),
494 fHOutCentCL1(0),
495 fHOutCentCND(0),
496 fHOutCentNPA(0),
497 fHOutCentZNA(0),
f9a774f9 498 fHOutCentZNC(0),
3a19f64f 499 fHOutCentZPA(0),
500 fHOutCentZPC(0),
01974bd1 501 fHOutCentV0MvsFMD(0),
502 fHOutCentTKLvsV0M(0),
503 fHOutCentZEMvsZDC(0),
504 fHOutCentV0MvsCentCL1(0),
505 fHOutCentV0MvsCentTRK(0),
506 fHOutCentTRKvsCentCL1(0),
507 fHOutCentV0MvsCentZDC(0),
508 fHOutCentV0AvsCentV0C(0),
509 fHOutCentV0AvsCentTRK(0),
510 fHOutCentV0AvsCentCND(0),
511 fHOutCentV0AvsCentCL1(0),
512 fHOutCentV0CvsCentTRK(0),
513 fHOutCentV0CvsCentCND(0),
514 fHOutCentV0CvsCentCL1(0),
8432b617 515 fHOutCentNPAvsCentV0A(0),
516 fHOutCentNPAvsCentV0C(0),
517 fHOutCentNPAvsCentTRK(0),
518 fHOutCentNPAvsCentCND(0),
519 fHOutCentNPAvsCentCL1(0),
99029fba 520 fHOutCentZNAvsCentV0A(0),
521 fHOutCentZNAvsCentV0C(0),
522 fHOutCentZNAvsCentTRK(0),
523 fHOutCentZNAvsCentCND(0),
524 fHOutCentZNAvsCentCL1(0),
bfbc1975 525 fHOutCentZNAvsCentZPA(0),
01974bd1 526 fHOutMultV0AC(0),
527 fHOutMultV0M(0),
528 fHOutMultV0A(0),
2d12adde 529 fHOutMultV0A123(0),
01974bd1 530 fHOutMultV0C(0),
f9a774f9 531 fHOutMultV0MEq(0),
532 fHOutMultV0AEq(0),
533 fHOutMultV0CEq(0),
e1d58f75 534 fHOutMultV0Mnc(0),
535 fHOutMultV0Anc(0),
536 fHOutMultV0Cnc(0),
01974bd1 537 fHOutMultV0O(0),
538 fHOutMultV0Cells(0),
539 fHOutMultFMD(0),
540 fHOutMultTRK(0),
541 fHOutMultTKL(0),
542 fHOutMultCL0(0),
543 fHOutMultCL1(0),
544 fHOutMultCND(0),
8432b617 545 fHOutMultNPA(0),
99029fba 546 fHOutMultZNA(0),
f9a774f9 547 fHOutMultZNC(0),
3a19f64f 548 fHOutMultZPA(0),
549 fHOutMultZPC(0),
01974bd1 550 fHOutMultV0MvsZDN(0),
551 fHOutMultZEMvsZDN(0),
552 fHOutMultV0MvsZDC(0),
553 fHOutMultZEMvsZDC(0),
554 fHOutMultZEMvsZDCw(0),
555 fHOutMultV0MvsCL1(0),
556 fHOutMultV0MvsTRK(0),
557 fHOutMultTRKvsCL1(0),
558 fHOutMultV0MvsV0O(0),
559 fHOutMultV0OvsCL1(0),
560 fHOutMultV0OvsTRK(0),
561 fHOutMultCL1vsTKL(0),
bfbc1975 562 fHOutMultZNAvsZPA(0),
01974bd1 563 fHOutCentV0Mqual1(0),
564 fHOutCentTRKqual1(0),
565 fHOutCentCL1qual1(0),
566 fHOutMultV0MvsCL1qual1(0),
567 fHOutMultV0MvsTRKqual1(0),
568 fHOutMultTRKvsCL1qual1(0),
569 fHOutCentV0Mqual2(0),
570 fHOutCentTRKqual2(0),
571 fHOutCentCL1qual2(0),
572 fHOutMultV0MvsCL1qual2(0),
573 fHOutMultV0MvsTRKqual2(0),
574 fHOutMultTRKvsCL1qual2(0),
575 fHOutQuality(0),
576 fHOutVertex(0),
577 fHOutVertexT0(0)
578{
579 // Default constructor
580 AliInfo("Centrality Selection enabled.");
581 //DefineOutput(1, TList::Class());
582 fUseScaling=kTRUE;
583 fUseCleaning=kTRUE;
584 fFillHistos=kFALSE;
585 fBranchNames="ESD:AliESDRun.,AliESDHeader.,AliESDZDC.,AliESDFMD.,AliESDVZERO.,AliESDTZERO."
586 ",SPDVertex.,TPCVertex.,PrimaryVertex.,AliMultiplicity.,Tracks ";
587}
588
589//________________________________________________________________________
590AliCentralitySelectionTask& AliCentralitySelectionTask::operator=(const AliCentralitySelectionTask& c)
591{
592 // Assignment operator
593 if (this!=&c) {
594 AliAnalysisTaskSE::operator=(c);
595 }
596 return *this;
597}
598
599//________________________________________________________________________
600AliCentralitySelectionTask::AliCentralitySelectionTask(const AliCentralitySelectionTask& ana):
601 AliAnalysisTaskSE(ana),
602 fAnalysisInput(ana.fAnalysisInput),
603 fIsMCInput(ana.fIsMCInput),
604 fCurrentRun(ana.fCurrentRun),
605 fUseScaling(ana.fUseScaling),
606 fUseCleaning(ana.fUseCleaning),
607 fFillHistos(ana.fFillHistos),
608 fV0MScaleFactor(ana.fV0MScaleFactor),
609 fSPDScaleFactor(ana.fSPDScaleFactor),
610 fTPCScaleFactor(ana.fTPCScaleFactor),
611 fV0MScaleFactorMC(ana.fV0MScaleFactorMC),
612 fV0MSPDOutlierPar0(ana.fV0MSPDOutlierPar0),
613 fV0MSPDOutlierPar1(ana.fV0MSPDOutlierPar1),
614 fV0MTPCOutlierPar0(ana.fV0MTPCOutlierPar0),
615 fV0MTPCOutlierPar1(ana.fV0MTPCOutlierPar1),
616 fV0MSPDSigmaOutlierPar0(ana.fV0MSPDSigmaOutlierPar0),
617 fV0MSPDSigmaOutlierPar1(ana.fV0MSPDSigmaOutlierPar1),
618 fV0MSPDSigmaOutlierPar2(ana.fV0MSPDSigmaOutlierPar2),
619 fV0MTPCSigmaOutlierPar0(ana.fV0MTPCSigmaOutlierPar0),
620 fV0MTPCSigmaOutlierPar1(ana.fV0MTPCSigmaOutlierPar1),
621 fV0MTPCSigmaOutlierPar2(ana.fV0MTPCSigmaOutlierPar2),
622 fV0MZDCOutlierPar0(ana.fV0MZDCOutlierPar0),
623 fV0MZDCOutlierPar1(ana.fV0MZDCOutlierPar1),
624 fV0MZDCEcalOutlierPar0(ana.fV0MZDCEcalOutlierPar0),
625 fV0MZDCEcalOutlierPar1(ana.fV0MZDCEcalOutlierPar1),
626 fTrackCuts(ana.fTrackCuts),
2d27827d 627 fEsdTrackCuts(ana.fEsdTrackCuts),
628 fEsdTrackCutsExtra1(ana.fEsdTrackCutsExtra1),
629 fEsdTrackCutsExtra2(ana.fEsdTrackCutsExtra2),
01974bd1 630 fZVCut(ana.fZVCut),
631 fOutliersCut(ana.fOutliersCut),
632 fQuality(ana.fQuality),
633 fIsSelected(ana.fIsSelected),
634 fMSL(ana.fMSL),
635 fMSH(ana.fMSH),
636 fMUL(ana.fMUL),
637 fMLL(ana.fMLL),
638 fEJE(ana.fEJE),
639 fEGA(ana.fEGA),
640 fPHS(ana.fPHS),
641 fMB(ana.fMB),
642 fCVHN(ana.fCVHN),
643 fCVLN(ana.fCVLN),
644 fCVHNbit(ana.fCVHNbit),
645 fCVLNbit(ana.fCVLNbit),
646 fCCENT(ana.fCCENT),
647 fCSEMI(ana.fCSEMI),
648 fCCENTbit(ana.fCCENTbit),
649 fCSEMIbit(ana.fCSEMIbit),
650 fCentV0M(ana.fCentV0M),
651 fCentV0A(ana.fCentV0A),
2d12adde 652 fCentV0A123(ana.fCentV0A123),
01974bd1 653 fCentV0C(ana.fCentV0C),
f9a774f9 654 fCentV0MEq(ana.fCentV0MEq),
655 fCentV0AEq(ana.fCentV0AEq),
656 fCentV0CEq(ana.fCentV0CEq),
01974bd1 657 fCentFMD(ana.fCentFMD),
658 fCentTRK(ana.fCentTRK),
659 fCentTKL(ana.fCentTKL),
660 fCentCL0(ana.fCentCL0),
661 fCentCL1(ana.fCentCL1),
662 fCentCND(ana.fCentCND),
99029fba 663 fCentZNA(ana.fCentZNA),
f9a774f9 664 fCentZNC(ana.fCentZNC),
3a19f64f 665 fCentZPA(ana.fCentZPA),
666 fCentZPC(ana.fCentZPC),
39a3e400 667 fCentNPA(ana.fCentNPA),
01974bd1 668 fCentV0MvsFMD(ana.fCentV0MvsFMD),
669 fCentTKLvsV0M(ana.fCentTKLvsV0M),
670 fCentZEMvsZDC(ana.fCentZEMvsZDC),
39a3e400 671 fCentV0Mtrue(ana.fCentV0Mtrue),
672 fCentV0Atrue(ana.fCentV0Atrue),
673 fCentV0Ctrue(ana.fCentV0Ctrue),
f9a774f9 674 fCentV0MEqtrue(ana.fCentV0MEqtrue),
675 fCentV0AEqtrue(ana.fCentV0AEqtrue),
676 fCentV0CEqtrue(ana.fCentV0CEqtrue),
39a3e400 677 fCentFMDtrue(ana.fCentFMDtrue),
678 fCentTRKtrue(ana.fCentTRKtrue),
679 fCentTKLtrue(ana.fCentTKLtrue),
680 fCentCL0true(ana.fCentCL0true),
681 fCentCL1true(ana.fCentCL1true),
682 fCentCNDtrue(ana.fCentCNDtrue),
683 fCentZNAtrue(ana.fCentZNAtrue),
f9a774f9 684 fCentZNCtrue(ana.fCentZNCtrue),
3a19f64f 685 fCentZPAtrue(ana.fCentZPAtrue),
686 fCentZPCtrue(ana.fCentZPCtrue),
01974bd1 687 fHtempV0M(ana.fHtempV0M),
688 fHtempV0A(ana.fHtempV0A),
2d12adde 689 fHtempV0A123(ana.fHtempV0A123),
01974bd1 690 fHtempV0C(ana.fHtempV0C),
f9a774f9 691 fHtempV0MEq(ana.fHtempV0MEq),
692 fHtempV0AEq(ana.fHtempV0AEq),
693 fHtempV0CEq(ana.fHtempV0CEq),
01974bd1 694 fHtempFMD(ana.fHtempFMD),
695 fHtempTRK(ana.fHtempTRK),
696 fHtempTKL(ana.fHtempTKL),
697 fHtempCL0(ana.fHtempCL0),
698 fHtempCL1(ana.fHtempCL1),
699 fHtempCND(ana.fHtempCND),
99029fba 700 fHtempZNA(ana.fHtempZNA),
f9a774f9 701 fHtempZNC(ana.fHtempZNC),
3a19f64f 702 fHtempZPA(ana.fHtempZPA),
703 fHtempZPC(ana.fHtempZPC),
01974bd1 704 fHtempV0MvsFMD(ana.fHtempV0MvsFMD),
705 fHtempTKLvsV0M(ana.fHtempTKLvsV0M),
706 fHtempZEMvsZDC(ana.fHtempZEMvsZDC),
39a3e400 707 fHtempNPA(ana.fHtempNPA),
708 fHtempV0Mtrue(ana.fHtempV0Mtrue),
709 fHtempV0Atrue(ana.fHtempV0Atrue),
710 fHtempV0Ctrue(ana.fHtempV0Ctrue),
f9a774f9 711 fHtempV0MEqtrue(ana.fHtempV0MEqtrue),
712 fHtempV0AEqtrue(ana.fHtempV0AEqtrue),
713 fHtempV0CEqtrue(ana.fHtempV0CEqtrue),
39a3e400 714 fHtempFMDtrue(ana.fHtempFMDtrue),
715 fHtempTRKtrue(ana.fHtempTRKtrue),
716 fHtempTKLtrue(ana.fHtempTKLtrue),
717 fHtempCL0true(ana.fHtempCL0true),
718 fHtempCL1true(ana.fHtempCL1true),
719 fHtempCNDtrue(ana.fHtempCNDtrue),
720 fHtempZNAtrue(ana.fHtempZNAtrue),
f9a774f9 721 fHtempZNCtrue(ana.fHtempZNCtrue),
3a19f64f 722 fHtempZPAtrue(ana.fHtempZPAtrue),
723 fHtempZPCtrue(ana.fHtempZPCtrue),
01974bd1 724 fOutputList(ana.fOutputList),
39a3e400 725 fHOutCentV0M(ana.fHOutCentV0M),
726 fHOutCentV0A(ana.fHOutCentV0A),
2d12adde 727 fHOutCentV0A123(ana.fHOutCentV0A123),
39a3e400 728 fHOutCentV0C(ana.fHOutCentV0C),
f9a774f9 729 fHOutCentV0MEq(ana.fHOutCentV0MEq),
730 fHOutCentV0AEq(ana.fHOutCentV0AEq),
731 fHOutCentV0CEq(ana.fHOutCentV0CEq),
01974bd1 732 fHOutCentV0MCVHN(ana.fHOutCentV0MCVHN),
733 fHOutCentV0MCVLN(ana.fHOutCentV0MCVLN),
734 fHOutCentV0MCVHNinMB(ana.fHOutCentV0MCVHNinMB),
735 fHOutCentV0MCVLNinMB(ana.fHOutCentV0MCVLNinMB),
736 fHOutCentV0MCCENT(ana.fHOutCentV0MCCENT),
737 fHOutCentV0MCSEMI(ana.fHOutCentV0MCSEMI),
738 fHOutCentV0MCCENTinMB(ana.fHOutCentV0MCCENTinMB),
739 fHOutCentV0MCSEMIinMB(ana.fHOutCentV0MCSEMIinMB),
740 fHOutCentV0MMSL(ana.fHOutCentV0MMSL),
741 fHOutCentV0MMSH(ana.fHOutCentV0MMSH),
742 fHOutCentV0MMUL(ana.fHOutCentV0MMUL),
743 fHOutCentV0MMLL(ana.fHOutCentV0MMLL),
744 fHOutCentV0MEJE(ana.fHOutCentV0MEJE),
745 fHOutCentV0MEGA(ana.fHOutCentV0MEGA),
746 fHOutCentV0MPHS(ana.fHOutCentV0MPHS),
747 fHOutCentV0MMSLinMB(ana.fHOutCentV0MMSLinMB),
748 fHOutCentV0MMSHinMB(ana.fHOutCentV0MMSHinMB),
749 fHOutCentV0MMULinMB(ana.fHOutCentV0MMULinMB),
750 fHOutCentV0MMLLinMB(ana.fHOutCentV0MMLLinMB),
751 fHOutCentV0MEJEinMB(ana.fHOutCentV0MEJEinMB),
752 fHOutCentV0MEGAinMB(ana.fHOutCentV0MEGAinMB),
753 fHOutCentV0MPHSinMB(ana.fHOutCentV0MPHSinMB),
39a3e400 754 fHOutCentFMD(ana.fHOutCentFMD),
755 fHOutCentTRK(ana.fHOutCentTRK),
756 fHOutCentTKL(ana.fHOutCentTKL),
757 fHOutCentCL0(ana.fHOutCentCL0),
758 fHOutCentCL1(ana.fHOutCentCL1),
759 fHOutCentCND(ana.fHOutCentCND),
760 fHOutCentNPA(ana.fHOutCentNPA),
761 fHOutCentZNA(ana.fHOutCentZNA),
f9a774f9 762 fHOutCentZNC(ana.fHOutCentZNC),
3a19f64f 763 fHOutCentZPA(ana.fHOutCentZPA),
764 fHOutCentZPC(ana.fHOutCentZPC),
01974bd1 765 fHOutCentV0MvsFMD(ana.fHOutCentV0MvsFMD),
766 fHOutCentTKLvsV0M(ana.fHOutCentTKLvsV0M),
767 fHOutCentZEMvsZDC(ana.fHOutCentZEMvsZDC),
768 fHOutCentV0MvsCentCL1(ana.fHOutCentV0MvsCentCL1),
769 fHOutCentV0MvsCentTRK(ana.fHOutCentV0MvsCentTRK),
770 fHOutCentTRKvsCentCL1(ana.fHOutCentTRKvsCentCL1),
771 fHOutCentV0MvsCentZDC(ana.fHOutCentV0MvsCentZDC),
772 fHOutCentV0AvsCentV0C(ana.fHOutCentV0AvsCentV0C),
773 fHOutCentV0AvsCentTRK(ana.fHOutCentV0AvsCentTRK),
774 fHOutCentV0AvsCentCND(ana.fHOutCentV0AvsCentCND),
775 fHOutCentV0AvsCentCL1(ana.fHOutCentV0AvsCentCL1),
776 fHOutCentV0CvsCentTRK(ana.fHOutCentV0CvsCentTRK),
777 fHOutCentV0CvsCentCND(ana.fHOutCentV0CvsCentCND),
778 fHOutCentV0CvsCentCL1(ana.fHOutCentV0CvsCentCL1),
8432b617 779 fHOutCentNPAvsCentV0A(ana.fHOutCentNPAvsCentV0A),
780 fHOutCentNPAvsCentV0C(ana.fHOutCentNPAvsCentV0C),
781 fHOutCentNPAvsCentTRK(ana.fHOutCentNPAvsCentTRK),
782 fHOutCentNPAvsCentCND(ana.fHOutCentNPAvsCentCND),
783 fHOutCentNPAvsCentCL1(ana.fHOutCentNPAvsCentCL1),
99029fba 784 fHOutCentZNAvsCentV0A(ana.fHOutCentZNAvsCentV0A),
785 fHOutCentZNAvsCentV0C(ana.fHOutCentZNAvsCentV0C),
786 fHOutCentZNAvsCentTRK(ana.fHOutCentZNAvsCentTRK),
787 fHOutCentZNAvsCentCND(ana.fHOutCentZNAvsCentCND),
788 fHOutCentZNAvsCentCL1(ana.fHOutCentZNAvsCentCL1),
bfbc1975 789 fHOutCentZNAvsCentZPA(ana.fHOutCentZNAvsCentZPA),
01974bd1 790 fHOutMultV0AC(ana.fHOutMultV0AC),
791 fHOutMultV0M(ana.fHOutMultV0M),
792 fHOutMultV0A(ana.fHOutMultV0A),
2d12adde 793 fHOutMultV0A123(ana.fHOutMultV0A123),
01974bd1 794 fHOutMultV0C(ana.fHOutMultV0C),
f9a774f9 795 fHOutMultV0MEq(ana.fHOutMultV0MEq),
796 fHOutMultV0AEq(ana.fHOutMultV0AEq),
797 fHOutMultV0CEq(ana.fHOutMultV0CEq),
e1d58f75 798 fHOutMultV0Mnc(ana.fHOutMultV0Mnc),
799 fHOutMultV0Anc(ana.fHOutMultV0Anc),
800 fHOutMultV0Cnc(ana.fHOutMultV0Cnc),
01974bd1 801 fHOutMultV0O(ana.fHOutMultV0O),
802 fHOutMultV0Cells(ana.fHOutMultV0Cells),
803 fHOutMultFMD(ana.fHOutMultFMD),
804 fHOutMultTRK(ana.fHOutMultTRK),
805 fHOutMultTKL(ana.fHOutMultTKL),
806 fHOutMultCL0(ana.fHOutMultCL0),
807 fHOutMultCL1(ana.fHOutMultCL1),
808 fHOutMultCND(ana.fHOutMultCND),
8432b617 809 fHOutMultNPA(ana.fHOutMultNPA),
99029fba 810 fHOutMultZNA(ana.fHOutMultZNA),
f9a774f9 811 fHOutMultZNC(ana.fHOutMultZNC),
3a19f64f 812 fHOutMultZPA(ana.fHOutMultZPA),
813 fHOutMultZPC(ana.fHOutMultZPC),
01974bd1 814 fHOutMultV0MvsZDN(ana.fHOutMultV0MvsZDN),
815 fHOutMultZEMvsZDN(ana.fHOutMultZEMvsZDN),
816 fHOutMultV0MvsZDC(ana.fHOutMultV0MvsZDC),
817 fHOutMultZEMvsZDC(ana.fHOutMultZEMvsZDC),
818 fHOutMultZEMvsZDCw(ana.fHOutMultZEMvsZDCw),
819 fHOutMultV0MvsCL1(ana.fHOutMultV0MvsCL1),
820 fHOutMultV0MvsTRK(ana.fHOutMultV0MvsTRK),
821 fHOutMultTRKvsCL1(ana.fHOutMultTRKvsCL1),
822 fHOutMultV0MvsV0O(ana.fHOutMultV0MvsV0O),
823 fHOutMultV0OvsCL1(ana.fHOutMultV0OvsCL1),
824 fHOutMultV0OvsTRK(ana.fHOutMultV0OvsTRK),
825 fHOutMultCL1vsTKL(ana.fHOutMultCL1vsTKL),
bfbc1975 826 fHOutMultZNAvsZPA(ana.fHOutMultZNAvsZPA),
01974bd1 827 fHOutCentV0Mqual1(ana.fHOutCentV0Mqual1),
828 fHOutCentTRKqual1(ana.fHOutCentTRKqual1),
829 fHOutCentCL1qual1(ana.fHOutCentCL1qual1),
830 fHOutMultV0MvsCL1qual1(ana.fHOutMultV0MvsCL1qual1),
831 fHOutMultV0MvsTRKqual1(ana.fHOutMultV0MvsTRKqual1),
832 fHOutMultTRKvsCL1qual1(ana.fHOutMultTRKvsCL1qual1),
833 fHOutCentV0Mqual2(ana.fHOutCentV0Mqual2),
834 fHOutCentTRKqual2(ana.fHOutCentTRKqual2),
835 fHOutCentCL1qual2(ana.fHOutCentCL1qual2),
836 fHOutMultV0MvsCL1qual2(ana.fHOutMultV0MvsCL1qual2),
837 fHOutMultV0MvsTRKqual2(ana.fHOutMultV0MvsTRKqual2),
838 fHOutMultTRKvsCL1qual2(ana.fHOutMultTRKvsCL1qual2),
839 fHOutQuality(ana.fHOutQuality),
840 fHOutVertex(ana.fHOutVertex),
841 fHOutVertexT0(ana.fHOutVertexT0)
842{
843 // Copy Constructor
844
845}
846
847//________________________________________________________________________
848AliCentralitySelectionTask::~AliCentralitySelectionTask()
849{
850 // Destructor
851 if (fOutputList && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) delete fOutputList;
852 if (fTrackCuts) delete fTrackCuts;
2d27827d 853 if (fEsdTrackCuts) delete fEsdTrackCuts;
854 if (fEsdTrackCutsExtra1) delete fEsdTrackCutsExtra1;
855 if (fEsdTrackCutsExtra2) delete fEsdTrackCutsExtra2;
01974bd1 856}
857
858//________________________________________________________________________
859void AliCentralitySelectionTask::UserCreateOutputObjects()
860{
861 // Create the output containers
862 if(fDebug>1) printf("AnalysisCentralitySelectionTask::UserCreateOutputObjects() \n");
863 AliLog::SetClassDebugLevel("AliCentralitySelectionTask", AliLog::kInfo);
864
865 if (fFillHistos) {
866 fOutputList = new TList();
867 fOutputList->SetOwner();
868 fHOutCentV0M = new TH1F("fHOutCentV0M","fHOutCentV0M; Centrality V0",505,0,101);
869 fHOutCentV0A = new TH1F("fHOutCentV0A","fHOutCentV0A; Centrality V0A",505,0,101);
2d12adde 870 fHOutCentV0A123 = new TH1F("fHOutCentV0A123","fHOutCentV0A123; Centrality V0A-123",505,0,101);
01974bd1 871 fHOutCentV0C = new TH1F("fHOutCentV0C","fHOutCentV0C; Centrality V0C",505,0,101);
1a9bd911 872 fHOutCentV0MEq = new TH1F("fHOutCentV0MEq","fHOutCentV0MEq; Centrality V0 equalized",505,0,101);
873 fHOutCentV0AEq = new TH1F("fHOutCentV0AEq","fHOutCentV0AEq; Centrality V0A equalized",505,0,101);
874 fHOutCentV0CEq = new TH1F("fHOutCentV0CEq","fHOutCentV0CEq; Centrality V0C equalized",505,0,101);
01974bd1 875 fHOutCentV0MCVHN= new TH1F("fHOutCentV0M_CVHN","fHOutCentV0M_CVHN; Centrality V0",505,0,101);
876 fHOutCentV0MCVLN= new TH1F("fHOutCentV0M_CVLN","fHOutCentV0M_CVLN; Centrality V0",505,0,101);
877 fHOutCentV0MCVHNinMB= new TH1F("fHOutCentV0M_CVHNinMB","fHOutCentV0M_CVHN; Centrality V0",505,0,101);
878 fHOutCentV0MCVLNinMB= new TH1F("fHOutCentV0M_CVLNinMB","fHOutCentV0M_CVLN; Centrality V0",505,0,101);
879 fHOutCentV0MCCENT= new TH1F("fHOutCentV0M_CCENT","fHOutCentV0M_CCENT; Centrality V0",505,0,101);
880 fHOutCentV0MCSEMI= new TH1F("fHOutCentV0M_CSEMI","fHOutCentV0M_CSEMI; Centrality V0",505,0,101);
881 fHOutCentV0MCCENTinMB= new TH1F("fHOutCentV0M_CCENTinMB","fHOutCentV0M_CCENT; Centrality V0",505,0,101);
882 fHOutCentV0MCSEMIinMB= new TH1F("fHOutCentV0M_CSEMIinMB","fHOutCentV0M_CSEMI; Centrality V0",505,0,101);
883 fHOutCentV0MMSL= new TH1F("fHOutCentV0M_MSL","fHOutCentV0M_MSL; Centrality V0",505,0,101);
884 fHOutCentV0MMSH= new TH1F("fHOutCentV0M_MSH","fHOutCentV0M_MSH; Centrality V0",505,0,101);
885 fHOutCentV0MMUL= new TH1F("fHOutCentV0M_MUL","fHOutCentV0M_MUL; Centrality V0",505,0,101);
886 fHOutCentV0MMLL= new TH1F("fHOutCentV0M_MLL","fHOutCentV0M_MLL; Centrality V0",505,0,101);
887 fHOutCentV0MEJE= new TH1F("fHOutCentV0M_EJE","fHOutCentV0M_EJE; Centrality V0",505,0,101);
888 fHOutCentV0MEGA= new TH1F("fHOutCentV0M_EGA","fHOutCentV0M_EGA; Centrality V0",505,0,101);
889 fHOutCentV0MPHS= new TH1F("fHOutCentV0M_PHS","fHOutCentV0M_PHS; Centrality V0",505,0,101);
890 fHOutCentV0MMSLinMB= new TH1F("fHOutCentV0M_MSLinMB","fHOutCentV0M_MSLinMB; Centrality V0",505,0,101);
891 fHOutCentV0MMSHinMB= new TH1F("fHOutCentV0M_MSHinMB","fHOutCentV0M_MSHinMB; Centrality V0",505,0,101);
892 fHOutCentV0MMULinMB= new TH1F("fHOutCentV0M_MULinMB","fHOutCentV0M_MULinMB; Centrality V0",505,0,101);
893 fHOutCentV0MMLLinMB= new TH1F("fHOutCentV0M_MLLinMB","fHOutCentV0M_MLLinMB; Centrality V0",505,0,101);
894 fHOutCentV0MEJEinMB= new TH1F("fHOutCentV0M_EJEinMB","fHOutCentV0M_EJEinMB; Centrality V0",505,0,101);
895 fHOutCentV0MEGAinMB= new TH1F("fHOutCentV0M_EGAinMB","fHOutCentV0M_EGAinMB; Centrality V0",505,0,101);
896 fHOutCentV0MPHSinMB= new TH1F("fHOutCentV0M_PHSinMB","fHOutCentV0M_PHSinMB; Centrality V0",505,0,101);
897 fHOutCentFMD = new TH1F("fHOutCentFMD","fHOutCentFMD; Centrality FMD",505,0,101);
898 fHOutCentTRK = new TH1F("fHOutCentTRK","fHOutCentTRK; Centrality TPC",505,0,101);
899 fHOutCentTKL = new TH1F("fHOutCentTKL","fHOutCentTKL; Centrality tracklets",505,0,101);
900 fHOutCentCL0 = new TH1F("fHOutCentCL0","fHOutCentCL0; Centrality SPD inner",505,0,101);
901 fHOutCentCL1 = new TH1F("fHOutCentCL1","fHOutCentCL1; Centrality SPD outer",505,0,101);
902 fHOutCentCND = new TH1F("fHOutCentCND","fHOutCentCND; Centrality candle",505,0,101);
99029fba 903 fHOutCentNPA = new TH1F("fHOutCentNPA","fHOutCentNPA; Centrality Npart",505,0,101);
904 fHOutCentZNA = new TH1F("fHOutCentZNA","fHOutCentZNA; Centrality ZNA",505,0,101);
1a9bd911 905 fHOutCentZNC = new TH1F("fHOutCentZNC","fHOutCentZNC; Centrality ZNC",505,0,101);
3a19f64f 906 fHOutCentZPA = new TH1F("fHOutCentZPA","fHOutCentZPA; Centrality ZPA",505,0,101);
907 fHOutCentZPC = new TH1F("fHOutCentZPC","fHOutCentZPC; Centrality ZPC",505,0,101);
01974bd1 908 fHOutCentV0MvsFMD= new TH1F("fHOutCentV0MvsFMD","fHOutCentV0MvsFMD; Centrality V0 vs FMD",505,0,101);
909 fHOutCentTKLvsV0M= new TH1F("fHOutCentTKLvsV0M","fHOutCentTKLvsV0M; Centrality tracklets vs V0",505,0,101);
910 fHOutCentZEMvsZDC= new TH1F("fHOutCentZEMvsZDC","fHOutCentZEMvsZDC; Centrality ZEM vs ZDC",505,0,101);
911 fHOutCentV0MvsCentCL1= new TH2F("fHOutCentV0MvsCentCL1","fHOutCentV0MvsCentCL1; Cent V0; Cent SPD",505,0,101,505,0,101);
912 fHOutCentV0MvsCentTRK= new TH2F("fHOutCentV0MvsCentTRK","fHOutCentV0MvsCentTRK; Cent V0; Cent TPC",505,0,101,505,0,101);
913 fHOutCentTRKvsCentCL1= new TH2F("fHOutCentTRKvsCentCL1","fHOutCentTRKvsCentCL1; Cent TPC; Cent SPD",505,0,101,505,0,101);
914 fHOutCentV0MvsCentZDC= new TH2F("fHOutCentV0MvsCentZDC","fHOutCentV0MvsCentZDC; Cent V0; Cent ZDC",505,0,101,505,0,101);
915 fHOutCentV0AvsCentV0C= new TH2F("fHOutCentV0AvsCentV0C","fHOutCentV0AvsCentV0C; Cent V0A; Cent V0C;", 505,0,101,505,0,101);
916 fHOutCentV0AvsCentTRK= new TH2F("fHOutCentV0AvsCentTRK","fHOutCentV0AvsCentTRK; Cent V0A; Cent TRK;", 505,0,101,505,0,101);
917 fHOutCentV0AvsCentCND= new TH2F("fHOutCentV0AvsCentCND","fHOutCentV0AvsCentCND; Cent V0A; Cent CND;", 505,0,101,505,0,101);
918 fHOutCentV0AvsCentCL1= new TH2F("fHOutCentV0AvsCentCL1","fHOutCentV0AvsCentCL1; Cent V0A; Cent CL1;", 505,0,101,505,0,101);
919 fHOutCentV0CvsCentTRK= new TH2F("fHOutCentV0CvsCentTRK","fHOutCentV0CvsCentTRK; Cent V0C; Cent TRK;", 505,0,101,505,0,101);
920 fHOutCentV0CvsCentCND= new TH2F("fHOutCentV0CvsCentCND","fHOutCentV0CvsCentCND; Cent V0C; Cent CND;", 505,0,101,505,0,101);
921 fHOutCentV0CvsCentCL1= new TH2F("fHOutCentV0CvsCentCL1","fHOutCentV0CvsCentCL1; Cent V0C; Cent CL1;", 505,0,101,505,0,101);
8432b617 922 fHOutCentNPAvsCentV0A= new TH2F("fHOutCentNPAvsCentV0A","fHOutCentNPAvsCentV0A; Cent NPA; Cent V0A;", 505,0,101,505,0,101);
923 fHOutCentNPAvsCentV0C= new TH2F("fHOutCentNPAvsCentV0C","fHOutCentNPAvsCentV0C; Cent NPA; Cent V0C;", 505,0,101,505,0,101);
924 fHOutCentNPAvsCentTRK= new TH2F("fHOutCentNPAvsCentTRK","fHOutCentNPAvsCentTRK; Cent NPA; Cent TRK;", 505,0,101,505,0,101);
925 fHOutCentNPAvsCentCND= new TH2F("fHOutCentNPAvsCentCND","fHOutCentNPAvsCentCND; Cent NPA; Cent CND;", 505,0,101,505,0,101);
926 fHOutCentNPAvsCentCL1= new TH2F("fHOutCentNPAvsCentCL1","fHOutCentNPAvsCentCL1; Cent NPA; Cent CL1;", 505,0,101,505,0,101);
99029fba 927 fHOutCentZNAvsCentV0A= new TH2F("fHOutCentZNAvsCentV0A","fHOutCentZNAvsCentV0A; Cent ZNA; Cent V0A;", 505,0,101,505,0,101);
928 fHOutCentZNAvsCentV0C= new TH2F("fHOutCentZNAvsCentV0C","fHOutCentZNAvsCentV0C; Cent ZNA; Cent V0C;", 505,0,101,505,0,101);
929 fHOutCentZNAvsCentTRK= new TH2F("fHOutCentZNAvsCentTRK","fHOutCentZNAvsCentTRK; Cent ZNA; Cent TRK;", 505,0,101,505,0,101);
930 fHOutCentZNAvsCentCND= new TH2F("fHOutCentZNAvsCentCND","fHOutCentZNAvsCentCND; Cent ZNA; Cent CND;", 505,0,101,505,0,101);
931 fHOutCentZNAvsCentCL1= new TH2F("fHOutCentZNAvsCentCL1","fHOutCentZNAvsCentCL1; Cent ZNA; Cent CL1;", 505,0,101,505,0,101);
bfbc1975 932 fHOutCentZNAvsCentZPA= new TH2F("fHOutCentZNAvsCentZPA","fHOutCentZNAvsCentZPA; Cent ZNA; Cent ZPA;", 505,0,101,505,0,101);
01974bd1 933
934 fHOutMultV0AC = new TH2F("fHOutMultV0AC","fHOutMultV0AC; Multiplicity V0A; Multiplicity V0C",1000,0,1000,1000,0,1000);
935 fHOutMultV0M = new TH1F("fHOutMultV0M","fHOutMultV0M; Multiplicity V0",25000,0,25000);
936 fHOutMultV0A = new TH1F("fHOutMultV0A","fHOutMultV0A; Multiplicity V0",25000,0,25000);
2d12adde 937 fHOutMultV0A123 = new TH1F("fHOutMultV0A123","fHOutMultV0A123; Multiplicity V0A-123",25000,0,25000);
01974bd1 938 fHOutMultV0C = new TH1F("fHOutMultV0C","fHOutMultV0C; Multiplicity V0",25000,0,25000);
7c928baf 939 fHOutMultV0MEq = new TH1F("fHOutMultV0MEq","fHOutMultV0MEq; Multiplicity V0",25000,0,25000);
940 fHOutMultV0AEq = new TH1F("fHOutMultV0AEq","fHOutMultV0AEq; Multiplicity V0",25000,0,25000);
941 fHOutMultV0CEq = new TH1F("fHOutMultV0CEq","fHOutMultV0CEq; Multiplicity V0",25000,0,25000);
e1d58f75 942 fHOutMultV0Mnc= new TH1F("fHOutMultV0Mnc","fHOutMultV0Mnc; Multiplicity V0",25000,0,25000);
943 fHOutMultV0Anc= new TH1F("fHOutMultV0Anc","fHOutMultV0Anc; Multiplicity V0",25000,0,25000);
944 fHOutMultV0Cnc= new TH1F("fHOutMultV0Cnc","fHOutMultV0Cnc; Multiplicity V0",25000,0,25000);
01974bd1 945 fHOutMultV0O = new TH1F("fHOutMultV0O","fHOutMultV0O; Multiplicity V0",40000,0,40000);
946 fHOutMultV0Cells = new TH2F("fHOutMultV0Cells","fHOutMultV0Cells",33,-0.5,32.5,33,-0.5,32.5);
947 fHOutMultFMD = new TH1F("fHOutMultFMD","fHOutMultFMD; Multiplicity FMD",24000,0,24000);
948 fHOutMultTRK = new TH1F("fHOutMultTRK","fHOutMultTRK; Multiplicity TPC",4000,0,4000);
949 fHOutMultTKL = new TH1F("fHOutMultTKL","fHOutMultTKL; Multiplicity tracklets",5000,0,5000);
950 fHOutMultCL0 = new TH1F("fHOutMultCL0","fHOutMultCL0; Multiplicity SPD inner",7000,0,7000);
951 fHOutMultCL1 = new TH1F("fHOutMultCL1","fHOutMultCL1; Multiplicity SPD outer",7000,0,7000);
952 fHOutMultCND = new TH1F("fHOutMultCND","fHOutMultCND; Multiplicity candle",4000,0,4000);
8432b617 953 fHOutMultNPA = new TH1F("fHOutMultNPA","fHOutMultNPA; Nparticipants",450,0,450);
3a19f64f 954 fHOutMultZNA = new TH1F("fHOutMultZNA","fHOutMultZNA; ZNA Energy",2000,0,2000);
955 fHOutMultZNC = new TH1F("fHOutMultZNC","fHOutMultZNC; ZNC Energy",2000,0,2000);
956 fHOutMultZPA = new TH1F("fHOutMultZPA","fHOutMultZPA; ZPA Energy",2000,0,2000);
957 fHOutMultZPC = new TH1F("fHOutMultZPC","fHOutMultZPC; ZPC Energy",2000,0,2000);
01974bd1 958
3a19f64f 959 fHOutMultV0MvsZDN = new TH2F("fHOutMultV0MvsZDN","fHOutMultV0MvsZDN; Multiplicity V0; Energy ZDC-N",500,0,1200,500,0,2000);
01974bd1 960 fHOutMultZEMvsZDN = new TH2F("fHOutMultZEMvsZDN","fHOutMultZEMvsZDN; Energy ZEM; Energy ZDC-N",500,0,2500,500,0,180000);
961 fHOutMultV0MvsZDC = new TH2F("fHOutMultV0MvsZDC","fHOutMultV0MvsZDC; Multiplicity V0; Energy ZDC",500,0,30000,500,0,200000);
962 fHOutMultZEMvsZDC = new TH2F("fHOutMultZEMvsZDC","fHOutMultZEMvsZDC; Energy ZEM; Energy ZDC",500,0,2500,500,0,200000);
963 fHOutMultZEMvsZDCw = new TH2F("fHOutMultZEMvsZDCw","fHOutMultZEMvsZDCw; Energy ZEM; Energy ZDC (weigthed with V0 percentile)",500,0,2500,500,0,200000);
964 fHOutMultV0MvsCL1 = new TH2F("fHOutMultV0MvsCL1","fHOutMultV0MvsCL1; Multiplicity V0; Multiplicity SPD outer",2500,0,30000,700,0,7000);
965 fHOutMultV0MvsTRK = new TH2F("fHOutMultV0MvsTRK","fHOutMultV0MvsTRK; Multiplicity V0; Multiplicity TPC",2500,0,30000,400,0,4000);
966 fHOutMultTRKvsCL1 = new TH2F("fHOutMultTRKvsCL1","fHOutMultTRKvsCL1; Multiplicity TPC; Multiplicity SPD outer",400,0,4000,700,0,7000);
967 fHOutMultV0MvsV0O = new TH2F("fHOutMultV0MvsV0O","fHOutMultV0MvsV0O; Multiplicity V0; Multiplicity V0 Online",500,0,30000,500,0,40000);
968 fHOutMultV0OvsCL1 = new TH2F("fHOutMultV0OvsCL1","fHOutMultV0OvsCL1; Multiplicity V0; Multiplicity SPD outer",500,0,40000,700,0,7000);
969 fHOutMultV0OvsTRK = new TH2F("fHOutMultV0OvsTRK","fHOutMultV0OvsTRK; Multiplicity V0; Multiplicity TPC",500,0,40000,400,0,4000);
970 fHOutMultV0MvsV0O = new TH2F("fHOutMultV0MvsV0O","fHOutMultV0MvsV0O; Multiplicity V0; Multiplicity V0 Online",500,0,30000,500,0,30000);
971 fHOutMultV0OvsCL1 = new TH2F("fHOutMultV0OvsCL1","fHOutMultV0OvsCL1; Multiplicity V0; Multiplicity SPD outer",2500,0,30000,700,0,7000);
972 fHOutMultV0OvsTRK = new TH2F("fHOutMultV0OvsTRK","fHOutMultV0OvsTRK; Multiplicity V0; Multiplicity TPC",2500,0,30000,400,0,4000);
973 fHOutMultCL1vsTKL = new TH2F ("fHOutMultCL1vsTKL","fHOutMultCL1vsTKL; Multiplicity SPD outer; Multiplicity tracklets",700,0,7000,700,0,7000);
bfbc1975 974 fHOutMultZNAvsZPA = new TH2F ("fHOutMultZNAvsZPA","fHOutMultZNAvsZPA; Energy ZNA; Energy ZPA",500,0,2000,500,0,2000);
01974bd1 975
976 fHOutCentV0Mqual1 = new TH1F("fHOutCentV0M_qual1","fHOutCentV0M_qual1; Centrality V0",505,0,101);
977 fHOutCentTRKqual1 = new TH1F("fHOutCentTRK_qual1","fHOutCentTRK_qual1; Centrality TPC",505,0,101);
978 fHOutCentCL1qual1 = new TH1F("fHOutCentCL1_qual1","fHOutCentCL1_qual1; Centrality SPD outer",505,0,101);
979 fHOutMultV0MvsCL1qual1 = new TH2F("fHOutMultV0MvsCL1_qual1","fHOutMultV0MvsCL1_qual1; Multiplicity V0; Multiplicity SPD outer",2500,0,25000,700,0,7000);
980 fHOutMultV0MvsTRKqual1 = new TH2F("fHOutMultV0MvsTRK_qual1","fHOutMultV0MvsTRK_qual1; Multiplicity V0; Multiplicity TPC",2500,0,25000,400,0,4000);
981 fHOutMultTRKvsCL1qual1 = new TH2F("fHOutMultTRKvsCL1_qual1","fHOutMultTRKvsCL1_qual1; Multiplicity TPC; Multiplicity SPD outer",400,0,4000,700,0,7000);
982
983 fHOutCentV0Mqual2 = new TH1F("fHOutCentV0M_qual2","fHOutCentV0M_qual2; Centrality V0",505,0,101);
984 fHOutCentTRKqual2 = new TH1F("fHOutCentTRK_qual2","fHOutCentTRK_qual2; Centrality TPC",505,0,101);
985 fHOutCentCL1qual2 = new TH1F("fHOutCentCL1_qual2","fHOutCentCL1_qual2; Centrality SPD outer",505,0,101);
986 fHOutMultV0MvsCL1qual2 = new TH2F("fHOutMultV0MvsCL1_qual2","fHOutMultV0MvsCL1_qual2; Multiplicity V0; Multiplicity SPD outer",2500,0,25000,700,0,7000);
987 fHOutMultV0MvsTRKqual2 = new TH2F("fHOutMultV0MvsTRK_qual2","fHOutMultV0MvsTRK_qual2; Multiplicity V0; Multiplicity TPC",2500,0,25000,400,0,4000);
988 fHOutMultTRKvsCL1qual2 = new TH2F("fHOutMultTRKvsCL1_qual2","fHOutMultTRKvsCL1_qual2; Multiplicity TPC; Multiplicity SPD outer",400,0,4000,700,0,7000);
989
990 fHOutQuality = new TH1F("fHOutQuality", "fHOutQuality", 100,-0.5,99.5);
991 fHOutVertex = new TH1F("fHOutVertex", "fHOutVertex", 100,-20,20);
992 fHOutVertexT0 = new TH1F("fHOutVertexT0", "fHOutVertexT0", 100,-20,20);
993
377e5a61 994 fOutputList->Add(fHOutCentV0M);
995 fOutputList->Add(fHOutCentV0A);
2d12adde 996 fOutputList->Add(fHOutCentV0A123);
377e5a61 997 fOutputList->Add(fHOutCentV0C);
1a9bd911 998 fOutputList->Add(fHOutCentV0MEq);
999 fOutputList->Add(fHOutCentV0AEq);
1000 fOutputList->Add(fHOutCentV0CEq);
377e5a61 1001 fOutputList->Add(fHOutCentV0MCVHN);
1002 fOutputList->Add(fHOutCentV0MCVLN);
1003 fOutputList->Add(fHOutCentV0MCVHNinMB);
1004 fOutputList->Add(fHOutCentV0MCVLNinMB);
1005 fOutputList->Add(fHOutCentV0MCCENT);
1006 fOutputList->Add(fHOutCentV0MCSEMI);
1007 fOutputList->Add(fHOutCentV0MCCENTinMB);
1008 fOutputList->Add(fHOutCentV0MCSEMIinMB);
1009 fOutputList->Add(fHOutCentV0MMSL);
1010 fOutputList->Add(fHOutCentV0MMSH);
1011 fOutputList->Add(fHOutCentV0MMUL);
1012 fOutputList->Add(fHOutCentV0MMLL);
1013 fOutputList->Add(fHOutCentV0MEJE);
1014 fOutputList->Add(fHOutCentV0MEGA);
1015 fOutputList->Add(fHOutCentV0MPHS);
1016 fOutputList->Add(fHOutCentV0MMSLinMB);
1017 fOutputList->Add(fHOutCentV0MMSHinMB);
1018 fOutputList->Add(fHOutCentV0MMULinMB);
1019 fOutputList->Add(fHOutCentV0MMLLinMB);
1020 fOutputList->Add(fHOutCentV0MEJEinMB);
1021 fOutputList->Add(fHOutCentV0MEGAinMB);
1022 fOutputList->Add(fHOutCentV0MPHSinMB);
1023 fOutputList->Add(fHOutCentFMD);
1024 fOutputList->Add(fHOutCentTRK);
1025 fOutputList->Add(fHOutCentTKL);
1026 fOutputList->Add(fHOutCentCL0);
1027 fOutputList->Add(fHOutCentCL1);
1028 fOutputList->Add(fHOutCentCND);
1029 fOutputList->Add(fHOutCentNPA);
1030 fOutputList->Add(fHOutCentZNA);
1a9bd911 1031 fOutputList->Add(fHOutCentZNC);
3a19f64f 1032 fOutputList->Add(fHOutCentZPA);
1033 fOutputList->Add(fHOutCentZPC);
377e5a61 1034 fOutputList->Add(fHOutCentV0MvsFMD);
1035 fOutputList->Add(fHOutCentTKLvsV0M);
1036 fOutputList->Add(fHOutCentZEMvsZDC);
1037 fOutputList->Add(fHOutCentV0MvsCentCL1);
1038 fOutputList->Add(fHOutCentV0MvsCentTRK);
1039 fOutputList->Add(fHOutCentTRKvsCentCL1);
1040 fOutputList->Add(fHOutCentV0MvsCentZDC);
1041 fOutputList->Add(fHOutCentV0AvsCentV0C);
1042 fOutputList->Add(fHOutCentV0AvsCentTRK);
1043 fOutputList->Add(fHOutCentV0AvsCentCND);
1044 fOutputList->Add(fHOutCentV0AvsCentCL1);
1045 fOutputList->Add(fHOutCentV0CvsCentTRK);
1046 fOutputList->Add(fHOutCentV0CvsCentCND);
1047 fOutputList->Add(fHOutCentV0CvsCentCL1);
1048 fOutputList->Add(fHOutCentNPAvsCentV0A);
1049 fOutputList->Add(fHOutCentNPAvsCentV0C);
1050 fOutputList->Add(fHOutCentNPAvsCentTRK);
1051 fOutputList->Add(fHOutCentNPAvsCentCND);
1052 fOutputList->Add(fHOutCentNPAvsCentCL1);
1053 fOutputList->Add(fHOutCentZNAvsCentV0A);
1054 fOutputList->Add(fHOutCentZNAvsCentV0C);
1055 fOutputList->Add(fHOutCentZNAvsCentTRK);
1056 fOutputList->Add(fHOutCentZNAvsCentCND);
1057 fOutputList->Add(fHOutCentZNAvsCentCL1);
bfbc1975 1058 fOutputList->Add(fHOutCentZNAvsCentZPA);
377e5a61 1059
1060 fOutputList->Add(fHOutMultV0AC);
1061 fOutputList->Add(fHOutMultV0M);
1062 fOutputList->Add(fHOutMultV0A);
2d12adde 1063 fOutputList->Add(fHOutMultV0A123);
377e5a61 1064 fOutputList->Add(fHOutMultV0C);
7c928baf 1065 fOutputList->Add(fHOutMultV0MEq);
1066 fOutputList->Add(fHOutMultV0AEq);
1067 fOutputList->Add(fHOutMultV0CEq);
377e5a61 1068 fOutputList->Add(fHOutMultV0Mnc);
1069 fOutputList->Add(fHOutMultV0Anc);
1070 fOutputList->Add(fHOutMultV0Cnc);
1071 fOutputList->Add(fHOutMultV0O);
1072 fOutputList->Add(fHOutMultV0Cells) ;
1073 fOutputList->Add(fHOutMultFMD);
1074 fOutputList->Add(fHOutMultTRK);
1075 fOutputList->Add(fHOutMultTKL);
1076 fOutputList->Add(fHOutMultCL0);
1077 fOutputList->Add(fHOutMultCL1);
1078 fOutputList->Add(fHOutMultCND);
1079 fOutputList->Add(fHOutMultNPA);
1080 fOutputList->Add(fHOutMultZNA);
7c928baf 1081 fOutputList->Add(fHOutMultZNC);
3a19f64f 1082 fOutputList->Add(fHOutMultZPA);
1083 fOutputList->Add(fHOutMultZPC);
377e5a61 1084 fOutputList->Add(fHOutMultV0MvsZDN);
1085 fOutputList->Add(fHOutMultZEMvsZDN);
1086 fOutputList->Add(fHOutMultV0MvsZDC);
1087 fOutputList->Add(fHOutMultZEMvsZDC);
1088 fOutputList->Add(fHOutMultZEMvsZDCw);
1089 fOutputList->Add(fHOutMultV0MvsCL1);
1090 fOutputList->Add(fHOutMultV0MvsTRK);
1091 fOutputList->Add(fHOutMultTRKvsCL1);
1092 fOutputList->Add(fHOutMultV0MvsV0O);
1093 fOutputList->Add(fHOutMultV0OvsCL1);
1094 fOutputList->Add(fHOutMultV0OvsTRK);
1095 fOutputList->Add(fHOutMultCL1vsTKL);
bfbc1975 1096 fOutputList->Add(fHOutMultZNAvsZPA);
377e5a61 1097 fOutputList->Add(fHOutCentV0Mqual1);
1098 fOutputList->Add(fHOutCentTRKqual1);
1099 fOutputList->Add(fHOutCentCL1qual1);
1100 fOutputList->Add(fHOutMultV0MvsCL1qual1);
1101 fOutputList->Add(fHOutMultV0MvsTRKqual1);
1102 fOutputList->Add(fHOutMultTRKvsCL1qual1);
1103 fOutputList->Add(fHOutCentV0Mqual2);
1104 fOutputList->Add(fHOutCentTRKqual2);
1105 fOutputList->Add(fHOutCentCL1qual2);
1106 fOutputList->Add(fHOutMultV0MvsCL1qual2);
1107 fOutputList->Add(fHOutMultV0MvsTRKqual2);
1108 fOutputList->Add(fHOutMultTRKvsCL1qual2);
1109 fOutputList->Add(fHOutQuality);
1110 fOutputList->Add(fHOutVertex);
1111 fOutputList->Add(fHOutVertexT0);
01974bd1 1112
1113 PostData(1, fOutputList);
1114 }
1115
1116 fTrackCuts = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
2d27827d 1117 fEsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011();
1118 fEsdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kOff);
1119 // Add SPD requirement
1120 fEsdTrackCutsExtra1 = new AliESDtrackCuts("SPD", "Require 1 cluster in SPD");
1121 fEsdTrackCutsExtra1->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
1122 // Add SDD requirement
1123 fEsdTrackCutsExtra2 = new AliESDtrackCuts("SDD", "Require 1 cluster in first layer SDD");
1124 fEsdTrackCutsExtra2->SetClusterRequirementITS(AliESDtrackCuts::kSDD,AliESDtrackCuts::kFirst);
01974bd1 1125}
1126
1127//________________________________________________________________________
1128void AliCentralitySelectionTask::UserExec(Option_t */*option*/)
1129{
1130 // Execute analysis for current event:
1131 if(fDebug>1) printf(" **** AliCentralitySelectionTask::UserExec() \n");
1132
c932ac15 1133 Int_t runType = 0; // 0:PbPb, 1:pPb or Pbp
1134
01974bd1 1135 Float_t zncEnergy = 0.; // ZNC Energy
1136 Float_t zpcEnergy = 0.; // ZPC Energy
1137 Float_t znaEnergy = 0.; // ZNA Energy
1138 Float_t zpaEnergy = 0.; // ZPA Energy
1139 Float_t zem1Energy = 0.; // ZEM1 Energy
1140 Float_t zem2Energy = 0.; // ZEM2 Energy
1141 Bool_t zdcEnergyCal = kFALSE; // if zdc is calibrated (in pass2)
99029fba 1142 Double_t znaTower = 0.; // common PMT of ZNA
3a19f64f 1143 Double_t zncTower = 0.; // common PMT of ZNC
1144 Double_t zpaTower = 0.; // common PMT of ZPA
1145 Double_t zpcTower = 0.; // common PMT of ZPC
99029fba 1146 Bool_t znaFired = kFALSE;
f9a774f9 1147 Bool_t zncFired = kFALSE;
3a19f64f 1148 Bool_t zpaFired = kFALSE;
1149 Bool_t zpcFired = kFALSE;
01974bd1 1150
1151 Int_t nTracks = 0; // no. tracks
1152 Int_t nTracklets = 0; // no. tracklets
1153 Int_t nClusters[6] = {0}; // no. clusters on 6 ITS layers
377e5a61 1154 Int_t nChips[2] = {0,0}; // no. chips on 2 SPD layers
01974bd1 1155 Float_t spdCorr =0; // corrected spd2 multiplicity
1156 Int_t multCND = 0; // no. tracks (candle condition)
1157
2d12adde 1158 Float_t multV0A123 = 0; // multiplicity from V0 reco side A (ring 1-2-3)
01974bd1 1159 Float_t multV0A = 0; // multiplicity from V0 reco side A
1160 Float_t multV0C = 0; // multiplicity from V0 reco side C
f9a774f9 1161 Float_t multV0AEq = 0; // multiplicity from V0 reco side A
1162 Float_t multV0CEq = 0; // multiplicity from V0 reco side C
e1d58f75 1163 Float_t multV0ACorr = 0; // multiplicity from V0 reco side A
1164 Float_t multV0CCorr = 0; // multiplicity from V0 reco side C
01974bd1 1165 Short_t multV0AOnline = 0; // multiplicity from V0 reco side A
1166 Short_t multV0COnline = 0; // multiplicity from V0 reco side C
8432b617 1167 Float_t v0Corr = 0; // corrected V0 multiplicity (used for MC)
01974bd1 1168 Int_t nV0A = 0;
1169 Int_t nV0C = 0;
1170
1171 Float_t multFMDA = 0; // multiplicity from FMD on detector A
1172 Float_t multFMDC = 0; // multiplicity from FMD on detector C
1173
1174 Float_t zvtx =0; // z-vertex SPD
1175 Int_t zvtxNcont =0; // contributors to z-vertex SPD
1176
1177 Float_t zvtxT0 =0; // z-vertex T0
1178
8432b617 1179 Int_t Npart =0; // N. of participants (true MC)
01974bd1 1180
1181 AliCentrality *esdCent = 0;
1182
377e5a61 1183 AliVEvent *event = InputEvent();
1184 AliESDEvent *esd = dynamic_cast<AliESDEvent*>(event);
1185 AliAODEvent *aod = dynamic_cast<AliAODEvent*>(event);
01974bd1 1186 if(fAnalysisInput.CompareTo("ESD")==0){
01974bd1 1187 if (!esd) {
1188 AliError("No ESD Event");
1189 return;
1190 }
377e5a61 1191 } else if(fAnalysisInput.CompareTo("AOD")==0){
1192 if (!aod) {
1193 AliError("No AOD Event");
01974bd1 1194 return;
1195 }
377e5a61 1196 }
1197 LoadBranches();
1198
1199 if (SetupRun(event)<0) {
1200 AliError("Centrality File not available for this run");
1201 return;
1202 }
1203
1204 if (esd) {
c932ac15 1205 if (strcmp(esd->GetESDRun()->GetBeamType(), "A-A") == 0) runType=0;
1206 else runType=1;
377e5a61 1207 } else {
1208 Int_t runNumber = event->GetRunNumber();
1209 if ((runNumber >= 136851 && runNumber <= 139517) || // LHC10h
1210 (runNumber >= 166529 && runNumber <= 170593)) // LHC11h
1211 runType=0;
1212 }
c932ac15 1213
377e5a61 1214 esdCent = event->GetCentrality();
01974bd1 1215
377e5a61 1216 // ***** Vertex Info
1217 if (esd) {
e1d58f75 1218 const AliESDVertex* vtxESD = esd->GetPrimaryVertexSPD();
1219 zvtx = vtxESD->GetZ();
1220 zvtxNcont = vtxESD->GetNContributors();
377e5a61 1221 } else {
1222 const AliAODVertex* spdVtx = aod->GetPrimaryVertexSPD();
1223 zvtx = spdVtx->GetZ();
1224 zvtxNcont = spdVtx->GetNContributors();
1225 }
e1d58f75 1226
01974bd1 1227 // ***** V0 info
377e5a61 1228 AliVVZERO* esdV0 = event->GetVZEROData();
1229 if (!esdV0) {
1230 AliError("AliVVZERO not available");
1231 return;
1232 }
e1d58f75 1233
377e5a61 1234 multV0A=esdV0->GetMTotV0A();
1235 multV0C=esdV0->GetMTotV0C();
e1d58f75 1236
2d12adde
AM
1237 // excluding innermost V0A ring
1238 for (int i=40; i<64; i++)
1239 multV0A123 += esdV0->GetMultiplicity(i);
1240
377e5a61 1241 multV0ACorr = AliESDUtils::GetCorrV0A(multV0A,zvtx);
1242 multV0CCorr = AliESDUtils::GetCorrV0C(multV0C,zvtx);
01974bd1 1243
3a19f64f 1244 v0Corr = multV0A+multV0C; // Todo: C.L. not clear why here we do not use the sum of the corrected values?
01974bd1 1245
377e5a61 1246 multV0AOnline=esdV0->GetTriggerChargeA();
1247 multV0COnline=esdV0->GetTriggerChargeC();
1248
1249 // Count V0 flags
1250 for(Int_t i = 0; i < 32; ++i) {
1251 if (esdV0->GetBBFlag(i)) nV0C++;
1252 if (esdV0->GetBBFlag(i+32)) nV0A++;
1253 }
01974bd1 1254
f9a774f9 1255 // Equalized signals
1256 multV0AEq=0.;
1257 multV0CEq=0.;
1258 for(Int_t iCh = 4; iCh < 7; ++iCh) {
1259 Double_t mult = esd->GetVZEROEqMultiplicity(iCh);
1260 multV0AEq += mult;
1261 }
1262 for(Int_t iCh = 0; iCh < 3; ++iCh) {
1263 Double_t mult = esd->GetVZEROEqMultiplicity(iCh);
1264 multV0CEq += mult;
1265 }
3a19f64f 1266
377e5a61 1267 Bool_t kT0BB = kFALSE;
1268 if (esd) {
01974bd1 1269 // ***** T0 info
1270 const AliESDTZERO* esdT0 = esd->GetESDTZERO();
1271 if (!esdT0)
1272 {
1273 AliError("AliESDTZERO not available");
1274 return;
1275 }
1276 Int_t trig=esdT0->GetT0Trig();
01974bd1 1277 if(trig&1) kT0BB=kTRUE;
1278 zvtxT0=esdT0->GetT0zVertex();
377e5a61 1279 } else {
1280 const AliAODTZERO* esdT0 = aod->GetTZEROData();
1281 if (!esdT0)
1282 {
1283 AliError("AliAODTZERO not available");
1284 return;
1285 }
3a19f64f 1286 Int_t trig=1;//esdT0->GetT0Trig(); //* Todo: C.L. This info is not in AOD? */
377e5a61 1287 if(trig&1) kT0BB=kTRUE;
1288 zvtxT0=esdT0->GetT0zVertex();
1289 }
01974bd1 1290
377e5a61 1291 // ***** Trigger info
1292 fIsSelected = ((esdV0->GetV0ADecision()==1) && (esdV0->GetV0CDecision()==1));
1293 TString trigStr;
1294 if (esd)
1295 trigStr = esd->GetFiredTriggerClasses();
1296 else
1297 trigStr = aod->GetFiredTriggerClasses();
01974bd1 1298
377e5a61 1299 fMB=kFALSE;
1300 fCVHN=kFALSE; fCVLN=kFALSE; fCCENT=kFALSE; fCSEMI=kFALSE;
1301 fMSL=kFALSE; fMSH=kFALSE; fMUL=kFALSE; fMLL=kFALSE;
1302 fEJE=kFALSE; fEGA=kFALSE; fPHS=kFALSE;
1303
1304 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CPBI")) && (fIsSelected))
1305 fMB=kTRUE;
1306 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CVHN")) && (fIsSelected))
1307 fCVHN=kTRUE;
1308 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CVLN")) && (fIsSelected))
1309 fCVLN=kTRUE;
1310 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CCENT")) && (fIsSelected))
1311 fCCENT=kTRUE;
1312 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CSEMI")) && (fIsSelected))
1313 fCSEMI=kTRUE;
01974bd1 1314
377e5a61 1315 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CPBI1MSL")) && (fIsSelected))
1316 fMSL=kTRUE;
1317 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CPBI1MSH")) && (fIsSelected))
1318 fMSH=kTRUE;
1319 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CPBI1MUL")) && (fIsSelected))
1320 fMUL=kTRUE;
1321 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CPBI1MLL")) && (fIsSelected))
1322 fMLL=kTRUE;
1323 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CPBI1EJE")) && (fIsSelected))
1324 fEJE=kTRUE;
1325 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CPBI1EGA")) && (fIsSelected))
1326 fEGA=kTRUE;
1327 if ( (trigStr.Contains("-B-")) && (trigStr.Contains("CPBI1PHS")) && (fIsSelected))
1328 fPHS=kTRUE;
1329
1330 fCVHNbit=kFALSE; fCVLNbit=kFALSE; fCCENTbit=kFALSE; fCSEMIbit=kFALSE;
1331 if (esdV0->GetTriggerBits() & (1<<8))
1332 fCVHNbit=kTRUE;
1333 if (esdV0->GetTriggerBits() & (1<<6))
1334 fCVLNbit=kTRUE;
01974bd1 1335
377e5a61 1336 if (kT0BB && fCVHNbit)
1337 fCCENTbit=kTRUE;
1338 if (kT0BB && fCVLNbit)
1339 fCSEMIbit=kTRUE;
01974bd1 1340
377e5a61 1341 if (esd) {
01974bd1 1342 // ***** CB info (tracklets, clusters, chips)
1343 //nTracks = event->GetNumberOfTracks();
1344 nTracks = fTrackCuts ? (Short_t)fTrackCuts->GetReferenceMultiplicity(esd,kTRUE):-1;
377e5a61 1345 } else {
1346 AliAODHeader *h = aod->GetHeader();
1347 nTracks = h!=0 ? (Short_t)h->GetTPConlyRefMultiplicity():-1;
1348 }
2d27827d 1349
377e5a61 1350 if (esd) {
01974bd1 1351 Short_t nTrTPCcandle = 0;
1352 for (Int_t iTracks = 0; iTracks < esd->GetNumberOfTracks(); iTracks++) {
2d27827d 1353
01974bd1 1354 AliESDtrack* track = esd->GetTrack(iTracks);
1355 if (!track) continue;
2d27827d 1356
1357 if (! fEsdTrackCuts->IsSelected(track) )continue;
1358
1359 if (fEsdTrackCutsExtra1 && fEsdTrackCutsExtra2 &&
1360 !fEsdTrackCutsExtra1->IsSelected(track) &&
1361 !fEsdTrackCutsExtra2->IsSelected(track)) continue;
1362
1363 if (track->Pt() > 0.4 && TMath::Abs(track->Eta()) < 0.9) nTrTPCcandle++;
01974bd1 1364 }
1365 multCND = nTrTPCcandle;
377e5a61 1366 } else {
1367 Short_t nTrTPCcandle = 0;
1368 for (Int_t iTracks = 0; iTracks < aod->GetNumberOfTracks(); iTracks++) {
1369
1370 AliAODTrack* track = aod->GetTrack(iTracks);
1371
1372 if (!track) continue;
1373 if (!track->TestFilterBit(1<<5) &&
1374 !track->TestFilterBit(1<<6)) continue;
1375
1376 if (track->Pt() > 0.4 && TMath::Abs(track->Eta()) < 0.9) nTrTPCcandle++;
1377 }
1378 multCND = nTrTPCcandle;
1379 }
01974bd1 1380
377e5a61 1381 if (esd) {
01974bd1 1382 const AliMultiplicity *mult = esd->GetMultiplicity();
1383 nTracklets = mult->GetNumberOfTracklets();
1384
1385 for(Int_t ilay=0; ilay<6; ilay++){
1386 nClusters[ilay] = mult->GetNumberOfITSClusters(ilay);
1387 }
1388
1389 for(Int_t ilay=0; ilay<2; ilay++){
1390 nChips[ilay] = mult->GetNumberOfFiredChips(ilay);
1391 }
377e5a61 1392 } else {
1393 AliAODTracklets *mult = aod->GetTracklets();
1394 nTracklets = mult->GetNumberOfTracklets();
1395 AliAODHeader *h = aod->GetHeader();
1396 for(Int_t ilay=0; ilay<6; ilay++){
1397 nClusters[ilay] = h->GetNumberOfITSClusters(ilay);
1398 }
1399 }
1400 spdCorr = AliESDUtils::GetCorrSPD2(nClusters[1],zvtx);
1401
1402 if (esd) {
01974bd1 1403 // ***** FMD info
1404 AliESDFMD *fmd = esd->GetFMDData();
1405 Float_t totalMultA = 0;
1406 Float_t totalMultC = 0;
1407 const Float_t fFMDLowCut = 0.4;
1408
1409 for(UShort_t det=1;det<=3;det++) {
1410 Int_t nRings = (det==1 ? 1 : 2);
1411 for (UShort_t ir = 0; ir < nRings; ir++) {
1412 Char_t ring = (ir == 0 ? 'I' : 'O');
1413 UShort_t nsec = (ir == 0 ? 20 : 40);
1414 UShort_t nstr = (ir == 0 ? 512 : 256);
1415 for(UShort_t sec =0; sec < nsec; sec++) {
1416 for(UShort_t strip = 0; strip < nstr; strip++) {
1417
1418 Float_t fmdMult = fmd->Multiplicity(det,ring,sec,strip);
1419 if(fmdMult == 0 || fmdMult == AliESDFMD::kInvalidMult) continue;
1420
1421 Float_t nParticles=0;
1422
1423 if(fmdMult > fFMDLowCut) {
1424 nParticles = 1.;
1425 }
1426
1427 if (det<3) totalMultA = totalMultA + nParticles;
1428 else totalMultC = totalMultC + nParticles;
1429
1430 }
1431 }
1432 }
1433 }
1434 multFMDA = totalMultA;
1435 multFMDC = totalMultC;
377e5a61 1436 }
1437
1438 if (esd) {
01974bd1 1439 // ***** ZDC info
1440 AliESDZDC *esdZDC = esd->GetESDZDC();
1441 zdcEnergyCal = esdZDC->AliESDZDC::TestBit(AliESDZDC::kEnergyCalibratedSignal);
1442 if (zdcEnergyCal) {
1443 zncEnergy = (Float_t) (esdZDC->GetZDCN1Energy());
1444 zpcEnergy = (Float_t) (esdZDC->GetZDCP1Energy());
1445 znaEnergy = (Float_t) (esdZDC->GetZDCN2Energy());
1446 zpaEnergy = (Float_t) (esdZDC->GetZDCP2Energy());
1447 } else {
1448 zncEnergy = (Float_t) (esdZDC->GetZDCN1Energy())/8.;
1449 zpcEnergy = (Float_t) (esdZDC->GetZDCP1Energy())/8.;
1450 znaEnergy = (Float_t) (esdZDC->GetZDCN2Energy())/8.;
1451 zpaEnergy = (Float_t) (esdZDC->GetZDCP2Energy())/8.;
1452 }
1453 zem1Energy = (Float_t) (esdZDC->GetZDCEMEnergy(0))/8.;
1454 zem2Energy = (Float_t) (esdZDC->GetZDCEMEnergy(1))/8.;
99029fba 1455
f9a774f9 1456 for (Int_t j = 0; j < 4; ++j)
1457 if (esdZDC->GetZDCTDCData(12,j) != 0)
99029fba 1458 znaFired = kTRUE;
f9a774f9 1459
1460 for (Int_t j = 0; j < 4; ++j)
1461 if (esdZDC->GetZDCTDCData(10,j) != 0)
1462 zncFired = kTRUE;
1463
3a19f64f 1464 for (Int_t j = 0; j < 4; ++j)
1465 if (esdZDC->GetZDCTDCData(13,j) != 0)
1466 zpaFired = kTRUE;
1467
1468 for (Int_t j = 0; j < 4; ++j)
1469 if (esdZDC->GetZDCTDCData(11,j) != 0)
1470 zpcFired = kTRUE;
1471
bfbc1975 1472 const Double_t *ZNAtower = esdZDC->GetZN2TowerEnergy();
1473 const Double_t *ZNCtower = esdZDC->GetZN1TowerEnergy();
1474 const Double_t *ZPAtower = esdZDC->GetZP2TowerEnergy();
1475 const Double_t *ZPCtower = esdZDC->GetZP1TowerEnergy();
1476 if (znaFired) znaTower = ZNAtower[0];
1477 if (zncFired) zncTower = ZNCtower[0];
1478 if (zpaFired) zpaTower = ZPAtower[0];
1479 if (zpcFired) zpcTower = ZPCtower[0];
1480
377e5a61 1481 } else {
1482 AliAODHeader *h = aod->GetHeader();
3a19f64f 1483 zncEnergy = (Float_t) (h->GetZDCN1Energy());
1484 zpcEnergy = (Float_t) (h->GetZDCP1Energy());
1485 znaEnergy = (Float_t) (h->GetZDCN2Energy());
1486 zpaEnergy = (Float_t) (h->GetZDCP2Energy());
377e5a61 1487 zem1Energy = (Float_t) (h->GetZDCEMEnergy(0))/8.; //Todo: C.L. Should we devide here by 8? It is done in the ESD case!
1488 zem2Energy = (Float_t) (h->GetZDCEMEnergy(1))/8.;
1489
1490 AliAODZDC *aodZDC = aod->GetZDCData();
1491 const Double_t *ZNAtower = aodZDC->GetZNATowerEnergy();
3a19f64f 1492 const Double_t *ZNCtower = aodZDC->GetZNCTowerEnergy();
1493 const Double_t *ZPAtower = aodZDC->GetZPATowerEnergy();
1494 const Double_t *ZPCtower = aodZDC->GetZPCTowerEnergy();
377e5a61 1495 znaTower = ZNAtower[0];
666dc076 1496 zncTower = ZNCtower[0];
3a19f64f 1497 zpaTower = ZPAtower[0];
1498 zpcTower = ZPCtower[0];
377e5a61 1499
1500 znaFired = kFALSE; // trick because info is not stored in AOD
666dc076 1501 zncFired = kFALSE; // trick because info is not stored in AOD
3a19f64f 1502 zpaFired = kFALSE; // trick because info is not stored in AOD
1503 zpcFired = kFALSE; // trick because info is not stored in AOD
1504 if (esdCent->GetCentralityPercentile("ZNA") != 101) znaFired = kTRUE;
1505 if (esdCent->GetCentralityPercentile("ZNC") != 101) zncFired = kTRUE;
1506 if (esdCent->GetCentralityPercentile("ZPA") != 101) zpaFired = kTRUE;
1507 if (esdCent->GetCentralityPercentile("ZPC") != 101) zpcFired = kTRUE;
377e5a61 1508 }
1509
1510 if (esd) {
99029fba 1511 // ***** MC info
1512 AliAnalysisManager* anMan = AliAnalysisManager::GetAnalysisManager();
1513 AliMCEventHandler* eventHandler = (AliMCEventHandler*)anMan->GetMCtruthEventHandler();
3a19f64f 1514 AliStack* stack=0;
99029fba 1515 AliMCEvent* mcEvent=0;
3a19f64f 1516 if (fIsMCInput && eventHandler && (mcEvent=eventHandler->MCEvent()) && (stack=mcEvent->Stack())) {
99029fba 1517 AliGenHijingEventHeader* hHijing=0;
9b389d09 1518 AliGenDPMjetEventHeader* dpmHeader=0;
1519
99029fba 1520 AliGenEventHeader* mcGenH = mcEvent->GenEventHeader();
74b0bf85 1521 if (mcGenH->InheritsFrom(AliGenHijingEventHeader::Class()))
1522 hHijing = (AliGenHijingEventHeader*)mcGenH;
99029fba 1523 else if (mcGenH->InheritsFrom(AliGenCocktailEventHeader::Class())) {
1524 TList* headers = ((AliGenCocktailEventHeader*)mcGenH)->GetHeaders();
3a19f64f 1525 //headers->Print();
99029fba 1526 hHijing = dynamic_cast<AliGenHijingEventHeader*>(headers->FindObject("Hijing"));
74b0bf85 1527 if (!hHijing) hHijing = dynamic_cast<AliGenHijingEventHeader*>(headers->FindObject("Hijing pPb_0"));
3ef9b178 1528 if (!hHijing) hHijing = dynamic_cast<AliGenHijingEventHeader*>(headers->FindObject("Hijing_0"));
99029fba 1529 }
9b389d09 1530 else if (mcGenH->InheritsFrom(AliGenDPMjetEventHeader::Class())) {
1531 dpmHeader = (AliGenDPMjetEventHeader*)mcGenH;
99029fba 1532 }
74b0bf85 1533 if(hHijing) Npart = hHijing->ProjectileParticipants()+hHijing->TargetParticipants();
1534 if(dpmHeader) Npart = dpmHeader->ProjectileParticipants()+ dpmHeader->TargetParticipants();
8432b617 1535 }
01974bd1 1536 }
1537
1538 // ***** Scaling for MC
1539 if (fIsMCInput) {
1540 fUseScaling=kFALSE;
1541 v0Corr = Short_t((multV0A+multV0C) * fV0MScaleFactorMC);
bfd47aba 1542 multV0A = multV0A * fV0MScaleFactorMC;
1543 multV0C = multV0C * fV0MScaleFactorMC;
01974bd1 1544 }
1545 // ***** Scaling for Data
1546 if (fUseScaling) {
1547 v0Corr = Short_t(v0Corr / fV0MScaleFactor);
1548 spdCorr = spdCorr / fSPDScaleFactor;
1549 nTracks = Int_t(nTracks / fTPCScaleFactor);
1550 }
1551
1552 // ***** Centrality Selection
1553 if(fHtempV0M) fCentV0M = fHtempV0M->GetBinContent(fHtempV0M->FindBin((v0Corr)));
e1d58f75 1554 if(fHtempV0A) fCentV0A = fHtempV0A->GetBinContent(fHtempV0A->FindBin((multV0ACorr)));
2d12adde 1555 if(fHtempV0A123) fCentV0A123 = fHtempV0A123->GetBinContent(fHtempV0A123->FindBin((multV0A123)));
e1d58f75 1556 if(fHtempV0C) fCentV0C = fHtempV0C->GetBinContent(fHtempV0C->FindBin((multV0CCorr)));
f9a774f9 1557 if(fHtempV0MEq) fCentV0MEq = fHtempV0MEq->GetBinContent(fHtempV0MEq->FindBin((multV0AEq+multV0CEq)));
1558 if(fHtempV0AEq) fCentV0AEq = fHtempV0AEq->GetBinContent(fHtempV0AEq->FindBin((multV0AEq)));
1559 if(fHtempV0CEq) fCentV0CEq = fHtempV0CEq->GetBinContent(fHtempV0CEq->FindBin((multV0CEq)));
01974bd1 1560 if(fHtempFMD) fCentFMD = fHtempFMD->GetBinContent(fHtempFMD->FindBin((multFMDA+multFMDC)));
1561 if(fHtempTRK) fCentTRK = fHtempTRK->GetBinContent(fHtempTRK->FindBin(nTracks));
1562 if(fHtempTKL) fCentTKL = fHtempTKL->GetBinContent(fHtempTKL->FindBin(nTracklets));
1563 if(fHtempCL0) fCentCL0 = fHtempCL0->GetBinContent(fHtempCL0->FindBin(nClusters[0]));
1564 if(fHtempCL1) fCentCL1 = fHtempCL1->GetBinContent(fHtempCL1->FindBin(spdCorr));
1565 if(fHtempCND) fCentCND = fHtempCND->GetBinContent(fHtempCND->FindBin(multCND));
99029fba 1566 if(fHtempZNA) {
1567 if(znaFired) fCentZNA = fHtempZNA->GetBinContent(fHtempZNA->FindBin(znaTower));
1568 else fCentZNA = 101;
1569 }
f9a774f9 1570 if(fHtempZNC) {
1571 if(zncFired) fCentZNC = fHtempZNC->GetBinContent(fHtempZNC->FindBin(zncTower));
1572 else fCentZNC = 101;
1573 }
3a19f64f 1574 if(fHtempZPA) {
1575 if(znaFired) fCentZPA = fHtempZPA->GetBinContent(fHtempZPA->FindBin(zpaTower));
1576 else fCentZPA = 101;
1577 }
1578 if(fHtempZPC) {
1579 if(zpcFired) fCentZPC = fHtempZPC->GetBinContent(fHtempZPC->FindBin(zpcTower));
1580 else fCentZPC = 101;
1581 }
1582
1583
01974bd1 1584 if(fHtempV0MvsFMD) fCentV0MvsFMD = fHtempV0MvsFMD->GetBinContent(fHtempV0MvsFMD->FindBin((multV0A+multV0C)));
1585 if(fHtempTKLvsV0M) fCentTKLvsV0M = fHtempTKLvsV0M->GetBinContent(fHtempTKLvsV0M->FindBin(nTracklets));
1586 if(fHtempZEMvsZDC) fCentZEMvsZDC = fHtempZEMvsZDC->GetBinContent(fHtempZEMvsZDC->FindBin(zem1Energy+zem2Energy,zncEnergy+znaEnergy+zpcEnergy+zpaEnergy));
1587
39a3e400 1588 if(fHtempNPA) fCentNPA = fHtempNPA->GetBinContent(fHtempNPA->FindBin(Npart));
1589 if(fHtempV0Mtrue) fCentV0Mtrue = fHtempV0Mtrue->GetBinContent(fHtempV0Mtrue->FindBin((multV0ACorr+multV0CCorr)));
1590 if(fHtempV0Atrue) fCentV0Atrue = fHtempV0Atrue->GetBinContent(fHtempV0Atrue->FindBin((multV0ACorr)));
1591 if(fHtempV0Ctrue) fCentV0Ctrue = fHtempV0Ctrue->GetBinContent(fHtempV0Ctrue->FindBin((multV0CCorr)));
f9a774f9 1592 if(fHtempV0MEqtrue) fCentV0MEqtrue = fHtempV0MEqtrue->GetBinContent(fHtempV0MEqtrue->FindBin((multV0AEq+multV0CEq)));
1593 if(fHtempV0AEqtrue) fCentV0AEqtrue = fHtempV0AEqtrue->GetBinContent(fHtempV0AEqtrue->FindBin((multV0AEq)));
1594 if(fHtempV0CEqtrue) fCentV0CEqtrue = fHtempV0CEqtrue->GetBinContent(fHtempV0CEqtrue->FindBin((multV0CEq)));
39a3e400 1595 if(fHtempFMDtrue) fCentFMDtrue = fHtempFMDtrue->GetBinContent(fHtempFMDtrue->FindBin((multFMDA+multFMDC)));
1596 if(fHtempTRKtrue) fCentTRKtrue = fHtempTRKtrue->GetBinContent(fHtempTRKtrue->FindBin(nTracks));
1597 if(fHtempTKLtrue) fCentTKLtrue = fHtempTKLtrue->GetBinContent(fHtempTKLtrue->FindBin(nTracklets));
1598 if(fHtempCL0true) fCentCL0true = fHtempCL0true->GetBinContent(fHtempCL0true->FindBin(nClusters[0]));
1599 if(fHtempCL1true) fCentCL1true = fHtempCL1true->GetBinContent(fHtempCL1true->FindBin(spdCorr));
1600 if(fHtempCNDtrue) fCentCNDtrue = fHtempCNDtrue->GetBinContent(fHtempCNDtrue->FindBin(multCND));
1601 if(fHtempZNAtrue) fCentZNAtrue = fHtempZNAtrue->GetBinContent(fHtempZNAtrue->FindBin(znaTower));
f9a774f9 1602 if(fHtempZNCtrue) fCentZNCtrue = fHtempZNCtrue->GetBinContent(fHtempZNCtrue->FindBin(zncTower));
39a3e400 1603
1604
01974bd1 1605 // ***** Cleaning
1606 if (fUseCleaning) {
1607 fQuality=0;
1608
1609 // ***** vertex
1610 if (TMath::Abs(zvtx)>fZVCut || zvtxNcont<1) fQuality += 1;
1611
1612 // ***** outliers, skip in case of MC input
1613 if (!fIsMCInput) {
1614 // **** V0 vs SPD
1615 if (IsOutlierV0MSPD(spdCorr, v0Corr, int(fCentV0M))) fQuality += 2;
1616 // ***** V0 vs TPC
1617 if (IsOutlierV0MTPC(nTracks, v0Corr, int(fCentV0M))) fQuality += 4;
1618 // ***** V0 vs ZDC
1619 if (IsOutlierV0MZDC((zncEnergy+znaEnergy+zpcEnergy+zpaEnergy), v0Corr) &&
1620 (zdcEnergyCal==kFALSE) ) fQuality += 8;
1621 if (IsOutlierV0MZDCECal((zncEnergy+znaEnergy+zpcEnergy+zpaEnergy), v0Corr) &&
1622 (zdcEnergyCal==kTRUE) ) fQuality += 8;
1623 }
1624 } else {
1625 fQuality = 0;
1626 }
1627
1628
1629 if (esdCent) {
377e5a61 1630 if (aod&&(fDebug>1)) {
1631 Double_t v0m = esdCent->GetCentralityPercentile("V0M");
1632 Double_t cl1 = esdCent->GetCentralityPercentile("CL1");
1633 Double_t trk = esdCent->GetCentralityPercentile("TRK");
1634 Double_t cnd = esdCent->GetCentralityPercentile("CND");
1635 Double_t zna = esdCent->GetCentralityPercentile("ZNA");
3a19f64f 1636 printf("AOD: v0m %.2f %.2f (%.2f) cl1 %.2f %.2f (%.2f) trk %.2f %.2f (%.2f) cnd %.2f %.2f (%.2f) zna %.2f %.2f (%.2f)\n",
377e5a61 1637 v0m, fCentV0M, fCentV0M!=0?v0m/fCentV0M:1, cl1, fCentCL1, fCentCL1!=0?cl1/fCentCL1:1, trk, fCentTRK,
3a19f64f 1638 fCentTRK!=0?trk/fCentTRK:1, cnd, fCentCND, fCentCND!=0?cnd/fCentCND:1, zna, fCentZNA, fCentZNA!=0?zna/fCentZNA:1);
377e5a61 1639 }
01974bd1 1640 esdCent->SetQuality(fQuality);
1641 esdCent->SetCentralityV0M(fCentV0M);
1642 esdCent->SetCentralityV0A(fCentV0A);
2d12adde 1643 esdCent->SetCentralityV0A123(fCentV0A123);
01974bd1 1644 esdCent->SetCentralityV0C(fCentV0C);
f9a774f9 1645 esdCent->SetCentralityV0MEq(fCentV0MEq);
1646 esdCent->SetCentralityV0AEq(fCentV0AEq);
1647 esdCent->SetCentralityV0CEq(fCentV0CEq);
01974bd1 1648 esdCent->SetCentralityFMD(fCentFMD);
1649 esdCent->SetCentralityTRK(fCentTRK);
1650 esdCent->SetCentralityTKL(fCentTKL);
1651 esdCent->SetCentralityCL0(fCentCL0);
1652 esdCent->SetCentralityCL1(fCentCL1);
1653 esdCent->SetCentralityCND(fCentCND);
8432b617 1654 esdCent->SetCentralityNPA(fCentNPA);
99029fba 1655 esdCent->SetCentralityZNA(fCentZNA);
f9a774f9 1656 esdCent->SetCentralityZNC(fCentZNC);
3a19f64f 1657 esdCent->SetCentralityZPA(fCentZPA);
1658 esdCent->SetCentralityZPC(fCentZPC);
01974bd1 1659 esdCent->SetCentralityV0MvsFMD(fCentV0MvsFMD);
1660 esdCent->SetCentralityTKLvsV0M(fCentTKLvsV0M);
1661 esdCent->SetCentralityZEMvsZDC(fCentZEMvsZDC);
755824b5 1662
1663 esdCent->SetCentralityV0Mtrue(fCentV0Mtrue);
1664 esdCent->SetCentralityV0Atrue(fCentV0Atrue);
1665 esdCent->SetCentralityV0Ctrue(fCentV0Ctrue);
1666 // no setters in AliCentrality for
1667 // fCentV0MEqtrue
1668 // fCentV0AEqtrue
1669 // fCentV0CEqtrue
1670 esdCent->SetCentralityFMDtrue(fCentFMDtrue);
1671 esdCent->SetCentralityTRKtrue(fCentTRKtrue);
1672 esdCent->SetCentralityTKLtrue(fCentTKLtrue);
1673 esdCent->SetCentralityCL0true(fCentCL0true);
1674 esdCent->SetCentralityCL1true(fCentCL1true);
1675 esdCent->SetCentralityCNDtrue(fCentCNDtrue);
1676 esdCent->SetCentralityZNAtrue(fCentZNAtrue);
1677 esdCent->SetCentralityZNCtrue(fCentZNCtrue);
1678 esdCent->SetCentralityZPAtrue(fCentZPAtrue);
1679 esdCent->SetCentralityZPCtrue(fCentZPCtrue);
01974bd1 1680 }
1681
1682 // filling QA histograms
1683 if (fFillHistos) {
39a3e400 1684
1685 if (fIsMCInput) { // fill histo with true centrality for simulations
1686 fCentV0M = fCentV0Mtrue;
1687 fCentV0A = fCentV0Atrue;
1688 fCentV0C = fCentV0Ctrue;
f9a774f9 1689 fCentV0MEq = fCentV0MEqtrue;
1690 fCentV0AEq = fCentV0AEqtrue;
1691 fCentV0CEq = fCentV0CEqtrue;
39a3e400 1692 fCentFMD = fCentFMDtrue;
1693 fCentTRK = fCentTRKtrue;
1694 fCentTKL = fCentTKLtrue;
1695 fCentCL0 = fCentCL0true;
1696 fCentCL1 = fCentCL1true;
1697 fCentCND = fCentCNDtrue;
1698 fCentZNA = fCentZNAtrue;
f9a774f9 1699 fCentZNC = fCentZNCtrue;
3a19f64f 1700 fCentZPA = fCentZPAtrue;
1701 fCentZPC = fCentZPCtrue;
39a3e400 1702 }
1703
1704
01974bd1 1705 if ((fMB) && (abs(zvtx)<10)) fHOutMultCL1vsTKL->Fill(spdCorr,nTracklets);
1706
1707 if (fCVHN) fHOutCentV0MCVHN->Fill(fCentV0M);
1708 if (fCVLN) fHOutCentV0MCVLN->Fill(fCentV0M);
1709 if (fCCENT) fHOutCentV0MCCENT->Fill(fCentV0M);
1710 if (fCSEMI) fHOutCentV0MCSEMI->Fill(fCentV0M);
1711 if (fMSL) fHOutCentV0MMSL->Fill(fCentV0M);
1712 if (fMSH) fHOutCentV0MMSH->Fill(fCentV0M);
1713 if (fMUL) fHOutCentV0MMUL->Fill(fCentV0M);
1714 if (fMLL) fHOutCentV0MMLL->Fill(fCentV0M);
1715 if (fEJE) fHOutCentV0MEJE->Fill(fCentV0M);
1716 if (fEGA) fHOutCentV0MEGA->Fill(fCentV0M);
1717 if (fPHS) fHOutCentV0MPHS->Fill(fCentV0M);
1718
c932ac15 1719 if (((((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB) && (runType==0)) ||
1720 ((((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kINT7) && (runType==1))) { // fill the QA histograms only for MB events!
39a3e400 1721
01974bd1 1722 fHOutQuality->Fill(fQuality);
1723 fHOutVertex->Fill(zvtx);
1724 fHOutVertexT0->Fill(zvtxT0);
1725
1726 if (fQuality==0) {
1727 fHOutCentV0M->Fill(fCentV0M);
1728 fHOutCentV0A->Fill(fCentV0A);
2d12adde 1729 fHOutCentV0A123->Fill(fCentV0A123);
01974bd1 1730 fHOutCentV0C->Fill(fCentV0C);
f9a774f9 1731 fHOutCentV0MEq->Fill(fCentV0MEq);
1732 fHOutCentV0AEq->Fill(fCentV0AEq);
1733 fHOutCentV0CEq->Fill(fCentV0CEq);
01974bd1 1734
1735 if (fCVHNbit) fHOutCentV0MCVHNinMB->Fill(fCentV0M);
1736 if (fCVLNbit) fHOutCentV0MCVLNinMB->Fill(fCentV0M);
1737 if (fCCENTbit) fHOutCentV0MCCENTinMB->Fill(fCentV0M);
1738 if (fCSEMIbit) fHOutCentV0MCSEMIinMB->Fill(fCentV0M);
1739 if (fMSL) fHOutCentV0MMSLinMB->Fill(fCentV0M);
1740 if (fMSH) fHOutCentV0MMSHinMB->Fill(fCentV0M);
1741 if (fMUL) fHOutCentV0MMULinMB->Fill(fCentV0M);
1742 if (fMLL) fHOutCentV0MMLLinMB->Fill(fCentV0M);
1743 if (fEJE) fHOutCentV0MEJEinMB->Fill(fCentV0M);
1744 if (fEGA) fHOutCentV0MEGAinMB->Fill(fCentV0M);
1745 if (fPHS) fHOutCentV0MPHSinMB->Fill(fCentV0M);
1746
1747 fHOutCentFMD->Fill(fCentFMD);
1748 fHOutCentTRK->Fill(fCentTRK);
1749 fHOutCentTKL->Fill(fCentTKL);
1750 fHOutCentCL0->Fill(fCentCL0);
1751 fHOutCentCL1->Fill(fCentCL1);
1752 fHOutCentCND->Fill(fCentCND);
8432b617 1753 fHOutCentNPA->Fill(fCentNPA);
99029fba 1754 fHOutCentZNA->Fill(fCentZNA);
f9a774f9 1755 fHOutCentZNC->Fill(fCentZNC);
3a19f64f 1756 fHOutCentZPA->Fill(fCentZPA);
1757 fHOutCentZPC->Fill(fCentZPC);
01974bd1 1758 fHOutCentV0MvsFMD->Fill(fCentV0MvsFMD);
1759 fHOutCentTKLvsV0M->Fill(fCentTKLvsV0M);
1760 fHOutCentZEMvsZDC->Fill(fCentZEMvsZDC);
1761 fHOutCentV0MvsCentCL1->Fill(fCentV0M,fCentCL1);
1762 fHOutCentV0MvsCentTRK->Fill(fCentV0M,fCentTRK);
1763 fHOutCentTRKvsCentCL1->Fill(fCentTRK,fCentCL1);
1764 fHOutCentV0MvsCentZDC->Fill(fCentV0M,fCentZEMvsZDC);
1765 fHOutCentV0AvsCentV0C->Fill(fCentV0A,fCentV0C);
1766 fHOutCentV0AvsCentTRK->Fill(fCentV0A,fCentTRK);
1767 fHOutCentV0AvsCentCND->Fill(fCentV0A,fCentCND);
1768 fHOutCentV0AvsCentCL1->Fill(fCentV0A,fCentCL1);
1769 fHOutCentV0CvsCentTRK->Fill(fCentV0C,fCentTRK);
1770 fHOutCentV0CvsCentCND->Fill(fCentV0C,fCentCND);
1771 fHOutCentV0CvsCentCL1->Fill(fCentV0C,fCentCL1);
8432b617 1772 fHOutCentNPAvsCentV0A->Fill(fCentNPA,fCentV0A);
1773 fHOutCentNPAvsCentV0C->Fill(fCentNPA,fCentV0C);
1774 fHOutCentNPAvsCentTRK->Fill(fCentNPA,fCentTRK);
1775 fHOutCentNPAvsCentCND->Fill(fCentNPA,fCentCND);
1776 fHOutCentNPAvsCentCL1->Fill(fCentNPA,fCentCL1);
99029fba 1777 fHOutCentZNAvsCentV0A->Fill(fCentZNA,fCentV0A);
1778 fHOutCentZNAvsCentV0C->Fill(fCentZNA,fCentV0C);
1779 fHOutCentZNAvsCentTRK->Fill(fCentZNA,fCentTRK);
1780 fHOutCentZNAvsCentCND->Fill(fCentZNA,fCentCND);
1781 fHOutCentZNAvsCentCL1->Fill(fCentZNA,fCentCL1);
bfbc1975 1782 fHOutCentZNAvsCentZPA->Fill(fCentZNA,fCentZPA);
01974bd1 1783
1784 fHOutMultV0AC->Fill(multV0A,multV0C);
e1d58f75 1785 fHOutMultV0M->Fill(multV0ACorr+multV0CCorr);
1786 fHOutMultV0A->Fill(multV0ACorr);
2d12adde 1787 fHOutMultV0A123->Fill(multV0A123);
e1d58f75 1788 fHOutMultV0C->Fill(multV0CCorr);
f9a774f9 1789 fHOutMultV0MEq->Fill(multV0AEq+multV0CEq);
1790 fHOutMultV0AEq->Fill(multV0AEq);
1791 fHOutMultV0CEq->Fill(multV0CEq);
e1d58f75 1792 fHOutMultV0Mnc->Fill(multV0A+multV0C);
1793 fHOutMultV0Anc->Fill(multV0A);
1794 fHOutMultV0Cnc->Fill(multV0C);
01974bd1 1795 fHOutMultV0O->Fill(multV0AOnline+multV0COnline);
1796 fHOutMultV0Cells->Fill(nV0A,nV0C);
1797 fHOutMultFMD->Fill(multFMDA+multFMDC);
1798 fHOutMultTRK->Fill(nTracks);
1799 fHOutMultTKL->Fill(nTracklets);
1800 fHOutMultCL0->Fill(nClusters[0]);
1801 fHOutMultCL1->Fill(spdCorr);
1802 fHOutMultCND->Fill(multCND);
8432b617 1803 fHOutMultNPA->Fill(Npart);
f9a774f9 1804 if(znaFired)fHOutMultZNA->Fill(znaTower);
1805 if(zncFired)fHOutMultZNC->Fill(zncTower);
3a19f64f 1806 if(zpaFired)fHOutMultZPA->Fill(zpaTower);
1807 if(zpcFired)fHOutMultZPC->Fill(zpcTower);
bfbc1975 1808 fHOutMultZNAvsZPA->Fill(znaTower,zpaTower);
01974bd1 1809
3a19f64f 1810 //fHOutMultV0MvsZDN->Fill(v0Corr,(zncEnergy+znaEnergy));
1811 fHOutMultV0MvsZDN->Fill(v0Corr,znaTower);
01974bd1 1812 fHOutMultZEMvsZDN->Fill((zem1Energy+zem2Energy),(zncEnergy+znaEnergy));
1813 fHOutMultV0MvsZDC->Fill(v0Corr,(zncEnergy+znaEnergy+zpcEnergy+zpaEnergy));
1814 fHOutMultZEMvsZDC->Fill((zem1Energy+zem2Energy),(zncEnergy+znaEnergy+zpcEnergy+zpaEnergy));
1815 fHOutMultZEMvsZDCw->Fill((zem1Energy+zem2Energy),(zncEnergy+znaEnergy+zpcEnergy+zpaEnergy),fCentV0M);
1816 fHOutMultV0MvsCL1->Fill(v0Corr,spdCorr);
1817 fHOutMultV0MvsTRK->Fill(v0Corr,nTracks);
1818 fHOutMultTRKvsCL1->Fill(nTracks,spdCorr);
1819 fHOutMultV0MvsV0O->Fill(v0Corr,(multV0AOnline+multV0COnline));
1820 fHOutMultV0OvsCL1->Fill((multV0AOnline+multV0COnline),spdCorr);
1821 fHOutMultV0OvsTRK->Fill((multV0AOnline+multV0COnline),nTracks);
1822 } else if (fQuality%2 == 0) {
1823 fHOutCentV0Mqual1->Fill(fCentV0M);
1824 fHOutCentTRKqual1->Fill(fCentTRK);
1825 fHOutCentCL1qual1->Fill(fCentCL1);
1826 fHOutMultV0MvsCL1qual1->Fill(v0Corr,spdCorr);
1827 fHOutMultV0MvsTRKqual1->Fill(v0Corr,nTracks);
1828 fHOutMultTRKvsCL1qual1->Fill(nTracks,spdCorr);
1829 } else {
1830 fHOutCentV0Mqual2->Fill(fCentV0M);
1831 fHOutCentTRKqual2->Fill(fCentTRK);
1832 fHOutCentCL1qual2->Fill(fCentCL1);
1833 fHOutMultV0MvsCL1qual2->Fill(v0Corr,spdCorr);
1834 fHOutMultV0MvsTRKqual2->Fill(v0Corr,nTracks);
1835 fHOutMultTRKvsCL1qual2->Fill(nTracks,spdCorr);
1836 }
1837 }
1838 PostData(1, fOutputList);
1839 }
1840}
1841//________________________________________________________________________
1842void AliCentralitySelectionTask::Terminate(Option_t */*option*/)
1843{
1844 // Terminate analysis
1845}
1846//________________________________________________________________________
377e5a61 1847Int_t AliCentralitySelectionTask::SetupRun(const AliVEvent* const esd)
01974bd1 1848{
1849 // Setup files for run
1850
1851 if (!esd)
1852 return -1;
1853
1854 // check if something to be done
1855 if (fCurrentRun == esd->GetRunNumber())
1856 return 0;
1857 else
1858 fCurrentRun = esd->GetRunNumber();
1859
1860 TString fileName =(Form("%s/COMMON/CENTRALITY/data/centrality.root", AliAnalysisManager::GetOADBPath()));
1861 AliInfo(Form("Setup Centrality Selection for run %d with file %s\n",fCurrentRun,fileName.Data()));
1862
1863 AliOADBContainer *con = new AliOADBContainer("OADB");
1864 con->InitFromFile(fileName,"Centrality");
1865
1866 AliOADBCentrality* centOADB = 0;
1867 centOADB = (AliOADBCentrality*)(con->GetObject(fCurrentRun));
1868 if (!centOADB) {
1869 AliWarning(Form("Centrality OADB does not exist for run %d, using Default \n",fCurrentRun ));
1870 centOADB = (AliOADBCentrality*)(con->GetDefaultObject("oadbDefault"));
1871 }
1872
39a3e400 1873 Bool_t isHijing=kFALSE;
1874 Bool_t isDpmjet=kFALSE;
1875 AliAnalysisManager* anMan = AliAnalysisManager::GetAnalysisManager();
1876 AliMCEventHandler* eventHandler = (AliMCEventHandler*)anMan->GetMCtruthEventHandler();
1877 AliMCEvent* mcEvent=0;
1878 if (fIsMCInput && eventHandler && (mcEvent=eventHandler->MCEvent()) ) {
1879 AliGenEventHeader* mcGenH = mcEvent->GenEventHeader();
1880 if (mcGenH->InheritsFrom(AliGenHijingEventHeader::Class())) isHijing=kTRUE;
1881 else if (mcGenH->InheritsFrom(AliGenCocktailEventHeader::Class())) isHijing=kTRUE;
1882 else if (mcGenH->InheritsFrom(AliGenDPMjetEventHeader::Class())) isDpmjet=kTRUE;
1883 }
1884
1885
01974bd1 1886 // modes
1887 fUseScaling = centOADB->UseScaling();
1888 fUseCleaning = centOADB->UseCleaning();
1889
1890 // cuts
1891 fZVCut = centOADB->ZVCut();
1892 fOutliersCut = centOADB->OutliersCut();
1893
1894 // centrality histos
1895 fHtempV0M = centOADB->V0hist();
1896 fHtempV0A = centOADB->V0Ahist();
2d12adde 1897 fHtempV0A123 = centOADB->V0A123hist();
01974bd1 1898 fHtempV0C = centOADB->V0Chist();
f9a774f9 1899 fHtempV0MEq = centOADB->V0Eqhist();
1900 fHtempV0AEq = centOADB->V0AEqhist();
1901 fHtempV0CEq = centOADB->V0CEqhist();
01974bd1 1902 fHtempTRK = centOADB->TPChist();
1903 fHtempCL1 = centOADB->SPDhist();
1904 fHtempCND = centOADB->CNDhist();
39a3e400 1905 fHtempFMD = centOADB->FMDhist();
99029fba 1906 fHtempZNA = centOADB->ZNAhist();
f9a774f9 1907 fHtempZNC = centOADB->ZNChist();
3a19f64f 1908 fHtempZPA = centOADB->ZPAhist();
1909 fHtempZPC = centOADB->ZPChist();
01974bd1 1910 fHtempZEMvsZDC = centOADB->ZEMvsZDChist();
39a3e400 1911
f9a774f9 1912 if (isHijing) {
1913 fHtempNPA = centOADB->NPAhist();
1914 fHtempV0Mtrue = centOADB->V0histtrue();
1915 fHtempV0Atrue = centOADB->V0Ahisttrue();
1916 fHtempV0Ctrue = centOADB->V0Chisttrue();
1917 fHtempV0MEqtrue = centOADB->V0Eqhisttrue();
1918 fHtempV0AEqtrue = centOADB->V0AEqhisttrue();
1919 fHtempV0CEqtrue = centOADB->V0CEqhisttrue();
1920 fHtempTRKtrue = centOADB->TPChisttrue();
1921 fHtempCL1true = centOADB->SPDhisttrue();
1922 fHtempCNDtrue = centOADB->CNDhisttrue();
1923 fHtempFMDtrue = centOADB->FMDhisttrue();
1924 fHtempZNAtrue = centOADB->ZNAhisttrue();
1925 fHtempZNCtrue = centOADB->ZNChisttrue();
3a19f64f 1926 fHtempZPAtrue = centOADB->ZPAhisttrue();
1927 fHtempZPCtrue = centOADB->ZPChisttrue();
f9a774f9 1928 } else if (isDpmjet) {
1929 fHtempNPA = centOADB->NPAhistDPM();
1930 fHtempV0Mtrue = centOADB->V0histtrueDPM();
1931 fHtempV0Atrue = centOADB->V0AhisttrueDPM();
1932 fHtempV0Ctrue = centOADB->V0ChisttrueDPM();
1933 fHtempV0MEqtrue = centOADB->V0EqhisttrueDPM();
1934 fHtempV0AEqtrue = centOADB->V0AEqhisttrueDPM();
1935 fHtempV0CEqtrue = centOADB->V0CEqhisttrueDPM();
1936 fHtempTRKtrue = centOADB->TPChisttrueDPM();
1937 fHtempCL1true = centOADB->SPDhisttrueDPM();
1938 fHtempCNDtrue = centOADB->CNDhisttrueDPM();
1939 fHtempFMDtrue = centOADB->FMDhisttrueDPM();
1940 fHtempZNAtrue = centOADB->ZNAhisttrueDPM();
1941 fHtempZNCtrue = centOADB->ZNChisttrueDPM();
3a19f64f 1942 fHtempZPAtrue = centOADB->ZPAhisttrueDPM();
1943 fHtempZPCtrue = centOADB->ZPChisttrueDPM();
f9a774f9 1944 }
1945
1946
1947 TString path = gSystem->ExpandPathName(fileName.Data());
01974bd1 1948 if (!fHtempV0M) AliWarning(Form("Calibration for V0M does not exist in %s", path.Data()));
1949 if (!fHtempV0A) AliWarning(Form("Calibration for V0A does not exist in %s", path.Data()));
1950 if (!fHtempV0C) AliWarning(Form("Calibration for V0C does not exist in %s", path.Data()));
f9a774f9 1951 if (!fHtempV0MEq) AliWarning(Form("Calibration for V0MEq does not exist in %s", path.Data()));
1952 if (!fHtempV0AEq) AliWarning(Form("Calibration for V0AEq does not exist in %s", path.Data()));
1953 if (!fHtempV0CEq) AliWarning(Form("Calibration for V0CEq does not exist in %s", path.Data()));
01974bd1 1954 if (!fHtempTRK) AliWarning(Form("Calibration for TRK does not exist in %s", path.Data()));
1955 if (!fHtempCL1) AliWarning(Form("Calibration for CL1 does not exist in %s", path.Data()));
1956 if (!fHtempCND) AliWarning(Form("Calibration for CND does not exist in %s", path.Data()));
99029fba 1957 if (!fHtempZNA) AliWarning(Form("Calibration for ZNA does not exist in %s", path.Data()));
f9a774f9 1958 if (!fHtempZNC) AliWarning(Form("Calibration for ZNC does not exist in %s", path.Data()));
3a19f64f 1959 if (!fHtempZPA) AliWarning(Form("Calibration for ZPA does not exist in %s", path.Data()));
1960 if (!fHtempZPC) AliWarning(Form("Calibration for ZPC does not exist in %s", path.Data()));
39a3e400 1961 if (!fHtempFMD) AliWarning(Form("Calibration for FMD does not exist in %s", path.Data()));
01974bd1 1962 if (!fHtempZEMvsZDC) AliWarning(Form("Calibration for ZEMvsZDC does not exist in %s", path.Data()));
39a3e400 1963 if (!fHtempNPA) AliWarning(Form("Calibration for NPA does not exist in %s", path.Data()));
1964
1965 if (!fHtempV0Mtrue) AliWarning(Form("Calibration for V0Mtrue does not exist in %s", path.Data()));
1966 if (!fHtempV0Atrue) AliWarning(Form("Calibration for V0Atrue does not exist in %s", path.Data()));
1967 if (!fHtempV0Ctrue) AliWarning(Form("Calibration for V0Ctrue does not exist in %s", path.Data()));
f9a774f9 1968 if (!fHtempV0MEqtrue) AliWarning(Form("Calibration for V0MEqtrue does not exist in %s", path.Data()));
1969 if (!fHtempV0AEqtrue) AliWarning(Form("Calibration for V0AEqtrue does not exist in %s", path.Data()));
1970 if (!fHtempV0CEqtrue) AliWarning(Form("Calibration for V0CEqtrue does not exist in %s", path.Data()));
39a3e400 1971 if (!fHtempTRKtrue) AliWarning(Form("Calibration for TRKtrue does not exist in %s", path.Data()));
1972 if (!fHtempCL1true) AliWarning(Form("Calibration for CL1true does not exist in %s", path.Data()));
1973 if (!fHtempCNDtrue) AliWarning(Form("Calibration for CNDtrue does not exist in %s", path.Data()));
1974 if (!fHtempZNAtrue) AliWarning(Form("Calibration for ZNAtrue does not exist in %s", path.Data()));
f9a774f9 1975 if (!fHtempZNCtrue) AliWarning(Form("Calibration for ZNCtrue does not exist in %s", path.Data()));
3a19f64f 1976 if (!fHtempZPAtrue) AliWarning(Form("Calibration for ZPAtrue does not exist in %s", path.Data()));
1977 if (!fHtempZPCtrue) AliWarning(Form("Calibration for ZPCtrue does not exist in %s", path.Data()));
39a3e400 1978 if (!fHtempFMDtrue) AliWarning(Form("Calibration for FMDtrue does not exist in %s", path.Data()));
01974bd1 1979
f9a774f9 1980
01974bd1 1981 // scale factors
1982 fV0MScaleFactor = centOADB->V0MScaleFactor();
1983 fSPDScaleFactor = centOADB->SPDScaleFactor();
1984 fTPCScaleFactor = centOADB->TPCScaleFactor();
1985 fV0MScaleFactorMC = centOADB->V0MScaleFactorMC();
1986
1987 // outliers parameters
1988 fV0MSPDOutlierPar0 = centOADB->V0MSPDOutlierPar0();
1989 fV0MSPDOutlierPar1 = centOADB->V0MSPDOutlierPar1();
1990 fV0MTPCOutlierPar0 = centOADB->V0MTPCOutlierPar0();
1991 fV0MTPCOutlierPar1 = centOADB->V0MTPCOutlierPar1();
1992
1993 fV0MSPDSigmaOutlierPar0 = centOADB->V0MSPDSigmaOutlierPar0();
1994 fV0MSPDSigmaOutlierPar1 = centOADB->V0MSPDSigmaOutlierPar1();
1995 fV0MSPDSigmaOutlierPar2 = centOADB->V0MSPDSigmaOutlierPar2();
1996 fV0MTPCSigmaOutlierPar0 = centOADB->V0MTPCSigmaOutlierPar0();
1997 fV0MTPCSigmaOutlierPar1 = centOADB->V0MTPCSigmaOutlierPar1();
1998 fV0MTPCSigmaOutlierPar2 = centOADB->V0MTPCSigmaOutlierPar2();
1999
2000 fV0MZDCOutlierPar0 = centOADB->V0MZDCOutlierPar0();
2001 fV0MZDCOutlierPar1 = centOADB->V0MZDCOutlierPar1();
2002 fV0MZDCEcalOutlierPar0 = centOADB->V0MZDCEcalOutlierPar0();
2003 fV0MZDCEcalOutlierPar1 = centOADB->V0MZDCEcalOutlierPar1();
2004
01974bd1 2005 return 0;
2006}
2007
2008
2009
2010//________________________________________________________________________
2011Bool_t AliCentralitySelectionTask::IsOutlierV0MSPD(Float_t spd, Float_t v0, Int_t cent) const
2012{
2013 // Clean outliers
2014 Float_t val = fV0MSPDOutlierPar0 + fV0MSPDOutlierPar1 * v0;
2015 Float_t spdSigma = fV0MSPDSigmaOutlierPar0 + fV0MSPDSigmaOutlierPar1*cent + fV0MSPDSigmaOutlierPar2*cent*cent;
2016 if ( TMath::Abs(spd-val) > fOutliersCut*spdSigma )
2017 return kTRUE;
2018 else
2019 return kFALSE;
2020}
2021
2022//________________________________________________________________________
2023Bool_t AliCentralitySelectionTask::IsOutlierV0MTPC(Int_t tracks, Float_t v0, Int_t cent) const
2024{
2025 // Clean outliers
2026 Float_t val = fV0MTPCOutlierPar0 + fV0MTPCOutlierPar1 * v0;
2027 Float_t tpcSigma = fV0MTPCSigmaOutlierPar0 + fV0MTPCSigmaOutlierPar1*cent + fV0MTPCSigmaOutlierPar2*cent*cent;
2028 if ( TMath::Abs(tracks-val) > fOutliersCut*tpcSigma )
2029 return kTRUE;
2030 else
2031 return kFALSE;
2032}
2033
2034//________________________________________________________________________
2035Bool_t AliCentralitySelectionTask::IsOutlierV0MZDC(Float_t zdc, Float_t v0) const
2036{
2037 // Clean outliers
2038 Float_t val = fV0MZDCOutlierPar0 + fV0MZDCOutlierPar1 * v0;
2039 if (zdc > val)
2040 return kTRUE;
2041 else
2042 return kFALSE;
2043}
2044
2045//________________________________________________________________________
2046Bool_t AliCentralitySelectionTask::IsOutlierV0MZDCECal(Float_t zdc, Float_t v0) const
2047{
2048 // Clean outliers
2049 Float_t val = fV0MZDCEcalOutlierPar0 + fV0MZDCEcalOutlierPar1 * v0;
2050 if (zdc > val)
2051 return kTRUE;
2052 else
2053 return kFALSE;
2054}