AliPhysics  95775ff (95775ff)
 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  fMinPtHard(-1),
85  fMaxPtHard(-1),
86  fAcceptedTriggerClasses(),
87  fRejectedTriggerClasses(),
88  fMCRejectFilter(kFALSE),
89  fPtHardAndJetPtFactor(0.),
90  fPtHardAndClusterPtFactor(0.),
91  fPtHardAndTrackPtFactor(0.),
92  fLocalInitialized(kFALSE),
93  fDataType(kAOD),
94  fGeom(0),
95  fCaloCells(0),
96  fCaloTriggers(0),
97  fTriggerPatchInfo(0),
98  fCent(0),
99  fCentBin(-1),
100  fEPV0(-1.0),
101  fEPV0A(-1.0),
102  fEPV0C(-1.0),
103  fNVertCont(0),
104  fNVertSPDCont(0),
105  fFiredTriggerBitMap(0),
106  fFiredTriggerClasses(),
107  fBeamType(kNA),
108  fPythiaHeader(0),
109  fPtHard(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  fMinPtHard(-1),
172  fMaxPtHard(-1),
173  fAcceptedTriggerClasses(),
174  fRejectedTriggerClasses(),
175  fMCRejectFilter(kFALSE),
176  fPtHardAndJetPtFactor(0.),
177  fPtHardAndClusterPtFactor(0.),
178  fPtHardAndTrackPtFactor(0.),
179  fLocalInitialized(kFALSE),
180  fDataType(kAOD),
181  fGeom(0),
182  fCaloCells(0),
183  fCaloTriggers(0),
184  fTriggerPatchInfo(0),
185  fCent(0),
186  fCentBin(-1),
187  fEPV0(-1.0),
188  fEPV0A(-1.0),
189  fEPV0C(-1.0),
190  fNVertCont(0),
191  fNVertSPDCont(0),
192  fFiredTriggerBitMap(0),
193  fFiredTriggerClasses(),
194  fBeamType(kNA),
195  fPythiaHeader(0),
196  fPtHard(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->GetXaxis()->SetBinLabel(14,"MCOutlier");
357  fHistEventRejection->GetYaxis()->SetTitle("counts");
359 
360  fHistTriggerClasses = new TH1F("fHistTriggerClasses","fHistTriggerClasses",3,0,3);
361 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2)
362  fHistTriggerClasses->SetBit(TH1::kCanRebin);
363 #else
364  fHistTriggerClasses->SetCanExtend(TH1::kAllAxes);
365 #endif
367 
368  fHistEventCount = new TH1F("fHistEventCount","fHistEventCount",2,0,2);
369  fHistEventCount->GetXaxis()->SetBinLabel(1,"Accepted");
370  fHistEventCount->GetXaxis()->SetBinLabel(2,"Rejected");
371  fHistEventCount->GetYaxis()->SetTitle("counts");
372  fOutput->Add(fHistEventCount);
373 
374  PostData(1, fOutput);
375 }
376 
391 {
392  if (fIsPythia) {
393  fHistEventsVsPtHard->Fill(fPtHard, 1);
396  }
397 
398  fHistZVertex->Fill(fVertex[2]);
399 
400  if (fForceBeamType != kpp) {
401  fHistCentrality->Fill(fCent);
402  fHistEventPlane->Fill(fEPV0);
403  }
404 
405  TObjArray* triggerClasses = InputEvent()->GetFiredTriggerClasses().Tokenize(" ");
406  TIter next(triggerClasses);
407  TObjString* triggerClass = 0;
408  while ((triggerClass = static_cast<TObjString*>(next()))) {
409  fHistTriggerClasses->Fill(triggerClass->GetString(), 1);
410  }
411  delete triggerClasses;
412  triggerClasses = 0;
413 
414  return kTRUE;
415 }
416 
437 {
438  if (!fLocalInitialized)
439  ExecOnce();
440 
441  if (!fLocalInitialized)
442  return;
443 
444  if (!RetrieveEventObjects())
445  return;
446 
447  if (IsEventSelected()) {
448  if (fGeneralHistograms) fHistEventCount->Fill("Accepted",1);
449  }
450  else {
451  if (fGeneralHistograms) fHistEventCount->Fill("Rejected",1);
452  return;
453  }
454 
456  if (!FillGeneralHistograms())
457  return;
458  }
459 
460  if (!Run())
461  return;
462 
463  if (fCreateHisto) {
464  if (!FillHistograms())
465  return;
466  }
467 
468  if (fCreateHisto && fOutput) {
469  // information for this iteration of the UserExec in the container
470  PostData(1, fOutput);
471  }
472 }
473 
485 Bool_t AliAnalysisTaskEmcalLight::PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard)
486 {
487 
488  TString file(currFile);
489  fXsec = 0;
490  fTrials = 1;
491 
492  if (file.Contains(".zip#")) {
493  Ssiz_t pos1 = file.Index("root_archive",12,0,TString::kExact);
494  Ssiz_t pos = file.Index("#",1,pos1,TString::kExact);
495  Ssiz_t pos2 = file.Index(".root",5,TString::kExact);
496  file.Replace(pos+1,pos2-pos1,"");
497  } else {
498  // not an archive take the basename....
499  file.ReplaceAll(gSystem->BaseName(file.Data()),"");
500  }
501  AliDebug(1,Form("File name: %s",file.Data()));
502 
503  // Get the pt hard bin
504  TString strPthard(file);
505 
506  strPthard.Remove(strPthard.Last('/'));
507  strPthard.Remove(strPthard.Last('/'));
508  if (strPthard.Contains("AOD")) strPthard.Remove(strPthard.Last('/'));
509  strPthard.Remove(0,strPthard.Last('/')+1);
510  if (strPthard.IsDec())
511  pthard = strPthard.Atoi();
512  else
513  AliWarning(Form("Could not extract file number from path %s", strPthard.Data()));
514 
515  // 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
516  TFile *fxsec = TFile::Open(Form("%s%s",file.Data(),"pyxsec.root"));
517 
518  if (!fxsec) {
519  // next trial fetch the histgram file
520  fxsec = TFile::Open(Form("%s%s",file.Data(),"pyxsec_hists.root"));
521  if (!fxsec) {
522  // not a severe condition but inciate that we have no information
523  return kFALSE;
524  } else {
525  // find the tlist we want to be independtent of the name so use the Tkey
526  TKey* key = (TKey*)fxsec->GetListOfKeys()->At(0);
527  if (!key) {
528  fxsec->Close();
529  return kFALSE;
530  }
531  TList *list = dynamic_cast<TList*>(key->ReadObj());
532  if (!list) {
533  fxsec->Close();
534  return kFALSE;
535  }
536  fXsec = ((TProfile*)list->FindObject("h1Xsec"))->GetBinContent(1);
537  fTrials = ((TH1F*)list->FindObject("h1Trials"))->GetBinContent(1);
538  fxsec->Close();
539  }
540  } else { // no tree pyxsec.root
541  TTree *xtree = (TTree*)fxsec->Get("Xsection");
542  if (!xtree) {
543  fxsec->Close();
544  return kFALSE;
545  }
546  UInt_t ntrials = 0;
547  Double_t xsection = 0;
548  xtree->SetBranchAddress("xsection",&xsection);
549  xtree->SetBranchAddress("ntrials",&ntrials);
550  xtree->GetEntry(0);
551  fTrials = ntrials;
552  fXsec = xsection;
553  fxsec->Close();
554  }
555  return kTRUE;
556 }
557 
572 {
574  return kTRUE;
575 
576  TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree();
577  if (!tree) {
578  AliError(Form("%s - UserNotify: No current tree!",GetName()));
579  return kFALSE;
580  }
581 
582  Float_t xsection = 0;
583  Float_t trials = 0;
584  Int_t pthardbin = 0;
585 
586  TFile *curfile = tree->GetCurrentFile();
587  if (!curfile) {
588  AliError(Form("%s - UserNotify: No current file!",GetName()));
589  return kFALSE;
590  }
591 
592  TChain *chain = dynamic_cast<TChain*>(tree);
593  if (chain) tree = chain->GetTree();
594 
595  Int_t nevents = tree->GetEntriesFast();
596 
597  Bool_t res = PythiaInfoFromFile(curfile->GetName(), xsection, trials, pthardbin);
598 
599  if (!res) return kTRUE;
600 
601  fHistTrials->Fill(pthardbin, trials);
602  fHistXsection->Fill(pthardbin, xsection);
603  fHistEvents->Fill(pthardbin, nevents);
604 
605  return kTRUE;
606 }
607 
619 {
620  if (!InputEvent()) {
621  AliError(Form("%s: Could not retrieve event! Returning!", GetName()));
622  return;
623  }
624 
625  if (fNeedEmcalGeom) {
626  fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->GetRunNumber());
627  if (!fGeom) {
628  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()));
629  return;
630  }
631  }
632 
633  //Load all requested track branches - each container knows name already
634  for (Int_t i =0; i<fParticleCollArray.GetEntriesFast(); i++) {
635  AliParticleContainer *cont = static_cast<AliParticleContainer*>(fParticleCollArray.At(i));
636  cont->SetArray(InputEvent());
637  }
638 
639  //Load all requested cluster branches - each container knows name already
640  for (Int_t i =0; i<fClusterCollArray.GetEntriesFast(); i++) {
641  AliClusterContainer *cont = static_cast<AliClusterContainer*>(fClusterCollArray.At(i));
642  cont->SetArray(InputEvent());
643  }
644 
645  if (!fCaloCellsName.IsNull() && !fCaloCells) {
646  fCaloCells = dynamic_cast<AliVCaloCells*>(InputEvent()->FindListObject(fCaloCellsName));
647  if (!fCaloCells) {
648  AliError(Form("%s: Could not retrieve cells %s!", GetName(), fCaloCellsName.Data()));
649  return;
650  }
651  }
652 
653  if (!fCaloTriggersName.IsNull() && !fCaloTriggers) {
654  fCaloTriggers = dynamic_cast<AliVCaloTrigger*>(InputEvent()->FindListObject(fCaloTriggersName));
655  if (!fCaloTriggers) {
656  AliError(Form("%s: Could not retrieve calo triggers %s!", GetName(), fCaloTriggersName.Data()));
657  return;
658  }
659  }
660 
661  if (!fCaloTriggerPatchInfoName.IsNull() && !fTriggerPatchInfo) {
662  fTriggerPatchInfo = GetArrayFromEvent(fCaloTriggerPatchInfoName.Data(),"AliEMCALTriggerPatchInfo");
663  if (!fTriggerPatchInfo) {
664  AliError(Form("%s: Could not retrieve calo trigger patch info %s!", GetName(), fCaloTriggerPatchInfoName.Data()));
665  return;
666  }
667 
668  }
669 
670  fLocalInitialized = kTRUE;
671 }
672 
679 {
680  if (fForceBeamType != kNA)
681  return fForceBeamType;
682 
683  AliESDEvent *esd = dynamic_cast<AliESDEvent*>(InputEvent());
684  if (esd) {
685  const AliESDRun *run = esd->GetESDRun();
686  TString beamType = run->GetBeamType();
687  if (beamType == "p-p")
688  return kpp;
689  else if (beamType == "A-A")
690  return kAA;
691  else if (beamType == "p-A")
692  return kpA;
693  else
694  return kNA;
695  } else {
696  Int_t runNumber = InputEvent()->GetRunNumber();
697  if ((runNumber >= 136851 && runNumber <= 139517) || // LHC10h
698  (runNumber >= 166529 && runNumber <= 170593)) { // LHC11h
699  return kAA;
700  } else if ((runNumber>=188365 && runNumber <= 188366) || // LHC12g
701  (runNumber >= 195344 && runNumber <= 196608)) { // LHC13b-f
702  return kpA;
703  } else {
704  return kpp;
705  }
706  }
707 }
708 
731 {
733  if (fGeneralHistograms) fHistEventRejection->Fill("PhysSel",1);
734  return kFALSE;
735  }
736 
737  Bool_t acceptedTrgClassFound = kFALSE;
738  if (fAcceptedTriggerClasses.GetEntriesFast() > 0) {
739  TIter acceptedTrigger(&fAcceptedTriggerClasses);
740  TObject* obj = 0;
741  while ((obj = acceptedTrigger())) {
742  if (fFiredTriggerClasses.Contains(obj->GetName())) {
743  acceptedTrgClassFound = kTRUE;
744  break;
745  }
746  }
747 
748  if (!acceptedTrgClassFound) {
749  if (fGeneralHistograms) fHistEventRejection->Fill("Trg class (acc)",1);
750  return kFALSE;
751  }
752  }
753 
754  if (fRejectedTriggerClasses.GetEntriesFast() > 0) {
755  TIter rejectedTrigger(&fRejectedTriggerClasses);
756  TObject* obj = 0;
757  while ((obj = rejectedTrigger())) {
758  if (fFiredTriggerClasses.Contains(obj->GetName())) {
759  if (fGeneralHistograms) fHistEventRejection->Fill("Trg class (rej)",1);
760  return kFALSE;
761  }
762  }
763  }
764 
765  if ((fMinCent != -999) && (fMaxCent != -999)) {
766  if (fCent < fMinCent || fCent > fMaxCent) {
767  if (fGeneralHistograms) fHistEventRejection->Fill("Cent",1);
768  return kFALSE;
769  }
770  }
771 
772  if ((fMinVz > -998.) && (fMaxVz < 998.)) {
773  if (fNVertCont == 0 ) {
774  if (fGeneralHistograms) fHistEventRejection->Fill("vertex contr.",1);
775  return kFALSE;
776  }
777  Double_t vz = fVertex[2];
778  if (vz < fMinVz || vz > fMaxVz) {
779  if (fGeneralHistograms) fHistEventRejection->Fill("Vz",1);
780  return kFALSE;
781  }
782 
783  if (fNVertSPDCont > 0 && fZvertexDiff < 999) {
784  Double_t vzSPD = fVertexSPD[2];
785  Double_t dvertex = TMath::Abs(vz-vzSPD);
786  //if difference larger than fZvertexDiff
787  if (dvertex > fZvertexDiff) {
788  if (fGeneralHistograms) fHistEventRejection->Fill("VzSPD",1);
789  return kFALSE;
790  }
791  }
792  }
793 
794  if (fMinPtTrackInEmcal > 0 && fGeom && GetParticleContainer(0)) {
795  Bool_t trackInEmcalOk = kFALSE;
796  Int_t ntracks = GetParticleContainer(0)->GetNParticles();
797  for (Int_t i = 0; i < ntracks; i++) {
798  AliVParticle *track = GetParticleContainer(0)->GetAcceptParticle(i);
799  if (!track)
800  continue;
801 
802  Double_t phiMin = fGeom->GetArm1PhiMin() * TMath::DegToRad();
803  Double_t phiMax = fGeom->GetArm1PhiMax() * TMath::DegToRad();
804  Int_t runNumber = InputEvent()->GetRunNumber();
805  if (runNumber>=177295 && runNumber<=197470) { //small SM masked in 2012 and 2013
806  phiMin = 1.4;
807  phiMax = TMath::Pi();
808  }
809 
810  if (track->Eta() < fGeom->GetArm1EtaMin() || track->Eta() > fGeom->GetArm1EtaMax() || track->Phi() < phiMin || track->Phi() > phiMax)
811  continue;
812  if (track->Pt() > fMinPtTrackInEmcal) {
813  trackInEmcalOk = kTRUE;
814  break;
815  }
816  }
817  if (!trackInEmcalOk) {
818  if (fGeneralHistograms) fHistEventRejection->Fill("trackInEmcal",1);
819  return kFALSE;
820  }
821  }
822 
823  if (fMinNTrack > 0) {
824  Int_t nTracksAcc = 0;
825  Int_t ntracks = GetParticleContainer(0)->GetNParticles();
826  for (Int_t i = 0; i < ntracks; i++) {
827  AliVParticle *track = GetParticleContainer(0)->GetAcceptParticle(i);
828  if (!track)
829  continue;
830  if (track->Pt() > fMinPtTrack) {
831  nTracksAcc++;
832  if (nTracksAcc >= fMinNTrack)
833  break;
834  }
835  }
836  if (nTracksAcc<fMinNTrack) {
837  if (fGeneralHistograms) fHistEventRejection->Fill("minNTrack",1);
838  return kFALSE;
839  }
840  }
841 
842  if (fMinPtHard >= 0 && fPtHard < fMinPtHard) {
843  if (fGeneralHistograms) fHistEventRejection->Fill("SelPtHardBin",1);
844  return kFALSE;
845  }
846 
847  if (fMaxPtHard >= 0 && fPtHard >= fMaxPtHard) {
848  if (fGeneralHistograms) fHistEventRejection->Fill("SelPtHardBin",1);
849  return kFALSE;
850  }
851 
852  // Reject filter for MC data
853  if (!CheckMCOutliers()) {
854  if (fGeneralHistograms) fHistEventRejection->Fill("MCOutlier",1);
855  return kFALSE;
856  }
857 
858  return kTRUE;
859 }
860 
869 TClonesArray *AliAnalysisTaskEmcalLight::GetArrayFromEvent(const char *name, const char *clname)
870 {
871  TClonesArray *arr = 0;
872  TString sname(name);
873  if (!sname.IsNull()) {
874  arr = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(sname));
875  if (!arr) {
876  AliWarning(Form("%s: Could not retrieve array with name %s!", GetName(), name));
877  return 0;
878  }
879  } else {
880  return 0;
881  }
882 
883  if (!clname)
884  return arr;
885 
886  TString objname(arr->GetClass()->GetName());
887  TClass cls(objname);
888  if (!cls.InheritsFrom(clname)) {
889  AliWarning(Form("%s: Objects of type %s in %s are not inherited from %s!",
890  GetName(), cls.GetName(), name, clname));
891  return 0;
892  }
893  return arr;
894 }
895 
901 {
902  fVertex[0] = 0;
903  fVertex[1] = 0;
904  fVertex[2] = 0;
905  fNVertCont = 0;
906 
907  fVertexSPD[0] = 0;
908  fVertexSPD[1] = 0;
909  fVertexSPD[2] = 0;
910  fNVertSPDCont = 0;
911 
912  fFiredTriggerClasses = InputEvent()->GetFiredTriggerClasses();
913 
914  if (fDataType == kESD) {
915  fFiredTriggerBitMap = static_cast<AliInputEventHandler*>(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler())->IsEventSelected();
916  }
917  else {
918  fFiredTriggerBitMap = static_cast<AliVAODHeader*>(InputEvent()->GetHeader())->GetOfflineTrigger();
919  }
920 
921  const AliVVertex *vert = InputEvent()->GetPrimaryVertex();
922  if (vert) {
923  vert->GetXYZ(fVertex);
924  fNVertCont = vert->GetNContributors();
925  }
926 
927  const AliVVertex *vertSPD = InputEvent()->GetPrimaryVertexSPD();
928  if (vertSPD) {
929  vertSPD->GetXYZ(fVertexSPD);
930  fNVertSPDCont = vertSPD->GetNContributors();
931  }
932 
934 
935  if (fBeamType == kAA || fBeamType == kpA ) {
937  AliMultSelection *MultSelection = static_cast<AliMultSelection*>(InputEvent()->FindListObject("MultSelection"));
938  if (MultSelection) {
939  fCent = MultSelection->GetMultiplicityPercentile(fCentEst.Data());
940  }
941  else {
942  AliWarning(Form("%s: Could not retrieve centrality information! Assuming 99", GetName()));
943  }
944  }
945  else { // old centrality estimation < 2015
946  AliCentrality *aliCent = InputEvent()->GetCentrality();
947  if (aliCent) {
948  fCent = aliCent->GetCentralityPercentile(fCentEst.Data());
949  }
950  else {
951  AliWarning(Form("%s: Could not retrieve centrality information! Assuming 99", GetName()));
952  }
953  }
954 
955  if (fNcentBins==4) {
956  if (fCent >= 0 && fCent < 10) fCentBin = 0;
957  else if (fCent >= 10 && fCent < 30) fCentBin = 1;
958  else if (fCent >= 30 && fCent < 50) fCentBin = 2;
959  else if (fCent >= 50 && fCent <= 100) fCentBin = 3;
960  else {
961  AliWarning(Form("%s: Negative centrality: %f. Assuming 99", GetName(), fCent));
962  fCentBin = fNcentBins-1;
963  }
964  }
965  else if (fNcentBins==5) { // for PbPb 2015
966  if (fCent >= 0 && fCent < 10) fCentBin = 0;
967  else if (fCent >= 10 && fCent < 30) fCentBin = 1;
968  else if (fCent >= 30 && fCent < 50) fCentBin = 2;
969  else if (fCent >= 50 && fCent <= 90) fCentBin = 3;
970  else if (fCent > 90) {
971  fCent = 99;
972  fCentBin = 4;
973  }
974  else {
975  AliWarning(Form("%s: Negative centrality: %f. Assuming 99", GetName(), fCent));
976  fCentBin = fNcentBins-1;
977  }
978  }
979  else {
981  if(centWidth>0.) {
982  fCentBin = TMath::FloorNint(fCent/centWidth);
983  }
984  else {
985  fCentBin = 0;
986  }
987  if (fCentBin>=fNcentBins) {
988  AliWarning(Form("%s: fCentBin too large: cent = %f fCentBin = %d. Assuming 99", GetName(),fCent,fCentBin));
989  fCentBin = fNcentBins-1;
990  }
991  }
992 
993  AliEventplane *aliEP = InputEvent()->GetEventplane();
994  if (aliEP) {
995  fEPV0 = aliEP->GetEventplane("V0" ,InputEvent());
996  fEPV0A = aliEP->GetEventplane("V0A",InputEvent());
997  fEPV0C = aliEP->GetEventplane("V0C",InputEvent());
998  } else {
999  AliWarning(Form("%s: Could not retrieve event plane information!", GetName()));
1000  }
1001  }
1002  else {
1003  fCent = 99;
1004  fCentBin = 0;
1005  }
1006 
1007  if (fIsPythia) {
1008 
1009  if (MCEvent()) {
1010  fPythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(MCEvent()->GenEventHeader());
1011  if (!fPythiaHeader) {
1012  // Check if AOD
1013  AliAODMCHeader* aodMCH = dynamic_cast<AliAODMCHeader*>(InputEvent()->FindListObject(AliAODMCHeader::StdBranchName()));
1014 
1015  if (aodMCH) {
1016  for (UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) {
1017  fPythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(aodMCH->GetCocktailHeader(i));
1018  if (fPythiaHeader) break;
1019  }
1020  }
1021  }
1022  }
1023 
1024  if (fPythiaHeader) {
1025  fPtHard = fPythiaHeader->GetPtHard();
1026  fXsection = fPythiaHeader->GetXsection();
1027  fNTrials = fPythiaHeader->Trials();
1028  }
1029  }
1030 
1031  AliEmcalContainer* cont = 0;
1032 
1033  TIter nextPartColl(&fParticleCollArray);
1034  while ((cont = static_cast<AliEmcalContainer*>(nextPartColl()))) cont->NextEvent();
1035 
1036  TIter nextClusColl(&fClusterCollArray);
1037  while ((cont = static_cast<AliParticleContainer*>(nextClusColl()))) cont->NextEvent();
1038 
1039  return kTRUE;
1040 }
1041 
1050 {
1051  if (TString(n).IsNull()) return 0;
1052 
1054 
1055  fParticleCollArray.Add(cont);
1056 
1057  return cont;
1058 }
1059 
1068 {
1069  if (TString(n).IsNull()) return 0;
1070 
1071  AliTrackContainer* cont = new AliTrackContainer(n);
1072 
1073  fParticleCollArray.Add(cont);
1074 
1075  return cont;
1076 }
1077 
1086 {
1087  if (TString(n).IsNull()) return 0;
1088 
1090 
1091  fParticleCollArray.Add(cont);
1092 
1093  return cont;
1094 }
1095 
1104 {
1105  if (TString(n).IsNull()) return 0;
1106 
1108 
1109  fClusterCollArray.Add(cont);
1110 
1111  return cont;
1112 }
1113 
1120 {
1121  if (i<0 || i>fParticleCollArray.GetEntriesFast()) return 0;
1122  AliParticleContainer *cont = static_cast<AliParticleContainer*>(fParticleCollArray.At(i));
1123  return cont;
1124 }
1125 
1132 {
1133  if (i<0 || i>fClusterCollArray.GetEntriesFast()) return 0;
1134  AliClusterContainer *cont = static_cast<AliClusterContainer*>(fClusterCollArray.At(i));
1135  return cont;
1136 }
1137 
1144 {
1145  AliParticleContainer *cont = static_cast<AliParticleContainer*>(fParticleCollArray.FindObject(name));
1146  return cont;
1147 }
1148 
1155 {
1156  AliClusterContainer *cont = static_cast<AliClusterContainer*>(fClusterCollArray.FindObject(name));
1157  return cont;
1158 }
1159 
1166 {
1167  if (!(InputEvent()->FindListObject(obj->GetName()))) {
1168  InputEvent()->AddObject(obj);
1169  }
1170  else {
1171  if (!attempt) {
1172  AliFatal(Form("%s: Container with name %s already present. Aborting", GetName(), obj->GetName()));
1173  }
1174  }
1175 }
1176 
1185 {
1186 
1187  if (!fGeom) {
1188  AliWarning(Form("%s - AliAnalysisTaskEmcalBase::IsTrackInEmcalAcceptance - Geometry is not available!", GetName()));
1189  return kFALSE;
1190  }
1191 
1192  Double_t minPhi = fGeom->GetArm1PhiMin() - edges;
1193  Double_t maxPhi = fGeom->GetArm1PhiMax() + edges;
1194 
1195  if (part->Phi() > minPhi && part->Phi() < maxPhi) {
1196  return kTRUE;
1197  }
1198  else {
1199  return kFALSE;
1200  }
1201 }
1202 
1204 {
1205  axis->SetBinLabel(1, "NullObject");
1206  axis->SetBinLabel(2, "Pt");
1207  axis->SetBinLabel(3, "Acceptance");
1208  axis->SetBinLabel(4, "MCLabel");
1209  axis->SetBinLabel(5, "BitMap");
1210  axis->SetBinLabel(6, "HF cut");
1211  axis->SetBinLabel(7, "Bit6");
1212  axis->SetBinLabel(8, "NotHybridTrack");
1213  axis->SetBinLabel(9, "MCFlag");
1214  axis->SetBinLabel(10, "MCGenerator");
1215  axis->SetBinLabel(11, "ChargeCut");
1216  axis->SetBinLabel(12, "MinDistanceTPCSectorEdge");
1217  axis->SetBinLabel(13, "Bit12");
1218  axis->SetBinLabel(14, "IsEMCal");
1219  axis->SetBinLabel(15, "Time");
1220  axis->SetBinLabel(16, "Energy");
1221  axis->SetBinLabel(17, "ExoticCut");
1222  axis->SetBinLabel(18, "Bit17");
1223  axis->SetBinLabel(19, "Area");
1224  axis->SetBinLabel(20, "AreaEmc");
1225  axis->SetBinLabel(21, "ZLeadingCh");
1226  axis->SetBinLabel(22, "ZLeadingEmc");
1227  axis->SetBinLabel(23, "NEF");
1228  axis->SetBinLabel(24, "MinLeadPt");
1229  axis->SetBinLabel(25, "MaxTrackPt");
1230  axis->SetBinLabel(26, "MaxClusterPt");
1231  axis->SetBinLabel(27, "Flavour");
1232  axis->SetBinLabel(28, "TagStatus");
1233  axis->SetBinLabel(29, "MinNConstituents");
1234  axis->SetBinLabel(30, "Bit29");
1235  axis->SetBinLabel(31, "Bit30");
1236  axis->SetBinLabel(32, "Bit31");
1237 }
1238 
1245 Double_t AliAnalysisTaskEmcalLight::GetParallelFraction(AliVParticle* part1, AliVParticle* part2)
1246 {
1247  TVector3 vect1(part1->Px(), part1->Py(), part1->Pz());
1248  TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1249  Double_t z = (vect1 * vect2) / (vect2 * vect2);
1250  return z;
1251 }
1252 
1259 Double_t AliAnalysisTaskEmcalLight::GetParallelFraction(const TVector3& vect1, AliVParticle* part2)
1260 {
1261  TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1262  Double_t z = (vect1 * vect2) / (vect2 * vect2);
1263  return z;
1264 }
1265 
1274 void AliAnalysisTaskEmcalLight::GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
1275 {
1276  phidiff = 999;
1277  etadiff = 999;
1278 
1279  if (!t||!v) return;
1280 
1281  Double_t veta = t->GetTrackEtaOnEMCal();
1282  Double_t vphi = t->GetTrackPhiOnEMCal();
1283 
1284  Float_t pos[3] = {0};
1285  v->GetPosition(pos);
1286  TVector3 cpos(pos);
1287  Double_t ceta = cpos.Eta();
1288  Double_t cphi = cpos.Phi();
1289  etadiff=veta-ceta;
1290  phidiff=TVector2::Phi_mpi_pi(vphi-cphi);
1291 }
1292 
1299 {
1300  Byte_t ret = 0;
1301  if (t->TestBit(BIT(22)) && !t->TestBit(BIT(23)))
1302  ret = 1;
1303  else if (!t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1304  ret = 2;
1305  else if (t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1306  ret = 3;
1307  return ret;
1308 }
1309 
1319 Byte_t AliAnalysisTaskEmcalLight::GetTrackType(const AliAODTrack *aodTrack, UInt_t filterBit1, UInt_t filterBit2)
1320 {
1321 
1322  Int_t res = 0;
1323 
1324  if (aodTrack->TestFilterBit(filterBit1)) {
1325  res = 0;
1326  }
1327  else if (aodTrack->TestFilterBit(filterBit2)) {
1328  if ((aodTrack->GetStatus()&AliVTrack::kITSrefit)!=0) {
1329  res = 1;
1330  }
1331  else {
1332  res = 2;
1333  }
1334  }
1335  else {
1336  res = 3;
1337  }
1338 
1339  return res;
1340 }
1341 
1348 {
1349  EBeamType_t b = kpp;
1350  if ((runnumber >= 136833 && runnumber <= 139517) || // LHC10h Run-1 (Pb-Pb)
1351  (runnumber >= 167693 && runnumber <= 170593) || // LHC11h Run-1 (Pb-Pb)
1352  (runnumber >= 244824 && runnumber <= 246994)) { // LHC15o Run-2 (Pb-Pb)
1353  b = kAA;
1354  }
1355  else if ((runnumber > 188356 && runnumber <= 188503) || // LHC12g Run-1 (p-Pb pilot)
1356  (runnumber >= 195164 && runnumber <= 197388) || // LHC13b,c,d,e,f Run-1 (p-Pb)
1357  (runnumber >= 265077 && runnumber <= 999999)) { // LHC16 Run-2 (p-Pb)
1358  b = kpA;
1359  }
1360  return b;
1361 }
1362 
1369 {
1370  if (!fPythiaHeader || !fMCRejectFilter) return kTRUE;
1371 
1372  // Condition 1: Pythia jet / pT-hard > factor
1373  if (fPtHardAndJetPtFactor > 0.) {
1374  AliTLorentzVector jet;
1375 
1376  Int_t nTriggerJets = fPythiaHeader->NTriggerJets();
1377 
1378  AliDebug(1,Form("Njets: %d, pT Hard %f",nTriggerJets, fPtHard));
1379 
1380  Float_t tmpjet[]={0,0,0,0};
1381  for (Int_t ijet = 0; ijet< nTriggerJets; ijet++) {
1382  fPythiaHeader->TriggerJet(ijet, tmpjet);
1383 
1384  jet.SetPxPyPzE(tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3]);
1385 
1386  AliDebug(1,Form("jet %d; pycell jet pT %f",ijet, jet.Pt()));
1387 
1388  //Compare jet pT and pt Hard
1389  if (jet.Pt() > fPtHardAndJetPtFactor * fPtHard) {
1390  AliInfo(Form("Reject jet event with : pT Hard %2.2f, pycell jet pT %2.2f, rejection factor %1.1f\n", fPtHard, jet.Pt(), fPtHardAndJetPtFactor));
1391  return kFALSE;
1392  }
1393  }
1394  }
1395  // end condition 1
1396 
1397  // Condition 2 : Reconstructed EMCal cluster pT / pT-hard > factor
1398  if (fPtHardAndClusterPtFactor > 0.) {
1399  AliClusterContainer* mccluscont = GetClusterContainer(0);
1400  if ((Bool_t)mccluscont) {
1401  for (auto cluster : mccluscont->all()) {// Not cuts applied ; use accept for cuts
1402  Float_t ecluster = cluster->E();
1403 
1404  if (ecluster > (fPtHardAndClusterPtFactor * fPtHard)) {
1405  AliInfo(Form("Reject : ecluster %2.2f, calo %d, factor %2.2f, ptHard %f",ecluster,cluster->GetType(),fPtHardAndClusterPtFactor,fPtHard));
1406  return kFALSE;
1407  }
1408  }
1409  }
1410  }
1411  // end condition 2
1412 
1413  // condition 3 : Reconstructed track pT / pT-hard >factor
1414  if (fPtHardAndTrackPtFactor > 0.) {
1415  AliMCParticleContainer* mcpartcont = dynamic_cast<AliMCParticleContainer*>(GetParticleContainer(0));
1416  if ((Bool_t)mcpartcont) {
1417  for (auto mctrack : mcpartcont->all()) {// Not cuts applied ; use accept for cuts
1418  Float_t trackpt = mctrack->Pt();
1419  if (trackpt > (fPtHardAndTrackPtFactor * fPtHard) ) {
1420  AliInfo(Form("Reject : track %2.2f, factor %2.2f, ptHard %f", trackpt, fPtHardAndTrackPtFactor, fPtHard));
1421  return kFALSE;
1422  }
1423  }
1424  }
1425  }
1426  // end condition 3
1427 
1428  return kTRUE;
1429 }
1430 
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
Int_t fMinPtHard
select minimum pt hard (MC)
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
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
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
Int_t fMaxPtHard
select maximum pt hard (MC)
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)