reorganized a bit
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowAnalysisWithQCumulants.cxx
CommitLineData
bc92c0cb 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 Q-cumulants *
18 * *
19 * author: Ante Bilandzic *
20 * (anteb@nikhef.nl) *
21 *********************************/
22
23#define AliFlowAnalysisWithQCumulants_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"
1315fe58 31#include "TList.h"
bc92c0cb 32#include "TParticle.h"
33#include "TRandom3.h"
1315fe58 34#include "TStyle.h"
bc92c0cb 35#include "TProfile.h"
36#include "TProfile2D.h"
37#include "TProfile3D.h"
1dfa3c16 38#include "TMath.h"
bc92c0cb 39#include "AliFlowEventSimple.h"
40#include "AliFlowTrackSimple.h"
41#include "AliFlowAnalysisWithQCumulants.h"
1315fe58 42#include "AliQCumulantsFunctions.h"
bc92c0cb 43
44#include "TRandom.h"
45
46class TH1;
47class TGraph;
48class TPave;
49class TLatex;
50class TMarker;
51class TRandom3;
52class TObjArray;
53class TList;
54class TCanvas;
55class TSystem;
56class TROOT;
57class AliFlowVector;
58class TVector;
59
60//================================================================================================================
61
62ClassImp(AliFlowAnalysisWithQCumulants)
63
64AliFlowAnalysisWithQCumulants::AliFlowAnalysisWithQCumulants():
65 fTrack(NULL),
66 fHistList(NULL),
1315fe58 67 fAvMultIntFlowQC(NULL),
bc92c0cb 68 fQvectorComponents(NULL),
1315fe58 69 fIntFlowResultsQC(NULL),
70 fDiffFlowResults2ndOrderQC(NULL),
71 fDiffFlowResults4thOrderQC(NULL),
72 fCovariances(NULL),
bc92c0cb 73 fQCorrelations(NULL),
8842fb2b 74 fQProduct(NULL),
bc92c0cb 75 fDirectCorrelations(NULL),
1dfa3c16 76 fPtReq1nRP(NULL),
77 fPtImq1nRP(NULL),
78 fPtReq2nRP(NULL),
79 fPtImq2nRP(NULL),
80 f2PerPtBin1n1nRP(NULL),
81 f2PerPtBin2n2nRP(NULL),
82 f3PerPtBin2n1n1nRP(NULL),
83 f3PerPtBin1n1n2nRP(NULL),
84 f4PerPtBin1n1n1n1nRP(NULL),
85 fEtaReq1nRP(NULL),
86 fEtaImq1nRP(NULL),
87 fEtaReq2nRP(NULL),
88 fEtaImq2nRP(NULL),
89 f2PerEtaBin1n1nRP(NULL),
90 f2PerEtaBin2n2nRP(NULL),
91 f3PerEtaBin2n1n1nRP(NULL),
92 f3PerEtaBin1n1n2nRP(NULL),
93 f4PerEtaBin1n1n1n1nRP(NULL),
94 fPtReq1nPOI(NULL),
95 fPtImq1nPOI(NULL),
96 fPtReq2nPOI(NULL),
97 fPtImq2nPOI(NULL),
e8a609bc 98 fOverlapPerPtBin(NULL),
1dfa3c16 99 f2PerPtBin1n1nPOI(NULL),
100 f2PerPtBin2n2nPOI(NULL),
101 f3PerPtBin2n1n1nPOI(NULL),
102 f3PerPtBin1n1n2nPOI(NULL),
103 f4PerPtBin1n1n1n1nPOI(NULL),
104 fEtaReq1nPOI(NULL),
105 fEtaImq1nPOI(NULL),
106 fEtaReq2nPOI(NULL),
107 fEtaImq2nPOI(NULL),
e8a609bc 108 fOverlapPerEtaBin(NULL),
1dfa3c16 109 f2PerEtaBin1n1nPOI(NULL),
110 f2PerEtaBin2n2nPOI(NULL),
111 f3PerEtaBin2n1n1nPOI(NULL),
112 f3PerEtaBin1n1n2nPOI(NULL),
113 f4PerEtaBin1n1n1n1nPOI(NULL),
cb308e83 114 fCommonHists2nd(NULL),
115 fCommonHists4th(NULL),
116 fCommonHists6th(NULL),
117 fCommonHists8th(NULL),
8842fb2b 118 fCommonHistsResults2nd(NULL),
119 fCommonHistsResults4th(NULL),
120 fCommonHistsResults6th(NULL),
121 fCommonHistsResults8th(NULL),
52021ae2 122 f2pDistribution(NULL),
123 f4pDistribution(NULL),
124 f6pDistribution(NULL),
5e838eeb 125 f8pDistribution(NULL),
8842fb2b 126 fnBinsPt(0),
127 fPtMin(0),
1dfa3c16 128 fPtMax(0),
129 fnBinsEta(0),
130 fEtaMin(0),
131 fEtaMax(0)
bc92c0cb 132{
133 //constructor
134 fHistList = new TList();
8842fb2b 135
136 fnBinsPt = AliFlowCommonConstants::GetNbinsPt();
137 fPtMin = AliFlowCommonConstants::GetPtMin();
138 fPtMax = AliFlowCommonConstants::GetPtMax();
139
1dfa3c16 140 fnBinsEta = AliFlowCommonConstants::GetNbinsEta();
141 fEtaMin = AliFlowCommonConstants::GetEtaMin();
142 fEtaMax = AliFlowCommonConstants::GetEtaMax();
bc92c0cb 143}
144
145AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants()
146{
147 //desctructor
148 delete fHistList;
149}
150
151//================================================================================================================
152
153void AliFlowAnalysisWithQCumulants::CreateOutputObjects()
154{
155 //various output histograms
1dfa3c16 156
bc92c0cb 157 //avarage multiplicity
1315fe58 158 fAvMultIntFlowQC = new TProfile("fAvMultIntFlowQC","Average Multiplicity",1,0,1,"s");
159 fAvMultIntFlowQC->SetXTitle("");
160 fAvMultIntFlowQC->SetYTitle("");
161 fAvMultIntFlowQC->SetLabelSize(0.06);
162 fAvMultIntFlowQC->SetMarkerStyle(25);
163 fAvMultIntFlowQC->SetLabelOffset(0.01);
164 (fAvMultIntFlowQC->GetXaxis())->SetBinLabel(1,"Average Multiplicity");
165 fHistList->Add(fAvMultIntFlowQC);
bc92c0cb 166
167 //Q-vector stuff
168 fQvectorComponents = new TProfile("fQvectorComponents","Avarage of Q-vector components",44,0.,44.,"s");
169 fQvectorComponents->SetXTitle("");
170 fQvectorComponents->SetYTitle("");
171 //fHistList->Add(fQvectorComponents);
172
173 //final results for integrated flow from Q-cumulants
1315fe58 174 fIntFlowResultsQC = new TH1D("fIntFlowResultsQC","Integrated Flow from Q-cumulants",4,0,4);
175 //fIntFlowResults->SetXTitle("");
176 //fIntFlowResultsQC->SetYTitle("Integrated Flow");
177 fIntFlowResultsQC->SetLabelSize(0.06);
52021ae2 178 //fIntFlowResultsQC->SetTickLength(1);
1315fe58 179 fIntFlowResultsQC->SetMarkerStyle(25);
180 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(1,"v_{n}{2}");
181 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(2,"v_{n}{4}");
182 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(3,"v_{n}{6}");
183 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(4,"v_{n}{8}");
1315fe58 184 fHistList->Add(fIntFlowResultsQC);
185
bc92c0cb 186 //final results for differential flow from 2nd order Q-cumulant
8842fb2b 187 fDiffFlowResults2ndOrderQC = new TH1D("fDiffFlowResults2ndOrderQC","Differential Flow from 2nd Order Q-cumulant",fnBinsPt,fPtMin,fPtMax);
1315fe58 188 fDiffFlowResults2ndOrderQC->SetXTitle("p_{t} [GeV]");
189 //fDiffFlowResults2ndOrderQC->SetYTitle("Differential Flow");
190 fHistList->Add(fDiffFlowResults2ndOrderQC);
bc92c0cb 191
192 //final results for differential flow from 4th order Q-cumulant
8842fb2b 193 fDiffFlowResults4thOrderQC = new TH1D("fDiffFlowResults4thOrderQC","Differential Flow from 4th Order Q-cumulant",fnBinsPt,fPtMin,fPtMax);
1315fe58 194 fDiffFlowResults4thOrderQC->SetXTitle("p_{t} [GeV]");
195 //fDiffFlowResults4thOrderQC->SetYTitle("Differential Flow");
196 fHistList->Add(fDiffFlowResults4thOrderQC);
197
198 //final results for covariances (1st bin: <2*4>-<2>*<4>, 2nd bin: <2*6>-<2>*<6>, ...)
199 fCovariances = new TH1D("fCovariances","Covariances",6,0,6);
200 //fCovariances->SetXTitle("");
201 //fCovariances->SetYTitle("<covariance>");
202 fCovariances->SetLabelSize(0.04);
203 fCovariances->SetTickLength(1);
204 fCovariances->SetMarkerStyle(25);
205 (fCovariances->GetXaxis())->SetBinLabel(1,"Cov(2,4)");
206 (fCovariances->GetXaxis())->SetBinLabel(2,"Cov(2,6)");
207 (fCovariances->GetXaxis())->SetBinLabel(3,"Cov(2,8)");
208 (fCovariances->GetXaxis())->SetBinLabel(4,"Cov(4,6)");
209 (fCovariances->GetXaxis())->SetBinLabel(5,"Cov(4,8)");
210 (fCovariances->GetXaxis())->SetBinLabel(6,"Cov(6,8)");
211 fHistList->Add(fCovariances);
bc92c0cb 212
213 //multi-particle correlations calculated from Q-vectors
dee1e0e0 214 fQCorrelations = new TProfile("fQCorrelations","multi-particle correlations from Q-vectors",32,0,32,"s");
1315fe58 215 //fQCorrelations->SetXTitle("correlations");
216 //fQCorrelations->SetYTitle("");
217 fQCorrelations->SetTickLength(-0.01,"Y");
218 fQCorrelations->SetMarkerStyle(25);
219 fQCorrelations->SetLabelSize(0.03);
220 fQCorrelations->SetLabelOffset(0.01,"Y");
dee1e0e0 221
1315fe58 222 (fQCorrelations->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}");
223 (fQCorrelations->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}");
224 (fQCorrelations->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}");
225 (fQCorrelations->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}");
dee1e0e0 226
1315fe58 227 (fQCorrelations->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}");
228 (fQCorrelations->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}");
229 (fQCorrelations->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}");
230 (fQCorrelations->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}");
dee1e0e0 231
1315fe58 232 (fQCorrelations->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}");
233 (fQCorrelations->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}");
dee1e0e0 234 (fQCorrelations->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}");
235 (fQCorrelations->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}");
236 (fQCorrelations->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}");
237 (fQCorrelations->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}");
238 (fQCorrelations->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}");
239
240 (fQCorrelations->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}");
241 (fQCorrelations->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}");
242 (fQCorrelations->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}");
243 (fQCorrelations->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}");
244
245 (fQCorrelations->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}");
246 (fQCorrelations->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}");
247 (fQCorrelations->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}");
248 (fQCorrelations->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}");
249
250 (fQCorrelations->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}");
251
252 (fQCorrelations->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}");
253
bc92c0cb 254 fHistList->Add(fQCorrelations);
255
8842fb2b 256 //average products
257 fQProduct = new TProfile("fQProduct","average of products",6,0,6,"s");
258 fQProduct->SetTickLength(-0.01,"Y");
259 fQProduct->SetMarkerStyle(25);
260 fQProduct->SetLabelSize(0.03);
261 fQProduct->SetLabelOffset(0.01,"Y");
262 (fQProduct->GetXaxis())->SetBinLabel(1,"<<2*4>>");
263 (fQProduct->GetXaxis())->SetBinLabel(2,"<<2*6>>");
264 (fQProduct->GetXaxis())->SetBinLabel(3,"<<2*8>>");
265 (fQProduct->GetXaxis())->SetBinLabel(4,"<<4*6>>");
266 (fQProduct->GetXaxis())->SetBinLabel(5,"<<4*8>>");
267 (fQProduct->GetXaxis())->SetBinLabel(6,"<<6*8>>");
268 fQProduct->SetXTitle("");
269 fQProduct->SetYTitle("");
270 fHistList->Add(fQProduct);
bc92c0cb 271
272 //multi-particle correlations calculated with nested loops (0..40 integrated flow; 40..80 differential flow)
273 fDirectCorrelations = new TProfile("fDirectCorrelations","multi-particle correlations with nested loops",80,0,80,"s");
274 fDirectCorrelations->SetXTitle("");
275 fDirectCorrelations->SetYTitle("correlations");
276 fHistList->Add(fDirectCorrelations);
277
1dfa3c16 278 //fPtReq1nRP
279 fPtReq1nRP = new TProfile("fPtReq1nRP","Re[q_n]",fnBinsPt,fPtMin,fPtMax,"s");
280 fPtReq1nRP->SetXTitle("p_{t} [GeV]");
281 fPtReq1nRP->SetYTitle("Re[q_n]");
282 //fHistList->Add(fPtReq1nRP);
283
284 //fPtImq1nRP
285 fPtImq1nRP = new TProfile("fPtImq1nRP","Im[q_n]",fnBinsPt,fPtMin,fPtMax,"s");
286 fPtImq1nRP->SetXTitle("p_{t} [GeV]");
287 fPtImq1nRP->SetYTitle("Im[q_n]");
288 //fHistList->Add(fPtImq1nRP);
289
290 //fPtReq2nRP
291 fPtReq2nRP = new TProfile("fPtReq2nRP","Re[q_2n]",fnBinsPt,fPtMin,fPtMax,"s");
292 fPtReq2nRP->SetXTitle("p_{t} [GeV]");
293 fPtReq2nRP->SetYTitle("Im[D]");
294 //fHistList->Add(fPtReq2nRP);
295
296 //fPtImq2nRP
297 fPtImq2nRP = new TProfile("fPtImq2nRP","Im[q_2n]",fnBinsPt,fPtMin,fPtMax,"s");
298 fPtImq2nRP->SetXTitle("p_{t} [GeV]");
299 fPtImq2nRP->SetYTitle("Im[q_2n]");
300 //fHistList->Add(fPtImq2nRP);
301
302 //f2PerPtBin1n1nRP
303 f2PerPtBin1n1nRP = new TProfile("f2PerPtBin1n1nRP","<2'>_{n|n}",fnBinsPt,fPtMin,fPtMax,"s");
304 f2PerPtBin1n1nRP->SetXTitle("p_{t} [GeV]");
305 //f2PerPtBin1n1n->SetYTitle("<2'>_{n|n}");
306 fHistList->Add(f2PerPtBin1n1nRP);
307
308 //f2PerPtBin2n2nRP
309 f2PerPtBin2n2nRP = new TProfile("f2PerPtBin2n2nRP","<2'>_{2n|2n}",fnBinsPt,fPtMin,fPtMax,"s");
310 f2PerPtBin2n2nRP->SetXTitle("p_{t} [GeV]");
311 //f2PerPtBin2n2nRP->SetYTitle("<2'>_{2n|2n}");
312 fHistList->Add(f2PerPtBin2n2nRP);
313
314 //f3PerPtBin2n1n1nRP
315 f3PerPtBin2n1n1nRP = new TProfile("f3PerPtBin2n1n1nRP","<3'>_{2n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
316 f3PerPtBin2n1n1nRP->SetXTitle("p_{t} [GeV]");
317 //f3PerPtBin2n1n1nRP->SetYTitle("<3'>_{2n|n,n}");
318 fHistList->Add(f3PerPtBin2n1n1nRP);
319
320 //f3PerPtBin1n1n2nRP
321 f3PerPtBin1n1n2nRP = new TProfile("f3PerPtBin1n1n2nRP","<3'>_{n,n|2n}",fnBinsPt,fPtMin,fPtMax,"s");
322 f3PerPtBin1n1n2nRP->SetXTitle("p_{t} [GeV]");
323 //f3PerPtBin1n1n2nRP->SetYTitle("<3'>_{n,n|2n}");
324 fHistList->Add(f3PerPtBin1n1n2nRP);
325
326 //f4PerPtBin1n1n1n1nRP
327 f4PerPtBin1n1n1n1nRP = new TProfile("f4PerPtBin1n1n1n1nRP","<4'>_{n,n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
328 f4PerPtBin1n1n1n1nRP->SetXTitle("p_{t} [GeV]");
329 //f4PerPtBin1n1n1n1nRP->SetYTitle("<4'>_{n,n|n,n}");
330 fHistList->Add(f4PerPtBin1n1n1n1nRP);
331
332 //fEtaReq1nRP
333 fEtaReq1nRP = new TProfile("fEtaReq1nRP","Re[q_n]",fnBinsEta,fEtaMin,fEtaMax,"s");
334 fEtaReq1nRP->SetXTitle("#eta");
335 fEtaReq1nRP->SetYTitle("Re[q_n]");
336 fHistList->Add(fEtaReq1nRP);
337
338 //fEtaImq1nRP
339 fEtaImq1nRP = new TProfile("fEtaImq1nRP","Im[q_n]",fnBinsEta,fEtaMin,fEtaMax,"s");
340 fEtaImq1nRP->SetXTitle("#eta");
341 fEtaImq1nRP->SetYTitle("Im[q_n]");
342 //fHistList->Add(fEtaImq1nRP);
343
344 //fEtaReq2nRP
345 fEtaReq2nRP = new TProfile("fEtaReq2nRP","Re[q_2n]",fnBinsEta,fEtaMin,fEtaMax,"s");
346 fEtaReq2nRP->SetXTitle("#eta");
347 fEtaReq2nRP->SetYTitle("Im[D]");
348 //fHistList->Add(fEtaReq2nRP);
349
350 //fEtaImq2nRP
351 fEtaImq2nRP = new TProfile("fEtaImq2nRP","Im[q_2n]",fnBinsEta,fEtaMin,fEtaMax,"s");
352 fEtaImq2nRP->SetXTitle("#eta");
353 fEtaImq2nRP->SetYTitle("Im[q_2n]");
354 //fHistList->Add(fEtaImq2nRP);
355
356 //f2PerEtaBin1n1nRP
357 f2PerEtaBin1n1nRP = new TProfile("f2PerEtaBin1n1nRP","<2'>_{n|n}",fnBinsEta,fEtaMin,fEtaMax,"s");
358 f2PerEtaBin1n1nRP->SetXTitle("#eta");
359 //f2PerEtaBin1n1nRP->SetYTitle("<2'>_{n|n}");
360 fHistList->Add(f2PerEtaBin1n1nRP);
361
362 //f2PerEtaBin2n2nRP
363 f2PerEtaBin2n2nRP = new TProfile("f2PerEtaBin2n2nRP","<2'>_{2n|2n}",fnBinsEta,fEtaMin,fEtaMax,"s");
364 f2PerEtaBin2n2nRP->SetXTitle("#eta");
365 //f2PerEtaBin2n2nRP->SetYTitle("<2'>_{2n|2n}");
366 fHistList->Add(f2PerEtaBin2n2nRP);
367
368 //f3PerEtaBin2n1n1nRP
369 f3PerEtaBin2n1n1nRP = new TProfile("f3PerEtaBin2n1n1nRP","<3'>_{2n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
370 f3PerEtaBin2n1n1nRP->SetXTitle("#eta");
371 //f3PerEtaBin2n1n1nRP->SetYTitle("<3'>_{2n|n,n}");
372 fHistList->Add(f3PerEtaBin2n1n1nRP);
373
374 //f3PerEtaBin1n1n2nRP
375 f3PerEtaBin1n1n2nRP = new TProfile("f3PerEtaBin1n1n2RP","<3'>_{n,n|2n}",fnBinsEta,fEtaMin,fEtaMax,"s");
376 f3PerEtaBin1n1n2nRP->SetXTitle("#eta");
377 //f3PerEtaBin1n1n2n->SetYTitle("<3'>_{n,n|2n}");
378 fHistList->Add(f3PerEtaBin1n1n2nRP);
379
380 //f4PerEtaBin1n1n1n1nRP
381 f4PerEtaBin1n1n1n1nRP = new TProfile("f4PerEtaBin1n1n1n1nRP","<4'>_{n,n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
382 f4PerEtaBin1n1n1n1nRP->SetXTitle("#eta");
383 //f4PerEtaBin1n1n1n1nRP->SetYTitle("<4'>_{n,n|n,n}");
384 fHistList->Add(f4PerEtaBin1n1n1n1nRP);
385
386 //fPtReq1nPOI
387 fPtReq1nPOI = new TProfile("fPtReq1nPOI","Re[q_n]",fnBinsPt,fPtMin,fPtMax,"s");
388 fPtReq1nPOI->SetXTitle("p_{t} [GeV]");
389 fPtReq1nPOI->SetYTitle("Re[q_n]");
390 //fHistList->Add(fPtReq1nPOI);
391
392 //fPtImq1nPOI
393 fPtImq1nPOI = new TProfile("fPtImq1nPOI","Im[q_n]",fnBinsPt,fPtMin,fPtMax,"s");
394 fPtImq1nPOI->SetXTitle("p_{t} [GeV]");
395 fPtImq1nPOI->SetYTitle("Im[q_n]");
396 //fHistList->Add(fPtImq1nPOI);
397
398 //fPtReq2nPOI
399 fPtReq2nPOI = new TProfile("fPtReq2nPOI","Re[q_2n]",fnBinsPt,fPtMin,fPtMax,"s");
400 fPtReq2nPOI->SetXTitle("p_{t} [GeV]");
401 fPtReq2nPOI->SetYTitle("Im[D]");
402 //fHistList->Add(fPtReq2nPOI);
403
404 //fPtImq2nPOI
405 fPtImq2nPOI = new TProfile("fPtImq2nPOI","Im[q_2n]",fnBinsPt,fPtMin,fPtMax,"s");
406 fPtImq2nPOI->SetXTitle("p_{t} [GeV]");
407 fPtImq2nPOI->SetYTitle("Im[q_2n]");
408 //fHistList->Add(fPtImq2nPOI);
409
e8a609bc 410 //fOverlapPerPtBin
411 fOverlapPerPtBin = new TProfile("fOverlapPerPtBin","# of particles selected both as RP and POI per #p_{t} bin",fnBinsPt,fPtMin,fPtMax,"s");
412 fOverlapPerPtBin->SetXTitle("p_{t} [GeV]");
413 fOverlapPerPtBin->SetYTitle("Counts");
414 //fHistList->Add(fOverlapPerPtBin);
415
1dfa3c16 416 //f2PerPtBin1n1nPOI
417 f2PerPtBin1n1nPOI = new TProfile("f2PerPtBin1n1nPOI","<2'>_{n|n}",fnBinsPt,fPtMin,fPtMax,"s");
418 f2PerPtBin1n1nPOI->SetXTitle("p_{t} [GeV]");
419 //f2PerPtBin1n1n->SetYTitle("<2'>_{n|n}");
420 fHistList->Add(f2PerPtBin1n1nPOI);
421
422 //f2PerPtBin2n2nPOI
423 f2PerPtBin2n2nPOI = new TProfile("f2PerPtBin2n2nPOI","<2'>_{2n|2n}",fnBinsPt,fPtMin,fPtMax,"s");
424 f2PerPtBin2n2nPOI->SetXTitle("p_{t} [GeV]");
425 //f2PerPtBin2n2nPOI->SetYTitle("<2'>_{2n|2n}");
426 fHistList->Add(f2PerPtBin2n2nPOI);
427
428 //f3PerPtBin2n1n1nPOI
429 f3PerPtBin2n1n1nPOI = new TProfile("f3PerPtBin2n1n1nPOI","<3'>_{2n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
430 f3PerPtBin2n1n1nPOI->SetXTitle("p_{t} [GeV]");
431 //f3PerPtBin2n1n1nPOI->SetYTitle("<3'>_{2n|n,n}");
432 fHistList->Add(f3PerPtBin2n1n1nPOI);
433
434 //f3PerPtBin1n1n2nPOI
435 f3PerPtBin1n1n2nPOI = new TProfile("f3PerPtBin1n1n2nPOI","<3'>_{n,n|2n}",fnBinsPt,fPtMin,fPtMax,"s");
436 f3PerPtBin1n1n2nPOI->SetXTitle("p_{t} [GeV]");
437 //f3PerPtBin1n1n2nPOI->SetYTitle("<3'>_{n,n|2n}");
438 fHistList->Add(f3PerPtBin1n1n2nPOI);
439
440 //f4PerPtBin1n1n1n1nPOI
441 f4PerPtBin1n1n1n1nPOI = new TProfile("f4PerPtBin1n1n1n1nPOI","<4'>_{n,n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
442 f4PerPtBin1n1n1n1nPOI->SetXTitle("p_{t} [GeV]");
443 //f4PerPtBin1n1n1n1nPOI->SetYTitle("<4'>_{n,n|n,n}");
444 fHistList->Add(f4PerPtBin1n1n1n1nPOI);
445
446 //fEtaReq1nPOI
447 fEtaReq1nPOI = new TProfile("fEtaReq1nPOI","Re[q_n]",fnBinsEta,fEtaMin,fEtaMax,"s");
448 fEtaReq1nPOI->SetXTitle("#eta");
449 fEtaReq1nPOI->SetYTitle("Re[q_n]");
450 fHistList->Add(fEtaReq1nPOI);
451
452 //fEtaImq1nPOI
453 fEtaImq1nPOI = new TProfile("fEtaImq1nPOI","Im[q_n]",fnBinsEta,fEtaMin,fEtaMax,"s");
454 fEtaImq1nPOI->SetXTitle("#eta");
455 fEtaImq1nPOI->SetYTitle("Im[q_n]");
456 //fHistList->Add(fEtaImq1nPOI);
457
458 //fEtaReq2nPOI
459 fEtaReq2nPOI = new TProfile("fEtaReq2nPOI","Re[q_2n]",fnBinsEta,fEtaMin,fEtaMax,"s");
460 fEtaReq2nPOI->SetXTitle("#eta");
461 fEtaReq2nPOI->SetYTitle("Im[D]");
462 //fHistList->Add(fEtaReq2nPOI);
463
464 //fEtaImq2nPOI
465 fEtaImq2nPOI = new TProfile("fEtaImq2nPOI","Im[q_2n]",fnBinsEta,fEtaMin,fEtaMax,"s");
466 fEtaImq2nPOI->SetXTitle("#eta");
467 fEtaImq2nPOI->SetYTitle("Im[q_2n]");
468 //fHistList->Add(fEtaImq2nPOI);
469
e8a609bc 470 //fOverlapPerEtaBin
471 fOverlapPerEtaBin = new TProfile("fOverlapPerEtaBin","# of particles selected both as RP and POI per #eta bin",fnBinsEta,fEtaMin,fEtaMax,"s");
472 fOverlapPerEtaBin->SetXTitle("#eta");
473 fOverlapPerEtaBin->SetYTitle("Counts");
474 //fHistList->Add(fOverlapPerEtaBin);
475
1dfa3c16 476 //f2PerEtaBin1n1nPOI
477 f2PerEtaBin1n1nPOI = new TProfile("f2PerEtaBin1n1nPOI","<2'>_{n|n}",fnBinsEta,fEtaMin,fEtaMax,"s");
478 f2PerEtaBin1n1nPOI->SetXTitle("#eta");
479 //f2PerEtaBin1n1nPOI->SetYTitle("<2'>_{n|n}");
480 fHistList->Add(f2PerEtaBin1n1nPOI);
481
482 //f2PerEtaBin2n2nPOI
483 f2PerEtaBin2n2nPOI = new TProfile("f2PerEtaBin2n2nPOI","<2'>_{2n|2n}",fnBinsEta,fEtaMin,fEtaMax,"s");
484 f2PerEtaBin2n2nPOI->SetXTitle("#eta");
485 //f2PerEtaBin2n2nPOI->SetYTitle("<2'>_{2n|2n}");
486 fHistList->Add(f2PerEtaBin2n2nPOI);
487
488 //f3PerEtaBin2n1n1nPOI
489 f3PerEtaBin2n1n1nPOI = new TProfile("f3PerEtaBin2n1n1nPOI","<3'>_{2n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
490 f3PerEtaBin2n1n1nPOI->SetXTitle("#eta");
491 //f3PerEtaBin2n1n1nPOI->SetYTitle("<3'>_{2n|n,n}");
492 fHistList->Add(f3PerEtaBin2n1n1nPOI);
493
494 //f3PerEtaBin1n1n2nPOI
495 f3PerEtaBin1n1n2nPOI = new TProfile("f3PerEtaBin1n1n2POI","<3'>_{n,n|2n}",fnBinsEta,fEtaMin,fEtaMax,"s");
496 f3PerEtaBin1n1n2nPOI->SetXTitle("#eta");
497 //f3PerEtaBin1n1n2n->SetYTitle("<3'>_{n,n|2n}");
498 fHistList->Add(f3PerEtaBin1n1n2nPOI);
499
500 //f4PerEtaBin1n1n1n1nPOI
501 f4PerEtaBin1n1n1n1nPOI = new TProfile("f4PerEtaBin1n1n1n1nPOI","<4'>_{n,n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
502 f4PerEtaBin1n1n1n1nPOI->SetXTitle("#eta");
503 //f4PerEtaBin1n1n1n1nPOI->SetYTitle("<4'>_{n,n|n,n}");
504 fHistList->Add(f4PerEtaBin1n1n1n1nPOI);
bc92c0cb 505
cb308e83 506 //common control histogram (2nd order)
507 fCommonHists2nd = new AliFlowCommonHist("AliFlowCommonHist2ndOrderQC");
508 fHistList->Add(fCommonHists2nd);
1315fe58 509
cb308e83 510 //common control histogram (4th order)
511 fCommonHists4th = new AliFlowCommonHist("AliFlowCommonHist4thOrderQC");
512 fHistList->Add(fCommonHists4th);
513
514 //common control histogram (6th order)
515 fCommonHists6th = new AliFlowCommonHist("AliFlowCommonHist6thOrderQC");
516 fHistList->Add(fCommonHists6th);
517
518 //common control histogram (8th order)
519 fCommonHists8th = new AliFlowCommonHist("AliFlowCommonHist8thOrderQC");
520 fHistList->Add(fCommonHists8th);
521
8842fb2b 522 //common histograms for final results (2nd order)
1315fe58 523 fCommonHistsResults2nd = new AliFlowCommonHistResults("AliFlowCommonHistResults2ndOrderQC");
524 fHistList->Add(fCommonHistsResults2nd);
525
8842fb2b 526 //common histograms for final results (4th order)
1315fe58 527 fCommonHistsResults4th = new AliFlowCommonHistResults("AliFlowCommonHistResults4thOrderQC");
528 fHistList->Add(fCommonHistsResults4th);
529
8842fb2b 530 //common histograms for final results (6th order)
1315fe58 531 fCommonHistsResults6th = new AliFlowCommonHistResults("AliFlowCommonHistResults6thOrderQC");
532 fHistList->Add(fCommonHistsResults6th);
533
8842fb2b 534 //common histograms for final results (8th order)
1315fe58 535 fCommonHistsResults8th = new AliFlowCommonHistResults("AliFlowCommonHistResults8thOrderQC");
536 fHistList->Add(fCommonHistsResults8th);
1315fe58 537
538 //weighted <2>_{n|n} distribution
52021ae2 539 f2pDistribution = new TH1D("f2pDistribution","<2>_{n|n} distribution",100000,-0.02,0.1);
540 f2pDistribution->SetXTitle("<2>_{n|n}");
541 f2pDistribution->SetYTitle("Counts");
542 fHistList->Add(f2pDistribution);
1315fe58 543
544 //weighted <4>_{n,n|n,n} distribution
52021ae2 545 f4pDistribution = new TH1D("f4pDistribution","<4>_{n,n|n,n} distribution",100000,-0.00025,0.002);
546 f4pDistribution->SetXTitle("<4>_{n,n|n,n}");
547 f4pDistribution->SetYTitle("Counts");
548 fHistList->Add(f4pDistribution);
1315fe58 549
550 //weighted <6>_{n,n,n|n,n,n} distribution
52021ae2 551 f6pDistribution = new TH1D("f6pDistribution","<6>_{n,n,n|n,n,n} distribution",100000,-0.000005,0.000025);
552 f6pDistribution->SetXTitle("<6>_{n,n,n|n,n,n}");
553 f6pDistribution->SetYTitle("Counts");
554 fHistList->Add(f6pDistribution);
bc92c0cb 555
5e838eeb 556 //weighted <8>_{n,n,n,n|n,n,n,n} distribution
557 f8pDistribution = new TH1D("f8pDistribution","<8>_{n,n,n,n|n,n,n,n} distribution",100000,-0.000000001,0.00000001);
558 f8pDistribution->SetXTitle("<8>_{n,n,n,n|n,n,n,n}");
559 f8pDistribution->SetYTitle("Counts");
560 fHistList->Add(f8pDistribution);
561
bc92c0cb 562}//end of CreateOutputObjects()
563
564//================================================================================================================
565
566void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent)
567{
1dfa3c16 568 //running over data
1315fe58 569
bc92c0cb 570 //get the total multiplicity of event:
1dfa3c16 571 //Int_t nPrim = anEvent->NumberOfTracks();//line needed only for nested loops
572 //cout<<"nPrim = "<<nPrim<<endl;
bc92c0cb 573
dee1e0e0 574 //if(nPrim>8&&nPrim<12)//line needed only for nested loops
575 //{ //line needed only for nested loops
8842fb2b 576
bc92c0cb 577 //get the selected multiplicity (i.e. number of particles used for int. flow):
578 //Int_t nEventNSelTracksIntFlow = anEvent->GetEventNSelTracksIntFlow();
579
580 Int_t n=2; //int flow harmonic (to be improved)
581
582 //---------------------------------------------------------------------------------------------------------
583 //Q-vectors of an event evaluated in harmonics n, 2n, 3n and 4n:
1dfa3c16 584 AliFlowVector afvQvector1n, afvQvector2n, afvQvector3n, afvQvector4n;
bc92c0cb 585
1dfa3c16 586 afvQvector1n.Set(0.,0.);
587 afvQvector1n.SetMult(0);
588 afvQvector1n=anEvent->GetQ(1*n);
bc92c0cb 589
1dfa3c16 590 afvQvector2n.Set(0.,0.);
591 afvQvector2n.SetMult(0);
592 afvQvector2n=anEvent->GetQ(2*n);
bc92c0cb 593
1dfa3c16 594 afvQvector3n.Set(0.,0.);
595 afvQvector3n.SetMult(0);
596 afvQvector3n=anEvent->GetQ(3*n);
bc92c0cb 597
1dfa3c16 598 afvQvector4n.Set(0.,0.);
599 afvQvector4n.SetMult(0);
600 afvQvector4n=anEvent->GetQ(4*n);
bc92c0cb 601 //---------------------------------------------------------------------------------------------------------
602
603 //multiplicity (to be improved, because I already have nEventNSelTracksIntFlow and nPrim)
1dfa3c16 604 Double_t dMult = afvQvector1n.GetMult();
bc92c0cb 605
1dfa3c16 606 fAvMultIntFlowQC->Fill(0.,dMult,1.);
bc92c0cb 607
608 //---------------------------------------------------------------------------------------------------------
dee1e0e0 609 //
610 // *******************
611 // **** Q-vectors ****
612 // *******************
613 //
1dfa3c16 614 Double_t reQ2nQ1nstarQ1nstar = pow(afvQvector1n.X(),2.)*afvQvector2n.X()+2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.Y()-pow(afvQvector1n.Y(),2.)*afvQvector2n.X();//Re[Q_{2n} Q_{n}^* Q_{n}^*]
52021ae2 615 //Double_t imQ2nQ1nstarQ1nstar = pow(Qvector1n.X(),2.)*Qvector2n.Y()-2.*Qvector1n.X()*Qvector1n.Y()*Qvector2n.X()-pow(Qvector1n.Y(),2.)*Qvector2n.Y();//Im[Q_{2n} Q_{n}^* Q_{n}^*]
616 Double_t reQ1nQ1nQ2nstar = reQ2nQ1nstarQ1nstar;//Re[Q_{n} Q_{n} Q_{2n}^*] = Re[Q_{2n} Q_{n}^* Q_{n}^*]
1dfa3c16 617 Double_t reQ3nQ1nQ2nstarQ2nstar = (pow(afvQvector2n.X(),2.)-pow(afvQvector2n.Y(),2.))*(afvQvector3n.X()*afvQvector1n.X()-afvQvector3n.Y()*afvQvector1n.Y())+2.*afvQvector2n.X()*afvQvector2n.Y()*(afvQvector3n.X()*afvQvector1n.Y()+afvQvector3n.Y()*afvQvector1n.X());
52021ae2 618 //Double_t imQ3nQ1nQ2nstarQ2nstar = calculate and implement this (deleteMe)
619 Double_t reQ2nQ2nQ3nstarQ1nstar = reQ3nQ1nQ2nstarQ2nstar;
1dfa3c16 620 Double_t reQ4nQ2nstarQ2nstar = pow(afvQvector2n.X(),2.)*afvQvector4n.X()+2.*afvQvector2n.X()*afvQvector2n.Y()*afvQvector4n.Y()-pow(afvQvector2n.Y(),2.)*afvQvector4n.X();//Re[Q_{4n} Q_{2n}^* Q_{2n}^*]
52021ae2 621 //Double_t imQ4nQ2nstarQ2nstar = calculate and implement this (deleteMe)
622 Double_t reQ2nQ2nQ4nstar = reQ4nQ2nstarQ2nstar;
1dfa3c16 623 Double_t reQ4nQ3nstarQ1nstar = afvQvector4n.X()*(afvQvector3n.X()*afvQvector1n.X()-afvQvector3n.Y()*afvQvector1n.Y())+afvQvector4n.Y()*(afvQvector3n.X()*afvQvector1n.Y()+afvQvector3n.Y()*afvQvector1n.X());//Re[Q_{4n} Q_{3n}^* Q_{n}^*]
52021ae2 624 Double_t reQ3nQ1nQ4nstar = reQ4nQ3nstarQ1nstar;//Re[Q_{3n} Q_{n} Q_{4n}^*] = Re[Q_{4n} Q_{3n}^* Q_{n}^*]
625 //Double_t imQ4nQ3nstarQ1nstar = calculate and implement this (deleteMe)
1dfa3c16 626 Double_t reQ3nQ2nstarQ1nstar = afvQvector3n.X()*afvQvector2n.X()*afvQvector1n.X()-afvQvector3n.X()*afvQvector2n.Y()*afvQvector1n.Y()+afvQvector3n.Y()*afvQvector2n.X()*afvQvector1n.Y()+afvQvector3n.Y()*afvQvector2n.Y()*afvQvector1n.X();//Re[Q_{3n} Q_{2n}^* Q_{n}^*]
52021ae2 627 Double_t reQ2nQ1nQ3nstar = reQ3nQ2nstarQ1nstar;//Re[Q_{2n} Q_{n} Q_{3n}^*] = Re[Q_{3n} Q_{2n}^* Q_{n}^*]
628 //Double_t imQ3nQ2nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 629 Double_t reQ3nQ1nstarQ1nstarQ1nstar = afvQvector3n.X()*pow(afvQvector1n.X(),3)-3.*afvQvector1n.X()*afvQvector3n.X()*pow(afvQvector1n.Y(),2)+3.*afvQvector1n.Y()*afvQvector3n.Y()*pow(afvQvector1n.X(),2)-afvQvector3n.Y()*pow(afvQvector1n.Y(),3);//Re[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*]
52021ae2 630 //Double_t imQ3nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 631 Double_t xQ2nQ1nQ2nstarQ1nstar = pow(afvQvector2n.Mod()*afvQvector1n.Mod(),2);//|Q_{2n}|^2 |Q_{n}|^2
632 Double_t reQ4nQ2nstarQ1nstarQ1nstar = (afvQvector4n.X()*afvQvector2n.X()+afvQvector4n.Y()*afvQvector2n.Y())*(pow(afvQvector1n.X(),2)-pow(afvQvector1n.Y(),2))+2.*afvQvector1n.X()*afvQvector1n.Y()*(afvQvector4n.Y()*afvQvector2n.X()-afvQvector4n.X()*afvQvector2n.Y());//Re[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*]
52021ae2 633 //Double_t imQ4nQ2nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 634 Double_t reQ2nQ1nQ1nstarQ1nstarQ1nstar = (afvQvector2n.X()*afvQvector1n.X()-afvQvector2n.Y()*afvQvector1n.Y())*(pow(afvQvector1n.X(),3)-3.*afvQvector1n.X()*pow(afvQvector1n.Y(),2))+(afvQvector2n.X()*afvQvector1n.Y()+afvQvector1n.X()*afvQvector2n.Y())*(3.*afvQvector1n.Y()*pow(afvQvector1n.X(),2)-pow(afvQvector1n.Y(),3));//Re[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*]
52021ae2 635 //Double_t imQ2nQ1nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 636 Double_t reQ2nQ2nQ2nstarQ1nstarQ1nstar = pow(afvQvector2n.Mod(),2.)*(afvQvector2n.X()*(pow(afvQvector1n.X(),2.)-pow(afvQvector1n.Y(),2.))+2.*afvQvector2n.Y()*afvQvector1n.X()*afvQvector1n.Y());//Re[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*]
52021ae2 637 //Double_t imQ2nQ2nQ2nstarQ1nstarQ1nstar = pow(Qvector2n.Mod(),2.)*(Qvector2n.Y()*(pow(Qvector1n.X(),2.)-pow(Qvector1n.Y(),2.))-2.*Qvector2n.X()*Qvector1n.X()*Qvector1n.Y());//Im[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*]
1dfa3c16 638 Double_t reQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(afvQvector1n.X(),4.)*afvQvector4n.X()-6.*pow(afvQvector1n.X(),2.)*afvQvector4n.X()*pow(afvQvector1n.Y(),2.)+pow(afvQvector1n.Y(),4.)*afvQvector4n.X()+4.*pow(afvQvector1n.X(),3.)*afvQvector1n.Y()*afvQvector4n.Y()-4.*pow(afvQvector1n.Y(),3.)*afvQvector1n.X()*afvQvector4n.Y();//Re[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
dee1e0e0 639 //Double_t imQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(Qvector1n.X(),4.)*Qvector4n.Y()-6.*pow(Qvector1n.X(),2.)*Qvector4n.Y()*pow(Qvector1n.Y(),2.)+pow(Qvector1n.Y(),4.)*Qvector4n.Y()+4.*pow(Qvector1n.Y(),3.)*Qvector1n.X()*Qvector4n.X()-4.*pow(Qvector1n.X(),3.)*Qvector1n.Y()*Qvector4n.X();//Im[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
1dfa3c16 640 Double_t reQ3nQ1nQ2nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),2.)*(afvQvector1n.X()*afvQvector2n.X()*afvQvector3n.X()-afvQvector3n.X()*afvQvector1n.Y()*afvQvector2n.Y()+afvQvector2n.X()*afvQvector1n.Y()*afvQvector3n.Y()+afvQvector1n.X()*afvQvector2n.Y()*afvQvector3n.Y());//Re[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*]
641 //Double_t imQ3nQ1nQ2nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),2.)*(-afvQvector2n.X()*afvQvector3n.X()*afvQvector1n.Y()-afvQvector1n.X()*afvQvector3n.X()*afvQvector2n.Y()+afvQvector1n.X()*afvQvector2n.X()*afvQvector3n.Y()-afvQvector1n.Y()*afvQvector2n.Y()*afvQvector3n.Y());//Im[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*]
642 Double_t reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(afvQvector1n.X(),2.)*afvQvector2n.X()-2.*afvQvector1n.X()*afvQvector2n.X()*afvQvector1n.Y()-afvQvector2n.X()*pow(afvQvector1n.Y(),2.)+afvQvector2n.Y()*pow(afvQvector1n.X(),2.)+2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.Y()-pow(afvQvector1n.Y(),2.)*afvQvector2n.Y())*(pow(afvQvector1n.X(),2.)*afvQvector2n.X()+2.*afvQvector1n.X()*afvQvector2n.X()*afvQvector1n.Y()-afvQvector2n.X()*pow(afvQvector1n.Y(),2.)-afvQvector2n.Y()*pow(afvQvector1n.X(),2.)+2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.Y()+pow(afvQvector1n.Y(),2.)*afvQvector2n.Y());//Re[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
643 //Double_t imQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = 2.*(pow(afvQvector1n.X(),2.)*afvQvector2n.X()-afvQvector2n.X()*pow(afvQvector1n.Y(),2.)+2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.Y())*(pow(afvQvector1n.X(),2.)*afvQvector2n.Y()-2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.X()-pow(afvQvector1n.Y(),2.)*afvQvector2n.Y());//Im[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
644 Double_t reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),2.)*(pow(afvQvector1n.X(),3.)*afvQvector3n.X()-3.*afvQvector1n.X()*afvQvector3n.X()*pow(afvQvector1n.Y(),2.)+3.*pow(afvQvector1n.X(),2.)*afvQvector1n.Y()*afvQvector3n.Y()-pow(afvQvector1n.Y(),3.)*afvQvector3n.Y());//Re[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
645 //Double_t imQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),2.)*(pow(afvQvector1n.Y(),3.)*afvQvector3n.X()-3.*afvQvector1n.Y()*afvQvector3n.X()*pow(afvQvector1n.X(),2.)-3.*pow(afvQvector1n.Y(),2.)*afvQvector1n.X()*afvQvector3n.Y()+pow(afvQvector1n.X(),3.)*afvQvector3n.Y());//Im[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
646 Double_t xQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar = pow(afvQvector2n.Mod(),2.)*pow(afvQvector1n.Mod(),4.);//|Q_{2n}|^2 |Q_{n}|^4
647 Double_t reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),4.)*(pow(afvQvector1n.X(),2.)*afvQvector2n.X()-afvQvector2n.X()*pow(afvQvector1n.Y(),2.)+2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.Y());//Re[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
648 //Double_t imQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),4.)*(pow(afvQvector1n.X(),2.)*afvQvector2n.Y()-afvQvector2n.Y()*pow(afvQvector1n.Y(),2.)-2.*afvQvector1n.X()*afvQvector2n.X()*afvQvector1n.Y());//Re[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
bc92c0cb 649 //---------------------------------------------------------------------------------------------------------
650
651 //---------------------------------------------------------------------------------------------------------
dee1e0e0 652 //
653 // **************************************
654 // **** multi-particle correlations: ****
655 // **************************************
656 //
657 // Remark 1: multi-particle correlations calculated with Q-vectors are stored in fQCorrelations.
658 // Remark 2: binning of fQCorrelations is organized as follows:
659 //
660 // 1st bin: <2>_{n|n} = two1n1n
661 // 2nd bin: <2>_{2n|2n} = two2n2n
662 // 3rd bin: <2>_{3n|3n} = two3n3n
663 // 4th bin: <2>_{4n|4n} = two4n4n
664 // 5th bin: -- EMPTY --
665 // 6th bin: <3>_{2n|n,n} = three2n1n1n
666 // 7th bin: <3>_{3n|2n,n} = three3n2n1n
667 // 8th bin: <3>_{4n|2n,2n} = three4n2n2n
668 // 9th bin: <3>_{4n|3n,n} = three4n3n1n
669 //10th bin: -- EMPTY --
670 //11th bin: <4>_{n,n|n,n} = four1n1n1n1n
671 //12th bin: <4>_{2n,n|2n,n} = four2n1n2n1n
672 //13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n
673 //14th bin: <4>_{3n|n,n,n} = four3n1n1n1n
674 //15th bin: <4>_{3n,n|3n,n} = four3n1n3n1n
675 //16th bin: <4>_{3n,n|2n,2n} = four3n1n2n2n
676 //17th bin: <4>_{4n|2n,n,n} = four4n2n1n1n
677 //18th bin: -- EMPTY --
678 //19th bin: <5>_{2n|n,n,n,n} = five2n1n1n1n1n
679 //20th bin: <5>_{2n,2n|2n,n,n} = five2n2n2n1n1n
680 //21st bin: <5>_{3n,n|2n,n,n} = five3n1n2n1n1n
681 //22nd bin: <5>_{4n|n,n,n,n} = five4n1n1n1n1n
682 //23rd bin: -- EMPTY --
683 //24th bin: <6>_{n,n,n|n,n,n} = six1n1n1n1n1n1n
684 //25th bin: <6>_{2n,n,n|2n,n,n} = six2n1n1n2n1n1n
685 //26th bin: <6>_{2n,2n|n,n,n,n} = six2n2n1n1n1n1n
686 //27th bin: <6>_{3n,n|n,n,n,n} = six3n1n1n1n1n1n
687 //28th bin: -- EMPTY --
688 //29th bin: <7>_{2n,n,n|n,n,n,n} = seven2n1n1n1n1n1n1n
689 //30th bin: -- EMPTY --
690 //31st bin: <8>_{n,n,n,n|n,n,n,n} = eight1n1n1n1n1n1n1n1n
691
1315fe58 692
8842fb2b 693 // binning of fQProduct (all correlations are evaluated in harmonic n):
694 // 1st bin: <2>*<4>
695 // 2nd bin: <2>*<6>
696 // 3rd bin: <2>*<8>
697 // 4th bin: <4>*<6>
698 // 5th bin: <4>*<8>
699 // 6th bin: <6>*<8>
700
bc92c0cb 701 //2-particle
52021ae2 702 Double_t two1n1n=0., two2n2n=0., two3n3n=0., two4n4n=0.;
1dfa3c16 703 if(dMult>1)
bc92c0cb 704 {
cb308e83 705 //fill the common control histogram (2nd order):
706 fCommonHists2nd->FillControlHistograms(anEvent);
707
1dfa3c16 708 two1n1n = (pow(afvQvector1n.Mod(),2.)-dMult)/(dMult*(dMult-1.)); //<2>_{n|n} = <cos(n*(phi1-phi2))>
709 two2n2n = (pow(afvQvector2n.Mod(),2.)-dMult)/(dMult*(dMult-1.)); //<2>_{2n|2n} = <cos(2n*(phi1-phi2))>
710 two3n3n = (pow(afvQvector3n.Mod(),2.)-dMult)/(dMult*(dMult-1.)); //<2>_{3n|3n} = <cos(3n*(phi1-phi2))>
711 two4n4n = (pow(afvQvector4n.Mod(),2.)-dMult)/(dMult*(dMult-1.)); //<2>_{4n|4n} = <cos(4n*(phi1-phi2))>
1315fe58 712
1dfa3c16 713 fQCorrelations->Fill(0.,two1n1n,dMult*(dMult-1.));
714 fQCorrelations->Fill(1.,two2n2n,dMult*(dMult-1.));
715 fQCorrelations->Fill(2.,two3n3n,dMult*(dMult-1.));
716 fQCorrelations->Fill(3.,two4n4n,dMult*(dMult-1.));
1315fe58 717
1dfa3c16 718 f2pDistribution->Fill(two1n1n,dMult*(dMult-1.));
bc92c0cb 719 }
720
721 //3-particle
52021ae2 722 Double_t three2n1n1n=0., three3n2n1n=0., three4n2n2n=0., three4n3n1n=0.;
1dfa3c16 723 if(dMult>2)
bc92c0cb 724 {
1dfa3c16 725 three2n1n1n = (reQ2nQ1nstarQ1nstar-2.*pow(afvQvector1n.Mod(),2.)-pow(afvQvector2n.Mod(),2.)+2.*dMult)/(dMult*(dMult-1.)*(dMult-2.)); //Re[<3>_{2n|n,n}] = Re[<3>_{n,n|2n}] = <cos(n*(2.*phi1-phi2-phi3))>
726 three3n2n1n = (reQ3nQ2nstarQ1nstar-pow(afvQvector3n.Mod(),2.)-pow(afvQvector2n.Mod(),2.)-pow(afvQvector1n.Mod(),2.)+2.*dMult)/(dMult*(dMult-1.)*(dMult-2.)); //Re[<3>_{3n|2n,n}] = Re[<3>_{2n,n|3n}] = <cos(n*(3.*phi1-2.*phi2-phi3))>
727 three4n2n2n = (reQ4nQ2nstarQ2nstar-2.*pow(afvQvector2n.Mod(),2.)-pow(afvQvector4n.Mod(),2.)+2.*dMult)/(dMult*(dMult-1.)*(dMult-2.)); //Re[<3>_{4n|2n,2n}] = Re[<3>_{2n,2n|4n}] = <cos(n*(4.*phi1-2.*phi2-2.*phi3))>
728 three4n3n1n = (reQ4nQ3nstarQ1nstar-pow(afvQvector4n.Mod(),2.)-pow(afvQvector3n.Mod(),2.)-pow(afvQvector1n.Mod(),2.)+2.*dMult)/(dMult*(dMult-1.)*(dMult-2.)); //Re[<3>_{4n|3n,n}] = Re[<3>_{3n,n|4n}] = <cos(n*(4.*phi1-3.*phi2-phi3))>
729
730 fQCorrelations->Fill(5.,three2n1n1n,dMult*(dMult-1.)*(dMult-2.));
731 fQCorrelations->Fill(6.,three3n2n1n,dMult*(dMult-1.)*(dMult-2.));
732 fQCorrelations->Fill(7.,three4n2n2n,dMult*(dMult-1.)*(dMult-2.));
733 fQCorrelations->Fill(8.,three4n3n1n,dMult*(dMult-1.)*(dMult-2.));
bc92c0cb 734 }
735
736 //4-particle
52021ae2 737 Double_t four1n1n1n1n=0., four2n2n2n2n=0., four2n1n2n1n=0., four3n1n1n1n=0., four4n2n1n1n=0., four3n1n2n2n=0., four3n1n3n1n=0.;
1dfa3c16 738 if(dMult>3)
bc92c0cb 739 {
cb308e83 740 //fill the common control histogram (4th order):
741 fCommonHists4th->FillControlHistograms(anEvent);
742
1dfa3c16 743 four1n1n1n1n = (2.*dMult*(dMult-3.)+pow(afvQvector1n.Mod(),4.)-4.*(dMult-2.)*pow(afvQvector1n.Mod(),2.)-2.*reQ2nQ1nstarQ1nstar+pow(afvQvector2n.Mod(),2.))/(dMult*(dMult-1)*(dMult-2.)*(dMult-3.));//<4>_{n,n|n,n}
744 four2n2n2n2n = (2.*dMult*(dMult-3.)+pow(afvQvector2n.Mod(),4.)-4.*(dMult-2.)*pow(afvQvector2n.Mod(),2.)-2.*reQ4nQ2nstarQ2nstar+pow(afvQvector4n.Mod(),2.))/(dMult*(dMult-1)*(dMult-2.)*(dMult-3.));//<4>_{2n,2n|2n,2n}
745 four2n1n2n1n = (xQ2nQ1nQ2nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar-2.*reQ2nQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))-((dMult-5.)*pow(afvQvector1n.Mod(),2.)+(dMult-4.)*pow(afvQvector2n.Mod(),2.)-pow(afvQvector3n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))+(dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4>_{2n,n|2n,n}]
746 four3n1n1n1n = (reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar-3.*reQ2nQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))+(2.*pow(afvQvector3n.Mod(),2.)+3.*pow(afvQvector2n.Mod(),2.)+6.*pow(afvQvector1n.Mod(),2.)-6.*dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4>_{3n|n,n,n}]
747 four4n2n1n1n = (reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar-2.*reQ3nQ2nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))-(reQ2nQ1nstarQ1nstar-2.*pow(afvQvector4n.Mod(),2.)-2.*pow(afvQvector3n.Mod(),2.)-3.*pow(afvQvector2n.Mod(),2.)-4.*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))-(6.)/((dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4>_{4n|2n,n,n}]
748 four3n1n2n2n = (reQ3nQ1nQ2nstarQ2nstar-reQ4nQ2nstarQ2nstar-reQ3nQ1nQ4nstar-2.*reQ3nQ2nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))-(2.*reQ1nQ1nQ2nstar-pow(afvQvector4n.Mod(),2.)-2.*pow(afvQvector3n.Mod(),2.)-4.*pow(afvQvector2n.Mod(),2.)-4.*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))-(6.)/((dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4>_{3n,n|2n,2n}]
749 four3n1n3n1n = (pow(afvQvector3n.Mod(),2.)*pow(afvQvector1n.Mod(),2.)-2.*reQ4nQ3nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))+(pow(afvQvector4n.Mod(),2.)-(dMult-4.)*pow(afvQvector3n.Mod(),2.)+pow(afvQvector2n.Mod(),2.)-(dMult-4.)*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))+(dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.));//<4>_{3n,n|3n,n}
1315fe58 750 //four_3n1n3n1n = Q3nQ1nQ3nstarQ1nstar/(M*(M-1.)*(M-2.)*(M-3.))-(2.*three_3n2n1n+2.*three_4n3n1n)/(M-3.)-(two_4n4n+M*two_3n3n+two_2n2n+M*two_1n1n)/((M-2.)*(M-3.))-M/((M-1.)*(M-2.)*(M-3.));//<4>_{3n,n|3n,n}
751
1dfa3c16 752 fQCorrelations->Fill(10.,four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
753 fQCorrelations->Fill(11.,four2n1n2n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
754 fQCorrelations->Fill(12.,four2n2n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
755 fQCorrelations->Fill(13.,four3n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
756 fQCorrelations->Fill(14.,four3n1n3n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
757 fQCorrelations->Fill(15.,four3n1n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
758 fQCorrelations->Fill(16.,four4n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
dee1e0e0 759
1dfa3c16 760 f4pDistribution->Fill(four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
bc92c0cb 761
1dfa3c16 762 fQProduct->Fill(0.,two1n1n*four1n1n1n1n,dMult*(dMult-1.)*dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
bc92c0cb 763 }
764
765 //5-particle
52021ae2 766 Double_t five2n1n1n1n1n=0., five2n2n2n1n1n=0., five3n1n2n1n1n=0., five4n1n1n1n1n=0.;
1dfa3c16 767 if(dMult>4)
1315fe58 768 {
1dfa3c16 769 five2n1n1n1n1n = (reQ2nQ1nQ1nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar+6.*reQ3nQ2nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(reQ2nQ1nQ3nstar+3.*(dMult-6.)*reQ2nQ1nstarQ1nstar+3.*reQ1nQ1nQ2nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(2.*pow(afvQvector3n.Mod(),2.)+3.*pow(afvQvector2n.Mod()*afvQvector1n.Mod(),2.)-3.*(dMult-4.)*pow(afvQvector2n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-3.*(pow(afvQvector1n.Mod(),4.)-2.*(2*dMult-5.)*pow(afvQvector1n.Mod(),2.)+2.*dMult*(dMult-4.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));//Re[<5>_{2n,n|n,n,n}]
1315fe58 770
1dfa3c16 771 five2n2n2n1n1n = (reQ2nQ2nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ2nQ2nQ3nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))+2.*(reQ4nQ2nstarQ2nstar+4.*reQ3nQ2nstarQ1nstar+reQ3nQ1nQ4nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))+(reQ2nQ2nQ4nstar-2.*(dMult-5.)*reQ2nQ1nstarQ1nstar+2.*reQ1nQ1nQ2nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(2.*pow(afvQvector4n.Mod(),2.)+4.*pow(afvQvector3n.Mod(),2.)+1.*pow(afvQvector2n.Mod(),4.)-2.*(3.*dMult-10.)*pow(afvQvector2n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(4.*pow(afvQvector1n.Mod(),2.)*pow(afvQvector2n.Mod(),2.)-4.*(dMult-5.)*pow(afvQvector1n.Mod(),2.)+4.*dMult*(dMult-6.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));//Re[<5>_{2n,2n|2n,n,n}]
1315fe58 772
dee1e0e0 773 //five_2n2n2n1n1n = reQ2nQ2nQ2nstarQ1nstarQ1nstar/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.))-(4.*four_2n1n2n1n+2.*four_3n1n2n2n+1.*four_2n2n2n2n+four_4n2n1n1n)/(M-4.)-(2.*three_4n3n1n+three_4n2n2n+three_4n2n2n+2.*three_3n2n1n)/((M-3.)*(M-4.))-(4.*three_3n2n1n+(2.*M-1.)*three_2n1n1n+2.*three_2n1n1n)/((M-3.)*(M-4.))-(two_4n4n+2.*two_3n3n+4.*(M-1.)*two_2n2n+2.*(2.*M-1.)*two_1n1n)/((M-2.)*(M-3.)*(M-4.))-(2.*M-1.)/((M-1.)*(M-2.)*(M-3.)*(M-4.)); //OK!
1315fe58 774
1dfa3c16 775 five4n1n1n1n1n = (reQ4nQ1nstarQ1nstarQ1nstarQ1nstar-6.*reQ4nQ2nstarQ1nstarQ1nstar-4.*reQ3nQ1nstarQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))+(8.*reQ4nQ3nstarQ1nstar+3.*reQ4nQ2nstarQ2nstar+12.*reQ3nQ2nstarQ1nstar+12.*reQ2nQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(6.*pow(afvQvector4n.Mod(),2.)+8.*pow(afvQvector3n.Mod(),2.)+12.*pow(afvQvector2n.Mod(),2.)+24.*pow(afvQvector1n.Mod(),2.)-24.*dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));//Re[<5>_{4n|n,n,n,n}]
1315fe58 776
dee1e0e0 777 //five_4n1n1n1n1n = reQ4nQ1nstarQ1nstarQ1nstarQ1nstar/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.)) - (4.*four_3n1n1n1n+6.*four_4n2n1n1n)/(M-4.) - (6.*three_2n1n1n + 12.*three_3n2n1n + 4.*three_4n3n1n + 3.*three_4n2n2n)/((M-3.)*(M-4.)) - (4.*two_1n1n + 6.*two_2n2n + 4.*two_3n3n + 1.*two_4n4n)/((M-2.)*(M-3.)*(M-4.)) - 1./((M-1.)*(M-2.)*(M-3.)*(M-4.)); //OK!
778
1dfa3c16 779 five3n1n2n1n1n = (reQ3nQ1nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(reQ3nQ1nQ2nstarQ2nstar-3.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-((2.*dMult-13.)*reQ3nQ2nstarQ1nstar-reQ3nQ1nQ4nstar-9.*reQ2nQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(2.*reQ1nQ1nQ2nstar+2.*pow(afvQvector4n.Mod(),2.)-2.*(dMult-5.)*pow(afvQvector3n.Mod(),2.)+2.*pow(afvQvector3n.Mod(),2.)*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))+(2.*(dMult-6.)*pow(afvQvector2n.Mod(),2.)-2.*pow(afvQvector2n.Mod(),2.)*pow(afvQvector1n.Mod(),2.)-pow(afvQvector1n.Mod(),4.)+2.*(3.*dMult-11.)*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-4.*(dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));//Re[<5>_{3n,n|2n,n,n}]
dee1e0e0 780
1dfa3c16 781 //five3n1n2n1n1n = reQ3nQ1nQ2nstarQ1nstarQ1nstar/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) - (four4n2n1n1n+four1n1n1n1n+four3n1n1n1n+2.*four2n1n2n1n+2.*three3n2n1n+2.*four3n1n3n1n+four3n1n2n2n)/(dMult-4.) - (2.*three4n3n1n+three4n2n2n+6.*three3n2n1n+three4n3n1n+2.*three3n2n1n+3.*three2n1n1n+2.*three2n1n1n+4.*two1n1n+2.*two2n2n+2.*two3n3n)/((dMult-3.)*(dMult-4.)) - (5.*two1n1n + 4.*two2n2n + 3.*two3n3n + 1.*two4n4n + 2.)/((dMult-2.)*(dMult-3.)*(dMult-4.)) - 1./((dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) ;//Re[<5>_{3n,n|2n,n,n}] //OK!
1315fe58 782
1dfa3c16 783 //five3n1n2n1n1n = reQ3nQ1nQ2nstarQ1nstarQ1nstar/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) - (four4n2n1n1n+four1n1n1n1n+four3n1n1n1n+2.*four2n1n2n1n+2.*four3n1n3n1n+four3n1n2n2n)/(dMult-4.) - (2.*three4n3n1n+three4n2n2n+2.*dMult*three3n2n1n+three4n3n1n+2.*three3n2n1n+3.*three2n1n1n+2.*three2n1n1n)/((dMult-3.)*(dMult-4.)) - ((4.*dMult-3.)*two1n1n + 2.*dMult*two2n2n + (2.*dMult-1.)*two3n3n + two4n4n)/((dMult-2.)*(dMult-3.)*(dMult-4.)) - (2.*dMult-1.)/((dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) ;//Re[<5>_{3n,n|2n,n,n}] //OK!
dee1e0e0 784
1dfa3c16 785 fQCorrelations->Fill(18.,five2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
786 fQCorrelations->Fill(19.,five2n2n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
787 fQCorrelations->Fill(20.,five3n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
788 fQCorrelations->Fill(21.,five4n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
1315fe58 789 }
bc92c0cb 790
791 //6-particle
dee1e0e0 792 Double_t six1n1n1n1n1n1n=0., six2n2n1n1n1n1n=0., six3n1n1n1n1n1n=0., six2n1n1n2n1n1n=0.;
1dfa3c16 793 if(dMult>5)
bc92c0cb 794 {
cb308e83 795 //fill the common control histogram (6th order):
796 fCommonHists6th->FillControlHistograms(anEvent);
797
1dfa3c16 798 six1n1n1n1n1n1n = (pow(afvQvector1n.Mod(),6.)+9.*xQ2nQ1nQ2nstarQ1nstar-6.*reQ2nQ1nQ1nstarQ1nstarQ1nstar)/(dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5))+4.*(reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar)/(dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5))+2.*(9.*(dMult-4.)*reQ2nQ1nstarQ1nstar+2.*pow(afvQvector3n.Mod(),2.))/(dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5))-9.*(pow(afvQvector1n.Mod(),4.)+pow(afvQvector2n.Mod(),2.))/(dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-5))+(18.*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1)*(dMult-3)*(dMult-4))-(6.)/((dMult-1)*(dMult-2)*(dMult-3));//<6>_{n,n,n|n,n,n}
1315fe58 799
1dfa3c16 800 six2n1n1n2n1n1n = (xQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(2.*five2n2n2n1n1n+4.*five2n1n1n1n1n+4.*five3n1n2n1n1n+4.*four2n1n2n1n+1.*four1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four1n1n1n1n+4.*two1n1n+2.*three2n1n1n+2.*three2n1n1n+4.*four3n1n1n1n+8.*three2n1n1n+2.*four4n2n1n1n+4.*four2n1n2n1n+2.*two2n2n+8.*four2n1n2n1n+4.*four3n1n3n1n+8.*three3n2n1n+4.*four3n1n2n2n+4.*four1n1n1n1n+4.*four2n1n2n1n+1.*four2n2n2n2n)-dMult*(dMult-1.)*(dMult-2.)*(2.*three2n1n1n+8.*two1n1n+4.*two1n1n+2.+4.*two1n1n+4.*three2n1n1n+2.*two2n2n+4.*three2n1n1n+8.*three3n2n1n+8.*two2n2n+4.*three4n3n1n+4.*two3n3n+4.*three3n2n1n+4.*two1n1n+8.*three2n1n1n+4.*two1n1n+4.*three3n2n1n+4.*three2n1n1n+2.*two2n2n+4.*three3n2n1n+2.*three4n2n2n)-dMult*(dMult-1.)*(4.*two1n1n+4.+4.*two1n1n+2.*two2n2n+1.+4.*two1n1n+4.*two2n2n+4.*two3n3n+ 1.+2.*two2n2n+1.*two4n4n)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));//<6>_{2n,n,n|2n,n,n}
dee1e0e0 801
1dfa3c16 802 six2n2n1n1n1n1n = (reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(five4n1n1n1n1n+8.*five2n1n1n1n1n+6.*five2n2n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+12.*three2n1n1n+12.*four1n1n1n1n+24.*four2n1n2n1n+4.*four3n1n2n2n+3.*four2n2n2n2n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n+4.*three4n3n1n+3.*three4n2n2n+8.*three2n1n1n+24.*two1n1n+12.*two2n2n+12.*three2n1n1n+8.*three3n2n1n+1.*three4n2n2n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+2.*two2n2n+8.*two1n1n+6.)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));//<6>_{2n,2n,n|n,n,n}
dee1e0e0 803
1dfa3c16 804 six3n1n1n1n1n1n = (reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(five4n1n1n1n1n+4.*five2n1n1n1n1n+6.*five3n1n2n1n1n+4.*four3n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+6.*four1n1n1n1n+12.*three2n1n1n+12.*four2n1n2n1n+6.*four3n1n1n1n+12.*three3n2n1n+4.*four3n1n3n1n+3.*four3n1n2n2n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n+4.*three4n3n1n+3.*three4n2n2n+4.*two1n1n+12.*two1n1n+6.*three2n1n1n+12.*three2n1n1n+4.*three3n2n1n+12.*two2n2n+4.*three3n2n1n+4.*two3n3n+1.*three4n3n1n+6.*three3n2n1n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+1.*two1n1n+4.+6.*two1n1n+4.*two2n2n+1.*two3n3n)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));//<6>_{3n,n|n,n,n,n}
dee1e0e0 805
1dfa3c16 806 fQCorrelations->Fill(23.,six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
807 fQCorrelations->Fill(24.,six2n1n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
808 fQCorrelations->Fill(25.,six2n2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
809 fQCorrelations->Fill(26.,six3n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
dee1e0e0 810
1dfa3c16 811 f6pDistribution->Fill(six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
bc92c0cb 812
1dfa3c16 813 fQProduct->Fill(1.,two1n1n*six1n1n1n1n1n1n,dMult*(dMult-1.)*dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
814 fQProduct->Fill(3.,four1n1n1n1n*six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
bc92c0cb 815 }
dee1e0e0 816
817 //7-particle
818 Double_t seven2n1n1n1n1n1n1n=0.;
1dfa3c16 819 if(dMult>6)
dee1e0e0 820 {
1dfa3c16 821 seven2n1n1n1n1n1n1n = (reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(2.*six3n1n1n1n1n1n+4.*six1n1n1n1n1n1n+1.*six2n2n1n1n1n1n+6.*six2n1n1n2n1n1n+8.*five2n1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(1.*five4n1n1n1n1n +8.*five2n1n1n1n1n+8.*four3n1n1n1n+12.*five3n1n2n1n1n+4.*five2n1n1n1n1n+3.*five2n2n2n1n1n+6.*five2n2n2n1n1n+6.*four1n1n1n1n+24.*four1n1n1n1n+12.*five2n1n1n1n1n+12.*five2n1n1n1n1n+12.*three2n1n1n+24.*four2n1n2n1n+4.*five3n1n2n1n1n+4.*five2n1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+12.*four1n1n1n1n+24.*three2n1n1n+24.*four2n1n2n1n+12.*four3n1n1n1n+24.*three3n2n1n+8.*four3n1n3n1n+6.*four3n1n2n2n+6.*three2n1n1n+12.*four1n1n1n1n+12.*four2n1n2n1n+6.*three2n1n1n+12.*four2n1n2n1n+4.*four3n1n2n2n+3.*four2n2n2n2n+4.*four1n1n1n1n+6.*three2n1n1n+24.*two1n1n+24.*four1n1n1n1n+4.*four3n1n1n1n+24.*two1n1n+24.*three2n1n1n+12.*two2n2n+24.*three2n1n1n+12.*four2n1n2n1n+8.*three3n2n1n+8.*four2n1n2n1n+1.*four4n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+1.*three2n1n1n+8.*two1n1n+12.*three3n2n1n+24.*two1n1n+12.*three2n1n1n+4.*three2n1n1n+8.*two1n1n+4.*three4n3n1n+24.*three2n1n1n+8.*three3n2n1n+12.*two1n1n+12.*two1n1n+3.*three4n2n2n+24.*two2n2n+6.*two2n2n+12.+12.*three3n2n1n+8.*two3n3n+12.*three2n1n1n+24.*two1n1n+4.*three3n2n1n+8.*three3n2n1n+2.*three4n3n1n+12.*two1n1n+8.*three2n1n1n+4.*three2n1n1n+2.*three3n2n1n+6.*two2n2n+8.*two2n2n+1.*three4n2n2n+4.*three3n2n1n+6.*three2n1n1n)-dMult*(dMult-1.)*(4.*two1n1n+2.*two1n1n+6.*two2n2n+8.+1.*two2n2n+4.*two3n3n+12.*two1n1n+4.*two1n1n+1.*two4n4n+8.*two2n2n+6.+2.*two3n3n+4.*two1n1n+1.*two2n2n)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.));
dee1e0e0 822
1dfa3c16 823 fQCorrelations->Fill(28.,seven2n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.));
dee1e0e0 824 }
825
826 //8-particle
827 Double_t eight1n1n1n1n1n1n1n1n=0.;
1dfa3c16 828 if(dMult>7)
dee1e0e0 829 {
cb308e83 830 //fill the common control histogram (8th order):
831 fCommonHists8th->FillControlHistograms(anEvent);
832
1dfa3c16 833 eight1n1n1n1n1n1n1n1n = (pow(afvQvector1n.Mod(),8)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(12.*seven2n1n1n1n1n1n1n+16.*six1n1n1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(8.*six3n1n1n1n1n1n+48.*six1n1n1n1n1n1n+6.*six2n2n1n1n1n1n+96.*five2n1n1n1n1n+72.*four1n1n1n1n+36.*six2n1n1n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(2.*five4n1n1n1n1n+32.*five2n1n1n1n1n+36.*four1n1n1n1n+32.*four3n1n1n1n+48.*five2n1n1n1n1n+48.*five3n1n2n1n1n+144.*five2n1n1n1n1n+288.*four1n1n1n1n+36.*five2n2n2n1n1n+144.*three2n1n1n+96.*two1n1n+144.*four2n1n2n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(8.*four3n1n1n1n+48.*four1n1n1n1n+12.*four4n2n1n1n+96.*four2n1n2n1n+96.*three2n1n1n+72.*three2n1n1n+144.*two1n1n+16.*four3n1n3n1n+48.*four3n1n1n1n+144.*four1n1n1n1n+72.*four1n1n1n1n+96.*three3n2n1n+24.*four3n1n2n2n+144.*four2n1n2n1n+288.*two1n1n+288.*three2n1n1n+9.*four2n2n2n2n+72.*two2n2n+24.)-dMult*(dMult-1.)*(dMult-2.)*(12.*three2n1n1n+16.*two1n1n+24.*three3n2n1n+48.*three2n1n1n+96.*two1n1n+8.*three4n3n1n+32.*three3n2n1n+96.*three2n1n1n+144.*two1n1n+6.*three4n2n2n+96.*two2n2n+36.*two2n2n+72.+48.*three3n2n1n+16.*two3n3n+72.*three2n1n1n+144.*two1n1n)-dMult*(dMult-1.)*(8.*two1n1n+12.*two2n2n+16.+8.*two3n3n+48.*two1n1n+1.*two4n4n+16.*two2n2n+18.)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.));
dee1e0e0 834
1dfa3c16 835 fQCorrelations->Fill(30.,eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.));
5e838eeb 836
1dfa3c16 837 f8pDistribution->Fill(eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.));
dee1e0e0 838 }
bc92c0cb 839 //---------------------------------------------------------------------------------------------------------
840
bc92c0cb 841 //---------------------------------------------------------------------------------------------------------
842 // DIFFERENTIAL FLOW
843
1dfa3c16 844 Double_t dQ1nx = afvQvector1n.X();
845 Double_t dQ1ny = afvQvector1n.Y();
846 Double_t dQ2nx = afvQvector2n.X();
847 Double_t dQ2ny = afvQvector2n.Y();
bc92c0cb 848
e8a609bc 849 Double_t dBinWidthPt=0.,dBinWidthEta=0.;
850 if(fnBinsPt)
851 {
852 dBinWidthPt=1.*(fPtMax-fPtMin)/fnBinsPt;
853 }
854 if(fnBinsEta)
855 {
856 dBinWidthEta=1.*(fEtaMax-fEtaMin)/fnBinsEta;
857 }
858
1dfa3c16 859 //RP:
860 Double_t qxPtRP=0.,qyPtRP=0.,q2xPtRP=0.,q2yPtRP=0.,mPtRP=0.;//add comments for these variables (deleteMe)
861 Double_t qxEtaRP=0.,qyEtaRP=0.,q2xEtaRP=0.,q2yEtaRP=0.,mEtaRP=0.;//add comments for these variables (deleteMe)
862
863 for(Int_t i=0;i<dMult;i++) //check if nPrim == M
bc92c0cb 864 {
865 fTrack=anEvent->GetTrack(i);
1dfa3c16 866 if(fTrack && fTrack->UseForIntegratedFlow())//checking RP condition
1315fe58 867 {
1dfa3c16 868 //Pt:
869 fPtReq1nRP->Fill(fTrack->Pt(),cos(n*(fTrack->Phi())),1.);
870 fPtImq1nRP->Fill(fTrack->Pt(),sin(n*(fTrack->Phi())),1.);
871 fPtReq2nRP->Fill(fTrack->Pt(),cos(2.*n*(fTrack->Phi())),1.);
872 fPtImq2nRP->Fill(fTrack->Pt(),sin(2.*n*(fTrack->Phi())),1.);
873 //Eta:
874 fEtaReq1nRP->Fill(fTrack->Eta(),cos(n*(fTrack->Phi())),1.);
875 fEtaImq1nRP->Fill(fTrack->Eta(),sin(n*(fTrack->Phi())),1.);
876 fEtaReq2nRP->Fill(fTrack->Eta(),cos(2.*n*(fTrack->Phi())),1.);
877 fEtaImq2nRP->Fill(fTrack->Eta(),sin(2.*n*(fTrack->Phi())),1.);
1315fe58 878 }
bc92c0cb 879 }
880
1dfa3c16 881 //Pt:
882 Double_t twoDiffPt1n1nRP=0.,twoDiffPt2n2nRP=0.,threeDiffPt2n1n1nRP=0.,threeDiffPt1n1n2nRP=0.,fourDiffPt1n1n1n1nRP=0.;
bc92c0cb 883
52021ae2 884 for(Int_t bin=1;bin<(fnBinsPt+1);bin++)//loop over pt-bins
bc92c0cb 885 {
1dfa3c16 886 qxPtRP = (fPtReq1nRP->GetBinContent(bin))*(fPtReq1nRP->GetBinEntries(bin));
887 qyPtRP = (fPtImq1nRP->GetBinContent(bin))*(fPtImq1nRP->GetBinEntries(bin));
888 q2xPtRP = (fPtReq2nRP->GetBinContent(bin))*(fPtReq2nRP->GetBinEntries(bin));
889 q2yPtRP = (fPtImq2nRP->GetBinContent(bin))*(fPtImq2nRP->GetBinEntries(bin));
890 mPtRP = fPtReq1nRP->GetBinEntries(bin);
bc92c0cb 891
1dfa3c16 892 if(mPtRP>0&&dMult>1)
bc92c0cb 893 {
1dfa3c16 894 twoDiffPt1n1nRP = (qxPtRP*dQ1nx+qyPtRP*dQ1ny-mPtRP)/(mPtRP*(dMult-1.));
895 f2PerPtBin1n1nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,twoDiffPt1n1nRP,mPtRP*(dMult-1.));//<2'>_{n|n}
bc92c0cb 896
1dfa3c16 897 twoDiffPt2n2nRP = (q2xPtRP*dQ2nx+q2yPtRP*dQ2ny-mPtRP)/(mPtRP*(dMult-1.));
898 f2PerPtBin2n2nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,twoDiffPt2n2nRP,mPtRP*(dMult-1.));//<2'>_{2n|2n}
bc92c0cb 899 }
900
1dfa3c16 901 if(mPtRP>0&&dMult>2)
bc92c0cb 902 {
1dfa3c16 903 threeDiffPt2n1n1nRP = (q2xPtRP*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yPtRP*dQ1nx*dQ1ny-2.*(qxPtRP*dQ1nx+qyPtRP*dQ1ny)-(q2xPtRP*dQ2nx+q2yPtRP*dQ2ny)+2.*mPtRP)/(mPtRP*(dMult-1.)*(dMult-2.));
904 f3PerPtBin2n1n1nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,threeDiffPt2n1n1nRP,mPtRP*(dMult-1.)*(dMult-2.));//Re[<3'>_{2n|n,n}]
bc92c0cb 905
1dfa3c16 906 threeDiffPt1n1n2nRP = (dQ2nx*(qxPtRP*dQ1nx-qyPtRP*dQ1ny)+dQ2ny*(qxPtRP*dQ1ny+qyPtRP*dQ1nx)-2.*(qxPtRP*dQ1nx+qyPtRP*dQ1ny)-(q2xPtRP*dQ2nx+q2yPtRP*dQ2ny)+2.*mPtRP)/(mPtRP*(dMult-1.)*(dMult-2.));
907 f3PerPtBin1n1n2nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,threeDiffPt1n1n2nRP,mPtRP*(dMult-1.)*(dMult-2.));//Re[<3'>_{n,n|2n}]
bc92c0cb 908 }
909
1dfa3c16 910 if(mPtRP>0&&dMult>3)
bc92c0cb 911 {
1dfa3c16 912 fourDiffPt1n1n1n1nRP = ((dQ1nx*dQ1nx+dQ1ny*dQ1ny)*(qxPtRP*dQ1nx+qyPtRP*dQ1ny)-(q2xPtRP*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yPtRP*dQ1nx*dQ1ny)-(dQ2nx*(qxPtRP*dQ1nx-qyPtRP*dQ1ny)+dQ2ny*(qxPtRP*dQ1ny+qyPtRP*dQ1nx))+(q2xPtRP*dQ2nx+q2yPtRP*dQ2ny)-2.*(dMult-3.)*(qxPtRP*dQ1nx+qyPtRP*dQ1ny)-2.*mPtRP*(dQ1nx*dQ1nx+dQ1ny*dQ1ny)+2.*(dQ1nx*qxPtRP+dQ1ny*qyPtRP)+2.*mPtRP*(dMult-3.))/(mPtRP*(dMult-1.)*(dMult-2.)*(dMult-3.));
913 f4PerPtBin1n1n1n1nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,fourDiffPt1n1n1n1nRP,mPtRP*(dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4'>_{n,n|n,n}]
bc92c0cb 914 }
915
916 }
917
1dfa3c16 918 fPtReq1nRP->Reset();
919 fPtImq1nRP->Reset();
920 fPtReq2nRP->Reset();
921 fPtImq2nRP->Reset();
922
923 //Eta:
924 Double_t twoDiffEta1n1nRP=0.,twoDiffEta2n2nRP=0.,threeDiffEta2n1n1nRP=0.,threeDiffEta1n1n2nRP=0.,fourDiffEta1n1n1n1nRP=0.;
925
926 for(Int_t bin=1;bin<(fnBinsEta+1);bin++)//loop over eta-bins
927 {
928 qxEtaRP = (fEtaReq1nRP->GetBinContent(bin))*(fEtaReq1nRP->GetBinEntries(bin));
929 qyEtaRP = (fEtaImq1nRP->GetBinContent(bin))*(fEtaImq1nRP->GetBinEntries(bin));
930 q2xEtaRP = (fEtaReq2nRP->GetBinContent(bin))*(fEtaReq2nRP->GetBinEntries(bin));
931 q2yEtaRP = (fEtaImq2nRP->GetBinContent(bin))*(fEtaImq2nRP->GetBinEntries(bin));
932 mEtaRP = fEtaReq1nRP->GetBinEntries(bin);
933
934 if(mEtaRP>0&&dMult>1)
935 {
936 twoDiffEta1n1nRP = (qxEtaRP*dQ1nx+qyEtaRP*dQ1ny-mEtaRP)/(mEtaRP*(dMult-1.));
937 f2PerEtaBin1n1nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta1n1nRP,mEtaRP*(dMult-1.));//<2'>_{n|n}
938
939 twoDiffEta2n2nRP = (q2xEtaRP*dQ2nx+q2yEtaRP*dQ2ny-mEtaRP)/(mEtaRP*(dMult-1.));
940 f2PerEtaBin2n2nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta2n2nRP,mEtaRP*(dMult-1.));//<2'>_{2n|2n}
941 }
942
943 if(mEtaRP>0&&dMult>2)
944 {
945 threeDiffEta2n1n1nRP = (q2xEtaRP*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yEtaRP*dQ1nx*dQ1ny-2.*(qxEtaRP*dQ1nx+qyEtaRP*dQ1ny)-(q2xEtaRP*dQ2nx+q2yEtaRP*dQ2ny)+2.*mEtaRP)/(mEtaRP*(dMult-1.)*(dMult-2.));
946 f3PerEtaBin2n1n1nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,threeDiffEta2n1n1nRP,mEtaRP*(dMult-1.)*(dMult-2.));//Re[<3'>_{2n|n,n}]
947
948 threeDiffEta1n1n2nRP = (dQ2nx*(qxEtaRP*dQ1nx-qyEtaRP*dQ1ny)+dQ2ny*(qxEtaRP*dQ1ny+qyEtaRP*dQ1nx)-2.*(qxEtaRP*dQ1nx+qyEtaRP*dQ1ny)-(q2xEtaRP*dQ2nx+q2yEtaRP*dQ2ny)+2.*mEtaRP)/(mEtaRP*(dMult-1.)*(dMult-2.));
949 f3PerEtaBin1n1n2nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,threeDiffEta1n1n2nRP,mEtaRP*(dMult-1.)*(dMult-2.));//Re[<3'>_{n,n|2n}]
950 }
951
952 if(mEtaRP>0&&dMult>3)
953 {
954 fourDiffEta1n1n1n1nRP = ((dQ1nx*dQ1nx+dQ1ny*dQ1ny)*(qxEtaRP*dQ1nx+qyEtaRP*dQ1ny)-(q2xEtaRP*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yEtaRP*dQ1nx*dQ1ny)-(dQ2nx*(qxEtaRP*dQ1nx-qyEtaRP*dQ1ny)+dQ2ny*(qxEtaRP*dQ1ny+qyEtaRP*dQ1nx))+(q2xEtaRP*dQ2nx+q2yEtaRP*dQ2ny)-2.*(dMult-3.)*(qxEtaRP*dQ1nx+qyEtaRP*dQ1ny)-2.*mEtaRP*(dQ1nx*dQ1nx+dQ1ny*dQ1ny)+2.*(dQ1nx*qxEtaRP+dQ1ny*qyEtaRP)+2.*mEtaRP*(dMult-3.))/(mEtaRP*(dMult-1.)*(dMult-2.)*(dMult-3.));
955 f4PerEtaBin1n1n1n1nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,fourDiffEta1n1n1n1nRP,mEtaRP*(dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4'>_{n,n|n,n}]
956 }
957
958 }
959
960 fEtaReq1nRP->Reset();
961 fEtaImq1nRP->Reset();
962 fEtaReq2nRP->Reset();
963 fEtaImq2nRP->Reset();
964
965 //POI:
966 Double_t qxPtPOI=0.,qyPtPOI=0.,q2xPtPOI=0.,q2yPtPOI=0.,mPtPOI=0.;//add comments for these variables (deleteMe)
967 Double_t qxEtaPOI=0.,qyEtaPOI=0.,q2xEtaPOI=0.,q2yEtaPOI=0.,mEtaPOI=0.;//add comments for these variables (deleteMe)
e8a609bc 968 Double_t dOverlapPt=0.,dOverlapEta=0.;
1dfa3c16 969
970 for(Int_t i=0;i<dMult;i++) //check if nPrim == M
971 {
972 fTrack=anEvent->GetTrack(i);
973 if(fTrack && fTrack->UseForDifferentialFlow())//checking POI condition
974 {
975 //Pt:
e8a609bc 976 fPtReq1nPOI->Fill(fTrack->Pt(),cos(n*(fTrack->Phi())),1.);
1dfa3c16 977 fPtImq1nPOI->Fill(fTrack->Pt(),sin(n*(fTrack->Phi())),1.);
978 fPtReq2nPOI->Fill(fTrack->Pt(),cos(2.*n*(fTrack->Phi())),1.);
979 fPtImq2nPOI->Fill(fTrack->Pt(),sin(2.*n*(fTrack->Phi())),1.);
980 //Eta:
981 fEtaReq1nPOI->Fill(fTrack->Eta(),cos(n*(fTrack->Phi())),1.);
982 fEtaImq1nPOI->Fill(fTrack->Eta(),sin(n*(fTrack->Phi())),1.);
983 fEtaReq2nPOI->Fill(fTrack->Eta(),cos(2.*n*(fTrack->Phi())),1.);
e8a609bc 984 fEtaImq2nPOI->Fill(fTrack->Eta(),sin(2.*n*(fTrack->Phi())),1.);
985 if(fTrack->UseForIntegratedFlow())//counting the overlap between RP and POI
1dfa3c16 986 {
e8a609bc 987 fOverlapPerPtBin->Fill(fTrack->Pt(),1.,1.);
988 fOverlapPerEtaBin->Fill(fTrack->Eta(),1.,1.);
1dfa3c16 989 }
e8a609bc 990 }
1dfa3c16 991 }
992
993 //Pt:
994 Double_t twoDiffPt1n1nPOI=0.,twoDiffPt2n2nPOI=0.,threeDiffPt2n1n1nPOI=0.,threeDiffPt1n1n2nPOI=0.,fourDiffPt1n1n1n1nPOI=0.;
995
996 for(Int_t bin=1;bin<(fnBinsPt+1);bin++)//loop over pt-bins
997 {
998 qxPtPOI = (fPtReq1nPOI->GetBinContent(bin))*(fPtReq1nPOI->GetBinEntries(bin));
999 qyPtPOI = (fPtImq1nPOI->GetBinContent(bin))*(fPtImq1nPOI->GetBinEntries(bin));
1000 q2xPtPOI = (fPtReq2nPOI->GetBinContent(bin))*(fPtReq2nPOI->GetBinEntries(bin));
1001 q2yPtPOI = (fPtImq2nPOI->GetBinContent(bin))*(fPtImq2nPOI->GetBinEntries(bin));
e8a609bc 1002 mPtPOI = fPtReq1nPOI->GetBinEntries(bin);
1003 dOverlapPt = fOverlapPerPtBin->GetBinEntries(bin);
1dfa3c16 1004 if(mPtPOI>0&&dMult>1)
1005 {
e8a609bc 1006 twoDiffPt1n1nPOI = (qxPtPOI*dQ1nx+qyPtPOI*dQ1ny-dOverlapPt)/((mPtPOI-dOverlapPt)*dMult+dOverlapPt*(dMult-1.));
1007 f2PerPtBin1n1nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,twoDiffPt1n1nPOI,(mPtPOI-dOverlapPt)*dMult+dOverlapPt*(dMult-1.));//<2'>_{n|n}
1008
1009 twoDiffPt2n2nPOI = (q2xPtPOI*dQ2nx+q2yPtPOI*dQ2ny-dOverlapPt)/((mPtPOI-dOverlapPt)*dMult+dOverlapPt*(dMult-1.));
1010 f2PerPtBin2n2nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,twoDiffPt2n2nPOI,(mPtPOI-dOverlapPt)*dMult+dOverlapPt*(dMult-1.));//<2'>_{2n|2n}
1dfa3c16 1011 }
1012
1013 if(mPtPOI>0&&dMult>2)
1014 {
1015 threeDiffPt2n1n1nPOI = (q2xPtPOI*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yPtPOI*dQ1nx*dQ1ny-2.*(qxPtPOI*dQ1nx+qyPtPOI*dQ1ny)-(q2xPtPOI*dQ2nx+q2yPtPOI*dQ2ny)+2.*mPtPOI)/(mPtPOI*(dMult-1.)*(dMult-2.));//to be improved (correct formula)
1016 //f3PePOItBin2n1n1nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,threeDiffPt2n1n1nPOI,mPtPOI*(dMult-1.)*(dMult-2.));//Re[<3'>_{2n|n,n}]
1017
1018 threeDiffPt1n1n2nPOI = (dQ2nx*(qxPtPOI*dQ1nx-qyPtPOI*dQ1ny)+dQ2ny*(qxPtPOI*dQ1ny+qyPtPOI*dQ1nx)-2.*(qxPtPOI*dQ1nx+qyPtPOI*dQ1ny)-(q2xPtPOI*dQ2nx+q2yPtPOI*dQ2ny)+2.*mPtPOI)/(mPtPOI*(dMult-1.)*(dMult-2.));//to be improved (correct formula)
1019 //f3PePOItBin1n1n2nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,threeDiffPt1n1n2nPOI,mPtPOI*(dMult-1.)*(dMult-2.));//Re[<3'>_{n,n|2n}]
1020 }
1021
1022 if(mPtPOI>0&&dMult>3)
1023 {
1024 fourDiffPt1n1n1n1nPOI = ((dQ1nx*dQ1nx+dQ1ny*dQ1ny)*(qxPtPOI*dQ1nx+qyPtPOI*dQ1ny)-(q2xPtPOI*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yPtPOI*dQ1nx*dQ1ny)-(dQ2nx*(qxPtPOI*dQ1nx-qyPtPOI*dQ1ny)+dQ2ny*(qxPtPOI*dQ1ny+qyPtPOI*dQ1nx))+(q2xPtPOI*dQ2nx+q2yPtPOI*dQ2ny)-2.*(dMult-3.)*(qxPtPOI*dQ1nx+qyPtPOI*dQ1ny)-2.*mPtPOI*(dQ1nx*dQ1nx+dQ1ny*dQ1ny)+2.*(dQ1nx*qxPtPOI+dQ1ny*qyPtPOI)+2.*mPtPOI*(dMult-3.))/(mPtPOI*(dMult-1.)*(dMult-2.)*(dMult-3.));//to be improved (correct formula)
1025 //f4PePOItBin1n1n1n1nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,fourDiffPt1n1n1n1nPOI,mPtPOI*(dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4'>_{n,n|n,n}]
1026 }
1027
1028 }
1029
1030 fPtReq1nPOI->Reset();
1031 fPtImq1nPOI->Reset();
1032 fPtReq2nPOI->Reset();
1033 fPtImq2nPOI->Reset();
e8a609bc 1034 fOverlapPerPtBin->Reset();
1dfa3c16 1035
1036 //Eta:
1037 Double_t twoDiffEta1n1nPOI=0.,twoDiffEta2n2nPOI=0.,threeDiffEta2n1n1nPOI=0.,threeDiffEta1n1n2nPOI=0.,fourDiffEta1n1n1n1nPOI=0.;
1038
1039 for(Int_t bin=1;bin<(fnBinsEta+1);bin++)//loop over eta-bins
1040 {
1041 qxEtaPOI = (fEtaReq1nPOI->GetBinContent(bin))*(fEtaReq1nPOI->GetBinEntries(bin));
1042 qyEtaPOI = (fEtaImq1nPOI->GetBinContent(bin))*(fEtaImq1nPOI->GetBinEntries(bin));
1043 q2xEtaPOI = (fEtaReq2nPOI->GetBinContent(bin))*(fEtaReq2nPOI->GetBinEntries(bin));
1044 q2yEtaPOI = (fEtaImq2nPOI->GetBinContent(bin))*(fEtaImq2nPOI->GetBinEntries(bin));
e8a609bc 1045 mEtaPOI = fEtaReq1nPOI->GetBinEntries(bin);
1046 dOverlapEta = fOverlapPerEtaBin->GetBinEntries(bin);
1dfa3c16 1047
1048 if(mEtaPOI>0&&dMult>1)
1049 {
e8a609bc 1050 twoDiffEta1n1nPOI = (qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny-dOverlapEta)/((mEtaPOI-dOverlapEta)*dMult+dOverlapEta*(dMult-1.));
1051 f2PerEtaBin1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta1n1nPOI,(mEtaPOI-dOverlapEta)*dMult+dOverlapEta*(dMult-1.));//<2'>_{n|n}
1dfa3c16 1052
e8a609bc 1053 twoDiffEta2n2nPOI = (q2xEtaPOI*dQ2nx+q2yEtaPOI*dQ2ny-dOverlapEta)/((mEtaPOI-dOverlapEta)*dMult+dOverlapEta*(dMult-1.));
1054 f2PerEtaBin2n2nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta2n2nPOI,(mEtaPOI-dOverlapEta)*dMult+dOverlapEta*(dMult-1.));//<2'>_{2n|2n}
1dfa3c16 1055 }
1056
1057 if(mEtaPOI>0&&dMult>2)
1058 {
1059 threeDiffEta2n1n1nPOI = (q2xEtaPOI*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yEtaPOI*dQ1nx*dQ1ny-2.*(qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny)-(q2xEtaPOI*dQ2nx+q2yEtaPOI*dQ2ny)+2.*mEtaPOI)/(mEtaPOI*(dMult-1.)*(dMult-2.));//to be improved (correct formula)
1060 //f3PerEtaBin2n1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,threeDiffEta2n1n1nPOI,mEtaPOI*(dMult-1.)*(dMult-2.));//Re[<3'>_{2n|n,n}]
1061
1062 threeDiffEta1n1n2nPOI = (dQ2nx*(qxEtaPOI*dQ1nx-qyEtaPOI*dQ1ny)+dQ2ny*(qxEtaPOI*dQ1ny+qyEtaPOI*dQ1nx)-2.*(qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny)-(q2xEtaPOI*dQ2nx+q2yEtaPOI*dQ2ny)+2.*mEtaPOI)/(mEtaPOI*(dMult-1.)*(dMult-2.));//to be improved (correct formula)
1063 //f3PerEtaBin1n1n2nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,threeDiffEta1n1n2nPOI,mEtaPOI*(dMult-1.)*(dMult-2.));//Re[<3'>_{n,n|2n}]
1064 }
1065
1066 if(mEtaPOI>0&&dMult>3)
1067 {
1068 fourDiffEta1n1n1n1nPOI = ((dQ1nx*dQ1nx+dQ1ny*dQ1ny)*(qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny)-(q2xEtaPOI*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yEtaPOI*dQ1nx*dQ1ny)-(dQ2nx*(qxEtaPOI*dQ1nx-qyEtaPOI*dQ1ny)+dQ2ny*(qxEtaPOI*dQ1ny+qyEtaPOI*dQ1nx))+(q2xEtaPOI*dQ2nx+q2yEtaPOI*dQ2ny)-2.*(dMult-3.)*(qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny)-2.*mEtaPOI*(dQ1nx*dQ1nx+dQ1ny*dQ1ny)+2.*(dQ1nx*qxEtaPOI+dQ1ny*qyEtaPOI)+2.*mEtaPOI*(dMult-3.))/(mEtaPOI*(dMult-1.)*(dMult-2.)*(dMult-3.));//to be improved (correct formula)
1069 //f4PerEtaBin1n1n1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,fourDiffEta1n1n1n1nPOI,mEtaPOI*(dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4'>_{n,n|n,n}]
1070 }
1071
1072 }
1073
1074 fEtaReq1nPOI->Reset();
1075 fEtaImq1nPOI->Reset();
1076 fEtaReq2nPOI->Reset();
1077 fEtaImq2nPOI->Reset();
e8a609bc 1078 fOverlapPerEtaBin->Reset();
1079
1dfa3c16 1080
bc92c0cb 1081//---------------------------------------------------------------------------------------------------------
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
bc92c0cb 1094
1095
1096
bc92c0cb 1097
1098
bc92c0cb 1099
bc92c0cb 1100
1101
1102
bc92c0cb 1103
1104
1105
52021ae2 1106/*
bc92c0cb 1107
1108
1109
1110
1111
bc92c0cb 1112
bc92c0cb 1113
dee1e0e0 1114
1115 //--------------------------------------------------------------------------------------------------------------------------------
1116 //
1117 // **********************
1118 // **** NESTED LOOPS ****
1119 // **********************
1120 //
1121 // Remark 1: multi-particle correlations calculated with nested loops are stored in fDirectCorrelations.
1122 // Remark 2: binning of fDirectCorrelations: bins 0..40 - correlations needed for integrated flow; bins 40..80 - correlations needed for differential flow (taking as an example bin 0.5 < pt < 0.6)
1123 //
1124 // binning details of fDirectCorrelations (integrated flow):
1125 //
1126 // 1st bin: <2>_{n|n} = two1n1n
1127 // 2nd bin: <2>_{2n|2n} = two2n2n
1128 // 3rd bin: <2>_{3n|3n} = two3n3n
1129 // 4th bin: <2>_{4n|4n} = two4n4n
1130 // 5th bin: -- EMPTY --
1131 // 6th bin: <3>_{2n|n,n} = three2n1n1n
1132 // 7th bin: <3>_{3n|2n,n} = three3n2n1n
1133 // 8th bin: <3>_{4n|2n,2n} = three4n2n2n
1134 // 9th bin: <3>_{4n|3n,n} = three4n3n1n
1135 //10th bin: -- EMPTY --
1136 //11th bin: <4>_{n,n|n,n} = four1n1n1n1n
1137 //12th bin: <4>_{2n,n|2n,n} = four2n1n2n1n
1138 //13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n
1139 //14th bin: <4>_{3n|n,n,n} = four3n1n1n1n
1140 //15th bin: <4>_{3n,n|3n,n} = four3n1n3n1n
1141 //16th bin: <4>_{3n,n|2n,2n} = four3n1n2n2n
1142 //17th bin: <4>_{4n|2n,n,n} = four4n2n1n1n
1143 //18th bin: -- EMPTY --
1144 //19th bin: <5>_{2n|n,n,n,n} = five2n1n1n1n1n
1145 //20th bin: <5>_{2n,2n|2n,n,n} = five2n2n2n1n1n
1146 //21st bin: <5>_{3n,n|2n,n,n} = five3n1n2n1n1n
1147 //22nd bin: <5>_{4n|n,n,n,n} = five4n1n1n1n1n
1148 //23rd bin: -- EMPTY --
1149 //24th bin: <6>_{n,n,n|n,n,n} = six1n1n1n1n1n1n
1150 //25th bin: <6>_{2n,n,n|2n,n,n} = six2n1n1n2n1n1n
1151 //26th bin: <6>_{2n,2n|n,n,n,n} = six2n2n1n1n1n1n
1152 //27th bin: <6>_{3n,n|n,n,n,n} = six3n1n1n1n1n1n
1153 //28th bin: -- EMPTY --
1154 //29th bin: <7>_{2n,n,n|n,n,n,n} = seven2n1n1n1n1n1n1n
1155 //30th bin: -- EMPTY --
1156 //31st bin: <8>_{n,n,n,n|n,n,n,n} = eight1n1n1n1n1n1n1n1n
1157
1158 Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.;
1159
1160 //<2>_{k*n|k*n} (k=1,2,3 and 4)
1dfa3c16 1161 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1162 {
dee1e0e0 1163 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1164 phi1=fTrack->Phi();
1dfa3c16 1165 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1166 {
dee1e0e0 1167 if(i2==i1)continue;
1168 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1169 phi2=fTrack->Phi();
1315fe58 1170 fDirectCorrelations->Fill(0.,cos(n*(phi1-phi2)),1); //<2>_{n|n}
1171 fDirectCorrelations->Fill(1.,cos(2.*n*(phi1-phi2)),1); //<2>_{2n|2n}
1172 fDirectCorrelations->Fill(2.,cos(3.*n*(phi1-phi2)),1); //<2>_{3n|3n}
1173 fDirectCorrelations->Fill(3.,cos(4.*n*(phi1-phi2)),1); //<2>_{4n|4n}
bc92c0cb 1174 }
1175 }
1176
1315fe58 1177 //<3>_{2n|n,n}, <3>_{3n|2n,n}, <3>_{4n|2n,2n} and <3>_{4n|3n,n}
1dfa3c16 1178 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1179 {
dee1e0e0 1180 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1181 phi1=fTrack->Phi();
1dfa3c16 1182 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1183 {
dee1e0e0 1184 if(i2==i1)continue;
1185 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1186 phi2=fTrack->Phi();
1dfa3c16 1187 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 1188 {
dee1e0e0 1189 if(i3==i1||i3==i2)continue;
1190 fTrack=anEvent->GetTrack(i3);
bc92c0cb 1191 phi3=fTrack->Phi();
1315fe58 1192 fDirectCorrelations->Fill(5.,cos(2*n*phi1-n*(phi2+phi3)),1); //<3>_{2n|n,n}
1193 fDirectCorrelations->Fill(6.,cos(3.*n*phi1-2.*n*phi2-n*phi3),1); //<3>_{3n|2n,n}
1194 fDirectCorrelations->Fill(7.,cos(4.*n*phi1-2.*n*phi2-2.*n*phi3),1); //<3>_{4n|2n,2n}
1195 fDirectCorrelations->Fill(8.,cos(4.*n*phi1-3.*n*phi2-n*phi3),1); //<3>_{4n|3n,n}
bc92c0cb 1196 }
1197 }
1198 }
1199
dee1e0e0 1200 //<4>_{n,n|n,n}, <4>_{2n,n|2n,n}, <4>_{2n,2n|2n,2n}, <4>_{3n|n,n,n}, <4>_{3n,n|3n,n}, <4>_{3n,n|2n,2n} and <4>_{4n|2n,n,n}
1dfa3c16 1201 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1202 {
dee1e0e0 1203 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1204 phi1=fTrack->Phi();
1dfa3c16 1205 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1206 {
dee1e0e0 1207 if(i2==i1)continue;
1208 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1209 phi2=fTrack->Phi();
1dfa3c16 1210 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 1211 {
dee1e0e0 1212 if(i3==i1||i3==i2)continue;
1213 fTrack=anEvent->GetTrack(i3);
bc92c0cb 1214 phi3=fTrack->Phi();
1dfa3c16 1215 for(Int_t i4=0;i4<dMult;i4++)
bc92c0cb 1216 {
dee1e0e0 1217 if(i4==i1||i4==i2||i4==i3)continue;
1218 fTrack=anEvent->GetTrack(i4);
bc92c0cb 1219 phi4=fTrack->Phi();
dee1e0e0 1220 fDirectCorrelations->Fill(10.,cos(n*phi1+n*phi2-n*phi3-n*phi4),1); //<4>_{n,n|n,n}
1221 fDirectCorrelations->Fill(11.,cos(2.*n*phi1+n*phi2-2.*n*phi3-n*phi4),1); //<4>_{2n,n|2n,n}
1222 fDirectCorrelations->Fill(12.,cos(2.*n*phi1+2*n*phi2-2.*n*phi3-2.*n*phi4),1); //<4>_{2n,2n|2n,2n}
1223 fDirectCorrelations->Fill(13.,cos(3.*n*phi1-n*phi2-n*phi3-n*phi4),1); //<4>_{3n|n,n,n}
1224 fDirectCorrelations->Fill(14.,cos(3.*n*phi1+n*phi2-3.*n*phi3-n*phi4),1); //<4>_{3n,n|3n,n}
1225 fDirectCorrelations->Fill(15.,cos(3.*n*phi1+n*phi2-2.*n*phi3-2.*n*phi4),1); //<4>_{3n,n|2n,2n}
1226 fDirectCorrelations->Fill(16.,cos(4.*n*phi1-2.*n*phi2-n*phi3-n*phi4),1); //<4>_{4n|2n,n,n}
bc92c0cb 1227 }
1228 }
1229 }
1230 }
1231
dee1e0e0 1232 //<5>_{2n,n,n,n,n}, //<5>_{2n,2n|2n,n,n}, <5>_{3n,n|2n,n,n} and <5>_{4n|n,n,n,n}
1dfa3c16 1233 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1234 {
dee1e0e0 1235 //cout<<"i1 = "<<i1<<endl;
1236 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1237 phi1=fTrack->Phi();
1dfa3c16 1238 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1239 {
dee1e0e0 1240 if(i2==i1)continue;
1241 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1242 phi2=fTrack->Phi();
1dfa3c16 1243 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 1244 {
dee1e0e0 1245 if(i3==i1||i3==i2)continue;
1246 fTrack=anEvent->GetTrack(i3);
bc92c0cb 1247 phi3=fTrack->Phi();
1dfa3c16 1248 for(Int_t i4=0;i4<dMult;i4++)
bc92c0cb 1249 {
dee1e0e0 1250 if(i4==i1||i4==i2||i4==i3)continue;
1251 fTrack=anEvent->GetTrack(i4);
bc92c0cb 1252 phi4=fTrack->Phi();
1dfa3c16 1253 for(Int_t i5=0;i5<dMult;i5++)
bc92c0cb 1254 {
dee1e0e0 1255 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
1256 fTrack=anEvent->GetTrack(i5);
bc92c0cb 1257 phi5=fTrack->Phi();
dee1e0e0 1258 fDirectCorrelations->Fill(18.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),1); //<5>_{2n,n|n,n,n}
1259 fDirectCorrelations->Fill(19.,cos(2.*n*phi1+2.*n*phi2-2.*n*phi3-n*phi4-n*phi5),1); //<5>_{2n,2n|2n,n,n}
1260 fDirectCorrelations->Fill(20.,cos(3.*n*phi1+n*phi2-2.*n*phi3-n*phi4-n*phi5),1); //<5>_{3n,n|2n,n,n}
1261 fDirectCorrelations->Fill(21.,cos(4.*n*phi1-n*phi2-n*phi3-n*phi4-n*phi5),1); //<5>_{4n|n,n,n,n}
bc92c0cb 1262 }
1263 }
1264 }
1265 }
1266 }
1267
dee1e0e0 1268 //<6>_{n,n,n,n,n,n}, <6>_{2n,n,n|2n,n,n}, <6>_{2n,2n|n,n,n,n} and <6>_{3n,n|n,n,n,n}
1dfa3c16 1269 for(Int_t i1=0;i1<dMult;i1++)
dee1e0e0 1270 {
1271 //cout<<"i1 = "<<i1<<endl;
1272 fTrack=anEvent->GetTrack(i1);
1273 phi1=fTrack->Phi();
1dfa3c16 1274 for(Int_t i2=0;i2<dMult;i2++)
dee1e0e0 1275 {
1276 if(i2==i1)continue;
1277 fTrack=anEvent->GetTrack(i2);
1278 phi2=fTrack->Phi();
1dfa3c16 1279 for(Int_t i3=0;i3<dMult;i3++)
dee1e0e0 1280 {
1281 if(i3==i1||i3==i2)continue;
1282 fTrack=anEvent->GetTrack(i3);
1283 phi3=fTrack->Phi();
1dfa3c16 1284 for(Int_t i4=0;i4<dMult;i4++)
dee1e0e0 1285 {
1286 if(i4==i1||i4==i2||i4==i3)continue;
1287 fTrack=anEvent->GetTrack(i4);
1288 phi4=fTrack->Phi();
1dfa3c16 1289 for(Int_t i5=0;i5<dMult;i5++)
dee1e0e0 1290 {
1291 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
1292 fTrack=anEvent->GetTrack(i5);
1293 phi5=fTrack->Phi();
1dfa3c16 1294 for(Int_t i6=0;i6<dMult;i6++)
dee1e0e0 1295 {
1296 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
1297 fTrack=anEvent->GetTrack(i6);
1298 phi6=fTrack->Phi();
1299 fDirectCorrelations->Fill(23.,cos(n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6),1); //<6>_{n,n,n|n,n,n}
1300 fDirectCorrelations->Fill(24.,cos(2.*n*phi1+n*phi2+n*phi3-2.*n*phi4-n*phi5-n*phi6),1); //<6>_{2n,n,n|2n,n,n}
1301 fDirectCorrelations->Fill(25.,cos(2.*n*phi1+2.*n*phi2-n*phi3-n*phi4-n*phi5-n*phi6),1); //<6>_{2n,2n|n,n,n,n}
1302 fDirectCorrelations->Fill(26.,cos(3.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5-n*phi6),1); //<6>_{3n,n|n,n,n,n}
1303 }
1304 }
1305 }
1306 }
1307 }
1308 }
52021ae2 1309
dee1e0e0 1310 //<7>_{2n,n,n|n,n,n,n}
1dfa3c16 1311 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1312 {
dee1e0e0 1313 //cout<<"i1 = "<<i1<<endl;
1314 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1315 phi1=fTrack->Phi();
1dfa3c16 1316 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1317 {
dee1e0e0 1318 if(i2==i1)continue;
1319 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1320 phi2=fTrack->Phi();
1dfa3c16 1321 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 1322 {
dee1e0e0 1323 if(i3==i1||i3==i2)continue;
1324 fTrack=anEvent->GetTrack(i3);
bc92c0cb 1325 phi3=fTrack->Phi();
1dfa3c16 1326 for(Int_t i4=0;i4<dMult;i4++)
bc92c0cb 1327 {
dee1e0e0 1328 if(i4==i1||i4==i2||i4==i3)continue;
1329 fTrack=anEvent->GetTrack(i4);
bc92c0cb 1330 phi4=fTrack->Phi();
1dfa3c16 1331 for(Int_t i5=0;i5<dMult;i5++)
bc92c0cb 1332 {
dee1e0e0 1333 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
1334 fTrack=anEvent->GetTrack(i5);
bc92c0cb 1335 phi5=fTrack->Phi();
1dfa3c16 1336 for(Int_t i6=0;i6<dMult;i6++)
bc92c0cb 1337 {
dee1e0e0 1338 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
1339 fTrack=anEvent->GetTrack(i6);
bc92c0cb 1340 phi6=fTrack->Phi();
1dfa3c16 1341 for(Int_t i7=0;i7<dMult;i7++)
dee1e0e0 1342 {
1343 if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;
1344 fTrack=anEvent->GetTrack(i7);
1345 phi7=fTrack->Phi();
1346 fDirectCorrelations->Fill(28.,cos(2.*n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6-n*phi7),1);//<7>_{2n,n,n|n,n,n,n}
1347 }
bc92c0cb 1348 }
1349 }
1350 }
1351 }
1352 }
1353 }
52021ae2 1354
dee1e0e0 1355 //<8>_{n,n,n,n|n,n,n,n}
1dfa3c16 1356 for(Int_t i1=0;i1<dMult;i1++)
dee1e0e0 1357 {
1358 cout<<"i1 = "<<i1<<endl;
1359 fTrack=anEvent->GetTrack(i1);
1360 phi1=fTrack->Phi();
1dfa3c16 1361 for(Int_t i2=0;i2<dMult;i2++)
dee1e0e0 1362 {
1363 if(i2==i1)continue;
1364 fTrack=anEvent->GetTrack(i2);
1365 phi2=fTrack->Phi();
1dfa3c16 1366 for(Int_t i3=0;i3<dMult;i3++)
dee1e0e0 1367 {
1368 if(i3==i1||i3==i2)continue;
1369 fTrack=anEvent->GetTrack(i3);
1370 phi3=fTrack->Phi();
1dfa3c16 1371 for(Int_t i4=0;i4<dMult;i4++)
dee1e0e0 1372 {
1373 if(i4==i1||i4==i2||i4==i3)continue;
1374 fTrack=anEvent->GetTrack(i4);
1375 phi4=fTrack->Phi();
1dfa3c16 1376 for(Int_t i5=0;i5<dMult;i5++)
dee1e0e0 1377 {
1378 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
1379 fTrack=anEvent->GetTrack(i5);
1380 phi5=fTrack->Phi();
1dfa3c16 1381 for(Int_t i6=0;i6<dMult;i6++)
dee1e0e0 1382 {
1383 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
1384 fTrack=anEvent->GetTrack(i6);
1385 phi6=fTrack->Phi();
1dfa3c16 1386 for(Int_t i7=0;i7<dMult;i7++)
dee1e0e0 1387 {
1388 if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;
1389 fTrack=anEvent->GetTrack(i7);
1390 phi7=fTrack->Phi();
1dfa3c16 1391 for(Int_t i8=0;i8<dMult;i8++)
dee1e0e0 1392 {
1393 if(i8==i1||i8==i2||i8==i3||i8==i4||i8==i5||i8==i6||i8==i7)continue;
1394 fTrack=anEvent->GetTrack(i8);
1395 phi8=fTrack->Phi();
1396 fDirectCorrelations->Fill(30.,cos(n*phi1+n*phi2+n*phi3+n*phi4-n*phi5-n*phi6-n*phi7-n*phi8),1);//<8>_{n,n,n,n|n,n,n,n}
1397 }
1398 }
1399 }
1400 }
1401 }
1402 }
1403 }
1404 }
bc92c0cb 1405
dee1e0e0 1406 // binning details of fDirectCorrelations (differential flow):
1407 //
bc92c0cb 1408 //41st bin: <2'>_{n|n}
1409 //42nd bin: <2'>_{2n|2n}
1410 //46th bin: <3'>_{2n|n,n}
1411 //47th bin: <3'>_{n,n|2n}
1412 //51st bin: <4'>_{n,n|n,n}
1413
1414 //<2'>_{n|n}
1dfa3c16 1415 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1416 {
dee1e0e0 1417 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1418 if(fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)
1419 {
1420 phi1=fTrack->Phi();
1dfa3c16 1421 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1422 {
dee1e0e0 1423 if(i2==i1)continue;
1424 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1425 phi2=fTrack->Phi();
1426 fDirectCorrelations->Fill(40.,cos(1.*n*(phi1-phi2)),1); //<2'>_{n,n}
1427 fDirectCorrelations->Fill(41.,cos(2.*n*(phi1-phi2)),1); //<2'>_{2n,2n}
1428 }
1429 }
1430 }
1431
1432 //<3'>_{2n|n,n}
1dfa3c16 1433 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1434 {
dee1e0e0 1435 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1436 if(fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)
1437 {
1438 phi1=fTrack->Phi();
1dfa3c16 1439 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1440 {
dee1e0e0 1441 if(i2==i1)continue;
1442 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1443 phi2=fTrack->Phi();
1dfa3c16 1444 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 1445 {
dee1e0e0 1446 if(i3==i1||i3==i2)continue;
1447 fTrack=anEvent->GetTrack(i3);
bc92c0cb 1448 phi3=fTrack->Phi();
1449 fDirectCorrelations->Fill(45.,cos(n*(2.*phi1-phi2-phi3)),1); //<3'>_{2n|n,n}
1450 fDirectCorrelations->Fill(46.,cos(n*(phi1+phi2-2.*phi3)),1); //<3'>_{n,n|2n}
1451 }
1452 }
1453 }
1454 }
1455
1456 //<4'>_{n,n|n,n}
1dfa3c16 1457 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1458 {
dee1e0e0 1459 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1460 if(fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)
1461 {
1462 phi1=fTrack->Phi();
1dfa3c16 1463 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1464 {
dee1e0e0 1465 if(i2==i1)continue;
1466 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1467 phi2=fTrack->Phi();
1dfa3c16 1468 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 1469 {
dee1e0e0 1470 if(i3==i1||i3==i2)continue;
1471 fTrack=anEvent->GetTrack(i3);
bc92c0cb 1472 phi3=fTrack->Phi();
1dfa3c16 1473 for(Int_t i4=0;i4<dMult;i4++)
bc92c0cb 1474 {
dee1e0e0 1475 if(i4==i1||i4==i2||i4==i3)continue;
1476 fTrack=anEvent->GetTrack(i4);
bc92c0cb 1477 phi4=fTrack->Phi();
1478 fDirectCorrelations->Fill(50.,cos(n*(phi1+phi2-phi3-phi4)),1); //<4'>_{n,n|n,n}
1479 }
1480 }
1481 }
1482 }
1483 }
1484 //--------------------------------------------------------------------------------------------------------------------------------
1485
1486
bc92c0cb 1487
1488
dee1e0e0 1489*/
bc92c0cb 1490
1491
1492
bc92c0cb 1493
dee1e0e0 1494//}//line needed only for nested loops - end of if(nPrim>8&&nPrim<14)
bc92c0cb 1495
1496}//end of Make()
1497
1498//================================================================================================================
1499
1500void AliFlowAnalysisWithQCumulants::Finish()
1501{
1315fe58 1502 //calculate the final results
7e58a232 1503 AliQCumulantsFunctions finalResults(fIntFlowResultsQC,fDiffFlowResults2ndOrderQC,fDiffFlowResults4thOrderQC,fCovariances,fAvMultIntFlowQC,fQvectorComponents,fQCorrelations, fQProduct,fDirectCorrelations,f2PerPtBin1n1nRP,f2PerPtBin2n2nRP,f3PerPtBin2n1n1nRP,f3PerPtBin1n1n2nRP,f4PerPtBin1n1n1n1nRP, f2PerEtaBin1n1nRP,f2PerEtaBin2n2nRP,f3PerEtaBin2n1n1nRP,f3PerEtaBin1n1n2nRP,f4PerEtaBin1n1n1n1nRP, f2PerPtBin1n1nPOI,f2PerPtBin2n2nPOI,f3PerPtBin2n1n1nPOI,f3PerPtBin1n1n2nPOI,f4PerPtBin1n1n1n1nPOI, f2PerEtaBin1n1nPOI,f2PerEtaBin2n2nPOI,f3PerEtaBin2n1n1nPOI,f3PerEtaBin1n1n2nPOI,f4PerEtaBin1n1n1n1nPOI,fCommonHists2nd,fCommonHists4th, fCommonHists6th, fCommonHists8th,fCommonHistsResults2nd, fCommonHistsResults4th,fCommonHistsResults6th,fCommonHistsResults8th);
1504
1315fe58 1505 finalResults.Calculate();
bc92c0cb 1506}
1507
1315fe58 1508//================================================================================================================
bc92c0cb 1509
1315fe58 1510void AliFlowAnalysisWithQCumulants::WriteHistograms(TString* outputFileName)
1511{
1512 //store the final results in output .root file
1513 TFile *output = new TFile(outputFileName->Data(),"RECREATE");
7a2c2652 1514 output->WriteObject(fHistList, "cobjQC","SingleKey");
1315fe58 1515 delete output;
1516}
bc92c0cb 1517
1315fe58 1518//================================================================================================================
dee1e0e0 1519