AliPhysics  7dff9e1 (7dff9e1)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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 
12 class AliAnalysisUtils;
13 class AliAODTrack;
14 class AliEMCALGeometry;
15 class AliESDtrack;
16 class AliESDtrackCuts;
17 class AliGenPythiaEventHeader;
18 class AliVParticle;
19 class AliMCEvent;
20 
21 namespace EMCalTriggerPtAnalysis {
22 
23 class AliEMCalHistoContainer;
33 class AliAnalysisTaskChargedParticlesRefMC: public AliAnalysisTaskSE {
34 public:
36  kpPb = 1,
37  kPbp = -1
38  };
40  kCPREL0 = 0,
46  };
47 
49  AliAnalysisTaskChargedParticlesRefMC(const char *name);
51 
53  void UserExec(Option_t *);
54  Bool_t UserNotify();
55  void Terminate(Option_t *) {}
56 
57  void SetRapidityShift(Double_t yshift) { fYshift = yshift; }
58  void SetBeamDirection(BeamDirection_t beamdir) { fEtaSign = static_cast<Double_t>(beamdir); }
59 
60  void SetEtaLabCut(double etamin, double etamax) { fEtaLabCut[0] = etamin; fEtaLabCut[1] = etamax; }
61  void SetEtaCMSCut(double etamin, double etamax) { fEtaCmsCut[0] = etamin; fEtaCmsCut[1] = etamax; }
62  void SetOutlierCut(double fracpthard = 1.2) { fFracPtHard = fracpthard; }
63  void SetOfflineEnergyThreshold(EmcalTriggerClass trgcls, double threshold) { fOfflineEnergyThreshold[trgcls] = threshold; }
64 
65  void SwitchoffSPDCut() { fSwitchoffSPDcut = true; }
66  void SwitchoffITSCut() { fSwitchoffITScut = true; }
67 
68 protected:
69  void CreateOldPtBinning(TArrayD &binning) const;
70  void CreateNewPtBinning(TArrayD &binning) const;
71 
72  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);
73  void FillTriggerJetHistograms(Bool_t aftercut, AliGenPythiaEventHeader *const header);
74 
75  Bool_t TrackSelectionESD(AliESDtrack *track);
76  Bool_t TrackSelectionAOD(AliAODTrack *track);
77  TString GetFiredTriggerClasses(const TClonesArray * triggerpatches);
78  Bool_t PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard) const;
79  AliGenPythiaEventHeader *GetPythiaHeader() const;
80  Bool_t IsPhysicalPrimary(const AliVParticle *const part, AliMCEvent *const mcevent);
81  Bool_t IsOutlier(AliGenPythiaEventHeader * const header) const;
82  Bool_t IsOfflineSelected(EmcalTriggerClass trgcls, const TClonesArray * const triggerpatches) const;
83 
84 
85  AliESDtrackCuts *fTrackCuts;
86  AliAnalysisUtils *fAnalysisUtil;
88  AliEMCALGeometry *fGeometry;
89 
90  // Monte-Carlo specific information
91  Double_t fPtHard;
92  Int_t fPtHardBin;
93  Int_t fNTrials;
94  Float_t fXsection;
95 
98 
99  Double_t fYshift;
100  Double_t fEtaSign;
101  Double_t fEtaLabCut[2];
102  Double_t fEtaCmsCut[2];
103  Double_t fFracPtHard;
105 
106 private:
109 
113 };
114 
115 } /* namespace EMCalTriggerPtAnalysis */
116 
117 #endif /* ALIANALYSISTASKCHARGEDPARTICLESREFMC_H */
void FillTriggerJetHistograms(Bool_t aftercut, AliGenPythiaEventHeader *const header)
Bool_t IsOfflineSelected(EmcalTriggerClass trgcls, const TClonesArray *const triggerpatches) const
Bool_t fSwitchoffITScut
Switch off ITS cut completely (no refit, no cluster requirement)
Container class for histograms for the high- charged particle analysis.
Double_t fFracPtHard
Cut on the maximum fraction of pt hard of any trigger jet.
AliAnalysisTaskChargedParticlesRefMC & operator=(const AliAnalysisTaskChargedParticlesRefMC &)
const Double_t etamin
void SetOfflineEnergyThreshold(EmcalTriggerClass trgcls, double threshold)
Bool_t IsPhysicalPrimary(const AliVParticle *const part, AliMCEvent *const mcevent)
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)
Bool_t PythiaInfoFromFile(const char *currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard) const
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.