Coding conv
[u/mrichter/AliRoot.git] / PWG2 / EVCHAR / AliAnalysisTaskCentrality.cxx
CommitLineData
e6f3f2fe 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// //
18// Class to analyze centrality measurements //
19// //
20/////////////////////////////////////////////////////////////
21
22#include <TTree.h>
23#include <TList.h>
24#include <TH1F.h>
25#include <TH2F.h>
26#include <TProfile.h>
27#include <TFile.h>
28#include <TString.h>
29#include <TCanvas.h>
30
31#include "AliAnalysisManager.h"
32#include "AliVEvent.h"
33#include "AliESD.h"
34#include "AliESDEvent.h"
35#include "AliESDHeader.h"
36#include "AliESDInputHandler.h"
37#include "AliESDZDC.h"
38#include "AliESDFMD.h"
39#include "AliESDVZERO.h"
40#include "AliMultiplicity.h"
41#include "AliAODHandler.h"
42#include "AliAODEvent.h"
43#include "AliAODVertex.h"
44#include "AliAODMCHeader.h"
45#include "AliMCEvent.h"
46#include "AliMCEventHandler.h"
47#include "AliMCParticle.h"
48#include "AliStack.h"
49#include "AliHeader.h"
50#include "AliAODMCParticle.h"
51#include "AliAnalysisTaskSE.h"
52#include "AliGenEventHeader.h"
53#include "AliGenHijingEventHeader.h"
54#include "AliPhysicsSelectionTask.h"
55#include "AliPhysicsSelection.h"
56#include "AliBackgroundSelection.h"
57#include "AliAnalysisTaskCentrality.h"
58
59ClassImp(AliAnalysisTaskCentrality)
60
61
62//________________________________________________________________________
63AliAnalysisTaskCentrality::AliAnalysisTaskCentrality():
64 AliAnalysisTaskSE(),
65 fDebug(0),
66 fAnalysisInput("ESD"),
67 fIsMCInput(kFALSE),
68 fOutput(0x0),
69 hEzdc(0x0),
70 hEzem(0x0),
71 hNtracks(0x0),
72 hNtracklets(0x0),
73 hNclusters0(0x0),
74 hmultV0(0x0),
75 hmultFMD(0x0),
76 hEzemvsEzdc(0x0),
77 hNtracksvsEzdc(0x0),
78 hNtrackletsvsEzdc(0x0),
79 hNclusters0vsEzdc(0x0),
80 hmultV0vsEzdc(0x0),
81 hmultFMDvsEzdc(0x0),
82 hNtracksvsEzem(0x0),
83 hNtrackletsvsEzem(0x0),
84 hNclusters0vsEzem(0x0),
85 hmultV0vsEzem(0x0),
86 hmultFMDvsEzem(0x0),
87 hNtracksvsmultV0(0x0),
88 hNtrackletsvsmultV0(0x0),
89 hNclusters0vsmultV0(0x0),
90 hNtracksvsmultFMD(0x0),
91 hNtrackletsvsmultFMD(0x0),
92 hNclusters0vsmultFMD(0x0),
93 hmultV0vsmultFMD(0x0)
94{
95 // Default constructor
96}
97
98//________________________________________________________________________
99AliAnalysisTaskCentrality::AliAnalysisTaskCentrality(const char *name):
100 AliAnalysisTaskSE(name),
101 fDebug(0),
102 fAnalysisInput("ESD"),
103 fIsMCInput(kFALSE),
104 fOutput(0x0),
105 hEzdc(0x0),
106 hEzem(0x0),
107 hNtracks(0x0),
108 hNtracklets(0x0),
109 hNclusters0(0x0),
110 hmultV0(0x0),
111 hmultFMD(0x0),
112 hEzemvsEzdc(0x0),
113 hNtracksvsEzdc(0x0),
114 hNtrackletsvsEzdc(0x0),
115 hNclusters0vsEzdc(0x0),
116 hmultV0vsEzdc(0x0),
117 hmultFMDvsEzdc(0x0),
118 hNtracksvsEzem(0x0),
119 hNtrackletsvsEzem(0x0),
120 hNclusters0vsEzem(0x0),
121 hmultV0vsEzem(0x0),
122 hmultFMDvsEzem(0x0),
123 hNtracksvsmultV0(0x0),
124 hNtrackletsvsmultV0(0x0),
125 hNclusters0vsmultV0(0x0),
126 hNtracksvsmultFMD(0x0),
127 hNtrackletsvsmultFMD(0x0),
128 hNclusters0vsmultFMD(0x0),
129 hmultV0vsmultFMD(0x0)
130{
131 // Default constructor
132
133 // Output slot #1 writes into a TList container
134 DefineOutput(1, TList::Class());
135
136}
137
138//________________________________________________________________________
139AliAnalysisTaskCentrality& AliAnalysisTaskCentrality::operator=(const AliAnalysisTaskCentrality& c)
140{
141 //
142 // Assignment operator
143 //
144 if (this!=&c) {
145 AliAnalysisTaskSE::operator=(c);
146 }
147 return *this;
148}
149
150//________________________________________________________________________
151AliAnalysisTaskCentrality::AliAnalysisTaskCentrality(const AliAnalysisTaskCentrality& ana):
152 AliAnalysisTaskSE(ana),
153 fDebug(ana.fDebug),
154 fAnalysisInput(ana.fDebug),
155 fIsMCInput(ana.fIsMCInput),
156 fOutput(ana.fOutput),
157 hEzdc(ana.hEzdc),
158 hEzem(ana.hEzem),
159 hNtracks(ana.hNtracks),
160 hNtracklets(ana.hNtracklets),
161 hNclusters0(ana.hNclusters0),
162 hmultV0(ana.hmultV0),
163 hmultFMD(ana.hmultFMD),
164 hEzemvsEzdc(ana.hEzemvsEzdc),
165 hNtracksvsEzdc(ana.hNtracksvsEzdc),
166 hNtrackletsvsEzdc(ana.hNtrackletsvsEzdc),
167 hNclusters0vsEzdc(ana.hNclusters0vsEzdc),
168 hmultV0vsEzdc(ana.hmultV0vsEzdc),
169 hmultFMDvsEzdc(ana.hmultFMDvsEzdc),
170 hNtracksvsEzem(ana.hNtracksvsEzem),
171 hNtrackletsvsEzem(ana.hNtrackletsvsEzem),
172 hNclusters0vsEzem(ana.hNclusters0vsEzem),
173 hmultV0vsEzem(ana.hmultV0vsEzem),
174 hmultFMDvsEzem(ana.hmultFMDvsEzem),
175 hNtracksvsmultV0(ana.hNtracksvsmultV0),
176 hNtrackletsvsmultV0(ana.hNtrackletsvsmultV0),
177 hNclusters0vsmultV0(ana.hNclusters0vsmultV0),
178 hNtracksvsmultFMD(ana.hNtracksvsmultFMD),
179 hNtrackletsvsmultFMD(ana.hNtrackletsvsmultFMD),
180 hNclusters0vsmultFMD(ana.hNclusters0vsmultFMD),
181 hmultV0vsmultFMD(ana.hmultV0vsmultFMD)
182{
183 //
184 // Copy Constructor
185 //
186}
187
188//________________________________________________________________________
189 AliAnalysisTaskCentrality::~AliAnalysisTaskCentrality()
190 {
191 // Destructor
192 if(fOutput){
193 delete fOutput; fOutput=0;
194 }
195 }
196
197//________________________________________________________________________
198void AliAnalysisTaskCentrality::UserCreateOutputObjects()
199{
200
201 // Create the output containers
202 if(fDebug>1) printf("AnalysisTaskZDCpp::UserCreateOutputObjects() \n");
203
204 // Several histograms are more conveniently managed in a TList
205 fOutput = new TList();
206 fOutput->SetOwner();
207 fOutput->SetName("OutputHistos");
208
209 hEzdc = new TH1F("hEzdc","hEzdc",500,0,150);
210 hEzem = new TH1F("hEzem","hEzem",500,0,5);
211 hNtracks = new TH1F("hNtracks","hNtracks",500,0,17000);
212 hNtracklets = new TH1F("hNtracklets","hNtracklets",500,0,10000);
213 hNclusters0 = new TH1F("hNclusters0","hNclusters0",500,0,15000);
214 hmultV0 = new TH1F("hmultV0","hmultV0",500,0,30000);
215 hmultFMD = new TH1F("hmultFMD","hmultFMD",500,0,24000);
216
217 hEzemvsEzdc = new TProfile("hEzemvsEzdc","hEzemvsEzdc",500,0,5,"");
218 hNtracksvsEzdc = new TProfile("hNtracksvsEzdc","hNtracksvsEzdc",500,0,17000,"");
219 hNtrackletsvsEzdc = new TProfile("hNtrackletsvsEzdc","hNtrackletsvsEzdc",500,0,10000,"");
220 hNclusters0vsEzdc = new TProfile("hNclusters0vsEzdc","hNclusters0vsEzdc",500,0,15000,"");
221 hmultV0vsEzdc = new TProfile("hmultV0vsEzdc","hmultV0vsEzdc",500,0,30000,"");
222 hmultFMDvsEzdc = new TProfile("hmultFMDvsEzdc","hmultFMDvsEzdc",500,0,24000,"");
223 hNtracksvsEzem = new TProfile("hNtracksvsEzem","hNtracksvsEzem",500,0,17000,"");
224 hNtrackletsvsEzem = new TProfile("hNtrackletsvsEzem","hNtrackletsvsEzem",500,0,10000,"");
225 hNclusters0vsEzem = new TProfile("hNclusters0vsEzem","hNclusters0vsEzem",500,0,15000,"");
226 hmultV0vsEzem = new TProfile("hmultV0vsEzem","hmultV0vsEzem",500,0,30000,"");
227 hmultFMDvsEzem = new TProfile("hmultFMDvsEzem","hmultFMDvsEzem",500,0,24000,"");
228 hNtracksvsmultV0 = new TProfile("hNtracksvsmultV0","hNtracksvsmultV0",500,0,17000,"");
229 hNtrackletsvsmultV0 = new TProfile("hNtrackletsvsmultV0","hNtrackletsvsmultV0",500,0,10000,"");
230 hNclusters0vsmultV0 = new TProfile("hNclusters0vsmultV0","hNclusters0vsmultV0",500,0,15000,"");
231 hNtracksvsmultFMD = new TProfile("hNtracksvsmultFMD","hNtracksvsmultFMD",500,0,17000,"");
232 hNtrackletsvsmultFMD= new TProfile("hNtrackletsvsmultFMD","hNtrackletsvsmultFMD",500,0,10000,"");
233 hNclusters0vsmultFMD= new TProfile("hNclusters0vsmultFMD","hNclusters0vsmultFMD",500,0,15000,"");
234 hmultV0vsmultFMD = new TProfile("hmultV0vsmultFMD","hmultV0vsmultFMD",500,0,30000,"");
235
236 hEzdc ->GetXaxis()->SetTitle("E_{ZDC}[TeV]");
237 hEzem ->GetXaxis()->SetTitle("E_{ZEM}[TeV]");
238 hNtracks ->GetXaxis()->SetTitle("N_{tracks}");
239 hNtracklets ->GetXaxis()->SetTitle("N_{tracklets}");
240 hNclusters0 ->GetXaxis()->SetTitle("N_{clusters0}");
241 hmultV0 ->GetXaxis()->SetTitle("V0 mult");
242 hmultFMD ->GetXaxis()->SetTitle("FMD mult");
243
244 hEzemvsEzdc ->GetYaxis()->SetTitle("E_{ZDC}[TeV]");
245 hNtracksvsEzdc ->GetYaxis()->SetTitle("E_{ZDC}[TeV]");
246 hNtrackletsvsEzdc ->GetYaxis()->SetTitle("E_{ZDC}[TeV]");
247 hNclusters0vsEzdc ->GetYaxis()->SetTitle("E_{ZDC}[TeV]");
248 hmultV0vsEzdc ->GetYaxis()->SetTitle("E_{ZDC}[TeV]");
249 hmultFMDvsEzdc ->GetYaxis()->SetTitle("E_{ZDC}[TeV]");
250 hNtracksvsEzem ->GetYaxis()->SetTitle("E_{ZEM}[TeV]");
251 hNtrackletsvsEzem ->GetYaxis()->SetTitle("E_{ZEM}[TeV]");
252 hNclusters0vsEzem ->GetYaxis()->SetTitle("E_{ZEM}[TeV]");
253 hmultV0vsEzem ->GetYaxis()->SetTitle("E_{ZEM}[TeV]");
254 hmultFMDvsEzem ->GetYaxis()->SetTitle("E_{ZEM}[TeV]");
255 hNtracksvsmultV0 ->GetYaxis()->SetTitle("V0 mult");
256 hNtrackletsvsmultV0 ->GetYaxis()->SetTitle("V0 mult");
257 hNclusters0vsmultV0 ->GetYaxis()->SetTitle("V0 mult");
258 hNtracksvsmultFMD ->GetYaxis()->SetTitle("FMD mult");
259 hNtrackletsvsmultFMD->GetYaxis()->SetTitle("FMD mult");
260 hNclusters0vsmultFMD->GetYaxis()->SetTitle("FMD mult");
261 hmultV0vsmultFMD ->GetYaxis()->SetTitle("FMD mult");
262
263 hEzemvsEzdc ->GetXaxis()->SetTitle("E_{ZEM}[TeV]");
264 hNtracksvsEzdc ->GetXaxis()->SetTitle("N_{tracks}");
265 hNtrackletsvsEzdc ->GetXaxis()->SetTitle("N_{tracklets}");
266 hNclusters0vsEzdc ->GetXaxis()->SetTitle("N_{clusters0}");
267 hmultV0vsEzdc ->GetXaxis()->SetTitle("V0 mult");
268 hmultFMDvsEzdc ->GetXaxis()->SetTitle("FMD mult");
269 hNtracksvsEzem ->GetXaxis()->SetTitle("N_{tracks}");
270 hNtrackletsvsEzem ->GetXaxis()->SetTitle("N_{tracklets}");
271 hNclusters0vsEzem ->GetXaxis()->SetTitle("N_{clusters0}");
272 hmultV0vsEzem ->GetXaxis()->SetTitle("V0 mult");
273 hmultFMDvsEzem ->GetXaxis()->SetTitle("FMD mult");
274 hNtracksvsmultV0 ->GetXaxis()->SetTitle("N_{tracks}");
275 hNtrackletsvsmultV0 ->GetXaxis()->SetTitle("N_{tracklets}");
276 hNclusters0vsmultV0 ->GetXaxis()->SetTitle("N_{clusters0}");
277 hNtracksvsmultFMD ->GetXaxis()->SetTitle("N_{tracks}");
278 hNtrackletsvsmultFMD->GetXaxis()->SetTitle("N_{tracklets}");
279 hNclusters0vsmultFMD->GetXaxis()->SetTitle("N_{clusters}");
280 hmultV0vsmultFMD ->GetXaxis()->SetTitle("V0 mult");
281
282 fOutput->Add(hEzdc);
283 fOutput->Add(hEzem);
284 fOutput->Add(hNtracks);
285 fOutput->Add(hNtracklets);
286 fOutput->Add(hNclusters0);
287 fOutput->Add(hmultV0);
288 fOutput->Add(hmultFMD);
289
290 fOutput->Add(hEzemvsEzdc);
291 fOutput->Add(hNtracksvsEzdc);
292 fOutput->Add(hNtrackletsvsEzdc);
293 fOutput->Add(hNclusters0vsEzdc);
294 fOutput->Add(hmultV0vsEzdc);
295 fOutput->Add(hmultFMDvsEzdc);
296 fOutput->Add(hNtracksvsEzem);
297 fOutput->Add(hNtrackletsvsEzem);
298 fOutput->Add(hNclusters0vsEzem);
299 fOutput->Add(hmultV0vsEzem);
300 fOutput->Add(hmultFMDvsEzem);
301 fOutput->Add(hNtracksvsmultV0);
302 fOutput->Add(hNtrackletsvsmultV0);
303 fOutput->Add(hNclusters0vsmultV0);
304 fOutput->Add(hNtracksvsmultFMD);
305 fOutput->Add(hNtrackletsvsmultFMD);
306 fOutput->Add(hNclusters0vsmultFMD);
307 fOutput->Add(hmultV0vsmultFMD);
308
309 PostData(1, fOutput);
310
311}
312
313//________________________________________________________________________
314void AliAnalysisTaskCentrality::UserExec(Option_t */*option*/)
315{
316 // Execute analysis for current event:
317 if(fDebug>1) printf(" **** AliAnalysisTaskCentrality::UserExec() \n");
318
319 if(fAnalysisInput.CompareTo("ESD")==0){
320
321 AliVEvent* event = InputEvent();
322 AliESDEvent* esd = dynamic_cast<AliESDEvent*>(event);
323
324 fNev++;
325
326 fNTracks = event->GetNumberOfTracks();
327 fNPmdTracks = esd->GetNumberOfPmdTracks();
328
329 AliESDVZERO* esdV0 = esd->GetVZEROData();
330 fMultV0A=esdV0->GetMTotV0A();
331 fMultV0C=esdV0->GetMTotV0C();
332
333 if(fIsMCInput){
334
335 AliMCEvent* mcEvent = MCEvent();
336 if (!mcEvent) {
337 printf(" Could not retrieve MC event!!!\n");
338 return;
339 }
340
341 fNmyTracks_gen = 0;
342 AliStack *stack = 0x0; // needed for MC studies
343 stack = MCEvent()->Stack();
344 for (Int_t iTrack = 0; iTrack < MCEvent()->GetNumberOfTracks(); iTrack++) {
345 //get properties of mc particle
346 AliMCParticle* mcP = (AliMCParticle*) MCEvent()->GetTrack(iTrack);
347 // Primaries only
348 if (!(stack->IsPhysicalPrimary(mcP->Label()))) continue;
349 //charged tracks only
350 if (mcP->Particle()->GetPDG()->Charge() == 0) continue;
351 //same cuts as on ESDtracks
352// if(TMath::Abs(mcP->Eta())>0.9)continue;
353// if(mcP->Pt()<0.2)continue;
354// if(mcP->Pt()>200)continue;
355
356 fNmyTracks_gen ++;
357 }
358
359 AliGenEventHeader* genHeader = mcEvent->GenEventHeader();
360 if(!genHeader){
361 printf(" Event generator header not available!!!\n");
362 return;
363 }
364
365 if(genHeader->InheritsFrom(AliGenHijingEventHeader::Class())){
366 fbMC = ((AliGenHijingEventHeader*) genHeader)->ImpactParameter();
367 Int_t specNeutronProj = ((AliGenHijingEventHeader*) genHeader)->ProjSpectatorsn();
368 Int_t specProtonProj = ((AliGenHijingEventHeader*) genHeader)->ProjSpectatorsp();
369 Int_t specNeutronTarg = ((AliGenHijingEventHeader*) genHeader)->TargSpectatorsn();
370 Int_t specProtonTarg = ((AliGenHijingEventHeader*) genHeader)->TargSpectatorsp();
371 fNpartTargMC = 208.-(specNeutronTarg+specProtonTarg);
372 fNpartProjMC = 208.-(specNeutronProj+specProtonProj);
373 fNNColl = ((AliGenHijingEventHeader*) genHeader)->NN();
374 fNNwColl = ((AliGenHijingEventHeader*) genHeader)->NNw();
375 fNwNColl = ((AliGenHijingEventHeader*) genHeader)->NwN();
376 fNwNwColl = ((AliGenHijingEventHeader*) genHeader)->NwNw();
377 }
378
379 }
380
381 fBeamEnergy = esd->GetBeamEnergy();
382
383 // ***** Trigger selection
384 TString triggerClass = esd->GetFiredTriggerClasses();
385 sprintf(fTrigClass,"%s",triggerClass.Data());
386
387 const AliESDVertex *vertex = esd->GetPrimaryVertexSPD();
388 fxVertex = vertex->GetX();
389 fyVertex = vertex->GetY();
390 fzVertex = vertex->GetZ();
391 if(vertex->IsFromVertexer3D()) fVertexer3d = kTRUE;
392 else fVertexer3d = kFALSE;
393 Double_t vertex3[3];
394 vertex->GetXYZ(vertex3);
395
396 const AliMultiplicity *mult = esd->GetMultiplicity();
397 fNTracklets = mult->GetNumberOfTracklets();
398
399 for(Int_t ilay=0; ilay<6; ilay++){
400 fNClusters[ilay] = mult->GetNumberOfITSClusters(ilay);
401 }
402 fNSingleClusters = mult->GetNumberOfSingleClusters();
403
404 for(Int_t ilay=0; ilay<2; ilay++){
405 fNChips[ilay] = mult->GetNumberOfFiredChips(ilay);
406 }
407
408
409 AliESDFMD *fmd = esd->GetFMDData();
410 Float_t totalMultA = 0;
411 Float_t totalMultC = 0;
412 const Float_t fFMDLowCut = 0.4;
413
414 for(UShort_t det=1;det<=3;det++) {
415 Int_t nRings = (det==1 ? 1 : 2);
416 for (UShort_t ir = 0; ir < nRings; ir++) {
417 Char_t ring = (ir == 0 ? 'I' : 'O');
418 UShort_t nsec = (ir == 0 ? 20 : 40);
419 UShort_t nstr = (ir == 0 ? 512 : 256);
420 for(UShort_t sec =0; sec < nsec; sec++) {
421 for(UShort_t strip = 0; strip < nstr; strip++) {
422
423 Float_t FMDmult = fmd->Multiplicity(det,ring,sec,strip);
424 if(FMDmult == 0 || FMDmult == AliESDFMD::kInvalidMult) continue;
425
426 Float_t nParticles=0;
427
428 if(FMDmult > fFMDLowCut) {
429 nParticles = 1.;
430 }
431
432 if (det<3) totalMultA = totalMultA + nParticles;
433 else totalMultC = totalMultC + nParticles;
434
435 }
436 }
437 }
438 }
439 fMultFMDA = totalMultA;
440 fMultFMDC = totalMultC;
441
442
443 AliESDZDC *esdZDC = esd->GetESDZDC();
444
445 fESDFlag = esdZDC->GetESDQuality();
446
447 fZNCEnergy = (Float_t) (esdZDC->GetZDCN1Energy());
448 fZPCEnergy = (Float_t) (esdZDC->GetZDCP1Energy());
449 fZNAEnergy = (Float_t) (esdZDC->GetZDCN2Energy());
450 fZPAEnergy = (Float_t) (esdZDC->GetZDCP2Energy());
451 fZEM1Energy = (Float_t) (esdZDC->GetZDCEMEnergy(0));
452 fZEM2Energy = (Float_t) (esdZDC->GetZDCEMEnergy(1));
453
454 fbZDC = esdZDC->GetImpactParameter();
455 fNpartZDC = esdZDC->GetZDCParticipants();
456 fbZDCA = esdZDC->GetImpactParamSideA();
457 fNpartZDCA = esdZDC->GetZDCPartSideA();
458 fbZDCC = esdZDC->GetImpactParamSideC();
459 fNpartZDCC = esdZDC->GetZDCPartSideC();
460
461 const Double_t * towZNC = esdZDC->GetZN1TowerEnergy();
462 const Double_t * towZPC = esdZDC->GetZP1TowerEnergy();
463 const Double_t * towZNA = esdZDC->GetZN2TowerEnergy();
464 const Double_t * towZPA = esdZDC->GetZP2TowerEnergy();
465
466 for(Int_t it=0; it<5; it++){
467 fZNCtower[it] = (Float_t) (towZNC[it]);
468 fZPCtower[it] = (Float_t) (towZPC[it]);
469 fZNAtower[it] = (Float_t) (towZNA[it]);
470 fZPAtower[it] = (Float_t) (towZPA[it]);
471 }
472
473 Double_t xyZNC[2]={-99.,-99.}, xyZNA[2]={-99.,-99.};
474 esdZDC->GetZNCentroidInPbPb(fBeamEnergy, xyZNC, xyZNA);
475 for(Int_t it=0; it<2; it++){
476 fCentrZNC[it] = xyZNC[it];
477 fCentrZNA[it] = xyZNA[it];
478 }
479
480 // filling histos
481
482 hEzdc ->Fill((fZNCEnergy+fZPCEnergy+fZNAEnergy+fZPAEnergy)/1000.);
483 hEzem ->Fill(fZEM1Energy+fZEM2Energy);
484 hNtracks ->Fill(fNTracks);
485 hNtracklets ->Fill(fNTracklets);
486 hNclusters0 ->Fill(fNClusters[0]);
487 hmultV0 ->Fill(fMultV0A+fMultV0C);
488 hmultFMD ->Fill(fMultFMDA+fMultFMDC);
489
490 hEzemvsEzdc ->Fill(fZEM1Energy+fZEM2Energy, (fZNCEnergy+fZPCEnergy+fZNAEnergy+fZPAEnergy)/1000.);
491 hNtracksvsEzdc ->Fill(fNTracks, (fZNCEnergy+fZPCEnergy+fZNAEnergy+fZPAEnergy)/1000.);
492 hNtrackletsvsEzdc ->Fill(fNTracklets, (fZNCEnergy+fZPCEnergy+fZNAEnergy+fZPAEnergy)/1000.);
493 hNclusters0vsEzdc ->Fill(fNClusters[0], (fZNCEnergy+fZPCEnergy+fZNAEnergy+fZPAEnergy)/1000.);
494 hmultV0vsEzdc ->Fill(fMultV0A+fMultV0C, (fZNCEnergy+fZPCEnergy+fZNAEnergy+fZPAEnergy)/1000.);
495 hmultFMDvsEzdc ->Fill(fMultFMDA+fMultFMDC, (fZNCEnergy+fZPCEnergy+fZNAEnergy+fZPAEnergy)/1000.);
496 hNtracksvsEzem ->Fill(fNTracks, fZEM1Energy+fZEM2Energy);
497 hNtrackletsvsEzem ->Fill(fNTracklets, fZEM1Energy+fZEM2Energy);
498 hNclusters0vsEzem ->Fill(fNClusters[0], fZEM1Energy+fZEM2Energy);
499 hmultV0vsEzem ->Fill(fMultV0A+fMultV0C, fZEM1Energy+fZEM2Energy);
500 hmultFMDvsEzem ->Fill(fMultFMDA+fMultFMDC, fZEM1Energy+fZEM2Energy);
501 hNtracksvsmultV0 ->Fill(fNTracks,fMultV0A+fMultV0C);
502 hNtrackletsvsmultV0 ->Fill(fNTracklets,fMultV0A+fMultV0C);
503 hNclusters0vsmultV0 ->Fill(fNClusters[0],fMultV0A+fMultV0C);
504 hNtracksvsmultFMD ->Fill(fNTracks,fMultFMDA+fMultFMDC);
505 hNtrackletsvsmultFMD->Fill(fNTracklets,fMultFMDA+fMultFMDC);
506 hNclusters0vsmultFMD->Fill(fNClusters[0],fMultFMDA+fMultFMDC);
507 hmultV0vsmultFMD ->Fill(fMultV0A+fMultV0C,fMultFMDA+fMultFMDC);
508
509 }
510 else if(fAnalysisInput.CompareTo("AOD")==0){
511 //AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent());
512 // to be implemented
513 printf(" AOD analysis not yet implemented!!!\n\n");
514 return;
515 }
516 PostData(1, fOutput);
517}
518
519
520
521//________________________________________________________________________
522void AliAnalysisTaskCentrality::Terminate(Option_t */*option*/)
523{
524 // Terminate analysis
525}
526
527