AliPhysics  ec7afe5 (ec7afe5)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalJetQA.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2016, 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 #include <cstring>
17 
18 #include <TClonesArray.h>
19 #include <TH1F.h>
20 #include <TH2F.h>
21 #include <TH3F.h>
22 #include <THnSparse.h>
23 #include <THashList.h>
24 
25 #include <AliVEventHandler.h>
26 #include <AliAnalysisManager.h>
27 
28 #include "AliParticleContainer.h"
29 #include "AliClusterContainer.h"
30 #include "AliTrackContainer.h"
31 #include "AliCentrality.h"
32 #include "AliVCluster.h"
33 #include "AliVParticle.h"
34 #include "AliVTrack.h"
35 #include "AliLog.h"
36 #include "AliEMCALGeometry.h"
37 #include "AliEMCALGeoParams.h"
38 #include "AliPicoTrack.h"
39 #include "AliVVZERO.h"
40 #include "AliESDUtils.h"
41 
43 
45 
46 //________________________________________________________________________
49  fCellEnergyCut(0.05),
50  fParticleLevel(kFALSE),
51  fIsMC(kFALSE),
52  fCentMethod2(""),
53  fCentMethod3(""),
54  fDoV0QA(0),
55  fDoEPQA(0),
56  fDoLeadingObjectPosition(0),
57  fMaxCellsInCluster(50),
58  fPtBinWidth(0.5),
59  fMaxPt(150),
60  fSeparateEMCalDCal(kTRUE),
61  fIsEmbedded(kFALSE),
62  fCent2(0),
63  fCent3(0),
64  fVZERO(0),
65  fV0ATotMult(0),
66  fV0CTotMult(0),
67  fNTotTracks(0),
68  fLeadingTrack(),
69  fHistManager("AliAnalysisTaskEmcalJetQA")
70 {
71  // Default constructor.
72 
73  memset(fNTotClusters, 0, sizeof(Int_t)*3);
74 
75  SetMakeGeneralHistograms(kTRUE);
76 }
77 
78 //________________________________________________________________________
80  AliAnalysisTaskEmcalLight(name, kTRUE),
81  fCellEnergyCut(0.05),
82  fParticleLevel(kFALSE),
83  fIsMC(kFALSE),
84  fCentMethod2(""),
85  fCentMethod3(""),
86  fDoV0QA(0),
87  fDoEPQA(0),
88  fDoLeadingObjectPosition(0),
89  fMaxCellsInCluster(50),
90  fPtBinWidth(0.5),
91  fMaxPt(150),
92  fSeparateEMCalDCal(kTRUE),
93  fIsEmbedded(kFALSE),
94  fCent2(0),
95  fCent3(0),
96  fVZERO(0),
97  fV0ATotMult(0),
98  fV0CTotMult(0),
99  fNTotTracks(0),
100  fLeadingTrack(),
101  fHistManager(name)
102 {
103  // Standard
104 
105  memset(fNTotClusters, 0, sizeof(Int_t)*3);
106 
108 }
109 
110 //________________________________________________________________________
112 {
113  // Destructor
114 }
115 
116 //________________________________________________________________________
118 {
119  // Create histograms
120 
122 
123  TString histname;
124  TString title;
125 
126  Int_t nPtBins = TMath::CeilNint(fMaxPt / fPtBinWidth);
127 
128  for (auto cont_it : fParticleCollArray) {
129  AliParticleContainer* cont = cont_it.second;
130  if (!fParticleLevel && fIsMC) {
131  for (Int_t i = 0; i < GetNCentBins(); i++) {
132  histname = TString::Format("%s/fHistTrNegativeLabels_%d", cont->GetArrayName().Data(), i);
133  title = histname + ";% of negative labels;counts";
134  fHistManager.CreateTH1(histname.Data(), title.Data(), 500, 0, 1);
135 
136  histname = TString::Format("%s/fHistTrZeroLabels_%d", cont->GetArrayName().Data(), i);
137  title = histname + ";% of zero labels;counts";
138  fHistManager.CreateTH1(histname.Data(), title.Data(), 500, 0, 1);
139  }
140  }
141 
142  Int_t nlabels = 4;
143  if (fParticleLevel) nlabels = 1;
144 
145  for (Int_t i = 0; i < GetNCentBins(); i++) {
146  histname = TString::Format("%s/fHistRejectionReason_%d", cont->GetArrayName().Data(), i);
147  title = histname + ";Rejection reason;#it{p}_{T,track} (GeV/#it{c});counts";
148  TH2* hist = fHistManager.CreateTH2(histname.Data(), title.Data(), 32, 0, 32, 40, 0, 100);
149  SetRejectionReasonLabels(hist->GetXaxis());
150 
151  for (Int_t j = 0; j < nlabels; j++) {
152  histname = TString::Format("%s/fHistTrPhiEtaPt_%d_%d", cont->GetArrayName().Data(), i, j);
153  title = histname + ";#eta;#phi;#it{p}_{T} (GeV/#it{c})";
154  fHistManager.CreateTH3(histname.Data(), title.Data(), 100, -1, 1, 100, 0, TMath::TwoPi(), nPtBins, 0, fMaxPt);
155  }
156 
157  if (!fParticleLevel) {
158  if (fIsMC) {
159  histname = TString::Format("%s/fHistTrPhiEtaZeroLab_%d", cont->GetArrayName().Data(), i);
160  title = histname + ";#eta;#phi;counts";
161  fHistManager.CreateTH2(histname.Data(), title.Data(), 100, -1, 1, 100, 0, TMath::TwoPi());
162 
163  histname = TString::Format("%s/fHistTrPtZeroLab_%d", cont->GetArrayName().Data(), i);
164  title = histname + ";#it{p}_{T} (GeV/#it{c});counts";
165  fHistManager.CreateTH1(histname.Data(), title.Data(), nPtBins, 0, fMaxPt);
166  }
167 
168  histname = TString::Format("%s/fHistTrEmcPhiEta_%d", cont->GetArrayName().Data(), i);
169  title = histname + ";#eta;#phi;counts";
170  fHistManager.CreateTH2(histname.Data(), title.Data(), 100, -1, 1, 100, 0, TMath::TwoPi());
171 
172  histname = TString::Format("%s/fHistTrEmcPt_%d", cont->GetArrayName().Data(), i);
173  title = histname + ";#it{p}_{T} (GeV/#it{c});counts";
174  fHistManager.CreateTH1(histname.Data(), title.Data(), nPtBins, 0, fMaxPt);
175 
176  histname = TString::Format("%s/fHistTrPhiEtaNonProp_%d", cont->GetArrayName().Data(), i);
177  title = histname + ";#eta;#phi;counts";
178  fHistManager.CreateTH2(histname.Data(), title.Data(), 100, -1, 1, 100, 0, TMath::TwoPi());
179 
180  histname = TString::Format("%s/fHistTrPtNonProp_%d", cont->GetArrayName().Data(), i);
181  title = histname + ";#it{p}_{T} (GeV/#it{c});counts";
182  fHistManager.CreateTH1(histname.Data(), title.Data(), nPtBins, 0, fMaxPt);
183 
184  histname = TString::Format("%s/fHistDeltaEtaPt_%d", cont->GetArrayName().Data(), i);
185  title = histname + ";#it{p}_{T} (GeV/#it{c});#delta#eta;counts";
186  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, 50, -0.5, 0.5);
187 
188  histname = TString::Format("%s/fHistDeltaPhiPt_%d", cont->GetArrayName().Data(), i);
189  title = histname + ";#it{p}_{T} (GeV/#it{c});#delta#phi;counts";
190  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, 200, -2, 2);
191 
192  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", cont->GetArrayName().Data(), i);
193  title = histname + ";#it{p}_{T} (GeV/#it{c});#delta#it{p}_{T} (GeV/#it{c});counts";
194  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, nPtBins, -fMaxPt/2, fMaxPt/2);
195  }
196  }
197  }
198 
199  for (auto cont_it : fClusterCollArray) {
200  AliClusterContainer* cont = cont_it.second;
201  for (Int_t i = 0; i < GetNCentBins(); i++) {
202  const Int_t nSM = 20;
203 
204  for (Int_t sm = 0; sm < nSM; sm++) {
205  histname = TString::Format("%s/BySM/fHistClusEnergy_SM%d_%d", cont->GetArrayName().Data(), sm, i);
206  title = histname + ";#it{E}_{cluster} (GeV);counts";
207  fHistManager.CreateTH1(histname.Data(), title.Data(), nPtBins, 0, fMaxPt);
208  }
209 
210  histname = TString::Format("%s/fHistRejectionReason_%d", cont->GetArrayName().Data(), i);
211  title = histname + ";Rejection reason;#it{E}_{cluster} (GeV);counts";
212  TH2* hist = fHistManager.CreateTH2(histname.Data(), title.Data(), 32, 0, 32, 40, 0, 100);
213  SetRejectionReasonLabels(hist->GetXaxis());
214 
215  histname = TString::Format("%s/fHistClusPosition_%d", cont->GetArrayName().Data(), i);
216  title = histname + ";#it{x} (cm);#it{y} (cm);#it{z} (cm)";
217  fHistManager.CreateTH3(histname.Data(), title.Data(), 50, -500, 500, 50, -500, 500, 50, -500, 500);
218 
219  histname = TString::Format("%s/fHistClusPhiEtaEnergy_%d", cont->GetArrayName().Data(), i);
220  title = histname + ";#eta;#phi;#it{E}_{cluster} (GeV)";
221  fHistManager.CreateTH3(histname.Data(), title.Data(), 100, -1, 1, 100, 0, TMath::TwoPi(), nPtBins, 0, fMaxPt);
222 
223  if (fForceBeamType != kpp) {
224  histname = TString::Format("%s/fHistClusDeltaPhiEPEnergy_%d", cont->GetArrayName().Data(), i);
225  title = histname + ";#it{E}_{cluster} (GeV);#phi_{cluster} - #psi_{EP};counts";
226  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, 100, 0, TMath::Pi());
227  }
228 
229  if (fIsEmbedded) {
230  histname = TString::Format("%s/fHistClusMCEnergyFraction_%d", cont->GetArrayName().Data(), i);
231  title = histname + ";MC fraction;counts";
232  fHistManager.CreateTH1(histname.Data(), title.Data(), nPtBins, 0, 1.2);
233  }
234 
235  histname = TString::Format("%s/fHistClusTimeEnergy_%d", cont->GetArrayName().Data(), i);
236  title = histname + ";#it{E}_{cluster} (GeV);time (s);counts";
237  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, nPtBins, -5e-6, 5e-6);
238 
240  while (nbins > nPtBins) nbins /= 2;
241  histname = TString::Format("%s/fHistNCellsEnergy_%d", cont->GetArrayName().Data(), i);
242  title = histname + ";#it{E}_{cluster} (GeV);#it{N}_{cells};counts";
243  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, nbins, -0.5, fMaxCellsInCluster-0.5);
244 
245  histname = TString::Format("%s/fHistFcrossEnergy_%d", cont->GetArrayName().Data(), i);
246  title = histname + ";#it{E}_{cluster} (GeV);#it{F}_{cross};counts";
247  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, 200, -3.5, 1.5);
248 
249  histname = TString::Format("%s/fHistClusEnergy_%d", cont->GetArrayName().Data(), i);
250  title = histname + ";#it{E}_{cluster} (GeV);counts";
251  fHistManager.CreateTH1(histname.Data(), title.Data(), nPtBins, 0, fMaxPt);
252 
253  histname = TString::Format("%s/fHistClusNonLinCorrEnergy_%d", cont->GetArrayName().Data(), i);
254  title = histname + ";#it{E}_{cluster} (GeV);counts";
255  fHistManager.CreateTH1(histname.Data(), title.Data(), nPtBins, 0, fMaxPt);
256 
257  histname = TString::Format("%s/fHistClusHadCorrEnergy_%d", cont->GetArrayName().Data(), i);
258  title = histname + ";#it{E}_{cluster} (GeV);counts";
259  fHistManager.CreateTH1(histname.Data(), title.Data(), nPtBins, 0, fMaxPt);
260  }
261  }
262 
263  if (!fCaloCellsName.IsNull()) {
264  for (Int_t i = 0; i < GetNCentBins(); i++) {
265  histname = TString::Format("%s/fHistCellsAbsIdEnergy_%d", fCaloCellsName.Data(), i);
266  title = histname + ";cell abs. Id;#it{E}_{cell} (GeV);counts";
267  fHistManager.CreateTH2(histname.Data(), title.Data(), 20000,0,20000,(Int_t)(nPtBins / 2), 0, fMaxPt / 2);
268 
269  histname = TString::Format("%s/fHistCellsAbsIdTime_%d", fCaloCellsName.Data(), i);
270  title = histname + ";cell abs. Id;#it{time}_{cell} (s);counts";
271  fHistManager.CreateTH2(histname.Data(), title.Data(), 20000,0,20000,(Int_t)(nPtBins / 2), -5e-6, 5e-6);
272  }
273  }
274 
275  Int_t dim = 0;
276  TString axistitle[40];
277  Int_t nbins[40] = {0};
278  Double_t min[40] = {0};
279  Double_t max[40] = {0};
280 
282  axistitle[dim] = "Centrality %";
283  nbins[dim] = 101;
284  min[dim] = 0;
285  max[dim] = 101;
286  dim++;
287 
288  if (!fCentMethod2.IsNull()) {
289  axistitle[dim] = Form("Centrality %s %%", fCentMethod2.Data());
290  nbins[dim] = 101;
291  min[dim] = 0;
292  max[dim] = 101;
293  dim++;
294  }
295 
296  if (!fCentMethod3.IsNull()) {
297  axistitle[dim] = Form("Centrality %s %%", fCentMethod3.Data());
298  nbins[dim] = 101;
299  min[dim] = 0;
300  max[dim] = 101;
301  dim++;
302  }
303 
304  if (fDoV0QA==1) {
305  axistitle[dim] = "V0A total multiplicity";
306  nbins[dim] = 200;
307  min[dim] = 0;
308  max[dim] = 20000;
309  dim++;
310 
311  axistitle[dim] = "V0C total multiplicity";
312  nbins[dim] = 200;
313  min[dim] = 0;
314  max[dim] = 20000;
315  dim++;
316  }
317  else if (fDoV0QA==2) {
318  axistitle[dim] = "V0A+V0C total multiplicity";
319  nbins[dim] = 300;
320  min[dim] = 0;
321  max[dim] = 30000;
322  dim++;
323  }
324 
325  if (fDoEPQA) {
326  axistitle[dim] = "#psi_{EP}";
327  nbins[dim] = 200;
328  min[dim] = -TMath::Pi();
329  max[dim] = TMath::Pi();
330  dim++;
331  }
332  }
333 
334  if (fParticleCollArray.size() > 0) {
335  axistitle[dim] = "No. of tracks";
337  nbins[dim] = 3000;
338  min[dim] = -0.5;
339  max[dim] = 6000-0.5;
340  }
341  else {
342  nbins[dim] = 200;
343  min[dim] = 0;
344  max[dim] = 200;
345  }
346  dim++;
347 
348  axistitle[dim] = "#it{p}_{T,track}^{leading} (GeV/c)";
349  nbins[dim] = nPtBins;
350  min[dim] = 0;
351  max[dim] = fMaxPt;
352  dim++;
353 
355  axistitle[dim] = "#eta_{track}^{leading}";
356  nbins[dim] = 100;
357  min[dim] = -1;
358  max[dim] = 1;
359  dim++;
360 
361  axistitle[dim] = "#phi_{track}^{leading}";
362  nbins[dim] = 100;
363  min[dim] = 0;
364  max[dim] = TMath::TwoPi();
365  dim++;
366  }
367  }
368 
369  if (fClusterCollArray.size() > 0) {
370  axistitle[dim] = "No. of clusters";
371 
373  nbins[dim] = 2000;
374  min[dim] = -0.5;
375  max[dim] = 4000-0.5;
376  }
377  else {
378  nbins[dim] = 200;
379  min[dim] = 0;
380  max[dim] = 200;
381  }
382  dim++;
383 
384  if (fSeparateEMCalDCal) {
385  axistitle[dim] = "#it{E}_{EMCal cluster}^{leading} (GeV)";
386  nbins[dim] = nPtBins;
387  min[dim] = 0;
388  max[dim] = fMaxPt;
389  dim++;
390 
391  axistitle[dim] = "#it{E}_{DCal cluster}^{leading} (GeV)";
392  nbins[dim] = nPtBins;
393  min[dim] = 0;
394  max[dim] = fMaxPt;
395  dim++;
396 
397  axistitle[dim] = "#it{E}_{PHOS cluster}^{leading} (GeV)";
398  nbins[dim] = nPtBins;
399  min[dim] = 0;
400  max[dim] = fMaxPt;
401  dim++;
402 
404  axistitle[dim] = "#eta_{EMCal cluster}^{leading}";
405  nbins[dim] = 100;
406  min[dim] = -1;
407  max[dim] = 1;
408  dim++;
409 
410  axistitle[dim] = "#phi_{EMCal cluster}^{leading}";
411  nbins[dim] = 100;
412  min[dim] = 0;
413  max[dim] = TMath::TwoPi();
414  dim++;
415 
416  axistitle[dim] = "#eta_{DCal cluster}^{leading}";
417  nbins[dim] = 100;
418  min[dim] = -1;
419  max[dim] = 1;
420  dim++;
421 
422  axistitle[dim] = "#phi_{DCal cluster}^{leading}";
423  nbins[dim] = 100;
424  min[dim] = 0;
425  max[dim] = TMath::TwoPi();
426  dim++;
427 
428  axistitle[dim] = "#eta_{PHOS cluster}^{leading}";
429  nbins[dim] = 100;
430  min[dim] = -1;
431  max[dim] = 1;
432  dim++;
433 
434  axistitle[dim] = "#phi_{PHOS cluster}^{leading}";
435  nbins[dim] = 100;
436  min[dim] = 0;
437  max[dim] = TMath::TwoPi();
438  dim++;
439  }
440  }
441  else {
442  axistitle[dim] = "#it{E}_{cluster}^{leading} (GeV)";
443  nbins[dim] = nPtBins;
444  min[dim] = 0;
445  max[dim] = fMaxPt;
446  dim++;
447 
449  axistitle[dim] = "#eta_{cluster}^{leading}";
450  nbins[dim] = 100;
451  min[dim] = -1;
452  max[dim] = 1;
453  dim++;
454 
455  axistitle[dim] = "#phi_{cluster}^{leading}";
456  nbins[dim] = 100;
457  min[dim] = 0;
458  max[dim] = TMath::TwoPi();
459  dim++;
460  }
461  }
462  }
463 
464  if (!fCaloCellsName.IsNull()) {
465  axistitle[dim] = "No. of cells";
466 
468  nbins[dim] = 5000;
469  min[dim] = -0.5;
470  max[dim] = 10000-0.5;
471  }
472  else {
473  nbins[dim] = 500;
474  min[dim] = -0.5;
475  max[dim] = 500-0.5;
476  }
477 
478  dim++;
479  }
480 
481  THnSparse* hn = fHistManager.CreateTHnSparse("fHistEventQA","fHistEventQA",dim,nbins,min,max);
482  for (Int_t i = 0; i < dim; i++)
483  hn->GetAxis(i)->SetTitle(axistitle[i]);
484 
486 
487  PostData(1, fOutput); // Post data for ALL output slots >0 here, to get at least an empty histogram
488 }
489 
490 //________________________________________________________________________
492 {
493  if (fClusterCollArray.size() == 0 && fCaloCellsName.IsNull()) {
494  fNeedEmcalGeom = kFALSE;
495  }
496  else {
497  fNeedEmcalGeom = kTRUE;
498  }
499 
501 
502  if (fDoV0QA) {
503  fVZERO = InputEvent()->GetVZEROData();
504  if (!fVZERO) {
505  AliError("AliVVZERO not available");
506  }
507  }
508 }
509 
510 //________________________________________________________________________
512 {
513  // Retrieve event objects.
514 
516 
517  if (!fCentMethod2.IsNull() || !fCentMethod3.IsNull()) {
518  if (fBeamType == kAA || fBeamType == kpA ) {
519  AliCentrality *aliCent = InputEvent()->GetCentrality();
520  if (aliCent) {
521  if (!fCentMethod2.IsNull())
522  fCent2 = aliCent->GetCentralityPercentile(fCentMethod2);
523  if (!fCentMethod3.IsNull())
524  fCent3 = aliCent->GetCentralityPercentile(fCentMethod3);
525  }
526  }
527  }
528 
529  if (fVZERO) {
530  fV0ATotMult = AliESDUtils::GetCorrV0A(fVZERO->GetMTotV0A(),fVertex[2]);
531  fV0CTotMult = AliESDUtils::GetCorrV0C(fVZERO->GetMTotV0C(),fVertex[2]);
532  }
533 
534  return kTRUE;
535 }
536 
537 //________________________________________________________________________
539 {
540  // Fill histograms.
541 
542  EventQA_t eventQA;
543 
544  DoTrackLoop();
545  AliDebug(2,Form("%d tracks found in the event", fNTotTracks));
546  eventQA.fMaxTrack = fLeadingTrack;
547 
548  DoClusterLoop();
549  AliDebug(2,Form("%d clusters found in EMCal, %d in DCal and %d in PHOS", fNTotClusters[0], fNTotClusters[1], fNTotClusters[2]));
550  for (Int_t i = 0; i < 3; i++) {
551  eventQA.fMaxCluster[i] = fLeadingCluster[i];
552  }
553 
554  if (fCaloCells) {
555  eventQA.fNCells = DoCellLoop();
556  AliDebug(2,Form("%d cells found in the event", eventQA.fNCells));
557  }
558 
559  eventQA.fCent = fCent;
560  eventQA.fCent2 = fCent2;
561  eventQA.fCent3 = fCent3;
562  eventQA.fV0A = fV0ATotMult;
563  eventQA.fV0C = fV0CTotMult;
564  eventQA.fEP = fEPV0;
565  eventQA.fNTracks = fNTotTracks;
566  eventQA.fNClusters[0] = fNTotClusters[0];
567  eventQA.fNClusters[1] = fNTotClusters[1];
568  eventQA.fNClusters[2] = fNTotClusters[2];
569 
570  FillEventQAHisto(eventQA);
571 
572  return kTRUE;
573 }
574 
575 //________________________________________________________________________
577 {
578  Double_t contents[40]={0};
579 
580  Int_t globalNclusters = eventQA.fNClusters[0] + eventQA.fNClusters[1] + eventQA.fNClusters[2];
581 
582  AliTLorentzVector globalMaxCluster;
583  for (Int_t i = 0; i < 3; i++) {
584  if (globalMaxCluster.E() < eventQA.fMaxCluster[i].E()) globalMaxCluster = eventQA.fMaxCluster[i];
585  }
586 
587  THnSparse* histEventQA = static_cast<THnSparse*>(fHistManager.FindObject("fHistEventQA"));
588 
589  for (Int_t i = 0; i < histEventQA->GetNdimensions(); i++) {
590  TString title(histEventQA->GetAxis(i)->GetTitle());
591  if (title=="Centrality %")
592  contents[i] = eventQA.fCent;
593  else if (title==Form("Centrality %s %%", fCentMethod2.Data()))
594  contents[i] = eventQA.fCent2;
595  else if (title==Form("Centrality %s %%", fCentMethod3.Data()))
596  contents[i] = eventQA.fCent3;
597  else if (title=="V0A total multiplicity")
598  contents[i] = eventQA.fV0A;
599  else if (title=="V0C total multiplicity")
600  contents[i] = eventQA.fV0C;
601  else if (title=="V0A+V0C total multiplicity")
602  contents[i] = eventQA.fV0A+eventQA.fV0C;
603  else if (title=="#psi_{RP}")
604  contents[i] = eventQA.fEP;
605  else if (title=="No. of tracks")
606  contents[i] = eventQA.fNTracks;
607  else if (title=="No. of clusters")
608  contents[i] = globalNclusters;
609  else if (title=="No. of cells")
610  contents[i] = eventQA.fNCells;
611  else if (title=="#it{p}_{T,track}^{leading} (GeV/c)")
612  contents[i] = eventQA.fMaxTrack.Pt();
613  else if (title=="#eta_{track}^{leading}")
614  contents[i] = eventQA.fMaxTrack.Eta();
615  else if (title=="#phi_{track}^{leading}")
616  contents[i] = eventQA.fMaxTrack.Phi_0_2pi();
617  else if (title=="#it{E}_{cluster}^{leading} (GeV)")
618  contents[i] = globalMaxCluster.E();
619  else if (title=="#eta_{cluster}^{leading}")
620  contents[i] = globalMaxCluster.Eta();
621  else if (title=="#phi_{cluster}^{leading}")
622  contents[i] = globalMaxCluster.Phi();
623  else if (title=="#it{E}_{EMCal cluster}^{leading} (GeV)")
624  contents[i] = eventQA.fMaxCluster[0].E();
625  else if (title=="#eta_{EMCal cluster}^{leading}")
626  contents[i] = eventQA.fMaxCluster[0].Phi_0_2pi();
627  else if (title=="#phi_{EMCal cluster}^{leading}")
628  contents[i] = eventQA.fMaxCluster[0].Eta();
629  else if (title=="#it{E}_{DCal cluster}^{leading} (GeV)")
630  contents[i] = eventQA.fMaxCluster[1].E();
631  else if (title=="#phi_{DCal cluster}^{leading}")
632  contents[i] = eventQA.fMaxCluster[1].Phi_0_2pi();
633  else if (title=="#eta_{DCal cluster}^{leading}")
634  contents[i] = eventQA.fMaxCluster[1].Eta();
635  else if (title=="#it{E}_{PHOS cluster}^{leading} (GeV)")
636  contents[i] = eventQA.fMaxCluster[2].E();
637  else if (title=="#phi_{PHOS cluster}^{leading}")
638  contents[i] = eventQA.fMaxCluster[2].Phi_0_2pi();
639  else if (title=="#eta_{PHOS cluster}^{leading}")
640  contents[i] = eventQA.fMaxCluster[2].Eta();
641  else
642  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
643  }
644 
645  histEventQA->Fill(contents);
646 }
647 
648 //________________________________________________________________________
650 {
651  // Do cell loop.
652 
653  if (!fCaloCells) return 0;
654 
655  TString histname_en = TString::Format("%s/fHistCellsAbsIdEnergy_%d", fCaloCellsName.Data(), fCentBin);
656  TString histname_tm = TString::Format("%s/fHistCellsAbsIdTime_%d", fCaloCellsName.Data(), fCentBin);
657 
658  const Int_t ncells = fCaloCells->GetNumberOfCells();
659  Int_t nAccCells = 0;
660 
661  for (Int_t pos = 0; pos < ncells; pos++) {
662  Float_t amp = fCaloCells->GetAmplitude(pos);
663  Float_t time = fCaloCells->GetTime(pos);
664  Int_t absId = fCaloCells->GetCellNumber(pos);
665 
666  if (amp < fCellEnergyCut) continue;
667 
668  fHistManager.FillTH2(histname_en, absId, amp);
669  fHistManager.FillTH2(histname_tm, absId, time);
670  nAccCells++;
671  }
672 
673  return nAccCells;
674 }
675 
676 //________________________________________________________________________
677 Double_t AliAnalysisTaskEmcalJetQA::GetFcross(AliVCluster *cluster, AliVCaloCells *cells)
678 {
679  Int_t AbsIdseed = -1;
680  Double_t Eseed = 0;
681  for (Int_t i = 0; i < cluster->GetNCells(); i++) {
682  if (cells->GetCellAmplitude(cluster->GetCellAbsId(i)) > Eseed) {
683  Eseed = cells->GetCellAmplitude(cluster->GetCellAbsId(i));
684  AbsIdseed = cluster->GetCellAbsId(i);
685  }
686  }
687 
688  if (Eseed < 1e-9)
689  return 100;
690 
691  Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
692  fGeom->GetCellIndex(AbsIdseed,imod,iTower,iIphi,iIeta);
693  fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,iphi,ieta);
694 
695  //Get close cells index and energy, not in corners
696 
697  Int_t absID1 = -1;
698  Int_t absID2 = -1;
699 
700  if (iphi < AliEMCALGeoParams::fgkEMCALRows-1) absID1 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
701  if (iphi > 0) absID2 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
702 
703  // In case of cell in eta = 0 border, depending on SM shift the cross cell index
704 
705  Int_t absID3 = -1;
706  Int_t absID4 = -1;
707 
708  if (ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2)) {
709  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
710  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
711  }
712  else if (ieta == 0 && imod%2) {
713  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
714  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
715  }
716  else {
717  if (ieta < AliEMCALGeoParams::fgkEMCALCols-1)
718  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
719  if (ieta > 0)
720  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
721  }
722 
723  Double_t ecell1 = cells->GetCellAmplitude(absID1);
724  Double_t ecell2 = cells->GetCellAmplitude(absID2);
725  Double_t ecell3 = cells->GetCellAmplitude(absID3);
726  Double_t ecell4 = cells->GetCellAmplitude(absID4);
727 
728  Double_t Ecross = ecell1 + ecell2 + ecell3 + ecell4;
729 
730  Double_t Fcross = 1 - Ecross/Eseed;
731 
732  return Fcross;
733 }
734 
735 //________________________________________________________________________
737 {
738  // Do cluster loop.
739 
740  TString histname;
741 
742  memset(fNTotClusters, 0, sizeof(Int_t)*3);
743  for (Int_t i = 0; i < 3; i++) fLeadingCluster[i].SetPxPyPzE(0,0,0,0);
744 
745  for (auto cont_it : fClusterCollArray) {
746  AliClusterContainer* clusters = cont_it.second;
747  // Cluster loop (EMCal, DCal, PHOS)
749  for (AliClusterIterableMomentumContainer::iterator it = itcont.begin(); it != itcont.end(); it++) {
750  UInt_t rejectionReason = 0;
751  if (!clusters->AcceptCluster(it.current_index(), rejectionReason)) {
752  histname = TString::Format("%s/fHistRejectionReason_%d", clusters->GetArrayName().Data(), fCentBin);
753  fHistManager.FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
754  continue;
755  }
756 
757  Float_t pos[3]={0};
758  it->second->GetPosition(pos);
759  histname = TString::Format("%s/fHistClusPosition_%d", clusters->GetArrayName().Data(), fCentBin);
760  fHistManager.FillTH3(histname, pos[0], pos[1], pos[2]);
761 
762  histname = TString::Format("%s/fHistClusPhiEtaEnergy_%d", clusters->GetArrayName().Data(), fCentBin);
763  fHistManager.FillTH3(histname, it->first.Eta(), it->first.Phi_0_2pi(), it->first.E());
764 
765  histname = TString::Format("%s/fHistClusDeltaPhiEPEnergy_%d", clusters->GetArrayName().Data(), fCentBin);
766  if (fHistManager.FindObject(histname)) {
767  Double_t ep = it->first.Phi_0_2pi() - fEPV0;
768  while (ep < 0) ep += TMath::Pi();
769  while (ep >= TMath::Pi()) ep -= TMath::Pi();
770  fHistManager.FillTH2(histname, it->first.E(), ep);
771  }
772 
773  histname = TString::Format("%s/fHistNCellsEnergy_%d", clusters->GetArrayName().Data(), fCentBin);
774  fHistManager.FillTH2(histname, it->first.E(), it->second->GetNCells());
775 
776  histname = TString::Format("%s/fHistClusTimeEnergy_%d", clusters->GetArrayName().Data(), fCentBin);
777  fHistManager.FillTH2(histname, it->first.E(), it->second->GetTOF());
778 
779  histname = TString::Format("%s/fHistClusMCEnergyFraction_%d", clusters->GetArrayName().Data(), fCentBin);
780  if (fHistManager.FindObject(histname)) {
781  fHistManager.FillTH1(histname, it->second->GetMCEnergyFraction());
782  }
783 
784  histname = TString::Format("%s/fHistClusEnergy_%d", clusters->GetArrayName().Data(), fCentBin);
785  fHistManager.FillTH1(histname, it->second->E());
786 
787  if (it->second->GetNonLinCorrEnergy() > 0.) {
788  histname = TString::Format("%s/fHistClusNonLinCorrEnergy_%d", clusters->GetArrayName().Data(), fCentBin);
789  fHistManager.FillTH1(histname, it->second->GetNonLinCorrEnergy());
790  }
791 
792  if (it->second->GetHadCorrEnergy() > 0.) {
793  histname = TString::Format("%s/fHistClusHadCorrEnergy_%d", clusters->GetArrayName().Data(), fCentBin);
794  fHistManager.FillTH1(histname, it->second->GetHadCorrEnergy());
795  }
796 
797  // The following histograms are filled only for EMCal/DCal
798  if (it->second->IsEMCAL()) {
799  Double_t phi = it->first.Phi_0_2pi();
800  Int_t isDcal = Int_t(phi > fgkEMCalDCalPhiDivide);
801  if (fLeadingCluster[isDcal].E() < it->first.E()) fLeadingCluster[isDcal] = it->first;
802  fNTotClusters[isDcal]++;
803 
804  if (fCaloCells) {
805  histname = TString::Format("%s/fHistFcrossEnergy_%d", clusters->GetArrayName().Data(), fCentBin);
806  fHistManager.FillTH2(histname, it->first.E(), GetFcross(it->second, fCaloCells));
807  }
808 
809  Int_t sm = fGeom->GetSuperModuleNumber(it->second->GetCellAbsId(0));
810  if (sm >=0 && sm < 20) {
811  histname = TString::Format("%s/BySM/fHistClusEnergy_SM%d_%d", clusters->GetArrayName().Data(), sm, fCentBin);
812  fHistManager.FillTH1(histname, it->second->E());
813  }
814  else {
815  AliError(Form("Supermodule %d does not exist!", sm));
816  }
817  }
818  else if (it->second->IsPHOS()) {
819  fNTotClusters[2]++;
820  if (fLeadingCluster[2].E() < it->first.E()) fLeadingCluster[2] = it->first;
821  }
822  }
823  }
824 }
825 
826 //________________________________________________________________________
828 {
829  // Do track loop.
830 
831  Int_t neg = 0;
832  Int_t zero = 0;
833 
834  fNTotTracks = 0;
835  fLeadingTrack.SetPxPyPzE(0,0,0,0);
836 
837  TString histname;
838 
839  for (auto cont_it : fParticleCollArray) {
840  AliParticleContainer* particles = cont_it.second;
842  for (AliParticleIterableMomentumContainer::iterator it = itcont.begin(); it != itcont.end(); it++) {
843 
844  UInt_t rejectionReason = 0;
845  if (!particles->AcceptParticle(it.current_index(), rejectionReason)) {
846  histname = TString::Format("%s/fHistRejectionReason_%d", particles->GetArrayName().Data(), fCentBin);
847  fHistManager.FillTH2(histname, particles->GetRejectionReasonBitPosition(rejectionReason), it->first.Pt());
848  continue;
849  }
850 
851  fNTotTracks++;
852 
853  if (fLeadingTrack.Pt() < it->first.Pt()) fLeadingTrack = it->first;
854 
855  if (fParticleLevel) {
856  histname = TString::Format("%s/fHistTrPhiEtaPt_%d_0", particles->GetArrayName().Data(), fCentBin);
857  fHistManager.FillTH3(histname, it->first.Eta(), it->first.Phi_0_2pi(), it->first.Pt());
858  }
859  else {
860  if (it->second->GetLabel() == 0) {
861  zero++;
862  histname = TString::Format("%s/fHistTrPhiEtaZeroLab_%d", particles->GetArrayName().Data(), fCentBin);
863  if (fHistManager.FindObject(histname)) {
864 
865  fHistManager.FillTH2(histname, it->first.Eta(), it->first.Phi_0_2pi());
866 
867  }
868  histname = TString::Format("%s/fHistTrPtZeroLab_%d", particles->GetArrayName().Data(), fCentBin);
869  if (fHistManager.FindObject(histname)) {
870  fHistManager.FillTH1(histname, it->first.Pt());
871  }
872  }
873 
874  if (it->second->GetLabel() < 0) neg++;
875 
876  Int_t type = 0;
877  AliTrackContainer* tracks = dynamic_cast<AliTrackContainer*>(particles);
878  if (tracks) {
879  // Track type (hybrid)
881  type = tracks->GetTrackType(it.current_index());
882  }
883  }
884 
885  // Track propagation to EMCal surface
886  AliVTrack* vtrack = dynamic_cast<AliVTrack*>(it->second);
887  if (vtrack) {
888  if (vtrack->GetTrackEtaOnEMCal() == -999 || vtrack->GetTrackPhiOnEMCal() == -999) {
889  histname = TString::Format("%s/fHistTrPhiEtaNonProp_%d", particles->GetArrayName().Data(), fCentBin);
890  if (fHistManager.FindObject(histname)) {
891  fHistManager.FillTH2(histname, it->first.Eta(), it->first.Phi_0_2pi());
892  }
893  histname = TString::Format("%s/fHistTrPtNonProp_%d", particles->GetArrayName().Data(), fCentBin);
894  if (fHistManager.FindObject(histname)) {
895  fHistManager.FillTH1(histname, it->first.Pt());
896  }
897  }
898  else {
899  histname = TString::Format("%s/fHistTrEmcPhiEta_%d", particles->GetArrayName().Data(), fCentBin);
900  if (fHistManager.FindObject(histname))
901  fHistManager.FillTH2(histname, vtrack->GetTrackEtaOnEMCal(), vtrack->GetTrackPhiOnEMCal());
902 
903  histname = TString::Format("%s/fHistTrEmcPt_%d", particles->GetArrayName().Data(), fCentBin);
904  if (fHistManager.FindObject(histname))
905  fHistManager.FillTH1(histname, vtrack->GetTrackPtOnEMCal());
906 
907  histname = TString::Format("%s/fHistDeltaEtaPt_%d", particles->GetArrayName().Data(), fCentBin);
908  if (fHistManager.FindObject(histname))
909  fHistManager.FillTH2(histname, it->first.Pt(), it->first.Eta() - vtrack->GetTrackEtaOnEMCal());
910 
911  histname = TString::Format("%s/fHistDeltaPhiPt_%d", particles->GetArrayName().Data(), fCentBin);
912  if (fHistManager.FindObject(histname))
913  fHistManager.FillTH2(histname, it->first.Pt(), it->first.Phi_0_2pi() - vtrack->GetTrackPhiOnEMCal());
914 
915  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", particles->GetArrayName().Data(), fCentBin);
916  if (fHistManager.FindObject(histname))
917  fHistManager.FillTH2(histname, it->first.Pt(), it->first.Pt() - vtrack->GetTrackPtOnEMCal());
918  }
919  }
920 
921  if (type >= 0 && type <= 3) {
922  histname = TString::Format("%s/fHistTrPhiEtaPt_%d_%d", particles->GetArrayName().Data(), fCentBin, type);
923  fHistManager.FillTH3(histname, it->first.Eta(), it->first.Phi_0_2pi(), it->first.Pt());
924  }
925  else {
926  AliWarning(Form("%s: track type %d not recognized!", GetName(), type));
927  }
928  }
929  }
930 
931  histname = TString::Format("%s/fHistTrNegativeLabels_%d", particles->GetArrayName().Data(), fCentBin);
932  if (fHistManager.FindObject(histname))
933  fHistManager.FillTH1(histname, 1. * neg / fNTotTracks);
934 
935  histname = TString::Format("%s/fHistTrZeroLabels_%d", particles->GetArrayName().Data(), fCentBin);
936  if (fHistManager.FindObject(histname))
937  fHistManager.FillTH1(histname, 1. * zero / fNTotTracks);
938  }
939 }
940 
941 //________________________________________________________________________
943 {
944  // Get the pointer to the existing analysis manager via the static access method
945  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
946  if (!mgr) {
947  ::Error("AddTaskEmcalJetQA", "No analysis manager to connect to.");
948  return NULL;
949  }
950 
951  // Check the analysis type using the event handlers connected to the analysis manager
952  AliVEventHandler* handler = mgr->GetInputEventHandler();
953  if (!handler) {
954  ::Error("AddTaskEmcalJetQA", "This task requires an input event handler");
955  return NULL;
956  }
957 
958  EDataType_t dataType = kUnknownDataType;
959 
960  if (handler->InheritsFrom("AliESDInputHandler")) {
961  dataType = kESD;
962  }
963  else if (handler->InheritsFrom("AliAODInputHandler")) {
964  dataType = kAOD;
965  }
966 
967  // Init the task and do settings
968 
969  if (ntracks == "usedefault") {
970  if (dataType == kESD) {
971  ntracks = "Tracks";
972  }
973  else if (dataType == kAOD) {
974  ntracks = "tracks";
975  }
976  else {
977  ntracks = "";
978  }
979  }
980 
981  if (nclusters == "usedefault") {
982  if (dataType == kESD) {
983  nclusters = "CaloClusters";
984  }
985  else if (dataType == kAOD) {
986  nclusters = "caloClusters";
987  }
988  else {
989  nclusters = "";
990  }
991  }
992 
993  if (ncells == "usedefault") {
994  if (dataType == kESD) {
995  ncells = "EMCALCells";
996  }
997  else if (dataType == kAOD) {
998  ncells = "emcalCells";
999  }
1000  else {
1001  ncells = "";
1002  }
1003  }
1004 
1005  TString name("AliAnalysisTaskEmcalJetQA");
1006  if (!ntracks.IsNull()) {
1007  name += "_";
1008  name += ntracks;
1009  }
1010  if (!nclusters.IsNull()) {
1011  name += "_";
1012  name += nclusters;
1013  }
1014  if (!ncells.IsNull()) {
1015  name += "_";
1016  name += ncells;
1017  }
1018  if (!suffix.IsNull() != 0) {
1019  name += "_";
1020  name += suffix;
1021  }
1022 
1024  qaTask->SetCaloCellsName(ncells);
1025  qaTask->SetVzRange(-10,10);
1026  qaTask->AddParticleContainer(ntracks.Data());
1027  qaTask->AddClusterContainer(nclusters.Data());
1028 
1029  // Final settings, pass to manager and set the containers
1030  mgr->AddTask(qaTask);
1031 
1032  // Create containers for input/output
1033  AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer() ;
1034 
1035  TString contName = TString::Format("%s_histos", name.Data());
1036  TString commonoutput;
1037  if (subdir.IsNull()) {
1038  commonoutput = mgr->GetCommonFileName();
1039  }
1040  else {
1041  commonoutput = TString::Format("%s:%s", mgr->GetCommonFileName(), subdir.Data());
1042  }
1043 
1044  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contName.Data(),
1045  TList::Class(),AliAnalysisManager::kOutputContainer,
1046  commonoutput);
1047  mgr->ConnectInput (qaTask, 0, cinput1 );
1048  mgr->ConnectOutput (qaTask, 1, coutput1 );
1049 
1050  return qaTask;
1051 }
1052 
1058 {
1059  EBeamType_t beam = BeamTypeFromRunNumber(runnumber);
1060  Int_t nCentBins = 0;
1061  if (beam == kpA || beam == kAA) nCentBins = 4;
1062  std::vector<std::string> triggerClasses = {"CINT7", "CEMC7", "CDMC7", "EG1", "EG2", "EJ1", "EJ2", "DG1", "DG2", "DJ1", "DJ2" };
1063  for (auto triggerClass : triggerClasses) {
1064  TString suffix(triggerClass.c_str());
1065  suffix.ReplaceAll("-", "_");
1066  AliAnalysisTaskEmcalJetQA* task = AddTaskEmcalJetQA("", "usedefault", "usedefault", "CaloQA_default", suffix);
1067  task->AddAcceptedTriggerClass(triggerClass.c_str());
1068  task->SetForceBeamType(beam);
1069  if (runnumber == 0 || (runnumber >= 265077 && runnumber <= 999999)) { // Run-2 p-Pb (LHC16q): disabling vertex cut
1070  task->SetVzRange(-999,999);
1071  }
1072  }
1073 }
AliClusterContainer * AddClusterContainer(std::string branchName, std::string contName="")
AliEMCALGeometry * fGeom
!emcal geometry
Float_t fMaxPt
Histogram pt limit.
EBeamType_t fBeamType
!event beam type
double Double_t
Definition: External.C:58
EDataType_t
Switch for the data type.
void FillEventQAHisto(const EventQA_t &eventQA)
Double_t fCent3
!Event centrality with method 3
const char * title
Definition: MakeQAPdf.C:26
Bool_t fSeparateEMCalDCal
Separate EMCal from DCal in QA plots.
TString fCentMethod3
Centrality method 3.
Int_t fNTotTracks
!Total number of accepted tracks in current event
Double_t fEPV0
!event plane V0
bidirectional stl iterator over the EMCAL iterable container
Container with name, TClonesArray and cuts for particles.
Double_t GetFcross(AliVCluster *cluster, AliVCaloCells *cells)
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
void FillTH3(const char *hname, double x, double y, double z, double weight=1., Option_t *opt="")
Fill a 3D histogram within the container.
Implementation of a task to perform basic QA on tracks and clusters.
Int_t fDoLeadingObjectPosition
Add axis for leading object position (eta-phi)
Double_t fV0CTotMult
!Event V0C total multiplicity
Int_t nCentBins
TString fCaloCellsName
name of calo cell collection
Int_t fNTotClusters[3]
!Total number of accepted clusters in current event (DCal/EMCal)
Bool_t fIsEmbedded
Embedded data present.
Container for particles within the EMCAL framework.
Int_t fMaxCellsInCluster
Maximum number (approx) of cells in a cluster.
Bool_t fParticleLevel
Set particle level analysis.
static AliAnalysisTaskEmcalJetQA * AddTaskEmcalJetQA(TString ntracks="usedefault", TString nclusters="usedefault", TString ncells="usedefault", TString subdir="", TString suffix="")
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal
EBeamType_t fForceBeamType
forced beam type
static void AddTaskEmcalJetQA_QAtrain(Int_t runnumber)
const Int_t nPtBins
THistManager fHistManager
Histogram manager.
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
TObject * FindObject(const char *name) const
Find an object inside the container.
int Int_t
Definition: External.C:63
void AddAcceptedTriggerClass(const char *trigClass)
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:658
float Float_t
Definition: External.C:68
Int_t fDoV0QA
Add V0 QA histograms.
Base task in the EMCAL framework (lighter version of AliAnalysisTaskEmcal)
Double_t Phi_0_2pi() const
Double_t fVertex[3]
!event vertex
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
TString fCentMethod2
Centrality method 2.
virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const
Declaration of class AliAnalysisTaskEmcalJetQA.
ETrackFilterType_t GetTrackFilterType() const
Int_t fCentBin
!event centrality bin
virtual Bool_t AcceptParticle(const AliVParticle *vp, UInt_t &rejectionReason) const
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
AliTLorentzVector fLeadingCluster[3]
!Leading cluster in current event (EMCal/DCal)
Int_t fDoEPQA
Add event plane QA histograms.
const AliClusterIterableMomentumContainer all_momentum() const
static EBeamType_t BeamTypeFromRunNumber(Int_t runnumber)
AliParticleContainer * AddParticleContainer(std::string branchName, std::string contName="")
Char_t GetTrackType(const AliVTrack *track) const
Definition: External.C:220
std::map< std::string, AliParticleContainer * > fParticleCollArray
particle/track collection array
void SetVzRange(Double_t min, Double_t max)
Double_t fCent2
!Event centrality with method 2
Float_t fPtBinWidth
Histogram pt bin width.
Float_t fCellEnergyCut
Energy cell cut.
const Int_t nbins
bool Bool_t
Definition: External.C:53
std::map< std::string, AliClusterContainer * > fClusterCollArray
cluster collection array
THnSparse * CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
Create a new THnSparse within the container.
EBeamType_t
Switch for the beam type.
AliTLorentzVector fLeadingTrack
!Leading track in current event
Double_t fV0ATotMult
!Event V0A total multiplicity
Container structure for EMCAL clusters.
AliVVZERO * fVZERO
!Event V0 object
const AliParticleIterableMomentumContainer all_momentum() const
Double_t fCent
!event centrality
ClassImp(AliAnalysisTaskEmcalJetQA) AliAnalysisTaskEmcalJetQA
TH3 * CreateTH3(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, int nbinsz, double zmin, double zmax, Option_t *opt="")
Create a new TH2 within the container.
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry