fix for Savannah reprted bug to write Digits tree even if was no Hits
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / 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"
e085f1a9 32#include "TGraph.h"
bc92c0cb 33#include "TParticle.h"
34#include "TRandom3.h"
1315fe58 35#include "TStyle.h"
bc92c0cb 36#include "TProfile.h"
37#include "TProfile2D.h"
38#include "TProfile3D.h"
1dfa3c16 39#include "TMath.h"
e085f1a9 40#include "TArrow.h"
41#include "TPaveLabel.h"
42#include "TCanvas.h"
bc92c0cb 43#include "AliFlowEventSimple.h"
44#include "AliFlowTrackSimple.h"
45#include "AliFlowAnalysisWithQCumulants.h"
1315fe58 46#include "AliQCumulantsFunctions.h"
bc92c0cb 47
48#include "TRandom.h"
49
50class TH1;
51class TGraph;
52class TPave;
53class TLatex;
54class TMarker;
55class TRandom3;
56class TObjArray;
57class TList;
58class TCanvas;
59class TSystem;
60class TROOT;
61class AliFlowVector;
62class TVector;
63
64//================================================================================================================
65
66ClassImp(AliFlowAnalysisWithQCumulants)
67
68AliFlowAnalysisWithQCumulants::AliFlowAnalysisWithQCumulants():
69 fTrack(NULL),
70 fHistList(NULL),
ae733b3b 71 fDiffFlowList(NULL),
03a02aca 72 fWeightsList(NULL),
1315fe58 73 fAvMultIntFlowQC(NULL),
bc92c0cb 74 fQvectorComponents(NULL),
1315fe58 75 fIntFlowResultsQC(NULL),
76 fDiffFlowResults2ndOrderQC(NULL),
77 fDiffFlowResults4thOrderQC(NULL),
78 fCovariances(NULL),
e085f1a9 79 fQvectorForEachEventX(NULL),//to be removed
80 fQvectorForEachEventY(NULL),//to be removed
bc92c0cb 81 fQCorrelations(NULL),
8842fb2b 82 fQProduct(NULL),
bc92c0cb 83 fDirectCorrelations(NULL),
1dfa3c16 84 fPtReq1nRP(NULL),
85 fPtImq1nRP(NULL),
86 fPtReq2nRP(NULL),
87 fPtImq2nRP(NULL),
88 f2PerPtBin1n1nRP(NULL),
89 f2PerPtBin2n2nRP(NULL),
90 f3PerPtBin2n1n1nRP(NULL),
91 f3PerPtBin1n1n2nRP(NULL),
92 f4PerPtBin1n1n1n1nRP(NULL),
93 fEtaReq1nRP(NULL),
94 fEtaImq1nRP(NULL),
95 fEtaReq2nRP(NULL),
96 fEtaImq2nRP(NULL),
97 f2PerEtaBin1n1nRP(NULL),
98 f2PerEtaBin2n2nRP(NULL),
99 f3PerEtaBin2n1n1nRP(NULL),
100 f3PerEtaBin1n1n2nRP(NULL),
101 f4PerEtaBin1n1n1n1nRP(NULL),
4057ba99 102 fPtReq1nPrimePOI(NULL),
103 fPtImq1nPrimePOI(NULL),
104 fPtReq2nPrimePOI(NULL),
105 fPtImq2nPrimePOI(NULL),
106 fmPrimePerPtBin(NULL),
107 fPtReq1nPrimePrimePOI(NULL),
108 fPtImq1nPrimePrimePOI(NULL),
109 fPtReq2nPrimePrimePOI(NULL),
110 fPtImq2nPrimePrimePOI(NULL),
111 fmPrimePrimePerPtBin(NULL),
112 fEtaReq1nPrimePOI(NULL),
113 fEtaImq1nPrimePOI(NULL),
114 fEtaReq2nPrimePOI(NULL),
115 fEtaImq2nPrimePOI(NULL),
116 fmPrimePerEtaBin(NULL),
117 fEtaReq1nPrimePrimePOI(NULL),
118 fEtaImq1nPrimePrimePOI(NULL),
119 fEtaReq2nPrimePrimePOI(NULL),
120 fEtaImq2nPrimePrimePOI(NULL),
121 fmPrimePrimePerEtaBin(NULL),
1dfa3c16 122 f2PerPtBin1n1nPOI(NULL),
123 f2PerPtBin2n2nPOI(NULL),
124 f3PerPtBin2n1n1nPOI(NULL),
125 f3PerPtBin1n1n2nPOI(NULL),
126 f4PerPtBin1n1n1n1nPOI(NULL),
1dfa3c16 127 f2PerEtaBin1n1nPOI(NULL),
128 f2PerEtaBin2n2nPOI(NULL),
129 f3PerEtaBin2n1n1nPOI(NULL),
130 f3PerEtaBin1n1n2nPOI(NULL),
131 f4PerEtaBin1n1n1n1nPOI(NULL),
cb308e83 132 fCommonHists2nd(NULL),
133 fCommonHists4th(NULL),
134 fCommonHists6th(NULL),
135 fCommonHists8th(NULL),
8842fb2b 136 fCommonHistsResults2nd(NULL),
137 fCommonHistsResults4th(NULL),
138 fCommonHistsResults6th(NULL),
139 fCommonHistsResults8th(NULL),
52021ae2 140 f2pDistribution(NULL),
141 f4pDistribution(NULL),
142 f6pDistribution(NULL),
5e838eeb 143 f8pDistribution(NULL),
8842fb2b 144 fnBinsPt(0),
145 fPtMin(0),
1dfa3c16 146 fPtMax(0),
147 fnBinsEta(0),
148 fEtaMin(0),
e085f1a9 149 fEtaMax(0),
150 fEventCounter(0),
151 fUsePhiWeights(kFALSE),
152 fUsePtWeights(kFALSE),
03a02aca 153 fUseEtaWeights(kFALSE)
bc92c0cb 154{
155 //constructor
ae733b3b 156 fHistList = new TList();
157 fDiffFlowList = new TList();
158 fDiffFlowList->SetName("DifferentialFlow");
03a02aca 159 fWeightsList = new TList();
ae733b3b 160 fWeightsList->SetName("Weights");
03a02aca 161
8842fb2b 162 fnBinsPt = AliFlowCommonConstants::GetNbinsPt();
163 fPtMin = AliFlowCommonConstants::GetPtMin();
164 fPtMax = AliFlowCommonConstants::GetPtMax();
165
1dfa3c16 166 fnBinsEta = AliFlowCommonConstants::GetNbinsEta();
167 fEtaMin = AliFlowCommonConstants::GetEtaMin();
168 fEtaMax = AliFlowCommonConstants::GetEtaMax();
bc92c0cb 169}
170
171AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants()
172{
03a02aca 173 //destructor
bc92c0cb 174 delete fHistList;
ae733b3b 175 delete fDiffFlowList;
176 delete fWeightsList;
bc92c0cb 177}
178
179//================================================================================================================
180
e085f1a9 181void AliFlowAnalysisWithQCumulants::Init()
bc92c0cb 182{
183 //various output histograms
bc92c0cb 184 //avarage multiplicity
1315fe58 185 fAvMultIntFlowQC = new TProfile("fAvMultIntFlowQC","Average Multiplicity",1,0,1,"s");
186 fAvMultIntFlowQC->SetXTitle("");
187 fAvMultIntFlowQC->SetYTitle("");
188 fAvMultIntFlowQC->SetLabelSize(0.06);
189 fAvMultIntFlowQC->SetMarkerStyle(25);
190 fAvMultIntFlowQC->SetLabelOffset(0.01);
191 (fAvMultIntFlowQC->GetXaxis())->SetBinLabel(1,"Average Multiplicity");
192 fHistList->Add(fAvMultIntFlowQC);
bc92c0cb 193
194 //Q-vector stuff
195 fQvectorComponents = new TProfile("fQvectorComponents","Avarage of Q-vector components",44,0.,44.,"s");
196 fQvectorComponents->SetXTitle("");
197 fQvectorComponents->SetYTitle("");
198 //fHistList->Add(fQvectorComponents);
199
200 //final results for integrated flow from Q-cumulants
1315fe58 201 fIntFlowResultsQC = new TH1D("fIntFlowResultsQC","Integrated Flow from Q-cumulants",4,0,4);
202 //fIntFlowResults->SetXTitle("");
203 //fIntFlowResultsQC->SetYTitle("Integrated Flow");
204 fIntFlowResultsQC->SetLabelSize(0.06);
52021ae2 205 //fIntFlowResultsQC->SetTickLength(1);
1315fe58 206 fIntFlowResultsQC->SetMarkerStyle(25);
207 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(1,"v_{n}{2}");
208 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(2,"v_{n}{4}");
209 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(3,"v_{n}{6}");
210 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(4,"v_{n}{8}");
1315fe58 211 fHistList->Add(fIntFlowResultsQC);
212
bc92c0cb 213 //final results for differential flow from 2nd order Q-cumulant
8842fb2b 214 fDiffFlowResults2ndOrderQC = new TH1D("fDiffFlowResults2ndOrderQC","Differential Flow from 2nd Order Q-cumulant",fnBinsPt,fPtMin,fPtMax);
1315fe58 215 fDiffFlowResults2ndOrderQC->SetXTitle("p_{t} [GeV]");
216 //fDiffFlowResults2ndOrderQC->SetYTitle("Differential Flow");
217 fHistList->Add(fDiffFlowResults2ndOrderQC);
bc92c0cb 218
219 //final results for differential flow from 4th order Q-cumulant
8842fb2b 220 fDiffFlowResults4thOrderQC = new TH1D("fDiffFlowResults4thOrderQC","Differential Flow from 4th Order Q-cumulant",fnBinsPt,fPtMin,fPtMax);
1315fe58 221 fDiffFlowResults4thOrderQC->SetXTitle("p_{t} [GeV]");
222 //fDiffFlowResults4thOrderQC->SetYTitle("Differential Flow");
223 fHistList->Add(fDiffFlowResults4thOrderQC);
224
225 //final results for covariances (1st bin: <2*4>-<2>*<4>, 2nd bin: <2*6>-<2>*<6>, ...)
226 fCovariances = new TH1D("fCovariances","Covariances",6,0,6);
227 //fCovariances->SetXTitle("");
228 //fCovariances->SetYTitle("<covariance>");
229 fCovariances->SetLabelSize(0.04);
230 fCovariances->SetTickLength(1);
231 fCovariances->SetMarkerStyle(25);
232 (fCovariances->GetXaxis())->SetBinLabel(1,"Cov(2,4)");
233 (fCovariances->GetXaxis())->SetBinLabel(2,"Cov(2,6)");
234 (fCovariances->GetXaxis())->SetBinLabel(3,"Cov(2,8)");
235 (fCovariances->GetXaxis())->SetBinLabel(4,"Cov(4,6)");
236 (fCovariances->GetXaxis())->SetBinLabel(5,"Cov(4,8)");
237 (fCovariances->GetXaxis())->SetBinLabel(6,"Cov(6,8)");
238 fHistList->Add(fCovariances);
bc92c0cb 239
e085f1a9 240 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
241 // !!!! to be removed !!!!
242 //profile containing the x-components of Q-vectors from all events
243 fQvectorForEachEventX = new TProfile("fQvectorForEachEventX","x-components of Q-vectors",44000,1,44000,"s");
244 fHistList->Add(fQvectorForEachEventX);
245
246 //profile containing the y-components of Q-vectors from all events
247 fQvectorForEachEventY = new TProfile("fQvectorForEachEventY","y-components of Q-vectors",44000,1,44000,"s");
248 fHistList->Add(fQvectorForEachEventY);
249 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
250
bc92c0cb 251 //multi-particle correlations calculated from Q-vectors
dee1e0e0 252 fQCorrelations = new TProfile("fQCorrelations","multi-particle correlations from Q-vectors",32,0,32,"s");
1315fe58 253 //fQCorrelations->SetXTitle("correlations");
254 //fQCorrelations->SetYTitle("");
255 fQCorrelations->SetTickLength(-0.01,"Y");
256 fQCorrelations->SetMarkerStyle(25);
257 fQCorrelations->SetLabelSize(0.03);
258 fQCorrelations->SetLabelOffset(0.01,"Y");
dee1e0e0 259
1315fe58 260 (fQCorrelations->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}");
261 (fQCorrelations->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}");
262 (fQCorrelations->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}");
263 (fQCorrelations->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}");
dee1e0e0 264
1315fe58 265 (fQCorrelations->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}");
266 (fQCorrelations->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}");
267 (fQCorrelations->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}");
268 (fQCorrelations->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}");
dee1e0e0 269
1315fe58 270 (fQCorrelations->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}");
271 (fQCorrelations->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}");
dee1e0e0 272 (fQCorrelations->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}");
273 (fQCorrelations->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}");
274 (fQCorrelations->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}");
275 (fQCorrelations->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}");
276 (fQCorrelations->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}");
277
278 (fQCorrelations->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}");
279 (fQCorrelations->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}");
280 (fQCorrelations->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}");
281 (fQCorrelations->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}");
282
283 (fQCorrelations->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}");
284 (fQCorrelations->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}");
285 (fQCorrelations->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}");
286 (fQCorrelations->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}");
287
288 (fQCorrelations->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}");
289
290 (fQCorrelations->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}");
291
bc92c0cb 292 fHistList->Add(fQCorrelations);
293
8842fb2b 294 //average products
295 fQProduct = new TProfile("fQProduct","average of products",6,0,6,"s");
296 fQProduct->SetTickLength(-0.01,"Y");
297 fQProduct->SetMarkerStyle(25);
298 fQProduct->SetLabelSize(0.03);
299 fQProduct->SetLabelOffset(0.01,"Y");
300 (fQProduct->GetXaxis())->SetBinLabel(1,"<<2*4>>");
301 (fQProduct->GetXaxis())->SetBinLabel(2,"<<2*6>>");
302 (fQProduct->GetXaxis())->SetBinLabel(3,"<<2*8>>");
303 (fQProduct->GetXaxis())->SetBinLabel(4,"<<4*6>>");
304 (fQProduct->GetXaxis())->SetBinLabel(5,"<<4*8>>");
305 (fQProduct->GetXaxis())->SetBinLabel(6,"<<6*8>>");
306 fQProduct->SetXTitle("");
307 fQProduct->SetYTitle("");
308 fHistList->Add(fQProduct);
bc92c0cb 309
310 //multi-particle correlations calculated with nested loops (0..40 integrated flow; 40..80 differential flow)
311 fDirectCorrelations = new TProfile("fDirectCorrelations","multi-particle correlations with nested loops",80,0,80,"s");
312 fDirectCorrelations->SetXTitle("");
313 fDirectCorrelations->SetYTitle("correlations");
314 fHistList->Add(fDirectCorrelations);
315
1dfa3c16 316 //fPtReq1nRP
317 fPtReq1nRP = new TProfile("fPtReq1nRP","Re[q_n]",fnBinsPt,fPtMin,fPtMax,"s");
318 fPtReq1nRP->SetXTitle("p_{t} [GeV]");
319 fPtReq1nRP->SetYTitle("Re[q_n]");
1dfa3c16 320
321 //fPtImq1nRP
322 fPtImq1nRP = new TProfile("fPtImq1nRP","Im[q_n]",fnBinsPt,fPtMin,fPtMax,"s");
323 fPtImq1nRP->SetXTitle("p_{t} [GeV]");
324 fPtImq1nRP->SetYTitle("Im[q_n]");
1dfa3c16 325
326 //fPtReq2nRP
327 fPtReq2nRP = new TProfile("fPtReq2nRP","Re[q_2n]",fnBinsPt,fPtMin,fPtMax,"s");
328 fPtReq2nRP->SetXTitle("p_{t} [GeV]");
329 fPtReq2nRP->SetYTitle("Im[D]");
e085f1a9 330
1dfa3c16 331 //fPtImq2nRP
332 fPtImq2nRP = new TProfile("fPtImq2nRP","Im[q_2n]",fnBinsPt,fPtMin,fPtMax,"s");
333 fPtImq2nRP->SetXTitle("p_{t} [GeV]");
334 fPtImq2nRP->SetYTitle("Im[q_2n]");
1dfa3c16 335
336 //f2PerPtBin1n1nRP
337 f2PerPtBin1n1nRP = new TProfile("f2PerPtBin1n1nRP","<2'>_{n|n}",fnBinsPt,fPtMin,fPtMax,"s");
338 f2PerPtBin1n1nRP->SetXTitle("p_{t} [GeV]");
ae733b3b 339 fDiffFlowList->Add(f2PerPtBin1n1nRP);
1dfa3c16 340
341 //f2PerPtBin2n2nRP
342 f2PerPtBin2n2nRP = new TProfile("f2PerPtBin2n2nRP","<2'>_{2n|2n}",fnBinsPt,fPtMin,fPtMax,"s");
343 f2PerPtBin2n2nRP->SetXTitle("p_{t} [GeV]");
ae733b3b 344 fDiffFlowList->Add(f2PerPtBin2n2nRP);
1dfa3c16 345
346 //f3PerPtBin2n1n1nRP
347 f3PerPtBin2n1n1nRP = new TProfile("f3PerPtBin2n1n1nRP","<3'>_{2n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
348 f3PerPtBin2n1n1nRP->SetXTitle("p_{t} [GeV]");
ae733b3b 349 fDiffFlowList->Add(f3PerPtBin2n1n1nRP);
1dfa3c16 350
351 //f3PerPtBin1n1n2nRP
352 f3PerPtBin1n1n2nRP = new TProfile("f3PerPtBin1n1n2nRP","<3'>_{n,n|2n}",fnBinsPt,fPtMin,fPtMax,"s");
353 f3PerPtBin1n1n2nRP->SetXTitle("p_{t} [GeV]");
ae733b3b 354 fDiffFlowList->Add(f3PerPtBin1n1n2nRP);
1dfa3c16 355
356 //f4PerPtBin1n1n1n1nRP
357 f4PerPtBin1n1n1n1nRP = new TProfile("f4PerPtBin1n1n1n1nRP","<4'>_{n,n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
358 f4PerPtBin1n1n1n1nRP->SetXTitle("p_{t} [GeV]");
ae733b3b 359 fDiffFlowList->Add(f4PerPtBin1n1n1n1nRP);
1dfa3c16 360
361 //fEtaReq1nRP
362 fEtaReq1nRP = new TProfile("fEtaReq1nRP","Re[q_n]",fnBinsEta,fEtaMin,fEtaMax,"s");
363 fEtaReq1nRP->SetXTitle("#eta");
364 fEtaReq1nRP->SetYTitle("Re[q_n]");
1dfa3c16 365
366 //fEtaImq1nRP
367 fEtaImq1nRP = new TProfile("fEtaImq1nRP","Im[q_n]",fnBinsEta,fEtaMin,fEtaMax,"s");
368 fEtaImq1nRP->SetXTitle("#eta");
369 fEtaImq1nRP->SetYTitle("Im[q_n]");
1dfa3c16 370
371 //fEtaReq2nRP
372 fEtaReq2nRP = new TProfile("fEtaReq2nRP","Re[q_2n]",fnBinsEta,fEtaMin,fEtaMax,"s");
373 fEtaReq2nRP->SetXTitle("#eta");
374 fEtaReq2nRP->SetYTitle("Im[D]");
1dfa3c16 375
376 //fEtaImq2nRP
377 fEtaImq2nRP = new TProfile("fEtaImq2nRP","Im[q_2n]",fnBinsEta,fEtaMin,fEtaMax,"s");
378 fEtaImq2nRP->SetXTitle("#eta");
379 fEtaImq2nRP->SetYTitle("Im[q_2n]");
1dfa3c16 380
381 //f2PerEtaBin1n1nRP
382 f2PerEtaBin1n1nRP = new TProfile("f2PerEtaBin1n1nRP","<2'>_{n|n}",fnBinsEta,fEtaMin,fEtaMax,"s");
383 f2PerEtaBin1n1nRP->SetXTitle("#eta");
ae733b3b 384 fDiffFlowList->Add(f2PerEtaBin1n1nRP);
1dfa3c16 385
386 //f2PerEtaBin2n2nRP
387 f2PerEtaBin2n2nRP = new TProfile("f2PerEtaBin2n2nRP","<2'>_{2n|2n}",fnBinsEta,fEtaMin,fEtaMax,"s");
388 f2PerEtaBin2n2nRP->SetXTitle("#eta");
ae733b3b 389 fDiffFlowList->Add(f2PerEtaBin2n2nRP);
1dfa3c16 390
391 //f3PerEtaBin2n1n1nRP
392 f3PerEtaBin2n1n1nRP = new TProfile("f3PerEtaBin2n1n1nRP","<3'>_{2n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
393 f3PerEtaBin2n1n1nRP->SetXTitle("#eta");
ae733b3b 394 fDiffFlowList->Add(f3PerEtaBin2n1n1nRP);
1dfa3c16 395
396 //f3PerEtaBin1n1n2nRP
397 f3PerEtaBin1n1n2nRP = new TProfile("f3PerEtaBin1n1n2RP","<3'>_{n,n|2n}",fnBinsEta,fEtaMin,fEtaMax,"s");
398 f3PerEtaBin1n1n2nRP->SetXTitle("#eta");
ae733b3b 399 fDiffFlowList->Add(f3PerEtaBin1n1n2nRP);
1dfa3c16 400
401 //f4PerEtaBin1n1n1n1nRP
402 f4PerEtaBin1n1n1n1nRP = new TProfile("f4PerEtaBin1n1n1n1nRP","<4'>_{n,n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
403 f4PerEtaBin1n1n1n1nRP->SetXTitle("#eta");
ae733b3b 404 fDiffFlowList->Add(f4PerEtaBin1n1n1n1nRP);
1dfa3c16 405
4057ba99 406 //fPtReq1nPrimePOI
407 fPtReq1nPrimePOI = new TProfile("fPtReq1nPrimePOI","Re[q_{n}^{'}]",fnBinsPt,fPtMin,fPtMax,"s");
408 fPtReq1nPrimePOI->SetXTitle("p_{t} [GeV]");
409 fPtReq1nPrimePOI->SetYTitle("Re[q_{n}^{'}]");
4057ba99 410
411 //fPtImq1nPrimePOI
412 fPtImq1nPrimePOI = new TProfile("fPtImq1nPrimePOI","Im[q_{n}^{'}]",fnBinsPt,fPtMin,fPtMax,"s");
413 fPtImq1nPrimePOI->SetXTitle("p_{t} [GeV]");
414 fPtImq1nPrimePOI->SetYTitle("Im[q_{n}^{'}]");
4057ba99 415
416 //fPtReq2nPrimePOI
417 fPtReq2nPrimePOI = new TProfile("fPtReq2nPrimePOI","Re[q_{2n}^{'}]",fnBinsPt,fPtMin,fPtMax,"s");
418 fPtReq2nPrimePOI->SetXTitle("p_{t} [GeV]");
419 fPtReq2nPrimePOI->SetYTitle("Re[q_{2n}^{'}]");
4057ba99 420
421 //fPtImq2nPrimePOI
422 fPtImq2nPrimePOI = new TProfile("fPtImq2nPrimePOI","Im[q_{2n}^{'}]",fnBinsPt,fPtMin,fPtMax,"s");
423 fPtImq2nPrimePOI->SetXTitle("p_{t} [GeV]");
424 fPtImq2nPrimePOI->SetYTitle("Im[q_{2n}^{'}]");
4057ba99 425
426 //fmPrimePerPtBin
427 fmPrimePerPtBin = new TProfile("fmPrimePerPtBin","# of particles selected both as RP and POI per #p_{t} bin",fnBinsPt,fPtMin,fPtMax,"s");
428 fmPrimePerPtBin->SetXTitle("p_{t} [GeV]");
429 fmPrimePerPtBin->SetYTitle("Counts");
e8a609bc 430
4057ba99 431 //fPtReq1nPrimePrimePOI
432 fPtReq1nPrimePrimePOI = new TProfile("fPtReq1nPrimePrimePOI","Re[q_{n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
433 fPtReq1nPrimePrimePOI->SetXTitle("p_{t} [GeV]");
434 fPtReq1nPrimePrimePOI->SetYTitle("Re[q_{n}^{''}]");
4057ba99 435
436 //fPtImq1nPrimePrimePOI
437 fPtImq1nPrimePrimePOI = new TProfile("fPtImq1nPrimePrimePOI","Im[q_{n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
438 fPtImq1nPrimePrimePOI->SetXTitle("p_{t} [GeV]");
439 fPtImq1nPrimePrimePOI->SetYTitle("Im[q_{n}^{''}]");
4057ba99 440
441 //fPtReq2nPrimePrimePOI
442 fPtReq2nPrimePrimePOI = new TProfile("fPtReq2nPrimePrimePOI","Re[q_{2n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
443 fPtReq2nPrimePrimePOI->SetXTitle("p_{t} [GeV]");
444 fPtReq2nPrimePrimePOI->SetYTitle("Re[q_{2n}^{''}]");
4057ba99 445
446 //fPtImq2nPrimePrimePOI
447 fPtImq2nPrimePrimePOI = new TProfile("fPtImq2nPrimePrimePOI","Im[q_{2n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
448 fPtImq2nPrimePrimePOI->SetXTitle("p_{t} [GeV]");
449 fPtImq2nPrimePrimePOI->SetYTitle("Im[q_{2n}^{''}]");
4057ba99 450
451 //fmPrimePrimePerPtBin
452 fmPrimePrimePerPtBin = new TProfile("fmPrimePrimePerPtBin","# of particles selected as POI and NOT as RP per #p_{t} bin",fnBinsPt,fPtMin,fPtMax,"s");
453 fmPrimePrimePerPtBin->SetXTitle("p_{t} [GeV]");
454 fmPrimePrimePerPtBin->SetYTitle("Counts");
4057ba99 455
456 //fEtaReq1nPrimePOI
457 fEtaReq1nPrimePOI = new TProfile("fEtaReq1nPrimePOI","Re[q_{n}^{'}]",fnBinsEta,fEtaMin,fEtaMax,"s");
458 fEtaReq1nPrimePOI->SetXTitle("#eta");
459 fEtaReq1nPrimePOI->SetYTitle("Re[q_{n}^{'}]");
4057ba99 460
461 //fEtaImq1nPrimePOI
462 fEtaImq1nPrimePOI = new TProfile("fEtaImq1nPrimePOI","Im[q_{n}^{'}]",fnBinsEta,fEtaMin,fEtaMax,"s");
463 fEtaImq1nPrimePOI->SetXTitle("#eta");
464 fEtaImq1nPrimePOI->SetYTitle("Im[q_{n}^{'}]");
4057ba99 465
466 //fEtaReq2nPrimePOI
467 fEtaReq2nPrimePOI = new TProfile("fEtaReq2nPrimePOI","Re[q_{2n}^{'}]",fnBinsEta,fEtaMin,fEtaMax,"s");
468 fEtaReq2nPrimePOI->SetXTitle("#eta");
469 fEtaReq2nPrimePOI->SetYTitle("Re[q_{2n}^{'}]");
4057ba99 470
471 //fEtaImq2nPrimePOI
472 fEtaImq2nPrimePOI = new TProfile("fEtaImq2nPrimePOI","Im[q_{2n}^{'}]",fnBinsEta,fEtaMin,fEtaMax,"s");
473 fEtaImq2nPrimePOI->SetXTitle("#eta");
474 fEtaImq2nPrimePOI->SetYTitle("Im[q_{2n}^{'}]");
4057ba99 475
476 //fmPrimePerEtaBin
477 fmPrimePerEtaBin = new TProfile("fmPrimePerEtaBin","# of particles selected both as RP and POI per #p_{t} bin",fnBinsEta,fEtaMin,fEtaMax,"s");
478 fmPrimePerEtaBin->SetXTitle("#eta");
479 fmPrimePerEtaBin->SetYTitle("Counts");
4057ba99 480
ae733b3b 481 //fEtaReq1nPrimePrimePOI
4057ba99 482 fEtaReq1nPrimePrimePOI = new TProfile("fEtaReq1nPrimePrimePOI","Re[q_{n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
483 fEtaReq1nPrimePrimePOI->SetXTitle("#eta");
484 fEtaReq1nPrimePrimePOI->SetYTitle("Re[q_{n}^{''}]");
4057ba99 485
486 //fEtaImq1nPrimePrimePOI
487 fEtaImq1nPrimePrimePOI = new TProfile("fEtaImq1nPrimePrimePOI","Im[q_{n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
488 fEtaImq1nPrimePrimePOI->SetXTitle("#eta");
489 fEtaImq1nPrimePrimePOI->SetYTitle("Im[q_{n}^{''}]");
4057ba99 490
491 //fEtaReq2nPrimePrimePOI
492 fEtaReq2nPrimePrimePOI = new TProfile("fEtaReq2nPrimePrimePOI","Re[q_{2n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
493 fEtaReq2nPrimePrimePOI->SetXTitle("#eta");
494 fEtaReq2nPrimePrimePOI->SetYTitle("Re[q_{2n}^{''}]");
4057ba99 495
496 //fEtaImq2nPrimePrimePOI
497 fEtaImq2nPrimePrimePOI = new TProfile("fEtaImq2nPrimePrimePOI","Im[q_{2n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
498 fEtaImq2nPrimePrimePOI->SetXTitle("#eta");
499 fEtaImq2nPrimePrimePOI->SetYTitle("Im[q_{2n}^{''}]");
4057ba99 500
501 //fmPrimePrimePerEtaBin
502 fmPrimePrimePerEtaBin = new TProfile("fmPrimePrimePerEtaBin","# of particles selected as POI and NOT as RP per #p_{t} bin",fnBinsEta,fEtaMin,fEtaMax,"s");
503 fmPrimePrimePerEtaBin->SetXTitle("#eta");
504 fmPrimePrimePerEtaBin->SetYTitle("Counts");
4057ba99 505
1dfa3c16 506 //f2PerPtBin1n1nPOI
507 f2PerPtBin1n1nPOI = new TProfile("f2PerPtBin1n1nPOI","<2'>_{n|n}",fnBinsPt,fPtMin,fPtMax,"s");
4057ba99 508 f2PerPtBin1n1nPOI->SetXTitle("#eta");
ae733b3b 509 fDiffFlowList->Add(f2PerPtBin1n1nPOI);
1dfa3c16 510
511 //f2PerPtBin2n2nPOI
512 f2PerPtBin2n2nPOI = new TProfile("f2PerPtBin2n2nPOI","<2'>_{2n|2n}",fnBinsPt,fPtMin,fPtMax,"s");
513 f2PerPtBin2n2nPOI->SetXTitle("p_{t} [GeV]");
ae733b3b 514 fDiffFlowList->Add(f2PerPtBin2n2nPOI);
1dfa3c16 515
516 //f3PerPtBin2n1n1nPOI
517 f3PerPtBin2n1n1nPOI = new TProfile("f3PerPtBin2n1n1nPOI","<3'>_{2n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
518 f3PerPtBin2n1n1nPOI->SetXTitle("p_{t} [GeV]");
ae733b3b 519 fDiffFlowList->Add(f3PerPtBin2n1n1nPOI);
1dfa3c16 520
521 //f3PerPtBin1n1n2nPOI
522 f3PerPtBin1n1n2nPOI = new TProfile("f3PerPtBin1n1n2nPOI","<3'>_{n,n|2n}",fnBinsPt,fPtMin,fPtMax,"s");
523 f3PerPtBin1n1n2nPOI->SetXTitle("p_{t} [GeV]");
ae733b3b 524 fDiffFlowList->Add(f3PerPtBin1n1n2nPOI);
1dfa3c16 525
526 //f4PerPtBin1n1n1n1nPOI
527 f4PerPtBin1n1n1n1nPOI = new TProfile("f4PerPtBin1n1n1n1nPOI","<4'>_{n,n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
528 f4PerPtBin1n1n1n1nPOI->SetXTitle("p_{t} [GeV]");
ae733b3b 529 fDiffFlowList->Add(f4PerPtBin1n1n1n1nPOI);
1dfa3c16 530
1dfa3c16 531 //f2PerEtaBin1n1nPOI
532 f2PerEtaBin1n1nPOI = new TProfile("f2PerEtaBin1n1nPOI","<2'>_{n|n}",fnBinsEta,fEtaMin,fEtaMax,"s");
533 f2PerEtaBin1n1nPOI->SetXTitle("#eta");
ae733b3b 534 fDiffFlowList->Add(f2PerEtaBin1n1nPOI);
1dfa3c16 535
536 //f2PerEtaBin2n2nPOI
537 f2PerEtaBin2n2nPOI = new TProfile("f2PerEtaBin2n2nPOI","<2'>_{2n|2n}",fnBinsEta,fEtaMin,fEtaMax,"s");
538 f2PerEtaBin2n2nPOI->SetXTitle("#eta");
ae733b3b 539 fDiffFlowList->Add(f2PerEtaBin2n2nPOI);
1dfa3c16 540
541 //f3PerEtaBin2n1n1nPOI
542 f3PerEtaBin2n1n1nPOI = new TProfile("f3PerEtaBin2n1n1nPOI","<3'>_{2n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
543 f3PerEtaBin2n1n1nPOI->SetXTitle("#eta");
ae733b3b 544 fDiffFlowList->Add(f3PerEtaBin2n1n1nPOI);
1dfa3c16 545
546 //f3PerEtaBin1n1n2nPOI
547 f3PerEtaBin1n1n2nPOI = new TProfile("f3PerEtaBin1n1n2POI","<3'>_{n,n|2n}",fnBinsEta,fEtaMin,fEtaMax,"s");
548 f3PerEtaBin1n1n2nPOI->SetXTitle("#eta");
ae733b3b 549 fDiffFlowList->Add(f3PerEtaBin1n1n2nPOI);
1dfa3c16 550
551 //f4PerEtaBin1n1n1n1nPOI
552 f4PerEtaBin1n1n1n1nPOI = new TProfile("f4PerEtaBin1n1n1n1nPOI","<4'>_{n,n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
553 f4PerEtaBin1n1n1n1nPOI->SetXTitle("#eta");
ae733b3b 554 fDiffFlowList->Add(f4PerEtaBin1n1n1n1nPOI);
bc92c0cb 555
cb308e83 556 //common control histogram (2nd order)
557 fCommonHists2nd = new AliFlowCommonHist("AliFlowCommonHist2ndOrderQC");
558 fHistList->Add(fCommonHists2nd);
1315fe58 559
cb308e83 560 //common control histogram (4th order)
561 fCommonHists4th = new AliFlowCommonHist("AliFlowCommonHist4thOrderQC");
562 fHistList->Add(fCommonHists4th);
563
564 //common control histogram (6th order)
565 fCommonHists6th = new AliFlowCommonHist("AliFlowCommonHist6thOrderQC");
566 fHistList->Add(fCommonHists6th);
567
568 //common control histogram (8th order)
569 fCommonHists8th = new AliFlowCommonHist("AliFlowCommonHist8thOrderQC");
570 fHistList->Add(fCommonHists8th);
4057ba99 571
8842fb2b 572 //common histograms for final results (2nd order)
1315fe58 573 fCommonHistsResults2nd = new AliFlowCommonHistResults("AliFlowCommonHistResults2ndOrderQC");
574 fHistList->Add(fCommonHistsResults2nd);
575
8842fb2b 576 //common histograms for final results (4th order)
1315fe58 577 fCommonHistsResults4th = new AliFlowCommonHistResults("AliFlowCommonHistResults4thOrderQC");
578 fHistList->Add(fCommonHistsResults4th);
579
8842fb2b 580 //common histograms for final results (6th order)
1315fe58 581 fCommonHistsResults6th = new AliFlowCommonHistResults("AliFlowCommonHistResults6thOrderQC");
582 fHistList->Add(fCommonHistsResults6th);
583
8842fb2b 584 //common histograms for final results (8th order)
1315fe58 585 fCommonHistsResults8th = new AliFlowCommonHistResults("AliFlowCommonHistResults8thOrderQC");
586 fHistList->Add(fCommonHistsResults8th);
1315fe58 587
588 //weighted <2>_{n|n} distribution
52021ae2 589 f2pDistribution = new TH1D("f2pDistribution","<2>_{n|n} distribution",100000,-0.02,0.1);
590 f2pDistribution->SetXTitle("<2>_{n|n}");
591 f2pDistribution->SetYTitle("Counts");
592 fHistList->Add(f2pDistribution);
1315fe58 593
594 //weighted <4>_{n,n|n,n} distribution
52021ae2 595 f4pDistribution = new TH1D("f4pDistribution","<4>_{n,n|n,n} distribution",100000,-0.00025,0.002);
596 f4pDistribution->SetXTitle("<4>_{n,n|n,n}");
597 f4pDistribution->SetYTitle("Counts");
598 fHistList->Add(f4pDistribution);
1315fe58 599
600 //weighted <6>_{n,n,n|n,n,n} distribution
52021ae2 601 f6pDistribution = new TH1D("f6pDistribution","<6>_{n,n,n|n,n,n} distribution",100000,-0.000005,0.000025);
602 f6pDistribution->SetXTitle("<6>_{n,n,n|n,n,n}");
603 f6pDistribution->SetYTitle("Counts");
604 fHistList->Add(f6pDistribution);
bc92c0cb 605
5e838eeb 606 //weighted <8>_{n,n,n,n|n,n,n,n} distribution
607 f8pDistribution = new TH1D("f8pDistribution","<8>_{n,n,n,n|n,n,n,n} distribution",100000,-0.000000001,0.00000001);
608 f8pDistribution->SetXTitle("<8>_{n,n,n,n|n,n,n,n}");
609 f8pDistribution->SetYTitle("Counts");
610 fHistList->Add(f8pDistribution);
ae733b3b 611
612 // add list fWeightsList with weights to the main list
613 fHistList->Add(fWeightsList);
614
615 // add list fDiffFlowList with histograms and profiles needed for differential flow to the main list
616 fHistList->Add(fDiffFlowList);
e085f1a9 617}//end of Init()
bc92c0cb 618
619//================================================================================================================
620
621void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent)
622{
ae733b3b 623 // running over data
624
625 Int_t nPrim = anEvent->NumberOfTracks(); // nPrim = nRP + nPOI + rest
626 Int_t nRP = anEvent->GetEventNSelTracksIntFlow(); // nRP = number of particles used to determine the reaction plane
03a02aca 627
ae733b3b 628 Int_t n = 2; // int flow harmonic (to be improved)
629
630 Double_t dPhi = 0.;
631 Double_t dPt = 0.;
632 Double_t dEta = 0.;
633
634 Int_t nBinsPhi = 0;
bc92c0cb 635
4057ba99 636 //needed for debugging: (to be improved - add explanation here)
637 //Bool_t bNestedLoops=kTRUE;
638 //if(!(bNestedLoops)||(nPrim>0&&nPrim<12))
639 //{
640 //if(nPrim>0&&nPrim<12)
641 //{
bc92c0cb 642
ae733b3b 643
644
645
bc92c0cb 646 //---------------------------------------------------------------------------------------------------------
ae733b3b 647 // weights:
648 Bool_t useWeights = fUsePhiWeights||fUsePtWeights||fUseEtaWeights;
649
650 TH1F *phiWeights = NULL; // histogram with phi weights
651 TH1D *ptWeights = NULL; // histogram with pt weights
652 TH1D *etaWeights = NULL; // histogram with eta weights
653
654 // to be improved: will in general weights be different for Q-vectors evaluated in different harmonics ???
655 Double_t wPhi = 1.; // phi weight
656 Double_t wPt = 1.; // pt weight
657 Double_t wEta = 1.; // eta weight
658
659 Double_t dSumOfWeights = 0.;
660 Double_t dSumOfWeightsToPower2 = 0.; // sum_{i=1}^{n} pow((wPhi*wPt*wEta)_i, 2)
661 Double_t dSumOfWeightsToPower3 = 0.; // sum_{i=1}^{n} pow((wPhi*wPt*wEta)_i, 3)
662 Double_t dSumOfWeightsToPower4 = 0.; // sum_{i=1}^{n} pow((wPhi*wPt*wEta)_i, 4)
663 Double_t dSumOfWeightsToPower5 = 0.; // sum_{i=1}^{n} pow((wPhi*wPt*wEta)_i, 5)
664 Double_t dSumOfWeightsToPower6 = 0.; // sum_{i=1}^{n} pow((wPhi*wPt*wEta)_i, 6)
665 Double_t dSumOfWeightsToPower7 = 0.; // sum_{i=1}^{n} pow((wPhi*wPt*wEta)_i, 7)
666 Double_t dSumOfWeightsToPower8 = 0.; // sum_{i=1}^{n} pow((wPhi*wPt*wEta)_i, 8)
667
668 if(useWeights)
669 {
670 if(!fWeightsList)
671 {
672 cout<<" WARNING: fWeightsList is NULL pointer. "<<endl;
673 exit(0);
674 }
675 if(fUsePhiWeights)
676 {
677 phiWeights = dynamic_cast<TH1F *>(fWeightsList->FindObject("phi_weights"));
678 if(!phiWeights)
679 {
680 cout<<" WARNING: couldn't access the histogram with phi weights. "<<endl;
681 exit(0);
682 }
683 }
684 if(fUsePtWeights)
685 {
686 ptWeights = dynamic_cast<TH1D *>(fWeightsList->FindObject("pt_weights"));
687 if(!ptWeights)
688 {
689 cout<<" WARNING: couldn't access the histogram with pt weights. "<<endl;
690 exit(0);
691 }
692 }
693 if(fUseEtaWeights)
694 {
695 etaWeights = dynamic_cast<TH1D *>(fWeightsList->FindObject("eta_weights"));
696 if(!etaWeights)
697 {
698 cout<<" WARNING: couldn't access the histogram with eta weights. "<<endl;
699 exit(0);
700 }
701 }
702 }
703 //---------------------------------------------------------------------------------------------------------
704
bc92c0cb 705
ae733b3b 706
707
708
709
710 //---------------------------------------------------------------------------------------------------------
711 // non-weighted and weighted Q-vectors of an event built-up from RP particles evaluated in harmonics n, 2n, 3n and 4n:
712 AliFlowVector afvQvector1n, afvQvector2n, afvQvector3n, afvQvector4n;
713 AliFlowVector afvQvector1nWeighted;
714
715 // non-weighted Q-vector in harmonic n:
1dfa3c16 716 afvQvector1n.Set(0.,0.);
717 afvQvector1n.SetMult(0);
ae733b3b 718 afvQvector1n = anEvent->GetQ(1*n);
719
720 // weighted Q-vector in harmonic n:
721 afvQvector1nWeighted = anEvent->GetQ(1*n,fWeightsList,fUsePhiWeights,fUsePtWeights,fUseEtaWeights);
722 dSumOfWeights = afvQvector1nWeighted.GetMult(); // to be improved (the name of this method)
723 dSumOfWeightsToPower2 = afvQvector1nWeighted.GetSumOfWeightsToPower2();
724 dSumOfWeightsToPower3 = afvQvector1nWeighted.GetSumOfWeightsToPower3();
725 dSumOfWeightsToPower4 = afvQvector1nWeighted.GetSumOfWeightsToPower4();
726 dSumOfWeightsToPower5 = afvQvector1nWeighted.GetSumOfWeightsToPower5();
727 dSumOfWeightsToPower6 = afvQvector1nWeighted.GetSumOfWeightsToPower6();
728 dSumOfWeightsToPower7 = afvQvector1nWeighted.GetSumOfWeightsToPower7();
729 dSumOfWeightsToPower8 = afvQvector1nWeighted.GetSumOfWeightsToPower8();
730
731 // non-weighted Q-vector in harmonic 2n:
1dfa3c16 732 afvQvector2n.Set(0.,0.);
733 afvQvector2n.SetMult(0);
ae733b3b 734 afvQvector2n = anEvent->GetQ(2*n); // to be improved: weights
735
736 // non-weighted Q-vector in harmonic 3n:
1dfa3c16 737 afvQvector3n.Set(0.,0.);
738 afvQvector3n.SetMult(0);
ae733b3b 739 afvQvector3n = anEvent->GetQ(3*n); // to be improved: weights
bc92c0cb 740
ae733b3b 741 // non-weighted Q-vector in harmonic 4n:
1dfa3c16 742 afvQvector4n.Set(0.,0.);
743 afvQvector4n.SetMult(0);
ae733b3b 744 afvQvector4n = anEvent->GetQ(4*n); // to be improved: weights
03a02aca 745
e085f1a9 746
747 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
748 // !!!! to be removed !!!!
749 fQvectorForEachEventX->Fill(1.*(++fEventCounter),afvQvector1n.X());
750 fQvectorForEachEventY->Fill(1.*(fEventCounter),afvQvector1n.Y());
751 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
752
753
754
bc92c0cb 755 //---------------------------------------------------------------------------------------------------------
756
4057ba99 757 //multiplicity of RP particles:
ae733b3b 758 Double_t dMult = afvQvector1n.GetMult(); // to be improved (name, this is actually weighted multiplicity)
bc92c0cb 759
ae733b3b 760 fAvMultIntFlowQC->Fill(0.,dMult,1.); // to be removed (this info is also stored in one of control histograms)
bc92c0cb 761
762 //---------------------------------------------------------------------------------------------------------
dee1e0e0 763 //
764 // *******************
765 // **** Q-vectors ****
766 // *******************
767 //
1dfa3c16 768 Double_t reQ2nQ1nstarQ1nstar = pow(afvQvector1n.X(),2.)*afvQvector2n.X()+2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.Y()-pow(afvQvector1n.Y(),2.)*afvQvector2n.X();//Re[Q_{2n} Q_{n}^* Q_{n}^*]
52021ae2 769 //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}^*]
770 Double_t reQ1nQ1nQ2nstar = reQ2nQ1nstarQ1nstar;//Re[Q_{n} Q_{n} Q_{2n}^*] = Re[Q_{2n} Q_{n}^* Q_{n}^*]
1dfa3c16 771 Double_t reQ3nQ1nQ2nstarQ2nstar = (pow(afvQvector2n.X(),2.)-pow(afvQvector2n.Y(),2.))*(afvQvector3n.X()*afvQvector1n.X()-afvQvector3n.Y()*afvQvector1n.Y())+2.*afvQvector2n.X()*afvQvector2n.Y()*(afvQvector3n.X()*afvQvector1n.Y()+afvQvector3n.Y()*afvQvector1n.X());
52021ae2 772 //Double_t imQ3nQ1nQ2nstarQ2nstar = calculate and implement this (deleteMe)
773 Double_t reQ2nQ2nQ3nstarQ1nstar = reQ3nQ1nQ2nstarQ2nstar;
1dfa3c16 774 Double_t reQ4nQ2nstarQ2nstar = pow(afvQvector2n.X(),2.)*afvQvector4n.X()+2.*afvQvector2n.X()*afvQvector2n.Y()*afvQvector4n.Y()-pow(afvQvector2n.Y(),2.)*afvQvector4n.X();//Re[Q_{4n} Q_{2n}^* Q_{2n}^*]
52021ae2 775 //Double_t imQ4nQ2nstarQ2nstar = calculate and implement this (deleteMe)
776 Double_t reQ2nQ2nQ4nstar = reQ4nQ2nstarQ2nstar;
1dfa3c16 777 Double_t reQ4nQ3nstarQ1nstar = afvQvector4n.X()*(afvQvector3n.X()*afvQvector1n.X()-afvQvector3n.Y()*afvQvector1n.Y())+afvQvector4n.Y()*(afvQvector3n.X()*afvQvector1n.Y()+afvQvector3n.Y()*afvQvector1n.X());//Re[Q_{4n} Q_{3n}^* Q_{n}^*]
52021ae2 778 Double_t reQ3nQ1nQ4nstar = reQ4nQ3nstarQ1nstar;//Re[Q_{3n} Q_{n} Q_{4n}^*] = Re[Q_{4n} Q_{3n}^* Q_{n}^*]
779 //Double_t imQ4nQ3nstarQ1nstar = calculate and implement this (deleteMe)
1dfa3c16 780 Double_t reQ3nQ2nstarQ1nstar = afvQvector3n.X()*afvQvector2n.X()*afvQvector1n.X()-afvQvector3n.X()*afvQvector2n.Y()*afvQvector1n.Y()+afvQvector3n.Y()*afvQvector2n.X()*afvQvector1n.Y()+afvQvector3n.Y()*afvQvector2n.Y()*afvQvector1n.X();//Re[Q_{3n} Q_{2n}^* Q_{n}^*]
52021ae2 781 Double_t reQ2nQ1nQ3nstar = reQ3nQ2nstarQ1nstar;//Re[Q_{2n} Q_{n} Q_{3n}^*] = Re[Q_{3n} Q_{2n}^* Q_{n}^*]
782 //Double_t imQ3nQ2nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 783 Double_t reQ3nQ1nstarQ1nstarQ1nstar = afvQvector3n.X()*pow(afvQvector1n.X(),3)-3.*afvQvector1n.X()*afvQvector3n.X()*pow(afvQvector1n.Y(),2)+3.*afvQvector1n.Y()*afvQvector3n.Y()*pow(afvQvector1n.X(),2)-afvQvector3n.Y()*pow(afvQvector1n.Y(),3);//Re[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*]
52021ae2 784 //Double_t imQ3nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 785 Double_t xQ2nQ1nQ2nstarQ1nstar = pow(afvQvector2n.Mod()*afvQvector1n.Mod(),2);//|Q_{2n}|^2 |Q_{n}|^2
786 Double_t reQ4nQ2nstarQ1nstarQ1nstar = (afvQvector4n.X()*afvQvector2n.X()+afvQvector4n.Y()*afvQvector2n.Y())*(pow(afvQvector1n.X(),2)-pow(afvQvector1n.Y(),2))+2.*afvQvector1n.X()*afvQvector1n.Y()*(afvQvector4n.Y()*afvQvector2n.X()-afvQvector4n.X()*afvQvector2n.Y());//Re[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*]
52021ae2 787 //Double_t imQ4nQ2nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 788 Double_t reQ2nQ1nQ1nstarQ1nstarQ1nstar = (afvQvector2n.X()*afvQvector1n.X()-afvQvector2n.Y()*afvQvector1n.Y())*(pow(afvQvector1n.X(),3)-3.*afvQvector1n.X()*pow(afvQvector1n.Y(),2))+(afvQvector2n.X()*afvQvector1n.Y()+afvQvector1n.X()*afvQvector2n.Y())*(3.*afvQvector1n.Y()*pow(afvQvector1n.X(),2)-pow(afvQvector1n.Y(),3));//Re[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*]
52021ae2 789 //Double_t imQ2nQ1nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 790 Double_t reQ2nQ2nQ2nstarQ1nstarQ1nstar = pow(afvQvector2n.Mod(),2.)*(afvQvector2n.X()*(pow(afvQvector1n.X(),2.)-pow(afvQvector1n.Y(),2.))+2.*afvQvector2n.Y()*afvQvector1n.X()*afvQvector1n.Y());//Re[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*]
52021ae2 791 //Double_t imQ2nQ2nQ2nstarQ1nstarQ1nstar = pow(Qvector2n.Mod(),2.)*(Qvector2n.Y()*(pow(Qvector1n.X(),2.)-pow(Qvector1n.Y(),2.))-2.*Qvector2n.X()*Qvector1n.X()*Qvector1n.Y());//Im[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*]
1dfa3c16 792 Double_t reQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(afvQvector1n.X(),4.)*afvQvector4n.X()-6.*pow(afvQvector1n.X(),2.)*afvQvector4n.X()*pow(afvQvector1n.Y(),2.)+pow(afvQvector1n.Y(),4.)*afvQvector4n.X()+4.*pow(afvQvector1n.X(),3.)*afvQvector1n.Y()*afvQvector4n.Y()-4.*pow(afvQvector1n.Y(),3.)*afvQvector1n.X()*afvQvector4n.Y();//Re[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
dee1e0e0 793 //Double_t imQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(Qvector1n.X(),4.)*Qvector4n.Y()-6.*pow(Qvector1n.X(),2.)*Qvector4n.Y()*pow(Qvector1n.Y(),2.)+pow(Qvector1n.Y(),4.)*Qvector4n.Y()+4.*pow(Qvector1n.Y(),3.)*Qvector1n.X()*Qvector4n.X()-4.*pow(Qvector1n.X(),3.)*Qvector1n.Y()*Qvector4n.X();//Im[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
1dfa3c16 794 Double_t reQ3nQ1nQ2nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),2.)*(afvQvector1n.X()*afvQvector2n.X()*afvQvector3n.X()-afvQvector3n.X()*afvQvector1n.Y()*afvQvector2n.Y()+afvQvector2n.X()*afvQvector1n.Y()*afvQvector3n.Y()+afvQvector1n.X()*afvQvector2n.Y()*afvQvector3n.Y());//Re[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*]
795 //Double_t imQ3nQ1nQ2nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),2.)*(-afvQvector2n.X()*afvQvector3n.X()*afvQvector1n.Y()-afvQvector1n.X()*afvQvector3n.X()*afvQvector2n.Y()+afvQvector1n.X()*afvQvector2n.X()*afvQvector3n.Y()-afvQvector1n.Y()*afvQvector2n.Y()*afvQvector3n.Y());//Im[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*]
796 Double_t reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(afvQvector1n.X(),2.)*afvQvector2n.X()-2.*afvQvector1n.X()*afvQvector2n.X()*afvQvector1n.Y()-afvQvector2n.X()*pow(afvQvector1n.Y(),2.)+afvQvector2n.Y()*pow(afvQvector1n.X(),2.)+2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.Y()-pow(afvQvector1n.Y(),2.)*afvQvector2n.Y())*(pow(afvQvector1n.X(),2.)*afvQvector2n.X()+2.*afvQvector1n.X()*afvQvector2n.X()*afvQvector1n.Y()-afvQvector2n.X()*pow(afvQvector1n.Y(),2.)-afvQvector2n.Y()*pow(afvQvector1n.X(),2.)+2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.Y()+pow(afvQvector1n.Y(),2.)*afvQvector2n.Y());//Re[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
797 //Double_t imQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = 2.*(pow(afvQvector1n.X(),2.)*afvQvector2n.X()-afvQvector2n.X()*pow(afvQvector1n.Y(),2.)+2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.Y())*(pow(afvQvector1n.X(),2.)*afvQvector2n.Y()-2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.X()-pow(afvQvector1n.Y(),2.)*afvQvector2n.Y());//Im[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
798 Double_t reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),2.)*(pow(afvQvector1n.X(),3.)*afvQvector3n.X()-3.*afvQvector1n.X()*afvQvector3n.X()*pow(afvQvector1n.Y(),2.)+3.*pow(afvQvector1n.X(),2.)*afvQvector1n.Y()*afvQvector3n.Y()-pow(afvQvector1n.Y(),3.)*afvQvector3n.Y());//Re[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
799 //Double_t imQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),2.)*(pow(afvQvector1n.Y(),3.)*afvQvector3n.X()-3.*afvQvector1n.Y()*afvQvector3n.X()*pow(afvQvector1n.X(),2.)-3.*pow(afvQvector1n.Y(),2.)*afvQvector1n.X()*afvQvector3n.Y()+pow(afvQvector1n.X(),3.)*afvQvector3n.Y());//Im[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
800 Double_t xQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar = pow(afvQvector2n.Mod(),2.)*pow(afvQvector1n.Mod(),4.);//|Q_{2n}|^2 |Q_{n}|^4
801 Double_t reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),4.)*(pow(afvQvector1n.X(),2.)*afvQvector2n.X()-afvQvector2n.X()*pow(afvQvector1n.Y(),2.)+2.*afvQvector1n.X()*afvQvector1n.Y()*afvQvector2n.Y());//Re[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
802 //Double_t imQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow(afvQvector1n.Mod(),4.)*(pow(afvQvector1n.X(),2.)*afvQvector2n.Y()-afvQvector2n.Y()*pow(afvQvector1n.Y(),2.)-2.*afvQvector1n.X()*afvQvector2n.X()*afvQvector1n.Y());//Re[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]
bc92c0cb 803 //---------------------------------------------------------------------------------------------------------
804
805 //---------------------------------------------------------------------------------------------------------
dee1e0e0 806 //
807 // **************************************
808 // **** multi-particle correlations: ****
809 // **************************************
810 //
811 // Remark 1: multi-particle correlations calculated with Q-vectors are stored in fQCorrelations.
812 // Remark 2: binning of fQCorrelations is organized as follows:
813 //
814 // 1st bin: <2>_{n|n} = two1n1n
815 // 2nd bin: <2>_{2n|2n} = two2n2n
816 // 3rd bin: <2>_{3n|3n} = two3n3n
817 // 4th bin: <2>_{4n|4n} = two4n4n
818 // 5th bin: -- EMPTY --
819 // 6th bin: <3>_{2n|n,n} = three2n1n1n
820 // 7th bin: <3>_{3n|2n,n} = three3n2n1n
821 // 8th bin: <3>_{4n|2n,2n} = three4n2n2n
822 // 9th bin: <3>_{4n|3n,n} = three4n3n1n
823 //10th bin: -- EMPTY --
824 //11th bin: <4>_{n,n|n,n} = four1n1n1n1n
825 //12th bin: <4>_{2n,n|2n,n} = four2n1n2n1n
826 //13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n
827 //14th bin: <4>_{3n|n,n,n} = four3n1n1n1n
828 //15th bin: <4>_{3n,n|3n,n} = four3n1n3n1n
829 //16th bin: <4>_{3n,n|2n,2n} = four3n1n2n2n
830 //17th bin: <4>_{4n|2n,n,n} = four4n2n1n1n
831 //18th bin: -- EMPTY --
832 //19th bin: <5>_{2n|n,n,n,n} = five2n1n1n1n1n
833 //20th bin: <5>_{2n,2n|2n,n,n} = five2n2n2n1n1n
834 //21st bin: <5>_{3n,n|2n,n,n} = five3n1n2n1n1n
835 //22nd bin: <5>_{4n|n,n,n,n} = five4n1n1n1n1n
836 //23rd bin: -- EMPTY --
837 //24th bin: <6>_{n,n,n|n,n,n} = six1n1n1n1n1n1n
838 //25th bin: <6>_{2n,n,n|2n,n,n} = six2n1n1n2n1n1n
839 //26th bin: <6>_{2n,2n|n,n,n,n} = six2n2n1n1n1n1n
840 //27th bin: <6>_{3n,n|n,n,n,n} = six3n1n1n1n1n1n
841 //28th bin: -- EMPTY --
842 //29th bin: <7>_{2n,n,n|n,n,n,n} = seven2n1n1n1n1n1n1n
843 //30th bin: -- EMPTY --
844 //31st bin: <8>_{n,n,n,n|n,n,n,n} = eight1n1n1n1n1n1n1n1n
845
1315fe58 846
8842fb2b 847 // binning of fQProduct (all correlations are evaluated in harmonic n):
848 // 1st bin: <2>*<4>
849 // 2nd bin: <2>*<6>
850 // 3rd bin: <2>*<8>
851 // 4th bin: <4>*<6>
852 // 5th bin: <4>*<8>
853 // 6th bin: <6>*<8>
854
ae733b3b 855 // 2-particle
856 Double_t two1n1n = 0., two2n2n = 0., two3n3n = 0., two4n4n = 0.;
857
858 if(nRP>1)
bc92c0cb 859 {
ae733b3b 860 //fill the common control histogram (2nd order):
cb308e83 861 fCommonHists2nd->FillControlHistograms(anEvent);
ae733b3b 862
863 if(pow(dSumOfWeights,2.)-dSumOfWeightsToPower2 != 0)
864 {
865 two1n1n = (pow(afvQvector1nWeighted.Mod(),2.)-dSumOfWeightsToPower2)/(pow(dSumOfWeights,2.)-dSumOfWeightsToPower2); // <2>_{n|n} = <cos(n*(phi1-phi2))>
866 }
cb308e83 867
ae733b3b 868 // to be improved: Eqs. with weights needed for two2n2n, two3n3n and two4n4n
869 two2n2n = (pow(afvQvector2n.Mod(),2.)-dMult)/(dMult*(dMult-1.)); // <2>_{2n|2n} = <cos(2n*(phi1-phi2))>
870 two3n3n = (pow(afvQvector3n.Mod(),2.)-dMult)/(dMult*(dMult-1.)); // <2>_{3n|3n} = <cos(3n*(phi1-phi2))>
871 two4n4n = (pow(afvQvector4n.Mod(),2.)-dMult)/(dMult*(dMult-1.)); // <2>_{4n|4n} = <cos(4n*(phi1-phi2))>
1315fe58 872
ae733b3b 873 fQCorrelations->Fill(0.,two1n1n,pow(dSumOfWeights,2.)-dSumOfWeightsToPower2); // OK
874 fQCorrelations->Fill(1.,two2n2n,dMult*(dMult-1.)); // to be improved
875 fQCorrelations->Fill(2.,two3n3n,dMult*(dMult-1.)); // to be improved
876 fQCorrelations->Fill(3.,two4n4n,dMult*(dMult-1.)); // to be improved
1315fe58 877
ae733b3b 878 f2pDistribution->Fill(two1n1n,pow(dSumOfWeights,2.)-dSumOfWeightsToPower2); // OK
bc92c0cb 879 }
880
881 //3-particle
52021ae2 882 Double_t three2n1n1n=0., three3n2n1n=0., three4n2n2n=0., three4n3n1n=0.;
1dfa3c16 883 if(dMult>2)
bc92c0cb 884 {
1dfa3c16 885 three2n1n1n = (reQ2nQ1nstarQ1nstar-2.*pow(afvQvector1n.Mod(),2.)-pow(afvQvector2n.Mod(),2.)+2.*dMult)/(dMult*(dMult-1.)*(dMult-2.)); //Re[<3>_{2n|n,n}] = Re[<3>_{n,n|2n}] = <cos(n*(2.*phi1-phi2-phi3))>
886 three3n2n1n = (reQ3nQ2nstarQ1nstar-pow(afvQvector3n.Mod(),2.)-pow(afvQvector2n.Mod(),2.)-pow(afvQvector1n.Mod(),2.)+2.*dMult)/(dMult*(dMult-1.)*(dMult-2.)); //Re[<3>_{3n|2n,n}] = Re[<3>_{2n,n|3n}] = <cos(n*(3.*phi1-2.*phi2-phi3))>
887 three4n2n2n = (reQ4nQ2nstarQ2nstar-2.*pow(afvQvector2n.Mod(),2.)-pow(afvQvector4n.Mod(),2.)+2.*dMult)/(dMult*(dMult-1.)*(dMult-2.)); //Re[<3>_{4n|2n,2n}] = Re[<3>_{2n,2n|4n}] = <cos(n*(4.*phi1-2.*phi2-2.*phi3))>
888 three4n3n1n = (reQ4nQ3nstarQ1nstar-pow(afvQvector4n.Mod(),2.)-pow(afvQvector3n.Mod(),2.)-pow(afvQvector1n.Mod(),2.)+2.*dMult)/(dMult*(dMult-1.)*(dMult-2.)); //Re[<3>_{4n|3n,n}] = Re[<3>_{3n,n|4n}] = <cos(n*(4.*phi1-3.*phi2-phi3))>
889
890 fQCorrelations->Fill(5.,three2n1n1n,dMult*(dMult-1.)*(dMult-2.));
891 fQCorrelations->Fill(6.,three3n2n1n,dMult*(dMult-1.)*(dMult-2.));
892 fQCorrelations->Fill(7.,three4n2n2n,dMult*(dMult-1.)*(dMult-2.));
893 fQCorrelations->Fill(8.,three4n3n1n,dMult*(dMult-1.)*(dMult-2.));
bc92c0cb 894 }
895
896 //4-particle
52021ae2 897 Double_t four1n1n1n1n=0., four2n2n2n2n=0., four2n1n2n1n=0., four3n1n1n1n=0., four4n2n1n1n=0., four3n1n2n2n=0., four3n1n3n1n=0.;
1dfa3c16 898 if(dMult>3)
bc92c0cb 899 {
cb308e83 900 //fill the common control histogram (4th order):
901 fCommonHists4th->FillControlHistograms(anEvent);
902
1dfa3c16 903 four1n1n1n1n = (2.*dMult*(dMult-3.)+pow(afvQvector1n.Mod(),4.)-4.*(dMult-2.)*pow(afvQvector1n.Mod(),2.)-2.*reQ2nQ1nstarQ1nstar+pow(afvQvector2n.Mod(),2.))/(dMult*(dMult-1)*(dMult-2.)*(dMult-3.));//<4>_{n,n|n,n}
904 four2n2n2n2n = (2.*dMult*(dMult-3.)+pow(afvQvector2n.Mod(),4.)-4.*(dMult-2.)*pow(afvQvector2n.Mod(),2.)-2.*reQ4nQ2nstarQ2nstar+pow(afvQvector4n.Mod(),2.))/(dMult*(dMult-1)*(dMult-2.)*(dMult-3.));//<4>_{2n,2n|2n,2n}
905 four2n1n2n1n = (xQ2nQ1nQ2nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar-2.*reQ2nQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))-((dMult-5.)*pow(afvQvector1n.Mod(),2.)+(dMult-4.)*pow(afvQvector2n.Mod(),2.)-pow(afvQvector3n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))+(dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4>_{2n,n|2n,n}]
906 four3n1n1n1n = (reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar-3.*reQ2nQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))+(2.*pow(afvQvector3n.Mod(),2.)+3.*pow(afvQvector2n.Mod(),2.)+6.*pow(afvQvector1n.Mod(),2.)-6.*dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4>_{3n|n,n,n}]
907 four4n2n1n1n = (reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar-2.*reQ3nQ2nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))-(reQ2nQ1nstarQ1nstar-2.*pow(afvQvector4n.Mod(),2.)-2.*pow(afvQvector3n.Mod(),2.)-3.*pow(afvQvector2n.Mod(),2.)-4.*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))-(6.)/((dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4>_{4n|2n,n,n}]
908 four3n1n2n2n = (reQ3nQ1nQ2nstarQ2nstar-reQ4nQ2nstarQ2nstar-reQ3nQ1nQ4nstar-2.*reQ3nQ2nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))-(2.*reQ1nQ1nQ2nstar-pow(afvQvector4n.Mod(),2.)-2.*pow(afvQvector3n.Mod(),2.)-4.*pow(afvQvector2n.Mod(),2.)-4.*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))-(6.)/((dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4>_{3n,n|2n,2n}]
909 four3n1n3n1n = (pow(afvQvector3n.Mod(),2.)*pow(afvQvector1n.Mod(),2.)-2.*reQ4nQ3nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))+(pow(afvQvector4n.Mod(),2.)-(dMult-4.)*pow(afvQvector3n.Mod(),2.)+pow(afvQvector2n.Mod(),2.)-(dMult-4.)*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))+(dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.));//<4>_{3n,n|3n,n}
1315fe58 910 //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}
911
1dfa3c16 912 fQCorrelations->Fill(10.,four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
913 fQCorrelations->Fill(11.,four2n1n2n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
914 fQCorrelations->Fill(12.,four2n2n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
915 fQCorrelations->Fill(13.,four3n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
916 fQCorrelations->Fill(14.,four3n1n3n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
917 fQCorrelations->Fill(15.,four3n1n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
918 fQCorrelations->Fill(16.,four4n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
dee1e0e0 919
1dfa3c16 920 f4pDistribution->Fill(four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
bc92c0cb 921
1dfa3c16 922 fQProduct->Fill(0.,two1n1n*four1n1n1n1n,dMult*(dMult-1.)*dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
bc92c0cb 923 }
924
925 //5-particle
52021ae2 926 Double_t five2n1n1n1n1n=0., five2n2n2n1n1n=0., five3n1n2n1n1n=0., five4n1n1n1n1n=0.;
1dfa3c16 927 if(dMult>4)
1315fe58 928 {
1dfa3c16 929 five2n1n1n1n1n = (reQ2nQ1nQ1nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar+6.*reQ3nQ2nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(reQ2nQ1nQ3nstar+3.*(dMult-6.)*reQ2nQ1nstarQ1nstar+3.*reQ1nQ1nQ2nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(2.*pow(afvQvector3n.Mod(),2.)+3.*pow(afvQvector2n.Mod()*afvQvector1n.Mod(),2.)-3.*(dMult-4.)*pow(afvQvector2n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-3.*(pow(afvQvector1n.Mod(),4.)-2.*(2*dMult-5.)*pow(afvQvector1n.Mod(),2.)+2.*dMult*(dMult-4.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));//Re[<5>_{2n,n|n,n,n}]
1315fe58 930
1dfa3c16 931 five2n2n2n1n1n = (reQ2nQ2nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ2nQ2nQ3nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))+2.*(reQ4nQ2nstarQ2nstar+4.*reQ3nQ2nstarQ1nstar+reQ3nQ1nQ4nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))+(reQ2nQ2nQ4nstar-2.*(dMult-5.)*reQ2nQ1nstarQ1nstar+2.*reQ1nQ1nQ2nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(2.*pow(afvQvector4n.Mod(),2.)+4.*pow(afvQvector3n.Mod(),2.)+1.*pow(afvQvector2n.Mod(),4.)-2.*(3.*dMult-10.)*pow(afvQvector2n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(4.*pow(afvQvector1n.Mod(),2.)*pow(afvQvector2n.Mod(),2.)-4.*(dMult-5.)*pow(afvQvector1n.Mod(),2.)+4.*dMult*(dMult-6.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));//Re[<5>_{2n,2n|2n,n,n}]
1315fe58 932
dee1e0e0 933 //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 934
1dfa3c16 935 five4n1n1n1n1n = (reQ4nQ1nstarQ1nstarQ1nstarQ1nstar-6.*reQ4nQ2nstarQ1nstarQ1nstar-4.*reQ3nQ1nstarQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))+(8.*reQ4nQ3nstarQ1nstar+3.*reQ4nQ2nstarQ2nstar+12.*reQ3nQ2nstarQ1nstar+12.*reQ2nQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(6.*pow(afvQvector4n.Mod(),2.)+8.*pow(afvQvector3n.Mod(),2.)+12.*pow(afvQvector2n.Mod(),2.)+24.*pow(afvQvector1n.Mod(),2.)-24.*dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));//Re[<5>_{4n|n,n,n,n}]
1315fe58 936
dee1e0e0 937 //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!
938
1dfa3c16 939 five3n1n2n1n1n = (reQ3nQ1nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(reQ3nQ1nQ2nstarQ2nstar-3.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-((2.*dMult-13.)*reQ3nQ2nstarQ1nstar-reQ3nQ1nQ4nstar-9.*reQ2nQ1nstarQ1nstar)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-(2.*reQ1nQ1nQ2nstar+2.*pow(afvQvector4n.Mod(),2.)-2.*(dMult-5.)*pow(afvQvector3n.Mod(),2.)+2.*pow(afvQvector3n.Mod(),2.)*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))+(2.*(dMult-6.)*pow(afvQvector2n.Mod(),2.)-2.*pow(afvQvector2n.Mod(),2.)*pow(afvQvector1n.Mod(),2.)-pow(afvQvector1n.Mod(),4.)+2.*(3.*dMult-11.)*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))-4.*(dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));//Re[<5>_{3n,n|2n,n,n}]
dee1e0e0 940
1dfa3c16 941 //five3n1n2n1n1n = reQ3nQ1nQ2nstarQ1nstarQ1nstar/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) - (four4n2n1n1n+four1n1n1n1n+four3n1n1n1n+2.*four2n1n2n1n+2.*three3n2n1n+2.*four3n1n3n1n+four3n1n2n2n)/(dMult-4.) - (2.*three4n3n1n+three4n2n2n+6.*three3n2n1n+three4n3n1n+2.*three3n2n1n+3.*three2n1n1n+2.*three2n1n1n+4.*two1n1n+2.*two2n2n+2.*two3n3n)/((dMult-3.)*(dMult-4.)) - (5.*two1n1n + 4.*two2n2n + 3.*two3n3n + 1.*two4n4n + 2.)/((dMult-2.)*(dMult-3.)*(dMult-4.)) - 1./((dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) ;//Re[<5>_{3n,n|2n,n,n}] //OK!
1315fe58 942
1dfa3c16 943 //five3n1n2n1n1n = reQ3nQ1nQ2nstarQ1nstarQ1nstar/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) - (four4n2n1n1n+four1n1n1n1n+four3n1n1n1n+2.*four2n1n2n1n+2.*four3n1n3n1n+four3n1n2n2n)/(dMult-4.) - (2.*three4n3n1n+three4n2n2n+2.*dMult*three3n2n1n+three4n3n1n+2.*three3n2n1n+3.*three2n1n1n+2.*three2n1n1n)/((dMult-3.)*(dMult-4.)) - ((4.*dMult-3.)*two1n1n + 2.*dMult*two2n2n + (2.*dMult-1.)*two3n3n + two4n4n)/((dMult-2.)*(dMult-3.)*(dMult-4.)) - (2.*dMult-1.)/((dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) ;//Re[<5>_{3n,n|2n,n,n}] //OK!
dee1e0e0 944
1dfa3c16 945 fQCorrelations->Fill(18.,five2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
946 fQCorrelations->Fill(19.,five2n2n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
947 fQCorrelations->Fill(20.,five3n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
948 fQCorrelations->Fill(21.,five4n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
1315fe58 949 }
bc92c0cb 950
ae733b3b 951 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
952 // !!!! to be removed: temporary fix !!!!
307ed368 953 if(dMult>1)
954 {
955 two1n1n = (pow(afvQvector1n.Mod(),2.)-dMult)/(dMult*(dMult-1.));
956 }
ae733b3b 957 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
958
bc92c0cb 959 //6-particle
dee1e0e0 960 Double_t six1n1n1n1n1n1n=0., six2n2n1n1n1n1n=0., six3n1n1n1n1n1n=0., six2n1n1n2n1n1n=0.;
1dfa3c16 961 if(dMult>5)
bc92c0cb 962 {
cb308e83 963 //fill the common control histogram (6th order):
964 fCommonHists6th->FillControlHistograms(anEvent);
965
1dfa3c16 966 six1n1n1n1n1n1n = (pow(afvQvector1n.Mod(),6.)+9.*xQ2nQ1nQ2nstarQ1nstar-6.*reQ2nQ1nQ1nstarQ1nstarQ1nstar)/(dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5))+4.*(reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar)/(dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5))+2.*(9.*(dMult-4.)*reQ2nQ1nstarQ1nstar+2.*pow(afvQvector3n.Mod(),2.))/(dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5))-9.*(pow(afvQvector1n.Mod(),4.)+pow(afvQvector2n.Mod(),2.))/(dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-5))+(18.*pow(afvQvector1n.Mod(),2.))/(dMult*(dMult-1)*(dMult-3)*(dMult-4))-(6.)/((dMult-1)*(dMult-2)*(dMult-3));//<6>_{n,n,n|n,n,n}
1315fe58 967
1dfa3c16 968 six2n1n1n2n1n1n = (xQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(2.*five2n2n2n1n1n+4.*five2n1n1n1n1n+4.*five3n1n2n1n1n+4.*four2n1n2n1n+1.*four1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four1n1n1n1n+4.*two1n1n+2.*three2n1n1n+2.*three2n1n1n+4.*four3n1n1n1n+8.*three2n1n1n+2.*four4n2n1n1n+4.*four2n1n2n1n+2.*two2n2n+8.*four2n1n2n1n+4.*four3n1n3n1n+8.*three3n2n1n+4.*four3n1n2n2n+4.*four1n1n1n1n+4.*four2n1n2n1n+1.*four2n2n2n2n)-dMult*(dMult-1.)*(dMult-2.)*(2.*three2n1n1n+8.*two1n1n+4.*two1n1n+2.+4.*two1n1n+4.*three2n1n1n+2.*two2n2n+4.*three2n1n1n+8.*three3n2n1n+8.*two2n2n+4.*three4n3n1n+4.*two3n3n+4.*three3n2n1n+4.*two1n1n+8.*three2n1n1n+4.*two1n1n+4.*three3n2n1n+4.*three2n1n1n+2.*two2n2n+4.*three3n2n1n+2.*three4n2n2n)-dMult*(dMult-1.)*(4.*two1n1n+4.+4.*two1n1n+2.*two2n2n+1.+4.*two1n1n+4.*two2n2n+4.*two3n3n+ 1.+2.*two2n2n+1.*two4n4n)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));//<6>_{2n,n,n|2n,n,n}
dee1e0e0 969
1dfa3c16 970 six2n2n1n1n1n1n = (reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(five4n1n1n1n1n+8.*five2n1n1n1n1n+6.*five2n2n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+12.*three2n1n1n+12.*four1n1n1n1n+24.*four2n1n2n1n+4.*four3n1n2n2n+3.*four2n2n2n2n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n+4.*three4n3n1n+3.*three4n2n2n+8.*three2n1n1n+24.*two1n1n+12.*two2n2n+12.*three2n1n1n+8.*three3n2n1n+1.*three4n2n2n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+2.*two2n2n+8.*two1n1n+6.)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));//<6>_{2n,2n,n|n,n,n}
dee1e0e0 971
1dfa3c16 972 six3n1n1n1n1n1n = (reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(five4n1n1n1n1n+4.*five2n1n1n1n1n+6.*five3n1n2n1n1n+4.*four3n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+6.*four1n1n1n1n+12.*three2n1n1n+12.*four2n1n2n1n+6.*four3n1n1n1n+12.*three3n2n1n+4.*four3n1n3n1n+3.*four3n1n2n2n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n+4.*three4n3n1n+3.*three4n2n2n+4.*two1n1n+12.*two1n1n+6.*three2n1n1n+12.*three2n1n1n+4.*three3n2n1n+12.*two2n2n+4.*three3n2n1n+4.*two3n3n+1.*three4n3n1n+6.*three3n2n1n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+1.*two1n1n+4.+6.*two1n1n+4.*two2n2n+1.*two3n3n)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));//<6>_{3n,n|n,n,n,n}
dee1e0e0 973
1dfa3c16 974 fQCorrelations->Fill(23.,six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
975 fQCorrelations->Fill(24.,six2n1n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
976 fQCorrelations->Fill(25.,six2n2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
977 fQCorrelations->Fill(26.,six3n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
dee1e0e0 978
1dfa3c16 979 f6pDistribution->Fill(six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
bc92c0cb 980
1dfa3c16 981 fQProduct->Fill(1.,two1n1n*six1n1n1n1n1n1n,dMult*(dMult-1.)*dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
982 fQProduct->Fill(3.,four1n1n1n1n*six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
bc92c0cb 983 }
dee1e0e0 984
985 //7-particle
986 Double_t seven2n1n1n1n1n1n1n=0.;
1dfa3c16 987 if(dMult>6)
dee1e0e0 988 {
1dfa3c16 989 seven2n1n1n1n1n1n1n = (reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(2.*six3n1n1n1n1n1n+4.*six1n1n1n1n1n1n+1.*six2n2n1n1n1n1n+6.*six2n1n1n2n1n1n+8.*five2n1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(1.*five4n1n1n1n1n +8.*five2n1n1n1n1n+8.*four3n1n1n1n+12.*five3n1n2n1n1n+4.*five2n1n1n1n1n+3.*five2n2n2n1n1n+6.*five2n2n2n1n1n+6.*four1n1n1n1n+24.*four1n1n1n1n+12.*five2n1n1n1n1n+12.*five2n1n1n1n1n+12.*three2n1n1n+24.*four2n1n2n1n+4.*five3n1n2n1n1n+4.*five2n1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+12.*four1n1n1n1n+24.*three2n1n1n+24.*four2n1n2n1n+12.*four3n1n1n1n+24.*three3n2n1n+8.*four3n1n3n1n+6.*four3n1n2n2n+6.*three2n1n1n+12.*four1n1n1n1n+12.*four2n1n2n1n+6.*three2n1n1n+12.*four2n1n2n1n+4.*four3n1n2n2n+3.*four2n2n2n2n+4.*four1n1n1n1n+6.*three2n1n1n+24.*two1n1n+24.*four1n1n1n1n+4.*four3n1n1n1n+24.*two1n1n+24.*three2n1n1n+12.*two2n2n+24.*three2n1n1n+12.*four2n1n2n1n+8.*three3n2n1n+8.*four2n1n2n1n+1.*four4n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+1.*three2n1n1n+8.*two1n1n+12.*three3n2n1n+24.*two1n1n+12.*three2n1n1n+4.*three2n1n1n+8.*two1n1n+4.*three4n3n1n+24.*three2n1n1n+8.*three3n2n1n+12.*two1n1n+12.*two1n1n+3.*three4n2n2n+24.*two2n2n+6.*two2n2n+12.+12.*three3n2n1n+8.*two3n3n+12.*three2n1n1n+24.*two1n1n+4.*three3n2n1n+8.*three3n2n1n+2.*three4n3n1n+12.*two1n1n+8.*three2n1n1n+4.*three2n1n1n+2.*three3n2n1n+6.*two2n2n+8.*two2n2n+1.*three4n2n2n+4.*three3n2n1n+6.*three2n1n1n)-dMult*(dMult-1.)*(4.*two1n1n+2.*two1n1n+6.*two2n2n+8.+1.*two2n2n+4.*two3n3n+12.*two1n1n+4.*two1n1n+1.*two4n4n+8.*two2n2n+6.+2.*two3n3n+4.*two1n1n+1.*two2n2n)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.));
dee1e0e0 990
1dfa3c16 991 fQCorrelations->Fill(28.,seven2n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.));
dee1e0e0 992 }
993
994 //8-particle
995 Double_t eight1n1n1n1n1n1n1n1n=0.;
1dfa3c16 996 if(dMult>7)
dee1e0e0 997 {
cb308e83 998 //fill the common control histogram (8th order):
999 fCommonHists8th->FillControlHistograms(anEvent);
1000
1dfa3c16 1001 eight1n1n1n1n1n1n1n1n = (pow(afvQvector1n.Mod(),8)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(12.*seven2n1n1n1n1n1n1n+16.*six1n1n1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(8.*six3n1n1n1n1n1n+48.*six1n1n1n1n1n1n+6.*six2n2n1n1n1n1n+96.*five2n1n1n1n1n+72.*four1n1n1n1n+36.*six2n1n1n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(2.*five4n1n1n1n1n+32.*five2n1n1n1n1n+36.*four1n1n1n1n+32.*four3n1n1n1n+48.*five2n1n1n1n1n+48.*five3n1n2n1n1n+144.*five2n1n1n1n1n+288.*four1n1n1n1n+36.*five2n2n2n1n1n+144.*three2n1n1n+96.*two1n1n+144.*four2n1n2n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(8.*four3n1n1n1n+48.*four1n1n1n1n+12.*four4n2n1n1n+96.*four2n1n2n1n+96.*three2n1n1n+72.*three2n1n1n+144.*two1n1n+16.*four3n1n3n1n+48.*four3n1n1n1n+144.*four1n1n1n1n+72.*four1n1n1n1n+96.*three3n2n1n+24.*four3n1n2n2n+144.*four2n1n2n1n+288.*two1n1n+288.*three2n1n1n+9.*four2n2n2n2n+72.*two2n2n+24.)-dMult*(dMult-1.)*(dMult-2.)*(12.*three2n1n1n+16.*two1n1n+24.*three3n2n1n+48.*three2n1n1n+96.*two1n1n+8.*three4n3n1n+32.*three3n2n1n+96.*three2n1n1n+144.*two1n1n+6.*three4n2n2n+96.*two2n2n+36.*two2n2n+72.+48.*three3n2n1n+16.*two3n3n+72.*three2n1n1n+144.*two1n1n)-dMult*(dMult-1.)*(8.*two1n1n+12.*two2n2n+16.+8.*two3n3n+48.*two1n1n+1.*two4n4n+16.*two2n2n+18.)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.));
dee1e0e0 1002
1dfa3c16 1003 fQCorrelations->Fill(30.,eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.));
5e838eeb 1004
1dfa3c16 1005 f8pDistribution->Fill(eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.));
dee1e0e0 1006 }
bc92c0cb 1007 //---------------------------------------------------------------------------------------------------------
1008
4057ba99 1009
1010
1011
bc92c0cb 1012 //---------------------------------------------------------------------------------------------------------
1013 // DIFFERENTIAL FLOW
1014
1dfa3c16 1015 Double_t dQ1nx = afvQvector1n.X();
1016 Double_t dQ1ny = afvQvector1n.Y();
ae733b3b 1017 Double_t dQ1nxW = afvQvector1nWeighted.X();
1018 Double_t dQ1nyW = afvQvector1nWeighted.Y();
1dfa3c16 1019 Double_t dQ2nx = afvQvector2n.X();
1020 Double_t dQ2ny = afvQvector2n.Y();
bc92c0cb 1021
e8a609bc 1022 Double_t dBinWidthPt=0.,dBinWidthEta=0.;
1023 if(fnBinsPt)
1024 {
1025 dBinWidthPt=1.*(fPtMax-fPtMin)/fnBinsPt;
1026 }
1027 if(fnBinsEta)
1028 {
1029 dBinWidthEta=1.*(fEtaMax-fEtaMin)/fnBinsEta;
1030 }
1031
1dfa3c16 1032 //RP:
1033 Double_t qxPtRP=0.,qyPtRP=0.,q2xPtRP=0.,q2yPtRP=0.,mPtRP=0.;//add comments for these variables (deleteMe)
1034 Double_t qxEtaRP=0.,qyEtaRP=0.,q2xEtaRP=0.,q2yEtaRP=0.,mEtaRP=0.;//add comments for these variables (deleteMe)
ae733b3b 1035
1036 Double_t dSumOfWeightsUpTomPtRP = 0.; // sum_{i=1}^{m} w_{i}
1037 Double_t dSumOfWeightsUpTomEtaRP = 0.; // sum_{i=1}^{m} w_{i}
1038
1039 TProfile *mPerBinPtRP = new TProfile("mPerBinPtRP","#sum_{i=1}^{m} w_{i}''",fnBinsPt,fPtMin,fPtMax,"s");
1040 TProfile *mPerBinEtaRP = new TProfile("mPerBinEtaRP","#sum_{i=1}^{m} w_{i}''",fnBinsEta,fEtaMin,fEtaMax,"s");
1dfa3c16 1041
ae733b3b 1042 for(Int_t i=0;i<nPrim;i++) // loop over all particles
bc92c0cb 1043 {
1044 fTrack=anEvent->GetTrack(i);
ae733b3b 1045 if(fTrack && fTrack->UseForIntegratedFlow()) // checking RP condition
1315fe58 1046 {
ae733b3b 1047 // get azimuthal angle, momentum and pseudorapidity of a particle:
1048 dPhi = fTrack->Phi();
1049 dPt = fTrack->Pt();
1050 dEta = fTrack->Eta();
1051 // pt:
1052 fPtReq1nRP->Fill(dPt,cos(n*dPhi),1.);
1053 fPtImq1nRP->Fill(dPt,sin(n*dPhi),1.);
1054 fPtReq2nRP->Fill(dPt,cos(2.*n*dPhi),1.);
1055 fPtImq2nRP->Fill(dPt,sin(2.*n*dPhi),1.);
1056 // eta:
1057 fEtaReq1nRP->Fill(dEta,cos(n*dPhi),1.);
1058 fEtaImq1nRP->Fill(dEta,sin(n*dPhi),1.);
1059 fEtaReq2nRP->Fill(dEta,cos(2.*n*dPhi),1.);
1060 fEtaImq2nRP->Fill(dEta,sin(2.*n*dPhi),1.);
1061 // phi weights:
1062 if(fUsePhiWeights)
1063 {
1064 nBinsPhi = phiWeights->GetNbinsX();
1065 if(nBinsPhi)
1066 {
1067 wPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi())));
1068 }
1069 }
1070 // pt weights:
1071 if(fUsePtWeights)
1072 {
1073 if(dBinWidthPt)
1074 {
1075 wPt = ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/dBinWidthPt)));
1076 }
1077 }
1078 // eta weights:
1079 if(fUseEtaWeights)
1080 {
1081 if(dBinWidthEta)
1082 {
1083 wEta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/dBinWidthEta)));
1084 }
1085 }
1086 // sum_{i=1}^{m} w_{i}:
1087 mPerBinPtRP->Fill(dPt,wPhi*wPt*wEta,1.);
1088 mPerBinEtaRP->Fill(dEta,wPhi*wPt*wEta,1.);
1315fe58 1089 }
ae733b3b 1090 }
bc92c0cb 1091
1dfa3c16 1092 //Pt:
1093 Double_t twoDiffPt1n1nRP=0.,twoDiffPt2n2nRP=0.,threeDiffPt2n1n1nRP=0.,threeDiffPt1n1n2nRP=0.,fourDiffPt1n1n1n1nRP=0.;
bc92c0cb 1094
52021ae2 1095 for(Int_t bin=1;bin<(fnBinsPt+1);bin++)//loop over pt-bins
bc92c0cb 1096 {
1dfa3c16 1097 qxPtRP = (fPtReq1nRP->GetBinContent(bin))*(fPtReq1nRP->GetBinEntries(bin));
1098 qyPtRP = (fPtImq1nRP->GetBinContent(bin))*(fPtImq1nRP->GetBinEntries(bin));
1099 q2xPtRP = (fPtReq2nRP->GetBinContent(bin))*(fPtReq2nRP->GetBinEntries(bin));
1100 q2yPtRP = (fPtImq2nRP->GetBinContent(bin))*(fPtImq2nRP->GetBinEntries(bin));
1101 mPtRP = fPtReq1nRP->GetBinEntries(bin);
ae733b3b 1102 dSumOfWeightsUpTomPtRP = (mPerBinPtRP->GetBinContent(bin))*(mPerBinPtRP->GetBinEntries(bin));
1103
1104 if(mPtRP*dSumOfWeights-dSumOfWeightsUpTomPtRP)
bc92c0cb 1105 {
ae733b3b 1106 //twoDiffPt1n1nRP = (qxPtRP*dQ1nx+qyPtRP*dQ1ny-mPtRP)/(mPtRP*(dMult-1.)); // OK without weights
1107 //f2PerPtBin1n1nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,twoDiffPt1n1nRP,mPtRP*(dMult-1.));//<2'>_{n|n} // OK without weights
1108
1109 twoDiffPt1n1nRP = (qxPtRP*dQ1nxW+qyPtRP*dQ1nyW-dSumOfWeightsUpTomPtRP)/(mPtRP*dSumOfWeights-dSumOfWeightsUpTomPtRP); // OK without weights
1110 f2PerPtBin1n1nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,twoDiffPt1n1nRP,mPtRP*dSumOfWeights-dSumOfWeightsUpTomPtRP);//<2'>_{n|n} // OK without weights
1111 }
bc92c0cb 1112
ae733b3b 1113 if(mPtRP>0&&dMult>1)
1114 {
1dfa3c16 1115 twoDiffPt2n2nRP = (q2xPtRP*dQ2nx+q2yPtRP*dQ2ny-mPtRP)/(mPtRP*(dMult-1.));
1116 f2PerPtBin2n2nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,twoDiffPt2n2nRP,mPtRP*(dMult-1.));//<2'>_{2n|2n}
bc92c0cb 1117 }
1118
1dfa3c16 1119 if(mPtRP>0&&dMult>2)
bc92c0cb 1120 {
1dfa3c16 1121 threeDiffPt2n1n1nRP = (q2xPtRP*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yPtRP*dQ1nx*dQ1ny-2.*(qxPtRP*dQ1nx+qyPtRP*dQ1ny)-(q2xPtRP*dQ2nx+q2yPtRP*dQ2ny)+2.*mPtRP)/(mPtRP*(dMult-1.)*(dMult-2.));
1122 f3PerPtBin2n1n1nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,threeDiffPt2n1n1nRP,mPtRP*(dMult-1.)*(dMult-2.));//Re[<3'>_{2n|n,n}]
bc92c0cb 1123
1dfa3c16 1124 threeDiffPt1n1n2nRP = (dQ2nx*(qxPtRP*dQ1nx-qyPtRP*dQ1ny)+dQ2ny*(qxPtRP*dQ1ny+qyPtRP*dQ1nx)-2.*(qxPtRP*dQ1nx+qyPtRP*dQ1ny)-(q2xPtRP*dQ2nx+q2yPtRP*dQ2ny)+2.*mPtRP)/(mPtRP*(dMult-1.)*(dMult-2.));
1125 f3PerPtBin1n1n2nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,threeDiffPt1n1n2nRP,mPtRP*(dMult-1.)*(dMult-2.));//Re[<3'>_{n,n|2n}]
bc92c0cb 1126 }
1127
1dfa3c16 1128 if(mPtRP>0&&dMult>3)
bc92c0cb 1129 {
1dfa3c16 1130 fourDiffPt1n1n1n1nRP = ((dQ1nx*dQ1nx+dQ1ny*dQ1ny)*(qxPtRP*dQ1nx+qyPtRP*dQ1ny)-(q2xPtRP*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yPtRP*dQ1nx*dQ1ny)-(dQ2nx*(qxPtRP*dQ1nx-qyPtRP*dQ1ny)+dQ2ny*(qxPtRP*dQ1ny+qyPtRP*dQ1nx))+(q2xPtRP*dQ2nx+q2yPtRP*dQ2ny)-2.*(dMult-3.)*(qxPtRP*dQ1nx+qyPtRP*dQ1ny)-2.*mPtRP*(dQ1nx*dQ1nx+dQ1ny*dQ1ny)+2.*(dQ1nx*qxPtRP+dQ1ny*qyPtRP)+2.*mPtRP*(dMult-3.))/(mPtRP*(dMult-1.)*(dMult-2.)*(dMult-3.));
1131 f4PerPtBin1n1n1n1nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,fourDiffPt1n1n1n1nRP,mPtRP*(dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4'>_{n,n|n,n}]
4057ba99 1132 }
1133 }//end of for(Int_t bin=1;bin<(fnBinsPt+1);bin++)//loop over pt-bins
bc92c0cb 1134
1dfa3c16 1135 fPtReq1nRP->Reset();
1136 fPtImq1nRP->Reset();
1137 fPtReq2nRP->Reset();
1138 fPtImq2nRP->Reset();
1139
ae733b3b 1140 mPerBinPtRP->Reset();
1141
1dfa3c16 1142 //Eta:
1143 Double_t twoDiffEta1n1nRP=0.,twoDiffEta2n2nRP=0.,threeDiffEta2n1n1nRP=0.,threeDiffEta1n1n2nRP=0.,fourDiffEta1n1n1n1nRP=0.;
1144
1145 for(Int_t bin=1;bin<(fnBinsEta+1);bin++)//loop over eta-bins
1146 {
1147 qxEtaRP = (fEtaReq1nRP->GetBinContent(bin))*(fEtaReq1nRP->GetBinEntries(bin));
1148 qyEtaRP = (fEtaImq1nRP->GetBinContent(bin))*(fEtaImq1nRP->GetBinEntries(bin));
1149 q2xEtaRP = (fEtaReq2nRP->GetBinContent(bin))*(fEtaReq2nRP->GetBinEntries(bin));
1150 q2yEtaRP = (fEtaImq2nRP->GetBinContent(bin))*(fEtaImq2nRP->GetBinEntries(bin));
1151 mEtaRP = fEtaReq1nRP->GetBinEntries(bin);
ae733b3b 1152 dSumOfWeightsUpTomEtaRP = (mPerBinEtaRP->GetBinContent(bin))*(mPerBinEtaRP->GetBinEntries(bin));
1dfa3c16 1153
ae733b3b 1154 if(mEtaRP*dSumOfWeights-dSumOfWeightsUpTomEtaRP)
1dfa3c16 1155 {
ae733b3b 1156 //twoDiffEta1n1nRP = (qxEtaRP*dQ1nx+qyEtaRP*dQ1ny-mEtaRP)/(mEtaRP*(dMult-1.)); // OK without weights
1157 //f2PerEtaBin1n1nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta1n1nRP,mEtaRP*(dMult-1.));//<2'>_{n|n} // OK without weights
1dfa3c16 1158
ae733b3b 1159 twoDiffEta1n1nRP = (qxEtaRP*dQ1nxW+qyEtaRP*dQ1nyW-dSumOfWeightsUpTomEtaRP)/(mEtaRP*dSumOfWeights-dSumOfWeightsUpTomEtaRP); // OK without weights
1160 f2PerEtaBin1n1nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta1n1nRP,mEtaRP*dSumOfWeights-dSumOfWeightsUpTomEtaRP);//<2'>_{n|n} // OK without weights
1161 }
1162
1163 if(mEtaRP>0&&dMult>1)
1164 {
1dfa3c16 1165 twoDiffEta2n2nRP = (q2xEtaRP*dQ2nx+q2yEtaRP*dQ2ny-mEtaRP)/(mEtaRP*(dMult-1.));
1166 f2PerEtaBin2n2nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta2n2nRP,mEtaRP*(dMult-1.));//<2'>_{2n|2n}
1167 }
1168
1169 if(mEtaRP>0&&dMult>2)
1170 {
1171 threeDiffEta2n1n1nRP = (q2xEtaRP*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yEtaRP*dQ1nx*dQ1ny-2.*(qxEtaRP*dQ1nx+qyEtaRP*dQ1ny)-(q2xEtaRP*dQ2nx+q2yEtaRP*dQ2ny)+2.*mEtaRP)/(mEtaRP*(dMult-1.)*(dMult-2.));
1172 f3PerEtaBin2n1n1nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,threeDiffEta2n1n1nRP,mEtaRP*(dMult-1.)*(dMult-2.));//Re[<3'>_{2n|n,n}]
1173
1174 threeDiffEta1n1n2nRP = (dQ2nx*(qxEtaRP*dQ1nx-qyEtaRP*dQ1ny)+dQ2ny*(qxEtaRP*dQ1ny+qyEtaRP*dQ1nx)-2.*(qxEtaRP*dQ1nx+qyEtaRP*dQ1ny)-(q2xEtaRP*dQ2nx+q2yEtaRP*dQ2ny)+2.*mEtaRP)/(mEtaRP*(dMult-1.)*(dMult-2.));
1175 f3PerEtaBin1n1n2nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,threeDiffEta1n1n2nRP,mEtaRP*(dMult-1.)*(dMult-2.));//Re[<3'>_{n,n|2n}]
1176 }
1177
1178 if(mEtaRP>0&&dMult>3)
1179 {
1180 fourDiffEta1n1n1n1nRP = ((dQ1nx*dQ1nx+dQ1ny*dQ1ny)*(qxEtaRP*dQ1nx+qyEtaRP*dQ1ny)-(q2xEtaRP*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yEtaRP*dQ1nx*dQ1ny)-(dQ2nx*(qxEtaRP*dQ1nx-qyEtaRP*dQ1ny)+dQ2ny*(qxEtaRP*dQ1ny+qyEtaRP*dQ1nx))+(q2xEtaRP*dQ2nx+q2yEtaRP*dQ2ny)-2.*(dMult-3.)*(qxEtaRP*dQ1nx+qyEtaRP*dQ1ny)-2.*mEtaRP*(dQ1nx*dQ1nx+dQ1ny*dQ1ny)+2.*(dQ1nx*qxEtaRP+dQ1ny*qyEtaRP)+2.*mEtaRP*(dMult-3.))/(mEtaRP*(dMult-1.)*(dMult-2.)*(dMult-3.));
1181 f4PerEtaBin1n1n1n1nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,fourDiffEta1n1n1n1nRP,mEtaRP*(dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4'>_{n,n|n,n}]
4057ba99 1182 }
1183 }//end of for(Int_t bin=1;bin<(fnBinsEta+1);bin++)//loop over eta-bins
1dfa3c16 1184
1185 fEtaReq1nRP->Reset();
1186 fEtaImq1nRP->Reset();
1187 fEtaReq2nRP->Reset();
1188 fEtaImq2nRP->Reset();
1189
ae733b3b 1190 mPerBinEtaRP->Reset();
1191
1dfa3c16 1192 //POI:
4057ba99 1193 Double_t qxPrimePtPOI=0.,qyPrimePtPOI=0.,q2xPrimePtPOI=0.,q2yPrimePtPOI=0.,mPrimePtPOI=0.;//add comments for these variables (deleteMe)
1194 Double_t qxPrimePrimePtPOI=0.,qyPrimePrimePtPOI=0.,q2xPrimePrimePtPOI=0.,q2yPrimePrimePtPOI=0.,mPrimePrimePtPOI=0.;//add comments for these variables (deleteMe)
1195 Double_t qxPrimeEtaPOI=0.,qyPrimeEtaPOI=0.,q2xPrimeEtaPOI=0.,q2yPrimeEtaPOI=0.,mPrimeEtaPOI=0.;//add comments for these variables (deleteMe)
1196 Double_t qxPrimePrimeEtaPOI=0.,qyPrimePrimeEtaPOI=0.,q2xPrimePrimeEtaPOI=0.,q2yPrimePrimeEtaPOI=0.,mPrimePrimeEtaPOI=0.;//add comments for the
ae733b3b 1197
1198 Double_t dSumOfWeightsUpTomPrimePrimePtPOI = 0.; // sum_{i=1}^{m''} w_{i}
1199 Double_t dSumOfWeightsUpTomPrimePrimeEtaPOI = 0.; // sum_{i=1}^{m''} w_{i}
1200
1201 TProfile *mPrimePrimePerBinPtPOI = new TProfile("mPrimePrimePerBinPtPOI","#sum_{i=1}^{m''} w_{i}''",fnBinsPt,fPtMin,fPtMax,"s");
1202 TProfile *mPrimePrimePerBinEtaPOI = new TProfile("mPrimePrimePerBinEtaPOI","#sum_{i=1}^{m''} w_{i}''",fnBinsEta,fEtaMin,fEtaMax,"s");
4057ba99 1203
ae733b3b 1204 for(Int_t i=0;i<nPrim;i++) // loop over all particles (to be improved: do the calculations for RPs and POIs in the same loop)
1dfa3c16 1205 {
1206 fTrack=anEvent->GetTrack(i);
4057ba99 1207 if(fTrack)
1dfa3c16 1208 {
ae733b3b 1209 if(fTrack->UseForDifferentialFlow()) // checking if particle is POI
1dfa3c16 1210 {
ae733b3b 1211 if(fTrack->UseForIntegratedFlow()) // checking if particle is both POI and RP
4057ba99 1212 {
ae733b3b 1213 // get azimuthal angle, momentum and pseudorapidity of a particle:
1214 dPhi = fTrack->Phi();
1215 dPt = fTrack->Pt();
1216 dEta = fTrack->Eta();
1217 // pt:
1218 fPtReq1nPrimePrimePOI->Fill(dPt,cos(n*dPhi),1.);
1219 fPtImq1nPrimePrimePOI->Fill(dPt,sin(n*dPhi),1.);
1220 fPtReq2nPrimePrimePOI->Fill(dPt,cos(2.*n*dPhi),1.);
1221 fPtImq2nPrimePrimePOI->Fill(dPt,sin(2.*n*dPhi),1.);
1222 // eta:
1223 fEtaReq1nPrimePrimePOI->Fill(dEta,cos(n*dPhi),1.);
1224 fEtaImq1nPrimePrimePOI->Fill(dEta,sin(n*dPhi),1.);
1225 fEtaReq2nPrimePrimePOI->Fill(dEta,cos(2.*n*dPhi),1.);
1226 fEtaImq2nPrimePrimePOI->Fill(dEta,sin(2.*n*dPhi),1.);
1227 // phi weights:
1228 if(fUsePhiWeights)
1229 {
1230 nBinsPhi = phiWeights->GetNbinsX();
1231 if(nBinsPhi)
1232 {
1233 wPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi())));
1234 }
1235 }
1236 // pt weights:
1237 if(fUsePtWeights)
1238 {
1239 if(dBinWidthPt)
1240 {
1241 wPt = ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/dBinWidthPt)));
1242 }
1243 }
1244 // eta weights:
1245 if(fUseEtaWeights)
1246 {
1247 if(dBinWidthEta)
1248 {
1249 wEta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/dBinWidthEta)));
1250 }
1251 }
1252 // sum_{i=1}^{m''} w_{i}:
1253 mPrimePrimePerBinPtPOI->Fill(dPt,wPhi*wPt*wEta,1.);
1254 mPrimePrimePerBinEtaPOI->Fill(dEta,wPhi*wPt*wEta,1.);
1255 }else if(!(fTrack->UseForIntegratedFlow())) // checking if particles is POI and not RP
4057ba99 1256 {
ae733b3b 1257 // get azimuthal angle, momentum and pseudorapidity of a particle:
1258 dPhi = fTrack->Phi();
1259 dPt = fTrack->Pt();
1260 dEta = fTrack->Eta();
1261 // pt:
1262 fPtReq1nPrimePOI->Fill(dPt,cos(n*dPhi),1.);
1263 fPtImq1nPrimePOI->Fill(dPt,sin(n*dPhi),1.);
1264 fPtReq2nPrimePOI->Fill(dPt,cos(2.*n*dPhi),1.);
1265 fPtImq2nPrimePOI->Fill(dPt,sin(2.*n*dPhi),1.);
1266 // eta:
1267 fEtaReq1nPrimePOI->Fill(dEta,cos(n*dPhi),1.);
1268 fEtaImq1nPrimePOI->Fill(dEta,sin(n*dPhi),1.);
1269 fEtaReq2nPrimePOI->Fill(dEta,cos(2.*n*dPhi),1.);
1270 fEtaImq2nPrimePOI->Fill(dEta,sin(2.*n*dPhi),1.);
1271 } // end of else if(!(fTrack->UseForIntegratedFlow())) // checking if particles is POI and not RP
1272 } // end of if(fTrack->UseForDifferentialFlow()) // checking if particle is POI
1273 } // end of if(fTrack}
1274 } // end of for(Int_t i=0;i<nPrim;i++)
4057ba99 1275
ae733b3b 1276 // Pt, POI:
4057ba99 1277 Double_t twoDiffPt1n1nPOI=0.,twoDiffPt2n2nPOI=0.,fourDiffPt1n1n1n1nPOI=0.;
1dfa3c16 1278
ae733b3b 1279 for(Int_t bin=1;bin<(fnBinsPt+1);bin++) // loop over pt-bins
1dfa3c16 1280 {
ae733b3b 1281 // q':
4057ba99 1282 qxPrimePtPOI = (fPtReq1nPrimePOI->GetBinContent(bin))*(fPtReq1nPrimePOI->GetBinEntries(bin));
1283 qyPrimePtPOI = (fPtImq1nPrimePOI->GetBinContent(bin))*(fPtImq1nPrimePOI->GetBinEntries(bin));
1284 q2xPrimePtPOI = (fPtReq2nPrimePOI->GetBinContent(bin))*(fPtReq2nPrimePOI->GetBinEntries(bin));
1285 q2yPrimePtPOI = (fPtImq2nPrimePOI->GetBinContent(bin))*(fPtImq2nPrimePOI->GetBinEntries(bin));
1286 mPrimePtPOI = fPtReq1nPrimePOI->GetBinEntries(bin);
ae733b3b 1287 // q'':
4057ba99 1288 qxPrimePrimePtPOI = (fPtReq1nPrimePrimePOI->GetBinContent(bin))*(fPtReq1nPrimePrimePOI->GetBinEntries(bin));
1289 qyPrimePrimePtPOI = (fPtImq1nPrimePrimePOI->GetBinContent(bin))*(fPtImq1nPrimePrimePOI->GetBinEntries(bin));
1290 q2xPrimePrimePtPOI = (fPtReq2nPrimePrimePOI->GetBinContent(bin))*(fPtReq2nPrimePrimePOI->GetBinEntries(bin));
1291 q2yPrimePrimePtPOI = (fPtImq2nPrimePrimePOI->GetBinContent(bin))*(fPtImq2nPrimePrimePOI->GetBinEntries(bin));
ae733b3b 1292 mPrimePrimePtPOI = fPtReq1nPrimePrimePOI->GetBinEntries(bin);
1293 dSumOfWeightsUpTomPrimePrimePtPOI = (mPrimePrimePerBinPtPOI->GetBinContent(bin))*(mPrimePrimePerBinPtPOI->GetBinEntries(bin));
1294
1295 if((mPrimePrimePtPOI+mPrimePtPOI)*dSumOfWeights-dSumOfWeightsUpTomPrimePrimePtPOI)
4057ba99 1296 {
ae733b3b 1297 //twoDiffPt1n1nPOI = (qxPrimePrimePtPOI*dQ1nx+qyPrimePrimePtPOI*dQ1ny-mPrimePrimePtPOI+qxPrimePtPOI*dQ1nx+qyPrimePtPOI*dQ1ny)/(mPrimePrimePtPOI*(dMult-1)+mPrimePtPOI*dMult); // OK without weights
e8a609bc 1298
ae733b3b 1299 twoDiffPt1n1nPOI = (qxPrimePrimePtPOI*dQ1nxW+qyPrimePrimePtPOI*dQ1nyW-dSumOfWeightsUpTomPrimePrimePtPOI+qxPrimePtPOI*dQ1nxW+qyPrimePtPOI*dQ1nyW)/((mPrimePrimePtPOI+mPrimePtPOI)*dSumOfWeights-dSumOfWeightsUpTomPrimePrimePtPOI);
1300
1301 //f2PerPtBin1n1nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,twoDiffPt1n1nPOI,mPrimePrimePtPOI*(dMult-1)+mPrimePtPOI*dMult);//<2'>_{n|n} //OK without weights
1302
1303 f2PerPtBin1n1nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,twoDiffPt1n1nPOI,(mPrimePrimePtPOI+mPrimePtPOI)*dSumOfWeights-dSumOfWeightsUpTomPrimePrimePtPOI); // <2'>_{n|n}
1304
1305 twoDiffPt2n2nPOI = (q2xPrimePrimePtPOI*dQ2nx+q2yPrimePrimePtPOI*dQ2ny-mPrimePrimePtPOI+q2xPrimePtPOI*dQ2nx+q2yPrimePtPOI*dQ2ny)/(mPrimePrimePtPOI*(dMult-1)+mPrimePtPOI*dMult); // to be improved: didn't check how it changed with weights
4057ba99 1306 f2PerPtBin2n2nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,twoDiffPt2n2nPOI,mPrimePrimePtPOI*(dMult-1)+mPrimePtPOI*dMult);//<2'>_{2n|2n}
1307 }//end of if((mPrimePtPOI+mPrimePrimePtPOI>0)&&dMult>0)
1dfa3c16 1308
4057ba99 1309 /*
1310 to be improved: correct Eqs. needed here)
1311 if(mPtPOI>0&&dMult>3)
1dfa3c16 1312 {
4057ba99 1313 threeDiffPt2n1n1nPOI = (q2xPtPOI*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yPtPOI*dQ1nx*dQ1ny-2.*(qxPtPOI*dQ1nx+qyPtPOI*dQ1ny)-(q2xPtPOI*dQ2nx+q2yPtPOI*dQ2ny)+2.*mPtPOI)/(mPtPOI*(dMult-1.)*(dMult-2.));//to be improved (correct formula needed)
1dfa3c16 1314 //f3PePOItBin2n1n1nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,threeDiffPt2n1n1nPOI,mPtPOI*(dMult-1.)*(dMult-2.));//Re[<3'>_{2n|n,n}]
1315
4057ba99 1316 threeDiffPt1n1n2nPOI = (dQ2nx*(qxPtPOI*dQ1nx-qyPtPOI*dQ1ny)+dQ2ny*(qxPtPOI*dQ1ny+qyPtPOI*dQ1nx)-2.*(qxPtPOI*dQ1nx+qyPtPOI*dQ1ny)-(q2xPtPOI*dQ2nx+q2yPtPOI*dQ2ny)+2.*mPtPOI)/(mPtPOI*(dMult-1.)*(dMult-2.));//to be improved (correct formula needed)
1dfa3c16 1317 //f3PePOItBin1n1n2nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,threeDiffPt1n1n2nPOI,mPtPOI*(dMult-1.)*(dMult-2.));//Re[<3'>_{n,n|2n}]
1318 }
4057ba99 1319 */
1dfa3c16 1320
4057ba99 1321 //if((mPrimePtPOI+mPrimePrimePtPOI>0)&&dMult>2)//to be improved (dMult>2 or dMult>3)
1322 if(!(mPrimePtPOI==0&&mPrimePrimePtPOI==0)&&!(mPrimePtPOI==0&&(dMult==1||dMult==2||dMult==3))&&!(mPrimePrimePtPOI==0&&(dMult==0||dMult==1||dMult==2)))//to be improved
1323 {
1324 fourDiffPt1n1n1n1nPOI=((dQ1nx*dQ1nx+dQ1ny*dQ1ny)*(qxPrimePtPOI*dQ1nx+qyPrimePtPOI*dQ1ny)-2.*(dMult-1)*(qxPrimePtPOI*dQ1nx+qyPrimePtPOI*dQ1ny)-(dQ2nx*(qxPrimePtPOI*dQ1nx-qyPrimePtPOI*dQ1ny)+dQ2ny*(qxPrimePtPOI*dQ1ny+qyPrimePtPOI*dQ1nx))+(dQ1nx*dQ1nx+dQ1ny*dQ1ny)*(qxPrimePrimePtPOI*dQ1nx+qyPrimePrimePtPOI*dQ1ny)-(q2xPrimePrimePtPOI*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yPrimePrimePtPOI*dQ1nx*dQ1ny)-(dQ2nx*(qxPrimePrimePtPOI*dQ1nx-qyPrimePrimePtPOI*dQ1ny)+dQ2ny*(qxPrimePrimePtPOI*dQ1ny+qyPrimePrimePtPOI*dQ1nx))+(q2xPrimePrimePtPOI*dQ2nx+q2yPrimePrimePtPOI*dQ2ny)-2.*(dMult-3.)*(qxPrimePrimePtPOI*dQ1nx+qyPrimePrimePtPOI*dQ1ny)-2.*mPrimePrimePtPOI*(dQ1nx*dQ1nx+dQ1ny*dQ1ny)+2.*(dQ1nx*qxPrimePrimePtPOI+dQ1ny*qyPrimePrimePtPOI)+2.*mPrimePrimePtPOI*(dMult-3.))/(mPrimePtPOI*dMult*(dMult-1)*(dMult-2)+mPrimePrimePtPOI*(dMult-1)*(dMult-2)*(dMult-3));
1325
1326 f4PerPtBin1n1n1n1nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,fourDiffPt1n1n1n1nPOI,mPrimePtPOI*dMult*(dMult-1)*(dMult-2)+mPrimePrimePtPOI*(dMult-1)*(dMult-2)*(dMult-3));//Re[<4'>_{n,n|n,n}]
1327 }//end of if((mPrimePtPOI+mPrimePrimePtPOI>0)&&dMult>2)
1328 }//end of for(Int_t bin=1;bin<(fnBinsPt+1);bin++)//loop over pt-bins
1329
1330 fPtReq1nPrimePOI->Reset();
1331 fPtImq1nPrimePOI->Reset();
1332 fPtReq2nPrimePOI->Reset();
1333 fPtImq2nPrimePOI->Reset();
1334
1335 fPtReq1nPrimePrimePOI->Reset();
1336 fPtImq1nPrimePrimePOI->Reset();
1337 fPtReq2nPrimePrimePOI->Reset();
1338 fPtImq2nPrimePrimePOI->Reset();
ae733b3b 1339
1340 mPrimePrimePerBinPtPOI->Reset();
4057ba99 1341
1342 //Eta:
1343 //Double_t twoDiffEta1n1nPOI=0.,twoDiffEta2n2nPOI=0.,threeDiffEta2n1n1nPOI=0.,threeDiffEta1n1n2nPOI=0.,fourDiffEta1n1n1n1nPOI=0.;
1344 Double_t twoDiffEta1n1nPOI=0.,twoDiffEta2n2nPOI=0.,fourDiffEta1n1n1n1nPOI=0.;
1345
1346 for(Int_t bin=1;bin<(fnBinsEta+1);bin++)//loop over eta-bins
1347 {
1348 //q'
1349 qxPrimeEtaPOI = (fEtaReq1nPrimePOI->GetBinContent(bin))*(fEtaReq1nPrimePOI->GetBinEntries(bin));
1350 qyPrimeEtaPOI = (fEtaImq1nPrimePOI->GetBinContent(bin))*(fEtaImq1nPrimePOI->GetBinEntries(bin));
1351 q2xPrimeEtaPOI = (fEtaReq2nPrimePOI->GetBinContent(bin))*(fEtaReq2nPrimePOI->GetBinEntries(bin));
1352 q2yPrimeEtaPOI = (fEtaImq2nPrimePOI->GetBinContent(bin))*(fEtaImq2nPrimePOI->GetBinEntries(bin));
1353 mPrimeEtaPOI = fEtaReq1nPrimePOI->GetBinEntries(bin);
1354 //q''
1355 qxPrimePrimeEtaPOI = (fEtaReq1nPrimePrimePOI->GetBinContent(bin))*(fEtaReq1nPrimePrimePOI->GetBinEntries(bin));
1356 qyPrimePrimeEtaPOI = (fEtaImq1nPrimePrimePOI->GetBinContent(bin))*(fEtaImq1nPrimePrimePOI->GetBinEntries(bin));
1357 q2xPrimePrimeEtaPOI = (fEtaReq2nPrimePrimePOI->GetBinContent(bin))*(fEtaReq2nPrimePrimePOI->GetBinEntries(bin));
1358 q2yPrimePrimeEtaPOI = (fEtaImq2nPrimePrimePOI->GetBinContent(bin))*(fEtaImq2nPrimePrimePOI->GetBinEntries(bin));
ae733b3b 1359 mPrimePrimeEtaPOI = fEtaReq1nPrimePrimePOI->GetBinEntries(bin);
1360 dSumOfWeightsUpTomPrimePrimeEtaPOI = (mPrimePrimePerBinEtaPOI->GetBinContent(bin))*(mPrimePrimePerBinEtaPOI->GetBinEntries(bin));
1361
1362 if((mPrimePrimeEtaPOI+mPrimeEtaPOI)*dSumOfWeights-dSumOfWeightsUpTomPrimePrimeEtaPOI)//to be improved (dMult>1 or dMult>0)
4057ba99 1363 {
ae733b3b 1364 //twoDiffEta1n1nPOI = (qxPrimePrimeEtaPOI*dQ1nx+qyPrimePrimeEtaPOI*dQ1ny-mPrimePrimeEtaPOI+qxPrimeEtaPOI*dQ1nx+qyPrimeEtaPOI*dQ1ny)/(mPrimePrimeEtaPOI*(dMult-1)+mPrimeEtaPOI*dMult); // OK without weights
1365 //f2PerEtaBin1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta1n1nPOI,mPrimePrimeEtaPOI*(dMult-1)+mPrimeEtaPOI*dMult);//<2'>_{n|n} // OK without weights
4057ba99 1366
ae733b3b 1367 twoDiffEta1n1nPOI = (qxPrimePrimeEtaPOI*dQ1nxW+qyPrimePrimeEtaPOI*dQ1nyW-dSumOfWeightsUpTomPrimePrimeEtaPOI+qxPrimeEtaPOI*dQ1nxW+qyPrimeEtaPOI*dQ1nyW)/((mPrimePrimeEtaPOI+mPrimeEtaPOI)*dSumOfWeights-dSumOfWeightsUpTomPrimePrimeEtaPOI);
1368 f2PerEtaBin1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta1n1nPOI,(mPrimePrimeEtaPOI+mPrimeEtaPOI)*dSumOfWeights-dSumOfWeightsUpTomPrimePrimeEtaPOI); // <2'>_{n|n}
1369
4057ba99 1370 twoDiffEta2n2nPOI = (q2xPrimePrimeEtaPOI*dQ2nx+q2yPrimePrimeEtaPOI*dQ2ny-mPrimePrimeEtaPOI+q2xPrimeEtaPOI*dQ2nx+q2yPrimeEtaPOI*dQ2ny)/(mPrimePrimeEtaPOI*(dMult-1)+mPrimeEtaPOI*dMult);
1371 f2PerEtaBin2n2nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta2n2nPOI,mPrimePrimeEtaPOI*(dMult-1)+mPrimeEtaPOI*dMult);//<2'>_{2n|2n}
1372 }//end of if((mPrimeEtaPOI+mPrimePrimeEtaPOI>0)&&dMult>0)
1373
1374 /*
1375 to be improved: correct Eqs. needed here)
1376 if(mEtaPOI>0&&dMult>3)
1dfa3c16 1377 {
4057ba99 1378 threeDiffEta2n1n1nPOI = (q2xEtaPOI*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yEtaPOI*dQ1nx*dQ1ny-2.*(qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny)-(q2xEtaPOI*dQ2nx+q2yEtaPOI*dQ2ny)+2.*mEtaPOI)/(mEtaPOI*(dMult-1.)*(dMult-2.));//to be improved (correct formula)
1379 //f3PePOItBin2n1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,threeDiffEta2n1n1nPOI,mEtaPOI*(dMult-1.)*(dMult-2.));//Re[<3'>_{2n|n,n}]
1dfa3c16 1380
4057ba99 1381 threeDiffEta1n1n2nPOI = (dQ2nx*(qxEtaPOI*dQ1nx-qyEtaPOI*dQ1ny)+dQ2ny*(qxEtaPOI*dQ1ny+qyEtaPOI*dQ1nx)-2.*(qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny)-(q2xEtaPOI*dQ2nx+q2yEtaPOI*dQ2ny)+2.*mEtaPOI)/(mEtaPOI*(dMult-1.)*(dMult-2.));//to be improved (correct formula)
1382 //f3PePOItBin1n1n2nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,threeDiffEta1n1n2nPOI,mEtaPOI*(dMult-1.)*(dMult-2.));//Re[<3'>_{n,n|2n}]
1383 }
1384 */
1dfa3c16 1385
4057ba99 1386 //if((mPrimeEtaPOI+mPrimePrimeEtaPOI>0)&&dMult>2)//to be improved (dMult>2 or dMult>3)
1387 if(!(mPrimeEtaPOI==0&&mPrimePrimeEtaPOI==0)&&!(mPrimeEtaPOI==0&&(dMult==1||dMult==2||dMult==3))&&!(mPrimePrimeEtaPOI==0&&(dMult==0||dMult==1||dMult==2)))
1388 {
1389 fourDiffEta1n1n1n1nPOI=((dQ1nx*dQ1nx+dQ1ny*dQ1ny)*(qxPrimeEtaPOI*dQ1nx+qyPrimeEtaPOI*dQ1ny)-2.*(dMult-1)*(qxPrimeEtaPOI*dQ1nx+qyPrimeEtaPOI*dQ1ny)-(dQ2nx*(qxPrimeEtaPOI*dQ1nx-qyPrimeEtaPOI*dQ1ny)+dQ2ny*(qxPrimeEtaPOI*dQ1ny+qyPrimeEtaPOI*dQ1nx))+(dQ1nx*dQ1nx+dQ1ny*dQ1ny)*(qxPrimePrimeEtaPOI*dQ1nx+qyPrimePrimeEtaPOI*dQ1ny)-(q2xPrimePrimeEtaPOI*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yPrimePrimeEtaPOI*dQ1nx*dQ1ny)-(dQ2nx*(qxPrimePrimeEtaPOI*dQ1nx-qyPrimePrimeEtaPOI*dQ1ny)+dQ2ny*(qxPrimePrimeEtaPOI*dQ1ny+qyPrimePrimeEtaPOI*dQ1nx))+(q2xPrimePrimeEtaPOI*dQ2nx+q2yPrimePrimeEtaPOI*dQ2ny)-2.*(dMult-3.)*(qxPrimePrimeEtaPOI*dQ1nx+qyPrimePrimeEtaPOI*dQ1ny)-2.*mPrimePrimeEtaPOI*(dQ1nx*dQ1nx+dQ1ny*dQ1ny)+2.*(dQ1nx*qxPrimePrimeEtaPOI+dQ1ny*qyPrimePrimeEtaPOI)+2.*mPrimePrimeEtaPOI*(dMult-3.))/(mPrimeEtaPOI*dMult*(dMult-1)*(dMult-2)+mPrimePrimeEtaPOI*(dMult-1)*(dMult-2)*(dMult-3));
1390
1391 f4PerEtaBin1n1n1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,fourDiffEta1n1n1n1nPOI,mPrimeEtaPOI*dMult*(dMult-1)*(dMult-2)+mPrimePrimeEtaPOI*(dMult-1)*(dMult-2)*(dMult-3));//Re[<4'>_{n,n|n,n}]
1392 }//end of if((mPrimeEtaPOI+mPrimePrimeEtaPOI>0)&&dMult>2)
1393 }//end of for(Int_t bin=1;bin<(fnBinsEta+1);bin++)//loop over eta-bins
1394
1395 fEtaReq1nPrimePOI->Reset();
1396 fEtaImq1nPrimePOI->Reset();
1397 fEtaReq2nPrimePOI->Reset();
1398 fEtaImq2nPrimePOI->Reset();
1dfa3c16 1399
4057ba99 1400 fEtaReq1nPrimePrimePOI->Reset();
1401 fEtaImq1nPrimePrimePOI->Reset();
1402 fEtaReq2nPrimePrimePOI->Reset();
1403 fEtaImq2nPrimePrimePOI->Reset();
ae733b3b 1404
1405 mPrimePrimePerBinEtaPOI->Reset();
1406
4057ba99 1407//---------------------------------------------------------------------------------------------------------
1408
1409
6f5d8033 1410 delete mPerBinPtRP;
1411 delete mPerBinEtaRP;
1412 delete mPrimePrimePerBinPtPOI;
1413 delete mPrimePrimePerBinEtaPOI;
1414
4057ba99 1415
1416
1417
1418
1419
1420
1421
1422
1423
1424/*
1dfa3c16 1425 //Eta:
1426 Double_t twoDiffEta1n1nPOI=0.,twoDiffEta2n2nPOI=0.,threeDiffEta2n1n1nPOI=0.,threeDiffEta1n1n2nPOI=0.,fourDiffEta1n1n1n1nPOI=0.;
1427
1428 for(Int_t bin=1;bin<(fnBinsEta+1);bin++)//loop over eta-bins
1429 {
1430 qxEtaPOI = (fEtaReq1nPOI->GetBinContent(bin))*(fEtaReq1nPOI->GetBinEntries(bin));
1431 qyEtaPOI = (fEtaImq1nPOI->GetBinContent(bin))*(fEtaImq1nPOI->GetBinEntries(bin));
1432 q2xEtaPOI = (fEtaReq2nPOI->GetBinContent(bin))*(fEtaReq2nPOI->GetBinEntries(bin));
1433 q2yEtaPOI = (fEtaImq2nPOI->GetBinContent(bin))*(fEtaImq2nPOI->GetBinEntries(bin));
4057ba99 1434 mEtaPOI = fEtaReq1nPOI->GetBinEntries(bin);
1dfa3c16 1435
1436 if(mEtaPOI>0&&dMult>1)
1437 {
e8a609bc 1438 twoDiffEta1n1nPOI = (qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny-dOverlapEta)/((mEtaPOI-dOverlapEta)*dMult+dOverlapEta*(dMult-1.));
1439 f2PerEtaBin1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta1n1nPOI,(mEtaPOI-dOverlapEta)*dMult+dOverlapEta*(dMult-1.));//<2'>_{n|n}
1dfa3c16 1440
e8a609bc 1441 twoDiffEta2n2nPOI = (q2xEtaPOI*dQ2nx+q2yEtaPOI*dQ2ny-dOverlapEta)/((mEtaPOI-dOverlapEta)*dMult+dOverlapEta*(dMult-1.));
1442 f2PerEtaBin2n2nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,twoDiffEta2n2nPOI,(mEtaPOI-dOverlapEta)*dMult+dOverlapEta*(dMult-1.));//<2'>_{2n|2n}
1dfa3c16 1443 }
1444
1445 if(mEtaPOI>0&&dMult>2)
1446 {
1447 threeDiffEta2n1n1nPOI = (q2xEtaPOI*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yEtaPOI*dQ1nx*dQ1ny-2.*(qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny)-(q2xEtaPOI*dQ2nx+q2yEtaPOI*dQ2ny)+2.*mEtaPOI)/(mEtaPOI*(dMult-1.)*(dMult-2.));//to be improved (correct formula)
1448 //f3PerEtaBin2n1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,threeDiffEta2n1n1nPOI,mEtaPOI*(dMult-1.)*(dMult-2.));//Re[<3'>_{2n|n,n}]
1449
1450 threeDiffEta1n1n2nPOI = (dQ2nx*(qxEtaPOI*dQ1nx-qyEtaPOI*dQ1ny)+dQ2ny*(qxEtaPOI*dQ1ny+qyEtaPOI*dQ1nx)-2.*(qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny)-(q2xEtaPOI*dQ2nx+q2yEtaPOI*dQ2ny)+2.*mEtaPOI)/(mEtaPOI*(dMult-1.)*(dMult-2.));//to be improved (correct formula)
1451 //f3PerEtaBin1n1n2nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,threeDiffEta1n1n2nPOI,mEtaPOI*(dMult-1.)*(dMult-2.));//Re[<3'>_{n,n|2n}]
1452 }
1453
1454 if(mEtaPOI>0&&dMult>3)
1455 {
1456 fourDiffEta1n1n1n1nPOI = ((dQ1nx*dQ1nx+dQ1ny*dQ1ny)*(qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny)-(q2xEtaPOI*(dQ1nx*dQ1nx-dQ1ny*dQ1ny)+2.*q2yEtaPOI*dQ1nx*dQ1ny)-(dQ2nx*(qxEtaPOI*dQ1nx-qyEtaPOI*dQ1ny)+dQ2ny*(qxEtaPOI*dQ1ny+qyEtaPOI*dQ1nx))+(q2xEtaPOI*dQ2nx+q2yEtaPOI*dQ2ny)-2.*(dMult-3.)*(qxEtaPOI*dQ1nx+qyEtaPOI*dQ1ny)-2.*mEtaPOI*(dQ1nx*dQ1nx+dQ1ny*dQ1ny)+2.*(dQ1nx*qxEtaPOI+dQ1ny*qyEtaPOI)+2.*mEtaPOI*(dMult-3.))/(mEtaPOI*(dMult-1.)*(dMult-2.)*(dMult-3.));//to be improved (correct formula)
1457 //f4PerEtaBin1n1n1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,fourDiffEta1n1n1n1nPOI,mEtaPOI*(dMult-1.)*(dMult-2.)*(dMult-3.));//Re[<4'>_{n,n|n,n}]
1458 }
1459
1460 }
1461
1462 fEtaReq1nPOI->Reset();
1463 fEtaImq1nPOI->Reset();
1464 fEtaReq2nPOI->Reset();
1465 fEtaImq2nPOI->Reset();
4057ba99 1466*/
bc92c0cb 1467
1468
1469
1470
1471
1472
1473
1474
1475
bc92c0cb 1476
1477
1478
bc92c0cb 1479
1480
ae733b3b 1481/*
bc92c0cb 1482
bc92c0cb 1483
1484
1485
bc92c0cb 1486
1487
1488
1489
1490
1491
1492
1493
bc92c0cb 1494
bc92c0cb 1495
dee1e0e0 1496
4057ba99 1497 //if(bNestedLoops)to be improved
1498 //{ to be improved
dee1e0e0 1499 //--------------------------------------------------------------------------------------------------------------------------------
1500 //
1501 // **********************
1502 // **** NESTED LOOPS ****
1503 // **********************
1504 //
1505 // Remark 1: multi-particle correlations calculated with nested loops are stored in fDirectCorrelations.
1506 // 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)
1507 //
1508 // binning details of fDirectCorrelations (integrated flow):
1509 //
1510 // 1st bin: <2>_{n|n} = two1n1n
1511 // 2nd bin: <2>_{2n|2n} = two2n2n
1512 // 3rd bin: <2>_{3n|3n} = two3n3n
1513 // 4th bin: <2>_{4n|4n} = two4n4n
1514 // 5th bin: -- EMPTY --
1515 // 6th bin: <3>_{2n|n,n} = three2n1n1n
1516 // 7th bin: <3>_{3n|2n,n} = three3n2n1n
1517 // 8th bin: <3>_{4n|2n,2n} = three4n2n2n
1518 // 9th bin: <3>_{4n|3n,n} = three4n3n1n
1519 //10th bin: -- EMPTY --
1520 //11th bin: <4>_{n,n|n,n} = four1n1n1n1n
1521 //12th bin: <4>_{2n,n|2n,n} = four2n1n2n1n
1522 //13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n
1523 //14th bin: <4>_{3n|n,n,n} = four3n1n1n1n
1524 //15th bin: <4>_{3n,n|3n,n} = four3n1n3n1n
1525 //16th bin: <4>_{3n,n|2n,2n} = four3n1n2n2n
1526 //17th bin: <4>_{4n|2n,n,n} = four4n2n1n1n
1527 //18th bin: -- EMPTY --
1528 //19th bin: <5>_{2n|n,n,n,n} = five2n1n1n1n1n
1529 //20th bin: <5>_{2n,2n|2n,n,n} = five2n2n2n1n1n
1530 //21st bin: <5>_{3n,n|2n,n,n} = five3n1n2n1n1n
1531 //22nd bin: <5>_{4n|n,n,n,n} = five4n1n1n1n1n
1532 //23rd bin: -- EMPTY --
1533 //24th bin: <6>_{n,n,n|n,n,n} = six1n1n1n1n1n1n
1534 //25th bin: <6>_{2n,n,n|2n,n,n} = six2n1n1n2n1n1n
1535 //26th bin: <6>_{2n,2n|n,n,n,n} = six2n2n1n1n1n1n
1536 //27th bin: <6>_{3n,n|n,n,n,n} = six3n1n1n1n1n1n
1537 //28th bin: -- EMPTY --
1538 //29th bin: <7>_{2n,n,n|n,n,n,n} = seven2n1n1n1n1n1n1n
1539 //30th bin: -- EMPTY --
1540 //31st bin: <8>_{n,n,n,n|n,n,n,n} = eight1n1n1n1n1n1n1n1n
1541
1542 Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.;
1543
1544 //<2>_{k*n|k*n} (k=1,2,3 and 4)
1dfa3c16 1545 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1546 {
dee1e0e0 1547 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1548 phi1=fTrack->Phi();
1dfa3c16 1549 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1550 {
dee1e0e0 1551 if(i2==i1)continue;
1552 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1553 phi2=fTrack->Phi();
1315fe58 1554 fDirectCorrelations->Fill(0.,cos(n*(phi1-phi2)),1); //<2>_{n|n}
1555 fDirectCorrelations->Fill(1.,cos(2.*n*(phi1-phi2)),1); //<2>_{2n|2n}
1556 fDirectCorrelations->Fill(2.,cos(3.*n*(phi1-phi2)),1); //<2>_{3n|3n}
1557 fDirectCorrelations->Fill(3.,cos(4.*n*(phi1-phi2)),1); //<2>_{4n|4n}
bc92c0cb 1558 }
1559 }
1560
1315fe58 1561 //<3>_{2n|n,n}, <3>_{3n|2n,n}, <3>_{4n|2n,2n} and <3>_{4n|3n,n}
1dfa3c16 1562 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1563 {
dee1e0e0 1564 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1565 phi1=fTrack->Phi();
1dfa3c16 1566 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1567 {
dee1e0e0 1568 if(i2==i1)continue;
1569 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1570 phi2=fTrack->Phi();
1dfa3c16 1571 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 1572 {
dee1e0e0 1573 if(i3==i1||i3==i2)continue;
1574 fTrack=anEvent->GetTrack(i3);
bc92c0cb 1575 phi3=fTrack->Phi();
1315fe58 1576 fDirectCorrelations->Fill(5.,cos(2*n*phi1-n*(phi2+phi3)),1); //<3>_{2n|n,n}
1577 fDirectCorrelations->Fill(6.,cos(3.*n*phi1-2.*n*phi2-n*phi3),1); //<3>_{3n|2n,n}
1578 fDirectCorrelations->Fill(7.,cos(4.*n*phi1-2.*n*phi2-2.*n*phi3),1); //<3>_{4n|2n,2n}
1579 fDirectCorrelations->Fill(8.,cos(4.*n*phi1-3.*n*phi2-n*phi3),1); //<3>_{4n|3n,n}
bc92c0cb 1580 }
1581 }
1582 }
1583
dee1e0e0 1584 //<4>_{n,n|n,n}, <4>_{2n,n|2n,n}, <4>_{2n,2n|2n,2n}, <4>_{3n|n,n,n}, <4>_{3n,n|3n,n}, <4>_{3n,n|2n,2n} and <4>_{4n|2n,n,n}
1dfa3c16 1585 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1586 {
dee1e0e0 1587 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1588 phi1=fTrack->Phi();
1dfa3c16 1589 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1590 {
dee1e0e0 1591 if(i2==i1)continue;
1592 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1593 phi2=fTrack->Phi();
1dfa3c16 1594 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 1595 {
dee1e0e0 1596 if(i3==i1||i3==i2)continue;
1597 fTrack=anEvent->GetTrack(i3);
bc92c0cb 1598 phi3=fTrack->Phi();
1dfa3c16 1599 for(Int_t i4=0;i4<dMult;i4++)
bc92c0cb 1600 {
dee1e0e0 1601 if(i4==i1||i4==i2||i4==i3)continue;
1602 fTrack=anEvent->GetTrack(i4);
bc92c0cb 1603 phi4=fTrack->Phi();
dee1e0e0 1604 fDirectCorrelations->Fill(10.,cos(n*phi1+n*phi2-n*phi3-n*phi4),1); //<4>_{n,n|n,n}
1605 fDirectCorrelations->Fill(11.,cos(2.*n*phi1+n*phi2-2.*n*phi3-n*phi4),1); //<4>_{2n,n|2n,n}
1606 fDirectCorrelations->Fill(12.,cos(2.*n*phi1+2*n*phi2-2.*n*phi3-2.*n*phi4),1); //<4>_{2n,2n|2n,2n}
1607 fDirectCorrelations->Fill(13.,cos(3.*n*phi1-n*phi2-n*phi3-n*phi4),1); //<4>_{3n|n,n,n}
1608 fDirectCorrelations->Fill(14.,cos(3.*n*phi1+n*phi2-3.*n*phi3-n*phi4),1); //<4>_{3n,n|3n,n}
1609 fDirectCorrelations->Fill(15.,cos(3.*n*phi1+n*phi2-2.*n*phi3-2.*n*phi4),1); //<4>_{3n,n|2n,2n}
1610 fDirectCorrelations->Fill(16.,cos(4.*n*phi1-2.*n*phi2-n*phi3-n*phi4),1); //<4>_{4n|2n,n,n}
bc92c0cb 1611 }
1612 }
1613 }
1614 }
1615
dee1e0e0 1616 //<5>_{2n,n,n,n,n}, //<5>_{2n,2n|2n,n,n}, <5>_{3n,n|2n,n,n} and <5>_{4n|n,n,n,n}
1dfa3c16 1617 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1618 {
dee1e0e0 1619 //cout<<"i1 = "<<i1<<endl;
1620 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1621 phi1=fTrack->Phi();
1dfa3c16 1622 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1623 {
dee1e0e0 1624 if(i2==i1)continue;
1625 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1626 phi2=fTrack->Phi();
1dfa3c16 1627 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 1628 {
dee1e0e0 1629 if(i3==i1||i3==i2)continue;
1630 fTrack=anEvent->GetTrack(i3);
bc92c0cb 1631 phi3=fTrack->Phi();
1dfa3c16 1632 for(Int_t i4=0;i4<dMult;i4++)
bc92c0cb 1633 {
dee1e0e0 1634 if(i4==i1||i4==i2||i4==i3)continue;
1635 fTrack=anEvent->GetTrack(i4);
bc92c0cb 1636 phi4=fTrack->Phi();
1dfa3c16 1637 for(Int_t i5=0;i5<dMult;i5++)
bc92c0cb 1638 {
dee1e0e0 1639 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
1640 fTrack=anEvent->GetTrack(i5);
bc92c0cb 1641 phi5=fTrack->Phi();
dee1e0e0 1642 fDirectCorrelations->Fill(18.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),1); //<5>_{2n,n|n,n,n}
1643 fDirectCorrelations->Fill(19.,cos(2.*n*phi1+2.*n*phi2-2.*n*phi3-n*phi4-n*phi5),1); //<5>_{2n,2n|2n,n,n}
1644 fDirectCorrelations->Fill(20.,cos(3.*n*phi1+n*phi2-2.*n*phi3-n*phi4-n*phi5),1); //<5>_{3n,n|2n,n,n}
1645 fDirectCorrelations->Fill(21.,cos(4.*n*phi1-n*phi2-n*phi3-n*phi4-n*phi5),1); //<5>_{4n|n,n,n,n}
bc92c0cb 1646 }
1647 }
1648 }
1649 }
1650 }
1651
dee1e0e0 1652 //<6>_{n,n,n,n,n,n}, <6>_{2n,n,n|2n,n,n}, <6>_{2n,2n|n,n,n,n} and <6>_{3n,n|n,n,n,n}
1dfa3c16 1653 for(Int_t i1=0;i1<dMult;i1++)
dee1e0e0 1654 {
1655 //cout<<"i1 = "<<i1<<endl;
1656 fTrack=anEvent->GetTrack(i1);
1657 phi1=fTrack->Phi();
1dfa3c16 1658 for(Int_t i2=0;i2<dMult;i2++)
dee1e0e0 1659 {
1660 if(i2==i1)continue;
1661 fTrack=anEvent->GetTrack(i2);
1662 phi2=fTrack->Phi();
1dfa3c16 1663 for(Int_t i3=0;i3<dMult;i3++)
dee1e0e0 1664 {
1665 if(i3==i1||i3==i2)continue;
1666 fTrack=anEvent->GetTrack(i3);
1667 phi3=fTrack->Phi();
1dfa3c16 1668 for(Int_t i4=0;i4<dMult;i4++)
dee1e0e0 1669 {
1670 if(i4==i1||i4==i2||i4==i3)continue;
1671 fTrack=anEvent->GetTrack(i4);
1672 phi4=fTrack->Phi();
1dfa3c16 1673 for(Int_t i5=0;i5<dMult;i5++)
dee1e0e0 1674 {
1675 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
1676 fTrack=anEvent->GetTrack(i5);
1677 phi5=fTrack->Phi();
1dfa3c16 1678 for(Int_t i6=0;i6<dMult;i6++)
dee1e0e0 1679 {
1680 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
1681 fTrack=anEvent->GetTrack(i6);
1682 phi6=fTrack->Phi();
1683 fDirectCorrelations->Fill(23.,cos(n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6),1); //<6>_{n,n,n|n,n,n}
1684 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}
1685 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}
1686 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}
1687 }
1688 }
1689 }
1690 }
1691 }
1692 }
52021ae2 1693
dee1e0e0 1694 //<7>_{2n,n,n|n,n,n,n}
1dfa3c16 1695 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 1696 {
dee1e0e0 1697 //cout<<"i1 = "<<i1<<endl;
1698 fTrack=anEvent->GetTrack(i1);
bc92c0cb 1699 phi1=fTrack->Phi();
1dfa3c16 1700 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 1701 {
dee1e0e0 1702 if(i2==i1)continue;
1703 fTrack=anEvent->GetTrack(i2);
bc92c0cb 1704 phi2=fTrack->Phi();
1dfa3c16 1705 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 1706 {
dee1e0e0 1707 if(i3==i1||i3==i2)continue;
1708 fTrack=anEvent->GetTrack(i3);
bc92c0cb 1709 phi3=fTrack->Phi();
1dfa3c16 1710 for(Int_t i4=0;i4<dMult;i4++)
bc92c0cb 1711 {
dee1e0e0 1712 if(i4==i1||i4==i2||i4==i3)continue;
1713 fTrack=anEvent->GetTrack(i4);
bc92c0cb 1714 phi4=fTrack->Phi();
1dfa3c16 1715 for(Int_t i5=0;i5<dMult;i5++)
bc92c0cb 1716 {
dee1e0e0 1717 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
1718 fTrack=anEvent->GetTrack(i5);
bc92c0cb 1719 phi5=fTrack->Phi();
1dfa3c16 1720 for(Int_t i6=0;i6<dMult;i6++)
bc92c0cb 1721 {
dee1e0e0 1722 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
1723 fTrack=anEvent->GetTrack(i6);
bc92c0cb 1724 phi6=fTrack->Phi();
1dfa3c16 1725 for(Int_t i7=0;i7<dMult;i7++)
dee1e0e0 1726 {
1727 if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;
1728 fTrack=anEvent->GetTrack(i7);
1729 phi7=fTrack->Phi();
1730 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}
1731 }
bc92c0cb 1732 }
1733 }
1734 }
1735 }
1736 }
1737 }
52021ae2 1738
dee1e0e0 1739 //<8>_{n,n,n,n|n,n,n,n}
1dfa3c16 1740 for(Int_t i1=0;i1<dMult;i1++)
dee1e0e0 1741 {
1742 cout<<"i1 = "<<i1<<endl;
1743 fTrack=anEvent->GetTrack(i1);
1744 phi1=fTrack->Phi();
1dfa3c16 1745 for(Int_t i2=0;i2<dMult;i2++)
dee1e0e0 1746 {
1747 if(i2==i1)continue;
1748 fTrack=anEvent->GetTrack(i2);
1749 phi2=fTrack->Phi();
1dfa3c16 1750 for(Int_t i3=0;i3<dMult;i3++)
dee1e0e0 1751 {
1752 if(i3==i1||i3==i2)continue;
1753 fTrack=anEvent->GetTrack(i3);
1754 phi3=fTrack->Phi();
1dfa3c16 1755 for(Int_t i4=0;i4<dMult;i4++)
dee1e0e0 1756 {
1757 if(i4==i1||i4==i2||i4==i3)continue;
1758 fTrack=anEvent->GetTrack(i4);
1759 phi4=fTrack->Phi();
1dfa3c16 1760 for(Int_t i5=0;i5<dMult;i5++)
dee1e0e0 1761 {
1762 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
1763 fTrack=anEvent->GetTrack(i5);
1764 phi5=fTrack->Phi();
1dfa3c16 1765 for(Int_t i6=0;i6<dMult;i6++)
dee1e0e0 1766 {
1767 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
1768 fTrack=anEvent->GetTrack(i6);
1769 phi6=fTrack->Phi();
1dfa3c16 1770 for(Int_t i7=0;i7<dMult;i7++)
dee1e0e0 1771 {
1772 if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;
1773 fTrack=anEvent->GetTrack(i7);
1774 phi7=fTrack->Phi();
1dfa3c16 1775 for(Int_t i8=0;i8<dMult;i8++)
dee1e0e0 1776 {
1777 if(i8==i1||i8==i2||i8==i3||i8==i4||i8==i5||i8==i6||i8==i7)continue;
1778 fTrack=anEvent->GetTrack(i8);
1779 phi8=fTrack->Phi();
1780 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}
1781 }
1782 }
1783 }
1784 }
1785 }
1786 }
1787 }
1788 }
bc92c0cb 1789
dee1e0e0 1790 // binning details of fDirectCorrelations (differential flow):
1791 //
bc92c0cb 1792 //41st bin: <2'>_{n|n}
1793 //42nd bin: <2'>_{2n|2n}
4057ba99 1794 //43rd bin: <2'>_{3n|3n}
1795 //44th bin: <2'>_{4n|4n}
bc92c0cb 1796 //46th bin: <3'>_{2n|n,n}
1797 //47th bin: <3'>_{n,n|2n}
1798 //51st bin: <4'>_{n,n|n,n}
4057ba99 1799 //56th bin: <5'>_{2n,n|n,n,n}
1800 //61st bin: <6'>_{n,n,n|n,n,n}
1801 //66th bin: <7'>_{2n,n,n|n,n,n,n}
1802 //71st bin: <8'>_{n,n,n,n|n,n,n,n}
1803
bc92c0cb 1804
1805 //<2'>_{n|n}
4057ba99 1806 for(Int_t i1=0;i1<nPrim;i1++)
bc92c0cb 1807 {
dee1e0e0 1808 fTrack=anEvent->GetTrack(i1);
4057ba99 1809 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->UseForDifferentialFlow())))continue;//POI condition
1810 phi1=fTrack->Phi();
1811 for(Int_t i2=0;i2<nPrim;i2++)
bc92c0cb 1812 {
4057ba99 1813 if(i2==i1)continue;
1814 fTrack=anEvent->GetTrack(i2);
1815 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1816 phi2=fTrack->Phi();
1817 //cout<<"1st = "<<i1<<" "<< (anEvent->GetTrack(i1))->Eta() << " " << (anEvent->GetTrack(i1))->Pt()<<endl;
1818 //cout<<"2nd = "<<i2<<" "<< (anEvent->GetTrack(i2))->Eta() << " " << (anEvent->GetTrack(i2))->Pt()<<endl;
1819 //fill the fDirectCorrelations:
1820 fDirectCorrelations->Fill(40.,cos(1.*n*(phi1-phi2)),1);//<2'>_{n,n}
1821 fDirectCorrelations->Fill(41.,cos(2.*n*(phi1-phi2)),1);//<2'>_{2n,2n}
1822 fDirectCorrelations->Fill(42.,cos(3.*n*(phi1-phi2)),1);//<2'>_{3n,3n}
1823 fDirectCorrelations->Fill(43.,cos(4.*n*(phi1-phi2)),1);//<2'>_{4n,4n}
1824 }//end of for(Int_t i2=0;i2<nPrim;i2++)
1825 }//end of for(Int_t i1=0;i1<nPrim;i1++)
1826
bc92c0cb 1827 //<3'>_{2n|n,n}
4057ba99 1828 for(Int_t i1=0;i1<nPrim;i1++)
bc92c0cb 1829 {
dee1e0e0 1830 fTrack=anEvent->GetTrack(i1);
4057ba99 1831 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->UseForDifferentialFlow())))continue;//POI condition
1832 phi1=fTrack->Phi();
1833 for(Int_t i2=0;i2<nPrim;i2++)
bc92c0cb 1834 {
4057ba99 1835 if(i2==i1)continue;
1836 fTrack=anEvent->GetTrack(i2);
1837 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1838 phi2=fTrack->Phi();
1839 for(Int_t i3=0;i3<nPrim;i3++)
bc92c0cb 1840 {
4057ba99 1841 if(i3==i1||i3==i2)continue;
1842 fTrack=anEvent->GetTrack(i3);
1843 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1844 phi3=fTrack->Phi();
1845 //fill the fDirectCorrelations:
1846 fDirectCorrelations->Fill(45.,cos(n*(2.*phi1-phi2-phi3)),1);//<3'>_{2n|n,n}
1847 fDirectCorrelations->Fill(46.,cos(n*(phi1+phi2-2.*phi3)),1);//<3'>_{n,n|2n}
1848 }//end of for(Int_t i3=0;i3<nPrim;i3++)
1849 }//end of for(Int_t i2=0;i2<nPrim;i2++)
1850 }//end of for(Int_t i1=0;i1<nPrim;i1++)
bc92c0cb 1851
1852 //<4'>_{n,n|n,n}
4057ba99 1853 for(Int_t i1=0;i1<nPrim;i1++)
bc92c0cb 1854 {
dee1e0e0 1855 fTrack=anEvent->GetTrack(i1);
4057ba99 1856 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->UseForDifferentialFlow())))continue;//POI condition
1857 phi1=fTrack->Phi();
1858 for(Int_t i2=0;i2<nPrim;i2++)
bc92c0cb 1859 {
4057ba99 1860 if(i2==i1)continue;
1861 fTrack=anEvent->GetTrack(i2);
1862 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1863 phi2=fTrack->Phi();
1864 for(Int_t i3=0;i3<nPrim;i3++)
1865 {
1866 if(i3==i1||i3==i2)continue;
1867 fTrack=anEvent->GetTrack(i3);
1868 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1869 phi3=fTrack->Phi();
1870 for(Int_t i4=0;i4<nPrim;i4++)
bc92c0cb 1871 {
4057ba99 1872 if(i4==i1||i4==i2||i4==i3)continue;
1873 fTrack=anEvent->GetTrack(i4);
1874 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1875 phi4=fTrack->Phi();
1876 //fill the fDirectCorrelations:
1877 fDirectCorrelations->Fill(50.,cos(n*(phi1+phi2-phi3-phi4)),1);//<4'>_{n,n|n,n}
1878 }//end of for(Int_t i4=0;i4<nPrim;i4++)
1879 }//end of for(Int_t i3=0;i3<nPrim;i3++)
1880 }//end of for(Int_t i2=0;i2<nPrim;i2++)
1881 }//end of for(Int_t i1=0;i1<nPrim;i1++)
1882
ae733b3b 1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893 */
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921 /*
1922
1923
1924
4057ba99 1925 //<5'>_{2n,n|n,n,n}
1926 for(Int_t i1=0;i1<nPrim;i1++)
1927 {
1928 fTrack=anEvent->GetTrack(i1);
1929 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->UseForDifferentialFlow())))continue;//POI condition
1930 phi1=fTrack->Phi();
1931 for(Int_t i2=0;i2<nPrim;i2++)
1932 {
1933 if(i2==i1)continue;
1934 fTrack=anEvent->GetTrack(i2);
1935 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1936 phi2=fTrack->Phi();
1937 for(Int_t i3=0;i3<nPrim;i3++)
1938 {
1939 if(i3==i1||i3==i2)continue;
1940 fTrack=anEvent->GetTrack(i3);
1941 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1942 phi3=fTrack->Phi();
1943 for(Int_t i4=0;i4<nPrim;i4++)
1944 {
1945 if(i4==i1||i4==i2||i4==i3)continue;
1946 fTrack=anEvent->GetTrack(i4);
1947 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
ae733b3b 1948 phi4=fTrack->Phi();//
4057ba99 1949 for(Int_t i5=0;i5<nPrim;i5++)
bc92c0cb 1950 {
4057ba99 1951 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
1952 fTrack=anEvent->GetTrack(i5);
1953 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1954 phi5=fTrack->Phi();
1955 //fill the fDirectCorrelations:if(bNestedLoops)
1956 fDirectCorrelations->Fill(55.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),1);//<5'>_{2n,n|n,n,n}
1957 }//end of for(Int_t i5=0;i5<nPrim;i5++)
1958 }//end of for(Int_t i4=0;i4<nPrim;i4++)
1959 }//end of for(Int_t i3=0;i3<nPrim;i3++)
1960 }//end of for(Int_t i2=0;i2<nPrim;i2++)
1961 }//end of for(Int_t i1=0;i1<nPrim;i1++)
1962
1963 //<6'>_{n,n,n|n,n,n}
1964 for(Int_t i1=0;i1<nPrim;i1++)
1965 {
1966 fTrack=anEvent->GetTrack(i1);
1967 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->UseForDifferentialFlow())))continue;//POI condition
1968 phi1=fTrack->Phi();
1969 for(Int_t i2=0;i2<nPrim;i2++)
1970 {
1971 if(i2==i1)continue;
1972 fTrack=anEvent->GetTrack(i2);
1973 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1974 phi2=fTrack->Phi();
1975 for(Int_t i3=0;i3<nPrim;i3++)
1976 {
1977 if(i3==i1||i3==i2)continue;
1978 fTrack=anEvent->GetTrack(i3);
1979 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1980 phi3=fTrack->Phi();
1981 for(Int_t i4=0;i4<nPrim;i4++)
1982 {
1983 if(i4==i1||i4==i2||i4==i3)continue;
1984 fTrack=anEvent->GetTrack(i4);
1985 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1986 phi4=fTrack->Phi();
1987 for(Int_t i5=0;i5<nPrim;i5++)
1988 {
1989 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
1990 fTrack=anEvent->GetTrack(i5);
1991 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1992 phi5=fTrack->Phi();
1993 for(Int_t i6=0;i6<nPrim;i6++)
1994 {
1995 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
1996 fTrack=anEvent->GetTrack(i6);
1997 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
1998 phi6=fTrack->Phi();
1999 //fill the fDirectCorrelations:
2000 fDirectCorrelations->Fill(60.,cos(n*(phi1+phi2+phi3-phi4-phi5-phi6)),1);//<6'>_{n,n,n|n,n,n}
2001 }//end of for(Int_t i6=0;i6<nPrim;i6++)
2002 }//end of for(Int_t i5=0;i5<nPrim;i5++)
2003 }//end of for(Int_t i4=0;i4<nPrim;i4++)
2004 }//end of for(Int_t i3=0;i3<nPrim;i3++)
2005 }//end of for(Int_t i2=0;i2<nPrim;i2++)
2006 }//end of for(Int_t i1=0;i1<nPrim;i1++)
2007
2008 //<7'>_{2n,n,n|n,n,n,n}
2009 for(Int_t i1=0;i1<nPrim;i1++)
2010 {
2011 fTrack=anEvent->GetTrack(i1);
2012 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->UseForDifferentialFlow())))continue;//POI condition
2013 phi1=fTrack->Phi();
2014 for(Int_t i2=0;i2<nPrim;i2++)
2015 {
2016 if(i2==i1)continue;
2017 fTrack=anEvent->GetTrack(i2);
2018 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2019 phi2=fTrack->Phi();
2020 for(Int_t i3=0;i3<nPrim;i3++)
2021 {
2022 if(i3==i1||i3==i2)continue;
2023 fTrack=anEvent->GetTrack(i3);
2024 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2025 phi3=fTrack->Phi();
2026 for(Int_t i4=0;i4<nPrim;i4++)
2027 {
2028 if(i4==i1||i4==i2||i4==i3)continue;
2029 fTrack=anEvent->GetTrack(i4);
2030 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2031 phi4=fTrack->Phi();
2032 for(Int_t i5=0;i5<nPrim;i5++)
2033 {
2034 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
2035 fTrack=anEvent->GetTrack(i5);
2036 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2037 phi5=fTrack->Phi();
2038 for(Int_t i6=0;i6<nPrim;i6++)
2039 {
2040 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
2041 fTrack=anEvent->GetTrack(i6);
2042 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2043 phi6=fTrack->Phi();
2044 for(Int_t i7=0;i7<nPrim;i7++)
2045 {
2046 if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;
2047 fTrack=anEvent->GetTrack(i7);
2048 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2049 phi7=fTrack->Phi();
2050 //fill the fDirectCorrelations:
2051 fDirectCorrelations->Fill(65.,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}
2052 }//end of for(Int_t i7=0;i7<nPrim;i7++)
2053 }//end of for(Int_t i6=0;i6<nPrim;i6++)
2054 }//end of for(Int_t i5=0;i5<nPrim;i5++)
2055 }//end of for(Int_t i4=0;i4<nPrim;i4++)
2056 }//end of for(Int_t i3=0;i3<nPrim;i3++)
2057 }//end of for(Int_t i2=0;i2<nPrim;i2++)
2058 }//end of for(Int_t i1=0;i1<nPrim;i1++)
2059
2060 //<8'>_{n,n,n,n|n,n,n,n}
2061 for(Int_t i1=0;i1<nPrim;i1++)
2062 {
2063 fTrack=anEvent->GetTrack(i1);
2064 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->UseForDifferentialFlow())))continue;//POI condition
2065 phi1=fTrack->Phi();
2066 for(Int_t i2=0;i2<nPrim;i2++)
2067 {
2068 if(i2==i1)continue;
2069 fTrack=anEvent->GetTrack(i2);
2070 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2071 phi2=fTrack->Phi();
2072 for(Int_t i3=0;i3<nPrim;i3++)
2073 {
2074 if(i3==i1||i3==i2)continue;
2075 fTrack=anEvent->GetTrack(i3);
2076 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2077 phi3=fTrack->Phi();
2078 for(Int_t i4=0;i4<nPrim;i4++)
2079 {
2080 if(i4==i1||i4==i2||i4==i3)continue;
2081 fTrack=anEvent->GetTrack(i4);
2082 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2083 phi4=fTrack->Phi();
2084 for(Int_t i5=0;i5<nPrim;i5++)
2085 {
2086 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
2087 fTrack=anEvent->GetTrack(i5);
2088 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2089 phi5=fTrack->Phi();
2090 for(Int_t i6=0;i6<nPrim;i6++)
2091 {
2092 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
2093 fTrack=anEvent->GetTrack(i6);
2094 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2095 phi6=fTrack->Phi();
2096 for(Int_t i7=0;i7<nPrim;i7++)
2097 {
2098 if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;
2099 fTrack=anEvent->GetTrack(i7);
2100 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2101 phi7=fTrack->Phi();
2102 for(Int_t i8=0;i8<nPrim;i8++)
2103 {
2104 if(i8==i1||i8==i2||i8==i3||i8==i4||i8==i5||i8==i6||i8==i7)continue;
2105 fTrack=anEvent->GetTrack(i8);
2106 if(!(fTrack->UseForIntegratedFlow()))continue;//RP condition
2107 phi8=fTrack->Phi();
2108 //fill the fDirectCorrelations:
2109 fDirectCorrelations->Fill(70.,cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8)),1);//<8'>_{n,n,n,n|n,n,n,n}
2110 }//end of for(Int_t i8=0;i8<nPrim;i8++)
2111 }//end of for(Int_t i7=0;i7<nPrim;i7++)
2112 }//end of for(Int_t i6=0;i6<nPrim;i6++)
2113 }//end of for(Int_t i5=0;i5<nPrim;i5++)
2114 }//end of for(Int_t i4=0;i4<nPrim;i4++)
2115 }//end of for(Int_t i3=0;i3<nPrim;i3++)
2116 }//end of for(Int_t i2=0;i2<nPrim;i2++)
2117 }//end of for(Int_t i1=0;i1<nPrim;i1++)
2118
2119
2120
2121 */
2122
2123
2124//--------------------------------------------------------------------------------------------------------------------------------
bc92c0cb 2125
4057ba99 2126 //}//end of if(nPrim>0&&nPrim<12)
bc92c0cb 2127}//end of Make()
2128
2129//================================================================================================================
2130
2131void AliFlowAnalysisWithQCumulants::Finish()
2132{
1315fe58 2133 //calculate the final results
4057ba99 2134 AliQCumulantsFunctions finalResults(fIntFlowResultsQC,fDiffFlowResults2ndOrderQC,fDiffFlowResults4thOrderQC,fCovariances,fAvMultIntFlowQC,fQvectorComponents,fQCorrelations, fQProduct,fDirectCorrelations,f2PerPtBin1n1nRP,f2PerPtBin2n2nRP,f3PerPtBin2n1n1nRP,f3PerPtBin1n1n2nRP,f4PerPtBin1n1n1n1nRP, f2PerEtaBin1n1nRP,f2PerEtaBin2n2nRP,f3PerEtaBin2n1n1nRP,f3PerEtaBin1n1n2nRP,f4PerEtaBin1n1n1n1nRP,f2PerPtBin1n1nPOI,f2PerPtBin2n2nPOI,f3PerPtBin2n1n1nPOI,f3PerPtBin1n1n2nPOI,f4PerPtBin1n1n1n1nPOI, f2PerEtaBin1n1nPOI,f2PerEtaBin2n2nPOI,f3PerEtaBin2n1n1nPOI,f3PerEtaBin1n1n2nPOI,f4PerEtaBin1n1n1n1nPOI,fCommonHists2nd,fCommonHists4th, fCommonHists6th, fCommonHists8th,fCommonHistsResults2nd, fCommonHistsResults4th,fCommonHistsResults6th,fCommonHistsResults8th);
7e58a232 2135
e085f1a9 2136 finalResults.Calculate();
2137
2138
2139 /*
2140
2141
2142 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2143 // !!!! to be removed !!!!
2144
2145 TCanvas* qvectorPlot = new TCanvas("qvectorPlot","Q-vector Plot",1000,1000);
2146
2147 qvectorPlot->cd(1);
2148
2149 TH1D* style = new TH1D("style","Q-vectors",100,-244,244);
2150 (style->GetYaxis())->SetRangeUser(-244,244);
2151
2152 style->Draw();
2153
2154 Int_t nBins=fQvectorForEachEventX->GetNbinsX();
2155 Double_t qxxx=0.,qyyy=0.;
2156 //cout<<"nBins = "<<nBins<<endl;
2157 //cout<<fQvectorForEachEventX->GetBinEntries(4)<<endl;
2158 //cout<<fQvectorForEachEventY->GetBinEntries(4)<<endl;
2159
2160 for(Int_t b=1;b<nBins+1;b++)
2161 {
2162 if(fQvectorForEachEventX->GetBinEntries(b)==1 && fQvectorForEachEventY->GetBinEntries(b)==1)
2163 {
2164 qxxx=fQvectorForEachEventX->GetBinContent(b);
2165 qyyy=fQvectorForEachEventY->GetBinContent(b);
2166 //cout<<qxxx<<" "<<qyyy<<endl;
2167 TArrow *qvector = new TArrow(0.0,0.0,qxxx,qyyy,0.0144,"|>");
2168 qvector->SetAngle(40);
2169 qvector->SetLineWidth(2);
2170 qvector->Draw("");
2171 }
2172 }
2173
2174 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2175
2176 */
2177
bc92c0cb 2178}
2179
1315fe58 2180//================================================================================================================
bc92c0cb 2181
4057ba99 2182void AliFlowAnalysisWithQCumulants::WriteHistograms(TString outputFileName)
1315fe58 2183{
2184 //store the final results in output .root file
4057ba99 2185 TFile *output = new TFile(outputFileName.Data(),"RECREATE");
7a2c2652 2186 output->WriteObject(fHistList, "cobjQC","SingleKey");
1315fe58 2187 delete output;
2188}
bc92c0cb 2189
1315fe58 2190//================================================================================================================
dee1e0e0 2191
4057ba99 2192
2193