AliPhysics  8d00e07 (8d00e07)
AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA.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 <TF1.h>
19 #include <TH2F.h>
20 #include <TH1.h>
21 #include <TH2.h>
22 #include <TH3.h>
23 #include <THnSparse.h>
24 #include <TList.h>
25 #include <array>
26 #include <iostream>
27 #include <map>
28 #include <vector>
29 #include <TRandom3.h>
30 #include <TClonesArray.h>
31 #include <TGrid.h>
32 #include <THistManager.h>
33 #include <THashList.h>
34 #include <TLinearBinning.h>
35 #include <TObjArray.h>
36 #include <TParameter.h>
37 
38 #include <AliVCluster.h>
39 #include <AliVParticle.h>
40 #include <AliLog.h>
41 
42 #include "AliTLorentzVector.h"
43 #include "AliEmcalJet.h"
44 #include "AliRhoParameter.h"
45 #include "AliJetContainer.h"
46 #include "AliParticleContainer.h"
47 #include "AliClusterContainer.h"
48 #include "AliEMCALGeometry.h"
49 #include "AliVCaloCells.h"
50 #include "AliESDCaloCells.h"
51 #include "AliMCEvent.h"
52 #include "AliMCParticle.h"
53 #include "AliGenEventHeader.h"
54 #include "AliGenPythiaEventHeader.h"
55 
56 
57 #include "AliAnalysisUtils.h"
58 #include "AliESDEvent.h"
59 #include "AliAODEvent.h"
60 #include "AliVEvent.h"
61 #include "AliEMCALTriggerPatchInfo.h"
63 #include "AliInputEventHandler.h"
64 #include "AliLog.h"
65 #include "AliMultSelection.h"
66 #include "AliMultEstimator.h"
67 #include "AliOADBContainer.h"
68 
70 
74 
75 using std::cout;
76 using std::endl;
77 
83 fUseRecalcPatches(false),
84 fHistManager(),
85 fRecevent(),
86 fMCevent(),
87 fRecoUtil(0x0), fClusterEResolution(0x0), fVaryTrkPtRes(),
88 fUseSumw2(),
89 fHistNumbJets(),
90 fHistJetPt(),
91 fHistJetJetPatchE(),
92 fHistJetGammaPatchE(),
93 fHistJetJetPatchPt(),
94 fHistJetGammaPatchPt(),
95 fHistTriggerPatchE(),
96 fhnMBJetSpectra()
97 
98 {
99  //Array Initiation
100  for(int i=0;i<9;i++){
101  fHistEMCalTowerMult[i] = NULL;
102 
103  }
104 }
105 
112 AliAnalysisTaskEmcalJet(name, kTRUE),
113 fUseRecalcPatches(false),
114 fHistManager(name),
115 fRecevent(NULL),
116 fMCevent(NULL),
118 fUseSumw2(0),
119 fHistNumbJets(0),
120 fHistJetPt(0),
126 fhnMBJetSpectra(0x0)
127 
128 
129 {
130  //Array Initiation
131  for(int i=0;i<=9;i++){
132  fHistEMCalTowerMult[i] = NULL;
133 
134  }
136  SetCaloTriggerPatchInfoName("EmcalTriggers");
137 }
138 
143 {
144 }
145 
151 {
153 
154  TString histName = "";
155  TString histTitle = "";
156  for(int i=0;i<=9;i++){
157  histName = TString::Format("fHistEMCalTowerMult_%d",i);
158  histTitle = TString::Format("%s;N_{tower};Counts",histName.Data());
159  fHistEMCalTowerMult[i] = new TH1F(histName.Data(),histTitle.Data(),400,0,400);
160  fOutput->Add(fHistEMCalTowerMult[i]);
161  }
162 
167 
168  TIter next(fHistManager.GetListOfHistograms());
169  TObject* obj = 0;
170  while ((obj = next())) {
171  fOutput->Add(obj);
172  }
173  fOutput->Add(fHistNumbJets);
174  fOutput->Add(fHistJetPt);
175 
176 
177  UInt_t SparseBit = 0;// Bit Code from GetDimParams()
178 
179  SparseBit = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<10 | 1<<11 | 1<<12 | 1<<13 | 1<<14 | 1<<15 | 1<<16;
180  fhnMBJetSpectra = NewTHnSparseF("fhnMBJetSpectra", SparseBit);
181  //fhnMBJetSpectra->Sumw2();
182  fOutput->Add(fhnMBJetSpectra);
183 
184  if(fUseSumw2==0) {
185  // =========== Switch on Sumw2 for all histos ===========
186  for (Int_t i=0; i<fOutput->GetEntries(); ++i) {
187  TH1 *h1 = dynamic_cast<TH1*>(fOutput->At(i));
188  if (h1){
189  h1->Sumw2();
190  continue;
191  }
192  THnSparse *hn = dynamic_cast<THnSparse*>(fOutput->At(i));
193  if(hn)hn->Sumw2();
194  }
195  }
196 
197  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
198 }
199 
200 /*
201  * This function allocates the histograms for basic EMCal cluster QA.
202  * A set of histograms (energy, eta, phi, number of cluster) is allocated
203  * per each cluster container and per each centrality bin.
204  */
206 {
207  TString histname;
208  TString histtitle;
209  TString groupname;
210  AliClusterContainer* clusCont = 0;
211  TIter next(&fClusterCollArray);
212  while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
213  groupname = clusCont->GetName();
214  fHistManager.CreateHistoGroup(groupname);
215  for (Int_t cent = 0; cent < fNcentBins; cent++) {
216  histname = TString::Format("%s/histClusterEnergy_%d", groupname.Data(), cent);
217  histtitle = TString::Format("%s;#it{E}_{cluster} (GeV);counts", histname.Data());
218  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2, "s");
219 
220  histname = TString::Format("%s/histClusterEnergyExotic_%d", groupname.Data(), cent);
221  histtitle = TString::Format("%s;#it{E}_{cluster}^{exotic} (GeV);counts", histname.Data());
222  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2, "s");
223 
224  histname = TString::Format("%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), cent);
225  histtitle = TString::Format("%s;#it{E}_{cluster}^{non-lin.corr.} (GeV);counts", histname.Data());
226  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2, "s");
227 
228  histname = TString::Format("%s/histClusterHadCorrEnergy_%d", groupname.Data(), cent);
229  histtitle = TString::Format("%s;#it{E}_{cluster}^{had.corr.} (GeV);counts", histname.Data());
230  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2, "s");
231 
232  histname = TString::Format("%s/histClusterPhi_%d", groupname.Data(), cent);
233  histtitle = TString::Format("%s;#it{#phi}_{custer};counts", histname.Data());
234  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi(), "s");
235 
236  histname = TString::Format("%s/histClusterEta_%d", groupname.Data(), cent);
237  histtitle = TString::Format("%s;#it{#eta}_{custer};counts", histname.Data());
238  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1, "s");
239 
240  histname = TString::Format("%s/fHistFcrossvEonline_%d", groupname.Data(), cent);
241  histtitle = TString::Format("%s;#it{E}_{cluster} (GeV);#it{F}_{cross}", histname.Data());
242  fHistManager.CreateTH2(histname, histtitle, 100, 0, 100, 100, 0, 1.0);
243 
244 
245  histname = TString::Format("%s/histNClusters_%d", groupname.Data(), cent);
246  histtitle = TString::Format("%s;number of clusters;events", histname.Data());
247  if (fForceBeamType != kpp) {
248  fHistManager.CreateTH1(histname, histtitle, 500, 0, 3000, "s");
249  }
250  else {
251  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200, "s");
252  }
253  }
254  }
255 }
256 
257 /*
258  * This function allocates the histograms for basic EMCal QA.
259  * One 2D histogram with the cell energy spectra and the number of cells
260  * per event is allocated per each centrality bin.
261  */
263 {
264  TString histname;
265  TString histtitle;
266  TString groupname(fCaloCellsName);
267 
268  fHistManager.CreateHistoGroup(groupname);
269  for (Int_t cent = 0; cent < fNcentBins; cent++) {
270  histname = TString::Format("%s/histCellEnergy_%d", groupname.Data(), cent);
271  histtitle = TString::Format("%s;#it{E}_{cell} (GeV);counts", histname.Data());
272  fHistManager.CreateTH1(histname, histtitle, 600, 0, 150, "s");
273 
274  histname = TString::Format("%s/histNCells_%d", groupname.Data(), cent);
275  histtitle = TString::Format("%s;number of cells;events", histname.Data());
276  if (fForceBeamType != kpp) {
277  fHistManager.CreateTH1(histname, histtitle, 500, 0, 6000,"s");
278  }
279  else {
280  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200,"s");
281  }
282  }
283 }
284 
285 /*
286  * This function allocates the histograms for basic tracking QA.
287  * A set of histograms (pT, eta, phi, difference between kinematic properties
288  * at the vertex and at the EMCal surface, number of tracks) is allocated
289  * per each particle container and per each centrality bin.
290  */
292 {
293  TString histname;
294  TString histtitle;
295  TString groupname;
296  AliParticleContainer* partCont = 0;
297  TIter next(&fParticleCollArray);
298  while ((partCont = static_cast<AliParticleContainer*>(next()))) {
299  groupname = partCont->GetName();
300  fHistManager.CreateHistoGroup(groupname);
301  for (Int_t cent = 0; cent < fNcentBins; cent++) {
302  histname = TString::Format("%s/histTrackPt_%d", groupname.Data(), cent);
303  histtitle = TString::Format("%s;#it{p}_{T,track} (GeV/#it{c});counts", histname.Data());
304  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2, "s");
305 
306  histname = TString::Format("%s/histTrackPhi_%d", groupname.Data(), cent);
307  histtitle = TString::Format("%s;#it{#phi}_{track};counts", histname.Data());
308  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi(), "s");
309 
310  histname = TString::Format("%s/histTrackEta_%d", groupname.Data(), cent);
311  histtitle = TString::Format("%s;#it{#eta}_{track};counts", histname.Data());
312  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1, "s");
313 
314  if (TClass(partCont->GetClassName()).InheritsFrom("AliVTrack")) {
315  histname = TString::Format("%s/fHistDeltaEtaPt_%d", groupname.Data(), cent);
316  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#eta}_{track}^{vertex} - #it{#eta}_{track}^{EMCal};counts", histname.Data());
317  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, 50, -0.5, 0.5);
318 
319  histname = TString::Format("%s/fHistDeltaPhiPt_%d", groupname.Data(), cent);
320  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#phi}_{track}^{vertex} - #it{#phi}_{track}^{EMCal};counts", histname.Data());
321  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, 200, -2, 2);
322 
323  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", groupname.Data(), cent);
324  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());
325  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, fNbins / 2, -fMaxBinPt/2, fMaxBinPt/2);
326 
327  histname = TString::Format("%s/fHistEoverPvsP_%d", groupname.Data(), cent);
328  histtitle = TString::Format("%s;#it{P}_{track} (GeV/#it{c});#it{E}_{cluster} / #it{P}_{track} #it{c};counts", histname.Data());
329  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, fNbins / 2, 0, 4);
330  }
331 
332  histname = TString::Format("%s/histNTracks_%d", groupname.Data(), cent);
333  histtitle = TString::Format("%s;number of tracks;events", histname.Data());
334  if (fForceBeamType != kpp) {
335  fHistManager.CreateTH1(histname, histtitle, 500, 0, 5000, "s");
336  }
337  else {
338  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200, "s");
339  }
340  }
341  }
342 }
343 
344 /*
345  * This function allocates the histograms for basic jet QA.
346  * A set of histograms (pT, eta, phi, area, number of jets, corrected pT) is allocated
347  * per each jet container and per each centrality bin.
348  */
350 {
351  TString histname;
352  TString histtitle;
353  TString groupname;
354  AliJetContainer* jetCont = 0;
355  TIter next(&fJetCollArray);
356  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
357  groupname = jetCont->GetName();
358  fHistManager.CreateHistoGroup(groupname);
359  for (Int_t cent = 0; cent < fNcentBins; cent++) {
360  histname = TString::Format("%s/histJetPt_%d", groupname.Data(), cent);
361  histtitle = TString::Format("%s;#it{p}_{T,jet} (GeV/#it{c});counts", histname.Data());
362  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt, "s");
363 
364  histname = TString::Format("%s/histJetClusterEnergy_%d", groupname.Data(), cent);
365  histtitle = TString::Format("%s;#it{E}_{JetClus} (GeV);counts", histname.Data());
366  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2, "s");
367 
368  histname = TString::Format("%s/histJetTrkPt_%d", groupname.Data(), cent);
369  histtitle = TString::Format("%s;#it{p}_{T,JetTrk} (GeV/#it{c});counts", histname.Data());
370  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt, "s");
371 
372  histname = TString::Format("%s/histJetNEFvJetPt_%d", groupname.Data(), cent);
373  histtitle = TString::Format("%s;#it{p}_{T,Jet};NEF", histname.Data());
374  fHistManager.CreateTH2(histname, histtitle, 200, 0, 200, 100, 0, 1, "s");
375 
376  histname = TString::Format("%s/histNumbJetConstvJetPt_%d", groupname.Data(), cent);
377  histtitle = TString::Format("%s;#it{p}_{T,Jet};NumberofJetConstit", histname.Data());
378  fHistManager.CreateTH2(histname, histtitle, 200, 0, 200, 20,0,20, "s");
379 
380  histname = TString::Format("%s/histJetFF_%d", groupname.Data(), cent);
381  histtitle = TString::Format("%s;Z=#it{p}_{T,leading} / #it{p}_{T,Jet};counts", histname.Data());
382  fHistManager.CreateTH1(histname, histtitle, 100, 0, 1, "s");
383 
384  histname = TString::Format("%s/histJetZvJetPt_%d", groupname.Data(), cent);
385  histtitle = TString::Format("%s;#it{p}_{T,Jet};Z=#it{p}_{T,Trk} / #it{p}_{T,Jet}", histname.Data());
386  fHistManager.CreateTH2(histname, histtitle, 200, 0, 200, 100,0,1);
387 
388  //histname = TString::Format("%s/histJetNeutralPtvJetPt_%d", groupname.Data(), cent);
389  //histtitle = TString::Format("%s;#it{p}_{T,Jet};#it{p}_{T,NeutralConstituents}", histname.Data());
390  //fHistManager.CreateTH2(histname, histtitle, 200, 0, 200, 200, 0, 200);
391 
392  histname = TString::Format("%s/histFCrossvZleading_%d", groupname.Data(), cent);
393  histtitle = TString::Format("%s;#it{z}_{leading};#it{F}_{Cross}", histname.Data());
394  fHistManager.CreateTH2(histname, histtitle, 100, 0, 1, 100, 0, 1);
395 
396  //Matched Trigger Histos
397  histname = TString::Format("%s/fHistJetJetPatchE_%d", groupname.Data(), cent);
398  histtitle = TString::Format("%s;#it{E}_{JetGammaPatch} (GeV);counts", histname.Data());
399  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt, "s");
400 
401  histname = TString::Format("%s/fHistJetGammaPatchE_%d", groupname.Data(), cent);
402  histtitle = TString::Format("%s;#it{E}_{JetGammaPatch} (GeV);counts", histname.Data());
403  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt, "s");
404 
405  histname = TString::Format("%s/fHistJetJetPatchPt_%d", groupname.Data(), cent);
406  histtitle = TString::Format("%s;#it{p}_{T,JetJetPatch} (GeV/#it{c});counts", histname.Data());
407  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt, "s");
408 
409  histname = TString::Format("%s/fHistJetGammaPatchPt_%d", groupname.Data(), cent);
410  histtitle = TString::Format("%s;#it{p}_{T,JetGammaPatch} (GeV/#it{c});counts", histname.Data());
411  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt, "s");
412 
413  histname = TString::Format("%s/fHistTriggerPatchE_%d", groupname.Data(), cent);
414  histtitle = TString::Format("%s;#it{E}_{TriggerPatch} (GeV);counts", histname.Data());
415  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt, "s");
416 
417  histname = TString::Format("%s/fHistDeltaEtaDeltaPhiJE_%d", groupname.Data(), cent);
418  histtitle = TString::Format("%s;#it{#phi}_{jet} - #it{#phi}_{JE,patch};#it{#eta}_{Jet} - #it{#eta}_{JE,patch};counts", histname.Data());
419  fHistManager.CreateTH2(histname, histtitle, 280, -0.7, 0.7, 280, -0.7, 0.7);
420 
421  histname = TString::Format("%s/fHistDeltaEtaDeltaPhiGA_%d", groupname.Data(), cent);
422  histtitle = TString::Format("%s;#it{#phi}_{jet} - #it{#phi}_{GA,patch};#it{#eta}_{Jet} - #it{#eta}_{GA,patch};counts", histname.Data());
423  fHistManager.CreateTH2(histname, histtitle, 280, -0.7, 0.7, 280, -0.7, 0.7);
424 
425  histname = TString::Format("%s/fHistJetEPatchEJE_%d", groupname.Data(), cent);
426  histtitle = TString::Format("%s;#it{E_{JE,patch}}#it{E_{Jet,UnCorr}};counts", histname.Data());
427  fHistManager.CreateTH2(histname, histtitle, 400, 0, 200, 400, 0, 200);
428 
429  histname = TString::Format("%s/fHistJetEPatchEGA_%d", groupname.Data(), cent);
430  histtitle = TString::Format("%s;#it{E_{GA,patch}};#it{E_{Jet,UnCorr}};counts", histname.Data());
431  fHistManager.CreateTH2(histname, histtitle, 400, 0, 200, 400, 0, 200);
432  // End Matched Trigger Histos
433 
434  histname = TString::Format("%s/histJetArea_%d", groupname.Data(), cent);
435  histtitle = TString::Format("%s;#it{A}_{jet};counts", histname.Data());
436  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, 3);
437 
438  histname = TString::Format("%s/histJetPhi_%d", groupname.Data(), cent);
439  histtitle = TString::Format("%s;#it{#phi}_{jet};counts", histname.Data());
440  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi(), "s");
441 
442  histname = TString::Format("%s/histJetEta_%d", groupname.Data(), cent);
443  histtitle = TString::Format("%s;#it{#eta}_{jet};counts", histname.Data());
444  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1, "s");
445 
446  histname = TString::Format("%s/histJetClusterPhi_%d", groupname.Data(), cent);
447  histtitle = TString::Format("%s;#it{#phi}_{JetClus};counts", histname.Data());
448  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi(), "s");
449 
450  histname = TString::Format("%s/histJetClusterEta_%d", groupname.Data(), cent);
451  histtitle = TString::Format("%s;#it{#eta}_{JetClus};counts", histname.Data());
452  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1, "s");
453 
454  histname = TString::Format("%s/histNJets_%d", groupname.Data(), cent);
455  histtitle = TString::Format("%s;number of jets;events", histname.Data());
456  if (fForceBeamType != kpp) {
457  fHistManager.CreateTH1(histname, histtitle, 500, 0, 500, "s");
458  }
459  else {
460  fHistManager.CreateTH1(histname, histtitle, 100, 0, 100, "s");
461  }
462 
463  if (!jetCont->GetRhoName().IsNull()) {
464  histname = TString::Format("%s/histJetCorrPt_%d", groupname.Data(), cent);
465  histtitle = TString::Format("%s;#it{p}_{T,jet}^{corr} (GeV/#it{c});counts", histname.Data());
466  fHistManager.CreateTH1(histname, histtitle, fNbins, -fMaxBinPt / 2, fMaxBinPt / 2);
467  }
468  }
469  }
470 }
471 
479 {
480  DoJetLoop();
481  DoTrackLoop();
482  DoClusterLoop();
483  DoCellLoop();
484 
485  return kTRUE;
486 }
487 
493 {
494  TString histname;
495  TString groupname;
496  AliJetContainer* jetCont = 0;
497  TIter next(&fJetCollArray);
498 
499  //TClonesArray *triggerpatches = dynamic_cast<TClonesArray *>(InputEvent()->FindListObject("EmcalTriggers"));
500  //if(!triggerpatches)
501  // AliErrorStream() << "Trigger patch container EmcalTriggers not found in task " << GetName() << std::endl;
502 
503  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
504  groupname = jetCont->GetName();
505  UInt_t count = 0;
506  for(auto jet : jetCont->accepted()) {
507  if (!jet) continue;
508  count++;
509 
510  TLorentzVector leadPart;
511  jetCont->GetLeadingHadronMomentum(leadPart, jet);
512  Double_t z = GetParallelFraction(leadPart.Vect(), jet);
513  if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
514 
515  histname = TString::Format("%s/histJetPt_%d", groupname.Data(), fCentBin);
516  fHistManager.FillTH1(histname, jet->Pt());
517 
518  histname = TString::Format("%s/histJetClusterEnergy_%d", groupname.Data(), fCentBin);
519  fHistManager.FillTH1(histname, jet->E());
520 
521  histname = TString::Format("%s/histJetArea_%d", groupname.Data(), fCentBin);
522  fHistManager.FillTH1(histname, jet->Area());
523 
524  histname = TString::Format("%s/histJetPhi_%d", groupname.Data(), fCentBin);
525  fHistManager.FillTH1(histname, jet->Phi());
526 
527  histname = TString::Format("%s/histJetEta_%d", groupname.Data(), fCentBin);
528  fHistManager.FillTH1(histname, jet->Eta());
529 
530  histname = TString::Format("%s/histJetNEFvJetPt_%d", groupname.Data(), fCentBin);
531  fHistManager.FillTH2(histname,jet->Pt(),jet->NEF() );
532 
533 
534  histname = TString::Format("%s/histNumbJetConstvJetPt_%d", groupname.Data(), fCentBin);
535  fHistManager.FillTH2(histname,jet->Pt(),jet->N());
536 
537  histname = TString::Format("%s/histJetFF_%d", groupname.Data(), fCentBin);
538  fHistManager.FillTH1(histname, z );
539 
540  Double_t MatchedEta = 0.04, MatchedPhi = 0.04;
541  //Look at emcal trigger patches in event and associate with jet
542  this->SetCaloTriggerPatchInfoName("EmcalTriggers");
543 
544  if (fTriggerPatchInfo) {
545  TString objname(fTriggerPatchInfo->GetClass()->GetName());
546  TClass cls(objname);
547  if (!cls.InheritsFrom("AliEMCALTriggerPatchInfo")) {
548  AliError(Form("%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",GetName(), cls.GetName(), "EmcalTriggers"));
549  fTriggerPatchInfo = 0;
550  }
551  }
552 
553  if (!fTriggerPatchInfo) {
554  AliError(Form("%s: Unable to get trigger patch container with name %s. Aborting", GetName(), "EmcalTriggers"));
555  continue;
556  }
557 
558  //AliEMCALTriggerPatchInfo *currentpatch(nullptr);
559  for(auto p : *fTriggerPatchInfo){
560  AliEMCALTriggerPatchInfo *currentpatch = static_cast<AliEMCALTriggerPatchInfo *>(p);
561 
562  //Select Single Shower Patch
563  if(currentpatch->IsGammaLowRecalc() || currentpatch->IsGammaLowSimple()){
564  histname = TString::Format("%s/fHistDeltaEtaDeltaPhiGA_%d", groupname.Data(), fCentBin);
565  fHistManager.FillTH2(histname, jet->Phi() - currentpatch->GetPhiGeo(), jet->Eta() - currentpatch->GetEtaGeo());
566  histname = TString::Format("%s/fHistJetEPatchEGA_%d", groupname.Data(), fCentBin);
567  fHistManager.FillTH2(histname,jet->E(),currentpatch->GetPatchE());
568 
569  if(jet->Phi() - currentpatch->GetPhiGeo() <= MatchedPhi && jet->Eta() - currentpatch->GetEtaGeo() <= MatchedEta){
570  histname = TString::Format("%s/fHistJetGammaPatchE_%d", groupname.Data(), fCentBin);
571  fHistManager.FillTH1(histname, currentpatch->GetPatchE());
572  histname = TString::Format("%s/fHistJetGammaPatchPt_%d", groupname.Data(), fCentBin);
573  fHistManager.FillTH1(histname, jet->Pt());
574  }
575  }
576 
577  //Select Jet Patch
578  if(currentpatch->IsJetLowRecalc() || currentpatch->IsJetLowSimple()){
579  histname = TString::Format("%s/fHistDeltaEtaDeltaPhiJE_%d", groupname.Data(), fCentBin);
580  fHistManager.FillTH2(histname, jet->Phi() - currentpatch->GetPhiGeo(), jet->Eta() - currentpatch->GetEtaGeo());
581  histname = TString::Format("%s/fHistJetEPatchEJE_%d", groupname.Data(), fCentBin);
582  fHistManager.FillTH2(histname,jet->E(),currentpatch->GetPatchE());
583 
584  if(jet->Phi() - currentpatch->GetPhiGeo() <= MatchedPhi && jet->Eta() - currentpatch->GetEtaGeo() <= MatchedEta){
585  histname = TString::Format("%s/fHistJetJetPatchE_%d", groupname.Data(), fCentBin);
586  fHistManager.FillTH1(histname, currentpatch->GetPatchE());
587  histname = TString::Format("%s/fHistJetJetPatchPt_%d", groupname.Data(), fCentBin);
588  fHistManager.FillTH1(histname, jet->Pt());
589  }
590  }
591 
592  }
593 
594  Double_t Z_part = 0.0;
595 
596  //Look at assoc tracks of a given jet
597  AliParticleContainer* tracks = jetCont->GetParticleContainer();
598  if (tracks) {
599  for (Int_t it = 0; it < jet->GetNumberOfTracks(); it++) {
600  AliVParticle *JetTrk = jet->TrackAt(it, tracks->GetArray());
601  if (JetTrk) {
602  //AliVTrack *Vtrack = dynamic_cast<AliVTrack*>(track);
603  histname = TString::Format("%s/histJetTrkPt_%d", groupname.Data(), fCentBin);
604  fHistManager.FillTH1(histname, JetTrk->Pt());
605 
606  Z_part = GetZ(JetTrk->Px(),JetTrk->Py(),JetTrk->Pz(),jet->Px(),jet->Py(),jet->Pz());
607 
608  histname = TString::Format("%s/histJetZvJetPt_%d", groupname.Data(), fCentBin);
609  fHistManager.FillTH2(histname,jet->Pt(),Z_part);
610  }
611  }
612  }
613  //Loop over Clusters in Jet
614  AliClusterContainer* JetCluster = 0;
615  JetCluster = jetCont->GetClusterContainer();
616  if(JetCluster) {
617  for(auto cluster : JetCluster->accepted()) {
618  AliTLorentzVector nPart;
619  cluster->GetMomentum(nPart, fVertex);
620  Double_t JetFCross = GetFcross(cluster, fCaloCells);
621  histname = TString::Format("%s/histJetClusterEnergy_%d", groupname.Data(), fCentBin);
622  fHistManager.FillTH1(histname, cluster->E());
623  histname = TString::Format("%s/histJetClusterPhi_%d", groupname.Data(), fCentBin);
624  fHistManager.FillTH1(histname, nPart.Phi_0_2pi());
625  histname = TString::Format("%s/histJetClusterEta_%d", groupname.Data(), fCentBin);
626  fHistManager.FillTH1(histname, nPart.Eta());
627  histname = TString::Format("%s/histFCrossvZleading_%d", groupname.Data(), fCentBin);
628  fHistManager.FillTH2(histname,jet->MaxTrackPt() / jet->Pt(), JetFCross);
629  }
630 
631 
632  }
633 
634  AliVCluster* leadingCluster = jet->GetLeadingCluster();
635  if(!leadingCluster) continue;
636  AliTrackContainer * Globaltracks = static_cast<AliTrackContainer * >(GetParticleContainer("tracks"));
637  if(!Globaltracks || !leadingCluster) continue;
638  Double_t JetFCrossLeading = GetFcross(leadingCluster, fCaloCells);
639  Double_t TrackMultiplicity = Globaltracks->GetNTracks();
640  Double_t Numb = jet->N();
641  Double_t NumbNeu = jet->Nn();
642  Double_t NumbChrg = jet->Nch();
643  Double_t MBJetSparseFill[13]={TrackMultiplicity,jet->Pt(),jet->MaxTrackPt(),leadingCluster->E(),jet->Eta(),jet->Phi(),JetFCrossLeading,z,jet->Area(),jet->NEF(),Numb,NumbNeu,NumbChrg};
644  fhnMBJetSpectra->Fill(MBJetSparseFill);
645 
646  if (jetCont->GetRhoParameter()) {
647  histname = TString::Format("%s/histJetCorrPt_%d", groupname.Data(), fCentBin);
648  fHistManager.FillTH1(histname, jet->Pt() - jetCont->GetRhoVal() * jet->Area());
649  }//Background Subtaction in PbPb
650  }// Loop over each jet in a event
651  histname = TString::Format("%s/histNJets_%d", groupname.Data(), fCentBin);
652  fHistManager.FillTH1(histname, count);
653  }
654 }
655 
661 {
663 
664  TString histname;
665  TString groupname;
666  AliParticleContainer* partCont = 0;
667  TIter next(&fParticleCollArray);
668  while ((partCont = static_cast<AliParticleContainer*>(next()))) {
669  groupname = partCont->GetName();
670  UInt_t count = 0;
671  for(auto part : partCont->accepted()) {
672  if (!part) continue;
673  count++;
674 
675  histname = TString::Format("%s/histTrackPt_%d", groupname.Data(), fCentBin);
676  fHistManager.FillTH1(histname, part->Pt());
677 
678  histname = TString::Format("%s/histTrackPhi_%d", groupname.Data(), fCentBin);
679  fHistManager.FillTH1(histname, part->Phi());
680 
681  histname = TString::Format("%s/histTrackEta_%d", groupname.Data(), fCentBin);
682  fHistManager.FillTH1(histname, part->Eta());
683 
684  if (partCont->GetLoadedClass()->InheritsFrom("AliVTrack")) {
685  const AliVTrack* track = static_cast<const AliVTrack*>(part);
686 
687  histname = TString::Format("%s/fHistDeltaEtaPt_%d", groupname.Data(), fCentBin);
688  fHistManager.FillTH1(histname, track->Pt(), track->Eta() - track->GetTrackEtaOnEMCal());
689 
690  histname = TString::Format("%s/fHistDeltaPhiPt_%d", groupname.Data(), fCentBin);
691  fHistManager.FillTH1(histname, track->Pt(), track->Phi() - track->GetTrackPhiOnEMCal());
692 
693  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", groupname.Data(), fCentBin);
694  fHistManager.FillTH1(histname, track->Pt(), track->Pt() - track->GetTrackPtOnEMCal());
695 
696  if (clusCont) {
697  Int_t iCluster = track->GetEMCALcluster();
698  if (iCluster >= 0) {
699  AliVCluster* cluster = clusCont->GetAcceptCluster(iCluster);
700  if (cluster) {
701  histname = TString::Format("%s/fHistEoverPvsP_%d", groupname.Data(), fCentBin);
702  fHistManager.FillTH2(histname, track->P(), cluster->GetNonLinCorrEnergy() / track->P());
703  }
704  }
705  }
706  }
707  }
708 
709  histname = TString::Format("%s/histNTracks_%d", groupname.Data(), fCentBin);
710  fHistManager.FillTH1(histname, count);
711  }
712 }
713 
719 {
720  TString histname;
721  TString groupname;
722  AliClusterContainer* clusCont = 0;
723  TIter next(&fClusterCollArray);
724  while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
725  groupname = clusCont->GetName();
726 
727  //Cluster Exotics
728  for(auto cluster : clusCont->all()) {
729  if (!cluster) continue;
730 
731  Double_t FCross = GetFcross(cluster, fCaloCells);
732  histname = TString::Format("%s/fHistFcrossvEonline_%d", groupname.Data(), fCentBin);
733  fHistManager.FillTH2(histname, cluster->E(), FCross);
734 
735  if (cluster->GetIsExotic()) {
736  histname = TString::Format("%s/histClusterEnergyExotic_%d", groupname.Data(), fCentBin);
737  fHistManager.FillTH1(histname, cluster->E());
738  }
739  }
740 
741  UInt_t count = 0;
742  for(auto cluster : clusCont->accepted()) {
743  if (!cluster) continue;
744  count++;
745 
746  AliTLorentzVector nPart;
747  cluster->GetMomentum(nPart, fVertex);
748 
749  histname = TString::Format("%s/histClusterEnergy_%d", groupname.Data(), fCentBin);
750  fHistManager.FillTH1(histname, cluster->E());
751 
752  histname = TString::Format("%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), fCentBin);
753  fHistManager.FillTH1(histname, cluster->GetNonLinCorrEnergy());
754 
755  histname = TString::Format("%s/histClusterHadCorrEnergy_%d", groupname.Data(), fCentBin);
756  fHistManager.FillTH1(histname, cluster->GetHadCorrEnergy());
757 
758  histname = TString::Format("%s/histClusterPhi_%d", groupname.Data(), fCentBin);
759  fHistManager.FillTH1(histname, nPart.Phi_0_2pi());
760 
761  histname = TString::Format("%s/histClusterEta_%d", groupname.Data(), fCentBin);
762  fHistManager.FillTH1(histname, nPart.Eta());
763  }
764 
765  histname = TString::Format("%s/histNClusters_%d", groupname.Data(), fCentBin);
766  fHistManager.FillTH1(histname, count);
767  }
768 }
769 
775 {
776  if (!fCaloCells) return;
777 
778  TString histname;
779 
780  const Short_t ncells = fCaloCells->GetNumberOfCells();
781 
782  histname = TString::Format("%s/histNCells_%d", fCaloCellsName.Data(), fCentBin);
783  fHistManager.FillTH1(histname, ncells);
784 
785  histname = TString::Format("%s/histCellEnergy_%d", fCaloCellsName.Data(), fCentBin);
786  for (Short_t pos = 0; pos < ncells; pos++) {
787  Double_t amp = fCaloCells->GetAmplitude(pos);
788 
789  fHistManager.FillTH1(histname, amp);
790  }
791 }
792 
798 {
799 
801 }
802 
811 {
812  //Int_t runNum = InputEvent()->GetRunNumber();
813 
814  //Bool_t PileUp = AliVEvent::IsPileupFromSPD();
815 
816  //Double_t zVertex=fVertex[2];
817 
818  this->SetCaloTriggerPatchInfoName("EmcalTriggers");
819 
820  if (fTriggerPatchInfo) {
821  TString objname(fTriggerPatchInfo->GetClass()->GetName());
822  TClass cls(objname);
823  if (!cls.InheritsFrom("AliEMCALTriggerPatchInfo")) {
824  AliError(Form("%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",GetName(), cls.GetName(), "EmcalTriggers"));
825  fTriggerPatchInfo = 0;
826  }
827  }
828 
829  if (!fTriggerPatchInfo) {
830  AliError(Form("%s: Unable to get trigger patch container with name %s. Aborting", GetName(), "EmcalTriggers"));
831  return kFALSE;
832  }
833  for(auto p : *fTriggerPatchInfo){
834  AliEMCALTriggerPatchInfo *recpatch = static_cast<AliEMCALTriggerPatchInfo *>(p);
835  if (recpatch) {
836  }
837  }
838 
839  fClusterEResolution = new TF1("fClusterEResolution","sqrt([0]^2+[1]^2*x+([2]*x)^2)*0.01");// 2010 EMCal Test Beam Resolution
840  fClusterEResolution->SetParameters(4.35,9.07,1.63);//Fit to test beam
841 
842 
843 
844 
845  IsLEDEvent();
846 
847  return kTRUE;
848 }
849 
850 /*
851 void AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA::ExtractMainPatch() {
852 
853  this->SetCaloTriggerPatchInfoName("EmcalTriggers");
854 
855  if (fTriggerPatchInfo) {
856  TString objname(fTriggerPatchInfo->GetClass()->GetName());
857  TClass cls(objname);
858  if (!cls.InheritsFrom("AliEMCALTriggerPatchInfo")) {
859  AliError(Form("%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",GetName(), cls.GetName(), "EmcalTriggers"));
860  fTriggerPatchInfo = 0;
861  }
862  }
863 
864  if (!fTriggerPatchInfo) {
865  AliError(Form("%s: Unable to get trigger patch container with name %s. Aborting", GetName(), "EmcalTriggers"));
866  return;
867  }
868  for(auto p : *fTriggerPatchInfo){
869  AliEMCALTriggerPatchInfo *recpatch = static_cast<AliEMCALTriggerPatchInfo *>(p);
870  if (recpatch) {
871  cout<<"Pstchphi:"<<recpatch->GetPhiCM()<<endl;
872  }
873  }
874  //Find main trigger
875 
876  (fTriggerPatchInfo) {
877  TString objname(fTriggerPatchInfo->GetClass()->GetName());
878  TClass cls(objname);
879  if (!cls.InheritsFrom("AliEMCALTriggerPatchInfo")) {
880  AliError(Form("%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",GetName(), cls.GetName(), "EmcalTriggers"));
881  fTriggerPatchInfo = 0;
882  }
883  if (!fTriggerPatchInfo) {
884  AliError(Form("%s: Unable to get trigger patch container with name %s. Aborting", GetName(), "EmcalTriggers"));
885  return;
886  }
887  }
888  //number of patches in event
889  //Int_t nPatch = fTriggerPatchInfo->GetEntriesFast();
890  //extract main trigger patch
891  //Double_t emax = -1.;
892  //for (Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
893  // AliEMCALTriggerPatchInfo *patch = (AliEMCALTriggerPatchInfo*)fTriggerPatchInfo->At( iPatch );
894  // if (!patch) continue;
895  // cout<<"PstchE:"<<patch->GetPatchE()<<endl;
896  //}
897 
898 }
899 */
900 
905 {
906  cout<<"*****************************"<<endl;
907  cout<<"******* Task Finished *******"<<endl;
908  cout<<"*****************************"<<endl;
909 }
910 Double_t AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA::GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz, const Double_t jetPx, const Double_t jetPy, const Double_t jetPz) const
911 {
912  //
913  // Get the z of a constituent inside of a jet
914  //
915 
916  return (trkPx*jetPx+trkPy*jetPy+trkPz*jetPz)/(jetPx*jetPx+jetPy*jetPy+jetPz*jetPz);
917 }
919 {
920  Bool_t isLED = kFALSE;
921  //
922  // Check if the event is contaminated by LED signal
923  //
924  if (!fCaloCells) return kFALSE;
925 
926  TString histname;
927 
928  Int_t nCellCount[10] = {0};
929  const Short_t ncells = fCaloCells->GetNumberOfCells();
930 
931 
932 
933  for (Short_t pos = 0; pos < ncells; pos++) {
934  Int_t cellId = fCaloCells->GetCellNumber(pos);
935  Double_t amp = fCaloCells->GetAmplitude(pos);
936  Int_t sMod = fGeom->GetSuperModuleNumber(cellId);
937 
938  if(amp<0.1) continue;
939  nCellCount[sMod]++;
940 
941  }
942 
943  for(Int_t i=0; i<=9; i++){
944  fHistEMCalTowerMult[i]->Fill(nCellCount[i]);
945  }
946 
947 
948 
949  return isLED;
950 }
951 
952 Double_t AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA::GetFcross(const AliVCluster *cluster, AliVCaloCells *cells)
953 {
954  Int_t AbsIdseed = -1;
955  Double_t Eseed = 0;
956  for (Int_t i = 0; i < cluster->GetNCells(); i++) {
957  if (cells->GetCellAmplitude(cluster->GetCellAbsId(i)) > Eseed) {
958  Eseed = cells->GetCellAmplitude(cluster->GetCellAbsId(i));
959  AbsIdseed = cluster->GetCellAbsId(i);
960  }
961  }
962 
963  if (Eseed < 1e-9) {
964  return 100;
965  }
966 
967  Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
968  fGeom->GetCellIndex(AbsIdseed,imod,iTower,iIphi,iIeta);
969  fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,iphi,ieta);
970 
971  //Get close cells index and energy, not in corners
972 
973  Int_t absID1 = -1;
974  Int_t absID2 = -1;
975 
976  if (iphi < AliEMCALGeoParams::fgkEMCALRows-1) {
977  absID1 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
978  }
979  if (iphi > 0) {
980  absID2 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
981  }
982 
983  // In case of cell in eta = 0 border, depending on SM shift the cross cell index
984 
985  Int_t absID3 = -1;
986  Int_t absID4 = -1;
987 
988  if (ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2)) {
989  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
990  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
991  }
992  else if (ieta == 0 && imod%2) {
993  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
994  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
995  }
996  else {
997  if (ieta < AliEMCALGeoParams::fgkEMCALCols-1) {
998  absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
999  }
1000  if (ieta > 0) {
1001  absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
1002  }
1003  }
1004 
1005  Double_t ecell1 = cells->GetCellAmplitude(absID1);
1006  Double_t ecell2 = cells->GetCellAmplitude(absID2);
1007  Double_t ecell3 = cells->GetCellAmplitude(absID3);
1008  Double_t ecell4 = cells->GetCellAmplitude(absID4);
1009 
1010  Double_t Ecross = ecell1 + ecell2 + ecell3 + ecell4;
1011 
1012  Double_t Fcross = 1 - Ecross/Eseed;
1013 
1014  return Fcross;
1015 }
1016 
1017 //Double_t AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA::GetSmearedTrackPt(AliVTrack *track)
1018 //{
1019  //
1020  // Smear track momentum
1021  //
1022 
1023  //Double_t resolution = track->Pt()*track->Pt()*TMath::Sqrt(track->GetSigma1Pt2());
1024  //Double_t smear = resolution*TMath::Sqrt((1+fVaryTrkPtRes)*(1+fVaryTrkPtRes)-1);
1025  // return fRandomGen->Gaus(0, smear);
1026 
1027 //}
1029 {
1030  Int_t count = 0;
1031  UInt_t tmp = entries;
1032  while(tmp!=0){
1033  count++;
1034  tmp = tmp &~ -tmp; // clear lowest bit
1035  }
1036 
1037  TString hnTitle(name);
1038  const Int_t dim = count;
1039  Int_t nbins[dim];
1040  Double_t xmin[dim];
1041  Double_t xmax[dim];
1042 
1043  Int_t i=0;
1044  Int_t c=0;
1045  while(c<dim && i<32){
1046  if(entries&(1<<i)){
1047 
1048  TString label("");
1049  GetDimParams(i, label, nbins[c], xmin[c], xmax[c]);
1050  hnTitle += Form(";%s",label.Data());
1051  c++;
1052  }
1053 
1054  i++;
1055  }
1056  hnTitle += ";";
1057 
1058  return new THnSparseF(name, hnTitle.Data(), dim, nbins, xmin, xmax);
1059 }
1070 {
1071  const Double_t pi = TMath::Pi();
1072 
1073  switch(iEntry){
1074 
1075  case 0:
1076  label = "V0 centrality (%)";
1077  nbins = 30;
1078  xmin = 0.;
1079  xmax = 100.;
1080  // Adjust for pp, since we are retrieving multiplicity instead
1082  label = "Multiplicity";
1083  xmax = 300.;
1084  }
1085  break;
1086 
1087  case 1:
1088  label = "Jet p_{T}";
1089  nbins = 200;
1090  xmin = 0.;
1091  xmax = 200.;
1092  break;
1093 
1094  case 2:
1095  label = "Track p_{T}";
1096  nbins = 100;
1097  xmin = 0.;
1098  xmax = 100;
1099  break;
1100 
1101  case 3:
1102  label = "Cluster E";
1103  nbins = 100;
1104  xmin = 0.;
1105  xmax = 100;
1106  break;
1107 
1108  case 4:
1109  label = "Jet#eta";
1110  nbins = 24;
1111  xmin = -1.2;
1112  xmax = 1.2;
1113  break;
1114 
1115  case 5:
1116  label = "Jet #phi";
1117  nbins = 72;
1118  xmin = -0.5*pi;
1119  xmax = 1.5*pi;
1120  break;
1121 
1122  case 6:
1123  label = "#it{p}_{T,track}^{leading}";
1124  nbins = 100;
1125  xmin = 0;
1126  xmax = 100;
1127  break;
1128 
1129  case 7:
1130  label = "Matched Trigger Amp";
1131  nbins = 10;
1132  xmin = 0;
1133  xmax = 50;
1134  break;
1135 
1136  case 8:
1137  label = "#Delta#eta";
1138  nbins = 48;
1139  xmin = -1.2;
1140  xmax = 1.2;
1141  break;
1142 
1143  case 9:
1144  label = "#Delta#phi";
1145  nbins = 72;
1146  xmin = 0;
1147  xmax = 2*pi;
1148  break;
1149 
1150  case 10:
1151  label = "F_{cross}";
1152  nbins = 20;
1153  xmin = 0;
1154  xmax = 1;
1155  break;
1156 
1157  case 11:
1158  label = "z_{leading}";
1159  nbins = 20;
1160  xmin = 0;
1161  xmax = 1;
1162  break;
1163 
1164  case 12:
1165  label = "#it{A}_{jet}";
1166  nbins = 20;
1167  xmin = 0;
1168  xmax = 1;
1169  break;
1170 
1171  case 13:
1172  label = "Jet NEF";
1173  nbins = 20;
1174  xmin = 0;
1175  xmax = 1;
1176  break;
1177 
1178  case 14:
1179  label = "Numb Constit";
1180  nbins = 50;
1181  xmin = 0;
1182  xmax = 50;
1183  break;
1184 
1185  case 15:
1186  label = "Numb Chrg Constit";
1187  nbins = 50;
1188  xmin = 0;
1189  xmax = 50;
1190  break;
1191 
1192  case 16:
1193  label = "Numb Neu Constit";
1194  nbins = 50;
1195  xmin = 0;
1196  xmax = 50;
1197  break;
1198  }
1199 }
1200 
THashList * CreateHistoGroup(const char *groupname)
Create a new group of histograms within a parent group.
TObjArray fClusterCollArray
cluster collection array
virtual THnSparse * NewTHnSparseF(const char *name, UInt_t entries)
Double_t GetRhoVal() const
const TString & GetRhoName() const
double Double_t
Definition: External.C:58
Int_t GetNTracks() const
TF1 * fClusterEResolution
! Parameterization of cluster energy resolution from 2010 test beam results a = 4.35 b = 9.07 c = 1.63
Container with name, TClonesArray and cuts for particles.
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.
Double_t GetFcross(const AliVCluster *cluster, AliVCaloCells *cells)
Double_t fMinBinPt
min pt in histograms
AliClusterContainer * GetClusterContainer() const
TCanvas * c
Definition: TestFitELoss.C:172
Int_t fCentBin
!event centrality bin
Declaration of class AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA.
TString part
use mixed event to constrain combinatorial background
Definition: InvMassFit.C:52
Container for particles within the EMCAL framework.
void SetCaloTriggerPatchInfoName(const char *n)
TObjArray fParticleCollArray
particle/track collection array
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
const AliClusterIterableContainer all() const
AliParticleContainer * GetParticleContainer() const
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) 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.
int Int_t
Definition: External.C:63
Bool_t fUseRecalcPatches
Switch between offline (FEE) and recalc (L1) patches.
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
AliEMCALGeometry * fGeom
!emcal geometry
Double_t Phi_0_2pi() const
Double_t fVaryTrkPtRes
! Variation of tracking momentum resolution
Implementation of a EMCal spectra task and QA for EMCal triggers.
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.
AliVCluster * GetAcceptCluster(Int_t i) const
const AliClusterIterableContainer accepted() const
TString fCaloCellsName
name of calo cell collection
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
Calculates the fraction of momentum z of part 1 w.r.t. part 2 in the direction of part 2...
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
TObjArray fJetCollArray
jet collection array
short Short_t
Definition: External.C:23
AliVCaloCells * fCaloCells
!cells
AliRhoParameter * GetRhoParameter()
AliEmcalList * fOutput
!output list
Double_t fMaxBinPt
max pt in histograms
Double_t fVertex[3]
!event vertex
void SetMakeGeneralHistograms(Bool_t g)
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Base task in the EMCAL jet framework.
const AliParticleIterableContainer accepted() const
const char Option_t
Definition: External.C:48
void UserCreateOutputObjects()
Main initialization function on the worker.
Double_t GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz, const Double_t jetPx, const Double_t jetPy, const Double_t jetPz) const
const Double_t pi
const Int_t nbins
const AliJetIterableContainer accepted() const
bool Bool_t
Definition: External.C:53
Container structure for EMCAL clusters.
Container for jet within the EMCAL jet framework.
Definition: External.C:196
Int_t fNbins
no. of pt bins
virtual void GetDimParams(Int_t iEntry, TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax)