AliPhysics  d7f9f85 (d7f9f85)
 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 "AliEMCALTriggerPatchInfo.h"
42 
44 
48 
54  fHistManager(),
55  fEventCuts(0),
56  fEventCutList(0),
57  fUseManualEventCuts(kFALSE),
58  fUseAliEventCuts(kTRUE),
59  fDeltaPhiMin(0),
60  fMinTrigJetPt(0),
61  fMinAssJetPt(0),
62  fDijetLeadingHadronPt(0),
63  fMaxPt(200),
64  fNCentHistBins(0),
65  fCentHistBins(0),
66  fNPtHistBins(0),
67  fPtHistBins(0),
68  fPlotJetHistograms(kFALSE),
69  fPlotDijetCandHistograms(kFALSE),
70  fPlotDijetImbalanceHistograms(kFALSE),
71  fComputeBackground(kFALSE),
72  fDoMomentumBalance(kFALSE),
73  fDoGeometricalMatching(kFALSE),
74  fMatchingJetR(0.2),
75  fTrackConstituentThreshold(0),
76  fClusterConstituentThreshold(0),
77  fMBUpscaleFactor(1.),
78  fNEtaBins(40),
79  fNPhiBins(200),
80  fLoadBackgroundScalingWeights(kTRUE),
81  fBackgroundScalingWeights(0),
82  fGapJetScalingWeights(0),
83  fComputeMBDownscaling(kFALSE),
84  fDoTriggerSimulation(kFALSE),
85  fMedianEMCal(0),
86  fMedianDCal(0),
87  fkEMCEJE(kFALSE),
88  fEmbeddingQA()
89 {
93 }
94 
101  AliAnalysisTaskEmcalJet(name, kTRUE),
102  fHistManager(name),
103  fEventCuts(0),
104  fEventCutList(0),
105  fUseManualEventCuts(kFALSE),
106  fUseAliEventCuts(kTRUE),
107  fDeltaPhiMin(0),
108  fMinTrigJetPt(0),
109  fMinAssJetPt(0),
110  fDijetLeadingHadronPt(0),
111  fMaxPt(200),
112  fNCentHistBins(0),
113  fCentHistBins(0),
114  fNPtHistBins(0),
115  fPtHistBins(0),
116  fPlotJetHistograms(kFALSE),
117  fPlotDijetCandHistograms(kFALSE),
118  fPlotDijetImbalanceHistograms(kFALSE),
119  fComputeBackground(kFALSE),
120  fDoMomentumBalance(kFALSE),
121  fDoGeometricalMatching(kFALSE),
122  fMatchingJetR(0.2),
123  fTrackConstituentThreshold(0),
124  fClusterConstituentThreshold(0),
125  fMBUpscaleFactor(1.),
126  fNEtaBins(40),
127  fNPhiBins(200),
128  fLoadBackgroundScalingWeights(kTRUE),
129  fBackgroundScalingWeights(0),
130  fGapJetScalingWeights(0),
131  fComputeMBDownscaling(kFALSE),
132  fDoTriggerSimulation(kFALSE),
133  fMedianEMCal(0),
134  fMedianDCal(0),
135  fkEMCEJE(kFALSE),
136  fEmbeddingQA()
137 {
139  Dijet_t fDijet;
141 }
142 
147 {
148 }
149 
154 {
155  fNCentHistBins = 4;
157  fCentHistBins[0] = 0;
158  fCentHistBins[1] = 10;
159  fCentHistBins[2] = 30;
160  fCentHistBins[3] = 50;
161  fCentHistBins[4] = 90;
162 
163  fNPtHistBins = 82;
166  GenerateFixedBinArray(7, 0.3, 1, fPtHistBins+6);
167  GenerateFixedBinArray(10, 1, 3, fPtHistBins+13);
168  GenerateFixedBinArray(14, 3, 10, fPtHistBins+23);
169  GenerateFixedBinArray(10, 10, 20, fPtHistBins+37);
170  GenerateFixedBinArray(15, 20, 50, fPtHistBins+47);
171  GenerateFixedBinArray(20, 50, 150, fPtHistBins+62);
172 }
173 
179 {
181 
182  if (fPlotJetHistograms) {
184  }
185  if (fComputeBackground) {
187  }
190  }
193  }
194  if (fDoMomentumBalance) {
196  }
199  }
200  if (fDoTriggerSimulation) {
202  }
203 
204  TIter next(fHistManager.GetListOfHistograms());
205  TObject* obj = 0;
206  while ((obj = next())) {
207  fOutput->Add(obj);
208  }
209 
210  // Intialize AliEventCuts
211  if (fUseAliEventCuts) {
212  fEventCutList = new TList();
213  fEventCutList ->SetOwner();
214  fEventCutList ->SetName("EventCutOutput");
215 
216  fEventCuts.OverrideAutomaticTriggerSelection(fOffTrigger);
217  if(fUseManualEventCuts==1)
218  {
219  fEventCuts.SetManualMode();
220  // Configure manual settings here
221  // ...
222  }
223  fEventCuts.AddQAplotsToList(fEventCutList);
224  fOutput->Add(fEventCutList);
225  }
226 
227  // Load eta-phi background scale factors from histogram on AliEn
230  }
231 
232  // Initialize embedding QA
234  if (embeddingHelper) {
235  bool res = fEmbeddingQA.Initialize();
236  if (res) {
238  }
239  }
240 
241  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
242 }
243 
244 /*
245  * This function allocates the histograms for single jets.
246  * A set of histograms is allocated per each jet container.
247  */
249 {
250  TString histname;
251  TString title;
252 
253  Int_t nPtBins = TMath::CeilNint(fMaxPt/2);
254 
255  AliJetContainer* jets = 0;
256  TIter nextJetColl(&fJetCollArray);
257  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
258 
259  // Jet rejection reason
260  histname = TString::Format("%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
261  title = histname + ";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
262  TH2* hist = fHistManager.CreateTH2(histname.Data(), title.Data(), 32, 0, 32, 50, 0, fMaxPt);
263  SetRejectionReasonLabels(hist->GetXaxis());
264 
265  // Rho vs. Centrality
266  if (!jets->GetRhoName().IsNull()) {
267  histname = TString::Format("%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
268  title = histname + ";Centrality (%);#rho (GeV/#it{c});counts";
269  fHistManager.CreateTH2(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 500);
270  }
271 
272  // (Centrality, pT, calo type)
273  histname = TString::Format("%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
274  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
275  fHistManager.CreateTH3(histname.Data(), title.Data(), 20, 0, 100, nPtBins, 0, fMaxPt, 3, -0.5, 2.5);
276 
277  // (Centrality, eta, phi, pT, NEF, calo type)
278  histname = TString::Format("%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
279  title = histname + ";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
280  Int_t nbins1[6] = {20, fNEtaBins, fNPhiBins, nPtBins, 50, 3};
281  Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
282  Double_t max1[6] = {100, 0.5,6., fMaxPt, 1., 2.5};
283  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 6, nbins1, min1, max1);
284 
285  // (Centrality, pT upscaled, calo type)
286  histname = TString::Format("%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
287  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
288  fHistManager.CreateTH3(histname.Data(), title.Data(), 20, 0, 100, nPtBins, 0, fMaxPt, 3, -0.5, 2.5, "s");
289 
290  // pT-leading vs. pT
291  histname = TString::Format("%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
292  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
293  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, nPtBins, 0, fMaxPt);
294 
295  // A vs. pT
296  histname = TString::Format("%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
297  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
298  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, fMaxPt/3, 0, 0.5);
299 
300  // (Centrality, pT, z-leading (charged), calo type)
301  histname = TString::Format("%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
302  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
303  Int_t nbins2[4] = {20, nPtBins, 50, 3};
304  Double_t min2[4] = {0, 0, 0, -0.5};
305  Double_t max2[4] = {100, fMaxPt, 1., 2.5};
306  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins2, min2, max2);
307 
308  // (Centrality, pT, z (charged), calo type)
309  histname = TString::Format("%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
310  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
311  Int_t nbins3[4] = {20, nPtBins, 50, 3};
312  Double_t min3[4] = {0, 0, 0, -0.5};
313  Double_t max3[4] = {100, fMaxPt, 1., 2.5};
314  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins3, min3, max3);
315 
316  // (Centrality, pT, Nconst, calo type)
317  histname = TString::Format("%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
318  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
319  Int_t nbins4[4] = {20, nPtBins, 50, 3};
320  Double_t min4[4] = {0, 0, 0, -0.5};
321  Double_t max4[4] = {100, fMaxPt, fMaxPt, 2.5};
322  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins4, min4, max4);
323 
324  // (Median patch energy, calo type, jet pT, centrality)
325  if (fDoTriggerSimulation) {
326  histname = TString::Format("%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
327  title = histname + ";#it{E}_{patch,med};type;#it{p}_{T}^{corr} (GeV/#it{c});Centrality (%)";
328  Int_t nbins5[4] = {100, 2, nPtBins, 50};
329  Double_t min5[4] = {0,-0.5, 0, 0};
330  Double_t max5[4] = {50,1.5, fMaxPt, 100};
331  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins5, min5, max5);
332  }
333 
334  }
335 
336  // MB downscale factor histogram
337  if (fComputeMBDownscaling) {
338  histname = "Trigger/hMBDownscaleFactor";
339  title = histname + ";Downscale factor;counts";
340  TH1* hist = fHistManager.CreateTH1(histname.Data(), title.Data(), 200, 0, 200);
341  }
342 
343 }
344 
345 /*
346  * This function allocates background subtraction histograms, if enabled.
347  * A set of histograms is allocated per each jet container.
348  */
350 {
351  TString histname;
352  TString title;
353 
354  Int_t nPtBins = TMath::CeilNint(fMaxPt/2);
355 
356  AliJetContainer* jets = 0;
357  TIter nextJetColl(&fJetCollArray);
358  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
359 
360  histname = TString::Format("%s/BackgroundHistograms/hScaleFactorEMCal", jets->GetArrayName().Data());
361  title = histname + ";Centrality;Scale factor;counts";
362  fHistManager.CreateTH2(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 5);
363 
364  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtEMCal", jets->GetArrayName().Data());
365  title = histname + ";Centrality (%);#delta#it{p}_{T} (GeV/#it{c});counts";
366  fHistManager.CreateTH2(histname.Data(), title.Data(), 10, 0, 100, 400, -50, 150);
367 
368  histname = TString::Format("%s/BackgroundHistograms/hScaleFactorEtaPhi", jets->GetArrayName().Data());
369  title = histname + ";#eta;#phi;Centrality;Scale factor;";
370  Int_t nbins[4] = {fNEtaBins, fNPhiBins, 50, 400};
371  Double_t min[4] = {-0.5,1., 0, 0};
372  Double_t max[4] = {0.5,6., 100, 20};
373  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins, min, max);
374 
375  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtEtaPhi", jets->GetArrayName().Data());
376  title = histname + ";#eta;#phi;Centrality;#delta#it{p}_{T} (GeV/#it{c})";
377  Int_t nbinsDpT[4] = {fNEtaBins, fNPhiBins, 10, 400};
378  Double_t minDpT[4] = {-0.5,1., 0, -50};
379  Double_t maxDpT[4] = {0.5,6., 100, 150};
380  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbinsDpT, minDpT, maxDpT);
381 
382  }
383 }
384 
385 /*
386  * This function allocates the histograms for dijet candidates, i.e. dijet pairs with the leading jet
387  * passing the trigger condition, but no condition on the subleading jet. In particular this histogram is
388  * designed to study the kinematic selection of dijets.
389  */
391 {
392  // Allocate dijet THnSparse
393  AliJetContainer* jets = 0;
394  TIter nextJetColl(&fJetCollArray);
395  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
396  TString axisTitle[30]= {""};
397  Int_t nbins[30] = {0};
398  Double_t min[30] = {0.};
399  Double_t max[30] = {0.};
400  Double_t *binEdges[20] = {0};
401  Int_t dim = 0;
402 
403  if (fForceBeamType != kpp) {
404  axisTitle[dim] = "Centrality (%)";
405  nbins[dim] = fNCentHistBins;
406  binEdges[dim] = fCentHistBins;
407  min[dim] = fCentHistBins[0];
408  max[dim] = fCentHistBins[fNCentHistBins];
409  dim++;
410  }
411 
412  axisTitle[dim] = "LeadingHadronRequired";
413  nbins[dim] = 2;
414  min[dim] = -0.5;
415  max[dim] = 1.5;
416  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
417  dim++;
418 
419  axisTitle[dim] = "#it{p}_{T,trig jet} (GeV/#it{c})";
420  nbins[dim] = TMath::CeilNint(fMaxPt/2);
421  min[dim] = 0;
422  max[dim] = fMaxPt;
423  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
424  dim++;
425 
426  axisTitle[dim] = "#it{p}_{T,ass jet} (GeV/#it{c})";
427  nbins[dim] = TMath::CeilNint(fMaxPt/2);
428  min[dim] = 0;
429  max[dim] = fMaxPt;
430  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
431  dim++;
432 
433  axisTitle[dim] = "#phi_{trig jet}";
434  nbins[dim] = TMath::CeilNint(fMaxPt/2);
435  min[dim] = 0;
436  max[dim] = TMath::TwoPi();
437  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
438  dim++;
439 
440  axisTitle[dim] = "#phi_{ass jet}";
441  nbins[dim] = TMath::CeilNint(fMaxPt/2);
442  min[dim] = 0;
443  max[dim] = TMath::TwoPi();
444  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
445  dim++;
446 
447  axisTitle[dim] = "#eta_{trig jet}";
448  nbins[dim] = TMath::CeilNint(fMaxPt/2);
449  min[dim] = -1;
450  max[dim] = 1;
451  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
452  dim++;
453 
454  axisTitle[dim] = "#eta_{ass jet}";
455  nbins[dim] = TMath::CeilNint(fMaxPt/2);
456  min[dim] = -1;
457  max[dim] = 1;
458  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
459  dim++;
460 
461  TString thnname = TString::Format("%s/DijetCandObservables", jets->GetArrayName().Data());
462  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
463  for (Int_t i = 0; i < dim; i++) {
464  hn->GetAxis(i)->SetTitle(axisTitle[i]);
465  hn->SetBinEdges(i, binEdges[i]);
466  }
467  }
468 }
469 
470 /*
471  * This function allocates the histograms for accepted dijets.
472  * The purpose is to study in detail the imbalance properties of the accepted dijets.
473  */
475 {
476  AliJetContainer* jets = 0;
477  TIter nextJetColl(&fJetCollArray);
478  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
479 
480  // Allocate dijet imbalance THnSparse, unless doing trigger simulation
481  if (!fDoTriggerSimulation) {
482  TString axisTitle[30]= {""};
483  Int_t nbins[30] = {0};
484  Double_t min[30] = {0.};
485  Double_t max[30] = {0.};
486  Double_t *binEdges[20] = {0};
487  Int_t dim = 0;
488 
489  if (fForceBeamType != kpp) {
490  axisTitle[dim] = "Centrality (%)";
491  nbins[dim] = fNCentHistBins;
492  binEdges[dim] = fCentHistBins;
493  min[dim] = fCentHistBins[0];
494  max[dim] = fCentHistBins[fNCentHistBins];
495  dim++;
496  }
497 
498  axisTitle[dim] = "#Delta#phi";
499  nbins[dim] = 100;
500  min[dim] = 0;
501  max[dim] = 4;
502  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
503  dim++;
504 
505  axisTitle[dim] = "#Delta#eta";
506  nbins[dim] = 100;
507  min[dim] = -2;
508  max[dim] = 2;
509  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
510  dim++;
511 
512  axisTitle[dim] = "A_{J}";
513  nbins[dim] = 100;
514  min[dim] = 0;
515  max[dim] = 1;
516  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
517  dim++;
518 
519  axisTitle[dim] = "x_{J}";
520  nbins[dim] = 100;
521  min[dim] = 0;
522  max[dim] = 1;
523  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
524  dim++;
525 
526  axisTitle[dim] = "k_{Ty} (GeV)";
527  nbins[dim] = 100;
528  min[dim] = 0;
529  max[dim] = 100;
530  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
531  dim++;
532 
533  axisTitle[dim] = "N_{tracks, trig jet}";
534  nbins[dim] = fMaxPt/5;
535  min[dim] = 0;
536  max[dim] = 100;
537  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
538  dim++;
539 
540  axisTitle[dim] = "N_{tracks, ass jet}";
541  nbins[dim] = fMaxPt/5;
542  min[dim] = 0;
543  max[dim] = 100;
544  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
545  dim++;
546 
547  TString thnname = TString::Format("%s/DijetImbalanceObservables", jets->GetArrayName().Data());
548  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
549  for (Int_t i = 0; i < dim; i++) {
550  hn->GetAxis(i)->SetTitle(axisTitle[i]);
551  hn->SetBinEdges(i, binEdges[i]);
552  }
553  }
554 
555  // Now, allocate 2d pt spectrum, upscaled according to MB downscaling factors (for trigger efficiency)
556  Int_t nPtBins = TMath::CeilNint(fMaxPt/2);
557 
558  // (Centrality, pT1, pT2) (upscaled)
559  TString histname = TString::Format("%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
560  TString title = histname + ";Centrality (%);#it{p}_{T,1}^{corr} (GeV/#it{c});#it{p}_{T,2}^{corr} (GeV/#it{c})";
561  fHistManager.CreateTH3(histname.Data(), title.Data(), 20, 0, 100, nPtBins, 0, fMaxPt, nPtBins, 0, fMaxPt, "s");
562 
563  // Now, plot jet histograms for the leading jet within the dijet (for comparison to single jets, and triggered to MB)
564 
565  // (Centrality, pT, NEF, calo type)
566  histname = TString::Format("%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
567  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
568  Int_t nbins1[4] = {20, nPtBins, 50, 3};
569  Double_t min1[4] = {0, 0, 0, -0.5};
570  Double_t max1[4] = {100, fMaxPt, 1., 2.5};
571  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins1, min1, max1);
572 
573  // (Centrality, pT, z-leading (charged), calo type)
574  histname = TString::Format("%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
575  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
576  Int_t nbins2[4] = {20, nPtBins, 50, 3};
577  Double_t min2[4] = {0, 0, 0, -0.5};
578  Double_t max2[4] = {100, fMaxPt, 1., 2.5};
579  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins2, min2, max2);
580 
581  // (Centrality, pT, z (charged), calo type)
582  histname = TString::Format("%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
583  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
584  Int_t nbins3[4] = {20, nPtBins, 50, 3};
585  Double_t min3[4] = {0, 0, 0, -0.5};
586  Double_t max3[4] = {100, fMaxPt, 1., 2.5};
587  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins3, min3, max3);
588 
589  // (Centrality, pT, Nconst, calo type)
590  histname = TString::Format("%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
591  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
592  Int_t nbins4[4] = {20, nPtBins, 50, 3};
593  Double_t min4[4] = {0, 0, 0, -0.5};
594  Double_t max4[4] = {100, fMaxPt, fMaxPt, 2.5};
595  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins4, min4, max4);
596  }
597 }
598 
599 /*
600  * This function allocates the histograms for the momentum balance study.
601  */
603 {
604  AliJetContainer* jets = 0;
605  TIter nextJetColl(&fJetCollArray);
606  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
607 
608  // Allocate THnSparse
609  TString axisTitle[30]= {""};
610  Int_t nbins[30] = {0};
611  Double_t min[30] = {0.};
612  Double_t max[30] = {0.};
613  Double_t *binEdges[20] = {0};
614  Int_t dim = 0;
615 
616  axisTitle[dim] = "A_{J}";
617  nbins[dim] = 100;
618  min[dim] = 0;
619  max[dim] = 1;
620  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
621  dim++;
622 
623  axisTitle[dim] = "#Delta#phi";
624  nbins[dim] = 100;
625  min[dim] = -4;
626  max[dim] = 4;
627  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
628  dim++;
629 
630  axisTitle[dim] = "#it{p}_{T,particle} (GeV/#it{c})";
631  nbins[dim] = 9;
632  Double_t* pTParticleBins = new Double_t[nbins[dim]+1];
633  GenerateFixedBinArray(1, 0.15, 0.3, pTParticleBins);
634  GenerateFixedBinArray(1, 0.3, 0.5, pTParticleBins+1);
635  GenerateFixedBinArray(1, 0.5, 1, pTParticleBins+2);
636  GenerateFixedBinArray(2, 1, 5, pTParticleBins+3);
637  GenerateFixedBinArray(3, 5, 20, pTParticleBins+5);
638  GenerateFixedBinArray(1, 20, 150, pTParticleBins+8);
639  min[dim] = 0;
640  max[dim] = pTParticleBins[nbins[dim]];
641  binEdges[dim] = pTParticleBins;
642  dim++;
643 
644  axisTitle[dim] = "#it{p}_{T}#parallel (GeV/#it{c})";
645  nbins[dim] = 80;
646  Double_t* pTParallelBins = new Double_t[nbins[dim]+1];
647  GenerateFixedBinArray(20, 0, 2, pTParallelBins);
648  GenerateFixedBinArray(16, 2, 10, pTParallelBins+20);
649  GenerateFixedBinArray(10, 10, 20, pTParallelBins+36);
650  GenerateFixedBinArray(10, 20, 40, pTParallelBins+46);
651  GenerateFixedBinArray(24, 40, 150, pTParallelBins+56);
652  min[dim] = 0;
653  max[dim] = pTParallelBins[nbins[dim]];
654  binEdges[dim] = pTParallelBins;
655  dim++;
656 
657  TString thnname = TString::Format("%s/MomentumBalance", jets->GetArrayName().Data());
658  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
659  for (Int_t i = 0; i < dim; i++) {
660  hn->GetAxis(i)->SetTitle(axisTitle[i]);
661  hn->SetBinEdges(i, binEdges[i]);
662  }
663  }
664 }
665 
666 /*
667  * This function allocates the histograms for the constituent dijet study.
668  */
670 {
671  // Allocate geometrical matching THnSparse
672  TString axisTitle[30]= {""};
673  Int_t nbins[30] = {0};
674  Double_t min[30] = {0.};
675  Double_t max[30] = {0.};
676  Double_t *binEdges[20] = {0};
677  Int_t dim = 0;
678 
679  if (fForceBeamType != kpp) {
680  axisTitle[dim] = "Centrality (%)";
681  nbins[dim] = fNCentHistBins;
682  binEdges[dim] = fCentHistBins;
683  min[dim] = fCentHistBins[0];
684  max[dim] = fCentHistBins[fNCentHistBins];
685  dim++;
686  }
687 
688  axisTitle[dim] = "isSwitched";
689  nbins[dim] = 2;
690  min[dim] = -0.5;
691  max[dim] = 1.5;
692  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
693  dim++;
694 
695  axisTitle[dim] = "#DeltaR_{trig}";
696  nbins[dim] = 50;
697  min[dim] = 0;
698  max[dim] = 0.5;
699  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
700  dim++;
701 
702  axisTitle[dim] = "#DeltaR_{ass}";
703  nbins[dim] = 50;
704  min[dim] = 0;
705  max[dim] = 0.5;
706  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
707  dim++;
708 
709  axisTitle[dim] = "trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
710  nbins[dim] = 100;
711  min[dim] = -50;
712  max[dim] = 50;
713  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
714  dim++;
715 
716  axisTitle[dim] = "ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
717  nbins[dim] = 100;
718  min[dim] = -50;
719  max[dim] = 50;
720  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
721  dim++;
722 
723  axisTitle[dim] = "A_{J} low-threshold";
724  nbins[dim] = 100;
725  min[dim] = 0;
726  max[dim] = 1;
727  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
728  dim++;
729 
730  axisTitle[dim] = "A_{J} hard-core";
731  nbins[dim] = 100;
732  min[dim] = 0;
733  max[dim] = 1;
734  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
735  dim++;
736 
737  TString thnname = "GeometricalMatching";
738  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
739  for (Int_t i = 0; i < dim; i++) {
740  hn->GetAxis(i)->SetTitle(axisTitle[i]);
741  hn->SetBinEdges(i, binEdges[i]);
742  }
743 
744  // Allocate other histograms
745  TString histname;
746  TString title;
747  histname = "GeometricalMatchingEfficiency";
748  title = histname + ";isMatched;counts";
749  TH1* hist = fHistManager.CreateTH1(histname.Data(), title.Data(), 2, -0.5, 1.5);
750 }
751 
752 /*
753  * This function allocates the histograms for single jets, when the "simulated" trigger has been fired.
754  * A set of histograms is allocated per each jet container.
755  */
757 {
758  TString histname;
759  TString title;
760  Int_t nPtBins = TMath::CeilNint(fMaxPt/2);
761 
762  //----------------------------------------------
763  // Trigger patch histograms
764 
765  // patch eta vs. phi
766  histname = "TriggerSimHistograms/hEtaVsPhi";
767  title = histname + ";#eta_{patch} (rad);#phi_{patch} (rad)";
768  fHistManager.CreateTH2(histname.Data(), title.Data(), 140, -0.7, 0.7, 500, 1., 6.);
769 
770  // N patches
771  histname = "TriggerSimHistograms/hNPatches";
772  title = histname + ";#it{N}_{patches};type";
773  fHistManager.CreateTH2(histname.Data(), title.Data(), 200, 0, 200, 2, -0.5, 1.5);
774 
775  // patch E vs. centrality
776  histname = "TriggerSimHistograms/hPatchE";
777  title = histname + ";Centrality (%);#it{E}_{patch} (GeV)";
778  fHistManager.CreateTH2(histname.Data(), title.Data(), 50, 0, 100, nPtBins, 0, fMaxPt);
779 
780  // patch median vs. Centrality
781  histname = "TriggerSimHistograms/hPatchMedianE";
782  title = histname + ";Centrality (%);#it{E}_{patch,med} (GeV);type";
783  fHistManager.CreateTH3(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 50, 2, -0.5, 1.5);
784 
785  // Median patch energy vs. centrality, for dijets
786  histname = "TriggerSimHistograms/hMedPatchDijet";
787  title = histname + ";Centrality (%);#it{p}_{T,trig}^{corr} (GeV/#it{c});#it{E}_{patch,med} (GeV);type";
788  Int_t nbinsD[4] = {50, 40, 100, 2};
789  Double_t minD[4] = {0, 0, 0, -0.5};
790  Double_t maxD[4] = {100, 200, 50, 1.5};
791  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbinsD, minD, maxD);
792 
793  //----------------------------------------------
794  // Jet histograms for "triggered" events
795  AliJetContainer* jets = 0;
796  TIter nextJetColl(&fJetCollArray);
797  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
798 
799  // Jet rejection reason
800  histname = TString::Format("%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
801  title = histname + ";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
802  TH2* hist = fHistManager.CreateTH2(histname.Data(), title.Data(), 32, 0, 32, 50, 0, fMaxPt);
803  SetRejectionReasonLabels(hist->GetXaxis());
804 
805  // Rho vs. Centrality
806  if (!jets->GetRhoName().IsNull()) {
807  histname = TString::Format("%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
808  title = histname + ";Centrality (%);#rho (GeV/#it{c});counts";
809  fHistManager.CreateTH2(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 500);
810  }
811 
812  // (Centrality, pT, calo type)
813  histname = TString::Format("%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
814  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});type";
815  fHistManager.CreateTH3(histname.Data(), title.Data(), 20, 0, 100, nPtBins, 0, fMaxPt, 3, -0.5, 2.5);
816 
817  // (Centrality, eta, phi, pT, NEF, calo type)
818  histname = TString::Format("%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
819  title = histname + ";Centrality (%);#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c});NEF;type";
820  Int_t nbins1[6] = {20, fNEtaBins, fNPhiBins, nPtBins, 50, 3};
821  Double_t min1[6] = {0, -0.5,1., 0, 0, -0.5};
822  Double_t max1[6] = {100, 0.5,6., fMaxPt, 1., 2.5};
823  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 6, nbins1, min1, max1);
824 
825  // pT-leading vs. pT
826  histname = TString::Format("%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
827  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
828  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, nPtBins, 0, fMaxPt);
829 
830  // A vs. pT
831  histname = TString::Format("%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
832  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
833  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, 0, fMaxPt, fMaxPt/3, 0, 0.5);
834 
835  // (Centrality, pT, z-leading (charged), calo type)
836  histname = TString::Format("%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
837  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading};type";
838  Int_t nbins2[4] = {20, nPtBins, 50, 3};
839  Double_t min2[4] = {0, 0, 0, -0.5};
840  Double_t max2[4] = {100, fMaxPt, 1., 2.5};
841  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins2, min2, max2);
842 
843  // z (charged) vs. pT
844  histname = TString::Format("%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
845  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});#it{z};type";
846  Int_t nbins3[4] = {20, nPtBins, 50, 3};
847  Double_t min3[4] = {0, 0, 0, -0.5};
848  Double_t max3[4] = {100, fMaxPt, 1., 2.5};
849  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins3, min3, max3);
850 
851  // (Centrality, pT, Nconst, calo type)
852  histname = TString::Format("%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
853  title = histname + ";Centrality (%);#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents;type";
854  Int_t nbins4[4] = {20, nPtBins, 50, 3};
855  Double_t min4[4] = {0, 0, 0, -0.5};
856  Double_t max4[4] = {100, fMaxPt, fMaxPt, 2.5};
857  fHistManager.CreateTHnSparse(histname.Data(), title.Data(), 4, nbins4, min4, max4);
858 
859  }
860 
861 }
862 
866 void AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram(const char* path, const char* name1, const char* name2)
867 {
868 
869  TString fname(path);
870  if (fname.BeginsWith("alien://")) {
871  TGrid::Connect("alien://");
872  }
873 
874  TFile* file = TFile::Open(path);
875 
876  if (!file || file->IsZombie()) {
877  ::Error("AliAnalysisTaskEmcalDijetImbalance", "Could not open background scaling histogram");
878  return;
879  }
880 
881  // Open background scale factor histogram
882  TH2D* h1 = dynamic_cast<TH2D*>(file->Get(name1));
883 
884  if (h1) {
885  ::Info("AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram", "Background histogram %s loaded from file %s.", name1, path);
886  }
887  else {
888  ::Error("AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram", "Background histogram %s not found in file %s.", name1, path);
889  return;
890  }
891 
892  fBackgroundScalingWeights = static_cast<TH2D*>(h1->Clone());
893 
894  // Open jet pT scale factor histogram
895  TH2D* h2 = dynamic_cast<TH2D*>(file->Get(name2));
896 
897  if (h2) {
898  ::Info("AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram", "Jet pT scaling histogram %s loaded from file %s.", name2, path);
899  }
900  else {
901  ::Error("AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram", "Jet pT scaling histogram %s not found in file %s.", name2, path);
902  return;
903  }
904 
905  fGapJetScalingWeights = static_cast<TH2D*>(h2->Clone());
906 
907  file->Close();
908  delete file;
909 
910 }
911 
917 {
918 
919  // Configure base class to set fTriggerPatchInfo to array of trigger patches, each event
920  // (Need to call this before base class ExecOnce)
921  if (fDoTriggerSimulation) {
922  this->SetCaloTriggerPatchInfoName("EmcalTriggers");
923  }
924 
926 
927  fNeedEmcalGeom = kTRUE;
928 
929  // Check if trigger patches are loaded
930  if (fDoTriggerSimulation) {
931  if (fTriggerPatchInfo) {
932  TString objname(fTriggerPatchInfo->GetClass()->GetName());
933  TClass cls(objname);
934  if (!cls.InheritsFrom("AliEMCALTriggerPatchInfo")) {
935  AliError(Form("%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
936  GetName(), cls.GetName(), "EmcalTriggers"));
937  fTriggerPatchInfo = 0;
938  }
939  }
940  if (!fTriggerPatchInfo) {
941  AliError(Form("%s: Unable to get trigger patch container with name %s. Aborting", GetName(), "EmcalTriggers"));
942  return;
943  }
944  }
945 
946  AliInfo(Form("Trigger jet threshold = %f, Associated jet threshold = %f", fMinTrigJetPt, fMinAssJetPt));
947  AliInfo(Form("Leading hadron threshold (for dijet leading jet): %f GeV", fDijetLeadingHadronPt));
948  AliInfo(Form("Momentum balance study: %d", fDoMomentumBalance));
949  AliInfo(Form("Geometrical matching study: %d", fDoGeometricalMatching));
950 
951 }
952 
957 
958  // Get the downscaling factors for MB triggers (to be used to calculate trigger efficiency)
959 
961 
962  // Get instance of the downscale factor helper class
964  downscaleOCDB->SetRun(InputEvent()->GetRunNumber());
965 
966  // There are two possible min bias triggers for LHC15o
967  TString triggerNameMB1 = "CINT7-B-NOPF-CENT";
968  TString triggerNameMB2 = "CV0L7-B-NOPF-CENT";
969  TString triggerNameJE = "CINT7EJ1-B-NOPF-CENTNOPMD";
970 
971  // Get the downscale factor for whichever MB trigger exists in the given run
972  std::vector<TString> runtriggers = downscaleOCDB->GetTriggerClasses();
973  Double_t downscalefactor;
974  for (auto i : runtriggers) {
975  if (i.EqualTo(triggerNameMB1) || i.EqualTo(triggerNameMB2)) {
976  downscalefactor = downscaleOCDB->GetDownscaleFactorForTriggerClass(i.Data());
977  break;
978  }
979  }
980 
981  // Store the inverse of the downscale factor, used later to weight the pT spectrum
982  fMBUpscaleFactor = 1/downscalefactor;
983 
984  TString histname = "Trigger/hMBDownscaleFactor";
985  fHistManager.FillTH1(histname.Data(), fMBUpscaleFactor);
986 
987  }
988 
989 }
990 
995 {
996  if (fUseAliEventCuts) {
997  if (!fEventCuts.AcceptEvent(InputEvent()))
998  {
999  PostData(1, fOutput);
1000  return kFALSE;
1001  }
1002  }
1003  else {
1005  }
1006  return kTRUE;
1007 }
1008 
1017 {
1018  TString histname;
1019  AliJetContainer* jetCont = 0;
1020  TIter next(&fJetCollArray);
1021  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
1022  TString jetContName = jetCont->GetName();
1023  if (jetContName.Contains("HardCore")) continue;
1024 
1025  //-----------------------------------------------------------------------------
1026  // Find the leading di-jet candidate in each event, and if it satisfies the
1027  // trig jet pT threshold, then fill di-jet candidate histogram (regardless of ass jet).
1028  // The idea is to study the kinematic selections in post-processing.
1029 
1030  // Loop over leading hadron cut or not
1031  for (Int_t leadingHadronCutType=0; leadingHadronCutType<2; leadingHadronCutType++) {
1032 
1033  // Find the dijet candidate of the event and store its info in struct fDijet
1034  FindDijet(jetCont, leadingHadronCutType);
1035 
1036  // If we find a dijet candidate (i.e. acceptable trig jet; ass jet accepted or not), fill the di-jet candidate histogram
1038  FillDijetCandHistograms(jetCont);
1039  }
1040 
1041  }
1042 
1043  //---------------------------------------------------------------------------------------------------
1044  // Now, study the accepted dijet selection -- specified by the trig/ass jet pT conditions
1045 
1046  // Find the dijet candidate of the event and store its info in struct fDijet
1047  FindDijet(jetCont, 0);
1048 
1049  // If we find an accepted dijet, fill the dijet imbalance histogram
1052  }
1053  // If we find an accepted dijet, perform momentum-balance study (if requested)
1055  histname = TString::Format("%s/MomentumBalance", jetCont->GetArrayName().Data());
1056  DoMomentumBalance(histname);
1057  }
1058 
1059  //---------------------------------------------------------------------------
1060  // Do a simple trigger simulation (if requested)
1061  if (fDoTriggerSimulation) {
1063  }
1064 
1065  }
1066 
1067  //---------------------------------------------------------------------------
1068  // Do the constituent threshold and geometrical matching study (if requested)
1069  if (fDoGeometricalMatching) {
1071  }
1072 
1073  // Only fill the embedding qa plots if:
1074  // - We are using the embedding helper
1075  // - The class has been initialized
1076  // - Both jet collections are available
1077  if (fEmbeddingQA.IsInitialized()) {
1079  }
1080 
1081  return kTRUE;
1082 }
1083 
1092 {
1093  fDijet.clear();
1094  fDijet.leadingHadronCutType = leadingHadronCutBin;
1095 
1096  // Get trigger jet
1097  AliEmcalJet* trigJet = GetLeadingJet(jetCont);
1098  if(!trigJet) return;
1099 
1100  // Skip the event if the leading jet doesn't satisfy the pT threshold
1101  Double_t trigJetPt = GetJetPt(jetCont, trigJet);
1102  if ( trigJetPt < fMinTrigJetPt ) return;
1103 
1104  // Skip the event if the leading jet doesn't satisfy the leading hadron threshold
1105  if (jetCont->GetLeadingHadronPt(trigJet) < fDijetLeadingHadronPt*leadingHadronCutBin) return;
1106 
1107  // Fill the dijet struct
1108  fDijet.trigJet = trigJet;
1109  fDijet.trigJetPt = trigJetPt;
1110  fDijet.trigJetEta = trigJet->Eta();
1111  fDijet.trigJetPhi = trigJet->Phi();
1112 
1113  // Find the subleading jet in the opposite hemisphere
1114  AliEmcalJet *assJet = 0;
1115  for(auto assJetCand : jetCont->accepted()) {
1116  if (!assJetCand) continue;
1117  Double_t assJetCandPt = GetJetPt(jetCont, assJetCand);
1118  if ( TMath::Abs(trigJet->Phi() - assJetCand->Phi()) < fDeltaPhiMin ) continue;
1119  if (assJet) {
1120  Double_t assJetPt = GetJetPt(jetCont, assJet);
1121  if ( assJetCandPt < assJetPt ) continue;
1122  }
1123  assJet = assJetCand;
1124  }
1125  if (!assJet) return;
1126 
1127  // Fill the dijet struct
1128  fDijet.assJet = assJet;
1129  fDijet.assJetPt = GetJetPt(jetCont, assJet);
1130  fDijet.assJetPhi = assJet->Phi();
1131  fDijet.assJetEta = assJet->Eta();
1133 
1134  fDijet.deltaPhi = TMath::Abs(trigJet->Phi() - assJet->Phi());
1135  fDijet.deltaEta = trigJet->Eta() - assJet->Eta();
1138  fDijet.kTy = TMath::Abs( fDijet.trigJetPt * TMath::Sin(fDijet.deltaPhi) );
1139 }
1140 
1146 {
1147 
1148  AliTrackContainer* trackCont = dynamic_cast<AliTrackContainer*>(GetParticleContainer("tracks"));
1149 
1150  AliVTrack* track;
1151  for (auto trackIterator : trackCont->accepted_momentum() ) {
1152 
1153  track = trackIterator.second;
1154 
1155  // Compute the delta phi between the track and its nearest jet (of the two jets in the dijet),
1156  // as well as its pT-parallel projection onto the nearest jet's axis.
1157 
1158  Double_t trackPt = track->Pt();
1159  Double_t trackPhi = track->Phi();
1160  Double_t trigJetPhi = fDijet.trigJet->Phi();
1161  Double_t assJetPhi = fDijet.assJet->Phi();
1162 
1163  Double_t deltaPhiTrigJet = TMath::Abs(trackPhi - trigJetPhi);
1164  Double_t deltaPhiAssJet = TMath::Abs(trackPhi - assJetPhi);
1165  Bool_t isNearside = deltaPhiTrigJet < deltaPhiAssJet;
1166 
1167  Double_t deltaPhi;
1168  Double_t balancePt;
1169  if (isNearside) {
1170  deltaPhi = trackPhi - trigJetPhi;
1171  balancePt = trackPt * TMath::Cos(deltaPhi);
1172  }
1173  else {
1174  deltaPhi = trackPhi - assJetPhi;
1175  balancePt = -trackPt * TMath::Cos(deltaPhi);
1176  }
1177 
1178  FillMomentumBalanceHistograms(histname, deltaPhi, trackPt, balancePt);
1179 
1180  }
1181 }
1182 
1187 {
1188  // Get jet container with minimum constituent pT,E thresholds
1189  TString jetContAllName = Form("Jet_AKTFullR0%d0_tracks_pT0150_caloClusters_E0300_pt_scheme", (int) (fMatchingJetR*10) );
1190  AliJetContainer* jetContAll = GetJetContainer(jetContAllName.Data());
1191 
1192  // Get jet container with X GeV constituent pT,E thresholds
1193  Int_t trackThreshold = (int) (fTrackConstituentThreshold*1000); // in MeV
1194  Int_t clusThreshold = (int) (fClusterConstituentThreshold*1000); // in MeV
1195  TString jetContHardCoreName = Form("JetHardCore_AKTFullR0%d0_tracks_pT%d_caloClusters_E%d_pt_scheme", (int) (fMatchingJetR*10), trackThreshold, clusThreshold);
1196  AliJetContainer* jetContHardCore = GetJetContainer(jetContHardCoreName.Data());
1197 
1198  // Find the di-jet in the hard-core jet sample, then find the matching di-jet and fill histograms
1199  FindDijet(jetContHardCore, 0);
1200  if (fDijet.isAccepted) {
1201  FindMatchingDijet(jetContAll);
1203  }
1204 }
1205 
1210 {
1211  TString histname;
1212 
1213  // Check if trigger patches are loaded
1214  if (fTriggerPatchInfo) {
1215  TString objname(fTriggerPatchInfo->GetClass()->GetName());
1216  TClass cls(objname);
1217  if (!cls.InheritsFrom("AliEMCALTriggerPatchInfo")) {
1218  AliError(Form("%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",
1219  GetName(), cls.GetName(), "EmcalTriggers"));
1220  fTriggerPatchInfo = 0;
1221  }
1222  }
1223  if (!fTriggerPatchInfo) {
1224  AliError(Form("%s: Unable to get trigger patch container with name %s. Aborting", GetName(), "EmcalTriggers"));
1225  return;
1226  }
1227 
1228  // Compute patches in EMCal, DCal (I want offline simple trigger patch, i.e. patch calculated using FEE energy)
1229  std::vector<Double_t> vecEMCal;
1230  std::vector<Double_t> vecDCal;
1231  for(auto p : *fTriggerPatchInfo){
1232  AliEMCALTriggerPatchInfo *recpatch = static_cast<AliEMCALTriggerPatchInfo *>(p);
1233  if (recpatch) {
1234 
1235  if(!recpatch->IsJetHighSimple()) continue;
1236 
1237  histname = "TriggerSimHistograms/hEtaVsPhi";
1238  fHistManager.FillTH2(histname.Data(), recpatch->GetEtaGeo(), recpatch->GetPhiGeo());
1239 
1240  histname = "TriggerSimHistograms/hPatchE";
1241  fHistManager.FillTH2(histname.Data(), fCent, recpatch->GetPatchE());
1242 
1243  if (recpatch->IsEMCal()) {
1244  vecEMCal.push_back(recpatch->GetPatchE());
1245  } else {
1246  vecDCal.push_back(recpatch->GetPatchE());
1247  }
1248 
1249  }
1250  }
1251 
1252  // Compute the median in each calorimeter
1253  const Int_t nBkgPatchesEMCal = vecEMCal.size(); // 6*8;
1254  const Int_t nBkgPatchesDCal = vecDCal.size(); // 4*5;
1255  fMedianEMCal = TMath::Median(nBkgPatchesEMCal, &vecEMCal[0]); // point to array used internally by vector
1256  fMedianDCal = TMath::Median(nBkgPatchesDCal, &vecDCal[0]);
1257 
1258  histname = "TriggerSimHistograms/hPatchMedianE";
1259  fHistManager.FillTH3(histname.Data(), fCent, fMedianEMCal, kEMCal);
1260  fHistManager.FillTH3(histname.Data(), fCent, fMedianDCal, kDCal);
1261 
1262  histname = "TriggerSimHistograms/hNPatches";
1263  fHistManager.FillTH2(histname.Data(), nBkgPatchesEMCal, kEMCal);
1264  fHistManager.FillTH2(histname.Data(), nBkgPatchesDCal, kDCal);
1265 
1266  // Median patch energy vs. pT for dijets
1267  if (fDijet.isAccepted) {
1268  histname = "TriggerSimHistograms/hMedPatchDijet";
1270  fHistManager.FillTHnSparse(histname, x);
1272  fHistManager.FillTHnSparse(histname, y);
1273  }
1274 
1275  // Then compute background subtracted patches, by subtracting from each patch the median patch E from the opposite hemisphere
1276  // If a patch is above threshold, the event is "triggered"
1277  Bool_t fkEMCEJE = kFALSE;
1278  Double_t threshold = 20;
1279  for(auto p : *fTriggerPatchInfo){
1280  AliEMCALTriggerPatchInfo *recpatch = static_cast<AliEMCALTriggerPatchInfo *>(p);
1281  if (recpatch) {
1282 
1283  if(!recpatch->IsJetHighSimple()) continue;
1284 
1285  if (recpatch->IsEMCal()) {
1286  if ((recpatch->GetPatchE() - fMedianDCal) > threshold) {
1287  fkEMCEJE = kTRUE;
1288  break;
1289  }
1290  } else {
1291  if ((recpatch->GetPatchE() - fMedianEMCal) > threshold) {
1292  fkEMCEJE = kTRUE;
1293  break;
1294  }
1295  }
1296  }
1297  }
1298 
1299  if (fkEMCEJE) {
1301  }
1302 
1303 }
1304 
1310 {
1312 
1313  // Loop over jets and find leading jet within R of fDijet.trigJet
1314  AliEmcalJet *matchingTrigJet = 0;
1315  for(auto matchingTrigJetCand : jetCont->accepted()) {
1316  if (!matchingTrigJetCand) continue;
1317  if ( GetDeltaR(matchingTrigJetCand, fDijet.trigJet) > fMatchingJetR ) continue;
1318  if (matchingTrigJet) {
1319  if ( GetJetPt(jetCont, matchingTrigJetCand) < GetJetPt(jetCont, matchingTrigJet) ) continue;
1320  }
1321  matchingTrigJet = matchingTrigJetCand;
1322  }
1323  if (!matchingTrigJet) return;
1324 
1325  // Loop over jets and find leading jet within R of fDijet.assJet
1326  AliEmcalJet *matchingAssJet = 0;
1327  for(auto matchingAssJetCand : jetCont->accepted()) {
1328  if (!matchingAssJetCand) continue;
1329  if ( GetDeltaR(matchingAssJetCand, fDijet.assJet) > fMatchingJetR ) continue;
1330  if (matchingAssJet) {
1331  if ( GetJetPt(jetCont, matchingAssJetCand) < GetJetPt(jetCont, matchingAssJet) ) continue;
1332  }
1333  matchingAssJet = matchingAssJetCand;
1334  }
1335 
1336  // Determine which matching jet is the leading jet (i.e. allow them to flip)
1337  if (matchingAssJet) {
1338  AliEmcalJet* trigJet = matchingTrigJet;
1339  AliEmcalJet* assJet = matchingAssJet;
1340  if ( GetJetPt(jetCont, matchingTrigJet) < GetJetPt(jetCont, matchingAssJet) ) {
1341  AliEmcalJet* trigJet = matchingAssJet;
1342  AliEmcalJet* assJet = matchingTrigJet;
1343  }
1344 
1345  // Fill the dijet struct
1346  fMatchingDijet.trigJet = trigJet;
1347  fMatchingDijet.trigJetPt = GetJetPt(jetCont, trigJet);
1348  fMatchingDijet.trigJetEta = trigJet->Eta();
1349  fMatchingDijet.trigJetPhi = trigJet->Phi();
1350 
1351  fMatchingDijet.assJet = assJet;
1352  fMatchingDijet.assJetPt = GetJetPt(jetCont, assJet);
1353  fMatchingDijet.assJetPhi = assJet->Phi();
1354  fMatchingDijet.assJetEta = assJet->Eta();
1356 
1357  fMatchingDijet.deltaPhi = TMath::Abs(trigJet->Phi() - assJet->Phi());
1358  fMatchingDijet.deltaEta = trigJet->Eta() - assJet->Eta();
1361  fMatchingDijet.kTy = TMath::Abs( fMatchingDijet.trigJetPt * TMath::Sin(fMatchingDijet.deltaPhi) );
1362  }
1363 }
1364 
1369 {
1370  // Loop over tracks and clusters in order to:
1371  // (1) Compute scale factor for full jets
1372  // (2) Compute delta-pT for full jets, with the random cone method
1373  // For both the scale factor and delta-pT, we compute only one histogram each for EMCal.
1374  // And then we bin in eta-phi, in order to compute and perform a corretion to account for the DCal vs. PHOS vs. gap
1375 
1376  // Define the acceptance boundaries for the TPC and EMCal/DCal/PHOS
1377  Double_t etaTPC = 0.9;
1378  Double_t etaEMCal = 0.7;
1379  Double_t etaMinDCal = 0.22;
1380  Double_t etaMaxPHOS = 0.13;
1381  Double_t phiMinEMCal = fGeom->GetArm1PhiMin() * TMath::DegToRad(); // 80
1382  Double_t phiMaxEMCal = fGeom->GetEMCALPhiMax() * TMath::DegToRad(); // ~188
1383  Double_t phiMinDCal = fGeom->GetDCALPhiMin() * TMath::DegToRad(); // 260
1384  Double_t phiMaxDCal = fGeom->GetDCALPhiMax() * TMath::DegToRad(); // ~327 (1/3 SMs start at 320)
1385  Double_t phiMinPHOS = 250 * TMath::DegToRad();
1386  Double_t phiMaxPHOS = 320 * TMath::DegToRad();
1387 
1388  Double_t accTPC = 2 * etaTPC * 2 * TMath::Pi();
1389  Double_t accEMCal = 2 * etaEMCal * (phiMaxEMCal - phiMinEMCal);
1390  Double_t accDCalRegion = 2 * etaEMCal * (phiMaxDCal - phiMinDCal);
1391 
1392  // Loop over jet containers
1393  AliJetContainer* jetCont = 0;
1394  TIter nextJetColl(&fJetCollArray);
1395  while ((jetCont = static_cast<AliJetContainer*>(nextJetColl()))) {
1396 
1397  // Define fiducial acceptances, to be used to generate random cones
1398  TRandom3* r = new TRandom3(0);
1399  Double_t jetR = jetCont->GetJetRadius();
1400  Double_t accRC = TMath::Pi() * jetR * jetR;
1401  Double_t etaEMCalfid = etaEMCal - jetR;
1402  Double_t phiMinEMCalfid = phiMinEMCal + jetR;
1403  Double_t phiMaxEMCalfid = phiMaxEMCal - jetR;
1404  Double_t phiMinDCalRegionfid = phiMinDCal + jetR;
1405  Double_t phiMaxDCalRegionfid = phiMaxDCal - jetR;
1406 
1407  // Generate EMCal random cone eta-phi
1408  Double_t etaEMCalRC = r->Uniform(-etaEMCalfid, etaEMCalfid);
1409  Double_t phiEMCalRC = r->Uniform(phiMinEMCalfid, phiMaxEMCalfid);
1410 
1411  // For eta-phi correction, generate random eta, phi in each eta/phi bin, to be used as center of random cone
1412  Double_t etaDCalRC[fNEtaBins]; // array storing the RC eta values
1413  Double_t etaStep = 1./fNEtaBins;
1414  Double_t etaMin;
1415  Double_t etaMax;
1416  for (Int_t etaBin=0; etaBin < fNEtaBins; etaBin++) {
1417  etaMin = -etaEMCalfid + etaBin*etaStep;
1418  etaMax = etaMin + etaStep;
1419  etaDCalRC[etaBin] = r->Uniform(etaMin, etaMax);
1420  }
1421 
1422  Double_t phiDCalRC[fNPhiBins]; // array storing the RC phi values
1423  Double_t phiStep = 5./fNPhiBins; // phi axis is [1,6] in order to have simple binning
1424  Double_t phiMin;
1425  Double_t phiMax;
1426  for (Int_t phiBin=0; phiBin < fNPhiBins; phiBin++) {
1427  phiMin = 1 + phiBin*phiStep;
1428  phiMax = phiMin + phiStep;
1429  phiDCalRC[phiBin] = r->Uniform(phiMin, phiMax);
1430  }
1431 
1432  // Initialize the various sums to 0
1433  Double_t trackPtSumTPC = 0;
1434  Double_t trackPtSumEMCal = 0;
1435  Double_t trackPtSumEMCalRC = 0;
1436  Double_t clusESumEMCal = 0;
1437  Double_t clusESumEMCalRC = 0;
1438 
1439  // Define a 2D vector (initialized to 0) to store the sum of track pT, and another for cluster ET
1440  std::vector<std::vector<Double_t>> trackPtSumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1441  std::vector<std::vector<Double_t>> clusESumDCalRC(fNEtaBins, std::vector<Double_t>(fNPhiBins));
1442 
1443  // Loop over tracks. Sum the track pT:
1444  // (1) in the entire TPC, (2) in the EMCal, (3) in the EMCal random cone,
1445  // (4) in a random cone at each eta-phi
1446  AliTrackContainer* trackCont = dynamic_cast<AliTrackContainer*>(GetParticleContainer("tracks"));
1447  AliTLorentzVector track;
1448  Double_t trackEta;
1449  Double_t trackPhi;
1450  Double_t trackPt;
1451  Double_t deltaR;
1452  for (auto trackIterator : trackCont->accepted_momentum() ) {
1453 
1454  track.Clear();
1455  track = trackIterator.first;
1456  trackEta = track.Eta();
1457  trackPhi = track.Phi_0_2pi();
1458  trackPt = track.Pt();
1459 
1460  // (1)
1461  if (TMath::Abs(trackEta) < etaTPC) {
1462  trackPtSumTPC += trackPt;
1463  }
1464 
1465  // (2)
1466  if (TMath::Abs(trackEta) < etaEMCal && trackPhi > phiMinEMCal && trackPhi < phiMaxEMCal) {
1467  trackPtSumEMCal += trackPt;
1468  }
1469 
1470  // (3)
1471  deltaR = GetDeltaR(&track, etaEMCalRC, phiEMCalRC);
1472  if (deltaR < jetR) {
1473  trackPtSumEMCalRC += trackPt;
1474  }
1475 
1476  // (4)
1477  for (Int_t etaBin=0; etaBin < fNEtaBins; etaBin++) {
1478  for (Int_t phiBin=0; phiBin < fNPhiBins; phiBin++) {
1479  deltaR = GetDeltaR(&track, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1480  if (deltaR < jetR) {
1481  trackPtSumDCalRC[etaBin][phiBin] += trackPt;
1482  }
1483  }
1484  }
1485 
1486  }
1487 
1488  // Loop over clusters. Sum the cluster ET:
1489  // (1) in the EMCal, (2) in the EMCal random cone, (3) in a random cone at each eta-phi
1491  AliTLorentzVector clus;
1492  Double_t clusEta;
1493  Double_t clusPhi;
1494  Double_t clusE;
1495  for (auto clusIterator : clusCont->accepted_momentum() ) {
1496 
1497  clus.Clear();
1498  clus = clusIterator.first;
1499  clusEta = clus.Eta();
1500  clusPhi = clus.Phi_0_2pi();
1501  clusE = clus.E();
1502 
1503  // (1)
1504  if (TMath::Abs(clusEta) < etaEMCal && clusPhi > phiMinEMCal && clusPhi < phiMaxEMCal) {
1505  clusESumEMCal += clusE;
1506  }
1507 
1508  // (2)
1509  deltaR = GetDeltaR(&clus, etaEMCalRC, phiEMCalRC);
1510  if (deltaR < jetR) {
1511  clusESumEMCalRC += clusE;
1512  }
1513 
1514  // (3)
1515  for (Int_t etaBin=0; etaBin < fNEtaBins; etaBin++) {
1516  for (Int_t phiBin=0; phiBin < fNPhiBins; phiBin++) {
1517  deltaR = GetDeltaR(&clus, etaDCalRC[etaBin], phiDCalRC[phiBin]);
1518  if (deltaR < jetR) {
1519  clusESumDCalRC[etaBin][phiBin] += clusE;
1520  }
1521  }
1522  }
1523 
1524  }
1525 
1526  // Compute the scale factor for EMCal, as a function of centrality
1527  Double_t numerator = (trackPtSumEMCal + clusESumEMCal) / accEMCal;
1528  Double_t denominator = trackPtSumTPC / accTPC;
1529  Double_t scaleFactor = numerator / denominator;
1530  TString histname = TString::Format("%s/BackgroundHistograms/hScaleFactorEMCal", jetCont->GetArrayName().Data());
1531  fHistManager.FillTH2(histname, fCent, scaleFactor);
1532 
1533  // Compute the scale factor in each eta-phi bin, as a function of centrality
1534  for (Int_t etaBin=0; etaBin < fNEtaBins; etaBin++) {
1535  for (Int_t phiBin=0; phiBin < fNPhiBins; phiBin++) {
1536  numerator = (trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin]) / accRC;
1537  scaleFactor = numerator / denominator;
1538  histname = TString::Format("%s/BackgroundHistograms/hScaleFactorEtaPhi", jetCont->GetArrayName().Data());
1539  Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin], fCent, scaleFactor};
1540  fHistManager.FillTHnSparse(histname, x);
1541  }
1542  }
1543 
1544  // Compute delta pT for EMCal, as a function of centrality
1545  Double_t rho = jetCont->GetRhoVal();
1546  Double_t deltaPt = trackPtSumEMCalRC + clusESumEMCalRC - rho * TMath::Pi() * jetR * jetR;
1547  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtEMCal", jetCont->GetArrayName().Data());
1548  fHistManager.FillTH2(histname, fCent, deltaPt);
1549 
1550  // Compute delta pT in each eta-phi bin, as a function of centrality
1551  Double_t sf;
1552  for (Int_t etaBin=0; etaBin < fNEtaBins; etaBin++) {
1553  for (Int_t phiBin=0; phiBin < fNPhiBins; phiBin++) {
1555  sf = fBackgroundScalingWeights->GetBinContent(fBackgroundScalingWeights->FindBin(etaDCalRC[etaBin], phiDCalRC[phiBin]));
1556  rho = sf * jetCont->GetRhoVal();
1557  }
1558  deltaPt = trackPtSumDCalRC[etaBin][phiBin] + clusESumDCalRC[etaBin][phiBin] - rho * accRC;
1559  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtEtaPhi", jetCont->GetArrayName().Data());
1560  Double_t x[4] = {etaDCalRC[etaBin], phiDCalRC[phiBin], fCent, deltaPt};
1561  fHistManager.FillTHnSparse(histname, x);
1562  }
1563  }
1564 
1565  delete r;
1566 
1567  }
1568 
1569 }
1570 
1575 {
1576 
1577  // Get eta-phi dependent jet pT scale factor
1578  Double_t jetPt = jet->Pt();
1579  if (fGapJetScalingWeights) {
1580  Double_t sf = fGapJetScalingWeights->GetBinContent(fGapJetScalingWeights->FindBin(jet->Eta(), jet->Phi_0_2pi()));
1581  jetPt = jetPt * (1 + sf * jet->NEF());
1582  }
1583 
1584  // Compute pTcorr
1585  Double_t rho = jetCont->GetRhoVal();
1586  Double_t pT = jetPt - rho * jet->Area();
1587 
1588  // If hard-core jet, don't subtract background
1589  TString jetContName = jetCont->GetName();
1590  if (jetContName.Contains("HardCore")) pT = jet->Pt();
1591 
1592  return pT;
1593 }
1594 
1599 {
1600  AliEmcalJet* leadingJet = 0;
1601 
1602  if (jetCont->GetRhoParameter()) {
1603  for(auto jetCand : jetCont->accepted()) {
1604  if (!jetCand) continue;
1605  Double_t jetCandPt = GetJetPt(jetCont, jetCand);
1606  if (leadingJet) {
1607  Double_t leadingJetPt = GetJetPt(jetCont, leadingJet);
1608  if ( jetCandPt < leadingJetPt ) continue;
1609  }
1610  leadingJet = jetCand;
1611  }
1612  }
1613  else {
1614  leadingJet = jetCont->GetLeadingJet();
1615  }
1616 
1617  return leadingJet;
1618 }
1619 
1624 {
1625  Double_t deltaPhi = TMath::Abs(jet1->Phi() - jet2->Phi());
1626  Double_t deltaEta = TMath::Abs(jet1->Eta() - jet2->Eta());
1627  Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1628  return deltaR;
1629 }
1630 
1635 {
1636  Double_t deltaPhi = TMath::Abs(part->Phi_0_2pi() - phiRef);
1637  Double_t deltaEta = TMath::Abs(part->Eta() - etaRef);
1638  Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1639  return deltaR;
1640 }
1641 
1646 {
1647  UInt_t jetType = jet->GetJetAcceptanceType();
1648  Double_t type = -1;
1649  if (jetType & AliEmcalJet::kEMCAL) {
1650  type = kEMCal;
1651  }
1652  else if (jetType & AliEmcalJet::kDCALonly) {
1653  type = kDCal;
1654  }
1655  else if (jetType & AliEmcalJet::kPHOS) {
1656  type = kPHOS;
1657  }
1658 
1659  return type;
1660 }
1661 
1662 
1670 {
1671  if (fPlotJetHistograms) {
1673  }
1674  if (fComputeBackground) {
1676  }
1677 
1678  return kTRUE;
1679 }
1680 
1686 {
1687  TString histname;
1688  AliJetContainer* jets = 0;
1689  TIter nextJetColl(&fJetCollArray);
1690  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1691  TString jetContName = jets->GetName();
1692  if (jetContName.Contains("HardCore")) continue;
1693  Double_t rhoVal = 0;
1694  if (jets->GetRhoParameter()) {
1695  rhoVal = jets->GetRhoVal();
1696  histname = TString::Format("%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
1697  fHistManager.FillTH2(histname.Data(), fCent, rhoVal);
1698  }
1699 
1700  for (auto jet : jets->all()) {
1701 
1702  Float_t ptLeading = jets->GetLeadingHadronPt(jet);
1703  Float_t corrPt = GetJetPt(jets, jet);
1704 
1705  // A vs. pT (fill before area cut)
1706  histname = TString::Format("%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
1707  fHistManager.FillTH2(histname.Data(), corrPt, jet->Area());
1708 
1709 
1710  // Rejection reason
1711  UInt_t rejectionReason = 0;
1712  if (!jets->AcceptJet(jet, rejectionReason)) {
1713  histname = TString::Format("%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1714  fHistManager.FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
1715  continue;
1716  }
1717 
1718  // compute jet acceptance type
1719  Double_t type = GetJetType(jet);
1720 
1721  // (Centrality, pT, calo type)
1722  histname = TString::Format("%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
1723  fHistManager.FillTH3(histname.Data(), fCent, corrPt, type);
1724 
1725  // (Centrality, eta, phi, pT, NEF, calo type)
1726  histname = TString::Format("%s/JetHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
1727  Double_t x[6] = {fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
1728  fHistManager.FillTHnSparse(histname, x);
1729 
1730  // (Centrality, pT upscaled, calo type)
1731  histname = TString::Format("%s/JetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
1732  fHistManager.FillTH3(histname.Data(), fCent, corrPt, type, fMBUpscaleFactor);
1733 
1734  // pT-leading vs. pT
1735  histname = TString::Format("%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1736  fHistManager.FillTH2(histname.Data(), corrPt, ptLeading);
1737 
1738  // (Centrality, pT, z-leading (charged), calo type)
1739  TLorentzVector leadPart;
1740  jets->GetLeadingHadronMomentum(leadPart, jet);
1741  Double_t z = GetParallelFraction(leadPart.Vect(), jet);
1742  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
1743  histname = TString::Format("%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1744  Double_t y[4] = {fCent, corrPt, z, type};
1745  fHistManager.FillTHnSparse(histname, y);
1746 
1747  // (Centrality, pT, z (charged), calo type)
1748  histname = TString::Format("%s/JetHistograms/hZVsPt", jets->GetArrayName().Data());
1749  AliVTrack* track;
1750  for (Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
1751  track = static_cast<AliVTrack*>(jet->Track(i));
1752  z = track->Pt() / TMath::Abs(corrPt);
1753  Double_t y2[4] = {fCent, corrPt, z, type};
1754  fHistManager.FillTHnSparse(histname, y2);
1755  }
1756 
1757  // (Centrality, pT, Nconst, calo type)
1758  histname = TString::Format("%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
1759  Double_t a[4] = {fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
1760  fHistManager.FillTHnSparse(histname, a);
1761 
1762  // (Median patch energy, calo type, jet pT, centrality)
1763  if (fDoTriggerSimulation) {
1764  histname = TString::Format("%s/JetHistograms/hMedPatchJet", jets->GetArrayName().Data());
1765  Double_t x[4] = {fMedianEMCal, kEMCal, corrPt, fCent};
1766  fHistManager.FillTHnSparse(histname, x);
1767  Double_t y[4] = {fMedianDCal, kDCal, corrPt, fCent};
1768  fHistManager.FillTHnSparse(histname, y);
1769  }
1770 
1771  } //jet loop
1772 
1773  }
1774 }
1775 
1781 {
1782  TString histname;
1783  AliJetContainer* jets = 0;
1784  TIter nextJetColl(&fJetCollArray);
1785  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1786  TString jetContName = jets->GetName();
1787  if (jetContName.Contains("HardCore")) continue;
1788  Double_t rhoVal = 0;
1789  if (jets->GetRhoParameter()) {
1790  rhoVal = jets->GetRhoVal();
1791  histname = TString::Format("%s/TriggerSimHistograms/hRhoVsCent", jets->GetArrayName().Data());
1792  fHistManager.FillTH2(histname.Data(), fCent, rhoVal);
1793  }
1794 
1795  for (auto jet : jets->all()) {
1796 
1797  Float_t ptLeading = jets->GetLeadingHadronPt(jet);
1798  Float_t corrPt = GetJetPt(jets, jet);
1799 
1800  // A vs. pT (fill before area cut)
1801  histname = TString::Format("%s/TriggerSimHistograms/hAreaVsPt", jets->GetArrayName().Data());
1802  fHistManager.FillTH2(histname.Data(), corrPt, jet->Area());
1803 
1804 
1805  // Rejection reason
1806  UInt_t rejectionReason = 0;
1807  if (!jets->AcceptJet(jet, rejectionReason)) {
1808  histname = TString::Format("%s/TriggerSimHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1809  fHistManager.FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
1810  continue;
1811  }
1812 
1813  // compute jet acceptance type
1814  Double_t type = GetJetType(jet);
1815 
1816  // Centrality vs. pT
1817  histname = TString::Format("%s/TriggerSimHistograms/hCentVsPt", jets->GetArrayName().Data());
1818  fHistManager.FillTH3(histname.Data(), fCent, corrPt, type);
1819 
1820  // (Centrality, eta, phi, pT, NEF, calo type)
1821  histname = TString::Format("%s/TriggerSimHistograms/hNEFVsPtVsEtaVsPhi", jets->GetArrayName().Data());
1822  Double_t x[6] = {fCent, jet->Eta(), jet->Phi_0_2pi(), corrPt, jet->NEF(), type};
1823  fHistManager.FillTHnSparse(histname, x);
1824 
1825  // pT-leading vs. pT
1826  histname = TString::Format("%s/TriggerSimHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1827  fHistManager.FillTH2(histname.Data(), corrPt, ptLeading);
1828 
1829  // (Centrality, pT, z-leading (charged), calo type)
1830  TLorentzVector leadPart;
1831  jets->GetLeadingHadronMomentum(leadPart, jet);
1832  Double_t z = GetParallelFraction(leadPart.Vect(), jet);
1833  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
1834  histname = TString::Format("%s/TriggerSimHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1835  Double_t y[4] = {fCent, corrPt, z, type};
1836  fHistManager.FillTHnSparse(histname, y);
1837 
1838  // (Centrality, pT, z (charged), calo type)
1839  histname = TString::Format("%s/TriggerSimHistograms/hZVsPt", jets->GetArrayName().Data());
1840  AliVTrack* track;
1841  for (Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
1842  track = static_cast<AliVTrack*>(jet->Track(i));
1843  z = track->Pt() / TMath::Abs(corrPt);
1844  Double_t y2[4] = {fCent, corrPt, z, type};
1845  fHistManager.FillTHnSparse(histname, y2);
1846  }
1847 
1848  // (Centrality, pT, Nconst, calo type)
1849  histname = TString::Format("%s/TriggerSimHistograms/hNConstVsPt", jets->GetArrayName().Data());
1850  Double_t a[4] = {fCent, corrPt, 1.*jet->GetNumberOfConstituents(), type};
1851  fHistManager.FillTHnSparse(histname, a);
1852 
1853  } //jet loop
1854 
1855  }
1856 }
1857 
1862 {
1863  Double_t contents[30]={0};
1864  TString histname = TString::Format("%s/DijetCandObservables", jets->GetArrayName().Data());
1865  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
1866  if (!histJetObservables) return;
1867  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1868  TString title(histJetObservables->GetAxis(n)->GetTitle());
1869  if (title=="Centrality (%)")
1870  contents[n] = fCent;
1871  else if (title=="LeadingHadronRequired")
1872  contents[n] = fDijet.leadingHadronCutType;
1873  else if (title=="#it{p}_{T,trig jet} (GeV/#it{c})")
1874  contents[n] = fDijet.trigJetPt;
1875  else if (title=="#it{p}_{T,ass jet} (GeV/#it{c})")
1876  contents[n] = fDijet.assJetPt;
1877  else if (title=="#phi_{trig jet}")
1878  contents[n] = fDijet.trigJetPhi;
1879  else if (title=="#phi_{ass jet}")
1880  contents[n] = fDijet.assJetPhi;
1881  else if (title=="#eta_{trig jet}")
1882  contents[n] = fDijet.trigJetEta;
1883  else if (title=="#eta_{ass jet}")
1884  contents[n] = fDijet.assJetEta;
1885  else
1886  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1887  }
1888  histJetObservables->Fill(contents);
1889 }
1890 
1895 {
1896  // Fill the dijet imbalance histogram (unless doing trigger simulation, in which case bypass this)
1897  if (!fDoTriggerSimulation) {
1898  Double_t contents[30]={0};
1899  TString histname = TString::Format("%s/DijetImbalanceObservables", jets->GetArrayName().Data());
1900  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
1901  if (!histJetObservables) return;
1902  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1903  TString title(histJetObservables->GetAxis(n)->GetTitle());
1904  if (title=="Centrality (%)")
1905  contents[n] = fCent;
1906  else if (title=="#Delta#phi")
1907  contents[n] = fDijet.deltaPhi;
1908  else if (title=="#Delta#eta")
1909  contents[n] = fDijet.deltaEta;
1910  else if (title=="A_{J}")
1911  contents[n] = fDijet.AJ;
1912  else if (title=="x_{J}")
1913  contents[n] = fDijet.xJ;
1914  else if (title=="k_{Ty} (GeV)")
1915  contents[n] = fDijet.kTy;
1916  else if (title=="N_{tracks, trig jet}")
1917  contents[n] = fDijet.trigJet->GetNumberOfTracks();
1918  else if (title=="N_{tracks, ass jet}")
1919  contents[n] = fDijet.assJet->GetNumberOfTracks();
1920  else
1921  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1922  }
1923  histJetObservables->Fill(contents);
1924  }
1925 
1926  // (Centrality, pT1, pT2) (upscaled)
1927  TString histname = TString::Format("%s/DijetJetHistograms/hPtUpscaledMB", jets->GetArrayName().Data());
1929 
1930  // Get jet acceptance type
1931  AliEmcalJet* trigJet = fDijet.trigJet;
1932  Double_t type = GetJetType(trigJet);
1933 
1934  // (Centrality, pT, NEF, calo type)
1935  histname = TString::Format("%s/DijetJetHistograms/hNEFVsPt", jets->GetArrayName().Data());
1936  Double_t x[4] = {fCent, fDijet.trigJetPt, trigJet->NEF(), type};
1937  fHistManager.FillTHnSparse(histname, x);
1938 
1939  // (Centrality, pT, z-leading (charged), calo type)
1940  histname = TString::Format("%s/DijetJetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1941  TLorentzVector leadPart;
1942  jets->GetLeadingHadronMomentum(leadPart, trigJet);
1943  Double_t z = GetParallelFraction(leadPart.Vect(), trigJet);
1944  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
1945  Double_t y[4] = {fCent, fDijet.trigJetPt, z, type};
1946  fHistManager.FillTHnSparse(histname, y);
1947 
1948  // (Centrality, pT, z (charged), calo type)
1949  histname = TString::Format("%s/DijetJetHistograms/hZVsPt", jets->GetArrayName().Data());
1950  AliVTrack* track;
1951  for (Int_t i=0; i<trigJet->GetNumberOfTracks(); i++) {
1952  track = static_cast<AliVTrack*>(trigJet->Track(i));
1953  z = track->Pt() / TMath::Abs(fDijet.trigJetPt);
1954  Double_t y2[4] = {fCent, fDijet.trigJetPt, z, type};
1955  fHistManager.FillTHnSparse(histname, y2);
1956  }
1957 
1958  // (Centrality, pT, Nconst, calo type)
1959  histname = TString::Format("%s/DijetJetHistograms/hNConstVsPt", jets->GetArrayName().Data());
1960  Double_t a[4] = {fCent, fDijet.trigJetPt, 1.*trigJet->GetNumberOfConstituents(), type};
1961  fHistManager.FillTHnSparse(histname, a);
1962 
1963 }
1964 
1969 {
1970  Double_t contents[30]={0};
1971  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
1972  if (!histJetObservables) return;
1973  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1974  TString title(histJetObservables->GetAxis(n)->GetTitle());
1975  if (title=="A_{J}")
1976  contents[n] = fDijet.AJ;
1977  else if (title=="#Delta#phi")
1978  contents[n] = deltaPhi;
1979  else if (title=="#it{p}_{T,particle} (GeV/#it{c})")
1980  contents[n] = trackPt;
1981  else if (title=="#it{p}_{T}#parallel (GeV/#it{c})")
1982  contents[n] = balancePt;
1983  else
1984  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1985  }
1986  histJetObservables->Fill(contents);
1987 }
1988 
1993 {
1994  // Matching efficiency histogram
1995  TString histname = "GeometricalMatchingEfficiency";
1996 
1997  // If we have a matching di-jet, fill the geometrical matching histogram
1998  if (fMatchingDijet.assJet) {
1999  fHistManager.FillTH1(histname.Data(), 1);
2000 
2003  Bool_t isSwitched = trigDeltaR > fMatchingJetR;
2004 
2005  TString thnname = "GeometricalMatching";
2006  Double_t contents[30]={0};
2007  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(thnname.Data()));
2008  if (!histJetObservables) return;
2009  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
2010  TString title(histJetObservables->GetAxis(n)->GetTitle());
2011  if (title=="Centrality (%)")
2012  contents[n] = fCent;
2013  else if (title=="isSwitched")
2014  contents[n] = isSwitched;
2015  else if (title=="#DeltaR_{trig}")
2016  contents[n] = trigDeltaR;
2017  else if (title=="#DeltaR_{ass}")
2018  contents[n] = assDeltaR;
2019  else if (title=="trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2020  contents[n] = fMatchingDijet.trigJetPt - fDijet.trigJetPt;
2021  else if (title=="ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
2022  contents[n] = fMatchingDijet.assJetPt - fDijet.assJetPt;
2023  else if (title=="A_{J} low-threshold")
2024  contents[n] = fMatchingDijet.AJ;
2025  else if (title=="A_{J} hard-core")
2026  contents[n] = fDijet.AJ;
2027  else
2028  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
2029  }
2030  histJetObservables->Fill(contents);
2031  }
2032  else {
2033  fHistManager.FillTH1(histname.Data(), 0.);
2034  }
2035 }
AliEmcalJet * GetLeadingJet(AliJetContainer *jetCont)
Double_t Area() const
Definition: AliEmcalJet.h:123
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:27
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)
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.
Declaration of class AliAnalysisTaskEmcalEmbeddingHelper.
TH2D * fGapJetScalingWeights
Histogram storing eta-phi weights scaling jets near the gap region.
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.
bool AddQAPlotsToList(TList *list)
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="")
bool IsInitialized() const
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:262
Double_t Phi_0_2pi() const
EMCal acceptance.
Definition: AliEmcalJet.h:62
Implementation of task to embed external events.
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
Definition: External.C:228
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
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
void LoadBackgroundScalingHistogram(const char *path="alien:///alice/cern.ch/user/j/jmulliga/scaleFactorEMCalLHC15o.root", const char *name1="hEtaPhiSFCorrection", const char *name2="hEtaPhiJetPtCorrection")
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
AliRhoParameter * GetRhoParameter()
Bool_t fComputeMBDownscaling
Set whether to compute and plot MB downscaling factors.
Double_t Pt() const
Definition: AliEmcalJet.h:102
virtual Bool_t IsEventSelected()
Performing event selection.
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
AliEmcalList * fOutput
!output list
Definition: External.C:220
Bool_t fLoadBackgroundScalingWeights
Flag to load eta-phi weights for full-jet background scale factors.
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
const AliTrackIterableMomentumContainer accepted_momentum() const
Int_t GetRunNumber(TString)
Definition: PlotMuonQA.C:2235
Dijet_t fMatchingDijet
! low-threshold matching dijet, for matching study
TH2D * fBackgroundScalingWeights
Histogram storing eta-phi weights for full-jet background scale factors.
void SetRejectionReasonLabels(TAxis *axis)
void UserCreateOutputObjects()
Main initialization function on the worker.
AliEmcalEmbeddingQA fEmbeddingQA
! QA hists for embedding (will only be added if embedding)
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
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 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.
const AliJetIterableContainer all() const
static const AliAnalysisTaskEmcalEmbeddingHelper * GetInstance()