AliPhysics  a5cd6b6 (a5cd6b6)
 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 <TClonesArray.h>
17 #include <TH1F.h>
18 #include <TH2F.h>
19 #include <TList.h>
20 #include <THnSparse.h>
21 #include <TRandom3.h>
22 
23 #include <AliVCluster.h>
24 #include <AliVParticle.h>
25 #include <AliLog.h>
26 
27 #include "AliTLorentzVector.h"
28 #include "AliEmcalJet.h"
29 #include "AliRhoParameter.h"
30 #include "AliJetContainer.h"
31 #include "AliParticleContainer.h"
32 #include "AliClusterContainer.h"
33 #include "AliEMCALGeometry.h"
34 
36 
40 
46  fHistManager(),
47  fEventCuts(0),
48  fEventCutList(0),
49  fUseManualEventCuts(kFALSE),
50  fDeltaPhiMin(0),
51  fMinTrigJetPt(0),
52  fMinAssJetPt(0),
53  fDijetLeadingHadronPt(0),
54  fMaxPt(250),
55  fNCentHistBins(0),
56  fCentHistBins(0),
57  fPlotJetHistograms(kFALSE),
58  fPlotDijetCandHistograms(kFALSE),
59  fPlotDijetImbalanceHistograms(kFALSE),
60  fComputeBackground(kFALSE),
61  fDoMomentumBalance(kFALSE),
62  fDoGeometricalMatching(kFALSE),
63  fMatchingJetR(0.2),
64  fTrackConstituentThreshold(0),
65  fClusterConstituentThreshold(0)
66 {
70 }
71 
78  AliAnalysisTaskEmcalJet(name, kTRUE),
79  fHistManager(name),
80  fEventCuts(0),
81  fEventCutList(0),
82  fUseManualEventCuts(kFALSE),
83  fDeltaPhiMin(0),
84  fMinTrigJetPt(0),
85  fMinAssJetPt(0),
86  fDijetLeadingHadronPt(0),
87  fMaxPt(250),
88  fNCentHistBins(0),
89  fCentHistBins(0),
90  fPlotJetHistograms(kFALSE),
91  fPlotDijetCandHistograms(kFALSE),
92  fPlotDijetImbalanceHistograms(kFALSE),
93  fComputeBackground(kFALSE),
94  fDoMomentumBalance(kFALSE),
95  fDoGeometricalMatching(kFALSE),
96  fMatchingJetR(0.2),
97  fTrackConstituentThreshold(0),
98  fClusterConstituentThreshold(0)
99 {
101  Dijet_t fDijet;
103 }
104 
109 {
110 }
111 
116 {
117  fNCentHistBins = 4;
119  fCentHistBins[0] = 0;
120  fCentHistBins[1] = 10;
121  fCentHistBins[2] = 30;
122  fCentHistBins[3] = 50;
123  fCentHistBins[4] = 90;
124 }
125 
131 {
133 
139 
140  TIter next(fHistManager.GetListOfHistograms());
141  TObject* obj = 0;
142  while ((obj = next())) {
143  fOutput->Add(obj);
144  }
145 
146  // Intialize AliEventCuts
147  fEventCutList = new TList();
148  fEventCutList ->SetOwner();
149  fEventCutList ->SetName("EventCutOutput");
150 
151  fEventCuts.OverrideAutomaticTriggerSelection(fOffTrigger);
152  if(fUseManualEventCuts==1)
153  {
154  fEventCuts.SetManualMode();
155  // Configure manual settings here
156  // ...
157  }
158  fEventCuts.AddQAplotsToList(fEventCutList);
159  fOutput->Add(fEventCutList);
160 
161  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
162 }
163 
164 /*
165  * This function allocates the histograms for single jets.
166  * A set of histograms is allocated per each jet container.
167  */
169 {
170  TString histname;
171  TString title;
172 
173  Int_t nPtBins = TMath::CeilNint(fMaxPt/2);
174  Int_t minPtBin = -fMaxPt/2 + 25;
175  Int_t maxPtBin = fMaxPt/2 + 25;
176 
177  AliJetContainer* jets = 0;
178  TIter nextJetColl(&fJetCollArray);
179  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
180 
181  // Jet rejection reason
182  histname = TString::Format("%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
183  title = histname + ";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
184  TH2* hist = fHistManager.CreateTH2(histname.Data(), title.Data(), 32, 0, 32, 50, 0, 250);
185  SetRejectionReasonLabels(hist->GetXaxis());
186 
187  // Rho vs. Centrality
188  if (!jets->GetRhoName().IsNull()) {
189  histname = TString::Format("%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
190  title = histname + ";Centrality (%);#rho (GeV/#it{c});counts";
191  fHistManager.CreateTH2(histname.Data(), title.Data(), 101, 0, 101, 100, 0, 500);
192  }
193 
194  // Centrality vs. pT
195  histname = TString::Format("%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
196  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});Centrality (%);counts";
197  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, minPtBin, maxPtBin, 10, 0, 100);
198 
199  // pT vs. eta vs. phi
200  histname = TString::Format("%s/JetHistograms/hPtVsEtaVsPhi", jets->GetArrayName().Data());
201  title = histname + ";#eta_{jet} (rad);#phi_{jet} (rad);#it{p}_{T}^{corr} (GeV/#it{c})";
202  fHistManager.CreateTH3(histname.Data(), title.Data(), 50, -0.5, 0.5, 101, 0, TMath::Pi() * 2.02, 75, 0, maxPtBin);
203 
204  // pT-leading vs. pT
205  histname = TString::Format("%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
206  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});#it{p}_{T,particle}^{leading} (GeV/#it{c})";
207  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, minPtBin, maxPtBin, 150, 0, 150);
208 
209  // A vs. pT
210  histname = TString::Format("%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
211  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});#it{A}_{jet}";
212  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, minPtBin, maxPtBin, fMaxPt/3, 0, 1.5);
213 
214  // NEF vs. pT
215  histname = TString::Format("%s/JetHistograms/hNEFVsPt", jets->GetArrayName().Data());
216  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});NEF";
217  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, minPtBin, maxPtBin, fMaxPt/5, 0, 1.0);
218 
219  // z-leading vs. pT
220  histname = TString::Format("%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
221  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});#it{z}_{leading}";
222  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, minPtBin, maxPtBin, fMaxPt/5, 0, 1.0);
223 
224  // Nconst vs. pT
225  histname = TString::Format("%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
226  title = histname + ";#it{p}_{T}^{corr} (GeV/#it{c});No. of constituents";
227  fHistManager.CreateTH2(histname.Data(), title.Data(), nPtBins, minPtBin, maxPtBin, fMaxPt/5, 0, fMaxPt);
228 
229  // Allocate background subtraction histograms, if enabled
230  if (fComputeBackground) {
231 
232  histname = TString::Format("%s/BackgroundHistograms/hScaleFactorEMCal", jets->GetArrayName().Data());
233  title = histname + ";Centrality;Scale factor;counts";
234  fHistManager.CreateTH2(histname.Data(), title.Data(), 50, 0, 100, 100, 0, 5);
235 
236  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtEMCal", jets->GetArrayName().Data());
237  title = histname + ";#delta#it{p}_{T} (GeV/#it{c});counts";
238  fHistManager.CreateTH1(histname.Data(), title.Data(), 400, -100, 100);
239 
240  histname = TString::Format("%s/BackgroundHistograms/hScaleFactorDCalRegion", jets->GetArrayName().Data());
241  title = histname + ";Centrality;Scale factor;Eta bin";
242  fHistManager.CreateTH3(histname.Data(), title.Data(), 50, 0, 100, 200, 0, 10, 28, -0.5, 27.5);
243 
244  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtDCalRegion", jets->GetArrayName().Data());
245  title = histname + ";#delta#it{p}_{T} (GeV/#it{c});Eta bin;counts";
246  fHistManager.CreateTH2(histname.Data(), title.Data(), 400, -100, 100, 20, -0.5, 19.5);
247 
248  }
249 
250  }
251 
252 }
253 
254 /*
255  * This function allocates the histograms for dijet candidates, i.e. dijet pairs with the leading jet
256  * passing the trigger condition, but no condition on the subleading jet. In particular this histogram is
257  * designed to study the kinematic selection of dijets.
258  */
260 {
261  // Allocate dijet THnSparse
262  AliJetContainer* jets = 0;
263  TIter nextJetColl(&fJetCollArray);
264  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
265  TString axisTitle[30]= {""};
266  Int_t nbins[30] = {0};
267  Double_t min[30] = {0.};
268  Double_t max[30] = {0.};
269  Double_t *binEdges[20] = {0};
270  Int_t dim = 0;
271 
272  if (fForceBeamType != kpp) {
273  axisTitle[dim] = "Centrality (%)";
274  nbins[dim] = fNCentHistBins;
275  binEdges[dim] = fCentHistBins;
276  min[dim] = fCentHistBins[0];
277  max[dim] = fCentHistBins[fNCentHistBins];
278  dim++;
279  }
280 
281  axisTitle[dim] = "LeadingHadronRequired";
282  nbins[dim] = 2;
283  min[dim] = -0.5;
284  max[dim] = 1.5;
285  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
286  dim++;
287 
288  axisTitle[dim] = "#it{p}_{T,trig jet} (GeV/#it{c})";
289  nbins[dim] = fMaxPt/3;
290  min[dim] = -fMaxPt/2 + 25;
291  max[dim] = fMaxPt/2 + 25;
292  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
293  dim++;
294 
295  axisTitle[dim] = "#it{p}_{T,ass jet} (GeV/#it{c})";
296  nbins[dim] = fMaxPt/3;
297  min[dim] = -fMaxPt/2 + 25;
298  max[dim] = fMaxPt/2 + 25;
299  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
300  dim++;
301 
302  axisTitle[dim] = "#phi_{trig jet}";
303  nbins[dim] = fMaxPt/3;
304  min[dim] = 0;
305  max[dim] = TMath::TwoPi();
306  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
307  dim++;
308 
309  axisTitle[dim] = "#phi_{ass jet}";
310  nbins[dim] = fMaxPt/3;
311  min[dim] = 0;
312  max[dim] = TMath::TwoPi();
313  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
314  dim++;
315 
316  axisTitle[dim] = "#eta_{trig jet}";
317  nbins[dim] = fMaxPt/3;
318  min[dim] = -1;
319  max[dim] = 1;
320  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
321  dim++;
322 
323  axisTitle[dim] = "#eta_{ass jet}";
324  nbins[dim] = fMaxPt/3;
325  min[dim] = -1;
326  max[dim] = 1;
327  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
328  dim++;
329 
330  TString thnname = TString::Format("%s/DijetCandObservables", jets->GetArrayName().Data());
331  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
332  for (Int_t i = 0; i < dim; i++) {
333  hn->GetAxis(i)->SetTitle(axisTitle[i]);
334  hn->SetBinEdges(i, binEdges[i]);
335  }
336  }
337 }
338 
339 /*
340  * This function allocates the histograms for accepted dijets.
341  * The purpose is to study in detail the imbalance properties of the accepted dijets.
342  */
344 {
345  // Allocate dijet imbalance THnSparse
346  AliJetContainer* jets = 0;
347  TIter nextJetColl(&fJetCollArray);
348  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
349  TString axisTitle[30]= {""};
350  Int_t nbins[30] = {0};
351  Double_t min[30] = {0.};
352  Double_t max[30] = {0.};
353  Double_t *binEdges[20] = {0};
354  Int_t dim = 0;
355 
356  if (fForceBeamType != kpp) {
357  axisTitle[dim] = "Centrality (%)";
358  nbins[dim] = fNCentHistBins;
359  binEdges[dim] = fCentHistBins;
360  min[dim] = fCentHistBins[0];
361  max[dim] = fCentHistBins[fNCentHistBins];
362  dim++;
363  }
364 
365  axisTitle[dim] = "#Delta#phi";
366  nbins[dim] = 100;
367  min[dim] = 0;
368  max[dim] = 4;
369  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
370  dim++;
371 
372  axisTitle[dim] = "#Delta#eta";
373  nbins[dim] = 100;
374  min[dim] = -2;
375  max[dim] = 2;
376  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
377  dim++;
378 
379  axisTitle[dim] = "A_{J}";
380  nbins[dim] = 100;
381  min[dim] = 0;
382  max[dim] = 1;
383  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
384  dim++;
385 
386  axisTitle[dim] = "x_{J}";
387  nbins[dim] = 100;
388  min[dim] = 0;
389  max[dim] = 1;
390  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
391  dim++;
392 
393  axisTitle[dim] = "k_{Ty} (GeV)";
394  nbins[dim] = 100;
395  min[dim] = 0;
396  max[dim] = 100;
397  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
398  dim++;
399 
400  axisTitle[dim] = "N_{tracks, trig jet}";
401  nbins[dim] = fMaxPt/5;
402  min[dim] = 0;
403  max[dim] = 100;
404  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
405  dim++;
406 
407  axisTitle[dim] = "N_{tracks, ass jet}";
408  nbins[dim] = fMaxPt/5;
409  min[dim] = 0;
410  max[dim] = 100;
411  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
412  dim++;
413 
414  TString thnname = TString::Format("%s/DijetImbalanceObservables", jets->GetArrayName().Data());
415  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
416  for (Int_t i = 0; i < dim; i++) {
417  hn->GetAxis(i)->SetTitle(axisTitle[i]);
418  hn->SetBinEdges(i, binEdges[i]);
419  }
420  }
421 }
422 
423 /*
424  * This function allocates the histograms for the momentum balance study.
425  */
427 {
428  AliJetContainer* jets = 0;
429  TIter nextJetColl(&fJetCollArray);
430  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
431 
432  // Allocate THnSparse
433  TString axisTitle[30]= {""};
434  Int_t nbins[30] = {0};
435  Double_t min[30] = {0.};
436  Double_t max[30] = {0.};
437  Double_t *binEdges[20] = {0};
438  Int_t dim = 0;
439 
440  axisTitle[dim] = "A_{J}";
441  nbins[dim] = 100;
442  min[dim] = 0;
443  max[dim] = 1;
444  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
445  dim++;
446 
447  axisTitle[dim] = "#Delta#phi";
448  nbins[dim] = 100;
449  min[dim] = -4;
450  max[dim] = 4;
451  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
452  dim++;
453 
454  axisTitle[dim] = "#it{p}_{T,particle} (GeV/#it{c})";
455  nbins[dim] = 9;
456  Double_t* pTParticleBins = new Double_t[nbins[dim]+1];
457  GenerateFixedBinArray(1, 0.15, 0.3, pTParticleBins);
458  GenerateFixedBinArray(1, 0.3, 0.5, pTParticleBins+1);
459  GenerateFixedBinArray(1, 0.5, 1, pTParticleBins+2);
460  GenerateFixedBinArray(2, 1, 5, pTParticleBins+3);
461  GenerateFixedBinArray(3, 5, 20, pTParticleBins+5);
462  GenerateFixedBinArray(1, 20, 150, pTParticleBins+8);
463  min[dim] = 0;
464  max[dim] = pTParticleBins[nbins[dim]];
465  binEdges[dim] = pTParticleBins;
466  dim++;
467 
468  axisTitle[dim] = "#it{p}_{T}#parallel (GeV/#it{c})";
469  nbins[dim] = 80;
470  Double_t* pTParallelBins = new Double_t[nbins[dim]+1];
471  GenerateFixedBinArray(20, 0, 2, pTParallelBins);
472  GenerateFixedBinArray(16, 2, 10, pTParallelBins+20);
473  GenerateFixedBinArray(10, 10, 20, pTParallelBins+36);
474  GenerateFixedBinArray(10, 20, 40, pTParallelBins+46);
475  GenerateFixedBinArray(24, 40, 150, pTParallelBins+56);
476  min[dim] = 0;
477  max[dim] = pTParallelBins[nbins[dim]];
478  binEdges[dim] = pTParallelBins;
479  dim++;
480 
481  TString thnname = TString::Format("%s/MomentumBalance", jets->GetArrayName().Data());
482  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
483  for (Int_t i = 0; i < dim; i++) {
484  hn->GetAxis(i)->SetTitle(axisTitle[i]);
485  hn->SetBinEdges(i, binEdges[i]);
486  }
487  }
488 }
489 
490 /*
491  * This function allocates the histograms for the constituent dijet study.
492  */
494 {
495  // Allocate geometrical matching THnSparse
496  TString axisTitle[30]= {""};
497  Int_t nbins[30] = {0};
498  Double_t min[30] = {0.};
499  Double_t max[30] = {0.};
500  Double_t *binEdges[20] = {0};
501  Int_t dim = 0;
502 
503  if (fForceBeamType != kpp) {
504  axisTitle[dim] = "Centrality (%)";
505  nbins[dim] = fNCentHistBins;
506  binEdges[dim] = fCentHistBins;
507  min[dim] = fCentHistBins[0];
508  max[dim] = fCentHistBins[fNCentHistBins];
509  dim++;
510  }
511 
512  axisTitle[dim] = "isSwitched";
513  nbins[dim] = 2;
514  min[dim] = -0.5;
515  max[dim] = 1.5;
516  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
517  dim++;
518 
519  axisTitle[dim] = "#DeltaR_{trig}";
520  nbins[dim] = 50;
521  min[dim] = 0;
522  max[dim] = 0.5;
523  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
524  dim++;
525 
526  axisTitle[dim] = "#DeltaR_{ass}";
527  nbins[dim] = 50;
528  min[dim] = 0;
529  max[dim] = 0.5;
530  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
531  dim++;
532 
533  axisTitle[dim] = "trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
534  nbins[dim] = 100;
535  min[dim] = -50;
536  max[dim] = 50;
537  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
538  dim++;
539 
540  axisTitle[dim] = "ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
541  nbins[dim] = 100;
542  min[dim] = -50;
543  max[dim] = 50;
544  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
545  dim++;
546 
547  axisTitle[dim] = "A_{J} low-threshold";
548  nbins[dim] = 100;
549  min[dim] = 0;
550  max[dim] = 1;
551  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
552  dim++;
553 
554  axisTitle[dim] = "A_{J} hard-core";
555  nbins[dim] = 100;
556  min[dim] = 0;
557  max[dim] = 1;
558  binEdges[dim] = GenerateFixedBinArray(nbins[dim], min[dim], max[dim]);
559  dim++;
560 
561  TString thnname = "GeometricalMatching";
562  THnSparse* hn = fHistManager.CreateTHnSparse(thnname.Data(), thnname.Data(), dim, nbins, min, max);
563  for (Int_t i = 0; i < dim; i++) {
564  hn->GetAxis(i)->SetTitle(axisTitle[i]);
565  hn->SetBinEdges(i, binEdges[i]);
566  }
567 
568  // Allocate other histograms
569  TString histname;
570  TString title;
571  histname = "GeometricalMatchingEfficiency";
572  title = histname + ";isMatched;counts";
573  TH1* hist = fHistManager.CreateTH1(histname.Data(), title.Data(), 2, -0.5, 1.5);
574 }
575 
581 {
583 
584  fNeedEmcalGeom = kTRUE;
585 
586  AliInfo(Form("Trigger jet threshold = %f, Associated jet threshold = %f", fMinTrigJetPt, fMinAssJetPt));
587  AliInfo(Form("Leading hadron threshold (for dijet leading jet): %f GeV", fDijetLeadingHadronPt));
588  AliInfo(Form("Momentum balance study: %d", fDoMomentumBalance));
589  AliInfo(Form("Geometrical matching study: %d", fDoGeometricalMatching));
590 
591 }
592 
597 {
598  if (!fEventCuts.AcceptEvent(InputEvent()))
599  {
600  PostData(1, fOutput);
601  return kFALSE;
602  }
603  return kTRUE;
604 }
605 
614 {
615  TString histname;
616  AliJetContainer* jetCont = 0;
617  TIter next(&fJetCollArray);
618  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
619  TString jetContName = jetCont->GetName();
620  if (jetContName.Contains("HardCore")) continue;
621 
622  //-----------------------------------------------------------------------------
623  // Find the leading di-jet candidate in each event, and if it satisfies the
624  // trig jet pT threshold, then fill di-jet candidate histogram (regardless of ass jet).
625  // The idea is to study the kinematic selections in post-processing.
626 
627  // Loop over leading hadron cut or not
628  for (Int_t leadingHadronCutType=0; leadingHadronCutType<2; leadingHadronCutType++) {
629 
630  // Find the dijet candidate of the event and store its info in struct fDijet
631  FindDijet(jetCont, leadingHadronCutType);
632 
633  // If we find a dijet candidate (i.e. acceptable trig jet; ass jet accepted or not), fill the di-jet candidate histogram
635  TString histname = TString::Format("%s/DijetCandObservables", jetCont->GetArrayName().Data());
636  FillDijetCandHistograms(histname);
637  }
638 
639  }
640 
641  //---------------------------------------------------------------------------------------------------
642  // Now, study the accepted dijet selection -- specified by the trig/ass jet pT conditions
643 
644  // Find the dijet candidate of the event and store its info in struct fDijet
645  FindDijet(jetCont, 0);
646 
647  // If we find an accepted dijet, fill the dijet imbalance histogram
649  TString histname = TString::Format("%s/DijetImbalanceObservables", jetCont->GetArrayName().Data());
651  }
652 
653  // If we find an accepted dijet, perform momentum-balance study (if requested)
655  histname = TString::Format("%s/MomentumBalance", jetCont->GetArrayName().Data());
656  DoMomentumBalance(histname);
657  }
658 
659  }
660 
661  //---------------------------------------------------------------------------
662  // Do the constituent threshold and geometrical matching study (if requested)
665 
666  return kTRUE;
667 }
668 
677 {
678  fDijet.clear();
679  fDijet.leadingHadronCutType = leadingHadronCutBin;
680 
681  // Get trigger jet
682  AliEmcalJet* trigJet = 0;
683  if (jetCont->GetRhoParameter())
684  trigJet = jetCont->GetLeadingJet("rho");
685  else
686  trigJet = jetCont->GetLeadingJet();
687  if(!trigJet) return;
688 
689  // Skip the event if the leading jet doesn't satisfy the pT threshold
690  Double_t trigJetPt = GetJetPt(jetCont, trigJet);
691  if ( trigJetPt < fMinTrigJetPt ) return;
692 
693  // Skip the event if the leading jet doesn't satisfy the leading hadron threshold
694  if (jetCont->GetLeadingHadronPt(trigJet) < fDijetLeadingHadronPt*leadingHadronCutBin) return;
695 
696  // Fill the dijet struct
697  fDijet.trigJet = trigJet;
698  fDijet.trigJetPt = trigJetPt;
699  fDijet.trigJetEta = trigJet->Eta();
700  fDijet.trigJetPhi = trigJet->Phi();
701 
702  // Find the subleading jet in the opposite hemisphere
703  AliEmcalJet *assJet = 0;
704  for(auto assJetCand : jetCont->accepted()) {
705  if (!assJetCand) continue;
706  Double_t assJetCandPt = GetJetPt(jetCont, assJetCand);
707  if ( TMath::Abs(trigJet->Phi() - assJetCand->Phi()) < fDeltaPhiMin ) continue;
708  if (assJet) {
709  Double_t assJetPt = GetJetPt(jetCont, assJet);
710  if ( assJetCandPt < assJetPt ) continue;
711  }
712  assJet = assJetCand;
713  }
714  if (!assJet) return;
715 
716  // Fill the dijet struct
717  fDijet.assJet = assJet;
718  fDijet.assJetPt = GetJetPt(jetCont, assJet);
719  fDijet.assJetPhi = assJet->Phi();
720  fDijet.assJetEta = assJet->Eta();
722 
723  fDijet.deltaPhi = TMath::Abs(trigJet->Phi() - assJet->Phi());
724  fDijet.deltaEta = trigJet->Eta() - assJet->Eta();
727  fDijet.kTy = TMath::Abs( fDijet.trigJetPt * TMath::Sin(fDijet.deltaPhi) );
728 }
729 
735 {
736 
737  AliTrackContainer* trackCont = dynamic_cast<AliTrackContainer*>(GetParticleContainer("tracks"));
738 
739  AliVTrack* track;
740  for (auto trackIterator : trackCont->accepted_momentum() ) {
741 
742  track = trackIterator.second;
743 
744  // Compute the delta phi between the track and its nearest jet (of the two jets in the dijet),
745  // as well as its pT-parallel projection onto the nearest jet's axis.
746 
747  Double_t trackPt = track->Pt();
748  Double_t trackPhi = track->Phi();
749  Double_t trigJetPhi = fDijet.trigJet->Phi();
750  Double_t assJetPhi = fDijet.assJet->Phi();
751 
752  Double_t deltaPhiTrigJet = TMath::Abs(trackPhi - trigJetPhi);
753  Double_t deltaPhiAssJet = TMath::Abs(trackPhi - assJetPhi);
754  Bool_t isNearside = deltaPhiTrigJet < deltaPhiAssJet;
755 
756  Double_t deltaPhi;
757  Double_t balancePt;
758  if (isNearside) {
759  deltaPhi = trackPhi - trigJetPhi;
760  balancePt = trackPt * TMath::Cos(deltaPhi);
761  }
762  else {
763  deltaPhi = trackPhi - assJetPhi;
764  balancePt = -trackPt * TMath::Cos(deltaPhi);
765  }
766 
767  FillMomentumBalanceHistograms(histname, deltaPhi, trackPt, balancePt);
768 
769  }
770 }
771 
776 {
777  // Get jet container with minimum constituent pT,E thresholds
778  TString jetContAllName = Form("Jet_AKTFullR0%d0_tracks_pT0150_caloClusters_E0300_pt_scheme", (int) (fMatchingJetR*10) );
779  AliJetContainer* jetContAll = GetJetContainer(jetContAllName.Data());
780 
781  // Get jet container with X GeV constituent pT,E thresholds
782  Int_t trackThreshold = (int) (fTrackConstituentThreshold*1000); // in MeV
783  Int_t clusThreshold = (int) (fClusterConstituentThreshold*1000); // in MeV
784  TString jetContHardCoreName = Form("JetHardCore_AKTFullR0%d0_tracks_pT%d_caloClusters_E%d_pt_scheme", (int) (fMatchingJetR*10), trackThreshold, clusThreshold);
785  AliJetContainer* jetContHardCore = GetJetContainer(jetContHardCoreName.Data());
786 
787  // Find the di-jet in the hard-core jet sample, then find the matching di-jet and fill histograms
788  FindDijet(jetContHardCore, 0);
789  if (fDijet.isAccepted) {
790  FindMatchingDijet(jetContAll);
792  }
793 }
794 
800 {
802 
803  // Loop over jets and find leading jet within R of fDijet.trigJet
804  AliEmcalJet *matchingTrigJet = 0;
805  for(auto matchingTrigJetCand : jetCont->accepted()) {
806  if (!matchingTrigJetCand) continue;
807  if ( GetDeltaR(matchingTrigJetCand, fDijet.trigJet) > fMatchingJetR ) continue;
808  if (matchingTrigJet) {
809  if ( GetJetPt(jetCont, matchingTrigJetCand) < GetJetPt(jetCont, matchingTrigJet) ) continue;
810  }
811  matchingTrigJet = matchingTrigJetCand;
812  }
813  if (!matchingTrigJet) return;
814 
815  // Loop over jets and find leading jet within R of fDijet.assJet
816  AliEmcalJet *matchingAssJet = 0;
817  for(auto matchingAssJetCand : jetCont->accepted()) {
818  if (!matchingAssJetCand) continue;
819  if ( GetDeltaR(matchingAssJetCand, fDijet.assJet) > fMatchingJetR ) continue;
820  if (matchingAssJet) {
821  if ( GetJetPt(jetCont, matchingAssJetCand) < GetJetPt(jetCont, matchingAssJet) ) continue;
822  }
823  matchingAssJet = matchingAssJetCand;
824  }
825 
826  // Determine which matching jet is the leading jet (i.e. allow them to flip)
827  if (matchingAssJet) {
828  AliEmcalJet* trigJet = matchingTrigJet;
829  AliEmcalJet* assJet = matchingAssJet;
830  if ( GetJetPt(jetCont, matchingTrigJet) < GetJetPt(jetCont, matchingAssJet) ) {
831  AliEmcalJet* trigJet = matchingAssJet;
832  AliEmcalJet* assJet = matchingTrigJet;
833  }
834 
835  // Fill the dijet struct
836  fMatchingDijet.trigJet = trigJet;
837  fMatchingDijet.trigJetPt = GetJetPt(jetCont, trigJet);
838  fMatchingDijet.trigJetEta = trigJet->Eta();
839  fMatchingDijet.trigJetPhi = trigJet->Phi();
840 
841  fMatchingDijet.assJet = assJet;
842  fMatchingDijet.assJetPt = GetJetPt(jetCont, assJet);
843  fMatchingDijet.assJetPhi = assJet->Phi();
844  fMatchingDijet.assJetEta = assJet->Eta();
846 
847  fMatchingDijet.deltaPhi = TMath::Abs(trigJet->Phi() - assJet->Phi());
848  fMatchingDijet.deltaEta = trigJet->Eta() - assJet->Eta();
851  fMatchingDijet.kTy = TMath::Abs( fMatchingDijet.trigJetPt * TMath::Sin(fMatchingDijet.deltaPhi) );
852  }
853 }
854 
859 {
860  // Loop over tracks and clusters in order to:
861  // (1) Compute scale factor for full jets
862  // (2) Compute delta-pT for full jets, with the random cone method
863  // For both the scale factor and delta-pT, we compute only one histogram each for EMCal.
864  // But for DCal, we bin in eta, in order to study DCal vs. PHOS vs. gap
865 
866  // Define the acceptance boundaries for the TPC and EMCal/DCal/PHOS
867  Double_t etaTPC = 0.9;
868  Double_t etaEMCal = 0.7;
869  Double_t etaMinDCal = 0.22;
870  Double_t etaMaxPHOS = 0.13;
871  Double_t phiMinEMCal = fGeom->GetArm1PhiMin() * TMath::DegToRad(); // 80
872  Double_t phiMaxEMCal = fGeom->GetEMCALPhiMax() * TMath::DegToRad(); // ~188
873  Double_t phiMinDCal = fGeom->GetDCALPhiMin() * TMath::DegToRad(); // 260
874  Double_t phiMaxDCal = fGeom->GetDCALPhiMax() * TMath::DegToRad(); // ~327 (1/3 SMs start at 320)
875  Double_t phiMinPHOS = 250 * TMath::DegToRad();
876  Double_t phiMaxPHOS = 320 * TMath::DegToRad();
877 
878  Double_t accTPC = 2 * etaTPC * 2 * TMath::Pi();
879  Double_t accEMCal = 2 * etaEMCal * (phiMaxEMCal - phiMinEMCal);
880  Double_t accDCalRegion = 2 * etaEMCal * (phiMaxDCal - phiMinDCal);
881 
882  // Define fiducial acceptances, to be used to generate random cones
883  TRandom3* r = new TRandom3(0);
884  Double_t jetR = jetCont->GetJetRadius();
885  Double_t etaEMCalfid = etaEMCal - jetR;
886  Double_t phiMinEMCalfid = phiMinEMCal + jetR;
887  Double_t phiMaxEMCalfid = phiMaxEMCal - jetR;
888  Double_t phiMinDCalRegionfid = phiMinDCal + jetR;
889  Double_t phiMaxDCalRegionfid = phiMaxDCal - jetR;
890 
891  // Generate EMCal random cone eta-phi
892  Double_t etaEMCalRC = r->Uniform(-etaEMCalfid, etaEMCalfid);
893  Double_t phiEMCalRC = r->Uniform(phiMinEMCalfid, phiMaxEMCalfid);
894 
895  // Generate DCalRegion random cone eta-phi inside each eta slice (same phi used for all)
896  Double_t etaStep = 0.05;
897  const Int_t nEtaBinsSF = 28; // 2 * 0.7 / 0.05
898  const Int_t nEtaBinsRC = 20; // 2 * 0.5 / 0.05
899 
900  Double_t phiDCalRC = r->Uniform(phiMinDCalRegionfid, phiMaxDCalRegionfid);
901  Double_t etaDCalRC[nEtaBinsRC];
902  Double_t etaMin;
903  Double_t etaMax;
904  for (Int_t bin=0; bin < nEtaBinsRC; bin++) {
905  etaMin = -etaEMCalfid + bin*etaStep;
906  etaMax = etaMin + etaStep;
907  etaDCalRC[bin] = r->Uniform(etaMin, etaMax);
908  }
909 
910  // Initialize the various sums to 0
911  Double_t trackPtSumTPC = 0;
912  Double_t trackPtSumEMCal = 0;
913  Double_t trackPtSumEMCalRC = 0;
914  Double_t clusESumEMCal = 0;
915  Double_t clusESumEMCalRC = 0;
916  Double_t trackPtSumDCal[nEtaBinsSF] = {0.};
917  Double_t trackPtSumDCalRC[nEtaBinsRC] = {0.};
918  Double_t clusESumDCal[nEtaBinsSF] = {0.};
919  Double_t clusESumDCalRC[nEtaBinsRC] = {0.};
920 
921  // Loop over tracks. Sum the track pT:
922  // (1) in the entire TPC, (2) in the EMCal, (3) in the EMCal random cone,
923  // (4) in the DCalRegion at each eta, (5) in the DCalRegion random cone at each eta
924  AliTrackContainer* trackCont = dynamic_cast<AliTrackContainer*>(GetParticleContainer("tracks"));
925  AliTLorentzVector track;
926  Double_t trackEta;
927  Double_t trackPhi;
928  Double_t trackPt;
929  Double_t deltaR;
930  for (auto trackIterator : trackCont->accepted_momentum() ) {
931 
932  track.Clear();
933  track = trackIterator.first;
934  trackEta = track.Eta();
935  trackPhi = track.Phi_0_2pi();
936  trackPt = track.Pt();
937 
938  // (1)
939  if (TMath::Abs(trackEta) < etaTPC) {
940  trackPtSumTPC += trackPt;
941  }
942 
943  // (2)
944  if (TMath::Abs(trackEta) < etaEMCal && trackPhi > phiMinEMCal && trackPhi < phiMaxEMCal) {
945  trackPtSumEMCal += trackPt;
946  }
947 
948  // (3)
949  deltaR = GetDeltaR(&track, etaEMCalRC, phiEMCalRC);
950  if (deltaR < jetR) {
951  trackPtSumEMCalRC += trackPt;
952  }
953 
954  // (4)
955  for (Int_t bin=0; bin < nEtaBinsSF; bin++) {
956  if (trackPhi > phiMinDCal && trackPhi < phiMaxDCal) {
957  etaMin = -etaEMCal+ bin*etaStep;
958  etaMax = etaMin + etaStep;
959  if (trackEta > etaMin && trackEta < etaMax) {
960  trackPtSumDCal[bin] += trackPt;
961  }
962  }
963  }
964 
965  // (5)
966  for (Int_t bin=0; bin < nEtaBinsRC; bin++) {
967  deltaR = GetDeltaR(&track, etaDCalRC[bin], phiDCalRC);
968  if (deltaR < jetR) {
969  trackPtSumDCalRC[bin] += trackPt;
970  }
971  }
972 
973  }
974 
975  // Loop over clusters. Sum the cluster ET:
976  // (1) in the EMCal, (2) in the EMCal random cone, (3) in the DCalRegion at each eta,
977  // (4) in the DCalRegion random cone at each eta
979  AliTLorentzVector clus;
980  Double_t clusEta;
981  Double_t clusPhi;
982  Double_t clusE;
983  for (auto clusIterator : clusCont->accepted_momentum() ) {
984 
985  clus.Clear();
986  clus = clusIterator.first;
987  clusEta = clus.Eta();
988  clusPhi = clus.Phi_0_2pi();
989  clusE = clus.E();
990 
991  // (1)
992  if (TMath::Abs(clusEta) < etaEMCal && clusPhi > phiMinEMCal && clusPhi < phiMaxEMCal) {
993  clusESumEMCal += clusE;
994  }
995 
996  // (2)
997  deltaR = GetDeltaR(&clus, etaEMCalRC, phiEMCalRC);
998  if (deltaR < jetR) {
999  clusESumEMCalRC += clusE;
1000  }
1001 
1002  // (3)
1003  for (Int_t bin=0; bin < nEtaBinsSF; bin++) {
1004  if (clusPhi > phiMinDCal && clusPhi < phiMaxDCal) {
1005  etaMin = -etaEMCal+ bin*etaStep;
1006  etaMax = etaMin + etaStep;
1007  if (clusEta > etaMin && clusEta < etaMax) {
1008  clusESumDCal[bin] += clusE;
1009  }
1010  }
1011  }
1012 
1013  // (4)
1014  for (Int_t bin=0; bin < nEtaBinsRC; bin++) {
1015  deltaR = GetDeltaR(&clus, etaDCalRC[bin], phiDCalRC);
1016  if (deltaR < jetR) {
1017  clusESumDCalRC[bin] += clusE;
1018  }
1019  }
1020 
1021  }
1022 
1023  // Compute the scale factor for EMCal
1024  Double_t numerator = (trackPtSumEMCal + clusESumEMCal) / accEMCal;
1025  Double_t denominator = trackPtSumTPC / accTPC;
1026  Double_t scaleFactor = numerator / denominator;
1027  TString histname = TString::Format("%s/BackgroundHistograms/hScaleFactorEMCal", jetCont->GetArrayName().Data());
1028  fHistManager.FillTH2(histname, fCent, scaleFactor);
1029 
1030  // Compute the scale factor for DCalRegion
1031  Double_t accDCalRegionBin = accDCalRegion / nEtaBinsSF;
1032  for (Int_t bin=0; bin < nEtaBinsSF; bin++) {
1033  numerator = (trackPtSumDCal[bin] + clusESumDCal[bin]) / accDCalRegionBin;
1034  scaleFactor = numerator / denominator;
1035  histname = TString::Format("%s/BackgroundHistograms/hScaleFactorDCalRegion", jetCont->GetArrayName().Data());
1036  fHistManager.FillTH3(histname, fCent, scaleFactor, bin);
1037  }
1038 
1039  // Compute delta pT for EMCal
1040  Double_t rho = jetCont->GetRhoVal();
1041  Double_t deltaPt = trackPtSumEMCalRC + clusESumEMCalRC - rho * TMath::Pi() * jetR * jetR;
1042  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtEMCal", jetCont->GetArrayName().Data());
1043  fHistManager.FillTH1(histname, deltaPt);
1044 
1045  // Compute delta pT for DCalRegion
1046  for (Int_t bin=0; bin < nEtaBinsRC; bin++) {
1047  deltaPt = trackPtSumDCalRC[bin] + clusESumDCalRC[bin] - rho * TMath::Pi() * jetR * jetR;
1048  histname = TString::Format("%s/BackgroundHistograms/hDeltaPtDCalRegion", jetCont->GetArrayName().Data());
1049  fHistManager.FillTH2(histname, deltaPt, bin);
1050  }
1051 
1052 }
1053 
1058 {
1059  Double_t pT = jet->Pt() - jetCont->GetRhoVal() * jet->Area();
1060  TString jetContName = jetCont->GetName();
1061  if (jetContName.Contains("HardCore")) pT = jet->Pt();
1062  return pT;
1063 }
1064 
1069 {
1070  Double_t deltaPhi = TMath::Abs(jet1->Phi() - jet2->Phi());
1071  Double_t deltaEta = TMath::Abs(jet1->Eta() - jet2->Eta());
1072  Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1073  return deltaR;
1074 }
1075 
1080 {
1081  Double_t deltaPhi = TMath::Abs(part->Phi_0_2pi() - phiRef);
1082  Double_t deltaEta = TMath::Abs(part->Eta() - etaRef);
1083  Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
1084  return deltaR;
1085 }
1086 
1094 {
1096 
1097  return kTRUE;
1098 }
1099 
1105 {
1106  TString histname;
1107  AliJetContainer* jets = 0;
1108  TIter nextJetColl(&fJetCollArray);
1109  while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1110  TString jetContName = jets->GetName();
1111  if (jetContName.Contains("HardCore")) continue;
1112  Double_t rhoVal = 0;
1113  if (jets->GetRhoParameter()) {
1114  rhoVal = jets->GetRhoVal();
1115  histname = TString::Format("%s/JetHistograms/hRhoVsCent", jets->GetArrayName().Data());
1116  fHistManager.FillTH2(histname.Data(), fCent, rhoVal);
1117  }
1118 
1119  for (auto jet : jets->all()) {
1120 
1121  Float_t ptLeading = jets->GetLeadingHadronPt(jet);
1122  Float_t corrPt = jet->Pt() - rhoVal * jet->Area();
1123 
1124  // A vs. pT (fill before area cut)
1125  histname = TString::Format("%s/JetHistograms/hAreaVsPt", jets->GetArrayName().Data());
1126  fHistManager.FillTH2(histname.Data(), corrPt, jet->Area());
1127 
1128 
1129  // Rejection reason
1130  UInt_t rejectionReason = 0;
1131  if (!jets->AcceptJet(jet, rejectionReason)) {
1132  histname = TString::Format("%s/JetHistograms/hJetRejectionReason", jets->GetArrayName().Data());
1133  fHistManager.FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
1134  continue;
1135  }
1136 
1137  // Centrality vs. pT
1138  histname = TString::Format("%s/JetHistograms/hCentVsPt", jets->GetArrayName().Data());
1139  fHistManager.FillTH2(histname.Data(), corrPt, fCent);
1140 
1141  // pT vs. eta vs. phi
1142  histname = TString::Format("%s/JetHistograms/hPtVsEtaVsPhi", jets->GetArrayName().Data());
1143  fHistManager.FillTH3(histname.Data(), jet->Eta(), jet->Phi_0_2pi(), corrPt);
1144 
1145  // pT-leading vs. pT
1146  histname = TString::Format("%s/JetHistograms/hPtLeadingVsPt", jets->GetArrayName().Data());
1147  fHistManager.FillTH2(histname.Data(), corrPt, ptLeading);
1148 
1149  // NEF vs. pT
1150  histname = TString::Format("%s/JetHistograms/hNEFVsPt", jets->GetArrayName().Data());
1151  fHistManager.FillTH2(histname.Data(), corrPt, jet->NEF());
1152 
1153  // z-leading vs. pT
1154  TLorentzVector leadPart;
1155  jets->GetLeadingHadronMomentum(leadPart, jet);
1156  Double_t z = GetParallelFraction(leadPart.Vect(), jet);
1157  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
1158  histname = TString::Format("%s/JetHistograms/hZLeadingVsPt", jets->GetArrayName().Data());
1159  fHistManager.FillTH2(histname.Data(), corrPt, z);
1160 
1161  // Nconst vs. pT
1162  histname = TString::Format("%s/JetHistograms/hNConstVsPt", jets->GetArrayName().Data());
1163  fHistManager.FillTH2(histname.Data(), corrPt, jet->GetNumberOfConstituents());
1164 
1165 
1166  } //jet loop
1167 
1168  //---------------------------------------------------------------------------
1169  // Do study of background (if requested)
1171  }
1172 }
1173 
1178 {
1179  Double_t contents[30]={0};
1180  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
1181  if (!histJetObservables) return;
1182  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1183  TString title(histJetObservables->GetAxis(n)->GetTitle());
1184  if (title=="Centrality (%)")
1185  contents[n] = fCent;
1186  else if (title=="LeadingHadronRequired")
1187  contents[n] = fDijet.leadingHadronCutType;
1188  else if (title=="#it{p}_{T,trig jet} (GeV/#it{c})")
1189  contents[n] = fDijet.trigJetPt;
1190  else if (title=="#it{p}_{T,ass jet} (GeV/#it{c})")
1191  contents[n] = fDijet.assJetPt;
1192  else if (title=="#phi_{trig jet}")
1193  contents[n] = fDijet.trigJetPhi;
1194  else if (title=="#phi_{ass jet}")
1195  contents[n] = fDijet.assJetPhi;
1196  else if (title=="#eta_{trig jet}")
1197  contents[n] = fDijet.trigJetEta;
1198  else if (title=="#eta_{ass jet}")
1199  contents[n] = fDijet.assJetEta;
1200  else
1201  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1202  }
1203  histJetObservables->Fill(contents);
1204 }
1205 
1210 {
1211  Double_t contents[30]={0};
1212  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
1213  if (!histJetObservables) return;
1214  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1215  TString title(histJetObservables->GetAxis(n)->GetTitle());
1216  if (title=="Centrality (%)")
1217  contents[n] = fCent;
1218  else if (title=="#Delta#phi")
1219  contents[n] = fDijet.deltaPhi;
1220  else if (title=="#Delta#eta")
1221  contents[n] = fDijet.deltaEta;
1222  else if (title=="A_{J}")
1223  contents[n] = fDijet.AJ;
1224  else if (title=="x_{J}")
1225  contents[n] = fDijet.xJ;
1226  else if (title=="k_{Ty} (GeV)")
1227  contents[n] = fDijet.kTy;
1228  else if (title=="N_{tracks, trig jet}")
1229  contents[n] = fDijet.trigJet->GetNumberOfTracks();
1230  else if (title=="N_{tracks, ass jet}")
1231  contents[n] = fDijet.assJet->GetNumberOfTracks();
1232  else
1233  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1234  }
1235  histJetObservables->Fill(contents);
1236 }
1237 
1242 {
1243  Double_t contents[30]={0};
1244  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(histname));
1245  if (!histJetObservables) return;
1246  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1247  TString title(histJetObservables->GetAxis(n)->GetTitle());
1248  if (title=="A_{J}")
1249  contents[n] = fDijet.AJ;
1250  else if (title=="#Delta#phi")
1251  contents[n] = deltaPhi;
1252  else if (title=="#it{p}_{T,particle} (GeV/#it{c})")
1253  contents[n] = trackPt;
1254  else if (title=="#it{p}_{T}#parallel (GeV/#it{c})")
1255  contents[n] = balancePt;
1256  else
1257  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1258  }
1259  histJetObservables->Fill(contents);
1260 }
1261 
1266 {
1267  // Matching efficiency histogram
1268  TString histname = "GeometricalMatchingEfficiency";
1269 
1270  // If we have a matching di-jet, fill the geometrical matching histogram
1271  if (fMatchingDijet.assJet) {
1272  fHistManager.FillTH1(histname.Data(), 1);
1273 
1276  Bool_t isSwitched = trigDeltaR > fMatchingJetR;
1277 
1278  TString thnname = "GeometricalMatching";
1279  Double_t contents[30]={0};
1280  THnSparse* histJetObservables = static_cast<THnSparse*>(fHistManager.FindObject(thnname.Data()));
1281  if (!histJetObservables) return;
1282  for (Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1283  TString title(histJetObservables->GetAxis(n)->GetTitle());
1284  if (title=="Centrality (%)")
1285  contents[n] = fCent;
1286  else if (title=="isSwitched")
1287  contents[n] = isSwitched;
1288  else if (title=="#DeltaR_{trig}")
1289  contents[n] = trigDeltaR;
1290  else if (title=="#DeltaR_{ass}")
1291  contents[n] = assDeltaR;
1292  else if (title=="trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
1293  contents[n] = fMatchingDijet.trigJetPt - fDijet.trigJetPt;
1294  else if (title=="ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
1295  contents[n] = fMatchingDijet.assJetPt - fDijet.assJetPt;
1296  else if (title=="A_{J} low-threshold")
1297  contents[n] = fMatchingDijet.AJ;
1298  else if (title=="A_{J} hard-core")
1299  contents[n] = fDijet.AJ;
1300  else
1301  AliWarning(Form("Unable to fill dimension %s!",title.Data()));
1302  }
1303  histJetObservables->Fill(contents);
1304  }
1305  else {
1306  fHistManager.FillTH1(histname.Data(), 0.);
1307  }
1308 }
1309 
Double_t Area() const
Definition: AliEmcalJet.h:123
Double_t GetRhoVal() const
const TString & GetRhoName() const
double Double_t
Definition: External.C:58
const char * title
Definition: MakeQAPdf.C:26
AliJetContainer * GetJetContainer(Int_t i=0) const
Bool_t fUseManualEventCuts
Flag to use manual event cuts.
UInt_t fOffTrigger
offline trigger for event selection
Double_t Eta() const
Definition: AliEmcalJet.h:114
const AliClusterIterableMomentumContainer accepted_momentum() const
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.
Double_t fDijetLeadingHadronPt
leading hadron pT threshold for leading jet in dijet
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
Double_t fMinAssJetPt
subleading jet min pT in a dijet pair, for it to be accepted
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
const Int_t nPtBins
AliEmcalJet * GetLeadingJet(const char *opt="")
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
Dijet_t fDijet
! dijet candidate (per event)
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:658
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
Double_t Phi_0_2pi() const
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
BeamType fForceBeamType
forced beam type
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Double_t fDeltaPhiMin
minimum delta phi between di-jets
Bool_t fComputeBackground
Set whether to enable study of background.
Double_t fCent
!event centrality
Double_t GetJetPt(AliJetContainer *jetCont, AliEmcalJet *jet)
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
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()
Double_t Pt() const
Definition: AliEmcalJet.h:102
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
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
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
Dijet_t fMatchingDijet
! low-threshold matching dijet, for matching study
void SetRejectionReasonLabels(TAxis *axis)
const Int_t nbins
const AliJetIterableContainer accepted() const
bool Bool_t
Definition: External.C:53
Double_t fTrackConstituentThreshold
constituent threshold for matching study
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