AliPhysics  cbd2963 (cbd2963)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalDijetImbalance.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 <vector>
17 
18 #include <TClonesArray.h>
19 #include <TH1F.h>
20 #include <TH2F.h>
21 #include <TH3.h>
22 #include <TList.h>
23 #include <THnSparse.h>
24 #include <TRandom3.h>
25 #include <TGrid.h>
26 #include <TFile.h>
27 
28 #include <AliVCluster.h>
29 #include <AliVParticle.h>
30 #include <AliLog.h>
31 
32 #include "AliTLorentzVector.h"
33 #include "AliEmcalJet.h"
34 #include "AliRhoParameter.h"
35 #include "AliJetContainer.h"
36 #include "AliParticleContainer.h"
37 #include "AliClusterContainer.h"
38 #include "AliEMCALGeometry.h"
40 #include "AliPHOSGeometry.h"
41 #include "AliOADBContainer.h"
42 #include "AliEMCALTriggerPatchInfo.h"
43 
45 
49 
55  fHistManager(),
56  fEventCuts(0),
57  fEventCutList(0),
58  fUseManualEventCuts(kFALSE),
59  fUseAliEventCuts(kTRUE),
60  fDeltaPhiMin(0),
61  fMinTrigJetPt(0),
62  fMinAssJetPt(0),
63  fDijetLeadingHadronPt(0),
64  fMaxPt(200),
65  fNCentHistBins(0),
66  fCentHistBins(0),
67  fNPtHistBins(0),
68  fPtHistBins(0),
69  fPlotJetHistograms(kFALSE),
70  fPlotDijetCandHistograms(kFALSE),
71  fPlotDijetImbalanceHistograms(kFALSE),
72  fComputeBackground(kFALSE),
73  fDoMomentumBalance(kFALSE),
74  fDoGeometricalMatching(kFALSE),
75  fMatchingJetR(0.2),
76  fTrackConstituentThreshold(0),
77  fClusterConstituentThreshold(0),
78  fMBUpscaleFactor(1.),
79  fNEtaBins(40),
80  fNPhiBins(200),
81  fLoadBackgroundScalingWeights(kTRUE),
82  fBackgroundScalingWeights(0),
83  fGapJetScalingWeights(0),
84  fComputeMBDownscaling(kFALSE),
85  fDoCaloStudy(kFALSE),
86  fDoTriggerSimulation(kFALSE),
87  fMedianEMCal(0),
88  fMedianDCal(0),
89  fkEMCEJE(kFALSE),
90  fPlotNeutralJets(kFALSE),
91  fPlotClustersInJets(kFALSE),
92  fPHOSGeo(nullptr)
93 {
97 
98  // Configure base class to set fTriggerPatchInfo to array of trigger patches, each event
99  this->SetCaloTriggerPatchInfoName("EmcalTriggers");
100 }
101 
108  AliAnalysisTaskEmcalJet(name, kTRUE),
109  fHistManager(name),
110  fEventCuts(0),
111  fEventCutList(0),
112  fUseManualEventCuts(kFALSE),
113  fUseAliEventCuts(kTRUE),
114  fDeltaPhiMin(0),
115  fMinTrigJetPt(0),
116  fMinAssJetPt(0),
117  fDijetLeadingHadronPt(0),
118  fMaxPt(200),
119  fNCentHistBins(0),
120  fCentHistBins(0),
121  fNPtHistBins(0),
122  fPtHistBins(0),
123  fPlotJetHistograms(kFALSE),
124  fPlotDijetCandHistograms(kFALSE),
125  fPlotDijetImbalanceHistograms(kFALSE),
126  fComputeBackground(kFALSE),
127  fDoMomentumBalance(kFALSE),
128  fDoGeometricalMatching(kFALSE),
129  fMatchingJetR(0.2),
130  fTrackConstituentThreshold(0),
131  fClusterConstituentThreshold(0),
132  fMBUpscaleFactor(1.),
133  fNEtaBins(40),
134  fNPhiBins(200),
135  fLoadBackgroundScalingWeights(kTRUE),
136  fBackgroundScalingWeights(0),
137  fGapJetScalingWeights(0),
138  fComputeMBDownscaling(kFALSE),
139  fDoCaloStudy(kFALSE),
140  fDoTriggerSimulation(kFALSE),
141  fMedianEMCal(0),
142  fMedianDCal(0),
143  fkEMCEJE(kFALSE),
144  fPlotNeutralJets(kFALSE),
145  fPlotClustersInJets(kFALSE),
146  fPHOSGeo(nullptr)
147 {
149  Dijet_t fDijet;
151 
152  // Configure base class to set fTriggerPatchInfo to array of trigger patches, each event
153  this->SetCaloTriggerPatchInfoName("EmcalTriggers");
154 }
155 
160 {
161 }
162 
167 {
168  fNCentHistBins = 4;
170  fCentHistBins[0] = 0;
171  fCentHistBins[1] = 10;
172  fCentHistBins[2] = 30;
173  fCentHistBins[3] = 50;
174  fCentHistBins[4] = 90;
175 
176  fNPtHistBins = 82;
179  GenerateFixedBinArray(7, 0.3, 1, fPtHistBins+6);
180  GenerateFixedBinArray(10, 1, 3, fPtHistBins+13);
181  GenerateFixedBinArray(14, 3, 10, fPtHistBins+23);
182  GenerateFixedBinArray(10, 10, 20, fPtHistBins+37);
183  GenerateFixedBinArray(15, 20, 50, fPtHistBins+47);
184  GenerateFixedBinArray(20, 50, 150, fPtHistBins+62);
185 }
186 
192 {
194 
202 
203  TIter next(fHistManager.GetListOfHistograms());
204  TObject* obj = 0;
205  while ((obj = next())) {
206  fOutput->Add(obj);
207  }
208 
209  // Intialize AliEventCuts
210  if (fUseAliEventCuts) {
211  fEventCutList = new TList();
212  fEventCutList ->SetOwner();
213  fEventCutList ->SetName("EventCutOutput");
214 
215  fEventCuts.OverrideAutomaticTriggerSelection(fOffTrigger);
216  if(fUseManualEventCuts==1)
217  {
218  fEventCuts.SetManualMode();
219  // Configure manual settings here
220  // ...
221  }
222  fEventCuts.AddQAplotsToList(fEventCutList);
223  fOutput->Add(fEventCutList);
224  }
225 
226  // Load eta-phi background scale factors from histogram on AliEn
229  }
230 
231  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
232 }
233 
234 /*
235  * This function allocates the histograms for single jets.
236  * A set of histograms is allocated per each jet container.
237  */
239 {
240  TString histname;
241  TString title;
242 
243  Int_t nPtBins = TMath::CeilNint(fMaxPt/2);
244 
245  AliJetContainer* jets = 0;
246  TIter nextJetColl(&fJetCollArray);
247  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
248 
249  // Jet rejection reason
250  histname = TString::Format("%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
251  title = histname + ";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
252  TH2* hist = fHistManager.CreateTH2(histname.Data(), title.Data(), 32, 0, 32, 50, 0, fMaxPt);
253  SetRejectionReasonLabels(hist->GetXaxis());
254 
255  // Rho vs. Centrality
256  if (!jets->GetRhoName().IsNull()) {
257  histname = TString::Format("%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
258  title = histname + ";Centrality (%);#rho (GeV/#it{c});counts";
259  fHistManager.CreateTH2(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 500);
260  }
261 
262  // (Centrality, pT, calo type)
263  histname = TString::Format("%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
264  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
265  fHistManager.CreateTH3(histname.Data(), title.Data(), 20, 0, 100, nPtBins, 0, fMaxPt, 3, -0.5, 2.5);
266 
267  // (Centrality, eta, phi, pT, NEF, calo type)
268  histname = TString::Format("%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
269  title = histname + ";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
270  Int_t nbins1[6] = {20, fNEtaBins, fNPhiBins, nPtBins, 50, 3};
271  Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
272  Double_t max1[6] = {100, 0.5,6., fMaxPt, 1., 2.5};
273  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 6, nbins1, min1, max1);
274 
275  // (Centrality, pT upscaled, calo type)
276  histname = TString::Format("%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
277  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
278  fHistManager.CreateTH3(histname.Data(), title.Data(), 20, 0, 100, nPtBins, 0, fMaxPt, 3, -0.5, 2.5, "s");
279 
280  // pT-leading vs. pT
281  histname = TString::Format("%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
282  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
283  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, nPtBins, 0, fMaxPt);
284 
285  // A vs. pT
286  histname = TString::Format("%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
287  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
288  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, fMaxPt/3, 0, 0.5);
289 
290  // (Centrality, pT, z-leading (charged), calo type)
291  histname = TString::Format("%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
292  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
293  Int_t nbins2[4] = {20, nPtBins, 50, 3};
294  Double_t min2[4] = {0, 0, 0, -0.5};
295  Double_t max2[4] = {100, fMaxPt, 1., 2.5};
296  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins2, min2, max2);
297 
298  // (Centrality, pT, z (charged), calo type)
299  histname = TString::Format("%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
300  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
301  Int_t nbins3[4] = {20, nPtBins, 50, 3};
302  Double_t min3[4] = {0, 0, 0, -0.5};
303  Double_t max3[4] = {100, fMaxPt, 1., 2.5};
304  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins3, min3, max3);
305 
306  // (Centrality, pT, Nconst, calo type)
307  histname = TString::Format("%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
308  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
309  Int_t nbins4[4] = {20, nPtBins, 50, 3};
310  Double_t min4[4] = {0, 0, 0, -0.5};
311  Double_t max4[4] = {100, fMaxPt, fMaxPt, 2.5};
312  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins4, min4, max4);
313 
314  // (Median patch energy, calo type, jet pT, centrality)
315  if (fDoTriggerSimulation) {
316  histname = TString::Format("%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
317  title = histname + ";#it{E}_{patch,med};type;#it{p}_{T}^{corr} (GeV/#it{c});Centrality (%)";
318  Int_t nbins5[4] = {100, 2, nPtBins, 50};
319  Double_t min5[4] = {0,-0.5, 0, 0};
320  Double_t max5[4] = {50,1.5, fMaxPt, 100};
321  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins5, min5, max5);
322  }
323 
324  // Allocate background subtraction histograms, if enabled
325  if (fComputeBackground) {
326 
327  histname = TString::Format("%s/BackgroundHistograms/hScaleFactorEMCal", jets->GetArrayName().Data());
328  title = histname + ";Centrality;Scale factor;counts";
329  fHistManager.CreateTH2(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 5);
330 
331  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtEMCal", jets->GetArrayName().Data());
332  title = histname + ";Centrality (%);#delta#it{p}_{T} (GeV/#it{c});counts";
333  fHistManager.CreateTH2(histname.Data(), title.Data(), 10, 0, 100, 400, -50, 150);
334 
335  histname = TString::Format("%s/BackgroundHistograms/hScaleFactorEtaPhi", jets->GetArrayName().Data());
336  title = histname + ";#eta;#phi;Centrality;Scale factor;";
337  Int_t nbins[4] = {fNEtaBins, fNPhiBins, 50, 400};
338  Double_t min[4] = {-0.5,1., 0, 0};
339  Double_t max[4] = {0.5,6., 100, 20};
340  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins, min, max);
341 
342  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtEtaPhi", jets->GetArrayName().Data());
343  title = histname + ";#eta;#phi;Centrality;#delta#it{p}_{T} (GeV/#it{c})";
344  Int_t nbinsDpT[4] = {fNEtaBins, fNPhiBins, 10, 400};
345  Double_t minDpT[4] = {-0.5,1., 0, -50};
346  Double_t maxDpT[4] = {0.5,6., 100, 150};
347  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbinsDpT, minDpT, maxDpT);
348 
349  }
350 
351  }
352 
353  // MB downscale factor histogram
354  if (fComputeMBDownscaling) {
355  histname = "Trigger/hMBDownscaleFactor";
356  title = histname + ";Downscale factor;counts";
357  TH1* hist = fHistManager.CreateTH1(histname.Data(), title.Data(), 200, 0, 200);
358  }
359 
360 }
361 
362 /*
363  * This function allocates the histograms for dijet candidates, i.e. dijet pairs with the leading jet
364  * passing the trigger condition, but no condition on the subleading jet. In particular this histogram is
365  * designed to study the kinematic selection of dijets.
366  */
368 {
369  // Allocate dijet THnSparse
370  AliJetContainer* jets = 0;
371  TIter nextJetColl(&fJetCollArray);
372  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
373  TString axisTitle[30]= {""};
374  Int_t nbins[30] = {0};
375  Double_t min[30] = {0.};
376  Double_t max[30] = {0.};
377  Double_t *binEdges[20] = {0};
378  Int_t dim = 0;
379 
380  if (fForceBeamType != kpp) {
381  axisTitle[dim] = "Centrality (%)";
382  nbins[dim] = fNCentHistBins;
383  binEdges[dim] = fCentHistBins;
384  min[dim] = fCentHistBins[0];
385  max[dim] = fCentHistBins[fNCentHistBins];
386  dim++;
387  }
388 
389  axisTitle[dim] = "LeadingHadronRequired";
390  nbins[dim] = 2;
391  min[dim] = -0.5;
392  max[dim] = 1.5;
393  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
394  dim++;
395 
396  axisTitle[dim] = "#it{p}_{T,trig jet} (GeV/#it{c})";
397  nbins[dim] = TMath::CeilNint(fMaxPt/2);
398  min[dim] = 0;
399  max[dim] = fMaxPt;
400  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
401  dim++;
402 
403  axisTitle[dim] = "#it{p}_{T,ass jet} (GeV/#it{c})";
404  nbins[dim] = TMath::CeilNint(fMaxPt/2);
405  min[dim] = 0;
406  max[dim] = fMaxPt;
407  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
408  dim++;
409 
410  axisTitle[dim] = "#phi_{trig jet}";
411  nbins[dim] = TMath::CeilNint(fMaxPt/2);
412  min[dim] = 0;
413  max[dim] = TMath::TwoPi();
414  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
415  dim++;
416 
417  axisTitle[dim] = "#phi_{ass jet}";
418  nbins[dim] = TMath::CeilNint(fMaxPt/2);
419  min[dim] = 0;
420  max[dim] = TMath::TwoPi();
421  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
422  dim++;
423 
424  axisTitle[dim] = "#eta_{trig jet}";
425  nbins[dim] = TMath::CeilNint(fMaxPt/2);
426  min[dim] = -1;
427  max[dim] = 1;
428  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
429  dim++;
430 
431  axisTitle[dim] = "#eta_{ass jet}";
432  nbins[dim] = TMath::CeilNint(fMaxPt/2);
433  min[dim] = -1;
434  max[dim] = 1;
435  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
436  dim++;
437 
438  TString thnname = TString::Format("%s/DijetCandObservables", jets->GetArrayName().Data());
439  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
440  for (Int_t i = 0; i < dim; i++) {
441  hn->GetAxis(i)->SetTitle(axisTitle[i]);
442  hn->SetBinEdges(i, binEdges[i]);
443  }
444  }
445 }
446 
447 /*
448  * This function allocates the histograms for accepted dijets.
449  * The purpose is to study in detail the imbalance properties of the accepted dijets.
450  */
452 {
453  AliJetContainer* jets = 0;
454  TIter nextJetColl(&fJetCollArray);
455  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
456 
457  // Allocate dijet imbalance THnSparse, unless doing trigger simulation
458  if (!fDoTriggerSimulation) {
459  TString axisTitle[30]= {""};
460  Int_t nbins[30] = {0};
461  Double_t min[30] = {0.};
462  Double_t max[30] = {0.};
463  Double_t *binEdges[20] = {0};
464  Int_t dim = 0;
465 
466  if (fForceBeamType != kpp) {
467  axisTitle[dim] = "Centrality (%)";
468  nbins[dim] = fNCentHistBins;
469  binEdges[dim] = fCentHistBins;
470  min[dim] = fCentHistBins[0];
471  max[dim] = fCentHistBins[fNCentHistBins];
472  dim++;
473  }
474 
475  axisTitle[dim] = "#Delta#phi";
476  nbins[dim] = 100;
477  min[dim] = 0;
478  max[dim] = 4;
479  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
480  dim++;
481 
482  axisTitle[dim] = "#Delta#eta";
483  nbins[dim] = 100;
484  min[dim] = -2;
485  max[dim] = 2;
486  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
487  dim++;
488 
489  axisTitle[dim] = "A_{J}";
490  nbins[dim] = 100;
491  min[dim] = 0;
492  max[dim] = 1;
493  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
494  dim++;
495 
496  axisTitle[dim] = "x_{J}";
497  nbins[dim] = 100;
498  min[dim] = 0;
499  max[dim] = 1;
500  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
501  dim++;
502 
503  axisTitle[dim] = "k_{Ty} (GeV)";
504  nbins[dim] = 100;
505  min[dim] = 0;
506  max[dim] = 100;
507  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
508  dim++;
509 
510  axisTitle[dim] = "N_{tracks, trig jet}";
511  nbins[dim] = fMaxPt/5;
512  min[dim] = 0;
513  max[dim] = 100;
514  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
515  dim++;
516 
517  axisTitle[dim] = "N_{tracks, ass jet}";
518  nbins[dim] = fMaxPt/5;
519  min[dim] = 0;
520  max[dim] = 100;
521  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
522  dim++;
523 
524  TString thnname = TString::Format("%s/DijetImbalanceObservables", jets->GetArrayName().Data());
525  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
526  for (Int_t i = 0; i < dim; i++) {
527  hn->GetAxis(i)->SetTitle(axisTitle[i]);
528  hn->SetBinEdges(i, binEdges[i]);
529  }
530  }
531 
532  // Now, allocate 2d pt spectrum, upscaled according to MB downscaling factors (for trigger efficiency)
533  Int_t nPtBins = TMath::CeilNint(fMaxPt/2);
534 
535  // (Centrality, pT1, pT2) (upscaled)
536  TString histname = TString::Format("%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
537  TString title = histname + ";Centrality (%);#it{p}_{T,1}^{corr} (GeV/#it{c});#it{p}_{T,2}^{corr} (GeV/#it{c})";
538  fHistManager.CreateTH3(histname.Data(), title.Data(), 20, 0, 100, nPtBins, 0, fMaxPt, nPtBins, 0, fMaxPt, "s");
539 
540  // Now, plot jet histograms for the leading jet within the dijet (for comparison to single jets, and triggered to MB)
541 
542  // (Centrality, pT, NEF, calo type)
543  histname = TString::Format("%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
544  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
545  Int_t nbins1[4] = {20, nPtBins, 50, 3};
546  Double_t min1[4] = {0, 0, 0, -0.5};
547  Double_t max1[4] = {100, fMaxPt, 1., 2.5};
548  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins1, min1, max1);
549 
550  // (Centrality, pT, z-leading (charged), calo type)
551  histname = TString::Format("%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
552  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
553  Int_t nbins2[4] = {20, nPtBins, 50, 3};
554  Double_t min2[4] = {0, 0, 0, -0.5};
555  Double_t max2[4] = {100, fMaxPt, 1., 2.5};
556  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins2, min2, max2);
557 
558  // (Centrality, pT, z (charged), calo type)
559  histname = TString::Format("%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
560  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
561  Int_t nbins3[4] = {20, nPtBins, 50, 3};
562  Double_t min3[4] = {0, 0, 0, -0.5};
563  Double_t max3[4] = {100, fMaxPt, 1., 2.5};
564  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins3, min3, max3);
565 
566  // (Centrality, pT, Nconst, calo type)
567  histname = TString::Format("%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
568  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
569  Int_t nbins4[4] = {20, nPtBins, 50, 3};
570  Double_t min4[4] = {0, 0, 0, -0.5};
571  Double_t max4[4] = {100, fMaxPt, fMaxPt, 2.5};
572  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins4, min4, max4);
573  }
574 }
575 
576 /*
577  * This function allocates the histograms for the momentum balance study.
578  */
580 {
581  AliJetContainer* jets = 0;
582  TIter nextJetColl(&fJetCollArray);
583  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
584 
585  // Allocate THnSparse
586  TString axisTitle[30]= {""};
587  Int_t nbins[30] = {0};
588  Double_t min[30] = {0.};
589  Double_t max[30] = {0.};
590  Double_t *binEdges[20] = {0};
591  Int_t dim = 0;
592 
593  axisTitle[dim] = "A_{J}";
594  nbins[dim] = 100;
595  min[dim] = 0;
596  max[dim] = 1;
597  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
598  dim++;
599 
600  axisTitle[dim] = "#Delta#phi";
601  nbins[dim] = 100;
602  min[dim] = -4;
603  max[dim] = 4;
604  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
605  dim++;
606 
607  axisTitle[dim] = "#it{p}_{T,particle} (GeV/#it{c})";
608  nbins[dim] = 9;
609  Double_t* pTParticleBins = new Double_t[nbins[dim]+1];
610  GenerateFixedBinArray(1, 0.15, 0.3, pTParticleBins);
611  GenerateFixedBinArray(1, 0.3, 0.5, pTParticleBins+1);
612  GenerateFixedBinArray(1, 0.5, 1, pTParticleBins+2);
613  GenerateFixedBinArray(2, 1, 5, pTParticleBins+3);
614  GenerateFixedBinArray(3, 5, 20, pTParticleBins+5);
615  GenerateFixedBinArray(1, 20, 150, pTParticleBins+8);
616  min[dim] = 0;
617  max[dim] = pTParticleBins[nbins[dim]];
618  binEdges[dim] = pTParticleBins;
619  dim++;
620 
621  axisTitle[dim] = "#it{p}_{T}#parallel (GeV/#it{c})";
622  nbins[dim] = 80;
623  Double_t* pTParallelBins = new Double_t[nbins[dim]+1];
624  GenerateFixedBinArray(20, 0, 2, pTParallelBins);
625  GenerateFixedBinArray(16, 2, 10, pTParallelBins+20);
626  GenerateFixedBinArray(10, 10, 20, pTParallelBins+36);
627  GenerateFixedBinArray(10, 20, 40, pTParallelBins+46);
628  GenerateFixedBinArray(24, 40, 150, pTParallelBins+56);
629  min[dim] = 0;
630  max[dim] = pTParallelBins[nbins[dim]];
631  binEdges[dim] = pTParallelBins;
632  dim++;
633 
634  TString thnname = TString::Format("%s/MomentumBalance", jets->GetArrayName().Data());
635  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
636  for (Int_t i = 0; i < dim; i++) {
637  hn->GetAxis(i)->SetTitle(axisTitle[i]);
638  hn->SetBinEdges(i, binEdges[i]);
639  }
640  }
641 }
642 
643 /*
644  * This function allocates the histograms for the constituent dijet study.
645  */
647 {
648  // Allocate geometrical matching THnSparse
649  TString axisTitle[30]= {""};
650  Int_t nbins[30] = {0};
651  Double_t min[30] = {0.};
652  Double_t max[30] = {0.};
653  Double_t *binEdges[20] = {0};
654  Int_t dim = 0;
655 
656  if (fForceBeamType != kpp) {
657  axisTitle[dim] = "Centrality (%)";
658  nbins[dim] = fNCentHistBins;
659  binEdges[dim] = fCentHistBins;
660  min[dim] = fCentHistBins[0];
661  max[dim] = fCentHistBins[fNCentHistBins];
662  dim++;
663  }
664 
665  axisTitle[dim] = "isSwitched";
666  nbins[dim] = 2;
667  min[dim] = -0.5;
668  max[dim] = 1.5;
669  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
670  dim++;
671 
672  axisTitle[dim] = "#DeltaR_{trig}";
673  nbins[dim] = 50;
674  min[dim] = 0;
675  max[dim] = 0.5;
676  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
677  dim++;
678 
679  axisTitle[dim] = "#DeltaR_{ass}";
680  nbins[dim] = 50;
681  min[dim] = 0;
682  max[dim] = 0.5;
683  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
684  dim++;
685 
686  axisTitle[dim] = "trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
687  nbins[dim] = 100;
688  min[dim] = -50;
689  max[dim] = 50;
690  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
691  dim++;
692 
693  axisTitle[dim] = "ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
694  nbins[dim] = 100;
695  min[dim] = -50;
696  max[dim] = 50;
697  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
698  dim++;
699 
700  axisTitle[dim] = "A_{J} low-threshold";
701  nbins[dim] = 100;
702  min[dim] = 0;
703  max[dim] = 1;
704  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
705  dim++;
706 
707  axisTitle[dim] = "A_{J} hard-core";
708  nbins[dim] = 100;
709  min[dim] = 0;
710  max[dim] = 1;
711  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
712  dim++;
713 
714  TString thnname = "GeometricalMatching";
715  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
716  for (Int_t i = 0; i < dim; i++) {
717  hn->GetAxis(i)->SetTitle(axisTitle[i]);
718  hn->SetBinEdges(i, binEdges[i]);
719  }
720 
721  // Allocate other histograms
722  TString histname;
723  TString title;
724  histname = "GeometricalMatchingEfficiency";
725  title = histname + ";isMatched;counts";
726  TH1* hist = fHistManager.CreateTH1(histname.Data(), title.Data(), 2, -0.5, 1.5);
727 }
728 
729 /*
730  * This function allocates the histograms for the calorimeter performance study.
731  */
733 {
734  TString histname;
735  TString htitle;
736  Int_t nPtBins = TMath::CeilNint(fMaxPt/2);
737 
738  Double_t* clusType = new Double_t[3+1];
739  GenerateFixedBinArray(3, -0.5, 2.5, clusType);
740  const Int_t nRejBins = 32;
741  Double_t* rejReasonBins = new Double_t[nRejBins+1];
742  GenerateFixedBinArray(nRejBins, 0, nRejBins, rejReasonBins);
743 
744  AliEmcalContainer* cont = 0;
745  TIter nextClusColl(&fClusterCollArray);
746  while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
747 
748  // rejection reason plot, to make efficiency correction
749  histname = TString::Format("%s/hClusterRejectionReasonEMCal", cont->GetArrayName().Data());
750  htitle = histname + ";Rejection reason;#it{E}_{clus} (GeV/)";
751  TH2* hist = fHistManager.CreateTH2(histname.Data(), htitle.Data(), nRejBins, rejReasonBins, fNPtHistBins, fPtHistBins);
752  SetRejectionReasonLabels(hist->GetXaxis());
753 
754  histname = TString::Format("%s/hClusterRejectionReasonPHOS", cont->GetArrayName().Data());
755  htitle = histname + ";Rejection reason;#it{E}_{clus} (GeV/)";
756  TH2* histPhos = fHistManager.CreateTH2(histname.Data(), htitle.Data(), nRejBins, rejReasonBins, fNPtHistBins, fPtHistBins);
757  SetRejectionReasonLabels(histPhos->GetXaxis());
758 
759  // plot by SM
760  const Int_t nEmcalSM = 20;
761  for (Int_t sm = 0; sm < nEmcalSM; sm++) {
762  histname = TString::Format("%s/BySM/hEmcalClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
763  htitle = histname + ";#it{E}_{cluster} (GeV);counts";
764  fHistManager.CreateTH1(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins);
765  }
766 
767  for (Int_t sm = 1; sm < 5; sm++) {
768  histname = TString::Format("%s/BySM/hPhosClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
769  htitle = histname + ";#it{E}_{cluster} (GeV);counts";
770  fHistManager.CreateTH1(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins);
771  }
772 
773  // Plot cluster THnSparse (centrality, cluster type, E, E-hadcorr, has matched track, M02, Ncells)
774  Int_t dim = 0;
775  TString title[20];
776  Int_t nbins[20] = {0};
777  Double_t min[30] = {0.};
778  Double_t max[30] = {0.};
779  Double_t *binEdges[20] = {0};
780 
782  title[dim] = "Centrality %";
783  nbins[dim] = fNCentHistBins;
784  binEdges[dim] = fCentHistBins;
785  min[dim] = fCentHistBins[0];
786  max[dim] = fCentHistBins[fNCentHistBins];
787  dim++;
788  }
789 
790  title[dim] = "#eta";
791  nbins[dim] = 28;
792  min[dim] = -0.7;
793  max[dim] = 0.7;
794  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
795  dim++;
796 
797  title[dim] = "#phi";
798  nbins[dim] = 100;
799  min[dim] = 1.;
800  max[dim] = 6.;
801  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
802  dim++;
803 
804  title[dim] = "#it{E}_{clus} (GeV)";
805  nbins[dim] = fNPtHistBins;
806  binEdges[dim] = fPtHistBins;
807  min[dim] = fPtHistBins[0];
808  max[dim] = fPtHistBins[fNPtHistBins];
809  dim++;
810 
811  title[dim] = "#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)";
812  nbins[dim] = fNPtHistBins;
813  binEdges[dim] = fPtHistBins;
814  min[dim] = fPtHistBins[0];
815  max[dim] = fPtHistBins[fNPtHistBins];
816  dim++;
817 
818  title[dim] = "Matched track";
819  nbins[dim] = 2;
820  min[dim] = -0.5;
821  max[dim] = 1.5;
822  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
823  dim++;
824 
825  title[dim] = "M02";
826  nbins[dim] = 100;
827  min[dim] = 0;
828  max[dim] = 10;
829  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
830  dim++;
831 
832  title[dim] = "Ncells";
833  nbins[dim] = 40;
834  min[dim] = -0.5;
835  max[dim] = 49.5;
836  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
837  dim++;
838 
839  title[dim] = "Dispersion cut";
840  nbins[dim] = 2;
841  min[dim] = -0.5;
842  max[dim] = 1.5;
843  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
844  dim++;
845 
846  TString thnname = TString::Format("%s/clusterObservables", cont->GetArrayName().Data());
847  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
848  for (Int_t i = 0; i < dim; i++) {
849  hn->GetAxis(i)->SetTitle(title[i]);
850  hn->SetBinEdges(i, binEdges[i]);
851  }
852  }
853 
854  AliJetContainer* jets = 0;
855  TIter nextJetColl(&fJetCollArray);
856  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
857 
858  // plot neutral jets
859  if (fPlotNeutralJets) {
860  TString axisTitle[30]= {""};
861  Int_t nbinsJet[30] = {0};
862  Double_t minJet[30] = {0.};
863  Double_t maxJet[30] = {0.};
864  Double_t *binEdgesJet[20] = {0};
865  Int_t dimJet = 0;
866 
867  if (fForceBeamType != kpp) {
868  axisTitle[dimJet] = "Centrality (%)";
869  nbinsJet[dimJet] = fNCentHistBins;
870  binEdgesJet[dimJet] = fCentHistBins;
871  minJet[dimJet] = fCentHistBins[0];
872  maxJet[dimJet] = fCentHistBins[fNCentHistBins];
873  dimJet++;
874  }
875 
876  axisTitle[dimJet] = "#eta_{jet}";
877  nbinsJet[dimJet] = 28;
878  minJet[dimJet] = -0.7;
879  maxJet[dimJet] = 0.7;
880  binEdgesJet[dimJet] = GenerateFixedBinArray(nbinsJet[dimJet], minJet[dimJet], maxJet[dimJet]);
881  dimJet++;
882 
883  axisTitle[dimJet] = "#phi_{jet} (rad)";
884  nbinsJet[dimJet] = 100;
885  minJet[dimJet] = 1.;
886  maxJet[dimJet] = 6.;
887  binEdgesJet[dimJet] = GenerateFixedBinArray(nbinsJet[dimJet], minJet[dimJet], maxJet[dimJet]);
888  dimJet++;
889 
890  axisTitle[dimJet] = "#it{E}_{T} (GeV)";
891  nbinsJet[dimJet] = fNPtHistBins;
892  binEdgesJet[dimJet] = fPtHistBins;
893  minJet[dimJet] = fPtHistBins[0];
894  maxJet[dimJet] = fPtHistBins[fNPtHistBins];
895  dimJet++;
896 
897  axisTitle[dimJet] = "#rho (GeV/#it{c})";
898  nbinsJet[dimJet] = 100;
899  minJet[dimJet] = 0.;
900  maxJet[dimJet] = 1000.;
901  binEdgesJet[dimJet] = GenerateFixedBinArray(nbinsJet[dimJet], minJet[dimJet], maxJet[dimJet]);
902  dimJet++;
903 
904  axisTitle[dimJet] = "N_{clusters}";
905  nbinsJet[dimJet] = 20;
906  minJet[dimJet] = -0.5;
907  maxJet[dimJet] = 19.5;
908  binEdgesJet[dimJet] = GenerateFixedBinArray(nbinsJet[dimJet], minJet[dimJet], maxJet[dimJet]);
909  dimJet++;
910 
911  TString thnname = TString::Format("%s/hClusterJetObservables", jets->GetArrayName().Data());
912  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dimJet, nbinsJet, minJet, maxJet);
913  for (Int_t i = 0; i < dimJet; i++) {
914  hn->GetAxis(i)->SetTitle(axisTitle[i]);
915  hn->SetBinEdges(i, binEdgesJet[i]);
916  }
917  }
918 
919  // Plot cluster spectra within jets
920  // (centrality, cluster energy, jet pT, jet eta, jet phi)
921  if (fPlotClustersInJets) {
922  Int_t dim = 0;
923  TString title[20];
924  Int_t nbins[20] = {0};
925  Double_t min[30] = {0.};
926  Double_t max[30] = {0.};
927  Double_t *binEdges[20] = {0};
928 
930  title[dim] = "Centrality %";
931  nbins[dim] = fNCentHistBins;
932  binEdges[dim] = fCentHistBins;
933  min[dim] = fCentHistBins[0];
934  max[dim] = fCentHistBins[fNCentHistBins];
935  dim++;
936  }
937 
938  title[dim] = "#it{E}_{clus} (GeV)";
939  nbins[dim] = fNPtHistBins;
940  binEdges[dim] = fPtHistBins;
941  min[dim] = fPtHistBins[0];
942  max[dim] = fPtHistBins[fNPtHistBins];
943  dim++;
944 
945  title[dim] = "#it{p}_{T,jet}^{corr}";
946  nbins[dim] = nPtBins;
947  min[dim] = 0;
948  max[dim] = fMaxPt;
949  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
950  dim++;
951 
952  title[dim] = "#eta_{jet}";
953  nbins[dim] = fNEtaBins;
954  min[dim] = -0.5;
955  max[dim] = 0.5;
956  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
957  dim++;
958 
959  title[dim] = "#phi_{jet}";
960  nbins[dim] = fNPhiBins;
961  min[dim] = 1.;
962  max[dim] = 6.;
963  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
964  dim++;
965 
966  TString thnname = TString::Format("%s/hClustersInJets", jets->GetArrayName().Data());
967  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
968  for (Int_t i = 0; i < dim; i++) {
969  hn->GetAxis(i)->SetTitle(title[i]);
970  hn->SetBinEdges(i, binEdges[i]);
971  }
972  }
973 
974  }
975 
976  // Plot cell histograms
977 
978  // centrality vs. cell energy vs. cell type (for all cells)
979  histname = TString::Format("Cells/hCellEnergyAll");
980  htitle = histname + ";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
981  fHistManager.CreateTH3(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins, fNCentHistBins, fCentHistBins, 3, clusType);
982 
983  // centrality vs. cell energy vs. cell type (for cells in accepted clusters)
984  histname = TString::Format("Cells/hCellEnergyAccepted");
985  htitle = histname + ";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
986  fHistManager.CreateTH3(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins, fNCentHistBins, fCentHistBins, 3, clusType);
987 
988  // centrality vs. cell energy vs. cell type (for leading cells in accepted clusters)
989  histname = TString::Format("Cells/hCellEnergyLeading");
990  htitle = histname + ";#it{E}_{cell} (GeV);Centrality (%); Cluster type";
991  fHistManager.CreateTH3(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins, fNCentHistBins, fCentHistBins, 3, clusType);
992 
993  // plot cell patches by SM
994  const Int_t nEmcalSM = 20;
995  for (Int_t sm = 0; sm < nEmcalSM; sm++) {
996  histname = TString::Format("Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
997  htitle = histname + ";#it{E}_{cell patch} (GeV);Centrality (%)";
998  fHistManager.CreateTH2(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins, fNCentHistBins, fCentHistBins);
999  }
1000 
1001  for (Int_t sm = 1; sm < 5; sm++) {
1002  histname = TString::Format("Cells/BySM/hPhosPatchEnergy_SM%d", sm);
1003  htitle = histname + ";#it{E}_{cell patch} (GeV);Centrality (%)";
1004  fHistManager.CreateTH2(histname.Data(), htitle.Data(), fNPtHistBins, fPtHistBins, fNCentHistBins, fCentHistBins);
1005  }
1006 
1007 }
1008 
1009 /*
1010  * This function allocates the histograms for single jets, when the "simulated" trigger has been fired.
1011  * A set of histograms is allocated per each jet container.
1012  */
1014 {
1015  TString histname;
1016  TString title;
1017  Int_t nPtBins = TMath::CeilNint(fMaxPt/2);
1018 
1019  //----------------------------------------------
1020  // Trigger patch histograms
1021 
1022  // patch eta vs. phi
1023  histname = "TriggerSimHistograms/hEtaVsPhi";
1024  title = histname + ";#eta_{patch} (rad);#phi_{patch} (rad)";
1025  fHistManager.CreateTH2(histname.Data(), title.Data(), 140, -0.7, 0.7, 500, 1., 6.);
1026 
1027  // N patches
1028  histname = "TriggerSimHistograms/hNPatches";
1029  title = histname + ";#it{N}_{patches};type";
1030  fHistManager.CreateTH2(histname.Data(), title.Data(), 200, 0, 200, 2, -0.5, 1.5);
1031 
1032  // patch E vs. centrality
1033  histname = "TriggerSimHistograms/hPatchE";
1034  title = histname + ";Centrality (%);#it{E}_{patch} (GeV)";
1035  fHistManager.CreateTH2(histname.Data(), title.Data(), 50, 0, 100, nPtBins, 0, fMaxPt);
1036 
1037  // patch median vs. Centrality
1038  histname = "TriggerSimHistograms/hPatchMedianE";
1039  title = histname + ";Centrality (%);#it{E}_{patch,med} (GeV);type";
1040  fHistManager.CreateTH3(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 50, 2, -0.5, 1.5);
1041 
1042  // Median patch energy vs. centrality, for dijets
1043  histname = "TriggerSimHistograms/hMedPatchDijet";
1044  title = histname + ";Centrality (%);#it{E}_{patch,med} (GeV);type";
1045  fHistManager.CreateTH3(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 50, 2, -0.5, 1.5);
1046 
1047  //----------------------------------------------
1048  // Jet histograms for "triggered" events
1049  AliJetContainer* jets = 0;
1050  TIter nextJetColl(&fJetCollArray);
1051  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1052 
1053  // Jet rejection reason
1054  histname = TString::Format("%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1055  title = histname + ";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
1056  TH2* hist = fHistManager.CreateTH2(histname.Data(), title.Data(), 32, 0, 32, 50, 0, fMaxPt);
1057  SetRejectionReasonLabels(hist->GetXaxis());
1058 
1059  // Rho vs. Centrality
1060  if (!jets->GetRhoName().IsNull()) {
1061  histname = TString::Format("%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
1062  title = histname + ";Centrality (%);#rho (GeV/#it{c});counts";
1063  fHistManager.CreateTH2(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 500);
1064  }
1065 
1066  // (Centrality, pT, calo type)
1067  histname = TString::Format("%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
1068  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
1069  fHistManager.CreateTH3(histname.Data(), title.Data(), 20, 0, 100, nPtBins, 0, fMaxPt, 3, -0.5, 2.5);
1070 
1071  // (Centrality, eta, phi, pT, NEF, calo type)
1072  histname = TString::Format("%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
1073  title = histname + ";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
1074  Int_t nbins1[6] = {20, fNEtaBins, fNPhiBins, nPtBins, 50, 3};
1075  Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
1076  Double_t max1[6] = {100, 0.5,6., fMaxPt, 1., 2.5};
1077  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 6, nbins1, min1, max1);
1078 
1079  // pT-leading vs. pT
1080  histname = TString::Format("%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1081  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
1082  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, nPtBins, 0, fMaxPt);
1083 
1084  // A vs. pT
1085  histname = TString::Format("%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
1086  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
1087  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, fMaxPt/3, 0, 0.5);
1088 
1089  // (Centrality, pT, z-leading (charged), calo type)
1090  histname = TString::Format("%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1091  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
1092  Int_t nbins2[4] = {20, nPtBins, 50, 3};
1093  Double_t min2[4] = {0, 0, 0, -0.5};
1094  Double_t max2[4] = {100, fMaxPt, 1., 2.5};
1095  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins2, min2, max2);
1096 
1097  // z (charged) vs. pT
1098  histname = TString::Format("%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
1099  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
1100  Int_t nbins3[4] = {20, nPtBins, 50, 3};
1101  Double_t min3[4] = {0, 0, 0, -0.5};
1102  Double_t max3[4] = {100, fMaxPt, 1., 2.5};
1103  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins3, min3, max3);
1104 
1105  // (Centrality, pT, Nconst, calo type)
1106  histname = TString::Format("%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
1107  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
1108  Int_t nbins4[4] = {20, nPtBins, 50, 3};
1109  Double_t min4[4] = {0, 0, 0, -0.5};
1110  Double_t max4[4] = {100, fMaxPt, fMaxPt, 2.5};
1111  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins4, min4, max4);
1112 
1113  }
1114 
1115 }
1116 
1121 {
1122 
1123  TString fname(path);
1124  if (fname.BeginsWith("alien://")) {
1125  TGrid::Connect("alien://");
1126  }
1127 
1128  TFile* file = TFile::Open(path);
1129 
1130  if (!file || file->IsZombie()) {
1131  ::Error("AliAnalysisTaskEmcalDijetImbalance", "Could not open background scaling histogram");
1132  return;
1133  }
1134 
1135  TH1D* h = dynamic_cast<TH1D*>(file->Get(name));
1136 
1137  if (h) {
1138  ::Info("AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram", "Background histogram %s loaded from file %s.", name, path);
1139  }
1140  else {
1141  ::Error("AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram", "Background histogram %s not found in file %s.", name, path);
1142  return;
1143  }
1144 
1145  fBackgroundScalingWeights = static_cast<TH1D*>(h->Clone());
1146 
1147  file->Close();
1148  delete file;
1149 
1150 }
1151 
1157 {
1158 
1160 
1161  fNeedEmcalGeom = kTRUE;
1162 
1163  // Check if trigger patches are loaded
1164  if (fTriggerPatchInfo) {
1165  TString objname(fTriggerPatchInfo->GetClass()->GetName());
1166  TClass cls(objname);
1167  if (!cls.InheritsFrom("AliEMCALTriggerPatchInfo")) {
1168  AliError(Form("%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1169  GetName(), cls.GetName(), "EmcalTriggers"));
1170  fTriggerPatchInfo = 0;
1171  }
1172  }
1173  if (!fTriggerPatchInfo) {
1174  AliError(Form("%s: Unable to get trigger patch container with name %s. Aborting", GetName(), "EmcalTriggers"));
1175  return;
1176  }
1177 
1178  // Load the PHOS geometry
1179  if (fDoCaloStudy) {
1180  fPHOSGeo = AliPHOSGeometry::GetInstance();
1181  if (fPHOSGeo) {
1182  AliInfo("Found instance of PHOS geometry!");
1183  }
1184  else {
1185  AliInfo("Creating PHOS geometry!");
1186  Int_t runNum = InputEvent()->GetRunNumber();
1187  if(runNum<209122) //Run1
1188  fPHOSGeo = AliPHOSGeometry::GetInstance("IHEP");
1189  else
1190  fPHOSGeo = AliPHOSGeometry::GetInstance("Run2");
1191 
1192  if (fPHOSGeo) {
1193  AliOADBContainer geomContainer("phosGeo");
1194  geomContainer.InitFromFile("$ALICE_PHYSICS/OADB/PHOS/PHOSMCGeometry.root","PHOSMCRotationMatrixes");
1195  TObjArray* matrixes = (TObjArray*)geomContainer.GetObject(runNum,"PHOSRotationMatrixes");
1196  for(Int_t mod=0; mod<6; mod++) {
1197  if(!matrixes->At(mod)) continue;
1198  fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod);
1199  printf(".........Adding Matrix(%d), geo=%p\n",mod,fPHOSGeo);
1200  ((TGeoHMatrix*)matrixes->At(mod))->Print();
1201  }
1202  }
1203  }
1204  }
1205 
1206  AliInfo(Form("Trigger jet threshold = %f, Associated jet threshold = %f", fMinTrigJetPt, fMinAssJetPt));
1207  AliInfo(Form("Leading hadron threshold (for dijet leading jet): %f GeV", fDijetLeadingHadronPt));
1208  AliInfo(Form("Momentum balance study: %d", fDoMomentumBalance));
1209  AliInfo(Form("Geometrical matching study: %d", fDoGeometricalMatching));
1210 
1211 }
1212 
1217 
1218  // Get the downscaling factors for MB triggers (to be used to calculate trigger efficiency)
1219 
1221 
1222  // Get instance of the downscale factor helper class
1224  downscaleOCDB->SetRun(InputEvent()->GetRunNumber());
1225 
1226  // There are two possible min bias triggers for LHC15o
1227  TString triggerNameMB1 = "CINT7-B-NOPF-CENT";
1228  TString triggerNameMB2 = "CV0L7-B-NOPF-CENT";
1229  TString triggerNameJE = "CINT7EJ1-B-NOPF-CENTNOPMD";
1230 
1231  // Get the downscale factor for whichever MB trigger exists in the given run
1232  std::vector<TString> runtriggers = downscaleOCDB->GetTriggerClasses();
1233  Double_t downscalefactor;
1234  for (auto i : runtriggers) {
1235  if (i.EqualTo(triggerNameMB1) || i.EqualTo(triggerNameMB2)) {
1236  downscalefactor = downscaleOCDB->GetDownscaleFactorForTriggerClass(i.Data());
1237  break;
1238  }
1239  }
1240 
1241  // Store the inverse of the downscale factor, used later to weight the pT spectrum
1242  fMBUpscaleFactor = 1/downscalefactor;
1243 
1244  TString histname = "Trigger/hMBDownscaleFactor";
1245  fHistManager.FillTH1(histname.Data(), fMBUpscaleFactor);
1246 
1247  }
1248 
1249 }
1250 
1255 {
1256  if (fUseAliEventCuts) {
1257  if (!fEventCuts.AcceptEvent(InputEvent()))
1258  {
1259  PostData(1, fOutput);
1260  return kFALSE;
1261  }
1262  }
1263  else {
1265  }
1266  return kTRUE;
1267 }
1268 
1277 {
1278  TString histname;
1279  AliJetContainer* jetCont = 0;
1280  TIter next(&fJetCollArray);
1281  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
1282  TString jetContName = jetCont->GetName();
1283  if (jetContName.Contains("HardCore")) continue;
1284 
1285  //-----------------------------------------------------------------------------
1286  // Find the leading di-jet candidate in each event, and if it satisfies the
1287  // trig jet pT threshold, then fill di-jet candidate histogram (regardless of ass jet).
1288  // The idea is to study the kinematic selections in post-processing.
1289 
1290  // Loop over leading hadron cut or not
1291  for (Int_t leadingHadronCutType=0; leadingHadronCutType<2; leadingHadronCutType++) {
1292 
1293  // Find the dijet candidate of the event and store its info in struct fDijet
1294  FindDijet(jetCont, leadingHadronCutType);
1295 
1296  // If we find a dijet candidate (i.e. acceptable trig jet; ass jet accepted or not), fill the di-jet candidate histogram
1298  FillDijetCandHistograms(jetCont);
1299  }
1300 
1301  }
1302 
1303  //---------------------------------------------------------------------------------------------------
1304  // Now, study the accepted dijet selection -- specified by the trig/ass jet pT conditions
1305 
1306  // Find the dijet candidate of the event and store its info in struct fDijet
1307  FindDijet(jetCont, 0);
1308 
1309  // If we find an accepted dijet, fill the dijet imbalance histogram
1312  }
1313  // If we find an accepted dijet, perform momentum-balance study (if requested)
1315  histname = TString::Format("%s/MomentumBalance", jetCont->GetArrayName().Data());
1316  DoMomentumBalance(histname);
1317  }
1318 
1319  //---------------------------------------------------------------------------
1320  // Do a simple trigger simulation (if requested)
1321  if (fDoTriggerSimulation) {
1323  }
1324 
1325  }
1326 
1327  //---------------------------------------------------------------------------
1328  // Do the constituent threshold and geometrical matching study (if requested)
1329  if (fDoGeometricalMatching) {
1331  }
1332 
1333  return kTRUE;
1334 }
1335 
1344 {
1345  fDijet.clear();
1346  fDijet.leadingHadronCutType = leadingHadronCutBin;
1347 
1348  // Get trigger jet
1349  AliEmcalJet* trigJet = GetLeadingJet(jetCont);
1350  if(!trigJet) return;
1351 
1352  // Skip the event if the leading jet doesn't satisfy the pT threshold
1353  Double_t trigJetPt = GetJetPt(jetCont, trigJet);
1354  if ( trigJetPt < fMinTrigJetPt ) return;
1355 
1356  // Skip the event if the leading jet doesn't satisfy the leading hadron threshold
1357  if (jetCont->GetLeadingHadronPt(trigJet) < fDijetLeadingHadronPt*leadingHadronCutBin) return;
1358 
1359  // Fill the dijet struct
1360  fDijet.trigJet = trigJet;
1361  fDijet.trigJetPt = trigJetPt;
1362  fDijet.trigJetEta = trigJet->Eta();
1363  fDijet.trigJetPhi = trigJet->Phi();
1364 
1365  // Find the subleading jet in the opposite hemisphere
1366  AliEmcalJet *assJet = 0;
1367  for(auto assJetCand : jetCont->accepted()) {
1368  if (!assJetCand) continue;
1369  Double_t assJetCandPt = GetJetPt(jetCont, assJetCand);
1370  if ( TMath::Abs(trigJet->Phi() - assJetCand->Phi()) < fDeltaPhiMin ) continue;
1371  if (assJet) {
1372  Double_t assJetPt = GetJetPt(jetCont, assJet);
1373  if ( assJetCandPt < assJetPt ) continue;
1374  }
1375  assJet = assJetCand;
1376  }
1377  if (!assJet) return;
1378 
1379  // Fill the dijet struct
1380  fDijet.assJet = assJet;
1381  fDijet.assJetPt = GetJetPt(jetCont, assJet);
1382  fDijet.assJetPhi = assJet->Phi();
1383  fDijet.assJetEta = assJet->Eta();
1385 
1386  fDijet.deltaPhi = TMath::Abs(trigJet->Phi() - assJet->Phi());
1387  fDijet.deltaEta = trigJet->Eta() - assJet->Eta();
1390  fDijet.kTy = TMath::Abs( fDijet.trigJetPt * TMath::Sin(fDijet.deltaPhi) );
1391 }
1392 
1398 {
1399 
1400  AliTrackContainer* trackCont = dynamic_cast<AliTrackContainer*>(GetParticleContainer("tracks"));
1401 
1402  AliVTrack* track;
1403  for (auto trackIterator : trackCont->accepted_momentum() ) {
1404 
1405  track = trackIterator.second;
1406 
1407  // Compute the delta phi between the track and its nearest jet (of the two jets in the dijet),
1408  // as well as its pT-parallel projection onto the nearest jet's axis.
1409 
1410  Double_t trackPt = track->Pt();
1411  Double_t trackPhi = track->Phi();
1412  Double_t trigJetPhi = fDijet.trigJet->Phi();
1413  Double_t assJetPhi = fDijet.assJet->Phi();
1414 
1415  Double_t deltaPhiTrigJet = TMath::Abs(trackPhi - trigJetPhi);
1416  Double_t deltaPhiAssJet = TMath::Abs(trackPhi - assJetPhi);
1417  Bool_t isNearside = deltaPhiTrigJet < deltaPhiAssJet;
1418 
1419  Double_t deltaPhi;
1420  Double_t balancePt;
1421  if (isNearside) {
1422  deltaPhi = trackPhi - trigJetPhi;
1423  balancePt = trackPt * TMath::Cos(deltaPhi);
1424  }
1425  else {
1426  deltaPhi = trackPhi - assJetPhi;
1427  balancePt = -trackPt * TMath::Cos(deltaPhi);
1428  }
1429 
1430  FillMomentumBalanceHistograms(histname, deltaPhi, trackPt, balancePt);
1431 
1432  }
1433 }
1434 
1439 {
1440  // Get jet container with minimum constituent pT,E thresholds
1441  TString jetContAllName = Form("Jet_AKTFullR0%d0_tracks_pT0150_caloClusters_E0300_pt_scheme", (int) (fMatchingJetR*10) );
1442  AliJetContainer* jetContAll = GetJetContainer(jetContAllName.Data());
1443 
1444  // Get jet container with X GeV constituent pT,E thresholds
1445  Int_t trackThreshold = (int) (fTrackConstituentThreshold*1000); // in MeV
1446  Int_t clusThreshold = (int) (fClusterConstituentThreshold*1000); // in MeV
1447  TString jetContHardCoreName = Form("JetHardCore_AKTFullR0%d0_tracks_pT%d_caloClusters_E%d_pt_scheme", (int) (fMatchingJetR*10), trackThreshold, clusThreshold);
1448  AliJetContainer* jetContHardCore = GetJetContainer(jetContHardCoreName.Data());
1449 
1450  // Find the di-jet in the hard-core jet sample, then find the matching di-jet and fill histograms
1451  FindDijet(jetContHardCore, 0);
1452  if (fDijet.isAccepted) {
1453  FindMatchingDijet(jetContAll);
1455  }
1456 }
1457 
1462 {
1463  TString histname;
1464 
1465  // Check if trigger patches are loaded
1466  if (fTriggerPatchInfo) {
1467  TString objname(fTriggerPatchInfo->GetClass()->GetName());
1468  TClass cls(objname);
1469  if (!cls.InheritsFrom("AliEMCALTriggerPatchInfo")) {
1470  AliError(Form("%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1471  GetName(), cls.GetName(), "EmcalTriggers"));
1472  fTriggerPatchInfo = 0;
1473  }
1474  }
1475  if (!fTriggerPatchInfo) {
1476  AliError(Form("%s: Unable to get trigger patch container with name %s. Aborting", GetName(), "EmcalTriggers"));
1477  return;
1478  }
1479 
1480  // Compute patches in EMCal, DCal (I want offline simple trigger patch, i.e. patch calculated using FEE energy)
1481  std::vector<Double_t> vecEMCal;
1482  std::vector<Double_t> vecDCal;
1483  for(auto p : *fTriggerPatchInfo){
1484  AliEMCALTriggerPatchInfo *recpatch = static_cast<AliEMCALTriggerPatchInfo *>(p);
1485  if (recpatch) {
1486 
1487  if(!recpatch->IsJetHighSimple()) continue;
1488 
1489  histname = "TriggerSimHistograms/hEtaVsPhi";
1490  fHistManager.FillTH2(histname.Data(), recpatch->GetEtaGeo(), recpatch->GetPhiGeo());
1491 
1492  histname = "TriggerSimHistograms/hPatchE";
1493  fHistManager.FillTH2(histname.Data(), fCent, recpatch->GetPatchE());
1494 
1495  if (recpatch->IsEMCal()) {
1496  vecEMCal.push_back(recpatch->GetPatchE());
1497  } else {
1498  vecDCal.push_back(recpatch->GetPatchE());
1499  }
1500 
1501  }
1502  }
1503 
1504  // Compute the median in each calorimeter
1505  const Int_t nBkgPatchesEMCal = vecEMCal.size(); // 6*8;
1506  const Int_t nBkgPatchesDCal = vecDCal.size(); // 4*5;
1507  fMedianEMCal = TMath::Median(nBkgPatchesEMCal, &vecEMCal[0]); // point to array used internally by vector
1508  fMedianDCal = TMath::Median(nBkgPatchesDCal, &vecDCal[0]);
1509 
1510  histname = "TriggerSimHistograms/hPatchMedianE";
1511  fHistManager.FillTH3(histname.Data(), fCent, fMedianEMCal, kEMCal);
1512  fHistManager.FillTH3(histname.Data(), fCent, fMedianDCal, kDCal);
1513 
1514  histname = "TriggerSimHistograms/hNPatches";
1515  fHistManager.FillTH2(histname.Data(), nBkgPatchesEMCal, kEMCal);
1516  fHistManager.FillTH2(histname.Data(), nBkgPatchesDCal, kDCal);
1517 
1518  // Then compute background subtracted patches, by subtracting from each patch the median patch E from the opposite hemisphere
1519  // If a patch is above threshold, the event is "triggered"
1520  Bool_t fkEMCEJE = kFALSE;
1521  Double_t threshold = 20;
1522  for(auto p : *fTriggerPatchInfo){
1523  AliEMCALTriggerPatchInfo *recpatch = static_cast<AliEMCALTriggerPatchInfo *>(p);
1524  if (recpatch) {
1525 
1526  if(!recpatch->IsJetHighSimple()) continue;
1527 
1528  if (recpatch->IsEMCal()) {
1529  if ((recpatch->GetPatchE() - fMedianDCal) > threshold) {
1530  fkEMCEJE = kTRUE;
1531  break;
1532  }
1533  } else {
1534  if ((recpatch->GetPatchE() - fMedianEMCal) > threshold) {
1535  fkEMCEJE = kTRUE;
1536  break;
1537  }
1538  }
1539  }
1540  }
1541 
1542  if (fkEMCEJE) {
1544  }
1545 
1546 }
1547 
1553 {
1555 
1556  // Loop over jets and find leading jet within R of fDijet.trigJet
1557  AliEmcalJet *matchingTrigJet = 0;
1558  for(auto matchingTrigJetCand : jetCont->accepted()) {
1559  if (!matchingTrigJetCand) continue;
1560  if ( GetDeltaR(matchingTrigJetCand, fDijet.trigJet) > fMatchingJetR ) continue;
1561  if (matchingTrigJet) {
1562  if ( GetJetPt(jetCont, matchingTrigJetCand) < GetJetPt(jetCont, matchingTrigJet) ) continue;
1563  }
1564  matchingTrigJet = matchingTrigJetCand;
1565  }
1566  if (!matchingTrigJet) return;
1567 
1568  // Loop over jets and find leading jet within R of fDijet.assJet
1569  AliEmcalJet *matchingAssJet = 0;
1570  for(auto matchingAssJetCand : jetCont->accepted()) {
1571  if (!matchingAssJetCand) continue;
1572  if ( GetDeltaR(matchingAssJetCand, fDijet.assJet) > fMatchingJetR ) continue;
1573  if (matchingAssJet) {
1574  if ( GetJetPt(jetCont, matchingAssJetCand) < GetJetPt(jetCont, matchingAssJet) ) continue;
1575  }
1576  matchingAssJet = matchingAssJetCand;
1577  }
1578 
1579  // Determine which matching jet is the leading jet (i.e. allow them to flip)
1580  if (matchingAssJet) {
1581  AliEmcalJet* trigJet = matchingTrigJet;
1582  AliEmcalJet* assJet = matchingAssJet;
1583  if ( GetJetPt(jetCont, matchingTrigJet) < GetJetPt(jetCont, matchingAssJet) ) {
1584  AliEmcalJet* trigJet = matchingAssJet;
1585  AliEmcalJet* assJet = matchingTrigJet;
1586  }
1587 
1588  // Fill the dijet struct
1589  fMatchingDijet.trigJet = trigJet;
1590  fMatchingDijet.trigJetPt = GetJetPt(jetCont, trigJet);
1591  fMatchingDijet.trigJetEta = trigJet->Eta();
1592  fMatchingDijet.trigJetPhi = trigJet->Phi();
1593 
1594  fMatchingDijet.assJet = assJet;
1595  fMatchingDijet.assJetPt = GetJetPt(jetCont, assJet);
1596  fMatchingDijet.assJetPhi = assJet->Phi();
1597  fMatchingDijet.assJetEta = assJet->Eta();
1599 
1600  fMatchingDijet.deltaPhi = TMath::Abs(trigJet->Phi() - assJet->Phi());
1601  fMatchingDijet.deltaEta = trigJet->Eta() - assJet->Eta();
1604  fMatchingDijet.kTy = TMath::Abs( fMatchingDijet.trigJetPt * TMath::Sin(fMatchingDijet.deltaPhi) );
1605  }
1606 }
1607 
1612 {
1613  // Loop over tracks and clusters in order to:
1614  // (1) Compute scale factor for full jets
1615  // (2) Compute delta-pT for full jets, with the random cone method
1616  // For both the scale factor and delta-pT, we compute only one histogram each for EMCal.
1617  // But for DCal, we bin in eta-phi, in order to account for the DCal vs. PHOS vs. gap
1618 
1619  // Define the acceptance boundaries for the TPC and EMCal/DCal/PHOS
1620  Double_t etaTPC = 0.9;
1621  Double_t etaEMCal = 0.7;
1622  Double_t etaMinDCal = 0.22;
1623  Double_t etaMaxPHOS = 0.13;
1624  Double_t phiMinEMCal = fGeom->GetArm1PhiMin() * TMath::DegToRad(); // 80
1625  Double_t phiMaxEMCal = fGeom->GetEMCALPhiMax() * TMath::DegToRad(); // ~188
1626  Double_t phiMinDCal = fGeom->GetDCALPhiMin() * TMath::DegToRad(); // 260
1627  Double_t phiMaxDCal = fGeom->GetDCALPhiMax() * TMath::DegToRad(); // ~327 (1/3 SMs start at 320)
1628  Double_t phiMinPHOS = 250 * TMath::DegToRad();
1629  Double_t phiMaxPHOS = 320 * TMath::DegToRad();
1630 
1631  Double_t accTPC = 2 * etaTPC * 2 * TMath::Pi();
1632  Double_t accEMCal = 2 * etaEMCal * (phiMaxEMCal - phiMinEMCal);
1633  Double_t accDCalRegion = 2 * etaEMCal * (phiMaxDCal - phiMinDCal);
1634 
1635  // Define fiducial acceptances, to be used to generate random cones
1636  TRandom3* r = new TRandom3(0);
1637  Double_t jetR = jetCont->GetJetRadius();
1638  Double_t accRC = TMath::Pi() * jetR * jetR;
1639  Double_t etaEMCalfid = etaEMCal - jetR;
1640  Double_t phiMinEMCalfid = phiMinEMCal + jetR;
1641  Double_t phiMaxEMCalfid = phiMaxEMCal - jetR;
1642  Double_t phiMinDCalRegionfid = phiMinDCal + jetR;
1643  Double_t phiMaxDCalRegionfid = phiMaxDCal - jetR;
1644 
1645  // Generate EMCal random cone eta-phi
1646  Double_t etaEMCalRC = r->Uniform(-etaEMCalfid, etaEMCalfid);
1647  Double_t phiEMCalRC = r->Uniform(phiMinEMCalfid, phiMaxEMCalfid);
1648 
1649  // For DCalRegion, generate random eta, phi in each eta/phi bin, to be used as center of random cone
1650  Double_t etaDCalRC[fNEtaBins]; // array storing the RC eta values
1651  Double_t etaStep = 1./fNEtaBins;
1652  Double_t etaMin;
1653  Double_t etaMax;
1654  for (Int_t etaBin=0; etaBin < fNEtaBins; etaBin++) {
1655  etaMin = -etaEMCalfid + etaBin*etaStep;
1656  etaMax = etaMin + etaStep;
1657  etaDCalRC[etaBin] = r->Uniform(etaMin, etaMax);
1658  }
1659 
1660  Double_t phiDCalRC[fNPhiBins]; // array storing the RC phi values
1661  Double_t phiStep = 5./fNPhiBins; // phi axis is [1,6] in order to have simple binning
1662  Double_t phiMin;
1663  Double_t phiMax;
1664  for (Int_t phiBin=0; phiBin < fNPhiBins; phiBin++) {
1665  phiMin = 1 + phiBin*phiStep;
1666  phiMax = phiMin + phiStep;
1667  phiDCalRC[phiBin] = r->Uniform(phiMin, phiMax);
1668  }
1669 
1670  // Initialize the various sums to 0
1671  Double_t trackPtSumTPC = 0;
1672  Double_t trackPtSumEMCal = 0;
1673  Double_t trackPtSumEMCalRC = 0;
1674  Double_t clusESumEMCal = 0;
1675  Double_t clusESumEMCalRC = 0;
1676 
1677  // Define a 2D vector (initialized to 0) to store the sum of track pT, and another for cluster ET
1678  std::vector<std::vector<Double_t>> trackPtSumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1679  std::vector<std::vector<Double_t>> clusESumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1680 
1681  // Loop over tracks. Sum the track pT:
1682  // (1) in the entire TPC, (2) in the EMCal, (3) in the EMCal random cone,
1683  // (4) in the DCalRegion in a random cone at each eta-phi
1684  AliTrackContainer* trackCont = dynamic_cast<AliTrackContainer*>(GetParticleContainer("tracks"));
1685  AliTLorentzVector track;
1686  Double_t trackEta;
1687  Double_t trackPhi;
1688  Double_t trackPt;
1689  Double_t deltaR;
1690  for (auto trackIterator : trackCont->accepted_momentum() ) {
1691 
1692  track.Clear();
1693  track = trackIterator.first;
1694  trackEta = track.Eta();
1695  trackPhi = track.Phi_0_2pi();
1696  trackPt = track.Pt();
1697 
1698  // (1)
1699  if (TMath::Abs(trackEta) < etaTPC) {
1700  trackPtSumTPC += trackPt;
1701  }
1702 
1703  // (2)
1704  if (TMath::Abs(trackEta) < etaEMCal && trackPhi > phiMinEMCal && trackPhi < phiMaxEMCal) {
1705  trackPtSumEMCal += trackPt;
1706  }
1707 
1708  // (3)
1709  deltaR = GetDeltaR(&track, etaEMCalRC, phiEMCalRC);
1710  if (deltaR < jetR) {
1711  trackPtSumEMCalRC += trackPt;
1712  }
1713 
1714  // (4)
1715  for (Int_t etaBin=0; etaBin < fNEtaBins; etaBin++) {
1716  for (Int_t phiBin=0; phiBin < fNPhiBins; phiBin++) {
1717  deltaR = GetDeltaR(&track, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1718  if (deltaR < jetR) {
1719  trackPtSumDCalRC[etaBin][phiBin] += trackPt;
1720  }
1721  }
1722  }
1723 
1724  }
1725 
1726  // Loop over clusters. Sum the cluster ET:
1727  // (1) in the EMCal, (2) in the EMCal random cone, (3) in the DCalRegion in a random cone at each eta-phi
1729  AliTLorentzVector clus;
1730  Double_t clusEta;
1731  Double_t clusPhi;
1732  Double_t clusE;
1733  for (auto clusIterator : clusCont->accepted_momentum() ) {
1734 
1735  clus.Clear();
1736  clus = clusIterator.first;
1737  clusEta = clus.Eta();
1738  clusPhi = clus.Phi_0_2pi();
1739  clusE = clus.E();
1740 
1741  // (1)
1742  if (TMath::Abs(clusEta) < etaEMCal && clusPhi > phiMinEMCal && clusPhi < phiMaxEMCal) {
1743  clusESumEMCal += clusE;
1744  }
1745 
1746  // (2)
1747  deltaR = GetDeltaR(&clus, etaEMCalRC, phiEMCalRC);
1748  if (deltaR < jetR) {
1749  clusESumEMCalRC += clusE;
1750  }
1751 
1752  // (3)
1753  for (Int_t etaBin=0; etaBin < fNEtaBins; etaBin++) {
1754  for (Int_t phiBin=0; phiBin < fNPhiBins; phiBin++) {
1755  deltaR = GetDeltaR(&clus, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1756  if (deltaR < jetR) {
1757  clusESumDCalRC[etaBin][phiBin] += clusE;
1758  }
1759  }
1760  }
1761 
1762  }
1763 
1764  // Compute the scale factor for EMCal, as a function of centrality
1765  Double_t numerator = (trackPtSumEMCal + clusESumEMCal) / accEMCal;
1766  Double_t denominator = trackPtSumTPC / accTPC;
1767  Double_t scaleFactor = numerator / denominator;
1768  TString histname = TString::Format("%s/BackgroundHistograms/hScaleFactorEMCal", jetCont->GetArrayName().Data());
1769  fHistManager.FillTH2(histname, fCent, scaleFactor);
1770 
1771  // Compute the scale factor for DCalRegion in each eta-phi bin, as a function of centrality
1772  for (Int_t etaBin=0; etaBin < fNEtaBins; etaBin++) {
1773  for (Int_t phiBin=0; phiBin < fNPhiBins; phiBin++) {
1774  numerator = (trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin]) / accRC;
1775  scaleFactor = numerator / denominator;
1776  histname = TString::Format("%s/BackgroundHistograms/hScaleFactorEtaPhi", jetCont->GetArrayName().Data());
1777  Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin], fCent, scaleFactor};
1778  fHistManager.FillTHnSparse(histname, x);
1779  }
1780  }
1781 
1782  // Compute delta pT for EMCal, as a function of centrality
1783  Double_t rho = jetCont->GetRhoVal();
1784  Double_t deltaPt = trackPtSumEMCalRC + clusESumEMCalRC - rho * TMath::Pi() * jetR * jetR;
1785  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtEMCal", jetCont->GetArrayName().Data());
1786  fHistManager.FillTH2(histname, fCent, deltaPt);
1787 
1788  // Compute delta pT for DCalRegion in each eta-phi bin, as a function of centrality
1789  Double_t sf;
1790  for (Int_t etaBin=0; etaBin < fNEtaBins; etaBin++) {
1791  for (Int_t phiBin=0; phiBin < fNPhiBins; phiBin++) {
1793  sf = fBackgroundScalingWeights->GetBinContent(etaDCalRC[etaBin], phiDCalRC[phiBin]);
1794  rho = sf * rho;
1795  }
1796  deltaPt = trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin] - rho * accRC;
1797  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtEtaPhi", jetCont->GetArrayName().Data());
1798  Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin], fCent, deltaPt};
1799  fHistManager.FillTHnSparse(histname, x);
1800  }
1801  }
1802 
1803  delete r;
1804 
1805 }
1806 
1811 {
1812 
1813  Double_t rho = jetCont->GetRhoVal();
1814 
1815  // Get eta-phi dependent scale factor
1817  Double_t sf = fBackgroundScalingWeights->GetBinContent(jet->Eta(), jet->Phi_0_2pi());
1818  rho = sf * rho;
1819  }
1820 
1821  // Compute pT
1822  Double_t pT = jet->Pt() - rho * jet->Area();
1823 
1824  // If hard-core jet, don't subtract background
1825  TString jetContName = jetCont->GetName();
1826  if (jetContName.Contains("HardCore")) pT = jet->Pt();
1827 
1828  return pT;
1829 }
1830 
1835 {
1836  AliEmcalJet* leadingJet = 0;
1837 
1838  if (jetCont->GetRhoParameter()) {
1839  for(auto jetCand : jetCont->accepted()) {
1840  if (!jetCand) continue;
1841  Double_t jetCandPt = GetJetPt(jetCont, jetCand);
1842  if (leadingJet) {
1843  Double_t leadingJetPt = GetJetPt(jetCont, leadingJet);
1844  if ( jetCandPt < leadingJetPt ) continue;
1845  }
1846  leadingJet = jetCand;
1847  }
1848  }
1849  else {
1850  leadingJet = jetCont->GetLeadingJet();
1851  }
1852 
1853  return leadingJet;
1854 }
1855 
1860 {
1861  Double_t deltaPhi = TMath::Abs(jet1->Phi() - jet2->Phi());
1862  Double_t deltaEta = TMath::Abs(jet1->Eta() - jet2->Eta());
1863  Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1864  return deltaR;
1865 }
1866 
1871 {
1872  Double_t deltaPhi = TMath::Abs(part->Phi_0_2pi() - phiRef);
1873  Double_t deltaEta = TMath::Abs(part->Eta() - etaRef);
1874  Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1875  return deltaR;
1876 }
1877 
1882 {
1883  UInt_t jetType = jet->GetJetAcceptanceType();
1884  Double_t type = -1;
1885  if (jetType & AliEmcalJet::kEMCAL) {
1886  type = kEMCal;
1887  }
1888  else if (jetType & AliEmcalJet::kDCALonly) {
1889  type = kDCal;
1890  }
1891  else if (jetType & AliEmcalJet::kPHOS) {
1892  type = kPHOS;
1893  }
1894 
1895  return type;
1896 }
1897 
1898 
1906 {
1909 
1910  return kTRUE;
1911 }
1912 
1918 {
1919  TString histname;
1920  AliJetContainer* jets = 0;
1921  TIter nextJetColl(&fJetCollArray);
1922  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1923  TString jetContName = jets->GetName();
1924  if (jetContName.Contains("HardCore")) continue;
1925  Double_t rhoVal = 0;
1926  if (jets->GetRhoParameter()) {
1927  rhoVal = jets->GetRhoVal();
1928  histname = TString::Format("%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
1929  fHistManager.FillTH2(histname.Data(), fCent, rhoVal);
1930  }
1931 
1932  for (auto jet : jets->all()) {
1933 
1934  Float_t ptLeading = jets->GetLeadingHadronPt(jet);
1935  Float_t corrPt = GetJetPt(jets, jet);
1936 
1937  // A vs. pT (fill before area cut)
1938  histname = TString::Format("%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
1939  fHistManager.FillTH2(histname.Data(), corrPt, jet->Area());
1940 
1941 
1942  // Rejection reason
1943  UInt_t rejectionReason = 0;
1944  if (!jets->AcceptJet(jet, rejectionReason)) {
1945  histname = TString::Format("%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1946  fHistManager.FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
1947  continue;
1948  }
1949 
1950  // compute jet acceptance type
1951  Double_t type = GetJetType(jet);
1952 
1953  // (Centrality, pT, calo type)
1954  histname = TString::Format("%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
1955  fHistManager.FillTH3(histname.Data(), fCent, corrPt, type);
1956 
1957  // (Centrality, eta, phi, pT, NEF, calo type)
1958  histname = TString::Format("%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
1959  Double_t x[6] = {fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
1960  fHistManager.FillTHnSparse(histname, x);
1961 
1962  // (Centrality, pT upscaled, calo type)
1963  histname = TString::Format("%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
1964  fHistManager.FillTH3(histname.Data(), fCent, corrPt, type, fMBUpscaleFactor);
1965 
1966  // pT-leading vs. pT
1967  histname = TString::Format("%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1968  fHistManager.FillTH2(histname.Data(), corrPt, ptLeading);
1969 
1970  // (Centrality, pT, z-leading (charged), calo type)
1971  TLorentzVector leadPart;
1972  jets->GetLeadingHadronMomentum(leadPart, jet);
1973  Double_t z = GetParallelFraction(leadPart.Vect(), jet);
1974  if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999; // so that it will contribute to the bin 0.9-1 rather than 1-1.1
1975  histname = TString::Format("%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1976  Double_t y[4] = {fCent, corrPt, z, type};
1977  fHistManager.FillTHnSparse(histname, y);
1978 
1979  // (Centrality, pT, z (charged), calo type)
1980  histname = TString::Format("%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
1981  AliVTrack* track;
1982  for (Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
1983  track = static_cast<AliVTrack*>(jet->Track(i));
1984  z = track->Pt() / TMath::Abs(corrPt);
1985  Double_t y2[4] = {fCent, corrPt, z, type};
1986  fHistManager.FillTHnSparse(histname, y2);
1987  }
1988 
1989  // (Centrality, pT, Nconst, calo type)
1990  histname = TString::Format("%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
1991  Double_t a[4] = {fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
1992  fHistManager.FillTHnSparse(histname, a);
1993 
1994  // (Median patch energy, calo type, jet pT, centrality)
1995  if (fDoTriggerSimulation) {
1996  histname = TString::Format("%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
1997  Double_t x[4] = {fMedianEMCal, kEMCal, corrPt, fCent};
1998  fHistManager.FillTHnSparse(histname, x);
1999  Double_t y[4] = {fMedianDCal, kDCal, corrPt, fCent};
2000  fHistManager.FillTHnSparse(histname, y);
2001  }
2002 
2003  } //jet loop
2004 
2005  //---------------------------------------------------------------------------
2006  // Do study of background (if requested)
2008  }
2009 }
2010 
2016 {
2017  TString histname;
2018  AliJetContainer* jets = 0;
2019  TIter nextJetColl(&fJetCollArray);
2020  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2021  TString jetContName = jets->GetName();
2022  if (jetContName.Contains("HardCore")) continue;
2023  Double_t rhoVal = 0;
2024  if (jets->GetRhoParameter()) {
2025  rhoVal = jets->GetRhoVal();
2026  histname = TString::Format("%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
2027  fHistManager.FillTH2(histname.Data(), fCent, rhoVal);
2028  }
2029 
2030  for (auto jet : jets->all()) {
2031 
2032  Float_t ptLeading = jets->GetLeadingHadronPt(jet);
2033  Float_t corrPt = GetJetPt(jets, jet);
2034 
2035  // A vs. pT (fill before area cut)
2036  histname = TString::Format("%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
2037  fHistManager.FillTH2(histname.Data(), corrPt, jet->Area());
2038 
2039 
2040  // Rejection reason
2041  UInt_t rejectionReason = 0;
2042  if (!jets->AcceptJet(jet, rejectionReason)) {
2043  histname = TString::Format("%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
2044  fHistManager.FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
2045  continue;
2046  }
2047 
2048  // compute jet acceptance type
2049  Double_t type = GetJetType(jet);
2050 
2051  // Centrality vs. pT
2052  histname = TString::Format("%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
2053  fHistManager.FillTH3(histname.Data(), fCent, corrPt, type);
2054 
2055  // (Centrality, eta, phi, pT, NEF, calo type)
2056  histname = TString::Format("%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
2057  Double_t x[6] = {fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
2058  fHistManager.FillTHnSparse(histname, x);
2059 
2060  // pT-leading vs. pT
2061  histname = TString::Format("%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
2062  fHistManager.FillTH2(histname.Data(), corrPt, ptLeading);
2063 
2064  // (Centrality, pT, z-leading (charged), calo type)
2065  TLorentzVector leadPart;
2066  jets->GetLeadingHadronMomentum(leadPart, jet);
2067  Double_t z = GetParallelFraction(leadPart.Vect(), jet);
2068  if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999; // so that it will contribute to the bin 0.9-1 rather than 1-1.1
2069  histname = TString::Format("%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2070  Double_t y[4] = {fCent, corrPt, z, type};
2071  fHistManager.FillTHnSparse(histname, y);
2072 
2073  // (Centrality, pT, z (charged), calo type)
2074  histname = TString::Format("%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
2075  AliVTrack* track;
2076  for (Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
2077  track = static_cast<AliVTrack*>(jet->Track(i));
2078  z = track->Pt() / TMath::Abs(corrPt);
2079  Double_t y2[4] = {fCent, corrPt, z, type};
2080  fHistManager.FillTHnSparse(histname, y2);
2081  }
2082 
2083  // (Centrality, pT, Nconst, calo type)
2084  histname = TString::Format("%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
2085  Double_t a[4] = {fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
2086  fHistManager.FillTHnSparse(histname, a);
2087 
2088  } //jet loop
2089 
2090  }
2091 }
2092 
2097 {
2098  Double_t contents[30]={0};
2099  TString histname = TString::Format("%s/DijetCandObservables", jets->GetArrayName().Data());
2100  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
2101  if (!histJetObservables) return;
2102  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2103  TString title(histJetObservables->GetAxis(n)->GetTitle());
2104  if (title=="Centrality (%)")
2105  contents[n] = fCent;
2106  else if (title=="LeadingHadronRequired")
2107  contents[n] = fDijet.leadingHadronCutType;
2108  else if (title=="#it{p}_{T,trig jet} (GeV/#it{c})")
2109  contents[n] = fDijet.trigJetPt;
2110  else if (title=="#it{p}_{T,ass jet} (GeV/#it{c})")
2111  contents[n] = fDijet.assJetPt;
2112  else if (title=="#phi_{trig jet}")
2113  contents[n] = fDijet.trigJetPhi;
2114  else if (title=="#phi_{ass jet}")
2115  contents[n] = fDijet.assJetPhi;
2116  else if (title=="#eta_{trig jet}")
2117  contents[n] = fDijet.trigJetEta;
2118  else if (title=="#eta_{ass jet}")
2119  contents[n] = fDijet.assJetEta;
2120  else
2121  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
2122  }
2123  histJetObservables->Fill(contents);
2124 }
2125 
2130 {
2131  // Fill the dijet imbalance histogram (unless doing trigger simulation, in which case bypass this)
2132  if (!fDoTriggerSimulation) {
2133  Double_t contents[30]={0};
2134  TString histname = TString::Format("%s/DijetImbalanceObservables", jets->GetArrayName().Data());
2135  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
2136  if (!histJetObservables) return;
2137  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2138  TString title(histJetObservables->GetAxis(n)->GetTitle());
2139  if (title=="Centrality (%)")
2140  contents[n] = fCent;
2141  else if (title=="#Delta#phi")
2142  contents[n] = fDijet.deltaPhi;
2143  else if (title=="#Delta#eta")
2144  contents[n] = fDijet.deltaEta;
2145  else if (title=="A_{J}")
2146  contents[n] = fDijet.AJ;
2147  else if (title=="x_{J}")
2148  contents[n] = fDijet.xJ;
2149  else if (title=="k_{Ty} (GeV)")
2150  contents[n] = fDijet.kTy;
2151  else if (title=="N_{tracks, trig jet}")
2152  contents[n] = fDijet.trigJet->GetNumberOfTracks();
2153  else if (title=="N_{tracks, ass jet}")
2154  contents[n] = fDijet.assJet->GetNumberOfTracks();
2155  else
2156  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
2157  }
2158  histJetObservables->Fill(contents);
2159  }
2160 
2161  // (Centrality, pT1, pT2) (upscaled)
2162  TString histname = TString::Format("%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
2164 
2165  // Get jet acceptance type
2166  AliEmcalJet* trigJet = fDijet.trigJet;
2167  Double_t type = GetJetType(trigJet);
2168 
2169  // (Centrality, pT, NEF, calo type)
2170  histname = TString::Format("%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
2171  Double_t x[4] = {fCent, fDijet.trigJetPt, trigJet->NEF(), type};
2172  fHistManager.FillTHnSparse(histname, x);
2173 
2174  // (Centrality, pT, z-leading (charged), calo type)
2175  histname = TString::Format("%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
2176  TLorentzVector leadPart;
2177  jets->GetLeadingHadronMomentum(leadPart, trigJet);
2178  Double_t z = GetParallelFraction(leadPart.Vect(), trigJet);
2179  if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999; // so that it will contribute to the bin 0.9-1 rather than 1-1.1
2180  Double_t y[4] = {fCent, fDijet.trigJetPt, z, type};
2181  fHistManager.FillTHnSparse(histname, y);
2182 
2183  // (Centrality, pT, z (charged), calo type)
2184  histname = TString::Format("%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
2185  AliVTrack* track;
2186  for (Int_t i=0; i<trigJet->GetNumberOfTracks(); i++) {
2187  track = static_cast<AliVTrack*>(trigJet->Track(i));
2188  z = track->Pt() / TMath::Abs(fDijet.trigJetPt);
2189  Double_t y2[4] = {fCent, fDijet.trigJetPt, z, type};
2190  fHistManager.FillTHnSparse(histname, y2);
2191  }
2192 
2193  // (Centrality, pT, Nconst, calo type)
2194  histname = TString::Format("%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
2195  Double_t a[4] = {fCent, fDijet.trigJetPt, 1.*trigJet->GetNumberOfConstituents(), type};
2196  fHistManager.FillTHnSparse(histname, a);
2197 
2198  // Median patch energy vs. pT
2199  if (fDoTriggerSimulation) {
2200  histname = "TriggerSimHistograms/hMedPatchDijet";
2201  fHistManager.FillTH3(histname.Data(), fCent, fMedianEMCal, kEMCal);
2202  fHistManager.FillTH3(histname.Data(), fCent, fMedianDCal, kDCal);
2203  }
2204 
2205 }
2206 
2211 {
2212  Double_t contents[30]={0};
2213  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
2214  if (!histJetObservables) return;
2215  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2216  TString title(histJetObservables->GetAxis(n)->GetTitle());
2217  if (title=="A_{J}")
2218  contents[n] = fDijet.AJ;
2219  else if (title=="#Delta#phi")
2220  contents[n] = deltaPhi;
2221  else if (title=="#it{p}_{T,particle} (GeV/#it{c})")
2222  contents[n] = trackPt;
2223  else if (title=="#it{p}_{T}#parallel (GeV/#it{c})")
2224  contents[n] = balancePt;
2225  else
2226  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
2227  }
2228  histJetObservables->Fill(contents);
2229 }
2230 
2235 {
2236  // Matching efficiency histogram
2237  TString histname = "GeometricalMatchingEfficiency";
2238 
2239  // If we have a matching di-jet, fill the geometrical matching histogram
2240  if (fMatchingDijet.assJet) {
2241  fHistManager.FillTH1(histname.Data(), 1);
2242 
2245  Bool_t isSwitched = trigDeltaR > fMatchingJetR;
2246 
2247  TString thnname = "GeometricalMatching";
2248  Double_t contents[30]={0};
2249  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(thnname.Data()));
2250  if (!histJetObservables) return;
2251  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2252  TString title(histJetObservables->GetAxis(n)->GetTitle());
2253  if (title=="Centrality (%)")
2254  contents[n] = fCent;
2255  else if (title=="isSwitched")
2256  contents[n] = isSwitched;
2257  else if (title=="#DeltaR_{trig}")
2258  contents[n] = trigDeltaR;
2259  else if (title=="#DeltaR_{ass}")
2260  contents[n] = assDeltaR;
2261  else if (title=="trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2262  contents[n] = fMatchingDijet.trigJetPt - fDijet.trigJetPt;
2263  else if (title=="ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2264  contents[n] = fMatchingDijet.assJetPt - fDijet.assJetPt;
2265  else if (title=="A_{J} low-threshold")
2266  contents[n] = fMatchingDijet.AJ;
2267  else if (title=="A_{J} hard-core")
2268  contents[n] = fDijet.AJ;
2269  else
2270  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
2271  }
2272  histJetObservables->Fill(contents);
2273  }
2274  else {
2275  fHistManager.FillTH1(histname.Data(), 0.);
2276  }
2277 }
2278 
2279 /*
2280  * This function fills the histograms for the calorimeter performance study.
2281  */
2283 {
2284  // Define some vars
2285  TString histname;
2286  Double_t Enonlin;
2287  Double_t Ehadcorr;
2288  Int_t absId;
2289  Double_t ecell;
2290  Double_t leadEcell;
2291 
2292  // Get cells from event
2293  fCaloCells = InputEvent()->GetEMCALCells();
2294  AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
2295 
2296  // Loop through clusters and plot cluster THnSparse (centrality, cluster type, E, E-hadcorr, has matched track, M02, Ncells)
2297  AliClusterContainer* clusters = 0;
2298  TIter nextClusColl(&fClusterCollArray);
2299  while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
2301  for (AliClusterIterableMomentumContainer::iterator it = itcont.begin(); it != itcont.end(); it++) {
2302 
2303  // Determine cluster type (EMCal/DCal/Phos)
2304  ClusterType clusType = kNA;
2305  if (it->second->IsEMCAL()) {
2306  Double_t phi = it->first.Phi_0_2pi();
2307  Int_t isDcal = Int_t(phi > fgkEMCalDCalPhiDivide);
2308  if (isDcal == 0) {
2309  clusType = kEMCal;
2310  } else if (isDcal == 1) {
2311  clusType = kDCal;
2312  }
2313  } else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2314  clusType = kPHOS;
2315  }
2316 
2317  // rejection reason plots, to make efficiency correction
2318  if (it->second->IsEMCAL()) {
2319  histname = TString::Format("%s/hClusterRejectionReasonEMCal", clusters->GetArrayName().Data());
2320  UInt_t rejectionReason = 0;
2321  if (!clusters->AcceptCluster(it.current_index(), rejectionReason)) {
2322  fHistManager.FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
2323  continue;
2324  }
2325  } else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2326  histname = TString::Format("%s/hClusterRejectionReasonPHOS", clusters->GetArrayName().Data());
2327  UInt_t rejectionReason = 0;
2328  if (!clusters->AcceptCluster(it.current_index(), rejectionReason)) {
2329  fHistManager.FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
2330  continue;
2331  }
2332  } else {
2333  continue;
2334  }
2335 
2336  // Fill cluster spectra by SM, and fill cell histograms
2337  Enonlin = 0;
2338  Ehadcorr = 0;
2339  if (it->second->IsEMCAL()) {
2340 
2341  Ehadcorr = it->second->GetHadCorrEnergy();
2342  Enonlin = it->second->GetNonLinCorrEnergy();
2343 
2344  Int_t sm = fGeom->GetSuperModuleNumber(it->second->GetCellAbsId(0));
2345  if (sm >=0 && sm < 20) {
2346  histname = TString::Format("%s/BySM/hEmcalClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
2347  fHistManager.FillTH1(histname, it->second->E());
2348  }
2349  else {
2350  AliError(Form("Supermodule %d does not exist!", sm));
2351  }
2352 
2353  // Get cells from each accepted cluster, and plot centrality vs. cell energy vs. cell type
2354  histname = TString::Format("Cells/hCellEnergyAccepted");
2355  leadEcell = 0;
2356  for (Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
2357  absId = it->second->GetCellAbsId(iCell);
2358  ecell = fCaloCells->GetCellAmplitude(absId);
2359  fHistManager.FillTH3(histname, ecell, fCent, kEMCal); // Note: I don't distinguish EMCal from DCal cells
2360  if (ecell > leadEcell) {
2361  leadEcell = ecell;
2362  }
2363  }
2364  // Plot also the leading cell
2365  histname = TString::Format("Cells/hCellEnergyLeading");
2366  fHistManager.FillTH3(histname, leadEcell, fCent, kEMCal);
2367 
2368  } else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
2369 
2370  Ehadcorr = it->second->GetCoreEnergy();
2371  Enonlin = it->second->E();
2372 
2373  Int_t relid[4];
2374  if (fPHOSGeo) {
2375  fPHOSGeo->AbsToRelNumbering(it->second->GetCellAbsId(0), relid);
2376  Int_t sm = relid[0];
2377  if (sm >=1 && sm < 5) {
2378  histname = TString::Format("%s/BySM/hPhosClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
2379  fHistManager.FillTH1(histname, it->second->E());
2380  }
2381  else {
2382  AliError(Form("Supermodule %d does not exist!", sm));
2383  }
2384  }
2385 
2386  // Get cells from each accepted cluster, and plot centrality vs. cell energy vs. cell type
2387  histname = TString::Format("Cells/hCellEnergyAccepted");
2388  leadEcell = 0;
2389  for (Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
2390  absId = it->second->GetCellAbsId(iCell);
2391  ecell = phosCaloCells->GetCellAmplitude(absId);
2392  fHistManager.FillTH3(histname, ecell, fCent, kPHOS);
2393  if (ecell > leadEcell) {
2394  leadEcell = ecell;
2395  }
2396  }
2397  // Plot also the leading cell
2398  histname = TString::Format("Cells/hCellEnergyLeading");
2399  fHistManager.FillTH3(histname, leadEcell, fCent, kPHOS);
2400  }
2401 
2402  // Check if the cluster has a matched track
2403  Int_t hasMatchedTrack = -1;
2404  Int_t nMatchedTracks = it->second->GetNTracksMatched();
2405  if (nMatchedTracks == 0) {
2406  hasMatchedTrack = 0;
2407  } else if (nMatchedTracks > 0) {
2408  hasMatchedTrack = 1;
2409  }
2410 
2411  // Check if the cluster passes the dispersion cut for photon-like cluster (meaningful only for PHOS)
2412  Int_t passedDispersionCut = 0;
2413  if (it->second->Chi2() < 2.5*2.5) {
2414  passedDispersionCut = 1;
2415  }
2416 
2417  Double_t contents[30]={0};
2418  histname = TString::Format("%s/clusterObservables", clusters->GetArrayName().Data());
2419  THnSparse* histClusterObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
2420  if (!histClusterObservables) return;
2421  for (Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
2422  TString title(histClusterObservables->GetAxis(i)->GetTitle());
2423  if (title=="Centrality %")
2424  contents[i] = fCent;
2425  else if (title=="#eta")
2426  contents[i] = it->first.Eta();
2427  else if (title=="#phi")
2428  contents[i] = it->first.Phi_0_2pi();
2429  else if (title=="#it{E}_{clus} (GeV)")
2430  contents[i] = Enonlin;
2431  else if (title=="#it{E}_{clus, hadcorr} or #it{E}_{core} (GeV)")
2432  contents[i] = Ehadcorr;
2433  else if (title=="Matched track")
2434  contents[i] = hasMatchedTrack;
2435  else if (title=="M02")
2436  contents[i] = it->second->GetM02();
2437  else if (title=="Ncells")
2438  contents[i] = it->second->GetNCells();
2439  else if (title=="Dispersion cut")
2440  contents[i] = passedDispersionCut;
2441  else
2442  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
2443  }
2444  histClusterObservables->Fill(contents);
2445 
2446  }
2447 
2448  }
2449 
2450  AliJetContainer* jets = 0;
2451  TIter nextJetColl(&fJetCollArray);
2452  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
2453 
2454  for (auto jet : jets->accepted()) {
2455 
2456  // plot neutral jets THnSparse (centrality, eta, phi, E, Nclusters)
2457  if (fPlotNeutralJets) {
2458  Double_t contents[30]={0};
2459  histname = TString::Format("%s/hClusterJetObservables", jets->GetArrayName().Data());
2460  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
2461  if (!histJetObservables) return;
2462  for (Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
2463  TString title(histJetObservables->GetAxis(i)->GetTitle());
2464  if (title=="Centrality (%)")
2465  contents[i] = fCent;
2466  else if (title=="#eta_{jet}")
2467  contents[i] = jet->Eta();
2468  else if (title=="#phi_{jet} (rad)")
2469  contents[i] = jet->Phi_0_2pi();
2470  else if (title=="#it{E}_{T} (GeV)")
2471  contents[i] = jet->Pt();
2472  else if (title=="#rho (GeV/#it{c})")
2473  contents[i] = jet->Pt() / jet->Area();
2474  else if (title=="N_{clusters}")
2475  contents[i] = jet->GetNumberOfClusters();
2476  else
2477  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
2478  }
2479  histJetObservables->Fill(contents);
2480  }
2481 
2482  // Fill cluster spectra of clusters within jets
2483  //(centrality, cluster energy, jet pT, jet eta, jet phi)
2484  if (fPlotClustersInJets) {
2485  histname = TString::Format("%s/hClustersInJets", jets->GetArrayName().Data());
2486  Int_t nClusters = jet->GetNumberOfClusters();
2487  AliVCluster* clus;
2488  for (Int_t iClus = 0; iClus < nClusters; iClus++) {
2489  clus = jet->Cluster(iClus);
2490  Double_t x[5] = {fCent, clus->E(), GetJetPt(jets, jet), jet->Eta(), jet->Phi_0_2pi()};
2491  fHistManager.FillTHnSparse(histname, x);
2492  }
2493  }
2494 
2495  }
2496 
2497  }
2498 
2499  // Loop through all cells and fill histos
2500  Int_t sm;
2501  Int_t relid[4];
2502  Double_t patchSumEMCal[20] = {0.};
2503  Double_t patchSumPHOS[4] = {0.};
2504  for (Int_t i=0; i<fCaloCells->GetNumberOfCells(); i++) {
2505 
2506  absId = fCaloCells->GetCellNumber(i);
2507  ecell = fCaloCells->GetCellAmplitude(absId);
2508 
2509  // Fill cell histo
2510  histname = TString::Format("Cells/hCellEnergyAll");
2511  fHistManager.FillTH3(histname, ecell, fCent, kEMCal); // Note: I don't distinguish EMCal from DCal cells
2512 
2513  // Fill cell patch histo, per SM
2514  sm = fGeom->GetSuperModuleNumber(absId);
2515  if (sm >=0 && sm < 20) {
2516  patchSumEMCal[sm] += ecell;
2517  }
2518 
2519  }
2520 
2521  for (Int_t i=0; i<phosCaloCells->GetNumberOfCells(); i++) {
2522 
2523  absId = phosCaloCells->GetCellNumber(i);
2524  ecell = phosCaloCells->GetCellAmplitude(absId);
2525 
2526  // Fill cell histo
2527  histname = TString::Format("Cells/hCellEnergyAll");
2528  fHistManager.FillTH3(histname, ecell, fCent, kPHOS);
2529 
2530  // Fill cell patch histo, per SM
2531  fPHOSGeo->AbsToRelNumbering(absId, relid);
2532  sm = relid[0];
2533  if (sm >=1 && sm < 5) {
2534  patchSumPHOS[sm-1] += ecell;
2535  }
2536 
2537  }
2538 
2539  for (Int_t sm = 0; sm < 20; sm++) {
2540  histname = TString::Format("Cells/BySM/hEmcalPatchEnergy_SM%d", sm);
2541  fHistManager.FillTH2(histname, patchSumEMCal[sm], fCent);
2542  }
2543 
2544  for (Int_t sm = 1; sm < 5; sm++) {
2545  histname = TString::Format("Cells/BySM/hPhosPatchEnergy_SM%d", sm);
2546  fHistManager.FillTH2(histname, patchSumPHOS[sm-1], fCent);
2547  }
2548 
2549 }
2550 
AliEmcalJet * GetLeadingJet(AliJetContainer *jetCont)
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:123
TObjArray fClusterCollArray
cluster collection array
Double_t GetRhoVal() const
Int_t fNPhiBins
Number of phi bins in DCal region (for background/correction)
const TString & GetRhoName() const
Int_t fNPtHistBins
! number of variable pt bins
double Double_t
Definition: External.C:58
const char * title
Definition: MakeQAPdf.C:26
AliJetContainer * GetJetContainer(Int_t i=0) const
PHOS acceptance.
Definition: AliEmcalJet.h:68
Bool_t fUseManualEventCuts
Flag to use manual event cuts.
UInt_t fOffTrigger
offline trigger for event selection
Bool_t fUseAliEventCuts
Flag to use AliEventCuts (otherwise AliAnalysisTaskEmcal will be used)
Double_t Eta() const
Definition: AliEmcalJet.h:114
static AliEmcalDownscaleFactorsOCDB * Instance()
const AliClusterIterableMomentumContainer accepted_momentum() const
Int_t fNEtaBins
Number of eta bins in DCal region (for background/correction)
bidirectional stl iterator over the EMCAL iterable container
Double_t Phi() const
Definition: AliEmcalJet.h:110
Container with name, TClonesArray and cuts for particles.
Bool_t fPlotJetHistograms
Set whether to enable inclusive jet histograms.
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Declaration of class AliTLorentzVector.
TList * fEventCutList
! Output list for event cut histograms
void FillTH3(const char *hname, double x, double y, double z, double weight=1., Option_t *opt="")
Fill a 3D histogram within the container.
AliVParticle * Track(Int_t idx) const
Double_t fDijetLeadingHadronPt
leading hadron pT threshold for leading jet in dijet
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
Bool_t fkEMCEJE
! flag telling whether the event is "triggered" or not in "simulation"
Double_t GetDownscaleFactorForTriggerClass(const TString &trigger) const
Double_t fMedianEMCal
! median patch energy in EMCal, per event
Double_t fMedianDCal
! median patch energy in DCal, per event
Double_t fMinAssJetPt
subleading jet min pT in a dijet pair, for it to be accepted
UShort_t GetNumberOfConstituents() const
Definition: AliEmcalJet.h:133
void SetCaloTriggerPatchInfoName(const char *n)
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:132
Bool_t fDoMomentumBalance
Set whether to enable momentum balance study.
void FindDijet(AliJetContainer *jetCont, Int_t leadingHadronCutBin)
Bool_t fPlotDijetImbalanceHistograms
Set whether to enable dijet imbalance histograms.
AliEventCuts fEventCuts
event selection utility
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
const Int_t nPtBins
AliEmcalJet * GetLeadingJet(const char *opt="")
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
Dijet_t fDijet
! dijet candidate (per event)
void FillTHnSparse(const char *name, const double *x, double weight=1., Option_t *opt="")
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
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
Double_t GetDeltaR(AliEmcalJet *jet1, AliEmcalJet *jet2)
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
float Float_t
Definition: External.C:68
Double_t fClusterConstituentThreshold
constituent threshold for matching study
Di-jet imbalance analysis with full jets.
AliEMCALGeometry * fGeom
!emcal geometry
UInt_t GetJetAcceptanceType() const
Definition: AliEmcalJet.h:261
Double_t Phi_0_2pi() const
EMCal acceptance.
Definition: AliEmcalJet.h:62
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 fDoTriggerSimulation
Set whether to perform a simple trigger simulation.
BeamType fForceBeamType
forced beam type
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
Definition: External.C:212
virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const
Double_t fDeltaPhiMin
minimum delta phi between di-jets
Double_t fMBUpscaleFactor
! inverse of downscale factor, for MB trigger
Bool_t fComputeBackground
Set whether to enable study of background.
Double_t Phi_0_2pi() const
Definition: AliEmcalJet.h:122
std::vector< TString > GetTriggerClasses() const
Double_t fCent
!event centrality
Double_t GetJetPt(AliJetContainer *jetCont, AliEmcalJet *jet)
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
Calculates the fraction of momentum z of part 1 w.r.t. part 2 in the direction of part 2...
void FillMomentumBalanceHistograms(TString histname, Double_t deltaPhi, Double_t trackPt, Double_t balancePt)
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
TObjArray fJetCollArray
jet collection array
AliVCaloCells * fCaloCells
!cells
AliRhoParameter * GetRhoParameter()
Bool_t fComputeMBDownscaling
Set whether to compute and plot MB downscaling factors.
Double_t Pt() const
Definition: AliEmcalJet.h:102
const AliClusterIterableMomentumContainer all_momentum() const
virtual Bool_t IsEventSelected()
Performing event selection.
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
Float_t GetJetRadius() const
AliEmcalList * fOutput
!output list
Definition: External.C:220
Bool_t fLoadBackgroundScalingWeights
Flag to load eta-phi weights for full-jet background scale factors.
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
Handler for downscale factors for various triggers obtained from the OCDB.
TFile * file
TList with histograms for a given trigger.
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Base task in the EMCAL jet framework.
Bool_t fDoGeometricalMatching
Set whether to enable constituent study with geometrical matching.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
Bool_t fPlotClustersInJets
Set whether to plot histogram of clusters within jets.
const AliTrackIterableMomentumContainer accepted_momentum() const
Int_t GetRunNumber(TString)
Definition: PlotMuonQA.C:2235
Dijet_t fMatchingDijet
! low-threshold matching dijet, for matching study
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 fTrackConstituentThreshold
constituent threshold for matching study
DCal acceptance – spans ONLY DCal (no PHOS or gap)
Definition: AliEmcalJet.h:66
Double_t NEF() const
Definition: AliEmcalJet.h:141
TH1D * fBackgroundScalingWeights
Histogram storing eta-phi weights for full-jet background scale factors.
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.
Double_t fMinTrigJetPt
leading jet min pT in a dijet pair
Container structure for EMCAL clusters.
Bool_t fPlotNeutralJets
Set whether to plot neutral jet histo.
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
Container for jet within the EMCAL jet framework.
Definition: External.C:196
Bool_t fPlotDijetCandHistograms
Set whether to enable dijet pair histograms.
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.
void LoadBackgroundScalingHistogram(const char *path="alien:///alice/cern.ch/user/j/jmulliga/BackgroundScalingWeights.root", const char *name="hBackgroundScalingWeights")
Bool_t fDoCaloStudy
Set whether to perform calorimeter detector study.
const AliJetIterableContainer all() const
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal