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