]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithCumulants.cxx
bugfix: selection of block collections for HLTOUT blocks now safely working
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowAnalysisWithCumulants.cxx
CommitLineData
2188af53 1/*************************************************************************
2* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
3* *
4* Author: The ALICE Off-line Project. *
5* Contributors are mentioned in the code where appropriate. *
6* *
7* Permission to use, copy, modify and distribute this software and its *
8* documentation strictly for non-commercial purposes is hereby granted *
9* without fee, provided that the above copyright notice appears in all *
10* copies and that both the copyright notice and this permission notice *
11* appear in the supporting documentation. The authors make no claims *
12* about the suitability of this software for any purpose. It is *
13* provided "as is" without express or implied warranty. *
14**************************************************************************/
15
16/********************************
17 * flow analysis with cumulants *
18 * *
19 * author: Ante Bilandzic *
20 * (anteb@nikhef.nl) *
21 *******************************/
22
f1d945a1 23#define AliFlowAnalysisWithCumulants_cxx
24
25#include "Riostream.h"
26#include "AliFlowCommonConstants.h"
27#include "AliFlowCommonHist.h"
28#include "AliFlowCommonHistResults.h"
29#include "TChain.h"
30#include "TFile.h"
aaebd73d 31#include "TList.h" //NEW
f1d945a1 32#include "TParticle.h"
2188af53 33#include "TRandom3.h"
aaebd73d 34#include "TProfile.h"
35#include "TProfile2D.h"
36#include "TProfile3D.h"
f1d945a1 37#include "AliFlowEventSimple.h"
38#include "AliFlowTrackSimple.h"
39#include "AliFlowAnalysisWithCumulants.h"
40#include "AliFlowCumuConstants.h"
1315fe58 41#include "AliCumulantsFunctions.h"
f1d945a1 42
43class TH1;
44class TGraph;
45class TPave;
46class TLatex;
47class TMarker;
48class TRandom3;
49class TObjArray;
50class TList;
51class TCanvas;
52class TSystem;
53class TROOT;
f1d945a1 54class AliFlowVector;
55class TVector;
56
2188af53 57//================================================================================================================
f1d945a1 58
59ClassImp(AliFlowAnalysisWithCumulants)
60
f1d945a1 61AliFlowAnalysisWithCumulants::AliFlowAnalysisWithCumulants():
2188af53 62 fTrack(NULL),
63 fHistList(NULL),
e5e75b58 64 fWeightsList(NULL),
2188af53 65 fR0(0),
66 fPtMax(0),
67 fPtMin(0),
813a4157 68 fBinWidthPt(0),
69 fgknBinsPt(0),
70 fEtaMax(0),
71 fEtaMin(0),
72 fBinWidthEta(0),
73 fgknBinsEta(0),
2188af53 74 fAvQx(0),
75 fAvQy(0),
76 fAvQ2x(0),
77 fAvQ2y(0),
52021ae2 78 fAvMultIntFlowGFC(NULL),
79 fQVectorComponentsGFC(NULL),
80 fIntFlowResultsGFC(NULL),
81 fDiffFlowResults2ndOrderGFC(NULL),
82 fDiffFlowResults4thOrderGFC(NULL),
83 fDiffFlowResults6thOrderGFC(NULL),
84 fDiffFlowResults8thOrderGFC(NULL),
85 fCommonHistsResults2nd(NULL),
86 fCommonHistsResults4th(NULL),
87 fCommonHistsResults6th(NULL),
88 fCommonHistsResults8th(NULL),
2188af53 89 fIntFlowGenFun(NULL),
cb308e83 90 fIntFlowGenFun4(NULL),//(only for other system of Eq.)
91 fIntFlowGenFun6(NULL),//(only for other system of Eq.)
92 fIntFlowGenFun8(NULL),//(only for other system of Eq.)
93 fIntFlowGenFun16(NULL),//(only for other system of Eq.)
94 fAvMultIntFlow4GFC(NULL),//(only for other system of Eq.)
95 fAvMultIntFlow6GFC(NULL),//(only for other system of Eq.)
96 fAvMultIntFlow8GFC(NULL),//(only for other system of Eq.)
97 fAvMultIntFlow16GFC(NULL),//(only for other system of Eq.)
813a4157 98 fDiffFlowPtRPGenFunRe(NULL),
99 fDiffFlowPtRPGenFunIm(NULL),
100 fPtBinRPNoOfParticles(NULL),
101 fDiffFlowEtaRPGenFunRe(NULL),
102 fDiffFlowEtaRPGenFunIm(NULL),
103 fEtaBinRPNoOfParticles(NULL),
104 fDiffFlowPtPOIGenFunRe(NULL),
105 fDiffFlowPtPOIGenFunIm(NULL),
106 fPtBinPOINoOfParticles(NULL),
107 fDiffFlowEtaPOIGenFunRe(NULL),
108 fDiffFlowEtaPOIGenFunIm(NULL),
109 fEtaBinPOINoOfParticles(NULL),
52021ae2 110 /*
2188af53 111 fDiffFlowGenFunRe0(NULL),
112 fDiffFlowGenFunRe1(NULL),
113 fDiffFlowGenFunRe2(NULL),
114 fDiffFlowGenFunRe3(NULL),
115 fDiffFlowGenFunRe4(NULL),
116 fDiffFlowGenFunRe5(NULL),
117 fDiffFlowGenFunRe6(NULL),
118 fDiffFlowGenFunRe7(NULL),
119 fDiffFlowGenFunIm0(NULL),
120 fDiffFlowGenFunIm1(NULL),
121 fDiffFlowGenFunIm2(NULL),
122 fDiffFlowGenFunIm3(NULL),
123 fDiffFlowGenFunIm4(NULL),
124 fDiffFlowGenFunIm5(NULL),
125 fDiffFlowGenFunIm6(NULL),
126 fDiffFlowGenFunIm7(NULL),
52021ae2 127 */
b6cd16a9 128 fCommonHists(NULL),
e5e75b58 129 fOtherEquations(kFALSE),
130 fUsePhiWeights(kFALSE),
131 fUsePtWeights(kFALSE),
9dd53ff2 132 fUseEtaWeights(kFALSE),
133 fAverageOfSquaredWeight(NULL)
2188af53 134{
135 //constructor
52021ae2 136 fHistList = new TList();
e5e75b58 137 fWeightsList = new TList();
138 fWeightsList->SetName("Weights");
2188af53 139 fR0=AliFlowCumuConstants::fgR0;
813a4157 140 //Pt:
2188af53 141 fPtMax=AliFlowCommonConstants::GetPtMax();
142 fPtMin=AliFlowCommonConstants::GetPtMin();
813a4157 143 fgknBinsPt=AliFlowCommonConstants::GetNbinsPt();
144 if(fgknBinsPt)
145 {
146 fBinWidthPt=(fPtMax-fPtMin)/fgknBinsPt;
147 }
148 //Eta:
149 fEtaMax=AliFlowCommonConstants::GetEtaMax();
150 fEtaMin=AliFlowCommonConstants::GetEtaMin();
151 fgknBinsEta=AliFlowCommonConstants::GetNbinsEta();
152 if(fgknBinsEta)
52021ae2 153 {
813a4157 154 fBinWidthEta=(fEtaMax-fEtaMin)/fgknBinsEta;
52021ae2 155 }
813a4157 156
157 fOtherEquations=AliFlowCumuConstants::fgOtherEquations;
2188af53 158}
f1d945a1 159
2188af53 160AliFlowAnalysisWithCumulants::~AliFlowAnalysisWithCumulants()
161{
162 //desctructor
163 delete fHistList;
e5e75b58 164 delete fWeightsList;
f55e2cac 165}
729ec982 166
2188af53 167//================================================================================================================
168
e5e75b58 169void AliFlowAnalysisWithCumulants::Init()
2188af53 170{
171 //various output histograms
aaebd73d 172
52021ae2 173 //average multiplicity
9dd53ff2 174 fAvMultIntFlowGFC = new TProfile("fAvMultIntFlowGFC","Average Weighted Multiplicity",1,0,1,"s");
52021ae2 175 fAvMultIntFlowGFC->SetXTitle("");
176 fAvMultIntFlowGFC->SetYTitle("");
177 fAvMultIntFlowGFC->SetLabelSize(0.06);
178 fAvMultIntFlowGFC->SetMarkerStyle(25);
179 fAvMultIntFlowGFC->SetLabelOffset(0.01);
9dd53ff2 180 (fAvMultIntFlowGFC->GetXaxis())->SetBinLabel(1,"Average Weighted Multiplicity");
52021ae2 181 fHistList->Add(fAvMultIntFlowGFC);
aaebd73d 182
52021ae2 183 //averages of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, 3rd bin: <(Q_x)^2>, 4th bin: <(Q_y)^2>)
184 fQVectorComponentsGFC = new TProfile("fQVectorComponentsGFC","Average of Q-vector components",4,0.,4.);
185 fQVectorComponentsGFC->SetXTitle("");
186 fQVectorComponentsGFC->SetYTitle("");
187 fQVectorComponentsGFC->SetLabelSize(0.06);
188 fQVectorComponentsGFC->SetMarkerStyle(25);
189 (fQVectorComponentsGFC->GetXaxis())->SetBinLabel(1,"<Q_{x}>");
190 (fQVectorComponentsGFC->GetXaxis())->SetBinLabel(2,"<Q_{y}>");
191 (fQVectorComponentsGFC->GetXaxis())->SetBinLabel(3,"<Q_{x}^{2}>");
192 (fQVectorComponentsGFC->GetXaxis())->SetBinLabel(4,"<Q_{y}^{2}>");
193 fHistList->Add(fQVectorComponentsGFC);
aaebd73d 194
2188af53 195 //final results for integrated flow (v_n{2}, v_n{4},..., v_n{16}) from cumulants (by default n=2)
b6cd16a9 196 fIntFlowResultsGFC = new TH1D("fIntFlowResultsGFC","Integrated Flow From Cumulants (Generating Function)",4,0,4);
52021ae2 197 fIntFlowResultsGFC->SetXTitle("");
198 fIntFlowResultsGFC->SetYTitle("");
199 fIntFlowResultsGFC->SetLabelSize(0.06);
200 //fIntFlowResultsGFC->SetTickLength(1);
201 fIntFlowResultsGFC->SetMarkerStyle(25);
202 (fIntFlowResultsGFC->GetXaxis())->SetBinLabel(1,"v_{n}{2}");
203 (fIntFlowResultsGFC->GetXaxis())->SetBinLabel(2,"v_{n}{4}");
204 (fIntFlowResultsGFC->GetXaxis())->SetBinLabel(3,"v_{n}{6}");
205 (fIntFlowResultsGFC->GetXaxis())->SetBinLabel(4,"v_{n}{8}");
52021ae2 206 fHistList->Add(fIntFlowResultsGFC);
aaebd73d 207
2188af53 208 //final results for differential flow v_p/n{2} (by default p=n=2)
813a4157 209 fDiffFlowResults2ndOrderGFC = new TH1D("fDiffFlowResults2ndOrderGFC","v'_2/2{2}",fgknBinsPt,fPtMin,fPtMax);
52021ae2 210 fDiffFlowResults2ndOrderGFC->SetXTitle("pt [GeV]");
211 fDiffFlowResults2ndOrderGFC->SetYTitle("");
212 fHistList->Add(fDiffFlowResults2ndOrderGFC);
2188af53 213
214 //final results for differential flow v_p/n{4} (by default p=n=2)
813a4157 215 fDiffFlowResults4thOrderGFC = new TH1D("fDiffFlowResults4thOrderGFC","v'_2/2{4}",fgknBinsPt,fPtMin,fPtMax);
52021ae2 216 fDiffFlowResults4thOrderGFC->SetXTitle("pt [GeV]");
217 fDiffFlowResults4thOrderGFC->SetYTitle("");
218 fHistList->Add(fDiffFlowResults4thOrderGFC);
aaebd73d 219
2188af53 220 //final results for differential flow v_p/n{6} (by default p=n=2)
813a4157 221 fDiffFlowResults6thOrderGFC = new TH1D("fDiffFlowResults6thOrderGFC","v'_2/2{6}",fgknBinsPt,fPtMin,fPtMax);
52021ae2 222 fDiffFlowResults6thOrderGFC->SetXTitle("pt [GeV]");
223 fDiffFlowResults6thOrderGFC->SetYTitle("");
224 fHistList->Add(fDiffFlowResults6thOrderGFC);
aaebd73d 225
2188af53 226 //final results for differential flow v_p/n{8} (by default p=n=2)
813a4157 227 fDiffFlowResults8thOrderGFC = new TH1D("fDiffFlowResults8thOrderGFC","v'_2/2{8}",fgknBinsPt,fPtMin,fPtMax);
52021ae2 228 fDiffFlowResults8thOrderGFC->SetXTitle("pt [GeV]");
229 fDiffFlowResults8thOrderGFC->SetYTitle("");
230 fHistList->Add(fDiffFlowResults8thOrderGFC);
aaebd73d 231
2188af53 232 //avarage of the generating function for integrated flow <G[p][q]>
233 fIntFlowGenFun = new TProfile2D("fIntFlowGenFun","<G[p][q]>",fgkPmax,0.,(Double_t)fgkPmax,fgkQmax,0.,(Double_t)fgkQmax);
234 fIntFlowGenFun->SetXTitle("p");
235 fIntFlowGenFun->SetYTitle("q");
236 fHistList->Add(fIntFlowGenFun);
b6cd16a9 237
238 if(fOtherEquations)
239 {
cb308e83 240 //avarage of the generating function for integrated flow <G[p][q]> (only for other system of Eq. - up to 4th order)
b6cd16a9 241 fIntFlowGenFun4 = new TProfile2D("fIntFlowGenFun4","<G4[p4][q4]>",fgkPmax4,0.,(Double_t)fgkPmax4,fgkQmax4,0.,(Double_t)fgkQmax4);
242 fIntFlowGenFun4->SetXTitle("p4");
243 fIntFlowGenFun4->SetYTitle("q4");
244 fHistList->Add(fIntFlowGenFun4);
245
cb308e83 246 //avarage of the generating function for integrated flow <G[p][q]> (only for other system of Eq. - up to 6th order)
b6cd16a9 247 fIntFlowGenFun6 = new TProfile2D("fIntFlowGenFun6","<G6[p6][q6]>",fgkPmax6,0.,(Double_t)fgkPmax6,fgkQmax6,0.,(Double_t)fgkQmax6);
248 fIntFlowGenFun6->SetXTitle("p6");
249 fIntFlowGenFun6->SetYTitle("q6");
250 fHistList->Add(fIntFlowGenFun6);
251
cb308e83 252 //avarage of the generating function for integrated flow <G[p][q]> (only for other system of Eq. - up to 8th order)
b6cd16a9 253 fIntFlowGenFun8 = new TProfile2D("fIntFlowGenFun8","<G8[p8][q8]>",fgkPmax8,0.,(Double_t)fgkPmax8,fgkQmax8,0.,(Double_t)fgkQmax8);
254 fIntFlowGenFun8->SetXTitle("p8");
255 fIntFlowGenFun8->SetYTitle("q8");
256 fHistList->Add(fIntFlowGenFun8);
257
cb308e83 258 //avarage of the generating function for integrated flow <G[p][q]> (only for other system of Eq. - up to 16th order)
b6cd16a9 259 fIntFlowGenFun16 = new TProfile2D("fIntFlowGenFun16","<G16[p16][q16]>",fgkPmax16,0.,(Double_t)fgkPmax16,fgkQmax16,0.,(Double_t)fgkQmax16);
260 fIntFlowGenFun16->SetXTitle("p16");
261 fIntFlowGenFun16->SetYTitle("q16");
262 fHistList->Add(fIntFlowGenFun16);
cb308e83 263
264 //average multiplicity (only for other system of Eq. - up to 4th order)
265 fAvMultIntFlow4GFC = new TProfile("fAvMultIntFlow4GFC","Average Multiplicity",1,0,1,"s");
266 fAvMultIntFlow4GFC->SetXTitle("");
267 fAvMultIntFlow4GFC->SetYTitle("");
268 fAvMultIntFlow4GFC->SetLabelSize(0.06);
269 fAvMultIntFlow4GFC->SetMarkerStyle(25);
270 fAvMultIntFlow4GFC->SetLabelOffset(0.01);
271 (fAvMultIntFlow4GFC->GetXaxis())->SetBinLabel(1,"Average Multiplicity");
272 fHistList->Add(fAvMultIntFlow4GFC);
273
274 //average multiplicity (only for other system of Eq. - up to 6th order)
275 fAvMultIntFlow6GFC = new TProfile("fAvMultIntFlow6GFC","Average Multiplicity",1,0,1,"s");
276 fAvMultIntFlow6GFC->SetXTitle("");
277 fAvMultIntFlow6GFC->SetYTitle("");
278 fAvMultIntFlow6GFC->SetLabelSize(0.06);
279 fAvMultIntFlow6GFC->SetMarkerStyle(25);
280 fAvMultIntFlow6GFC->SetLabelOffset(0.01);
281 (fAvMultIntFlow6GFC->GetXaxis())->SetBinLabel(1,"Average Multiplicity");
282 fHistList->Add(fAvMultIntFlow6GFC);
283
284 //average multiplicity (only for other system of Eq. - up to 8th order)
285 fAvMultIntFlow8GFC = new TProfile("fAvMultIntFlow8GFC","Average Multiplicity",1,0,1,"s");
286 fAvMultIntFlow8GFC->SetXTitle("");
287 fAvMultIntFlow8GFC->SetYTitle("");
288 fAvMultIntFlow8GFC->SetLabelSize(0.06);
289 fAvMultIntFlow8GFC->SetMarkerStyle(25);
290 fAvMultIntFlow8GFC->SetLabelOffset(0.01);
291 (fAvMultIntFlow8GFC->GetXaxis())->SetBinLabel(1,"Average Multiplicity");
292 fHistList->Add(fAvMultIntFlow8GFC);
293
294 //average multiplicity (only for other system of Eq. - up to 16th order)
295 fAvMultIntFlow16GFC = new TProfile("fAvMultIntFlow16GFC","Average Multiplicity",1,0,1,"s");
296 fAvMultIntFlow16GFC->SetXTitle("");
297 fAvMultIntFlow16GFC->SetYTitle("");
298 fAvMultIntFlow16GFC->SetLabelSize(0.06);
299 fAvMultIntFlow16GFC->SetMarkerStyle(25);
300 fAvMultIntFlow16GFC->SetLabelOffset(0.01);
301 (fAvMultIntFlow16GFC->GetXaxis())->SetBinLabel(1,"Average Multiplicity");
302 fHistList->Add(fAvMultIntFlow16GFC);
b6cd16a9 303 }
aaebd73d 304
813a4157 305 //avarage of the real part of generating function for differential flow in Pt <Re(D[b][p][q])>
306 fDiffFlowPtRPGenFunRe = new TProfile3D("fDiffFlowPtRPGenFunRe","<Re(D[b][p][q])>",fgknBinsPt,(Double_t)(fPtMin/fBinWidthPt),(Double_t)(fPtMax/fBinWidthPt),fgkPmax,0.,(Double_t)fgkPmax,fgkQmax,0.,(Double_t)fgkQmax);
307 fDiffFlowPtRPGenFunRe->SetXTitle("b");
308 fDiffFlowPtRPGenFunRe->SetYTitle("p");
309 fDiffFlowPtRPGenFunRe->SetZTitle("q");
310 fDiffFlowPtRPGenFunRe->SetTitleOffset(1.44,"X");
311 fDiffFlowPtRPGenFunRe->SetTitleOffset(1.44,"Y");
312 fHistList->Add(fDiffFlowPtRPGenFunRe);
313
314 //avarage of the imaginary part of generating function for differential flow in Pt <Im(D[b][p][q])>
315 fDiffFlowPtRPGenFunIm = new TProfile3D("fDiffFlowPtRPGenFunIm","<Im(D[b][p][q])>",fgknBinsPt,(Double_t)(fPtMin/fBinWidthPt),(Double_t)(fPtMax/fBinWidthPt),fgkPmax,0.,(Double_t)fgkPmax,fgkQmax,0.,(Double_t)fgkQmax);
316 fDiffFlowPtRPGenFunIm->SetXTitle("b");
317 fDiffFlowPtRPGenFunIm->SetYTitle("p");
318 fDiffFlowPtRPGenFunIm->SetZTitle("q");
319 fDiffFlowPtRPGenFunIm->SetTitleOffset(1.44,"X");
320 fDiffFlowPtRPGenFunIm->SetTitleOffset(1.44,"Y");
321 fHistList->Add(fDiffFlowPtRPGenFunIm);
322
323 //number of particles per pt bin
324 fPtBinRPNoOfParticles = new TProfile("fPtBinRPNoOfParticles","Number of particles per #p_{t} bin",fgknBinsPt,fPtMin,fPtMax);
325 fPtBinRPNoOfParticles->SetXTitle("pt [GeV]");
326 fPtBinRPNoOfParticles->SetYTitle("");
327 fHistList->Add(fPtBinRPNoOfParticles);
328
329 //avarage of the real part of generating function for differential flow in Eta <Re(D[b][p][q])>
330 fDiffFlowEtaRPGenFunRe = new TProfile3D("fDiffFlowEtaRPGenFunRe","<Re(D[b][p][q])>",fgknBinsEta,(Double_t)(fEtaMin/fBinWidthEta),(Double_t)(fEtaMax/fBinWidthEta),fgkPmax,0.,(Double_t)fgkPmax,fgkQmax,0.,(Double_t)fgkQmax);
331 fDiffFlowEtaRPGenFunRe->SetXTitle("b");
332 fDiffFlowEtaRPGenFunRe->SetYTitle("p");
333 fDiffFlowEtaRPGenFunRe->SetZTitle("q");
334 fDiffFlowEtaRPGenFunRe->SetTitleOffset(1.44,"X");
335 fDiffFlowEtaRPGenFunRe->SetTitleOffset(1.44,"Y");
336 fHistList->Add(fDiffFlowEtaRPGenFunRe);
337
338 //avarage of the imaginary part of generating function for differential flow in Eta <Im(D[b][p][q])>
339 fDiffFlowEtaRPGenFunIm = new TProfile3D("fDiffFlowEtaRPGenFunIm","<Im(D[b][p][q])>",fgknBinsEta,(Double_t)(fEtaMin/fBinWidthEta),(Double_t)(fEtaMax/fBinWidthEta),fgkPmax,0.,(Double_t)fgkPmax,fgkQmax,0.,(Double_t)fgkQmax);
340 fDiffFlowEtaRPGenFunIm->SetXTitle("b");
341 fDiffFlowEtaRPGenFunIm->SetYTitle("p");
342 fDiffFlowEtaRPGenFunIm->SetZTitle("q");
343 fDiffFlowEtaRPGenFunIm->SetTitleOffset(1.44,"X");
344 fDiffFlowEtaRPGenFunIm->SetTitleOffset(1.44,"Y");
345 fHistList->Add(fDiffFlowEtaRPGenFunIm);
346
347 //number of particles per eta bin
348 fEtaBinRPNoOfParticles = new TProfile("fEtaBinRPNoOfParticles","Number of particles per #eta bin",fgknBinsEta,fEtaMin,fEtaMax);
349 fEtaBinRPNoOfParticles->SetXTitle("#eta");
350 fEtaBinRPNoOfParticles->SetYTitle("");
351 fHistList->Add(fEtaBinRPNoOfParticles);
352
353 //avarage of the real part of generating function for differential flow in Pt <Re(D[b][p][q])>
354 fDiffFlowPtPOIGenFunRe = new TProfile3D("fDiffFlowPtPOIGenFunRe","<Re(D[b][p][q])>",fgknBinsPt,(Double_t)(fPtMin/fBinWidthPt),(Double_t)(fPtMax/fBinWidthPt),fgkPmax,0.,(Double_t)fgkPmax,fgkQmax,0.,(Double_t)fgkQmax);
355 fDiffFlowPtPOIGenFunRe->SetXTitle("b");
356 fDiffFlowPtPOIGenFunRe->SetYTitle("p");
357 fDiffFlowPtPOIGenFunRe->SetZTitle("q");
358 fDiffFlowPtPOIGenFunRe->SetTitleOffset(1.44,"X");
359 fDiffFlowPtPOIGenFunRe->SetTitleOffset(1.44,"Y");
360 fHistList->Add(fDiffFlowPtPOIGenFunRe);
361
362 //avarage of the imaginary part of generating function for differential flow in Pt <Im(D[b][p][q])>
363 fDiffFlowPtPOIGenFunIm = new TProfile3D("fDiffFlowPtPOIGenFunIm","<Im(D[b][p][q])>",fgknBinsPt,(Double_t)(fPtMin/fBinWidthPt),(Double_t)(fPtMax/fBinWidthPt),fgkPmax,0.,(Double_t)fgkPmax,fgkQmax,0.,(Double_t)fgkQmax);
364 fDiffFlowPtPOIGenFunIm->SetXTitle("b");
365 fDiffFlowPtPOIGenFunIm->SetYTitle("p");
366 fDiffFlowPtPOIGenFunIm->SetZTitle("q");
367 fDiffFlowPtPOIGenFunIm->SetTitleOffset(1.44,"X");
368 fDiffFlowPtPOIGenFunIm->SetTitleOffset(1.44,"Y");
369 fHistList->Add(fDiffFlowPtPOIGenFunIm);
2188af53 370
52021ae2 371 //number of particles per pt bin
813a4157 372 fPtBinPOINoOfParticles = new TProfile("fPtBinPOINoOfParticles","Number of particles per #p_{t} bin",fgknBinsPt,fPtMin,fPtMax);
373 fPtBinPOINoOfParticles->SetXTitle("pt [GeV]");
374 fPtBinPOINoOfParticles->SetYTitle("");
375 fHistList->Add(fPtBinPOINoOfParticles);
376
377 //avarage of the real part of generating function for differential flow in Eta <Re(D[b][p][q])>
378 fDiffFlowEtaPOIGenFunRe = new TProfile3D("fDiffFlowEtaPOIGenFunRe","<Re(D[b][p][q])>",fgknBinsEta,(Double_t)(fEtaMin/fBinWidthEta),(Double_t)(fEtaMax/fBinWidthEta),fgkPmax,0.,(Double_t)fgkPmax,fgkQmax,0.,(Double_t)fgkQmax);
379 fDiffFlowEtaPOIGenFunRe->SetXTitle("b");
380 fDiffFlowEtaPOIGenFunRe->SetYTitle("p");
381 fDiffFlowEtaPOIGenFunRe->SetZTitle("q");
382 fDiffFlowEtaPOIGenFunRe->SetTitleOffset(1.44,"X");
383 fDiffFlowEtaPOIGenFunRe->SetTitleOffset(1.44,"Y");
384 fHistList->Add(fDiffFlowEtaPOIGenFunRe);
385
386 //avarage of the imaginary part of generating function for differential flow in Eta <Im(D[b][p][q])>
387 fDiffFlowEtaPOIGenFunIm = new TProfile3D("fDiffFlowEtaPOIGenFunIm","<Im(D[b][p][q])>",fgknBinsEta,(Double_t)(fEtaMin/fBinWidthEta),(Double_t)(fEtaMax/fBinWidthEta),fgkPmax,0.,(Double_t)fgkPmax,fgkQmax,0.,(Double_t)fgkQmax);
388 fDiffFlowEtaPOIGenFunIm->SetXTitle("b");
389 fDiffFlowEtaPOIGenFunIm->SetYTitle("p");
390 fDiffFlowEtaPOIGenFunIm->SetZTitle("q");
391 fDiffFlowEtaPOIGenFunIm->SetTitleOffset(1.44,"X");
392 fDiffFlowEtaPOIGenFunIm->SetTitleOffset(1.44,"Y");
393 fHistList->Add(fDiffFlowEtaPOIGenFunIm);
394
395 //number of particles per eta bin
396 fEtaBinPOINoOfParticles = new TProfile("fEtaBinPOINoOfParticles","Number of particles per #eta bin",fgknBinsEta,fEtaMin,fEtaMax);
397 fEtaBinPOINoOfParticles->SetXTitle("#eta");
398 fEtaBinPOINoOfParticles->SetYTitle("");
399 fHistList->Add(fEtaBinPOINoOfParticles);
52021ae2 400
401 /*
2188af53 402 fDiffFlowGenFunRe0 = new TProfile2D("fDiffFlowGenFunRe0","Re(<D[b][0][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
403 fDiffFlowGenFunRe0->SetXTitle("b");
404 fDiffFlowGenFunRe0->SetYTitle("q");
405 fHistList->Add(fDiffFlowGenFunRe0);
406
b6cd16a9 407 fDiffFlowGenFunIm0 = new TProfile2D("fDiffFlowGcout<<"HEY M1"<<endl;enFunIm0","Im(<D[b][0][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
2188af53 408 fDiffFlowGenFunIm0->SetXTitle("b");
409 fDiffFlowGenFunIm0->SetYTitle("q");
410 fHistList->Add(fDiffFlowGenFunIm0);
411
412 fDiffFlowGenFunRe1 = new TProfile2D("fDiffFlowGenFunRe1","Re(<D[b][1][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
413 fDiffFlowGenFunRe1->SetXTitle("b");
414 fDiffFlowGenFunRe1->SetYTitle("q");
415 fHistList->Add(fDiffFlowGenFunRe1);
416
417 fDiffFlowGenFunIm1 = new TProfile2D("fDiffFlowGenFunIm1","Im(<D[b][1][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
418 fDiffFlowGenFunIm1->SetXTitle("b");
419 fDiffFlowGenFunIm1->SetYTitle("q");
420 fHistList->Add(fDiffFlowGenFunIm1);
421
422 fDiffFlowGenFunRe2 = new TProfile2D("fDiffFlowGenFunRe2","Re(<D[b][2][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
423 fDiffFlowGenFunRe2->SetXTitle("b");
424 fDiffFlowGenFunRe2->SetYTitle("q");
425 fHistList->Add(fDiffFlowGenFunRe2);
426
427 fDiffFlowGenFunIm2 = new TProfile2D("fDiffFlowGenFunIm2","Im(<D[b][2][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
428 fDiffFlowGenFunIm2->SetXTitle("b");
429 fDiffFlowGenFunIm2->SetYTitle("q");
430 fHistList->Add(fDiffFlowGenFunIm2);
431
432 fDiffFlowGenFunRe3 = new TProfile2D("fDiffFlowGenFunRe3","Re(<D[b][3][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
433 fDiffFlowGenFunRe3->SetXTitle("b");
434 fDiffFlowGenFunRe3->SetYTitle("q");
435 fHistList->Add(fDiffFlowGenFunRe3);
436
437 fDiffFlowGenFunIm3 = new TProfile2D("fDiffFlowGenFunIm3","Im(<D[b][3][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
438 fDiffFlowGenFunIm3->SetXTitle("b");
439 fDiffFlowGenFunIm3->SetYTitle("q");
440 fHistList->Add(fDiffFlowGenFunIm3);
441
442 fDiffFlowGenFunRe4 = new TProfile2D("fDiffFlowGenFunRe4","Re(<D[b][4][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
443 fDiffFlowGenFunRe4->SetXTitle("b");
444 fDiffFlowGenFunRe4->SetYTitle("q");
445 fHistList->Add(fDiffFlowGenFunRe4);
446
447 fDiffFlowGenFunIm4 = new TProfile2D("fDiffFlowGenFunIm4","Im(<D[b][4][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
448 fDiffFlowGenFunIm4->SetXTitle("b");
449 fDiffFlowGenFunIm4->SetYTitle("q");
450 fHistList->Add(fDiffFlowGenFunIm4);
451
452 fDiffFlowGenFunRe5 = new TProfile2D("fDiffFlowGenFunRe5","Re(<D[b][5][q]>)",fgkQmax,0.,(Double_t)fgkQmax,fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth));
453 fDiffFlowGenFunRe5->SetXTitle("b");
454 fDiffFlowGenFunRe5->SetYTitle("q");
455 fHistList->Add(fDiffFlowGenFunRe5);
456
457 fDiffFlowGenFunIm5 = new TProfile2D("fDiffFlowGenFunIm5","Im(<D[b][5][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
458 fDiffFlowGenFunIm5->SetXTitle("b");
459 fDiffFlowGenFunIm5->SetYTitle("q");
460 fHistList->Add(fDiffFlowGenFunIm5);
461
462 fDiffFlowGenFunRe6 = new TProfile2D("fDiffFlowGenFunRe6","Re(<D[b][6][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
463 fDiffFlowGenFunRe6->SetXTitle("b");
464 fDiffFlowGenFunRe6->SetYTitle("q");
465 fHistList->Add(fDiffFlowGenFunRe6);
466
467 fDiffFlowGenFunIm6 = new TProfile2D("fDiffFlowGenFunIm6","Im(<D[b][6][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
468 fDiffFlowGenFunIm6->SetXTitle("b");
469 fDiffFlowGenFunIm6->SetYTitle("q");
470 fHistList->Add(fDiffFlowGenFunIm6);
471
472 fDiffFlowGenFunRe7 = new TProfile2D("fDiffFlowGenFunRe7","Re(<D[b][7][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
473 fDiffFlowGenFunRe7->SetXTitle("b");
474 fDiffFlowGenFunRe7->SetYTitle("q");
475 fHistList->Add(fDiffFlowGenFunRe7);
476
477 fDiffFlowGenFunIm7 = new TProfile2D("fDiffFlowGenFunIm7","Im(<D[b][7][q]>)",fgknBins,(Double_t)(fPtMin/fBinWidth),(Double_t)(fPtMax/fBinWidth),fgkQmax,0.,(Double_t)fgkQmax);
478 fDiffFlowGenFunIm7->SetXTitle("b");
479 fDiffFlowGenFunIm7->SetYTitle("q");
480 fHistList->Add(fDiffFlowGenFunIm7);
52021ae2 481 */
2188af53 482
483 //common control histograms
52021ae2 484 fCommonHists = new AliFlowCommonHist("AliFlowCommonHistGFC");
485 fHistList->Add(fCommonHists);
486
487 //common histograms for final results (2nd order)
488 fCommonHistsResults2nd = new AliFlowCommonHistResults("AliFlowCommonHistResults2ndOrderGFC");
489 fHistList->Add(fCommonHistsResults2nd);
490
491 //common histograms for final results (4th order)
492 fCommonHistsResults4th = new AliFlowCommonHistResults("AliFlowCommonHistResults4thOrderGFC");
493 fHistList->Add(fCommonHistsResults4th);
494
495 //common histograms for final results (6th order)
496 fCommonHistsResults6th = new AliFlowCommonHistResults("AliFlowCommonHistResults6thOrderGFC");
497 fHistList->Add(fCommonHistsResults6th);
498
499 //common histograms for final results (8th order)
500 fCommonHistsResults8th = new AliFlowCommonHistResults("AliFlowCommonHistResults8thOrderGFC");
501 fHistList->Add(fCommonHistsResults8th);
e5e75b58 502
9dd53ff2 503 //<w^2>
504 fAverageOfSquaredWeight = new TProfile("fAverageOfSquaredWeight","<w^{2}>",1,0,1);
505 fAverageOfSquaredWeight->SetLabelSize(0.06);
506 fAverageOfSquaredWeight->SetMarkerStyle(25);
507 fAverageOfSquaredWeight->SetLabelOffset(0.01);
508 (fAverageOfSquaredWeight->GetXaxis())->SetBinLabel(1,"<w^{2}>");
509 fHistList->Add(fAverageOfSquaredWeight);
510
e5e75b58 511 // add list fWeightsList with weights to the main list
512 fHistList->Add(fWeightsList);
513}//end of Init()
2188af53 514
515//================================================================================================================
516
517void AliFlowAnalysisWithCumulants::Make(AliFlowEventSimple* anEvent)
518{
cb308e83 519 //running over data:
520 Int_t nPrim = anEvent->NumberOfTracks(); //total multiplicity
521
b7cb54d5 522 Int_t nEventNSelTracksRP = anEvent->GetEventNSelTracksRP(); //selected multiplicity (particles used for int. flow)
e5e75b58 523
9dd53ff2 524 Int_t n = 2; // int flow harmonic (to be improved)
525
e5e75b58 526 //---------------------------------------------------------------------------------------------------------
527 // weights:
528 Bool_t useWeights = fUsePhiWeights||fUsePtWeights||fUseEtaWeights;
529
e5e75b58 530 TH1F *phiWeights = NULL; // histogram with phi weights
531 TH1D *ptWeights = NULL; // histogram with pt weights
532 TH1D *etaWeights = NULL; // histogram with eta weights
533
2f5e6dea 534 Double_t wPhi = 1.; // phi weight
535 Double_t wPt = 1.; // pt weight
536 Double_t wEta = 1.; // eta weight
e5e75b58 537
538 if(useWeights)
539 {
540 if(!fWeightsList)
541 {
17100608 542 cout<<" WARNING: fWeightsList is NULL pointer in GFC::Make() !!!!"<<endl;
e5e75b58 543 exit(0);
544 }
545 if(fUsePhiWeights)
546 {
547 phiWeights = dynamic_cast<TH1F *>(fWeightsList->FindObject("phi_weights"));
548 if(!phiWeights)
549 {
17100608 550 cout<<" WARNING: couldn't access the histogram with phi weights in GFC::Make() !!!!"<<endl;
e5e75b58 551 exit(0);
552 }
553 }
554 if(fUsePtWeights)
555 {
556 ptWeights = dynamic_cast<TH1D *>(fWeightsList->FindObject("pt_weights"));
557 if(!ptWeights)
558 {
17100608 559 cout<<" WARNING: couldn't access the histogram with pt weights in GFC::Make() !!!!"<<endl;
e5e75b58 560 exit(0);
561 }
562 }
563 if(fUseEtaWeights)
564 {
565 etaWeights = dynamic_cast<TH1D *>(fWeightsList->FindObject("eta_weights"));
566 if(!etaWeights)
567 {
17100608 568 cout<<" WARNING: couldn't access the histogram with eta weights in GFC::Make() !!!!"<<endl;
e5e75b58 569 exit(0);
570 }
571 }
572 }
573 //---------------------------------------------------------------------------------------------------------
aaebd73d 574
b7cb54d5 575 if(nEventNSelTracksRP>9) //generating function formalism applied here make sense only for selected multiplicity >= 10
cb308e83 576 {
2188af53 577 //fill the common control histograms
578 fCommonHists->FillControlHistograms(anEvent);
f1d945a1 579
2188af53 580 //initializing the generating function G[p][q] for integrated flow
5270f185 581 Double_t genfunG[fgkPmax][fgkQmax];
b6cd16a9 582
583 for(Int_t p=0;p<fgkPmax;p++)
17100608 584 {
585 for(Int_t q=0;q<fgkQmax;q++)
b6cd16a9 586 {
17100608 587 genfunG[p][q]=1.;
588 }
589 }
5b04fe11 590
b7cb54d5 591 Int_t nSelTracksRP = 0; //cross-checking the selected multiplicity
2f5e6dea 592
593 Double_t dPhi = 0.;
594 Double_t dPt = 0.;
595 Double_t dEta = 0.;
596 Int_t nBinsPhi = 0;
b6cd16a9 597
598 for(Int_t i=0;i<nPrim;i++)
599 {
2188af53 600 fTrack=anEvent->GetTrack(i);
b7cb54d5 601 if(fTrack && fTrack->InRPSelection())
b6cd16a9 602 {
b7cb54d5 603 nSelTracksRP++;
2f5e6dea 604 // get azimuthal angle, momentum and pseudorapidity of a particle:
605 dPhi = fTrack->Phi();
606 dPt = fTrack->Pt();
607 dEta = fTrack->Eta();
608 // phi weights:
609 if(fUsePhiWeights)
610 {
611 nBinsPhi = phiWeights->GetNbinsX();
612 if(nBinsPhi)
613 {
614 wPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi())));
615 }
616 }
617 // pt weights:
618 if(fUsePtWeights)
619 {
620 if(fBinWidthPt)
621 {
622 wPt = ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/fBinWidthPt)));
623 }
624 }
625 // eta weights:
626 if(fUseEtaWeights)
627 {
628 if(fBinWidthEta)
629 {
630 wEta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fBinWidthEta)));
631 }
632 }
633 // evaluate the generating function:
b6cd16a9 634 for(Int_t p=0;p<fgkPmax;p++)
635 {
636 for(Int_t q=0;q<fgkQmax;q++)
637 {
b7cb54d5 638 genfunG[p][q]*=(1.+wPhi*wPt*wEta*(2.*fR0*sqrt(p+1.)/nEventNSelTracksRP)*cos(fgkFlow*dPhi-2.*q*TMath::Pi()/fgkQmax));
f1d945a1 639 }
9dd53ff2 640 }
641 // calculate <w^2>
642 fAverageOfSquaredWeight->Fill(0.,pow(wPhi*wPt*wEta,2.),1);
17100608 643 } // end of if(fTrack && fTrack->InRPSelection())
2f5e6dea 644 } // end of for(Int_t i=0;i<nPrim;i++)
b6cd16a9 645
2188af53 646 //storing the value of G[p][q] in 2D profile in order to get automatically the avarage <G[p][q]>
b6cd16a9 647 for(Int_t p=0;p<fgkPmax;p++)
648 {
649 for(Int_t q=0;q<fgkQmax;q++)
650 {
5270f185 651 fIntFlowGenFun->Fill((Double_t)p,(Double_t)q,genfunG[p][q],1);
b6cd16a9 652 }
653 }
2188af53 654
655 //storing the selected multiplicity (if fAvMultIntFlow is not filled here then you had wrongly selected the particles used for integrated flow)
b7cb54d5 656 if(nSelTracksRP==nEventNSelTracksRP)
2188af53 657 {
b7cb54d5 658 fAvMultIntFlowGFC->Fill(0.,nSelTracksRP,1);
17100608 659 } else
660 {
661 cout<<"WARNING: nSelTracksRP != nEventNSelTracksRP in GFC::Make(). Something is wrong with RP flagging !!!!"<<endl;
662 }
2188af53 663
9dd53ff2 664 // calculating Q-vector of event (needed for errors)
2188af53 665 AliFlowVector fQVector;
666 fQVector.Set(0.,0.);
667 fQVector.SetMult(0);
9dd53ff2 668 fQVector=anEvent->GetQ(1*n,fWeightsList,fUsePhiWeights,fUsePtWeights,fUseEtaWeights); // get the Q vector for this event
669 fQVectorComponentsGFC->Fill(0.,fQVector.X(),1); // in the 1st bin fill Q_x
670 fQVectorComponentsGFC->Fill(1.,fQVector.Y(),1); // in the 2nd bin fill Q_y
671 fQVectorComponentsGFC->Fill(2.,pow(fQVector.X(),2.),1); // in the 3rd bin fill (Q_x)^2
672 fQVectorComponentsGFC->Fill(3.,pow(fQVector.Y(),2.),1); // in the 4th bin fill (Q_y)^2
6d4fa5d3 673
813a4157 674 //3D profiles for differential flow in pt and eta
2188af53 675 //second loop over data: evaluating the generating function D[b][p][q] for differential flow
676 //remark 0: D[b][p][q] is a complex number => real and imaginary part are calculated separately
b6cd16a9 677 //remark 1: note that bellow G[p][q] is needed, the value of generating function for integrated flow for the CURRENT event
813a4157 678 //remark 2: results are stored in 3D profiles in order to automatically get <Re(D[b][p][q])> and <Im(D[b][p][q])>
b6cd16a9 679 for(Int_t i=0;i<nPrim;i++)
680 {
2188af53 681 fTrack=anEvent->GetTrack(i);
b6cd16a9 682 if(fTrack)
683 {
b7cb54d5 684 if(fTrack->InRPSelection() && fTrack->InPOISelection())
b6cd16a9 685 {
b9639e20 686 // get azimuthal angle, momentum and pseudorapidity of a particle:
687 dPhi = fTrack->Phi();
688 dPt = fTrack->Pt();
689 dEta = fTrack->Eta();
690
691 fPtBinPOINoOfParticles->Fill(dPt,dPt,1.);
692 fEtaBinPOINoOfParticles->Fill(dEta,dEta,1.);
693
694 // phi weights:
695 if(fUsePhiWeights)
696 {
697 nBinsPhi = phiWeights->GetNbinsX();
698 if(nBinsPhi)
699 {
700 wPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi())));
701 }
702 }
703 // pt weights:
704 if(fUsePtWeights)
705 {
706 if(fBinWidthPt)
707 {
708 wPt = ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/fBinWidthPt)));
709 }
710 }
711 // eta weights:
712 if(fUseEtaWeights)
713 {
714 if(fBinWidthEta)
715 {
716 wEta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fBinWidthEta)));
717 }
718 }
719
b6cd16a9 720 for(Int_t p=0;p<fgkPmax;p++)
721 {
722 for(Int_t q=0;q<fgkQmax;q++)
723 {
813a4157 724 //real part (Pt)
b9639e20 725 fDiffFlowPtPOIGenFunRe->Fill(dPt/fBinWidthPt,(Double_t)p,(Double_t)q,genfunG[p][q]*cos(fgkMltpl*fgkFlow*dPhi)/(1.+wPhi*wPt*wEta*(2.*fR0*sqrt(p+1.)/nSelTracksRP)*cos(fgkFlow*dPhi-2.*q*TMath::Pi()/fgkQmax)),1.);
813a4157 726 //imaginary part (Pt)
b9639e20 727 fDiffFlowPtPOIGenFunIm->Fill(dPt/fBinWidthPt,(Double_t)p,(Double_t)q,genfunG[p][q]*sin(fgkMltpl*fgkFlow*dPhi)/(1.+wPhi*wPt*wEta*(2.*fR0*sqrt(p+1.)/nSelTracksRP)*cos(fgkFlow*dPhi-2.*q*TMath::Pi()/fgkQmax)),1.);
813a4157 728 //real part (Eta)
b9639e20 729 fDiffFlowEtaPOIGenFunRe->Fill(dEta/fBinWidthEta,(Double_t)p,(Double_t)q,genfunG[p][q]*cos(fgkMltpl*fgkFlow*dPhi)/(1.+wPhi*wPt*wEta*(2.*fR0*sqrt(p+1.)/nSelTracksRP)*cos(fgkFlow*dPhi-2.*q*TMath::Pi()/fgkQmax)),1.);
813a4157 730 //imaginary part (Eta)
b9639e20 731 fDiffFlowEtaPOIGenFunIm->Fill(dEta/fBinWidthEta,(Double_t)p,(Double_t)q,genfunG[p][q]*sin(fgkMltpl*fgkFlow*dPhi)/(1.+wPhi*wPt*wEta*(2.*fR0*sqrt(p+1.)/nSelTracksRP)*cos(fgkFlow*dPhi-2.*q*TMath::Pi()/fgkQmax)),1.);
b6cd16a9 732 }
f1d945a1 733 }
b6cd16a9 734 }
b7cb54d5 735 else if(fTrack->InPOISelection() && !(fTrack->InRPSelection()))
b6cd16a9 736 {
b9639e20 737 // get azimuthal angle, momentum and pseudorapidity of a particle:
738 dPhi = fTrack->Phi();
739 dPt = fTrack->Pt();
740 dEta = fTrack->Eta();
741
742 fPtBinPOINoOfParticles->Fill(dPt,dPt,1.);
743 fEtaBinPOINoOfParticles->Fill(dEta,dEta,1.);
b6cd16a9 744 for(Int_t p=0;p<fgkPmax;p++)
745 {
746 for(Int_t q=0;q<fgkQmax;q++)
747 {
813a4157 748 //real part (Pt)
b9639e20 749 fDiffFlowPtPOIGenFunRe->Fill(dPt/fBinWidthPt,(Double_t)p,(Double_t)q,genfunG[p][q]*cos(fgkMltpl*fgkFlow*dPhi),1.);
813a4157 750 //imaginary part (Pt)
b9639e20 751 fDiffFlowPtPOIGenFunIm->Fill(dPt/fBinWidthPt,(Double_t)p,(Double_t)q,genfunG[p][q]*sin(fgkMltpl*fgkFlow*dPhi),1.);
813a4157 752 //real part (Eta)
b9639e20 753 fDiffFlowEtaPOIGenFunRe->Fill(dEta/fBinWidthEta,(Double_t)p,(Double_t)q,genfunG[p][q]*cos(fgkMltpl*fgkFlow*dPhi),1.);
813a4157 754 //imaginary part (Eta)
b9639e20 755 fDiffFlowEtaPOIGenFunIm->Fill(dEta/fBinWidthEta,(Double_t)p,(Double_t)q,genfunG[p][q]*sin(fgkMltpl*fgkFlow*dPhi),1.);
b6cd16a9 756 }
757 }
813a4157 758 }
759 //RP:
b7cb54d5 760 if(fTrack->InRPSelection())
813a4157 761 {
b9639e20 762 // get azimuthal angle, momentum and pseudorapidity of a particle:
763 dPhi = fTrack->Phi();
764 dPt = fTrack->Pt();
765 dEta = fTrack->Eta();
766
767 fPtBinRPNoOfParticles->Fill(dPt,dPt,1.);
768 fEtaBinRPNoOfParticles->Fill(dEta,dEta,1.);
769
770 // phi weights:
771 if(fUsePhiWeights)
772 {
773 nBinsPhi = phiWeights->GetNbinsX();
774 if(nBinsPhi)
775 {
776 wPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi())));
777 }
778 }
779 // pt weights:
780 if(fUsePtWeights)
781 {
782 if(fBinWidthPt)
783 {
784 wPt = ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/fBinWidthPt)));
785 }
786 }
787 // eta weights:
788 if(fUseEtaWeights)
789 {
790 if(fBinWidthEta)
791 {
792 wEta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fBinWidthEta)));
793 }
794 }
795
813a4157 796 for(Int_t p=0;p<fgkPmax;p++)
797 {
798 for(Int_t q=0;q<fgkQmax;q++)
799 {
800 //real part (Pt)
b9639e20 801 fDiffFlowPtRPGenFunRe->Fill(dPt/fBinWidthPt,(Double_t)p,(Double_t)q,genfunG[p][q]*cos(fgkMltpl*fgkFlow*dPhi)/(1.+wPhi*wPt*wEta*(2.*fR0*sqrt(p+1.)/nSelTracksRP)*cos(fgkFlow*dPhi-2.*q*TMath::Pi()/fgkQmax)),1.);
813a4157 802 //imaginary part (Pt)
b9639e20 803 fDiffFlowPtRPGenFunIm->Fill(dPt/fBinWidthPt,(Double_t)p,(Double_t)q,genfunG[p][q]*sin(fgkMltpl*fgkFlow*dPhi)/(1.+wPhi*wPt*wEta*(2.*fR0*sqrt(p+1.)/nSelTracksRP)*cos(fgkFlow*dPhi-2.*q*TMath::Pi()/fgkQmax)),1.);
813a4157 804 //real part (Eta)
b9639e20 805 fDiffFlowEtaRPGenFunRe->Fill(dEta/fBinWidthEta,(Double_t)p,(Double_t)q,genfunG[p][q]*cos(fgkMltpl*fgkFlow*dPhi)/(1.+wPhi*wPt*wEta*(2.*fR0*sqrt(p+1.)/nSelTracksRP)*cos(fgkFlow*dPhi-2.*q*TMath::Pi()/fgkQmax)),1.);
813a4157 806 //imaginary part (Eta)
b9639e20 807 fDiffFlowEtaRPGenFunIm->Fill(dEta/fBinWidthEta,(Double_t)p,(Double_t)q,genfunG[p][q]*sin(fgkMltpl*fgkFlow*dPhi)/(1.+wPhi*wPt*wEta*(2.*fR0*sqrt(p+1.)/nSelTracksRP)*cos(fgkFlow*dPhi-2.*q*TMath::Pi()/fgkQmax)),1.);
813a4157 808 }
809 }
b7cb54d5 810 }//end of if(fTrack->InRPSelection())
b6cd16a9 811 }//end of if(fTrack)
2188af53 812 }//ending the second loop over data
2188af53 813
b6cd16a9 814
815
52021ae2 816 /*
2188af53 817 //sixteen 2D profiles for differential flow
818 for(Int_t i=0;i<nPrim;i++){
819 fTrack=anEvent->GetTrack(i);
b7cb54d5 820 if (fTrack && fTrack->InPOISelection()){
2188af53 821 //for(Int_t p=0;p<fgkPmax;p++){
822 for(Int_t q=0;q<fgkQmax;q++){
823 //real part
b7cb54d5 824 fDiffFlowGenFunRe0->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[0][q]*cos(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(0.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 825 //imaginary part
b7cb54d5 826 fDiffFlowGenFunIm0->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[0][q]*sin(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(0.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 827 //-----------------------------------------------------------------------
828 //real part
b7cb54d5 829 fDiffFlowGenFunRe1->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[1][q]*cos(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(1.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 830 //imaginary part
b7cb54d5 831 fDiffFlowGenFunIm1->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[1][q]*sin(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(1.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 832 //-----------------------------------------------------------------------
833 //real part
b7cb54d5 834 fDiffFlowGenFunRe2->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[2][q]*cos(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(2.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 835 //imaginary part
b7cb54d5 836 fDiffFlowGenFunIm2->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[2][q]*sin(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(2.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 837 //-----------------------------------------------------------------------
838 //real part
b7cb54d5 839 fDiffFlowGenFunRe3->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[3][q]*cos(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(3.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 840 //imaginary part
b7cb54d5 841 fDiffFlowGenFunIm3->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[3][q]*sin(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(3.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 842 //-----------------------------------------------------------------------
843 //real part
b7cb54d5 844 fDiffFlowGenFunRe4->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[4][q]*cos(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(4.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 845 //imaginary part
b7cb54d5 846 fDiffFlowGenFunIm4->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[4][q]*sin(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(4.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 847 //-----------------------------------------------------------------------
848 //real part
b7cb54d5 849 fDiffFlowGenFunRe5->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[5][q]*cos(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(5.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 850 //imaginary part
b7cb54d5 851 fDiffFlowGenFunIm5->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[5][q]*sin(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(5.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 852 //-----------------------------------------------------------------------
853 //real part
b7cb54d5 854 fDiffFlowGenFunRe6->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[6][q]*cos(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(6.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 855 //imaginary part
b7cb54d5 856 fDiffFlowGenFunIm6->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[6][q]*sin(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(6.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 857 //-----------------------------------------------------------------------
858 //real part
b7cb54d5 859 fDiffFlowGenFunRe7->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[7][q]*cos(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(7.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 860 //imaginary part
b7cb54d5 861 fDiffFlowGenFunIm7->Fill(fTrack->Pt()/fBinWidth,(Double_t)q,genfunG[7][q]*sin(fgkMltpl*fgkFlow*fTrack->Phi())/(1.+(2.*fR0*sqrt(7.+1.)/nSelTracksRP)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax)),1.);
2188af53 862 }
863 //}
864 }
865 }//ending the second loop over data
52021ae2 866 */
2188af53 867
b7cb54d5 868 }//end of if(nEventNSelTracksRP>9)
b6cd16a9 869
cb308e83 870
b6cd16a9 871
872
cb308e83 873
b6cd16a9 874
cb308e83 875
876
877
878
879
880
881
882 //off the record: numerical equations for cumulants solved up to different highest order
b6cd16a9 883 if(fOtherEquations)
884 {
cb308e83 885 //running over data
886 Int_t nPrimOE = anEvent->NumberOfTracks();//total multiplicity
b6cd16a9 887
b7cb54d5 888 Int_t nEventNSelTracksRPOE = anEvent->GetEventNSelTracksRP();
b6cd16a9 889
5270f185 890 Double_t genfunG4[fgkPmax4][fgkQmax4];
891 Double_t genfunG6[fgkPmax6][fgkQmax6];
892 Double_t genfunG8[fgkPmax8][fgkQmax8];
893 Double_t genfunG16[fgkPmax16][fgkQmax16];
b6cd16a9 894 for(Int_t p=0;p<fgkPmax16;p++)
895 {
896 for(Int_t q=0;q<fgkQmax16;q++)
897 {
5270f185 898 genfunG16[p][q]=1.;
b6cd16a9 899 if(p<fgkPmax8 && q<fgkQmax8)
900 {
5270f185 901 genfunG8[p][q]=1.;
b6cd16a9 902 if(p<fgkPmax6 && q<fgkQmax6)
903 {
5270f185 904 genfunG6[p][q]=1.;
b6cd16a9 905 if(p<fgkPmax4 && q<fgkQmax4)
906 {
5270f185 907 genfunG4[p][q]=1.;
b6cd16a9 908 }
909 }
910 }
911 }
912 }
cb308e83 913
914 //multiplicities:
b7cb54d5 915 if(nEventNSelTracksRPOE>15) fAvMultIntFlow16GFC->Fill(0.,nEventNSelTracksRPOE,1);
916 if(nEventNSelTracksRPOE>7) fAvMultIntFlow8GFC->Fill(0.,nEventNSelTracksRPOE,1);
917 if(nEventNSelTracksRPOE>5) fAvMultIntFlow6GFC->Fill(0.,nEventNSelTracksRPOE,1);
918 if(nEventNSelTracksRPOE>3) fAvMultIntFlow4GFC->Fill(0.,nEventNSelTracksRPOE,1);
b6cd16a9 919
920 //first loop over data: evaluating the generating function G[p][q] for integrated flow
cb308e83 921 for(Int_t i=0;i<nPrimOE;i++)
b6cd16a9 922 {
923 fTrack=anEvent->GetTrack(i);
b7cb54d5 924 if(fTrack && fTrack->InRPSelection())
b6cd16a9 925 {
926 for(Int_t p=0;p<fgkPmax16;p++)
927 {
928 for(Int_t q=0;q<fgkQmax16;q++)
929 {
b7cb54d5 930 if(nEventNSelTracksRPOE>15)
cb308e83 931 {
b7cb54d5 932 genfunG16[p][q]*=(1.+(2.*fR0*sqrt(p+1.)/nEventNSelTracksRPOE)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax16));
cb308e83 933 }
b6cd16a9 934 if(p<fgkPmax8 && q<fgkQmax8)
935 {
b7cb54d5 936 if(nEventNSelTracksRPOE>7)
cb308e83 937 {
b7cb54d5 938 genfunG8[p][q]*=(1.+(2.*fR0*sqrt(p+1.)/nEventNSelTracksRPOE)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax8));
cb308e83 939 }
b6cd16a9 940 if(p<fgkPmax6 && q<fgkQmax6)
941 {
b7cb54d5 942 if(nEventNSelTracksRPOE>5)
cb308e83 943 {
b7cb54d5 944 genfunG6[p][q]*=(1.+(2.*fR0*sqrt(p+1.)/nEventNSelTracksRPOE)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax6));
cb308e83 945 }
b6cd16a9 946 if(p<fgkPmax4 && q<fgkQmax4)
947 {
b7cb54d5 948 if(nEventNSelTracksRPOE>3)
cb308e83 949 {
b7cb54d5 950 genfunG4[p][q]*=(1.+(2.*fR0*sqrt(p+1.)/nEventNSelTracksRPOE)*cos(fgkFlow*fTrack->Phi()-2.*q*TMath::Pi()/fgkQmax4));
cb308e83 951 }
b6cd16a9 952 }
953 }
954 }
955 }
956 }
b7cb54d5 957 }//end of if(fTrack && fTrack->InRPSelection())
b6cd16a9 958 }//ending the loop over data
959
960 //storing the value of G[p][q] in 2D profile in order to get automatically the avarage <G[p][q]>
961 for(Int_t p=0;p<fgkPmax16;p++)
962 {
963 for(Int_t q=0;q<fgkQmax16;q++)
964 {
b7cb54d5 965 if(nEventNSelTracksRPOE>15) fIntFlowGenFun16->Fill((Double_t)p,(Double_t)q,genfunG16[p][q],1);
b6cd16a9 966 if(p<fgkPmax8 && q<fgkQmax8)
967 {
b7cb54d5 968 if(nEventNSelTracksRPOE>7) fIntFlowGenFun8->Fill((Double_t)p,(Double_t)q,genfunG8[p][q],1);
b6cd16a9 969 if(p<fgkPmax6 && q<fgkQmax6)
970 {
b7cb54d5 971 if(nEventNSelTracksRPOE>5) fIntFlowGenFun6->Fill((Double_t)p,(Double_t)q,genfunG6[p][q],1);
b6cd16a9 972 if(p<fgkPmax4 && q<fgkQmax4)
973 {
b7cb54d5 974 if(nEventNSelTracksRPOE>3) fIntFlowGenFun4->Fill((Double_t)p,(Double_t)q,genfunG4[p][q],1);
b6cd16a9 975 }
976 }
977 }
978 }
979 }
980}//end of if(fOtherEquations)
cb308e83 981
aaebd73d 982}//end of Make()
f1d945a1 983
2188af53 984//================================================================================================================
f1d945a1 985
fd46c3dd 986void AliFlowAnalysisWithCumulants::GetOutputHistograms(TList *outputListHistos)
987{
988 // get the pointers to all output histograms before calling Finish()
989 if (outputListHistos)
990 {
991 //Get the common histograms from the output list
992 //histograms to store the final results
993 TH1D *intFlowResults = dynamic_cast<TH1D*>(outputListHistos->FindObject("fIntFlowResultsGFC"));
994 TH1D *diffFlowResults2 = dynamic_cast<TH1D*>(outputListHistos->FindObject("fDiffFlowResults2ndOrderGFC"));
995 TH1D *diffFlowResults4 = dynamic_cast<TH1D*>(outputListHistos->FindObject("fDiffFlowResults4thOrderGFC"));
996 TH1D *diffFlowResults6 = dynamic_cast<TH1D*>(outputListHistos->FindObject("fDiffFlowResults6thOrderGFC"));
997 TH1D *diffFlowResults8 = dynamic_cast<TH1D*>(outputListHistos->FindObject("fDiffFlowResults8thOrderGFC"));
998
999 //common histograms to store the final results the integrated and differential flow
1000 AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*>(outputListHistos->FindObject("AliFlowCommonHistResults2ndOrderGFC"));
1001 AliFlowCommonHistResults *commonHistRes4th = dynamic_cast<AliFlowCommonHistResults*>(outputListHistos->FindObject("AliFlowCommonHistResults4thOrderGFC"));
1002 AliFlowCommonHistResults *commonHistRes6th = dynamic_cast<AliFlowCommonHistResults*>(outputListHistos->FindObject("AliFlowCommonHistResults6thOrderGFC"));
1003 AliFlowCommonHistResults *commonHistRes8th = dynamic_cast<AliFlowCommonHistResults*>(outputListHistos->FindObject("AliFlowCommonHistResults8thOrderGFC"));
1004
1005 //common control histogram
1006 AliFlowCommonHist *commonHists = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject("AliFlowCommonHistGFC"));
1007
1008 //profiles with average values of generating functions for int. and diff. flow
1009 TProfile2D *intFlowGenFun = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fIntFlowGenFun"));
1010
1011 TProfile2D *intFlowGenFun4 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fIntFlowGenFun4")); //only for other system of Eq.
1012 TProfile2D *intFlowGenFun6 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fIntFlowGenFun6")); //only for other system of Eq.
1013 TProfile2D *intFlowGenFun8 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fIntFlowGenFun8")); //only for other system of Eq.
1014 TProfile2D *intFlowGenFun16 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fIntFlowGenFun16")); //only for other system of Eq.
1015
1016 //RP, Pt:
1017 TProfile3D *diffFlowPtRPGenFunRe = dynamic_cast<TProfile3D*>(outputListHistos->FindObject("fDiffFlowPtRPGenFunRe"));
1018 TProfile3D *diffFlowPtRPGenFunIm = dynamic_cast<TProfile3D*>(outputListHistos->FindObject("fDiffFlowPtRPGenFunIm"));
1019 TProfile *ptBinRPNoOfParticles = dynamic_cast<TProfile*>(outputListHistos->FindObject("fPtBinRPNoOfParticles"));
1020
1021 //RP, Eta:
1022 TProfile3D *diffFlowEtaRPGenFunRe = dynamic_cast<TProfile3D*>(outputListHistos->FindObject("fDiffFlowEtaRPGenFunRe"));
1023 TProfile3D *diffFlowEtaRPGenFunIm = dynamic_cast<TProfile3D*>(outputListHistos->FindObject("fDiffFlowEtaRPGenFunIm"));
1024 TProfile *etaBinRPNoOfParticles = dynamic_cast<TProfile*>(outputListHistos->FindObject("fEtaBinRPNoOfParticles"));
1025
1026 //POI, Pt:
1027 TProfile3D *diffFlowPtPOIGenFunRe = dynamic_cast<TProfile3D*>(outputListHistos->FindObject("fDiffFlowPtPOIGenFunRe"));
1028 TProfile3D *diffFlowPtPOIGenFunIm = dynamic_cast<TProfile3D*>(outputListHistos->FindObject("fDiffFlowPtPOIGenFunIm"));
1029 TProfile *ptBinPOINoOfParticles = dynamic_cast<TProfile*>(outputListHistos->FindObject("fPtBinPOINoOfParticles"));
1030
1031 //POI, Eta:
1032 TProfile3D *diffFlowEtaPOIGenFunRe = dynamic_cast<TProfile3D*>(outputListHistos->FindObject("fDiffFlowEtaPOIGenFunRe"));
1033 TProfile3D *diffFlowEtaPOIGenFunIm = dynamic_cast<TProfile3D*>(outputListHistos->FindObject("fDiffFlowEtaPOIGenFunIm"));
1034 TProfile *etaBinPOINoOfParticles = dynamic_cast<TProfile*>(outputListHistos->FindObject("fEtaBinPOINoOfParticles"));
1035
1036 //average selected multiplicity (for int. flow)
1037 TProfile *avMult = dynamic_cast<TProfile*>(outputListHistos->FindObject("fAvMultIntFlowGFC"));
1038
1039 TProfile *avMult4 = dynamic_cast<TProfile*>(outputListHistos->FindObject("fAvMultIntFlow4GFCA")); //only for other system of Eq.
1040 TProfile *avMult6 = dynamic_cast<TProfile*>(outputListHistos->FindObject("fAvMultIntFlow6GFCA")); //only for other system of Eq.
1041 TProfile *avMult8 = dynamic_cast<TProfile*>(outputListHistos->FindObject("fAvMultIntFlow8GFCA")); //only for other system of Eq.
1042 TProfile *avMult16 = dynamic_cast<TProfile*>(outputListHistos->FindObject("fAvMultIntFlow16GFCA")); //only for other system of Eq.
1043
1044 //average values of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, 3rd bin: <(Q_x)^2>, 4th bin: <(Q_y)^2>)
1045 TProfile *qVectorComponents = dynamic_cast<TProfile*>(outputListHistos->FindObject("fQVectorComponentsGFC"));
1046
1047 //<w^2>
1048 TProfile *averageOfSquaredWeight = dynamic_cast<TProfile*>(outputListHistos->FindObject("fAverageOfSquaredWeight"));
1049
1050 /*
1051 TProfile2D *diffFlowPtGenFunRe0 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunRe0"));
1052 TProfile2D *diffFlowPtGenFunRe1 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunRe1"));
1053 TProfile2D *diffFlowPtGenFunRe2 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunRe2"));
1054 TProfile2D *diffFlowPtGenFunRe3 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunRe3"));
1055 TProfile2D *diffFlowPtGenFunRe4 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunRe4"));
1056 TProfile2D *diffFlowPtGenFunRe5 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunRe5"));
1057 TProfile2D *diffFlowPtGenFunRe6 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunRe6"));
1058 TProfile2D *diffFlowPtGenFunRe7 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunRe7"));
1059 TProfile2D *diffFlowPtGenFunIm0 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunIm0"));
1060 TProfile2D *diffFlowPtGenFunIm1 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunIm1"));
1061 TProfile2D *diffFlowPtGenFunIm2 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunIm2"));
1062 TProfile2D *diffFlowPtGenFunIm3 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunIm3"));
1063 TProfile2D *diffFlowPtGenFunIm4 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunIm4"));
1064 TProfile2D *diffFlowPtGenFunIm5 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunIm5"));
1065 TProfile2D *diffFlowPtGenFunIm6 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunIm6"));
1066 TProfile2D *diffFlowPtGenFunIm7 = dynamic_cast<TProfile2D*>(outputListHistos->FindObject("fdiffFlowPtGenFunIm7"));
1067 */
1068
1069 //profile with avarage selected multiplicity for int. flow
1070 //TProfile *avMult = dynamic_cast<TProfile*>(outputListHistos->FindObject("fAvMultIntFlow"));
1071
1072 //profile with avarage values of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, 3rd bin: <(Q_x)^2>, 4th bin: <(Q_y)^2>)
1073 //TProfile *QVectorComponents = dynamic_cast<TProfile*>(outputListHistos->FindObject("fQVectorComponents"));
1074
1075 //q-distribution
1076 //TH1D *qDist = dynamic_cast<TH1D*>(outputListHistos->FindObject("fQDist"));
1077
1078 //AliCumulantsFunctions finalResults(intFlowGenFun,NULL,NULL, intFlowResults,diffFlowResults2,diffFlowResults4,diffFlowResults6,diffFlowResults8,avMult,QVectorComponents,qDist,diffFlowPtGenFunRe0,diffFlowPtGenFunRe1,diffFlowPtGenFunRe2, diffFlowPtGenFunRe3,diffFlowPtGenFunRe4,diffFlowPtGenFunRe5,diffFlowPtGenFunRe6,diffFlowPtGenFunRe7,diffFlowPtGenFunIm0,diffFlowPtGenFunIm1, diffFlowPtGenFunIm2,diffFlowPtGenFunIm3,diffFlowPtGenFunIm4,diffFlowPtGenFunIm5,diffFlowPtGenFunIm6,diffFlowPtGenFunIm7);
1079
1080 //AliCumulantsFunctions finalResults(intFlowGenFun,diffFlowPtGenFunRe,diffFlowPtGenFunIm, intFlowResults,diffFlowResults2,diffFlowResults4,diffFlowResults6,diffFlowResults8,avMult,QVectorComponents,qDist);
1081
1082 //finalResults.Calculate();
1083
1084 //---------------------------------------------------
1085
1086 this->SetIntFlowResults(intFlowResults);
1087 this->SetDiffFlowResults2nd(diffFlowResults2);
1088 this->SetDiffFlowResults4th(diffFlowResults4);
1089 this->SetDiffFlowResults6th(diffFlowResults6);
1090 this->SetDiffFlowResults8th(diffFlowResults8);
1091
1092 this->SetCommonHistsResults2nd(commonHistRes2nd);
1093 this->SetCommonHistsResults4th(commonHistRes4th);
1094 this->SetCommonHistsResults6th(commonHistRes6th);
1095 this->SetCommonHistsResults8th(commonHistRes8th);
1096
1097 this->SetCommonHists(commonHists);
1098
1099 this->SetIntFlowGenFun(intFlowGenFun);
1100
1101 this->SetIntFlowGenFun4(intFlowGenFun4); //only for other system of Eq.
1102 this->SetIntFlowGenFun6(intFlowGenFun6); //only for other system of Eq.
1103 this->SetIntFlowGenFun8(intFlowGenFun8); //only for other system of Eq.
1104 this->SetIntFlowGenFun16(intFlowGenFun16); //only for other system of Eq.
1105
1106 this->SetDiffFlowPtRPGenFunRe(diffFlowPtRPGenFunRe);
1107 this->SetDiffFlowPtRPGenFunIm(diffFlowPtRPGenFunIm);
1108 this->SetNumberOfParticlesPerPtBinRP(ptBinRPNoOfParticles);
1109
1110 this->SetDiffFlowEtaRPGenFunRe(diffFlowEtaRPGenFunRe);
1111 this->SetDiffFlowEtaRPGenFunIm(diffFlowEtaRPGenFunIm);
1112 this->SetNumberOfParticlesPerEtaBinRP(etaBinRPNoOfParticles);
1113
1114 this->SetDiffFlowPtPOIGenFunRe(diffFlowPtPOIGenFunRe);
1115 this->SetDiffFlowPtPOIGenFunIm(diffFlowPtPOIGenFunIm);
1116 this->SetNumberOfParticlesPerPtBinPOI(ptBinPOINoOfParticles);
1117
1118 this->SetDiffFlowEtaPOIGenFunRe(diffFlowEtaPOIGenFunRe);
1119 this->SetDiffFlowEtaPOIGenFunIm(diffFlowEtaPOIGenFunIm);
1120 this->SetNumberOfParticlesPerEtaBinPOI(etaBinPOINoOfParticles);
1121
1122 this->SetAverageMultiplicity(avMult);
1123
1124 this->SetAverageMultiplicity4(avMult4); //only for other system of Eq.
1125 this->SetAverageMultiplicity6(avMult6); //only for other system of Eq.
1126 this->SetAverageMultiplicity8(avMult8); //only for other system of Eq.
1127 this->SetAverageMultiplicity16(avMult16); //only for other system of Eq.
1128
1129 this->SetQVectorComponents(qVectorComponents);
1130
1131 this->SetAverageOfSquaredWeight(averageOfSquaredWeight);
1132 }
1133}
1134
1135//================================================================================================================
1136
2188af53 1137void AliFlowAnalysisWithCumulants::Finish()
1138{
1315fe58 1139 //calculate the final results
52021ae2 1140 //AliCumulantsFunctions finalResults(fIntFlowGenFun,NULL,NULL, fIntFlowResults,fDiffFlowResults2,fDiffFlowResults4,fDiffFlowResults6,fDiffFlowResults8,fAvMultIntFlow,fQVectorComponents, fQDist,fDiffFlowGenFunRe0,fDiffFlowGenFunRe1,fDiffFlowGenFunRe2, fDiffFlowGenFunRe3,fDiffFlowGenFunRe4,fDiffFlowGenFunRe5,fDiffFlowGenFunRe6,fDiffFlowGenFunRe7,fDiffFlowGenFunIm0,fDiffFlowGenFunIm1, fDiffFlowGenFunIm2,fDiffFlowGenFunIm3,fDiffFlowGenFunIm4,fDiffFlowGenFunIm5,fDiffFlowGenFunIm6,fDiffFlowGenFunIm7);
1141
9dd53ff2 1142 AliCumulantsFunctions finalResults(fIntFlowGenFun,fIntFlowGenFun4,fIntFlowGenFun6,fIntFlowGenFun8,fIntFlowGenFun16,fAvMultIntFlow4GFC, fAvMultIntFlow6GFC,fAvMultIntFlow8GFC,fAvMultIntFlow16GFC,fDiffFlowPtRPGenFunRe,fDiffFlowPtRPGenFunIm,fPtBinRPNoOfParticles, fDiffFlowEtaRPGenFunRe,fDiffFlowEtaRPGenFunIm,fEtaBinRPNoOfParticles,fDiffFlowPtPOIGenFunRe,fDiffFlowPtPOIGenFunIm,fPtBinPOINoOfParticles, fDiffFlowEtaPOIGenFunRe,fDiffFlowEtaPOIGenFunIm,fEtaBinPOINoOfParticles,fIntFlowResultsGFC,fDiffFlowResults2ndOrderGFC,fDiffFlowResults4thOrderGFC,fDiffFlowResults6thOrderGFC,fDiffFlowResults8thOrderGFC, fAvMultIntFlowGFC,fQVectorComponentsGFC,fAverageOfSquaredWeight,fCommonHistsResults2nd, fCommonHistsResults4th,fCommonHistsResults6th,fCommonHistsResults8th,fCommonHists);
b6cd16a9 1143
b9639e20 1144 finalResults.Calculate();
2188af53 1145}
f1d945a1 1146
1315fe58 1147//================================================================================================================
1148
1149void AliFlowAnalysisWithCumulants::WriteHistograms(TString* outputFileName)
1150{
1151 //store the final results in output .root file
1152 TFile *output = new TFile(outputFileName->Data(),"RECREATE");
0fe80f88 1153 //output->WriteObject(fHistList, "cobjGFC","SingleKey");
1154 fHistList->SetName("cobjGFC");
1155 fHistList->Write(fHistList->GetName(), TObject::kSingleKey);
1315fe58 1156 delete output;
1157}
1158
1159//================================================================================================================
1160
b0fda271 1161//================================================================================================================
1162
1163void AliFlowAnalysisWithCumulants::WriteHistograms(TString outputFileName)
1164{
1165 //store the final results in output .root file
1166 TFile *output = new TFile(outputFileName.Data(),"RECREATE");
0fe80f88 1167 //output->WriteObject(fHistList, "cobjGFC","SingleKey");
1168 fHistList->SetName("cobjGFC");
1169 fHistList->Write(fHistList->GetName(), TObject::kSingleKey);
b0fda271 1170 delete output;
1171}
1172
1173//================================================================================================================
1174
f1d945a1 1175
f1d945a1 1176
1177