AliPhysics  d497547 (d497547)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 <TH2F.h>
19 #include <TList.h>
20 #include <array>
21 #include <iostream>
22 #include <map>
23 #include <vector>
24 #include <TClonesArray.h>
25 #include <TGrid.h>
26 #include <THistManager.h>
27 #include <THashList.h>
28 #include <TLinearBinning.h>
29 #include <TObjArray.h>
30 #include <TParameter.h>
31 
32 #include <AliVCluster.h>
33 #include <AliVParticle.h>
34 #include <AliLog.h>
35 
36 #include "AliTLorentzVector.h"
37 #include "AliEmcalJet.h"
38 #include "AliRhoParameter.h"
39 #include "AliJetContainer.h"
40 #include "AliParticleContainer.h"
41 #include "AliClusterContainer.h"
42 
43 
44 #include "AliAnalysisUtils.h"
45 #include "AliESDEvent.h"
46 #include "AliEMCALTriggerPatchInfo.h"
48 #include "AliInputEventHandler.h"
49 #include "AliLog.h"
50 #include "AliMultSelection.h"
51 #include "AliMultEstimator.h"
52 #include "AliOADBContainer.h"
53 
55 
59 
60 using std::cout;
61 using std::endl;
62 
68 fUseRecalcPatches(false),
69 fHistManager(),
70 fHistNumbJets(),
71 fHistJetPt()
72 {
73 }
74 
81 AliAnalysisTaskEmcalJet(name, kTRUE),
82 fUseRecalcPatches(false),
83 fHistManager(name),
84 fHistNumbJets(0),
85 fHistJetPt(0)
86 {
88  SetCaloTriggerPatchInfoName("EmcalTriggers");
89 }
90 
95 {
96 }
97 
103 {
105 
110 
111  TIter next(fHistManager.GetListOfHistograms());
112  TObject* obj = 0;
113  while ((obj = next())) {
114  fOutput->Add(obj);
115  }
116  fOutput->Add(fHistNumbJets);
117  fOutput->Add(fHistJetPt);
118 
119  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
120 }
121 
122 /*
123  * This function allocates the histograms for basic EMCal cluster QA.
124  * A set of histograms (energy, eta, phi, number of cluster) is allocated
125  * per each cluster container and per each centrality bin.
126  */
128 {
129  TString histname;
130  TString histtitle;
131  TString groupname;
132  AliClusterContainer* clusCont = 0;
133  TIter next(&fClusterCollArray);
134  while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
135  groupname = clusCont->GetName();
136  fHistManager.CreateHistoGroup(groupname);
137  for (Int_t cent = 0; cent < fNcentBins; cent++) {
138  histname = TString::Format("%s/histClusterEnergy_%d", groupname.Data(), cent);
139  histtitle = TString::Format("%s;#it{E}_{cluster} (GeV);counts", histname.Data());
140  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
141 
142  histname = TString::Format("%s/histClusterEnergyExotic_%d", groupname.Data(), cent);
143  histtitle = TString::Format("%s;#it{E}_{cluster}^{exotic} (GeV);counts", histname.Data());
144  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
145 
146  histname = TString::Format("%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), cent);
147  histtitle = TString::Format("%s;#it{E}_{cluster}^{non-lin.corr.} (GeV);counts", histname.Data());
148  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
149 
150  histname = TString::Format("%s/histClusterHadCorrEnergy_%d", groupname.Data(), cent);
151  histtitle = TString::Format("%s;#it{E}_{cluster}^{had.corr.} (GeV);counts", histname.Data());
152  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
153 
154  histname = TString::Format("%s/histClusterPhi_%d", groupname.Data(), cent);
155  histtitle = TString::Format("%s;#it{#phi}_{custer};counts", histname.Data());
156  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
157 
158  histname = TString::Format("%s/histClusterEta_%d", groupname.Data(), cent);
159  histtitle = TString::Format("%s;#it{#eta}_{custer};counts", histname.Data());
160  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
161 
162  histname = TString::Format("%s/histNClusters_%d", groupname.Data(), cent);
163  histtitle = TString::Format("%s;number of clusters;events", histname.Data());
164  if (fForceBeamType != kpp) {
165  fHistManager.CreateTH1(histname, histtitle, 500, 0, 3000);
166  }
167  else {
168  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
169  }
170  }
171  }
172 }
173 
174 /*
175  * This function allocates the histograms for basic EMCal QA.
176  * One 2D histogram with the cell energy spectra and the number of cells
177  * per event is allocated per each centrality bin.
178  */
180 {
181  TString histname;
182  TString histtitle;
183  TString groupname(fCaloCellsName);
184 
185  fHistManager.CreateHistoGroup(groupname);
186  for (Int_t cent = 0; cent < fNcentBins; cent++) {
187  histname = TString::Format("%s/histCellEnergy_%d", groupname.Data(), cent);
188  histtitle = TString::Format("%s;#it{E}_{cell} (GeV);counts", histname.Data());
189  fHistManager.CreateTH1(histname, histtitle, 300, 0, 150);
190 
191  histname = TString::Format("%s/histNCells_%d", groupname.Data(), cent);
192  histtitle = TString::Format("%s;number of cells;events", histname.Data());
193  if (fForceBeamType != kpp) {
194  fHistManager.CreateTH1(histname, histtitle, 500, 0, 6000);
195  }
196  else {
197  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
198  }
199  }
200 }
201 
202 /*
203  * This function allocates the histograms for basic tracking QA.
204  * A set of histograms (pT, eta, phi, difference between kinematic properties
205  * at the vertex and at the EMCal surface, number of tracks) is allocated
206  * per each particle container and per each centrality bin.
207  */
209 {
210  TString histname;
211  TString histtitle;
212  TString groupname;
213  AliParticleContainer* partCont = 0;
214  TIter next(&fParticleCollArray);
215  while ((partCont = static_cast<AliParticleContainer*>(next()))) {
216  groupname = partCont->GetName();
217  fHistManager.CreateHistoGroup(groupname);
218  for (Int_t cent = 0; cent < fNcentBins; cent++) {
219  histname = TString::Format("%s/histTrackPt_%d", groupname.Data(), cent);
220  histtitle = TString::Format("%s;#it{p}_{T,track} (GeV/#it{c});counts", histname.Data());
221  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
222 
223  histname = TString::Format("%s/histTrackPhi_%d", groupname.Data(), cent);
224  histtitle = TString::Format("%s;#it{#phi}_{track};counts", histname.Data());
225  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
226 
227  histname = TString::Format("%s/histTrackEta_%d", groupname.Data(), cent);
228  histtitle = TString::Format("%s;#it{#eta}_{track};counts", histname.Data());
229  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
230 
231  if (TClass(partCont->GetClassName()).InheritsFrom("AliVTrack")) {
232  histname = TString::Format("%s/fHistDeltaEtaPt_%d", groupname.Data(), cent);
233  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#eta}_{track}^{vertex} - #it{#eta}_{track}^{EMCal};counts", histname.Data());
234  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, 50, -0.5, 0.5);
235 
236  histname = TString::Format("%s/fHistDeltaPhiPt_%d", groupname.Data(), cent);
237  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#phi}_{track}^{vertex} - #it{#phi}_{track}^{EMCal};counts", histname.Data());
238  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, 200, -2, 2);
239 
240  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", groupname.Data(), cent);
241  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());
242  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, fNbins / 2, -fMaxBinPt/2, fMaxBinPt/2);
243 
244  histname = TString::Format("%s/fHistEoverPvsP_%d", groupname.Data(), cent);
245  histtitle = TString::Format("%s;#it{P}_{track} (GeV/#it{c});#it{E}_{cluster} / #it{P}_{track} #it{c};counts", histname.Data());
246  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, fNbins / 2, 0, 4);
247  }
248 
249  histname = TString::Format("%s/histNTracks_%d", groupname.Data(), cent);
250  histtitle = TString::Format("%s;number of tracks;events", histname.Data());
251  if (fForceBeamType != kpp) {
252  fHistManager.CreateTH1(histname, histtitle, 500, 0, 5000);
253  }
254  else {
255  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
256  }
257  }
258  }
259 }
260 
261 /*
262  * This function allocates the histograms for basic jet QA.
263  * A set of histograms (pT, eta, phi, area, number of jets, corrected pT) is allocated
264  * per each jet container and per each centrality bin.
265  */
267 {
268  TString histname;
269  TString histtitle;
270  TString groupname;
271  AliJetContainer* jetCont = 0;
272  TIter next(&fJetCollArray);
273  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
274  groupname = jetCont->GetName();
275  fHistManager.CreateHistoGroup(groupname);
276  for (Int_t cent = 0; cent < fNcentBins; cent++) {
277  histname = TString::Format("%s/histJetPt_%d", groupname.Data(), cent);
278  histtitle = TString::Format("%s;#it{p}_{T,jet} (GeV/#it{c});counts", histname.Data());
279  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt);
280 
281  histname = TString::Format("%s/histJetClusterEnergy_%d", groupname.Data(), cent);
282  histtitle = TString::Format("%s;#it{E}_{cluster} (GeV);counts", histname.Data());
283  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
284 
285  histname = TString::Format("%s/histJetTrkPt_%d", groupname.Data(), cent);
286  histtitle = TString::Format("%s;#it{p}_{T,JetTrk} (GeV/#it{c});counts", histname.Data());
287  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt);
288 
289  histname = TString::Format("%s/fHistDeltaEtaDeltaPhiJE_%d", groupname.Data(), cent);
290  histtitle = TString::Format("%s;#it{#phi}_{jet} - #it{#phi}_{JE,patch};#it{#eta}_{Jet} - #it{#eta}_{JE,patch};counts", histname.Data());
291  fHistManager.CreateTH2(histname, histtitle, 70, -0.7, 0.7, 70, -0.7, 0.7);
292 
293  histname = TString::Format("%s/fHistDeltaEtaDeltaPhiGA_%d", groupname.Data(), cent);
294  histtitle = TString::Format("%s;#it{#phi}_{jet} - #it{#phi}_{GA,patch};#it{#eta}_{Jet} - #it{#eta}_{GA,patch};counts", histname.Data());
295  fHistManager.CreateTH2(histname, histtitle, 70, -0.7, 0.7, 70, -0.7, 0.7);
296 
297  histname = TString::Format("%s/fHistJetEPatchEJE_%d", groupname.Data(), cent);
298  histtitle = TString::Format("%s;#it{E_{JE,patch}};#it{E_{Jet}^{UnCorr}};counts", histname.Data());
299  fHistManager.CreateTH2(histname, histtitle, 1000, 0, 100, 1000, 0, 100);
300 
301  histname = TString::Format("%s/fHistJetEPatchEGA_%d", groupname.Data(), cent);
302  histtitle = TString::Format("%s;#it{E_{GA,patch}};#it{E_{Jet,UnCorr}};counts", histname.Data());
303  fHistManager.CreateTH2(histname, histtitle, 1000, 0, 100, 1000, 0, 100);
304 
305  histname = TString::Format("%s/histJetArea_%d", groupname.Data(), cent);
306  histtitle = TString::Format("%s;#it{A}_{jet};counts", histname.Data());
307  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, 3);
308 
309  histname = TString::Format("%s/histJetPhi_%d", groupname.Data(), cent);
310  histtitle = TString::Format("%s;#it{#phi}_{jet};counts", histname.Data());
311  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
312 
313  histname = TString::Format("%s/histJetEta_%d", groupname.Data(), cent);
314  histtitle = TString::Format("%s;#it{#eta}_{jet};counts", histname.Data());
315  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
316 
317  histname = TString::Format("%s/histJetClusterPhi_%d", groupname.Data(), cent);
318  histtitle = TString::Format("%s;#it{#phi}_{jet}^{cluster};counts", histname.Data());
319  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
320 
321  histname = TString::Format("%s/histJetClusterEta_%d", groupname.Data(), cent);
322  histtitle = TString::Format("%s;#it{#eta}_{jet}^{cluster};counts", histname.Data());
323  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
324 
325  histname = TString::Format("%s/histNJets_%d", groupname.Data(), cent);
326  histtitle = TString::Format("%s;number of jets;events", histname.Data());
327  if (fForceBeamType != kpp) {
328  fHistManager.CreateTH1(histname, histtitle, 500, 0, 500);
329  }
330  else {
331  fHistManager.CreateTH1(histname, histtitle, 100, 0, 100);
332  }
333 
334  if (!jetCont->GetRhoName().IsNull()) {
335  histname = TString::Format("%s/histJetCorrPt_%d", groupname.Data(), cent);
336  histtitle = TString::Format("%s;#it{p}_{T,jet}^{corr} (GeV/#it{c});counts", histname.Data());
337  fHistManager.CreateTH1(histname, histtitle, fNbins, -fMaxBinPt / 2, fMaxBinPt / 2);
338  }
339  }
340  }
341 }
342 
350 {
351  DoJetLoop();
352  //DoTrackLoop();
353  //DoClusterLoop();
354  //DoCellLoop();
355 
356  return kTRUE;
357 }
358 
364 {
365  TString histname;
366  TString groupname;
367  AliJetContainer* jetCont = 0;
368  TIter next(&fJetCollArray);
369 
370  TClonesArray *triggerpatches = dynamic_cast<TClonesArray *>(InputEvent()->FindListObject("EmcalTriggers"));
371  if(!triggerpatches)
372  AliErrorStream() << "Trigger patch container EmcalTriggers not found in task " << GetName() << std::endl;
373 
374  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
375  groupname = jetCont->GetName();
376  UInt_t count = 0;
377  for(auto jet : jetCont->accepted()) {
378  if (!jet) continue;
379  count++;
380 
381  histname = TString::Format("%s/histJetPt_%d", groupname.Data(), fCentBin);
382  fHistManager.FillTH1(histname, jet->Pt());
383 
384  histname = TString::Format("%s/histJetClusterEnergy_%d", groupname.Data(), fCentBin);
385  fHistManager.FillTH1(histname, jet->E());
386 
387  histname = TString::Format("%s/histJetArea_%d", groupname.Data(), fCentBin);
388  fHistManager.FillTH1(histname, jet->Area());
389 
390  histname = TString::Format("%s/histJetPhi_%d", groupname.Data(), fCentBin);
391  fHistManager.FillTH1(histname, jet->Phi());
392 
393  histname = TString::Format("%s/histJetEta_%d", groupname.Data(), fCentBin);
394  fHistManager.FillTH1(histname, jet->Eta());
395 
396  //Look at emcal trigger patches in event and associate with jet
397  AliEMCALTriggerPatchInfo *currentpatch(nullptr);
398  for(TIter patchiter = TIter(triggerpatches).Begin(); patchiter != TIter::End(); ++patchiter){
399  currentpatch = static_cast<AliEMCALTriggerPatchInfo *>(*patchiter);
400  if(currentpatch->GetPatchSize() != 2) continue; // Reject L0 patches
401 
402  //Select Single Shower Patch
403  if(currentpatch->IsGammaLowRecalc() || currentpatch->IsGammaLowSimple()){
404  histname = TString::Format("%s/fHistDeltaEtaDeltaPhiGA_%d", groupname.Data(), fCentBin);
405  fHistManager.FillTH2(histname, jet->Phi() - currentpatch->GetPhiGeo(), jet->Eta() - currentpatch->GetEtaGeo());
406  histname = TString::Format("%s/fHistJetEPatchEGA_%d", groupname.Data(), fCentBin);
407  fHistManager.FillTH2(histname,jet->E(),currentpatch->GetPatchE());
408  }
409 
410  //Select Jet Patch
411  if(currentpatch->IsJetLowRecalc() || currentpatch->IsJetLowSimple()){
412  histname = TString::Format("%s/fHistDeltaEtaDeltaPhiJE_%d", groupname.Data(), fCentBin);
413  fHistManager.FillTH2(histname, jet->Phi() - currentpatch->GetPhiGeo(), jet->Eta() - currentpatch->GetEtaGeo());
414  histname = TString::Format("%s/fHistJetEPatchEJE_%d", groupname.Data(), fCentBin);
415  fHistManager.FillTH2(histname,jet->E(),currentpatch->GetPatchE());
416  }
417 
418  }
419 
420  //Look at assoc tracks of a given jet
421  AliParticleContainer* tracks = jetCont->GetParticleContainer();
422  if (tracks) {
423  for (Int_t it = 0; it < jet->GetNumberOfTracks(); it++) {
424  AliVParticle *JetTrk = jet->TrackAt(it, tracks->GetArray());
425  if (JetTrk) {
426  //AliVTrack *Vtrack = dynamic_cast<AliVTrack*>(track);
427  histname = TString::Format("%s/histJetTrkPt_%d", groupname.Data(), fCentBin);
428  fHistManager.FillTH1(histname, JetTrk->Pt());
429  }
430  }
431  }
432  //Loop over Clusters in Jet
433  AliClusterContainer* JetCluster = 0;
434  JetCluster = jetCont->GetClusterContainer();
435  if(JetCluster) {
436  for(auto cluster : JetCluster->accepted()) {
437  AliTLorentzVector nPart;
438  cluster->GetMomentum(nPart, fVertex);
439  histname = TString::Format("%s/histJetClusterEnergy_%d", groupname.Data(), fCentBin);
440  fHistManager.FillTH1(histname, cluster->E());
441  histname = TString::Format("%s/histJetClusterPhi_%d", groupname.Data(), fCentBin);
442  fHistManager.FillTH1(histname, nPart.Phi_0_2pi());
443  histname = TString::Format("%s/histJetClusterEta_%d", groupname.Data(), fCentBin);
444  fHistManager.FillTH1(histname, nPart.Eta());
445  }
446  }
447 
448 
449  if (jetCont->GetRhoParameter()) {
450  histname = TString::Format("%s/histJetCorrPt_%d", groupname.Data(), fCentBin);
451  fHistManager.FillTH1(histname, jet->Pt() - jetCont->GetRhoVal() * jet->Area());
452  }//Background Subtaction in PbPb
453  }// Loop over each jet in a event
454  histname = TString::Format("%s/histNJets_%d", groupname.Data(), fCentBin);
455  fHistManager.FillTH1(histname, count);
456  }
457 }
458 
464 {
466 
467  TString histname;
468  TString groupname;
469  AliParticleContainer* partCont = 0;
470  TIter next(&fParticleCollArray);
471  while ((partCont = static_cast<AliParticleContainer*>(next()))) {
472  groupname = partCont->GetName();
473  UInt_t count = 0;
474  for(auto part : partCont->accepted()) {
475  if (!part) continue;
476  count++;
477 
478  histname = TString::Format("%s/histTrackPt_%d", groupname.Data(), fCentBin);
479  fHistManager.FillTH1(histname, part->Pt());
480 
481  histname = TString::Format("%s/histTrackPhi_%d", groupname.Data(), fCentBin);
482  fHistManager.FillTH1(histname, part->Phi());
483 
484  histname = TString::Format("%s/histTrackEta_%d", groupname.Data(), fCentBin);
485  fHistManager.FillTH1(histname, part->Eta());
486 
487  if (partCont->GetLoadedClass()->InheritsFrom("AliVTrack")) {
488  const AliVTrack* track = static_cast<const AliVTrack*>(part);
489 
490  histname = TString::Format("%s/fHistDeltaEtaPt_%d", groupname.Data(), fCentBin);
491  fHistManager.FillTH1(histname, track->Pt(), track->Eta() - track->GetTrackEtaOnEMCal());
492 
493  histname = TString::Format("%s/fHistDeltaPhiPt_%d", groupname.Data(), fCentBin);
494  fHistManager.FillTH1(histname, track->Pt(), track->Phi() - track->GetTrackPhiOnEMCal());
495 
496  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", groupname.Data(), fCentBin);
497  fHistManager.FillTH1(histname, track->Pt(), track->Pt() - track->GetTrackPtOnEMCal());
498 
499  if (clusCont) {
500  Int_t iCluster = track->GetEMCALcluster();
501  if (iCluster >= 0) {
502  AliVCluster* cluster = clusCont->GetAcceptCluster(iCluster);
503  if (cluster) {
504  histname = TString::Format("%s/fHistEoverPvsP_%d", groupname.Data(), fCentBin);
505  fHistManager.FillTH2(histname, track->P(), cluster->GetNonLinCorrEnergy() / track->P());
506  }
507  }
508  }
509  }
510  }
511 
512  histname = TString::Format("%s/histNTracks_%d", groupname.Data(), fCentBin);
513  fHistManager.FillTH1(histname, count);
514  }
515 }
516 
522 {
523  TString histname;
524  TString groupname;
525  AliClusterContainer* clusCont = 0;
526  TIter next(&fClusterCollArray);
527  while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
528  groupname = clusCont->GetName();
529 
530  for(auto cluster : clusCont->all()) {
531  if (!cluster) continue;
532 
533  if (cluster->GetIsExotic()) {
534  histname = TString::Format("%s/histClusterEnergyExotic_%d", groupname.Data(), fCentBin);
535  fHistManager.FillTH1(histname, cluster->E());
536  }
537  }
538 
539  UInt_t count = 0;
540  for(auto cluster : clusCont->accepted()) {
541  if (!cluster) continue;
542  count++;
543 
544  AliTLorentzVector nPart;
545  cluster->GetMomentum(nPart, fVertex);
546 
547  histname = TString::Format("%s/histClusterEnergy_%d", groupname.Data(), fCentBin);
548  fHistManager.FillTH1(histname, cluster->E());
549 
550  histname = TString::Format("%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), fCentBin);
551  fHistManager.FillTH1(histname, cluster->GetNonLinCorrEnergy());
552 
553  histname = TString::Format("%s/histClusterHadCorrEnergy_%d", groupname.Data(), fCentBin);
554  fHistManager.FillTH1(histname, cluster->GetHadCorrEnergy());
555 
556  histname = TString::Format("%s/histClusterPhi_%d", groupname.Data(), fCentBin);
557  fHistManager.FillTH1(histname, nPart.Phi_0_2pi());
558 
559  histname = TString::Format("%s/histClusterEta_%d", groupname.Data(), fCentBin);
560  fHistManager.FillTH1(histname, nPart.Eta());
561  }
562 
563  histname = TString::Format("%s/histNClusters_%d", groupname.Data(), fCentBin);
564  fHistManager.FillTH1(histname, count);
565  }
566 }
567 
573 {
574  if (!fCaloCells) return;
575 
576  TString histname;
577 
578  const Short_t ncells = fCaloCells->GetNumberOfCells();
579 
580  histname = TString::Format("%s/histNCells_%d", fCaloCellsName.Data(), fCentBin);
581  fHistManager.FillTH1(histname, ncells);
582 
583  histname = TString::Format("%s/histCellEnergy_%d", fCaloCellsName.Data(), fCentBin);
584  for (Short_t pos = 0; pos < ncells; pos++) {
585  Double_t amp = fCaloCells->GetAmplitude(pos);
586 
587  fHistManager.FillTH1(histname, amp);
588  }
589 }
590 
596 {
597 
599 }
600 
609 {
610 
611 
612  TString firedtriggers(InputEvent()->GetFiredTriggerClasses());
613  if(!firedtriggers.Contains("EG1")){
614 
615  //return kFALSE;
616  }
617 
618 
619 
620  //AliEMCALTriggerPatchInfo *patch;
621  /*
622  AliDebugStream(1) << GetName() << ": Number of trigger patches " << fTriggerPatchInfo->GetEntries() << std::endl;
623  for(auto patchIter : *fTriggerPatchInfo){
624  AliEMCALTriggerPatchInfo *patch = static_cast<AliEMCALTriggerPatchInfo *>(patchIter);
625  }
626 
627  bool isDCAL = patch->IsDCalPHOS(),
628  isSingleShower = SelectSingleShowerPatch(patch),
629  isJetPatch = SelectJetPatch(patch);
630  */
631 
632  return kTRUE;
633 }
634 
636 
637  //Find main trigger
638  if(!fTriggerPatchInfo)
639  return;
640 
641  //number of patches in event
642  Int_t nPatch = fTriggerPatchInfo->GetEntriesFast();
643  //extract main trigger patch
644  Double_t emax = -1.;
645  for (Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
646  AliEMCALTriggerPatchInfo *patch = (AliEMCALTriggerPatchInfo*)fTriggerPatchInfo->At( iPatch );
647  if (!patch) continue;
648  }
649 }
650 
655 {
656  cout<<"*****************************"<<endl;
657  cout<<"******* Task Finished *******"<<endl;
658  cout<<"*****************************"<<endl;
659 }
THashList * CreateHistoGroup(const char *groupname)
Create a new group of histograms within a parent group.
TObjArray fClusterCollArray
cluster collection array
Double_t GetRhoVal() const
const TString & GetRhoName() const
double Double_t
Definition: External.C:58
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 fMinBinPt
min pt in histograms
AliClusterContainer * GetClusterContainer() const
Int_t fCentBin
!event centrality bin
Declaration of class AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA.
Container for particles within the EMCAL framework.
void SetCaloTriggerPatchInfoName(const char *n)
TObjArray fParticleCollArray
particle/track collection array
const AliClusterIterableContainer all() const
AliParticleContainer * GetParticleContainer() 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
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
Double_t Phi_0_2pi() const
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
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.
const AliJetIterableContainer accepted() const
bool Bool_t
Definition: External.C:53
Container structure for EMCAL clusters.
Container for jet within the EMCAL jet framework.
Int_t fNbins
no. of pt bins