AliPhysics  cdeda5a (cdeda5a)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskPWGJEQA.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 <TMath.h>
24 #include <TString.h>
25 #include <Riostream.h>
26 #include <TChain.h>
27 #include <TFile.h>
28 
29 #include <AliVEventHandler.h>
30 #include <AliAnalysisManager.h>
31 #include "AliParticleContainer.h"
32 #include "AliClusterContainer.h"
33 #include "AliTrackContainer.h"
34 #include "AliCentrality.h"
35 #include "AliVCluster.h"
36 #include "AliVParticle.h"
37 #include "AliVTrack.h"
38 #include "AliLog.h"
39 #include "AliEMCALGeometry.h"
40 #include "AliEMCALGeoParams.h"
41 #include "AliESDtrack.h"
42 #include "AliAODTrack.h"
43 #include "AliAODMCParticle.h"
44 #include "AliMCParticleContainer.h"
45 #include "AliEmcalJet.h"
46 #include "AliJetContainer.h"
47 #include "AliMCEvent.h"
48 #include "AliGenPythiaEventHeader.h"
49 #include "AliAODMCHeader.h"
50 #include "AliPHOSGeometry.h"
51 #include "AliOADBContainer.h"
52 
53 #include "AliAnalysisTaskPWGJEQA.h"
54 
58 
59 //________________________________________________________________________
62  AliAnalysisTaskEmcalJet("AliAnalysisTaskPWGJEQA", kTRUE),
63  fCellEnergyCut(0.05),
64  fPtBinWidth(0.5),
65  fMaxPt(250),
66  fSeparateEMCalDCal(kTRUE),
67  fNTotTracks(0),
68  fLeadingTrack(),
69  fGeneratorLevel(0),
70  fGeneratorLevelName(),
71  fDetectorLevel(0),
72  fDetectorLevelName(),
73  fNPtHistBins(0),
74  fPtHistBins(0),
75  fNEtaHistBins(0),
76  fEtaHistBins(0),
77  fNPhiHistBins(0),
78  fPhiHistBins(0),
79  fNCentHistBins(0),
80  fCentHistBins(0),
81  fNPtRelDiffHistBins(0),
82  fPtRelDiffHistBins(0),
83  fNPtResHistBins(0),
84  fPtResHistBins(0),
85  f1OverPtResHistBins(0),
86  fN1OverPtResHistBins(0),
87  fNIntegerHistBins(0),
88  fIntegerHistBins(0),
89  fTracks(0),
90  fParticlesPhysPrim(0),
91  fParticlesMatched(0),
92  fHistManager("AliAnalysisTaskPWGJEQA"),
93  fDoTrackQA(kTRUE),
94  fDoEmcalQA(kTRUE),
95  fDoJetQA(kTRUE),
96  fDoEventQA(kTRUE),
97  fRejectOutlierEvents(kFALSE),
98  fIsPtHard(kFALSE),
99  fPHOSGeo(nullptr)
100 {
101  // Default constructor.
102  memset(fNTotClusters, 0, sizeof(Int_t)*3);
105 }
106 
107 //________________________________________________________________________
112  AliAnalysisTaskEmcalJet(name, kTRUE),
113  fCellEnergyCut(0.05),
114  fPtBinWidth(0.5),
115  fMaxPt(250),
116  fSeparateEMCalDCal(kTRUE),
117  fNTotTracks(0),
118  fLeadingTrack(),
119  fGeneratorLevel(0),
120  fGeneratorLevelName(),
121  fDetectorLevel(0),
122  fDetectorLevelName(),
123  fNPtHistBins(0),
124  fPtHistBins(0),
125  fNEtaHistBins(0),
126  fEtaHistBins(0),
127  fNPhiHistBins(0),
128  fPhiHistBins(0),
129  fNCentHistBins(0),
130  fCentHistBins(0),
131  fNPtRelDiffHistBins(0),
132  fPtRelDiffHistBins(0),
133  fNPtResHistBins(0),
134  fPtResHistBins(0),
135  f1OverPtResHistBins(0),
136  fN1OverPtResHistBins(0),
137  fNIntegerHistBins(0),
138  fIntegerHistBins(0),
139  fTracks(0),
140  fParticlesPhysPrim(0),
141  fParticlesMatched(0),
142  fHistManager(name),
143  fDoTrackQA(kTRUE),
144  fDoEmcalQA(kTRUE),
145  fDoJetQA(kTRUE),
146  fDoEventQA(kTRUE),
147  fRejectOutlierEvents(kFALSE),
148  fIsPtHard(kFALSE),
149  fPHOSGeo(nullptr)
150 {
151  // Standard
152  memset(fNTotClusters, 0, sizeof(Int_t)*3);
155 }
156 
157 //________________________________________________________________________
159 {
160  // Destructor
161 }
162 
163 //________________________________________________________________________
165 {
166  // Create histograms
168 
169  // Set track container pointers
172 
173  // Allocate histograms for tracks, cells, clusters, jets
179 
180  TIter next(fHistManager.GetListOfHistograms());
181  TObject* obj = 0;
182  while ((obj = next())) {
183  fOutput->Add(obj);
184  }
185 
186  PostData(1, fOutput); // Post data for ALL output slots >0 here, to get at least an empty histogram
187 }
188 
189 //________________________________________________________________________
191 
193  if (fGeneratorLevel) {
196  }
197 }
198 
199 //________________________________________________________________________
201 
202  TString histname;
203  TString title;
204 
205  if (!fCaloCellsName.IsNull()) {
206 
207  histname = TString::Format("%s/fHistCellEnergy", fCaloCellsName.Data());
208  title = histname + ";#it{E}_{cell} (GeV);counts";
209  fHistManager.CreateTH1(histname.Data(), title.Data(), 500,0, 100);
210 
211  histname = TString::Format("%s/fProfCellAbsIdEnergy", fCaloCellsName.Data());
212  title = histname + ";cell absId;<#it{E}_{cell}> (GeV)";
213  fHistManager.CreateTProfile(histname.Data(), title.Data(), 18000,0,18000);
214 
215  histname = TString::Format("%s/fHistCellTime", fCaloCellsName.Data());
216  title = histname + ";#it{t}_{cell} (s);counts";
217  fHistManager.CreateTH1(histname.Data(), title.Data(), 500,-5e-6, 5e-6);
218 
219  histname = TString::Format("%s/fProfCellAbsIdTime", fCaloCellsName.Data());
220  title = histname + ";cell absId;<#it{t}_{cell}> (s)";
221  fHistManager.CreateTProfile(histname.Data(), title.Data(), 18000,0,18000);
222 
223  }
224 }
225 
226 //________________________________________________________________________
228 
229  AliEmcalContainer* cont = 0;
230  TString histname;
231  TString title;
232  Int_t nPtBins = TMath::CeilNint(fMaxPt / fPtBinWidth);
233 
234  TIter nextClusColl(&fClusterCollArray);
235  while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
236 
237  histname = TString::Format("%s/fHistClusterRejectionReason", cont->GetArrayName().Data());
238  title = histname + ";Rejection reason;#it{E}_{clus} (GeV/);counts";
239  TH2* hist = fHistManager.CreateTH2(histname.Data(), title.Data(), 32, 0, 32, 50, 0, 250);
240  SetRejectionReasonLabels(hist->GetXaxis());
241 
242  const Int_t nEmcalSM = 20;
243  for (Int_t sm = 0; sm < nEmcalSM; sm++) {
244  histname = TString::Format("%s/BySM/hEmcalClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
245  title = histname + ";#it{E}_{cluster} (GeV);counts";
246  fHistManager.CreateTH1(histname.Data(), title.Data(), nPtBins, 0, fMaxPt);
247  }
248 
249  for (Int_t sm = 0; sm < 6; sm++) {
250  histname = TString::Format("%s/BySM/hPhosClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
251  title = histname + ";#it{E}_{cluster} (GeV);counts";
252  fHistManager.CreateTH1(histname.Data(), title.Data(), nPtBins, 0, fMaxPt);
253  }
254 
255  // Cluster THnSparse
256  Int_t dim = 0;
257  TString title[20];
258  Int_t nbins[20] = {0};
259  Double_t min[30] = {0.};
260  Double_t max[30] = {0.};
261 
263  title[dim] = "Centrality %";
264  nbins[dim] = 5;
265  min[dim] = 0;
266  max[dim]= 100;
267  dim++;
268  }
269 
270  title[dim] = "#it{E}_{clus} (GeV)";
271  nbins[dim] = nPtBins/2;
272  min[dim] = 0;
273  max[dim] = fMaxPt;
274  dim++;
275 
276  title[dim] = "#eta";
277  nbins[dim] = fNEtaHistBins;
278  min[dim] = -1;
279  max[dim] = 1;
280  dim++;
281 
282  title[dim] = "#phi";
283  nbins[dim] = fNPhiHistBins;
284  min[dim] = 0;
285  max[dim] = 2*TMath::Pi();
286  dim++;
287 
288  title[dim] = "cluster type";
289  nbins[dim] = 3;
290  min[dim] = -0.5;
291  max[dim] = 2.5;
292  dim++;
293 
294  TString thnname = TString::Format("%s/clusterObservables", cont->GetArrayName().Data());
295  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
296  for (Int_t i = 0; i < dim; i++) {
297  hn->GetAxis(i)->SetTitle(title[i]);
298  }
299  }
300 }
301 
302 //________________________________________________________________________
304 
305  Int_t nPtBins = TMath::CeilNint(fMaxPt / fPtBinWidth);
306 
307  AliJetContainer* jets = 0;
308  TIter nextJetColl(&fJetCollArray);
309  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
310 
311  // Allocate THnSparse
312  Double_t jetRadius = jets->GetJetRadius();
313 
314  TString axisTitle[30]= {""};
315  Int_t nbins[30] = {0};
316  Double_t min[30] = {0.};
317  Double_t max[30] = {0.};
318  Int_t dim = 0;
319 
320  if (fForceBeamType != kpp) {
321  axisTitle[dim] = "Centrality (%)";
322  nbins[dim] = 5;
323  min[dim] = 0;
324  max[dim] = 100;
325  dim++;
326  }
327 
328  axisTitle[dim] = "#eta_{jet}";
329  nbins[dim] = nPtBins/10;
330  min[dim] = -1;
331  max[dim] = 1;
332  dim++;
333 
334  axisTitle[dim] = "#phi_{jet} (rad)";
335  nbins[dim] = nPtBins/10*3;
336  min[dim] = 0;
337  max[dim] = 2*TMath::Pi();
338  dim++;
339 
340  axisTitle[dim] = "#it{p}_{T} (GeV/#it{c})";
341  nbins[dim] = nPtBins/2;
342  min[dim] = 0;
343  max[dim] = fMaxPt;
344  dim++;
345 
346  if (fForceBeamType != kpp) {
347  axisTitle[dim] = "#it{p}_{T}^{corr} (GeV/#it{c})";
348  nbins[dim] = nPtBins/2;
349  min[dim] = -fMaxPt/2;
350  max[dim] = fMaxPt/2;
351  dim++;
352  }
353 
354  if (fClusterCollArray.GetEntriesFast() > 0 && fParticleCollArray.GetEntriesFast() > 0) {
355  axisTitle[dim] = "NEF";
356  nbins[dim] = nPtBins/20;
357  min[dim] = 0;
358  max[dim] = 1.0;
359  dim++;
360  }
361 
362  if (fForceBeamType != kpp) {
363  axisTitle[dim] = "No. of constituents";
364  nbins[dim] = 125;
365  min[dim] = 0;
366  max[dim] = 250;
367  dim++;
368  }
369  else {
370  axisTitle[dim] = "No. of constituents";
371  nbins[dim] = 50;
372  min[dim] = -0.5;
373  max[dim] = 49.5;
374  dim++;
375  }
376 
377  axisTitle[dim] = "#it{p}_{T,particle}^{leading} (GeV/#it{c})";
378  nbins[dim] = nPtBins/10*3;
379  min[dim] = 0;
380  max[dim] = 150;
381  dim++;
382 
383  TString thnname = TString::Format("%s/fHistJetObservables", jets->GetArrayName().Data());
384  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
385  for (Int_t i = 0; i < dim; i++) {
386  hn->GetAxis(i)->SetTitle(axisTitle[i]);
387  }
388 
389  // Allocate other jet histograms
390  TString histname;
391  TString title;
392  histname = TString::Format("%s/fHistJetRejectionReason", jets->GetArrayName().Data());
393  title = histname + ";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
394  TH2* hist = fHistManager.CreateTH2(histname.Data(), title.Data(), 32, 0, 32, 50, 0, 250);
395  SetRejectionReasonLabels(hist->GetXaxis());
396 
397  if (!jets->GetRhoName().IsNull()) {
398  histname = TString::Format("%s/fHistRhoVsCent", jets->GetArrayName().Data());
399  title = histname + ";Centrality (%);#rho (GeV/#it{c});counts";
400  fHistManager.CreateTH2(histname.Data(), title.Data(), 101, 0, 101, 100, 0, 500);
401  }
402  }
403 }
404 
405 //________________________________________________________________________
407 
408  Int_t nPtBins = TMath::CeilNint(fMaxPt / fPtBinWidth);
409 
410  Int_t dim = 0;
411  TString axistitle[40];
412  Int_t nbins[40] = {0};
413  Double_t min[40] = {0};
414  Double_t max[40] = {0};
415 
417  axistitle[dim] = "Centrality %";
418  nbins[dim] = 5;
419  min[dim] = 0;
420  max[dim] = 100;
421  dim++;
422  }
423 
424  if (fParticleCollArray.GetEntriesFast()>0) {
425  axistitle[dim] = "No. of tracks";
427  nbins[dim] = 100;
428  min[dim] = -0.5;
429  max[dim] = 6000-0.5;
430  }
431  else {
432  nbins[dim] = 100;
433  min[dim] = 0;
434  max[dim] = 200;
435  }
436  dim++;
437 
438  axistitle[dim] = "#it{p}_{T,track}^{leading} (GeV/c)";
439  nbins[dim] = nPtBins/2;
440  min[dim] = 0;
441  max[dim] = fMaxPt;
442  dim++;
443  }
444 
445  if (fClusterCollArray.GetEntriesFast()>0) {
446  axistitle[dim] = "No. of clusters";
447 
449  nbins[dim] = 100;
450  min[dim] = -0.5;
451  max[dim] = 4000-0.5;
452  }
453  else {
454  nbins[dim] = 100;
455  min[dim] = 0;
456  max[dim] = 200;
457  }
458  dim++;
459 
460  if (fSeparateEMCalDCal) {
461  axistitle[dim] = "#it{E}_{EMCal cluster}^{leading} (GeV)";
462  nbins[dim] = nPtBins/2;
463  min[dim] = 0;
464  max[dim] = fMaxPt;
465  dim++;
466 
467  axistitle[dim] = "#it{E}_{DCal cluster}^{leading} (GeV)";
468  nbins[dim] = nPtBins/2;
469  min[dim] = 0;
470  max[dim] = fMaxPt;
471  dim++;
472 
473  axistitle[dim] = "#it{E}_{PHOS cluster}^{leading} (GeV)";
474  nbins[dim] = nPtBins/2;
475  min[dim] = 0;
476  max[dim] = fMaxPt;
477  dim++;
478  }
479  else {
480  axistitle[dim] = "#it{E}_{cluster}^{leading} (GeV)";
481  nbins[dim] = nPtBins/2;
482  min[dim] = 0;
483  max[dim] = fMaxPt;
484  dim++;
485  }
486  }
487 
488  THnSparse* hn = fHistManager.CreateTHnSparse("eventQA","eventQA",dim,nbins,min,max);
489  for (Int_t i = 0; i < dim; i++)
490  hn->GetAxis(i)->SetTitle(axistitle[i]);
491 
492  if (fIsPtHard) {
493  TString histname = "hPtHard";
494  TString title = histname + ";#it{p}_{T,hard} (GeV/c);counts";
495  fHistManager.CreateTH1(histname.Data(), title.Data(), nPtBins, 0, fMaxPt);
496 
497  TH1* hTrials = fHistManager.CreateTH1("hNtrials", "hNtrials", 1, 0, 1);
498  hTrials->GetXaxis()->SetBinLabel(1,"#sum{ntrials}");
499 
500  TH1* hxsection = fHistManager.CreateTH1("hXsec", "hXsec", 1, 0, 1);
501  hxsection->GetXaxis()->SetBinLabel(1,"<#sigma>");
502  }
503 
504  fHistEventRejection->GetXaxis()->SetBinLabel(15,"PtHardBinJetOutlier");
505 
506 }
507 
508 //________________________________________________________________________
511 {
512  fNPtHistBins = 82;
515  GenerateFixedBinArray(7, 0.3, 1, fPtHistBins+6);
516  GenerateFixedBinArray(10, 1, 3, fPtHistBins+13);
517  GenerateFixedBinArray(14, 3, 10, fPtHistBins+23);
518  GenerateFixedBinArray(10, 10, 20, fPtHistBins+37);
519  GenerateFixedBinArray(15, 20, 50, fPtHistBins+47);
520  GenerateFixedBinArray(20, 50, 150, fPtHistBins+62);
521 
522  fNEtaHistBins = 100;
525 
526  fNPhiHistBins = 101;
528  GenerateFixedBinArray(fNPhiHistBins, 0, TMath::Pi() * 2.02, fPhiHistBins);
529 
530  fNCentHistBins = 4;
532  fCentHistBins[0] = 0;
533  fCentHistBins[1] = 10;
534  fCentHistBins[2] = 30;
535  fCentHistBins[3] = 50;
536  fCentHistBins[4] = 90;
537 
538  fNPtResHistBins = 175;
541  GenerateFixedBinArray(25, 0.05, 0.10, fPtResHistBins+50);
542  GenerateFixedBinArray(25, 0.10, 0.20, fPtResHistBins+75);
543  GenerateFixedBinArray(30, 0.20, 0.50, fPtResHistBins+100);
544  GenerateFixedBinArray(25, 0.50, 1.00, fPtResHistBins+130);
545  GenerateFixedBinArray(20, 1.00, 2.00, fPtResHistBins+155);
546 
547  fNPtRelDiffHistBins = 200;
550 
551  fN1OverPtResHistBins = 385;
554  GenerateFixedBinArray(60, 0.02, 0.05, f1OverPtResHistBins+100);
555  GenerateFixedBinArray(50, 0.05, 0.1, f1OverPtResHistBins+160);
556  GenerateFixedBinArray(50, 0.1, 0.2, f1OverPtResHistBins+210);
557  GenerateFixedBinArray(75, 0.2, 0.5, f1OverPtResHistBins+260);
558  GenerateFixedBinArray(50, 0.5, 1.5, f1OverPtResHistBins+335);
559 
560  fNIntegerHistBins = 10;
563 }
564 
565 //________________________________________________________________________
567 {
568  Int_t dim = 0;
569  TString title[20];
570  Int_t nbins[20] = {0};
571  Double_t *binEdges[20] = {0};
572 
574  title[dim] = "Centrality %";
575  nbins[dim] = fNCentHistBins;
576  binEdges[dim] = fCentHistBins;
577  dim++;
578  }
579 
580  title[dim] = "#it{p}_{T} (GeV/#it{c})";
581  nbins[dim] = fNPtHistBins;
582  binEdges[dim] = fPtHistBins;
583  dim++;
584 
585  title[dim] = "#eta";
586  nbins[dim] = fNEtaHistBins;
587  binEdges[dim] = fEtaHistBins;
588  dim++;
589 
590  title[dim] = "#phi";
591  nbins[dim] = fNPhiHistBins;
592  binEdges[dim] = fPhiHistBins;
593  dim++;
594 
595  title[dim] = "track type";
596  nbins[dim] = 3;
597  binEdges[dim] = fIntegerHistBins;
598  dim++;
599 
600  title[dim] = "#sigma(#it{p}_{T}) / #it{p}_{T}";
601  nbins[dim] = fNPtResHistBins;
602  binEdges[dim] = fPtResHistBins;
603  dim++;
604 
605  fTracks = new THnSparseF("tracks","tracks",dim,nbins);
606  for (Int_t i = 0; i < dim; i++) {
607  fTracks->GetAxis(i)->SetTitle(title[i]);
608  fTracks->SetBinEdges(i, binEdges[i]);
609  }
610 
611  fOutput->Add(fTracks);
612 
613 }
614 
615 //________________________________________________________________________
617 {
618  Int_t dim = 0;
619  TString title[20];
620  Int_t nbins[20] = {0};
621  Double_t *binEdges[20] = {0};
622 
624  title[dim] = "Centrality %";
625  nbins[dim] = fNCentHistBins;
626  binEdges[dim] = fCentHistBins;
627  dim++;
628  }
629 
630  title[dim] = "#it{p}_{T} (GeV/#it{c})";
631  nbins[dim] = fNPtHistBins;
632  binEdges[dim] = fPtHistBins;
633  dim++;
634 
635  title[dim] = "#eta";
636  nbins[dim] = fNEtaHistBins;
637  binEdges[dim] = fEtaHistBins;
638  dim++;
639 
640  title[dim] = "#phi";
641  nbins[dim] = fNPhiHistBins;
642  binEdges[dim] = fPhiHistBins;
643  dim++;
644 
645  title[dim] = "Findable";
646  nbins[dim] = 2;
647  binEdges[dim] = fIntegerHistBins;
648  dim++;
649 
650  fParticlesPhysPrim = new THnSparseF("tracks_PhysPrim","tracks_PhysPrim",dim,nbins);
651  for (Int_t i = 0; i < dim; i++) {
652  fParticlesPhysPrim->GetAxis(i)->SetTitle(title[i]);
653  fParticlesPhysPrim->SetBinEdges(i, binEdges[i]);
654  }
655 
657 }
658 
659 //________________________________________________________________________
661 {
662  Int_t dim = 0;
663  TString title[20];
664  Int_t nbins[20] = {0};
665  Double_t *binEdges[20] = {0};
666 
668  title[dim] = "Centrality %";
669  nbins[dim] = fNCentHistBins;
670  binEdges[dim] = fCentHistBins;
671  dim++;
672  }
673 
674  title[dim] = "#it{p}_{T}^{gen} (GeV/#it{c})";
675  nbins[dim] = fNPtHistBins;
676  binEdges[dim] = fPtHistBins;
677  dim++;
678 
679  title[dim] = "#eta^{gen}";
680  nbins[dim] = fNEtaHistBins;
681  binEdges[dim] = fEtaHistBins;
682  dim++;
683 
684  title[dim] = "#phi^{gen}";
685  nbins[dim] = fNPhiHistBins;
686  binEdges[dim] = fPhiHistBins;
687  dim++;
688 
689  title[dim] = "#it{p}_{T}^{det} (GeV/#it{c})";
690  nbins[dim] = fNPtHistBins;
691  binEdges[dim] = fPtHistBins;
692  dim++;
693 
694  title[dim] = "#eta^{det}";
695  nbins[dim] = fNEtaHistBins;
696  binEdges[dim] = fEtaHistBins;
697  dim++;
698 
699  title[dim] = "#phi^{det}";
700  nbins[dim] = fNPhiHistBins;
701  binEdges[dim] = fPhiHistBins;
702  dim++;
703 
704  title[dim] = "(#it{p}_{T}^{gen} - #it{p}_{T}^{det}) / #it{p}_{T}^{gen}";
705  nbins[dim] = fNPtRelDiffHistBins;
706  binEdges[dim] = fPtRelDiffHistBins;
707  dim++;
708 
709  title[dim] = "track type";
710  nbins[dim] = 3;
711  binEdges[dim] = fIntegerHistBins;
712  dim++;
713 
714  fParticlesMatched = new THnSparseF("tracks_Matched","tracks_Matched",dim,nbins);
715  for (Int_t i = 0; i < dim; i++) {
716  fParticlesMatched->GetAxis(i)->SetTitle(title[i]);
717  fParticlesMatched->SetBinEdges(i, binEdges[i]);
718  }
719 
721 }
722 
723 //________________________________________________________________________
725 {
726  if (fClusterCollArray.GetEntriesFast() == 0 && fCaloCellsName.IsNull()) {
727  fNeedEmcalGeom = kFALSE;
728  }
729  else {
730  fNeedEmcalGeom = kTRUE;
731  }
732 
734 
735  // Load the PHOS geometry
736  Int_t runNum = InputEvent()->GetRunNumber();
737  if(runNum<209122) //Run1
738  fPHOSGeo = AliPHOSGeometry::GetInstance("IHEP");
739  else
740  fPHOSGeo = AliPHOSGeometry::GetInstance("Run2");
741 
742  if (fPHOSGeo) {
743  AliOADBContainer geomContainer("phosGeo");
744  geomContainer.InitFromFile("$ALICE_PHYSICS/OADB/PHOS/PHOSMCGeometry.root","PHOSMCRotationMatrixes");
745  TObjArray* matrixes = (TObjArray*)geomContainer.GetObject(runNum,"PHOSRotationMatrixes");
746  for(Int_t mod=0; mod<6; mod++) {
747  if(!matrixes->At(mod)) continue;
748  fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod);
749  printf(".........Adding Matrix(%d), geo=%p\n",mod,fPHOSGeo);
750  ((TGeoHMatrix*)matrixes->At(mod))->Print();
751  }
752  }
753 }
754 
755 //________________________________________________________________________
757 {
758  if (!AliAnalysisTaskEmcalJet::RetrieveEventObjects()) return kFALSE;
759 
760  // If Pt-hard production, get the Pt-hard of the event, and have possibility to reject the event for jet outliers
761  if (fIsPtHard) {
762  AliGenPythiaEventHeader* pygen;
763  if (MCEvent()) {
764  pygen = dynamic_cast<AliGenPythiaEventHeader*>(MCEvent()->GenEventHeader());
765  if (!pygen) {
766  // Check if AOD
767  AliAODMCHeader* aodMCH = dynamic_cast<AliAODMCHeader*>(InputEvent()->FindListObject(AliAODMCHeader::StdBranchName()));
768  if (aodMCH) {
769  for (UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) {
770  pygen = dynamic_cast<AliGenPythiaEventHeader*>(aodMCH->GetCocktailHeader(i));
771  if (pygen) break;
772  }
773  }
774  }
775  }
776  if (pygen) {
777  fPtHard = pygen->GetPtHard();
778  //fNTrials = pygen->Trials();
779  //fXsection = pygen->GetXsection();
780 
781  // reject outlier events, where the jet Pt is much larger than Pt-hard
782  if (fRejectOutlierEvents) {
783  AliTLorentzVector jet;
784  Int_t nTriggerJets = pygen->NTriggerJets();
785  Float_t tmpjet[]={0,0,0,0};
786  for (Int_t ijet = 0; ijet< nTriggerJets; ijet++) {
787  pygen->TriggerJet(ijet, tmpjet);
788  jet.SetPxPyPzE(tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3]);
789 
790  if (jet.Pt() > 4. * fPtHard) {
791  //AliInfo(Form("Reject jet event with: pT Hard %2.2f, pycell jet pT %2.2f, rejection factor %1.1f\n", fPtHard, jet.Pt(), 4.));
792  if (fGeneralHistograms) fHistEventRejection->Fill("PtHardBinJetOutlier",1);
793  return kFALSE;
794  }
795  }
796  }
797  }
798  }
799 
800  return kTRUE;
801 }
802 
811 {
812  if (fIsPtHard) {
813  TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree();
814  if (!tree) {
815  AliError(Form("%s - UserNotify: No current tree!",GetName()));
816  return kFALSE;
817  }
818 
819  Float_t xsection = 0;
820  Float_t trials = 0;
821  Int_t pthardbin = 0;
822 
823  TFile *curfile = tree->GetCurrentFile();
824  if (!curfile) {
825  AliError(Form("%s - UserNotify: No current file!",GetName()));
826  return kFALSE;
827  }
828 
829  TChain *chain = dynamic_cast<TChain*>(tree);
830  if (chain) tree = chain->GetTree();
831 
832  PythiaInfoFromFile(curfile->GetName(), xsection, trials, pthardbin);
833 
834  fHistManager.FillTH1("hNtrials", "#sum{ntrials}", trials);
835  fHistManager.FillTH1("hXsec", "<#sigma>", xsection);
836  }
837  return kTRUE;
838 }
839 
840 //________________________________________________________________________
842 {
848 
849  return kTRUE;
850 }
851 
852 //________________________________________________________________________
854 
855  fNTotTracks = 0;
856  fLeadingTrack.SetPxPyPzE(0,0,0,0);
857 
858  AliVTrack* track;
859  for (auto trackIterator : fDetectorLevel->accepted_momentum() ) {
860 
861  fNTotTracks++;
862  if (fLeadingTrack.Pt() < trackIterator.first.Pt()) fLeadingTrack = trackIterator.first;
863 
864  track = trackIterator.second;
865  Byte_t type = fDetectorLevel->GetTrackType(track);
866  if (type <= 2) {
867  Double_t sigma = 0;
868 
869  if (fIsEsd) {
870 
871  AliESDtrack *esdTrack = dynamic_cast<AliESDtrack*>(track);
872  if (esdTrack) sigma = TMath::Sqrt(esdTrack->GetSigma1Pt2());
873 
874  } else { // AOD
875 
876  AliAODTrack *aodtrack = dynamic_cast<AliAODTrack*>(track);
877  if(!aodtrack) AliFatal("Not a standard AOD");
878 
879  AliExternalTrackParam exParam;
880 
881  //get covariance matrix
882  Double_t cov[21] = {0,};
883  aodtrack->GetCovMatrix(cov);
884  Double_t pxpypz[3] = {0,};
885  aodtrack->PxPyPz(pxpypz);
886  Double_t xyz[3] = {0,};
887  aodtrack->GetXYZ(xyz);
888  Short_t sign = aodtrack->Charge();
889  exParam.Set(xyz,pxpypz,cov,sign);
890 
891  sigma = TMath::Sqrt(exParam.GetSigma1Pt2());
892 
893  }
894 
895  Int_t label = TMath::Abs(track->GetLabel());
896  Int_t mcGen = 1;
897  // reject particles generated from other generators in the cocktail but keep fake tracks (label == 0)
898  if (label==0 || track->GetGeneratorIndex() == 0) mcGen = 0;
899 
900  FillDetectorLevelTHnSparse(fCent, track->Eta(), track->Phi(), track->Pt(), sigma, type);
901 
902  if (fGeneratorLevel && label > 0) {
903  AliAODMCParticle *part = fGeneratorLevel->GetAcceptMCParticleWithLabel(label);
904  if (part) {
905  if (part->GetGeneratorIndex() == 0) {
906  Int_t pdg = TMath::Abs(part->PdgCode());
907  // select charged pions, protons, kaons, electrons, muons
908  if (pdg == 211 || pdg == 2212 || pdg == 321 || pdg == 11 || pdg == 13) {
909  FillMatchedParticlesTHnSparse(fCent, part->Eta(), part->Phi(), part->Pt(), track->Eta(), track->Phi(), track->Pt(), type);
910  }
911  }
912  }
913  }
914  }
915  else {
916  AliError(Form("Track %d has type %d not recognized!", fDetectorLevel->GetCurrentID(), type));
917  }
918  }
919 
920  if (fGeneratorLevel) {
921  AliAODMCParticle* part;
922  for (auto partIterator : fGeneratorLevel->accepted_momentum() ) {
923  part = partIterator.second;
924 
925  Int_t mcGen = 1;
926  Byte_t findable = 0;
927 
928  if (part->GetGeneratorIndex() == 0) mcGen = 0;
929 
930  Int_t pdg = TMath::Abs(part->PdgCode());
931  // select charged pions, protons, kaons, electrons, muons
932  if (pdg == 211 || pdg == 2212 || pdg == 321 || pdg == 11 || pdg == 13) findable = 1;
933 
934  FillGeneratorLevelTHnSparse(fCent, part->Eta(), part->Phi(), part->Pt(), findable);
935  }
936  }
937 }
938 
939 //________________________________________________________________________
941 
942  if (!fCaloCells) return;
943 
944  TString histname_energy = TString::Format("%s/fHistCellEnergy", fCaloCellsName.Data());
945  TString histname_time = TString::Format("%s/fHistCellTime", fCaloCellsName.Data());
946  TString histname_energyProf = TString::Format("%s/fProfCellAbsIdEnergy", fCaloCellsName.Data());
947  TString histname_timeProf = TString::Format("%s/fProfCellAbsIdTime", fCaloCellsName.Data());
948 
949  const Int_t ncells = fCaloCells->GetNumberOfCells();
950  for (Int_t pos = 0; pos < ncells; pos++) {
951  Float_t amp = fCaloCells->GetAmplitude(pos);
952  Float_t time = fCaloCells->GetTime(pos);
953  Int_t absId = fCaloCells->GetCellNumber(pos);
954 
955  if (amp < fCellEnergyCut) continue;
956 
957  fHistManager.FillTH1(histname_energy, amp);
958  fHistManager.FillTH1(histname_time, time);
959 
960  fHistManager.FillProfile(histname_energyProf, absId, amp);
961  fHistManager.FillProfile(histname_timeProf, absId, time);
962  }
963 }
964 
965 //________________________________________________________________________
967 
968  memset(fNTotClusters, 0, sizeof(Int_t)*3);
969  for (Int_t i = 0; i < 3; i++) fLeadingCluster[i].SetPxPyPzE(0,0,0,0);
970 
971  TString histname;
972  AliClusterContainer* clusters = 0;
973  TIter nextClusColl(&fClusterCollArray);
974  while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
975  // Cluster loop
977  for (AliClusterIterableMomentumContainer::iterator it = itcont.begin(); it != itcont.end(); it++) {
978 
979  UInt_t rejectionReason = 0;
980  if (!clusters->AcceptCluster(it.current_index(), rejectionReason)) {
981  histname = TString::Format("%s/fHistClusterRejectionReason", clusters->GetArrayName().Data());
982  fHistManager.FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
983  continue;
984  }
985 
986  // Determine cluster type (EMCal/DCal/Phos) and record relevant eventQA info
987  ClusterType clusType = kNA;
988  if (it->second->IsEMCAL()) {
989  Double_t phi = it->first.Phi_0_2pi();
990  Int_t isDcal = Int_t(phi > fgkEMCalDCalPhiDivide);
991  if (isDcal == 0) {
992  clusType = kEMCal;
993  } else if (isDcal == 1) {
994  clusType = kDCal;
995  }
996 
997  if (fLeadingCluster[isDcal].E() < it->first.E()) fLeadingCluster[isDcal] = it->first;
998  fNTotClusters[isDcal]++;
999 
1000  Int_t sm = fGeom->GetSuperModuleNumber(it->second->GetCellAbsId(0));
1001  if (sm >=0 && sm < 20) {
1002  histname = TString::Format("%s/BySM/hEmcalClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
1003  fHistManager.FillTH1(histname, it->second->E());
1004  }
1005  else {
1006  AliError(Form("Supermodule %d does not exist!", sm));
1007  }
1008 
1009  } else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
1010  clusType = kPHOS;
1011  fNTotClusters[2]++;
1012  if (fLeadingCluster[2].E() < it->first.E()) fLeadingCluster[2] = it->first;
1013 
1014  // Fill Phos spectra by module
1015  Int_t relid[4];
1016  if (fPHOSGeo) {
1017  fPHOSGeo->AbsToRelNumbering(it->second->GetCellAbsId(0), relid);
1018  Int_t sm = relid[0];
1019  if (sm >=0 && sm < 6) {
1020  histname = TString::Format("%s/BySM/hPhosClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
1021  fHistManager.FillTH1(histname, it->second->E());
1022  }
1023  else {
1024  AliError(Form("Supermodule %d does not exist!", sm));
1025  }
1026  }
1027  }
1028 
1029  Double_t contents[30]={0};
1030  histname = TString::Format("%s/clusterObservables", clusters->GetArrayName().Data());
1031  THnSparse* histClusterObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
1032  if (!histClusterObservables) return;
1033  for (Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
1034  TString title(histClusterObservables->GetAxis(i)->GetTitle());
1035  if (title=="Centrality %")
1036  contents[i] = fCent;
1037  else if (title=="#it{E}_{clus} (GeV)")
1038  contents[i] = it->first.E();
1039  else if (title=="#eta")
1040  contents[i] = it->first.Eta();
1041  else if (title=="#phi")
1042  contents[i] = it->first.Phi_0_2pi();
1043  else if (title=="cluster type")
1044  contents[i] = clusType;
1045  else
1046  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1047  }
1048  histClusterObservables->Fill(contents);
1049 
1050  }
1051  }
1052 }
1053 
1054 //________________________________________________________________________
1056 
1057  TString histname;
1058  AliJetContainer* jets = 0;
1059  TIter nextJetColl(&fJetCollArray);
1060  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1061  Double_t rhoVal = 0;
1062  if (jets->GetRhoParameter()) {
1063  rhoVal = jets->GetRhoVal();
1064  histname = TString::Format("%s/fHistRhoVsCent", jets->GetArrayName().Data());
1065  fHistManager.FillTH2(histname.Data(), fCent, rhoVal);
1066  }
1067 
1068  for (auto jet : jets->all()) {
1069 
1070  UInt_t rejectionReason = 0;
1071  if (!jets->AcceptJet(jet, rejectionReason)) {
1072  histname = TString::Format("%s/fHistJetRejectionReason", jets->GetArrayName().Data());
1073  fHistManager.FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
1074  continue;
1075  }
1076 
1077  Float_t ptLeading = jets->GetLeadingHadronPt(jet);
1078  Float_t corrPt = jet->Pt() - rhoVal * jet->Area();
1079 
1080  TLorentzVector leadPart;
1081  jets->GetLeadingHadronMomentum(leadPart, jet);
1082 
1083  Double_t contents[30]={0};
1084  histname = TString::Format("%s/fHistJetObservables", jets->GetArrayName().Data());
1085  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
1086  if (!histJetObservables) return;
1087  for (Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
1088  TString title(histJetObservables->GetAxis(i)->GetTitle());
1089  if (title=="Centrality (%)")
1090  contents[i] = fCent;
1091  else if (title=="#eta_{jet}")
1092  contents[i] = jet->Eta();
1093  else if (title=="#phi_{jet} (rad)")
1094  contents[i] = jet->Phi_0_2pi();
1095  else if (title=="#it{p}_{T} (GeV/#it{c})")
1096  contents[i] = jet->Pt();
1097  else if (title=="#it{p}_{T}^{MC} (GeV/#it{c})")
1098  contents[i] = jet->MCPt();
1099  else if (title=="#it{p}_{T}^{corr} (GeV/#it{c})")
1100  contents[i] = corrPt;
1101  else if (title=="NEF")
1102  contents[i] = jet->NEF();
1103  else if (title=="No. of constituents")
1104  contents[i] = jet->GetNumberOfConstituents();
1105  else if (title=="#it{p}_{T,particle}^{leading} (GeV/#it{c})")
1106  contents[i] = ptLeading;
1107  else
1108  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1109  }
1110  histJetObservables->Fill(contents);
1111 
1112  } //jet loop
1113  }
1114 }
1115 
1116 //________________________________________________________________________
1118 
1119  EventQA_t eventQA;
1120  for (Int_t i = 0; i < 3; i++) {
1121  eventQA.fMaxCluster[i] = fLeadingCluster[i];
1122  }
1123  eventQA.fCent = fCent;
1124  eventQA.fNTracks = fNTotTracks;
1125  eventQA.fNClusters[0] = fNTotClusters[0];
1126  eventQA.fNClusters[1] = fNTotClusters[1];
1127  eventQA.fNClusters[2] = fNTotClusters[2];
1128  eventQA.fMaxTrack = fLeadingTrack;
1129 
1130  Int_t globalNclusters = eventQA.fNClusters[0] + eventQA.fNClusters[1] + eventQA.fNClusters[2];
1131  AliTLorentzVector globalMaxCluster;
1132  for (Int_t i = 0; i < 3; i++) {
1133  if (globalMaxCluster.E() < eventQA.fMaxCluster[i].E()) globalMaxCluster = eventQA.fMaxCluster[i];
1134  }
1135 
1136  THnSparse* histEventQA = static_cast<THnSparse*>(fHistManager.FindObject("eventQA"));
1137  Double_t contents[40]={0};
1138  for (Int_t i = 0; i < histEventQA->GetNdimensions(); i++) {
1139  TString title(histEventQA->GetAxis(i)->GetTitle());
1140  if (title=="Centrality %")
1141  contents[i] = eventQA.fCent;
1142  else if (title=="No. of tracks")
1143  contents[i] = eventQA.fNTracks;
1144  else if (title=="No. of clusters")
1145  contents[i] = globalNclusters;
1146  else if (title=="#it{p}_{T,track}^{leading} (GeV/c)")
1147  contents[i] = eventQA.fMaxTrack.Pt();
1148  else if (title=="#it{E}_{cluster}^{leading} (GeV)")
1149  contents[i] = globalMaxCluster.E();
1150  else if (title=="#it{E}_{EMCal cluster}^{leading} (GeV)")
1151  contents[i] = eventQA.fMaxCluster[0].E();
1152  else if (title=="#it{E}_{DCal cluster}^{leading} (GeV)")
1153  contents[i] = eventQA.fMaxCluster[1].E();
1154  else if (title=="#it{E}_{PHOS cluster}^{leading} (GeV)")
1155  contents[i] = eventQA.fMaxCluster[2].E();
1156  else
1157  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1158  }
1159 
1160  histEventQA->Fill(contents);
1161 
1162  // Fill pythia pt hard histograms, if applicable
1163  if (fPtHard > 1e-6) {
1164  fHistManager.FillTH1("hPtHard", fPtHard);
1165  }
1166 }
1167 
1168 //________________________________________________________________________
1170  Double_t sigma1OverPt, Byte_t trackType)
1171 {
1172  Double_t contents[20]={0};
1173 
1174  for (Int_t i = 0; i < fTracks->GetNdimensions(); i++) {
1175  TString title(fTracks->GetAxis(i)->GetTitle());
1176  if (title=="Centrality %")
1177  contents[i] = cent;
1178  else if (title=="#it{p}_{T} (GeV/#it{c})")
1179  contents[i] = trackPt;
1180  else if (title=="#eta")
1181  contents[i] = trackEta;
1182  else if (title=="#phi")
1183  contents[i] = trackPhi;
1184  else if (title=="#sigma(1/#it{p}_{T}) (GeV/#it{c})^{-1}")
1185  contents[i] = sigma1OverPt;
1186  else if (title=="#sigma(#it{p}_{T}) / #it{p}_{T}")
1187  contents[i] = sigma1OverPt*trackPt;
1188  else if (title=="track type")
1189  contents[i] = trackType;
1190  else
1191  AliWarning(Form("Unable to fill dimension %s of histogram %s!", title.Data(), fTracks->GetName()));
1192  }
1193 
1194  fTracks->Fill(contents);
1195 }
1196 
1197 //________________________________________________________________________
1198 void AliAnalysisTaskPWGJEQA::FillGeneratorLevelTHnSparse(Double_t cent, Double_t partEta, Double_t partPhi, Double_t partPt, Byte_t findable)
1199 {
1200  Double_t contents[20]={0};
1201 
1202  for (Int_t i = 0; i < fParticlesPhysPrim->GetNdimensions(); i++) {
1203  TString title(fParticlesPhysPrim->GetAxis(i)->GetTitle());
1204  if (title=="Centrality %")
1205  contents[i] = cent;
1206  else if (title=="#it{p}_{T} (GeV/#it{c})")
1207  contents[i] = partPt;
1208  else if (title=="#eta")
1209  contents[i] = partEta;
1210  else if (title=="#phi")
1211  contents[i] = partPhi;
1212  else if (title=="Findable")
1213  contents[i] = findable;
1214  else
1215  AliWarning(Form("Unable to fill dimension %s of histogram %s!", title.Data(), fParticlesPhysPrim->GetName()));
1216  }
1217 
1218  fParticlesPhysPrim->Fill(contents);
1219 }
1220 
1221 //________________________________________________________________________
1223  Double_t trackEta, Double_t trackPhi, Double_t trackPt, Byte_t trackType)
1224 {
1225  Double_t contents[20]={0};
1226 
1227  for (Int_t i = 0; i < fParticlesMatched->GetNdimensions(); i++) {
1228  TString title(fParticlesMatched->GetAxis(i)->GetTitle());
1229  if (title=="Centrality %")
1230  contents[i] = cent;
1231  else if (title=="#it{p}_{T}^{gen} (GeV/#it{c})")
1232  contents[i] = partPt;
1233  else if (title=="#eta^{gen}")
1234  contents[i] = partEta;
1235  else if (title=="#phi^{gen}")
1236  contents[i] = partPhi;
1237  else if (title=="#it{p}_{T}^{det} (GeV/#it{c})")
1238  contents[i] = trackPt;
1239  else if (title=="#eta^{det}")
1240  contents[i] = trackEta;
1241  else if (title=="#phi^{det}")
1242  contents[i] = trackPhi;
1243  else if (title=="(#it{p}_{T}^{gen} - #it{p}_{T}^{det}) / #it{p}_{T}^{gen}")
1244  contents[i] = (partPt - trackPt) / partPt;
1245  else if (title=="(#it{p}_{T}^{gen} - #it{p}_{T}^{det}) / #it{p}_{T}^{det}")
1246  contents[i] = (partPt - trackPt) / trackPt;
1247  else if (title=="track type")
1248  contents[i] = (Double_t)trackType;
1249  else
1250  AliWarning(Form("Unable to fill dimension %s of histogram %s!", title.Data(), fParticlesMatched->GetName()));
1251  }
1252 
1253  fParticlesMatched->Fill(contents);
1254 }
Int_t pdg
Bool_t fDoEmcalQA
Set whether to enable cell/cluster QA.
Double_t * fEtaHistBins
number of eta bins
Double_t * fPtResHistBins
number of pt res bins
void Print(std::ostream &o, const char *name, Double_t dT, Double_t dVM, Double_t alldT, Double_t alldVM)
Definition: PlotSysInfo.C:121
TObjArray fClusterCollArray
cluster collection array
Bool_t fDoEventQA
Set whether to enable event QA.
Double_t GetRhoVal() const
const TString & GetRhoName() const
double Double_t
Definition: External.C:58
Int_t fN1OverPtResHistBins
1/pt res bins
const char * title
Definition: MakeQAPdf.C:26
Float_t fPtBinWidth
Histogram pt bin width.
Int_t fNPtResHistBins
pt relative difference bins
AliTrackContainer * fDetectorLevel
generator level container
const AliMCParticleIterableMomentumContainer accepted_momentum() const
bidirectional stl iterator over the EMCAL iterable container
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Double_t fPtHard
!event pt hard
AliAnalysisTaskPWGJEQA()
Default constructor for ROOT I/O purposes.
THnSparse * fTracks
! phos geometry
Bool_t fGeneralHistograms
whether or not it should fill some general histograms
THistManager fHistManager
primary particles matched to detector level tracks
Bool_t fRejectOutlierEvents
flag to reject pythia pt-hard jet outlier events
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
Int_t fNTotClusters[3]
!Total number of accepted clusters in current event (DCal/EMCal)
TString fDetectorLevelName
detector level container name
Bool_t fDoTrackQA
Set whether to enable track QA.
THnSparse * fParticlesPhysPrim
all tracks
TObjArray fParticleCollArray
particle/track collection array
Double_t * sigma
const Int_t nPtBins
Double_t * fPtHistBins
number of pt bins
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
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 CreateTProfile(const char *name, const char *title, int nbinsX, double xmin, double xmax, Option_t *opt="")
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Definition: THistManager.h:504
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
float Float_t
Definition: External.C:68
AliEMCALGeometry * fGeom
!emcal geometry
AliPHOSGeometry * fPHOSGeo
integer bins
void FillDetectorLevelTHnSparse(Double_t cent, Double_t trackEta, Double_t trackPhi, Double_t trackPt, Double_t sigma1OverPt, Byte_t trackType)
Bool_t fSeparateEMCalDCal
Separate EMCal from DCal in QA plots.
virtual AliAODMCParticle * GetAcceptMCParticleWithLabel(Int_t lab)
Int_t fNTotTracks
!Total number of accepted tracks in current event
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Float_t fCellEnergyCut
Energy cell cut.
BeamType fForceBeamType
forced beam type
virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const
Double_t * fPtRelDiffHistBins
number of pt relative difference bins
void FillProfile(const char *name, double x, double y, double weight=1.)
Declaration of class AliAnalysisTaskPWGJEQA.
Double_t fCent
!event centrality
Int_t fNPtHistBins
detector level container
TString fCaloCellsName
name of calo cell collection
Int_t fNIntegerHistBins
number of 1/pt res bins
Double_t * f1OverPtResHistBins
pt res bins
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Bool_t PythiaInfoFromFile(const char *currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard)
TObjArray fJetCollArray
jet collection array
short Short_t
Definition: External.C:23
AliVCaloCells * fCaloCells
!cells
AliRhoParameter * GetRhoParameter()
Double_t * fIntegerHistBins
number of integer bins
const AliClusterIterableMomentumContainer all_momentum() const
void FillMatchedParticlesTHnSparse(Double_t cent, Double_t partEta, Double_t partPhi, Double_t partPt, Double_t trackEta, Double_t trackPhi, Double_t trackPt, Byte_t trackType)
void FillGeneratorLevelTHnSparse(Double_t cent, Double_t partEta, Double_t partPhi, Double_t partPt, Byte_t findable)
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
AliTLorentzVector fLeadingTrack
!Leading track in current event
Float_t GetJetRadius() const
AliEmcalList * fOutput
!output list
AliMCParticleContainer * GetMCParticleContainer(Int_t i=0) const
Char_t GetTrackType(const AliVTrack *track) const
Definition: External.C:220
Bool_t fIsEsd
!whether it's an ESD analysis
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
void GenerateHistoBins()
Generate histogram binning arrays for track histograms.
AliTrackContainer * GetTrackContainer(Int_t i=0) const
TH1 * fHistEventRejection
!book keep reasons for rejecting event
void SetMakeGeneralHistograms(Bool_t g)
This is a task used to do basic PWGJE QA on tracks, clusters, and jets. Based on code from Salvatore ...
Base task in the EMCAL jet framework.
Bool_t fIsPtHard
flag to enable pt-hard histos and make available outlier cut
const AliTrackIterableMomentumContainer accepted_momentum() const
Bool_t fDoJetQA
Set whether to enable jet QA.
TString fGeneratorLevelName
generator level container name
void SetRejectionReasonLabels(TAxis *axis)
Float_t fMaxPt
Histogram pt limit.
AliMCParticleContainer * fGeneratorLevel
const Int_t nbins
bool Bool_t
Definition: External.C:53
Double_t * fCentHistBins
number of cent bins
THnSparse * fParticlesMatched
all physical primary particles
THnSparse * CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
Container structure for EMCAL clusters.
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
Container for jet within the EMCAL jet framework.
Definition: External.C:196
Double_t * fPhiHistBins
number of phi bins
AliTLorentzVector fLeadingCluster[3]
!Leading cluster in current event (EMCal/DCal)
const AliJetIterableContainer all() const
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal