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