AliPhysics  2ad5f07 (2ad5f07)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskChargedParticlesRefMC.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKCHARGEDPARTICLESREFMC_H
2 #define ALIANALYSISTASKCHARGEDPARTICLESREFMC_H
3 /* Copyright(c) 1998-2015, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 #include "AliAnalysisTaskSE.h"
7 #include <TString.h>
8 
9 class TArrayD;
10 class TClonesArray;
11 class THistManager;
12 
13 class AliAnalysisUtils;
14 class AliAODTrack;
15 class AliEMCALGeometry;
16 class AliESDtrack;
18 class AliGenPythiaEventHeader;
19 class AliVParticle;
20 class AliMCEvent;
21 
22 namespace EMCalTriggerPtAnalysis {
23 
33 class AliAnalysisTaskChargedParticlesRefMC: public AliAnalysisTaskSE {
34 public:
36  kpPb = 1,
37  kPbp = -1
38  };
39 
41  AliAnalysisTaskChargedParticlesRefMC(const char *name);
43 
45  void UserExec(Option_t *);
46  Bool_t UserNotify();
47  void Terminate(Option_t *) {}
48 
49  void SetRapidityShift(Double_t yshift) { fYshift = yshift; }
50  void SetBeamDirection(BeamDirection_t beamdir) { fEtaSign = static_cast<Double_t>(beamdir); }
51 
52  void SetAnalysisUtil(AliAnalysisUtils *util) { fAnalysisUtil = util; }
54  void SetEtaLabCut(double etamin, double etamax) { fEtaLabCut[0] = etamin; fEtaLabCut[1] = etamax; }
55  void SetEtaCMSCut(double etamin, double etamax) { fEtaCmsCut[0] = etamin; fEtaCmsCut[1] = etamax; }
56  void SetOutlierCut(double fracpthard = 1.2) { fFracPtHard = fracpthard; }
58  void InitializeTrackCuts(TString cutname, bool isAOD);
59 
60 protected:
61  void CreateOldPtBinning(TArrayD &binning) const;
62  void CreateNewPtBinning(TArrayD &binning) const;
63 
64  void FillTrackHistos(const char *eventclass, Double_t pt, Double_t eta, Double_t etacent, Double_t phi, Bool_t etacut, Bool_t inEmcal, Bool_t hasTRD, const char *pid);
65  void FillTriggerJetHistograms(Bool_t aftercut, AliGenPythiaEventHeader *const header);
66 
67  TString GetFiredTriggerClasses(const TClonesArray * triggerpatches);
68  Bool_t PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard) const;
69  AliGenPythiaEventHeader *GetPythiaHeader() const;
70  Bool_t IsPhysicalPrimary(const AliVParticle *const part, AliMCEvent *const mcevent);
71  Bool_t IsOutlier(AliGenPythiaEventHeader * const header) const;
72 
73 
75  AliAnalysisUtils *fAnalysisUtil;
77  THistManager *fHistos;
78  AliEMCALGeometry *fGeometry;
79 
80  // Monte-Carlo specific information
81  Double_t fPtHard;
82  Int_t fPtHardBin;
83  Int_t fNTrials;
84  Float_t fXsection;
85 
86  Double_t fYshift;
87  Double_t fEtaSign;
88  Double_t fEtaLabCut[2];
89  Double_t fEtaCmsCut[2];
90  Double_t fFracPtHard;
91 
92 private:
95 
99 };
100 
101 } /* namespace EMCalTriggerPtAnalysis */
102 
103 #endif /* ALIANALYSISTASKCHARGEDPARTICLESREFMC_H */
Interface for virtual track selection.
void FillTriggerJetHistograms(Bool_t aftercut, AliGenPythiaEventHeader *const header)
Double_t fFracPtHard
Cut on the maximum fraction of pt hard of any trigger jet.
AliAnalysisTaskChargedParticlesRefMC & operator=(const AliAnalysisTaskChargedParticlesRefMC &)
const Double_t etamin
AliEmcalTriggerOfflineSelection * fTriggerSelection
Offline trigger selection.
Bool_t IsPhysicalPrimary(const AliVParticle *const part, AliMCEvent *const mcevent)
Bool_t PythiaInfoFromFile(const char *currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard) const
void FillTrackHistos(const char *eventclass, Double_t pt, Double_t eta, Double_t etacent, Double_t phi, Bool_t etacut, Bool_t inEmcal, Bool_t hasTRD, const char *pid)
Unit test class for charged particle distributions (MC case)
const Double_t etamax
Double_t fEtaSign
Sign of the eta distribution (swaps when beam directions swap): p-Pb: +1, Pb-p: -1.