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