AliPhysics  9fe175b (9fe175b)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcal.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, 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 #include <RVersion.h>
16 #include "AliAnalysisTaskEmcal.h"
17 
18 #include <TClonesArray.h>
19 #include <AliEmcalList.h>
20 #include <TObject.h>
21 #include <TH1F.h>
22 #include <TProfile.h>
23 #include <TSystem.h>
24 #include <TFile.h>
25 #include <TChain.h>
26 #include <TKey.h>
27 
28 #include "AliStack.h"
29 #include "AliAODEvent.h"
30 #include "AliAnalysisManager.h"
31 #include "AliCentrality.h"
32 #include "AliEMCALGeometry.h"
33 #include "AliESDEvent.h"
34 #include "AliEmcalParticle.h"
35 #include "AliEventplane.h"
36 #include "AliInputEventHandler.h"
37 #include "AliLog.h"
38 #include "AliMCParticle.h"
39 #include "AliVCluster.h"
40 #include "AliVEventHandler.h"
41 #include "AliVParticle.h"
42 #include "AliAODTrack.h"
43 #include "AliVCaloTrigger.h"
44 #include "AliGenPythiaEventHeader.h"
45 #include "AliAODMCHeader.h"
46 #include "AliMCEvent.h"
47 #include "AliAnalysisUtils.h"
48 #include "AliEMCALTriggerPatchInfo.h"
49 #include "AliEmcalPythiaInfo.h"
50 
51 #include "AliMultSelection.h"
52 
54 
58 
63  AliAnalysisTaskSE("AliAnalysisTaskEmcal"),
64  fPythiaInfoName(""),
65  fForceBeamType(kNA),
66  fGeneralHistograms(kFALSE),
67  fInitialized(kFALSE),
68  fCreateHisto(kTRUE),
69  fCaloCellsName(),
70  fCaloTriggersName(),
71  fCaloTriggerPatchInfoName(),
72  fMinCent(-999),
73  fMaxCent(-999),
74  fMinVz(-999),
75  fMaxVz(999),
76  fTrackPtCut(0),
77  fMinNTrack(0),
78  fZvertexDiff(0.5),
79  fUseAliAnaUtils(kFALSE),
80  fRejectPileup(kFALSE),
81  fTklVsClusSPDCut(kFALSE),
82  fOffTrigger(AliVEvent::kAny),
83  fTrigClass(),
84  fTriggerTypeSel(kND),
85  fNbins(250),
86  fMinBinPt(0),
87  fMaxBinPt(250),
88  fMinPtTrackInEmcal(0),
89  fEventPlaneVsEmcal(-1),
90  fMinEventPlane(-1e6),
91  fMaxEventPlane(1e6),
92  fCentEst("V0M"),
93  fIsEmbedded(kFALSE),
94  fIsPythia(kFALSE),
95  fSelectPtHardBin(-999),
96  fMinMCLabel(0),
97  fMCLabelShift(0),
98  fNcentBins(4),
99  fNeedEmcalGeom(kTRUE),
100  fParticleCollArray(),
101  fClusterCollArray(),
102  fTriggers(0),
103  fEMCalTriggerMode(kOverlapWithLowThreshold),
104  fUseNewCentralityEstimation(kFALSE),
105  fGeneratePythiaInfoObject(kFALSE),
106  fUsePtHardBinScaling(kFALSE),
107  fMCRejectFilter(kFALSE),
108  fPtHardAndJetPtFactor(0.),
109  fPtHardAndClusterPtFactor(0.),
110  fPtHardAndTrackPtFactor(0.),
111  fRunNumber(-1),
112  fAliAnalysisUtils(0x0),
113  fIsEsd(kFALSE),
114  fGeom(0),
115  fTracks(0),
116  fCaloClusters(0),
117  fCaloCells(0),
118  fCaloTriggers(0),
119  fTriggerPatchInfo(0),
120  fCent(0),
121  fCentBin(-1),
122  fEPV0(-1.0),
123  fEPV0A(-1.0),
124  fEPV0C(-1.0),
125  fNVertCont(0),
126  fNVertSPDCont(0),
127  fBeamType(kNA),
128  fPythiaHeader(0),
129  fPtHard(0),
130  fPtHardBin(0),
131  fNTrials(0),
132  fXsection(0),
133  fPythiaInfo(0),
134  fOutput(0),
135  fHistEventCount(0),
136  fHistTrialsAfterSel(0),
137  fHistEventsAfterSel(0),
138  fHistXsectionAfterSel(0),
139  fHistTrials(0),
140  fHistEvents(0),
141  fHistXsection(0),
142  fHistPtHard(0),
143  fHistCentrality(0),
144  fHistZVertex(0),
145  fHistEventPlane(0),
146  fHistEventRejection(0),
147  fHistTriggerClasses(0)
148 {
149  fVertex[0] = 0;
150  fVertex[1] = 0;
151  fVertex[2] = 0;
152  fVertexSPD[0] = 0;
153  fVertexSPD[1] = 0;
154  fVertexSPD[2] = 0;
155 
156  fParticleCollArray.SetOwner(kTRUE);
157  fClusterCollArray.SetOwner(kTRUE);
158 }
159 
170 AliAnalysisTaskEmcal::AliAnalysisTaskEmcal(const char *name, Bool_t histo) :
171  AliAnalysisTaskSE(name),
172  fPythiaInfoName(""),
173  fForceBeamType(kNA),
174  fGeneralHistograms(kFALSE),
175  fInitialized(kFALSE),
176  fCreateHisto(histo),
177  fCaloCellsName(),
178  fCaloTriggersName(),
179  fCaloTriggerPatchInfoName(),
180  fMinCent(-999),
181  fMaxCent(-999),
182  fMinVz(-999),
183  fMaxVz(999),
184  fTrackPtCut(0),
185  fMinNTrack(0),
186  fZvertexDiff(0.5),
187  fUseAliAnaUtils(kFALSE),
188  fRejectPileup(kFALSE),
189  fTklVsClusSPDCut(kFALSE),
190  fOffTrigger(AliVEvent::kAny),
191  fTrigClass(),
192  fTriggerTypeSel(kND),
193  fNbins(250),
194  fMinBinPt(0),
195  fMaxBinPt(250),
196  fMinPtTrackInEmcal(0),
197  fEventPlaneVsEmcal(-1),
198  fMinEventPlane(-1e6),
199  fMaxEventPlane(1e6),
200  fCentEst("V0M"),
201  fIsEmbedded(kFALSE),
202  fIsPythia(kFALSE),
203  fSelectPtHardBin(-999),
204  fMinMCLabel(0),
205  fMCLabelShift(0),
206  fNcentBins(4),
207  fNeedEmcalGeom(kTRUE),
208  fParticleCollArray(),
209  fClusterCollArray(),
210  fTriggers(0),
211  fEMCalTriggerMode(kOverlapWithLowThreshold),
212  fUseNewCentralityEstimation(kFALSE),
213  fGeneratePythiaInfoObject(kFALSE),
214  fUsePtHardBinScaling(kFALSE),
215  fMCRejectFilter(kFALSE),
216  fPtHardAndJetPtFactor(0.),
217  fPtHardAndClusterPtFactor(0.),
218  fPtHardAndTrackPtFactor(0.),
219  fRunNumber(-1),
220  fAliAnalysisUtils(0x0),
221  fIsEsd(kFALSE),
222  fGeom(0),
223  fTracks(0),
224  fCaloClusters(0),
225  fCaloCells(0),
226  fCaloTriggers(0),
227  fTriggerPatchInfo(0),
228  fCent(0),
229  fCentBin(-1),
230  fEPV0(-1.0),
231  fEPV0A(-1.0),
232  fEPV0C(-1.0),
233  fNVertCont(0),
234  fNVertSPDCont(0),
235  fBeamType(kNA),
236  fPythiaHeader(0),
237  fPtHard(0),
238  fPtHardBin(0),
239  fNTrials(0),
240  fXsection(0),
241  fPythiaInfo(0),
242  fOutput(0),
243  fHistEventCount(0),
244  fHistTrialsAfterSel(0),
245  fHistEventsAfterSel(0),
246  fHistXsectionAfterSel(0),
247  fHistTrials(0),
248  fHistEvents(0),
249  fHistXsection(0),
250  fHistPtHard(0),
251  fHistCentrality(0),
252  fHistZVertex(0),
253  fHistEventPlane(0),
254  fHistEventRejection(0),
255  fHistTriggerClasses(0)
256 {
257  fVertex[0] = 0;
258  fVertex[1] = 0;
259  fVertex[2] = 0;
260  fVertexSPD[0] = 0;
261  fVertexSPD[1] = 0;
262  fVertexSPD[2] = 0;
263  fParticleCollArray.SetOwner(kTRUE);
264  fClusterCollArray.SetOwner(kTRUE);
265 
266  if (fCreateHisto) {
267  DefineOutput(1, AliEmcalList::Class());
268  }
269 }
270 
275 {
276 }
277 
284 void AliAnalysisTaskEmcal::SetClusPtCut(Double_t cut, Int_t c)
285 {
287  if (cont) cont->SetClusPtCut(cut);
288  else AliError(Form("%s in SetClusPtCut(...): container %d not found",GetName(),c));
289 }
290 
298 void AliAnalysisTaskEmcal::SetClusTimeCut(Double_t min, Double_t max, Int_t c)
299 {
301  if (cont) cont->SetClusTimeCut(min,max);
302  else AliError(Form("%s in SetClusTimeCut(...): container %d not found",GetName(),c));
303 }
304 
311 void AliAnalysisTaskEmcal::SetTrackPtCut(Double_t cut, Int_t c)
312 {
314  if (cont) cont->SetParticlePtCut(cut);
315  else AliError(Form("%s in SetTrackPtCut(...): container %d not found",GetName(),c));
316 
317  fTrackPtCut = cut;
318 }
319 
327 void AliAnalysisTaskEmcal::SetTrackEtaLimits(Double_t min, Double_t max, Int_t c)
328 {
330  if (cont) cont->SetParticleEtaLimits(min,max);
331  else AliError(Form("%s in SetTrackPtCut(...): container %d not found",GetName(),c));
332 }
333 
341 void AliAnalysisTaskEmcal::SetTrackPhiLimits(Double_t min, Double_t max, Int_t c)
342 {
344  if (cont) cont->SetParticlePhiLimits(min,max);
345  else AliError(Form("%s in SetTrackPhiLimits(...): container %d not found",GetName(),c));
346 }
347 
368 {
369  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
370  if (mgr) {
371  AliVEventHandler *evhand = mgr->GetInputEventHandler();
372  if (evhand) {
373  if (evhand->InheritsFrom("AliESDInputHandler")) {
374  fIsEsd = kTRUE;
375  }
376  else {
377  fIsEsd = kFALSE;
378  }
379  }
380  else {
381  AliError("Event handler not found!");
382  }
383  }
384  else {
385  AliError("Analysis manager not found!");
386  }
387 
388  if (!fCreateHisto)
389  return;
390 
391  OpenFile(1);
392  fOutput = new AliEmcalList();
394  fOutput->SetOwner();
395 
396  if (fForceBeamType == kpp)
397  fNcentBins = 1;
398 
399  if (!fGeneralHistograms)
400  return;
401 
402  if (fIsPythia) {
403  fHistTrialsAfterSel = new TH1F("fHistTrialsAfterSel", "fHistTrialsAfterSel", 11, 0, 11);
404  fHistTrialsAfterSel->GetXaxis()->SetTitle("p_{T} hard bin");
405  fHistTrialsAfterSel->GetYaxis()->SetTitle("trials");
407 
408  fHistEventsAfterSel = new TH1F("fHistEventsAfterSel", "fHistEventsAfterSel", 11, 0, 11);
409  fHistEventsAfterSel->GetXaxis()->SetTitle("p_{T} hard bin");
410  fHistEventsAfterSel->GetYaxis()->SetTitle("total events");
412 
413  fHistXsectionAfterSel = new TProfile("fHistXsectionAfterSel", "fHistXsectionAfterSel", 11, 0, 11);
414  fHistXsectionAfterSel->GetXaxis()->SetTitle("p_{T} hard bin");
415  fHistXsectionAfterSel->GetYaxis()->SetTitle("xsection");
417 
418  fHistTrials = new TH1F("fHistTrials", "fHistTrials", 11, 0, 11);
419  fHistTrials->GetXaxis()->SetTitle("p_{T} hard bin");
420  fHistTrials->GetYaxis()->SetTitle("trials");
421  fOutput->Add(fHistTrials);
422 
423  fHistEvents = new TH1F("fHistEvents", "fHistEvents", 11, 0, 11);
424  fHistEvents->GetXaxis()->SetTitle("p_{T} hard bin");
425  fHistEvents->GetYaxis()->SetTitle("total events");
426  fOutput->Add(fHistEvents);
427 
428  fHistXsection = new TProfile("fHistXsection", "fHistXsection", 11, 0, 11);
429  fHistXsection->GetXaxis()->SetTitle("p_{T} hard bin");
430  fHistXsection->GetYaxis()->SetTitle("xsection");
431  fOutput->Add(fHistXsection);
432 
433  const Int_t ptHardLo[11] = { 0, 5,11,21,36,57, 84,117,152,191,234};
434  const Int_t ptHardHi[11] = { 5,11,21,36,57,84,117,152,191,234,1000000};
435 
436  for (Int_t i = 1; i < 12; i++) {
437  fHistTrialsAfterSel->GetXaxis()->SetBinLabel(i, Form("%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
438  fHistEventsAfterSel->GetXaxis()->SetBinLabel(i, Form("%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
439 
440  fHistTrials->GetXaxis()->SetBinLabel(i, Form("%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
441  fHistXsection->GetXaxis()->SetBinLabel(i, Form("%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
442  fHistEvents->GetXaxis()->SetBinLabel(i, Form("%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
443  }
444 
445  fHistPtHard = new TH1F("fHistPtHard", "fHistPtHard", fNbins*2, fMinBinPt, fMaxBinPt*4);
446  fHistPtHard->GetXaxis()->SetTitle("p_{T,hard} (GeV/c)");
447  fHistPtHard->GetYaxis()->SetTitle("counts");
448  fOutput->Add(fHistPtHard);
449  }
450 
451  fHistZVertex = new TH1F("fHistZVertex","Z vertex position", 60, -30, 30);
452  fHistZVertex->GetXaxis()->SetTitle("z");
453  fHistZVertex->GetYaxis()->SetTitle("counts");
454  fOutput->Add(fHistZVertex);
455 
456  if (fForceBeamType != kpp) {
457  fHistCentrality = new TH1F("fHistCentrality","Event centrality distribution", 200, 0, 100);
458  fHistCentrality->GetXaxis()->SetTitle("Centrality (%)");
459  fHistCentrality->GetYaxis()->SetTitle("counts");
460  fOutput->Add(fHistCentrality);
461 
462  fHistEventPlane = new TH1F("fHistEventPlane","Event plane", 120, -TMath::Pi(), TMath::Pi());
463  fHistEventPlane->GetXaxis()->SetTitle("event plane");
464  fHistEventPlane->GetYaxis()->SetTitle("counts");
465  fOutput->Add(fHistEventPlane);
466  }
467 
468  fHistEventRejection = new TH1F("fHistEventRejection","Reasons to reject event",20,0,20);
469 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2)
470  fHistEventRejection->SetBit(TH1::kCanRebin);
471 #else
472  fHistEventRejection->SetCanExtend(TH1::kAllAxes);
473 #endif
474  fHistEventRejection->GetXaxis()->SetBinLabel(1,"PhysSel");
475  fHistEventRejection->GetXaxis()->SetBinLabel(2,"trigger");
476  fHistEventRejection->GetXaxis()->SetBinLabel(3,"trigTypeSel");
477  fHistEventRejection->GetXaxis()->SetBinLabel(4,"Cent");
478  fHistEventRejection->GetXaxis()->SetBinLabel(5,"vertex contr.");
479  fHistEventRejection->GetXaxis()->SetBinLabel(6,"Vz");
480  fHistEventRejection->GetXaxis()->SetBinLabel(7,"VzSPD");
481  fHistEventRejection->GetXaxis()->SetBinLabel(8,"trackInEmcal");
482  fHistEventRejection->GetXaxis()->SetBinLabel(9,"minNTrack");
483  fHistEventRejection->GetXaxis()->SetBinLabel(10,"VtxSel2013pA");
484  fHistEventRejection->GetXaxis()->SetBinLabel(11,"PileUp");
485  fHistEventRejection->GetXaxis()->SetBinLabel(12,"EvtPlane");
486  fHistEventRejection->GetXaxis()->SetBinLabel(13,"SelPtHardBin");
487  fHistEventRejection->GetXaxis()->SetBinLabel(14,"Bkg evt");
488  fHistEventRejection->GetYaxis()->SetTitle("counts");
490 
491  fHistTriggerClasses = new TH1F("fHistTriggerClasses","fHistTriggerClasses",3,0,3);
492 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2)
493  fHistTriggerClasses->SetBit(TH1::kCanRebin);
494 #else
495  fHistTriggerClasses->SetCanExtend(TH1::kAllAxes);
496 #endif
498 
499  fHistEventCount = new TH1F("fHistEventCount","fHistEventCount",2,0,2);
500  fHistEventCount->GetXaxis()->SetBinLabel(1,"Accepted");
501  fHistEventCount->GetXaxis()->SetBinLabel(2,"Rejected");
502  fHistEventCount->GetYaxis()->SetTitle("counts");
503  fOutput->Add(fHistEventCount);
504 
505  PostData(1, fOutput);
506 }
507 
522 {
523  if (fIsPythia) {
527  fHistPtHard->Fill(fPtHard);
528  }
529 
530  fHistZVertex->Fill(fVertex[2]);
531 
532  if (fForceBeamType != kpp) {
533  fHistCentrality->Fill(fCent);
534  fHistEventPlane->Fill(fEPV0);
535  }
536 
537  TObjArray* triggerClasses = InputEvent()->GetFiredTriggerClasses().Tokenize(" ");
538  TIter next(triggerClasses);
539  TObjString* triggerClass = 0;
540  while ((triggerClass = static_cast<TObjString*>(next()))) {
541  fHistTriggerClasses->Fill(triggerClass->GetString(), 1);
542  }
543  delete triggerClasses;
544  triggerClasses = 0;
545 
546  return kTRUE;
547 }
548 
568 void AliAnalysisTaskEmcal::UserExec(Option_t *option)
569 {
570  if (!fInitialized)
571  ExecOnce();
572 
573  if (!fInitialized)
574  return;
575 
576  if (!RetrieveEventObjects())
577  return;
578 
579  if(InputEvent()->GetRunNumber() != fRunNumber){
580  fRunNumber = InputEvent()->GetRunNumber();
581  RunChanged();
582  }
583 
584  if (IsEventSelected()) {
585  if (fGeneralHistograms) fHistEventCount->Fill("Accepted",1);
586  }
587  else {
588  if (fGeneralHistograms) fHistEventCount->Fill("Rejected",1);
589  return;
590  }
591 
593  if (!FillGeneralHistograms())
594  return;
595  }
596 
597  if (!Run())
598  return;
599 
600  if (fCreateHisto) {
601  if (!FillHistograms())
602  return;
603  }
604 
605  if (fCreateHisto && fOutput) {
606  // information for this iteration of the UserExec in the container
607  PostData(1, fOutput);
608  }
609 }
610 
619 Bool_t AliAnalysisTaskEmcal::AcceptCluster(AliVCluster *clus, Int_t c) const
620 {
621  AliWarning("AliAnalysisTaskEmcal::AcceptCluster method is deprecated. Please use GetCusterContainer(c)->AcceptCluster(clus).");
622 
623  if (!clus) return kFALSE;
624 
626  if (!cont) {
627  AliError(Form("%s:Container %d not found",GetName(),c));
628  return 0;
629  }
630  UInt_t rejectionReason = 0;
631  return cont->AcceptCluster(clus, rejectionReason);
632 }
633 
642 Bool_t AliAnalysisTaskEmcal::AcceptTrack(AliVParticle *track, Int_t c) const
643 {
644  AliWarning("AliAnalysisTaskEmcal::AcceptTrack method is deprecated. Please use GetParticleContainer(c)->AcceptParticle(clus).");
645 
646  if (!track) return kFALSE;
647 
649  if (!cont) {
650  AliError(Form("%s:Container %d not found",GetName(),c));
651  return 0;
652  }
653 
654  UInt_t rejectionReason = 0;
655  return cont->AcceptParticle(track, rejectionReason);
656 }
657 
669 Bool_t AliAnalysisTaskEmcal::PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard)
670 {
671 
672  TString file(currFile);
673  fXsec = 0;
674  fTrials = 1;
675 
676  if (file.Contains(".zip#")) {
677  Ssiz_t pos1 = file.Index("root_archive",12,0,TString::kExact);
678  Ssiz_t pos = file.Index("#",1,pos1,TString::kExact);
679  Ssiz_t pos2 = file.Index(".root",5,TString::kExact);
680  file.Replace(pos+1,pos2-pos1,"");
681  } else {
682  // not an archive take the basename....
683  file.ReplaceAll(gSystem->BaseName(file.Data()),"");
684  }
685  AliDebug(1,Form("File name: %s",file.Data()));
686 
687  // Get the pt hard bin
688  TString strPthard(file);
689 
690  strPthard.Remove(strPthard.Last('/'));
691  strPthard.Remove(strPthard.Last('/'));
692  if (strPthard.Contains("AOD")) strPthard.Remove(strPthard.Last('/'));
693  strPthard.Remove(0,strPthard.Last('/')+1);
694  if (strPthard.IsDec())
695  pthard = strPthard.Atoi();
696  else
697  AliWarning(Form("Could not extract file number from path %s", strPthard.Data()));
698 
699  // problem that we cannot really test the existance of a file in a archive so we have to live with open error message from root
700  TFile *fxsec = TFile::Open(Form("%s%s",file.Data(),"pyxsec.root"));
701 
702  if (!fxsec) {
703  // next trial fetch the histgram file
704  fxsec = TFile::Open(Form("%s%s",file.Data(),"pyxsec_hists.root"));
705  if (!fxsec) {
706  // not a severe condition but inciate that we have no information
707  return kFALSE;
708  } else {
709  // find the tlist we want to be independtent of the name so use the Tkey
710  TKey* key = (TKey*)fxsec->GetListOfKeys()->At(0);
711  if (!key) {
712  fxsec->Close();
713  return kFALSE;
714  }
715  TList *list = dynamic_cast<TList*>(key->ReadObj());
716  if (!list) {
717  fxsec->Close();
718  return kFALSE;
719  }
720  fXsec = ((TProfile*)list->FindObject("h1Xsec"))->GetBinContent(1);
721  fTrials = ((TH1F*)list->FindObject("h1Trials"))->GetBinContent(1);
722  fxsec->Close();
723  }
724  } else { // no tree pyxsec.root
725  TTree *xtree = (TTree*)fxsec->Get("Xsection");
726  if (!xtree) {
727  fxsec->Close();
728  return kFALSE;
729  }
730  UInt_t ntrials = 0;
731  Double_t xsection = 0;
732  xtree->SetBranchAddress("xsection",&xsection);
733  xtree->SetBranchAddress("ntrials",&ntrials);
734  xtree->GetEntry(0);
735  fTrials = ntrials;
736  fXsec = xsection;
737  fxsec->Close();
738  }
739  return kTRUE;
740 }
741 
756 {
758  return kTRUE;
759 
760  TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree();
761  if (!tree) {
762  AliError(Form("%s - UserNotify: No current tree!",GetName()));
763  return kFALSE;
764  }
765 
766  Float_t xsection = 0;
767  Float_t trials = 0;
768  Int_t pthardbin = 0;
769 
770  TFile *curfile = tree->GetCurrentFile();
771  if (!curfile) {
772  AliError(Form("%s - UserNotify: No current file!",GetName()));
773  return kFALSE;
774  }
775 
776  TChain *chain = dynamic_cast<TChain*>(tree);
777  if (chain) tree = chain->GetTree();
778 
779  Int_t nevents = tree->GetEntriesFast();
780 
781  PythiaInfoFromFile(curfile->GetName(), xsection, trials, pthardbin);
782 
783  // TODO: Workaround
784  if ((pthardbin < 0) || (pthardbin > 10)) pthardbin = 0;
785 
786  fHistTrials->Fill(pthardbin, trials);
787  fHistXsection->Fill(pthardbin, xsection);
788  fHistEvents->Fill(pthardbin, nevents);
789 
790  return kTRUE;
791 }
792 
798 {
799  if (!fPythiaInfoName.IsNull() && !fPythiaInfo) {
800  fPythiaInfo = dynamic_cast<AliEmcalPythiaInfo*>(event->FindListObject(fPythiaInfoName));
801  if (!fPythiaInfo) {
802  AliError(Form("%s: Could not retrieve parton infos! %s!", GetName(), fPythiaInfoName.Data()));
803  return;
804  }
805  }
806 }
807 
819 {
820  if (!InputEvent()) {
821  AliError(Form("%s: Could not retrieve event! Returning!", GetName()));
822  return;
823  }
824 
825  LoadPythiaInfo(InputEvent());
826 
827  if (fIsPythia) {
828  if (MCEvent()) {
829  fPythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(MCEvent()->GenEventHeader());
830  if (!fPythiaHeader) {
831  // Check if AOD
832  AliAODMCHeader* aodMCH = dynamic_cast<AliAODMCHeader*>(InputEvent()->FindListObject(AliAODMCHeader::StdBranchName()));
833 
834  if (aodMCH) {
835  for (UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) {
836  fPythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(aodMCH->GetCocktailHeader(i));
837  if (fPythiaHeader) break;
838  }
839  }
840  }
841  }
842  }
843 
844  if (fNeedEmcalGeom) {
845  fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->GetRunNumber());
846  if (!fGeom) {
847  AliFatal(Form("%s: Can not get EMCal geometry instance. If you do not need the EMCal geometry, disable it by setting task->SetNeedEmcalGeometry(kFALSE).", GetName()));
848  return;
849  }
850  }
851 
852  if (fEventPlaneVsEmcal >= 0) {
853  if (fGeom) {
854  Double_t ep = (fGeom->GetArm1PhiMax() + fGeom->GetArm1PhiMin()) / 2 * TMath::DegToRad() + fEventPlaneVsEmcal - TMath::Pi();
855  fMinEventPlane = ep - TMath::Pi() / 4;
856  fMaxEventPlane = ep + TMath::Pi() / 4;
857  }
858  else {
859  AliWarning("Could not set event plane limits because EMCal geometry was not loaded!");
860  }
861  }
862 
863  //Load all requested track branches - each container knows name already
864  for (Int_t i =0; i<fParticleCollArray.GetEntriesFast(); i++) {
865  AliParticleContainer *cont = static_cast<AliParticleContainer*>(fParticleCollArray.At(i));
866  cont->SetArray(InputEvent());
867  }
868 
869  if (fParticleCollArray.GetEntriesFast()>0) {
871  if (!fTracks) {
872  AliError(Form("%s: Could not retrieve first track branch!", GetName()));
873  return;
874  }
875  }
876 
877  //Load all requested cluster branches - each container knows name already
878  for (Int_t i =0; i<fClusterCollArray.GetEntriesFast(); i++) {
879  AliClusterContainer *cont = static_cast<AliClusterContainer*>(fClusterCollArray.At(i));
880  cont->SetArray(InputEvent());
881  }
882 
883  if (fClusterCollArray.GetEntriesFast()>0) {
885  if (!fCaloClusters) {
886  AliError(Form("%s: Could not retrieve first cluster branch!", GetName()));
887  return;
888  }
889  }
890 
891  if (!fCaloCellsName.IsNull() && !fCaloCells) {
892  fCaloCells = dynamic_cast<AliVCaloCells*>(InputEvent()->FindListObject(fCaloCellsName));
893  if (!fCaloCells) {
894  AliError(Form("%s: Could not retrieve cells %s!", GetName(), fCaloCellsName.Data()));
895  return;
896  }
897  }
898 
899  if (!fCaloTriggersName.IsNull() && !fCaloTriggers) {
900  fCaloTriggers = dynamic_cast<AliVCaloTrigger*>(InputEvent()->FindListObject(fCaloTriggersName));
901  if (!fCaloTriggers) {
902  AliError(Form("%s: Could not retrieve calo triggers %s!", GetName(), fCaloTriggersName.Data()));
903  return;
904  }
905  }
906 
907  if (!fCaloTriggerPatchInfoName.IsNull() && !fTriggerPatchInfo) {
908  fTriggerPatchInfo = GetArrayFromEvent(fCaloTriggerPatchInfoName.Data(),"AliEMCALTriggerPatchInfo");
909  if (!fTriggerPatchInfo) {
910  AliError(Form("%s: Could not retrieve calo trigger patch info %s!", GetName(), fCaloTriggerPatchInfoName.Data()));
911  return;
912  }
913 
914  }
915 
916  fInitialized = kTRUE;
917 }
918 
925 {
926 
927  if (fForceBeamType != kNA)
928  return fForceBeamType;
929 
930  AliESDEvent *esd = dynamic_cast<AliESDEvent*>(InputEvent());
931  if (esd) {
932  const AliESDRun *run = esd->GetESDRun();
933  TString beamType = run->GetBeamType();
934  if (beamType == "p-p")
935  return kpp;
936  else if (beamType == "A-A")
937  return kAA;
938  else if (beamType == "p-A")
939  return kpA;
940  else
941  return kNA;
942  } else {
943  Int_t runNumber = InputEvent()->GetRunNumber();
944  if ((runNumber >= 136851 && runNumber <= 139517) || // LHC10h
945  (runNumber >= 166529 && runNumber <= 170593)) { // LHC11h
946  return kAA;
947  } else if ((runNumber>=188365 && runNumber <= 188366) || // LHC12g
948  (runNumber >= 195344 && runNumber <= 196608)) { // LHC13b-f
949  return kpA;
950  } else {
951  return kpp;
952  }
953  }
954 }
955 
963 {
964  if (!fTriggerPatchInfo)
965  return 0;
966 
967  //number of patches in event
968  Int_t nPatch = fTriggerPatchInfo->GetEntries();
969 
970  //loop over patches to define trigger type of event
971  Int_t nG1 = 0;
972  Int_t nG2 = 0;
973  Int_t nJ1 = 0;
974  Int_t nJ2 = 0;
975  Int_t nL0 = 0;
976  AliEMCALTriggerPatchInfo *patch;
977  for (Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
978  patch = (AliEMCALTriggerPatchInfo*)fTriggerPatchInfo->At( iPatch );
979  if (patch->IsGammaHigh()) nG1++;
980  if (patch->IsGammaLow()) nG2++;
981  if (patch->IsJetHigh()) nJ1++;
982  if (patch->IsJetLow()) nJ2++;
983  if (patch->IsLevel0()) nL0++;
984  }
985 
986  AliDebug(2, "Patch summary: ");
987  AliDebug(2, Form("Number of patches: %d", nPatch));
988  AliDebug(2, Form("Jet: low[%d], high[%d]" ,nJ2, nJ1));
989  AliDebug(2, Form("Gamma: low[%d], high[%d]" ,nG2, nG1));
990 
991  ULong_t triggers(0);
992  if (nL0>0) SETBIT(triggers, kL0);
993  if (nG1>0) SETBIT(triggers, kG1);
994  if (nG2>0) SETBIT(triggers, kG2);
995  if (nJ1>0) SETBIT(triggers, kJ1);
996  if (nJ2>0) SETBIT(triggers, kJ2);
997  return triggers;
998 }
999 
1007 {
1008  //
1009  if(trigger==kND) {
1010  AliWarning(Form("%s: Requesting undefined trigger type!", GetName()));
1011  return kFALSE;
1012  }
1013  //MV: removing this logic which as far as I can see doesn't make any sense
1014  // if(trigger & kND){
1015  // return fTriggers == 0;
1016  // }
1017  return TESTBIT(fTriggers, trigger);
1018 }
1019 
1042 {
1043  if (fOffTrigger != AliVEvent::kAny) {
1044  UInt_t res = 0;
1045  const AliESDEvent *eev = dynamic_cast<const AliESDEvent*>(InputEvent());
1046  if (eev) {
1047  res = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
1048  } else {
1049  const AliAODEvent *aev = dynamic_cast<const AliAODEvent*>(InputEvent());
1050  if (aev) {
1051  res = ((AliVAODHeader*)aev->GetHeader())->GetOfflineTrigger();
1052  }
1053  }
1054  if ((res & fOffTrigger) == 0) {
1055  if (fGeneralHistograms) fHistEventRejection->Fill("PhysSel",1);
1056  return kFALSE;
1057  }
1058  }
1059 
1060  if (!fTrigClass.IsNull()) {
1061  TString fired;
1062  const AliESDEvent *eev = dynamic_cast<const AliESDEvent*>(InputEvent());
1063  if (eev) {
1064  fired = eev->GetFiredTriggerClasses();
1065  } else {
1066  const AliAODEvent *aev = dynamic_cast<const AliAODEvent*>(InputEvent());
1067  if (aev) {
1068  fired = aev->GetFiredTriggerClasses();
1069  }
1070  }
1071  if (!fired.Contains("-B-")) {
1072  if (fGeneralHistograms) fHistEventRejection->Fill("trigger",1);
1073  return kFALSE;
1074  }
1075 
1076  TObjArray *arr = fTrigClass.Tokenize("|");
1077  if (!arr) {
1078  if (fGeneralHistograms) fHistEventRejection->Fill("trigger",1);
1079  return kFALSE;
1080  }
1081  Bool_t match = 0;
1082  for (Int_t i=0;i<arr->GetEntriesFast();++i) {
1083  TObject *obj = arr->At(i);
1084  if (!obj)
1085  continue;
1086 
1087  //Check if requested trigger was fired
1088  TString objStr = obj->GetName();
1090  (objStr.Contains("J1") || objStr.Contains("J2") || objStr.Contains("G1") || objStr.Contains("G2"))) {
1091  // This is relevant for EMCal triggers with 2 thresholds
1092  // If the kOverlapWithLowThreshold was requested than the overlap between the two triggers goes with the lower threshold trigger
1093  TString trigType1 = "J1";
1094  TString trigType2 = "J2";
1095  if(objStr.Contains("G")) {
1096  trigType1 = "G1";
1097  trigType2 = "G2";
1098  }
1099  if(objStr.Contains(trigType2) && fired.Contains(trigType2.Data())) { //requesting low threshold + overlap
1100  match = 1;
1101  break;
1102  }
1103  else if(objStr.Contains(trigType1) && fired.Contains(trigType1.Data()) && !fired.Contains(trigType2.Data())) { //high threshold only
1104  match = 1;
1105  break;
1106  }
1107  }
1108  else {
1109  // If this is not an EMCal trigger, or no particular treatment of EMCal triggers was requested,
1110  // simply check that the trigger was fired
1111  if (fired.Contains(obj->GetName())) {
1112  match = 1;
1113  break;
1114  }
1115  }
1116  }
1117  delete arr;
1118  if (!match) {
1119  if (fGeneralHistograms) fHistEventRejection->Fill("trigger",1);
1120  return kFALSE;
1121  }
1122  }
1123 
1124  if (fTriggerTypeSel != kND) {
1126  if (fGeneralHistograms) fHistEventRejection->Fill("trigTypeSel",1);
1127  return kFALSE;
1128  }
1129  }
1130 
1131  if ((fMinCent != -999) && (fMaxCent != -999)) {
1132  if (fCent<fMinCent || fCent>fMaxCent) {
1133  if (fGeneralHistograms) fHistEventRejection->Fill("Cent",1);
1134  return kFALSE;
1135  }
1136  }
1137 
1138  if (fUseAliAnaUtils) {
1139  if (!fAliAnalysisUtils)
1140  fAliAnalysisUtils = new AliAnalysisUtils();
1141  fAliAnalysisUtils->SetMinVtxContr(2);
1142  fAliAnalysisUtils->SetMaxVtxZ(999);
1143  if(fMinVz<-998.) fMinVz = -10.;
1144  if(fMaxVz>998.) fMaxVz = 10.;
1145 
1146  if (!fAliAnalysisUtils->IsVertexSelected2013pA(InputEvent())) {
1147  if (fGeneralHistograms) fHistEventRejection->Fill("VtxSel2013pA",1);
1148  return kFALSE;
1149  }
1150 
1151  if (fRejectPileup && fAliAnalysisUtils->IsPileUpEvent(InputEvent())) {
1152  if (fGeneralHistograms) fHistEventRejection->Fill("PileUp",1);
1153  return kFALSE;
1154  }
1155 
1156  if(fTklVsClusSPDCut && fAliAnalysisUtils->IsSPDClusterVsTrackletBG(InputEvent())) {
1157  if (fGeneralHistograms) fHistEventRejection->Fill("Bkg evt",1);
1158  return kFALSE;
1159  }
1160  }
1161 
1162  if ((fMinVz > -998.) && (fMaxVz < 998.)) {
1163  if (fNVertCont == 0 ) {
1164  if (fGeneralHistograms) fHistEventRejection->Fill("vertex contr.",1);
1165  return kFALSE;
1166  }
1167  Double_t vz = fVertex[2];
1168  if (vz < fMinVz || vz > fMaxVz) {
1169  if (fGeneralHistograms) fHistEventRejection->Fill("Vz",1);
1170  return kFALSE;
1171  }
1172 
1173  if (fNVertSPDCont > 0 && fZvertexDiff < 999) {
1174  Double_t vzSPD = fVertexSPD[2];
1175  Double_t dvertex = TMath::Abs(vz-vzSPD);
1176  //if difference larger than fZvertexDiff
1177  if (dvertex > fZvertexDiff) {
1178  if (fGeneralHistograms) fHistEventRejection->Fill("VzSPD",1);
1179  return kFALSE;
1180  }
1181  }
1182  }
1183 
1184  if (fMinPtTrackInEmcal > 0 && fGeom) {
1185  Bool_t trackInEmcalOk = kFALSE;
1186  Int_t ntracks = GetNParticles(0);
1187  for (Int_t i = 0; i < ntracks; i++) {
1188  AliVParticle *track = GetAcceptParticleFromArray(i,0);
1189  if (!track)
1190  continue;
1191 
1192  Double_t phiMin = fGeom->GetArm1PhiMin() * TMath::DegToRad();
1193  Double_t phiMax = fGeom->GetArm1PhiMax() * TMath::DegToRad();
1194  Int_t runNumber = InputEvent()->GetRunNumber();
1195  if (runNumber>=177295 && runNumber<=197470) { //small SM masked in 2012 and 2013
1196  phiMin = 1.4;
1197  phiMax = TMath::Pi();
1198  }
1199 
1200  if (track->Eta() < fGeom->GetArm1EtaMin() || track->Eta() > fGeom->GetArm1EtaMax() || track->Phi() < phiMin || track->Phi() > phiMax)
1201  continue;
1202  if (track->Pt() > fMinPtTrackInEmcal) {
1203  trackInEmcalOk = kTRUE;
1204  break;
1205  }
1206  }
1207  if (!trackInEmcalOk) {
1208  if (fGeneralHistograms) fHistEventRejection->Fill("trackInEmcal",1);
1209  return kFALSE;
1210  }
1211  }
1212 
1213  if (fMinNTrack > 0) {
1214  Int_t nTracksAcc = 0;
1215  Int_t ntracks = GetNParticles(0);
1216  for (Int_t i = 0; i < ntracks; i++) {
1217  AliVParticle *track = GetAcceptParticleFromArray(i,0);
1218  if (!track)
1219  continue;
1220  if (track->Pt() > fTrackPtCut) {
1221  nTracksAcc++;
1222  if (nTracksAcc>=fMinNTrack)
1223  break;
1224  }
1225  }
1226  if (nTracksAcc<fMinNTrack) {
1227  if (fGeneralHistograms) fHistEventRejection->Fill("minNTrack",1);
1228  return kFALSE;
1229  }
1230  }
1231 
1232  if (!(fEPV0 > fMinEventPlane && fEPV0 <= fMaxEventPlane) &&
1233  !(fEPV0 + TMath::Pi() > fMinEventPlane && fEPV0 + TMath::Pi() <= fMaxEventPlane) &&
1234  !(fEPV0 - TMath::Pi() > fMinEventPlane && fEPV0 - TMath::Pi() <= fMaxEventPlane))
1235  {
1236  if (fGeneralHistograms) fHistEventRejection->Fill("EvtPlane",1);
1237  return kFALSE;
1238  }
1239 
1240  if (fSelectPtHardBin != -999 && fSelectPtHardBin != fPtHardBin) {
1241  if (fGeneralHistograms) fHistEventRejection->Fill("SelPtHardBin",1);
1242  return kFALSE;
1243  }
1244 
1245  // Reject filter for MC data
1246  if (!CheckMCOutliers()) return kFALSE;
1247 
1248  return kTRUE;
1249 }
1250 
1257 {
1258  if (!fPythiaHeader || !fMCRejectFilter) return kTRUE;
1259 
1260  // Condition 1: Pythia jet / pT-hard > factor
1261  if (fPtHardAndJetPtFactor > 0.) {
1262  AliTLorentzVector jet;
1263 
1264  Int_t nTriggerJets = fPythiaHeader->NTriggerJets();
1265 
1266  AliDebug(1,Form("Njets: %d, pT Hard %f",nTriggerJets, fPtHard));
1267 
1268  Float_t tmpjet[]={0,0,0,0};
1269  for (Int_t ijet = 0; ijet< nTriggerJets; ijet++) {
1270  fPythiaHeader->TriggerJet(ijet, tmpjet);
1271 
1272  jet.SetPxPyPzE(tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3]);
1273 
1274  AliDebug(1,Form("jet %d; pycell jet pT %f",ijet, jet.Pt()));
1275 
1276  //Compare jet pT and pt Hard
1277  if (jet.Pt() > fPtHardAndJetPtFactor * fPtHard) {
1278  AliInfo(Form("Reject jet event with : pT Hard %2.2f, pycell jet pT %2.2f, rejection factor %1.1f\n", fPtHard, jet.Pt(), fPtHardAndJetPtFactor));
1279  return kFALSE;
1280  }
1281  }
1282  }
1283  // end condition 1
1284 
1285  // Condition 2 : Reconstructed EMCal cluster pT / pT-hard > factor
1286  if (fPtHardAndClusterPtFactor > 0.) {
1287  AliClusterContainer* mccluscont = GetClusterContainer(0);
1288  if ((Bool_t)mccluscont) {
1289  for (auto cluster : mccluscont->all()) {// Not cuts applied ; use accept for cuts
1290  Float_t ecluster = cluster->E();
1291 
1292  if (ecluster > (fPtHardAndClusterPtFactor * fPtHard)) {
1293  AliInfo(Form("Reject : ecluster %2.2f, calo %d, factor %2.2f, ptHard %f",ecluster,cluster->GetType(),fPtHardAndClusterPtFactor,fPtHard));
1294  return kFALSE;
1295  }
1296  }
1297  }
1298  }
1299  // end condition 2
1300 
1301  // condition 3 : Reconstructed track pT / pT-hard >factor
1302  if (fPtHardAndTrackPtFactor > 0.) {
1303  AliMCParticleContainer* mcpartcont = dynamic_cast<AliMCParticleContainer*>(GetParticleContainer(0));
1304  if ((Bool_t)mcpartcont) {
1305  for (auto mctrack : mcpartcont->all()) {// Not cuts applied ; use accept for cuts
1306  Float_t trackpt = mctrack->Pt();
1307  if (trackpt > (fPtHardAndTrackPtFactor * fPtHard) ) {
1308  AliInfo(Form("Reject : track %2.2f, factor %2.2f, ptHard %f", trackpt, fPtHardAndTrackPtFactor, fPtHard));
1309  return kFALSE;
1310  }
1311  }
1312  }
1313  }
1314  // end condition 3
1315 
1316  return kTRUE;
1317 }
1318 
1327 TClonesArray *AliAnalysisTaskEmcal::GetArrayFromEvent(const char *name, const char *clname)
1328 {
1329  TClonesArray *arr = 0;
1330  TString sname(name);
1331  if (!sname.IsNull()) {
1332  arr = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(sname));
1333  if (!arr) {
1334  AliWarning(Form("%s: Could not retrieve array with name %s!", GetName(), name));
1335  return 0;
1336  }
1337  } else {
1338  return 0;
1339  }
1340 
1341  if (!clname)
1342  return arr;
1343 
1344  TString objname(arr->GetClass()->GetName());
1345  TClass cls(objname);
1346  if (!cls.InheritsFrom(clname)) {
1347  AliWarning(Form("%s: Objects of type %s in %s are not inherited from %s!",
1348  GetName(), cls.GetName(), name, clname));
1349  return 0;
1350  }
1351  return arr;
1352 }
1353 
1359 {
1360  fVertex[0] = 0;
1361  fVertex[1] = 0;
1362  fVertex[2] = 0;
1363  fNVertCont = 0;
1364 
1365  fVertexSPD[0] = 0;
1366  fVertexSPD[1] = 0;
1367  fVertexSPD[2] = 0;
1368  fNVertSPDCont = 0;
1369 
1370  if (fGeneratePythiaInfoObject && MCEvent()) {
1371  GeneratePythiaInfoObject(MCEvent());
1372  }
1373 
1374  const AliVVertex *vert = InputEvent()->GetPrimaryVertex();
1375  if (vert) {
1376  vert->GetXYZ(fVertex);
1377  fNVertCont = vert->GetNContributors();
1378  }
1379 
1380  const AliVVertex *vertSPD = InputEvent()->GetPrimaryVertexSPD();
1381  if (vertSPD) {
1382  vertSPD->GetXYZ(fVertexSPD);
1383  fNVertSPDCont = vertSPD->GetNContributors();
1384  }
1385 
1386  fBeamType = GetBeamType();
1387 
1388  if (fBeamType == kAA || fBeamType == kpA ) {
1390  AliMultSelection *MultSelection = static_cast<AliMultSelection*>(InputEvent()->FindListObject("MultSelection"));
1391  if (MultSelection) {
1392  fCent = MultSelection->GetMultiplicityPercentile(fCentEst.Data());
1393  }
1394  else {
1395  AliWarning(Form("%s: Could not retrieve centrality information! Assuming 99", GetName()));
1396  }
1397  }
1398  else { // old centrality estimation < 2015
1399  AliCentrality *aliCent = InputEvent()->GetCentrality();
1400  if (aliCent) {
1401  fCent = aliCent->GetCentralityPercentile(fCentEst.Data());
1402  }
1403  else {
1404  AliWarning(Form("%s: Could not retrieve centrality information! Assuming 99", GetName()));
1405  }
1406  }
1407 
1408  if (fNcentBins==4) {
1409  if (fCent >= 0 && fCent < 10) fCentBin = 0;
1410  else if (fCent >= 10 && fCent < 30) fCentBin = 1;
1411  else if (fCent >= 30 && fCent < 50) fCentBin = 2;
1412  else if (fCent >= 50 && fCent <= 100) fCentBin = 3;
1413  else {
1414  AliWarning(Form("%s: Negative centrality: %f. Assuming 99", GetName(), fCent));
1415  fCentBin = fNcentBins-1;
1416  }
1417  }
1418  else if (fNcentBins==5) { // for PbPb 2015
1419  if (fCent >= 0 && fCent < 10) fCentBin = 0;
1420  else if (fCent >= 10 && fCent < 30) fCentBin = 1;
1421  else if (fCent >= 30 && fCent < 50) fCentBin = 2;
1422  else if (fCent >= 50 && fCent <= 90) fCentBin = 3;
1423  else if (fCent > 90) {
1424  fCent = 99;
1425  fCentBin = 4;
1426  }
1427  else {
1428  AliWarning(Form("%s: Negative centrality: %f. Assuming 99", GetName(), fCent));
1429  fCentBin = fNcentBins-1;
1430  }
1431  }
1432  else {
1433  Double_t centWidth = (fMaxCent-fMinCent)/(Double_t)fNcentBins;
1434  if(centWidth>0.) {
1435  fCentBin = TMath::FloorNint(fCent/centWidth);
1436  }
1437  else {
1438  fCentBin = 0;
1439  }
1440  if (fCentBin>=fNcentBins) {
1441  AliWarning(Form("%s: fCentBin too large: cent = %f fCentBin = %d. Assuming 99", GetName(),fCent,fCentBin));
1442  fCentBin = fNcentBins-1;
1443  }
1444  }
1445 
1446  AliEventplane *aliEP = InputEvent()->GetEventplane();
1447  if (aliEP) {
1448  fEPV0 = aliEP->GetEventplane("V0" ,InputEvent());
1449  fEPV0A = aliEP->GetEventplane("V0A",InputEvent());
1450  fEPV0C = aliEP->GetEventplane("V0C",InputEvent());
1451  } else {
1452  AliWarning(Form("%s: Could not retrieve event plane information!", GetName()));
1453  }
1454  }
1455  else {
1456  fCent = 99;
1457  fCentBin = 0;
1458  }
1459 
1460  if (fPythiaHeader) {
1461  fPtHard = fPythiaHeader->GetPtHard();
1462 
1463  const Int_t ptHardLo[11] = { 0, 5,11,21,36,57, 84,117,152,191,234};
1464  const Int_t ptHardHi[11] = { 5,11,21,36,57,84,117,152,191,234,1000000};
1465  for (fPtHardBin = 0; fPtHardBin < 11; fPtHardBin++) {
1466  if (fPtHard >= ptHardLo[fPtHardBin] && fPtHard < ptHardHi[fPtHardBin])
1467  break;
1468  }
1469 
1470  fXsection = fPythiaHeader->GetXsection();
1471  fNTrials = fPythiaHeader->Trials();
1472  }
1473 
1475 
1476  AliEmcalContainer* cont = 0;
1477 
1478  TIter nextPartColl(&fParticleCollArray);
1479  while ((cont = static_cast<AliEmcalContainer*>(nextPartColl()))) cont->NextEvent();
1480 
1481  TIter nextClusColl(&fClusterCollArray);
1482  while ((cont = static_cast<AliParticleContainer*>(nextClusColl()))) cont->NextEvent();
1483 
1484  return kTRUE;
1485 }
1486 
1495 {
1496  if (TString(n).IsNull()) return 0;
1497 
1499 
1500  fParticleCollArray.Add(cont);
1501 
1502  return cont;
1503 }
1504 
1513 {
1514  if (TString(n).IsNull()) return 0;
1515 
1516  AliTrackContainer* cont = new AliTrackContainer(n);
1517 
1518  fParticleCollArray.Add(cont);
1519 
1520  return cont;
1521 }
1522 
1531 {
1532  if (TString(n).IsNull()) return 0;
1533 
1535 
1536  fParticleCollArray.Add(cont);
1537 
1538  return cont;
1539 }
1540 
1549 {
1550  if (TString(n).IsNull()) return 0;
1551 
1553 
1554  fClusterCollArray.Add(cont);
1555 
1556  return cont;
1557 }
1558 
1565 {
1566  if (i<0 || i>fParticleCollArray.GetEntriesFast()) return 0;
1567  AliParticleContainer *cont = static_cast<AliParticleContainer*>(fParticleCollArray.At(i));
1568  return cont;
1569 }
1570 
1577 {
1578  if (i<0 || i>fClusterCollArray.GetEntriesFast()) return 0;
1579  AliClusterContainer *cont = static_cast<AliClusterContainer*>(fClusterCollArray.At(i));
1580  return cont;
1581 }
1582 
1589 {
1590  AliParticleContainer *cont = static_cast<AliParticleContainer*>(fParticleCollArray.FindObject(name));
1591  return cont;
1592 }
1593 
1600 {
1601  AliClusterContainer *cont = static_cast<AliClusterContainer*>(fClusterCollArray.FindObject(name));
1602  return cont;
1603 }
1604 
1610 TClonesArray* AliAnalysisTaskEmcal::GetParticleArray(Int_t i) const
1611 {
1613  if (!cont) {
1614  AliError(Form("%s: Particle container %d not found",GetName(),i));
1615  return 0;
1616  }
1617  TString contName = cont->GetArrayName();
1618  return cont->GetArray();
1619 }
1620 
1626 TClonesArray* AliAnalysisTaskEmcal::GetClusterArray(Int_t i) const
1627 {
1629  if (!cont) {
1630  AliError(Form("%s:Cluster container %d not found",GetName(),i));
1631  return 0;
1632  }
1633  return cont->GetArray();
1634 }
1635 
1643 AliVParticle* AliAnalysisTaskEmcal::GetAcceptParticleFromArray(Int_t p, Int_t c) const
1644 {
1645 
1647  if (!cont) {
1648  AliError(Form("%s: Particle container %d not found",GetName(),c));
1649  return 0;
1650  }
1651  AliVParticle *vp = cont->GetAcceptParticle(p);
1652 
1653  return vp;
1654 }
1655 
1663 AliVCluster* AliAnalysisTaskEmcal::GetAcceptClusterFromArray(Int_t cl, Int_t c) const
1664 {
1666  if (!cont) {
1667  AliError(Form("%s: Cluster container %d not found",GetName(),c));
1668  return 0;
1669  }
1670  AliVCluster *vc = cont->GetAcceptCluster(cl);
1671 
1672  return vc;
1673 }
1674 
1681 {
1683  if (!cont) {
1684  AliError(Form("%s: Particle container %d not found",GetName(),i));
1685  return 0;
1686  }
1687  return cont->GetNEntries();
1688 }
1689 
1697 {
1699  if (!cont) {
1700  AliError(Form("%s: Cluster container %d not found",GetName(),i));
1701  return 0;
1702  }
1703  return cont->GetNEntries();
1704 }
1705 
1717 AliEMCALTriggerPatchInfo* AliAnalysisTaskEmcal::GetMainTriggerPatch(TriggerCategory trigger, Bool_t doSimpleOffline)
1718 {
1719 
1720  if (!fTriggerPatchInfo) {
1721  AliError(Form("%s: fTriggerPatchInfo not available",GetName()));
1722  return 0;
1723  }
1724 
1725  //number of patches in event
1726  Int_t nPatch = fTriggerPatchInfo->GetEntries();
1727 
1728  //extract main trigger patch(es)
1729  AliEMCALTriggerPatchInfo *patch(NULL), *selected(NULL);
1730  for (Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
1731 
1732  patch = (AliEMCALTriggerPatchInfo*)fTriggerPatchInfo->At( iPatch );
1733  if (patch->IsMainTrigger()) {
1734  if(doSimpleOffline){
1735  if(patch->IsOfflineSimple()){
1736  switch(trigger){
1737  case kTriggerLevel0:
1738  // option not yet implemented in the trigger maker
1739  if(patch->IsLevel0()) selected = patch;
1740  break;
1741  case kTriggerLevel1Jet:
1742  if(patch->IsJetHighSimple() || patch->IsJetLowSimple()){
1743  if(!selected) selected = patch;
1744  else if(patch->GetADCOfflineAmp() > selected->GetADCOfflineAmp()) selected = patch;
1745  }
1746  break;
1747  case kTriggerLevel1Gamma:
1748  if(patch->IsGammaHighSimple() || patch->IsGammaLowSimple()){
1749  if(!selected) selected = patch;
1750  else if(patch->GetADCOfflineAmp() > selected->GetADCOfflineAmp()) selected = patch;
1751  }
1752  break;
1753  default: // Silence compiler warnings
1754  AliError("Untreated case: Main Patch is recalculated; should be in 'else' branch");
1755  };
1756  }
1757  } else { // Not OfflineSimple
1758  switch(trigger){
1759  case kTriggerLevel0:
1760  if(patch->IsLevel0()) selected = patch;
1761  break;
1762  case kTriggerLevel1Jet:
1763  if(patch->IsJetHigh() || patch->IsJetLow()){
1764  if(!selected) selected = patch;
1765  else if (patch->GetADCAmp() > selected->GetADCAmp())
1766  selected = patch;
1767  }
1768  break;
1769  case kTriggerLevel1Gamma:
1770  if(patch->IsGammaHigh() || patch->IsGammaLow()){
1771  if(!selected) selected = patch;
1772  else if (patch->GetADCAmp() > selected->GetADCAmp())
1773  selected = patch;
1774  }
1775  break;
1776  default:
1777  AliError("Untreated case: Main Patch is recalculated; should be in 'else' branch");
1778  };
1779  }
1780  }
1781  else if ((trigger == kTriggerRecalcJet && patch->IsRecalcJet()) ||
1782  (trigger == kTriggerRecalcGamma && patch->IsRecalcGamma())) { // recalculated patches
1783  if (doSimpleOffline && patch->IsOfflineSimple()) {
1784  if(!selected) selected = patch;
1785  else if (patch->GetADCOfflineAmp() > selected->GetADCOfflineAmp()) // this in fact should not be needed, but we have it in teh other branches as well, so keeping it for compleness
1786  selected = patch;
1787  }
1788  else if (!doSimpleOffline && !patch->IsOfflineSimple()) {
1789  if(!selected) selected = patch;
1790  else if (patch->GetADCAmp() > selected->GetADCAmp())
1791  selected = patch;
1792  }
1793  }
1794  }
1795  return selected;
1796 }
1797 
1803 void AliAnalysisTaskEmcal::AddObjectToEvent(TObject *obj, Bool_t attempt)
1804 {
1805  if (!(InputEvent()->FindListObject(obj->GetName()))) {
1806  InputEvent()->AddObject(obj);
1807  }
1808  else {
1809  if (!attempt) {
1810  AliFatal(Form("%s: Container with name %s already present. Aborting", GetName(), obj->GetName()));
1811  }
1812  }
1813 }
1814 
1822 Bool_t AliAnalysisTaskEmcal::IsTrackInEmcalAcceptance(AliVParticle* part, Double_t edges) const
1823 {
1824 
1825  if (!fGeom) {
1826  AliWarning(Form("%s - AliAnalysisTaskEmcal::IsTrackInEmcalAcceptance - Geometry is not available!", GetName()));
1827  return kFALSE;
1828  }
1829 
1830  Double_t minPhi = fGeom->GetArm1PhiMin() - edges;
1831  Double_t maxPhi = fGeom->GetArm1PhiMax() + edges;
1832 
1833  if (part->Phi() > minPhi && part->Phi() < maxPhi) {
1834  return kTRUE;
1835  }
1836  else {
1837  return kFALSE;
1838  }
1839 }
1840 
1842 {
1843  axis->SetBinLabel(1, "NullObject");
1844  axis->SetBinLabel(2, "Pt");
1845  axis->SetBinLabel(3, "Acceptance");
1846  axis->SetBinLabel(4, "MCLabel");
1847  axis->SetBinLabel(5, "BitMap");
1848  axis->SetBinLabel(6, "HF cut");
1849  axis->SetBinLabel(7, "Bit6");
1850  axis->SetBinLabel(8, "NotHybridTrack");
1851  axis->SetBinLabel(9, "MCFlag");
1852  axis->SetBinLabel(10, "MCGenerator");
1853  axis->SetBinLabel(11, "ChargeCut");
1854  axis->SetBinLabel(12, "MinDistanceTPCSectorEdge");
1855  axis->SetBinLabel(13, "Bit12");
1856  axis->SetBinLabel(14, "IsEMCal");
1857  axis->SetBinLabel(15, "Time");
1858  axis->SetBinLabel(16, "Energy");
1859  axis->SetBinLabel(17, "ExoticCut");
1860  axis->SetBinLabel(18, "Bit17");
1861  axis->SetBinLabel(19, "Area");
1862  axis->SetBinLabel(20, "AreaEmc");
1863  axis->SetBinLabel(21, "ZLeadingCh");
1864  axis->SetBinLabel(22, "ZLeadingEmc");
1865  axis->SetBinLabel(23, "NEF");
1866  axis->SetBinLabel(24, "MinLeadPt");
1867  axis->SetBinLabel(25, "MaxTrackPt");
1868  axis->SetBinLabel(26, "MaxClusterPt");
1869  axis->SetBinLabel(27, "Flavour");
1870  axis->SetBinLabel(28, "TagStatus");
1871  axis->SetBinLabel(29, "MinNConstituents");
1872  axis->SetBinLabel(30, "Bit29");
1873  axis->SetBinLabel(31, "Bit30");
1874  axis->SetBinLabel(32, "Bit31");
1875 }
1876 
1883 Double_t AliAnalysisTaskEmcal::GetParallelFraction(AliVParticle* part1, AliVParticle* part2)
1884 {
1885  TVector3 vect1(part1->Px(), part1->Py(), part1->Pz());
1886  TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1887  Double_t z = (vect1 * vect2) / (vect2 * vect2);
1888  return z;
1889 }
1890 
1897 Double_t AliAnalysisTaskEmcal::GetParallelFraction(const TVector3& vect1, AliVParticle* part2)
1898 {
1899  TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1900  Double_t z = (vect1 * vect2) / (vect2 * vect2);
1901  return z;
1902 }
1903 
1912 void AliAnalysisTaskEmcal::GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
1913 {
1914  phidiff = 999;
1915  etadiff = 999;
1916 
1917  if (!t||!v) return;
1918 
1919  Double_t veta = t->GetTrackEtaOnEMCal();
1920  Double_t vphi = t->GetTrackPhiOnEMCal();
1921 
1922  Float_t pos[3] = {0};
1923  v->GetPosition(pos);
1924  TVector3 cpos(pos);
1925  Double_t ceta = cpos.Eta();
1926  Double_t cphi = cpos.Phi();
1927  etadiff=veta-ceta;
1928  phidiff=TVector2::Phi_mpi_pi(vphi-cphi);
1929 }
1930 
1936 Byte_t AliAnalysisTaskEmcal::GetTrackType(const AliVTrack *t)
1937 {
1938  Byte_t ret = 0;
1939  if (t->TestBit(BIT(22)) && !t->TestBit(BIT(23)))
1940  ret = 1;
1941  else if (!t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1942  ret = 2;
1943  else if (t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1944  ret = 3;
1945  return ret;
1946 }
1947 
1957 Byte_t AliAnalysisTaskEmcal::GetTrackType(const AliAODTrack *aodTrack, UInt_t filterBit1, UInt_t filterBit2)
1958 {
1959 
1960  Int_t res = 0;
1961 
1962  if (aodTrack->TestFilterBit(filterBit1)) {
1963  res = 0;
1964  }
1965  else if (aodTrack->TestFilterBit(filterBit2)) {
1966  if ((aodTrack->GetStatus()&AliVTrack::kITSrefit)!=0) {
1967  res = 1;
1968  }
1969  else {
1970  res = 2;
1971  }
1972  }
1973  else {
1974  res = 3;
1975  }
1976 
1977  return res;
1978 }
1979 
1985 {
1986  if (!fPythiaInfo) {
1988  }
1989 
1990  AliStack* stack = mcEvent->Stack();
1991 
1992  const Int_t nprim = stack->GetNprimary();
1993  // reject if partons are missing from stack for some reason
1994  if (nprim < 8) return;
1995 
1996  TParticle *part6 = stack->Particle(6);
1997  TParticle *part7 = stack->Particle(7);
1998 
1999  fPythiaInfo->SetPartonFlag6(TMath::Abs(part6->GetPdgCode()));
2000  fPythiaInfo->SetParton6(part6->Pt(), part6->Eta(), part6->Phi(), part6->GetMass());
2001 
2002  fPythiaInfo->SetPartonFlag7(TMath::Abs(part7->GetPdgCode()));
2003  fPythiaInfo->SetParton7(part7->Pt(), part7->Eta(), part7->Phi(), part7->GetMass());
2004 
2005  AliGenPythiaEventHeader *pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(mcEvent->GenEventHeader());
2006  if(pythiaGenHeader){
2007  Float_t ptWeight=pythiaGenHeader->EventWeight();
2008  fPythiaInfo->SetPythiaEventWeight(ptWeight);}
2009 
2010 
2011 }
Bool_t fGeneratePythiaInfoObject
Generate Pythia info object.
TObjArray fClusterCollArray
cluster collection array
Int_t fNVertSPDCont
!event SPD vertex number of contributors
void SetParticlePtCut(Double_t cut)
Bool_t fIsPythia
trigger, if it is a PYTHIA production
void SetParton7(Float_t pt, Float_t eta, Float_t phi, Float_t mass=0)
TH1 * fHistTrials
!trials from pyxsec.root
EMCAL Level1 gamma trigger, low threshold.
AliEmcalPythiaInfo * fPythiaInfo
!event parton info
Bool_t AcceptTrack(AliVParticle *track, Int_t c=0) const
EMCAL Level1 jet trigger, low threshold.
Bool_t HasTriggerType(TriggerType triggersel)
Int_t fNTrials
!event trials
UInt_t fOffTrigger
offline trigger for event selection
Double_t fVertexSPD[3]
!event Svertex
Double_t fMinCent
min centrality for event selection
Double_t fTrackPtCut
cut on track pt in event selection
Recalculated jet trigger patch; does not need to be above trigger threshold.
Base task in the EMCAL framework.
Bool_t fUsePtHardBinScaling
Use pt hard bin scaling in merging.
void SetPartonFlag7(Int_t flag7)
Container with name, TClonesArray and cuts for particles.
TSystem * gSystem
Double_t fPtHard
!event pt hard
void SetTrackPtCut(Double_t cut, Int_t c=0)
static void GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
Double_t fMinBinPt
min pt in histograms
Double_t fEPV0
!event plane V0
TList * list
Bool_t fGeneralHistograms
whether or not it should fill some general histograms
Bool_t AcceptCluster(AliVCluster *clus, Int_t c=0) const
Int_t fCentBin
!event centrality bin
TH1 * fHistEventsAfterSel
!total number of events per pt hard bin after selection
const AliMCParticleIterableContainer all() const
Float_t fPtHardAndClusterPtFactor
Factor between ptHard and cluster pT to reject/accept event.
Double_t fMinPtTrackInEmcal
min pt track in emcal
TH1 * fHistEventPlane
!event plane distribution
TH1 * fHistEvents
!total number of events per pt hard bin
void SetClusPtCut(Double_t cut, Int_t c=0)
AliClusterContainer * AddClusterContainer(const char *n)
Double_t fEPV0C
!event plane V0C
void SetParton6(Float_t pt, Float_t eta, Float_t phi, Float_t mass=0)
TH1 * fHistCentrality
!event centrality distribution
Container for particles within the EMCAL framework.
TObjArray fParticleCollArray
particle/track collection array
BeamType
Switch for the beam type.
void SetTrackEtaLimits(Double_t min, Double_t max, Int_t c=0)
AliParticleContainer * GetParticleContainer(Int_t i=0) const
TProfile * fHistXsectionAfterSel
!x section from pythia header
TriggerType
Switch for EMCAL trigger types.
EMCalTriggerMode_t fEMCalTriggerMode
EMCal trigger selection mode.
virtual Bool_t FillHistograms()
Int_t GetNParticles(Int_t i=0) const
TClonesArray * fCaloClusters
!clusters
Bool_t fUseNewCentralityEstimation
Use new centrality estimation (for 2015 data)
Bool_t IsTrackInEmcalAcceptance(AliVParticle *part, Double_t edges=0.9) const
TH1 * fHistTriggerClasses
!number of events in each trigger class
Double_t fMaxVz
max vertex for event selection
void GeneratePythiaInfoObject(AliMCEvent *mcEvent)
AliEMCALGeometry * fGeom
!emcal geometry
The overlap between low and high threshold trigger is assigned to the lower threshold only...
kRecalculated gamma trigger patch; does not need to be above trigger threshold
TString fCaloTriggerPatchInfoName
trigger patch info array name
TString fCaloTriggersName
name of calo triggers collection
AliGenPythiaEventHeader * fPythiaHeader
!event Pythia header
void SetTrackPhiLimits(Double_t min, Double_t max, Int_t c=0)
AliParticleContainer * AddParticleContainer(const char *n)
AliAnalysisUtils * fAliAnalysisUtils
!vertex selection (optional)
BeamType fForceBeamType
forced beam type
void SetUseScaling(Bool_t val)
Definition: AliEmcalList.h:29
Int_t fNcentBins
how many centrality bins
AliClusterContainer * GetClusterContainer(Int_t i=0) const
TriggerType fTriggerTypeSel
trigger type to select based on trigger patches
virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const
virtual Bool_t FillGeneralHistograms()
TString fTrigClass
trigger class name for event selection
Float_t fPtHardAndJetPtFactor
Factor between ptHard and jet pT to reject/accept event.
AliVCluster * GetAcceptCluster(Int_t i) const
TClonesArray * GetParticleArray(Int_t i=0) const
Double_t fMinVz
min vertex for event selection
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
BeamType fBeamType
!event beam type
Float_t fPtHardAndTrackPtFactor
Factor between ptHard and track pT to reject/accept event.
Double_t fCent
!event centrality
Double_t fMinEventPlane
minimum event plane value
TString fCaloCellsName
name of calo cell collection
Int_t GetNClusters(Int_t i=0) const
Int_t fNVertCont
!event vertex number of contributors
Bool_t fMCRejectFilter
enable the filtering of events by tail rejection
Double_t fZvertexDiff
upper limit for distance between primary and SPD vertex
virtual Bool_t AcceptParticle(const AliVParticle *vp, UInt_t &rejectionReason) const
EMCAL Level0 trigger.
EMCAL Level1 jet trigger, high threshold.
Int_t fSelectPtHardBin
select one pt hard bin for analysis
AliMCParticleContainer * AddMCParticleContainer(const char *n)
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
virtual Bool_t RetrieveEventObjects()
Bool_t fRejectPileup
Reject pilup using function AliAnalysisUtils::IsPileUpEvent()
TProfile * fHistXsection
!x section from pyxsec.root
Bool_t PythiaInfoFromFile(const char *currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard)
void UserExec(Option_t *option)
void SetPartonFlag6(Int_t flag6)
AliVCaloCells * fCaloCells
!cells
TClonesArray * GetArrayFromEvent(const char *name, const char *clname=0)
Enhanced TList-derived class that implements correct merging for pt_hard binned production.
Definition: AliEmcalList.h:23
Double_t fEventPlaneVsEmcal
select events which have a certain event plane wrt the emcal
virtual Bool_t IsEventSelected()
TH1 * fHistPtHard
!pt hard distribution
void SetParticleEtaLimits(Double_t min, Double_t max)
AliEmcalList * fOutput
!output list
Double_t fMaxBinPt
max pt in histograms
Int_t fPtHardBin
!event pt hard bin
TClonesArray * fTracks
!tracks
TH1 * fHistTrialsAfterSel
!total number of trials per pt hard bin after selection
void LoadPythiaInfo(AliVEvent *event)
Bool_t fIsEsd
!whether it's an ESD analysis
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
Double_t fVertex[3]
!event vertex
AliTrackContainer * AddTrackContainer(const char *n)
Bool_t fCreateHisto
whether or not create histograms
Store some informaion about a Pythia eventThis class is used to store some information about a Pythia...
TFile * file
TH1 * fHistEventRejection
!book keep reasons for rejecting event
Int_t nevents[nsamples]
TClonesArray * fTriggerPatchInfo
!trigger patch info array
TClonesArray * GetClusterArray(Int_t i=0) const
Double_t fEPV0A
!event plane V0A
TString fCentEst
name of V0 centrality estimator
TString fPythiaInfoName
name of pythia info object
Int_t GetRunNumber(TString)
Definition: PlotMuonQA.C:2235
Declaration of class AliEmcalPythiaInfo.
void SetClusPtCut(Double_t cut)
Int_t fRunNumber
!run number (triggering RunChanged()
EMCAL Level1 gamma trigger, high threshold.
void AddObjectToEvent(TObject *obj, Bool_t attempt=kFALSE)
AliVCaloTrigger * fCaloTriggers
!calo triggers
void SetRejectionReasonLabels(TAxis *axis)
TH1 * fHistZVertex
!z vertex position
Int_t fMinNTrack
minimum nr of tracks in event with pT>fTrackPtCut
static Byte_t GetTrackType(const AliVTrack *t)
Bool_t fUseAliAnaUtils
used for LHC13* data: z-vtx, Ncontributors, z-vtx resolution cuts
void SetClusTimeCut(Double_t min, Double_t max, Int_t c=0)
ULong_t fTriggers
list of fired triggers
Double_t fMaxEventPlane
maximum event plane value
void SetPythiaEventWeight(Float_t ptWeight)
Float_t fXsection
!x-section from pythia header
Bool_t fInitialized
whether or not the task has been already initialized
TH1 * fHistEventCount
!incoming and selected events
Double_t fMaxCent
max centrality for event selection
void SetClusTimeCut(Double_t min, Double_t max)
TriggerCategory
Online trigger categories.
void SetParticlePhiLimits(Double_t min, Double_t max)
AliVParticle * GetAcceptParticleFromArray(Int_t p, Int_t c=0) const
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
AliVCluster * GetAcceptClusterFromArray(Int_t cl, Int_t c=0) const
Int_t fNbins
no. of pt bins
Bool_t fTklVsClusSPDCut
Apply tracklet-vs-cluster SPD cut to reject background events in pp.
AliEMCALTriggerPatchInfo * GetMainTriggerPatch(TriggerCategory triggersel=kTriggerLevel1Jet, Bool_t doOfflinSimple=kFALSE)
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal