AliPhysics  master (3d17d9d)
AliAnalysisTaskJetCoreEmcal.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 <TList.h>
18 #include "TChain.h"
19 #include "TTree.h"
20 #include "TMath.h"
21 #include "TH1F.h"
22 #include "TH2F.h"
23 #include "TH3F.h"
24 #include "THnSparse.h"
25 #include "TCanvas.h"
26 #include "TRandom3.h"
27 #include "AliLog.h"
28 
29 #include <AliAnalysisManager.h>
30 #include <AliVEventHandler.h>
31 #include <AliVEvent.h>
32 #include <AliVCluster.h>
33 #include <AliVParticle.h>
34 #include <AliLog.h>
35 #include <AliAnalysisDataSlot.h>
36 #include <AliAnalysisDataContainer.h>
37 
38 #include "AliTLorentzVector.h"
39 #include "AliEmcalJet.h"
40 #include "AliRhoParameter.h"
41 #include "AliJetContainer.h"
42 #include "AliParticleContainer.h"
43 #include "AliClusterContainer.h"
44 #include "AliEmcalPythiaInfo.h"
45 
47 
51 
57  fHistManager(),
58  fJetShapeType(AliAnalysisTaskJetCoreEmcal::kData),
59  fCentMin(0.),
60  fCentMax(100.),
61  fTTLowRef(8.),
62  fTTUpRef(9.),
63  fTTLowSig(20.),
64  fTTUpSig(50.),
65  fNRPBins(50),
66  fFrac(0.8),
67  fJetHadronDeltaPhi(0.6),
68  fMinFractionSharedPt(0.5),
69  fMinEmbJetPt(15.),
70  fJetContName(""),
71  fJetContTrueName(""),
72  fJetContPartName(""),
73  fFillTrackHistograms(kTRUE),
74  fFillJetHistograms(kTRUE),
75  fFillRecoilTHnSparse(kTRUE),
76  fFillInclusiveTree(kFALSE),
77  fFillRecoilTree(kFALSE),
78  fMoreTreeVars(kFALSE),
79  fPtHardBin(0.),
80  fRejectionFactorInclusiveJets(1),
81  fRandom(0),
82  fHistEvtSelection(0x0),
83  fHJetSpec(0x0),
84  fh1TrigRef(0x0),
85  fh1TrigSig(0x0),
86  fh2Ntriggers(0x0),
87  fhDphiPtSig(0x0),
88  fhDphiPtRef(0x0),
89  fhPtDetPart(0x0),
90  fhPtHybrDet(0x0),
91  fhPtHybrPart(0x0),
92  fhPtHybrPartCor(0x0),
93  fhPhiHybrPartCor(0x0),
94  fhPtDet(0x0),
95  fhPtDetMatchedToPart(0x0),
96  fhPtPartMatched(0x0),
97  fhPtPartMatchedCent(0x0),
98  fhPtPartMatchedWrongCent(0x0),
99  fhResidual(0x0),
100  fhPtResidual(0x0),
101  fhPhiResidual(0x0),
102  fhPhiPhiResidual(0x0),
103  fhPtDetPartRecoil(0x0),
104  fhPtHybrDetRecoil(0x0),
105  fhPtHybrPartRecoil(0x0),
106  fhPtHybrPartCorRecoil(0x0),
107  fhPtDetRecoil(0x0),
108  fhPtDetMatchedToPartRecoil(0x0),
109  fhResidualRecoil(0x0),
110  fhPtResidualRecoil(0x0),
111  fhDphiResidualRecoil(0x0),
112  fhDphiphiResidualRecoil(0x0),
113  fhTTPtDetMatchedToPart(0x0),
114  fhTTPhiDetMatchedToPart(0x0),
115  fhDPhiHybrPartCorRecoil(0x0),
116  fhSelectedTrigger(0x0),
117  fhFractionSharedPtInclusive(0x0),
118  fhFractionSharedPtRecoil(0x0),
119  fTreeEmbInclusive(0x0),
120  fTreeEmbRecoil(0x0)
121 {
123 
124  DefineOutput(1, TList::Class());
125  //if(fJetShapeType == AliAnalysisTaskJetCoreEmcal::kDetEmbPart && fFillInclusiveTree)
126  DefineOutput(2, TTree::Class());
127 // if(fJetShapeType == AliAnalysisTaskJetCoreEmcal::kDetEmbPart && fFillRecoilTree)
128  DefineOutput(3, TTree::Class());
129 }
130 
137  AliAnalysisTaskEmcalJet(name, kTRUE),
138  fHistManager(name),
140  fCentMin(0.),
141  fCentMax(100.),
142  fTTLowRef(8),
143  fTTUpRef(9.),
144  fTTLowSig(20.),
145  fTTUpSig(50.),
146  fNRPBins(50),
147  fFrac(0.8),
148  fJetHadronDeltaPhi(0.6),
150  fMinEmbJetPt(15.),
151  fJetContName(""),
152  fJetContTrueName(""),
153  fJetContPartName(""),
154  fFillTrackHistograms(kTRUE),
155  fFillJetHistograms(kTRUE),
156  fFillRecoilTHnSparse(kTRUE),
157  fFillInclusiveTree(kFALSE),
158  fFillRecoilTree(kFALSE),
159  fMoreTreeVars(kFALSE),
160  fPtHardBin(0.),
162  fRandom(0),
163  fHistEvtSelection(0x0),
164  fHJetSpec(0x0),
165  fh1TrigRef(0x0),
166  fh1TrigSig(0x0),
167  fh2Ntriggers(0x0),
168  fhDphiPtSig(0x0),
169  fhDphiPtRef(0x0),
170  fhPtDetPart(0x0),
171  fhPtHybrDet(0x0),
172  fhPtHybrPart(0x0),
173  fhPtHybrPartCor(0x0),
174  fhPhiHybrPartCor(0x0),
175  fhPtDet(0x0),
177  fhPtPartMatched(0x0),
178  fhPtPartMatchedCent(0x0),
180  fhResidual(0x0),
181  fhPtResidual(0x0),
182  fhPhiResidual(0x0),
183  fhPhiPhiResidual(0x0),
184  fhPtDetPartRecoil(0x0),
185  fhPtHybrDetRecoil(0x0),
186  fhPtHybrPartRecoil(0x0),
188  fhPtDetRecoil(0x0),
190  fhResidualRecoil(0x0),
191  fhPtResidualRecoil(0x0),
197  fhSelectedTrigger(0x0),
200  fTreeEmbInclusive(0x0),
201  fTreeEmbRecoil(0x0)
202 {
204 
205  DefineOutput(1, TList::Class());
206  DefineOutput(2, TTree::Class());
207  DefineOutput(3, TTree::Class());
208 }
209 
214 {
215 }
216 
222 {
224 
227  //AllocateClusterHistograms();
228  //AllocateCellHistograms();
230 
231  TIter next(fHistManager.GetListOfHistograms());
232  TObject* obj = 0;
233  while ((obj = next())) {
234  fOutput->Add(obj);
235  }
236 
237  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
239  if(fJetShapeType == AliAnalysisTaskJetCoreEmcal::kDetEmbPart && fFillRecoilTree) PostData(3, fTreeEmbRecoil); // Post data for ALL output slots > 0 here.
240 }
241 
242 /*
243  * This function allocates the histograms for basic EMCal cluster QA.
244  * A set of histograms (energy, eta, phi, number of cluster) is allocated
245  * per each cluster container and per each centrality bin.
246  */
248 {
249  TString histname;
250  TString histtitle;
251  TString groupname;
252  AliClusterContainer* clusCont = 0;
253  TIter next(&fClusterCollArray);
254  while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
255  groupname = clusCont->GetName();
256  // Protect against creating the histograms twice
257  if (fHistManager.FindObject(groupname)) {
258  AliWarning(TString::Format("%s: Found groupname %s in hist manager. The cluster containers will be filled into the same histograms.", GetName(), groupname.Data()));
259  continue;
260  }
261  fHistManager.CreateHistoGroup(groupname);
262  for (Int_t cent = 0; cent < fNcentBins; cent++) {
263  histname = TString::Format("%s/histClusterEnergy_%d", groupname.Data(), cent);
264  histtitle = TString::Format("%s;#it{E}_{cluster} (GeV);counts", histname.Data());
265  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
266 
267  histname = TString::Format("%s/histClusterEnergyExotic_%d", groupname.Data(), cent);
268  histtitle = TString::Format("%s;#it{E}_{cluster}^{exotic} (GeV);counts", histname.Data());
269  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
270 
271  histname = TString::Format("%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), cent);
272  histtitle = TString::Format("%s;#it{E}_{cluster}^{non-lin.corr.} (GeV);counts", histname.Data());
273  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
274 
275  histname = TString::Format("%s/histClusterHadCorrEnergy_%d", groupname.Data(), cent);
276  histtitle = TString::Format("%s;#it{E}_{cluster}^{had.corr.} (GeV);counts", histname.Data());
277  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
278 
279  histname = TString::Format("%s/histClusterPhi_%d", groupname.Data(), cent);
280  histtitle = TString::Format("%s;#it{#phi}_{custer};counts", histname.Data());
281  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
282 
283  histname = TString::Format("%s/histClusterEta_%d", groupname.Data(), cent);
284  histtitle = TString::Format("%s;#it{#eta}_{custer};counts", histname.Data());
285  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
286 
287  histname = TString::Format("%s/histNClusters_%d", groupname.Data(), cent);
288  histtitle = TString::Format("%s;number of clusters;events", histname.Data());
289  if (fForceBeamType != kpp) {
290  fHistManager.CreateTH1(histname, histtitle, 500, 0, 3000);
291  }
292  else {
293  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
294  }
295  }
296  }
297 
298  histname = "fHistSumNClusters";
299  histtitle = TString::Format("%s;Sum of n clusters;events", histname.Data());
300  if (fForceBeamType != kpp) {
301  fHistManager.CreateTH1(histname, histtitle, 500, 0, 3000);
302  }
303  else {
304  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
305  }
306 }
307 
308 /*
309  * This function allocates the histograms for basic EMCal QA.
310  * One 2D histogram with the cell energy spectra and the number of cells
311  * per event is allocated per each centrality bin.
312  */
314 {
315  TString histname;
316  TString histtitle;
317  TString groupname(fCaloCellsName);
318 
319  fHistManager.CreateHistoGroup(groupname);
320  for (Int_t cent = 0; cent < fNcentBins; cent++) {
321  histname = TString::Format("%s/histCellEnergy_%d", groupname.Data(), cent);
322  histtitle = TString::Format("%s;#it{E}_{cell} (GeV);counts", histname.Data());
323  fHistManager.CreateTH1(histname, histtitle, 300, 0, 150);
324 
325  histname = TString::Format("%s/histNCells_%d", groupname.Data(), cent);
326  histtitle = TString::Format("%s;number of cells;events", histname.Data());
327  if (fForceBeamType != kpp) {
328  fHistManager.CreateTH1(histname, histtitle, 500, 0, 6000);
329  }
330  else {
331  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
332  }
333  }
334 }
335 
336 /*
337  * This function allocates the histograms for basic tracking QA.
338  * A set of histograms (pT, eta, phi, difference between kinematic properties
339  * at the vertex and at the EMCal surface, number of tracks) is allocated
340  * per each particle container and per each centrality bin.
341  */
343 {
344  TString histname;
345  TString histtitle;
346  TString groupname;
347  AliParticleContainer* partCont = 0;
348  TIter next(&fParticleCollArray);
349  while ((partCont = static_cast<AliParticleContainer*>(next()))) {
350  groupname = partCont->GetName();
351 
352  // Protect against creating the histograms twice
353  if (fHistManager.FindObject(groupname)) {
354  AliWarning(TString::Format("%s: Found groupname %s in hist manager. The track containers will be filled into the same histograms.", GetName(), groupname.Data()));
355  continue;
356  }
357  fHistManager.CreateHistoGroup(groupname);
358  for (Int_t cent = 0; cent < fNcentBins; cent++) {
359  histname = TString::Format("%s/histTrackPt_%d", groupname.Data(), cent);
360  histtitle = TString::Format("%s;#it{p}_{T,track} (GeV/#it{c});counts", histname.Data());
361  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
362 
363  histname = TString::Format("%s/histTrackPhi_%d", groupname.Data(), cent);
364  histtitle = TString::Format("%s;#it{#phi}_{track};counts", histname.Data());
365  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
366 
367  histname = TString::Format("%s/histTrackEta_%d", groupname.Data(), cent);
368  histtitle = TString::Format("%s;#it{#eta}_{track};counts", histname.Data());
369  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
370 
371  if (TClass(partCont->GetClassName()).InheritsFrom("AliVTrack")) {
372  histname = TString::Format("%s/fHistDeltaEtaPt_%d", groupname.Data(), cent);
373  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#eta}_{track}^{vertex} - #it{#eta}_{track}^{EMCal};counts", histname.Data());
374  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, 50, -0.5, 0.5);
375 
376  histname = TString::Format("%s/fHistDeltaPhiPt_%d", groupname.Data(), cent);
377  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#phi}_{track}^{vertex} - #it{#phi}_{track}^{EMCal};counts", histname.Data());
378  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, 200, -2, 2);
379 
380  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", groupname.Data(), cent);
381  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{p}_{T,track}^{vertex} - #it{p}_{T,track}^{EMCal} (GeV/#it{c});counts", histname.Data());
382  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, fNbins / 2, -fMaxBinPt/2, fMaxBinPt/2);
383 
384  histname = TString::Format("%s/fHistEoverPvsP_%d", groupname.Data(), cent);
385  histtitle = TString::Format("%s;#it{P}_{track} (GeV/#it{c});#it{E}_{cluster} / #it{P}_{track} #it{c};counts", histname.Data());
386  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, fNbins / 2, 0, 4);
387  }
388 
389  histname = TString::Format("%s/histNTracks_%d", groupname.Data(), cent);
390  histtitle = TString::Format("%s;number of tracks;events", histname.Data());
391  if (fForceBeamType != kpp) {
392  fHistManager.CreateTH1(histname, histtitle, 500, 0, 5000);
393  }
394  else {
395  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
396  }
397  }
398  }
399 
400  histname = "fHistSumNTracks";
401  histtitle = TString::Format("%s;Sum of n tracks;events", histname.Data());
402  if (fForceBeamType != kpp) {
403  fHistManager.CreateTH1(histname, histtitle, 500, 0, 5000);
404  }
405  else {
406  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
407  }
408 }
409 
410 /*
411  * This function allocates the histograms for basic jet QA.
412  * A set of histograms (pT, eta, phi, area, number of jets, corrected pT) is allocated
413  * per each jet container and per each centrality bin.
414  */
416 {
417  TString histname;
418  TString histtitle;
419  TString groupname;
420  AliJetContainer* jetCont = 0;
421  TIter next(&fJetCollArray);
422  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
423  groupname = jetCont->GetName();
424  // Protect against creating the histograms twice
425  if (fHistManager.FindObject(groupname)) {
426  AliWarning(TString::Format("%s: Found groupname %s in hist manager. The jet containers will be filled into the same histograms.", GetName(), groupname.Data()));
427  continue;
428  }
429  fHistManager.CreateHistoGroup(groupname);
430  for (Int_t cent = 0; cent < fNcentBins; cent++) {
431  histname = TString::Format("%s/histJetPt_%d", groupname.Data(), cent);
432  histtitle = TString::Format("%s;#it{p}_{T,jet} (GeV/#it{c});counts", histname.Data());
433  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt);
434 
435  histname = TString::Format("%s/histJetPtLow_%d", groupname.Data(), cent);
436  histtitle = TString::Format("%s;#it{p}_{T,jet} (GeV/#it{c});counts", histname.Data());
437  fHistManager.CreateTH1(histname, histtitle, 50, 0., 0.5);
438 
439  histname = TString::Format("%s/histJetArea_%d", groupname.Data(), cent);
440  histtitle = TString::Format("%s;#it{A}_{jet};counts", histname.Data());
441  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, 3);
442 
443  histname = TString::Format("%s/histJetPhi_%d", groupname.Data(), cent);
444  histtitle = TString::Format("%s;#it{#phi}_{jet};counts", histname.Data());
445  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
446 
447  histname = TString::Format("%s/histJetEta_%d", groupname.Data(), cent);
448  histtitle = TString::Format("%s;#it{#eta}_{jet};counts", histname.Data());
449  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
450 
451  histname = TString::Format("%s/histNJets_%d", groupname.Data(), cent);
452  histtitle = TString::Format("%s;number of jets;events", histname.Data());
453  if (fForceBeamType != kpp) {
454  fHistManager.CreateTH1(histname, histtitle, 500, 0, 500);
455  }
456  else {
457  fHistManager.CreateTH1(histname, histtitle, 100, 0, 100);
458  }
459 
460  if (!jetCont->GetRhoName().IsNull()) {
461  histname = TString::Format("%s/histJetCorrPt_%d", groupname.Data(), cent);
462  histtitle = TString::Format("%s;#it{p}_{T,jet}^{corr} (GeV/#it{c});counts", histname.Data());
463  fHistManager.CreateTH1(histname, histtitle, fNbins, -fMaxBinPt / 2, fMaxBinPt / 2);
464 
465  histname = TString::Format("%s/histJetCorrPtLeadingTrackPt_%d", groupname.Data(), cent);
466  histtitle = TString::Format("%s;#it{p}_{T,jet}^{corr} (GeV/#it{c});#it{p}_{T,leading} (GeV/#it{c});counts", histname.Data());
467  fHistManager.CreateTH2(histname, histtitle, fNbins, -fMaxBinPt / 2, fMaxBinPt / 2, 1000,0.,100.);
468 
469  }
470  }
471  }
472 }
473 
475 {
476 
477  Bool_t oldStatus = TH1::AddDirectoryStatus();
478  TH1::AddDirectory(kFALSE);
479 
480  // set seed
481  fRandom = new TRandom3(0);
482 
483  fHistEvtSelection = new TH1I("fHistEvtSelection", "event selection", 6, -0.5, 5.5);
484  fHistEvtSelection->GetXaxis()->SetBinLabel(1,"ACCEPTED");
485  fHistEvtSelection->GetXaxis()->SetBinLabel(2,"events IN");
486  fHistEvtSelection->GetXaxis()->SetBinLabel(3,"event selection (rejected)");
487  fHistEvtSelection->GetXaxis()->SetBinLabel(4,"vertex cut (rejected)");
488  fHistEvtSelection->GetXaxis()->SetBinLabel(5,"centrality (rejected)");
489  fHistEvtSelection->GetXaxis()->SetBinLabel(6,"multiplicity (rejected)");
490 
491  fh1TrigRef=new TH1D("Trig Ref","",10,0.,10);
492  fh1TrigSig=new TH1D("Trig Sig","",10,0.,10);
493  fh2Ntriggers=new TH2F("# of triggers","",100,0.,100.,50,0.,50.);
494 
496 
497  fOutput->Add(fh1TrigRef);
498  fOutput->Add(fh1TrigSig);
499  fOutput->Add(fh2Ntriggers);
500 
502  const Int_t dimSpec = 6;
503  const Int_t nBinsSpec[dimSpec] = {100,100, 280, 50,200, fNRPBins};
504  const Double_t lowBinSpec[dimSpec] = {0,0,-80, 0,0, 0};
505  const Double_t hiBinSpec[dimSpec] = {100,1, 200, 50,2*TMath::Pi(), static_cast<Double_t>(fNRPBins)};
506  fHJetSpec = new THnSparseF("fHJetSpec","Recoil jet spectrum",dimSpec,nBinsSpec,lowBinSpec,hiBinSpec);
507  }
508 
509  // comment out since I want finer binning in jet area, to make it easier
510  // to change selection on jet area (Leticia used 0.8*R^2*Pi whereas 0.6 is used
511  // for inclusive jets)
512  //change binning in jet area
513 // Double_t *xPt6 = new Double_t[7];
514 // xPt6[0] = 0.;
515 // xPt6[1]=0.07;
516 // xPt6[2]=0.2;
517 // xPt6[3]=0.4;
518 // xPt6[4]=0.6;
519 // xPt6[5]=0.8;
520 // xPt6[6]=1;
521 // fHJetSpec->SetBinEdges(1,xPt6);
522 // delete [] xPt6;
523 
524  fOutput->Add(fHJetSpec);
525 
526  // azimuthal correlation
527 
528  fhDphiPtSig = new TH2F("hDphiPtS","recoil #Delta #phi vs jet pT signal",100,-2,5,250,-50,200);
529  fhDphiPtSig->GetXaxis()->SetTitle("#Delta #phi");
530  fhDphiPtSig->GetYaxis()->SetTitle("p^{reco,ch}_{T,jet} (GeV/c)");
531  fhDphiPtRef = new TH2F("hDphiPtR","recoil #Delta #phi vs jet pT reference",100,-2,5,250,-50,200);
532  fhDphiPtRef->GetXaxis()->SetTitle("#Delta #phi");
533  fhDphiPtRef->GetYaxis()->SetTitle("p^{reco,ch}_{T,jet} (GeV/c)");
534 
535  fOutput->Add(fhDphiPtRef);
536  fOutput->Add(fhDphiPtSig);
537 
538 
539  fhPtHybrDet= new TH2F("hPtHybrDet","pT response Pb-Pb+PYTHIA vs PYTHIA",200,0,200,200,0,200);
540  fhPtHybrDet->GetXaxis()->SetTitle("p^{Pb-Pb+PYTHIA,ch}_{T} (GeV/c)");
541  fhPtHybrDet->GetYaxis()->SetTitle("p^{reco,PYTHIA,ch}_{T} (GeV/c)");
542  fhPtDetPart= new TH2F("hPtDetPart","pT response PYTHIA vs part",200,0,200,200,0,200);
543  fhPtDetPart->GetXaxis()->SetTitle("p^{reco,PYTHIA,ch}_{T} (GeV/c)");
544  fhPtDetPart->GetYaxis()->SetTitle("p^{true}_{T} (GeV/c)");
545  fhPtHybrPart = new TH2F("hPtHybrPart",Form("pT response Pb-Pb+PYTHIA vs part, min shared pT > %.0f",fMinFractionSharedPt*100),200,0,200,200,0,200);
546  fhPtHybrPart->GetXaxis()->SetTitle("p^{Pb-Pb+PYTHIA,ch}_{T} (GeV/c)");
547  fhPtHybrPart->GetYaxis()->SetTitle("p^{true}_{T} (GeV/c)");
548  fhPtHybrPartCor = new TH2F("hPtHybrPartCor",Form("pT response Pb-Pb+PYTHIA corrected vs part, min shared pT > %.0f",fMinFractionSharedPt*100),200,0,200,200,0,200);
549  fhPtHybrPartCor->GetXaxis()->SetTitle("p^{Pb-Pb+PYTHIA,ch}_{T} (GeV/c)");
550  fhPtHybrPartCor->GetYaxis()->SetTitle("p^{true}_{T} (GeV/c)");
551 
552  fhPhiHybrPartCor = new TH2F("hPhiHybrPartCor",Form("phi response Pb-Pb+PYTHIA corrected vs part, min shared pT > %.0f",fMinFractionSharedPt*100),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-0.5*TMath::Pi(),1.5*TMath::Pi());
553  fhPhiHybrPartCor->GetXaxis()->SetTitle("#phi^{Pb-Pb+PYTHIA,ch}");
554  fhPhiHybrPartCor->GetYaxis()->SetTitle("#phi^{true}");
555  fhResidual = new TH1F("hResidual","residual",50,-1,1);
556  fhResidual->GetXaxis()->SetTitle("p^{reco}_{T} - p^{true}_{T} / p^{true}_{T}");
557  fhPtResidual= new TH2F("hPtResidual","pT vs residual",200,0,200,50,-1,1);
558  fhPtResidual->GetXaxis()->SetTitle("p^{true}_{T} (GeV/c)");
559  fhPtResidual->GetYaxis()->SetTitle("p^{reco}_{T} - p^{true}_{T} / p^{true}_{T}");
560  fhPhiResidual = new TH1F("hPhiResidual","residual phi",50,-1,1);
561  fhPhiResidual->GetXaxis()->SetTitle("#phi^{reco} - #phi^{true} / #phi^{true}");
562  fhPhiPhiResidual= new TH2F("hPhiPhiResidual","pT vs residual",600,-3,3,200,-0.5*TMath::Pi(),1.5*TMath::Pi());
563  fhPhiPhiResidual->GetXaxis()->SetTitle("#phi^{true}");
564  fhPhiPhiResidual->GetYaxis()->SetTitle("#phi^{reco} - #phi^{true} / #phi^{true}");
565 
566  fhPtDet= new TH1F("hPtDet","pT detector level",200,0,200);
567  fhPtDet->GetXaxis()->SetTitle("p^{reco,PYTHIA,ch}_{T} (GeV/c)");
568  fhPtDetMatchedToPart = new TH1F("hPtDetMatchedToPart","pT detector level matched to particle level jet",200,0,200);
569  fhPtDetMatchedToPart->GetXaxis()->SetTitle("p^{reco,PYTHIA,ch}_{T} (GeV/c)");
570  fhPtPartMatched= new TH1F("hPtPartMatched","pT particle level matched",200,0,200);
571  fhPtPartMatched->GetXaxis()->SetTitle("p^{part}_{T} (GeV/c)");
572  fhPtPartMatchedCent= new TH2F("hPtPartMatchedCent","pT particle level matched",200,0,200,100,0,100);
573  fhPtPartMatchedCent->GetXaxis()->SetTitle("p^{part}_{T} (GeV/c)");
574  fhPtPartMatchedCent->GetYaxis()->SetTitle("centrality (%)");
575  fhPtPartMatchedWrongCent= new TH2F("hPtPartMatchedWrongCent","pT particle level matched incorrectly",200,0,200,100,0,100);
576  fhPtPartMatchedWrongCent->GetXaxis()->SetTitle("p^{part}_{T} (GeV/c)");
577  fhPtPartMatchedWrongCent->GetYaxis()->SetTitle("centrality (%)");
578 
579  fhPtHybrDetRecoil= new TH2F("hPtHybrDetRecoil","pT response Pb-Pb+PYTHIA vs PYTHIA",200,0,200,200,0,200);
580  fhPtHybrDetRecoil->GetXaxis()->SetTitle("p^{Pb-Pb+PYTHIA,ch}_{T} (GeV/c)");
581  fhPtHybrDetRecoil->GetYaxis()->SetTitle("p^{reco,PYTHIA,ch}_{T} (GeV/c)");
582  fhPtDetPartRecoil= new TH2F("hPtDetPartRecoil","pT response PYTHIA vs part",200,0,200,200,0,200);
583  fhPtDetPartRecoil->GetXaxis()->SetTitle("p^{reco,PYTHIA,ch}_{T} (GeV/c)");
584  fhPtDetPartRecoil->GetYaxis()->SetTitle("p^{true}_{T} (GeV/c)");
585  fhPtHybrPartRecoil = new TH2F("hPtHybrPartRecoil",Form("pT response Pb-Pb+PYTHIA vs part, min shared pT > %.0f",fMinFractionSharedPt*100),200,0,200,200,0,200);
586  fhPtHybrPartRecoil->GetXaxis()->SetTitle("p^{Pb-Pb+PYTHIA,ch}_{T} (GeV/c)");
587  fhPtHybrPartRecoil->GetYaxis()->SetTitle("p^{true}_{T} (GeV/c)");
588  fhPtHybrPartCorRecoil = new TH2F("hPtHybrPartCorRecoil",Form("pT response Pb-Pb+PYTHIA corrected vs part, min shared pT > %.0f",fMinFractionSharedPt*100),200,0,200,200,0,200);
589  fhPtHybrPartCorRecoil->GetXaxis()->SetTitle("p^{Pb-Pb+PYTHIA,ch}_{T} (GeV/c)");
590  fhPtHybrPartCorRecoil->GetYaxis()->SetTitle("p^{true}_{T} (GeV/c)");
591 
592  fhDPhiHybrPartCorRecoil = new TH2F("hDPhiHybrPartCorRecoil",Form("#Delta#phi response Pb-Pb+PYTHIA corrected vs part, min shared pT > %.0f",fMinFractionSharedPt*100),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-0.5*TMath::Pi(),1.5*TMath::Pi());
593  fhDPhiHybrPartCorRecoil->GetXaxis()->SetTitle("#Delta#phi^{Pb-Pb+PYTHIA,ch}");
594  fhDPhiHybrPartCorRecoil->GetYaxis()->SetTitle("#Delta#phi^{true}");
595  fhResidualRecoil = new TH1F("hResidualRecoil","residual",50,-1,1);
596  fhResidualRecoil->GetXaxis()->SetTitle("p^{reco}_{T} - p^{true}_{T} / p^{true}_{T}");
597  fhPtResidualRecoil= new TH2F("hPtResidualRecoil","pT vs residual",200,0,200,50,-1,1);
598  fhPtResidualRecoil->GetXaxis()->SetTitle("p^{true}_{T} (GeV/c)");
599  fhPtResidualRecoil->GetYaxis()->SetTitle("p^{reco}_{T} - p^{true}_{T} / p^{true}_{T}");
600 
601  fhDphiResidualRecoil = new TH1F("hDphiResidualRecoil","residual",50,-1,1);
602  fhDphiResidualRecoil->GetXaxis()->SetTitle("#Delta#phi^{reco} - #Delta#phi^{true} / #Delta#phi^{true}");
603  fhDphiphiResidualRecoil= new TH2F("hDphiphiResidualRecoil","#Delta#phi vs residual in phi",400,-3,3,200,-0.5*TMath::Pi(),1.5*TMath::Pi());
604  fhDphiphiResidualRecoil->GetXaxis()->SetTitle("#Delta#phi^{true}");
605  fhDphiphiResidualRecoil->GetYaxis()->SetTitle("#Delta#phi^{reco} - #Delta#phi^{true} / #Delta#phi^{true}");
606  fhPtDetRecoil= new TH1F("hPtDetRecoil","pT detector level",200,0,200);
607  fhPtDetRecoil->GetXaxis()->SetTitle("p^{reco,PYTHIA,ch}_{T} (GeV/c)");
608  fhPtDetMatchedToPartRecoil = new TH1F("hPtDetMatchedToPartRecoil","pT detector level matched to particle level jet",200,0,200);
609  fhPtDetMatchedToPartRecoil->GetXaxis()->SetTitle("p^{reco,PYTHIA,ch}_{T} (GeV/c)");
610 
611  fhTTPtDetMatchedToPart = new TH2F("hTTPtDetMatchedToPart","trigger track pT response reco vs partice",140,0,70,140,0,70);
612  fhTTPtDetMatchedToPart->GetXaxis()->SetTitle("p^{TT,reco}_{T} (GeV/c)");
613  fhTTPtDetMatchedToPart->GetYaxis()->SetTitle("p^{TT,part}_{T} (GeV/c)");
614  fhTTPhiDetMatchedToPart = new TH2F("hTTPhiDetMatchedToPart","trigger track #phi response reco vs partice",200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-0.5*TMath::Pi(),1.5*TMath::Pi());
615  fhTTPhiDetMatchedToPart->GetXaxis()->SetTitle("p^{TT,reco}_{T} (GeV/c)");
616  fhTTPhiDetMatchedToPart->GetYaxis()->SetTitle("p^{TT,part}_{T} (GeV/c)");
617 
618  fOutput->Add(fhPtHybrDet);
619  fOutput->Add(fhPtDetPart);
620  fOutput->Add(fhPtHybrPart);
621  fOutput->Add(fhPtHybrPartCor);
623  fOutput->Add(fhPtDet);
625  fOutput->Add(fhPtPartMatched);
628  fOutput->Add(fhResidual);
629  fOutput->Add(fhPtResidual);
630  fOutput->Add(fhPhiResidual);
632 
638  fOutput->Add(fhPtDetRecoil);
644 
647 
648  fhSelectedTrigger= new TH2F("hSelectedTrigger","ID of selected trigger",2,0,2,200,0,100);
649  fhSelectedTrigger->GetXaxis()->SetBinLabel(1,"Pb-Pb trigger");
650  fhSelectedTrigger->GetXaxis()->SetBinLabel(2,"pp trigger");
651  fhSelectedTrigger->GetYaxis()->SetTitle("p^{TT}_{T} (GeV/c)");
653 
654 
655  fhFractionSharedPtInclusive = new TH2F("hFractionSharedPtInclusive","fraction of shared pT",200,-50,150,50,0,1);
656  fhFractionSharedPtInclusive ->GetXaxis()->SetTitle("p_{T}^{Pb-Pb}");
657  fhFractionSharedPtInclusive ->GetYaxis()->SetTitle("f");
658  fhFractionSharedPtRecoil = new TH2F("hFractionSharedPtRecoil","fraction of shared pT",200,-50,150,50,0,1);
659  fhFractionSharedPtRecoil ->GetXaxis()->SetTitle("p_{T}^{Pb-Pb}");
660  fhFractionSharedPtRecoil ->GetYaxis()->SetTitle("f");
663 
664  TString varNamesInclusive[9]={"centrality","ptRawRec","areaRec","ptCorrRec","phiRec","ptPart","phiPart","ptLeadingTrackRec","ptLeadingTrackPart"};
665  TString varNamesInclusiveMoreVars[13]={"centrality","ptRawRec","areaRec","ptCorrRec","phiRec","ptPart","phiPart","ptLeadingTrackRec","ptLeadingTrackPart","ptDet","phiDet","matchedJetDistanceRec","matchedJetDistancePart"};
666  TString varNamesRecoil[8]={"centrality","ptTT","ptRawRec","areaRec","ptCorrRec","DPhiRec","ptPart","DPhiPart"};
667  TString varNamesRecoilMoreVars[12]={"centrality","ptTT","ptRawRec","areaRec","ptCorrRec","DPhiRec","ptPart","DPhiPart","ptDet","DPhiDet","matchedJetDistanceRec","matchedJetDistancePart"};
669  const char* nameEmbInclusive = GetOutputSlot(2)->GetContainer()->GetName();
670  fTreeEmbInclusive = new TTree(nameEmbInclusive, nameEmbInclusive);
671  if(fMoreTreeVars) {
672  for(Int_t ivar=0; ivar < 13; ivar++){
673  fTreeEmbInclusive->Branch(varNamesInclusiveMoreVars[ivar].Data(), &fTreeVarsInclusiveMoreVars[ivar], Form("%s/F", varNamesInclusiveMoreVars[ivar].Data()));
674  }
675  }
676  else {
677  for(Int_t ivar=0; ivar < 9; ivar++){
678  fTreeEmbInclusive->Branch(varNamesInclusive[ivar].Data(), &fTreeVarsInclusive[ivar], Form("%s/F", varNamesInclusive[ivar].Data()));
679  }
680  }
681  }
682 
684  const char* nameEmbRecoil= GetOutputSlot(3)->GetContainer()->GetName();
685  fTreeEmbRecoil = new TTree(nameEmbRecoil, nameEmbRecoil);
686  if(fMoreTreeVars) {
687  for(Int_t ivar=0; ivar < 12; ivar++){
688  fTreeEmbRecoil->Branch(varNamesRecoilMoreVars[ivar].Data(), &fTreeVarsRecoilMoreVars[ivar], Form("%s/F", varNamesRecoilMoreVars[ivar].Data()));
689  }
690  }
691  else {
692  for(Int_t ivar=0; ivar < 8; ivar++){
693  fTreeEmbRecoil->Branch(varNamesRecoil[ivar].Data(), &fTreeVarsRecoil[ivar], Form("%s/F", varNamesRecoil[ivar].Data()));
694  }
695  }
696  }
697 
698  // =========== Switch on Sumw2 for all histos ===========
699  for (Int_t i=0; i<fOutput->GetEntries(); ++i) {
700  TH1 *h1 = dynamic_cast<TH1*>(fOutput->At(i));
701  if (h1){
702  h1->Sumw2();
703  continue;
704  }
705  THnSparse *hn = dynamic_cast<THnSparse*>(fOutput->At(i));
706  if (hn){
707  hn->Sumw2();
708  }
709  }
710 
711  // add QA plots from fEventCuts
712  fEventCuts.AddQAplotsToList(fOutput);
713 
714  TH1::AddDirectory(oldStatus);
715 
716  PostData(1, fOutput);
718 
720 }
721 
729 {
730 
731  fHistEvtSelection->Fill(1); // number of events before event selection
732  AliVEvent *ev = InputEvent();
733  if (!fEventCuts.AcceptEvent(ev)) {
734  fHistEvtSelection->Fill(2);
735  return kTRUE;
736  }
737 
740  //DoClusterLoop();
741  //DoCellLoop();
742  DoJetCoreLoop();
746 
747 
748  return kTRUE;
749 }
750 
752 {
753  // Do jet core analysis and fill histograms.
754 
756  AliJetContainer *jetContPart = 0x0;
757  AliJetContainer *jetContTrue = 0x0;
759  jetContTrue = GetJetContainer(fJetContTrueName);
760  jetContPart = GetJetContainer(fJetContPartName);
761  }
762 
763  if(!jetCont ||
765  AliError(Form("jet container not found - check name %s",fJetContName.Data()));
766  TIter next(&fJetCollArray);
767  while ((jetCont = static_cast<AliJetContainer*>(next())))
768  AliError(Form("%s",jetCont->GetName()));
769  AliFatal("Exit...");
770  return;
771  }
772 
773  // centrality selection
774  if(fDebug) Printf("centrality: %f\n", fCent);
776  ((fCent>fCentMax) || (fCent<fCentMin))) {
777  fHistEvtSelection->Fill(4);
778  return;
779  }
780  fHistEvtSelection->Fill(0);
781 
782  // Background
783  // If rho exists get it, otherwise it is set to 0 and ptJet_corr = ptJet_raw
784  Double_t rho = 0;
785  if (jetCont->GetRhoParameter()) rho = jetCont->GetRhoVal();
786  if(fDebug) Printf("rho = %f",rho);
787 
788  // get MC particle container in case running embedding, to match
789  // reconstructed and MC-level trigger tracks
790  AliParticleContainer *partCont = 0x0;
792 // AliParticleContainer *partCont = 0x0;
793 // TIter next(&fParticleCollArray);
794 // while ((partCont = static_cast<AliParticleContainer*>(next()))) {
795 // TString groupname = partCont->GetName();
796 // Printf("particle name = %s",groupname.Data());
797 // }
798 
799  // Choose trigger track
800  Int_t nT=0;
801  TList ParticleList;
802  Double_t minT=0;
803  Double_t maxT=0;
804  Int_t number=0;
805  Double_t dice=fRandom->Uniform(0,1);
806  Bool_t isSignal = kFALSE;
807  if(dice>fFrac){
808  minT=fTTLowRef;
809  maxT=fTTUpRef;
810  }
811  if(dice<=fFrac){
812  isSignal = kTRUE;
813  minT=fTTLowSig;
814  maxT=fTTUpSig;
815  }
816  nT=SelectTrigger(&ParticleList,minT,maxT,number);
817  if(fDebug) Printf("%s class ---> n triggers between %f and %f = %i, index of trigger chosen = %i",dice>fFrac?"ref.":"sig.",minT,maxT,number,nT);
818  if(nT<0) return;
819 
820  if(dice>fFrac) fh1TrigRef->Fill(number);
821  if(dice<=fFrac)fh1TrigSig->Fill(number);
822 
823 
824  // particle loop -
825  for(Int_t tt=0;tt<ParticleList.GetEntries();tt++){
826  // histogram
827  //if(fHardest==0||fHardest==1){if(tt!=nT) continue;}
828  if(tt!=nT) continue;
829  AliVParticle *partback = (AliVParticle*)ParticleList.At(tt);
830  if(!partback) continue;
831  if(fDebug) Printf("trigger particle pt = %f \teta = %f \t phi = %f",partback->Pt(),partback->Eta(),partback->Phi());
832  // if(partback->Pt()<8) continue;
833 
834  fh2Ntriggers->Fill(fCent,partback->Pt());
835  Double_t phiBinT = RelativePhi(partback->Phi(),fEPV0);
836 
837  Double_t etabig=0;
838  Double_t ptbig=0;
839  Double_t areabig=0;
840  Double_t phibig=0.;
841  // Double_t areasmall=0;
842 
843  TString histname;
844  TString groupname;
845  groupname = jetCont->GetName();
846  UInt_t count = 0;
847  for(auto jetbig : jetCont->accepted()) {
848  if (!jetbig) continue;
849  count++;
850  ptbig = jetbig->Pt();
851  etabig = jetbig->Eta();
852  phibig = jetbig->Phi();
853  if(ptbig==0) continue;
854  Double_t phiBin = RelativePhi(phibig,fEPV0); //relative phi between jet and ev. plane
855  areabig = jetbig->Area();
856  Double_t ptcorr=ptbig-rho*areabig;
857  Double_t dphi=RelativePhi(partback->Phi(),phibig);
858  if(fDebug) Printf("jet properties...\n\teta = %f \t phi = %f \t pt = %f \t relativephi = %f\t area = %f\t rho = %f",etabig,phibig,ptbig,dphi,areabig,rho);
859 
860  // do azimuthal correlation analysis
861  // dPhi between -0.5 < dPhi < 1.5
862  Double_t dPhiShift=phibig-partback->Phi();
863  if(dPhiShift>2*TMath::Pi()) dPhiShift -= 2*TMath::Pi();
864  if(dPhiShift<-2*TMath::Pi()) dPhiShift += 2*TMath::Pi();
865  if(dPhiShift<-0.5*TMath::Pi()) dPhiShift += 2*TMath::Pi();
866  if(dPhiShift>1.5*TMath::Pi()) dPhiShift -= 2*TMath::Pi();
867 
868  // dPhi between 0 < dPhi < 2pi
869  Double_t dPhiShiftPi=phibig-partback->Phi();
870  if(dPhiShiftPi>2*TMath::Pi()) dPhiShiftPi -= 2*TMath::Pi();
871  if(dPhiShiftPi<-2*TMath::Pi()) dPhiShiftPi += 2*TMath::Pi();
872  if(dPhiShiftPi<0) dPhiShiftPi += 2*TMath::Pi();
873 
874 
875  if(isSignal) fhDphiPtSig->Fill(dPhiShift,ptcorr);
876  else fhDphiPtRef->Fill(dPhiShift,ptcorr);
877 
878  // selection on relative phi
879  if(fJetHadronDeltaPhi>0. &&
880  TMath::Abs(dphi)<TMath::Pi()-fJetHadronDeltaPhi) continue;
881 
883  Float_t phitt=partback->Phi();
884  if(phitt<0)phitt+=TMath::Pi()*2.;
885  Int_t phiBintt = GetPhiBin(phitt-fEPV0);
886 
887  Double_t fillspec[] = {fCent,areabig,ptcorr,partback->Pt(),dPhiShiftPi, static_cast<Double_t>(phiBintt)};
888  fHJetSpec->Fill(fillspec);
889  }
890 
892  //
893  // embedding for recoil jets
894  // get MC info
895  //
896  Double_t ptTTMC = 0;
897  Double_t phiTTMC = 0;
898  Int_t TTmatched = 0;
899  Double_t distanceClosestJet1=-1, distanceClosestJet2=-1;
900  for(auto partMC : partCont->accepted()) {
901  Int_t labtr = partback->GetLabel();
902  Int_t labpa = partMC->GetLabel();
903  if(labtr==labpa) {
904  ptTTMC = partMC->Pt();
905  phiTTMC = partMC->Phi();
906  TTmatched++;
907  break;
908  }
909  }
910  if(TTmatched!=1) continue;
911  Double_t ptTTreco = partback->Pt();
912  Double_t phiTTreco = partback->Phi();
913  if(fDebug) Printf("found corresponding truth-level particle, pt reco = %f pt MC = %f, phi reco = %f phi MC = %f",ptTTreco,ptTTMC,phiTTreco,phiTTMC);
914  fhTTPtDetMatchedToPart->Fill(ptTTreco,ptTTMC);
915  fhTTPhiDetMatchedToPart->Fill(phiTTreco,phiTTMC);
916 
917  auto jet2 = jetbig->ClosestJet();
918  if(!jet2) {
919  //Printf("jet 2 cant be found");
920  continue;}
921  distanceClosestJet1 = jetbig->ClosestJetDistance();
922  Double_t ptJet2 = jet2->Pt();
923  Double_t phiJet2 = jet2->Phi();
924  fhPtDetRecoil->Fill(ptJet2);
925  auto jet3 = jet2->ClosestJet();
926  if(!jet3) {
927  //Printf("jet3 can't be found");
928  continue;
929  }
930  distanceClosestJet2 = jet2->ClosestJetDistance();
931  fhPtDetMatchedToPartRecoil->Fill(ptJet2);
932  Double_t ptJet3 = jet3->Pt();
933  Double_t phiJet3 = jet3->Phi();
934 
935 
936  Double_t dPhiPart=phiJet3-phiTTMC;
937  Double_t dPhiPartShiftPi=phiJet3-phiTTMC;
938  if(dPhiPart>2*TMath::Pi()) dPhiPart -= 2*TMath::Pi();
939  if(dPhiPart<-2*TMath::Pi()) dPhiPart += 2*TMath::Pi();
940  if(dPhiPart<-0.5*TMath::Pi()) dPhiPart += 2*TMath::Pi();
941  if(dPhiPart>1.5*TMath::Pi()) dPhiPart -= 2*TMath::Pi();
942 
943  // dPhi between 0 < dPhi < 2pi
944  if(dPhiPartShiftPi>2*TMath::Pi()) dPhiPartShiftPi -= 2*TMath::Pi();
945  if(dPhiPartShiftPi<-2*TMath::Pi()) dPhiPartShiftPi += 2*TMath::Pi();
946  if(dPhiPartShiftPi<0) dPhiPartShiftPi += 2*TMath::Pi();
947 
948  Double_t dPhiDetShiftPi=phiJet2-partback->Phi();
949  if(dPhiDetShiftPi>2*TMath::Pi()) dPhiDetShiftPi -= 2*TMath::Pi();
950  if(dPhiDetShiftPi<-2*TMath::Pi()) dPhiDetShiftPi += 2*TMath::Pi();
951  if(dPhiDetShiftPi<0) dPhiDetShiftPi += 2*TMath::Pi();
952 
953  if(fDebug) Printf("--- recoil - jet pt = jet hybrid pt = %f\t jet matched det pt = %f\t jet matched particle level pt = %f\t\n\tjet reco phi = %f\t jet particle phi = %f",ptbig,ptJet2,ptJet3,phibig,phiJet3);
954 
955  fhPtDetPartRecoil->Fill(ptJet2,ptJet3);
956  Double_t fraction = jetCont->GetFractionSharedPt(jetbig);
957  fhFractionSharedPtRecoil->Fill(ptcorr,fraction);
958  if(fraction < fMinFractionSharedPt) continue;
959 
960  Double_t residual = (ptcorr - ptJet3) / ptJet3;
961  Double_t residualDphi = (dPhiShift - dPhiPart) / dPhiPart;
962 
963  fhPtHybrDetRecoil->Fill(ptbig,ptJet2);
964  fhPtHybrPartRecoil->Fill(ptbig,ptJet3);
965  fhPtHybrPartCorRecoil->Fill(ptcorr,ptJet3);
966  fhDPhiHybrPartCorRecoil->Fill(dPhiShift,dPhiPart);
967  fhResidualRecoil->Fill(residual);
968  fhPtResidualRecoil->Fill(ptJet3,residual);
969  fhDphiResidualRecoil->Fill(residualDphi);
970  fhDphiphiResidualRecoil->Fill(dPhiPart,residualDphi);
971 
972  if(ptcorr<fMinEmbJetPt) continue;
973 
974  if(fFillRecoilTree) {
975  //TString varNamesRecoilMoreVars[12]={"centrality","ptTT","ptRawRec","areaRec","ptCorrRec","DPhiRec","ptPart","DPhiPart","ptDet","DPhiDet","matchedJetDistanceRec","matchedJetDistancePart"};
976  if(fMoreTreeVars) {
978  fTreeVarsRecoilMoreVars[1] = partback->Pt();
979  fTreeVarsRecoilMoreVars[2] = ptbig;
980  fTreeVarsRecoilMoreVars[3] = areabig;
981  fTreeVarsRecoilMoreVars[4] = ptcorr;
982  fTreeVarsRecoilMoreVars[5] = dPhiShiftPi;
983  fTreeVarsRecoilMoreVars[6] = ptJet3;
984  fTreeVarsRecoilMoreVars[7] = dPhiPartShiftPi;
985  fTreeVarsRecoilMoreVars[8] = ptJet2;
986  fTreeVarsRecoilMoreVars[9] = dPhiDetShiftPi;
987  fTreeVarsRecoilMoreVars[10] = distanceClosestJet1;
988  fTreeVarsRecoilMoreVars[11] = distanceClosestJet2;
989  }
990  else {
991  fTreeVarsRecoil[0] = fCent;
992  fTreeVarsRecoil[1] = partback->Pt();
993  fTreeVarsRecoil[2] = ptbig;
994  fTreeVarsRecoil[3] = areabig;
995  fTreeVarsRecoil[4] = ptcorr;
996  fTreeVarsRecoil[5] = dPhiShiftPi;
997  fTreeVarsRecoil[6] = ptJet3;
998  fTreeVarsRecoil[7] = dPhiPartShiftPi;
999  }
1000  fTreeEmbRecoil->Fill();
1001  }
1002  }
1003  }
1004  }
1005 }
1006 
1008 
1013  AliJetContainer *jetContTrue = 0x0;
1016  jetContTrue = GetJetContainer(fJetContTrueName);
1017  }
1018  //if(fDebug) Printf("particle container 0 entries = %i \t1 entries = %i\t 2 entries = %i",partCont0->GetNParticles(),partCont1->GetNParticles(),partCont2->GetNParticles());
1019 
1020  if((fJetShapeType==AliAnalysisTaskJetCoreEmcal::kDetEmbPart && (!jetCont || !jetContPart || !jetContTrue)) ||
1022  )
1023  { // if jet containers not found
1024  AliError(Form("jet container not found - check name %s(base), %s (part) or %s (true)",fJetContName.Data(), fJetContPartName.Data(), fJetContTrueName.Data()));
1025  TIter next(&fJetCollArray);
1026  while ((jetCont = static_cast<AliJetContainer*>(next())))
1027  AliError(Form("%s",jetCont->GetName()));
1028  AliFatal("Exit...");
1029  return;
1030  }
1031 
1032  if(fDebug) {
1033  Printf("n particle jets = %i",jetContPart->GetNJets());
1034  Printf("n reco jets = %i",jetCont->GetNJets());
1036  Printf("n PYTHIA jets = %i",jetContTrue->GetNJets());
1037  }
1038  }
1039 
1040  // Background
1041  Double_t rho = 0;
1042  if (jetCont->GetRhoParameter()) rho = jetCont->GetRhoVal();
1043 
1044  // PYTHIA event weight
1045  // note - not used
1046  // AliGenPythiaEventHeader *pyHeader = 0x0; //!<! Pythia header of the current external event
1047  // AliAODEvent *ev = dynamic_cast<AliAODEvent*>(InputEvent());
1048  // AliAODMCHeader* aodMCH = dynamic_cast<AliAODMCHeader*>(ev->FindListObject(AliAODMCHeader::StdBranchName()));
1049  // if (aodMCH) {
1050  // for (UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) {
1051  // pyHeader= dynamic_cast<AliGenPythiaEventHeader*>(aodMCH->GetCocktailHeader(i));
1052  // if (pyHeader) break;
1053  // }
1054  // }
1055  //
1056  // Double_t pythiaCrossSection = 0;
1057  // Double_t pythiaTrials = 0;
1058  // Double_t pythiaWeight = 0;
1059  // if (pyHeader)
1060  // {
1061  // if(fDebug) Printf("have pythia header - get weight");
1062  // pythiaCrossSection = pyHeader->GetXsection();
1063  // pythiaTrials = pyHeader->Trials();
1064  // //fPythiaPtHard = fPythiaHeader->GetPtHard();
1065  // pythiaWeight = pythiaCrossSection / pythiaTrials;
1066  // }
1067  // if(fDebug) Printf("pythia weight = %f",pythiaWeight);
1068 
1069  for(auto jet1 : jetCont->accepted()) { // loop over hybrid jets
1070 
1071  Double_t ptJet1 = jet1->Pt();
1072  Double_t phiJet1 = jet1->Phi();
1073  Double_t area = jet1->Area();
1074  Double_t ptCorr = ptJet1-rho*area;
1075  Double_t ptLeadingTrackJet1 = jet1->GetLeadingTrack()->Pt();
1076  // closest jet
1077  Double_t distanceClosestJet1=-1, distanceClosestJet2=-1;
1078  Double_t ptJet2=0, phiJet2=0;
1079  Double_t ptJet3=0, phiJet3=0;
1080  Double_t ptLeadingTrackJet3=0;
1081  if(fDebug) Printf("--- jet pt hybrid = %f\t ",ptJet1);
1083  auto jet2 = jet1->ClosestJet();
1084  if(!jet2) {
1085  //Printf("jet 2 cant be found");
1086  continue;}
1087  distanceClosestJet1 = jet1->ClosestJetDistance();
1088  ptJet2 = jet2->Pt();
1089  phiJet2 = jet2->Phi();
1090  fhPtDet->Fill(ptJet2);
1091 
1092  auto jet3 = jet2->ClosestJet();
1093  if(!jet3) {
1094  //Printf("jet3 can't be found");
1095  continue;
1096  }
1097  distanceClosestJet2 = jet2->ClosestJetDistance();
1098  fhPtDetMatchedToPart->Fill(ptJet2);
1099  ptJet3 = jet3->Pt();
1100  phiJet3 = jet3->Phi();
1101  ptLeadingTrackJet3 = jet3->GetLeadingTrack()->Pt();
1102  if(ptJet3==ptJet1) {
1103  fhPtPartMatchedWrongCent->Fill(ptJet3,fCent);
1104  continue;
1105  }
1106  fhPtPartMatched->Fill(ptJet3);
1107  fhPtPartMatchedCent->Fill(ptJet3,fCent);
1108  }
1109 
1111  auto jet3 = jet1->ClosestJet();
1112  if(!jet3) {
1113  if(fDebug) Printf("jet3 can't be found");
1114  continue;
1115  }
1116  distanceClosestJet1 = jet1->ClosestJetDistance();
1117  ptJet3 = jet3->Pt();
1118  phiJet3 = jet3->Phi();
1119  fhPtDetMatchedToPart->Fill(ptJet3);
1120  }
1121 
1122  if(fDebug) Printf("--- jet pt = jet hybrid pt = %f\t jet matched det pt = %f\t jet matched particle level pt = %f\t",ptJet1,ptJet2,ptJet3);
1123 
1124  fhPtDetPart->Fill(ptJet2,ptJet3);
1125  Double_t fraction = 1.;
1127  if(fDebug) Printf("FRACTION shared pT = %f",fraction);
1128  fhFractionSharedPtInclusive->Fill(ptCorr,fraction);
1129  if(fraction < fMinFractionSharedPt) continue;
1130 
1131  Double_t residual = (ptCorr - ptJet3) / ptJet3;
1132  Double_t residualPhi = (phiJet1 - phiJet3) / phiJet3;
1133 
1134  fhPtHybrDet->Fill(ptJet1,ptJet2);
1135  fhPtHybrPart->Fill(ptJet1,ptJet3);
1136  fhPtHybrPartCor->Fill(ptCorr,ptJet3);
1137  fhPhiHybrPartCor->Fill(phiJet1,phiJet3);
1138 
1139  fhResidual->Fill(residual);
1140  fhPtResidual->Fill(ptJet3,residual);
1141  fhPhiResidual->Fill(residualPhi);
1142  fhPhiPhiResidual->Fill(phiJet3,residualPhi);
1143 
1144  if(ptCorr<fMinEmbJetPt) continue;
1145 
1147  if(fMoreTreeVars) {
1149  fTreeVarsInclusiveMoreVars[1] = ptJet1;
1150  fTreeVarsInclusiveMoreVars[2] = area;
1151  fTreeVarsInclusiveMoreVars[3] = ptCorr;
1152  fTreeVarsInclusiveMoreVars[4] = phiJet1;
1153  fTreeVarsInclusiveMoreVars[5] = ptJet3;
1154  fTreeVarsInclusiveMoreVars[6] = phiJet3;
1155  fTreeVarsInclusiveMoreVars[7] = ptLeadingTrackJet1;
1156  fTreeVarsInclusiveMoreVars[8] = ptLeadingTrackJet3;
1157  fTreeVarsInclusiveMoreVars[9] = ptJet2;
1158  fTreeVarsInclusiveMoreVars[10] = phiJet2;
1159  fTreeVarsInclusiveMoreVars[11] = distanceClosestJet1;
1160  fTreeVarsInclusiveMoreVars[12] = distanceClosestJet2;
1161  fTreeEmbInclusive->Fill();
1162  }
1163  else {
1165  fTreeVarsInclusive[1] = ptJet1;
1166  fTreeVarsInclusive[2] = area;
1167  fTreeVarsInclusive[3] = ptCorr;
1168  fTreeVarsInclusive[4] = phiJet1;
1169  fTreeVarsInclusive[5] = ptJet3;
1170  fTreeVarsInclusive[6] = phiJet3;
1171  fTreeVarsInclusive[7] = ptLeadingTrackJet1;
1172  fTreeVarsInclusive[8] = ptLeadingTrackJet3;
1173  fTreeEmbInclusive->Fill();
1174  }
1175  }
1176  }
1177 // for(auto jettrue : jetContPart->accepted()) {
1178 // // jettrue
1179 // Double_t ptTrue = jettrue->Pt();
1180 // Double_t phiTrue = jettrue->Phi();
1181 // Double_t etaTrue= jettrue->Eta();
1182 // auto jetmatched = jettrue->ClosestJet();
1183 // if(!jetmatched) continue;
1184 // Double_t ptMatched = jetmatched->Pt();
1185 // Double_t phiMatched = jetmatched->Phi();
1186 // Double_t etaMatched = jetmatched->Eta();
1187 // Double_t residual = (ptMatched - ptTrue) / ptTrue;
1188 // fhPtHybrTrue->Fill(ptTrue,ptMatched);
1189 // fhResidual->Fill(residual);
1190 // fhPtResidual->Fill(ptTrue,residual);
1191 // }
1192 }
1193 
1194 
1195 
1201 {
1202  TString histname;
1203  TString groupname;
1204  AliJetContainer* jetCont = 0;
1205  TIter next(&fJetCollArray);
1206  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
1207  groupname = jetCont->GetName();
1208  UInt_t count = 0;
1209  for(auto jet : jetCont->accepted()) {
1210  if (!jet) continue;
1211  count++;
1212 
1213  histname = TString::Format("%s/histJetPt_%d", groupname.Data(), fCentBin);
1214  fHistManager.FillTH1(histname, jet->Pt());
1215 
1216  histname = TString::Format("%s/histJetPtLow_%d", groupname.Data(), fCentBin);
1217  fHistManager.FillTH1(histname, jet->Pt());
1218 
1219  histname = TString::Format("%s/histJetArea_%d", groupname.Data(), fCentBin);
1220  fHistManager.FillTH1(histname, jet->Area());
1221 
1222  histname = TString::Format("%s/histJetPhi_%d", groupname.Data(), fCentBin);
1223  fHistManager.FillTH1(histname, jet->Phi());
1224 
1225  histname = TString::Format("%s/histJetEta_%d", groupname.Data(), fCentBin);
1226  fHistManager.FillTH1(histname, jet->Eta());
1227 
1228  if (jetCont->GetRhoParameter()) {
1229  histname = TString::Format("%s/histJetCorrPt_%d", groupname.Data(), fCentBin);
1230  fHistManager.FillTH1(histname, jet->Pt() - jetCont->GetRhoVal() * jet->Area());
1231 
1232  histname = TString::Format("%s/histJetCorrPtLeadingTrackPt_%d", groupname.Data(), fCentBin);
1233  fHistManager.FillTH2(histname, jet->Pt() - jetCont->GetRhoVal() * jet->Area(), jet->GetLeadingTrack()->Pt());
1234 
1235  }
1236  }
1237  histname = TString::Format("%s/histNJets_%d", groupname.Data(), fCentBin);
1238  fHistManager.FillTH1(histname, count);
1239  }
1240 }
1241 
1247 {
1249 
1250  TString histname;
1251  TString groupname;
1252  UInt_t sumAcceptedTracks = 0;
1253  AliParticleContainer* partCont = 0;
1254  TIter next(&fParticleCollArray);
1255  while ((partCont = static_cast<AliParticleContainer*>(next()))) {
1256  groupname = partCont->GetName();
1257  UInt_t count = 0;
1258  for(auto part : partCont->accepted()) {
1259  if (!part) continue;
1260  count++;
1261 
1262  histname = TString::Format("%s/histTrackPt_%d", groupname.Data(), fCentBin);
1263  fHistManager.FillTH1(histname, part->Pt());
1264 
1265  histname = TString::Format("%s/histTrackPhi_%d", groupname.Data(), fCentBin);
1266  fHistManager.FillTH1(histname, part->Phi());
1267 
1268  histname = TString::Format("%s/histTrackEta_%d", groupname.Data(), fCentBin);
1269  fHistManager.FillTH1(histname, part->Eta());
1270 
1271  if (partCont->GetLoadedClass()->InheritsFrom("AliVTrack")) {
1272  const AliVTrack* track = static_cast<const AliVTrack*>(part);
1273 
1274  histname = TString::Format("%s/fHistDeltaEtaPt_%d", groupname.Data(), fCentBin);
1275  fHistManager.FillTH1(histname, track->Pt(), track->Eta() - track->GetTrackEtaOnEMCal());
1276 
1277  histname = TString::Format("%s/fHistDeltaPhiPt_%d", groupname.Data(), fCentBin);
1278  fHistManager.FillTH1(histname, track->Pt(), track->Phi() - track->GetTrackPhiOnEMCal());
1279 
1280  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", groupname.Data(), fCentBin);
1281  fHistManager.FillTH1(histname, track->Pt(), track->Pt() - track->GetTrackPtOnEMCal());
1282 
1283  if (clusCont) {
1284  Int_t iCluster = track->GetEMCALcluster();
1285  if (iCluster >= 0) {
1286  AliVCluster* cluster = clusCont->GetAcceptCluster(iCluster);
1287  if (cluster) {
1288  histname = TString::Format("%s/fHistEoverPvsP_%d", groupname.Data(), fCentBin);
1289  fHistManager.FillTH2(histname, track->P(), cluster->GetNonLinCorrEnergy() / track->P());
1290  }
1291  }
1292  }
1293  }
1294  }
1295  sumAcceptedTracks += count;
1296 
1297  histname = TString::Format("%s/histNTracks_%d", groupname.Data(), fCentBin);
1298  fHistManager.FillTH1(histname, count);
1299  }
1300 
1301  histname = "fHistSumNTracks";
1302  fHistManager.FillTH1(histname, sumAcceptedTracks);
1303 }
1304 
1310 {
1311  TString histname;
1312  TString groupname;
1313  UInt_t sumAcceptedClusters = 0;
1314  AliClusterContainer* clusCont = 0;
1315  TIter next(&fClusterCollArray);
1316  while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
1317  groupname = clusCont->GetName();
1318 
1319  for(auto cluster : clusCont->all()) {
1320  if (!cluster) continue;
1321 
1322  if (cluster->GetIsExotic()) {
1323  histname = TString::Format("%s/histClusterEnergyExotic_%d", groupname.Data(), fCentBin);
1324  fHistManager.FillTH1(histname, cluster->E());
1325  }
1326  }
1327 
1328  UInt_t count = 0;
1329  for(auto cluster : clusCont->accepted()) {
1330  if (!cluster) continue;
1331  count++;
1332 
1333  AliTLorentzVector nPart;
1334  cluster->GetMomentum(nPart, fVertex);
1335 
1336  histname = TString::Format("%s/histClusterEnergy_%d", groupname.Data(), fCentBin);
1337  fHistManager.FillTH1(histname, cluster->E());
1338 
1339  histname = TString::Format("%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), fCentBin);
1340  fHistManager.FillTH1(histname, cluster->GetNonLinCorrEnergy());
1341 
1342  histname = TString::Format("%s/histClusterHadCorrEnergy_%d", groupname.Data(), fCentBin);
1343  fHistManager.FillTH1(histname, cluster->GetHadCorrEnergy());
1344 
1345  histname = TString::Format("%s/histClusterPhi_%d", groupname.Data(), fCentBin);
1346  fHistManager.FillTH1(histname, nPart.Phi_0_2pi());
1347 
1348  histname = TString::Format("%s/histClusterEta_%d", groupname.Data(), fCentBin);
1349  fHistManager.FillTH1(histname, nPart.Eta());
1350  }
1351  sumAcceptedClusters += count;
1352 
1353  histname = TString::Format("%s/histNClusters_%d", groupname.Data(), fCentBin);
1354  fHistManager.FillTH1(histname, count);
1355  }
1356 
1357  histname = "fHistSumNClusters";
1358  fHistManager.FillTH1(histname, sumAcceptedClusters);
1359 }
1360 
1366 {
1367  if (!fCaloCells) return;
1368 
1369  TString histname;
1370 
1371  const Short_t ncells = fCaloCells->GetNumberOfCells();
1372 
1373  histname = TString::Format("%s/histNCells_%d", fCaloCellsName.Data(), fCentBin);
1374  fHistManager.FillTH1(histname, ncells);
1375 
1376  histname = TString::Format("%s/histCellEnergy_%d", fCaloCellsName.Data(), fCentBin);
1377  for (Short_t pos = 0; pos < ncells; pos++) {
1378  Double_t amp = fCaloCells->GetAmplitude(pos);
1379 
1380  fHistManager.FillTH1(histname, amp);
1381  }
1382 }
1383 
1389 {
1391 }
1392 
1401 {
1402  return kTRUE;
1403 }
1404 
1409 {
1410 }
1411 
1413 
1414  Int_t index=-1;
1415  Int_t triggers[100];
1416 
1417  for(Int_t cr=0;cr<100;cr++) triggers[cr]=-1;
1418 
1419  Int_t im=0;
1420 
1421  AliParticleContainer* partCont = 0x0;
1422  AliParticleContainer* partContDet = 0x0;
1425  partCont = GetParticleContainer(0);
1426  partContDet = GetParticleContainer(1);
1427  }
1428  else partCont = GetParticleContainer(0);
1429  UInt_t iCount = 0;
1430  // loop over first container
1431  for(auto part : partCont->accepted()) {
1432  if (!part) continue;
1433  list->Add(part);
1434  iCount++;
1435  if(part->Pt()>=minT && part->Pt()<maxT){
1436  triggers[im]=iCount-1;
1437  im=im+1;
1438  fhSelectedTrigger->Fill(0.5,part->Pt());
1439  //Printf("Pb-Pb data trigger added - pt = %f, number = %i",part->Pt(),im);
1440  }
1441  }
1442  // loop over second container (embedded) if requested
1443  if(partContDet) {
1444  for(auto part : partContDet->accepted()) {
1445  if (!part) continue;
1446  list->Add(part);
1447  iCount++;
1448  if(part->Pt()>=minT && part->Pt()<maxT){
1449  triggers[im]=iCount-1;
1450  im=im+1;
1451  fhSelectedTrigger->Fill(1.5,part->Pt());
1452  //Printf("embedded trigger added - pt = %f, number = %i",part->Pt(),im);
1453  }
1454  }
1455  }
1456  number=im;
1457  Int_t rd=0;
1458  if(im>0) rd=fRandom->Integer(im);
1459  index=triggers[rd];
1460  return index;
1461 }
1462 
1464 
1465  // get relative DeltaPhi from -pi < DeltaPhi < pi
1466 
1467  if (vphi < -1*TMath::Pi()) vphi += (2*TMath::Pi());
1468  else if (vphi > TMath::Pi()) vphi -= (2*TMath::Pi());
1469  if (mphi < -1*TMath::Pi()) mphi += (2*TMath::Pi());
1470  else if (mphi > TMath::Pi()) mphi -= (2*TMath::Pi());
1471  double dphi = mphi-vphi;
1472  if (dphi < -1*TMath::Pi()) dphi += (2*TMath::Pi());
1473  else if (dphi > TMath::Pi()) dphi -= (2*TMath::Pi());
1474  return dphi;//dphi in [-Pi, Pi]
1475 }
1476 
1478 {
1479  Int_t phibin=-1;
1480  if(!(TMath::Abs(phi)<=2*TMath::Pi())) return -1;
1481  Double_t phiwrtrp=TMath::ACos(TMath::Abs(TMath::Cos(phi)));
1482  phibin=Int_t(fNRPBins*phiwrtrp/(0.5*TMath::Pi()));
1483  //if(phibin<0||phibin>=fNRPBins){AliError("Phi Bin not defined");}
1484  return phibin;
1485 }
Float_t fJetHadronDeltaPhi
max angle from pi (set <0 for no selection)
THashList * CreateHistoGroup(const char *groupname)
Create a new group of histograms within a parent group.
TObjArray fClusterCollArray
cluster collection array
Float_t fTTLowRef
minimum reference trigger track pt
Double_t GetRhoVal() const
const TString & GetRhoName() const
double Double_t
Definition: External.C:58
Float_t fFrac
fraction of events that are used to fill signal recoil jet population
Bool_t fFillRecoilTHnSparse
switch to fill recoil THnSparse for main analysis
Definition: External.C:236
Int_t SelectTrigger(TList *list, Double_t minT, Double_t maxT, Int_t &number)
AliJetContainer * GetJetContainer(Int_t i=0) const
Float_t fTTUpRef
maximum reference trigger track pt
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.
Bool_t fFillInclusiveTree
switch to fill embedding tree with inclusive jet info
Double_t fMinBinPt
min pt in histograms
Double_t fEPV0
!event plane V0
Int_t fCentBin
!event centrality bin
Float_t fMinEmbJetPt
min corrected jet pt to use in embedding
TString fJetContName
Base level jet container name.
Float_t fMinFractionSharedPt
min fraction of pt between hybrid / detector jets
Container for particles within the EMCAL framework.
const TString & GetClassName() const
TString fJetContTrueName
True pp (detector) level jet container name.
TString kData
Declare data MC or deltaAOD.
TObjArray fParticleCollArray
particle/track collection array
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
const AliClusterIterableContainer all() 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
Float_t fTTUpSig
maximum signal trigger track pt
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
float Float_t
Definition: External.C:68
Double_t Phi_0_2pi() const
Float_t fTTLowSig
minimum signal trigger track pt
Int_t GetNJets() 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
Int_t fNcentBins
how many centrality bins
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
Definition: External.C:212
AliVCluster * GetAcceptCluster(Int_t i) const
TString fJetContPartName
Particle(MC) level jet container name.
const AliClusterIterableContainer accepted() const
Double_t fCent
!event centrality
Float_t fCentMax
maximum centrality
TString fCaloCellsName
name of calo cell collection
Bool_t fMoreTreeVars
add more variables to the output tree
Bool_t fFillJetHistograms
switch to fill jet histograms
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
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Double_t RelativePhi(Double_t mphi, Double_t vphi)
short Short_t
Definition: External.C:23
AliVCaloCells * fCaloCells
!cells
AliRhoParameter * GetRhoParameter()
const char * GetName() const
AliEmcalList * fOutput
!output list
Double_t fMaxBinPt
max pt in histograms
Int_t fPtHardBin
pt hard bin if running embedding
THistManager fHistManager
Histogram manager.
Double_t fVertex[3]
!event vertex
void SetMakeGeneralHistograms(Bool_t g)
Enable general histograms.
Base task in the EMCAL jet framework.
Double_t GetFractionSharedPt(const AliEmcalJet *jet, AliParticleContainer *cont2=0x0) const
Declaration of class AliEmcalPythiaInfo.
const AliParticleIterableContainer accepted() const
const char Option_t
Definition: External.C:48
void UserCreateOutputObjects()
Main initialization function on the worker.
const AliJetIterableContainer accepted() const
bool Bool_t
Definition: External.C:53
Bool_t fFillRecoilTree
switch to fill embedding tree with recoil jet info
Container structure for EMCAL clusters.
Float_t fCentMin
minimum centrality
Container for jet within the EMCAL jet framework.
Definition: External.C:196
Bool_t fFillTrackHistograms
switch to fill track histograms
Int_t fNbins
no. of pt bins
Int_t fRejectionFactorInclusiveJets
factor to reject inclusive jets, to reduce size of ttree