Obsolete.
[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"
38#include "AliFlowEventSimple.h"
39#include "AliFlowTrackSimple.h"
40#include "AliFlowAnalysisWithQCumulants.h"
1315fe58 41#include "AliQCumulantsFunctions.h"
bc92c0cb 42
43#include "TRandom.h"
44
45class TH1;
46class TGraph;
47class TPave;
48class TLatex;
49class TMarker;
50class TRandom3;
51class TObjArray;
52class TList;
53class TCanvas;
54class TSystem;
55class TROOT;
56class AliFlowVector;
57class TVector;
58
59//================================================================================================================
60
61ClassImp(AliFlowAnalysisWithQCumulants)
62
63AliFlowAnalysisWithQCumulants::AliFlowAnalysisWithQCumulants():
64 fTrack(NULL),
65 fHistList(NULL),
1315fe58 66 fAvMultIntFlowQC(NULL),
bc92c0cb 67 fQvectorComponents(NULL),
1315fe58 68 fIntFlowResultsQC(NULL),
69 fDiffFlowResults2ndOrderQC(NULL),
70 fDiffFlowResults4thOrderQC(NULL),
71 fCovariances(NULL),
bc92c0cb 72 fQCorrelations(NULL),
8842fb2b 73 fQProduct(NULL),
bc92c0cb 74 fDirectCorrelations(NULL),
bc92c0cb 75 fReq1n(NULL),
76 fImq1n(NULL),
77 fReq2n(NULL),
78 fImq2n(NULL),
79 f2_1n1n(NULL),
80 f2_2n2n(NULL),
81 f3_2n1n1n(NULL),
82 f3_1n1n2n(NULL),
83 f4_1n1n1n1n(NULL),
bc92c0cb 84 fCommonHists(NULL),
8842fb2b 85 fCommonHistsResults2nd(NULL),
86 fCommonHistsResults4th(NULL),
87 fCommonHistsResults6th(NULL),
88 fCommonHistsResults8th(NULL),
1315fe58 89 f2Distribution(NULL),
90 f4Distribution(NULL),
8842fb2b 91 f6Distribution(NULL),
92 fnBinsPt(0),
93 fPtMin(0),
94 fPtMax(0)
bc92c0cb 95{
96 //constructor
97 fHistList = new TList();
8842fb2b 98
99 fnBinsPt = AliFlowCommonConstants::GetNbinsPt();
100 fPtMin = AliFlowCommonConstants::GetPtMin();
101 fPtMax = AliFlowCommonConstants::GetPtMax();
102
bc92c0cb 103}
104
105AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants()
106{
107 //desctructor
108 delete fHistList;
109}
110
111//================================================================================================================
112
113void AliFlowAnalysisWithQCumulants::CreateOutputObjects()
114{
115 //various output histograms
8842fb2b 116
bc92c0cb 117 //avarage multiplicity
1315fe58 118 fAvMultIntFlowQC = new TProfile("fAvMultIntFlowQC","Average Multiplicity",1,0,1,"s");
119 fAvMultIntFlowQC->SetXTitle("");
120 fAvMultIntFlowQC->SetYTitle("");
121 fAvMultIntFlowQC->SetLabelSize(0.06);
122 fAvMultIntFlowQC->SetMarkerStyle(25);
123 fAvMultIntFlowQC->SetLabelOffset(0.01);
124 (fAvMultIntFlowQC->GetXaxis())->SetBinLabel(1,"Average Multiplicity");
125 fHistList->Add(fAvMultIntFlowQC);
bc92c0cb 126
127 //Q-vector stuff
128 fQvectorComponents = new TProfile("fQvectorComponents","Avarage of Q-vector components",44,0.,44.,"s");
129 fQvectorComponents->SetXTitle("");
130 fQvectorComponents->SetYTitle("");
131 //fHistList->Add(fQvectorComponents);
132
133 //final results for integrated flow from Q-cumulants
1315fe58 134 fIntFlowResultsQC = new TH1D("fIntFlowResultsQC","Integrated Flow from Q-cumulants",4,0,4);
135 //fIntFlowResults->SetXTitle("");
136 //fIntFlowResultsQC->SetYTitle("Integrated Flow");
137 fIntFlowResultsQC->SetLabelSize(0.06);
138 fIntFlowResultsQC->SetTickLength(1);
139 fIntFlowResultsQC->SetMarkerStyle(25);
140 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(1,"v_{n}{2}");
141 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(2,"v_{n}{4}");
142 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(3,"v_{n}{6}");
143 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(4,"v_{n}{8}");
1315fe58 144 fHistList->Add(fIntFlowResultsQC);
145
bc92c0cb 146 //final results for differential flow from 2nd order Q-cumulant
8842fb2b 147 fDiffFlowResults2ndOrderQC = new TH1D("fDiffFlowResults2ndOrderQC","Differential Flow from 2nd Order Q-cumulant",fnBinsPt,fPtMin,fPtMax);
1315fe58 148 fDiffFlowResults2ndOrderQC->SetXTitle("p_{t} [GeV]");
149 //fDiffFlowResults2ndOrderQC->SetYTitle("Differential Flow");
150 fHistList->Add(fDiffFlowResults2ndOrderQC);
bc92c0cb 151
152 //final results for differential flow from 4th order Q-cumulant
8842fb2b 153 fDiffFlowResults4thOrderQC = new TH1D("fDiffFlowResults4thOrderQC","Differential Flow from 4th Order Q-cumulant",fnBinsPt,fPtMin,fPtMax);
1315fe58 154 fDiffFlowResults4thOrderQC->SetXTitle("p_{t} [GeV]");
155 //fDiffFlowResults4thOrderQC->SetYTitle("Differential Flow");
156 fHistList->Add(fDiffFlowResults4thOrderQC);
157
158 //final results for covariances (1st bin: <2*4>-<2>*<4>, 2nd bin: <2*6>-<2>*<6>, ...)
159 fCovariances = new TH1D("fCovariances","Covariances",6,0,6);
160 //fCovariances->SetXTitle("");
161 //fCovariances->SetYTitle("<covariance>");
162 fCovariances->SetLabelSize(0.04);
163 fCovariances->SetTickLength(1);
164 fCovariances->SetMarkerStyle(25);
165 (fCovariances->GetXaxis())->SetBinLabel(1,"Cov(2,4)");
166 (fCovariances->GetXaxis())->SetBinLabel(2,"Cov(2,6)");
167 (fCovariances->GetXaxis())->SetBinLabel(3,"Cov(2,8)");
168 (fCovariances->GetXaxis())->SetBinLabel(4,"Cov(4,6)");
169 (fCovariances->GetXaxis())->SetBinLabel(5,"Cov(4,8)");
170 (fCovariances->GetXaxis())->SetBinLabel(6,"Cov(6,8)");
171 fHistList->Add(fCovariances);
bc92c0cb 172
173 //multi-particle correlations calculated from Q-vectors
174 fQCorrelations = new TProfile("fQCorrelations","multi-particle correlations from Q-vectors",35,0,35,"s");
1315fe58 175 //fQCorrelations->SetXTitle("correlations");
176 //fQCorrelations->SetYTitle("");
177 fQCorrelations->SetTickLength(-0.01,"Y");
178 fQCorrelations->SetMarkerStyle(25);
179 fQCorrelations->SetLabelSize(0.03);
180 fQCorrelations->SetLabelOffset(0.01,"Y");
181 (fQCorrelations->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}");
182 (fQCorrelations->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}");
183 (fQCorrelations->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}");
184 (fQCorrelations->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}");
185 (fQCorrelations->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}");
186 (fQCorrelations->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}");
187 (fQCorrelations->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}");
188 (fQCorrelations->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}");
189 (fQCorrelations->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}");
190 (fQCorrelations->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}");
191 (fQCorrelations->GetXaxis())->SetBinLabel(13,"<<4>>_{3n|n,n,n}");
192 (fQCorrelations->GetXaxis())->SetBinLabel(14,"<<4>>_{4n|2n,n,n}");
193 (fQCorrelations->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|2n,2n}");
194 (fQCorrelations->GetXaxis())->SetBinLabel(16,"<<5>>_{2n|n,n,n,n}");
195 (fQCorrelations->GetXaxis())->SetBinLabel(17,"<<5>>_{2n,2n|2n,n,n}");
196 (fQCorrelations->GetXaxis())->SetBinLabel(18,"<<5>>_{3n,n|2n,n,n}");
197 (fQCorrelations->GetXaxis())->SetBinLabel(19,"<<5>>_{4n|n,n,n,n}");
198 (fQCorrelations->GetXaxis())->SetBinLabel(21,"<<6>>_{n,n,n|n,n,n}");
bc92c0cb 199 fHistList->Add(fQCorrelations);
200
8842fb2b 201 //average products
202 fQProduct = new TProfile("fQProduct","average of products",6,0,6,"s");
203 fQProduct->SetTickLength(-0.01,"Y");
204 fQProduct->SetMarkerStyle(25);
205 fQProduct->SetLabelSize(0.03);
206 fQProduct->SetLabelOffset(0.01,"Y");
207 (fQProduct->GetXaxis())->SetBinLabel(1,"<<2*4>>");
208 (fQProduct->GetXaxis())->SetBinLabel(2,"<<2*6>>");
209 (fQProduct->GetXaxis())->SetBinLabel(3,"<<2*8>>");
210 (fQProduct->GetXaxis())->SetBinLabel(4,"<<4*6>>");
211 (fQProduct->GetXaxis())->SetBinLabel(5,"<<4*8>>");
212 (fQProduct->GetXaxis())->SetBinLabel(6,"<<6*8>>");
213 fQProduct->SetXTitle("");
214 fQProduct->SetYTitle("");
215 fHistList->Add(fQProduct);
bc92c0cb 216
217 //multi-particle correlations calculated with nested loops (0..40 integrated flow; 40..80 differential flow)
218 fDirectCorrelations = new TProfile("fDirectCorrelations","multi-particle correlations with nested loops",80,0,80,"s");
219 fDirectCorrelations->SetXTitle("");
220 fDirectCorrelations->SetYTitle("correlations");
221 fHistList->Add(fDirectCorrelations);
222
bc92c0cb 223 //fReq1n
8842fb2b 224 fReq1n = new TProfile("fReq1n","Re[q_n]",fnBinsPt,fPtMin,fPtMax,"s");
1315fe58 225 fReq1n->SetXTitle("p_{t} [GeV]");
bc92c0cb 226 fReq1n->SetYTitle("Re[q_n]");
8842fb2b 227 //fHistList->Add(fReq1n);
bc92c0cb 228
229 //fImq1n
8842fb2b 230 fImq1n = new TProfile("fImq1n","Im[q_n]",fnBinsPt,fPtMin,fPtMax,"s");
1315fe58 231 fImq1n->SetXTitle("p_{t} [GeV]");
bc92c0cb 232 fImq1n->SetYTitle("Im[q_n]");
8842fb2b 233 //fHistList->Add(fImq1n);
bc92c0cb 234
235 //fReq2n
8842fb2b 236 fReq2n = new TProfile("fReq2n","Re[q_2n]",fnBinsPt,fPtMin,fPtMax,"s");
1315fe58 237 fReq2n->SetXTitle("p_{t} [GeV]");
bc92c0cb 238 fReq2n->SetYTitle("Im[D]");
8842fb2b 239 //fHistList->Add(fReq2n);
bc92c0cb 240
241 //fImq2n
8842fb2b 242 fImq2n = new TProfile("fImq2n","Im[q_2n]",fnBinsPt,fPtMin,fPtMax,"s");
1315fe58 243 fImq2n->SetXTitle("p_{t} [GeV]");
bc92c0cb 244 fImq2n->SetYTitle("Im[q_2n]");
8842fb2b 245 //fHistList->Add(fImq2n);
bc92c0cb 246
247 //f2_1n1n
8842fb2b 248 f2_1n1n = new TProfile("f2_1n1n","<2'>_{n|n}",fnBinsPt,fPtMin,fPtMax,"s");
1315fe58 249 f2_1n1n->SetXTitle("p_{t} [GeV]");
250 //f2_1n1n->SetYTitle("<2'>_{n|n}");
bc92c0cb 251 fHistList->Add(f2_1n1n);
252
253 //f2_2n2n
8842fb2b 254 f2_2n2n = new TProfile("f2_2n2n","<2'>_{2n|2n}",fnBinsPt,fPtMin,fPtMax,"s");
1315fe58 255 f2_2n2n->SetXTitle("p_{t} [GeV]");
256 //f2_2n2n->SetYTitle("<2'>_{2n|2n}");
bc92c0cb 257 fHistList->Add(f2_2n2n);
258
259 //f3_2n1n1n
8842fb2b 260 f3_2n1n1n = new TProfile("f3_2n1n1n","<3'>_{2n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
1315fe58 261 f3_2n1n1n->SetXTitle("p_{t} [GeV]");
262 //f3_2n1n1n->SetYTitle("<3'>_{2n|n,n}");
bc92c0cb 263 fHistList->Add(f3_2n1n1n);
264
265 //f3_1n1n2n
8842fb2b 266 f3_1n1n2n = new TProfile("f3_1n1n2n","<3'>_{n,n|2n}",fnBinsPt,fPtMin,fPtMax,"s");
1315fe58 267 f3_1n1n2n->SetXTitle("p_{t} [GeV]");
268 //f3_1n1n2n->SetYTitle("<3'>_{n,n|2n}");
bc92c0cb 269 fHistList->Add(f3_1n1n2n);
270
271 //f4_1n1n1n1n
8842fb2b 272 f4_1n1n1n1n = new TProfile("f4_1n1n1n1n","<4'>_{n,n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
1315fe58 273 f4_1n1n1n1n->SetXTitle("p_{t} [GeV]");
274 //f4_1n1n1n1n->SetYTitle("<4'>_{n,n|n,n}");
bc92c0cb 275 fHistList->Add(f4_1n1n1n1n);
276
bc92c0cb 277 //common control histograms
1315fe58 278 fCommonHists = new AliFlowCommonHist("AliFlowCommonHistQC");
279 fHistList->Add(fCommonHists);
280
8842fb2b 281 //common histograms for final results (2nd order)
1315fe58 282 fCommonHistsResults2nd = new AliFlowCommonHistResults("AliFlowCommonHistResults2ndOrderQC");
283 fHistList->Add(fCommonHistsResults2nd);
284
8842fb2b 285 //common histograms for final results (4th order)
1315fe58 286 fCommonHistsResults4th = new AliFlowCommonHistResults("AliFlowCommonHistResults4thOrderQC");
287 fHistList->Add(fCommonHistsResults4th);
288
8842fb2b 289 //common histograms for final results (6th order)
1315fe58 290 fCommonHistsResults6th = new AliFlowCommonHistResults("AliFlowCommonHistResults6thOrderQC");
291 fHistList->Add(fCommonHistsResults6th);
292
8842fb2b 293 //common histograms for final results (8th order)
1315fe58 294 fCommonHistsResults8th = new AliFlowCommonHistResults("AliFlowCommonHistResults8thOrderQC");
295 fHistList->Add(fCommonHistsResults8th);
1315fe58 296
297 //weighted <2>_{n|n} distribution
298 f2Distribution = new TH1D("f2Distribution","<2>_{n|n} distribution",100000,-0.02,0.1);
299 f2Distribution->SetXTitle("<2>_{n|n}");
300 f2Distribution->SetYTitle("Counts");
301 fHistList->Add(f2Distribution);
302
303 //weighted <4>_{n,n|n,n} distribution
304 f4Distribution = new TH1D("f4Distribution","<4>_{n,n|n,n} distribution",100000,-0.00025,0.002);
305 f4Distribution->SetXTitle("<4>_{n,n|n,n}");
306 f4Distribution->SetYTitle("Counts");
307 fHistList->Add(f4Distribution);
308
309 //weighted <6>_{n,n,n|n,n,n} distribution
310 f6Distribution = new TH1D("f6Distribution","<6>_{n,n,n|n,n,n} distribution",100000,-0.000005,0.000025);
311 f6Distribution->SetXTitle("<6>_{n,n,n|n,n,n}");
312 f6Distribution->SetYTitle("Counts");
313 fHistList->Add(f6Distribution);
bc92c0cb 314
315}//end of CreateOutputObjects()
316
317//================================================================================================================
318
319void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent)
320{
1315fe58 321 //running over data
322
bc92c0cb 323 //get the total multiplicity of event:
324 //Int_t nPrim = anEvent->NumberOfTracks();
bc92c0cb 325
1315fe58 326 //if(nPrim>8&&nPrim<24)
bc92c0cb 327 //{
328
329 //fill the common control histograms:
1315fe58 330 fCommonHists->FillControlHistograms(anEvent);
8842fb2b 331
bc92c0cb 332 //get the selected multiplicity (i.e. number of particles used for int. flow):
333 //Int_t nEventNSelTracksIntFlow = anEvent->GetEventNSelTracksIntFlow();
334
335 Int_t n=2; //int flow harmonic (to be improved)
336
337 //---------------------------------------------------------------------------------------------------------
338 //Q-vectors of an event evaluated in harmonics n, 2n, 3n and 4n:
339 AliFlowVector Qvector1n, Qvector2n, Qvector3n, Qvector4n;
340
341 Qvector1n.Set(0.,0.);
342 Qvector1n.SetMult(0);
343 Qvector1n=anEvent->GetQ(1*n);
344
345 Qvector2n.Set(0.,0.);
346 Qvector2n.SetMult(0);
347 Qvector2n=anEvent->GetQ(2*n);
348
349 Qvector3n.Set(0.,0.);
350 Qvector3n.SetMult(0);
351 Qvector3n=anEvent->GetQ(3*n);
352
353 Qvector4n.Set(0.,0.);
354 Qvector4n.SetMult(0);
355 Qvector4n=anEvent->GetQ(4*n);
356 //---------------------------------------------------------------------------------------------------------
357
358 //multiplicity (to be improved, because I already have nEventNSelTracksIntFlow and nPrim)
359 Double_t M = Qvector1n.GetMult();
360
1315fe58 361 fAvMultIntFlowQC->Fill(0.,M,1.);
bc92c0cb 362
363 //---------------------------------------------------------------------------------------------------------
364 //*************
365 //* Q-vectors *
366 //*************
1315fe58 367 Double_t ReQ2nQ1nstarQ1nstar = pow(Qvector1n.X(),2.)*Qvector2n.X()+2.*Qvector1n.X()*Qvector1n.Y()*Qvector2n.Y()-pow(Qvector1n.Y(),2.)*Qvector2n.X();//Re[Q_{2n} Q_{n}^* Q_{n}^*]
368 //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}^*]
369 Double_t ReQ1nQ1nQ2nstar = ReQ2nQ1nstarQ1nstar;//Re[Q_{n} Q_{n} Q_{2n}^*] = Re[Q_{2n} Q_{n}^* Q_{n}^*]
370 Double_t ReQ3nQ1nQ2nstarQ2nstar = (pow(Qvector2n.X(),2.)-pow(Qvector2n.Y(),2.))*(Qvector3n.X()*Qvector1n.X()-Qvector3n.Y()*Qvector1n.Y())+2.*Qvector2n.X()*Qvector2n.Y()*(Qvector3n.X()*Qvector1n.Y()+Qvector3n.Y()*Qvector1n.X());
371 //Double_t ImQ3nQ1nQ2nstarQ2nstar = calculate and implement this (deleteMe)
372 Double_t ReQ2nQ2nQ3nstarQ1nstar = ReQ3nQ1nQ2nstarQ2nstar;
373 Double_t ReQ4nQ2nstarQ2nstar = pow(Qvector2n.X(),2.)*Qvector4n.X()+2.*Qvector2n.X()*Qvector2n.Y()*Qvector4n.Y()-pow(Qvector2n.Y(),2.)*Qvector4n.X();//Re[Q_{4n} Q_{2n}^* Q_{2n}^*]
bc92c0cb 374 //Double_t ImQ4nQ2nstarQ2nstar = calculate and implement this (deleteMe)
1315fe58 375 Double_t ReQ2nQ2nQ4nstar = ReQ4nQ2nstarQ2nstar;
376 Double_t ReQ4nQ3nstarQ1nstar = Qvector4n.X()*(Qvector3n.X()*Qvector1n.X()-Qvector3n.Y()*Qvector1n.Y())+Qvector4n.Y()*(Qvector3n.X()*Qvector1n.Y()+Qvector3n.Y()*Qvector1n.X());//Re[Q_{4n} Q_{3n}^* Q_{n}^*]
377 Double_t ReQ3nQ1nQ4nstar = ReQ4nQ3nstarQ1nstar;//Re[Q_{3n} Q_{n} Q_{4n}^*] = Re[Q_{4n} Q_{3n}^* Q_{n}^*]
bc92c0cb 378 //Double_t ImQ4nQ3nstarQ1nstar = calculate and implement this (deleteMe)
1315fe58 379 Double_t ReQ3nQ2nstarQ1nstar = Qvector3n.X()*Qvector2n.X()*Qvector1n.X()-Qvector3n.X()*Qvector2n.Y()*Qvector1n.Y()+Qvector3n.Y()*Qvector2n.X()*Qvector1n.Y()+Qvector3n.Y()*Qvector2n.Y()*Qvector1n.X();//Re[Q_{3n} Q_{2n}^* Q_{n}^*]
380 Double_t ReQ2nQ1nQ3nstar = ReQ3nQ2nstarQ1nstar;//Re[Q_{2n} Q_{n} Q_{3n}^*] = Re[Q_{3n} Q_{2n}^* Q_{n}^*]
bc92c0cb 381 //Double_t ImQ3nQ2nstarQ1nstar; //calculate and implement this (deleteMe)
1315fe58 382 Double_t ReQ3nQ1nstarQ1nstarQ1nstar = Qvector3n.X()*pow(Qvector1n.X(),3)-3.*Qvector1n.X()*Qvector3n.X()*pow(Qvector1n.Y(),2)+3.*Qvector1n.Y()*Qvector3n.Y()*pow(Qvector1n.X(),2)-Qvector3n.Y()*pow(Qvector1n.Y(),3);//Re[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*]
bc92c0cb 383 //Double_t ImQ3nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1315fe58 384 Double_t Q2nQ1nQ2nstarQ1nstar = pow(Qvector2n.Mod()*Qvector1n.Mod(),2);//|Q_{2n}|^2 |Q_{n}|^2
385 Double_t ReQ4nQ2nstarQ1nstarQ1nstar = (Qvector4n.X()*Qvector2n.X()+Qvector4n.Y()*Qvector2n.Y())*(pow(Qvector1n.X(),2)-pow(Qvector1n.Y(),2))+2.*Qvector1n.X()*Qvector1n.Y()*(Qvector4n.Y()*Qvector2n.X()-Qvector4n.X()*Qvector2n.Y());//Re[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*]
bc92c0cb 386 //Double_t ImQ4nQ2nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1315fe58 387 Double_t ReQ2nQ1nQ1nstarQ1nstarQ1nstar = (Qvector2n.X()*Qvector1n.X()-Qvector2n.Y()*Qvector1n.Y())*(pow(Qvector1n.X(),3)-3.*Qvector1n.X()*pow(Qvector1n.Y(),2))+(Qvector2n.X()*Qvector1n.Y()+Qvector1n.X()*Qvector2n.Y())*(3.*Qvector1n.Y()*pow(Qvector1n.X(),2)-pow(Qvector1n.Y(),3));//Re[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*]
bc92c0cb 388 //Double_t ImQ2nQ1nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1315fe58 389 Double_t ReQ2nQ2nQ2nstarQ1nstarQ1nstar = pow(Qvector2n.Mod(),2.)*(Qvector2n.X()*(pow(Qvector1n.X(),2.)-pow(Qvector1n.Y(),2.))+2.*Qvector2n.Y()*Qvector1n.X()*Qvector1n.Y());//Re[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*]
390 //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}^*]
391 Double_t ReQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(Qvector1n.X(),4.)*Qvector4n.X()-6.*pow(Qvector1n.X(),2.)*Qvector4n.X()*pow(Qvector1n.Y(),2.)+pow(Qvector1n.Y(),4.)*Qvector4n.X()+4.*pow(Qvector1n.X(),3.)*Qvector1n.Y()*Qvector4n.Y()-4.*pow(Qvector1n.Y(),3.)*Qvector1n.X()*Qvector4n.Y();
392 //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();
393
394
bc92c0cb 395 //---------------------------------------------------------------------------------------------------------
396
397 //---------------------------------------------------------------------------------------------------------
398 //********************************
399 //* multi-particle correlations: *
400 //********************************
401
402 // binning of fQCorrelations:
403 // 1st bin: <2>_{n|n} = two_1n1n
404 // 2nd bin: <2>_{2n|2n} = two_2n2n
405 // 3rd bin: <2>_{3n|3n} = two_3n3n
406 // 4th bin: <2>_{4n|4n} = two_4n4n
407 // 6th bin: <3>_{2n|n,n} = three_2n1n1n
408 // 7th bin: <3>_{3n|2n,n} = three_3n2n1n
409 // 8th bin: <3>_{4n|2n,2n} = three_4n2n2n
410 // 9th bin: <3>_{4n|3n,n} = three_4n3n1n
411 //11th bin: <4>_{n,n|n,n} = four_1n1n1n1n
412 //12th bin: <4>_{2n,n|2n,n} = four_2n1n2n1n
413 //13th bin: <4>_{3n|n,n,n} = four_3n1n1n1n
414 //14th bin: <4>_{4n|2n,n,n} = four_4n2n1n1n
1315fe58 415 //15th bin: <4>_{3n,n|2n,2n} = four_3n1n2n2n
bc92c0cb 416 //16th bin: <5>_{2n|n,n,n,n} = five_2n1n1n1n1n
1315fe58 417 //17th bin: <5>_{2n,2n|2n,n,n} = five_2n2n2n1n1n
418 //18th bin: <5>_{3n,n|2n,n,n} = five_3n1n2n1n1n
419 //19th bin: <5>_{4n|n,n,n,n} = five_4n1n1n1n1n
bc92c0cb 420 //21th bin: <6>_{n,n,n|n,n,n} = six_1n1n1n1n1n1n
421
1315fe58 422 //31th bin: <4>_{2n,2n|2n,2n} = four_2n2n2n2n //to be improved
423 //32nd bin: <4>_{3n,n|3n,n} = four_3n1n3n1n //to be improved
424
8842fb2b 425 // binning of fQProduct (all correlations are evaluated in harmonic n):
426 // 1st bin: <2>*<4>
427 // 2nd bin: <2>*<6>
428 // 3rd bin: <2>*<8>
429 // 4th bin: <4>*<6>
430 // 5th bin: <4>*<8>
431 // 6th bin: <6>*<8>
432
bc92c0cb 433 //2-particle
434 Double_t two_1n1n=0., two_2n2n=0., two_3n3n=0., two_4n4n=0.;
435 if(M>1)
436 {
437 two_1n1n = (pow(Qvector1n.Mod(),2.)-M)/(M*(M-1.)); //<2>_{n|n} = <cos(n*(phi1-phi2))>
438 two_2n2n = (pow(Qvector2n.Mod(),2.)-M)/(M*(M-1.)); //<2>_{2n|2n} = <cos(2n*(phi1-phi2))>
439 two_3n3n = (pow(Qvector3n.Mod(),2.)-M)/(M*(M-1.)); //<2>_{3n|3n} = <cos(3n*(phi1-phi2))>
440 two_4n4n = (pow(Qvector4n.Mod(),2.)-M)/(M*(M-1.)); //<2>_{4n|4n} = <cos(4n*(phi1-phi2))>
1315fe58 441
bc92c0cb 442 fQCorrelations->Fill(0.,two_1n1n,M*(M-1.));
443 fQCorrelations->Fill(1.,two_2n2n,M*(M-1.));
444 fQCorrelations->Fill(2.,two_3n3n,M*(M-1.));
445 fQCorrelations->Fill(3.,two_4n4n,M*(M-1.));
1315fe58 446
447 f2Distribution->Fill(two_1n1n,M*(M-1.));
bc92c0cb 448 }
449
450 //3-particle
451 Double_t three_2n1n1n=0., three_3n2n1n=0., three_4n2n2n=0., three_4n3n1n=0.;
452 if(M>2)
453 {
454 three_2n1n1n = (ReQ2nQ1nstarQ1nstar-2.*pow(Qvector1n.Mod(),2.)-pow(Qvector2n.Mod(),2.)+2.*M)/(M*(M-1.)*(M-2.)); //Re[<3>_{2n|n,n}] = Re[<3>_{n,n|2n}] = <cos(n*(2.*phi1-phi2-phi3))>
455 three_3n2n1n = (ReQ3nQ2nstarQ1nstar-pow(Qvector3n.Mod(),2.)-pow(Qvector2n.Mod(),2.)-pow(Qvector1n.Mod(),2.)+2.*M)/(M*(M-1.)*(M-2.)); //Re[<3>_{3n|2n,n}] = Re[<3>_{2n,n|3n}] = <cos(n*(3.*phi1-2.*phi2-phi3))>
456 three_4n2n2n = (ReQ4nQ2nstarQ2nstar-2.*pow(Qvector2n.Mod(),2.)-pow(Qvector4n.Mod(),2.)+2.*M)/(M*(M-1.)*(M-2.)); //Re[<3>_{4n|2n,2n}] = Re[<3>_{2n,2n|4n}] = <cos(n*(4.*phi1-2.*phi2-2.*phi3))>
457 three_4n3n1n = (ReQ4nQ3nstarQ1nstar-pow(Qvector4n.Mod(),2.)-pow(Qvector3n.Mod(),2.)-pow(Qvector1n.Mod(),2.)+2.*M)/(M*(M-1.)*(M-2.)); //Re[<3>_{4n|3n,n}] = Re[<3>_{3n,n|4n}] = <cos(n*(4.*phi1-3.*phi2-phi3))>
458
459 fQCorrelations->Fill(5.,three_2n1n1n,M*(M-1.)*(M-2.));
460 fQCorrelations->Fill(6.,three_3n2n1n,M*(M-1.)*(M-2.));
461 fQCorrelations->Fill(7.,three_4n2n2n,M*(M-1.)*(M-2.));
462 fQCorrelations->Fill(8.,three_4n3n1n,M*(M-1.)*(M-2.));
463 }
464
465 //4-particle
1315fe58 466 Double_t four_1n1n1n1n=0., four_2n2n2n2n=0., four_2n1n2n1n=0., four_3n1n1n1n=0., four_4n2n1n1n=0., four_3n1n2n2n=0., four_3n1n3n1n=0.;
bc92c0cb 467 if(M>3)
468 {
1315fe58 469 four_1n1n1n1n = (2.*M*(M-3.)+pow(Qvector1n.Mod(),4.)-4.*(M-2.)*pow(Qvector1n.Mod(),2.)-2.*ReQ2nQ1nstarQ1nstar+pow(Qvector2n.Mod(),2.))/(M*(M-1)*(M-2.)*(M-3.));//<4>_{n,n|n,n}
470 four_2n2n2n2n = (2.*M*(M-3.)+pow(Qvector2n.Mod(),4.)-4.*(M-2.)*pow(Qvector2n.Mod(),2.)-2.*ReQ4nQ2nstarQ2nstar+pow(Qvector4n.Mod(),2.))/(M*(M-1)*(M-2.)*(M-3.));//<4>_{2n,2n|2n,2n}
471 four_2n1n2n1n = (Q2nQ1nQ2nstarQ1nstar-2.*ReQ3nQ2nstarQ1nstar-2.*ReQ2nQ1nstarQ1nstar)/(M*(M-1.)*(M-2.)*(M-3.))-((M-5.)*pow(Qvector1n.Mod(),2.)+(M-4.)*pow(Qvector2n.Mod(),2.)-pow(Qvector3n.Mod(),2.))/(M*(M-1.)*(M-2.)*(M-3.))+(M-6.)/((M-1.)*(M-2.)*(M-3.));//Re[<4>_{2n,n|2n,n}]
472 four_3n1n1n1n = (ReQ3nQ1nstarQ1nstarQ1nstar-3.*ReQ3nQ2nstarQ1nstar-3.*ReQ2nQ1nstarQ1nstar)/(M*(M-1.)*(M-2.)*(M-3.))+(2.*pow(Qvector3n.Mod(),2.)+3.*pow(Qvector2n.Mod(),2.)+6.*pow(Qvector1n.Mod(),2.)-6.*M)/(M*(M-1.)*(M-2.)*(M-3.));//Re[<4>_{3n|n,n,n}]
473 four_4n2n1n1n = (ReQ4nQ2nstarQ1nstarQ1nstar-2.*ReQ4nQ3nstarQ1nstar-ReQ4nQ2nstarQ2nstar-2.*ReQ3nQ2nstarQ1nstar)/(M*(M-1.)*(M-2.)*(M-3.))-(ReQ2nQ1nstarQ1nstar-2.*pow(Qvector4n.Mod(),2.)-2.*pow(Qvector3n.Mod(),2.)-3.*pow(Qvector2n.Mod(),2.)-4.*pow(Qvector1n.Mod(),2.))/(M*(M-1.)*(M-2.)*(M-3.))-(6.)/((M-1.)*(M-2.)*(M-3.));//Re[<4>_{4n|2n,n,n}]
474 four_3n1n2n2n = (ReQ3nQ1nQ2nstarQ2nstar-ReQ4nQ2nstarQ2nstar-ReQ3nQ1nQ4nstar-2.*ReQ3nQ2nstarQ1nstar)/(M*(M-1.)*(M-2.)*(M-3.))-(2.*ReQ1nQ1nQ2nstar-pow(Qvector4n.Mod(),2.)-2.*pow(Qvector3n.Mod(),2.)-4.*pow(Qvector2n.Mod(),2.)-4.*pow(Qvector1n.Mod(),2.))/(M*(M-1.)*(M-2.)*(M-3.))-(6.)/((M-1.)*(M-2.)*(M-3.));//Re[<4>_{3n,n|2n,2n}]
475 four_3n1n3n1n = (pow(Qvector3n.Mod(),2.)*pow(Qvector1n.Mod(),2.)-2.*ReQ4nQ3nstarQ1nstar-2.*ReQ3nQ2nstarQ1nstar)/(M*(M-1.)*(M-2.)*(M-3.))+(pow(Qvector4n.Mod(),2.)-(M-4.)*pow(Qvector3n.Mod(),2.)+pow(Qvector2n.Mod(),2.)-(M-4.)*pow(Qvector1n.Mod(),2.))/(M*(M-1.)*(M-2.)*(M-3.))+(M-6.)/((M-1.)*(M-2.)*(M-3.));//<4>_{3n,n|3n,n}
476 //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}
477
478 fQCorrelations->Fill(10.,four_1n1n1n1n,M*(M-1.)*(M-2.)*(M-3.));
479
480 fQCorrelations->Fill(30.,four_2n2n2n2n,M*(M-1.)*(M-2.)*(M-3.));//to be improved
481 fQCorrelations->Fill(31.,four_3n1n3n1n,M*(M-1.)*(M-2.)*(M-3.));//to be improved
482
bc92c0cb 483 fQCorrelations->Fill(11.,four_2n1n2n1n,M*(M-1.)*(M-2.)*(M-3.));
484 fQCorrelations->Fill(12.,four_3n1n1n1n,M*(M-1.)*(M-2.)*(M-3.));
1315fe58 485 fQCorrelations->Fill(13.,four_4n2n1n1n,M*(M-1.)*(M-2.)*(M-3.));
486 fQCorrelations->Fill(14.,four_3n1n2n2n,M*(M-1.)*(M-2.)*(M-3.));
bc92c0cb 487
1315fe58 488 f4Distribution->Fill(four_1n1n1n1n,M*(M-1.)*(M-2.)*(M-3.));
489
8842fb2b 490 fQProduct->Fill(0.,two_1n1n*four_1n1n1n1n,M*(M-1.)*M*(M-1.)*(M-2.)*(M-3.));
bc92c0cb 491 }
492
493 //5-particle
1315fe58 494 Double_t five_2n1n1n1n1n=0., five_2n2n2n1n1n=0., five_3n1n2n1n1n=0., five_4n1n1n1n1n=0.;
495 if(M>4)
496 {
497 five_2n1n1n1n1n = (ReQ2nQ1nQ1nstarQ1nstarQ1nstar-ReQ3nQ1nstarQ1nstarQ1nstar+6.*ReQ3nQ2nstarQ1nstar)/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.))-(ReQ2nQ1nQ3nstar+3.*(M-6.)*ReQ2nQ1nstarQ1nstar+3.*ReQ1nQ1nQ2nstar)/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.))-(2.*pow(Qvector3n.Mod(),2.)+3.*pow(Qvector2n.Mod()*Qvector1n.Mod(),2.)-3.*(M-4.)*pow(Qvector2n.Mod(),2.))/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.))-3.*(pow(Qvector1n.Mod(),4.)-2.*(2*M-5.)*pow(Qvector1n.Mod(),2.)+2.*M*(M-4.))/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.));//Re[<5>_{2n,n|n,n,n}]
498
499 five_2n2n2n1n1n = (ReQ2nQ2nQ2nstarQ1nstarQ1nstar-ReQ4nQ2nstarQ1nstarQ1nstar-2.*ReQ2nQ2nQ3nstarQ1nstar)/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.))+2.*(ReQ4nQ2nstarQ2nstar+4.*ReQ3nQ2nstarQ1nstar+ReQ3nQ1nQ4nstar)/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.))+(ReQ2nQ2nQ4nstar-2.*(M-5.)*ReQ2nQ1nstarQ1nstar+2.*ReQ1nQ1nQ2nstar)/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.))-(2.*pow(Qvector4n.Mod(),2.)+4.*pow(Qvector3n.Mod(),2.)+1.*pow(Qvector2n.Mod(),4.)-2.*(3.*M-10.)*pow(Qvector2n.Mod(),2.))/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.))-(4.*pow(Qvector1n.Mod(),2.)*pow(Qvector2n.Mod(),2.)-4.*(M-5.)*pow(Qvector1n.Mod(),2.)+4.*M*(M-6.))/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.));//Re[<5>_{2n,2n|2n,n,n}]
500
501 //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.));
502
503 five_4n1n1n1n1n = (ReQ4nQ1nstarQ1nstarQ1nstarQ1nstar-6.*ReQ4nQ2nstarQ1nstarQ1nstar-4.*ReQ3nQ1nstarQ1nstarQ1nstar)/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.))+(8.*ReQ4nQ3nstarQ1nstar+3.*ReQ4nQ2nstarQ2nstar+12.*ReQ3nQ2nstarQ1nstar+12.*ReQ2nQ1nstarQ1nstar)/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.))-(6.*pow(Qvector4n.Mod(),2.)+8.*pow(Qvector3n.Mod(),2.)+12.*pow(Qvector2n.Mod(),2.)+24.*pow(Qvector1n.Mod(),2.)-24.*M)/(M*(M-1.)*(M-2.)*(M-3.)*(M-4.));//Re[<5>_{4n|n,n,n,n}]
504
505 //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.));
506
507 fQCorrelations->Fill(15.,five_2n1n1n1n1n,M*(M-1.)*(M-2.)*(M-3.)*(M-4.));
508 fQCorrelations->Fill(16.,five_2n2n2n1n1n,M*(M-1.)*(M-2.)*(M-3.)*(M-4.));
509 fQCorrelations->Fill(17.,five_3n1n2n1n1n,M*(M-1.)*(M-2.)*(M-3.)*(M-4.));
510 fQCorrelations->Fill(18.,five_4n1n1n1n1n,M*(M-1.)*(M-2.)*(M-3.)*(M-4.));
511 }
bc92c0cb 512
513 //6-particle
1315fe58 514 Double_t six_1n1n1n1n1n1n=0.;
bc92c0cb 515 if(M>5)
516 {
1315fe58 517 six_1n1n1n1n1n1n = (pow(Qvector1n.Mod(),6.)+9.*Q2nQ1nQ2nstarQ1nstar-6.*ReQ2nQ1nQ1nstarQ1nstarQ1nstar)/(M*(M-1)*(M-2)*(M-3)*(M-4)*(M-5))+4.*(ReQ3nQ1nstarQ1nstarQ1nstar-3.*ReQ3nQ2nstarQ1nstar)/(M*(M-1)*(M-2)*(M-3)*(M-4)*(M-5))+2.*(9.*(M-4.)*ReQ2nQ1nstarQ1nstar+2.*pow(Qvector3n.Mod(),2.))/(M*(M-1)*(M-2)*(M-3)*(M-4)*(M-5))-9.*(pow(Qvector1n.Mod(),4.)+pow(Qvector2n.Mod(),2.))/(M*(M-1)*(M-2)*(M-3)*(M-5))+(18.*pow(Qvector1n.Mod(),2.))/(M*(M-1)*(M-3)*(M-4))-(6.)/((M-1)*(M-2)*(M-3));//<6>_{n,n,n|n,n,n}
518
519 fQCorrelations->Fill(20.,six_1n1n1n1n1n1n,M*(M-1.)*(M-2.)*(M-3.)*(M-4.)*(M-5.));
bc92c0cb 520
1315fe58 521 f6Distribution->Fill(six_1n1n1n1n1n1n,M*(M-1.)*(M-2.)*(M-3.)*(M-4.)*(M-5.));
bc92c0cb 522
8842fb2b 523 fQProduct->Fill(1.,two_1n1n*six_1n1n1n1n1n1n,M*(M-1.)*M*(M-1.)*(M-2.)*(M-3.)*(M-4.)*(M-5.));
524 fQProduct->Fill(3.,four_1n1n1n1n*six_1n1n1n1n1n1n,M*(M-1.)*(M-2.)*(M-3.)*M*(M-1.)*(M-2.)*(M-3.)*(M-4.)*(M-5.));
bc92c0cb 525 }
526 //---------------------------------------------------------------------------------------------------------
527
528
529 //---------------------------------------------------------------------------------------------------------
530 // DIFFERENTIAL FLOW
531
532 Double_t Q_x = Qvector1n.X();
533 Double_t Q_y = Qvector1n.Y();
534 Double_t Q_2x = Qvector2n.X();
535 Double_t Q_2y = Qvector2n.Y();
1315fe58 536
bc92c0cb 537 Double_t q_x=0.,q_y=0.,q_2x=0.,q_2y=0.,m=0.;
538
539 for(Int_t i=0;i<M;i++) //check if nPrim == M
540 {
541 fTrack=anEvent->GetTrack(i);
1315fe58 542 if(fTrack)
543 {
544 fReq1n->Fill(fTrack->Pt(),cos(n*(fTrack->Phi())),1.);
545 fImq1n->Fill(fTrack->Pt(),sin(n*(fTrack->Phi())),1.);
546 fReq2n->Fill(fTrack->Pt(),cos(2.*n*(fTrack->Phi())),1.);
547 fImq2n->Fill(fTrack->Pt(),sin(2.*n*(fTrack->Phi())),1.);
548 }
bc92c0cb 549 }
550
551 Double_t twoDiff_1n1n=0.,twoDiff_2n2n=0.,threeDiff_2n1n1n=0.,threeDiff_1n1n2n=0.,fourDiff_1n1n1n1n=0.;
552
8842fb2b 553 for(Int_t bin=1;bin<(fnBinsPt+1);bin++) //loop over pt-bins (to be improved upper limit)
bc92c0cb 554 {
555 q_x = (fReq1n->GetBinContent(bin))*(fReq1n->GetBinEntries(bin));
556 q_y = (fImq1n->GetBinContent(bin))*(fImq1n->GetBinEntries(bin));
557 q_2x = (fReq2n->GetBinContent(bin))*(fReq2n->GetBinEntries(bin));
558 q_2y = (fImq2n->GetBinContent(bin))*(fImq2n->GetBinEntries(bin));
559 m = fReq1n->GetBinEntries(bin);
560
561 if(m>0&&M>1)
562 {
563 twoDiff_1n1n = (q_x*Q_x+q_y*Q_y-m)/(m*(M-1.));
564 f2_1n1n->Fill((bin-1)*0.1,twoDiff_1n1n,m*(M-1.));//<2'>_{n|n}
565
566 twoDiff_2n2n = (q_2x*Q_2x+q_2y*Q_2y-m)/(m*(M-1.));
567 f2_2n2n->Fill((bin-1)*0.1,twoDiff_2n2n,m*(M-1.));//<2'>_{2n|2n}
568 }
569
570 if(m>0&&M>2)
571 {
572 threeDiff_2n1n1n = (q_2x*(Q_x*Q_x-Q_y*Q_y)+2.*q_2y*Q_x*Q_y-2.*(q_x*Q_x+q_y*Q_y)-(q_2x*Q_2x+q_2y*Q_2y)+2.*m)/(m*(M-1.)*(M-2.));
573 f3_2n1n1n->Fill((bin-1)*0.1,threeDiff_2n1n1n,m*(M-1.)*(M-2.));//Re[<3'>_{2n|n,n}]
574
575 threeDiff_1n1n2n = (Q_2x*(q_x*Q_x-q_y*Q_y)+Q_2y*(q_x*Q_y+q_y*Q_x)-2.*(q_x*Q_x+q_y*Q_y)-(q_2x*Q_2x+q_2y*Q_2y)+2.*m)/(m*(M-1.)*(M-2.));
576 f3_1n1n2n->Fill((bin-1)*0.1,threeDiff_1n1n2n,m*(M-1.)*(M-2.));//Re[<3'>_{n,n|2n}]
577 }
578
579 if(m>0&&M>3)
580 {
581 fourDiff_1n1n1n1n = ((Q_x*Q_x+Q_y*Q_y)*(q_x*Q_x+q_y*Q_y)-(q_2x*(Q_x*Q_x-Q_y*Q_y)+2.*q_2y*Q_x*Q_y)-(Q_2x*(q_x*Q_x-q_y*Q_y)+Q_2y*(q_x*Q_y+q_y*Q_x))+(q_2x*Q_2x+q_2y*Q_2y)-2.*(M-3.)*(q_x*Q_x+q_y*Q_y)-2.*m*(Q_x*Q_x+Q_y*Q_y)+2.*(Q_x*q_x+Q_y*q_y)+2.*m*(M-3.))/(m*(M-1.)*(M-2.)*(M-3.));
582 f4_1n1n1n1n->Fill((bin-1)*0.1,fourDiff_1n1n1n1n,m*(M-1.)*(M-2.)*(M-3.)); //Re[<4'>_{n,n|n,n}]
583 }
584
585 }
586
587 fReq1n->Reset();
588 fImq1n->Reset();
589 fReq2n->Reset();
590 fImq2n->Reset();
591//---------------------------------------------------------------------------------------------------------
592
593
594
595
596
597
598
599
600
601
602
603
bc92c0cb 604 /*
605
606 Int_t nSelTracksIntFlow = 0;//cross-checking the selected multiplicity
607
608
609
610
611
612
613 //calculating Q-vector of event (needed for errors) in n-th harmonic
614 AliFlowVector fQvector;
615 fQvector.Set(0.,0.);
616 fQvector.SetMult(0);
617 fQvector=anEvent->GetQ(n); //get the Q vector for this event
618
619 nPrim = fQvector.GetMult();
620 nEventNSelTracksIntFlow = fQvector.GetMult();
621 nEventNSelTracksIntFlow=nPrim;
622
623
624 */
625
626
627 /*
628 //calculating Q-vector of event (needed for errors)
629 AliFlowVector fQvector;
630 fQvector.Set(0.,0.);
631 fQvector.SetMult(0);
632 fQvector=anEvent->GetQ(); //get the Q vector for this event
633
634 */
635
636 //cout<<" multiplicity = "<<fQvector.GetMult()<<endl;
637
638
639 //binning is organized as follows:
640 //1st bin fill Q_x
641 //2nd bin fill Q_y
642 //3rd bin fill (Q_x)^2the selected multiplicity
643 //4th bin fill (Q_y)^2
644 //5th bin fill |Q_n|^2
645 //6th bin fill |Q_n|^4
646 //7th bin fill |Q_2n|^2
647 //8th bin fill Q_2n (Q_n)* (Q_n)*// Remark: * here denotes complex conjugate!!! //Re[Q_n^2 * Q_2n^*]
648 //9th bin fill Q_2n (Q_n)* (Q_n)*// Remark: * here denotes complex conjugate!!! //Im[Q_n^2 * Q_2n^*]
649 //10th bin fill |Q_3n|^2
650 //11th bin fill |Q_4n|^2
651 //12th bin fill |Q_5n|^2
652 //13th bin fill Re<Q_{3n} Q_{2n}^* Q_{n}^*>
653 //14th bin fill Re<Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*>
654 //15th bin fill <|Q_{2n}|^2 |Q_{n}|^2>
655 //16th bin fill Re<Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*>
656 //17th bin fill |Q_n|^6
657
658 /*
659
660 fQvectorComponents->Fill(0.,fQvector.X(),1); //in the 1st bin fill Q_x
661 fQvectorComponents->Fill(1.,fQvector.Y(),1); //in the 2nd bin fill Q_y
662 fQvectorComponents->Fill(2.,pow(fQvector.X(),2.),1); //in the 3rd bin fill (Q_x)^2
663 fQvectorComponents->Fill(3.,pow(fQvector.Y(),2.),1); //in the 4th bin fill (Q_y)^2
664 fQvectorComponents->Fill(4.,pow(fQvector.Mod(),2.),1);//in the 5th bin fill |Q|^2
665 fQvectorComponents->Fill(5.,pow(fQvector.Mod(),4.),1);//in the 6th bin fill |Q|^4
666
667 //flow vector in 2n-th harmonic
668 AliFlowVector fQvector2n;
669 fQvector2n.Set(0.,0.);
670 fQvector2n.SetMult(0);
671 fQvector2n=anEvent->GetQ(2*n); //get the Q vector in 2n-th harmonic for this event
672
673 fQvectorComponents->Fill(6.,pow(fQvector2n.Mod(),2.),1);//in the 7th bin fill |Q_2n|^2
674
675 Double_t
676 Q2nQnstarQnstar=pow(fQvector.X(),2.)*fQvector2n.X()+2.*fQvector.X()*fQvector.Y()*fQvector2n.Y()-pow(fQvector.Y(),2.)*fQvector2n.X();
677
678 Double_t
679 Q2nQnstarQnstarTemp=-2.*fQvector.X()*fQvector2n.X()*fQvector.Y()+fQvector2n.Y()*pow(fQvector.X(),2.)-fQvector2n.Y()*pow(fQvector.Y(),2.);
680
681
682 fQvectorComponents->Fill(7.,Q2nQnstarQnstar,1); //in the 8th bin fill Re[Q_n^2 * Q_2n^*]
683 fQvectorComponents->Fill(8.,Q2nQnstarQnstarTemp,1); //in the 9th bin fill Im[Q_n^2 * Q_2n^*]
684
685
686 //flow vector in 3n-th harmonic
687 AliFlowVector fQvector3n;
688 fQvector3n.Set(0.,0.);
689 fQvector3n.SetMult(0);
690 fQvector3n=anEvent->GetQ(3*n); //get the Q vector in 3n-th harmonic for this event
691 fQvectorComponents->Fill(9.,pow(fQvector3n.Mod(),2.),1);//in the 10th bin fill |Q_3n|^2
692
693 //flow vector in 4n-th harmonic
694 AliFlowVector fQvector4n;
695 fQvector4n.Set(0.,0.);
696 fQvector4n.SetMult(0);
697 fQvector4n=anEvent->GetQ(4*n); //get the Q vector in 4n-th harmonic for this event
698 fQvectorComponents->Fill(10.,pow(fQvector4n.Mod(),2.),1);//in the 11th bin fill |Q_4n|^2
699
700 //flow vector in 5n-th harmonic
701 AliFlowVector fQvector5n;
702 fQvector5n.Set(0.,0.);
703 fQvector5n.SetMult(0);
704 fQvector5n=anEvent->GetQ(5*n); //get the Q vector in 5n-th harmonic for this event
705 fQvectorComponents->Fill(11.,pow(fQvector5n.Mod(),2.),1);//in the 12th bin fill |Q_5n|^2
706
707
708
709 Double_t
710 Q3nQ2nstarQnstar=fQvector3n.X()*fQvector2n.X()*fQvector.X()-fQvector3n.X()*fQvector2n.Y()*fQvector.Y()+fQvector3n.Y()*fQvector2n.X()*fQvector.Y()+fQvector3n.Y()*fQvector2n.Y()*fQvector.X();
711 fQvectorComponents->Fill(12.,Q3nQ2nstarQnstar,1); //in the 13th bin fill Re<Q_{3n} Q_{2n}^* Q_{n}^*>
712
713 //fDirectCorrelations->Fill(2.,16,1);
714
715
716 Double_t
717 Q3nQnstarQnstarQnstar=fQvector3n.X()*pow(fQvector.X(),3)-3.*fQvector.X()*fQvector3n.X()*pow(fQvector.Y(),2)+3.*fQvector.Y()*fQvector3n.Y()*pow(fQvector.X(),2)-fQvector3n.Y()*pow(fQvector.Y(),3);
718 fQvectorComponents->Fill(13.,Q3nQnstarQnstarQnstar,1); //in the 14th bin fill Re<Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*>
719
720
721
722 Double_t
723 Q2nQnQ2nstarQnstar=pow(fQvector2n.Mod()*fQvector.Mod(),2);
724 fQvectorComponents->Fill(14.,Q2nQnQ2nstarQnstar,1); //in the 15th bin fill <|Q_{2n}|^2 |Q_{n}|^2>
725
726
727
728 Double_t
729 Q2nQnQnstarQnstarQnstar=(fQvector2n.X()*fQvector.X()-fQvector2n.Y()*fQvector.Y())*(pow(fQvector.X(),3)-3.*fQvector.X()*pow(fQvector.Y(),2))+(fQvector2n.X()*fQvector.Y()+fQvector.X()*fQvector2n.Y())*(3.*fQvector.Y()*pow(fQvector.X(),2)-pow(fQvector.Y(),3));
730 fQvectorComponents->Fill(15.,Q2nQnQnstarQnstarQnstar,1); //in the 16th bin fill Re<Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*>
731
732
733 fQvectorComponents->Fill(16.,pow(fQvector.Mod(),6),1); //in the 17th bin fill |Q|^6
734 */
735
736 /*
737 Double_t
738 Q2nQnQnstarQnstarQnstar22222=(pow(fQvector.X(),2)+pow(fQvector.Y(),2))*(pow(fQvector.X(),2)*fQvector2n.X()-fQvector2n.X()*pow(fQvector.Y(),2)+2.*fQvector.X()*fQvector.Y()*fQvector2n.Y());
739 fQvectorComponents->Fill(16.,Q2nQnQnstarQnstarQnstar22222,1); //in the 16th bin fill Re<Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*>
740 */
741
742
743
744
745
746
747
748
749
750
751
bc92c0cb 752
1315fe58 753/*
bc92c0cb 754
755
756
757
758
759
760
761 //--------------------------------------------------------------------------------------------------------------------------------
762 // multi-particle correlations calculated with nested loops (for integrated flow)
763
764 // fDirectCorrelations was declared as TProfile:
765 // fDirectCorrelations = new TProfile("fDirectCorrelations","multi-particle correlations with nested loops",80,0,80);
766
767 // phik is the azimuth of the kth particle in laboratory frame
768
769 // binning in fDirectCorrelations: 0..40 correlations needed for integrated flow; 40..80 0..40 correlations needed for differential flow
770
771 // integrated flow
772 // 1st bin: <2>_{n|n}
773 // 2nd bin: <2>_{2n|2n}
774 // 3rd bin: <2>_{3n|3n}
775 // 4th bin: <2>_{4n|4n}
776 // 6th bin: <3>_{2n|n,n}
777 // 7th bin: <3>_{3n|2n,n}
778 // 8th bin: <3>_{4n|2n,2n}
779 // 9th bin: <3>_{4n|3n,n}
780 //11th bin: <4>_{n,n|n,n}
781 //12th bin: <4>_{2n,n|2n,n}
782 //13th bin: <4>_{3n|n,n,n}
783 //14th bin: <4>_{4n|2n,n,n}
1315fe58 784 //15th bin: <4>_{3n,n|2n,2n}
785 //16th bin: <5>_{2n,n|n,n,n}
786 //17th bin: <5>_{2n,2n|2n,n,n}
787 //18th bin: <5>_{3n,n|2n,n,n}
788 //19th bin: <5>_{4n|n,n,n,n}
bc92c0cb 789 //21th bin: <6>_{n,n,n|n,n,n}
790
1315fe58 791
792 //31th bin: <4>_{2n,2n|2n,2n} //to be improved
793 //32nd bin: <4>_{3n,n|3n,n} //to be improved
794
795
bc92c0cb 796 //differential flow
797 //41st bin: <2'>_{n|n}
798 //42nd bin: <2'>_{2n|2n}
799 //46th bin: <3'>_{2n|n,n}
800 //47th bin: <3'>_{n,n|2n}
801 //51st bin: <4'>_{n,n|n,n}
802
803 Double_t phi1=0.,phi2=0.;
804 Double_t phi3=0.,phi4=0.;
805 Double_t phi5=0.,phi6=0.;
806
807 //<2>_{kn|kn} (k=1,2,3,4)
808 for(Int_t i=0;i<M;i++)
809 {
810 fTrack=anEvent->GetTrack(i);
811 phi1=fTrack->Phi();
812 for(Int_t j=0;j<M;j++)
813 {
814 if(j==i)continue;
815 fTrack=anEvent->GetTrack(j);
816 phi2=fTrack->Phi();
1315fe58 817 fDirectCorrelations->Fill(0.,cos(n*(phi1-phi2)),1); //<2>_{n|n}
818 fDirectCorrelations->Fill(1.,cos(2.*n*(phi1-phi2)),1); //<2>_{2n|2n}
819 fDirectCorrelations->Fill(2.,cos(3.*n*(phi1-phi2)),1); //<2>_{3n|3n}
820 fDirectCorrelations->Fill(3.,cos(4.*n*(phi1-phi2)),1); //<2>_{4n|4n}
bc92c0cb 821 }
822 }
823
1315fe58 824 //<3>_{2n|n,n}, <3>_{3n|2n,n}, <3>_{4n|2n,2n} and <3>_{4n|3n,n}
bc92c0cb 825 for(Int_t i=0;i<M;i++)
826 {
827 fTrack=anEvent->GetTrack(i);
828 phi1=fTrack->Phi();
829 for(Int_t j=0;j<M;j++)
830 {
831 if(j==i)continue;
832 fTrack=anEvent->GetTrack(j);
833 phi2=fTrack->Phi();
834 for(Int_t k=0;k<M;k++)
835 {
836 if(k==i||k==j)continue;
837 fTrack=anEvent->GetTrack(k);
838 phi3=fTrack->Phi();
1315fe58 839 fDirectCorrelations->Fill(5.,cos(2*n*phi1-n*(phi2+phi3)),1); //<3>_{2n|n,n}
840 fDirectCorrelations->Fill(6.,cos(3.*n*phi1-2.*n*phi2-n*phi3),1); //<3>_{3n|2n,n}
841 fDirectCorrelations->Fill(7.,cos(4.*n*phi1-2.*n*phi2-2.*n*phi3),1); //<3>_{4n|2n,2n}
842 fDirectCorrelations->Fill(8.,cos(4.*n*phi1-3.*n*phi2-n*phi3),1); //<3>_{4n|3n,n}
bc92c0cb 843 }
844 }
845 }
846
1315fe58 847 //<4>_{n,n|n,n}, <4>_{2n,n|2n,n}, <4>_{3n|n,n,n}, <4>_{4n|2n,n,n}, <4>_{2n,2n|2n,2n} and <4>_{3n,n|3n,n}
bc92c0cb 848 for(Int_t i=0;i<M;i++)
849 {
850 fTrack=anEvent->GetTrack(i);
851 phi1=fTrack->Phi();
852 for(Int_t j=0;j<M;j++)
853 {
854 if(j==i)continue;
855 fTrack=anEvent->GetTrack(j);
856 phi2=fTrack->Phi();
857 for(Int_t k=0;k<M;k++)
858 {
859 if(k==i||k==j)continue;
860 fTrack=anEvent->GetTrack(k);
861 phi3=fTrack->Phi();
862 for(Int_t l=0;l<M;l++)
863 {
864 if(l==i||l==j||l==k)continue;
865 fTrack=anEvent->GetTrack(l);
866 phi4=fTrack->Phi();
1315fe58 867 fDirectCorrelations->Fill(10.,cos(n*phi1+n*phi2-n*phi3-n*phi4),1); //<4>_{n,n|n,n}
868 fDirectCorrelations->Fill(11.,cos(2.*n*phi1+n*phi2-2.*n*phi3-n*phi4),1); //<4>_{2n,n|2n,n}
869 fDirectCorrelations->Fill(12.,cos(3.*n*phi1-n*phi2-n*phi3-n*phi4),1); //<4>_{3n|n,n,n}
870 fDirectCorrelations->Fill(13.,cos(4.*n*phi1-2.*n*phi2-n*phi3-n*phi4),1); //<4>_{4n|2n,n,n}
871 fDirectCorrelations->Fill(14.,cos(3.*n*phi1+n*phi2-2.*n*phi3-2.*n*phi4),1); //<4>_{3n,n|2n,2n}
872 fDirectCorrelations->Fill(30.,cos(2.*n*phi1+2*n*phi2-2.*n*phi3-2.*n*phi4),1); //<4>_{2n,2n|2n,2n}//to be improved
873 fDirectCorrelations->Fill(31.,cos(3.*n*phi1+n*phi2-3.*n*phi3-n*phi4),1); //<4>_{3n,n|3n,n}//to be improved
bc92c0cb 874 }
875 }
876 }
877 }
878
879
880
881
882
883
bc92c0cb 884
885
886
887
888
889
890
1315fe58 891
892
bc92c0cb 893 //<5>_{2n,n,n,n,n}
1315fe58 894 for(Int_t i=0;i<M;i++)
bc92c0cb 895 {
896 cout<<"i = "<<i<<endl;
897 fTrack=anEvent->GetTrack(i);
898 phi1=fTrack->Phi();
1315fe58 899 for(Int_t j=0;j<M;j++)
bc92c0cb 900 {
901 if(j==i)continue;
902 fTrack=anEvent->GetTrack(j);
903 phi2=fTrack->Phi();
1315fe58 904 for(Int_t k=0;k<M;k++)
bc92c0cb 905 {
906 if(k==i||k==j)continue;
907 fTrack=anEvent->GetTrack(k);
908 phi3=fTrack->Phi();
1315fe58 909 for(Int_t l=0;l<M;l++)
bc92c0cb 910 {
911 if(l==i||l==j||l==k)continue;
912 fTrack=anEvent->GetTrack(l);
913 phi4=fTrack->Phi();
1315fe58 914 for(Int_t m=0;m<M;m++)
bc92c0cb 915 {
916 if(m==i||m==j||m==k||m==l)continue;
917 fTrack=anEvent->GetTrack(m);
918 phi5=fTrack->Phi();
1315fe58 919 fDirectCorrelations->Fill(15.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),1); //<5>_{2n,n|n,n,n}
920 fDirectCorrelations->Fill(16.,cos(2.*n*phi1+2.*n*phi2-2.*n*phi3-n*phi4-n*phi5),1);//<5>_{2n,2n|2n,n,n}
921 fDirectCorrelations->Fill(17.,cos(3.*n*phi1+n*phi2-2.*n*phi3-n*phi4-n*phi5),1); //<5>_{3n,n|2n,n,n}
922 fDirectCorrelations->Fill(18.,cos(4.*n*phi1-n*phi2-n*phi3-n*phi4-n*phi5),1); //<5>_{4n|n,n,n,n}
bc92c0cb 923 }
924 }
925 }
926 }
927 }
928
929
1315fe58 930
931 */
932
933
934
935 /*
bc92c0cb 936
937 //<6>_{n,n,n,n,n,n}
938 for(Int_t i=0;i<nPrim;i++)
939 {
940 //cout<<"i = "<<i<<endl;
941 fTrack=anEvent->GetTrack(i);
942 phi1=fTrack->Phi();
943 for(Int_t j=0;j<nPrim;j++)
944 {
945 if(j==i)continue;
946 fTrack=anEvent->GetTrack(j);
947 phi2=fTrack->Phi();
948 for(Int_t k=0;k<nPrim;k++)
949 {
950 if(k==i||k==j)continue;
951 fTrack=anEvent->GetTrack(k);
952 phi3=fTrack->Phi();
953 for(Int_t l=0;l<nPrim;l++)
954 {
955 if(l==i||l==j||l==k)continue;
956 fTrack=anEvent->GetTrack(l);
957 phi4=fTrack->Phi();
958 for(Int_t m=0;m<nPrim;m++)
959 {
960 if(m==i||m==j||m==k||m==l)continue;
961 fTrack=anEvent->GetTrack(m);
962 phi5=fTrack->Phi();
963 for(Int_t nn=0;nn<nPrim;nn++)
964 {
965 if(nn==i||nn==j||nn==k||nn==l||nn==m)continue;
966 fTrack=anEvent->GetTrack(nn);
967 phi6=fTrack->Phi();
968 fDirectCorrelations->Fill(20.,cos(n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6),1); //<6>_{n,n,n,n,n,n}
969 }
970 }
971 }
972 }
973 }
974 }
975 */
976 //--------------------------------------------------------------------------------------------------------------------------------
977
978
979
980
981
982
983
984
985
986
987
988
989
990/*
991
992
993
994
995
996 //--------------------------------------------------------------------------------------------------------------------------------
997 // multi-particle correlations calculated with nested loops (for differential flow)
998
999 //differential flow (see above how the binning in fDirectCorrelations is organized)
1000 //41st bin: <2'>_{n|n}
1001 //42nd bin: <2'>_{2n|2n}
1002 //46th bin: <3'>_{2n|n,n}
1003 //47th bin: <3'>_{n,n|2n}
1004 //51st bin: <4'>_{n,n|n,n}
1005
1006 //<2'>_{n|n}
1007 for(Int_t i=0;i<M;i++)
1008 {
1009 fTrack=anEvent->GetTrack(i);
1010 if(fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)
1011 {
1012 phi1=fTrack->Phi();
1013 for(Int_t j=0;j<M;j++)
1014 {
1015 if(j==i)continue;
1016 fTrack=anEvent->GetTrack(j);
1017 phi2=fTrack->Phi();
1018 fDirectCorrelations->Fill(40.,cos(1.*n*(phi1-phi2)),1); //<2'>_{n,n}
1019 fDirectCorrelations->Fill(41.,cos(2.*n*(phi1-phi2)),1); //<2'>_{2n,2n}
1020 }
1021 }
1022 }
1023
1024 //<3'>_{2n|n,n}
1025 for(Int_t i=0;i<M;i++)
1026 {
1027 fTrack=anEvent->GetTrack(i);
1028 if(fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)
1029 {
1030 phi1=fTrack->Phi();
1031 for(Int_t j=0;j<M;j++)
1032 {
1033 if(j==i)continue;
1034 fTrack=anEvent->GetTrack(j);
1035 phi2=fTrack->Phi();
1036 for(Int_t k=0;k<M;k++)
1037 {
1038 if(k==i||k==j)continue;
1039 fTrack=anEvent->GetTrack(k);
1040 phi3=fTrack->Phi();
1041 fDirectCorrelations->Fill(45.,cos(n*(2.*phi1-phi2-phi3)),1); //<3'>_{2n|n,n}
1042 fDirectCorrelations->Fill(46.,cos(n*(phi1+phi2-2.*phi3)),1); //<3'>_{n,n|2n}
1043 }
1044 }
1045 }
1046 }
1047
1048 //<4'>_{n,n|n,n}
1049 for(Int_t i=0;i<M;i++)
1050 {
1051 fTrack=anEvent->GetTrack(i);
1052 if(fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)
1053 {
1054 phi1=fTrack->Phi();
1055 for(Int_t j=0;j<M;j++)
1056 {
1057 if(j==i)continue;
1058 fTrack=anEvent->GetTrack(j);
1059 phi2=fTrack->Phi();
1060 for(Int_t k=0;k<M;k++)
1061 {
1062 if(k==i||k==j)continue;
1063 fTrack=anEvent->GetTrack(k);
1064 phi3=fTrack->Phi();
1065 for(Int_t l=0;l<M;l++)
1066 {
1067 if(l==i||l==j||l==k)continue;
1068 fTrack=anEvent->GetTrack(l);
1069 phi4=fTrack->Phi();
1070 fDirectCorrelations->Fill(50.,cos(n*(phi1+phi2-phi3-phi4)),1); //<4'>_{n,n|n,n}
1071 }
1072 }
1073 }
1074 }
1075 }
1076 //--------------------------------------------------------------------------------------------------------------------------------
1077
1078
1079
1080
1081
1082*/
1083
1084
1085
1086
1087
1088
1089
1090//}//end of if
1091
1092
1093}//end of Make()
1094
1095//================================================================================================================
1096
1097void AliFlowAnalysisWithQCumulants::Finish()
1098{
1315fe58 1099 //calculate the final results
8842fb2b 1100 AliQCumulantsFunctions finalResults(fIntFlowResultsQC,fDiffFlowResults2ndOrderQC,fDiffFlowResults4thOrderQC,fCovariances,fAvMultIntFlowQC,fQvectorComponents,fQCorrelations, fQProduct,fDirectCorrelations, f2_1n1n,f2_2n2n,f3_2n1n1n,f3_1n1n2n,f4_1n1n1n1n,fCommonHistsResults2nd, fCommonHistsResults4th,fCommonHistsResults6th,fCommonHistsResults8th);
1315fe58 1101
1102 finalResults.Calculate();
bc92c0cb 1103}
1104
1315fe58 1105//================================================================================================================
bc92c0cb 1106
1315fe58 1107void AliFlowAnalysisWithQCumulants::WriteHistograms(TString* outputFileName)
1108{
1109 //store the final results in output .root file
1110 TFile *output = new TFile(outputFileName->Data(),"RECREATE");
1111 fHistList->Write();
1112 delete output;
1113}
bc92c0cb 1114
1315fe58 1115//================================================================================================================