Coding rules and bug fix in AliMUONTriggerGUI (select the right digit store from...
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowAnalysisWithQCumulants.h
CommitLineData
bc92c0cb 1/*
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved.
3 * See cxx source for full Copyright notice
4 * $Id$
5 */
6
7/**********************************
8 * flow analysis with Q-cumulants *
9 * *
10 * author: Ante Bilandzic *
11 * (anteb@nikhef.nl) *
12 *********************************/
13
52021ae2 14#ifndef ALIFLOWANALYSISWITHQCUMULANTS_H
15#define ALIFLOWANALYSISWITHQCUMULANTS_H
bc92c0cb 16
52021ae2 17#include "AliFlowCommonConstants.h"//needed as include
bc92c0cb 18
19class TObjArray;
20class TList;
21class TFile;
e085f1a9 22class TGraph;
bc92c0cb 23
24class TH1;
25class TProfile;
bc92c0cb 26
27class AliFlowEventSimple;
28class AliFlowTrackSimple;
52021ae2 29class AliFlowVector;
30
bc92c0cb 31class AliFlowCommonHist;
32class AliFlowCommonHistResults;
bc92c0cb 33
34//================================================================================================================
35
36class AliFlowAnalysisWithQCumulants{
37 public:
38 AliFlowAnalysisWithQCumulants();
39 virtual ~AliFlowAnalysisWithQCumulants();
40
e085f1a9 41 virtual void Init();
bc92c0cb 42 virtual void Make(AliFlowEventSimple* anEvent);
43 virtual void Finish();
4057ba99 44 virtual void WriteHistograms(TString outputFileName);
8842fb2b 45
46//----------------------------------------------------------------------------------------------------------------
47// setters and getters
48//----------------------------------------------------------------------------------------------------------------
1315fe58 49 TList* GetHistList() const {return this->fHistList;} //output histogram list
bc92c0cb 50
52021ae2 51 void SetIntFlowResults(TH1D* const ifr) {this->fIntFlowResultsQC = ifr;};
52 TH1D* GetIntFlowResults() const {return this->fIntFlowResultsQC;};
8842fb2b 53
52021ae2 54 void SetDiffFlowResults2nd(TH1D* const diff2nd) {this->fDiffFlowResults2ndOrderQC = diff2nd;};
55 TH1D* GetDiffFlowResults2nd() const {return this->fDiffFlowResults2ndOrderQC;};
8842fb2b 56
52021ae2 57 void SetDiffFlowResults4th(TH1D* const diff4th) {this->fDiffFlowResults4thOrderQC = diff4th;};
58 TH1D* GetDiffFlowResults4th() const {return this->fDiffFlowResults4thOrderQC;};
8842fb2b 59
52021ae2 60 void SetCovariances(TH1D* const cov) {this->fCovariances = cov;};
61 TH1D* GetCovariances() const {return this->fCovariances;};
8842fb2b 62
7e58a232 63 void SetCommonHists2nd(AliFlowCommonHist* const ch2nd) {this->fCommonHists2nd = ch2nd;};
64 AliFlowCommonHist* GetCommonHists2nd() const {return this->fCommonHists2nd;};
65
66 void SetCommonHists4th(AliFlowCommonHist* const ch4th) {this->fCommonHists4th = ch4th;};
67 AliFlowCommonHist* GetCommonHists4th() const {return this->fCommonHists4th;};
68
69 void SetCommonHists6th(AliFlowCommonHist* const ch6th) {this->fCommonHists6th = ch6th;};
70 AliFlowCommonHist* GetCommonHists6th() const {return this->fCommonHists6th;};
71
72 void SetCommonHists8th(AliFlowCommonHist* const ch8th) {this->fCommonHists8th = ch8th;};
73 AliFlowCommonHist* GetCommonHists8th() const {return this->fCommonHists8th;};
74
52021ae2 75 void SetCommonHistsResults2nd(AliFlowCommonHistResults* const chr2nd) {this->fCommonHistsResults2nd = chr2nd;};
76 AliFlowCommonHistResults* GetCommonHistsResults2nd() const {return this->fCommonHistsResults2nd;};
8842fb2b 77
52021ae2 78 void SetCommonHistsResults4th(AliFlowCommonHistResults* const chr4th) {this->fCommonHistsResults4th = chr4th;};
79 AliFlowCommonHistResults* GetCommonHistsResults4th() const {return this->fCommonHistsResults4th;};
8842fb2b 80
52021ae2 81 void SetCommonHistsResults6th(AliFlowCommonHistResults* const chr6th) {this->fCommonHistsResults6th = chr6th;};
82 AliFlowCommonHistResults* GetCommonHistsResults6th() const {return this->fCommonHistsResults6th;};
8842fb2b 83
52021ae2 84 void SetCommonHistsResults8th(AliFlowCommonHistResults* const chr8th) {this->fCommonHistsResults8th = chr8th;};
85 AliFlowCommonHistResults* GetCommonHistsResults8th() const {return this->fCommonHistsResults8th;};
8842fb2b 86
52021ae2 87 void SetAverageMultiplicity(TProfile* const am) {this->fAvMultIntFlowQC = am;};
88 TProfile* GetAverageMultiplicity() const {return this->fAvMultIntFlowQC;};
8842fb2b 89
e085f1a9 90 void SetQvectorForEachEventX(TProfile* const qvfeex) {this->fQvectorForEachEventX = qvfeex;};
91 TProfile* GetQvectorForEachEventX() const {return this->fQvectorForEachEventX;};
92
93 void SetQvectorForEachEventY(TProfile* const qvfeey) {this->fQvectorForEachEventY = qvfeey;};
94 TProfile* GetQvectorForEachEventY() const {return this->fQvectorForEachEventY;};
95
52021ae2 96 void SetQCorrelations(TProfile* const QCorr) {this->fQCorrelations = QCorr;};
97 TProfile* GetQCorrelations() const {return this->fQCorrelations;};
8842fb2b 98
52021ae2 99 void SetQProduct(TProfile* const qp) {this->fQProduct = qp;};
100 TProfile* GetQProduct() const {return this->fQProduct;};
8842fb2b 101
52021ae2 102 void SetQVectorComponents(TProfile* const qvc) {this->fQvectorComponents = qvc;};
103 TProfile* GetQVectorComponents() const {return this->fQvectorComponents;};
8842fb2b 104
1dfa3c16 105 void SetTwo1n1nPerPtBinRP(TProfile* const pb2PerPtBin1n1nRP) {this->f2PerPtBin1n1nRP = pb2PerPtBin1n1nRP;};
106 TProfile* GetTwo1n1nPerPtBinRP() const {return this->f2PerPtBin1n1nRP;};
8842fb2b 107
1dfa3c16 108 void SetTwo2n2nPerPtBinRP(TProfile* const pb2PerPtBin2n2nRP) {this->f2PerPtBin2n2nRP = pb2PerPtBin2n2nRP;};
109 TProfile* GetTwo2n2nPerPtBinRP() const {return this->f2PerPtBin2n2nRP;};
8842fb2b 110
1dfa3c16 111 void SetThree2n1n1nPerPtBinRP(TProfile* const pb3PerPtBin2n1n1nRP) {this->f3PerPtBin2n1n1nRP = pb3PerPtBin2n1n1nRP;};
112 TProfile* GetThree2n1n1nPerPtBinRP() const {return this->f3PerPtBin2n1n1nRP;};
8842fb2b 113
1dfa3c16 114 void SetThree1n1n2nPerPtBinRP(TProfile* const pb3PerPtBin1n1n2nRP) {this->f3PerPtBin1n1n2nRP = pb3PerPtBin1n1n2nRP;};
115 TProfile* GetThree1n1n2nPerPtBinRP() const {return this->f3PerPtBin1n1n2nRP;};
8842fb2b 116
1dfa3c16 117 void SetFour1n1n1n1nPerPtBinRP(TProfile* const pb4PerPtBin1n1n1n1nRP) {this->f4PerPtBin1n1n1n1nRP = pb4PerPtBin1n1n1n1nRP;};
118 TProfile* GetFour1n1n1n1nPerPtBinRP() const {return this->f4PerPtBin1n1n1n1nRP;};
119
120 void SetTwo1n1nPerEtaBinRP(TProfile* const pb2PerEtaBin1n1nRP) {this->f2PerEtaBin1n1nRP = pb2PerEtaBin1n1nRP;};
121 TProfile* GetTwo1n1nPerEtaBinRP() const {return this->f2PerEtaBin1n1nRP;};
122
123 void SetTwo2n2nPerEtaBinRP(TProfile* const pb2PerEtaBin2n2nRP) {this->f2PerEtaBin2n2nRP = pb2PerEtaBin2n2nRP;};
124 TProfile* GetTwo2n2nPerEtaBinRP() const {return this->f2PerEtaBin2n2nRP;};
125
126 void SetThree2n1n1nPerEtaBinRP(TProfile* const pb3PerEtaBin2n1n1nRP) {this->f3PerEtaBin2n1n1nRP = pb3PerEtaBin2n1n1nRP;};
127 TProfile* GetThree2n1n1nPerEtaBinRP() const {return this->f3PerEtaBin2n1n1nRP;};
128
129 void SetThree1n1n2nPerEtaBinRP(TProfile* const pb3PerEtaBin1n1n2nRP) {this->f3PerEtaBin1n1n2nRP = pb3PerEtaBin1n1n2nRP;};
130 TProfile* GetThree1n1n2nPerEtaBinRP() const {return this->f3PerEtaBin1n1n2nRP;};
131
132 void SetFour1n1n1n1nPerEtaBinRP(TProfile* const pb4PerEtaBin1n1n1n1nRP) {this->f4PerEtaBin1n1n1n1nRP = pb4PerEtaBin1n1n1n1nRP;};
133 TProfile* GetFour1n1n1n1nPerEtaBinRP() const {return this->f4PerEtaBin1n1n1n1nRP;};
134
135 void SetTwo1n1nPerPtBinPOI(TProfile* const pb2PerPtBin1n1nPOI) {this->f2PerPtBin1n1nPOI = pb2PerPtBin1n1nPOI;};
136 TProfile* GetTwo1n1nPerPtBinPOI() const {return this->f2PerPtBin1n1nPOI;};
137
138 void SetTwo2n2nPerPtBinPOI(TProfile* const pb2PerPtBin2n2nPOI) {this->f2PerPtBin2n2nPOI = pb2PerPtBin2n2nPOI;};
139 TProfile* GetTwo2n2nPerPtBinPOI() const {return this->f2PerPtBin2n2nPOI;};
140
141 void SetThree2n1n1nPerPtBinPOI(TProfile* const pb3PerPtBin2n1n1nPOI) {this->f3PerPtBin2n1n1nPOI = pb3PerPtBin2n1n1nPOI;};
142 TProfile* GetThree2n1n1nPerPtBinPOI() const {return this->f3PerPtBin2n1n1nPOI;};
143
144 void SetThree1n1n2nPerPtBinPOI(TProfile* const pb3PerPtBin1n1n2nPOI) {this->f3PerPtBin1n1n2nPOI = pb3PerPtBin1n1n2nPOI;};
145 TProfile* GetThree1n1n2nPerPtBinPOI() const {return this->f3PerPtBin1n1n2nPOI;};
146
147 void SetFour1n1n1n1nPerPtBinPOI(TProfile* const pb4PerPtBin1n1n1n1nPOI) {this->f4PerPtBin1n1n1n1nPOI = pb4PerPtBin1n1n1n1nPOI;};
148 TProfile* GetFour1n1n1n1nPerPtBinPOI() const {return this->f4PerPtBin1n1n1n1nPOI;};
149
150 void SetTwo1n1nPerEtaBinPOI(TProfile* const pb2PerEtaBin1n1nPOI) {this->f2PerEtaBin1n1nPOI = pb2PerEtaBin1n1nPOI;};
151 TProfile* GetTwo1n1nPerEtaBinPOI() const {return this->f2PerEtaBin1n1nPOI;};
152
153 void SetTwo2n2nPerEtaBinPOI(TProfile* const pb2PerEtaBin2n2nPOI) {this->f2PerEtaBin2n2nPOI = pb2PerEtaBin2n2nPOI;};
154 TProfile* GetTwo2n2nPerEtaBinPOI() const {return this->f2PerEtaBin2n2nPOI;};
155
156 void SetThree2n1n1nPerEtaBinPOI(TProfile* const pb3PerEtaBin2n1n1nPOI) {this->f3PerEtaBin2n1n1nPOI = pb3PerEtaBin2n1n1nPOI;};
157 TProfile* GetThree2n1n1nPerEtaBinPOI() const {return this->f3PerEtaBin2n1n1nPOI;};
158
159 void SetThree1n1n2nPerEtaBinPOI(TProfile* const pb3PerEtaBin1n1n2nPOI) {this->f3PerEtaBin1n1n2nPOI = pb3PerEtaBin1n1n2nPOI;};
160 TProfile* GetThree1n1n2nPerEtaBinPOI() const {return this->f3PerEtaBin1n1n2nPOI;};
161
162 void SetFour1n1n1n1nPerEtaBinPOI(TProfile* const pb4PerEtaBin1n1n1n1nPOI) {this->f4PerEtaBin1n1n1n1nPOI = pb4PerEtaBin1n1n1n1nPOI;};
163 TProfile* GetFour1n1n1n1nPerEtaBinPOI() const {return this->f4PerEtaBin1n1n1n1nPOI;};
8842fb2b 164
52021ae2 165 void SetDirectCorrelations(TProfile* const dc) {this->fDirectCorrelations = dc;};
166 TProfile* GetDirectCorrelations() const {return this->fDirectCorrelations;};
e085f1a9 167
168 void SetPhiWeights(TH1F const phiW) { this->fPhiWeights = phiW; this->fUsePhiWeights = kTRUE;};
169 TH1F GetPhiWeights() const { return this->fPhiWeights;};
170
171 void SetPtWeights(TH1D const ptW) { this->fPtWeights = ptW; ; this->fUsePtWeights = kTRUE;};
172 TH1D GetPtWeights() const { return this->fPtWeights;};
173
174 void SetEtaWeights(TH1D const etaW) { this->fEtaWeights = etaW; ; this->fUseEtaWeights = kTRUE;};
175 TH1D GetEtaWeights() const { return this->fEtaWeights;};
8842fb2b 176//----------------------------------------------------------------------------------------------------------------
177
bc92c0cb 178 private:
179 AliFlowAnalysisWithQCumulants(const AliFlowAnalysisWithQCumulants& afawQc);
180 AliFlowAnalysisWithQCumulants& operator=(const AliFlowAnalysisWithQCumulants& afawQc);
8842fb2b 181
182 AliFlowTrackSimple* fTrack; //track
183 TList* fHistList; //list to hold all output histograms
184 TProfile* fAvMultIntFlowQC; //average selected multiplicity (for int. flow)
bc92c0cb 185
8842fb2b 186 TProfile* fQvectorComponents; //averages of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, ...)
bc92c0cb 187
8842fb2b 188 TH1D* fIntFlowResultsQC; //integrated flow results from Q-cumulants
189 TH1D* fDiffFlowResults2ndOrderQC; //differential flow results from 2nd order Q-cumulant
190 TH1D* fDiffFlowResults4thOrderQC; //differential flow results from 4th order Q-cumulant
191 TH1D* fCovariances; //final results for covariances: 1st bin: <2*4>-<2>*<4>, 2nd bin: <2*6>-<2>*<6>, ...
192
e085f1a9 193 TProfile* fQvectorForEachEventX; //profile containing the x-components of Q-vectors from all events (to be removed)
194 TProfile* fQvectorForEachEventY; //profile containing the y-components of Q-vectors from all events (to be removed)
8842fb2b 195 TProfile* fQCorrelations; //multi-particle correlations calculated from Q-vectors
196 TProfile* fQProduct; //average of products: 1st bin: <2*4>, 2nd bin: <2*6>, ...
197
198 TProfile* fDirectCorrelations; //multi-particle correlations calculated with nested loop
8842fb2b 199
1dfa3c16 200 //RP (Reaction Plane particles):
201 TProfile* fPtReq1nRP; //real part of q-vector evaluated in harmonic n for each pt-bin
202 TProfile* fPtImq1nRP; //imaginary part of q-vector evaluated in harmonic n for each pt-bin
203 TProfile* fPtReq2nRP; //real part of q-vector evaluated in harmonic 2n for each pt-bin
204 TProfile* fPtImq2nRP; //imaginary part of q-vector evaluated in harmonic 2n for each pt-bin
205
206 TProfile* f2PerPtBin1n1nRP; //<<2'>>_{n|n} per pt-bin
207 TProfile* f2PerPtBin2n2nRP; //<<2'>>_{2n|2n} per pt-bin
208 TProfile* f3PerPtBin2n1n1nRP; //<<3'>>_{2n|n,n} per pt-bin
209 TProfile* f3PerPtBin1n1n2nRP; //<<3'>>_{n,n|2n} per pt-bin
210 TProfile* f4PerPtBin1n1n1n1nRP; //<<4'>>_{n,n|n,n} per pt-bin
211
212 TProfile* fEtaReq1nRP; //real part of q-vector evaluated in harmonic n for each eta-bin
213 TProfile* fEtaImq1nRP; //imaginary part of q-vector evaluated in harmonic n for each eta-bin
214 TProfile* fEtaReq2nRP; //real part of q-vector evaluated in harmonic 2n for each eta-bin
215 TProfile* fEtaImq2nRP; //imaginary part of q-vector evaluated in harmonic 2n for each eta-bin
216
217 TProfile* f2PerEtaBin1n1nRP; //<<2'>>_{n|n} per eta-bin
218 TProfile* f2PerEtaBin2n2nRP; //<<2'>>_{2n|2n} per eta-bin
219 TProfile* f3PerEtaBin2n1n1nRP; //<<3'>>_{2n|n,n} per eta-bin
220 TProfile* f3PerEtaBin1n1n2nRP; //<<3'>>_{n,n|2n} per eta-bin
221 TProfile* f4PerEtaBin1n1n1n1nRP; //<<4'>>_{n,n|n,n} per eta-bin
222
223 //POI (Particles Of Interest):
4057ba99 224 TProfile* fPtReq1nPrimePOI; //real part of q'-vector evaluated in harmonic n for each pt-bin
225 TProfile* fPtImq1nPrimePOI; //imaginary part of q'-vector evaluated in harmonic n for each pt-bin
226 TProfile* fPtReq2nPrimePOI; //real part of q'-vector evaluated in harmonic 2n for each pt-bin
227 TProfile* fPtImq2nPrimePOI; //imaginary part of q'-vector evaluated in harmonic 2n for each pt-bin
228 TProfile* fmPrimePerPtBin; //number of particles selected both as POI and not as RP per each pt-bin
229
230 TProfile* fPtReq1nPrimePrimePOI; //real part of q''-vector evaluated in harmonic n for each pt-bin
231 TProfile* fPtImq1nPrimePrimePOI; //imaginary part of q''-vector evaluated in harmonic n for each pt-bin
232 TProfile* fPtReq2nPrimePrimePOI; //real part of q''-vector evaluated in harmonic 2n for each pt-bin
233 TProfile* fPtImq2nPrimePrimePOI; //imaginary part of q''-vector evaluated in harmonic 2n for each pt-bin
234 TProfile* fmPrimePrimePerPtBin; //number of particles selected both as RP and POI per each pt-bin
235
236 TProfile* fEtaReq1nPrimePOI; //real part of q'-vector evaluated in harmonic n for each eta-bin
237 TProfile* fEtaImq1nPrimePOI; //imaginary part of q'-vector evaluated in harmonic n for each eta-bin
238 TProfile* fEtaReq2nPrimePOI; //real part of q'-vector evaluated in harmonic 2n for each eta-bin
239 TProfile* fEtaImq2nPrimePOI; //imaginary part of q'-vector evaluated in harmonic 2n for each eta-bin
240 TProfile* fmPrimePerEtaBin; //number of particles selected both as POI and not as RP per each eta-bin
e085f1a9 241
4057ba99 242 TProfile* fEtaReq1nPrimePrimePOI; //real part of q''-vector evaluated in harmonic n for each eta-bin
243 TProfile* fEtaImq1nPrimePrimePOI; //imaginary part of q''-vector evaluated in harmonic n for each eta-bin
244 TProfile* fEtaReq2nPrimePrimePOI; //real part of q''-vector evaluated in harmonic 2n for each eta-bin
245 TProfile* fEtaImq2nPrimePrimePOI; //imaginary part of q''-vector evaluated in harmonic 2n for each eta-bin
246 TProfile* fmPrimePrimePerEtaBin; //number of particles selected both as RP and POI in each eta-bin
247
1dfa3c16 248 TProfile* f2PerPtBin1n1nPOI; //<<2'>>_{n|n} per pt-bin
249 TProfile* f2PerPtBin2n2nPOI; //<<2'>>_{2n|2n} per pt-bin
250 TProfile* f3PerPtBin2n1n1nPOI; //<<3'>>_{2n|n,n} per pt-bin
251 TProfile* f3PerPtBin1n1n2nPOI; //<<3'>>_{n,n|2n} per pt-bin
252 TProfile* f4PerPtBin1n1n1n1nPOI; //<<4'>>_{n,n|n,n} per pt-bin
1dfa3c16 253
254 TProfile* f2PerEtaBin1n1nPOI; //<<2'>>_{n|n} per eta-bin
255 TProfile* f2PerEtaBin2n2nPOI; //<<2'>>_{2n|2n} per eta-bin
256 TProfile* f3PerEtaBin2n1n1nPOI; //<<3'>>_{2n|n,n} per eta-bin
257 TProfile* f3PerEtaBin1n1n2nPOI; //<<3'>>_{n,n|2n} per eta-bin
258 TProfile* f4PerEtaBin1n1n1n1nPOI; //<<4'>>_{n,n|n,n} per eta-bin
bc92c0cb 259
7e58a232 260 AliFlowCommonHist* fCommonHists2nd; //common control histograms (taking into account only the events with 2 and more particles)
261 AliFlowCommonHist* fCommonHists4th; //common control histograms (taking into account only the events with 4 and more particles)
262 AliFlowCommonHist* fCommonHists6th; //common control histograms (taking into account only the events with 6 and more particles)
263 AliFlowCommonHist* fCommonHists8th; //common control histograms (taking into account only the events with 8 and more particles)
bc92c0cb 264
1315fe58 265 AliFlowCommonHistResults* fCommonHistsResults2nd; //final results for 2nd order int. and diff. flow stored in the common histograms
266 AliFlowCommonHistResults* fCommonHistsResults4th; //final results for 4th order int. and diff. flow stored in the common histograms
267 AliFlowCommonHistResults* fCommonHistsResults6th; //final results for 6th order int. and diff. flow stored in the common histograms
268 AliFlowCommonHistResults* fCommonHistsResults8th; //final results for 8th order int. and diff. flow stored in the common histograms
1315fe58 269
5e838eeb 270 TH1D* f2pDistribution; //distribution of <2>_{n|n}
271 TH1D* f4pDistribution; //distribution of <4>_{n,n|n,n}
272 TH1D* f6pDistribution; //distribution of <6>_{n,n,n|n,n,n}
273 TH1D* f8pDistribution; //distribution of <8>_{n,n,n,n|n,n,n,n}
dee1e0e0 274
8842fb2b 275 Int_t fnBinsPt; //number of pt bins
52021ae2 276 Double_t fPtMin; //minimum pt
1dfa3c16 277 Double_t fPtMax; //maximum pt
278
279 Int_t fnBinsEta; //number of eta bins
280 Double_t fEtaMin; //minimum eta
e085f1a9 281 Double_t fEtaMax; //maximum eta
282 Int_t fEventCounter; //counting the number of events
283
284 Bool_t fUsePhiWeights; // phi weights
285 Bool_t fUsePtWeights; // v_2(pt) weights
286 Bool_t fUseEtaWeights; // v_2(eta) weights
287 TH1F fPhiWeights; // histogram with phi weights
288 TH1D fPtWeights; // histogram with v_2(pt) weights
289 TH1D fEtaWeights; // histogram with v_2(eta) weights
52021ae2 290
bc92c0cb 291 ClassDef(AliFlowAnalysisWithQCumulants, 0);
292};
293
294//================================================================================================================
295
296#endif
297
298
299
300
301