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