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