]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/Correlations/DPhi/FourierDecomposition/AliDhcTask.h
DHC patch (Tim Schuster <Tim.Schuster@cern.ch>)
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / FourierDecomposition / AliDhcTask.h
CommitLineData
48a61f36 1// Dihadron correlations task - simple task to read ESD or AOD input,
2// calculate same- and mixed-event correlations, and fill THnSparse
be8a5cdb 3// output. -A. Adare, Apr 2011, updated Mar 2012
48a61f36 4
5#ifndef AliDhcTask_cxx
6#define AliDhcTask_cxx
7
beb13b6c 8#include "AliAnalysisTaskSE.h"
9#include "AliPool.h"
10#include "THn.h"
11
be8a5cdb 12class TFormula;
48a61f36 13class TH1;
14class TH2;
beb13b6c 15class TH3;
d688e049 16class TAxis;
48a61f36 17class TObjArray;
be8a5cdb 18class TObject;
19class TProfile2D;
48a61f36 20class AliAODEvent;
be8a5cdb 21class AliESDEvent;
48a61f36 22class AliESDtrackCuts;
beb13b6c 23class AliESDMuonTrack;
b673a083 24class AliAODTrack;
be8a5cdb 25class AliEvtPoolManager;
48a61f36 26
48a61f36 27
28class AliDhcTask : public AliAnalysisTaskSE {
29 public:
beb13b6c 30 AliDhcTask();
48a61f36 31 AliDhcTask(const char *name);
b673a083 32 virtual ~AliDhcTask();
48a61f36 33
d688e049 34 void SetCentBins(TAxis *bins) { fBCent=bins; }
35 void SetCentMethod(const char *name) { fCentMethod = name; }
36 void SetCentMixBins(TAxis *bins) { fMixBCent=bins; }
37 void SetDEtaDPhiBins(Int_t nbe, Int_t nbp) { fNBdeta=nbe; fNBdphi=nbp; }
38 void SetDoWeights(Bool_t b) { fDoWeights = b; }
beb13b6c 39 void SetFillMuons(Bool_t b) { fFillMuons = b; }
b422cf0d 40 void SetPtTACrit(Bool_t b) { fPtTACrit = b; }
e47b8f11 41 void SetAllTAHists(Bool_t b) { fAllTAHists = b; }
d7149d30 42 void SetMixInEtaT(Bool_t b) { fMixInEtaT = b; }
d688e049 43 void SetEtaMax(Double_t eta) { fEtaMax = eta; }
15b0d1bb 44 void SetEtaTRange(Double_t eL, Double_t eH) { fEtaTLo=eL; fEtaTHi=eH; }
d688e049 45 void SetPoolSize(Int_t p) { fPoolSize = p; }
46 void SetPtABins(TAxis *bins) { fBPtA=bins; }
47 void SetPtRange(Double_t min, Double_t max) { fPtMin=min; fPtMax=max; }
48 void SetPtTBins(TAxis *bins) { fBPtT=bins; }
49 void SetTrackDepth(Int_t t) { fTrackDepth = t; }
50 void SetTracksName(const char *n) { fTracksName = n; }
51 void SetVerbosity(Int_t v) { fVerbosity = v; }
52 void SetZVtxBins(TAxis *bins) { fBZvtx=bins; }
53 void SetZVtxMixBins(TAxis *bins) { fMixBZvtx=bins; }
54 void SetZvtx(Double_t zvtx) { fZVtxMax = zvtx; }
beb13b6c 55 void SetHEffT(THnF *h) { fHEffT=h; }
56 void SetHEffA(THnF *h) { fHEffA=h; }
57 void SetAnaMode(Int_t iAna);
d7149d30 58 void PrintDhcSettings();
beb13b6c 59 enum eAnaMode {kHH, kMuH, kHMu, kMuMu, kPSide, kASide};
48a61f36 60
61 protected:
48a61f36 62 enum ePairingScheme {kSameEvt, kDiffEvt};
be8a5cdb 63 enum eDataType {kESD, kAOD};
48a61f36 64
be8a5cdb 65 void BookHistos();
66 void InitEventMixer();
f6701c6e 67 void GetESDTracks(MiniEvent*);
68 void GetAODTracks(MiniEvent*);
be8a5cdb 69 Bool_t VertexOk(TObject* obj) const;
beb13b6c 70 Bool_t IsGoodMUONtrack(AliESDMuonTrack &track);
b673a083 71 Bool_t IsGoodMUONtrack(AliAODTrack &track);
beb13b6c 72 Double_t DeltaPhi(Double_t phia, Double_t phib,
be8a5cdb 73 Double_t rangeMin = -TMath::Pi()/2,
74 Double_t rangeMax = 3*TMath::Pi()/2) const;
d688e049 75 Int_t Correlate(const MiniEvent &arr1, const MiniEvent &arr2, Int_t pairing = kSameEvt);
be8a5cdb 76 void UserCreateOutputObjects();
77 void UserExec(Option_t *option);
78 void Terminate(Option_t *);
48a61f36 79
80 private:
8a9d3e12 81 Int_t fVerbosity; // 0 = silence
beb13b6c 82 Double_t fEtaMax; // Max |eta| cut for standard ESD or AOD analysis
8a9d3e12 83 Double_t fZVtxMax; // Max |z| cut (cm)
84 Double_t fPtMin; // Min pt cut
85 Double_t fPtMax; // Max pt cut
86 Int_t fTrackDepth; // #tracks to fill pool
87 Int_t fPoolSize; // Maximum number of events
88 TString fTracksName; // name of track collection
beb13b6c 89 Bool_t fDoWeights; // if true weight with 1/N per event
90 Bool_t fFillMuons; // fill the muon tracks into the mini event
b422cf0d 91 Bool_t fPtTACrit; // use the pTT > pTA criterion?
e47b8f11 92 Bool_t fAllTAHists; // create all pTT,pTA combination hists, even t<a?
d7149d30 93 Bool_t fMixInEtaT; // mix in bins of eta_T instead of z_vertex
beb13b6c 94 Double_t fEtaTLo; // Min eta for triggers
95 Double_t fEtaTHi; // Max eta for triggers
96 Double_t fEtaALo; // Min eta for associated
97 Double_t fEtaAHi; // Max eta for associated
8a9d3e12 98 AliESDEvent *fESD; //! ESD object
99 AliAODEvent *fAOD; //! AOD object
100 TList *fOutputList; //! Output list
101 TH2 *fHEvt; //! Cent vs vtx.
102 TH2 *fHTrk; //! Phi vs Eta
103 TH1 *fHPtAss; //! Pt ass
104 TH1 *fHPtTrg; //! Pt trg
beb13b6c 105 TH1 *fHPtTrgEvt; //! Pt trg per event for weighting
106 TH3 *fHPtTrgNorm1S; //! Pt trg same events in cent. and zvtx bins, method 1
107 TH3 *fHPtTrgNorm1M; //! Pt trg mixed events in cent. and zvtx bins, method 1
108 TH3 *fHPtTrgNorm2S; //! Pt trg same events in cent. and zvtx bins, method 2
109 TH3 *fHPtTrgNorm2M; //! Pt trg mixed events in cent. and zvtx bins, method 2
8a9d3e12 110 TH1 *fHCent; //! Centrality
111 TH1 *fHZvtx; //! Zvertex
112 Int_t fNbins; //! Number of histogram bins
113 TH2 **fHSs; //! Same-evt correlations
114 TH2 **fHMs; //! Diff-evt correlations
380fb711 115 TH1 **fHPts; //! Pt distributions
116 TH3 *fHQAT; //! trigger particle distribution for QA
117 TH3 *fHQAA; //! associated particle distribution for QA
d7149d30 118 TH2 *fHPtCentT; //! trigger pT vs centrality
119 TH2 *fHPtCentA; //! associated pT vs centrality
8a9d3e12 120 TFormula *fIndex; //! Index for histograms
121 Double_t fCentrality; //! V0M for now
122 Double_t fZVertex; //! Of current event
123 AliESDtrackCuts *fEsdTPCOnly; //! Track cuts
124 AliEvtPoolManager *fPoolMgr; //! Event mixer
125 TString fCentMethod; // centrality selection method
126 Int_t fNBdeta; // no. deta bins
127 Int_t fNBdphi; // no. dphi bins
128 TAxis *fBPtT; // ptt binning
129 TAxis *fBPtA; // pta binning
130 TAxis *fBCent; // centrality binning
131 TAxis *fBZvtx; // zvtx binning
132 TAxis *fMixBCent; // centrality binning for mixing
133 TAxis *fMixBZvtx; // zvtx binning for mixing
beb13b6c 134 THnF *fHEffT; // efficiency for trigger particles
135 THnF *fHEffA; // efficiency for associate particles
48a61f36 136
137 AliDhcTask(const AliDhcTask&); // not implemented
138 AliDhcTask &operator=(const AliDhcTask&); // not implemented
139
15b0d1bb 140 ClassDef(AliDhcTask, 4);
48a61f36 141};
142
143#endif