AliPhysics  d2a0c2d (d2a0c2d)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalLight.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 #include <RVersion.h>
16 #include <TClonesArray.h>
17 #include <TList.h>
18 #include <TObject.h>
19 #include <TH1F.h>
20 #include <TProfile.h>
21 #include <TSystem.h>
22 #include <TFile.h>
23 #include <TChain.h>
24 #include <TKey.h>
25 
26 #include "AliStack.h"
27 #include "AliAODEvent.h"
28 #include "AliAnalysisManager.h"
29 #include "AliCentrality.h"
30 #include "AliEMCALGeometry.h"
31 #include "AliESDEvent.h"
32 #include "AliEmcalParticle.h"
33 #include "AliEventplane.h"
34 #include "AliInputEventHandler.h"
35 #include "AliLog.h"
36 #include "AliMCParticle.h"
37 #include "AliVCluster.h"
38 #include "AliVEventHandler.h"
39 #include "AliVParticle.h"
40 #include "AliAODTrack.h"
41 #include "AliVCaloTrigger.h"
42 #include "AliGenPythiaEventHeader.h"
43 #include "AliAODMCHeader.h"
44 #include "AliMCEvent.h"
45 #include "AliEMCALTriggerPatchInfo.h"
46 
47 #include "AliMultSelection.h"
48 
50 
52 
56 
62  fForceBeamType(kNA),
63  fGeneralHistograms(kFALSE),
64  fCreateHisto(kTRUE),
65  fNeedEmcalGeom(kTRUE),
66  fNcentBins(4),
67  fUseNewCentralityEstimation(kFALSE),
68  fIsPythia(kFALSE),
69  fCaloCellsName(),
70  fCaloTriggersName(),
71  fCaloTriggerPatchInfoName(),
72  fCentEst("V0M"),
73  fParticleCollArray(),
74  fClusterCollArray(),
75  fTriggerSelectionBitMap(0),
76  fMinCent(-999),
77  fMaxCent(-999),
78  fMinVz(-999),
79  fMaxVz(999),
80  fZvertexDiff(0.5),
81  fMinPtTrack(0),
82  fMinNTrack(0),
83  fMinPtTrackInEmcal(0),
84  fSelectPtHardBin(-999),
85  fAcceptedTriggerClasses(),
86  fRejectedTriggerClasses(),
87  fMCRejectFilter(kFALSE),
88  fPtHardAndJetPtFactor(0.),
89  fPtHardAndClusterPtFactor(0.),
90  fPtHardAndTrackPtFactor(0.),
91  fLocalInitialized(kFALSE),
92  fDataType(kAOD),
93  fGeom(0),
94  fCaloCells(0),
95  fCaloTriggers(0),
96  fTriggerPatchInfo(0),
97  fCent(0),
98  fCentBin(-1),
99  fEPV0(-1.0),
100  fEPV0A(-1.0),
101  fEPV0C(-1.0),
102  fNVertCont(0),
103  fNVertSPDCont(0),
104  fFiredTriggerBitMap(0),
105  fFiredTriggerClasses(),
106  fBeamType(kNA),
107  fPythiaHeader(0),
108  fPtHard(0),
109  fPtHardBin(0),
110  fNTrials(0),
111  fXsection(0),
112  fOutput(0),
113  fHistEventCount(0),
114  fHistTrialsVsPtHard(0),
115  fHistEventsVsPtHard(0),
116  fHistXsectionVsPtHard(0),
117  fHistTrials(0),
118  fHistEvents(0),
119  fHistXsection(0),
120  fHistCentrality(0),
121  fHistZVertex(0),
122  fHistEventPlane(0),
123  fHistEventRejection(0),
124  fHistTriggerClasses(0)
125 {
126  fVertex[0] = 0;
127  fVertex[1] = 0;
128  fVertex[2] = 0;
129  fVertexSPD[0] = 0;
130  fVertexSPD[1] = 0;
131  fVertexSPD[2] = 0;
132 
133  fParticleCollArray.SetOwner(kTRUE);
134  fClusterCollArray.SetOwner(kTRUE);
135 }
136 
148  AliAnalysisTaskSE(name),
149  fForceBeamType(kNA),
150  fGeneralHistograms(kFALSE),
151  fCreateHisto(kTRUE),
152  fNeedEmcalGeom(kTRUE),
153  fNcentBins(4),
154  fUseNewCentralityEstimation(kFALSE),
155  fIsPythia(kFALSE),
156  fCaloCellsName(),
157  fCaloTriggersName(),
158  fCaloTriggerPatchInfoName(),
159  fCentEst("V0M"),
160  fParticleCollArray(),
161  fClusterCollArray(),
162  fTriggerSelectionBitMap(0),
163  fMinCent(-999),
164  fMaxCent(-999),
165  fMinVz(-999),
166  fMaxVz(999),
167  fZvertexDiff(0.5),
168  fMinPtTrack(0),
169  fMinNTrack(0),
170  fMinPtTrackInEmcal(0),
171  fSelectPtHardBin(-999),
172  fAcceptedTriggerClasses(),
173  fRejectedTriggerClasses(),
174  fMCRejectFilter(kFALSE),
175  fPtHardAndJetPtFactor(0.),
176  fPtHardAndClusterPtFactor(0.),
177  fPtHardAndTrackPtFactor(0.),
178  fLocalInitialized(kFALSE),
179  fDataType(kAOD),
180  fGeom(0),
181  fCaloCells(0),
182  fCaloTriggers(0),
183  fTriggerPatchInfo(0),
184  fCent(0),
185  fCentBin(-1),
186  fEPV0(-1.0),
187  fEPV0A(-1.0),
188  fEPV0C(-1.0),
189  fNVertCont(0),
190  fNVertSPDCont(0),
191  fFiredTriggerBitMap(0),
192  fFiredTriggerClasses(),
193  fBeamType(kNA),
194  fPythiaHeader(0),
195  fPtHard(0),
196  fPtHardBin(0),
197  fNTrials(0),
198  fXsection(0),
199  fOutput(0),
200  fHistEventCount(0),
201  fHistTrialsVsPtHard(0),
202  fHistEventsVsPtHard(0),
203  fHistXsectionVsPtHard(0),
204  fHistTrials(0),
205  fHistEvents(0),
206  fHistXsection(0),
207  fHistCentrality(0),
208  fHistZVertex(0),
209  fHistEventPlane(0),
210  fHistEventRejection(0),
211  fHistTriggerClasses(0)
212 {
213  fVertex[0] = 0;
214  fVertex[1] = 0;
215  fVertex[2] = 0;
216  fVertexSPD[0] = 0;
217  fVertexSPD[1] = 0;
218  fVertexSPD[2] = 0;
219  fParticleCollArray.SetOwner(kTRUE);
220  fClusterCollArray.SetOwner(kTRUE);
221 
222  if (fCreateHisto) {
223  DefineOutput(1, TList::Class());
224  }
225 }
226 
231 {
232 }
233 
254 {
255  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
256  if (mgr) {
257  AliVEventHandler *evhand = mgr->GetInputEventHandler();
258  if (evhand) {
259  if (evhand->InheritsFrom("AliESDInputHandler")) {
260  fDataType = kESD;
261  }
262  else {
263  fDataType = kAOD;
264  }
265  }
266  else {
267  AliError("Event handler not found!");
268  }
269  }
270  else {
271  AliError("Analysis manager not found!");
272  }
273 
274  if (!fCreateHisto)
275  return;
276 
277  OpenFile(1);
278  fOutput = new TList();
279  fOutput->SetOwner();
280 
281  if (fForceBeamType == kpp)
282  fNcentBins = 1;
283 
284  if (!fGeneralHistograms)
285  return;
286 
287  if (fIsPythia) {
288  fHistEventsVsPtHard = new TH1F("fHistEventsVsPtHard", "fHistEventsVsPtHard", 1000, 0, 1000);
289  fHistEventsVsPtHard->GetXaxis()->SetTitle("#it{p}_{T,hard} (GeV/#it{c})");
290  fHistEventsVsPtHard->GetYaxis()->SetTitle("events");
292 
293  fHistTrialsVsPtHard = new TH1F("fHistTrialsVsPtHard", "fHistTrialsVsPtHard", 1000, 0, 1000);
294  fHistTrialsVsPtHard->GetXaxis()->SetTitle("#it{p}_{T,hard} (GeV/#it{c})");
295  fHistTrialsVsPtHard->GetYaxis()->SetTitle("trials");
297 
298  fHistXsectionVsPtHard = new TProfile("fHistXsectionVsPtHard", "fHistXsectionVsPtHard", 1000, 0, 1000);
299  fHistXsectionVsPtHard->GetXaxis()->SetTitle("#it{p}_{T,hard} (GeV/#it{c})");
300  fHistXsectionVsPtHard->GetYaxis()->SetTitle("xsection");
302 
303  fHistTrials = new TH1F("fHistTrials", "fHistTrials", 50, 0, 50);
304  fHistTrials->GetXaxis()->SetTitle("#it{p}_{T,hard} bin");
305  fHistTrials->GetYaxis()->SetTitle("trials");
306  fOutput->Add(fHistTrials);
307 
308  fHistEvents = new TH1F("fHistEvents", "fHistEvents", 50, 0, 50);
309  fHistEvents->GetXaxis()->SetTitle("#it{p}_{T,hard} bin");
310  fHistEvents->GetYaxis()->SetTitle("total events");
311  fOutput->Add(fHistEvents);
312 
313  fHistXsection = new TProfile("fHistXsection", "fHistXsection", 50, 0, 50);
314  fHistXsection->GetXaxis()->SetTitle("#it{p}_{T,hard} bin");
315  fHistXsection->GetYaxis()->SetTitle("xsection");
316  fOutput->Add(fHistXsection);
317  }
318 
319  fHistZVertex = new TH1F("fHistZVertex","Z vertex position", 60, -30, 30);
320  fHistZVertex->GetXaxis()->SetTitle("V_{#it{z}}");
321  fHistZVertex->GetYaxis()->SetTitle("counts");
322  fOutput->Add(fHistZVertex);
323 
324  if (fForceBeamType != kpp) {
325  fHistCentrality = new TH1F("fHistCentrality","Event centrality distribution", 101, 0, 101);
326  fHistCentrality->GetXaxis()->SetTitle("Centrality (%)");
327  fHistCentrality->GetYaxis()->SetTitle("counts");
328  fOutput->Add(fHistCentrality);
329 
330  fHistEventPlane = new TH1F("fHistEventPlane","Event plane", 120, -TMath::Pi(), TMath::Pi());
331  fHistEventPlane->GetXaxis()->SetTitle("event plane");
332  fHistEventPlane->GetYaxis()->SetTitle("counts");
333  fOutput->Add(fHistEventPlane);
334  }
335 
336  fHistEventRejection = new TH1F("fHistEventRejection","Reasons to reject event",20,0,20);
337 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2)
338  fHistEventRejection->SetBit(TH1::kCanRebin);
339 #else
340  fHistEventRejection->SetCanExtend(TH1::kAllAxes);
341 #endif
342  fHistEventRejection->GetXaxis()->SetBinLabel(1,"PhysSel");
343  fHistEventRejection->GetXaxis()->SetBinLabel(2,"trigger");
344  fHistEventRejection->GetXaxis()->SetBinLabel(3,"trigTypeSel");
345  fHistEventRejection->GetXaxis()->SetBinLabel(4,"Cent");
346  fHistEventRejection->GetXaxis()->SetBinLabel(5,"vertex contr.");
347  fHistEventRejection->GetXaxis()->SetBinLabel(6,"Vz");
348  fHistEventRejection->GetXaxis()->SetBinLabel(7,"VzSPD");
349  fHistEventRejection->GetXaxis()->SetBinLabel(8,"trackInEmcal");
350  fHistEventRejection->GetXaxis()->SetBinLabel(9,"minNTrack");
351  fHistEventRejection->GetXaxis()->SetBinLabel(10,"VtxSel2013pA");
352  fHistEventRejection->GetXaxis()->SetBinLabel(11,"PileUp");
353  fHistEventRejection->GetXaxis()->SetBinLabel(12,"EvtPlane");
354  fHistEventRejection->GetXaxis()->SetBinLabel(13,"SelPtHardBin");
355  fHistEventRejection->GetXaxis()->SetBinLabel(14,"Bkg evt");
356  fHistEventRejection->GetYaxis()->SetTitle("counts");
358 
359  fHistTriggerClasses = new TH1F("fHistTriggerClasses","fHistTriggerClasses",3,0,3);
360 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2)
361  fHistTriggerClasses->SetBit(TH1::kCanRebin);
362 #else
363  fHistTriggerClasses->SetCanExtend(TH1::kAllAxes);
364 #endif
366 
367  fHistEventCount = new TH1F("fHistEventCount","fHistEventCount",2,0,2);
368  fHistEventCount->GetXaxis()->SetBinLabel(1,"Accepted");
369  fHistEventCount->GetXaxis()->SetBinLabel(2,"Rejected");
370  fHistEventCount->GetYaxis()->SetTitle("counts");
371  fOutput->Add(fHistEventCount);
372 
373  PostData(1, fOutput);
374 }
375 
390 {
391  if (fIsPythia) {
392  fHistEventsVsPtHard->Fill(fPtHard, 1);
395  }
396 
397  fHistZVertex->Fill(fVertex[2]);
398 
399  if (fForceBeamType != kpp) {
400  fHistCentrality->Fill(fCent);
401  fHistEventPlane->Fill(fEPV0);
402  }
403 
404  TObjArray* triggerClasses = InputEvent()->GetFiredTriggerClasses().Tokenize(" ");
405  TIter next(triggerClasses);
406  TObjString* triggerClass = 0;
407  while ((triggerClass = static_cast<TObjString*>(next()))) {
408  fHistTriggerClasses->Fill(triggerClass->GetString(), 1);
409  }
410  delete triggerClasses;
411  triggerClasses = 0;
412 
413  return kTRUE;
414 }
415 
436 {
437  if (!fLocalInitialized)
438  ExecOnce();
439 
440  if (!fLocalInitialized)
441  return;
442 
443  if (!RetrieveEventObjects())
444  return;
445 
446  if (IsEventSelected()) {
447  if (fGeneralHistograms) fHistEventCount->Fill("Accepted",1);
448  }
449  else {
450  if (fGeneralHistograms) fHistEventCount->Fill("Rejected",1);
451  return;
452  }
453 
455  if (!FillGeneralHistograms())
456  return;
457  }
458 
459  if (!Run())
460  return;
461 
462  if (fCreateHisto) {
463  if (!FillHistograms())
464  return;
465  }
466 
467  if (fCreateHisto && fOutput) {
468  // information for this iteration of the UserExec in the container
469  PostData(1, fOutput);
470  }
471 }
472 
484 Bool_t AliAnalysisTaskEmcalLight::PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard)
485 {
486 
487  TString file(currFile);
488  fXsec = 0;
489  fTrials = 1;
490 
491  if (file.Contains(".zip#")) {
492  Ssiz_t pos1 = file.Index("root_archive",12,0,TString::kExact);
493  Ssiz_t pos = file.Index("#",1,pos1,TString::kExact);
494  Ssiz_t pos2 = file.Index(".root",5,TString::kExact);
495  file.Replace(pos+1,pos2-pos1,"");
496  } else {
497  // not an archive take the basename....
498  file.ReplaceAll(gSystem->BaseName(file.Data()),"");
499  }
500  AliDebug(1,Form("File name: %s",file.Data()));
501 
502  // Get the pt hard bin
503  TString strPthard(file);
504 
505  strPthard.Remove(strPthard.Last('/'));
506  strPthard.Remove(strPthard.Last('/'));
507  if (strPthard.Contains("AOD")) strPthard.Remove(strPthard.Last('/'));
508  strPthard.Remove(0,strPthard.Last('/')+1);
509  if (strPthard.IsDec())
510  pthard = strPthard.Atoi();
511  else
512  AliWarning(Form("Could not extract file number from path %s", strPthard.Data()));
513 
514  // 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
515  TFile *fxsec = TFile::Open(Form("%s%s",file.Data(),"pyxsec.root"));
516 
517  if (!fxsec) {
518  // next trial fetch the histgram file
519  fxsec = TFile::Open(Form("%s%s",file.Data(),"pyxsec_hists.root"));
520  if (!fxsec) {
521  // not a severe condition but inciate that we have no information
522  return kFALSE;
523  } else {
524  // find the tlist we want to be independtent of the name so use the Tkey
525  TKey* key = (TKey*)fxsec->GetListOfKeys()->At(0);
526  if (!key) {
527  fxsec->Close();
528  return kFALSE;
529  }
530  TList *list = dynamic_cast<TList*>(key->ReadObj());
531  if (!list) {
532  fxsec->Close();
533  return kFALSE;
534  }
535  fXsec = ((TProfile*)list->FindObject("h1Xsec"))->GetBinContent(1);
536  fTrials = ((TH1F*)list->FindObject("h1Trials"))->GetBinContent(1);
537  fxsec->Close();
538  }
539  } else { // no tree pyxsec.root
540  TTree *xtree = (TTree*)fxsec->Get("Xsection");
541  if (!xtree) {
542  fxsec->Close();
543  return kFALSE;
544  }
545  UInt_t ntrials = 0;
546  Double_t xsection = 0;
547  xtree->SetBranchAddress("xsection",&xsection);
548  xtree->SetBranchAddress("ntrials",&ntrials);
549  xtree->GetEntry(0);
550  fTrials = ntrials;
551  fXsec = xsection;
552  fxsec->Close();
553  }
554  return kTRUE;
555 }
556 
571 {
573  return kTRUE;
574 
575  TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree();
576  if (!tree) {
577  AliError(Form("%s - UserNotify: No current tree!",GetName()));
578  return kFALSE;
579  }
580 
581  Float_t xsection = 0;
582  Float_t trials = 0;
583  Int_t pthardbin = 0;
584 
585  TFile *curfile = tree->GetCurrentFile();
586  if (!curfile) {
587  AliError(Form("%s - UserNotify: No current file!",GetName()));
588  return kFALSE;
589  }
590 
591  TChain *chain = dynamic_cast<TChain*>(tree);
592  if (chain) tree = chain->GetTree();
593 
594  Int_t nevents = tree->GetEntriesFast();
595 
596  Bool_t res = PythiaInfoFromFile(curfile->GetName(), xsection, trials, pthardbin);
597 
598  if (!res) return kTRUE;
599 
600  fHistTrials->Fill(pthardbin, trials);
601  fHistXsection->Fill(pthardbin, xsection);
602  fHistEvents->Fill(pthardbin, nevents);
603 
604  return kTRUE;
605 }
606 
618 {
619  if (!InputEvent()) {
620  AliError(Form("%s: Could not retrieve event! Returning!", GetName()));
621  return;
622  }
623 
624  if (fNeedEmcalGeom) {
625  fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->GetRunNumber());
626  if (!fGeom) {
627  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()));
628  return;
629  }
630  }
631 
632  //Load all requested track branches - each container knows name already
633  for (Int_t i =0; i<fParticleCollArray.GetEntriesFast(); i++) {
634  AliParticleContainer *cont = static_cast<AliParticleContainer*>(fParticleCollArray.At(i));
635  cont->SetArray(InputEvent());
636  }
637 
638  //Load all requested cluster branches - each container knows name already
639  for (Int_t i =0; i<fClusterCollArray.GetEntriesFast(); i++) {
640  AliClusterContainer *cont = static_cast<AliClusterContainer*>(fClusterCollArray.At(i));
641  cont->SetArray(InputEvent());
642  }
643 
644  if (!fCaloCellsName.IsNull() && !fCaloCells) {
645  fCaloCells = dynamic_cast<AliVCaloCells*>(InputEvent()->FindListObject(fCaloCellsName));
646  if (!fCaloCells) {
647  AliError(Form("%s: Could not retrieve cells %s!", GetName(), fCaloCellsName.Data()));
648  return;
649  }
650  }
651 
652  if (!fCaloTriggersName.IsNull() && !fCaloTriggers) {
653  fCaloTriggers = dynamic_cast<AliVCaloTrigger*>(InputEvent()->FindListObject(fCaloTriggersName));
654  if (!fCaloTriggers) {
655  AliError(Form("%s: Could not retrieve calo triggers %s!", GetName(), fCaloTriggersName.Data()));
656  return;
657  }
658  }
659 
660  if (!fCaloTriggerPatchInfoName.IsNull() && !fTriggerPatchInfo) {
661  fTriggerPatchInfo = GetArrayFromEvent(fCaloTriggerPatchInfoName.Data(),"AliEMCALTriggerPatchInfo");
662  if (!fTriggerPatchInfo) {
663  AliError(Form("%s: Could not retrieve calo trigger patch info %s!", GetName(), fCaloTriggerPatchInfoName.Data()));
664  return;
665  }
666 
667  }
668 
669  fLocalInitialized = kTRUE;
670 }
671 
678 {
679  if (fForceBeamType != kNA)
680  return fForceBeamType;
681 
682  AliESDEvent *esd = dynamic_cast<AliESDEvent*>(InputEvent());
683  if (esd) {
684  const AliESDRun *run = esd->GetESDRun();
685  TString beamType = run->GetBeamType();
686  if (beamType == "p-p")
687  return kpp;
688  else if (beamType == "A-A")
689  return kAA;
690  else if (beamType == "p-A")
691  return kpA;
692  else
693  return kNA;
694  } else {
695  Int_t runNumber = InputEvent()->GetRunNumber();
696  if ((runNumber >= 136851 && runNumber <= 139517) || // LHC10h
697  (runNumber >= 166529 && runNumber <= 170593)) { // LHC11h
698  return kAA;
699  } else if ((runNumber>=188365 && runNumber <= 188366) || // LHC12g
700  (runNumber >= 195344 && runNumber <= 196608)) { // LHC13b-f
701  return kpA;
702  } else {
703  return kpp;
704  }
705  }
706 }
707 
730 {
732  if (fGeneralHistograms) fHistEventRejection->Fill("PhysSel",1);
733  return kFALSE;
734  }
735 
736  Bool_t acceptedTrgClassFound = kFALSE;
737  if (fAcceptedTriggerClasses.GetEntriesFast() > 0) {
738  TIter acceptedTrigger(&fAcceptedTriggerClasses);
739  TObject* obj = 0;
740  while ((obj = acceptedTrigger())) {
741  if (fFiredTriggerClasses.Contains(obj->GetName())) {
742  acceptedTrgClassFound = kTRUE;
743  break;
744  }
745  }
746 
747  if (!acceptedTrgClassFound) {
748  if (fGeneralHistograms) fHistEventRejection->Fill("Trg class (acc)",1);
749  return kFALSE;
750  }
751  }
752 
753  if (fRejectedTriggerClasses.GetEntriesFast() > 0) {
754  TIter rejectedTrigger(&fRejectedTriggerClasses);
755  TObject* obj = 0;
756  while ((obj = rejectedTrigger())) {
757  if (fFiredTriggerClasses.Contains(obj->GetName())) {
758  if (fGeneralHistograms) fHistEventRejection->Fill("Trg class (rej)",1);
759  return kFALSE;
760  }
761  }
762  }
763 
764  if ((fMinCent != -999) && (fMaxCent != -999)) {
765  if (fCent < fMinCent || fCent > fMaxCent) {
766  if (fGeneralHistograms) fHistEventRejection->Fill("Cent",1);
767  return kFALSE;
768  }
769  }
770 
771  if ((fMinVz > -998.) && (fMaxVz < 998.)) {
772  if (fNVertCont == 0 ) {
773  if (fGeneralHistograms) fHistEventRejection->Fill("vertex contr.",1);
774  return kFALSE;
775  }
776  Double_t vz = fVertex[2];
777  if (vz < fMinVz || vz > fMaxVz) {
778  if (fGeneralHistograms) fHistEventRejection->Fill("Vz",1);
779  return kFALSE;
780  }
781 
782  if (fNVertSPDCont > 0 && fZvertexDiff < 999) {
783  Double_t vzSPD = fVertexSPD[2];
784  Double_t dvertex = TMath::Abs(vz-vzSPD);
785  //if difference larger than fZvertexDiff
786  if (dvertex > fZvertexDiff) {
787  if (fGeneralHistograms) fHistEventRejection->Fill("VzSPD",1);
788  return kFALSE;
789  }
790  }
791  }
792 
793  if (fMinPtTrackInEmcal > 0 && fGeom && GetParticleContainer(0)) {
794  Bool_t trackInEmcalOk = kFALSE;
795  Int_t ntracks = GetParticleContainer(0)->GetNParticles();
796  for (Int_t i = 0; i < ntracks; i++) {
797  AliVParticle *track = GetParticleContainer(0)->GetAcceptParticle(i);
798  if (!track)
799  continue;
800 
801  Double_t phiMin = fGeom->GetArm1PhiMin() * TMath::DegToRad();
802  Double_t phiMax = fGeom->GetArm1PhiMax() * TMath::DegToRad();
803  Int_t runNumber = InputEvent()->GetRunNumber();
804  if (runNumber>=177295 && runNumber<=197470) { //small SM masked in 2012 and 2013
805  phiMin = 1.4;
806  phiMax = TMath::Pi();
807  }
808 
809  if (track->Eta() < fGeom->GetArm1EtaMin() || track->Eta() > fGeom->GetArm1EtaMax() || track->Phi() < phiMin || track->Phi() > phiMax)
810  continue;
811  if (track->Pt() > fMinPtTrackInEmcal) {
812  trackInEmcalOk = kTRUE;
813  break;
814  }
815  }
816  if (!trackInEmcalOk) {
817  if (fGeneralHistograms) fHistEventRejection->Fill("trackInEmcal",1);
818  return kFALSE;
819  }
820  }
821 
822  if (fMinNTrack > 0) {
823  Int_t nTracksAcc = 0;
824  Int_t ntracks = GetParticleContainer(0)->GetNParticles();
825  for (Int_t i = 0; i < ntracks; i++) {
826  AliVParticle *track = GetParticleContainer(0)->GetAcceptParticle(i);
827  if (!track)
828  continue;
829  if (track->Pt() > fMinPtTrack) {
830  nTracksAcc++;
831  if (nTracksAcc >= fMinNTrack)
832  break;
833  }
834  }
835  if (nTracksAcc<fMinNTrack) {
836  if (fGeneralHistograms) fHistEventRejection->Fill("minNTrack",1);
837  return kFALSE;
838  }
839  }
840 
841  if (fSelectPtHardBin != -999 && fSelectPtHardBin != fPtHardBin) {
842  if (fGeneralHistograms) fHistEventRejection->Fill("SelPtHardBin",1);
843  return kFALSE;
844  }
845 
846  return kTRUE;
847 }
848 
857 TClonesArray *AliAnalysisTaskEmcalLight::GetArrayFromEvent(const char *name, const char *clname)
858 {
859  TClonesArray *arr = 0;
860  TString sname(name);
861  if (!sname.IsNull()) {
862  arr = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(sname));
863  if (!arr) {
864  AliWarning(Form("%s: Could not retrieve array with name %s!", GetName(), name));
865  return 0;
866  }
867  } else {
868  return 0;
869  }
870 
871  if (!clname)
872  return arr;
873 
874  TString objname(arr->GetClass()->GetName());
875  TClass cls(objname);
876  if (!cls.InheritsFrom(clname)) {
877  AliWarning(Form("%s: Objects of type %s in %s are not inherited from %s!",
878  GetName(), cls.GetName(), name, clname));
879  return 0;
880  }
881  return arr;
882 }
883 
889 {
890  fVertex[0] = 0;
891  fVertex[1] = 0;
892  fVertex[2] = 0;
893  fNVertCont = 0;
894 
895  fVertexSPD[0] = 0;
896  fVertexSPD[1] = 0;
897  fVertexSPD[2] = 0;
898  fNVertSPDCont = 0;
899 
900  fFiredTriggerClasses = InputEvent()->GetFiredTriggerClasses();
901 
902  if (fDataType == kESD) {
903  fFiredTriggerBitMap = static_cast<AliInputEventHandler*>(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler())->IsEventSelected();
904  }
905  else {
906  fFiredTriggerBitMap = static_cast<AliVAODHeader*>(InputEvent()->GetHeader())->GetOfflineTrigger();
907  }
908 
909  const AliVVertex *vert = InputEvent()->GetPrimaryVertex();
910  if (vert) {
911  vert->GetXYZ(fVertex);
912  fNVertCont = vert->GetNContributors();
913  }
914 
915  const AliVVertex *vertSPD = InputEvent()->GetPrimaryVertexSPD();
916  if (vertSPD) {
917  vertSPD->GetXYZ(fVertexSPD);
918  fNVertSPDCont = vertSPD->GetNContributors();
919  }
920 
922 
923  if (fBeamType == kAA || fBeamType == kpA ) {
925  AliMultSelection *MultSelection = static_cast<AliMultSelection*>(InputEvent()->FindListObject("MultSelection"));
926  if (MultSelection) {
927  fCent = MultSelection->GetMultiplicityPercentile(fCentEst.Data());
928  }
929  else {
930  AliWarning(Form("%s: Could not retrieve centrality information! Assuming 99", GetName()));
931  }
932  }
933  else { // old centrality estimation < 2015
934  AliCentrality *aliCent = InputEvent()->GetCentrality();
935  if (aliCent) {
936  fCent = aliCent->GetCentralityPercentile(fCentEst.Data());
937  }
938  else {
939  AliWarning(Form("%s: Could not retrieve centrality information! Assuming 99", GetName()));
940  }
941  }
942 
943  if (fNcentBins==4) {
944  if (fCent >= 0 && fCent < 10) fCentBin = 0;
945  else if (fCent >= 10 && fCent < 30) fCentBin = 1;
946  else if (fCent >= 30 && fCent < 50) fCentBin = 2;
947  else if (fCent >= 50 && fCent <= 100) fCentBin = 3;
948  else {
949  AliWarning(Form("%s: Negative centrality: %f. Assuming 99", GetName(), fCent));
950  fCentBin = fNcentBins-1;
951  }
952  }
953  else if (fNcentBins==5) { // for PbPb 2015
954  if (fCent >= 0 && fCent < 10) fCentBin = 0;
955  else if (fCent >= 10 && fCent < 30) fCentBin = 1;
956  else if (fCent >= 30 && fCent < 50) fCentBin = 2;
957  else if (fCent >= 50 && fCent <= 90) fCentBin = 3;
958  else if (fCent > 90) {
959  fCent = 99;
960  fCentBin = 4;
961  }
962  else {
963  AliWarning(Form("%s: Negative centrality: %f. Assuming 99", GetName(), fCent));
964  fCentBin = fNcentBins-1;
965  }
966  }
967  else {
969  if(centWidth>0.) {
970  fCentBin = TMath::FloorNint(fCent/centWidth);
971  }
972  else {
973  fCentBin = 0;
974  }
975  if (fCentBin>=fNcentBins) {
976  AliWarning(Form("%s: fCentBin too large: cent = %f fCentBin = %d. Assuming 99", GetName(),fCent,fCentBin));
977  fCentBin = fNcentBins-1;
978  }
979  }
980 
981  AliEventplane *aliEP = InputEvent()->GetEventplane();
982  if (aliEP) {
983  fEPV0 = aliEP->GetEventplane("V0" ,InputEvent());
984  fEPV0A = aliEP->GetEventplane("V0A",InputEvent());
985  fEPV0C = aliEP->GetEventplane("V0C",InputEvent());
986  } else {
987  AliWarning(Form("%s: Could not retrieve event plane information!", GetName()));
988  }
989  }
990  else {
991  fCent = 99;
992  fCentBin = 0;
993  }
994 
995  if (fIsPythia) {
996 
997  if (MCEvent()) {
998  fPythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(MCEvent()->GenEventHeader());
999  if (!fPythiaHeader) {
1000  // Check if AOD
1001  AliAODMCHeader* aodMCH = dynamic_cast<AliAODMCHeader*>(InputEvent()->FindListObject(AliAODMCHeader::StdBranchName()));
1002 
1003  if (aodMCH) {
1004  for (UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) {
1005  fPythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(aodMCH->GetCocktailHeader(i));
1006  if (fPythiaHeader) break;
1007  }
1008  }
1009  }
1010  }
1011 
1012  if (fPythiaHeader) {
1013  fPtHard = fPythiaHeader->GetPtHard();
1014 
1015  const Int_t ptHardLo[11] = { 0, 5,11,21,36,57, 84,117,152,191,234};
1016  const Int_t ptHardHi[11] = { 5,11,21,36,57,84,117,152,191,234,1000000};
1017  for (fPtHardBin = 0; fPtHardBin < 11; fPtHardBin++) {
1018  if (fPtHard >= ptHardLo[fPtHardBin] && fPtHard < ptHardHi[fPtHardBin])
1019  break;
1020  }
1021 
1022  fXsection = fPythiaHeader->GetXsection();
1023  fNTrials = fPythiaHeader->Trials();
1024  }
1025  }
1026 
1027  AliEmcalContainer* cont = 0;
1028 
1029  TIter nextPartColl(&fParticleCollArray);
1030  while ((cont = static_cast<AliEmcalContainer*>(nextPartColl()))) cont->NextEvent();
1031 
1032  TIter nextClusColl(&fClusterCollArray);
1033  while ((cont = static_cast<AliParticleContainer*>(nextClusColl()))) cont->NextEvent();
1034 
1035  return kTRUE;
1036 }
1037 
1046 {
1047  if (TString(n).IsNull()) return 0;
1048 
1050 
1051  fParticleCollArray.Add(cont);
1052 
1053  return cont;
1054 }
1055 
1064 {
1065  if (TString(n).IsNull()) return 0;
1066 
1067  AliTrackContainer* cont = new AliTrackContainer(n);
1068 
1069  fParticleCollArray.Add(cont);
1070 
1071  return cont;
1072 }
1073 
1082 {
1083  if (TString(n).IsNull()) return 0;
1084 
1086 
1087  fParticleCollArray.Add(cont);
1088 
1089  return cont;
1090 }
1091 
1100 {
1101  if (TString(n).IsNull()) return 0;
1102 
1104 
1105  fClusterCollArray.Add(cont);
1106 
1107  return cont;
1108 }
1109 
1116 {
1117  if (i<0 || i>fParticleCollArray.GetEntriesFast()) return 0;
1118  AliParticleContainer *cont = static_cast<AliParticleContainer*>(fParticleCollArray.At(i));
1119  return cont;
1120 }
1121 
1128 {
1129  if (i<0 || i>fClusterCollArray.GetEntriesFast()) return 0;
1130  AliClusterContainer *cont = static_cast<AliClusterContainer*>(fClusterCollArray.At(i));
1131  return cont;
1132 }
1133 
1140 {
1141  AliParticleContainer *cont = static_cast<AliParticleContainer*>(fParticleCollArray.FindObject(name));
1142  return cont;
1143 }
1144 
1151 {
1152  AliClusterContainer *cont = static_cast<AliClusterContainer*>(fClusterCollArray.FindObject(name));
1153  return cont;
1154 }
1155 
1162 {
1163  if (!(InputEvent()->FindListObject(obj->GetName()))) {
1164  InputEvent()->AddObject(obj);
1165  }
1166  else {
1167  if (!attempt) {
1168  AliFatal(Form("%s: Container with name %s already present. Aborting", GetName(), obj->GetName()));
1169  }
1170  }
1171 }
1172 
1181 {
1182 
1183  if (!fGeom) {
1184  AliWarning(Form("%s - AliAnalysisTaskEmcalBase::IsTrackInEmcalAcceptance - Geometry is not available!", GetName()));
1185  return kFALSE;
1186  }
1187 
1188  Double_t minPhi = fGeom->GetArm1PhiMin() - edges;
1189  Double_t maxPhi = fGeom->GetArm1PhiMax() + edges;
1190 
1191  if (part->Phi() > minPhi && part->Phi() < maxPhi) {
1192  return kTRUE;
1193  }
1194  else {
1195  return kFALSE;
1196  }
1197 }
1198 
1200 {
1201  axis->SetBinLabel(1, "NullObject");
1202  axis->SetBinLabel(2, "Pt");
1203  axis->SetBinLabel(3, "Acceptance");
1204  axis->SetBinLabel(4, "MCLabel");
1205  axis->SetBinLabel(5, "BitMap");
1206  axis->SetBinLabel(6, "HF cut");
1207  axis->SetBinLabel(7, "Bit6");
1208  axis->SetBinLabel(8, "NotHybridTrack");
1209  axis->SetBinLabel(9, "MCFlag");
1210  axis->SetBinLabel(10, "MCGenerator");
1211  axis->SetBinLabel(11, "ChargeCut");
1212  axis->SetBinLabel(12, "MinDistanceTPCSectorEdge");
1213  axis->SetBinLabel(13, "Bit12");
1214  axis->SetBinLabel(14, "IsEMCal");
1215  axis->SetBinLabel(15, "Time");
1216  axis->SetBinLabel(16, "Energy");
1217  axis->SetBinLabel(17, "ExoticCut");
1218  axis->SetBinLabel(18, "Bit17");
1219  axis->SetBinLabel(19, "Area");
1220  axis->SetBinLabel(20, "AreaEmc");
1221  axis->SetBinLabel(21, "ZLeadingCh");
1222  axis->SetBinLabel(22, "ZLeadingEmc");
1223  axis->SetBinLabel(23, "NEF");
1224  axis->SetBinLabel(24, "MinLeadPt");
1225  axis->SetBinLabel(25, "MaxTrackPt");
1226  axis->SetBinLabel(26, "MaxClusterPt");
1227  axis->SetBinLabel(27, "Flavour");
1228  axis->SetBinLabel(28, "TagStatus");
1229  axis->SetBinLabel(29, "MinNConstituents");
1230  axis->SetBinLabel(30, "Bit29");
1231  axis->SetBinLabel(31, "Bit30");
1232  axis->SetBinLabel(32, "Bit31");
1233 }
1234 
1241 Double_t AliAnalysisTaskEmcalLight::GetParallelFraction(AliVParticle* part1, AliVParticle* part2)
1242 {
1243  TVector3 vect1(part1->Px(), part1->Py(), part1->Pz());
1244  TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1245  Double_t z = (vect1 * vect2) / (vect2 * vect2);
1246  return z;
1247 }
1248 
1255 Double_t AliAnalysisTaskEmcalLight::GetParallelFraction(const TVector3& vect1, AliVParticle* part2)
1256 {
1257  TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1258  Double_t z = (vect1 * vect2) / (vect2 * vect2);
1259  return z;
1260 }
1261 
1270 void AliAnalysisTaskEmcalLight::GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
1271 {
1272  phidiff = 999;
1273  etadiff = 999;
1274 
1275  if (!t||!v) return;
1276 
1277  Double_t veta = t->GetTrackEtaOnEMCal();
1278  Double_t vphi = t->GetTrackPhiOnEMCal();
1279 
1280  Float_t pos[3] = {0};
1281  v->GetPosition(pos);
1282  TVector3 cpos(pos);
1283  Double_t ceta = cpos.Eta();
1284  Double_t cphi = cpos.Phi();
1285  etadiff=veta-ceta;
1286  phidiff=TVector2::Phi_mpi_pi(vphi-cphi);
1287 }
1288 
1295 {
1296  Byte_t ret = 0;
1297  if (t->TestBit(BIT(22)) && !t->TestBit(BIT(23)))
1298  ret = 1;
1299  else if (!t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1300  ret = 2;
1301  else if (t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1302  ret = 3;
1303  return ret;
1304 }
1305 
1315 Byte_t AliAnalysisTaskEmcalLight::GetTrackType(const AliAODTrack *aodTrack, UInt_t filterBit1, UInt_t filterBit2)
1316 {
1317 
1318  Int_t res = 0;
1319 
1320  if (aodTrack->TestFilterBit(filterBit1)) {
1321  res = 0;
1322  }
1323  else if (aodTrack->TestFilterBit(filterBit2)) {
1324  if ((aodTrack->GetStatus()&AliVTrack::kITSrefit)!=0) {
1325  res = 1;
1326  }
1327  else {
1328  res = 2;
1329  }
1330  }
1331  else {
1332  res = 3;
1333  }
1334 
1335  return res;
1336 }
1337 
1344 {
1345  EBeamType_t b = kpp;
1346  if ((runnumber >= 136833 && runnumber <= 139517) || // LHC10h Run-1 (Pb-Pb)
1347  (runnumber >= 167693 && runnumber <= 170593) || // LHC11h Run-1 (Pb-Pb)
1348  (runnumber >= 244824 && runnumber <= 246994)) { // LHC15o Run-2 (Pb-Pb)
1349  b = kAA;
1350  }
1351  else if ((runnumber > 188356 && runnumber <= 188503) || // LHC12g Run-1 (p-Pb pilot)
1352  (runnumber >= 195164 && runnumber <= 197388) || // LHC13b,c,d,e,f Run-1 (p-Pb)
1353  (runnumber >= 265077 && runnumber <= 999999)) { // LHC16 Run-2 (p-Pb)
1354  b = kpA;
1355  }
1356  return b;
1357 }
1358 
1365 {
1366  if (!fPythiaHeader || !fMCRejectFilter) return kTRUE;
1367 
1368  // Condition 1: Pythia jet / pT-hard > factor
1369  if (fPtHardAndJetPtFactor > 0.) {
1370  AliTLorentzVector jet;
1371 
1372  Int_t nTriggerJets = fPythiaHeader->NTriggerJets();
1373 
1374  AliDebug(1,Form("Njets: %d, pT Hard %f",nTriggerJets, fPtHard));
1375 
1376  Float_t tmpjet[]={0,0,0,0};
1377  for (Int_t ijet = 0; ijet< nTriggerJets; ijet++) {
1378  fPythiaHeader->TriggerJet(ijet, tmpjet);
1379 
1380  jet.SetPxPyPzE(tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3]);
1381 
1382  AliDebug(1,Form("jet %d; pycell jet pT %f",ijet, jet.Pt()));
1383 
1384  //Compare jet pT and pt Hard
1385  if (jet.Pt() > fPtHardAndJetPtFactor * fPtHard) {
1386  AliInfo(Form("Reject jet event with : pT Hard %2.2f, pycell jet pT %2.2f, rejection factor %1.1f\n", fPtHard, jet.Pt(), fPtHardAndJetPtFactor));
1387  return kFALSE;
1388  }
1389  }
1390  }
1391  // end condition 1
1392 
1393  // Condition 2 : Reconstructed EMCal cluster pT / pT-hard > factor
1394  if (fPtHardAndClusterPtFactor > 0.) {
1395  AliClusterContainer* mccluscont = GetClusterContainer(0);
1396  if ((Bool_t)mccluscont) {
1397  for (auto cluster : mccluscont->all()) {// Not cuts applied ; use accept for cuts
1398  Float_t ecluster = cluster->E();
1399 
1400  if (ecluster > (fPtHardAndClusterPtFactor * fPtHard)) {
1401  AliInfo(Form("Reject : ecluster %2.2f, calo %d, factor %2.2f, ptHard %f",ecluster,cluster->GetType(),fPtHardAndClusterPtFactor,fPtHard));
1402  return kFALSE;
1403  }
1404  }
1405  }
1406  }
1407  // end condition 2
1408 
1409  // condition 3 : Reconstructed track pT / pT-hard >factor
1410  if (fPtHardAndTrackPtFactor > 0.) {
1411  AliMCParticleContainer* mcpartcont = dynamic_cast<AliMCParticleContainer*>(GetParticleContainer(0));
1412  if ((Bool_t)mcpartcont) {
1413  for (auto mctrack : mcpartcont->all()) {// Not cuts applied ; use accept for cuts
1414  Float_t trackpt = mctrack->Pt();
1415  if (trackpt > (fPtHardAndTrackPtFactor * fPtHard) ) {
1416  AliInfo(Form("Reject : track %2.2f, factor %2.2f, ptHard %f", trackpt, fPtHardAndTrackPtFactor, fPtHard));
1417  return kFALSE;
1418  }
1419  }
1420  }
1421  }
1422  // end condition 3
1423 
1424  return kTRUE;
1425 }
1426 
Float_t fPtHardAndJetPtFactor
Factor between ptHard and jet pT to reject/accept event.
Double_t fVertexSPD[3]
!event Svertex
TString fCaloTriggersName
name of calo triggers collection
TObjArray fAcceptedTriggerClasses
list of accepted trigger classes
Int_t fNcentBins
how many centrality bins
AliEMCALGeometry * fGeom
!emcal geometry
EBeamType_t fBeamType
!event beam type
double Double_t
Definition: External.C:58
TClonesArray * GetArrayFromEvent(const char *name, const char *clname=0)
TObjArray fClusterCollArray
cluster collection array
Float_t fXsection
!x-section from pythia header
Double_t fEPV0A
!event plane V0A
Double_t fEPV0
!event plane V0
TH1 * fHistEventCount
!incoming and selected events
TObjArray fRejectedTriggerClasses
list of accepted trigger classes
TObjArray fParticleCollArray
particle/track collection array
Int_t GetNParticles() const
Container with name, TClonesArray and cuts for particles.
Double_t fZvertexDiff
upper limit for distance between primary and SPD vertex
TSystem * gSystem
AliTrackContainer * AddTrackContainer(const char *n)
Bool_t fMCRejectFilter
enable the filtering of events by tail rejection
TString fCaloTriggerPatchInfoName
trigger patch info array name
Double_t fMinVz
min vertex for event selection
TList * list
TString fCentEst
name of the centrality estimator
UInt_t fTriggerSelectionBitMap
trigger selection bit map
TH1 * fHistCentrality
!event centrality distribution
const AliMCParticleIterableContainer all() const
static Byte_t GetTrackType(const AliVTrack *t)
TH1 * fHistTriggerClasses
!number of events in each trigger class
TString fCaloCellsName
name of calo cell collection
TH1 * fHistEvents
!total number of events per pt hard bin
Bool_t IsTrackInEmcalAcceptance(AliVParticle *part, Double_t edges=0.9) const
Double_t fMinCent
min centrality for event selection
Double_t fMinPtTrack
cut on track pt in event selection
Container for particles within the EMCAL framework.
static void GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
void AddObjectToEvent(TObject *obj, Bool_t attempt=kFALSE)
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal
EBeamType_t fForceBeamType
forced beam type
AliClusterContainer * AddClusterContainer(const char *n)
Bool_t fCreateHisto
whether or not create histograms
TH1 * fHistTrialsVsPtHard
!total number of trials per pt hard bin after selection
TH1 * fHistEventRejection
!book keep reasons for rejecting event
int Int_t
Definition: External.C:63
TH1 * fHistTrials
!trials from pyxsec.root
unsigned int UInt_t
Definition: External.C:33
TString fFiredTriggerClasses
!trigger classes fired by the current event
float Float_t
Definition: External.C:68
Base task in the EMCAL framework (lighter version of AliAnalysisTaskEmcal)
TH1 * fHistEventsVsPtHard
!total number of events per pt hard bin after selection
Float_t fPtHardAndClusterPtFactor
Factor between ptHard and cluster pT to reject/accept event.
Double_t fVertex[3]
!event vertex
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Int_t fPtHardBin
!event pt hard bin
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
Bool_t fIsPythia
if it is a PYTHIA production
TProfile * fHistXsection
!x section from pyxsec.root
Int_t fCentBin
!event centrality bin
Int_t fSelectPtHardBin
select one pt hard bin for analysis
Double_t fMaxCent
max centrality for event selection
ULong_t fFiredTriggerBitMap
!bit map of fired triggers
Int_t fNVertSPDCont
!event SPD vertex number of contributors
Double_t fMinPtTrackInEmcal
min pt track in emcal
Bool_t PythiaInfoFromFile(const char *currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard)
Bool_t fLocalInitialized
!whether or not the task has been already initialized
static EBeamType_t BeamTypeFromRunNumber(Int_t runnumber)
Int_t fMinNTrack
minimum nr of tracks in event with pT>fTrackPtCut
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
AliParticleContainer * GetParticleContainer(Int_t i=0) const
TFile * file
Int_t nevents[nsamples]
Int_t fNVertCont
!event vertex number of contributors
AliMCParticleContainer * AddMCParticleContainer(const char *n)
Bool_t fGeneralHistograms
whether or not it should fill some general histograms
Int_t GetRunNumber(TString)
Definition: PlotMuonQA.C:2235
AliGenPythiaEventHeader * fPythiaHeader
!event Pythia header
const char Option_t
Definition: External.C:48
Float_t fPtHardAndTrackPtFactor
Factor between ptHard and track pT to reject/accept event.
bool Bool_t
Definition: External.C:53
TH1 * fHistEventPlane
!event plane distribution
EBeamType_t
Switch for the beam type.
AliVCaloTrigger * fCaloTriggers
!calo triggers
TProfile * fHistXsectionVsPtHard
!x section from pythia header
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
TH1 * fHistZVertex
!z vertex position
AliParticleContainer * AddParticleContainer(const char *n)
Double_t fMaxVz
max vertex for event selection
Double_t fCent
!event centrality
Double_t fEPV0C
!event plane V0C
Bool_t fUseNewCentralityEstimation
Use new centrality estimation (for 2015 data)
TClonesArray * fTriggerPatchInfo
!trigger patch info array
TList * OpenFile(const char *fname)
Definition: DrawAnaELoss.C:65
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
EDataType_t fDataType
!data type (ESD or AOD)