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