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