AliPhysics  67e0feb (67e0feb)
AliAnalysisTaskEmcalVsPhos.cxx
Go to the documentation of this file.
1 /**********************************************************************************
2 * Copyright (C) 2016, Copyright Holders of the ALICE Collaboration *
3 * All rights reserved. *
4 * *
5 * Redistribution and use in source and binary forms, with or without *
6 * modification, are permitted provided that the following conditions are met: *
7 * * Redistributions of source code must retain the above copyright *
8 * notice, this list of conditions and the following disclaimer. *
9 * * Redistributions in binary form must reproduce the above copyright *
10 * notice, this list of conditions and the following disclaimer in the *
11 * documentation and/or other materials provided with the distribution. *
12 * * Neither the name of the <organization> nor the *
13 * names of its contributors may be used to endorse or promote products *
14 * derived from this software without specific prior written permission. *
15 * *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
19 * DISCLAIMED. IN NO EVENT SHALL ALICE COLLABORATION BE LIABLE FOR ANY *
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
26 * *********************************************************************************/
27 
28 #include <vector>
29 
30 #include <TClonesArray.h>
31 #include <TH1F.h>
32 #include <TH2F.h>
33 #include <TH3.h>
34 #include <TList.h>
35 #include <THnSparse.h>
36 
37 #include <AliVCluster.h>
38 #include <AliVParticle.h>
39 #include <AliLog.h>
40 
41 #include "AliTLorentzVector.h"
42 #include "AliEmcalJet.h"
43 #include "AliRhoParameter.h"
44 #include "AliJetContainer.h"
45 #include "AliParticleContainer.h"
46 #include "AliClusterContainer.h"
47 #include "AliEMCALGeometry.h"
48 #include "AliPHOSGeometry.h"
49 #include "AliOADBContainer.h"
50 
52 
56 
62  fPlotClusterHistograms(kTRUE),
63  fPlotNeutralJets(kFALSE),
64  fPlotClustersInJets(kFALSE),
65  fPlotCellHistograms(kTRUE),
66  fPlotClusWithoutNonLinCorr(kFALSE),
67  fPlotExotics(kFALSE),
68  fPlotStandardClusterTHnSparse(kTRUE),
69  fPlotNearestNeighborDistribution(kFALSE),
70  fPlotClusterCone(kFALSE),
71  fPlotCaloCentrality(kFALSE),
72  fPlotFineGrainedEtaPhi(kFALSE),
73  fPlotEvenOddEta(kFALSE),
74  fPlotCellSMDensity(kFALSE),
75  fExcludeRejectedCells(kFALSE),
76  fPlotFineGrainedCentrality(kFALSE),
77  fPlotEventHistograms(kFALSE),
78  fMaxPt(200),
79  fNCentHistBins(0),
80  fCentHistBins(0),
81  fNPtHistBins(0),
82  fPtHistBins(0),
83  fNM02HistBins(0),
84  fM02HistBins(0),
85  fUseAliEventCuts(kTRUE),
86  fEventCuts(0),
87  fEventCutList(0),
88  fUseManualEventCuts(kFALSE),
89  fPHOSGeo(nullptr),
90  fHistManager()
91 {
93 }
94 
101  AliAnalysisTaskEmcalJet(name, kTRUE),
102  fPlotClusterHistograms(kTRUE),
103  fPlotNeutralJets(kFALSE),
104  fPlotClustersInJets(kFALSE),
105  fPlotCellHistograms(kTRUE),
107  fPlotExotics(kFALSE),
110  fPlotClusterCone(kFALSE),
111  fPlotCaloCentrality(kFALSE),
112  fPlotFineGrainedEtaPhi(kFALSE),
113  fPlotEvenOddEta(kFALSE),
114  fPlotCellSMDensity(kFALSE),
115  fExcludeRejectedCells(kFALSE),
117  fPlotEventHistograms(kFALSE),
118  fMaxPt(200),
119  fNCentHistBins(0),
120  fCentHistBins(0),
121  fNPtHistBins(0),
122  fPtHistBins(0),
123  fNM02HistBins(0),
124  fM02HistBins(0),
125  fUseAliEventCuts(kTRUE),
126  fEventCuts(0),
127  fEventCutList(0),
128  fUseManualEventCuts(kFALSE),
129  fPHOSGeo(nullptr),
130  fHistManager(name)
131 {
133 }
134 
139 {
140 }
141 
146 {
147  fNCentHistBins = 4;
149  fCentHistBins[0] = 0;
150  fCentHistBins[1] = 10;
151  fCentHistBins[2] = 30;
152  fCentHistBins[3] = 50;
153  fCentHistBins[4] = 90;
154 
155  fNPtHistBins = 82;
158  GenerateFixedBinArray(7, 0.3, 1, fPtHistBins+6);
159  GenerateFixedBinArray(10, 1, 3, fPtHistBins+13);
160  GenerateFixedBinArray(14, 3, 10, fPtHistBins+23);
161  GenerateFixedBinArray(10, 10, 20, fPtHistBins+37);
162  GenerateFixedBinArray(15, 20, 50, fPtHistBins+47);
163  GenerateFixedBinArray(20, 50, 150, fPtHistBins+62);
164 
165  fNM02HistBins = 81;
167  GenerateFixedBinArray(35, 0, 0.7, fM02HistBins);
168  GenerateFixedBinArray(6, 0.7, 1., fM02HistBins+35);
169  GenerateFixedBinArray(20, 1., 3., fM02HistBins+41);
170  GenerateFixedBinArray(10, 3., 5., fM02HistBins+61);
171  GenerateFixedBinArray(10, 5., 10., fM02HistBins+71);
172 }
173 
179 {
181 
183 
184  TIter next(fHistManager.GetListOfHistograms());
185  TObject* obj = 0;
186  while ((obj = next())) {
187  fOutput->Add(obj);
188  }
189 
190  // Intialize AliEventCuts
191  if (fUseAliEventCuts) {
192  fEventCutList = new TList();
193  fEventCutList ->SetOwner();
194  fEventCutList ->SetName("EventCutOutput");
195 
196  fEventCuts.OverrideAutomaticTriggerSelection(fOffTrigger);
197  if(fUseManualEventCuts==1)
198  {
199  fEventCuts.SetManualMode();
200  // Configure manual settings here
201  // ...
202  }
203  fEventCuts.AddQAplotsToList(fEventCutList);
204  fOutput->Add(fEventCutList);
205  }
206 
207  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
208 }
209 
210 /*
211  * This function allocates the histograms for the calorimeter performance study.
212  */
214 {
215 
218  }
219 
220  if (fPlotCellHistograms) {
222  }
223 
224  if (fPlotNeutralJets) {
226  }
227 
228  if (fPlotClustersInJets) {
230  }
231 
232  if (fPlotEventHistograms) {
234  }
235 
236 }
237 
238 /*
239  * This function allocates the histograms for the calorimeter performance study.
240  */
242 {
243  TString histname;
244  TString htitle;
245 
246  Double_t* clusType = new Double_t[3+1];
247  GenerateFixedBinArray(3, -0.5, 2.5, clusType);
248  const Int_t nRejBins = 32;
249  Double_t* rejReasonBins = new Double_t[nRejBins+1];
250  GenerateFixedBinArray(nRejBins, 0, nRejBins, rejReasonBins);
251  const Int_t nExBins = 200;
252  Double_t* exBins = new Double_t[nExBins+1];
253  GenerateFixedBinArray(nExBins, 0, 1, exBins);
254 
255  AliEmcalContainer* cont = 0;
256  TIter nextClusColl(&fClusterCollArray);
257  while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
258 
259  // rejection reason plot, to make efficiency correction
260  histname = TString::Format("%s/hClusterRejectionReasonEMCal", cont->GetArrayName().Data());
261  htitle = histname + ";Rejection reason;#it{E}_{clus} (GeV/)";
262  TH2* hist = fHistManager.CreateTH2(histname.Data(), htitle.Data(), nRejBins, rejReasonBins, fNPtHistBins, fPtHistBins);
263  SetRejectionReasonLabels(hist->GetXaxis());
264 
265  histname = TString::Format("%s/hClusterRejectionReasonPHOS", cont->GetArrayName().Data());
266  htitle = histname + ";Rejection reason;#it{E}_{clus} (GeV/)";
267  TH2* histPhos = fHistManager.CreateTH2(histname.Data(), htitle.Data(), nRejBins, rejReasonBins, fNPtHistBins, fPtHistBins);
268  SetRejectionReasonLabels(histPhos->GetXaxis());
269 
270  histname = TString::Format("%s/hClusterRejectionReasonMC", cont->GetArrayName().Data());
271  htitle = histname + ";Rejection reason;#it{E}_{clus} (GeV/)";
272  TH2* histMC = fHistManager.CreateTH2(histname.Data(), htitle.Data(), nRejBins, rejReasonBins, fNPtHistBins, fPtHistBins);
273  SetRejectionReasonLabels(histMC->GetXaxis());
274 
275  // plot by SM
276  const Int_t nEmcalSM = 20;
277  for (Int_t sm = 0; sm < nEmcalSM; sm++) {
278  histname = TString::Format("%s/BySM/hEmcalClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
279  htitle = histname + ";#it{E}_{cluster} (GeV);counts";
280  fHistManager.CreateTH1(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins);
281  }
282 
283  for (Int_t sm = 1; sm < 5; sm++) {
284  histname = TString::Format("%s/BySM/hPhosClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
285  htitle = histname + ";#it{E}_{cluster} (GeV);counts";
286  fHistManager.CreateTH1(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins);
287  }
288 
289  // Plot cluster THnSparse (centrality, eta, phi, E, E-hadcorr, has matched track, M02, Ncells, passed dispersion cut)
290  Int_t dim = 0;
291  TString title[20];
292  Int_t nbins[20] = {0};
293  Double_t min[30] = {0.};
294  Double_t max[30] = {0.};
295  Double_t *binEdges[20] = {0};
296 
298  title[dim] = "Centrality %";
300  nbins[dim] = 18;
301  min[dim] = 0;
302  max[dim] = 90;
303  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
304  }
305  else {
306  nbins[dim] = fNCentHistBins;
307  binEdges[dim] = fCentHistBins;
308  min[dim] = fCentHistBins[0];
309  max[dim] = fCentHistBins[fNCentHistBins];
310  }
311  dim++;
312  }
313 
314  title[dim] = "#eta";
315  nbins[dim] = 28;
317  nbins[dim] = 100;
318  }
319  min[dim] = -0.7;
320  max[dim] = 0.7;
321  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
322  dim++;
323 
324  title[dim] = "#phi";
325  nbins[dim] = 100;
327  nbins[dim] = 357;
328  }
329  min[dim] = 1.;
330  max[dim] = 6.;
331  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
332  dim++;
333 
334  title[dim] = "#it{E}_{clus} (GeV)";
335  nbins[dim] = fNPtHistBins;
336  binEdges[dim] = fPtHistBins;
337  min[dim] = fPtHistBins[0];
338  max[dim] = fPtHistBins[fNPtHistBins];
339  dim++;
340 
342  title[dim] = "#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)";
343  nbins[dim] = fNPtHistBins;
344  binEdges[dim] = fPtHistBins;
345  min[dim] = fPtHistBins[0];
346  max[dim] = fPtHistBins[fNPtHistBins];
347  dim++;
348 
349  title[dim] = "Matched track";
350  nbins[dim] = 2;
351  min[dim] = -0.5;
352  max[dim] = 1.5;
353  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
354  dim++;
355 
356  title[dim] = "M02";
357  nbins[dim] = fNM02HistBins;
358  binEdges[dim] = fM02HistBins;
359  min[dim] = fM02HistBins[0];
360  max[dim] = fM02HistBins[fNM02HistBins];
361  dim++;
362 
363  title[dim] = "Ncells";
364  nbins[dim] = 30;
365  min[dim] = -0.5;
366  max[dim] = 29.5;
367  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
368  dim++;
369 
370  title[dim] = "Dispersion cut";
371  nbins[dim] = 2;
372  min[dim] = -0.5;
373  max[dim] = 1.5;
374  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
375  dim++;
376 
377  }
378 
379  if (fPlotEvenOddEta) {
380  title[dim] = "Even/odd eta";
381  nbins[dim] = 2;
382  min[dim] = -0.5;
383  max[dim] = 1.5;
384  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
385  dim++;
386  }
387 
389  title[dim] = "#DeltaR_{NN}";
390  nbins[dim] = 100;
391  min[dim] = 0.;
392  max[dim] = 1.;
393  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
394  dim++;
395  }
396 
397  if (fPlotClusterCone) {
398 
399  title[dim] = "Cone type";
400  nbins[dim] = 2;
401  min[dim] = -0.5;
402  max[dim] = 1.5;
403  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
404  dim++;
405 
406  title[dim] = "R";
407  nbins[dim] = 2;
408  min[dim] = 0;
409  max[dim] = 0.15;
410  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
411  dim++;
412 
413  title[dim] = "#it{E}_{cone} (GeV)";
414  nbins[dim] = fNPtHistBins;
415  binEdges[dim] = fPtHistBins;
416  min[dim] = fPtHistBins[0];
417  max[dim] = fPtHistBins[fNPtHistBins];
418  dim++;
419 
420  }
421 
422  if (fPlotCaloCentrality) {
423 
424  title[dim] = "#it{#rho}_{cell cone} (GeV)";
425  nbins[dim] = 100;
426  min[dim] = 0.;
427  max[dim] = 1000.;
428  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
429  dim++;
430 
431  title[dim] = "Ncells cone";
432  nbins[dim] = 100;
433  min[dim] = -0.5;
434  max[dim] = 99.5;
435  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
436  dim++;
437 
438  if (fPlotCellSMDensity) {
439  title[dim] = "#it{E}_{cell SM} (GeV)";
440  nbins[dim] = fNPtHistBins;
441  binEdges[dim] = fPtHistBins;
442  min[dim] = fPtHistBins[0];
443  max[dim] = fPtHistBins[fNPtHistBins];
444  dim++;
445 
446  title[dim] = "Ncells SM";
447  nbins[dim] = 100;
448  min[dim] = -0.5;
449  max[dim] = 999.5;
450  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
451  dim++;
452  }
453 
454  }
455 
456  TString thnname = TString::Format("%s/clusterObservables", cont->GetArrayName().Data());
457  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
458  for (Int_t i = 0; i < dim; i++) {
459  hn->GetAxis(i)->SetTitle(title[i]);
460  hn->SetBinEdges(i, binEdges[i]);
461  }
462 
463  // Plot Fcross distribution
464  if (fPlotExotics) {
465  histname = TString::Format("%s/hFcrossEMCal", cont->GetArrayName().Data());
466  htitle = histname + ";Centrality (%);Fcross;#it{E}_{clus} (GeV/)";
467  fHistManager.CreateTH3(histname.Data(), htitle.Data(), fNCentHistBins, fCentHistBins, nExBins, exBins, fNPtHistBins, fPtHistBins);
468  }
469 
470  }
471 
472 }
473 
474 /*
475  * This function allocates the histograms for calo cells.
476  */
478 {
479  TString histname;
480  TString htitle;
481 
482  Double_t* clusType = new Double_t[3+1];
483  GenerateFixedBinArray(3, -0.5, 2.5, clusType);
484 
485  // centrality vs. cell energy vs. cell type (for all cells)
486  histname = TString::Format("Cells/hCellEnergyAll");
487  htitle = histname + ";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
488  fHistManager.CreateTH3(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins, fNCentHistBins, fCentHistBins, 3, clusType);
489 
490  // centrality vs. cell energy vs. cell type (for cells in accepted clusters)
491  histname = TString::Format("Cells/hCellEnergyAccepted");
492  htitle = histname + ";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
493  fHistManager.CreateTH3(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins, fNCentHistBins, fCentHistBins, 3, clusType);
494 
495  // centrality vs. cell energy vs. cell type (for leading cells in accepted clusters)
496  histname = TString::Format("Cells/hCellEnergyLeading");
497  htitle = histname + ";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
498  fHistManager.CreateTH3(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins, fNCentHistBins, fCentHistBins, 3, clusType);
499 
500  // plot cell patches by SM
501  const Int_t nEmcalSM = 20;
502  for (Int_t sm = 0; sm < nEmcalSM; sm++) {
503  histname = TString::Format("Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
504  htitle = histname + ";#it{E}_{cell patch} (GeV);Centrality (%)";
505  fHistManager.CreateTH2(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins, fNCentHistBins, fCentHistBins);
506  }
507 
508  for (Int_t sm = 1; sm < 5; sm++) {
509  histname = TString::Format("Cells/BySM/hPhosPatchEnergy_SM%d", sm);
510  htitle = histname + ";#it{E}_{cell patch} (GeV);Centrality (%)";
511  fHistManager.CreateTH2(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins, fNCentHistBins, fCentHistBins);
512  }
513 
514 }
515 
516 /*
517  * This function allocates the histograms for neutral jets.
518  */
520 {
521  AliJetContainer* jets = 0;
522  TIter nextJetColl(&fJetCollArray);
523  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
524 
525  TString axisTitle[30]= {""};
526  Int_t nbinsJet[30] = {0};
527  Double_t minJet[30] = {0.};
528  Double_t maxJet[30] = {0.};
529  Double_t *binEdgesJet[20] = {0};
530  Int_t dimJet = 0;
531 
532  if (fForceBeamType != kpp) {
533  axisTitle[dimJet] = "Centrality (%)";
534  nbinsJet[dimJet] = fNCentHistBins;
535  binEdgesJet[dimJet] = fCentHistBins;
536  minJet[dimJet] = fCentHistBins[0];
537  maxJet[dimJet] = fCentHistBins[fNCentHistBins];
538  dimJet++;
539  }
540 
541  axisTitle[dimJet] = "#eta_{jet}";
542  nbinsJet[dimJet] = 28;
543  minJet[dimJet] = -0.7;
544  maxJet[dimJet] = 0.7;
545  binEdgesJet[dimJet] = GenerateFixedBinArray(nbinsJet[dimJet], minJet[dimJet], maxJet[dimJet]);
546  dimJet++;
547 
548  axisTitle[dimJet] = "#phi_{jet} (rad)";
549  nbinsJet[dimJet] = 100;
550  minJet[dimJet] = 1.;
551  maxJet[dimJet] = 6.;
552  binEdgesJet[dimJet] = GenerateFixedBinArray(nbinsJet[dimJet], minJet[dimJet], maxJet[dimJet]);
553  dimJet++;
554 
555  axisTitle[dimJet] = "#it{E}_{T} (GeV)";
556  nbinsJet[dimJet] = fNPtHistBins;
557  binEdgesJet[dimJet] = fPtHistBins;
558  minJet[dimJet] = fPtHistBins[0];
559  maxJet[dimJet] = fPtHistBins[fNPtHistBins];
560  dimJet++;
561 
562  axisTitle[dimJet] = "#rho (GeV/#it{c})";
563  nbinsJet[dimJet] = 100;
564  minJet[dimJet] = 0.;
565  maxJet[dimJet] = 1000.;
566  binEdgesJet[dimJet] = GenerateFixedBinArray(nbinsJet[dimJet], minJet[dimJet], maxJet[dimJet]);
567  dimJet++;
568 
569  axisTitle[dimJet] = "N_{clusters}";
570  nbinsJet[dimJet] = 20;
571  minJet[dimJet] = -0.5;
572  maxJet[dimJet] = 19.5;
573  binEdgesJet[dimJet] = GenerateFixedBinArray(nbinsJet[dimJet], minJet[dimJet], maxJet[dimJet]);
574  dimJet++;
575 
576  axisTitle[dimJet] = "#it{E}_{T}, acc clus within R (GeV)";
577  nbinsJet[dimJet] = fNPtHistBins;
578  binEdgesJet[dimJet] = fPtHistBins;
579  minJet[dimJet] = fPtHistBins[0];
580  maxJet[dimJet] = fPtHistBins[fNPtHistBins];
581  dimJet++;
582 
583  axisTitle[dimJet] = "#it{E}_{T}, acc cell within R (GeV)";
584  nbinsJet[dimJet] = fNPtHistBins;
585  binEdgesJet[dimJet] = fPtHistBins;
586  minJet[dimJet] = fPtHistBins[0];
587  maxJet[dimJet] = fPtHistBins[fNPtHistBins];
588  dimJet++;
589 
590  TString thnname = TString::Format("%s/hClusterJetObservables", jets->GetArrayName().Data());
591  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dimJet, nbinsJet, minJet, maxJet);
592  for (Int_t i = 0; i < dimJet; i++) {
593  hn->GetAxis(i)->SetTitle(axisTitle[i]);
594  hn->SetBinEdges(i, binEdgesJet[i]);
595  }
596 
597  }
598 }
599 
600 /*
601  * This function allocates the histograms for clusters within jets.
602  */
604 {
605  TString histname;
606  TString htitle;
607  Int_t nPtBins = TMath::CeilNint(fMaxPt/2);
608 
609  AliJetContainer* jets = 0;
610  TIter nextJetColl(&fJetCollArray);
611  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
612 
613  // Plot cluster spectra within jets
614  // (centrality, cluster energy, jet pT, jet eta, jet phi)
615  Int_t dim = 0;
616  TString title[20];
617  Int_t nbins[20] = {0};
618  Double_t min[30] = {0.};
619  Double_t max[30] = {0.};
620  Double_t *binEdges[20] = {0};
621 
623  title[dim] = "Centrality %";
624  nbins[dim] = fNCentHistBins;
625  binEdges[dim] = fCentHistBins;
626  min[dim] = fCentHistBins[0];
627  max[dim] = fCentHistBins[fNCentHistBins];
628  dim++;
629  }
630 
631  title[dim] = "#it{E}_{clus} (GeV)";
632  nbins[dim] = fNPtHistBins;
633  binEdges[dim] = fPtHistBins;
634  min[dim] = fPtHistBins[0];
635  max[dim] = fPtHistBins[fNPtHistBins];
636  dim++;
637 
638  title[dim] = "#it{p}_{T,jet}^{corr}";
639  nbins[dim] = nPtBins;
640  min[dim] = 0;
641  max[dim] = fMaxPt;
642  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
643  dim++;
644 
645  title[dim] = "#eta_{jet}";
646  nbins[dim] = 40;
647  min[dim] = -0.5;
648  max[dim] = 0.5;
649  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
650  dim++;
651 
652  title[dim] = "#phi_{jet}";
653  nbins[dim] = 200;
654  min[dim] = 1.;
655  max[dim] = 6.;
656  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
657  dim++;
658 
659  TString thnname = TString::Format("%s/hClustersInJets", jets->GetArrayName().Data());
660  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
661  for (Int_t i = 0; i < dim; i++) {
662  hn->GetAxis(i)->SetTitle(title[i]);
663  hn->SetBinEdges(i, binEdges[i]);
664  }
665 
666  // (jet type, jet pT, cluster shift)
667  histname = TString::Format("%s/hCaloJESshift", jets->GetArrayName().Data());
668  htitle = histname + ";type;#it{p}_{T}^{corr} (GeV/#it{c});#Delta_{JES}";
669  fHistManager.CreateTH3(histname.Data(), htitle.Data(), 3, -0.5, 2.5, nPtBins, 0, fMaxPt, 100, 0, 20);
670 
671  }
672 }
673 
674 /*
675  * This function allocates the histograms for the calorimeter performance study.
676  */
678 {
679  TString histname;
680  TString htitle;
681 
682  AliEmcalContainer* cont = 0;
683  TIter nextClusColl(&fClusterCollArray);
684  while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
685 
686  // Plot cluster THnSparse (centrality, EMCal cluster energy, PHOS cluster energy, track pT)
687  Int_t dim = 0;
688  TString title[20];
689  Int_t nbins[20] = {0};
690  Double_t min[30] = {0.};
691  Double_t max[30] = {0.};
692  Double_t *binEdges[20] = {0};
693 
695  title[dim] = "Centrality %";
697  nbins[dim] = 18;
698  min[dim] = 0;
699  max[dim] = 90;
700  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
701  }
702  else {
703  nbins[dim] = fNCentHistBins;
704  binEdges[dim] = fCentHistBins;
705  min[dim] = fCentHistBins[0];
706  max[dim] = fCentHistBins[fNCentHistBins];
707  }
708  dim++;
709  }
710 
711  title[dim] = "#Sigma#it{E}_{clus,EMCal} (GeV)";
712  nbins[dim] = 200;
713  min[dim] = 0;
714  max[dim] = 1500;
715  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
716  dim++;
717 
718  title[dim] = "#Sigma#it{E}_{clus,PHOS} (GeV)";
719  nbins[dim] = 100;
720  min[dim] = 0;
721  max[dim] = 200;
722  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
723  dim++;
724 
725  title[dim] = "#Sigma#it{p}_{T,tracks} (GeV)";
726  nbins[dim] = 200;
727  min[dim] = 0;
728  max[dim] = 1500;
729  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
730  dim++;
731 
732  TString thnname = "eventObservables";
733  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
734  for (Int_t i = 0; i < dim; i++) {
735  hn->GetAxis(i)->SetTitle(title[i]);
736  hn->SetBinEdges(i, binEdges[i]);
737  }
738 
739  }
740 
741 }
742 
748 {
750 
751  fNeedEmcalGeom = kTRUE;
752 
753  // Load the PHOS geometry
754  fPHOSGeo = AliPHOSGeometry::GetInstance();
755  if (fPHOSGeo) {
756  AliInfo("Found instance of PHOS geometry!");
757  }
758  else {
759  AliInfo("Creating PHOS geometry!");
760  Int_t runNum = InputEvent()->GetRunNumber();
761  if(runNum<209122) //Run1
762  fPHOSGeo = AliPHOSGeometry::GetInstance("IHEP");
763  else
764  fPHOSGeo = AliPHOSGeometry::GetInstance("Run2");
765 
766  if (fPHOSGeo) {
767  AliOADBContainer geomContainer("phosGeo");
768  geomContainer.InitFromFile("$ALICE_PHYSICS/OADB/PHOS/PHOSMCGeometry.root","PHOSMCRotationMatrixes");
769  TObjArray* matrixes = (TObjArray*)geomContainer.GetObject(runNum,"PHOSRotationMatrixes");
770  for(Int_t mod=0; mod<6; mod++) {
771  if(!matrixes->At(mod)) continue;
772  fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod);
773  printf(".........Adding Matrix(%d), geo=%p\n",mod,fPHOSGeo);
774  ((TGeoHMatrix*)matrixes->At(mod))->Print();
775  }
776  }
777  }
778 }
779 
784 {
785  if (fUseAliEventCuts) {
786  if (!fEventCuts.AcceptEvent(InputEvent()))
787  {
788  PostData(1, fOutput);
789  return kFALSE;
790  }
791  }
792  else {
794  }
795  return kTRUE;
796 }
797 
806 {
807  return kTRUE;
808 }
809 
817 {
818 
821  }
822 
823  if (fPlotNeutralJets) {
825  }
826 
827  if (fPlotClustersInJets) {
829  }
830 
831  if (fPlotCellHistograms) {
833  }
834 
835  if (fPlotEventHistograms) {
837  }
838 
839  return kTRUE;
840 }
841 
842 /*
843  * This function fills the histograms for the calorimeter performance study.
844  */
846 {
847  // Define some vars
848  TString histname;
849  Double_t Enonlin;
850  Double_t Ehadcorr;
851  Int_t absId;
852  Double_t ecell;
853  Double_t leadEcell;
854  Int_t leadAbsId;
855 
856  // Get cells from event
857  fCaloCells = InputEvent()->GetEMCALCells();
858  AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
859 
860  // Loop through clusters and plot cluster THnSparse (centrality, cluster type, E, E-hadcorr, has matched track, M02, Ncells)
861  AliClusterContainer* clusters = 0;
862  const AliVCluster* clus;
863  TString clustersName;
864  TIter nextClusColl(&fClusterCollArray);
865  while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
867  clustersName = clusters->GetArrayName();
868  for (AliClusterIterableMomentumContainer::iterator it = itcont.begin(); it != itcont.end(); it++) {
869 
870  clus = it->second;
871 
872  // Determine cluster type (EMCal/DCal/Phos)
873  ClusterType clusType = kNA;
874  if (clus->IsEMCAL()) {
875  Double_t phi = it->first.Phi_0_2pi();
876  Int_t isDcal = Int_t(phi > fgkEMCalDCalPhiDivide);
877  if (isDcal == 0) {
878  clusType = kEMCal;
879  } else if (isDcal == 1) {
880  clusType = kDCal;
881  }
882  } else if (clus->GetType() == AliVCluster::kPHOSNeutral){
883  clusType = kPHOS;
884  }
885 
886  // rejection reason plots, to make efficiency correction
887  if (clus->IsEMCAL()) {
888  histname = TString::Format("%s/hClusterRejectionReasonEMCal", clusters->GetArrayName().Data());
889  UInt_t rejectionReason = 0;
890  if (!clusters->AcceptCluster(it.current_index(), rejectionReason)) {
891  fHistManager.FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
892  continue;
893  }
894  } else if (clus->GetType() == AliVCluster::kPHOSNeutral){
895  histname = TString::Format("%s/hClusterRejectionReasonPHOS", clusters->GetArrayName().Data());
896  UInt_t rejectionReason = 0;
897  if (!clusters->AcceptCluster(it.current_index(), rejectionReason)) {
898  fHistManager.FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
899  continue;
900  }
901  } else {
902  continue; // avoid CPV clusters
903  }
904 
905  // Fill cluster spectra by SM, and fill cell histograms
906  Enonlin = 0;
907  Ehadcorr = 0;
908  if (clus->IsEMCAL()) {
909 
910  Ehadcorr = clus->GetHadCorrEnergy();
911  Enonlin = clus->GetNonLinCorrEnergy();
913  Enonlin = clus->E();
914  }
915 
916  if (fPlotExotics) {
917  histname = TString::Format("%s/hFcrossEMCal", clusters->GetArrayName().Data());
918  Double_t Fcross = GetFcross(clus, fCaloCells);
919  fHistManager.FillTH3(histname, fCent, Fcross, Enonlin);
920  }
921 
922  Int_t sm = fGeom->GetSuperModuleNumber(clus->GetCellAbsId(0));
923  if (sm >=0 && sm < 20) {
924  histname = TString::Format("%s/BySM/hEmcalClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
925  fHistManager.FillTH1(histname, Enonlin);
926  }
927  else {
928  AliError(Form("Supermodule %d does not exist!", sm));
929  }
930 
931  // Get cells from each accepted cluster, and plot centrality vs. cell energy vs. cell type
932  histname = TString::Format("Cells/hCellEnergyAccepted");
933  leadEcell = 0;
934  for (Int_t iCell = 0; iCell < clus->GetNCells(); iCell++){
935  absId = clus->GetCellAbsId(iCell);
936  ecell = fCaloCells->GetCellAmplitude(absId);
937  fHistManager.FillTH3(histname, ecell, fCent, kEMCal); // Note: I don't distinguish EMCal from DCal cells
938  if (ecell > leadEcell) {
939  leadEcell = ecell;
940  leadAbsId = absId;
941  }
942  }
943  // Plot also the leading cell
944  histname = TString::Format("Cells/hCellEnergyLeading");
945  fHistManager.FillTH3(histname, leadEcell, fCent, kEMCal);
946 
947  } else if (clus->GetType() == AliVCluster::kPHOSNeutral){
948 
949  Ehadcorr = clus->GetCoreEnergy();
950  Enonlin = clus->E();
951 
952  Int_t relid[4];
953  if (fPHOSGeo) {
954  fPHOSGeo->AbsToRelNumbering(clus->GetCellAbsId(0), relid);
955  Int_t sm = relid[0];
956  if (sm >=1 && sm < 5) {
957  histname = TString::Format("%s/BySM/hPhosClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
958  fHistManager.FillTH1(histname, clus->E());
959  }
960  else {
961  AliError(Form("Supermodule %d does not exist!", sm));
962  }
963  }
964 
965  // Get cells from each accepted cluster, and plot centrality vs. cell energy vs. cell type
966  histname = TString::Format("Cells/hCellEnergyAccepted");
967  leadEcell = 0;
968  for (Int_t iCell = 0; iCell < clus->GetNCells(); iCell++){
969  absId = clus->GetCellAbsId(iCell);
970  ecell = phosCaloCells->GetCellAmplitude(absId);
971  fHistManager.FillTH3(histname, ecell, fCent, kPHOS);
972  if (ecell > leadEcell) {
973  leadEcell = ecell;
974  }
975  }
976  // Plot also the leading cell
977  histname = TString::Format("Cells/hCellEnergyLeading");
978  fHistManager.FillTH3(histname, leadEcell, fCent, kPHOS);
979  }
980 
981  // Check if the cluster has a matched track
982  Int_t hasMatchedTrack = -1;
983  Int_t nMatchedTracks = clus->GetNTracksMatched();
984  if (nMatchedTracks == 0) {
985  hasMatchedTrack = 0;
986  } else if (nMatchedTracks > 0) {
987  hasMatchedTrack = 1;
988  }
989 
990  // Check if the cluster passes the dispersion cut for photon-like cluster (meaningful only for PHOS)
991  Int_t passedDispersionCut = 0;
992  if (clus->Chi2() < 2.5*2.5) {
993  passedDispersionCut = 1;
994  }
995 
996  // Fill info about the cluster
997  Double_t eta = it->first.Eta();
998  Double_t phi = it->first.Phi_0_2pi();
999  Double_t M02 = clus->GetM02();
1000  Int_t nCells = clus->GetNCells();
1001  Double_t distNN = FindNearestNeighborDistance(it->first);
1002 
1003  // If cluster is EMCal, find whether the eta column is even or odd
1004  Int_t isOddEta = -1;
1005  Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
1006  if (clus->IsEMCAL()) {
1007  fGeom->GetCellIndex(leadAbsId, nSupMod, nModule, nIphi, nIeta);
1008  fGeom->GetCellPhiEtaIndexInSModule(nSupMod, nModule, nIphi, nIeta, iphi, ieta);
1009  isOddEta = ieta % 2;
1010  }
1011 
1012  // Standard option: fill once per cluster
1014  FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta);
1015  }
1016 
1017  if (fPlotCaloCentrality) {
1018 
1019  Double_t eCellCone = 0.;
1020  Int_t nCellsCone = 0;
1021  Double_t eCellSM = 0.;
1022  Int_t nCellsSM = 0;
1023  Double_t areaCone = TMath::Pi() * 0.07 * 0.07;
1024  Double_t areaCell;
1025  Double_t eDensityCone;
1026 
1027  // Get the SM number
1028  Int_t sm = -1;
1029  if (clusType == kEMCal) {
1030  sm = fGeom->GetSuperModuleNumber(clus->GetCellAbsId(0));
1031  areaCell = 0.014*0.014;
1032  }
1033  if (clusType == kPHOS) {
1034  Int_t relid[4];
1035  fPHOSGeo->AbsToRelNumbering(clus->GetCellAbsId(0), relid);
1036  sm = relid[0];
1037  areaCell = 0.014*0.014*(2.2/6.0)*(2.2/6.0); // approximating same r
1038  }
1039 
1040  // Only fill the THnSparse if the cluster is located in a full SM of EMCal or PHOS
1041  if ( (clusType == kEMCal && sm < 10 ) || (clusType == kPHOS && sm < 4) ) {
1042 
1043  eCellCone = GetConeCellEnergy(eta, phi, 0.07) - Enonlin;
1044  nCellsCone = (Int_t)GetConeCellEnergy(eta, phi, 0.07, kTRUE) - nCells;
1045 
1046  eDensityCone = eCellCone / (areaCone - nCells*areaCell);
1047 
1048  if (fPlotCellSMDensity) {
1049  eCellSM = GetSMCellEnergy(sm, clusType) - Enonlin;
1050  nCellsSM = (Int_t)GetSMCellEnergy(sm, clusType, kTRUE) - nCells;
1051  }
1052 
1053  FillClusterTHnSparse(clustersName, eta, phi, Enonlin, eDensityCone, eCellSM, nCellsCone, nCellsSM);
1054 
1055  }
1056 
1057  }
1058 
1059  // If cluster cone option enabled, fill for each R and cone type
1060  if (fPlotClusterCone) {
1061 
1062  // cluster cone, R=0.05
1063  FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 0, 0.05, GetConeClusterEnergy(eta, phi, 0.05));
1064  // cluster cone, R=0.1
1065  FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 0, 0.1, GetConeClusterEnergy(eta, phi, 0.1));
1066  // cell cone, R=0.05
1067  FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 1, 0.05, GetConeCellEnergy(eta, phi, 0.05));
1068  // cell cone, R=0.1
1069  FillClusterTHnSparse(clustersName, eta, phi, Enonlin, Ehadcorr, hasMatchedTrack, M02, nCells, passedDispersionCut, distNN, isOddEta, 1, 0.1, GetConeCellEnergy(eta, phi, 0.1));
1070 
1071  }
1072 
1073  }
1074  }
1075 }
1076 
1077 /*
1078  * This function fills the cluster THnSparse.
1079  */
1080 void AliAnalysisTaskEmcalVsPhos::FillClusterTHnSparse(TString clustersName, Double_t eta, Double_t phi, Double_t Enonlin, Double_t Ehadcorr, Int_t hasMatchedTrack, Double_t M02, Int_t nCells, Int_t passedDispersionCut, Double_t distNN, Int_t isOddEta, Int_t coneType, Double_t R, Double_t Econe)
1081 {
1082  Double_t contents[30]={0};
1083  TString histname = TString::Format("%s/clusterObservables", clustersName.Data());
1084  THnSparse* histClusterObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
1085  if (!histClusterObservables) return;
1086  for (Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
1087  TString title(histClusterObservables->GetAxis(i)->GetTitle());
1088  if (title=="Centrality %")
1089  contents[i] = fCent;
1090  else if (title=="#eta")
1091  contents[i] = eta;
1092  else if (title=="#phi")
1093  contents[i] = phi;
1094  else if (title=="#it{E}_{clus} (GeV)")
1095  contents[i] = Enonlin;
1096  else if (title=="#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)")
1097  contents[i] = Ehadcorr;
1098  else if (title=="Matched track")
1099  contents[i] = hasMatchedTrack;
1100  else if (title=="M02")
1101  contents[i] = M02;
1102  else if (title=="Ncells")
1103  contents[i] = nCells;
1104  else if (title=="Dispersion cut")
1105  contents[i] = passedDispersionCut;
1106  else if (title=="#DeltaR_{NN}")
1107  contents[i] = distNN;
1108  else if (title=="Even/odd eta")
1109  contents[i] = isOddEta;
1110  else if (title=="Cone type")
1111  contents[i] = coneType;
1112  else if (title=="R")
1113  contents[i] = R;
1114  else if (title=="#it{E}_{cone} (GeV)")
1115  contents[i] = Econe;
1116  else
1117  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1118  }
1119  histClusterObservables->Fill(contents);
1120 
1121 }
1122 
1123 /*
1124  * This function fills the cluster THnSparse (alternate signature, used for local density option).
1125  */
1126 void AliAnalysisTaskEmcalVsPhos::FillClusterTHnSparse(TString clustersName, Double_t eta, Double_t phi, Double_t Enonlin, Double_t eCellCone, Double_t eCellSM, Int_t nCellsCone, Int_t nCellsSM)
1127 {
1128  Double_t contents[30]={0};
1129  TString histname = TString::Format("%s/clusterObservables", clustersName.Data());
1130  THnSparse* histClusterObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
1131  if (!histClusterObservables) return;
1132  for (Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
1133  TString title(histClusterObservables->GetAxis(i)->GetTitle());
1134  if (title=="Centrality %")
1135  contents[i] = fCent;
1136  else if (title=="#eta")
1137  contents[i] = eta;
1138  else if (title=="#phi")
1139  contents[i] = phi;
1140  else if (title=="#it{E}_{clus} (GeV)")
1141  contents[i] = Enonlin;
1142  else if (title=="#it{#rho}_{cell cone} (GeV)")
1143  contents[i] = eCellCone;
1144  else if (title=="Ncells cone")
1145  contents[i] = nCellsCone;
1146  else if (title=="#it{E}_{cell SM} (GeV)")
1147  contents[i] = eCellSM;
1148  else if (title=="Ncells SM")
1149  contents[i] = nCellsSM;
1150  else
1151  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1152  }
1153  histClusterObservables->Fill(contents);
1154 
1155 }
1156 
1157 /*
1158  * This function fills cell histograms.
1159  */
1161 {
1162  // Define some vars
1163  TString histname;
1164  Int_t absId;
1165  Double_t ecell;
1166 
1167  // Get cells from event
1168  fCaloCells = InputEvent()->GetEMCALCells();
1169  AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1170 
1171  // Loop through all cells and fill histos
1172  Int_t sm;
1173  Int_t relid[4];
1174  Double_t patchSumEMCal[20] = {0.};
1175  Double_t patchSumPHOS[4] = {0.};
1176  for (Int_t i=0; i<fCaloCells->GetNumberOfCells(); i++) {
1177 
1178  absId = fCaloCells->GetCellNumber(i);
1179  ecell = fCaloCells->GetCellAmplitude(absId);
1180 
1181  // Fill cell histo
1182  histname = TString::Format("Cells/hCellEnergyAll");
1183  fHistManager.FillTH3(histname, ecell, fCent, kEMCal); // Note: I don't distinguish EMCal from DCal cells
1184 
1185  // Fill cell patch histo, per SM
1186  sm = fGeom->GetSuperModuleNumber(absId);
1187  if (sm >=0 && sm < 20) {
1188  patchSumEMCal[sm] += ecell;
1189  }
1190 
1191  }
1192 
1193  for (Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1194 
1195  absId = phosCaloCells->GetCellNumber(i);
1196  ecell = phosCaloCells->GetCellAmplitude(absId);
1197 
1198  if (absId < 0) {
1199  continue; // skip CPV cells
1200  }
1201 
1202  // Fill cell histo
1203  histname = TString::Format("Cells/hCellEnergyAll");
1204  fHistManager.FillTH3(histname, ecell, fCent, kPHOS);
1205 
1206  // Fill cell patch histo, per SM
1207  fPHOSGeo->AbsToRelNumbering(absId, relid);
1208  sm = relid[0];
1209  if (sm >=1 && sm < 5) {
1210  patchSumPHOS[sm-1] += ecell;
1211  }
1212 
1213  }
1214 
1215  for (Int_t sm = 0; sm < 20; sm++) {
1216  histname = TString::Format("Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
1217  fHistManager.FillTH2(histname, patchSumEMCal[sm], fCent);
1218  }
1219 
1220  for (Int_t sm = 1; sm < 5; sm++) {
1221  histname = TString::Format("Cells/BySM/hPhosPatchEnergy_SM%d", sm);
1222  fHistManager.FillTH2(histname, patchSumPHOS[sm-1], fCent);
1223  }
1224 
1225 }
1226 
1227 /*
1228  * This function fills neutral jet histograms.
1229  */
1231 {
1232  AliJetContainer* jets = 0;
1233  TIter nextJetColl(&fJetCollArray);
1234  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1235 
1236  // plot neutral jets THnSparse (centrality, eta, phi, E, Nclusters)
1237  Double_t contents[30]={0};
1238  TString histname = TString::Format("%s/hClusterJetObservables", jets->GetArrayName().Data());
1239  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
1240  if (!histJetObservables) return;
1241 
1242  for (auto jet : jets->accepted()) {
1243 
1244  for (Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
1245  TString title(histJetObservables->GetAxis(i)->GetTitle());
1246  if (title=="Centrality (%)")
1247  contents[i] = fCent;
1248  else if (title=="#eta_{jet}")
1249  contents[i] = jet->Eta();
1250  else if (title=="#phi_{jet} (rad)")
1251  contents[i] = jet->Phi_0_2pi();
1252  else if (title=="#it{E}_{T} (GeV)")
1253  contents[i] = jet->Pt();
1254  else if (title=="#rho (GeV/#it{c})")
1255  contents[i] = jet->Pt() / jet->Area();
1256  else if (title=="N_{clusters}")
1257  contents[i] = jet->GetNumberOfClusters();
1258  else if (title=="#it{E}_{T}, acc clus within R (GeV)")
1259  contents[i] = GetConeClusterEnergy(jet->Eta(), jet->Phi_0_2pi(), jets->GetJetRadius());
1260  else if (title=="#it{E}_{T}, acc cell within R (GeV)")
1261  contents[i] = GetConeCellEnergy(jet->Eta(), jet->Phi_0_2pi(), jets->GetJetRadius());
1262  else
1263  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1264  }
1265  histJetObservables->Fill(contents);
1266 
1267  }
1268  }
1269 }
1270 
1271 /*
1272  * This function fills clusters within jets and estimates the JES shift due to the bump.
1273  */
1275 {
1276  TString histname;
1277  Double_t rho;
1278  AliJetContainer* jets = 0;
1279  TIter nextJetColl(&fJetCollArray);
1280  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1281 
1282  rho = jets->GetRhoVal();
1283 
1284  for (const auto jet : jets->accepted()) {
1285 
1286  // Fill cluster spectra of clusters within jets
1287  //(centrality, cluster energy, jet pT, jet eta, jet phi)
1288  histname = TString::Format("%s/hClustersInJets", jets->GetArrayName().Data());
1289  Int_t nClusters = jet->GetNumberOfClusters();
1290  AliVCluster* clus;
1291  for (Int_t iClus = 0; iClus < nClusters; iClus++) {
1292 
1293  clus = jet->Cluster(iClus);
1294 
1296  Double_t x[5] = {fCent, clus->GetNonLinCorrEnergy(), GetJetPt(jet, rho), jet->Eta(), jet->Phi_0_2pi()};
1297  fHistManager.FillTHnSparse(histname, x);
1298  }
1299  else {
1300  Double_t x[4] = {clus->GetNonLinCorrEnergy(), GetJetPt(jet, rho), jet->Eta(), jet->Phi_0_2pi()};
1301  fHistManager.FillTHnSparse(histname, x);
1302  }
1303 
1304  }
1305 
1306  // Loop through clusters, and plot estimated shift in JES due to cluster bump
1307  // Only do for 0-10% centrality, and for EMCal/DCal
1308  Double_t eclus;
1309  Double_t shift;
1310  Double_t shiftSum = 0;
1312  if (GetJetType(jet) > -0.5 && GetJetType(jet) < 1.5) {
1313  for (Int_t iClus = 0; iClus < nClusters; iClus++) {
1314  clus = jet->Cluster(iClus);
1315  eclus = clus->GetNonLinCorrEnergy();
1316  if (eclus > 0.5) {
1317  shift = 0.79 * TMath::Exp(-0.5 * ((eclus - 3.81) / 1.50)*((eclus - 3.81) / 1.50) );
1318  shiftSum += shift;
1319  }
1320  }
1321  histname = TString::Format("%s/hCaloJESshift", jets->GetArrayName().Data());
1322  fHistManager.FillTH3(histname, GetJetType(jet), GetJetPt(jet, rho), shiftSum);
1323  }
1324  }
1325 
1326  }
1327  }
1328 }
1329 
1330 
1331 /*
1332  * This function fills the histograms for the event thnsparse (centrality, EMCal clus energy, PHOS clus energy, track pT)
1333  */
1335 {
1336  TString histname;
1337  Double_t sumEMCal = 0;
1338  Double_t sumPHOS = 0;
1339  Double_t sumTracks = 0;
1340 
1341  // Loop through clusters
1342  const AliVCluster* clus;
1344  for (auto clusIterator : clusters->accepted_momentum() ) {
1345 
1346  clus = clusIterator.second;
1347 
1348  if (clus->IsEMCAL()) {
1349  sumEMCal += clus->GetNonLinCorrEnergy();
1350  } else if (clus->GetType() == AliVCluster::kPHOSNeutral){
1351  sumPHOS += clus->E();
1352  }
1353 
1354  }
1355 
1356  // Loop through tracks
1357  AliTrackContainer* trackCont = dynamic_cast<AliTrackContainer*>(GetParticleContainer("tracks"));
1358  const AliVTrack* track;
1359  for (auto trackIterator : trackCont->accepted_momentum() ) {
1360 
1361  track = trackIterator.second;
1362 
1363  // Sum if track has matched EMCal cluster (within R=0.1, by default)
1364  if (track->IsEMCAL()) {
1365  sumTracks += track->Pt();
1366  }
1367 
1368  }
1369 
1370  // Fill the THnSparse
1371  Double_t contents[30]={0};
1372  THnSparse* histEventObservables = static_cast<THnSparse*>(fHistManager.FindObject("eventObservables"));
1373  if (!histEventObservables) return;
1374  for (Int_t i = 0; i < histEventObservables->GetNdimensions(); i++) {
1375  TString title(histEventObservables->GetAxis(i)->GetTitle());
1376  if (title=="Centrality %")
1377  contents[i] = fCent;
1378  else if (title=="#Sigma#it{E}_{clus,EMCal} (GeV)")
1379  contents[i] = sumEMCal;
1380  else if (title=="#Sigma#it{E}_{clus,PHOS} (GeV)")
1381  contents[i] = sumPHOS;
1382  else if (title=="#Sigma#it{p}_{T,tracks} (GeV)")
1383  contents[i] = sumTracks;
1384  else
1385  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1386  }
1387  histEventObservables->Fill(contents);
1388 
1389 }
1390 
1395 {
1396  Double_t pT = jet->Pt() - rho * jet->Area();
1397  return pT;
1398 }
1399 
1404 {
1405  Double_t deltaPhi = TMath::Abs(part.Phi_0_2pi() - phiRef);
1406  Double_t deltaEta = TMath::Abs(part.Eta() - etaRef);
1407  Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1408  return deltaR;
1409 }
1410 
1415 {
1416  Double_t deltaPhi = TMath::Abs(phi1-phi2);
1417  Double_t deltaEta = TMath::Abs(eta1-eta2);
1418  Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1419  return deltaR;
1420 }
1421 
1426 {
1427  UInt_t jetType = jet->GetJetAcceptanceType();
1428  Double_t type = -1;
1429  if (jetType & AliEmcalJet::kEMCAL) {
1430  type = kEMCal;
1431  }
1432  else if (jetType & AliEmcalJet::kDCALonly) {
1433  type = kDCal;
1434  }
1435  else if (jetType & AliEmcalJet::kPHOS) {
1436  type = kPHOS;
1437  }
1438 
1439  return type;
1440 }
1441 
1445 Double_t AliAnalysisTaskEmcalVsPhos::GetFcross(const AliVCluster *cluster, AliVCaloCells *cells)
1446 {
1447  Int_t AbsIdseed = -1;
1448  Double_t Eseed = 0;
1449  for (Int_t i = 0; i < cluster->GetNCells(); i++) {
1450  if (cells->GetCellAmplitude(cluster->GetCellAbsId(i)) > Eseed) {
1451  Eseed = cells->GetCellAmplitude(cluster->GetCellAbsId(i));
1452  AbsIdseed = cluster->GetCellAbsId(i);
1453  }
1454  }
1455 
1456  if (Eseed < 1e-9) {
1457  return 100;
1458  }
1459 
1460  Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
1461  fGeom->GetCellIndex(AbsIdseed,imod,iTower,iIphi,iIeta);
1462  fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,iphi,ieta);
1463 
1464  //Get close cells index and energy, not in corners
1465 
1466  Int_t absID1 = -1;
1467  Int_t absID2 = -1;
1468 
1469  if (iphi < AliEMCALGeoParams::fgkEMCALRows-1) {
1470  absID1 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
1471  }
1472  if (iphi > 0) {
1473  absID2 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
1474  }
1475 
1476  // In case of cell in eta = 0 border, depending on SM shift the cross cell index
1477 
1478  Int_t absID3 = -1;
1479  Int_t absID4 = -1;
1480 
1481  if (ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2)) {
1482  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
1483  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1484  }
1485  else if (ieta == 0 && imod%2) {
1486  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1487  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
1488  }
1489  else {
1490  if (ieta < AliEMCALGeoParams::fgkEMCALCols-1) {
1491  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
1492  }
1493  if (ieta > 0) {
1494  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1495  }
1496  }
1497 
1498  Double_t ecell1 = cells->GetCellAmplitude(absID1);
1499  Double_t ecell2 = cells->GetCellAmplitude(absID2);
1500  Double_t ecell3 = cells->GetCellAmplitude(absID3);
1501  Double_t ecell4 = cells->GetCellAmplitude(absID4);
1502 
1503  Double_t Ecross = ecell1 + ecell2 + ecell3 + ecell4;
1504 
1505  Double_t Fcross = 1 - Ecross/Eseed;
1506 
1507  return Fcross;
1508 }
1509 
1514 {
1515  Double_t distNN = 10.;
1516  Double_t etaRef = clusterRef.Eta();
1517  Double_t phiRef = clusterRef.Phi_0_2pi();
1518 
1520  AliTLorentzVector clusNNcand;
1521  for (auto clusIterator : clusters->accepted_momentum() ) {
1522 
1523  clusNNcand.Clear();
1524  clusNNcand = clusIterator.first;
1525 
1526  Double_t distNNcand = GetDeltaR(clusNNcand, etaRef, phiRef);
1527 
1528  if (distNNcand < distNN && distNNcand > 0.001) {
1529  distNN = distNNcand;
1530  }
1531 
1532  }
1533 
1534  return distNN;
1535 
1536 }
1537 
1542 {
1544  AliTLorentzVector clus;
1545  Double_t energy = 0.;
1546  for (auto clusIterator : clusCont->accepted_momentum() ) {
1547 
1548  clus.Clear();
1549  clus = clusIterator.first;
1550 
1551  if (GetDeltaR(clus, etaRef, phiRef) < R) {
1552  energy += clus.E();
1553  }
1554  }
1555  return energy;
1556 }
1557 
1563 {
1564  Double_t energy = 0.;
1565  Double_t nCells = 0.;
1566 
1567  // Get cells from event
1568  fCaloCells = InputEvent()->GetEMCALCells();
1569  AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1570 
1571  Double_t eta;
1572  Double_t phi;
1573  Int_t absId;
1574  TVector3 pos;
1575  Int_t relid[4];
1576  Int_t sm;
1577 
1578  for (Int_t i=0; i<fCaloCells->GetNumberOfCells(); i++) {
1579 
1580  absId = fCaloCells->GetCellNumber(i);
1581 
1582  fGeom->EtaPhiFromIndex(absId, eta, phi);
1583  phi = TVector2::Phi_0_2pi(phi);
1584 
1585  if (GetDeltaR(eta, phi, etaRef, phiRef) < R) {
1586 
1587  if (fExcludeRejectedCells) {
1588  if (IsCellRejected(absId, kEMCal)) {
1589  continue;
1590  }
1591  }
1592 
1593  energy += fCaloCells->GetCellAmplitude(absId);
1594  nCells += 1.;
1595  }
1596 
1597  }
1598 
1599  for (Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1600 
1601  absId = phosCaloCells->GetCellNumber(i);
1602 
1603  fPHOSGeo->AbsToRelNumbering(absId, relid);
1604  sm = relid[0];
1605  if (sm < 1 || sm > 4) {
1606  continue;
1607  }
1608 
1609  fPHOSGeo->RelPosInAlice(absId, pos); // pos then contains (x,y,z) coordinate of cell
1610  eta = pos.Eta();
1611  phi = pos.Phi();
1612  phi = TVector2::Phi_0_2pi(phi);
1613 
1614  if (GetDeltaR(eta, phi, etaRef, phiRef) < R) {
1615 
1616  if (fExcludeRejectedCells) {
1617  if (IsCellRejected(absId, kPHOS)) {
1618  continue;
1619  }
1620  }
1621 
1622  energy += phosCaloCells->GetCellAmplitude(absId);
1623  nCells += 1.;
1624  }
1625 
1626  }
1627 
1628  if (returnNcells) {
1629  return nCells;
1630  }
1631 
1632  return energy;
1633 }
1634 
1640 {
1641  Double_t energy = 0.;
1642  Double_t nCells = 0.;
1643  Int_t absId;
1644  Int_t cellSM;
1645  Int_t relid[4];
1646 
1647  if (clusType == kEMCal) {
1648 
1649  fCaloCells = InputEvent()->GetEMCALCells();
1650 
1651  for (Int_t i=0; i<fCaloCells->GetNumberOfCells(); i++) {
1652 
1653  absId = fCaloCells->GetCellNumber(i);
1654  cellSM = fGeom->GetSuperModuleNumber(absId);
1655 
1656  if (cellSM == sm) {
1657 
1658  if (fExcludeRejectedCells) {
1659  if (IsCellRejected(absId, kEMCal)) {
1660  continue;
1661  }
1662  }
1663 
1664  energy += fCaloCells->GetCellAmplitude(absId);
1665  nCells += 1.;
1666 
1667  }
1668  }
1669  }
1670 
1671  if (clusType == kPHOS) {
1672 
1673  AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
1674 
1675  for (Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
1676 
1677  absId = phosCaloCells->GetCellNumber(i);
1678 
1679  fPHOSGeo->AbsToRelNumbering(absId, relid);
1680  cellSM = relid[0];
1681 
1682  if (cellSM == sm) {
1683 
1684  if (fExcludeRejectedCells) {
1685  if (IsCellRejected(absId, kPHOS)) {
1686  continue;
1687  }
1688  }
1689 
1690  energy += phosCaloCells->GetCellAmplitude(absId);
1691  nCells += 1.;
1692 
1693  }
1694  }
1695  }
1696 
1697  if (returnNcells) {
1698  return nCells;
1699  }
1700 
1701  return energy;
1702 }
1703 
1708 {
1710  AliVCluster* cluster;
1711 
1712  UInt_t rejectionReason;
1713  Bool_t skipCell = kFALSE;
1714  Int_t clusType;
1715 
1717  for (AliClusterIterableMomentumContainer::iterator it = itcont.begin(); it != itcont.end(); it++) {
1718 
1719  if (!clusCont->AcceptCluster(it.current_index(), rejectionReason)) {
1720 
1721  cluster = it->second;
1722 
1723  // check that the cell type and cluster type are the same
1724  if (cluster->IsEMCAL()) {
1725  clusType = kEMCal;
1726  }
1727  if (cluster->GetType() == AliVCluster::kPHOSNeutral) {
1728  clusType = kPHOS;
1729  }
1730  if (clusType != cellType) {
1731  continue;
1732  }
1733 
1734  // skip the cell if it belongs to a rejected cluster
1735  for (Int_t i = 0; i < cluster->GetNCells(); i++) {
1736 
1737  if (absId == cluster->GetCellAbsId(i)) {
1738  skipCell = kTRUE;
1739  }
1740 
1741  }
1742  }
1743  }
1744  return skipCell;
1745 }
1746 
void Print(std::ostream &o, const char *name, Double_t dT, Double_t dVM, Double_t alldT, Double_t alldVM)
Definition: PlotSysInfo.C:121
Double_t Area() const
Definition: AliEmcalJet.h:130
TObjArray fClusterCollArray
cluster collection array
Double_t GetRhoVal() const
double Double_t
Definition: External.C:58
const char * title
Definition: MakeQAPdf.C:27
Bool_t fPlotEvenOddEta
Set whether to add axis to THnSparse separating even/odd eta columns.
PHOS acceptance.
Definition: AliEmcalJet.h:75
Bool_t fPlotClustersInJets
Set whether to plot histogram of clusters within jets.
UInt_t fOffTrigger
offline trigger for event selection
Double_t GetSMCellEnergy(Int_t sm, Int_t clusType, Bool_t returnNcells=kFALSE)
const AliClusterIterableMomentumContainer accepted_momentum() const
bidirectional stl iterator over the EMCAL iterable container
Double_t GetFcross(const AliVCluster *cluster, AliVCaloCells *cells)
Container with name, TClonesArray and cuts for particles.
Int_t fNCentHistBins
! number of cent bins
energy
Definition: HFPtSpectrum.C:44
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Double_t * fPtHistBins
! variable pt bins
Declaration of class AliTLorentzVector.
void FillTH3(const char *hname, double x, double y, double z, double weight=1., Option_t *opt="")
Fill a 3D histogram within the container.
Bool_t fPlotCellHistograms
Set whether to plot cell histograms.
Bool_t fUseAliEventCuts
Flag to use AliEventCuts (otherwise AliAnalysisTaskEmcal will be used)
Int_t fNM02HistBins
! number of variable M02 bins
Double_t FindNearestNeighborDistance(AliTLorentzVector cluster)
THistManager fHistManager
Histogram manager.
AliPHOSGeometry * fPHOSGeo
! phos geometry
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
const Int_t nPtBins
void FillTHnSparse(const char *name, const double *x, double weight=1., Option_t *opt="")
Double_t GetConeCellEnergy(Double_t etaRef, Double_t phiRef, Double_t R, Bool_t returnNcells=kFALSE)
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
TObject * FindObject(const char *name) const
Find an object inside the container.
int Int_t
Definition: External.C:63
Bool_t fPlotStandardClusterTHnSparse
Set whether to plot "standard" axes in cluster THnSparse.
unsigned int UInt_t
Definition: External.C:33
Int_t fNPtHistBins
! number of variable pt bins
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
Bool_t fPlotNeutralJets
Set whether to plot neutral jet histo.
AliEMCALGeometry * fGeom
!emcal geometry
UInt_t GetJetAcceptanceType() const
Definition: AliEmcalJet.h:367
Bool_t IsCellRejected(Int_t absId, Int_t cellType)
Double_t Phi_0_2pi() const
EMCal acceptance.
Definition: AliEmcalJet.h:69
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
Bool_t fPlotClusterCone
Set whether to plot sum of energy surrounding cluster in THnSparse.
Bool_t fPlotFineGrainedEtaPhi
Set whether to plot fine-grained eta-phi bins in cluster THnSparse.
BeamType fForceBeamType
forced beam type
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const
Double_t fCent
!event centrality
Bool_t fExcludeRejectedCells
Set whether to exclude cells from rejected clusters in cone/SM studies.
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
Double_t GetJetType(const AliEmcalJet *jet)
Bool_t fPlotCellSMDensity
Set whether to plot SM cell density when computing local density.
TObjArray fJetCollArray
jet collection array
Bool_t fPlotClusterHistograms
Set whether to plot cluster histograms.
Bool_t fPlotEventHistograms
Set whether to plot some calo event histograms.
Bool_t fUseManualEventCuts
Flag to use manual event cuts.
TList * fEventCutList
! Output list for event cut histograms
AliVCaloCells * fCaloCells
!cells
Double_t Pt() const
Definition: AliEmcalJet.h:109
Bool_t fPlotNearestNeighborDistribution
Set whether to plot nearest neighbor axis in cluster THnSparse.
const AliClusterIterableMomentumContainer all_momentum() const
Double_t * fM02HistBins
! variable M02 bins
virtual Bool_t IsEventSelected()
Performing event selection.
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
Bool_t fPlotFineGrainedCentrality
Set whether to plot a more fine grained centrality binning.
Float_t GetJetRadius() const
AliEmcalList * fOutput
!output list
Double_t GetDeltaR(AliTLorentzVector part, Double_t etaRef, Double_t phiRef)
Double_t GetConeClusterEnergy(Double_t etaRef, Double_t phiRef, Double_t R)
Definition: External.C:220
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
const AliTrackIterableMomentumContainer accepted_momentum() const
void SetRejectionReasonLabels(TAxis *axis)
void UserCreateOutputObjects()
Main initialization function on the worker.
const Int_t nbins
const AliJetIterableContainer accepted() const
bool Bool_t
Definition: External.C:53
Double_t GetJetPt(const AliEmcalJet *jet, Double_t rho)
Bool_t fPlotCaloCentrality
Set whether to bin cluster THnSparse in calorimeter local density.
Bool_t fPlotClusWithoutNonLinCorr
If true, use pre-nonlincorr energy in cluster thnsparse.
DCal acceptance – spans ONLY DCal (no PHOS or gap)
Definition: AliEmcalJet.h:73
THnSparse * CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
Create a new THnSparse within the container.
Container structure for EMCAL clusters.
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
Bool_t fPlotExotics
Set whether to plot exotic cluster study.
Container for jet within the EMCAL jet framework.
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="")
Create a new TH2 within the container.
Float_t fMaxPt
Histogram pt limit.
Study of EMCal vs. PHOS clusters.
AliEventCuts fEventCuts
event selection utility
void FillClusterTHnSparse(TString clustersName, Double_t eta, Double_t phi, Double_t Enonlin, Double_t Ehadcorr, Int_t hasMatchedTrack, Double_t M02, Int_t nCells, Int_t passDispersionCut, Double_t distNN, Int_t isOddEta, Int_t coneType=0, Double_t R=0., Double_t Econe=0.)
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal