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