]>
Commit | Line | Data |
---|---|---|
43d6f3d4 | 1 | // -*- C++ -*- |
2 | // $Id: AliAnalysisTaskLongRangeCorrelations.h 341 2013-09-30 15:59:19Z cmayer $ | |
3 | #ifndef _AliAnalysisTaskLongRangeCorrelations_H_ | |
4 | #define _AliAnalysisTaskLongRangeCorrelations_H_ | |
5 | ||
6 | /* Copyright(c) 2012, ALICE Experiment at CERN, All rights reserved. * | |
7 | * See cxx source for full Copyright notice */ | |
8 | ||
9 | //////////////////////////////////////////////////////////////////////// | |
10 | // | |
11 | // Analysis class for Long-range Correlations | |
12 | // | |
13 | // Look for correlations in eta (and in phi) | |
14 | // | |
15 | // This class needs input AODs. | |
16 | // The output is a list of analysis-specific containers. | |
17 | // | |
18 | // Author: | |
19 | // Christoph Mayer | |
20 | // | |
21 | //////////////////////////////////////////////////////////////////////// | |
22 | ||
23 | ||
24 | class TAxis; | |
25 | class TClonesArray; | |
26 | class TList; | |
27 | class TObjArray; | |
28 | ||
29 | class AliAODEvent; | |
30 | class AliAODHeader; | |
31 | class AliEventPoolManager; | |
32 | class AliTHn; | |
33 | ||
34 | #include <TObject.h> | |
35 | #include "AliAnalysisTaskSE.h" | |
36 | ||
37 | class AliAnalysisTaskLongRangeCorrelations : public AliAnalysisTaskSE { | |
38 | public: | |
39 | AliAnalysisTaskLongRangeCorrelations(const char *name="AliAnalysisTaskLongRangeCorrelations"); | |
40 | virtual ~AliAnalysisTaskLongRangeCorrelations(); | |
41 | ||
42 | /* virtual void NotifyRun(); */ | |
43 | virtual void UserCreateOutputObjects(); | |
44 | virtual void UserExec(Option_t *); | |
45 | virtual void Terminate(Option_t *); | |
46 | ||
47 | void SetRunMixing(Bool_t runMixing) { fRunMixing = runMixing; } | |
48 | void SetMixingTracks(Int_t mixingTracks) { fMixingTracks = mixingTracks; } | |
49 | void SetTrackFilter(Int_t trackFilter) { fTrackFilter = trackFilter; } | |
50 | ||
51 | void SetCentralityRange(Double_t centMin, Double_t centMax) { | |
52 | fCentMin = centMin; fCentMax = centMax; | |
53 | } | |
54 | void SetPtRange(Double_t ptMin, Double_t ptMax) { | |
55 | fPtMin = ptMin; fPtMax = ptMax; | |
56 | } | |
57 | void SetPhiRange(Double_t phiMin, Double_t phiMax) { | |
58 | fPhiMin = phiMin; fPhiMax = phiMax; | |
59 | } | |
60 | void SetMaxAbsVertexZ(Double_t maxAbsVertexZ) { fMaxAbsVertexZ = maxAbsVertexZ; } | |
61 | ||
62 | void SetSelectPrimaryMCParticles(Int_t flagMC, Int_t flagMCData) { | |
63 | fSelectPrimaryMCParticles = flagMC; | |
64 | fSelectPrimaryMCDataParticles = flagMCData; | |
65 | } | |
66 | ||
67 | void SetRangeN(Int_t nMin, Int_t nMax) { | |
68 | fNMin = nMin; | |
69 | fNMax = nMax; | |
70 | } | |
71 | ||
72 | TString GetOutputListName() const; | |
73 | ||
74 | protected: | |
75 | // for now up to second moments: | |
76 | // <n_1>(phi_1,eta_1) | |
77 | // <n_2>(phi_2,eta_2) | |
78 | // <n_1, n_2>(phi_1,eta_1;phi_2,eta_2) | |
79 | void CalculateMoments(TString, TObjArray*, TObjArray*, Double_t, Double_t); | |
80 | void ComputeNXForThisEvent(TObjArray*, const char*, Double_t, Double_t); | |
81 | THnSparse* ComputeNForThisEvent(TObjArray*, const char*, Double_t) const; | |
82 | void FillNEtaHist(TString, THnSparse*, Double_t); | |
83 | ||
84 | TObjArray* GetAcceptedTracks(AliAODEvent*, TClonesArray*, Double_t); | |
85 | TObjArray* GetAcceptedTracks(TClonesArray*, Double_t); | |
86 | ||
87 | // filling histograms by name | |
88 | void Fill(const char*, Double_t); // TH1 weight=1 | |
89 | void Fill(const char*, Double_t, Double_t ); // TH2 weight=1 | |
90 | void Fill(const char*, Double_t, Double_t, Double_t); // TH3 weight=1 | |
91 | void Fill(const char*, const Double_t*, Double_t weight=1); // THnSparse | |
92 | ||
93 | void SetupForMixing(); | |
94 | ||
95 | THnSparse* MakeHistSparsePhiEta(const char* name) const; | |
96 | AliTHn* MakeHistPhiEta(const char* name) const; | |
97 | AliTHn* MakeHistPhiEtaPhiEta(const char* name) const; | |
98 | ||
99 | private: | |
100 | TList* fOutputList; //! Output list | |
101 | TAxis* fVertexZ; //! vertex z bins | |
102 | Bool_t fRunMixing; // | |
103 | AliEventPoolManager* fPoolMgr; //! event pool manager | |
104 | Int_t fMixingTracks; // | |
105 | Int_t fTrackFilter; // | |
106 | Double_t fCentMin, fCentMax; // centrality range | |
107 | Double_t fPtMin, fPtMax; // P_{T} range | |
108 | Double_t fPhiMin, fPhiMax; // #phi range | |
109 | Double_t fMaxAbsVertexZ; // max abs(zvertex) | |
110 | Int_t fSelectPrimaryMCParticles; // 0: no, 1: yes, -1: only non-primary particles | |
111 | Int_t fSelectPrimaryMCDataParticles; // 0: no, 1: yes, -1: only non-primary particles | |
112 | Int_t fNMin; | |
113 | Int_t fNMax; | |
114 | // histogram data | |
115 | Int_t fnBinsCent, fnBinsPt, fnBinsPhi, fnBinsEta; | |
116 | Double_t fxMinCent, fxMinPt, fxMinPhi, fxMinEta; | |
117 | Double_t fxMaxCent, fxMaxPt, fxMaxPhi, fxMaxEta; | |
118 | ||
119 | AliAnalysisTaskLongRangeCorrelations(const AliAnalysisTaskLongRangeCorrelations&); // not implemented | |
120 | AliAnalysisTaskLongRangeCorrelations& operator=(const AliAnalysisTaskLongRangeCorrelations&); // not implemented | |
121 | ||
122 | ClassDef(AliAnalysisTaskLongRangeCorrelations, 1); | |
123 | } ; | |
124 | ||
125 | class LRCParticle : public TObject { | |
126 | public: | |
127 | LRCParticle(Double_t eta=0, Double_t phi=0) | |
128 | : fEta(eta), fPhi(phi) {} | |
129 | virtual ~LRCParticle() {} | |
130 | ||
131 | Double_t Eta() const { return fEta; } | |
132 | Double_t Phi() const { return fPhi; } | |
133 | ||
134 | protected: | |
135 | private: | |
136 | LRCParticle(const LRCParticle&); | |
137 | LRCParticle& operator=(const LRCParticle&); | |
138 | ||
139 | Double_t fEta; | |
140 | Double_t fPhi; | |
141 | ClassDef(LRCParticle, 1); | |
142 | } ; | |
143 | #endif // _AliAnalysisTaskLongRangeCorrelations_H_ | |
144 |