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