]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithQCumulants.cxx
more consistent names
[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"
3d824203 46#include "TArrayD.h"
bc92c0cb 47#include "TRandom.h"
48
49class TH1;
50class TGraph;
51class TPave;
52class TLatex;
53class TMarker;
54class TRandom3;
55class TObjArray;
56class TList;
57class TCanvas;
58class TSystem;
59class TROOT;
60class AliFlowVector;
61class TVector;
62
63//================================================================================================================
64
65ClassImp(AliFlowAnalysisWithQCumulants)
66
67AliFlowAnalysisWithQCumulants::AliFlowAnalysisWithQCumulants():
68 fTrack(NULL),
69 fHistList(NULL),
ae733b3b 70 fDiffFlowList(NULL),
03a02aca 71 fWeightsList(NULL),
1315fe58 72 fAvMultIntFlowQC(NULL),
bc92c0cb 73 fQvectorComponents(NULL),
1315fe58 74 fIntFlowResultsQC(NULL),
75 fDiffFlowResults2ndOrderQC(NULL),
76 fDiffFlowResults4thOrderQC(NULL),
77 fCovariances(NULL),
e085f1a9 78 fQvectorForEachEventX(NULL),//to be removed
79 fQvectorForEachEventY(NULL),//to be removed
bc92c0cb 80 fQCorrelations(NULL),
77515452 81 fWeightedQCorrelations(NULL),
8842fb2b 82 fQProduct(NULL),
bc92c0cb 83 fDirectCorrelations(NULL),
1dfa3c16 84 f2PerPtBin1n1nPOI(NULL),
1dfa3c16 85 f4PerPtBin1n1n1n1nPOI(NULL),
1dfa3c16 86 f2PerEtaBin1n1nPOI(NULL),
1dfa3c16 87 f4PerEtaBin1n1n1n1nPOI(NULL),
3d824203 88 f2WPerPtBin1n1nPOI(NULL),
3d824203 89 f4WPerPtBin1n1n1n1nPOI(NULL),
3d824203 90 f2WPerEtaBin1n1nPOI(NULL),
91 f4WPerEtaBin1n1n1n1nPOI(NULL),
77515452 92 f2PerPtBin1n1nRP(NULL),
93 f4PerPtBin1n1n1n1nRP(NULL),
94 f2PerEtaBin1n1nRP(NULL),
95 f4PerEtaBin1n1n1n1nRP(NULL),
3d824203 96 f2WPerPtBin1n1nRP(NULL),
97 f4WPerPtBin1n1n1n1nRP(NULL),
3d824203 98 f2WPerEtaBin1n1nRP(NULL),
99 f4WPerEtaBin1n1n1n1nRP(NULL),
cb308e83 100 fCommonHists2nd(NULL),
101 fCommonHists4th(NULL),
102 fCommonHists6th(NULL),
103 fCommonHists8th(NULL),
8842fb2b 104 fCommonHistsResults2nd(NULL),
105 fCommonHistsResults4th(NULL),
106 fCommonHistsResults6th(NULL),
107 fCommonHistsResults8th(NULL),
52021ae2 108 f2pDistribution(NULL),
109 f4pDistribution(NULL),
110 f6pDistribution(NULL),
5e838eeb 111 f8pDistribution(NULL),
8842fb2b 112 fnBinsPt(0),
113 fPtMin(0),
1dfa3c16 114 fPtMax(0),
115 fnBinsEta(0),
116 fEtaMin(0),
e085f1a9 117 fEtaMax(0),
118 fEventCounter(0),
119 fUsePhiWeights(kFALSE),
120 fUsePtWeights(kFALSE),
03a02aca 121 fUseEtaWeights(kFALSE)
bc92c0cb 122{
123 //constructor
ae733b3b 124 fHistList = new TList();
125 fDiffFlowList = new TList();
126 fDiffFlowList->SetName("DifferentialFlow");
03a02aca 127 fWeightsList = new TList();
ae733b3b 128 fWeightsList->SetName("Weights");
03a02aca 129
8842fb2b 130 fnBinsPt = AliFlowCommonConstants::GetNbinsPt();
131 fPtMin = AliFlowCommonConstants::GetPtMin();
132 fPtMax = AliFlowCommonConstants::GetPtMax();
133
1dfa3c16 134 fnBinsEta = AliFlowCommonConstants::GetNbinsEta();
135 fEtaMin = AliFlowCommonConstants::GetEtaMin();
136 fEtaMax = AliFlowCommonConstants::GetEtaMax();
bc92c0cb 137}
138
139AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants()
140{
03a02aca 141 //destructor
bc92c0cb 142 delete fHistList;
ae733b3b 143 delete fDiffFlowList;
144 delete fWeightsList;
bc92c0cb 145}
146
147//================================================================================================================
148
e085f1a9 149void AliFlowAnalysisWithQCumulants::Init()
bc92c0cb 150{
151 //various output histograms
bc92c0cb 152 //avarage multiplicity
1315fe58 153 fAvMultIntFlowQC = new TProfile("fAvMultIntFlowQC","Average Multiplicity",1,0,1,"s");
154 fAvMultIntFlowQC->SetXTitle("");
155 fAvMultIntFlowQC->SetYTitle("");
156 fAvMultIntFlowQC->SetLabelSize(0.06);
157 fAvMultIntFlowQC->SetMarkerStyle(25);
158 fAvMultIntFlowQC->SetLabelOffset(0.01);
159 (fAvMultIntFlowQC->GetXaxis())->SetBinLabel(1,"Average Multiplicity");
160 fHistList->Add(fAvMultIntFlowQC);
bc92c0cb 161
162 //Q-vector stuff
163 fQvectorComponents = new TProfile("fQvectorComponents","Avarage of Q-vector components",44,0.,44.,"s");
164 fQvectorComponents->SetXTitle("");
165 fQvectorComponents->SetYTitle("");
166 //fHistList->Add(fQvectorComponents);
167
168 //final results for integrated flow from Q-cumulants
1315fe58 169 fIntFlowResultsQC = new TH1D("fIntFlowResultsQC","Integrated Flow from Q-cumulants",4,0,4);
170 //fIntFlowResults->SetXTitle("");
3d824203 171 //fIntFlowResultsQC->SetYTitle("IntegFALSrated Flow");
1315fe58 172 fIntFlowResultsQC->SetLabelSize(0.06);
52021ae2 173 //fIntFlowResultsQC->SetTickLength(1);
1315fe58 174 fIntFlowResultsQC->SetMarkerStyle(25);
175 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(1,"v_{n}{2}");
176 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(2,"v_{n}{4}");
177 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(3,"v_{n}{6}");
178 (fIntFlowResultsQC->GetXaxis())->SetBinLabel(4,"v_{n}{8}");
1315fe58 179 fHistList->Add(fIntFlowResultsQC);
180
bc92c0cb 181 //final results for differential flow from 2nd order Q-cumulant
8842fb2b 182 fDiffFlowResults2ndOrderQC = new TH1D("fDiffFlowResults2ndOrderQC","Differential Flow from 2nd Order Q-cumulant",fnBinsPt,fPtMin,fPtMax);
1315fe58 183 fDiffFlowResults2ndOrderQC->SetXTitle("p_{t} [GeV]");
184 //fDiffFlowResults2ndOrderQC->SetYTitle("Differential Flow");
185 fHistList->Add(fDiffFlowResults2ndOrderQC);
bc92c0cb 186
187 //final results for differential flow from 4th order Q-cumulant
8842fb2b 188 fDiffFlowResults4thOrderQC = new TH1D("fDiffFlowResults4thOrderQC","Differential Flow from 4th Order Q-cumulant",fnBinsPt,fPtMin,fPtMax);
1315fe58 189 fDiffFlowResults4thOrderQC->SetXTitle("p_{t} [GeV]");
190 //fDiffFlowResults4thOrderQC->SetYTitle("Differential Flow");
191 fHistList->Add(fDiffFlowResults4thOrderQC);
192
193 //final results for covariances (1st bin: <2*4>-<2>*<4>, 2nd bin: <2*6>-<2>*<6>, ...)
194 fCovariances = new TH1D("fCovariances","Covariances",6,0,6);
195 //fCovariances->SetXTitle("");
196 //fCovariances->SetYTitle("<covariance>");
197 fCovariances->SetLabelSize(0.04);
198 fCovariances->SetTickLength(1);
199 fCovariances->SetMarkerStyle(25);
200 (fCovariances->GetXaxis())->SetBinLabel(1,"Cov(2,4)");
201 (fCovariances->GetXaxis())->SetBinLabel(2,"Cov(2,6)");
202 (fCovariances->GetXaxis())->SetBinLabel(3,"Cov(2,8)");
203 (fCovariances->GetXaxis())->SetBinLabel(4,"Cov(4,6)");
204 (fCovariances->GetXaxis())->SetBinLabel(5,"Cov(4,8)");
205 (fCovariances->GetXaxis())->SetBinLabel(6,"Cov(6,8)");
206 fHistList->Add(fCovariances);
bc92c0cb 207
e085f1a9 208 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
209 // !!!! to be removed !!!!
210 //profile containing the x-components of Q-vectors from all events
211 fQvectorForEachEventX = new TProfile("fQvectorForEachEventX","x-components of Q-vectors",44000,1,44000,"s");
212 fHistList->Add(fQvectorForEachEventX);
213
214 //profile containing the y-components of Q-vectors from all events
215 fQvectorForEachEventY = new TProfile("fQvectorForEachEventY","y-components of Q-vectors",44000,1,44000,"s");
216 fHistList->Add(fQvectorForEachEventY);
217 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
218
bc92c0cb 219 //multi-particle correlations calculated from Q-vectors
dee1e0e0 220 fQCorrelations = new TProfile("fQCorrelations","multi-particle correlations from Q-vectors",32,0,32,"s");
1315fe58 221 //fQCorrelations->SetXTitle("correlations");
222 //fQCorrelations->SetYTitle("");
223 fQCorrelations->SetTickLength(-0.01,"Y");
224 fQCorrelations->SetMarkerStyle(25);
225 fQCorrelations->SetLabelSize(0.03);
226 fQCorrelations->SetLabelOffset(0.01,"Y");
dee1e0e0 227
1315fe58 228 (fQCorrelations->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}");
229 (fQCorrelations->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}");
230 (fQCorrelations->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}");
231 (fQCorrelations->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}");
dee1e0e0 232
1315fe58 233 (fQCorrelations->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}");
234 (fQCorrelations->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}");
235 (fQCorrelations->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}");
236 (fQCorrelations->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}");
dee1e0e0 237
1315fe58 238 (fQCorrelations->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}");
239 (fQCorrelations->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}");
dee1e0e0 240 (fQCorrelations->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}");
241 (fQCorrelations->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}");
242 (fQCorrelations->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}");
243 (fQCorrelations->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}");
244 (fQCorrelations->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}");
245
246 (fQCorrelations->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}");
247 (fQCorrelations->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}");
248 (fQCorrelations->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}");
249 (fQCorrelations->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}");
250
251 (fQCorrelations->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}");
252 (fQCorrelations->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}");
253 (fQCorrelations->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}");
254 (fQCorrelations->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}");
255
256 (fQCorrelations->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}");
257
258 (fQCorrelations->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}");
259
bc92c0cb 260 fHistList->Add(fQCorrelations);
261
3d824203 262
263
264
265 //weighted multi-particle correlations calculated from Q-vectors
77515452 266 fWeightedQCorrelations = new TProfile("fWeightedQCorrelations","weighted multi-particle correlations from Q-vectors",100,0,100,"s");
267 //fWeightedQCorrelations->SetXTitle("correlations");
268 //fWeightedQCorrelations->SetYTitle("");
269 fWeightedQCorrelations->SetTickLength(-0.01,"Y");
270 fWeightedQCorrelations->SetMarkerStyle(25);
271 fWeightedQCorrelations->SetLabelSize(0.03);
272 fWeightedQCorrelations->SetLabelOffset(0.01,"Y");
3d824203 273
77515452 274 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(1,"<w_{1}w_{2}cos(n(#phi_{1}-#phi_{2}))>");
275 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(2,"<w_{1}^{2}w_{2}^{2}cos(2n(#phi_{1}-#phi_{2}))>");
276 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(3,"<w_{1}^{3}w_{2}^{3}cos(3n(#phi_{1}-#phi_{2}))>");
277 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(4,"<w_{1}^{4}w_{2}^{4}cos(4n(#phi_{1}-#phi_{2}))>");
278 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(5,"<w_{1}^{3}w_{2}cos(n(#phi_{1}-#phi_{2}))>");
279 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(6,"<w_{1}^{2}w_{2}w_{3}cos(n(#phi_{1}-#phi_{2}))>");
3d824203 280
77515452 281 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(11,"<w_{1}w_{2}w_{3}^{2}cos(n(2#phi_{1}-#phi_{2}-#phi_{3}))>");
3d824203 282
77515452 283 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(21,"<w_{1}w_{2}w_{3}w_{4}cos(n(#phi_{1}+#phi_{2}-#phi_{3}-#phi_{4}))>");
3d824203 284
285 /*
77515452 286 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}");
287 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}");
288 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}");
289
290 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}");
291 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}");
292 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}");
293 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}");
294 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}");
295 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}");
296 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}");
297
298 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}");
299 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}");
300 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}");
301 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}");
302
303 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}");
304 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}");
305 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}");
306 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}");
307
308 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}");
309
310 (fWeightedQCorrelations->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}");
3d824203 311 */
312
77515452 313 fHistList->Add(fWeightedQCorrelations);
3d824203 314
315
316
317
8842fb2b 318 //average products
319 fQProduct = new TProfile("fQProduct","average of products",6,0,6,"s");
320 fQProduct->SetTickLength(-0.01,"Y");
321 fQProduct->SetMarkerStyle(25);
322 fQProduct->SetLabelSize(0.03);
323 fQProduct->SetLabelOffset(0.01,"Y");
324 (fQProduct->GetXaxis())->SetBinLabel(1,"<<2*4>>");
325 (fQProduct->GetXaxis())->SetBinLabel(2,"<<2*6>>");
326 (fQProduct->GetXaxis())->SetBinLabel(3,"<<2*8>>");
327 (fQProduct->GetXaxis())->SetBinLabel(4,"<<4*6>>");
328 (fQProduct->GetXaxis())->SetBinLabel(5,"<<4*8>>");
329 (fQProduct->GetXaxis())->SetBinLabel(6,"<<6*8>>");
330 fQProduct->SetXTitle("");
331 fQProduct->SetYTitle("");
332 fHistList->Add(fQProduct);
bc92c0cb 333
3d824203 334 //weighted multi-particle correlations calculated with nested loops (0..100 integrated flow; 100..200 differential flow)
335 fDirectCorrelations = new TProfile("fDirectCorrelations","multi-particle correlations with nested loops",200,0,200,"s");
bc92c0cb 336 fDirectCorrelations->SetXTitle("");
337 fDirectCorrelations->SetYTitle("correlations");
338 fHistList->Add(fDirectCorrelations);
339
1dfa3c16 340 //f2PerPtBin1n1nRP
341 f2PerPtBin1n1nRP = new TProfile("f2PerPtBin1n1nRP","<2'>_{n|n}",fnBinsPt,fPtMin,fPtMax,"s");
342 f2PerPtBin1n1nRP->SetXTitle("p_{t} [GeV]");
ae733b3b 343 fDiffFlowList->Add(f2PerPtBin1n1nRP);
1dfa3c16 344
1dfa3c16 345 //f4PerPtBin1n1n1n1nRP
346 f4PerPtBin1n1n1n1nRP = new TProfile("f4PerPtBin1n1n1n1nRP","<4'>_{n,n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
347 f4PerPtBin1n1n1n1nRP->SetXTitle("p_{t} [GeV]");
ae733b3b 348 fDiffFlowList->Add(f4PerPtBin1n1n1n1nRP);
1dfa3c16 349
1dfa3c16 350 //f2PerEtaBin1n1nRP
351 f2PerEtaBin1n1nRP = new TProfile("f2PerEtaBin1n1nRP","<2'>_{n|n}",fnBinsEta,fEtaMin,fEtaMax,"s");
352 f2PerEtaBin1n1nRP->SetXTitle("#eta");
ae733b3b 353 fDiffFlowList->Add(f2PerEtaBin1n1nRP);
1dfa3c16 354
1dfa3c16 355 //f4PerEtaBin1n1n1n1nRP
356 f4PerEtaBin1n1n1n1nRP = new TProfile("f4PerEtaBin1n1n1n1nRP","<4'>_{n,n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
357 f4PerEtaBin1n1n1n1nRP->SetXTitle("#eta");
ae733b3b 358 fDiffFlowList->Add(f4PerEtaBin1n1n1n1nRP);
1dfa3c16 359
1dfa3c16 360 //f2PerPtBin1n1nPOI
361 f2PerPtBin1n1nPOI = new TProfile("f2PerPtBin1n1nPOI","<2'>_{n|n}",fnBinsPt,fPtMin,fPtMax,"s");
4057ba99 362 f2PerPtBin1n1nPOI->SetXTitle("#eta");
ae733b3b 363 fDiffFlowList->Add(f2PerPtBin1n1nPOI);
1dfa3c16 364
1dfa3c16 365 //f4PerPtBin1n1n1n1nPOI
366 f4PerPtBin1n1n1n1nPOI = new TProfile("f4PerPtBin1n1n1n1nPOI","<4'>_{n,n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
367 f4PerPtBin1n1n1n1nPOI->SetXTitle("p_{t} [GeV]");
ae733b3b 368 fDiffFlowList->Add(f4PerPtBin1n1n1n1nPOI);
1dfa3c16 369
1dfa3c16 370 //f2PerEtaBin1n1nPOI
371 f2PerEtaBin1n1nPOI = new TProfile("f2PerEtaBin1n1nPOI","<2'>_{n|n}",fnBinsEta,fEtaMin,fEtaMax,"s");
372 f2PerEtaBin1n1nPOI->SetXTitle("#eta");
ae733b3b 373 fDiffFlowList->Add(f2PerEtaBin1n1nPOI);
1dfa3c16 374
1dfa3c16 375 //f4PerEtaBin1n1n1n1nPOI
376 f4PerEtaBin1n1n1n1nPOI = new TProfile("f4PerEtaBin1n1n1n1nPOI","<4'>_{n,n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
377 f4PerEtaBin1n1n1n1nPOI->SetXTitle("#eta");
ae733b3b 378 fDiffFlowList->Add(f4PerEtaBin1n1n1n1nPOI);
bc92c0cb 379
3d824203 380 //f2WPerPtBin1n1nPOI
381 f2WPerPtBin1n1nPOI = new TProfile("f2WPerPtBin1n1nPOI","<2'>_{n|n}",fnBinsPt,fPtMin,fPtMax,"s");
382 f2WPerPtBin1n1nPOI->SetXTitle("#pt");
383 fDiffFlowList->Add(f2WPerPtBin1n1nPOI);
384
3d824203 385 //f4WPerPtBin1n1n1n1nPOI
386 f4WPerPtBin1n1n1n1nPOI = new TProfile("f4WPerPtBin1n1n1n1nPOI","<4'>_{n,n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
387 f4WPerPtBin1n1n1n1nPOI->SetXTitle("#Pt");
388 fDiffFlowList->Add(f4WPerPtBin1n1n1n1nPOI);
389
3d824203 390 //f2WPerEtaBin1n1nPOI
391 f2WPerEtaBin1n1nPOI = new TProfile("f2WPerEtaBin1n1nPOI","<2'>_{n|n}",fnBinsEta,fEtaMin,fEtaMax,"s");
392 f2WPerEtaBin1n1nPOI->SetXTitle("#eta");
393 fDiffFlowList->Add(f2WPerEtaBin1n1nPOI);
394
395 //f4WPerEtaBin1n1n1n1nPOI
396 f4WPerEtaBin1n1n1n1nPOI = new TProfile("f4WPerEtaBin1n1n1n1nPOI","<4'>_{n,n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
397 f4WPerEtaBin1n1n1n1nPOI->SetXTitle("#eta");
398 fDiffFlowList->Add(f4WPerEtaBin1n1n1n1nPOI);
399
3d824203 400 //f2WPerPtBin1n1nRP
401 f2WPerPtBin1n1nRP = new TProfile("f2WPerPtBin1n1nRP","<2'>_{n|n}",fnBinsPt,fPtMin,fPtMax,"s");
402 f2WPerPtBin1n1nRP->SetXTitle("#pt");
403 fDiffFlowList->Add(f2WPerPtBin1n1nRP);
404
405 //f4WPerPtBin1n1n1n1nRP
406 f4WPerPtBin1n1n1n1nRP = new TProfile("f4WPerPtBin1n1n1n1nRP","<4'>_{n,n|n,n}",fnBinsPt,fPtMin,fPtMax,"s");
407 f4WPerPtBin1n1n1n1nRP->SetXTitle("#Pt");
408 fDiffFlowList->Add(f4WPerPtBin1n1n1n1nRP);
409
3d824203 410 //f2WPerEtaBin1n1nRP
411 f2WPerEtaBin1n1nRP = new TProfile("f2WPerEtaBin1n1nRP","<2'>_{n|n}",fnBinsEta,fEtaMin,fEtaMax,"s");
412 f2WPerEtaBin1n1nRP->SetXTitle("#eta");
413 fDiffFlowList->Add(f2WPerEtaBin1n1nRP);
414
415 //f4WPerEtaBin1n1n1n1nRP
416 f4WPerEtaBin1n1n1n1nRP = new TProfile("f4WPerEtaBin1n1n1n1nRP","<4'>_{n,n|n,n}",fnBinsEta,fEtaMin,fEtaMax,"s");
417 f4WPerEtaBin1n1n1n1nRP->SetXTitle("#eta");
418 fDiffFlowList->Add(f4WPerEtaBin1n1n1n1nRP);
419
cb308e83 420 //common control histogram (2nd order)
421 fCommonHists2nd = new AliFlowCommonHist("AliFlowCommonHist2ndOrderQC");
422 fHistList->Add(fCommonHists2nd);
1315fe58 423
cb308e83 424 //common control histogram (4th order)
425 fCommonHists4th = new AliFlowCommonHist("AliFlowCommonHist4thOrderQC");
426 fHistList->Add(fCommonHists4th);
427
428 //common control histogram (6th order)
429 fCommonHists6th = new AliFlowCommonHist("AliFlowCommonHist6thOrderQC");
430 fHistList->Add(fCommonHists6th);
431
432 //common control histogram (8th order)
433 fCommonHists8th = new AliFlowCommonHist("AliFlowCommonHist8thOrderQC");
434 fHistList->Add(fCommonHists8th);
4057ba99 435
8842fb2b 436 //common histograms for final results (2nd order)
1315fe58 437 fCommonHistsResults2nd = new AliFlowCommonHistResults("AliFlowCommonHistResults2ndOrderQC");
438 fHistList->Add(fCommonHistsResults2nd);
439
8842fb2b 440 //common histograms for final results (4th order)
1315fe58 441 fCommonHistsResults4th = new AliFlowCommonHistResults("AliFlowCommonHistResults4thOrderQC");
442 fHistList->Add(fCommonHistsResults4th);
443
8842fb2b 444 //common histograms for final results (6th order)
1315fe58 445 fCommonHistsResults6th = new AliFlowCommonHistResults("AliFlowCommonHistResults6thOrderQC");
446 fHistList->Add(fCommonHistsResults6th);
447
8842fb2b 448 //common histograms for final results (8th order)
1315fe58 449 fCommonHistsResults8th = new AliFlowCommonHistResults("AliFlowCommonHistResults8thOrderQC");
450 fHistList->Add(fCommonHistsResults8th);
1315fe58 451
452 //weighted <2>_{n|n} distribution
52021ae2 453 f2pDistribution = new TH1D("f2pDistribution","<2>_{n|n} distribution",100000,-0.02,0.1);
454 f2pDistribution->SetXTitle("<2>_{n|n}");
455 f2pDistribution->SetYTitle("Counts");
456 fHistList->Add(f2pDistribution);
1315fe58 457
458 //weighted <4>_{n,n|n,n} distribution
52021ae2 459 f4pDistribution = new TH1D("f4pDistribution","<4>_{n,n|n,n} distribution",100000,-0.00025,0.002);
460 f4pDistribution->SetXTitle("<4>_{n,n|n,n}");
461 f4pDistribution->SetYTitle("Counts");
462 fHistList->Add(f4pDistribution);
1315fe58 463
464 //weighted <6>_{n,n,n|n,n,n} distribution
52021ae2 465 f6pDistribution = new TH1D("f6pDistribution","<6>_{n,n,n|n,n,n} distribution",100000,-0.000005,0.000025);
466 f6pDistribution->SetXTitle("<6>_{n,n,n|n,n,n}");
467 f6pDistribution->SetYTitle("Counts");
468 fHistList->Add(f6pDistribution);
bc92c0cb 469
5e838eeb 470 //weighted <8>_{n,n,n,n|n,n,n,n} distribution
471 f8pDistribution = new TH1D("f8pDistribution","<8>_{n,n,n,n|n,n,n,n} distribution",100000,-0.000000001,0.00000001);
472 f8pDistribution->SetXTitle("<8>_{n,n,n,n|n,n,n,n}");
473 f8pDistribution->SetYTitle("Counts");
474 fHistList->Add(f8pDistribution);
ae733b3b 475
476 // add list fWeightsList with weights to the main list
477 fHistList->Add(fWeightsList);
478
479 // add list fDiffFlowList with histograms and profiles needed for differential flow to the main list
480 fHistList->Add(fDiffFlowList);
e085f1a9 481}//end of Init()
bc92c0cb 482
483//================================================================================================================
484
485void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent)
486{
ae733b3b 487 // running over data
488
489 Int_t nPrim = anEvent->NumberOfTracks(); // nPrim = nRP + nPOI + rest
b7cb54d5 490 Int_t nRP = anEvent->GetEventNSelTracksRP(); // nRP = number of particles used to determine the reaction plane
03a02aca 491
ae733b3b 492 Int_t n = 2; // int flow harmonic (to be improved)
493
4057ba99 494 //needed for debugging: (to be improved - add explanation here)
b7cb54d5 495 //Bool_t bNestedLoops=kFALSE;
4057ba99 496 //if(!(bNestedLoops)||(nPrim>0&&nPrim<12))
497 //{
3d824203 498 //if(nPrim>0&&nPrim<10)
4057ba99 499 //{
bc92c0cb 500
ae733b3b 501
ae733b3b 502
503 //---------------------------------------------------------------------------------------------------------
504 // non-weighted and weighted Q-vectors of an event built-up from RP particles evaluated in harmonics n, 2n, 3n and 4n:
505 AliFlowVector afvQvector1n, afvQvector2n, afvQvector3n, afvQvector4n;
ae733b3b 506
507 // non-weighted Q-vector in harmonic n:
1dfa3c16 508 afvQvector1n.Set(0.,0.);
509 afvQvector1n.SetMult(0);
ae733b3b 510 afvQvector1n = anEvent->GetQ(1*n);
ae733b3b 511
512 // non-weighted Q-vector in harmonic 2n:
1dfa3c16 513 afvQvector2n.Set(0.,0.);
514 afvQvector2n.SetMult(0);
ae733b3b 515 afvQvector2n = anEvent->GetQ(2*n); // to be improved: weights
3d824203 516
ae733b3b 517 // non-weighted Q-vector in harmonic 3n:
1dfa3c16 518 afvQvector3n.Set(0.,0.);
519 afvQvector3n.SetMult(0);
ae733b3b 520 afvQvector3n = anEvent->GetQ(3*n); // to be improved: weights
bc92c0cb 521
ae733b3b 522 // non-weighted Q-vector in harmonic 4n:
1dfa3c16 523 afvQvector4n.Set(0.,0.);
524 afvQvector4n.SetMult(0);
ae733b3b 525 afvQvector4n = anEvent->GetQ(4*n); // to be improved: weights
03a02aca 526
e085f1a9 527
528 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
529 // !!!! to be removed !!!!
530 fQvectorForEachEventX->Fill(1.*(++fEventCounter),afvQvector1n.X());
531 fQvectorForEachEventY->Fill(1.*(fEventCounter),afvQvector1n.Y());
532 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
533
534
535
bc92c0cb 536 //---------------------------------------------------------------------------------------------------------
537
4057ba99 538 //multiplicity of RP particles:
ae733b3b 539 Double_t dMult = afvQvector1n.GetMult(); // to be improved (name, this is actually weighted multiplicity)
bc92c0cb 540
ae733b3b 541 fAvMultIntFlowQC->Fill(0.,dMult,1.); // to be removed (this info is also stored in one of control histograms)
bc92c0cb 542
543 //---------------------------------------------------------------------------------------------------------
dee1e0e0 544 //
545 // *******************
546 // **** Q-vectors ****
547 // *******************
548 //
1dfa3c16 549 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 550 //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}^*]
551 Double_t reQ1nQ1nQ2nstar = reQ2nQ1nstarQ1nstar;//Re[Q_{n} Q_{n} Q_{2n}^*] = Re[Q_{2n} Q_{n}^* Q_{n}^*]
1dfa3c16 552 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 553 //Double_t imQ3nQ1nQ2nstarQ2nstar = calculate and implement this (deleteMe)
554 Double_t reQ2nQ2nQ3nstarQ1nstar = reQ3nQ1nQ2nstarQ2nstar;
1dfa3c16 555 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 556 //Double_t imQ4nQ2nstarQ2nstar = calculate and implement this (deleteMe)
557 Double_t reQ2nQ2nQ4nstar = reQ4nQ2nstarQ2nstar;
1dfa3c16 558 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 559 Double_t reQ3nQ1nQ4nstar = reQ4nQ3nstarQ1nstar;//Re[Q_{3n} Q_{n} Q_{4n}^*] = Re[Q_{4n} Q_{3n}^* Q_{n}^*]
560 //Double_t imQ4nQ3nstarQ1nstar = calculate and implement this (deleteMe)
1dfa3c16 561 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 562 Double_t reQ2nQ1nQ3nstar = reQ3nQ2nstarQ1nstar;//Re[Q_{2n} Q_{n} Q_{3n}^*] = Re[Q_{3n} Q_{2n}^* Q_{n}^*]
563 //Double_t imQ3nQ2nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 564 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 565 //Double_t imQ3nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 566 Double_t xQ2nQ1nQ2nstarQ1nstar = pow(afvQvector2n.Mod()*afvQvector1n.Mod(),2);//|Q_{2n}|^2 |Q_{n}|^2
567 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 568 //Double_t imQ4nQ2nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 569 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 570 //Double_t imQ2nQ1nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)
1dfa3c16 571 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 572 //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 573 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 574 //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 575 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}^*]
576 //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}^*]
577 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}^*]
578 //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}^*]
579 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}^*]
580 //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}^*]
581 Double_t xQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar = pow(afvQvector2n.Mod(),2.)*pow(afvQvector1n.Mod(),4.);//|Q_{2n}|^2 |Q_{n}|^4
582 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}^*]
583 //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 584 //---------------------------------------------------------------------------------------------------------
585
586 //---------------------------------------------------------------------------------------------------------
dee1e0e0 587 //
588 // **************************************
589 // **** multi-particle correlations: ****
590 // **************************************
591 //
592 // Remark 1: multi-particle correlations calculated with Q-vectors are stored in fQCorrelations.
593 // Remark 2: binning of fQCorrelations is organized as follows:
594 //
595 // 1st bin: <2>_{n|n} = two1n1n
596 // 2nd bin: <2>_{2n|2n} = two2n2n
597 // 3rd bin: <2>_{3n|3n} = two3n3n
598 // 4th bin: <2>_{4n|4n} = two4n4n
599 // 5th bin: -- EMPTY --
600 // 6th bin: <3>_{2n|n,n} = three2n1n1n
601 // 7th bin: <3>_{3n|2n,n} = three3n2n1n
602 // 8th bin: <3>_{4n|2n,2n} = three4n2n2n
603 // 9th bin: <3>_{4n|3n,n} = three4n3n1n
604 //10th bin: -- EMPTY --
605 //11th bin: <4>_{n,n|n,n} = four1n1n1n1n
606 //12th bin: <4>_{2n,n|2n,n} = four2n1n2n1n
607 //13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n
608 //14th bin: <4>_{3n|n,n,n} = four3n1n1n1n
609 //15th bin: <4>_{3n,n|3n,n} = four3n1n3n1n
610 //16th bin: <4>_{3n,n|2n,2n} = four3n1n2n2n
611 //17th bin: <4>_{4n|2n,n,n} = four4n2n1n1n
612 //18th bin: -- EMPTY --
613 //19th bin: <5>_{2n|n,n,n,n} = five2n1n1n1n1n
614 //20th bin: <5>_{2n,2n|2n,n,n} = five2n2n2n1n1n
615 //21st bin: <5>_{3n,n|2n,n,n} = five3n1n2n1n1n
616 //22nd bin: <5>_{4n|n,n,n,n} = five4n1n1n1n1n
617 //23rd bin: -- EMPTY --
618 //24th bin: <6>_{n,n,n|n,n,n} = six1n1n1n1n1n1n
619 //25th bin: <6>_{2n,n,n|2n,n,n} = six2n1n1n2n1n1n
620 //26th bin: <6>_{2n,2n|n,n,n,n} = six2n2n1n1n1n1n
621 //27th bin: <6>_{3n,n|n,n,n,n} = six3n1n1n1n1n1n
622 //28th bin: -- EMPTY --
623 //29th bin: <7>_{2n,n,n|n,n,n,n} = seven2n1n1n1n1n1n1n
624 //30th bin: -- EMPTY --
625 //31st bin: <8>_{n,n,n,n|n,n,n,n} = eight1n1n1n1n1n1n1n1n
626
1315fe58 627
8842fb2b 628 // binning of fQProduct (all correlations are evaluated in harmonic n):
629 // 1st bin: <2>*<4>
630 // 2nd bin: <2>*<6>
631 // 3rd bin: <2>*<8>
632 // 4th bin: <4>*<6>
633 // 5th bin: <4>*<8>
634 // 6th bin: <6>*<8>
635
ae733b3b 636 // 2-particle
637 Double_t two1n1n = 0., two2n2n = 0., two3n3n = 0., two4n4n = 0.;
638
3d824203 639 if(dMult>1)
bc92c0cb 640 {
ae733b3b 641 //fill the common control histogram (2nd order):
cb308e83 642 fCommonHists2nd->FillControlHistograms(anEvent);
ae733b3b 643
3d824203 644 two1n1n = (pow(afvQvector1n.Mod(),2.)-dMult)/(dMult*(dMult-1.)); // <2>_{n|n} = <cos(n*(phi1-phi2))>
ae733b3b 645 two2n2n = (pow(afvQvector2n.Mod(),2.)-dMult)/(dMult*(dMult-1.)); // <2>_{2n|2n} = <cos(2n*(phi1-phi2))>
646 two3n3n = (pow(afvQvector3n.Mod(),2.)-dMult)/(dMult*(dMult-1.)); // <2>_{3n|3n} = <cos(3n*(phi1-phi2))>
647 two4n4n = (pow(afvQvector4n.Mod(),2.)-dMult)/(dMult*(dMult-1.)); // <2>_{4n|4n} = <cos(4n*(phi1-phi2))>
1315fe58 648
3d824203 649 fQCorrelations->Fill(0.,two1n1n,dMult*(dMult-1.));
650 fQCorrelations->Fill(1.,two2n2n,dMult*(dMult-1.));
651 fQCorrelations->Fill(2.,two3n3n,dMult*(dMult-1.));
652 fQCorrelations->Fill(3.,two4n4n,dMult*(dMult-1.));
1315fe58 653
3d824203 654 f2pDistribution->Fill(two1n1n,dMult*(dMult-1.));
bc92c0cb 655 }
656
3d824203 657 // 3-particle
52021ae2 658 Double_t three2n1n1n=0., three3n2n1n=0., three4n2n2n=0., three4n3n1n=0.;
1dfa3c16 659 if(dMult>2)
bc92c0cb 660 {
1dfa3c16 661 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))>
662 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))>
663 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))>
664 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))>
665
666 fQCorrelations->Fill(5.,three2n1n1n,dMult*(dMult-1.)*(dMult-2.));
667 fQCorrelations->Fill(6.,three3n2n1n,dMult*(dMult-1.)*(dMult-2.));
668 fQCorrelations->Fill(7.,three4n2n2n,dMult*(dMult-1.)*(dMult-2.));
669 fQCorrelations->Fill(8.,three4n3n1n,dMult*(dMult-1.)*(dMult-2.));
bc92c0cb 670 }
671
672 //4-particle
52021ae2 673 Double_t four1n1n1n1n=0., four2n2n2n2n=0., four2n1n2n1n=0., four3n1n1n1n=0., four4n2n1n1n=0., four3n1n2n2n=0., four3n1n3n1n=0.;
1dfa3c16 674 if(dMult>3)
bc92c0cb 675 {
cb308e83 676 //fill the common control histogram (4th order):
677 fCommonHists4th->FillControlHistograms(anEvent);
678
1dfa3c16 679 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}
680 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}
681 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}]
682 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}]
683 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}]
684 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}]
685 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 686 //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}
687
1dfa3c16 688 fQCorrelations->Fill(10.,four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
689 fQCorrelations->Fill(11.,four2n1n2n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
690 fQCorrelations->Fill(12.,four2n2n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
691 fQCorrelations->Fill(13.,four3n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
692 fQCorrelations->Fill(14.,four3n1n3n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
693 fQCorrelations->Fill(15.,four3n1n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
694 fQCorrelations->Fill(16.,four4n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
dee1e0e0 695
1dfa3c16 696 f4pDistribution->Fill(four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
bc92c0cb 697
1dfa3c16 698 fQProduct->Fill(0.,two1n1n*four1n1n1n1n,dMult*(dMult-1.)*dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));
bc92c0cb 699 }
700
701 //5-particle
52021ae2 702 Double_t five2n1n1n1n1n=0., five2n2n2n1n1n=0., five3n1n2n1n1n=0., five4n1n1n1n1n=0.;
1dfa3c16 703 if(dMult>4)
1315fe58 704 {
1dfa3c16 705 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 706
1dfa3c16 707 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 708
dee1e0e0 709 //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 710
1dfa3c16 711 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 712
dee1e0e0 713 //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!
714
1dfa3c16 715 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 716
1dfa3c16 717 //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 718
1dfa3c16 719 //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 720
1dfa3c16 721 fQCorrelations->Fill(18.,five2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
722 fQCorrelations->Fill(19.,five2n2n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
723 fQCorrelations->Fill(20.,five3n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
724 fQCorrelations->Fill(21.,five4n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));
1315fe58 725 }
bc92c0cb 726
ae733b3b 727 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
728 // !!!! to be removed: temporary fix !!!!
307ed368 729 if(dMult>1)
730 {
731 two1n1n = (pow(afvQvector1n.Mod(),2.)-dMult)/(dMult*(dMult-1.));
732 }
ae733b3b 733 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
734
bc92c0cb 735 //6-particle
dee1e0e0 736 Double_t six1n1n1n1n1n1n=0., six2n2n1n1n1n1n=0., six3n1n1n1n1n1n=0., six2n1n1n2n1n1n=0.;
1dfa3c16 737 if(dMult>5)
bc92c0cb 738 {
cb308e83 739 //fill the common control histogram (6th order):
740 fCommonHists6th->FillControlHistograms(anEvent);
741
1dfa3c16 742 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 743
1dfa3c16 744 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 745
1dfa3c16 746 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 747
1dfa3c16 748 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 749
1dfa3c16 750 fQCorrelations->Fill(23.,six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
751 fQCorrelations->Fill(24.,six2n1n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
752 fQCorrelations->Fill(25.,six2n2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
753 fQCorrelations->Fill(26.,six3n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
dee1e0e0 754
1dfa3c16 755 f6pDistribution->Fill(six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
bc92c0cb 756
1dfa3c16 757 fQProduct->Fill(1.,two1n1n*six1n1n1n1n1n1n,dMult*(dMult-1.)*dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
758 fQProduct->Fill(3.,four1n1n1n1n*six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));
bc92c0cb 759 }
dee1e0e0 760
761 //7-particle
762 Double_t seven2n1n1n1n1n1n1n=0.;
1dfa3c16 763 if(dMult>6)
dee1e0e0 764 {
1dfa3c16 765 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 766
1dfa3c16 767 fQCorrelations->Fill(28.,seven2n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.));
dee1e0e0 768 }
769
770 //8-particle
771 Double_t eight1n1n1n1n1n1n1n1n=0.;
1dfa3c16 772 if(dMult>7)
dee1e0e0 773 {
cb308e83 774 //fill the common control histogram (8th order):
775 fCommonHists8th->FillControlHistograms(anEvent);
776
1dfa3c16 777 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 778
1dfa3c16 779 fQCorrelations->Fill(30.,eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.));
5e838eeb 780
1dfa3c16 781 f8pDistribution->Fill(eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.));
dee1e0e0 782 }
bc92c0cb 783 //---------------------------------------------------------------------------------------------------------
784
4057ba99 785
786
787
3d824203 788 //---------------------------------------------------------------------------------------------------------
789 // weights:
790 Bool_t useWeights = fUsePhiWeights||fUsePtWeights||fUseEtaWeights;
791
792 TH1F *phiWeights = NULL; // histogram with phi weights
793 TH1D *ptWeights = NULL; // histogram with pt weights
794 TH1D *etaWeights = NULL; // histogram with eta weights
795
796 if(useWeights)
797 {
798 if(!fWeightsList)
1315fe58 799 {
3d824203 800 cout<<" WARNING: fWeightsList is NULL pointer. "<<endl;
801 exit(0);
802 }
803 if(fUsePhiWeights)
804 {
805 phiWeights = dynamic_cast<TH1F *>(fWeightsList->FindObject("phi_weights"));
806 if(!phiWeights)
ae733b3b 807 {
3d824203 808 cout<<" WARNING: couldn't access the histogram with phi weights. "<<endl;
809 exit(0);
ae733b3b 810 }
3d824203 811 }
812 if(fUsePtWeights)
813 {
814 ptWeights = dynamic_cast<TH1D *>(fWeightsList->FindObject("pt_weights"));
815 if(!ptWeights)
816 {
817 cout<<" WARNING: couldn't access the histogram with pt weights. "<<endl;
818 exit(0);
819 }
820 }
821 if(fUseEtaWeights)
822 {
823 etaWeights = dynamic_cast<TH1D *>(fWeightsList->FindObject("eta_weights"));
824 if(!etaWeights)
825 {
826 cout<<" WARNING: couldn't access the histogram with eta weights. "<<endl;
827 exit(0);
828 }
829 }
830 }
831
77515452 832 Int_t nBinsPhi = 0;
3d824203 833 Double_t dBinWidthPt=0.;
3d824203 834 Double_t dBinWidthEta=0.;
77515452 835
836 if(fnBinsPt)
837 {
838 dBinWidthPt=(fPtMax-fPtMin)/fnBinsPt;
839 }
840 if(fnBinsEta)
841 {
842 dBinWidthEta=(fEtaMax-fEtaMin)/fnBinsEta;
843 }
3d824203 844
845 if(fWeightsList)
846 {
847 if(fUsePhiWeights)
848 {
3d824203 849 if(phiWeights) nBinsPhi = phiWeights->GetNbinsX();
850 }
851 if(fUsePtWeights)
852 {
3d824203 853 if(ptWeights)
854 {
77515452 855 Double_t dBinWidthPtW = ptWeights->GetBinWidth(1); // assuming that all bins have the same width
856 if(dBinWidthPtW != dBinWidthPt)
857 {
858 cout<<" WARNING: dBinWidthPtW != dBinWidthPt in AFAWQC::Make()"<<endl;
859 exit(0);
860 }
861 Double_t dPtMinW = (ptWeights->GetXaxis())->GetXmin();
862 if(dPtMinW != fPtMin)
863 {
864 cout<<" WARNING: dPtMinW != fPtMin in AFAWQC::Make()"<<endl;
865 exit(0);
866 }
3d824203 867 }
868 }
869 if(fUseEtaWeights)
870 {
3d824203 871 if(etaWeights)
872 {
77515452 873 Double_t dBinWidthEtaW = etaWeights->GetBinWidth(1); // assuming that all bins have the same width
874 if(dBinWidthEtaW != dBinWidthEta)
875 {
876 cout<<" WARNING: dBinWidthEtaW != dBinWidthEta in AFAWQC::Make()"<<endl;
877 exit(0);
878 }
879 Double_t dEtaMinW = (etaWeights->GetXaxis())->GetXmin();
880 if(dEtaMinW != fEtaMin)
881 {
882 cout<<" WARNING: dEtaMinW != fEtaMin in AFAWQC::Make()"<<endl;
883 exit(0);
884 }
3d824203 885 }
886 }
887 } // end of if(weightsList)
888
889 Double_t wPhi = 1.; // phi weight
890 Double_t wPt = 1.; // pt weight
891 Double_t wEta = 1.; // eta weight
892
893 Double_t dPhi = 0.;
894 Double_t dPt = 0.;
895 Double_t dEta = 0.;
896
3d824203 897 Double_t dQnkX[4][8] = {{0.}}; // sum_{i=1}^{M} w_i^k cos(n phi_i)
898 Double_t dQnkY[4][8] = {{0.}}; // sum_{i=1}^{M} w_i^k sin(n phi_i)
77515452 899 Double_t dSnk[4][8] = {{0.}}; //(sum_{i=1}^{M} w_i^k)^n
3d824203 900
901 for(Int_t i=0;i<nPrim;i++) // loop over all particles
902 {
903 fTrack=anEvent->GetTrack(i);
904 if(fTrack)
905 {
b7cb54d5 906 if(fTrack->InRPSelection())
3d824203 907 {
908 dPhi = fTrack->Phi();
909 dPt = fTrack->Pt();
910 dEta = fTrack->Eta();
911
77515452 912 // determine Phi weight:
3d824203 913 if(phiWeights && nBinsPhi)
914 {
915 wPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi())));
916 }
77515452 917 // determine pt weight:
3d824203 918 if(ptWeights && dBinWidthPt)
919 {
77515452 920 wPt = ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/dBinWidthPt)));
3d824203 921 }
77515452 922 // determine eta weight:
3d824203 923 if(etaWeights && dBinWidthEta)
924 {
77515452 925 wEta = etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/dBinWidthEta)));
3d824203 926 }
927
77515452 928 // (Q_{n,k})_x, (Q_{n,k})_y and S_{n,k}
3d824203 929 for(Int_t nn=0;nn<4;nn++)
930 {
931 for(Int_t k=0;k<8;k++)
932 {
933 dQnkX[nn][k]+=pow(wPhi*wPt*wEta,k+1)*TMath::Cos(2*(nn+1)*dPhi);
934 dQnkY[nn][k]+=pow(wPhi*wPt*wEta,k+1)*TMath::Sin(2*(nn+1)*dPhi);
935 dSnk[nn][k]+=pow(wPhi*wPt*wEta,k+1);
936 }
937 }
938
b7cb54d5 939 } // end of if (pTrack->InRPSelection())
3d824203 940 } // end of if (pTrack)
941 else {cerr << "no particle!!!"<<endl;}
942 } // loop over particles
943
944 for(Int_t nn=0;nn<4;nn++)
945 {
946 for(Int_t k=0;k<8;k++)
947 {
948 dSnk[nn][k]=pow(dSnk[nn][k],nn+1);
949 }
950 }
951
77515452 952 //..............................................................................................
953 // Ms (introduced in order to simplify some Eqs. bellow)
3d824203 954 Double_t dM11 = dSnk[1][0]-dSnk[0][1]; // dM11 = sum_{i,j=1,i!=j}^M w_i w_j
955 Double_t dM22 = dSnk[1][1]-dSnk[0][3]; // dM22 = sum_{i,j=1,i!=j}^M w_i^2 w_j^2
956 Double_t dM33 = dSnk[1][2]-dSnk[0][5]; // dM33 = sum_{i,j=1,i!=j}^M w_i^3 w_j^3
957 Double_t dM44 = dSnk[1][3]-dSnk[0][7]; // dM44 = sum_{i,j=1,i!=j}^M w_i^4 w_j^4
958 Double_t dM31 = dSnk[0][2]*dSnk[0][0]-dSnk[0][3]; // dM31 = sum_{i,j=1,i!=j}^M w_i^3 w_j
959 Double_t dM211 = dSnk[0][1]*dSnk[1][0]-2.*dSnk[0][2]*dSnk[0][0]-dSnk[1][1]+2.*dSnk[0][3]; // dM211 = sum_{i,j,k=1,i!=j!=k}^M w_i^2 w_j w_k
960 Double_t dM1111 = dSnk[3][0]-6.*dM211-4.*dM31-3.*dM22-dSnk[0][3]; // dM1111 = sum_{i,j,k,l=1,i!=j!=k!=l}^M w_i w_j w_k w_l
77515452 961 //..............................................................................................
3d824203 962
3d824203 963 //---------------------------------------------------------------------------------------------------------
964 //
965 // ***********************************************
966 // **** weighted multi-particle correlations: ****
967 // ***********************************************
968 //
77515452 969 // Remark 1: weighted multi-particle correlations calculated with Q-vectors are stored in fWeightedQCorrelations.
970 // Remark 2: binning of fWeightedQCorrelations is organized as follows:
3d824203 971
972 // binning
973 //..............................................................................................
974 // 1st bin: weighted <2>_{n|n} = <w1 w2 cos( n*(phi1-phi2))>
975 // 2nd bin: weighted <2>_{2n|2n} = <w1^2 w2^2 cos(2n*(phi1-phi2))>
976 // 3rd bin: weighted <2>_{3n|3n} = <w1^3 w2^3 cos(3n*(phi1-phi2))>
977 // 4th bin: weighted <2>_{4n|4n} = <w1^4 w2^4 cos(4n*(phi1-phi2))>
978 // 5th bin: weighted <2>_{n|n} = <w1^3 w2 cos(n*(phi1-phi2))>
979 // 6th bin: weighted <2>_{n|n} = <w1 w2 w3^2 cos(n*(phi1-phi2))>
980
981 // 11th bin: weighted <3>_{2n|n,n} = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))>
982
983 // 21st bin: weighted <4>_{n,n|n,n} = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))>
984 //..............................................................................................
985
3d824203 986 //..............................................................................................
987 // weighted 2-particle correlations:
988 Double_t two1n1nW1W1=0., two2n2nW2W2=0., two3n3nW3W3=0., two4n4nW4W4=0., two1n1nW3W1=0., two1n1nW2W1W1=0.;
989
990 if(nRP>1) // nRP = number of particles used to determine the reaction plane
991 {
992 if(dM11 != 0)
993 {
994 two1n1nW1W1 = (pow(dQnkX[0][0],2)+pow(dQnkY[0][0],2)-dSnk[0][1])/dM11; // <2>_{n|n}=<w1 w2 cos(n*(phi1-phi2))>
77515452 995 fWeightedQCorrelations->Fill(0.,two1n1nW1W1,dM11);
3d824203 996 }
997 if(dM22 != 0)
998 {
999 two2n2nW2W2 = (pow(dQnkX[1][1],2)+pow(dQnkY[1][1],2)-dSnk[0][3])/dM22; // <2>_{2n|2n}=<w1^2 w2^2 cos(2n*(phi1-phi2))>
77515452 1000 fWeightedQCorrelations->Fill(1.,two2n2nW2W2,dM22);
3d824203 1001 }
1002 if(dM33 != 0)
1003 {
1004 two3n3nW3W3 = (pow(dQnkX[2][2],2)+pow(dQnkY[2][2],2)-dSnk[0][5])/dM33; // <2>_{2n|2n}=<w1^3 w2^3 cos(3n*(phi1-phi2))>
77515452 1005 fWeightedQCorrelations->Fill(2.,two3n3nW3W3,dM33);
3d824203 1006 }
1007 if(dM44 != 0)
1008 {
1009 two4n4nW4W4 = (pow(dQnkX[3][3],2)+pow(dQnkY[3][3],2)-dSnk[0][7])/dM44; // <2>_{2n|2n}=<w1^4 w2^4 cos(4n*(phi1-phi2))>
77515452 1010 fWeightedQCorrelations->Fill(3.,two4n4nW4W4,dM44);
3d824203 1011 }
1012 if(dM31 != 0)
1013 {
1014 two1n1nW3W1 = (dQnkX[0][2]*dQnkX[0][0]+dQnkY[0][2]*dQnkY[0][0]-dSnk[0][3])/dM31; // <2>_{n|n}=<w1^3 w2 cos(n*(phi1-phi2))>
77515452 1015 fWeightedQCorrelations->Fill(4.,two1n1nW3W1,dM31);
3d824203 1016 }
1017 if(dM211 != 0)
1018 {
1019 two1n1nW2W1W1 = (dSnk[0][1]*dM11*two1n1nW1W1-2.*dM31*two1n1nW3W1)/dM211; // <2>_{n|n}=<w1^2 w2 w3 cos(n*(phi1-phi2))>
77515452 1020 fWeightedQCorrelations->Fill(5.,two1n1nW2W1W1,dM211);
3d824203 1021 }
1022 } // end of if(nRP>1)
1023 //..............................................................................................
1024
3d824203 1025 //..............................................................................................
1026 // weighted 3-particle correlations:
1027 Double_t three2n1n1nW2W1W1=0.;
1028
1029 if(nRP>2) // nRP = number of particles used to determine the reaction plane
1030 {
1031 if(dM211 != 0)
1032 {
1033 three2n1n1nW2W1W1 = (pow(dQnkX[0][0],2.)*dQnkX[1][1]+2.*dQnkX[0][0]*dQnkY[0][0]*dQnkY[1][1]-pow(dQnkY[0][0],2.)*dQnkX[1][1]-2.*dM31*two1n1nW3W1-dM22*two2n2nW2W2-dSnk[0][3])/dM211;
77515452 1034 fWeightedQCorrelations->Fill(10.,three2n1n1nW2W1W1,dM211);
3d824203 1035 }
1036 } // end of if(nRP>2)
1037 //..............................................................................................
1038
3d824203 1039 //..............................................................................................
1040 // weighted 4-particle correlations:
1041 Double_t four1n1n1n1nW1W1W1W1=0.;
1042
1043 if(nRP>3) // nRP = number of particles used to determine the reaction plane
1044 {
1045 if(dM1111 != 0)
1046 {
77515452 1047 four1n1n1n1nW1W1W1W1 = (pow(pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.),2)-2.*dM211*three2n1n1nW2W1W1-4.*dM211*two1n1nW2W1W1-4.*dM31*two1n1nW3W1-dM22*two2n2nW2W2-2.*dM22-dSnk[0][3])/dM1111;
1048 fWeightedQCorrelations->Fill(20.,four1n1n1n1nW1W1W1W1,dM1111);
3d824203 1049 }
1050 } // end of if(nRP>3)
1051 //..............................................................................................
1052
3d824203 1053
1054
3d824203 1055
77515452 1056 //---------------------------------------------------------------------------------------------------------
1057 //
1058 // *******************************************************
1059 // **** weighted reduced multi-particle correlations: ****
1060 // *******************************************************
1061 //
1062 // pt POI
1063 TProfile *ptReq1nPrime = new TProfile("ptReq1nPrime","Re[q_{n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
1064 TProfile *ptImq1nPrime = new TProfile("ptImq1nPrime","Im[q_{n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
1065 TProfile *ptReq2nPrime = new TProfile("ptReq2nPrime","Re[q_{2n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
1066 TProfile *ptImq2nPrime = new TProfile("ptImq2nPrime","Im[q_{2n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
3d824203 1067
77515452 1068 TProfile *ptReq1nPrimePrime = new TProfile("ptReq1nPrimePrime","Re[q_{n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
1069 TProfile *ptImq1nPrimePrime = new TProfile("ptImq1nPrimePrime","Im[q_{n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
1070 TProfile *ptReq2nPrimePrime = new TProfile("ptReq2nPrimePrime","Re[q_{2n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
1071 TProfile *ptImq2nPrimePrime = new TProfile("ptImq2nPrimePrime","Im[q_{2n}^{''}]",fnBinsPt,fPtMin,fPtMax,"s");
3d824203 1072
77515452 1073 TProfile *req1nW2PrimePrimePt = new TProfile("req1nW2PrimePrimePt","#sum_{i=1}^{m''} w_{i}^{2} cos(n(#phi_{i}))''",fnBinsPt,fPtMin,fPtMax,"s");
1074 TProfile *imq1nW2PrimePrimePt = new TProfile("imq1nW2PrimePrimePt","#sum_{i=1}^{m''} w_{i}^{2} sin(n(#phi_{i}))''",fnBinsPt,fPtMin,fPtMax,"s");
1075 TProfile *req2nW1PrimePrimePt = new TProfile("req2nW1PrimePrimePt","#sum_{i=1}^{m''} w_{i} cos(2n(#phi_{i}))''",fnBinsPt,fPtMin,fPtMax,"s");
1076 TProfile *imq2nW1PrimePrimePt = new TProfile("imq2nW1PrimePrimePt","#sum_{i=1}^{m''} w_{i} sin(2n(#phi_{i}))''",fnBinsPt,fPtMin,fPtMax,"s");
3d824203 1077
77515452 1078 TProfile *sumOfW1upTomPrimePrimePt = new TProfile("sumOfW1upTomPrimePrimePt","#sum_{i=1}^{m''} w_{i}''",fnBinsPt,fPtMin,fPtMax,"s");
1079 TProfile *sumOfW2upTomPrimePrimePt = new TProfile("sumOfW2upTomPrimePrimePt","#sum_{i=1}^{m''} w_{i}^{2}''",fnBinsPt,fPtMin,fPtMax,"s");
1080 TProfile *sumOfW3upTomPrimePrimePt = new TProfile("sumOfW3upTomPrimePrimePt","#sum_{i=1}^{m''} w_{i}^{3}''",fnBinsPt,fPtMin,fPtMax,"s");
3d824203 1081
77515452 1082 // eta POI
1083 TProfile *etaReq1nPrime = new TProfile("etaReq1nPrime","Re[q_{n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1084 TProfile *etaImq1nPrime = new TProfile("etaImq1nPrime","Im[q_{n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1085 TProfile *etaReq2nPrime = new TProfile("etaReq2nPrime","Re[q_{2n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1086 TProfile *etaImq2nPrime = new TProfile("etaImq2nPrime","Im[q_{2n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1087
1088 TProfile *etaReq1nPrimePrime = new TProfile("etaReq1nPrimePrime","Re[q_{n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1089 TProfile *etaImq1nPrimePrime = new TProfile("etaImq1nPrimePrime","Im[q_{n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1090 TProfile *etaReq2nPrimePrime = new TProfile("etaReq2nPrimePrime","Re[q_{2n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1091 TProfile *etaImq2nPrimePrime = new TProfile("etaImq2nPrimePrime","Im[q_{2n}^{''}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1092
1093 TProfile *req1nW2PrimePrimeEta = new TProfile("req1nW2PrimePrimeEta","#sum_{i=1}^{m''} w_{i}^{2} cos(n(#phi_{i}))''",fnBinsEta,fEtaMin,fEtaMax,"s");
1094 TProfile *imq1nW2PrimePrimeEta = new TProfile("imq1nW2PrimePrimeEta","#sum_{i=1}^{m''} w_{i}^{2} sin(n(#phi_{i}))''",fnBinsEta,fEtaMin,fEtaMax,"s");
1095 TProfile *req2nW1PrimePrimeEta = new TProfile("req2nW1PrimePrimeEta","#sum_{i=1}^{m''} w_{i} cos(2n(#phi_{i}))''",fnBinsEta,fEtaMin,fEtaMax,"s");
1096 TProfile *imq2nW1PrimePrimeEta = new TProfile("imq2nW1PrimePrimeEta","#sum_{i=1}^{m''} w_{i} sin(2n(#phi_{i}))''",fnBinsEta,fEtaMin,fEtaMax,"s");
1097
1098 TProfile *sumOfW1upTomPrimePrimeEta = new TProfile("sumOfW1upTomPrimePrimeEta","#sum_{i=1}^{m''} w_{i}''",fnBinsEta,fEtaMin,fEtaMax,"s");
1099 TProfile *sumOfW2upTomPrimePrimeEta = new TProfile("sumOfW2upTomPrimePrimeEta","#sum_{i=1}^{m''} w_{i}^{2}''",fnBinsEta,fEtaMin,fEtaMax,"s");
1100 TProfile *sumOfW3upTomPrimePrimeEta = new TProfile("sumOfW3upTomPrimePrimeEta","#sum_{i=1}^{m''} w_{i}^{3}''",fnBinsEta,fEtaMin,fEtaMax,"s");
1101
1102 // pt RP
1103 TProfile *ptReq1n = new TProfile("ptReq1n","Re[q_{n}]",fnBinsPt,fPtMin,fPtMax,"s");
1104 TProfile *ptImq1n = new TProfile("ptImq1n","Im[q_{n}]",fnBinsPt,fPtMin,fPtMax,"s");
1105 TProfile *ptReq2n = new TProfile("ptReq2n","Re[q_{2n}]",fnBinsPt,fPtMin,fPtMax,"s");
1106 TProfile *ptImq2n = new TProfile("ptImq2n","Im[q_{2n}]",fnBinsPt,fPtMin,fPtMax,"s");
1107
1108 TProfile *req1nW2Pt = new TProfile("req1nW2Pt","#sum_{i=1}^{m} w_{i}^{2} cos(n(#phi_{i}))''",fnBinsPt,fPtMin,fPtMax,"s");
1109 TProfile *imq1nW2Pt = new TProfile("imq1nW2Pt","#sum_{i=1}^{m} w_{i}^{2} sin(n(#phi_{i}))''",fnBinsPt,fPtMin,fPtMax,"s");
1110 TProfile *req2nW1Pt = new TProfile("req2nW1Pt","#sum_{i=1}^{m} w_{i} cos(2n(#phi_{i}))''",fnBinsPt,fPtMin,fPtMax,"s");
1111 TProfile *imq2nW1Pt = new TProfile("imq2nW1Pt","#sum_{i=1}^{m} w_{i} sin(2n(#phi_{i}))''",fnBinsPt,fPtMin,fPtMax,"s");
1112
1113 TProfile *sumOfW1upTomPt = new TProfile("sumOfW1upTomPt","#sum_{i=1}^{m} w_{i}''",fnBinsPt,fPtMin,fPtMax,"s");
1114 TProfile *sumOfW2upTomPt = new TProfile("sumOfW2upTomPt","#sum_{i=1}^{m} w_{i}^{2}''",fnBinsPt,fPtMin,fPtMax,"s");
1115 TProfile *sumOfW3upTomPt = new TProfile("sumOfW3upTomPt","#sum_{i=1}^{m} w_{i}^{3}''",fnBinsPt,fPtMin,fPtMax,"s");
1116
1117 // eta RP
1118 TProfile *etaReq1n = new TProfile("etaReq1n","Re[q_{n}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1119 TProfile *etaImq1n = new TProfile("etaImq1n","Im[q_{n}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1120 TProfile *etaReq2n = new TProfile("etaReq2n","Re[q_{2n}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1121 TProfile *etaImq2n = new TProfile("etaImq2n","Im[q_{2n}]",fnBinsEta,fEtaMin,fEtaMax,"s");
1122
1123 TProfile *req1nW2Eta = new TProfile("req1nW2Eta","#sum_{i=1}^{m} w_{i}^{2} cos(n(#phi_{i}))''",fnBinsEta,fEtaMin,fEtaMax,"s");
1124 TProfile *imq1nW2Eta = new TProfile("imq1nW2Eta","#sum_{i=1}^{m} w_{i}^{2} sin(n(#phi_{i}))''",fnBinsEta,fEtaMin,fEtaMax,"s");
1125 TProfile *req2nW1Eta = new TProfile("req2nW1Eta","#sum_{i=1}^{m} w_{i} cos(2n(#phi_{i}))''",fnBinsEta,fEtaMin,fEtaMax,"s");
1126 TProfile *imq2nW1Eta = new TProfile("imq2nW1Eta","#sum_{i=1}^{m} w_{i} sin(2n(#phi_{i}))''",fnBinsEta,fEtaMin,fEtaMax,"s");
1127
1128 TProfile *sumOfW1upTomEta = new TProfile("sumOfW1upTomEta","#sum_{i=1}^{m} w_{i}''",fnBinsEta,fEtaMin,fEtaMax,"s");
1129 TProfile *sumOfW2upTomEta = new TProfile("sumOfW2upTomEta","#sum_{i=1}^{m} w_{i}^{2}''",fnBinsEta,fEtaMin,fEtaMax,"s");
1130 TProfile *sumOfW3upTomEta = new TProfile("sumOfW3upTomEta","#sum_{i=1}^{m} w_{i}^{3}''",fnBinsEta,fEtaMin,fEtaMax,"s");
1131
1132 for(Int_t i=0;i<nPrim;i++) // loop over all particles
3d824203 1133 {
1134 fTrack=anEvent->GetTrack(i);
77515452 1135 if(fTrack)
1136 {
b7cb54d5 1137 if(fTrack->InPOISelection()) // checking if particle is POI
3d824203 1138 {
b7cb54d5 1139 if(fTrack->InRPSelection()) // checking if particle is both POI and RP
3d824203 1140 {
77515452 1141 // get azimuthal angle, momentum and pseudorapidity of a particle:
1142 dPhi = fTrack->Phi();
1143 dPt = fTrack->Pt();
1144 dEta = fTrack->Eta();
1145 // phi weights:
1146 if(fUsePhiWeights)
1147 {
1148 nBinsPhi = phiWeights->GetNbinsX();
1149 if(nBinsPhi)
1150 {
1151 wPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi())));
1152 }
1153 }
1154 // pt weights:
1155 if(fUsePtWeights)
1156 {
1157 if(dBinWidthPt)
1158 {
1159 wPt = ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/dBinWidthPt)));
1160 }
1161 }
1162 // eta weights:
1163 if(fUseEtaWeights)
1164 {
1165 if(dBinWidthEta)
1166 {
1167 wEta = etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/dBinWidthEta)));
1168 }
1169 }
1170 // pt:
1171 ptReq1nPrimePrime->Fill(dPt,cos(n*dPhi),1.);
1172 ptImq1nPrimePrime->Fill(dPt,sin(n*dPhi),1.);
1173 ptReq2nPrimePrime->Fill(dPt,cos(2.*n*dPhi),1.);
1174 ptImq2nPrimePrime->Fill(dPt,sin(2.*n*dPhi),1.);
1175 // weighted pt:
1176 req1nW2PrimePrimePt->Fill(dPt,cos(n*dPhi),pow(wPhi*wPt*wEta,2.));
1177 imq1nW2PrimePrimePt->Fill(dPt,sin(n*dPhi),pow(wPhi*wPt*wEta,2.));
1178 req2nW1PrimePrimePt->Fill(dPt,cos(2.*n*dPhi),wPhi*wPt*wEta);
1179 imq2nW1PrimePrimePt->Fill(dPt,sin(2.*n*dPhi),wPhi*wPt*wEta);
1180 sumOfW1upTomPrimePrimePt->Fill(dPt,wPhi*wPt*wEta,1.);
1181 sumOfW2upTomPrimePrimePt->Fill(dPt,pow(wPhi*wPt*wEta,2),1.);
1182 sumOfW3upTomPrimePrimePt->Fill(dPt,pow(wPhi*wPt*wEta,3),1.);
1183
1184 // eta:
1185 etaReq1nPrimePrime->Fill(dEta,cos(n*dPhi),1.);
1186 etaImq1nPrimePrime->Fill(dEta,sin(n*dPhi),1.);
1187 etaReq2nPrimePrime->Fill(dEta,cos(2.*n*dPhi),1.);
1188 etaImq2nPrimePrime->Fill(dEta,sin(2.*n*dPhi),1.);
1189 // weighted eta:
1190 req1nW2PrimePrimeEta->Fill(dEta,cos(n*dPhi),pow(wPhi*wPt*wEta,2.));
1191 imq1nW2PrimePrimeEta->Fill(dEta,sin(n*dPhi),pow(wPhi*wPt*wEta,2.));
1192 req2nW1PrimePrimeEta->Fill(dEta,cos(2.*n*dPhi),wPhi*wPt*wEta);
1193 imq2nW1PrimePrimeEta->Fill(dEta,sin(2.*n*dPhi),wPhi*wPt*wEta);
1194 sumOfW1upTomPrimePrimeEta->Fill(dEta,wPhi*wPt*wEta,1.);
1195 sumOfW2upTomPrimePrimeEta->Fill(dEta,pow(wPhi*wPt*wEta,2),1.);
1196 sumOfW3upTomPrimePrimeEta->Fill(dEta,pow(wPhi*wPt*wEta,3),1.);
1197
b7cb54d5 1198 }else if(!(fTrack->InRPSelection())) // checking if particles is POI and not RP
77515452 1199 {
1200 // get azimuthal angle, momentum and pseudorapidity of a particle:
1201 dPhi = fTrack->Phi();
1202 dPt = fTrack->Pt();
1203 dEta = fTrack->Eta();
1204 // pt:
1205 ptReq1nPrime->Fill(dPt,cos(n*dPhi),1.);
1206 ptImq1nPrime->Fill(dPt,sin(n*dPhi),1.);
1207 ptReq2nPrime->Fill(dPt,cos(2.*n*dPhi),1.);
1208 ptImq2nPrime->Fill(dPt,sin(2.*n*dPhi),1.);
1209
1210 // eta:
1211 etaReq1nPrime->Fill(dEta,cos(n*dPhi),1.);
1212 etaImq1nPrime->Fill(dEta,sin(n*dPhi),1.);
1213 etaReq2nPrime->Fill(dEta,cos(2.*n*dPhi),1.);
1214 etaImq2nPrime->Fill(dEta,sin(2.*n*dPhi),1.);
1215
b7cb54d5 1216 } // end of else if(!(fTrack->InRPSelection())) // checking if particles is POI and not RP
1217 } // end of if(fTrack->InPOISelection()) // checking if particle is POI
77515452 1218
b7cb54d5 1219 if(fTrack->InRPSelection()) // checking if particles is only RP:
77515452 1220 {
1221 dPhi = fTrack->Phi();
1222 dPt = fTrack->Pt();
1223 dEta = fTrack->Eta();
1224
1225 // phi weights:
1226 if(fUsePhiWeights)
3d824203 1227 {
77515452 1228 nBinsPhi = phiWeights->GetNbinsX();
1229 if(nBinsPhi)
1230 {
1231 wPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi())));
1232 }
1233 }
1234 // pt weights:
1235 if(fUsePtWeights)
1236 {
1237 if(dBinWidthPt)
1238 {
1239 wPt = ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/dBinWidthPt)));
1240 }
1241 }
1242 // eta weights:
1243 if(fUseEtaWeights)
1244 {
1245 if(dBinWidthEta)
1246 {
1247 wEta = etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/dBinWidthEta)));
1248 }
3d824203 1249 }
77515452 1250 // pt:
1251 ptReq1n->Fill(dPt,cos(n*dPhi),1.);
1252 ptImq1n->Fill(dPt,sin(n*dPhi),1.);
1253 ptReq2n->Fill(dPt,cos(2.*n*dPhi),1.);
1254 ptImq2n->Fill(dPt,sin(2.*n*dPhi),1.);
1255 // weighted pt:
1256 req1nW2Pt->Fill(dPt,cos(n*dPhi),pow(wPhi*wPt*wEta,2.));
1257 imq1nW2Pt->Fill(dPt,sin(n*dPhi),pow(wPhi*wPt*wEta,2.));
1258 req2nW1Pt->Fill(dPt,cos(2.*n*dPhi),wPhi*wPt*wEta);
1259 imq2nW1Pt->Fill(dPt,sin(2.*n*dPhi),wPhi*wPt*wEta);
1260 sumOfW1upTomPt->Fill(dPt,wPhi*wPt*wEta,1.);
1261 sumOfW2upTomPt->Fill(dPt,pow(wPhi*wPt*wEta,2),1.);
1262 sumOfW3upTomPt->Fill(dPt,pow(wPhi*wPt*wEta,3),1.);
1263
1264 // eta:
1265 etaReq1n->Fill(dEta,cos(n*dPhi),1.);
1266 etaImq1n->Fill(dEta,sin(n*dPhi),1.);
1267 etaReq2n->Fill(dEta,cos(2.*n*dPhi),1.);
1268 etaImq2n->Fill(dEta,sin(2.*n*dPhi),1.);
1269 // weighted eta:
1270 req1nW2Eta->Fill(dEta,cos(n*dPhi),pow(wPhi*wPt*wEta,2.));
1271 imq1nW2Eta->Fill(dEta,sin(n*dPhi),pow(wPhi*wPt*wEta,2.));
1272 req2nW1Eta->Fill(dEta,cos(2.*n*dPhi),wPhi*wPt*wEta);
1273 imq2nW1Eta->Fill(dEta,sin(2.*n*dPhi),wPhi*wPt*wEta);
1274 sumOfW1upTomEta->Fill(dEta,wPhi*wPt*wEta,1.);
1275 sumOfW2upTomEta->Fill(dEta,pow(wPhi*wPt*wEta,2),1.);
1276 sumOfW3upTomEta->Fill(dEta,pow(wPhi*wPt*wEta,3),1.);
b7cb54d5 1277 } // end of if(fTrack->InRPSelection()) // checking if particles is only RP:
77515452 1278 } // end of if(fTrack}
1279 } // end of for(Int_t i=0;i<nPrim;i++)
bc92c0cb 1280
77515452 1281 //...........................................................................................................
1282 // PrimePrime Pt POI
1283 Double_t qxPrimePrimePtPOI=0.,qyPrimePrimePtPOI=0.,q2xPrimePrimePtPOIHere=0.,q2yPrimePrimePtPOIHere=0.;//add comments for these variable
3d824203 1284 Double_t qxW2PrimePrimePtPOI=0.,qyW2PrimePrimePtPOI=0.,q2xW1PrimePrimePtPOI=0.,q2yW1PrimePrimePtPOI=0.;//add comments for these variable
1285 Double_t dS11mPrimePrimePtPOI=0.; // to be improved (name)
1286 Double_t dS12mPrimePrimePtPOI=0.; // to be improved (name)
1287 Double_t dS13mPrimePrimePtPOI=0.; // to be improved (name)
77515452 1288 Double_t mPrimePrimePtPOI=0.; // to be improved (name)
3d824203 1289
1290 Double_t dM1pp11PtPOI=0.; // to be improved (name)
1291 Double_t dM0pp111PtPOI=0.; // to be improved (name)
1292 Double_t dM0pp12PtPOI=0.;
1293 Double_t dM2pp1PtPOI=0.;
1294 Double_t dM1pp2PtPOI=0.;
1295 Double_t dM0pp3PtPOI=0.;
1296
77515452 1297 // Prime Pt POI
1298 Double_t qxPrimePtPOI=0.,qyPrimePtPOI=0.;
1299 Double_t mPrimePtPOI=0.;
3d824203 1300 Double_t dM0p111PtPOI=0.; // to be improved (name)
77515452 1301
3d824203 1302 for(Int_t bin=1;bin<(fnBinsPt+1);bin++) // loop over pt-bins
1303 {
1304 // q'':
77515452 1305 qxPrimePrimePtPOI = (ptReq1nPrimePrime->GetBinContent(bin))*(ptReq1nPrimePrime->GetBinEntries(bin));
1306 qyPrimePrimePtPOI = (ptImq1nPrimePrime->GetBinContent(bin))*(ptImq1nPrimePrime->GetBinEntries(bin));
1307 q2xPrimePrimePtPOIHere = (ptReq2nPrimePrime->GetBinContent(bin))*(ptReq2nPrimePrime->GetBinEntries(bin));
1308 q2yPrimePrimePtPOIHere = (ptImq2nPrimePrime->GetBinContent(bin))*(ptImq2nPrimePrime->GetBinEntries(bin));
3d824203 1309
77515452 1310 qxW2PrimePrimePtPOI = (req1nW2PrimePrimePt->GetBinContent(bin))*(req1nW2PrimePrimePt->GetBinEntries(bin));
1311 qyW2PrimePrimePtPOI = (imq1nW2PrimePrimePt->GetBinContent(bin))*(imq1nW2PrimePrimePt->GetBinEntries(bin));
3d824203 1312
77515452 1313 q2xW1PrimePrimePtPOI = (req2nW1PrimePrimePt->GetBinContent(bin))*(req2nW1PrimePrimePt->GetBinEntries(bin));
1314 q2yW1PrimePrimePtPOI = (imq2nW1PrimePrimePt->GetBinContent(bin))*(imq2nW1PrimePrimePt->GetBinEntries(bin));
3d824203 1315
77515452 1316 dS11mPrimePrimePtPOI = (sumOfW1upTomPrimePrimePt->GetBinContent(bin))*(sumOfW1upTomPrimePrimePt->GetBinEntries(bin));
1317 dS12mPrimePrimePtPOI = (sumOfW2upTomPrimePrimePt->GetBinContent(bin))*(sumOfW2upTomPrimePrimePt->GetBinEntries(bin));
1318 dS13mPrimePrimePtPOI = (sumOfW3upTomPrimePrimePt->GetBinContent(bin))*(sumOfW3upTomPrimePrimePt->GetBinEntries(bin));
3d824203 1319
77515452 1320 mPrimePrimePtPOI = sumOfW1upTomPrimePrimePt->GetBinEntries(bin); // to be improved
3d824203 1321
1322 dM1pp11PtPOI=dS11mPrimePrimePtPOI*(dSnk[1][0]-dSnk[0][1])-2.*dS12mPrimePrimePtPOI*dSnk[0][0]+2.*dS13mPrimePrimePtPOI;
1323 dM1pp2PtPOI=dS11mPrimePrimePtPOI*dSnk[0][1]-dS13mPrimePrimePtPOI;
1324 dM2pp1PtPOI=dS12mPrimePrimePtPOI*dSnk[0][0]-dS13mPrimePrimePtPOI;
77515452 1325 dM0pp3PtPOI=mPrimePrimePtPOI*dSnk[0][2]-dS13mPrimePrimePtPOI;
1326 dM0pp12PtPOI=mPrimePrimePtPOI*dSnk[0][0]*dSnk[0][1]-dM2pp1PtPOI-dM1pp2PtPOI-dM0pp3PtPOI-dS13mPrimePrimePtPOI;
b7cb54d5 1327
1328 // recursive formula (OK)
1329 // dM0pp111PtPOI=mPrimePrimePtPOI*dSnk[2][0]-3.*dM1pp11PtPOI-3.*dM0pp12PtPOI-3.*dM2pp1PtPOI-3.*dM1pp2PtPOI-dM0pp3PtPOI-dS13mPrimePrimePtPOI;
3d824203 1330
b7cb54d5 1331 // direct formula (OK)
1332 dM0pp111PtPOI = mPrimePrimePtPOI*(dSnk[2][0]-3.*dSnk[0][0]*dSnk[0][1]+2.*dSnk[0][2])-3.*(dS11mPrimePrimePtPOI*(dSnk[1][0]-dSnk[0][1])+2.*(dS13mPrimePrimePtPOI-dS12mPrimePrimePtPOI*dSnk[0][0]));
1333
3d824203 1334 // q':
77515452 1335 qxPrimePtPOI = (ptReq1nPrime->GetBinContent(bin))*(ptReq1nPrime->GetBinEntries(bin));
1336 qyPrimePtPOI = (ptImq1nPrime->GetBinContent(bin))*(ptImq1nPrime->GetBinEntries(bin));
3d824203 1337
77515452 1338 mPrimePtPOI = ptReq1nPrime->GetBinEntries(bin); // to be improved
1339 dM0p111PtPOI=mPrimePtPOI*(dSnk[2][0]-3.*dSnk[0][1]*dSnk[0][0]+2.*dSnk[0][2]);
3d824203 1340
77515452 1341 // 2-p the needed one
1342 Double_t two1n1nWPerPtBinPOI=0.;
1343 if((mPrimePrimePtPOI+mPrimePtPOI)*dSnk[0][0]-dS11mPrimePrimePtPOI>0)
3d824203 1344 {
77515452 1345 two1n1nWPerPtBinPOI = (qxPrimePrimePtPOI*dQnkX[0][0]+qyPrimePrimePtPOI*dQnkY[0][0]+qxPrimePtPOI*dQnkX[0][0]+qyPrimePtPOI*dQnkY[0][0]-dS11mPrimePrimePtPOI)/((mPrimePrimePtPOI+mPrimePtPOI)*dSnk[0][0]-dS11mPrimePrimePtPOI);
3d824203 1346
77515452 1347 f2WPerPtBin1n1nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,two1n1nWPerPtBinPOI,(mPrimePrimePtPOI+mPrimePtPOI)*dSnk[0][0]-dS11mPrimePrimePtPOI);
3d824203 1348 }
1349
77515452 1350 // 2-p temporary one
3d824203 1351 Double_t two1n1nW1ppW1W1PtPOI=0.; // <w1 w2 w3 cos(n(phi2-phi3))> // OK!!!
1352 if(dM1pp11PtPOI)
1353 {
1354 two1n1nW1ppW1W1PtPOI = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*dS11mPrimePrimePtPOI-2.*(qxW2PrimePrimePtPOI*dQnkX[0][0]+qyW2PrimePrimePtPOI*dQnkY[0][0]) - dS11mPrimePrimePtPOI*dSnk[0][1]+2.*dS13mPrimePrimePtPOI)/dM1pp11PtPOI; // CORRECT !!! <w1 w2 w3 cos(n(phi2-phi3))>
1355 }
1356
77515452 1357 // 2-p temporary one
3d824203 1358 Double_t two1npp1nW1W2PtPOI=0.; // <w2 w3^2 cos(n(psi1-phi2))> // OK !!!
1359 if(dM0pp12PtPOI)
1360 {
77515452 1361 two1npp1nW1W2PtPOI = (dSnk[0][1]*(qxPrimePrimePtPOI*dQnkX[0][0]+qyPrimePrimePtPOI*dQnkY[0][0])-(qxW2PrimePrimePtPOI*dQnkX[0][0]+qyW2PrimePrimePtPOI*dQnkY[0][0])-dM1pp2PtPOI-(qxPrimePrimePtPOI*dQnkX[0][2]+qyPrimePrimePtPOI*dQnkY[0][2])+dS13mPrimePrimePtPOI)/dM0pp12PtPOI; // CORRECT !!! <w2 w3^2 cos(n(psi1-phi2))>
3d824203 1362 }
1363
77515452 1364 // 2-p temporary one
3d824203 1365 Double_t two1npp1nW2ppW1PtPOI=0.; // <w1^2 w2 cos(n(psi1-phi2))> // OK !!!
1366 if(dM2pp1PtPOI)
1367 {
1368 two1npp1nW2ppW1PtPOI = ((qxW2PrimePrimePtPOI*dQnkX[0][0]+qyW2PrimePrimePtPOI*dQnkY[0][0])-dS13mPrimePrimePtPOI)/dM2pp1PtPOI; // CORRECT !!! <w1^2 w2 cos(n(psi1-phi2))>
1369 }
1370
77515452 1371 // 2-p temporary one
3d824203 1372 Double_t two2npp2nW1ppW2PtPOI=0.; // <w1 w2^2 cos(2n(psi1-phi2))> OK !!!
1373 if(dM1pp2PtPOI)
1374 {
1375 two2npp2nW1ppW2PtPOI = ((q2xW1PrimePrimePtPOI*dQnkX[1][1]+q2yW1PrimePrimePtPOI*dQnkY[1][1])-dS13mPrimePrimePtPOI)/dM1pp2PtPOI; // CORRECT !!! <w1 w2^2 cos(2n(psi1-phi2))>
1376 }
1377
77515452 1378 // 2-p temporary one
3d824203 1379 Double_t two1npp1nW3PtPOI=0.; // <w2^3 cos(n(psi1-phi2))> // OK !!!
1380 if(dM0pp3PtPOI)
1381 {
77515452 1382 two1npp1nW3PtPOI = (qxPrimePrimePtPOI*dQnkX[0][2]+qyPrimePrimePtPOI*dQnkY[0][2]-dS13mPrimePrimePtPOI)/dM0pp3PtPOI; // CORRECT !!! <w2^3 cos(n(psi1-phi2))>
3d824203 1383 }
1384
77515452 1385 // 3-p temporary one
3d824203 1386 Double_t three2npp1n1nW1ppW1W1PtPOI=0.; // <w1 w2 w3 cos(n(2psi1-phi2-phi3))> // OK!!!
1387 if(dM1pp11PtPOI)
1388 {
1389 three2npp1n1nW1ppW1W1PtPOI = (q2xW1PrimePrimePtPOI*(dQnkX[0][0]*dQnkX[0][0]-dQnkY[0][0]*dQnkY[0][0])+2.*q2yW1PrimePrimePtPOI*dQnkX[0][0]*dQnkY[0][0]-2.*(qxW2PrimePrimePtPOI*dQnkX[0][0]+qyW2PrimePrimePtPOI*dQnkY[0][0])-(q2xW1PrimePrimePtPOI*dQnkX[1][1]+q2yW1PrimePrimePtPOI*dQnkY[1][1])+2.*dS13mPrimePrimePtPOI)/dM1pp11PtPOI; // CORRECT !!! <w1 w2 w3 cos(n(2psi1-phi2-phi3))>
1390 }
1391
77515452 1392 // 3-p temporary one
3d824203 1393 Double_t three1npp1n2nW0ppW1W2PtPOI=0.; // <w2 w3^2 cos(n(psi1+phi2-2*phi3))> // OK!!!
1394 if(dM0pp12PtPOI)
1395 {
77515452 1396 three1npp1n2nW0ppW1W2PtPOI = (qxPrimePrimePtPOI*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])-qyPrimePrimePtPOI*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1])-(qxW2PrimePrimePtPOI*dQnkX[0][0]+qyW2PrimePrimePtPOI*dQnkY[0][0])-(q2xW1PrimePrimePtPOI*dQnkX[1][1]+q2yW1PrimePrimePtPOI*dQnkY[1][1])-(qxPrimePrimePtPOI*dQnkX[0][2]+qyPrimePrimePtPOI*dQnkY[0][2])+2.*dS13mPrimePrimePtPOI)/dM0pp12PtPOI; // CORRECT !!! <w2 w3^2 cos(n(psi1+phi2-2.*phi3))>
3d824203 1397 }
1398
3d824203 1399 /*
77515452 1400 // 4-p RP part
3d824203 1401 Double_t four1npp1n1n1nW1W1W1=0.; // <w1 w2 w3 cos(n(psi1+phi1-phi2-phi3))>
1402 if(dM0pp111PtPOI)
1403 {
77515452 1404 four1npp1n1n1nW1W1W1 = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimePrimePtPOI*dQnkX[0][0]+qyPrimePrimePtPOI*dQnkY[0][0])-2.*dM1pp11PtPOI*two1n1nW1ppW1W1PtPOI-dM1pp11PtPOI*three2npp1n1nW1ppW1W1PtPOI-dM0pp12PtPOI*three1npp1n2nW0ppW1W2PtPOI-2.*dM0pp12PtPOI*two1npp1nW1W2PtPOI-3.*dM2pp1PtPOI*two1npp1nW2ppW1PtPOI-2.*dM1pp2PtPOI-dM1pp2PtPOI*two2npp2nW1ppW2PtPOI-dM0pp3PtPOI*two1npp1nW3PtPOI-dS13mPrimePrimePtPOI)/(dM0pp111PtPOI);
3d824203 1405 }
3d824203 1406 */
3d824203 1407
77515452 1408 /*
1409 // 4-p POI part
1410 Double_t four1npp1n1n1nW1W1W1POI=0.;
1411 if(dM0p111PtPOI>0&&mPrimePtPOI>0&&nRP>0)
1412 {
1413 four1npp1n1n1nW1W1W1POI = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimePtPOI*dQnkX[0][0]+qyPrimePtPOI*dQnkY[0][0])-2.*dSnk[0][1]* (qxPrimePtPOI*dQnkX[0][0]+qyPrimePtPOI*dQnkY[0][0])+2.*(qxPrimePtPOI*dQnkX[0][2]+qyPrimePtPOI*dQnkY[0][2])-qxPrimePtPOI*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])+qyPrimePtPOI*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1]))/dM0p111PtPOI;
3d824203 1414 }
77515452 1415 */
3d824203 1416
b7cb54d5 1417 // recursive formula for 4-p RP and POI in all combinations (full, partial and no overlap) (OK)
77515452 1418 Double_t four1npp1n1n1nW1W1W1PtPOI=0.;
1419 if(dM0pp111PtPOI+dM0p111PtPOI)
1420 {
b7cb54d5 1421 four1npp1n1n1nW1W1W1PtPOI = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimePrimePtPOI*dQnkX[0][0]+qyPrimePrimePtPOI*dQnkY[0][0])-2.*dM1pp11PtPOI*two1n1nW1ppW1W1PtPOI-dM1pp11PtPOI*three2npp1n1nW1ppW1W1PtPOI-dM0pp12PtPOI*three1npp1n2nW0ppW1W2PtPOI-2.*dM0pp12PtPOI*two1npp1nW1W2PtPOI-3.*dM2pp1PtPOI*two1npp1nW2ppW1PtPOI-2.*dM1pp2PtPOI-dM1pp2PtPOI*two2npp2nW1ppW2PtPOI-dM0pp3PtPOI*two1npp1nW3PtPOI-dS13mPrimePrimePtPOI+(pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimePtPOI*dQnkX[0][0]+qyPrimePtPOI*dQnkY[0][0])-2.*dSnk[0][1]* (qxPrimePtPOI*dQnkX[0][0]+qyPrimePtPOI*dQnkY[0][0])+2.*(qxPrimePtPOI*dQnkX[0][2]+qyPrimePtPOI*dQnkY[0][2])-qxPrimePtPOI*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])+qyPrimePtPOI*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1]))/(dM0pp111PtPOI+dM0p111PtPOI);
1422
1423
1424
1425 Double_t four1npp1n1n1nW1W1W1PtPOIb =
1426 ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimePrimePtPOI*dQnkX[0][0]+qyPrimePrimePtPOI*dQnkY[0][0])
1427 - q2xW1PrimePrimePtPOI*(dQnkX[0][0]*dQnkX[0][0]-dQnkY[0][0]*dQnkY[0][0])+2.*q2yW1PrimePrimePtPOI*dQnkX[0][0]*dQnkY[0][0]
1428 - qxPrimePrimePtPOI*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])-qyPrimePrimePtPOI*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1])
1429 - 2.*dSnk[0][1]*(qxPrimePrimePtPOI*dQnkX[0][0]+qyPrimePrimePtPOI*dQnkY[0][0])
1430 - 2.*(pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*dS11mPrimePrimePtPOI
1431 + 7.*(qxW2PrimePrimePtPOI*dQnkX[0][0]+qyW2PrimePrimePtPOI*dQnkY[0][0])
1432 - 1.*(qxW2PrimePrimePtPOI*dQnkX[0][0]+qyW2PrimePrimePtPOI*dQnkY[0][0])
1433 + 1.*(q2xW1PrimePrimePtPOI*dQnkX[1][1]+q2yW1PrimePrimePtPOI*dQnkY[1][1])
1434 + 2.*(qxPrimePrimePtPOI*dQnkX[0][2]+qyPrimePrimePtPOI*dQnkY[0][2])
1435 + 2.*dS11mPrimePrimePtPOI*dSnk[0][1]
1436 - 6.*dS13mPrimePrimePtPOI
1437 + (pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimePtPOI*dQnkX[0][0]+qyPrimePtPOI*dQnkY[0][0])
1438 - 2.*dSnk[0][1]*(qxPrimePtPOI*dQnkX[0][0]+qyPrimePtPOI*dQnkY[0][0])
1439 - qxPrimePtPOI*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])-qyPrimePtPOI*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1])
1440 + 2.*(qxPrimePrimePtPOI*dQnkX[0][2]+qyPrimePrimePtPOI*dQnkY[0][2]))/(dM0pp111PtPOI+dM0p111PtPOI);
1441
1442
1443
1444
1445
1446
1447
1448 cout<<endl;
1449 cout<<"ab"<<endl;
1450 cout<<four1npp1n1n1nW1W1W1PtPOI<<endl;
1451 cout<<four1npp1n1n1nW1W1W1PtPOIb<<endl;
1452 cout<<endl;
3d824203 1453
77515452 1454 f4WPerPtBin1n1n1n1nPOI->Fill(fPtMin+(bin-1)*dBinWidthPt,four1npp1n1n1nW1W1W1PtPOI,dM0pp111PtPOI+dM0p111PtPOI);
1455 } // end of if(dM0pp111PtPOI+dM0p111PtPOI)
1456 } // for(Int_t bin=1;bin<(fnBinsPt+1);bin++) // loop over pt-bins
1457 //...........................................................................................................
1458
1459 //...........................................................................................................
1460 // PrimePrime Eta POI
1461 Double_t qxPrimePrimeEtaPOI=0.,qyPrimePrimeEtaPOI=0.,q2xPrimePrimeEtaPOIHere=0.,q2yPrimePrimeEtaPOIHere=0.;//add comments for these variable
3d824203 1462 Double_t qxW2PrimePrimeEtaPOI=0.,qyW2PrimePrimeEtaPOI=0.,q2xW1PrimePrimeEtaPOI=0.,q2yW1PrimePrimeEtaPOI=0.;//add comments for these variable
1463 Double_t dS11mPrimePrimeEtaPOI=0.; // to be improved (name)
1464 Double_t dS12mPrimePrimeEtaPOI=0.; // to be improved (name)
1465 Double_t dS13mPrimePrimeEtaPOI=0.; // to be improved (name)
1466 Double_t mPrimePrimeEtaPOIHere=0.; // to be improved (name)
1467
1468 Double_t dM1pp11EtaPOI=0.; // to be improved (name)
1469 Double_t dM0pp111EtaPOI=0.; // to be improved (name)
1470 Double_t dM0pp12EtaPOI=0.;
1471 Double_t dM2pp1EtaPOI=0.;
1472 Double_t dM1pp2EtaPOI=0.;
1473 Double_t dM0pp3EtaPOI=0.;
1474
77515452 1475 // Prime Eta POI
1476 Double_t qxPrimeEtaPOI=0.,qyPrimeEtaPOI=0.;
1477 Double_t mPrimeEtaPOI=0.;
3d824203 1478 Double_t dM0p111EtaPOI=0.; // to be improved (name)
1479
77515452 1480 for(Int_t bin=1;bin<(fnBinsEta+1);bin++) // loop over eta-bins
3d824203 1481 {
1482 // q'':
77515452 1483 qxPrimePrimeEtaPOI = (etaReq1nPrimePrime->GetBinContent(bin))*(etaReq1nPrimePrime->GetBinEntries(bin));
1484 qyPrimePrimeEtaPOI = (etaImq1nPrimePrime->GetBinContent(bin))*(etaImq1nPrimePrime->GetBinEntries(bin));
1485 q2xPrimePrimeEtaPOIHere = (etaReq2nPrimePrime->GetBinContent(bin))*(etaReq2nPrimePrime->GetBinEntries(bin));
1486 q2yPrimePrimeEtaPOIHere = (etaImq2nPrimePrime->GetBinContent(bin))*(etaImq2nPrimePrime->GetBinEntries(bin));
3d824203 1487
77515452 1488 qxW2PrimePrimeEtaPOI = (req1nW2PrimePrimeEta->GetBinContent(bin))*(req1nW2PrimePrimeEta->GetBinEntries(bin));
1489 qyW2PrimePrimeEtaPOI = (imq1nW2PrimePrimeEta->GetBinContent(bin))*(imq1nW2PrimePrimeEta->GetBinEntries(bin));
3d824203 1490
77515452 1491 q2xW1PrimePrimeEtaPOI = (req2nW1PrimePrimeEta->GetBinContent(bin))*(req2nW1PrimePrimeEta->GetBinEntries(bin));
1492 q2yW1PrimePrimeEtaPOI = (imq2nW1PrimePrimeEta->GetBinContent(bin))*(imq2nW1PrimePrimeEta->GetBinEntries(bin));
3d824203 1493
77515452 1494 dS11mPrimePrimeEtaPOI = (sumOfW1upTomPrimePrimeEta->GetBinContent(bin))*(sumOfW1upTomPrimePrimeEta->GetBinEntries(bin));
1495 dS12mPrimePrimeEtaPOI = (sumOfW2upTomPrimePrimeEta->GetBinContent(bin))*(sumOfW2upTomPrimePrimeEta->GetBinEntries(bin));
1496 dS13mPrimePrimeEtaPOI = (sumOfW3upTomPrimePrimeEta->GetBinContent(bin))*(sumOfW3upTomPrimePrimeEta->GetBinEntries(bin));
3d824203 1497
77515452 1498 mPrimePrimeEtaPOIHere = sumOfW1upTomPrimePrimeEta->GetBinEntries(bin); // to be improved
3d824203 1499
1500 dM1pp11EtaPOI=dS11mPrimePrimeEtaPOI*(dSnk[1][0]-dSnk[0][1])-2.*dS12mPrimePrimeEtaPOI*dSnk[0][0]+2.*dS13mPrimePrimeEtaPOI;
1501 dM1pp2EtaPOI=dS11mPrimePrimeEtaPOI*dSnk[0][1]-dS13mPrimePrimeEtaPOI;
1502 dM2pp1EtaPOI=dS12mPrimePrimeEtaPOI*dSnk[0][0]-dS13mPrimePrimeEtaPOI;
1503 dM0pp3EtaPOI=mPrimePrimeEtaPOIHere*dSnk[0][2]-dS13mPrimePrimeEtaPOI;
1504 dM0pp12EtaPOI=mPrimePrimeEtaPOIHere*dSnk[0][0]*dSnk[0][1]-dM2pp1EtaPOI-dM1pp2EtaPOI-dM0pp3EtaPOI-dS13mPrimePrimeEtaPOI;
1505 dM0pp111EtaPOI=mPrimePrimeEtaPOIHere*dSnk[2][0]-3.*dM1pp11EtaPOI-3.*dM0pp12EtaPOI-3.*dM2pp1EtaPOI-3.*dM1pp2EtaPOI-dM0pp3EtaPOI-dS13mPrimePrimeEtaPOI;
1506
1507 // q':
77515452 1508 qxPrimeEtaPOI = (etaReq1nPrime->GetBinContent(bin))*(etaReq1nPrime->GetBinEntries(bin));
1509 qyPrimeEtaPOI = (etaImq1nPrime->GetBinContent(bin))*(etaImq1nPrime->GetBinEntries(bin));
3d824203 1510
77515452 1511 mPrimeEtaPOI = etaReq1nPrime->GetBinEntries(bin); // to be improved
1512 dM0p111EtaPOI=mPrimeEtaPOI*(dSnk[2][0]-3.*dSnk[0][1]*dSnk[0][0]+2.*dSnk[0][2]);
3d824203 1513
77515452 1514 // 2-p the needed one
1515 Double_t two1n1nWPerEtaBinPOI=0.;
1516 if((mPrimePrimeEtaPOIHere+mPrimeEtaPOI)*dSnk[0][0]-dS11mPrimePrimeEtaPOI>0)
3d824203 1517 {
77515452 1518 two1n1nWPerEtaBinPOI = (qxPrimePrimeEtaPOI*dQnkX[0][0]+qyPrimePrimeEtaPOI*dQnkY[0][0]+qxPrimeEtaPOI*dQnkX[0][0]+qyPrimeEtaPOI*dQnkY[0][0]-dS11mPrimePrimeEtaPOI)/((mPrimePrimeEtaPOIHere+mPrimeEtaPOI)*dSnk[0][0]-dS11mPrimePrimeEtaPOI);
3d824203 1519
77515452 1520 f2WPerEtaBin1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,two1n1nWPerEtaBinPOI,(mPrimePrimeEtaPOIHere+mPrimeEtaPOI)*dSnk[0][0]-dS11mPrimePrimeEtaPOI); // <2'>_{n|n}
3d824203 1521 }
1522
77515452 1523 // 2-p the temporary one
3d824203 1524 Double_t two1n1nW1ppW1W1EtaPOI=0.; // <w1 w2 w3 cos(n(phi2-phi3))> // OK!!!
1525 if(dM1pp11EtaPOI)
1526 {
77515452 1527 two1n1nW1ppW1W1EtaPOI = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*dS11mPrimePrimeEtaPOI-2.*(qxW2PrimePrimeEtaPOI*dQnkX[0][0]+qyW2PrimePrimeEtaPOI*dQnkY[0][0])-dS11mPrimePrimeEtaPOI*dSnk[0][1]+2.*dS13mPrimePrimeEtaPOI)/dM1pp11EtaPOI; // CORRECT !!! <w1 w2 w3 cos(n(phi2-phi3))>
3d824203 1528 }
1529
77515452 1530 // 2-p the temporary one
3d824203 1531 Double_t two1npp1nW1W2EtaPOI=0.; // <w2 w3^2 cos(n(psi1-phi2))> // OK !!!
1532 if(dM0pp12EtaPOI)
1533 {
77515452 1534 two1npp1nW1W2EtaPOI = (dSnk[0][1]*(qxPrimePrimeEtaPOI*dQnkX[0][0]+qyPrimePrimeEtaPOI*dQnkY[0][0])-(qxW2PrimePrimeEtaPOI*dQnkX[0][0]+qyW2PrimePrimeEtaPOI*dQnkY[0][0])-dM1pp2EtaPOI-(qxPrimePrimeEtaPOI*dQnkX[0][2]+qyPrimePrimeEtaPOI*dQnkY[0][2])+dS13mPrimePrimeEtaPOI)/dM0pp12EtaPOI; // CORRECT !!! <w2 w3^2 cos(n(psi1-phi2))>
3d824203 1535 }
1536
77515452 1537 // 2-p the temporary one
3d824203 1538 Double_t two1npp1nW2ppW1EtaPOI=0.; // <w1^2 w2 cos(n(psi1-phi2))> // OK !!!
1539 if(dM2pp1EtaPOI)
1540 {
1541 two1npp1nW2ppW1EtaPOI = ((qxW2PrimePrimeEtaPOI*dQnkX[0][0]+qyW2PrimePrimeEtaPOI*dQnkY[0][0])-dS13mPrimePrimeEtaPOI)/dM2pp1EtaPOI; // CORRECT !!! <w1^2 w2 cos(n(psi1-phi2))>
1542 }
1543
77515452 1544 // 2-p the temporary one
3d824203 1545 Double_t two2npp2nW1ppW2EtaPOI=0.; // <w1 w2^2 cos(2n(psi1-phi2))> OK !!!
1546 if(dM1pp2EtaPOI)
1547 {
1548 two2npp2nW1ppW2EtaPOI = ((q2xW1PrimePrimeEtaPOI*dQnkX[1][1]+q2yW1PrimePrimeEtaPOI*dQnkY[1][1])-dS13mPrimePrimeEtaPOI)/dM1pp2EtaPOI; // CORRECT !!! <w1 w2^2 cos(2n(psi1-phi2))>
1549 }
1550
77515452 1551 // 2-p the temporary one
3d824203 1552 Double_t two1npp1nW3EtaPOI=0.; // <w2^3 cos(n(psi1-phi2))> // OK !!!
1553 if(dM0pp3EtaPOI)
1554 {
77515452 1555 two1npp1nW3EtaPOI = (qxPrimePrimeEtaPOI*dQnkX[0][2]+qyPrimePrimeEtaPOI*dQnkY[0][2]-dS13mPrimePrimeEtaPOI)/dM0pp3EtaPOI; // CORRECT !!! <w2^3 cos(n(psi1-phi2))>
3d824203 1556 }
1557
77515452 1558 // 3-p the temporary one
3d824203 1559 Double_t three2npp1n1nW1ppW1W1EtaPOI=0.; // <w1 w2 w3 cos(n(2psi1-phi2-phi3))> // OK!!!
1560 if(dM1pp11EtaPOI)
1561 {
1562 three2npp1n1nW1ppW1W1EtaPOI = (q2xW1PrimePrimeEtaPOI*(dQnkX[0][0]*dQnkX[0][0]-dQnkY[0][0]*dQnkY[0][0])+2.*q2yW1PrimePrimeEtaPOI*dQnkX[0][0]*dQnkY[0][0]-2.*(qxW2PrimePrimeEtaPOI*dQnkX[0][0]+qyW2PrimePrimeEtaPOI*dQnkY[0][0])-(q2xW1PrimePrimeEtaPOI*dQnkX[1][1]+q2yW1PrimePrimeEtaPOI*dQnkY[1][1])+2.*dS13mPrimePrimeEtaPOI)/dM1pp11EtaPOI; // CORRECT !!! <w1 w2 w3 cos(n(2psi1-phi2-phi3))>
1563 }
1564
77515452 1565 // 3-p the temporary one
3d824203 1566 Double_t three1npp1n2nW0ppW1W2EtaPOI=0.; // <w2 w3^2 cos(n(psi1+phi2-2*phi3))> // OK!!!
1567 if(dM0pp12EtaPOI)
1568 {
77515452 1569 three1npp1n2nW0ppW1W2EtaPOI = (qxPrimePrimeEtaPOI*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])-qyPrimePrimeEtaPOI*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1])-(qxW2PrimePrimeEtaPOI*dQnkX[0][0]+qyW2PrimePrimeEtaPOI*dQnkY[0][0])-(q2xW1PrimePrimeEtaPOI*dQnkX[1][1]+q2yW1PrimePrimeEtaPOI*dQnkY[1][1])-(qxPrimePrimeEtaPOI*dQnkX[0][2]+qyPrimePrimeEtaPOI*dQnkY[0][2])+2.*dS13mPrimePrimeEtaPOI)/dM0pp12EtaPOI; // CORRECT !!! <w2 w3^2 cos(n(psi1+phi2-2.*phi3))>
3d824203 1570 }
1571
3d824203 1572 /*
77515452 1573 // 4-p RP part
3d824203 1574 Double_t four1npp1n1n1nW1W1W1=0.; // <w1 w2 w3 cos(n(psi1+phi1-phi2-phi3))>
1575 if(dM0pp111EtaPOI)
1576 {
77515452 1577 four1npp1n1n1nW1W1W1 = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimePrimeEtaPOI*dQnkX[0][0]+qyPrimePrimeEtaPOI*dQnkY[0][0])-2.*dM1pp11EtaPOI*two1n1nW1ppW1W1EtaPOI-dM1pp11EtaPOI*three2npp1n1nW1ppW1W1EtaPOI-dM0pp12EtaPOI*three1npp1n2nW0ppW1W2EtaPOI-2.*dM0pp12EtaPOI*two1npp1nW1W2EtaPOI-3.*dM2pp1EtaPOI*two1npp1nW2ppW1EtaPOI-2.*dM1pp2EtaPOI-dM1pp2EtaPOI*two2npp2nW1ppW2EtaPOI-dM0pp3EtaPOI*two1npp1nW3EtaPOI-dS13mPrimePrimeEtaPOI)/(dM0pp111EtaPOI);
1578 }
1579 */
1580 /*
1581 // 4-p POI part
1582 Double_t four1npp1n1n1nW1W1W1POI=0.;
1583 if(dM0p111EtaPOI>0&&mPrimeEtaPOI>0&&nRP>0)
1584 {
1585 four1npp1n1n1nW1W1W1POI = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimeEtaPOI*dQnkX[0][0]+qyPrimeEtaPOI*dQnkY[0][0])-2.*dSnk[0][1]* (qxPrimeEtaPOI*dQnkX[0][0]+qyPrimeEtaPOI*dQnkY[0][0])+2.*(qxPrimeEtaPOI*dQnkX[0][2]+qyPrimeEtaPOI*dQnkY[0][2])-qxPrimeEtaPOI*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])+qyPrimeEtaPOI*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1]))/dM0p111EtaPOI;
3d824203 1586 }
3d824203 1587 */
1588
77515452 1589 // 4-p RP and POI in all combinations (full, partial and no overlap)
1590 Double_t four1npp1n1n1nW1W1W1EtaPOI=0.;
1591
1592 if(dM0pp111EtaPOI+dM0p111EtaPOI)
1593 {
1594 four1npp1n1n1nW1W1W1EtaPOI = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimePrimeEtaPOI*dQnkX[0][0]+qyPrimePrimeEtaPOI*dQnkY[0][0])-2.*dM1pp11EtaPOI*two1n1nW1ppW1W1EtaPOI-dM1pp11EtaPOI*three2npp1n1nW1ppW1W1EtaPOI-dM0pp12EtaPOI*three1npp1n2nW0ppW1W2EtaPOI-2.*dM0pp12EtaPOI*two1npp1nW1W2EtaPOI-3.*dM2pp1EtaPOI*two1npp1nW2ppW1EtaPOI-2.*dM1pp2EtaPOI-dM1pp2EtaPOI*two2npp2nW1ppW2EtaPOI-dM0pp3EtaPOI*two1npp1nW3EtaPOI-dS13mPrimePrimeEtaPOI+(pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimeEtaPOI*dQnkX[0][0]+qyPrimeEtaPOI*dQnkY[0][0])-2.*dSnk[0][1]*(qxPrimeEtaPOI*dQnkX[0][0]+qyPrimeEtaPOI*dQnkY[0][0])+2.*(qxPrimeEtaPOI*dQnkX[0][2]+qyPrimeEtaPOI*dQnkY[0][2])-qxPrimeEtaPOI*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])+qyPrimeEtaPOI*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1]))/(dM0pp111EtaPOI+dM0p111EtaPOI);
1595
1596 f4WPerEtaBin1n1n1n1nPOI->Fill(fEtaMin+(bin-1)*dBinWidthEta,four1npp1n1n1nW1W1W1EtaPOI,dM0pp111EtaPOI+dM0p111EtaPOI);
1597 }
1598 }
1599 //...........................................................................................................
1600
3d824203 1601
1602
77515452 1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614 // RPs
1615 ptReq1nPrime->Reset(); // to be improved
1616 ptImq1nPrime->Reset(); // to be improved
1617 ptReq2nPrime->Reset(); // to be improved
1618 ptImq2nPrime->Reset(); // to be improved
1619
1620 etaReq1nPrime->Reset(); // to be improved
1621 etaImq1nPrime->Reset(); // to be improved
1622 etaReq2nPrime->Reset(); // to be improved
1623 etaImq2nPrime->Reset(); // to be improved
1624
1625
1626 //...........................................................................................................
1627 // PrimePrime Pt RP
1628 Double_t qxPtRP=0.,qyPtRP=0.,q2xPtRP=0.,q2yPtRP=0.;//add comments for these variable
1629 Double_t qxW2PtRP=0.,qyW2PtRP=0.,q2xW1PtRP=0.,q2yW1PtRP=0.;//add comments for these variable
1630 Double_t dS11mPtRP=0.; // to be improved (name)
1631 Double_t dS12mPtRP=0.; // to be improved (name)
1632 Double_t dS13mPtRP=0.; // to be improved (name)
1633 Double_t mPtRP=0.; // to be improved (name)
1634
1635 Double_t dM1pp11PtRP=0.; // to be improved (name)
1636 Double_t dM0pp111PtRP=0.; // to be improved (name)
1637 Double_t dM0pp12PtRP=0.;
1638 Double_t dM2pp1PtRP=0.;
1639 Double_t dM1pp2PtRP=0.;
1640 Double_t dM0pp3PtRP=0.;
1641
1642 // Prime Pt RP
1643 Double_t qxPrimePtRP=0.,qyPrimePtRP=0.;
1644 Double_t mPrimePtRP=0.;
1645 Double_t dM0p111PtRP=0.; // to be improved (name)
1646
1647 for(Int_t bin=1;bin<(fnBinsPt+1);bin++) // loop over pt-bins
1648 {
1649 // q'':
1650 qxPtRP = (ptReq1n->GetBinContent(bin))*(ptReq1n->GetBinEntries(bin));
1651 qyPtRP = (ptImq1n->GetBinContent(bin))*(ptImq1n->GetBinEntries(bin));
1652 q2xPtRP = (ptReq2n->GetBinContent(bin))*(ptReq2n->GetBinEntries(bin));
1653 q2yPtRP = (ptImq2n->GetBinContent(bin))*(ptImq2n->GetBinEntries(bin));
1654
1655 qxW2PtRP = (req1nW2Pt->GetBinContent(bin))*(req1nW2Pt->GetBinEntries(bin));
1656 qyW2PtRP = (imq1nW2Pt->GetBinContent(bin))*(imq1nW2Pt->GetBinEntries(bin));
1657
1658 q2xW1PtRP = (req2nW1Pt->GetBinContent(bin))*(req2nW1Pt->GetBinEntries(bin));
1659 q2yW1PtRP = (imq2nW1Pt->GetBinContent(bin))*(imq2nW1Pt->GetBinEntries(bin));
1660
1661 dS11mPtRP = (sumOfW1upTomPt->GetBinContent(bin))*(sumOfW1upTomPt->GetBinEntries(bin));
1662 dS12mPtRP = (sumOfW2upTomPt->GetBinContent(bin))*(sumOfW2upTomPt->GetBinEntries(bin));
1663 dS13mPtRP = (sumOfW3upTomPt->GetBinContent(bin))*(sumOfW3upTomPt->GetBinEntries(bin));
1664
1665 mPtRP = sumOfW1upTomPt->GetBinEntries(bin); // to be improved
1666
1667 dM1pp11PtRP=dS11mPtRP*(dSnk[1][0]-dSnk[0][1])-2.*dS12mPtRP*dSnk[0][0]+2.*dS13mPtRP;
1668 dM1pp2PtRP=dS11mPtRP*dSnk[0][1]-dS13mPtRP;
1669 dM2pp1PtRP=dS12mPtRP*dSnk[0][0]-dS13mPtRP;
1670 dM0pp3PtRP=mPtRP*dSnk[0][2]-dS13mPtRP;
1671 dM0pp12PtRP=mPtRP*dSnk[0][0]*dSnk[0][1]-dM2pp1PtRP-dM1pp2PtRP-dM0pp3PtRP-dS13mPtRP;
1672 dM0pp111PtRP=mPtRP*dSnk[2][0]-3.*dM1pp11PtRP-3.*dM0pp12PtRP-3.*dM2pp1PtRP-3.*dM1pp2PtRP-dM0pp3PtRP-dS13mPtRP;
1673
1674 // q':
1675 qxPrimePtRP = (ptReq1nPrime->GetBinContent(bin))*(ptReq1nPrime->GetBinEntries(bin));
1676 qyPrimePtRP = (ptImq1nPrime->GetBinContent(bin))*(ptImq1nPrime->GetBinEntries(bin));
3d824203 1677
77515452 1678 mPrimePtRP = ptReq1nPrime->GetBinEntries(bin); // to be improved
1679 dM0p111PtRP=mPrimePtRP*(dSnk[2][0]-3.*dSnk[0][1]*dSnk[0][0]+2.*dSnk[0][2]);
3d824203 1680
77515452 1681 // 2-p the needed one
1682 Double_t two1n1nWPerPtBinRP=0.;
1683 if((mPtRP+mPrimePtRP)*dSnk[0][0]-dS11mPtRP>0)
1684 {
1685 two1n1nWPerPtBinRP = (qxPtRP*dQnkX[0][0]+qyPtRP*dQnkY[0][0]+qxPrimePtRP*dQnkX[0][0]+qyPrimePtRP*dQnkY[0][0]-dS11mPtRP)/((mPtRP+mPrimePtRP)*dSnk[0][0]-dS11mPtRP);
1686 f2WPerPtBin1n1nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,two1n1nWPerPtBinRP,(mPtRP+mPrimePtRP)*dSnk[0][0]-dS11mPtRP);
1687 }
1688
1689 // 2-p temporary one
1690 Double_t two1n1nW1ppW1W1PtRP=0.; // <w1 w2 w3 cos(n(phi2-phi3))> // OK!!!
1691 if(dM1pp11PtRP)
1692 {
1693 two1n1nW1ppW1W1PtRP = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*dS11mPtRP-2.*(qxW2PtRP*dQnkX[0][0]+qyW2PtRP*dQnkY[0][0])-dS11mPtRP*dSnk[0][1]+2.*dS13mPtRP)/dM1pp11PtRP; // CORRECT !!! <w1 w2 w3 cos(n(phi2-phi3))>
1694 }
1695
1696 // 2-p temporary one
1697 Double_t two1npp1nW1W2PtRP=0.; // <w2 w3^2 cos(n(psi1-phi2))> // OK !!!
1698 if(dM0pp12PtRP)
1699 {
1700 two1npp1nW1W2PtRP = (dSnk[0][1]*(qxPtRP*dQnkX[0][0]+qyPtRP*dQnkY[0][0])-(qxW2PtRP*dQnkX[0][0]+qyW2PtRP*dQnkY[0][0])-dM1pp2PtRP-(qxPtRP*dQnkX[0][2]+qyPtRP*dQnkY[0][2])+dS13mPtRP)/dM0pp12PtRP; // CORRECT !!! <w2 w3^2 cos(n(psi1-phi2))>
1701 }
3d824203 1702
77515452 1703 // 2-p temporary one
1704 Double_t two1npp1nW2ppW1PtRP=0.; // <w1^2 w2 cos(n(psi1-phi2))> // OK !!!
1705 if(dM2pp1PtRP)
1706 {
1707 two1npp1nW2ppW1PtRP = ((qxW2PtRP*dQnkX[0][0]+qyW2PtRP*dQnkY[0][0])-dS13mPtRP)/dM2pp1PtRP; // CORRECT !!! <w1^2 w2 cos(n(psi1-phi2))>
1708 }
3d824203 1709
77515452 1710 // 2-p temporary one
1711 Double_t two2npp2nW1ppW2PtRP=0.; // <w1 w2^2 cos(2n(psi1-phi2))> OK !!!
1712 if(dM1pp2PtRP)
1713 {
1714 two2npp2nW1ppW2PtRP = ((q2xW1PtRP*dQnkX[1][1]+q2yW1PtRP*dQnkY[1][1])-dS13mPtRP)/dM1pp2PtRP; // CORRECT !!! <w1 w2^2 cos(2n(psi1-phi2))>
1715 }
3d824203 1716
77515452 1717 // 2-p temporary one
1718 Double_t two1npp1nW3PtRP=0.; // <w2^3 cos(n(psi1-phi2))> // OK !!!
1719 if(dM0pp3PtRP)
1720 {
1721 two1npp1nW3PtRP = (qxPtRP*dQnkX[0][2]+qyPtRP*dQnkY[0][2]-dS13mPtRP)/dM0pp3PtRP; // CORRECT !!! <w2^3 cos(n(psi1-phi2))>
1722 }
3d824203 1723
77515452 1724 // 3-p temporary one
1725 Double_t three2npp1n1nW1ppW1W1PtRP=0.; // <w1 w2 w3 cos(n(2psi1-phi2-phi3))> // OK!!!
1726 if(dM1pp11PtRP)
1727 {
1728 three2npp1n1nW1ppW1W1PtRP = (q2xW1PtRP*(dQnkX[0][0]*dQnkX[0][0]-dQnkY[0][0]*dQnkY[0][0])+2.*q2yW1PtRP*dQnkX[0][0]*dQnkY[0][0]-2.*(qxW2PtRP*dQnkX[0][0]+qyW2PtRP*dQnkY[0][0])-(q2xW1PtRP*dQnkX[1][1]+q2yW1PtRP*dQnkY[1][1])+2.*dS13mPtRP)/dM1pp11PtRP; // CORRECT !!! <w1 w2 w3 cos(n(2psi1-phi2-phi3))>
1729 }
3d824203 1730
77515452 1731 // 3-p temporary one
1732 Double_t three1npp1n2nW0ppW1W2PtRP=0.; // <w2 w3^2 cos(n(psi1+phi2-2*phi3))> // OK!!!
1733 if(dM0pp12PtRP)
1734 {
1735 three1npp1n2nW0ppW1W2PtRP = (qxPtRP*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])-qyPtRP*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1])-(qxW2PtRP*dQnkX[0][0]+qyW2PtRP*dQnkY[0][0])-(q2xW1PtRP*dQnkX[1][1]+q2yW1PtRP*dQnkY[1][1])-(qxPtRP*dQnkX[0][2]+qyPtRP*dQnkY[0][2])+2.*dS13mPtRP)/dM0pp12PtRP; // CORRECT !!! <w2 w3^2 cos(n(psi1+phi2-2.*phi3))>
1736 }
1737
1738 /*
1739 // 4-p RP part
1740 Double_t four1npp1n1n1nW1W1W1=0.; // <w1 w2 w3 cos(n(psi1+phi1-phi2-phi3))>
1741 if(dM0pp111PtRP)
1742 {
1743 four1npp1n1n1nW1W1W1 = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPtRP*dQnkX[0][0]+qyPtRP*dQnkY[0][0])-2.*dM1pp11PtRP*two1n1nW1ppW1W1PtRP-dM1pp11PtRP*three2npp1n1nW1ppW1W1PtRP-dM0pp12PtRP*three1npp1n2nW0ppW1W2PtRP-2.*dM0pp12PtRP*two1npp1nW1W2PtRP-3.*dM2pp1PtRP*two1npp1nW2ppW1PtRP-2.*dM1pp2PtRP-dM1pp2PtRP*two2npp2nW1ppW2PtRP-dM0pp3PtRP*two1npp1nW3PtRP-dS13mPtRP)/(dM0pp111PtRP);
1744 }
1745 */
1746
1747 /*
1748 // 4-p POI part
1749 Double_t four1npp1n1n1nW1W1W1RP=0.;
1750 if(dM0p111PtRP>0&&mPrimePtRP>0&&nRP>0)
1751 {
1752 four1npp1n1n1nW1W1W1RP = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimePtRP*dQnkX[0][0]+qyPrimePtRP*dQnkY[0][0])-2.*dSnk[0][1]* (qxPrimePtRP*dQnkX[0][0]+qyPrimePtRP*dQnkY[0][0])+2.*(qxPrimePtRP*dQnkX[0][2]+qyPrimePtRP*dQnkY[0][2])-qxPrimePtRP*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])+qyPrimePtRP*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1]))/dM0p111PtRP;
1753 }
1754 */
3d824203 1755
77515452 1756 // 4-p RP and POI in all combinations (full, partial and no overlap)
1757 Double_t four1npp1n1n1nW1W1W1PtRP=0.;
1758 if(dM0pp111PtRP+dM0p111PtRP)
1759 {
1760 four1npp1n1n1nW1W1W1PtRP = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPtRP*dQnkX[0][0]+qyPtRP*dQnkY[0][0])-2.*dM1pp11PtRP*two1n1nW1ppW1W1PtRP-dM1pp11PtRP*three2npp1n1nW1ppW1W1PtRP-dM0pp12PtRP*three1npp1n2nW0ppW1W2PtRP-2.*dM0pp12PtRP*two1npp1nW1W2PtRP-3.*dM2pp1PtRP*two1npp1nW2ppW1PtRP-2.*dM1pp2PtRP-dM1pp2PtRP*two2npp2nW1ppW2PtRP-dM0pp3PtRP*two1npp1nW3PtRP-dS13mPtRP+(pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimePtRP*dQnkX[0][0]+qyPrimePtRP*dQnkY[0][0])-2.*dSnk[0][1]* (qxPrimePtRP*dQnkX[0][0]+qyPrimePtRP*dQnkY[0][0])+2.*(qxPrimePtRP*dQnkX[0][2]+qyPrimePtRP*dQnkY[0][2])-qxPrimePtRP*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])+qyPrimePtRP*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1]))/(dM0pp111PtRP+dM0p111PtRP);
1761
1762 f4WPerPtBin1n1n1n1nRP->Fill(fPtMin+(bin-1)*dBinWidthPt,four1npp1n1n1nW1W1W1PtRP,dM0pp111PtRP+dM0p111PtRP);
1763 } // end of if(dM0pp111PtRP+dM0p111PtRP)
1764 } // for(Int_t bin=1;bin<(fnBinsPt+1);bin++) // loop over pt-bins
1765
1766 delete ptReq1nPrime;
1767 delete ptImq1nPrime;
1768 delete ptReq2nPrime;
1769 delete ptImq2nPrime;
1770 delete ptReq1n;
1771 delete ptImq1n;
1772 delete ptReq2n;
1773 delete ptImq2n;
1774
1775 delete req1nW2Pt;
1776 delete imq1nW2Pt;
1777 delete req2nW1Pt;
1778 delete imq2nW1Pt;
1779 delete sumOfW1upTomPt;
1780 delete sumOfW2upTomPt;
1781 delete sumOfW3upTomPt;
1782 //...........................................................................................................
1783
1784 //...........................................................................................................
1785 // PrimePrime Eta RP
1786 Double_t qxEtaRP=0.,qyEtaRP=0.,q2xEtaRP=0.,q2yEtaRP=0.;//add comments for these variable
1787 Double_t qxW2EtaRP=0.,qyW2EtaRP=0.,q2xW1EtaRP=0.,q2yW1EtaRP=0.;//add comments for these variable
1788 Double_t dS11mEtaRP=0.; // to be improved (name)
1789 Double_t dS12mEtaRP=0.; // to be improved (name)
1790 Double_t dS13mEtaRP=0.; // to be improved (name)
1791 Double_t mEtaRPHere=0.; // to be improved (name)
1792
1793 Double_t dM1pp11EtaRP=0.; // to be improved (name)
1794 Double_t dM0pp111EtaRP=0.; // to be improved (name)
1795 Double_t dM0pp12EtaRP=0.;
1796 Double_t dM2pp1EtaRP=0.;
1797 Double_t dM1pp2EtaRP=0.;
1798 Double_t dM0pp3EtaRP=0.;
1799
1800 // Prime Eta RP
1801 Double_t qxPrimeEtaRPHere=0.,qyPrimeEtaRPHere=0.;
1802 Double_t mPrimeEtaRPHere=0.;
1803 Double_t dM0p111EtaRP=0.; // to be improved (name)
1804
1805 for(Int_t bin=1;bin<(fnBinsEta+1);bin++) // loop over eta-bins
1806 {
1807 // q'':
1808 qxEtaRP = (etaReq1n->GetBinContent(bin))*(etaReq1n->GetBinEntries(bin));
1809 qyEtaRP = (etaImq1n->GetBinContent(bin))*(etaImq1n->GetBinEntries(bin));
1810 q2xEtaRP = (etaReq2n->GetBinContent(bin))*(etaReq2n->GetBinEntries(bin));
1811 q2yEtaRP = (etaImq2n->GetBinContent(bin))*(etaImq2n->GetBinEntries(bin));
1812
1813 qxW2EtaRP = (req1nW2Eta->GetBinContent(bin))*(req1nW2Eta->GetBinEntries(bin));
1814 qyW2EtaRP = (imq1nW2Eta->GetBinContent(bin))*(imq1nW2Eta->GetBinEntries(bin));
1815
1816 q2xW1EtaRP = (req2nW1Eta->GetBinContent(bin))*(req2nW1Eta->GetBinEntries(bin));
1817 q2yW1EtaRP = (imq2nW1Eta->GetBinContent(bin))*(imq2nW1Eta->GetBinEntries(bin));
1818
1819 dS11mEtaRP = (sumOfW1upTomEta->GetBinContent(bin))*(sumOfW1upTomEta->GetBinEntries(bin));
1820 dS12mEtaRP = (sumOfW2upTomEta->GetBinContent(bin))*(sumOfW2upTomEta->GetBinEntries(bin));
1821 dS13mEtaRP = (sumOfW3upTomEta->GetBinContent(bin))*(sumOfW3upTomEta->GetBinEntries(bin));
1822
1823 mEtaRPHere = sumOfW1upTomEta->GetBinEntries(bin); // to be improved
1824
1825 dM1pp11EtaRP=dS11mEtaRP*(dSnk[1][0]-dSnk[0][1])-2.*dS12mEtaRP*dSnk[0][0]+2.*dS13mEtaRP;
1826 dM1pp2EtaRP=dS11mEtaRP*dSnk[0][1]-dS13mEtaRP;
1827 dM2pp1EtaRP=dS12mEtaRP*dSnk[0][0]-dS13mEtaRP;
1828 dM0pp3EtaRP=mEtaRPHere*dSnk[0][2]-dS13mEtaRP;
1829 dM0pp12EtaRP=mEtaRPHere*dSnk[0][0]*dSnk[0][1]-dM2pp1EtaRP-dM1pp2EtaRP-dM0pp3EtaRP-dS13mEtaRP;
1830 dM0pp111EtaRP=mEtaRPHere*dSnk[2][0]-3.*dM1pp11EtaRP-3.*dM0pp12EtaRP-3.*dM2pp1EtaRP-3.*dM1pp2EtaRP-dM0pp3EtaRP-dS13mEtaRP;
1831
1832 // q':
1833 qxPrimeEtaRPHere = (etaReq1nPrime->GetBinContent(bin))*(etaReq1nPrime->GetBinEntries(bin));
1834 qyPrimeEtaRPHere = (etaImq1nPrime->GetBinContent(bin))*(etaImq1nPrime->GetBinEntries(bin));
1835
1836 mPrimeEtaRPHere = etaReq1nPrime->GetBinEntries(bin); // to be improved
1837 dM0p111EtaRP=mPrimeEtaRPHere*(dSnk[2][0]-3.*dSnk[0][1]*dSnk[0][0]+2.*dSnk[0][2]);
3d824203 1838
77515452 1839 // 2-p the needed one
1840 Double_t two1n1nWPerEtaBinRP=0.;
1841 if((mEtaRPHere+mPrimeEtaRPHere)*dSnk[0][0]-dS11mEtaRP>0)
1842 {
1843 two1n1nWPerEtaBinRP = (qxEtaRP*dQnkX[0][0]+qyEtaRP*dQnkY[0][0]+qxPrimeEtaRPHere*dQnkX[0][0]+qyPrimeEtaRPHere*dQnkY[0][0]-dS11mEtaRP)/((mEtaRPHere+mPrimeEtaRPHere)*dSnk[0][0]-dS11mEtaRP);
1844
1845 f2WPerEtaBin1n1nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,two1n1nWPerEtaBinRP,(mEtaRPHere+mPrimeEtaRPHere)*dSnk[0][0]-dS11mEtaRP); // <2'>_{n|n}
1846 }
3d824203 1847
77515452 1848 // 2-p the temporary one
1849 Double_t two1n1nW1ppW1W1EtaRP=0.; // <w1 w2 w3 cos(n(phi2-phi3))> // OK!!!
1850 if(dM1pp11EtaRP)
1851 {
1852 two1n1nW1ppW1W1EtaRP = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*dS11mEtaRP-2.*(qxW2EtaRP*dQnkX[0][0]+qyW2EtaRP*dQnkY[0][0])-dS11mEtaRP*dSnk[0][1]+2.*dS13mEtaRP)/dM1pp11EtaRP; // CORRECT !!! <w1 w2 w3 cos(n(phi2-phi3))>
1853 }
1854
1855 // 2-p the temporary one
1856 Double_t two1npp1nW1W2EtaRP=0.; // <w2 w3^2 cos(n(psi1-phi2))> // OK !!!
1857 if(dM0pp12EtaRP)
1858 {
1859 two1npp1nW1W2EtaRP = (dSnk[0][1]*(qxEtaRP*dQnkX[0][0]+qyEtaRP*dQnkY[0][0])-(qxW2EtaRP*dQnkX[0][0]+qyW2EtaRP*dQnkY[0][0])-dM1pp2EtaRP-(qxEtaRP*dQnkX[0][2]+qyEtaRP*dQnkY[0][2])+dS13mEtaRP)/dM0pp12EtaRP; // CORRECT !!! <w2 w3^2 cos(n(psi1-phi2))>
1860 }
3d824203 1861
77515452 1862 // 2-p the temporary one
1863 Double_t two1npp1nW2ppW1EtaRP=0.; // <w1^2 w2 cos(n(psi1-phi2))> // OK !!!
1864 if(dM2pp1EtaRP)
1865 {
1866 two1npp1nW2ppW1EtaRP = ((qxW2EtaRP*dQnkX[0][0]+qyW2EtaRP*dQnkY[0][0])-dS13mEtaRP)/dM2pp1EtaRP; // CORRECT !!! <w1^2 w2 cos(n(psi1-phi2))>
1867 }
1868
1869 // 2-p the temporary one
1870 Double_t two2npp2nW1ppW2EtaRP=0.; // <w1 w2^2 cos(2n(psi1-phi2))> OK !!!
1871 if(dM1pp2EtaRP)
1872 {
1873 two2npp2nW1ppW2EtaRP = ((q2xW1EtaRP*dQnkX[1][1]+q2yW1EtaRP*dQnkY[1][1])-dS13mEtaRP)/dM1pp2EtaRP; // CORRECT !!! <w1 w2^2 cos(2n(psi1-phi2))>
1874 }
3d824203 1875
77515452 1876 // 2-p the temporary one
1877 Double_t two1npp1nW3EtaRP=0.; // <w2^3 cos(n(psi1-phi2))> // OK !!!
1878 if(dM0pp3EtaRP)
1879 {
1880 two1npp1nW3EtaRP = (qxEtaRP*dQnkX[0][2]+qyEtaRP*dQnkY[0][2]-dS13mEtaRP)/dM0pp3EtaRP; // CORRECT !!! <w2^3 cos(n(psi1-phi2))>
1881 }
1882
1883 // 3-p the temporary one
1884 Double_t three2npp1n1nW1ppW1W1EtaRP=0.; // <w1 w2 w3 cos(n(2psi1-phi2-phi3))> // OK!!!
1885 if(dM1pp11EtaRP)
1886 {
1887 three2npp1n1nW1ppW1W1EtaRP = (q2xW1EtaRP*(dQnkX[0][0]*dQnkX[0][0]-dQnkY[0][0]*dQnkY[0][0])+2.*q2yW1EtaRP*dQnkX[0][0]*dQnkY[0][0]-2.*(qxW2EtaRP*dQnkX[0][0]+qyW2EtaRP*dQnkY[0][0])-(q2xW1EtaRP*dQnkX[1][1]+q2yW1EtaRP*dQnkY[1][1])+2.*dS13mEtaRP)/dM1pp11EtaRP; // CORRECT !!! <w1 w2 w3 cos(n(2psi1-phi2-phi3))>
1888 }
3d824203 1889
77515452 1890 // 3-p the temporary one
1891 Double_t three1npp1n2nW0ppW1W2EtaRP=0.; // <w2 w3^2 cos(n(psi1+phi2-2*phi3))> // OK!!!
1892 if(dM0pp12EtaRP)
1893 {
1894 three1npp1n2nW0ppW1W2EtaRP = (qxEtaRP*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])-qyEtaRP*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1])-(qxW2EtaRP*dQnkX[0][0]+qyW2EtaRP*dQnkY[0][0])-(q2xW1EtaRP*dQnkX[1][1]+q2yW1EtaRP*dQnkY[1][1])-(qxEtaRP*dQnkX[0][2]+qyEtaRP*dQnkY[0][2])+2.*dS13mEtaRP)/dM0pp12EtaRP; // CORRECT !!! <w2 w3^2 cos(n(psi1+phi2-2.*phi3))>
1895 }
1896
1897 /*
1898 // 4-p RP part
1899 Double_t four1npp1n1n1nW1W1W1=0.; // <w1 w2 w3 cos(n(psi1+phi1-phi2-phi3))>
1900 if(dM0pp111EtaRP)
1901 {
1902 four1npp1n1n1nW1W1W1 = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxEtaRP*dQnkX[0][0]+qyEtaRP*dQnkY[0][0])-2.*dM1pp11EtaRP*two1n1nW1ppW1W1EtaRP-dM1pp11EtaRP*three2npp1n1nW1ppW1W1EtaRP-dM0pp12EtaRP*three1npp1n2nW0ppW1W2EtaRP-2.*dM0pp12EtaRP*two1npp1nW1W2EtaRP-3.*dM2pp1EtaRP*two1npp1nW2ppW1EtaRP-2.*dM1pp2EtaRP-dM1pp2EtaRP*two2npp2nW1ppW2EtaRP-dM0pp3EtaRP*two1npp1nW3EtaRP-dS13mEtaRP)/(dM0pp111EtaRP);
1903 }
1904 */
1905 /*
1906 // 4-p POI part
1907 Double_t four1npp1n1n1nW1W1W1RP=0.;
1908 if(dM0p111EtaRP>0&&mPrimeEtaRPHere>0&&nRP>0)
1909 {
1910 four1npp1n1n1nW1W1W1RP = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimeEtaRPHere*dQnkX[0][0]+qyPrimeEtaRPHere*dQnkY[0][0])-2.*dSnk[0][1]* (qxPrimeEtaRPHere*dQnkX[0][0]+qyPrimeEtaRPHere*dQnkY[0][0])+2.*(qxPrimeEtaRPHere*dQnkX[0][2]+qyPrimeEtaRPHere*dQnkY[0][2])-qxPrimeEtaRPHere*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])+qyPrimeEtaRPHere*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1]))/dM0p111EtaRP;
1911 }
1912 */
1913
1914 // 4-p RP and POI in all combinations (full, partial and no overlap)
1915 Double_t four1npp1n1n1nW1W1W1EtaRP=0.;
1916
1917 if(dM0pp111EtaRP+dM0p111EtaRP)
1918 {
1919 four1npp1n1n1nW1W1W1EtaRP = ((pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxEtaRP*dQnkX[0][0]+qyEtaRP*dQnkY[0][0])-2.*dM1pp11EtaRP*two1n1nW1ppW1W1EtaRP-dM1pp11EtaRP*three2npp1n1nW1ppW1W1EtaRP-dM0pp12EtaRP*three1npp1n2nW0ppW1W2EtaRP-2.*dM0pp12EtaRP*two1npp1nW1W2EtaRP-3.*dM2pp1EtaRP*two1npp1nW2ppW1EtaRP-2.*dM1pp2EtaRP-dM1pp2EtaRP*two2npp2nW1ppW2EtaRP-dM0pp3EtaRP*two1npp1nW3EtaRP-dS13mEtaRP+(pow(dQnkX[0][0],2.)+pow(dQnkY[0][0],2.))*(qxPrimeEtaRPHere*dQnkX[0][0]+qyPrimeEtaRPHere*dQnkY[0][0])-2.*dSnk[0][1]*(qxPrimeEtaRPHere*dQnkX[0][0]+qyPrimeEtaRPHere*dQnkY[0][0])+2.*(qxPrimeEtaRPHere*dQnkX[0][2]+qyPrimeEtaRPHere*dQnkY[0][2])-qxPrimeEtaRPHere*(dQnkX[0][0]*dQnkX[1][1]+dQnkY[0][0]*dQnkY[1][1])+qyPrimeEtaRPHere*(dQnkY[0][0]*dQnkX[1][1]-dQnkX[0][0]*dQnkY[1][1]))/(dM0pp111EtaRP+dM0p111EtaRP);
1920
1921 f4WPerEtaBin1n1n1n1nRP->Fill(fEtaMin+(bin-1)*dBinWidthEta,four1npp1n1n1nW1W1W1EtaRP,dM0pp111EtaRP+dM0p111EtaRP);
1922 }
1923 }
1924
1925 delete etaReq1nPrime;
1926 delete etaImq1nPrime;
1927 delete etaReq2nPrime;
1928 delete etaImq2nPrime;
1929 delete etaReq1n;
1930 delete etaImq1n;
1931 delete etaReq2n;
1932 delete etaImq2n;
1933
1934 delete req1nW2Eta;
1935 delete imq1nW2Eta;
1936 delete req2nW1Eta;
1937 delete imq2nW1Eta;
1938 delete sumOfW1upTomEta;
1939 delete sumOfW2upTomEta;
1940 delete sumOfW3upTomEta;
1941 //...........................................................................................................
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
6f366058 1966 delete ptReq1nPrimePrime;
1967 delete ptImq1nPrimePrime;
1968 delete ptReq2nPrimePrime;
1969 delete ptImq2nPrimePrime;
1970
1971 delete req1nW2PrimePrimePt;
1972 delete imq1nW2PrimePrimePt;
1973 delete req2nW1PrimePrimePt;
1974 delete imq2nW1PrimePrimePt;
1975
1976 delete sumOfW1upTomPrimePrimePt;
1977 delete sumOfW2upTomPrimePrimePt;
1978 delete sumOfW3upTomPrimePrimePt;
1979
1980 delete etaReq1nPrimePrime;
1981 delete etaImq1nPrimePrime;
1982 delete etaReq2nPrimePrime;
1983 delete etaImq2nPrimePrime;
1984
1985 delete req1nW2PrimePrimeEta;
1986 delete imq1nW2PrimePrimeEta;
1987 delete req2nW1PrimePrimeEta;
1988 delete imq2nW1PrimePrimeEta;
1989
1990 delete sumOfW1upTomPrimePrimeEta;
1991 delete sumOfW2upTomPrimePrimeEta;
1992 delete sumOfW3upTomPrimePrimeEta;
77515452 1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
3d824203 2023
2024
3d824203 2025
3d824203 2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
3d824203 2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
1dfa3c16 2102
ae733b3b 2103
1dfa3c16 2104
1dfa3c16 2105
ae733b3b 2106
ae733b3b 2107
ae733b3b 2108
1dfa3c16 2109
4057ba99 2110
ae733b3b 2111
4057ba99 2112
1dfa3c16 2113
ae733b3b 2114
ae733b3b 2115
1dfa3c16 2116
bc92c0cb 2117
2118
2119
2120
2121
2122
bc92c0cb 2123
2124
2125
bc92c0cb 2126
2127
bc92c0cb 2128
bc92c0cb 2129
2130
2131
bc92c0cb 2132
2133
2134
2135
2136
2137
b7cb54d5 2138 Bool_t nestedLoops = kFALSE;
bc92c0cb 2139
2140
bc92c0cb 2141
b7cb54d5 2142
2143 if(nestedLoops) // to be improved
2144 {
dee1e0e0 2145 //--------------------------------------------------------------------------------------------------------------------------------
2146 //
2147 // **********************
2148 // **** NESTED LOOPS ****
2149 // **********************
2150 //
2151 // Remark 1: multi-particle correlations calculated with nested loops are stored in fDirectCorrelations.
3d824203 2152 // Remark 2: binning of fDirectCorrelations: bins 0..100 - correlations needed for integrated flow; bins 100..200 - correlations needed for differential flow (taking as an example bin 0.5 < pt < 0.6)
dee1e0e0 2153 //
2154 // binning details of fDirectCorrelations (integrated flow):
3d824203 2155 //..........................................................................
2156 // 1st bin: weighted <2>_{n|n} = <w1 w2 cos( n*(phi1-phi2))>
2157 // 2nd bin: weighted <2>_{2n|2n} = <w1^2 w2^2 cos(2n*(phi1-phi2))>
2158 // 3rd bin: weighted <2>_{3n|3n} = <w1^3 w2^3 cos(3n*(phi1-phi2))>
2159 // 4th bin: weighted <2>_{4n|4n} = <w1^4 w2^4 cos(4n*(phi1-phi2))>
2160 // 5th bin: weighted <2>_{n|n} = <w1^3 w2 cos(n*(phi1-phi2))>
2161
2162 // 11th bin: weighted <3>_{2n|n,n} = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))>
2163 //..........................................................................
dee1e0e0 2164
77515452 2165
b7cb54d5 2166 Double_t phi1=0., phi2=0., phi3=0., phi4=0.;
2167 // phi5=0., phi6=0., phi7=0., phi8=0.;
2168 Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1.;
2169 // wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.;
3d824203 2170
2171
77515452 2172
3d824203 2173
dee1e0e0 2174
77515452 2175
2176 Double_t tempLoop = 0.;
2177 Int_t tempCounter = 0;
2178
2179
2180
2181
2182
1dfa3c16 2183 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 2184 {
dee1e0e0 2185 fTrack=anEvent->GetTrack(i1);
bc92c0cb 2186 phi1=fTrack->Phi();
3d824203 2187 if(phiWeights) wPhi1 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2188 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 2189 {
dee1e0e0 2190 if(i2==i1)continue;
2191 fTrack=anEvent->GetTrack(i2);
bc92c0cb 2192 phi2=fTrack->Phi();
3d824203 2193 if(phiWeights) wPhi2 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*nBinsPhi/TMath::TwoPi())));
2194 // 2-p
2195 fDirectCorrelations->Fill(0.,cos(n*(phi1-phi2)),wPhi1*wPhi2); // <w1 w2 cos( n*(phi1-phi2))>
2196 fDirectCorrelations->Fill(1.,cos(2.*n*(phi1-phi2)),pow(wPhi1,2)*pow(wPhi2,2)); // <w1^2 w2^2 cos(2n*(phi1-phi2))>
2197 fDirectCorrelations->Fill(2.,cos(3.*n*(phi1-phi2)),pow(wPhi1,3)*pow(wPhi2,3)); // <w1^3 w2^3 cos(3n*(phi1-phi2))>
2198 fDirectCorrelations->Fill(3.,cos(4.*n*(phi1-phi2)),pow(wPhi1,4)*pow(wPhi2,4)); // <w1^4 w2^4 cos(4n*(phi1-phi2))>
2199 fDirectCorrelations->Fill(4.,cos(n*(phi1-phi2)),pow(wPhi1,3)*wPhi2); // <w1^3 w2 cos(n*(phi1-phi2))>
bc92c0cb 2200 }
2201 }
3d824203 2202
2203
3d824203 2204
77515452 2205
b7cb54d5 2206 /*
3d824203 2207
1dfa3c16 2208 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 2209 {
dee1e0e0 2210 fTrack=anEvent->GetTrack(i1);
bc92c0cb 2211 phi1=fTrack->Phi();
3d824203 2212 if(phiWeights) wPhi1 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2213 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 2214 {
dee1e0e0 2215 if(i2==i1)continue;
2216 fTrack=anEvent->GetTrack(i2);
bc92c0cb 2217 phi2=fTrack->Phi();
3d824203 2218 if(phiWeights) wPhi2 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2219 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 2220 {
dee1e0e0 2221 if(i3==i1||i3==i2)continue;
2222 fTrack=anEvent->GetTrack(i3);
bc92c0cb 2223 phi3=fTrack->Phi();
3d824203 2224 if(phiWeights) wPhi3 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*nBinsPhi/TMath::TwoPi())));
2225 // 2-p
2226 fDirectCorrelations->Fill(5.,cos(n*(phi1-phi2)),wPhi1*wPhi2*pow(wPhi3,2)); // <w1 w2 w3^2 cos(n*(phi1-phi2))>
2227
2228 // 3-p
2229 fDirectCorrelations->Fill(10.,cos(2.*n*phi1-n*(phi2+phi3)),pow(wPhi1,2)*wPhi2*wPhi3); // <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))>
2230
2231
2232 fDirectCorrelations->Fill(6.,cos(3.*n*phi1-2.*n*phi2-n*phi3),pow(wPhi1,3)*pow(wPhi2,2)*wPhi3); //<3>_{3n|2n,n}
2233 fDirectCorrelations->Fill(7.,cos(4.*n*phi1-2.*n*phi2-2.*n*phi3),pow(wPhi1,4)*pow(wPhi2,2)*pow(wPhi3,2)); //<3>_{4n|2n,2n}
2234 fDirectCorrelations->Fill(8.,cos(4.*n*phi1-3.*n*phi2-n*phi3),pow(wPhi1,4)*pow(wPhi2,3)*wPhi3); //<3>_{4n|3n,n}
2235
2236
bc92c0cb 2237 }
2238 }
2239 }
b7cb54d5 2240 */
77515452 2241
3d824203 2242
2243
2244
77515452 2245
bc92c0cb 2246
dee1e0e0 2247 //<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 2248 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 2249 {
dee1e0e0 2250 fTrack=anEvent->GetTrack(i1);
bc92c0cb 2251 phi1=fTrack->Phi();
3d824203 2252 if(phiWeights) wPhi1 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2253 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 2254 {
dee1e0e0 2255 if(i2==i1)continue;
2256 fTrack=anEvent->GetTrack(i2);
bc92c0cb 2257 phi2=fTrack->Phi();
3d824203 2258 if(phiWeights) wPhi2 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2259 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 2260 {
dee1e0e0 2261 if(i3==i1||i3==i2)continue;
2262 fTrack=anEvent->GetTrack(i3);
bc92c0cb 2263 phi3=fTrack->Phi();
3d824203 2264 if(phiWeights) wPhi3 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2265 for(Int_t i4=0;i4<dMult;i4++)
bc92c0cb 2266 {
dee1e0e0 2267 if(i4==i1||i4==i2||i4==i3)continue;
2268 fTrack=anEvent->GetTrack(i4);
bc92c0cb 2269 phi4=fTrack->Phi();
3d824203 2270 if(phiWeights) wPhi4 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*nBinsPhi/TMath::TwoPi())));
2271 fDirectCorrelations->Fill(20.,cos(n*phi1+n*phi2-n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); // <4>_{n,n|n,n} = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))>
2272
2273
2274 fDirectCorrelations->Fill(11.,cos(2.*n*phi1+n*phi2-2.*n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); //<4>_{2n,n|2n,n}
2275 fDirectCorrelations->Fill(12.,cos(2.*n*phi1+2*n*phi2-2.*n*phi3-2.*n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); //<4>_{2n,2n|2n,2n}
2276 fDirectCorrelations->Fill(13.,cos(3.*n*phi1-n*phi2-n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); //<4>_{3n|n,n,n}
2277 fDirectCorrelations->Fill(14.,cos(3.*n*phi1+n*phi2-3.*n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); //<4>_{3n,n|3n,n}
2278 fDirectCorrelations->Fill(15.,cos(3.*n*phi1+n*phi2-2.*n*phi3-2.*n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); //<4>_{3n,n|2n,2n}
2279 fDirectCorrelations->Fill(16.,cos(4.*n*phi1-2.*n*phi2-n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); //<4>_{4n|2n,n,n}
2280
bc92c0cb 2281 }
2282 }
2283 }
2284 }
2285
3d824203 2286
77515452 2287
b7cb54d5 2288 /*
3d824203 2289
dee1e0e0 2290 //<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 2291 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 2292 {
dee1e0e0 2293 //cout<<"i1 = "<<i1<<endl;
2294 fTrack=anEvent->GetTrack(i1);
bc92c0cb 2295 phi1=fTrack->Phi();
3d824203 2296 if(phiWeights) wPhi1 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2297 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 2298 {
dee1e0e0 2299 if(i2==i1)continue;
2300 fTrack=anEvent->GetTrack(i2);
bc92c0cb 2301 phi2=fTrack->Phi();
3d824203 2302 if(phiWeights) wPhi2 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2303 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 2304 {
dee1e0e0 2305 if(i3==i1||i3==i2)continue;
2306 fTrack=anEvent->GetTrack(i3);
bc92c0cb 2307 phi3=fTrack->Phi();
3d824203 2308 if(phiWeights) wPhi3 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2309 for(Int_t i4=0;i4<dMult;i4++)
bc92c0cb 2310 {
dee1e0e0 2311 if(i4==i1||i4==i2||i4==i3)continue;
2312 fTrack=anEvent->GetTrack(i4);
bc92c0cb 2313 phi4=fTrack->Phi();
3d824203 2314 if(phiWeights) wPhi4 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2315 for(Int_t i5=0;i5<dMult;i5++)
bc92c0cb 2316 {
dee1e0e0 2317 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
2318 fTrack=anEvent->GetTrack(i5);
bc92c0cb 2319 phi5=fTrack->Phi();
3d824203 2320 if(phiWeights) wPhi5 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi5*nBinsPhi/TMath::TwoPi())));
2321 fDirectCorrelations->Fill(18.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),wPhi1*wPhi2*wPhi3*wPhi4*wPhi5); //<5>_{2n,n|n,n,n}
2322 fDirectCorrelations->Fill(19.,cos(2.*n*phi1+2.*n*phi2-2.*n*phi3-n*phi4-n*phi5),wPhi1*wPhi2*wPhi3*wPhi4*wPhi5); //<5>_{2n,2n|2n,n,n}
2323 fDirectCorrelations->Fill(20.,cos(3.*n*phi1+n*phi2-2.*n*phi3-n*phi4-n*phi5),wPhi1*wPhi2*wPhi3*wPhi4*wPhi5); //<5>_{3n,n|2n,n,n}
2324 fDirectCorrelations->Fill(21.,cos(4.*n*phi1-n*phi2-n*phi3-n*phi4-n*phi5),wPhi1*wPhi2*wPhi3*wPhi4*wPhi5); //<5>_{4n|n,n,n,n}
bc92c0cb 2325 }
2326 }
2327 }
2328 }
2329 }
2330
3d824203 2331
dee1e0e0 2332 //<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 2333 for(Int_t i1=0;i1<dMult;i1++)
dee1e0e0 2334 {
2335 //cout<<"i1 = "<<i1<<endl;
2336 fTrack=anEvent->GetTrack(i1);
2337 phi1=fTrack->Phi();
3d824203 2338 if(phiWeights) wPhi1 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2339 for(Int_t i2=0;i2<dMult;i2++)
dee1e0e0 2340 {
2341 if(i2==i1)continue;
2342 fTrack=anEvent->GetTrack(i2);
2343 phi2=fTrack->Phi();
3d824203 2344 if(phiWeights) wPhi2 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2345 for(Int_t i3=0;i3<dMult;i3++)
dee1e0e0 2346 {
2347 if(i3==i1||i3==i2)continue;
2348 fTrack=anEvent->GetTrack(i3);
2349 phi3=fTrack->Phi();
3d824203 2350 if(phiWeights) wPhi3 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2351 for(Int_t i4=0;i4<dMult;i4++)
dee1e0e0 2352 {
2353 if(i4==i1||i4==i2||i4==i3)continue;
2354 fTrack=anEvent->GetTrack(i4);
2355 phi4=fTrack->Phi();
3d824203 2356 if(phiWeights) wPhi4 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2357 for(Int_t i5=0;i5<dMult;i5++)
dee1e0e0 2358 {
2359 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
2360 fTrack=anEvent->GetTrack(i5);
2361 phi5=fTrack->Phi();
3d824203 2362 if(phiWeights) wPhi5 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi5*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2363 for(Int_t i6=0;i6<dMult;i6++)
dee1e0e0 2364 {
2365 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
2366 fTrack=anEvent->GetTrack(i6);
2367 phi6=fTrack->Phi();
3d824203 2368 if(phiWeights) wPhi6 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi6*nBinsPhi/TMath::TwoPi())));
2369 fDirectCorrelations->Fill(23.,cos(n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6),wPhi1*wPhi2*wPhi3*wPhi4*wPhi5*wPhi6); //<6>_{n,n,n|n,n,n}
2370 fDirectCorrelations->Fill(24.,cos(2.*n*phi1+n*phi2+n*phi3-2.*n*phi4-n*phi5-n*phi6),wPhi1*wPhi2*wPhi3*wPhi4*wPhi5*wPhi6); //<6>_{2n,n,n|2n,n,n}
2371 fDirectCorrelations->Fill(25.,cos(2.*n*phi1+2.*n*phi2-n*phi3-n*phi4-n*phi5-n*phi6),wPhi1*wPhi2*wPhi3*wPhi4*wPhi5*wPhi6); //<6>_{2n,2n|n,n,n,n}
2372 fDirectCorrelations->Fill(26.,cos(3.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5-n*phi6),wPhi1*wPhi2*wPhi3*wPhi4*wPhi5*wPhi6); //<6>_{3n,n|n,n,n,n}
dee1e0e0 2373 }
2374 }
2375 }
2376 }
2377 }
2378 }
52021ae2 2379
77515452 2380
3d824203 2381
dee1e0e0 2382 //<7>_{2n,n,n|n,n,n,n}
1dfa3c16 2383 for(Int_t i1=0;i1<dMult;i1++)
bc92c0cb 2384 {
dee1e0e0 2385 //cout<<"i1 = "<<i1<<endl;
2386 fTrack=anEvent->GetTrack(i1);
bc92c0cb 2387 phi1=fTrack->Phi();
3d824203 2388 if(phiWeights) wPhi1 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2389 for(Int_t i2=0;i2<dMult;i2++)
bc92c0cb 2390 {
dee1e0e0 2391 if(i2==i1)continue;
2392 fTrack=anEvent->GetTrack(i2);
bc92c0cb 2393 phi2=fTrack->Phi();
3d824203 2394 if(phiWeights) wPhi2 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2395 for(Int_t i3=0;i3<dMult;i3++)
bc92c0cb 2396 {
dee1e0e0 2397 if(i3==i1||i3==i2)continue;
2398 fTrack=anEvent->GetTrack(i3);
bc92c0cb 2399 phi3=fTrack->Phi();
3d824203 2400 if(phiWeights) wPhi3 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2401 for(Int_t i4=0;i4<dMult;i4++)
bc92c0cb 2402 {
dee1e0e0 2403 if(i4==i1||i4==i2||i4==i3)continue;
2404 fTrack=anEvent->GetTrack(i4);
bc92c0cb 2405 phi4=fTrack->Phi();
3d824203 2406 if(phiWeights) wPhi4 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2407 for(Int_t i5=0;i5<dMult;i5++)
bc92c0cb 2408 {
dee1e0e0 2409 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
2410 fTrack=anEvent->GetTrack(i5);
bc92c0cb 2411 phi5=fTrack->Phi();
3d824203 2412 if(phiWeights) wPhi5 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi5*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2413 for(Int_t i6=0;i6<dMult;i6++)
bc92c0cb 2414 {
dee1e0e0 2415 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
2416 fTrack=anEvent->GetTrack(i6);
bc92c0cb 2417 phi6=fTrack->Phi();
3d824203 2418 if(phiWeights) wPhi6 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi6*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2419 for(Int_t i7=0;i7<dMult;i7++)
dee1e0e0 2420 {
2421 if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;
2422 fTrack=anEvent->GetTrack(i7);
2423 phi7=fTrack->Phi();
3d824203 2424 if(phiWeights) wPhi7 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi7*nBinsPhi/TMath::TwoPi())));
2425 fDirectCorrelations->Fill(28.,cos(2.*n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6-n*phi7),wPhi1*wPhi2*wPhi3*wPhi4*wPhi5*wPhi6*wPhi7);//<7>_{2n,n,n|n,n,n,n}
dee1e0e0 2426 }
bc92c0cb 2427 }
2428 }
2429 }
2430 }
2431 }
2432 }
52021ae2 2433
77515452 2434
3d824203 2435
dee1e0e0 2436 //<8>_{n,n,n,n|n,n,n,n}
1dfa3c16 2437 for(Int_t i1=0;i1<dMult;i1++)
dee1e0e0 2438 {
2439 cout<<"i1 = "<<i1<<endl;
2440 fTrack=anEvent->GetTrack(i1);
2441 phi1=fTrack->Phi();
3d824203 2442 if(phiWeights) wPhi1 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2443 for(Int_t i2=0;i2<dMult;i2++)
dee1e0e0 2444 {
2445 if(i2==i1)continue;
2446 fTrack=anEvent->GetTrack(i2);
2447 phi2=fTrack->Phi();
3d824203 2448 if(phiWeights) wPhi2 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2449 for(Int_t i3=0;i3<dMult;i3++)
dee1e0e0 2450 {
2451 if(i3==i1||i3==i2)continue;
2452 fTrack=anEvent->GetTrack(i3);
2453 phi3=fTrack->Phi();
3d824203 2454 if(phiWeights) wPhi3 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2455 for(Int_t i4=0;i4<dMult;i4++)
dee1e0e0 2456 {
2457 if(i4==i1||i4==i2||i4==i3)continue;
2458 fTrack=anEvent->GetTrack(i4);
2459 phi4=fTrack->Phi();
3d824203 2460 if(phiWeights) wPhi4 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2461 for(Int_t i5=0;i5<dMult;i5++)
dee1e0e0 2462 {
2463 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
2464 fTrack=anEvent->GetTrack(i5);
2465 phi5=fTrack->Phi();
3d824203 2466 if(phiWeights) wPhi5 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi5*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2467 for(Int_t i6=0;i6<dMult;i6++)
dee1e0e0 2468 {
2469 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
2470 fTrack=anEvent->GetTrack(i6);
3d824203 2471 phi6=fTrack->Phi();
2472 if(phiWeights) wPhi6 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi6*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2473 for(Int_t i7=0;i7<dMult;i7++)
dee1e0e0 2474 {
2475 if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;
2476 fTrack=anEvent->GetTrack(i7);
3d824203 2477 phi7=fTrack->Phi();
2478 if(phiWeights) wPhi7 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi7*nBinsPhi/TMath::TwoPi())));
1dfa3c16 2479 for(Int_t i8=0;i8<dMult;i8++)
dee1e0e0 2480 {
2481 if(i8==i1||i8==i2||i8==i3||i8==i4||i8==i5||i8==i6||i8==i7)continue;
2482 fTrack=anEvent->GetTrack(i8);
3d824203 2483 phi8=fTrack->Phi();
2484 if(phiWeights) wPhi8 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi8*nBinsPhi/TMath::TwoPi())));
2485 fDirectCorrelations->Fill(30.,cos(n*phi1+n*phi2+n*phi3+n*phi4-n*phi5-n*phi6-n*phi7-n*phi8),wPhi1*wPhi2*wPhi3*wPhi4*wPhi5*wPhi6*wPhi7*wPhi8);//<8>_{n,n,n,n|n,n,n,n}
dee1e0e0 2486 }
2487 }
2488 }
2489 }
2490 }
2491 }
2492 }
2493 }
bc92c0cb 2494
3d824203 2495 */
2496
77515452 2497
3d824203 2498
dee1e0e0 2499 // binning details of fDirectCorrelations (differential flow):
2500 //
3d824203 2501 //101st bin: <2'>_{n|n}
4057ba99 2502
bc92c0cb 2503
b7cb54d5 2504
77515452 2505
bc92c0cb 2506 //<2'>_{n|n}
4057ba99 2507 for(Int_t i1=0;i1<nPrim;i1++)
bc92c0cb 2508 {
dee1e0e0 2509 fTrack=anEvent->GetTrack(i1);
b7cb54d5 2510 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->InPOISelection())))continue;//POI condition
4057ba99 2511 phi1=fTrack->Phi();
3d824203 2512 if(phiWeights) wPhi1 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*nBinsPhi/TMath::TwoPi())));
4057ba99 2513 for(Int_t i2=0;i2<nPrim;i2++)
bc92c0cb 2514 {
4057ba99 2515 if(i2==i1)continue;
2516 fTrack=anEvent->GetTrack(i2);
b7cb54d5 2517 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2518 phi2=fTrack->Phi();
3d824203 2519 if(phiWeights) wPhi2 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*nBinsPhi/TMath::TwoPi())));
4057ba99 2520 //cout<<"1st = "<<i1<<" "<< (anEvent->GetTrack(i1))->Eta() << " " << (anEvent->GetTrack(i1))->Pt()<<endl;
2521 //cout<<"2nd = "<<i2<<" "<< (anEvent->GetTrack(i2))->Eta() << " " << (anEvent->GetTrack(i2))->Pt()<<endl;
2522 //fill the fDirectCorrelations:
3d824203 2523 fDirectCorrelations->Fill(100.,cos(1.*n*(phi1-phi2)),wPhi2);//<2'>_{n,n}
2524 fDirectCorrelations->Fill(103.,cos(1.*n*(phi1-phi2)),pow(wPhi1,2)*wPhi2);//<2'>_{n,n}
2525 fDirectCorrelations->Fill(104.,cos(2.*n*(phi1-phi2)),wPhi1*pow(wPhi2,2));//<2'>_{n,n}
2526 fDirectCorrelations->Fill(105.,cos(1.*n*(phi1-phi2)),pow(wPhi2,3));//<2'>_{n,n}
2527
2528
2529
4057ba99 2530 fDirectCorrelations->Fill(41.,cos(2.*n*(phi1-phi2)),1);//<2'>_{2n,2n}
2531 fDirectCorrelations->Fill(42.,cos(3.*n*(phi1-phi2)),1);//<2'>_{3n,3n}
3d824203 2532 fDirectCorrelations->Fill(43.,cos(4.*n*(phi1-phi2)),1);//<2'>_{4n,4n}
2533
4057ba99 2534 }//end of for(Int_t i2=0;i2<nPrim;i2++)
2535 }//end of for(Int_t i1=0;i1<nPrim;i1++)
77515452 2536
b7cb54d5 2537
3d824203 2538
2539
2540
2541 /*
2542
bc92c0cb 2543 //<3'>_{2n|n,n}
4057ba99 2544 for(Int_t i1=0;i1<nPrim;i1++)
bc92c0cb 2545 {
dee1e0e0 2546 fTrack=anEvent->GetTrack(i1);
b7cb54d5 2547 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->InPOISelection())))continue;//POI condition
4057ba99 2548 phi1=fTrack->Phi();
3d824203 2549 if(phiWeights) wPhi1 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*nBinsPhi/TMath::TwoPi())));
4057ba99 2550 for(Int_t i2=0;i2<nPrim;i2++)
bc92c0cb 2551 {
4057ba99 2552 if(i2==i1)continue;
2553 fTrack=anEvent->GetTrack(i2);
b7cb54d5 2554 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2555 phi2=fTrack->Phi();
3d824203 2556 if(phiWeights) wPhi2 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*nBinsPhi/TMath::TwoPi())));
4057ba99 2557 for(Int_t i3=0;i3<nPrim;i3++)
bc92c0cb 2558 {
4057ba99 2559 if(i3==i1||i3==i2)continue;
2560 fTrack=anEvent->GetTrack(i3);
b7cb54d5 2561 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2562 phi3=fTrack->Phi();
3d824203 2563 if(phiWeights) wPhi3 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*nBinsPhi/TMath::TwoPi())));
2564 //fill the fDirectCorrelations:
2565
2566 // 2-p
2567 fDirectCorrelations->Fill(101.,cos(n*(phi2-phi3)),wPhi1*wPhi2*wPhi3); // <w1 w2 w3 cos(n(phi2-phi3))>
2568 fDirectCorrelations->Fill(102.,cos(n*(phi1-phi3)),pow(wPhi2,2.)*wPhi3); // <w2^2 w3 cos(n(psi1-phi2))>
2569
2570 // 3-p
2571 fDirectCorrelations->Fill(110.,cos(n*(2.*phi1-phi2-phi3)),wPhi1*wPhi2*wPhi3); // <w1 w2 w3 cos(n(2psi1-phi2-phi3))>
2572 fDirectCorrelations->Fill(111.,cos(n*(phi1+phi2-2.*phi3)),wPhi2*pow(wPhi3,2.)); // <w2 w3^2 cos(n(psi1+phi2-2.*phi3))>
2573
2574
2575 //fDirectCorrelations->Fill(46.,cos(n*(phi1+phi2-2.*phi3)),1);//<3'>_{n,n|2n}
4057ba99 2576 }//end of for(Int_t i3=0;i3<nPrim;i3++)
2577 }//end of for(Int_t i2=0;i2<nPrim;i2++)
2578 }//end of for(Int_t i1=0;i1<nPrim;i1++)
3d824203 2579
2580
2581 */
2582
2583
b7cb54d5 2584
77515452 2585
bc92c0cb 2586 //<4'>_{n,n|n,n}
4057ba99 2587 for(Int_t i1=0;i1<nPrim;i1++)
bc92c0cb 2588 {
dee1e0e0 2589 fTrack=anEvent->GetTrack(i1);
b7cb54d5 2590 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->InPOISelection())))continue;//POI condition
3d824203 2591 tempCounter++;
4057ba99 2592 phi1=fTrack->Phi();
3d824203 2593 if(phiWeights) wPhi1 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*nBinsPhi/TMath::TwoPi())));
4057ba99 2594 for(Int_t i2=0;i2<nPrim;i2++)
bc92c0cb 2595 {
4057ba99 2596 if(i2==i1)continue;
2597 fTrack=anEvent->GetTrack(i2);
b7cb54d5 2598 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2599 phi2=fTrack->Phi();
3d824203 2600 if(phiWeights) wPhi2 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*nBinsPhi/TMath::TwoPi())));
4057ba99 2601 for(Int_t i3=0;i3<nPrim;i3++)
2602 {
2603 if(i3==i1||i3==i2)continue;
2604 fTrack=anEvent->GetTrack(i3);
b7cb54d5 2605 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2606 phi3=fTrack->Phi();
3d824203 2607 if(phiWeights) wPhi3 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*nBinsPhi/TMath::TwoPi())));
4057ba99 2608 for(Int_t i4=0;i4<nPrim;i4++)
bc92c0cb 2609 {
4057ba99 2610 if(i4==i1||i4==i2||i4==i3)continue;
2611 fTrack=anEvent->GetTrack(i4);
b7cb54d5 2612 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2613 phi4=fTrack->Phi();
3d824203 2614 if(phiWeights) wPhi4 = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*nBinsPhi/TMath::TwoPi())));
4057ba99 2615 //fill the fDirectCorrelations:
3d824203 2616 // 4-p
2617 fDirectCorrelations->Fill(120.,cos(n*(phi1+phi2-phi3-phi4)),wPhi2*wPhi3*wPhi4); // <w1 w2 w3 cos(n(psi1+phi1-phi2-phi3))>
2618
2619 tempLoop+=wPhi2*wPhi3*wPhi4;
2620
4057ba99 2621 }//end of for(Int_t i4=0;i4<nPrim;i4++)
2622 }//end of for(Int_t i3=0;i3<nPrim;i3++)
2623 }//end of for(Int_t i2=0;i2<nPrim;i2++)
2624 }//end of for(Int_t i1=0;i1<nPrim;i1++)
3d824203 2625
b7cb54d5 2626
ae733b3b 2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
3d824203 2643 /*
ae733b3b 2644
2645
2646
2647
ae733b3b 2648
2649
2650
4057ba99 2651 //<5'>_{2n,n|n,n,n}
2652 for(Int_t i1=0;i1<nPrim;i1++)
2653 {
2654 fTrack=anEvent->GetTrack(i1);
b7cb54d5 2655 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->InPOISelection())))continue;//POI condition
4057ba99 2656 phi1=fTrack->Phi();
2657 for(Int_t i2=0;i2<nPrim;i2++)
2658 {
2659 if(i2==i1)continue;
2660 fTrack=anEvent->GetTrack(i2);
b7cb54d5 2661 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2662 phi2=fTrack->Phi();
2663 for(Int_t i3=0;i3<nPrim;i3++)
2664 {
2665 if(i3==i1||i3==i2)continue;
2666 fTrack=anEvent->GetTrack(i3);
b7cb54d5 2667 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2668 phi3=fTrack->Phi();
2669 for(Int_t i4=0;i4<nPrim;i4++)
2670 {
2671 if(i4==i1||i4==i2||i4==i3)continue;
2672 fTrack=anEvent->GetTrack(i4);
b7cb54d5 2673 if(!(fTrack->InRPSelection()))continue;//RP condition
ae733b3b 2674 phi4=fTrack->Phi();//
4057ba99 2675 for(Int_t i5=0;i5<nPrim;i5++)
bc92c0cb 2676 {
4057ba99 2677 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
2678 fTrack=anEvent->GetTrack(i5);
b7cb54d5 2679 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2680 phi5=fTrack->Phi();
2681 //fill the fDirectCorrelations:if(bNestedLoops)
2682 fDirectCorrelations->Fill(55.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),1);//<5'>_{2n,n|n,n,n}
2683 }//end of for(Int_t i5=0;i5<nPrim;i5++)
2684 }//end of for(Int_t i4=0;i4<nPrim;i4++)
2685 }//end of for(Int_t i3=0;i3<nPrim;i3++)
2686 }//end of for(Int_t i2=0;i2<nPrim;i2++)
2687 }//end of for(Int_t i1=0;i1<nPrim;i1++)
2688
2689 //<6'>_{n,n,n|n,n,n}
2690 for(Int_t i1=0;i1<nPrim;i1++)
2691 {
2692 fTrack=anEvent->GetTrack(i1);
b7cb54d5 2693 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->InPOISelection())))continue;//POI condition
4057ba99 2694 phi1=fTrack->Phi();
2695 for(Int_t i2=0;i2<nPrim;i2++)
2696 {
2697 if(i2==i1)continue;
2698 fTrack=anEvent->GetTrack(i2);
b7cb54d5 2699 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2700 phi2=fTrack->Phi();
2701 for(Int_t i3=0;i3<nPrim;i3++)
2702 {
2703 if(i3==i1||i3==i2)continue;
2704 fTrack=anEvent->GetTrack(i3);
b7cb54d5 2705 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2706 phi3=fTrack->Phi();
2707 for(Int_t i4=0;i4<nPrim;i4++)
2708 {
2709 if(i4==i1||i4==i2||i4==i3)continue;
2710 fTrack=anEvent->GetTrack(i4);
b7cb54d5 2711 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2712 phi4=fTrack->Phi();
2713 for(Int_t i5=0;i5<nPrim;i5++)
2714 {
2715 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
2716 fTrack=anEvent->GetTrack(i5);
b7cb54d5 2717 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2718 phi5=fTrack->Phi();
2719 for(Int_t i6=0;i6<nPrim;i6++)
2720 {
2721 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
2722 fTrack=anEvent->GetTrack(i6);
b7cb54d5 2723 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2724 phi6=fTrack->Phi();
2725 //fill the fDirectCorrelations:
2726 fDirectCorrelations->Fill(60.,cos(n*(phi1+phi2+phi3-phi4-phi5-phi6)),1);//<6'>_{n,n,n|n,n,n}
2727 }//end of for(Int_t i6=0;i6<nPrim;i6++)
2728 }//end of for(Int_t i5=0;i5<nPrim;i5++)
2729 }//end of for(Int_t i4=0;i4<nPrim;i4++)
2730 }//end of for(Int_t i3=0;i3<nPrim;i3++)
2731 }//end of for(Int_t i2=0;i2<nPrim;i2++)
2732 }//end of for(Int_t i1=0;i1<nPrim;i1++)
2733
2734 //<7'>_{2n,n,n|n,n,n,n}
2735 for(Int_t i1=0;i1<nPrim;i1++)
2736 {
2737 fTrack=anEvent->GetTrack(i1);
b7cb54d5 2738 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->InPOISelection())))continue;//POI condition
4057ba99 2739 phi1=fTrack->Phi();
2740 for(Int_t i2=0;i2<nPrim;i2++)
2741 {
2742 if(i2==i1)continue;
2743 fTrack=anEvent->GetTrack(i2);
b7cb54d5 2744 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2745 phi2=fTrack->Phi();
2746 for(Int_t i3=0;i3<nPrim;i3++)
2747 {
2748 if(i3==i1||i3==i2)continue;
2749 fTrack=anEvent->GetTrack(i3);
b7cb54d5 2750 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2751 phi3=fTrack->Phi();
2752 for(Int_t i4=0;i4<nPrim;i4++)
2753 {
2754 if(i4==i1||i4==i2||i4==i3)continue;
2755 fTrack=anEvent->GetTrack(i4);
b7cb54d5 2756 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2757 phi4=fTrack->Phi();
2758 for(Int_t i5=0;i5<nPrim;i5++)
2759 {
2760 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
2761 fTrack=anEvent->GetTrack(i5);
b7cb54d5 2762 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2763 phi5=fTrack->Phi();
2764 for(Int_t i6=0;i6<nPrim;i6++)
2765 {
2766 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
2767 fTrack=anEvent->GetTrack(i6);
b7cb54d5 2768 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2769 phi6=fTrack->Phi();
2770 for(Int_t i7=0;i7<nPrim;i7++)
2771 {
2772 if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;
2773 fTrack=anEvent->GetTrack(i7);
b7cb54d5 2774 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2775 phi7=fTrack->Phi();
2776 //fill the fDirectCorrelations:
2777 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}
2778 }//end of for(Int_t i7=0;i7<nPrim;i7++)
2779 }//end of for(Int_t i6=0;i6<nPrim;i6++)
2780 }//end of for(Int_t i5=0;i5<nPrim;i5++)
2781 }//end of for(Int_t i4=0;i4<nPrim;i4++)
2782 }//end of for(Int_t i3=0;i3<nPrim;i3++)
2783 }//end of for(Int_t i2=0;i2<nPrim;i2++)
2784 }//end of for(Int_t i1=0;i1<nPrim;i1++)
2785
2786 //<8'>_{n,n,n,n|n,n,n,n}
2787 for(Int_t i1=0;i1<nPrim;i1++)
2788 {
2789 fTrack=anEvent->GetTrack(i1);
b7cb54d5 2790 if(!((fTrack->Pt()>=0.5&&fTrack->Pt()<0.6)&&(fTrack->InPOISelection())))continue;//POI condition
4057ba99 2791 phi1=fTrack->Phi();
2792 for(Int_t i2=0;i2<nPrim;i2++)
2793 {
2794 if(i2==i1)continue;
2795 fTrack=anEvent->GetTrack(i2);
b7cb54d5 2796 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2797 phi2=fTrack->Phi();
2798 for(Int_t i3=0;i3<nPrim;i3++)
2799 {
2800 if(i3==i1||i3==i2)continue;
2801 fTrack=anEvent->GetTrack(i3);
b7cb54d5 2802 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2803 phi3=fTrack->Phi();
2804 for(Int_t i4=0;i4<nPrim;i4++)
2805 {
2806 if(i4==i1||i4==i2||i4==i3)continue;
2807 fTrack=anEvent->GetTrack(i4);
b7cb54d5 2808 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2809 phi4=fTrack->Phi();
2810 for(Int_t i5=0;i5<nPrim;i5++)
2811 {
2812 if(i5==i1||i5==i2||i5==i3||i5==i4)continue;
2813 fTrack=anEvent->GetTrack(i5);
b7cb54d5 2814 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2815 phi5=fTrack->Phi();
2816 for(Int_t i6=0;i6<nPrim;i6++)
2817 {
2818 if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;
2819 fTrack=anEvent->GetTrack(i6);
b7cb54d5 2820 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2821 phi6=fTrack->Phi();
2822 for(Int_t i7=0;i7<nPrim;i7++)
2823 {
2824 if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;
2825 fTrack=anEvent->GetTrack(i7);
b7cb54d5 2826 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2827 phi7=fTrack->Phi();
2828 for(Int_t i8=0;i8<nPrim;i8++)
2829 {
2830 if(i8==i1||i8==i2||i8==i3||i8==i4||i8==i5||i8==i6||i8==i7)continue;
2831 fTrack=anEvent->GetTrack(i8);
b7cb54d5 2832 if(!(fTrack->InRPSelection()))continue;//RP condition
4057ba99 2833 phi8=fTrack->Phi();
2834 //fill the fDirectCorrelations:
2835 fDirectCorrelations->Fill(70.,cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8)),1);//<8'>_{n,n,n,n|n,n,n,n}
2836 }//end of for(Int_t i8=0;i8<nPrim;i8++)
2837 }//end of for(Int_t i7=0;i7<nPrim;i7++)
2838 }//end of for(Int_t i6=0;i6<nPrim;i6++)
2839 }//end of for(Int_t i5=0;i5<nPrim;i5++)
2840 }//end of for(Int_t i4=0;i4<nPrim;i4++)
2841 }//end of for(Int_t i3=0;i3<nPrim;i3++)
2842 }//end of for(Int_t i2=0;i2<nPrim;i2++)
2843 }//end of for(Int_t i1=0;i1<nPrim;i1++)
2844
2845
2846
3d824203 2847
2848
2849
2850
2851
2852
2853
4057ba99 2854 */
2855
2856
3d824203 2857
b7cb54d5 2858 }// end of if (nestedLoops)
3d824203 2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
4057ba99 2887//--------------------------------------------------------------------------------------------------------------------------------
bc92c0cb 2888
4057ba99 2889 //}//end of if(nPrim>0&&nPrim<12)
bc92c0cb 2890}//end of Make()
2891
2892//================================================================================================================
2893
2894void AliFlowAnalysisWithQCumulants::Finish()
2895{
1315fe58 2896 //calculate the final results
3d824203 2897
77515452 2898 // harmonics
2899 Int_t n = 2; // to be improved
2900
2901 //---------------------------------------------------------------------------------------------------------
2902 // avarage multiplicity
b7cb54d5 2903 Double_t AvMPOI = (fCommonHists2nd->GetHistMultPOI())->GetMean(); // to be improved
2904 Double_t AvMRP = (fCommonHists2nd->GetHistMultRP())->GetMean(); // to be improved
77515452 2905
2906 // number of events
b7cb54d5 2907 Double_t nEvtsPOI = (fCommonHists2nd->GetHistMultPOI())->GetEntries(); // to be improved
2908 Double_t nEvtsRP = (fCommonHists2nd->GetHistMultRP())->GetEntries(); // to be improved
77515452 2909 //---------------------------------------------------------------------------------------------------------
2910
2911 //---------------------------------------------------------------------------------------------------------
2912 // 2-, 4-, 6- and 8-particle azimuthal correlation:
2913 Double_t two = fQCorrelations->GetBinContent(1); //<<2>>_{n|n}
2914 Double_t four = fQCorrelations->GetBinContent(11); //<<4>>_{n,n|n,n}
2915 Double_t six = fQCorrelations->GetBinContent(24); //<<6>>_{n,n,n|n,n,n}
2916 Double_t eight = fQCorrelations->GetBinContent(31); //<<8>>_{n,n,n,n|n,n,n,n}
2917
2918 // 2nd, 4th, 6th and 8th order Q-cumulant:
2919 Double_t secondOrderQCumulant = two; //c_n{2}
2920 Double_t fourthOrderQCumulant = four-2.*pow(two,2.); //c_n{4}
2921 Double_t sixthOrderQCumulant = six-9.*two*four+12.*pow(two,3.); //c_n{6}
2922 Double_t eightOrderQCumulant = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.); //c_n{8}
2923
2924 // "no-name" integrated flow estimates from Q-cumulants:
2925 Double_t vn2=0.,vn4=0.,vn6=0.,vn8=0.;
2926 // Double_t sd2=0.,sd4=0.,sd6=0.,sd8=0.;
2927 Double_t sd6=0.,sd8=0.; // to be improved/removed
2928 if(secondOrderQCumulant>0.)
2929 {
2930 vn2 = pow(secondOrderQCumulant,0.5); //v_n{2}
2931 }
2932 if(fourthOrderQCumulant<0.)
2933 {
2934 vn4 = pow(-fourthOrderQCumulant,1./4.); //v_n{4}
2935 }
2936 if(sixthOrderQCumulant>0.)
2937 {
2938 vn6 = pow((1./4.)*sixthOrderQCumulant,1./6.); //v_n{6}
2939 }
2940 if(eightOrderQCumulant<0.)
2941 {
2942 vn8 = pow((-1./33.)*eightOrderQCumulant,1./8.); //v_n{8}
2943 }
2944 //---------------------------------------------------------------------------------------------------------
2945
2946 //---------------------------------------------------------------------------------------------------------
2947 // weighted 2-, 4-, 6- and 8-particle azimuthal correlation:
2948 Double_t twoW = fWeightedQCorrelations->GetBinContent(1); //<<2>>_{n|n}
2949 Double_t fourW = fWeightedQCorrelations->GetBinContent(21); //<<4>>_{n,n|n,n}
2950 // Double_t sixW = fWeightedQCorrelations->GetBinContent(24); //<<6>>_{n,n,n|n,n,n}
2951 // Double_t eightW = fWeightedQCorrelations->GetBinContent(31); //<<8>>_{n,n,n,n|n,n,n,n}
2952
2953 // 2nd, 4th, 6th and 8th order weighted Q-cumulant:
2954 Double_t secondOrderQCumulantW = twoW; //c_n{2}
2955 Double_t fourthOrderQCumulantW = fourW-2.*pow(twoW,2.); //c_n{4}
2956 // Double_t sixthOrderQCumulantW = sixW-9.*twoW*fourW+12.*pow(twoW,3.); //c_n{6}
2957 // Double_t eightOrderQCumulantW = eightW-16.*twoW*sixW-18.*pow(fourW,2.)+144.*pow(twoW,2.)*fourW-144.*pow(twoW,4.); //c_n{8}
2958
2959 // "no-name" integrated flow estimates from weighted Q-cumulants:
2960 cout<<endl;
2961 cout<<"**************************************"<<endl;
2962 cout<<"**************************************"<<endl;
2963 cout<<"flow estimates from Q-cumulants :"<<endl;
2964 cout<<endl;
2965
2966 Double_t vn2W=0.,vn4W=0.;
2967 Double_t sd2W=0.,sd4W=0.;
2968 if(secondOrderQCumulantW>0.){
2969 vn2W = pow(secondOrderQCumulantW,0.5); // weighted v_n{2}
2970 //sd2W = 0.5*pow(secondOrderQCumulantW,-0.5)*secondOrderQCumulantErrorW; // to be improved (correct treatment of errors needed)
2971 cout<<" v_"<<n<<"{2} = "<<vn2W<<" +/- "<<sd2W<<endl;
2972 fIntFlowResultsQC->SetBinContent(1,vn2W);
2973 //fIntFlowResultsQC->SetBinError(1,sd2W);
2974 //common histograms:
2975 fCommonHistsResults2nd->FillIntegratedFlow(vn2W,sd2W);
2976 //fCommonHistsResults2nd->FillChi(vn2W*pow(AvM,0.5)); // to be removed
2977 }else{
2978 cout<<" v_"<<n<<"{2} = Im"<<endl;
2979 }
2980 if(fourW!=0. && fourthOrderQCumulantW<0.){
2981 vn4W = pow(-fourthOrderQCumulantW,1./4.); //v_n{4}
2982 //sd4W = 0.25*pow(-fourthOrderQCumulantW,-3./4.)*fourthOrderQCumulantErrorW; // to be improved (correct treatment of errors needed)
2983 cout<<" v_"<<n<<"{4} = "<<vn4W<<" +/- "<<sd4W<<endl;
2984 fIntFlowResultsQC->SetBinContent(2,vn4W);
2985 //fIntFlowResultsQC->SetBinError(2,sd4W);
2986 //common histograms:
2987 fCommonHistsResults4th->FillIntegratedFlow(vn4W,sd4W);
2988 //fCommonHistsResults4th->FillChi(vn4W*pow(AvM,0.5)); // to be removed
2989 }else{
2990 cout<<" v_"<<n<<"{4} = Im"<<endl;
2991 }
2992 // !!! to be improved (6th and 8th order are without weights) !!!
2993 if(six!=0. && sixthOrderQCumulant>0.){
2994 vn6 = pow((1./4.)*sixthOrderQCumulant,1./6.); //v_n{6}
2995 //sd6 = (1./6.)*pow(2.,-1./3.)*pow(sixthOrderQCumulant,-5./6.)*sixthOrderQCumulantError;
2996 cout<<" v_"<<n<<"{6} = "<<vn6<<" +/- "<<sd6<<endl;
2997 fIntFlowResultsQC->SetBinContent(3,vn6);
2998 //fIntFlowResultsQC->SetBinError(3,sd6);
2999 //common histograms:
3000 fCommonHistsResults6th->FillIntegratedFlow(vn6,sd6);
3001 //fCommonHistsResults6th->FillChi(vn6*pow(AvM,0.5));//to be removed
3002 }else{
3003 cout<<" v_"<<n<<"{6} = Im"<<endl;
3004 }
3005 if(eight!=0. && eightOrderQCumulant<0.){
3006 vn8 = pow((-1./33.)*eightOrderQCumulant,1./8.); //v_n{8}
3007 cout<<" v_"<<n<<"{8} = "<<vn8<<" +/- "<<sd8<<endl;
3008 fIntFlowResultsQC->SetBinContent(4,vn8);
3009 //fIntFlowResultsQC->SetBinError(4,sd8);
3010 //common histograms:
3011 fCommonHistsResults8th->FillIntegratedFlow(vn8,sd8);
3012 //fCommonHistsResults8th->FillChi(vn8*pow(AvM,0.5));//to be removed
3013 }else{
3014 cout<<" v_"<<n<<"{8} = Im"<<endl;
3015 }
3016 cout<<endl;
3017 cout<<" nEvts = "<<nEvtsRP<<", AvM = "<<AvMRP<<endl; // to be improved
3018 cout<<"**************************************"<<endl;
3019 cout<<"**************************************"<<endl;
3020 cout<<endl;
3021//---------------------------------------------------------------------------------------------------------
3022
3023//---------------------------------------------------------------------------------------------------------
3024// differential flow (POI)
3025Int_t nBinsPtPOI = f2WPerPtBin1n1nPOI->GetNbinsX();
3026Int_t nBinsEtaPOI = f4WPerPtBin1n1n1n1nPOI->GetNbinsX();
3027
3028// Pt:
3029Double_t secondOrderQCumulantDiffFlowPtPOIW = 0.;
3030Double_t fourthOrderQCumulantDiffFlowPtPOIW = 0.;
3031
3032Double_t dVn2ndPOIW=0.,dSd2ndPOIW=0.,dDiffvn2ndPOIW=0.,dYield2ndPOIW=0.,dSum2ndPOIW=0.;
3033Double_t dVn4thPOIW=0.,dSd4thPOIW=0.,dDiffvn4thPOIW=0.,dYield4thPOIW=0.,dSum4thPOIW=0.;
3034
3035for(Int_t bb=1;bb<nBinsPtPOI+1;bb++)
3036{
3037 // QC{2}
3038 if(f2WPerPtBin1n1nPOI->GetBinEntries(bb)>0.&&vn2W!=0)
3039 {
3040 secondOrderQCumulantDiffFlowPtPOIW = f2WPerPtBin1n1nPOI->GetBinContent(bb); // with weights
3041 fDiffFlowResults2ndOrderQC->SetBinContent(bb,secondOrderQCumulantDiffFlowPtPOIW/vn2W);
3042 // common histogram:
3043 fCommonHistsResults2nd->FillDifferentialFlowPtPOI(bb,secondOrderQCumulantDiffFlowPtPOIW/vn2W, 0.); //to be improved (errors && bb or bb+1 ?)
3044 // -------------------------------------------------------------------
3045 // integrated flow (weighted, POI, Pt, 2nd order):
3046 dDiffvn2ndPOIW=(fCommonHistsResults2nd->GetHistDiffFlowPtPOI())->GetBinContent(bb);
b7cb54d5 3047 dYield2ndPOIW=(fCommonHists2nd->GetHistPtPOI())->GetBinContent(bb);
77515452 3048 dVn2ndPOIW+=dDiffvn2ndPOIW*dYield2ndPOIW;
3049 dSum2ndPOIW+=dYield2ndPOIW;
3050 // -------------------------------------------------------------------
3051 }
3052 // QC{4]
3053 if(f4WPerPtBin1n1n1n1nPOI->GetBinEntries(bb)>0.&&vn4W!=0.)
3054 {
3055 fourthOrderQCumulantDiffFlowPtPOIW = f4WPerPtBin1n1n1n1nPOI->GetBinContent(bb)-2.*f2WPerPtBin1n1nPOI->GetBinContent(bb)*pow(vn2W,2.); // with weights
3056 fDiffFlowResults4thOrderQC->SetBinContent(bb,-1.*fourthOrderQCumulantDiffFlowPtPOIW/pow(vn4W,3.));
3057 //common histogram:
3058 fCommonHistsResults4th->FillDifferentialFlowPtPOI(bb,-1.*fourthOrderQCumulantDiffFlowPtPOIW/pow(vn4W,3.), 0.); //to be improved (errors)
3059 // -------------------------------------------------------------------
3060 //integrated flow (POI, Pt, 4th order):
3061 dDiffvn4thPOIW=(fCommonHistsResults4th->GetHistDiffFlowPtPOI())->GetBinContent(bb);
b7cb54d5 3062 dYield4thPOIW=(fCommonHists4th->GetHistPtPOI())->GetBinContent(bb);
77515452 3063 dVn4thPOIW+=dDiffvn4thPOIW*dYield4thPOIW;
3064 dSum4thPOIW+=dYield4thPOIW;
3065 // -------------------------------------------------------------------
3066 }
3067}
3068
3069cout<<endl;
3070cout<<"**************************************"<<endl;
3071cout<<"**************************************"<<endl;
3072cout<<"flow estimates from Q-cumulants (POI):"<<endl;
3073cout<<endl;
3074//storing the final results for integrated flow (POI):
3075// QC{2}
3076if(dSum2ndPOIW && fCommonHistsResults2nd)
3077{
3078 dVn2ndPOIW/=dSum2ndPOIW;
3079 fCommonHistsResults2nd->FillIntegratedFlowPOI(dVn2ndPOIW,0.); // to be improved (errors)
3080 cout<<" v_"<<n<<"{2} = "<<dVn2ndPOIW<<" +/- "<<dSd2ndPOIW<<endl;
3081}else
3082 {
3083 cout<<" v_"<<n<<"{2} = Im"<<endl;
3084 }
3085
3086// QC{4}
3087if(dSum4thPOIW && fCommonHistsResults4th)
3088{
3089 dVn4thPOIW/=dSum4thPOIW;
3090 fCommonHistsResults4th->FillIntegratedFlowPOI(dVn4thPOIW,0.); // to be improved (errors)
3091 cout<<" v_"<<n<<"{4} = "<<dVn4thPOIW<<" +/- "<<dSd4thPOIW<<endl;
3092}else
3093 {
3094 cout<<" v_"<<n<<"{4} = Im"<<endl;
3095 }
3096
3097cout<<endl;
3098cout<<" nEvts = "<<nEvtsPOI<<", AvM = "<<AvMPOI<<endl;
3099cout<<"**************************************"<<endl;
3100cout<<"**************************************"<<endl;
3101cout<<endl;
3102
3103//Eta:
3104Double_t secondOrderQCumulantDiffFlowEtaPOIW = 0.;
3105Double_t fourthOrderQCumulantDiffFlowEtaPOIW = 0.;
3106
3107for(Int_t bb=1;bb<nBinsEtaPOI+1;bb++)
3108{
3109 if(f2WPerEtaBin1n1nPOI->GetBinEntries(bb)>0.&&vn2W!=0)
3110 {
3111 secondOrderQCumulantDiffFlowEtaPOIW = f2WPerEtaBin1n1nPOI->GetBinContent(bb); // with weights
3112 fDiffFlowResults2ndOrderQC->SetBinContent(bb,secondOrderQCumulantDiffFlowEtaPOIW/vn2W);
3113 //common histogram:
3114 fCommonHistsResults2nd->FillDifferentialFlowEtaPOI(bb,secondOrderQCumulantDiffFlowEtaPOIW/vn2W, 0.);//to be improved (errors)
3115 }
3116 if(f4WPerEtaBin1n1n1n1nPOI->GetBinEntries(bb)>0.&&vn4W!=0.)
3117 {
3118 fourthOrderQCumulantDiffFlowEtaPOIW = f4WPerEtaBin1n1n1n1nPOI->GetBinContent(bb)-2.*f2WPerEtaBin1n1nPOI->GetBinContent(bb)*pow(vn2W,2.); // with weights
3119 fDiffFlowResults4thOrderQC->SetBinContent(bb,-1.*fourthOrderQCumulantDiffFlowEtaPOIW/pow(vn4W,3.));
3120 //common histogram:
3121 fCommonHistsResults4th->FillDifferentialFlowEtaPOI(bb,-1.*fourthOrderQCumulantDiffFlowEtaPOIW/pow(vn4W,3.), 0.);//to be improved (errors)
3122 }
3123}
3124//------------------------------------------------------------
3125
3d824203 3126
3127
3d824203 3128
3129
77515452 3130 //---------------------------------------------------------------------------------------------------------
3131// differential flow (RP)
3132Int_t nBinsPtRP = f2WPerPtBin1n1nRP->GetNbinsX();
3133Int_t nBinsEtaRP = f4WPerPtBin1n1n1n1nRP->GetNbinsX();
3134
3135// Pt:
3136Double_t secondOrderQCumulantDiffFlowPtRPW = 0.;
3137Double_t fourthOrderQCumulantDiffFlowPtRPW = 0.;
7e58a232 3138
77515452 3139Double_t dVn2ndRPW=0.,dSd2ndRPW=0.,dDiffvn2ndRPW=0.,dYield2ndRPW=0.,dSum2ndRPW=0.;
3140Double_t dVn4thRPW=0.,dSd4thRPW=0.,dDiffvn4thRPW=0.,dYield4thRPW=0.,dSum4thRPW=0.;
3141
3142for(Int_t bb=1;bb<nBinsPtRP+1;bb++)
3143{
3144 // QC{2}
3145 if(f2WPerPtBin1n1nRP->GetBinEntries(bb)>0.&&vn2W!=0)
3146 {
3147 secondOrderQCumulantDiffFlowPtRPW = f2WPerPtBin1n1nRP->GetBinContent(bb); // with weights
3148 fDiffFlowResults2ndOrderQC->SetBinContent(bb,secondOrderQCumulantDiffFlowPtRPW/vn2W);
3149 // common histogram:
3150 fCommonHistsResults2nd->FillDifferentialFlowPtRP(bb,secondOrderQCumulantDiffFlowPtRPW/vn2W, 0.); //to be improved (errors && bb or bb+1 ?)
3151 // -------------------------------------------------------------------
3152 // integrated flow (weighted, RP, Pt, 2nd order):
3153 dDiffvn2ndRPW=(fCommonHistsResults2nd->GetHistDiffFlowPtRP())->GetBinContent(bb);
b7cb54d5 3154 dYield2ndRPW=(fCommonHists2nd->GetHistPtRP())->GetBinContent(bb);
77515452 3155 dVn2ndRPW+=dDiffvn2ndRPW*dYield2ndRPW;
3156 dSum2ndRPW+=dYield2ndRPW;
3157 // -------------------------------------------------------------------
3158 }
3159 // QC{4]
3160 if(f4WPerPtBin1n1n1n1nRP->GetBinEntries(bb)>0.&&vn4W!=0.)
3161 {
3162 fourthOrderQCumulantDiffFlowPtRPW = f4WPerPtBin1n1n1n1nRP->GetBinContent(bb)-2.*f2WPerPtBin1n1nRP->GetBinContent(bb)*pow(vn2W,2.); // with weights
3163 fDiffFlowResults4thOrderQC->SetBinContent(bb,-1.*fourthOrderQCumulantDiffFlowPtRPW/pow(vn4W,3.));
3164 //common histogram:
3165 fCommonHistsResults4th->FillDifferentialFlowPtRP(bb,-1.*fourthOrderQCumulantDiffFlowPtRPW/pow(vn4W,3.), 0.); //to be improved (errors)
3166 // -------------------------------------------------------------------
3167 //integrated flow (RP, Pt, 4th order):
3168 dDiffvn4thRPW=(fCommonHistsResults4th->GetHistDiffFlowPtRP())->GetBinContent(bb);
b7cb54d5 3169 dYield4thRPW=(fCommonHists4th->GetHistPtRP())->GetBinContent(bb);
77515452 3170 dVn4thRPW+=dDiffvn4thRPW*dYield4thRPW;
3171 dSum4thRPW+=dYield4thRPW;
3172 // -------------------------------------------------------------------
3173 }
3174}
3175
3176cout<<endl;
3177cout<<"**************************************"<<endl;
3178cout<<"**************************************"<<endl;
3179cout<<"flow estimates from Q-cumulants (RP):"<<endl;
3180cout<<endl;
3181//storing the final results for integrated flow (RP):
3182// QC{2}
3183if(dSum2ndRPW && fCommonHistsResults2nd)
3184{
3185 dVn2ndRPW/=dSum2ndRPW;
3186 fCommonHistsResults2nd->FillIntegratedFlowRP(dVn2ndRPW,0.); // to be improved (errors)
3187 cout<<" v_"<<n<<"{2} = "<<dVn2ndRPW<<" +/- "<<dSd2ndRPW<<endl;
3188}else
3189 {
3190 cout<<" v_"<<n<<"{2} = Im"<<endl;
3191 }
3192
3193// QC{4}
3194if(dSum4thRPW && fCommonHistsResults4th)
3195{
3196 dVn4thRPW/=dSum4thRPW;
3197 fCommonHistsResults4th->FillIntegratedFlowRP(dVn4thRPW,0.); // to be improved (errors)
3198 cout<<" v_"<<n<<"{4} = "<<dVn4thRPW<<" +/- "<<dSd4thRPW<<endl;
3199}else
3200 {
3201 cout<<" v_"<<n<<"{4} = Im"<<endl;
3202 }
3203
3204cout<<endl;
3205cout<<" nEvts = "<<nEvtsRP<<", AvM = "<<AvMRP<<endl;
3206cout<<"**************************************"<<endl;
3207cout<<"**************************************"<<endl;
3208cout<<endl;
3209
3210//Eta:
3211Double_t secondOrderQCumulantDiffFlowEtaRPW = 0.;
3212Double_t fourthOrderQCumulantDiffFlowEtaRPW = 0.;
3213
3214for(Int_t bb=1;bb<nBinsEtaRP+1;bb++)
3215{
3216 if(f2WPerEtaBin1n1nRP->GetBinEntries(bb)>0.&&vn2W!=0)
3217 {
3218 secondOrderQCumulantDiffFlowEtaRPW = f2WPerEtaBin1n1nRP->GetBinContent(bb); // with weights
3219 fDiffFlowResults2ndOrderQC->SetBinContent(bb,secondOrderQCumulantDiffFlowEtaRPW/vn2W);
3220 //common histogram:
3221 fCommonHistsResults2nd->FillDifferentialFlowEtaRP(bb,secondOrderQCumulantDiffFlowEtaRPW/vn2W, 0.);//to be improved (errors)
3222 }
3223 if(f4WPerEtaBin1n1n1n1nRP->GetBinEntries(bb)>0.&&vn4W!=0.)
3224 {
3225 fourthOrderQCumulantDiffFlowEtaRPW = f4WPerEtaBin1n1n1n1nRP->GetBinContent(bb)-2.*f2WPerEtaBin1n1nRP->GetBinContent(bb)*pow(vn2W,2.); // with weights
3226 fDiffFlowResults4thOrderQC->SetBinContent(bb,-1.*fourthOrderQCumulantDiffFlowEtaRPW/pow(vn4W,3.));
3227 //common histogram:
3228 fCommonHistsResults4th->FillDifferentialFlowEtaRP(bb,-1.*fourthOrderQCumulantDiffFlowEtaRPW/pow(vn4W,3.), 0.);//to be improved (errors)
3229 }
3230}
3231//------------------------------------------------------------
3232
3233
3234
b7cb54d5 3235
3236
3237
3238
3239
3240
3241
3242 Bool_t nestedLoops = kFALSE;
3243 if(nestedLoops)
3244 {
3245 //needed for direct correlations (obtained from nested loops)
3246 cout<<endl;
3247 cout<<endl;
3248 cout<<" **** cross-checking the formulas ****"<<endl;
3249 cout<<" **** for integrated flow ****"<<endl;
3250 cout<<"(selected only events for which 0 < M < 12 "<<endl;
3251 cout<<" from dataset in /data/alice2/ante/AOD) "<<endl;
3252
3253 cout<<endl;
3254 //cout<<" nEvts = "<<nEvts<<", AvM = "<<AvM<<endl;
3255 cout<<endl;
3256 cout<<"<w1 w2 cos(n*(phi1-phi2))> from Q-vectors = "<<fWeightedQCorrelations->GetBinContent(1)<<endl;
3257 cout<<"<w1 w2 cos(n*(phi1-phi2))> from nested loops = "<<fDirectCorrelations->GetBinContent(1)<<endl;
3258 cout<<endl;
3259 cout<<"<w1^2 w2^2 cos(2n*(phi1-phi2))> from Q-vectors = "<<fWeightedQCorrelations->GetBinContent(2)<<endl;
3260 cout<<"<w1^2 w2^2 cos(2n*(phi1-phi2))> from nested loops = "<<fDirectCorrelations->GetBinContent(2)<<endl;
3261 cout<<endl;
3262 cout<<"<w1^3 w2^3 cos(3n*(phi1-phi2))> from Q-vectors = "<<fWeightedQCorrelations->GetBinContent(3)<<endl;
3263 cout<<"<w1^3 w2^3 cos(3n*(phi1-phi2))> from nested loops = "<<fDirectCorrelations->GetBinContent(3)<<endl;
3264 cout<<endl;
3265 cout<<"<w1^4 w2^4 cos(4n*(phi1-phi2))> from Q-vectors = "<<fWeightedQCorrelations->GetBinContent(4)<<endl;
3266 cout<<"<w1^4 w2^4 cos(4n*(phi1-phi2))> from nested loops = "<<fDirectCorrelations->GetBinContent(4)<<endl;
3267 cout<<endl;
3268 cout<<"<w1^3 w2 cos(n*(phi1-phi2))> from Q-vectors = "<<fWeightedQCorrelations->GetBinContent(5)<<endl;
3269 cout<<"<w1^3 w2 cos(n*(phi1-phi2))> from nested loops = "<<fDirectCorrelations->GetBinContent(5)<<endl;
3270 cout<<endl;
3271 cout<<"<w1 w2 w3^2 cos(n*(phi1-phi2))> from Q-vectors = "<<fWeightedQCorrelations->GetBinContent(6)<<endl;
3272 cout<<"<w1 w2 w3^2 cos(n*(phi1-phi2))> from nested loops = "<<fDirectCorrelations->GetBinContent(6)<<endl;
3273 cout<<endl;
3274 cout<<"<w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> from Q-vectors = "<<fWeightedQCorrelations->GetBinContent(11)<<endl;
3275 cout<<"<w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> from nested loops = "<<fDirectCorrelations->GetBinContent(11)<<endl;
3276 cout<<endl;
3277
3278 cout<<"<w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> from Q-vectors = "<<fWeightedQCorrelations->GetBinContent(21)<<endl;
3279 cout<<"<w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> from nested loops = "<<fDirectCorrelations->GetBinContent(21)<<endl;
3280 cout<<endl;;
3281
3282
77515452 3283 /*
b7cb54d5 3284 cout<<"<3>_{4n,2n,2n} from Q-vectors = "<<fQCorrelations->GetBinContent(8)<<endl;
3285 cout<<"<3>_{4n,2n,2n} from nested loops = "<<fDirectCorrelations->GetBinContent(8)<<endl;
3286 cout<<endl;
3287 cout<<"<3>_{4n,3n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(9)<<endl;
3288 cout<<"<3>_{4n,3n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(9)<<endl;
3289 cout<<endl;
3290
3291 cout<<"<4>_{2n,n|2n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(12)<<endl;
3292 cout<<"<4>_{2n,n|2n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(12)<<endl;
3293 cout<<endl;
3294 cout<<"<4>_{2n,2n|2n,2n} from Q-vectors = "<<fQCorrelations->GetBinContent(13)<<endl;
3295 cout<<"<4>_{2n,2n|2n,2n} from nested loops = "<<fDirectCorrelations->GetBinContent(13)<<endl;
3296 cout<<endl;
3297 cout<<"<4>_{3n|n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(14)<<endl;
3298 cout<<"<4>_{3n|n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(14)<<endl;
3299 cout<<endl;
3300 cout<<"<4>_{3n,n|3n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(15)<<endl;
3301 cout<<"<4>_{3n,n|3n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(15)<<endl;
3302 cout<<endl;
3303 cout<<"<4>_{3n,n|2n,2n} from Q-vectors = "<<fQCorrelations->GetBinContent(16)<<endl;
3304 cout<<"<4>_{3n,n|2n,2n} from nested loops = "<<fDirectCorrelations->GetBinContent(16)<<endl;
3305 cout<<endl;
3306 cout<<"<4>_{4n|2n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(17)<<endl;
3307 cout<<"<4>_{4n|2n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(17)<<endl;
3308 cout<<endl;
3309 cout<<"<5>_{2n,n|n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(19)<<endl;
3310 cout<<"<5>_{2n,n|n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(19)<<endl;
3311 cout<<endl;
3312 cout<<"<5>_{2n,2n|2n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(20)<<endl;
3313 cout<<"<5>_{2n,2n|2n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(20)<<endl;
3314 cout<<endl;
3315 cout<<"<5>_{3n,n|2n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(21)<<endl;
3316 cout<<"<5>_{3n,n|2n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(21)<<endl;
3317 cout<<endl;
3318 cout<<"<5>_{4n|n,n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(22)<<endl;
3319 cout<<"<5>_{4n|n,n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(22)<<endl;
3320 cout<<endl;
3321 cout<<"<6>_{n,n,n|n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(24)<<endl;
3322 cout<<"<6>_{n,n,n|n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(24)<<endl;
3323 cout<<endl;
3324 cout<<"<6>_{2n,n,n|2n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(25)<<endl;
3325 cout<<"<6>_{2n,n,n|2n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(25)<<endl;
3326 cout<<endl;
3327 cout<<"<6>_{2n,2n|n,n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(26)<<endl;
3328 cout<<"<6>_{2n,2n|n,n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(26)<<endl;
3329 cout<<endl;
3330 cout<<"<6>_{3n,n|n,n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(27)<<endl;
3331 cout<<"<6>_{3n,n|n,n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(27)<<endl;
3332 cout<<endl;
3333 cout<<"<7>_{2n,n,n|n,n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(29)<<endl;
3334 cout<<"<7>_{2n,n,n|n,n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(29)<<endl;
3335 cout<<endl;
3336 cout<<"<8>_{n,n,n,n|n,n,n,n} from Q-vectors = "<<fQCorrelations->GetBinContent(31)<<endl;
3337 cout<<"<8>_{n,n,n,n|n,n,n,n} from nested loops = "<<fDirectCorrelations->GetBinContent(31)<<endl;
3338 cout<<endl;
3339
3340 */
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
77515452 3356 cout<<"0.5 < Pt < 0.6 GeV"<<endl;
3357 cout<<endl;
3358 cout<<"<w2 cos(n(psi1-phi2))> from Q-vectors = "<<f2WPerPtBin1n1nPOI->GetBinContent(6)<<endl;
3359 //cout<<"<w2 cos(n(psi1-phi2))> from Q-vectors = "<<f2WPerPtBin1n1nRP->GetName()<<endl;
3360 cout<<"<w2 cos(n(psi1-phi2))> from Q-vectors = "<<fDirectCorrelations->GetBinContent(101)<<endl;
3361 cout<<endl;
3362 cout<<"<w2 w3 w4 cos(n(psi1+phi2-phi3-phi4))> from Q-vectors = "<<f4WPerPtBin1n1n1n1nPOI->GetBinContent(6)<<endl;
3363 //cout<<"<w2 w3 w4 cos(n(psi1+phi2-phi3-phi4))> from Q-vectors = "<<f4WPerPtBin1n1n1n1nRP->GetName()<<endl;
3364 cout<<"<w2 w3 w4 cos(n(psi1+phi2-phi3-phi4))> from nested loops = "<<fDirectCorrelations->GetBinContent(121)<<endl;
3365 cout<<endl;
3366
b7cb54d5 3367 }//end of if(nestedLoops)
77515452 3368
3369
3370
3371
77515452 3372
e085f1a9 3373
3374
b7cb54d5 3375
3376 /*
e085f1a9 3377 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3378 // !!!! to be removed !!!!
3379
3380 TCanvas* qvectorPlot = new TCanvas("qvectorPlot","Q-vector Plot",1000,1000);
3381
3382 qvectorPlot->cd(1);
3383
3384 TH1D* style = new TH1D("style","Q-vectors",100,-244,244);
3385 (style->GetYaxis())->SetRangeUser(-244,244);
3386
3387 style->Draw();
3388
3389 Int_t nBins=fQvectorForEachEventX->GetNbinsX();
3390 Double_t qxxx=0.,qyyy=0.;
3391 //cout<<"nBins = "<<nBins<<endl;
3392 //cout<<fQvectorForEachEventX->GetBinEntries(4)<<endl;
3393 //cout<<fQvectorForEachEventY->GetBinEntries(4)<<endl;
3394
3395 for(Int_t b=1;b<nBins+1;b++)
3396 {
3397 if(fQvectorForEachEventX->GetBinEntries(b)==1 && fQvectorForEachEventY->GetBinEntries(b)==1)
3398 {
3399 qxxx=fQvectorForEachEventX->GetBinContent(b);
3400 qyyy=fQvectorForEachEventY->GetBinContent(b);
3401 //cout<<qxxx<<" "<<qyyy<<endl;
3402 TArrow *qvector = new TArrow(0.0,0.0,qxxx,qyyy,0.0144,"|>");
3403 qvector->SetAngle(40);
3404 qvector->SetLineWidth(2);
3405 qvector->Draw("");
3406 }
3407 }
3408
3409 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
b7cb54d5 3410 */
e085f1a9 3411
bc92c0cb 3412}
3413
1315fe58 3414//================================================================================================================
bc92c0cb 3415
4057ba99 3416void AliFlowAnalysisWithQCumulants::WriteHistograms(TString outputFileName)
1315fe58 3417{
3418 //store the final results in output .root file
4057ba99 3419 TFile *output = new TFile(outputFileName.Data(),"RECREATE");
7a2c2652 3420 output->WriteObject(fHistList, "cobjQC","SingleKey");
1315fe58 3421 delete output;
3422}
bc92c0cb 3423
1315fe58 3424//================================================================================================================
dee1e0e0 3425
4057ba99 3426
3427