AliPhysics  ff07904 (ff07904)
AliAnalysisTaskEmcalJetSample.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 
21 #include <AliAnalysisManager.h>
22 #include <AliVEventHandler.h>
23 #include <AliVCluster.h>
24 #include <AliVParticle.h>
25 #include <AliLog.h>
26 
27 #include "AliTLorentzVector.h"
28 #include "AliEmcalJet.h"
29 #include "AliRhoParameter.h"
30 #include "AliJetContainer.h"
31 #include "AliParticleContainer.h"
32 #include "AliClusterContainer.h"
33 
35 
39 
45  fHistManager()
46 {
47 }
48 
55  AliAnalysisTaskEmcalJet(name, kTRUE),
56  fHistManager(name)
57 {
59 }
60 
65 {
66 }
67 
73 {
75 
80 
81  TIter next(fHistManager.GetListOfHistograms());
82  TObject* obj = 0;
83  while ((obj = next())) {
84  fOutput->Add(obj);
85  }
86 
87  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
88 }
89 
90 /*
91  * This function allocates the histograms for basic EMCal cluster QA.
92  * A set of histograms (energy, eta, phi, number of cluster) is allocated
93  * per each cluster container and per each centrality bin.
94  */
96 {
97  TString histname;
98  TString histtitle;
99  TString groupname;
100  AliClusterContainer* clusCont = 0;
101  TIter next(&fClusterCollArray);
102  while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
103  groupname = clusCont->GetName();
104  // Protect against creating the histograms twice
105  if (fHistManager.FindObject(groupname)) {
106  AliWarning(TString::Format("%s: Found groupname %s in hist manager. The cluster containers will be filled into the same histograms.", GetName(), groupname.Data()));
107  continue;
108  }
109  fHistManager.CreateHistoGroup(groupname);
110  for (Int_t cent = 0; cent < fNcentBins; cent++) {
111  histname = TString::Format("%s/histClusterEnergy_%d", groupname.Data(), cent);
112  histtitle = TString::Format("%s;#it{E}_{cluster} (GeV);counts", histname.Data());
113  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
114 
115  histname = TString::Format("%s/histClusterEnergyExotic_%d", groupname.Data(), cent);
116  histtitle = TString::Format("%s;#it{E}_{cluster}^{exotic} (GeV);counts", histname.Data());
117  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
118 
119  histname = TString::Format("%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), cent);
120  histtitle = TString::Format("%s;#it{E}_{cluster}^{non-lin.corr.} (GeV);counts", histname.Data());
121  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
122 
123  histname = TString::Format("%s/histClusterHadCorrEnergy_%d", groupname.Data(), cent);
124  histtitle = TString::Format("%s;#it{E}_{cluster}^{had.corr.} (GeV);counts", histname.Data());
125  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
126 
127  histname = TString::Format("%s/histClusterPhi_%d", groupname.Data(), cent);
128  histtitle = TString::Format("%s;#it{#phi}_{custer};counts", histname.Data());
129  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
130 
131  histname = TString::Format("%s/histClusterEta_%d", groupname.Data(), cent);
132  histtitle = TString::Format("%s;#it{#eta}_{custer};counts", histname.Data());
133  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
134 
135  histname = TString::Format("%s/histNClusters_%d", groupname.Data(), cent);
136  histtitle = TString::Format("%s;number of clusters;events", histname.Data());
137  if (fForceBeamType != kpp) {
138  fHistManager.CreateTH1(histname, histtitle, 500, 0, 3000);
139  }
140  else {
141  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
142  }
143  }
144  }
145 
146  histname = "fHistSumNClusters";
147  histtitle = TString::Format("%s;Sum of n clusters;events", histname.Data());
148  if (fForceBeamType != kpp) {
149  fHistManager.CreateTH1(histname, histtitle, 500, 0, 3000);
150  }
151  else {
152  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
153  }
154 }
155 
156 /*
157  * This function allocates the histograms for basic EMCal QA.
158  * One 2D histogram with the cell energy spectra and the number of cells
159  * per event is allocated per each centrality bin.
160  */
162 {
163  TString histname;
164  TString histtitle;
165  TString groupname(fCaloCellsName);
166 
167  fHistManager.CreateHistoGroup(groupname);
168  for (Int_t cent = 0; cent < fNcentBins; cent++) {
169  histname = TString::Format("%s/histCellEnergy_%d", groupname.Data(), cent);
170  histtitle = TString::Format("%s;#it{E}_{cell} (GeV);counts", histname.Data());
171  fHistManager.CreateTH1(histname, histtitle, 300, 0, 150);
172 
173  histname = TString::Format("%s/histNCells_%d", groupname.Data(), cent);
174  histtitle = TString::Format("%s;number of cells;events", histname.Data());
175  if (fForceBeamType != kpp) {
176  fHistManager.CreateTH1(histname, histtitle, 500, 0, 6000);
177  }
178  else {
179  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
180  }
181  }
182 }
183 
184 /*
185  * This function allocates the histograms for basic tracking QA.
186  * A set of histograms (pT, eta, phi, difference between kinematic properties
187  * at the vertex and at the EMCal surface, number of tracks) is allocated
188  * per each particle container and per each centrality bin.
189  */
191 {
192  TString histname;
193  TString histtitle;
194  TString groupname;
195  AliParticleContainer* partCont = 0;
196  TIter next(&fParticleCollArray);
197  while ((partCont = static_cast<AliParticleContainer*>(next()))) {
198  groupname = partCont->GetName();
199  // Protect against creating the histograms twice
200  if (fHistManager.FindObject(groupname)) {
201  AliWarning(TString::Format("%s: Found groupname %s in hist manager. The track containers will be filled into the same histograms.", GetName(), groupname.Data()));
202  continue;
203  }
204  fHistManager.CreateHistoGroup(groupname);
205  for (Int_t cent = 0; cent < fNcentBins; cent++) {
206  histname = TString::Format("%s/histTrackPt_%d", groupname.Data(), cent);
207  histtitle = TString::Format("%s;#it{p}_{T,track} (GeV/#it{c});counts", histname.Data());
208  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
209 
210  histname = TString::Format("%s/histTrackPhi_%d", groupname.Data(), cent);
211  histtitle = TString::Format("%s;#it{#phi}_{track};counts", histname.Data());
212  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
213 
214  histname = TString::Format("%s/histTrackEta_%d", groupname.Data(), cent);
215  histtitle = TString::Format("%s;#it{#eta}_{track};counts", histname.Data());
216  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
217 
218  if (TClass(partCont->GetClassName()).InheritsFrom("AliVTrack")) {
219  histname = TString::Format("%s/fHistDeltaEtaPt_%d", groupname.Data(), cent);
220  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#eta}_{track}^{vertex} - #it{#eta}_{track}^{EMCal};counts", histname.Data());
221  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, 50, -0.5, 0.5);
222 
223  histname = TString::Format("%s/fHistDeltaPhiPt_%d", groupname.Data(), cent);
224  histtitle = TString::Format("%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#phi}_{track}^{vertex} - #it{#phi}_{track}^{EMCal};counts", histname.Data());
225  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, 200, -2, 2);
226 
227  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", groupname.Data(), cent);
228  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());
229  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, fNbins / 2, -fMaxBinPt/2, fMaxBinPt/2);
230 
231  histname = TString::Format("%s/fHistEoverPvsP_%d", groupname.Data(), cent);
232  histtitle = TString::Format("%s;#it{P}_{track} (GeV/#it{c});#it{E}_{cluster} / #it{P}_{track} #it{c};counts", histname.Data());
233  fHistManager.CreateTH2(histname, histtitle, fNbins / 2, fMinBinPt, fMaxBinPt, fNbins / 2, 0, 4);
234  }
235 
236  histname = TString::Format("%s/histNTracks_%d", groupname.Data(), cent);
237  histtitle = TString::Format("%s;number of tracks;events", histname.Data());
238  if (fForceBeamType != kpp) {
239  fHistManager.CreateTH1(histname, histtitle, 500, 0, 5000);
240  }
241  else {
242  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
243  }
244  }
245  }
246 
247  histname = "fHistSumNTracks";
248  histtitle = TString::Format("%s;Sum of n tracks;events", histname.Data());
249  if (fForceBeamType != kpp) {
250  fHistManager.CreateTH1(histname, histtitle, 500, 0, 5000);
251  }
252  else {
253  fHistManager.CreateTH1(histname, histtitle, 200, 0, 200);
254  }
255 }
256 
257 /*
258  * This function allocates the histograms for basic jet QA.
259  * A set of histograms (pT, eta, phi, area, number of jets, corrected pT) is allocated
260  * per each jet container and per each centrality bin.
261  */
263 {
264  TString histname;
265  TString histtitle;
266  TString groupname;
267  AliJetContainer* jetCont = 0;
268  TIter next(&fJetCollArray);
269  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
270  groupname = jetCont->GetName();
271  // Protect against creating the histograms twice
272  if (fHistManager.FindObject(groupname)) {
273  AliWarning(TString::Format("%s: Found groupname %s in hist manager. The jet containers will be filled into the same histograms.", GetName(), groupname.Data()));
274  continue;
275  }
276  fHistManager.CreateHistoGroup(groupname);
277  for (Int_t cent = 0; cent < fNcentBins; cent++) {
278  histname = TString::Format("%s/histJetPt_%d", groupname.Data(), cent);
279  histtitle = TString::Format("%s;#it{p}_{T,jet} (GeV/#it{c});counts", histname.Data());
280  fHistManager.CreateTH1(histname, histtitle, fNbins, fMinBinPt, fMaxBinPt);
281 
282  histname = TString::Format("%s/histJetArea_%d", groupname.Data(), cent);
283  histtitle = TString::Format("%s;#it{A}_{jet};counts", histname.Data());
284  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, 3);
285 
286  histname = TString::Format("%s/histJetPhi_%d", groupname.Data(), cent);
287  histtitle = TString::Format("%s;#it{#phi}_{jet};counts", histname.Data());
288  fHistManager.CreateTH1(histname, histtitle, fNbins / 2, 0, TMath::TwoPi());
289 
290  histname = TString::Format("%s/histJetEta_%d", groupname.Data(), cent);
291  histtitle = TString::Format("%s;#it{#eta}_{jet};counts", histname.Data());
292  fHistManager.CreateTH1(histname, histtitle, fNbins / 6, -1, 1);
293 
294  histname = TString::Format("%s/histNJets_%d", groupname.Data(), cent);
295  histtitle = TString::Format("%s;number of jets;events", histname.Data());
296  if (fForceBeamType != kpp) {
297  fHistManager.CreateTH1(histname, histtitle, 500, 0, 500);
298  }
299  else {
300  fHistManager.CreateTH1(histname, histtitle, 100, 0, 100);
301  }
302 
303  if (!jetCont->GetRhoName().IsNull()) {
304  histname = TString::Format("%s/histJetCorrPt_%d", groupname.Data(), cent);
305  histtitle = TString::Format("%s;#it{p}_{T,jet}^{corr} (GeV/#it{c});counts", histname.Data());
306  fHistManager.CreateTH1(histname, histtitle, fNbins, -fMaxBinPt / 2, fMaxBinPt / 2);
307  }
308  }
309  }
310 }
311 
319 {
320  DoJetLoop();
321  DoTrackLoop();
322  DoClusterLoop();
323  DoCellLoop();
324 
325  return kTRUE;
326 }
327 
333 {
334  TString histname;
335  TString groupname;
336  AliJetContainer* jetCont = 0;
337  TIter next(&fJetCollArray);
338  while ((jetCont = static_cast<AliJetContainer*>(next()))) {
339  groupname = jetCont->GetName();
340  UInt_t count = 0;
341  for(auto jet : jetCont->accepted()) {
342  if (!jet) continue;
343  count++;
344 
345  histname = TString::Format("%s/histJetPt_%d", groupname.Data(), fCentBin);
346  fHistManager.FillTH1(histname, jet->Pt());
347 
348  histname = TString::Format("%s/histJetArea_%d", groupname.Data(), fCentBin);
349  fHistManager.FillTH1(histname, jet->Area());
350 
351  histname = TString::Format("%s/histJetPhi_%d", groupname.Data(), fCentBin);
352  fHistManager.FillTH1(histname, jet->Phi());
353 
354  histname = TString::Format("%s/histJetEta_%d", groupname.Data(), fCentBin);
355  fHistManager.FillTH1(histname, jet->Eta());
356 
357  if (jetCont->GetRhoParameter()) {
358  histname = TString::Format("%s/histJetCorrPt_%d", groupname.Data(), fCentBin);
359  fHistManager.FillTH1(histname, jet->Pt() - jetCont->GetRhoVal() * jet->Area());
360  }
361  }
362  histname = TString::Format("%s/histNJets_%d", groupname.Data(), fCentBin);
363  fHistManager.FillTH1(histname, count);
364  }
365 }
366 
372 {
374 
375  TString histname;
376  TString groupname;
377  UInt_t sumAcceptedTracks = 0;
378  AliParticleContainer* partCont = 0;
379  TIter next(&fParticleCollArray);
380  while ((partCont = static_cast<AliParticleContainer*>(next()))) {
381  groupname = partCont->GetName();
382  UInt_t count = 0;
383  for(auto part : partCont->accepted()) {
384  if (!part) continue;
385  count++;
386 
387  histname = TString::Format("%s/histTrackPt_%d", groupname.Data(), fCentBin);
388  fHistManager.FillTH1(histname, part->Pt());
389 
390  histname = TString::Format("%s/histTrackPhi_%d", groupname.Data(), fCentBin);
391  fHistManager.FillTH1(histname, part->Phi());
392 
393  histname = TString::Format("%s/histTrackEta_%d", groupname.Data(), fCentBin);
394  fHistManager.FillTH1(histname, part->Eta());
395 
396  if (partCont->GetLoadedClass()->InheritsFrom("AliVTrack")) {
397  const AliVTrack* track = static_cast<const AliVTrack*>(part);
398 
399  histname = TString::Format("%s/fHistDeltaEtaPt_%d", groupname.Data(), fCentBin);
400  fHistManager.FillTH1(histname, track->Pt(), track->Eta() - track->GetTrackEtaOnEMCal());
401 
402  histname = TString::Format("%s/fHistDeltaPhiPt_%d", groupname.Data(), fCentBin);
403  fHistManager.FillTH1(histname, track->Pt(), track->Phi() - track->GetTrackPhiOnEMCal());
404 
405  histname = TString::Format("%s/fHistDeltaPtvsPt_%d", groupname.Data(), fCentBin);
406  fHistManager.FillTH1(histname, track->Pt(), track->Pt() - track->GetTrackPtOnEMCal());
407 
408  if (clusCont) {
409  Int_t iCluster = track->GetEMCALcluster();
410  if (iCluster >= 0) {
411  AliVCluster* cluster = clusCont->GetAcceptCluster(iCluster);
412  if (cluster) {
413  histname = TString::Format("%s/fHistEoverPvsP_%d", groupname.Data(), fCentBin);
414  fHistManager.FillTH2(histname, track->P(), cluster->GetNonLinCorrEnergy() / track->P());
415  }
416  }
417  }
418  }
419  }
420  sumAcceptedTracks += count;
421 
422  histname = TString::Format("%s/histNTracks_%d", groupname.Data(), fCentBin);
423  fHistManager.FillTH1(histname, count);
424  }
425 
426  histname = "fHistSumNTracks";
427  fHistManager.FillTH1(histname, sumAcceptedTracks);
428 }
429 
435 {
436  TString histname;
437  TString groupname;
438  UInt_t sumAcceptedClusters = 0;
439  AliClusterContainer* clusCont = 0;
440  TIter next(&fClusterCollArray);
441  while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
442  groupname = clusCont->GetName();
443 
444  for(auto cluster : clusCont->all()) {
445  if (!cluster) continue;
446 
447  if (cluster->GetIsExotic()) {
448  histname = TString::Format("%s/histClusterEnergyExotic_%d", groupname.Data(), fCentBin);
449  fHistManager.FillTH1(histname, cluster->E());
450  }
451  }
452 
453  UInt_t count = 0;
454  for(auto cluster : clusCont->accepted()) {
455  if (!cluster) continue;
456  count++;
457 
458  AliTLorentzVector nPart;
459  cluster->GetMomentum(nPart, fVertex);
460 
461  histname = TString::Format("%s/histClusterEnergy_%d", groupname.Data(), fCentBin);
462  fHistManager.FillTH1(histname, cluster->E());
463 
464  histname = TString::Format("%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), fCentBin);
465  fHistManager.FillTH1(histname, cluster->GetNonLinCorrEnergy());
466 
467  histname = TString::Format("%s/histClusterHadCorrEnergy_%d", groupname.Data(), fCentBin);
468  fHistManager.FillTH1(histname, cluster->GetHadCorrEnergy());
469 
470  histname = TString::Format("%s/histClusterPhi_%d", groupname.Data(), fCentBin);
471  fHistManager.FillTH1(histname, nPart.Phi_0_2pi());
472 
473  histname = TString::Format("%s/histClusterEta_%d", groupname.Data(), fCentBin);
474  fHistManager.FillTH1(histname, nPart.Eta());
475  }
476  sumAcceptedClusters += count;
477 
478  histname = TString::Format("%s/histNClusters_%d", groupname.Data(), fCentBin);
479  fHistManager.FillTH1(histname, count);
480  }
481 
482  histname = "fHistSumNClusters";
483  fHistManager.FillTH1(histname, sumAcceptedClusters);
484 }
485 
491 {
492  if (!fCaloCells) return;
493 
494  TString histname;
495 
496  const Short_t ncells = fCaloCells->GetNumberOfCells();
497 
498  histname = TString::Format("%s/histNCells_%d", fCaloCellsName.Data(), fCentBin);
499  fHistManager.FillTH1(histname, ncells);
500 
501  histname = TString::Format("%s/histCellEnergy_%d", fCaloCellsName.Data(), fCentBin);
502  for (Short_t pos = 0; pos < ncells; pos++) {
503  Double_t amp = fCaloCells->GetAmplitude(pos);
504 
505  fHistManager.FillTH1(histname, amp);
506  }
507 }
508 
514 {
516 }
517 
526 {
527  return kTRUE;
528 }
529 
534 {
535 }
536 
543  const char *ntracks,
544  const char *nclusters,
545  const char* ncells,
546  const char *suffix)
547 {
548  // Get the pointer to the existing analysis manager via the static access method.
549  //==============================================================================
550  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
551  if (!mgr)
552  {
553  ::Error("AddTaskEmcalJetSample", "No analysis manager to connect to.");
554  return 0;
555  }
556 
557  // Check the analysis type using the event handlers connected to the analysis manager.
558  //==============================================================================
559  AliVEventHandler* handler = mgr->GetInputEventHandler();
560  if (!handler)
561  {
562  ::Error("AddTaskEmcalJetSample", "This task requires an input event handler");
563  return 0;
564  }
565 
566  enum EDataType_t {
567  kUnknown,
568  kESD,
569  kAOD
570  };
571 
572  EDataType_t dataType = kUnknown;
573 
574  if (handler->InheritsFrom("AliESDInputHandler")) {
575  dataType = kESD;
576  }
577  else if (handler->InheritsFrom("AliAODInputHandler")) {
578  dataType = kAOD;
579  }
580 
581  //-------------------------------------------------------
582  // Init the task and do settings
583  //-------------------------------------------------------
584 
585  TString trackName(ntracks);
586  TString clusName(nclusters);
587  TString cellName(ncells);
588 
589  if (trackName == "usedefault") {
590  if (dataType == kESD) {
591  trackName = "Tracks";
592  }
593  else if (dataType == kAOD) {
594  trackName = "tracks";
595  }
596  else {
597  trackName = "";
598  }
599  }
600 
601  if (clusName == "usedefault") {
602  if (dataType == kESD) {
603  clusName = "CaloClusters";
604  }
605  else if (dataType == kAOD) {
606  clusName = "caloClusters";
607  }
608  else {
609  clusName = "";
610  }
611  }
612 
613  if (cellName == "usedefault") {
614  if (dataType == kESD) {
615  cellName = "EMCALCells";
616  }
617  else if (dataType == kAOD) {
618  cellName = "emcalCells";
619  }
620  else {
621  cellName = "";
622  }
623  }
624 
625  TString name("AliAnalysisTaskEmcalJetSample");
626  if (!trackName.IsNull()) {
627  name += "_";
628  name += trackName;
629  }
630  if (!clusName.IsNull()) {
631  name += "_";
632  name += clusName;
633  }
634  if (!cellName.IsNull()) {
635  name += "_";
636  name += cellName;
637  }
638  if (strcmp(suffix,"") != 0) {
639  name += "_";
640  name += suffix;
641  }
642 
644  sampleTask->SetCaloCellsName(cellName);
645  sampleTask->SetVzRange(-10,10);
646 
647  if (trackName == "mcparticles") {
648  sampleTask->AddMCParticleContainer(trackName);
649  }
650  else if (trackName == "tracks" || trackName == "Tracks") {
651  sampleTask->AddTrackContainer(trackName);
652  }
653  else if (!trackName.IsNull()) {
654  sampleTask->AddParticleContainer(trackName);
655  }
656  sampleTask->AddClusterContainer(clusName);
657 
658  //-------------------------------------------------------
659  // Final settings, pass to manager and set the containers
660  //-------------------------------------------------------
661 
662  mgr->AddTask(sampleTask);
663 
664  // Create containers for input/output
665  AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer() ;
666  TString contname(name);
667  contname += "_histos";
668  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contname.Data(),
669  TList::Class(),AliAnalysisManager::kOutputContainer,
670  Form("%s", AliAnalysisManager::GetCommonFileName()));
671  mgr->ConnectInput (sampleTask, 0, cinput1 );
672  mgr->ConnectOutput (sampleTask, 1, coutput1 );
673 
674  return sampleTask;
675 }
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
Declaration of class AliAnalysisTaskEmcalJetSample.
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
Int_t fCentBin
!event centrality bin
void SetVzRange(Double_t min, Double_t max)
Implementation of a sample jet analysis task.
AliClusterContainer * AddClusterContainer(const char *n)
Create new cluster container and attach it to the task.
Container for particles within the EMCAL framework.
TObjArray fParticleCollArray
particle/track collection array
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
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
static AliAnalysisTaskEmcalJetSample * AddTaskEmcalJetSample(const char *ntracks="usedefault", const char *nclusters="usedefault", const char *ncells="usedefault", const char *suffix="")
Double_t Phi_0_2pi() const
AliParticleContainer * AddParticleContainer(const char *n)
Create new particle container and attach it to the task.
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
AliMCParticleContainer * AddMCParticleContainer(const char *n)
Create new container for MC particles and attach it to the task.
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
THistManager fHistManager
Histogram manager.
Double_t fVertex[3]
!event vertex
AliTrackContainer * AddTrackContainer(const char *n)
Create new track container and attach it to the task.
void SetMakeGeneralHistograms(Bool_t g)
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
EDataType_t
Switch for the data type.
void SetCaloCellsName(const char *n)
Container structure for EMCAL clusters.
Container for jet within the EMCAL jet framework.
Int_t fNbins
no. of pt bins