Adding analysis task for the centrality trigger calibration.
[u/mrichter/AliRoot.git] / PWG1 / VZERO / AliAnaVZEROPbPb.cxx
CommitLineData
a148e064 1#include "TChain.h"
2#include "TTree.h"
3#include "TH1F.h"
4#include "TH2F.h"
5
6#include "AliAnalysisTask.h"
7#include "AliAnalysisManager.h"
8
9#include "AliESDEvent.h"
10#include "AliESDInputHandler.h"
11#include "AliAnaVZEROPbPb.h"
12#include "AliMultiplicity.h"
13#include "AliESDtrackCuts.h"
14#include "AliESDUtils.h"
15#include "AliCentrality.h"
16
17// VZERO includes
18#include "AliESDVZERO.h"
19#include "AliESDVZEROfriend.h"
20
21ClassImp(AliAnaVZEROPbPb)
22
7b0ae030 23 const Int_t AliAnaVZEROPbPb::kNBinMult = 200;
24 const Float_t AliAnaVZEROPbPb::kMultMax = 20000.;
25
a148e064 26
27AliAnaVZEROPbPb::AliAnaVZEROPbPb()
28 : AliAnalysisTaskSE("AliAnaVZEROPbPb"), fESD(0), fEsdV0(0), fOutputList(0), fClassesNames(0),
29 fNFlags(0),
30 fhAdcPMTNoTime(0),
31 fhAdcPMTWithTime(0),
32 fhTimePMT(0),
33 fhWidthPMT(0),
34 fhTimeCorr(0),
35 fhPmtMult(0),
36 fhV0ampl(0),
37 fhEvents(0),
38 fhVtxXYBB(0),
39 fhVtxZBB(0),
40 fhVtxXYBGA(0),
41 fhVtxZBGA(0),
42 fhVtxXYBGC(0),
43 fhVtxZBGC(0),
44 fhL2Triggers(0),
45fhOnlineCharge(0),
46fhRecoMult(0),
47fhV0vsSPDCentrality(0),
48fhTriggerBits(0),
49fhTotRecoMult(0),
7b0ae030 50fhCentrality(0),
51fhEqualizedMult(0),
52fhEqualizedMultSum(0),
53fhL2TriggersEfficiency(0),
54fhVBANDCounts(0)
a148e064 55{
56 // Constructor
57 for(Int_t i = 0; i < 2; ++i) {
58 fhAdcNoTime[i] = fhAdcWithTime[i] = fhWidth[i] = fhTime[i] = NULL;
59 fhAdcTime[i] = fhAdcWidth[i] = NULL;
60 }
61
62 // Define input and output slots here
63 // Input slot #0 works with a TChain
64 DefineInput(0, TChain::Class());
65 // Output slot #0 id reserved by the base class for AOD
66 // Output slot #1 writes into a TH1 container
67 DefineOutput(1, TList::Class());
68}
69
70//________________________________________________________________________
71AliAnaVZEROPbPb::AliAnaVZEROPbPb(const char *name)
72 : AliAnalysisTaskSE(name), fESD(0), fEsdV0(0), fOutputList(0),fNClasses(0),fClassesNames(0),
73 fNFlags(0),
74 fhAdcPMTNoTime(0),
75 fhAdcPMTWithTime(0),
76 fhTimePMT(0),
77 fhWidthPMT(0),
78 fhTimeCorr(0),
79 fhPmtMult(0),
80 fhV0ampl(0),
81 fhEvents(0),
82 fhVtxXYBB(0),
83 fhVtxZBB(0),
84 fhVtxXYBGA(0),
85 fhVtxZBGA(0),
86 fhVtxXYBGC(0),
87 fhVtxZBGC(0),
88 fhL2Triggers(0),
89fhOnlineCharge(0),
90fhRecoMult(0),
91fhV0vsSPDCentrality(0),
92fhTriggerBits(0),
93fhTotRecoMult(0),
7b0ae030 94fhCentrality(0),
95fhEqualizedMult(0),
96fhEqualizedMultSum(0),
97fhL2TriggersEfficiency(0),
98fhVBANDCounts(0)
a148e064 99{
100 // Constructor
101 for(Int_t i = 0; i < 2; ++i) {
102 fhAdcNoTime[i] = fhAdcWithTime[i] = fhWidth[i] = fhTime[i] = NULL;
103 fhAdcTime[i] = fhAdcWidth[i] = NULL;
104 }
105 // Define input and output slots here
106 // Input slot #0 works with a TChain
107 DefineInput(0, TChain::Class());
108 // Output slot #0 id reserved by the base class for AOD
109 // Output slot #1 writes into a TH1 container
110 DefineOutput(1, TList::Class());
111}
112//________________________________________________________________________
113void AliAnaVZEROPbPb::SetClassesNames(const Char_t * nameList){
114 TString names("AllClasses,");
115 names += nameList;
116 fClassesNames = names.Tokenize(",");
117 fNClasses = fClassesNames->GetEntriesFast();
118}
119//________________________________________________________________________
120TH1F * AliAnaVZEROPbPb::CreateHisto1D(const char* name, const char* title,Int_t nBins,
121 Double_t xMin, Double_t xMax,
122 const char* xLabel, const char* yLabel)
123{
124 // create a histogram
125 TH1F* result = new TH1F(name, title, nBins, xMin, xMax);
126 result->SetOption("hist");
127 if (xLabel) result->GetXaxis()->SetTitle(xLabel);
128 if (yLabel) result->GetYaxis()->SetTitle(yLabel);
129 result->SetMarkerStyle(kFullCircle);
130 return result;
131}
132
133//________________________________________________________________________
134TH2F * AliAnaVZEROPbPb::CreateHisto2D(const char* name, const char* title,Int_t nBinsX,
135 Double_t xMin, Double_t xMax,
136 Int_t nBinsY,
137 Double_t yMin, Double_t yMax,
138 const char* xLabel, const char* yLabel)
139{
140 // create a histogram
141 TH2F* result = new TH2F(name, title, nBinsX, xMin, xMax, nBinsY, yMin, yMax);
142 if (xLabel) result->GetXaxis()->SetTitle(xLabel);
143 if (yLabel) result->GetYaxis()->SetTitle(yLabel);
144 return result;
145}
146
147
148//________________________________________________________________________
149void AliAnaVZEROPbPb::UserCreateOutputObjects()
150{
151 // Create histograms
152 // Called once
153 if(fNClasses==0) {
154 AliFatal("No Classes Defined");
155 return;
156 }
157
158 fOutputList = new TList();
159 fOutputList->SetOwner(kTRUE);
160
161
7b0ae030 162 CreateHistosPerL2Trigger();
a148e064 163 CreateQAHistos();
a148e064 164
165 PostData(1, fOutputList);
166 }
167//________________________________________________________________________
168void AliAnaVZEROPbPb::Init()
169{
170
171}
172
173//________________________________________________________________________
174void AliAnaVZEROPbPb::UserExec(Option_t *)
175{
176 // Main loop
177 // Called for each event
178
179 fESD = dynamic_cast<AliESDEvent*>(InputEvent());
180 if (!fESD) {
181 printf("ERROR: fESD not available\n");
182 return;
183 }
184
185 fEsdV0 = fESD->GetVZEROData();
186 if (!fEsdV0) {
187 Printf("ERROR: esd V0 not available");
188 return;
189 }
190
191 FillQAHistos();
192
193 FillPerL2TriggerHistos();
194
195
196
197 PostData(1, fOutputList);
198}
199//________________________________________________________________________
200void AliAnaVZEROPbPb::CreateHistosPerL2Trigger(){
201
202 fhOnlineCharge= new TH2F*[fNClasses];
203 fhCentrality= new TH1F*[fNClasses];
204 fhV0vsSPDCentrality= new TH2F*[fNClasses];
7b0ae030 205 fhL2TriggersEfficiency = new TH1F*[fNClasses];
a148e064 206 fhRecoMult= new TH2F*[fNClasses];
207 fhTotRecoMult= new TH1F*[fNClasses];
208 fhTriggerBits= new TH1F*[fNClasses];
7b0ae030 209 fhEqualizedMult= new TH2F*[fNClasses];
210 fhEqualizedMultSum = new TH2F*[fNClasses];
211
a148e064 212 fhL2Triggers = CreateHisto1D("hL2Triggers","L2 Triggers",fNClasses,0,fNClasses);
213 fOutputList->Add(fhL2Triggers);
7b0ae030 214
215 fhVBANDCounts = CreateHisto1D("hVBANDTrigger","VBAND Triggers counts",kNBinMult,0.,kMultMax,"VZERO charge");
216 fOutputList->Add(fhVBANDCounts);
a148e064 217
218 TIter iter(fClassesNames);
219 TObjString* name;
220 Int_t iClass =0;
221 while((name = (TObjString*) iter.Next())){
222 fhL2Triggers->GetXaxis()->SetBinLabel(iClass+1,name->String().Data());
223
224 fhOnlineCharge[iClass] = CreateHisto2D(Form("hOnlineCharge_%s",name->String().Data()),Form("Online Charge for %s",name->String().Data()),100,0.,32000.,100,0.,32000,"V0A","V0C");
225 fOutputList->Add(fhOnlineCharge[iClass]);
226
227 fhCentrality[iClass] = CreateHisto1D(Form("hV0Centrality_%s",name->String().Data()),Form("V0 centrality for %s",name->String().Data()),100,0.,100.);
228 fOutputList->Add(fhCentrality[iClass]);
229
230 fhV0vsSPDCentrality[iClass] = CreateHisto2D(Form("hV0vsSPDCentrality_%s",name->String().Data()),Form("Centrality for %s",name->String().Data()),100,0.,100.,100,0.,100,"SPD Centrality (CL1)","V0 Centrality (V0M)");
231 fOutputList->Add(fhV0vsSPDCentrality[iClass]);
232
233 fhRecoMult[iClass] = CreateHisto2D(Form("hRecoMult_%s",name->String().Data()),Form("Reco Multiplicity for %s",name->String().Data()),100,0.,10000.,100,0.,20000,"V0A Mult","V0C Mult");
234 fOutputList->Add(fhRecoMult[iClass]);
235
7b0ae030 236 fhTotRecoMult[iClass] = CreateHisto1D(Form("hTotRecoMult_%s",name->String().Data()),Form("Total Reco Multiplicity for %s",name->String().Data()),kNBinMult,0.,kMultMax,"V0A + V0C Mult");
a148e064 237 fOutputList->Add(fhTotRecoMult[iClass]);
238
239 fhTriggerBits[iClass] = CreateHisto1D(Form("hTriggerBits_%s",name->String().Data()),Form("Trigger Bits for %s",name->String().Data()),16,-0.5,15.5);
240 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(1,"BBA_AND_BBC");
241 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(2,"BBA_OR_BBC");
242 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(3,"BGA_AND_BBC");
243 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(4,"BGA");
244 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(5,"BBA_AND_BGC");
245 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(6,"BGC");
246 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(7,"CTA1_AND_CTC1");
247 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(8,"CTA1_OR_CTC1");
248 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(9,"CTA2_AND_CTC2");
249 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(10,"CTA1_OR_CTC1");
250 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(11,"MTA_AND_MTC");
251 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(12,"MTA_OR_MTC");
252 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(13,"BBA");
253 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(14,"BBC");
254 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(15,"BGA_OR_BGC");
255 fhTriggerBits[iClass]->GetXaxis()->SetBinLabel(16,"All True BG");
7b0ae030 256 fOutputList->Add(fhTriggerBits[iClass]);
257
258 fhEqualizedMult[iClass] = CreateHisto2D(Form("hEqualizedMult_%s",name->String().Data()),Form("Equalized Multiplicity for %s",name->String().Data()),64,-0.5,63.5,1000,0.,50,"PMT channel","Equalized Multiplicity");
259 fOutputList->Add(fhEqualizedMult[iClass]);
260
261 fhEqualizedMultSum[iClass] = CreateHisto2D(Form("hEqualizedMultSum_%s",name->String().Data()),Form("Summed Equalized Multiplicity for %s",name->String().Data()),100,0.,500.,100,0.,1000,"V0A","V0C");
262 fOutputList->Add(fhEqualizedMultSum[iClass]);
a148e064 263
7b0ae030 264 fhL2TriggersEfficiency[iClass] = CreateHisto1D(Form("hL2TriggersEfficiency_%s",name->String().Data()),Form("Trigger %s Efficiency",name->String().Data()),kNBinMult,0.,kMultMax,"VZERO Multiplicity");
265 fOutputList->Add(fhL2TriggersEfficiency[iClass]);
266
a148e064 267 iClass++;
268 }
269
270}
271//________________________________________________________________________
272void AliAnaVZEROPbPb::CreateQAHistos(){
273
274 fNFlags = CreateHisto2D("hNFlags","BB Flags",33,-0.5,32.5,33,-0.5,32.5,"V0A","V0C");
275 fOutputList->Add(fNFlags);
276
277 for(int iSide = 0; iSide < 2; ++iSide){
278 TString side;
279 if(iSide) side = "V0A";
280 else side = "V0C";
281
282 fhAdcNoTime[iSide] = CreateHisto1D(Form("hAdcNoTime%s",side.Data()),Form("ADC (no Leading Time) %s",side.Data()),200,0,200,"ADC charge","Entries");
283 fOutputList->Add(fhAdcNoTime[iSide]);
284 fhAdcWithTime[iSide] = CreateHisto1D(Form("hAdcWithTime%s",side.Data()),Form("ADC (with Leading Time) %s",side.Data()),200,0,200,"ADC charge","Entries");
285 fOutputList->Add(fhAdcWithTime[iSide]);
286 fhTime[iSide] = CreateHisto1D(Form("htimepmt%s",side.Data()),Form("Time measured by TDC %s",side.Data()),400,-100,100,"Leading time (ns)","Entries");
287 fOutputList->Add(fhTime[iSide]);
288 fhWidth[iSide] = CreateHisto1D(Form("hwidth%s",side.Data()),Form("Signal width measured by TDC %s",side.Data()),128,0,200,"Signal width (ns)","Entries");
289 fOutputList->Add(fhWidth[iSide]);
290 fhAdcWidth[iSide] = CreateHisto2D(Form("hadcwidth%s",side.Data()),Form("Time width vs ADC %s",side.Data()),200,0,200,128,0,200,"ADC charge","Width (ns)");
291 fOutputList->Add(fhAdcWidth[iSide]);
292 fhAdcTime[iSide] = CreateHisto2D(Form("hAdcTime%s",side.Data()),Form("ADC vs Time %s",side.Data()),1000,-100,100,200,0,200,"Time (ns)","ADC charge");
293 fOutputList->Add(fhAdcTime[iSide]);
294 }
295
296 fhAdcPMTNoTime = CreateHisto2D("hadcpmtnotime","ADC vs PMT index (no leading time)",64,-0.5,63.5,200,0,200,"PMT index","ADC charge");
297 fhAdcPMTWithTime = CreateHisto2D("hadcpmtwithtime","ADC vs PMT index (with leading time)",64,-0.5,63.5,200,0,200,"PMT index","ADC charge");
298
299 fhTimePMT = CreateHisto2D("htimepmt","Time measured by TDC vs PMT index",64,-0.5,63.5,200,0,100,"PMT Index","Leading time (ns)");
300 fhWidthPMT = CreateHisto2D("hwidthpmt","Time width vs PMT index",64,-0.5,63.5,128,0,200,"PMT Index","Signal width (ns)");
301
302 fhTimeCorr = CreateHisto2D("htimecorr","Average time C side vs. A side",200,0,100,200,0,100,"Time V0A (ns)","Time V0C (ns");
303
304 fhV0ampl = CreateHisto1D("hV0ampl","V0 multiplicity in single channel (all V0 channels)",500,-0.5,499.5);
305
306 fhEvents = CreateHisto2D("hTriggerDecision","Trigger Decision",3,-0.5,2.5,3,-0.5,2.5,"V0A Decision","V0C Decision");
307 fhEvents->GetXaxis()->SetBinLabel(1,"Fake");
308 fhEvents->GetXaxis()->SetBinLabel(2,"BB");
309 fhEvents->GetXaxis()->SetBinLabel(3,"BG");
310 fhEvents->GetYaxis()->SetBinLabel(1,"Fake");
311 fhEvents->GetYaxis()->SetBinLabel(2,"BB");
312 fhEvents->GetYaxis()->SetBinLabel(3,"BG");
313
314 fhVtxXYBB = CreateHisto2D("fhVtxXYBB","XY SPD vertex (bb)",200,-2,2,200,-2,2);
315 fhVtxZBB = CreateHisto1D("fhVtxZBB","Z SPD vertex (bb)",400,-50,50);
316 fhVtxXYBGA = CreateHisto2D("fhVtxXYBGA","XY SPD vertex (bga)",200,-2,2,200,-2,2);
317 fhVtxZBGA = CreateHisto1D("fhVtxZBGA","Z SPD vertex (bga)",400,-50,50);
318 fhVtxXYBGC = CreateHisto2D("fhVtxXYBGC","XY SPD vertex (bgc)",200,-2,2,200,-2,2);
319 fhVtxZBGC = CreateHisto1D("fhVtxZBGC","Z SPD vertex (bgc)",400,-50,50);
320
321 fhPmtMult = CreateHisto2D("hV0CellMult","Number of fired PMTs (V0C vs V0A)",33,-0.5,32.5,33,-0.5,32.5,"# Cell (V0A)","# Cell (V0C)");
322 fOutputList->Add(fhPmtMult);
323
324
325 fOutputList->Add(fhAdcPMTNoTime);
326 fOutputList->Add(fhAdcPMTWithTime);
327
328 fOutputList->Add(fhTimePMT);
329 fOutputList->Add(fhWidthPMT);
330
331 fOutputList->Add(fhTimeCorr);
332 fOutputList->Add(fhV0ampl);
333
334 fOutputList->Add(fhEvents);
335
336 fOutputList->Add(fhVtxXYBB);
337 fOutputList->Add(fhVtxZBB);
338 fOutputList->Add(fhVtxXYBGA);
339 fOutputList->Add(fhVtxZBGA);
340 fOutputList->Add(fhVtxXYBGC);
341 fOutputList->Add(fhVtxZBGC);
342
343}
344//________________________________________________________________________
345Bool_t AliAnaVZEROPbPb::IsGoodEvent(){
346 Bool_t isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB);
347 if (!isSelected) return kFALSE;
348 const AliESDVertex *primaryVtx = fESD->GetPrimaryVertex();
349 if (!primaryVtx) return kFALSE;
350 if (!primaryVtx->GetStatus()) return kFALSE;
351 Double_t tPrimaryVtxPosition[3];
352 primaryVtx->GetXYZ(tPrimaryVtxPosition);
353 if (TMath::Abs(tPrimaryVtxPosition[2]) > 10.0) return kFALSE;
354
355 AliCentrality *centrality = fESD->GetCentrality();
356 if (centrality->GetQuality()) return kFALSE;
357
358 return kTRUE;
359}
360//________________________________________________________________________
361void AliAnaVZEROPbPb::FillPerL2TriggerHistos(){
362 TString trigStr(fESD->GetFiredTriggerClasses());
363
364// Bool_t isGoodEvt = IsGoodEvent();
365 TIter iter(fClassesNames);
366 TObjString* name;
367 Int_t iClass =0;
7b0ae030 368 if (trigStr.Contains("CPBI2-B")) fhVBANDCounts->Fill(fEsdV0->GetMTotV0A()+fEsdV0->GetMTotV0C());
369
a148e064 370 while((name = (TObjString*) iter.Next())){
371
372 if (!trigStr.Contains(name->String().Data()) && iClass>0) continue;
373
374 fhOnlineCharge[iClass]->Fill(fEsdV0->GetTriggerChargeA(),fEsdV0->GetTriggerChargeC());
375
376 fhL2Triggers->Fill(iClass);
377
378 fhRecoMult[iClass]->Fill(fEsdV0->GetMTotV0A(),fEsdV0->GetMTotV0C());
379 fhTotRecoMult[iClass]->Fill(fEsdV0->GetMTotV0A()+fEsdV0->GetMTotV0C());
380
7b0ae030 381
a148e064 382 for(int iTrig = 0; iTrig < 16; ++iTrig){
383 if(fEsdV0->GetTriggerBits() & (1<<iTrig)) fhTriggerBits[iClass]->Fill(iTrig);
384 }
385
386 AliCentrality *centrality = fESD->GetCentrality();
387 Float_t percentile = centrality->GetCentralityPercentile("V0M");
388 Float_t spdPercentile = centrality->GetCentralityPercentile("CL1");
389 if (spdPercentile < 0) spdPercentile = 0;
390 if (percentile < 0) percentile = 0;
391 fhCentrality[iClass]->Fill(percentile);
392 fhV0vsSPDCentrality[iClass]->Fill(spdPercentile,percentile);
7b0ae030 393
394 Float_t sumEqMult[2] = {0.,0.};
395 for(int iCh = 0; iCh < 64; ++iCh){
396 if(fEsdV0->GetTime(iCh) < 1e-6) continue;
397 Int_t side = iCh / 32 ;
398 sumEqMult[side] += fESD->GetVZEROEqMultiplicity(iCh);
399 fhEqualizedMult[iClass]->Fill(iCh,fESD->GetVZEROEqMultiplicity(iCh));
400 }
401 fhEqualizedMultSum[iClass]->Fill(sumEqMult[1],sumEqMult[0]);
402
a148e064 403 iClass++;
404 }
405}
406//________________________________________________________________________
407void AliAnaVZEROPbPb::FillQAHistos(){
408 // Count V0 flags
409 Int_t nV0A = 0, nV0C = 0;
410 for(Int_t i = 0; i < 32; ++i) {
411 if (fEsdV0->GetBBFlag(i)) nV0C++;
412 if (fEsdV0->GetBBFlag(i+32)) nV0A++;
413 }
414 fNFlags->Fill((Float_t)nV0A,(Float_t)nV0C);
415
416 for (Int_t i=0; i<64; ++i) {
417 Int_t side = i/32;
418 if (fEsdV0->GetTime(i) < 1e-6) {
419 fhAdcNoTime[side]->Fill(fEsdV0->GetAdc(i));
420 fhAdcPMTNoTime->Fill(i,fEsdV0->GetAdc(i));
421 } else {
422 fhAdcWithTime[side]->Fill(fEsdV0->GetAdc(i));
423 fhAdcPMTWithTime->Fill(i,fEsdV0->GetAdc(i));
424 }
425
426 fhTime[side]->Fill(fEsdV0->GetTime(i));
427 fhWidth[side]->Fill(fEsdV0->GetWidth(i));
428 fhAdcWidth[side]->Fill(fEsdV0->GetAdc(i),fEsdV0->GetWidth(i));
429 fhAdcTime[side]->Fill(fEsdV0->GetTime(i),fEsdV0->GetAdc(i));
430
431 fhTimePMT->Fill(i,fEsdV0->GetTime(i));
432 fhWidthPMT->Fill(i,fEsdV0->GetWidth(i));
433
434 }
435
436 fhTimeCorr->Fill(fEsdV0->GetV0ATime(),fEsdV0->GetV0CTime());
437
438 AliESDVZERO::Decision flaga = fEsdV0->GetV0ADecision();
439 AliESDVZERO::Decision flagc = fEsdV0->GetV0CDecision();
440
441 fhEvents->Fill(flaga,flagc);
442
443 const AliESDVertex *vtx = fESD->GetPrimaryVertexSPD();
444
445 if (flaga <= 1 && flagc <=1) {
446 fhVtxXYBB->Fill(vtx->GetXv(),vtx->GetYv());
447 fhVtxZBB->Fill(vtx->GetZv());
448 }
449 else {
450 if (flaga == 2) {
451 fhVtxXYBGA->Fill(vtx->GetXv(),vtx->GetYv());
452 fhVtxZBGA->Fill(vtx->GetZv());
453 }
454 if (flagc == 2) {
455 fhVtxXYBGC->Fill(vtx->GetXv(),vtx->GetYv());
456 fhVtxZBGC->Fill(vtx->GetZv());
457 }
458 }
459
460 fhPmtMult->Fill(fEsdV0->GetNbPMV0A(),fEsdV0->GetNbPMV0C());
461 for(Int_t i = 0; i < 64; i++) {
462 fhV0ampl->Fill(fEsdV0->GetMultiplicity(i));
463 }
464
465}
466//________________________________________________________________________
467void AliAnaVZEROPbPb::Terminate(Option_t *)
468{
469 // Draw result to the screen
470 // Called once at the end of the query
471
472 fOutputList = dynamic_cast<TList*> (GetOutputData(1));
473 if (!fOutputList) {
474 printf("ERROR: Output list not available\n");
475 return;
476 }
7b0ae030 477 fhVBANDCounts= (TH1F*) fOutputList->At(1); // VBAND histo
478
479 for(int i = 0; i < fNClasses; ++i){
480 fhTotRecoMult[i] = (TH1F*) fOutputList->At(6+ i*9); // Other defined trigger histo
481 fhL2TriggersEfficiency[i] = (TH1F*) fOutputList->At(10+ i*9);
482 fhL2TriggersEfficiency[i]->Divide(fhTotRecoMult[i],fhVBANDCounts);
483 }
484
a148e064 485}