]>
Commit | Line | Data |
---|---|---|
ae09553c | 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" | |
91d019b8 | 29 | #include "TChain.h" |
ae09553c | 30 | |
31 | #include "TFile.h" | |
32 | #include "TList.h" | |
33 | #include "TGraph.h" | |
34 | #include "TParticle.h" | |
35 | #include "TRandom3.h" | |
36 | #include "TStyle.h" | |
37 | #include "TProfile.h" | |
38 | #include "TProfile2D.h" | |
39 | #include "TProfile3D.h" | |
40 | #include "TMath.h" | |
41 | #include "TArrow.h" | |
42 | #include "TPaveLabel.h" | |
43 | #include "TCanvas.h" | |
44 | #include "AliFlowEventSimple.h" | |
45 | #include "AliFlowTrackSimple.h" | |
46 | #include "AliFlowAnalysisWithQCumulants.h" | |
47 | #include "TArrayD.h" | |
48 | #include "TRandom.h" | |
49 | #include "TF1.h" | |
50 | ||
51 | class TH1; | |
52 | class TH2; | |
53 | class TGraph; | |
54 | class TPave; | |
55 | class TLatex; | |
56 | class TMarker; | |
57 | class TRandom3; | |
58 | class TObjArray; | |
59 | class TList; | |
60 | class TCanvas; | |
61 | class TSystem; | |
62 | class TROOT; | |
63 | class AliFlowVector; | |
64 | class TVector; | |
65 | ||
66 | ||
67 | //================================================================================================================ | |
68 | ||
69 | ||
70 | ClassImp(AliFlowAnalysisWithQCumulants) | |
71 | ||
72 | AliFlowAnalysisWithQCumulants::AliFlowAnalysisWithQCumulants(): | |
73 | // 0.) base: | |
74 | fHistList(NULL), | |
75 | // 1.) common: | |
76 | fCommonHists(NULL), | |
77 | fCommonHists2nd(NULL), | |
78 | fCommonHists4th(NULL), | |
79 | fCommonHists6th(NULL), | |
80 | fCommonHists8th(NULL), | |
81 | fCommonHistsResults2nd(NULL), | |
82 | fCommonHistsResults4th(NULL), | |
83 | fCommonHistsResults6th(NULL), | |
84 | fCommonHistsResults8th(NULL), | |
85 | fnBinsPhi(0), | |
86 | fPhiMin(0), | |
87 | fPhiMax(0), | |
88 | fPhiBinWidth(0), | |
89 | fnBinsPt(0), | |
90 | fPtMin(0), | |
91 | fPtMax(0), | |
92 | fPtBinWidth(0), | |
93 | fnBinsEta(0), | |
94 | fEtaMin(0), | |
95 | fEtaMax(0), | |
96 | fEtaBinWidth(0), | |
97 | fHarmonic(2), | |
98 | fAnalysisLabel(NULL), | |
99 | // 2.) weights: | |
100 | fWeightsList(NULL), | |
101 | fUsePhiWeights(kFALSE), | |
102 | fUsePtWeights(kFALSE), | |
103 | fUseEtaWeights(kFALSE), | |
104 | fUseParticleWeights(NULL), | |
105 | fPhiWeights(NULL), | |
106 | fPtWeights(NULL), | |
107 | fEtaWeights(NULL), | |
108 | // 3.) integrated flow: | |
109 | fIntFlowList(NULL), | |
110 | fIntFlowProfiles(NULL), | |
111 | fIntFlowResults(NULL), | |
112 | fIntFlowFlags(NULL), | |
113 | fApplyCorrectionForNUA(kTRUE), | |
114 | fReQ(NULL), | |
115 | fImQ(NULL), | |
116 | fSMpk(NULL), | |
117 | fIntFlowCorrelationsEBE(NULL), | |
118 | fIntFlowEventWeightsForCorrelationsEBE(NULL), | |
119 | fIntFlowCorrelationsAllEBE(NULL), | |
120 | fAvMultiplicity(NULL), | |
121 | fIntFlowCorrelationsPro(NULL), | |
91d019b8 | 122 | fIntFlowCorrelationsAllPro(NULL), |
ae09553c | 123 | fIntFlowExtraCorrelationsPro(NULL), |
124 | fIntFlowProductOfCorrelationsPro(NULL), | |
125 | fIntFlowCorrelationsHist(NULL), | |
126 | fIntFlowCorrelationsAllHist(NULL), | |
127 | fIntFlowCovariances(NULL), | |
128 | fIntFlowSumOfProductOfEventWeights(NULL), | |
129 | fIntFlowQcumulants(NULL), | |
130 | fIntFlow(NULL), | |
131 | // 4.) differential flow: | |
132 | fDiffFlowList(NULL), | |
133 | fDiffFlowProfiles(NULL), | |
134 | fDiffFlowResults(NULL), | |
135 | fDiffFlowFlags(NULL), | |
136 | fCalculate2DFlow(kFALSE), | |
137 | // 5.) distributions: | |
138 | fDistributionsList(NULL), | |
139 | // x.) debugging and cross-checking: | |
140 | fNestedLoopsList(NULL), | |
141 | fEvaluateIntFlowNestedLoops(kFALSE), | |
91d019b8 | 142 | fEvaluateDiffFlowNestedLoops(kFALSE), |
ae09553c | 143 | fMaxAllowedMultiplicity(10), |
144 | fEvaluateNestedLoops(NULL), | |
145 | fIntFlowDirectCorrelations(NULL), | |
91d019b8 | 146 | fIntFlowExtraDirectCorrelations(NULL), |
147 | fCrossCheckInPtBinNo(10), | |
148 | fCrossCheckInEtaBinNo(20) | |
ae09553c | 149 | { |
150 | // constructor | |
151 | ||
152 | // base list to hold all output objects: | |
153 | fHistList = new TList(); | |
154 | fHistList->SetName("cobjQC"); | |
155 | fHistList->SetOwner(kTRUE); | |
156 | ||
157 | // list to hold histograms with phi, pt and eta weights: | |
158 | fWeightsList = new TList(); | |
159 | ||
160 | // analysis label; | |
161 | fAnalysisLabel = new TString(); | |
162 | ||
163 | // initialize all arrays: | |
164 | this->InitializeArraysForIntFlow(); | |
165 | this->InitializeArraysForDiffFlow(); | |
91d019b8 | 166 | this->InitializeArraysForDistributions(); |
ae09553c | 167 | this->InitializeArraysForNestedLoops(); |
168 | ||
169 | } // end of constructor | |
170 | ||
171 | ||
172 | //================================================================================================================ | |
173 | ||
174 | ||
175 | AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants() | |
176 | { | |
177 | // destructor | |
178 | ||
179 | delete fHistList; | |
180 | ||
181 | } // end of AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants() | |
182 | ||
183 | ||
184 | //================================================================================================================ | |
185 | ||
186 | ||
187 | void AliFlowAnalysisWithQCumulants::Init() | |
188 | { | |
189 | // a) Access all common constants; | |
190 | // b) Book all objects; | |
191 | // c) Store flags for integrated and differential flow; | |
192 | // d) Store harmonic which will be estimated. | |
193 | ||
194 | // a) Access all common constants: | |
195 | this->AccessConstants(); | |
196 | ||
197 | // b) Book all objects: | |
198 | this->BookAndFillWeightsHistograms(); | |
199 | this->BookAndNestAllLists(); | |
200 | this->BookCommonHistograms(); | |
201 | this->BookEverythingForIntegratedFlow(); | |
202 | this->BookEverythingForDifferentialFlow(); | |
203 | this->BookEverythingForDistributions(); | |
204 | this->BookEverythingForNestedLoops(); | |
205 | ||
206 | // c) Store flags for integrated and differential flow: | |
207 | this->StoreIntFlowFlags(); | |
208 | this->StoreDiffFlowFlags(); | |
209 | ||
210 | // d) Store harmonic which will be estimated: | |
211 | this->StoreHarmonic(); | |
212 | ||
213 | } // end of void AliFlowAnalysisWithQCumulants::Init() | |
214 | ||
215 | ||
216 | //================================================================================================================ | |
217 | ||
218 | ||
219 | void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent) | |
220 | { | |
221 | // Running over data only in this method. | |
222 | ||
223 | // a) Fill the common control histograms and call the method to fill fAvMultiplicity; | |
224 | // b) Loop over data and calculate e-b-e quantities; | |
225 | // c) call the methods; | |
226 | // d) Debugging and cross-checking (evaluate nested loops); | |
227 | // e) Reset all event by event quantities. | |
228 | ||
229 | Double_t dPhi = 0.; // azimuthal angle in the laboratory frame | |
230 | Double_t dPt = 0.; // transverse momentum | |
231 | Double_t dEta = 0.; // pseudorapidity | |
232 | ||
233 | Double_t wPhi = 1.; // phi weight | |
234 | Double_t wPt = 1.; // pt weight | |
235 | Double_t wEta = 1.; // eta weight | |
236 | ||
237 | Int_t nRP = anEvent->GetEventNSelTracksRP(); // number of RPs (i.e. number of particles used to determine the reaction plane) | |
238 | ||
239 | // a) Fill the common control histograms and call the method to fill fAvMultiplicity: | |
240 | this->FillCommonControlHistograms(anEvent); | |
241 | this->FillAverageMultiplicities(nRP); | |
242 | ||
243 | // b) Loop over data and calculate e-b-e quantities: | |
244 | Int_t nPrim = anEvent->NumberOfTracks(); // nPrim = total number of primary tracks, i.e. nPrim = nRP + nPOI + rest, where: | |
245 | // nRP = # of particles used to determine the reaction plane; | |
246 | // nPOI = # of particles of interest for a detailed flow analysis; | |
247 | // rest = # of particles which are not niether RPs nor POIs. | |
248 | ||
249 | AliFlowTrackSimple *aftsTrack = NULL; | |
250 | ||
251 | for(Int_t i=0;i<nPrim;i++) | |
252 | { | |
253 | aftsTrack=anEvent->GetTrack(i); | |
254 | if(aftsTrack) | |
255 | { | |
256 | if(!(aftsTrack->InRPSelection() || aftsTrack->InPOISelection())) continue; // consider only tracks which are RPs or POIs | |
257 | Int_t n = fHarmonic; // shortcut for the harmonic | |
258 | if(aftsTrack->InRPSelection()) // RP condition: | |
259 | { | |
260 | dPhi = aftsTrack->Phi(); | |
261 | dPt = aftsTrack->Pt(); | |
262 | dEta = aftsTrack->Eta(); | |
263 | if(fUsePhiWeights && fPhiWeights && fnBinsPhi) // determine phi weight for this particle: | |
264 | { | |
265 | wPhi = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*fnBinsPhi/TMath::TwoPi()))); | |
266 | } | |
267 | if(fUsePtWeights && fPtWeights && fnBinsPt) // determine pt weight for this particle: | |
268 | { | |
269 | wPt = fPtWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/fPtBinWidth))); | |
270 | } | |
271 | if(fUseEtaWeights && fEtaWeights && fEtaBinWidth) // determine eta weight for this particle: | |
272 | { | |
273 | wEta = fEtaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fEtaBinWidth))); | |
274 | } | |
275 | ||
276 | // integrated flow: | |
277 | // calculate Re[Q_{m*n,k}] and Im[Q_{m*n,k}], m = 1,2,3,4, for this event: | |
278 | for(Int_t m=0;m<4;m++) | |
279 | { | |
280 | for(Int_t k=0;k<9;k++) | |
281 | { | |
282 | (*fReQ)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1)*n*dPhi); | |
283 | (*fImQ)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1)*n*dPhi); | |
284 | } | |
285 | } | |
286 | // calculate S^{M}_{p,k} for this event | |
287 | // Remark: final calculation of S^{M}_{p,k} follows after the loop over data bellow: | |
288 | for(Int_t p=0;p<8;p++) | |
289 | { | |
290 | for(Int_t k=0;k<9;k++) | |
291 | { | |
292 | (*fSMpk)(p,k)+=pow(wPhi*wPt*wEta,k); | |
293 | } | |
294 | } | |
295 | ||
296 | // differential flow: | |
297 | // 1D (pt): | |
298 | // (r_{m*m,k}(pt)): | |
299 | for(Int_t m=0;m<4;m++) | |
300 | { | |
301 | for(Int_t k=0;k<9;k++) | |
302 | { | |
303 | fReRPQ1dEBE[0][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
304 | fImRPQ1dEBE[0][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
305 | } | |
306 | } | |
307 | ||
308 | // s_{k}(pt) for RPs // to be improved (clarified) | |
309 | // Remark: final calculation of s_{p,k}(pt) follows after the loop over data bellow: | |
310 | for(Int_t k=0;k<9;k++) | |
311 | { | |
312 | fs1dEBE[0][0][k]->Fill(dPt,pow(wPhi*wPt*wEta,k),1.); | |
313 | } | |
314 | // 1D (eta): | |
315 | // (r_{m*m,k}(eta)): | |
316 | for(Int_t m=0;m<4;m++) | |
317 | { | |
318 | for(Int_t k=0;k<9;k++) | |
319 | { | |
320 | fReRPQ1dEBE[0][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
321 | fImRPQ1dEBE[0][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
322 | } | |
323 | } | |
324 | // s_{k}(eta) for RPs // to be improved (clarified) | |
325 | // Remark: final calculation of s_{p,k}(eta) follows after the loop over data bellow: | |
326 | for(Int_t k=0;k<9;k++) | |
327 | { | |
328 | fs1dEBE[0][1][k]->Fill(dEta,pow(wPhi*wPt*wEta,k),1.); | |
329 | } | |
330 | ||
331 | ||
332 | ||
333 | /* | |
334 | // 2D (pt,eta): | |
335 | if(fCalculate2DFlow) | |
336 | { | |
337 | // (r_{m*m,k}(pt,eta)): | |
338 | for(Int_t m=0;m<4;m++) | |
339 | { | |
340 | for(Int_t k=0;k<9;k++) | |
341 | { | |
342 | fReRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
343 | fImRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
344 | } | |
345 | } | |
346 | // s_{k}(pt,eta) for RPs // to be improved (clarified) | |
347 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
348 | for(Int_t k=0;k<9;k++) | |
349 | { | |
350 | fs2dEBE[0][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k),1.); | |
351 | } | |
352 | } // end of if(fCalculate2DFlow) | |
353 | */ | |
354 | ||
355 | ||
356 | ||
357 | if(aftsTrack->InPOISelection()) | |
358 | { | |
359 | // 1D (pt): | |
360 | // (q_{m*m,k}(pt)): | |
361 | for(Int_t m=0;m<4;m++) | |
362 | { | |
363 | for(Int_t k=0;k<9;k++) | |
364 | { | |
365 | fReRPQ1dEBE[2][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
366 | fImRPQ1dEBE[2][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
367 | } | |
368 | } | |
369 | // s_{k}(pt) for RP&&POIs // to be improved (clarified) | |
370 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
371 | for(Int_t k=0;k<9;k++) | |
372 | { | |
373 | fs1dEBE[2][0][k]->Fill(dPt,pow(wPhi*wPt*wEta,k),1.); | |
374 | } | |
375 | // 1D (eta): | |
376 | // (q_{m*m,k}(eta)): | |
377 | for(Int_t m=0;m<4;m++) | |
378 | { | |
379 | for(Int_t k=0;k<9;k++) | |
380 | { | |
381 | fReRPQ1dEBE[2][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
382 | fImRPQ1dEBE[2][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
383 | } | |
384 | } | |
385 | // s_{k}(eta) for RP&&POIs // to be improved (clarified) | |
386 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
387 | for(Int_t k=0;k<9;k++) | |
388 | { | |
389 | fs1dEBE[2][1][k]->Fill(dEta,pow(wPhi*wPt*wEta,k),1.); | |
390 | } | |
391 | ||
392 | /* | |
393 | // 2D (pt,eta) | |
394 | if(fCalculate2DFlow) | |
395 | { | |
396 | // (q_{m*m,k}(pt,eta)): | |
397 | for(Int_t m=0;m<4;m++) | |
398 | { | |
399 | for(Int_t k=0;k<9;k++) | |
400 | { | |
401 | fReRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
402 | fImRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
403 | } | |
404 | } | |
405 | // s_{k}(pt,eta) for RP&&POIs // to be improved (clarified) | |
406 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
407 | for(Int_t k=0;k<9;k++) | |
408 | { | |
409 | fs2dEBE[2][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k),1.); | |
410 | } | |
411 | } // end of if(fCalculate2DFlow) | |
412 | */ | |
413 | ||
414 | } // end of if(aftsTrack->InPOISelection()) | |
415 | ||
416 | ||
417 | ||
418 | } // end of if(pTrack->InRPSelection()) | |
419 | ||
420 | ||
421 | ||
422 | if(aftsTrack->InPOISelection()) | |
423 | { | |
424 | dPhi = aftsTrack->Phi(); | |
425 | dPt = aftsTrack->Pt(); | |
426 | dEta = aftsTrack->Eta(); | |
427 | ||
428 | // 1D (pt) | |
429 | // p_n(m*n,0): | |
430 | for(Int_t m=0;m<4;m++) | |
431 | { | |
432 | fReRPQ1dEBE[1][0][m][0]->Fill(dPt,TMath::Cos((m+1.)*n*dPhi),1.); | |
433 | fImRPQ1dEBE[1][0][m][0]->Fill(dPt,TMath::Sin((m+1.)*n*dPhi),1.); | |
434 | } | |
435 | // 1D (eta) | |
436 | // p_n(m*n,0): | |
437 | for(Int_t m=0;m<4;m++) | |
438 | { | |
439 | fReRPQ1dEBE[1][1][m][0]->Fill(dEta,TMath::Cos((m+1.)*n*dPhi),1.); | |
440 | fImRPQ1dEBE[1][1][m][0]->Fill(dEta,TMath::Sin((m+1.)*n*dPhi),1.); | |
441 | } | |
442 | ||
443 | ||
444 | /* | |
445 | // 2D (pt,eta): | |
446 | if(fCalculate2DFlow) | |
447 | { | |
448 | // p_n(m*n,0): | |
449 | for(Int_t m=0;m<4;m++) | |
450 | { | |
451 | fReRPQ2dEBE[1][m][0]->Fill(dPt,dEta,TMath::Cos((m+1.)*n*dPhi),1.); | |
452 | fImRPQ2dEBE[1][m][0]->Fill(dPt,dEta,TMath::Sin((m+1.)*n*dPhi),1.); | |
453 | } | |
454 | } // end of if(fCalculate2DFlow) | |
455 | */ | |
456 | ||
457 | ||
458 | } // end of if(pTrack->InPOISelection() ) | |
459 | ||
460 | ||
461 | } else // to if(aftsTrack) | |
462 | { | |
463 | cout<<endl; | |
464 | cout<<" WARNING: no particle! (i.e. aftsTrack is a NULL pointer in AFAWQC::Make().)"<<endl; | |
465 | cout<<endl; | |
466 | } | |
467 | } // end of for(Int_t i=0;i<nPrim;i++) | |
468 | ||
469 | // calculate the final expressions for S^{M}_{p,k}: | |
470 | for(Int_t p=0;p<8;p++) | |
471 | { | |
472 | for(Int_t k=0;k<9;k++) | |
473 | { | |
474 | (*fSMpk)(p,k)=pow((*fSMpk)(p,k),p+1); | |
475 | } | |
476 | } | |
477 | ||
478 | // ***************************** | |
479 | // **** CALL THE METHODS ******* | |
480 | // ***************************** | |
481 | // integrated flow: | |
482 | if(!fEvaluateIntFlowNestedLoops) | |
483 | { | |
484 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
485 | { | |
486 | if(nRP>1) this->CalculateIntFlowCorrelations(); // without using particle weights | |
487 | } else | |
488 | { | |
489 | if(nRP>1) this->CalculateIntFlowCorrelationsUsingParticleWeights(); // with using particle weights | |
490 | } | |
491 | ||
492 | if(nRP>3) this->CalculateIntFlowProductOfCorrelations(); | |
493 | if(nRP>1) this->CalculateIntFlowSumOfEventWeights(); | |
494 | if(nRP>1) this->CalculateIntFlowSumOfProductOfEventWeights(); | |
495 | if(fApplyCorrectionForNUA && !(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) // to be improved (enable correction for NUA also when particle weights are used?) | |
496 | { | |
497 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUASinTerms(); | |
498 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUACosTerms(); | |
499 | } | |
500 | } // end of if(!fEvaluateIntFlowNestedLoops) | |
501 | ||
502 | // differential flow: | |
503 | if(!fEvaluateDiffFlowNestedLoops) | |
504 | { | |
505 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
506 | { | |
507 | if(nRP>1) // to be improved (move this if somewhere else) | |
508 | { | |
509 | // without using particle weights: | |
510 | this->CalculateDiffFlowCorrelations("RP","Pt"); | |
511 | this->CalculateDiffFlowCorrelations("RP","Eta"); | |
512 | this->CalculateDiffFlowCorrelations("POI","Pt"); | |
513 | this->CalculateDiffFlowCorrelations("POI","Eta"); | |
514 | } | |
515 | } else | |
516 | { | |
517 | // with using particle weights: | |
518 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Pt"); | |
519 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Eta"); | |
520 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Pt"); | |
521 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Eta"); | |
522 | } | |
523 | ||
524 | this->CalculateDiffFlowProductOfCorrelations("RP","Pt"); | |
525 | this->CalculateDiffFlowProductOfCorrelations("RP","Eta"); | |
526 | this->CalculateDiffFlowProductOfCorrelations("POI","Pt"); | |
527 | this->CalculateDiffFlowProductOfCorrelations("POI","Eta"); | |
528 | this->CalculateDiffFlowSumOfEventWeights("RP","Pt"); | |
529 | this->CalculateDiffFlowSumOfEventWeights("RP","Eta"); | |
530 | this->CalculateDiffFlowSumOfEventWeights("POI","Pt"); | |
531 | this->CalculateDiffFlowSumOfEventWeights("POI","Eta"); | |
532 | this->CalculateDiffFlowSumOfProductOfEventWeights("RP","Pt"); | |
533 | this->CalculateDiffFlowSumOfProductOfEventWeights("RP","Eta"); | |
534 | this->CalculateDiffFlowSumOfProductOfEventWeights("POI","Pt"); | |
535 | this->CalculateDiffFlowSumOfProductOfEventWeights("POI","Eta"); | |
536 | if(fApplyCorrectionForNUA && !(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) // to be improved (enable correction for NUA also when particle weights are used?) | |
537 | { | |
538 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Pt"); | |
539 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Eta"); | |
540 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Pt"); | |
541 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Eta"); | |
542 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Pt"); | |
543 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Eta"); | |
544 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Pt"); | |
545 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Eta"); | |
546 | } | |
547 | ||
548 | } // end of if(!fEvaluateDiffFlowNestedLoops) | |
549 | ||
550 | ||
551 | ||
552 | // with weights: | |
553 | // ... | |
554 | ||
555 | /* | |
556 | // 2D differential flow | |
557 | if(fCalculate2DFlow) | |
558 | { | |
559 | // without weights: | |
560 | if(nRP>1) this->CalculateCorrelationsForDifferentialFlow2D("RP"); | |
561 | if(nRP>1) this->CalculateCorrelationsForDifferentialFlow2D("POI"); | |
562 | ||
563 | // with weights: | |
564 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
565 | { | |
566 | if(nRP>1) this->CalculateWeightedCorrelationsForDifferentialFlow2D("RP"); | |
567 | if(nRP>1) this->CalculateWeightedCorrelationsForDifferentialFlow2D("POI"); | |
568 | } | |
569 | } // end of if(fCalculate2DFlow) | |
570 | */ | |
571 | ||
572 | ||
573 | // d) Debugging and cross-checking (evaluate nested loops): | |
91d019b8 | 574 | // d1) cross-checking results for integrated flow: |
ae09553c | 575 | if(fEvaluateIntFlowNestedLoops) |
576 | { | |
577 | if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
578 | { | |
579 | // without using particle weights: | |
580 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
581 | { | |
91d019b8 | 582 | // correlations: |
583 | this->CalculateIntFlowCorrelations(); // from Q-vectors | |
ae09553c | 584 | this->EvaluateIntFlowCorrelationsWithNestedLoops(anEvent); // from nested loops (to be improved: do I have to pass here anEvent or not?) |
585 | // correction for non-uniform acceptance: | |
586 | this->CalculateIntFlowCorrectionsForNUASinTerms(); // from Q-vectors (sin terms) | |
91d019b8 | 587 | this->CalculateIntFlowCorrectionsForNUACosTerms(); // from Q-vectors (cos terms) |
ae09553c | 588 | this->EvaluateIntFlowCorrectionsForNUAWithNestedLoops(anEvent); // from nested loops (both sin and cos terms) |
589 | } | |
590 | // using particle weights: | |
591 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
592 | { | |
593 | // correlations: | |
594 | this->CalculateIntFlowCorrelationsUsingParticleWeights(); // from Q-vectors | |
595 | this->EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent); // from nested loops (to be improved: do I have to pass here anEvent or not?) | |
596 | } | |
91d019b8 | 597 | } else if (nPrim>fMaxAllowedMultiplicity) // to if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) |
598 | { | |
599 | cout<<endl; | |
600 | cout<<"Skipping the event because multiplicity is "<<nPrim<<". Too high to evaluate nested loops!"<<endl; | |
601 | } else | |
602 | { | |
603 | cout<<endl; | |
604 | cout<<"Skipping the event because multiplicity is "<<nPrim<<"."<<endl; | |
ae09553c | 605 | } |
606 | } // end of if(fEvaluateIntFlowNestedLoops) | |
607 | ||
91d019b8 | 608 | // d2) cross-checking results for differential flow: |
ae09553c | 609 | if(fEvaluateDiffFlowNestedLoops) |
610 | { | |
611 | if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
612 | { | |
613 | // without using particle weights: | |
614 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
615 | { | |
616 | // reduced correlations: | |
91d019b8 | 617 | // Q-vectors: |
ae09553c | 618 | this->CalculateDiffFlowCorrelations("RP","Pt"); |
619 | this->CalculateDiffFlowCorrelations("RP","Eta"); | |
620 | this->CalculateDiffFlowCorrelations("POI","Pt"); | |
91d019b8 | 621 | this->CalculateDiffFlowCorrelations("POI","Eta"); |
622 | // nested loops: | |
623 | //this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"RP","Pt"); // to be improved (enabled eventually) | |
624 | //this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"RP","Eta"); // to be improved (enabled eventually) | |
625 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"POI","Pt"); // to be improved (do I need to pass here anEvent?) | |
626 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"POI","Eta"); // to be improved (do I need to pass here anEvent?) | |
ae09553c | 627 | // reduced corrections for non-uniform acceptance: |
628 | // Q-vectors: | |
629 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Pt"); | |
630 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Eta"); | |
631 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Pt"); | |
632 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Eta"); | |
633 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Pt"); | |
634 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Eta"); | |
635 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Pt"); | |
91d019b8 | 636 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Eta"); |
637 | // nested loops: | |
ae09553c | 638 | //this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"RP","Pt"); // to be improved (enabled eventually) |
639 | //this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"RP","Eta"); // to be improved (enabled eventually) | |
640 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"POI","Pt"); // to be improved (do I need to pass here anEvent?) | |
641 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"POI","Eta"); // to be improved (do I need to pass here anEvent?) | |
642 | } // end of if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
643 | // using particle weights: | |
644 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
645 | { | |
646 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Pt"); | |
647 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Eta"); | |
648 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Pt"); | |
649 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Eta"); | |
91d019b8 | 650 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"RP","Pt"); // to be improved (enabled eventually) |
651 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"RP","Eta"); // to be improved (enabled eventually) | |
652 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"POI","Pt"); // to be improved (do I need to pass here anEvent?) | |
653 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"POI","Eta"); // to be improved (do I need to pass here anEvent?) | |
ae09553c | 654 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) |
655 | } // end of if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
656 | } // end of if(fEvaluateDiffFlowNestedLoops) | |
657 | ||
658 | // e) Reset all event by event quantities: | |
659 | this->ResetEventByEventQuantities(); | |
660 | ||
661 | } // end of AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent) | |
662 | ||
663 | ||
664 | //================================================================================================================================ | |
665 | ||
666 | ||
667 | void AliFlowAnalysisWithQCumulants::Finish() | |
668 | { | |
669 | // Calculate the final results. | |
670 | // a) acces the constants; | |
671 | // b) access the flags; | |
672 | // c) calculate the final results for integrated flow (without and with weights); | |
673 | // d) store in AliFlowCommonHistResults and print the final results for integrated flow; | |
674 | // e) calculate the final results for differential flow (without and with weights); | |
675 | // f) print the final results for integrated flow obtained from differential flow (to be improved (terminology)); | |
676 | // g) cross-check the results: results from Q-vectors vs results from nested loops | |
677 | ||
678 | // ****************************** | |
679 | // **** ACCESS THE CONSTANTS **** | |
680 | // ****************************** | |
681 | ||
682 | this->AccessConstants(); | |
683 | ||
684 | if(fCommonHists && fCommonHists->GetHarmonic()) | |
685 | { | |
686 | fHarmonic = (Int_t)(fCommonHists->GetHarmonic())->GetBinContent(1); // to be improved (moved somewhere else) | |
687 | } | |
688 | ||
689 | // ************************** | |
690 | // **** ACCESS THE FLAGS **** | |
691 | // ************************** | |
692 | fUsePhiWeights = (Int_t)fUseParticleWeights->GetBinContent(1); | |
693 | fUsePtWeights = (Int_t)fUseParticleWeights->GetBinContent(2); | |
694 | fUseEtaWeights = (Int_t)fUseParticleWeights->GetBinContent(3); | |
91d019b8 | 695 | fApplyCorrectionForNUA = (Int_t)fIntFlowFlags->GetBinContent(3); |
ae09553c | 696 | fEvaluateIntFlowNestedLoops = (Int_t)fEvaluateNestedLoops->GetBinContent(1); |
697 | fEvaluateDiffFlowNestedLoops = (Int_t)fEvaluateNestedLoops->GetBinContent(2); | |
698 | fCrossCheckInPtBinNo = (Int_t)fEvaluateNestedLoops->GetBinContent(3); | |
699 | fCrossCheckInEtaBinNo = (Int_t)fEvaluateNestedLoops->GetBinContent(4); | |
700 | ||
701 | // ********************************************************* | |
702 | // **** CALCULATE THE FINAL RESULTS FOR INTEGRATED FLOW **** | |
703 | // ********************************************************* | |
704 | ||
705 | this->FinalizeCorrelationsIntFlow(); | |
706 | this->CalculateCovariancesIntFlow(); | |
707 | this->CalculateCumulantsIntFlow(); | |
708 | this->CalculateIntFlow(); | |
709 | ||
710 | if(fApplyCorrectionForNUA && !(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) // to be improved (reorganized, etc) | |
711 | { | |
712 | this->FinalizeCorrectionTermsForNUAIntFlow(); | |
713 | this->CalculateQcumulantsCorrectedForNUAIntFlow(); | |
714 | this->CalculateIntFlowCorrectedForNUA(); | |
715 | } | |
716 | ||
717 | // *************************************************************** | |
718 | // **** STORE AND PRINT THE FINAL RESULTS FOR INTEGRATED FLOW **** | |
719 | // *************************************************************** | |
720 | ||
721 | this->FillCommonHistResultsIntFlow(); | |
722 | ||
723 | this->PrintFinalResultsForIntegratedFlow("NONAME"); // to be improved (name) | |
724 | ||
725 | // *********************************************************** | |
726 | // **** CALCULATE THE FINAL RESULTS FOR DIFFERENTIAL FLOW **** | |
727 | // *********************************************************** | |
728 | ||
729 | this->FinalizeReducedCorrelations("RP","Pt"); | |
730 | this->FinalizeReducedCorrelations("RP","Eta"); | |
731 | this->FinalizeReducedCorrelations("POI","Pt"); | |
732 | this->FinalizeReducedCorrelations("POI","Eta"); | |
733 | this->CalculateDiffFlowCovariances("RP","Pt"); | |
734 | this->CalculateDiffFlowCovariances("RP","Eta"); | |
735 | this->CalculateDiffFlowCovariances("POI","Pt"); | |
736 | this->CalculateDiffFlowCovariances("POI","Eta"); | |
737 | this->CalculateDiffFlowCumulants("RP","Pt"); | |
738 | this->CalculateDiffFlowCumulants("RP","Eta"); | |
739 | this->CalculateDiffFlowCumulants("POI","Pt"); | |
740 | this->CalculateDiffFlowCumulants("POI","Eta"); | |
741 | this->CalculateDiffFlow("RP","Pt"); | |
742 | this->CalculateDiffFlow("RP","Eta"); | |
743 | this->CalculateDiffFlow("POI","Pt"); | |
744 | this->CalculateDiffFlow("POI","Eta"); | |
745 | ||
746 | if(fApplyCorrectionForNUA && !(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) // to be improved (reorganized, etc) | |
747 | { | |
748 | this->FinalizeCorrectionTermsForNUADiffFlow("RP","Pt"); | |
749 | this->FinalizeCorrectionTermsForNUADiffFlow("RP","Eta"); | |
750 | this->FinalizeCorrectionTermsForNUADiffFlow("POI","Pt"); | |
751 | this->FinalizeCorrectionTermsForNUADiffFlow("POI","Eta"); | |
752 | this->CalculateDiffFlowCumulantsCorrectedForNUA("RP","Pt"); | |
753 | this->CalculateDiffFlowCumulantsCorrectedForNUA("RP","Eta"); | |
754 | this->CalculateDiffFlowCumulantsCorrectedForNUA("POI","Pt"); | |
755 | this->CalculateDiffFlowCumulantsCorrectedForNUA("POI","Eta"); | |
756 | this->CalculateDiffFlowCorrectedForNUA("RP","Pt"); | |
757 | this->CalculateDiffFlowCorrectedForNUA("RP","Eta"); | |
758 | this->CalculateDiffFlowCorrectedForNUA("POI","Pt"); | |
759 | this->CalculateDiffFlowCorrectedForNUA("POI","Eta"); | |
760 | } | |
761 | ||
762 | this->CalculateFinalResultsForRPandPOIIntegratedFlow("RP"); | |
763 | this->CalculateFinalResultsForRPandPOIIntegratedFlow("POI"); | |
764 | ||
765 | // ***************************************************************** | |
766 | // **** STORE AND PRINT THE FINAL RESULTS FOR DIFFERENTIAL FLOW **** | |
767 | // ***************************************************************** | |
768 | this->FillCommonHistResultsDiffFlow("RP"); | |
769 | this->FillCommonHistResultsDiffFlow("POI"); | |
770 | ||
771 | this->PrintFinalResultsForIntegratedFlow("RP"); | |
772 | this->PrintFinalResultsForIntegratedFlow("POI"); | |
773 | ||
774 | // g) cross-check the results: results from Q-vectors vs results from nested loops | |
91d019b8 | 775 | // g1) integrated flow: |
776 | if(fEvaluateIntFlowNestedLoops) | |
777 | { | |
ae09553c | 778 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
779 | { | |
91d019b8 | 780 | this->CrossCheckIntFlowCorrelations(); |
ae09553c | 781 | this->CrossCheckIntFlowCorrectionTermsForNUA(); |
91d019b8 | 782 | } else |
783 | { | |
784 | this->CrossCheckIntFlowCorrelations(); | |
785 | this->CrossCheckIntFlowExtraCorrelations(); | |
786 | } | |
ae09553c | 787 | } // end of if(fEvaluateIntFlowNestedLoops) |
788 | // g2) differential flow: | |
789 | if(fEvaluateDiffFlowNestedLoops) | |
790 | { | |
91d019b8 | 791 | // correlations: |
ae09553c | 792 | //this->CrossCheckDiffFlowCorrelations("RP","Pt"); // to be improved (enabled eventually) |
793 | //this->CrossCheckDiffFlowCorrelations("RP","Eta"); // to be improved (enabled eventually) | |
794 | this->CrossCheckDiffFlowCorrelations("POI","Pt"); | |
91d019b8 | 795 | this->CrossCheckDiffFlowCorrelations("POI","Eta"); |
796 | // correction terms for non-uniform acceptance: | |
ae09553c | 797 | //this->CrossCheckDiffFlowCorrectionTermsForNUA("RP","Pt"); // to be improved (enabled eventually) |
798 | //this->CrossCheckDiffFlowCorrectionTermsForNUA("RP","Eta"); // to be improved (enabled eventually) | |
799 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
91d019b8 | 800 | { |
ae09553c | 801 | this->CrossCheckDiffFlowCorrectionTermsForNUA("POI","Pt"); |
802 | this->CrossCheckDiffFlowCorrectionTermsForNUA("POI","Eta"); | |
a1573bed | 803 | } |
ae09553c | 804 | } // end of if(fEvaluateDiffFlowNestedLoops) |
805 | ||
806 | } // end of AliFlowAnalysisWithQCumulants::Finish() | |
91d019b8 | 807 | |
ae09553c | 808 | |
809 | //================================================================================================================================ | |
810 | ||
811 | ||
812 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTerms() | |
91d019b8 | 813 | { |
ae09553c | 814 | // calculate corrections for non-uniform acceptance of the detector for no-name integrated flow (cos terms) |
91d019b8 | 815 | |
ae09553c | 816 | // multiplicity: |
817 | Double_t dMult = (*fSMpk)(0,0); | |
818 | ||
819 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
820 | Double_t dReQ1n = (*fReQ)(0,0); | |
821 | Double_t dReQ2n = (*fReQ)(1,0); | |
822 | //Double_t dReQ3n = (*fReQ)(2,0); | |
823 | //Double_t dReQ4n = (*fReQ)(3,0); | |
824 | Double_t dImQ1n = (*fImQ)(0,0); | |
825 | Double_t dImQ2n = (*fImQ)(1,0); | |
826 | //Double_t dImQ3n = (*fImQ)(2,0); | |
827 | //Double_t dImQ4n = (*fImQ)(3,0); | |
828 | ||
829 | // ************************************************************* | |
830 | // **** corrections for non-uniform acceptance (cos terms): **** | |
831 | // ************************************************************* | |
832 | // | |
833 | // Remark 1: corrections for non-uniform acceptance (cos terms) calculated with non-weighted Q-vectors | |
834 | // are stored in 1D profile fQCorrectionsCos. | |
835 | // Remark 2: binning of fIntFlowCorrectionTermsForNUAPro[1] is organized as follows: | |
836 | // -------------------------------------------------------------------------------------------------------------------- | |
837 | // 1st bin: <<cos(n*(phi1))>> = cosP1n | |
838 | // 2nd bin: <<cos(n*(phi1+phi2))>> = cosP1nP1n | |
839 | // 3rd bin: <<cos(n*(phi1-phi2-phi3))>> = cosP1nM1nM1n | |
840 | // ... | |
841 | // -------------------------------------------------------------------------------------------------------------------- | |
842 | ||
843 | // 1-particle: | |
844 | Double_t cosP1n = 0.; // <<cos(n*(phi1))>> | |
845 | ||
846 | if(dMult>0) | |
847 | { | |
848 | cosP1n = dReQ1n/dMult; | |
849 | ||
850 | // average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for single event: | |
851 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(1,cosP1n); | |
852 | ||
853 | // final average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for all events: | |
854 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(0.5,cosP1n,dMult); | |
91d019b8 | 855 | } |
ae09553c | 856 | |
857 | // 2-particle: | |
858 | Double_t cosP1nP1n = 0.; // <<cos(n*(phi1+phi2))>> | |
859 | ||
860 | if(dMult>1) | |
861 | { | |
862 | cosP1nP1n = (pow(dReQ1n,2)-pow(dImQ1n,2)-dReQ2n)/(dMult*(dMult-1)); | |
863 | ||
864 | // average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for single event: | |
865 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(2,cosP1nP1n); | |
866 | ||
867 | // final average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for all events: | |
868 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(1.5,cosP1nP1n,dMult*(dMult-1)); | |
869 | } | |
870 | ||
871 | // 3-particle: | |
872 | Double_t cosP1nM1nM1n = 0.; // <<cos(n*(phi1-phi2-phi3))>> | |
873 | ||
874 | if(dMult>2) | |
875 | { | |
876 | cosP1nM1nM1n = (dReQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))-dReQ1n*dReQ2n-dImQ1n*dImQ2n-2.*(dMult-1)*dReQ1n) | |
877 | / (dMult*(dMult-1)*(dMult-2)); | |
878 | ||
879 | // average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for single event: | |
880 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(3,cosP1nM1nM1n); | |
881 | ||
882 | // final average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for all events: | |
883 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(2.5,cosP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); | |
884 | } | |
885 | ||
886 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTerms() | |
91d019b8 | 887 | |
91d019b8 | 888 | |
ae09553c | 889 | //================================================================================================================================ |
91d019b8 | 890 | |
91d019b8 | 891 | |
ae09553c | 892 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTerms() |
893 | { | |
894 | // calculate corrections for non-uniform acceptance of the detector for no-name integrated flow (sin terms) | |
91d019b8 | 895 | |
ae09553c | 896 | // multiplicity: |
897 | Double_t dMult = (*fSMpk)(0,0); | |
898 | ||
899 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
900 | Double_t dReQ1n = (*fReQ)(0,0); | |
901 | Double_t dReQ2n = (*fReQ)(1,0); | |
902 | //Double_t dReQ3n = (*fReQ)(2,0); | |
903 | //Double_t dReQ4n = (*fReQ)(3,0); | |
904 | Double_t dImQ1n = (*fImQ)(0,0); | |
905 | Double_t dImQ2n = (*fImQ)(1,0); | |
906 | //Double_t dImQ3n = (*fImQ)(2,0); | |
907 | //Double_t dImQ4n = (*fImQ)(3,0); | |
908 | ||
909 | // ************************************************************* | |
910 | // **** corrections for non-uniform acceptance (sin terms): **** | |
911 | // ************************************************************* | |
912 | // | |
913 | // Remark 1: corrections for non-uniform acceptance (sin terms) calculated with non-weighted Q-vectors | |
914 | // are stored in 1D profile fQCorrectionsSin. | |
915 | // Remark 2: binning of fIntFlowCorrectionTermsForNUAPro[0] is organized as follows: | |
916 | // -------------------------------------------------------------------------------------------------------------------- | |
917 | // 1st bin: <<sin(n*(phi1))>> = sinP1n | |
918 | // 2nd bin: <<sin(n*(phi1+phi2))>> = sinP1nP1n | |
919 | // 3rd bin: <<sin(n*(phi1-phi2-phi3))>> = sinP1nM1nM1n | |
920 | // ... | |
921 | // -------------------------------------------------------------------------------------------------------------------- | |
922 | ||
923 | // 1-particle: | |
924 | Double_t sinP1n = 0.; // <sin(n*(phi1))> | |
925 | ||
926 | if(dMult>0) | |
927 | { | |
928 | sinP1n = dImQ1n/dMult; | |
929 | ||
930 | // average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for single event: | |
931 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(1,sinP1n); | |
932 | ||
933 | // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
934 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(0.5,sinP1n,dMult); | |
935 | } | |
936 | ||
937 | // 2-particle: | |
938 | Double_t sinP1nP1n = 0.; // <<sin(n*(phi1+phi2))>> | |
939 | ||
940 | if(dMult>1) | |
941 | { | |
942 | sinP1nP1n = (2.*dReQ1n*dImQ1n-dImQ2n)/(dMult*(dMult-1)); | |
943 | ||
944 | // average non-weighted 2-particle correction (sin terms) for non-uniform acceptance for single event: | |
945 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(2,sinP1nP1n); | |
946 | ||
947 | // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
948 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(1.5,sinP1nP1n,dMult*(dMult-1)); | |
949 | } | |
950 | ||
951 | // 3-particle: | |
952 | Double_t sinP1nM1nM1n = 0.; // <<sin(n*(phi1-phi2-phi3))>> | |
953 | ||
954 | if(dMult>2) | |
955 | { | |
956 | sinP1nM1nM1n = (-dImQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))+dReQ1n*dImQ2n-dImQ1n*dReQ2n+2.*(dMult-1)*dImQ1n) | |
957 | / (dMult*(dMult-1)*(dMult-2)); | |
958 | ||
959 | // average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for single event: | |
960 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(3,sinP1nM1nM1n); | |
961 | ||
962 | // final average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for all events: | |
963 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(2.5,sinP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); | |
964 | } | |
965 | ||
966 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTerms() | |
967 | ||
968 | ||
969 | //================================================================================================================================ | |
970 | ||
971 | ||
972 | void AliFlowAnalysisWithQCumulants::GetOutputHistograms(TList *outputListHistos) | |
973 | { | |
974 | // a) Get pointers for common control and common result histograms and profiles. | |
975 | // b) Get pointers for histograms with particle weights. | |
976 | // c) Get pointers for histograms and profiles relevant for integrated flow. | |
977 | // d) Get pointers for histograms and profiles relevant for differental flow. | |
978 | // e) Get pointers for histograms and profiles holding results obtained with nested loops. | |
979 | ||
980 | if(outputListHistos) | |
981 | { | |
982 | this->GetPointersForCommonHistograms(outputListHistos); // to be improved (no need to pass here argument, use setter for base list instead) | |
983 | this->GetPointersForParticleWeightsHistograms(outputListHistos); // to be improved (no need to pass here argument, use setter for base list instead) | |
984 | this->GetPointersForIntFlowHistograms(outputListHistos); // to be improved (no need to pass here argument, use setter for base list instead) | |
985 | this->GetPointersForDiffFlowHistograms(outputListHistos); // to be improved (no need to pass here argument, use setter for base list instead) | |
986 | this->GetPointersForNestedLoopsHistograms(outputListHistos); // to be improved (no need to pass here argument, use setter for base list instead) | |
987 | } | |
988 | ||
989 | } // end of void AliFlowAnalysisWithQCumulants::GetOutputHistograms(TList *outputListHistos) | |
990 | ||
991 | ||
992 | //================================================================================================================================ | |
993 | ||
994 | ||
995 | TProfile* AliFlowAnalysisWithQCumulants::MakePtProjection(TProfile2D *profilePtEta) const | |
996 | { | |
997 | // project 2D profile onto pt axis to get 1D profile | |
998 | ||
999 | Int_t nBinsPt = profilePtEta->GetNbinsX(); | |
1000 | Double_t dPtMin = (profilePtEta->GetXaxis())->GetXmin(); | |
1001 | Double_t dPtMax = (profilePtEta->GetXaxis())->GetXmax(); | |
1002 | ||
1003 | Int_t nBinsEta = profilePtEta->GetNbinsY(); | |
1004 | ||
1005 | TProfile *profilePt = new TProfile("","",nBinsPt,dPtMin,dPtMax); | |
1006 | ||
1007 | for(Int_t p=1;p<=nBinsPt;p++) | |
1008 | { | |
1009 | Double_t contentPt = 0.; | |
1010 | Double_t entryPt = 0.; | |
1011 | Double_t spreadPt = 0.; | |
1012 | Double_t sum1 = 0.; | |
1013 | Double_t sum2 = 0.; | |
1014 | Double_t sum3 = 0.; | |
1015 | for(Int_t e=1;e<=nBinsEta;e++) | |
1016 | { | |
1017 | contentPt += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))) | |
1018 | * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1019 | entryPt += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1020 | ||
1021 | sum1 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))) | |
1022 | * (pow(profilePtEta->GetBinError(profilePtEta->GetBin(p,e)),2.) | |
1023 | + pow(profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)),2.)); | |
1024 | sum2 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1025 | sum3 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))) | |
1026 | * (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))); | |
1027 | } | |
1028 | if(sum2>0. && sum1/sum2-pow(sum3/sum2,2.) > 0.) | |
1029 | { | |
1030 | spreadPt = pow(sum1/sum2-pow(sum3/sum2,2.),0.5); | |
1031 | } | |
1032 | profilePt->SetBinContent(p,contentPt); | |
1033 | profilePt->SetBinEntries(p,entryPt); | |
1034 | { | |
1035 | profilePt->SetBinError(p,spreadPt); | |
1036 | } | |
1037 | ||
1038 | } | |
1039 | ||
1040 | return profilePt; | |
1041 | ||
1042 | } // end of TProfile* AliFlowAnalysisWithQCumulants::MakePtProjection(TProfile2D *profilePtEta) | |
1043 | ||
1044 | ||
1045 | //================================================================================================================================ | |
1046 | ||
1047 | ||
1048 | TProfile* AliFlowAnalysisWithQCumulants::MakeEtaProjection(TProfile2D *profilePtEta) const | |
1049 | { | |
1050 | // project 2D profile onto eta axis to get 1D profile | |
1051 | ||
1052 | Int_t nBinsEta = profilePtEta->GetNbinsY(); | |
1053 | Double_t dEtaMin = (profilePtEta->GetYaxis())->GetXmin(); | |
1054 | Double_t dEtaMax = (profilePtEta->GetYaxis())->GetXmax(); | |
1055 | ||
1056 | Int_t nBinsPt = profilePtEta->GetNbinsX(); | |
1057 | ||
1058 | TProfile *profileEta = new TProfile("","",nBinsEta,dEtaMin,dEtaMax); | |
1059 | ||
1060 | for(Int_t e=1;e<=nBinsEta;e++) | |
1061 | { | |
1062 | Double_t contentEta = 0.; | |
1063 | Double_t entryEta = 0.; | |
1064 | for(Int_t p=1;p<=nBinsPt;p++) | |
1065 | { | |
1066 | contentEta += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))) | |
1067 | * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1068 | entryEta += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1069 | } | |
1070 | profileEta->SetBinContent(e,contentEta); | |
1071 | profileEta->SetBinEntries(e,entryEta); | |
1072 | } | |
1073 | ||
1074 | return profileEta; | |
1075 | ||
1076 | } // end of TProfile* AliFlowAnalysisWithQCumulants::MakeEtaProjection(TProfile2D *profilePtEta) | |
1077 | ||
1078 | ||
1079 | //================================================================================================================================ | |
1080 | ||
1081 | ||
1082 | void AliFlowAnalysisWithQCumulants::PrintFinalResultsForIntegratedFlow(TString type) | |
1083 | { | |
1084 | // printing on the screen the final results for integrated flow (NONAME, POI and RP) // to be improved (NONAME) | |
1085 | ||
1086 | Int_t n = fHarmonic; | |
1087 | ||
1088 | if(type == "NONAME" || type == "RP" || type == "POI") | |
1089 | { | |
1090 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th)) | |
1091 | { | |
1092 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; | |
1093 | cout<<" is NULL in AFAWQC::PFRFIF() !!!!"<<endl; | |
1094 | } | |
1095 | } else | |
1096 | { | |
1097 | cout<<"WARNING: type in not from {NONAME, RP, POI} in AFAWQC::PFRFIF() !!!!"<<endl; | |
1098 | exit(0); | |
1099 | } | |
1100 | ||
1101 | Double_t dVn[4] = {0.}; // array to hold Vn{2}, Vn{4}, Vn{6} and Vn{8} | |
1102 | Double_t dVnErr[4] = {0.}; // array to hold errors of Vn{2}, Vn{4}, Vn{6} and Vn{8} | |
1103 | ||
1104 | if(type == "NONAME") | |
1105 | { | |
1106 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinContent(1); | |
1107 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinError(1); | |
1108 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinContent(1); | |
1109 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinError(1); | |
1110 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinContent(1); | |
1111 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinError(1); | |
1112 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinContent(1); | |
1113 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinError(1); | |
1114 | } else if(type == "RP") | |
1115 | { | |
1116 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinContent(1); | |
1117 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinError(1); | |
1118 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinContent(1); | |
1119 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinError(1); | |
1120 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinContent(1); | |
1121 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinError(1); | |
1122 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinContent(1); | |
1123 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinError(1); | |
1124 | } else if(type == "POI") | |
1125 | { | |
1126 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinContent(1); | |
1127 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinError(1); | |
1128 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinContent(1); | |
1129 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinError(1); | |
1130 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinContent(1); | |
1131 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinError(1); | |
1132 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinContent(1); | |
1133 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinError(1); | |
1134 | } | |
1135 | ||
1136 | TString title = " flow estimates from Q-cumulants"; | |
1137 | TString subtitle = " ("; | |
1138 | ||
1139 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
1140 | { | |
1141 | subtitle.Append(type); | |
1142 | subtitle.Append(", without weights)"); | |
1143 | } else | |
1144 | { | |
1145 | subtitle.Append(type); | |
1146 | subtitle.Append(", with weights)"); | |
1147 | } | |
1148 | ||
1149 | cout<<endl; | |
1150 | cout<<"*************************************"<<endl; | |
1151 | cout<<"*************************************"<<endl; | |
1152 | cout<<title.Data()<<endl; | |
1153 | cout<<subtitle.Data()<<endl; | |
1154 | cout<<endl; | |
1155 | ||
1156 | for(Int_t i=0;i<4;i++) | |
1157 | { | |
1158 | if(dVn[i]>=0.) | |
1159 | { | |
1160 | cout<<" v_"<<n<<"{"<<2*(i+1)<<"} = "<<dVn[i]<<" +/- "<<dVnErr[i]<<endl; | |
1161 | } | |
1162 | else | |
1163 | { | |
1164 | cout<<" v_"<<n<<"{"<<2*(i+1)<<"} = Im"<<endl; | |
1165 | } | |
1166 | } | |
1167 | ||
1168 | cout<<endl; | |
1169 | /* | |
1170 | if(type == "NONAME") | |
1171 | { | |
1172 | cout<<" nEvts = "<<nEvtsNoName<<", AvM = "<<dMultNoName<<endl; // to be improved | |
1173 | } | |
1174 | else if (type == "RP") | |
1175 | { | |
1176 | cout<<" nEvts = "<<nEvtsRP<<", AvM = "<<dMultRP<<endl; // to be improved | |
1177 | } | |
1178 | else if (type == "POI") | |
1179 | { | |
1180 | cout<<" nEvts = "<<nEvtsPOI<<", AvM = "<<dMultPOI<<endl; // to be improved | |
1181 | } | |
1182 | */ | |
1183 | cout<<"*************************************"<<endl; | |
1184 | cout<<"*************************************"<<endl; | |
1185 | cout<<endl; | |
1186 | ||
1187 | }// end of AliFlowAnalysisWithQCumulants::PrintFinalResultsForIntegratedFlow(TString type="NONAME"); | |
1188 | ||
1189 | ||
1190 | //================================================================================================================================ | |
1191 | ||
1192 | ||
1193 | void AliFlowAnalysisWithQCumulants::WriteHistograms(TString outputFileName) | |
1194 | { | |
1195 | //store the final results in output .root file | |
1196 | TFile *output = new TFile(outputFileName.Data(),"RECREATE"); | |
1197 | //output->WriteObject(fHistList, "cobjQC","SingleKey"); | |
1198 | fHistList->Write(fHistList->GetName(), TObject::kSingleKey); | |
1199 | delete output; | |
1200 | } | |
1201 | ||
1202 | ||
1203 | //================================================================================================================================ | |
1204 | ||
1205 | ||
1206 | void AliFlowAnalysisWithQCumulants::BookCommonHistograms() | |
1207 | { | |
1208 | // Book common control histograms and common histograms for final results. | |
1209 | // common control histogram (ALL events) | |
1210 | TString commonHistsName = "AliFlowCommonHistQC"; | |
1211 | commonHistsName += fAnalysisLabel->Data(); | |
1212 | fCommonHists = new AliFlowCommonHist(commonHistsName.Data()); | |
1213 | fHistList->Add(fCommonHists); | |
1214 | // common control histogram (for events with 2 and more particles) | |
1215 | TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC"; | |
1216 | commonHists2ndOrderName += fAnalysisLabel->Data(); | |
1217 | fCommonHists2nd = new AliFlowCommonHist(commonHists2ndOrderName.Data()); | |
1218 | fHistList->Add(fCommonHists2nd); | |
1219 | // common control histogram (for events with 4 and more particles) | |
1220 | TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC"; | |
1221 | commonHists4thOrderName += fAnalysisLabel->Data(); | |
1222 | fCommonHists4th = new AliFlowCommonHist(commonHists4thOrderName.Data()); | |
1223 | fHistList->Add(fCommonHists4th); | |
1224 | // common control histogram (for events with 6 and more particles) | |
1225 | TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC"; | |
1226 | commonHists6thOrderName += fAnalysisLabel->Data(); | |
1227 | fCommonHists6th = new AliFlowCommonHist(commonHists6thOrderName.Data()); | |
1228 | fHistList->Add(fCommonHists6th); | |
1229 | // common control histogram (for events with 8 and more particles) | |
1230 | TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC"; | |
1231 | commonHists8thOrderName += fAnalysisLabel->Data(); | |
1232 | fCommonHists8th = new AliFlowCommonHist(commonHists8thOrderName.Data()); | |
1233 | fHistList->Add(fCommonHists8th); | |
1234 | // common histograms for final results (calculated for events with 2 and more particles) | |
1235 | TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC"; | |
1236 | commonHistResults2ndOrderName += fAnalysisLabel->Data(); | |
1237 | fCommonHistsResults2nd = new AliFlowCommonHistResults(commonHistResults2ndOrderName.Data()); | |
1238 | fHistList->Add(fCommonHistsResults2nd); | |
1239 | // common histograms for final results (calculated for events with 4 and more particles) | |
1240 | TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC"; | |
1241 | commonHistResults4thOrderName += fAnalysisLabel->Data(); | |
1242 | fCommonHistsResults4th = new AliFlowCommonHistResults(commonHistResults4thOrderName.Data()); | |
1243 | fHistList->Add(fCommonHistsResults4th); | |
1244 | // common histograms for final results (calculated for events with 6 and more particles) | |
1245 | TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC"; | |
1246 | commonHistResults6thOrderName += fAnalysisLabel->Data(); | |
1247 | fCommonHistsResults6th = new AliFlowCommonHistResults(commonHistResults6thOrderName.Data()); | |
1248 | fHistList->Add(fCommonHistsResults6th); | |
1249 | // common histograms for final results (calculated for events with 8 and more particles) | |
1250 | TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC"; | |
1251 | commonHistResults8thOrderName += fAnalysisLabel->Data(); | |
1252 | fCommonHistsResults8th = new AliFlowCommonHistResults(commonHistResults8thOrderName.Data()); | |
1253 | fHistList->Add(fCommonHistsResults8th); | |
1254 | ||
1255 | } // end of void AliFlowAnalysisWithQCumulants::BookCommonHistograms() | |
1256 | ||
1257 | ||
1258 | //================================================================================================================================ | |
1259 | ||
1260 | ||
1261 | void AliFlowAnalysisWithQCumulants::BookAndFillWeightsHistograms() | |
1262 | { | |
1263 | // book and fill histograms which hold phi, pt and eta weights | |
1264 | ||
1265 | if(!fWeightsList) | |
1266 | { | |
1267 | cout<<"WARNING: fWeightsList is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1268 | exit(0); | |
1269 | } | |
1270 | ||
1271 | TString fUseParticleWeightsName = "fUseParticleWeightsQC"; | |
1272 | fUseParticleWeightsName += fAnalysisLabel->Data(); | |
1273 | fUseParticleWeights = new TProfile(fUseParticleWeightsName.Data(),"0 = particle weight not used, 1 = particle weight used ",3,0,3); | |
1274 | fUseParticleWeights->SetLabelSize(0.06); | |
1275 | (fUseParticleWeights->GetXaxis())->SetBinLabel(1,"w_{#phi}"); | |
1276 | (fUseParticleWeights->GetXaxis())->SetBinLabel(2,"w_{p_{T}}"); | |
1277 | (fUseParticleWeights->GetXaxis())->SetBinLabel(3,"w_{#eta}"); | |
1278 | fUseParticleWeights->Fill(0.5,(Int_t)fUsePhiWeights); | |
1279 | fUseParticleWeights->Fill(1.5,(Int_t)fUsePtWeights); | |
1280 | fUseParticleWeights->Fill(2.5,(Int_t)fUseEtaWeights); | |
1281 | fWeightsList->Add(fUseParticleWeights); | |
1282 | ||
1283 | if(fUsePhiWeights) | |
1284 | { | |
1285 | if(fWeightsList->FindObject("phi_weights")) | |
1286 | { | |
1287 | fPhiWeights = dynamic_cast<TH1F*>(fWeightsList->FindObject("phi_weights")); | |
1288 | if(fPhiWeights->GetBinWidth(1) != fPhiBinWidth) | |
1289 | { | |
1290 | cout<<"WARNING: fPhiWeights->GetBinWidth(1) != fPhiBinWidth in AFAWQC::BAFWH() !!!! "<<endl; | |
1291 | cout<<" This indicates inconsistent binning in phi histograms throughout the code."<<endl; | |
1292 | exit(0); | |
1293 | } | |
1294 | } else | |
1295 | { | |
1296 | cout<<"WARNING: fWeightsList->FindObject(\"phi_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1297 | exit(0); | |
1298 | } | |
1299 | } // end of if(fUsePhiWeights) | |
1300 | ||
1301 | if(fUsePtWeights) | |
1302 | { | |
1303 | if(fWeightsList->FindObject("pt_weights")) | |
1304 | { | |
1305 | fPtWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("pt_weights")); | |
1306 | if(fPtWeights->GetBinWidth(1) != fPtBinWidth) | |
1307 | { | |
1308 | cout<<"WARNING: fPtWeights->GetBinWidth(1) != fPtBinWidth in AFAWQC::BAFWH() !!!! "<<endl; | |
1309 | cout<<" This indicates insconsistent binning in pt histograms throughout the code."<<endl; | |
1310 | exit(0); | |
1311 | } | |
1312 | } else | |
1313 | { | |
1314 | cout<<"WARNING: fWeightsList->FindObject(\"pt_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1315 | exit(0); | |
1316 | } | |
1317 | } // end of if(fUsePtWeights) | |
1318 | ||
1319 | if(fUseEtaWeights) | |
1320 | { | |
1321 | if(fWeightsList->FindObject("eta_weights")) | |
1322 | { | |
1323 | fEtaWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("eta_weights")); | |
1324 | if(fEtaWeights->GetBinWidth(1) != fEtaBinWidth) | |
1325 | { | |
1326 | cout<<"WARNING: fEtaWeights->GetBinWidth(1) != fEtaBinWidth in AFAWQC::BAFWH() !!!! "<<endl; | |
1327 | cout<<" This indicates insconsistent binning in eta histograms throughout the code."<<endl; | |
1328 | exit(0); | |
1329 | } | |
1330 | } else | |
1331 | { | |
1332 | cout<<"WARNING: fUseEtaWeights && fWeightsList->FindObject(\"eta_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1333 | exit(0); | |
1334 | } | |
1335 | } // end of if(fUseEtaWeights) | |
1336 | ||
1337 | } // end of AliFlowAnalysisWithQCumulants::BookAndFillWeightsHistograms() | |
1338 | ||
1339 | ||
1340 | //================================================================================================================================ | |
1341 | ||
1342 | ||
1343 | void AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow() | |
1344 | { | |
1345 | // Book all objects for integrated flow: | |
1346 | // a) Book profile to hold all flags for integrated flow. | |
1347 | // b) Book event-by-event quantities. | |
1348 | // c) Book profiles. // to be improved (comment) | |
1349 | // d) Book histograms holding the final results. | |
1350 | ||
1351 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
1352 | TString powerFlag[2] = {"linear","quadratic"}; // to be improved (should I promote this to data members?) | |
1353 | ||
1354 | // a) Book profile to hold all flags for integrated flow: | |
1355 | TString intFlowFlagsName = "fIntFlowFlags"; | |
1356 | intFlowFlagsName += fAnalysisLabel->Data(); | |
1357 | fIntFlowFlags = new TProfile(intFlowFlagsName.Data(),"Flags for Integrated Flow",3,0,3); | |
1358 | fIntFlowFlags->SetTickLength(-0.01,"Y"); | |
1359 | fIntFlowFlags->SetMarkerStyle(25); | |
1360 | fIntFlowFlags->SetLabelSize(0.05); | |
1361 | fIntFlowFlags->SetLabelOffset(0.02,"Y"); | |
1362 | (fIntFlowFlags->GetXaxis())->SetBinLabel(1,"Particle Weights"); | |
1363 | (fIntFlowFlags->GetXaxis())->SetBinLabel(2,"Event Weights"); | |
1364 | (fIntFlowFlags->GetXaxis())->SetBinLabel(3,"Corrected for NUA?"); | |
1365 | fIntFlowList->Add(fIntFlowFlags); | |
1366 | ||
1367 | // b) Book event-by-event quantities: | |
1368 | // Re[Q_{m*n,k}], Im[Q_{m*n,k}] and S_{p,k}^M: | |
1369 | fReQ = new TMatrixD(4,9); | |
1370 | fImQ = new TMatrixD(4,9); | |
1371 | fSMpk = new TMatrixD(8,9); | |
1372 | // average correlations <2>, <4>, <6> and <8> for single event (bining is the same as in fIntFlowCorrelationsPro and fIntFlowCorrelationsHist): | |
1373 | TString intFlowCorrelationsEBEName = "fIntFlowCorrelationsEBE"; | |
1374 | intFlowCorrelationsEBEName += fAnalysisLabel->Data(); | |
1375 | fIntFlowCorrelationsEBE = new TH1D(intFlowCorrelationsEBEName.Data(),intFlowCorrelationsEBEName.Data(),4,0,4); | |
1376 | // weights for average correlations <2>, <4>, <6> and <8> for single event: | |
1377 | TString intFlowEventWeightsForCorrelationsEBEName = "fIntFlowEventWeightsForCorrelationsEBE"; | |
1378 | intFlowEventWeightsForCorrelationsEBEName += fAnalysisLabel->Data(); | |
1379 | fIntFlowEventWeightsForCorrelationsEBE = new TH1D(intFlowEventWeightsForCorrelationsEBEName.Data(),intFlowEventWeightsForCorrelationsEBEName.Data(),4,0,4); | |
1380 | // average all correlations for single event (bining is the same as in fIntFlowCorrelationsAllPro and fIntFlowCorrelationsAllHist): | |
1381 | TString intFlowCorrelationsAllEBEName = "fIntFlowCorrelationsAllEBE"; | |
1382 | intFlowCorrelationsAllEBEName += fAnalysisLabel->Data(); | |
1383 | fIntFlowCorrelationsAllEBE = new TH1D(intFlowCorrelationsAllEBEName.Data(),intFlowCorrelationsAllEBEName.Data(),32,0,32); | |
1384 | // average correction terms for non-uniform acceptance for single event | |
1385 | // (binning is the same as in fIntFlowCorrectionTermsForNUAPro[2] and fIntFlowCorrectionTermsForNUAHist[2]): | |
1386 | TString fIntFlowCorrectionTermsForNUAEBEName = "fIntFlowCorrectionTermsForNUAEBE"; | |
1387 | fIntFlowCorrectionTermsForNUAEBEName += fAnalysisLabel->Data(); | |
1388 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1389 | { | |
1390 | fIntFlowCorrectionTermsForNUAEBE[sc] = new TH1D(Form("%s: %s terms",fIntFlowCorrectionTermsForNUAEBEName.Data(),sinCosFlag[sc].Data()),Form("Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),10,0,10); | |
1391 | } | |
1392 | ||
1393 | // c) Book profiles: // to be improved (comment) | |
1394 | // profile to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8: | |
1395 | TString avMultiplicityName = "fAvMultiplicity"; | |
1396 | avMultiplicityName += fAnalysisLabel->Data(); | |
1397 | fAvMultiplicity = new TProfile(avMultiplicityName.Data(),"Average Multiplicities of RPs",9,0,9); | |
1398 | fAvMultiplicity->SetTickLength(-0.01,"Y"); | |
1399 | fAvMultiplicity->SetMarkerStyle(25); | |
1400 | fAvMultiplicity->SetLabelSize(0.05); | |
1401 | fAvMultiplicity->SetLabelOffset(0.02,"Y"); | |
1402 | fAvMultiplicity->SetYTitle("Average Multiplicity"); | |
1403 | (fAvMultiplicity->GetXaxis())->SetBinLabel(1,"all evts"); | |
1404 | (fAvMultiplicity->GetXaxis())->SetBinLabel(2,"n_{RP} #geq 1"); | |
1405 | (fAvMultiplicity->GetXaxis())->SetBinLabel(3,"n_{RP} #geq 2"); | |
1406 | (fAvMultiplicity->GetXaxis())->SetBinLabel(4,"n_{RP} #geq 3"); | |
1407 | (fAvMultiplicity->GetXaxis())->SetBinLabel(5,"n_{RP} #geq 4"); | |
1408 | (fAvMultiplicity->GetXaxis())->SetBinLabel(6,"n_{RP} #geq 5"); | |
1409 | (fAvMultiplicity->GetXaxis())->SetBinLabel(7,"n_{RP} #geq 6"); | |
1410 | (fAvMultiplicity->GetXaxis())->SetBinLabel(8,"n_{RP} #geq 7"); | |
1411 | (fAvMultiplicity->GetXaxis())->SetBinLabel(9,"n_{RP} #geq 8"); | |
1412 | fIntFlowProfiles->Add(fAvMultiplicity); | |
1413 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with wrong errors!): | |
1414 | TString intFlowCorrelationsProName = "fIntFlowCorrelationsPro"; | |
1415 | intFlowCorrelationsProName += fAnalysisLabel->Data(); | |
1416 | fIntFlowCorrelationsPro = new TProfile(intFlowCorrelationsProName.Data(),"Average correlations for all events",4,0,4,"s"); | |
1417 | fIntFlowCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1418 | fIntFlowCorrelationsPro->SetMarkerStyle(25); | |
1419 | fIntFlowCorrelationsPro->SetLabelSize(0.06); | |
1420 | fIntFlowCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
1421 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<2>>"); | |
1422 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<4>>"); | |
1423 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(3,"<<6>>"); | |
1424 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(4,"<<8>>"); | |
1425 | fIntFlowProfiles->Add(fIntFlowCorrelationsPro); | |
1426 | // averaged all correlations for all events (with wrong errors!): | |
1427 | TString intFlowCorrelationsAllProName = "fIntFlowCorrelationsAllPro"; | |
1428 | intFlowCorrelationsAllProName += fAnalysisLabel->Data(); | |
1429 | fIntFlowCorrelationsAllPro = new TProfile(intFlowCorrelationsAllProName.Data(),"Average correlations for all events",32,0,32,"s"); | |
1430 | fIntFlowCorrelationsAllPro->SetTickLength(-0.01,"Y"); | |
1431 | fIntFlowCorrelationsAllPro->SetMarkerStyle(25); | |
1432 | fIntFlowCorrelationsAllPro->SetLabelSize(0.03); | |
1433 | fIntFlowCorrelationsAllPro->SetLabelOffset(0.01,"Y"); | |
1434 | // 2-p correlations: | |
1435 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}"); | |
1436 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}"); | |
1437 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}"); | |
1438 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}"); | |
1439 | // 3-p correlations: | |
1440 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}"); | |
1441 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}"); | |
1442 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}"); | |
1443 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}"); | |
1444 | // 4-p correlations: | |
1445 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}"); | |
1446 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}"); | |
1447 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}"); | |
1448 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}"); | |
1449 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}"); | |
1450 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}"); | |
1451 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}"); | |
1452 | // 5-p correlations: | |
1453 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}"); | |
1454 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}"); | |
1455 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}"); | |
1456 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}"); | |
1457 | // 6-p correlations: | |
1458 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}"); | |
1459 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}"); | |
1460 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}"); | |
1461 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}"); | |
1462 | // 7-p correlations: | |
1463 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}"); | |
1464 | // 8-p correlations: | |
1465 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}"); | |
1466 | fIntFlowProfiles->Add(fIntFlowCorrelationsAllPro); | |
1467 | // when particle weights are used some extra correlations appear: | |
1468 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
1469 | { | |
1470 | TString intFlowExtraCorrelationsProName = "fIntFlowExtraCorrelationsPro"; | |
1471 | intFlowExtraCorrelationsProName += fAnalysisLabel->Data(); | |
1472 | fIntFlowExtraCorrelationsPro = new TProfile(intFlowExtraCorrelationsProName.Data(),"Average extra correlations for all events",100,0,100,"s"); | |
1473 | fIntFlowExtraCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1474 | fIntFlowExtraCorrelationsPro->SetMarkerStyle(25); | |
1475 | fIntFlowExtraCorrelationsPro->SetLabelSize(0.03); | |
1476 | fIntFlowExtraCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
1477 | // extra 2-p correlations: | |
1478 | (fIntFlowExtraCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<w1^3 w2 cos(n*(phi1-phi2))>>"); | |
1479 | (fIntFlowExtraCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<w1 w2 w3^2 cos(n*(phi1-phi2))>>"); | |
1480 | // ... | |
1481 | fIntFlowProfiles->Add(fIntFlowExtraCorrelationsPro); | |
1482 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
1483 | // average product of correlations <2>, <4>, <6> and <8>: | |
1484 | TString intFlowProductOfCorrelationsProName = "fIntFlowProductOfCorrelationsPro"; | |
1485 | intFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
1486 | fIntFlowProductOfCorrelationsPro = new TProfile(intFlowProductOfCorrelationsProName.Data(),"Average products of correlations",6,0,6); | |
1487 | fIntFlowProductOfCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1488 | fIntFlowProductOfCorrelationsPro->SetMarkerStyle(25); | |
1489 | fIntFlowProductOfCorrelationsPro->SetLabelSize(0.05); | |
1490 | fIntFlowProductOfCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
1491 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<2><4>>"); | |
1492 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<2><6>>"); | |
1493 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(3,"<<2><8>>"); | |
1494 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(4,"<<4><6>>"); | |
1495 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(5,"<<4><8>>"); | |
1496 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(6,"<<6><8>>"); | |
1497 | fIntFlowProfiles->Add(fIntFlowProductOfCorrelationsPro); | |
1498 | // average correction terms for non-uniform acceptance (with wrong errors!): | |
1499 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1500 | { | |
1501 | TString intFlowCorrectionTermsForNUAProName = "fIntFlowCorrectionTermsForNUAPro"; | |
1502 | intFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
1503 | fIntFlowCorrectionTermsForNUAPro[sc] = new TProfile(Form("%s: %s terms",intFlowCorrectionTermsForNUAProName.Data(),sinCosFlag[sc].Data()),Form("Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),10,0,10,"s"); | |
1504 | fIntFlowCorrectionTermsForNUAPro[sc]->SetTickLength(-0.01,"Y"); | |
1505 | fIntFlowCorrectionTermsForNUAPro[sc]->SetMarkerStyle(25); | |
1506 | fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelSize(0.03); | |
1507 | fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelOffset(0.01,"Y"); | |
1508 | // 1-particle terms: | |
1509 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(1,Form("<<%s(n(phi1))>>",sinCosFlag[sc].Data())); | |
1510 | // 2-particle terms: | |
1511 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(2,Form("<<%s(n(phi1+phi2))>>",sinCosFlag[sc].Data())); | |
1512 | // 3-particle terms: | |
1513 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(3,Form("<<%s(n(phi1-phi2-phi3))>>",sinCosFlag[sc].Data())); | |
1514 | // ... | |
1515 | fIntFlowProfiles->Add(fIntFlowCorrectionTermsForNUAPro[sc]); | |
1516 | } // end of for(Int_t sc=0;sc<2;sc++) | |
1517 | ||
1518 | // d) Book histograms holding the final results: | |
1519 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with correct errors!): | |
1520 | TString intFlowCorrelationsHistName = "fIntFlowCorrelationsHist"; | |
1521 | intFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
1522 | fIntFlowCorrelationsHist = new TH1D(intFlowCorrelationsHistName.Data(),"Average correlations for all events",4,0,4); | |
1523 | fIntFlowCorrelationsHist->SetTickLength(-0.01,"Y"); | |
1524 | fIntFlowCorrelationsHist->SetMarkerStyle(25); | |
1525 | fIntFlowCorrelationsHist->SetLabelSize(0.06); | |
1526 | fIntFlowCorrelationsHist->SetLabelOffset(0.01,"Y"); | |
1527 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(1,"<<2>>"); | |
1528 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(2,"<<4>>"); | |
1529 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(3,"<<6>>"); | |
1530 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(4,"<<8>>"); | |
1531 | fIntFlowResults->Add(fIntFlowCorrelationsHist); | |
1532 | // average all correlations for all events (with correct errors!): | |
1533 | TString intFlowCorrelationsAllHistName = "fIntFlowCorrelationsAllHist"; | |
1534 | intFlowCorrelationsAllHistName += fAnalysisLabel->Data(); | |
1535 | fIntFlowCorrelationsAllHist = new TH1D(intFlowCorrelationsAllHistName.Data(),"Average correlations for all events",32,0,32); | |
1536 | fIntFlowCorrelationsAllHist->SetTickLength(-0.01,"Y"); | |
1537 | fIntFlowCorrelationsAllHist->SetMarkerStyle(25); | |
1538 | fIntFlowCorrelationsAllHist->SetLabelSize(0.03); | |
1539 | fIntFlowCorrelationsAllHist->SetLabelOffset(0.01,"Y"); | |
1540 | // 2-p correlations: | |
1541 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}"); | |
1542 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}"); | |
1543 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}"); | |
1544 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}"); | |
1545 | // 3-p correlations: | |
1546 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}"); | |
1547 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}"); | |
1548 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}"); | |
1549 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}"); | |
1550 | // 4-p correlations: | |
1551 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}"); | |
1552 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}"); | |
1553 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}"); | |
1554 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}"); | |
1555 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}"); | |
1556 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}"); | |
1557 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}"); | |
1558 | // 5-p correlations: | |
1559 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}"); | |
1560 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}"); | |
1561 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}"); | |
1562 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}"); | |
1563 | // 6-p correlations: | |
1564 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}"); | |
1565 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}"); | |
1566 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}"); | |
1567 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}"); | |
1568 | // 7-p correlations: | |
1569 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}"); | |
1570 | // 8-p correlations: | |
1571 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}"); | |
1572 | fIntFlowResults->Add(fIntFlowCorrelationsAllHist); | |
1573 | // average correction terms for non-uniform acceptance (with correct errors!): | |
1574 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1575 | { | |
1576 | TString intFlowCorrectionTermsForNUAHistName = "fIntFlowCorrectionTermsForNUAHist"; | |
1577 | intFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
1578 | fIntFlowCorrectionTermsForNUAHist[sc] = new TH1D(Form("%s: %s terms",intFlowCorrectionTermsForNUAHistName.Data(),sinCosFlag[sc].Data()),Form("Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),10,0,10); | |
1579 | fIntFlowCorrectionTermsForNUAHist[sc]->SetTickLength(-0.01,"Y"); | |
1580 | fIntFlowCorrectionTermsForNUAHist[sc]->SetMarkerStyle(25); | |
1581 | fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelSize(0.03); | |
1582 | fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelOffset(0.01,"Y"); | |
1583 | // ......................................................................... | |
1584 | // 1-p terms: | |
1585 | (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(1,Form("%s(n(#phi_{1}))>",sinCosFlag[sc].Data())); | |
1586 | // 2-p terms: | |
1587 | // 3-p terms: | |
1588 | // ... | |
1589 | // ......................................................................... | |
1590 | fIntFlowResults->Add(fIntFlowCorrectionTermsForNUAHist[sc]); | |
1591 | } // end of for(Int_t sc=0;sc<2;sc++) | |
1592 | // covariances (multiplied with weight dependent prefactor): | |
1593 | TString intFlowCovariancesName = "fIntFlowCovariances"; | |
1594 | intFlowCovariancesName += fAnalysisLabel->Data(); | |
1595 | fIntFlowCovariances = new TH1D(intFlowCovariancesName.Data(),"Covariances (multiplied with weight dependent prefactor)",6,0,6); | |
1596 | fIntFlowCovariances->SetLabelSize(0.04); | |
1597 | fIntFlowCovariances->SetMarkerStyle(25); | |
1598 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(1,"Cov(<2>,<4>)"); | |
1599 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(2,"Cov(<2>,<6>)"); | |
1600 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(3,"Cov(<2>,<8>)"); | |
1601 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(4,"Cov(<4>,<6>)"); | |
1602 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(5,"Cov(<4>,<8>)"); | |
1603 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(6,"Cov(<6>,<8>)"); | |
1604 | fIntFlowResults->Add(fIntFlowCovariances); | |
1605 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>: | |
1606 | TString intFlowSumOfEventWeightsName = "fIntFlowSumOfEventWeights"; | |
1607 | intFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
1608 | for(Int_t power=0;power<2;power++) | |
1609 | { | |
1610 | fIntFlowSumOfEventWeights[power] = new TH1D(Form("%s: %s",intFlowSumOfEventWeightsName.Data(),powerFlag[power].Data()),Form("Sum of %s event weights for correlations",powerFlag[power].Data()),4,0,4); | |
1611 | fIntFlowSumOfEventWeights[power]->SetLabelSize(0.05); | |
1612 | fIntFlowSumOfEventWeights[power]->SetMarkerStyle(25); | |
1613 | if(power == 0) | |
1614 | { | |
1615 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>}"); | |
1616 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<4>}"); | |
1617 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<6>}"); | |
1618 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<8>}"); | |
1619 | } else if (power == 1) | |
1620 | { | |
1621 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>}^{2}"); | |
1622 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<4>}^{2}"); | |
1623 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<6>}^{2}"); | |
1624 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<8>}^{2}"); | |
1625 | } | |
1626 | fIntFlowResults->Add(fIntFlowSumOfEventWeights[power]); | |
1627 | } | |
1628 | // sum of products of event weights for correlations <2>, <4>, <6> and <8>: | |
1629 | TString intFlowSumOfProductOfEventWeightsName = "fIntFlowSumOfProductOfEventWeights"; | |
1630 | intFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
1631 | fIntFlowSumOfProductOfEventWeights = new TH1D(intFlowSumOfProductOfEventWeightsName.Data(),"Sum of product of event weights for correlations",6,0,6); | |
1632 | fIntFlowSumOfProductOfEventWeights->SetLabelSize(0.05); | |
1633 | fIntFlowSumOfProductOfEventWeights->SetMarkerStyle(25); | |
1634 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>} w_{<4>}"); | |
1635 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<2>} w_{<6>}"); | |
1636 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<2>} w_{<8>}"); | |
1637 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<4>} w_{<6>}"); | |
1638 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(5,"#sum_{i=1}^{N} w_{<4>} w_{<8>}"); | |
1639 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(6,"#sum_{i=1}^{N} w_{<6>} w_{<8>}"); | |
1640 | fIntFlowResults->Add(fIntFlowSumOfProductOfEventWeights); | |
1641 | // final results for integrated Q-cumulants: | |
1642 | TString intFlowQcumulantsName = "fIntFlowQcumulants"; | |
1643 | intFlowQcumulantsName += fAnalysisLabel->Data(); | |
1644 | fIntFlowQcumulants = new TH1D(intFlowQcumulantsName.Data(),"Integrated Q-cumulants",4,0,4); | |
1645 | fIntFlowQcumulants->SetLabelSize(0.05); | |
1646 | fIntFlowQcumulants->SetMarkerStyle(25); | |
1647 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(1,"QC{2}"); | |
1648 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(2,"QC{4}"); | |
1649 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(3,"QC{6}"); | |
1650 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(4,"QC{8}"); | |
1651 | fIntFlowResults->Add(fIntFlowQcumulants); | |
1652 | // final integrated flow estimates from Q-cumulants: | |
1653 | TString intFlowName = "fIntFlow"; | |
1654 | intFlowName += fAnalysisLabel->Data(); | |
1655 | // integrated flow from Q-cumulants: | |
1656 | fIntFlow = new TH1D(intFlowName.Data(),"Integrated flow estimates from Q-cumulants",4,0,4); | |
1657 | fIntFlow->SetLabelSize(0.05); | |
1658 | fIntFlow->SetMarkerStyle(25); | |
1659 | (fIntFlow->GetXaxis())->SetBinLabel(1,"v_{2}{2,QC}"); | |
1660 | (fIntFlow->GetXaxis())->SetBinLabel(2,"v_{2}{4,QC}"); | |
1661 | (fIntFlow->GetXaxis())->SetBinLabel(3,"v_{2}{6,QC}"); | |
1662 | (fIntFlow->GetXaxis())->SetBinLabel(4,"v_{2}{8,QC}"); | |
1663 | fIntFlowResults->Add(fIntFlow); | |
1664 | ||
1665 | /* // to be improved (removed): | |
1666 | // final average weighted multi-particle correlations for all events calculated from Q-vectors | |
1667 | fQCorrelations[1] = new TProfile("Weighted correlations","final average multi-particle correlations from weighted Q-vectors",200,0,200,"s"); | |
1668 | fQCorrelations[1]->SetTickLength(-0.01,"Y"); | |
1669 | fQCorrelations[1]->SetMarkerStyle(25); | |
1670 | fQCorrelations[1]->SetLabelSize(0.03); | |
1671 | fQCorrelations[1]->SetLabelOffset(0.01,"Y"); | |
1672 | // 2-particle correlations: | |
1673 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(1,"<w_{1}w_{2}cos(n(#phi_{1}-#phi_{2}))>"); | |
1674 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(2,"<w_{1}^{2}w_{2}^{2}cos(2n(#phi_{1}-#phi_{2}))>"); | |
1675 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(3,"<w_{1}^{3}w_{2}^{3}cos(3n(#phi_{1}-#phi_{2}))>"); | |
1676 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(4,"<w_{1}^{4}w_{2}^{4}cos(4n(#phi_{1}-#phi_{2}))>"); | |
1677 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(5,"<w_{1}^{3}w_{2}cos(n(#phi_{1}-#phi_{2}))>"); | |
1678 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(6,"<w_{1}^{2}w_{2}w_{3}cos(n(#phi_{1}-#phi_{2}))>"); | |
1679 | // 3-particle correlations: | |
1680 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(21,"<w_{1}w_{2}w_{3}^{2}cos(n(2#phi_{1}-#phi_{2}-#phi_{3}))>"); | |
1681 | // 4-particle correlations: | |
1682 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(41,"<w_{1}w_{2}w_{3}w_{4}cos(n(#phi_{1}+#phi_{2}-#phi_{3}-#phi_{4}))>"); | |
1683 | // add fQCorrelations[1] to the list fIntFlowList: | |
1684 | fIntFlowList->Add(fQCorrelations[1]); | |
1685 | */ | |
1686 | ||
1687 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow() | |
1688 | ||
1689 | ||
1690 | //================================================================================================================================ | |
1691 | ||
1692 | ||
1693 | void AliFlowAnalysisWithQCumulants::InitializeArraysForNestedLoops() | |
1694 | { | |
1695 | // Initialize arrays of all objects relevant for calculations with nested loops. | |
1696 | ||
1697 | // integrated flow: | |
1698 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1699 | { | |
1700 | fIntFlowDirectCorrectionTermsForNUA[sc] = NULL; | |
1701 | } | |
1702 | ||
1703 | // differential flow: | |
1704 | // correlations: | |
1705 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
1706 | { | |
1707 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
1708 | { | |
1709 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
1710 | { | |
1711 | fDiffFlowDirectCorrelations[t][pe][ci] = NULL; | |
1712 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
1713 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
1714 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
1715 | // correction terms for non-uniform acceptance: | |
1716 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
1717 | { | |
1718 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
1719 | { | |
1720 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1721 | { | |
1722 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
1723 | { | |
1724 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] = NULL; | |
1725 | } | |
1726 | } | |
1727 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
1728 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
1729 | ||
1730 | ||
1731 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForNestedLoops() | |
1732 | ||
1733 | ||
1734 | //================================================================================================================================ | |
1735 | ||
1736 | ||
1737 | void AliFlowAnalysisWithQCumulants::BookEverythingForNestedLoops() | |
1738 | { | |
1739 | // Book all objects relevant for calculations with nested loops. | |
1740 | ||
1741 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
1742 | TString typeFlag[2] = {"RP","POI"}; // to be improved (should I promote this to data members?) | |
1743 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; // to be improved (should I promote this to data members?) | |
1744 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; // to be improved (should I promote this to data members?) | |
1745 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
1746 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
1747 | ||
1748 | TString evaluateNestedLoopsName = "fEvaluateNestedLoops"; | |
1749 | evaluateNestedLoopsName += fAnalysisLabel->Data(); | |
1750 | fEvaluateNestedLoops = new TProfile(evaluateNestedLoopsName.Data(),"Flags for nested loops",4,0,4); | |
1751 | fEvaluateNestedLoops->SetLabelSize(0.03); | |
1752 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(1,"fEvaluateIntFlowNestedLoops"); | |
1753 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(2,"fEvaluateDiffFlowNestedLoops"); | |
1754 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(3,"fCrossCheckInPtBinNo"); | |
1755 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(4,"fCrossCheckInEtaBinNo"); | |
1756 | fEvaluateNestedLoops->Fill(0.5,(Int_t)fEvaluateIntFlowNestedLoops); | |
1757 | fEvaluateNestedLoops->Fill(1.5,(Int_t)fEvaluateDiffFlowNestedLoops); | |
1758 | fEvaluateNestedLoops->Fill(2.5,fCrossCheckInPtBinNo); | |
1759 | fEvaluateNestedLoops->Fill(3.5,fCrossCheckInEtaBinNo); | |
1760 | fNestedLoopsList->Add(fEvaluateNestedLoops); | |
1761 | // nested loops for integrated flow: | |
1762 | if(fEvaluateIntFlowNestedLoops) | |
1763 | { | |
1764 | // correlations: | |
1765 | TString intFlowDirectCorrelationsName = "fIntFlowDirectCorrelations"; | |
1766 | intFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
1767 | fIntFlowDirectCorrelations = new TProfile(intFlowDirectCorrelationsName.Data(),"Multiparticle correlations calculated with nested loops (for int. flow)",32,0,32,"s"); | |
1768 | fNestedLoopsList->Add(fIntFlowDirectCorrelations); | |
1769 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
1770 | { | |
1771 | TString intFlowExtraDirectCorrelationsName = "fIntFlowExtraDirectCorrelations"; | |
1772 | intFlowExtraDirectCorrelationsName += fAnalysisLabel->Data(); | |
1773 | fIntFlowExtraDirectCorrelations = new TProfile(intFlowExtraDirectCorrelationsName.Data(),"Extra multiparticle correlations calculated with nested loops (for int. flow)",100,0,100,"s"); | |
1774 | fNestedLoopsList->Add(fIntFlowExtraDirectCorrelations); | |
1775 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
1776 | // correction terms for non-uniform acceptance: | |
1777 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1778 | { | |
1779 | TString intFlowDirectCorrectionTermsForNUAName = "fIntFlowDirectCorrectionTermsForNUA"; | |
1780 | intFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
1781 | fIntFlowDirectCorrectionTermsForNUA[sc] = new TProfile(Form("%s: %s terms",intFlowDirectCorrectionTermsForNUAName.Data(),sinCosFlag[sc].Data()),Form("Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),10,0,10,"s"); | |
1782 | fNestedLoopsList->Add(fIntFlowDirectCorrectionTermsForNUA[sc]); | |
1783 | } // end of for(Int_t sc=0;sc<2;sc++) | |
91d019b8 | 1784 | } // end of if(fEvaluateIntFlowNestedLoops) |
ae09553c | 1785 | |
1786 | // nested loops for differential flow: | |
1787 | if(fEvaluateDiffFlowNestedLoops) | |
1788 | { | |
1789 | // reduced correlations: | |
1790 | TString diffFlowDirectCorrelationsName = "fDiffFlowDirectCorrelations"; | |
1791 | diffFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
1792 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
1793 | { | |
1794 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
1795 | { | |
1796 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
1797 | { | |
1798 | // reduced correlations: | |
1799 | fDiffFlowDirectCorrelations[t][pe][rci] = new TProfile(Form("%s, %s, %s, %s",diffFlowDirectCorrelationsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),Form("%s, %s, %s, %s",diffFlowDirectCorrelationsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),1,lowerPtEtaEdge[pe],upperPtEtaEdge[pe],"s"); | |
1800 | fDiffFlowDirectCorrelations[t][pe][rci]->SetXTitle(ptEtaFlag[pe].Data()); | |
1801 | fNestedLoopsList->Add(fDiffFlowDirectCorrelations[t][pe][rci]); // to be improved (add dedicated list to hold reduced correlations) | |
1802 | } // end of for(Int_t rci=0;rci<4;rci++) // correlation index | |
1803 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
1804 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
91d019b8 | 1805 | } // end of if(fEvaluateDiffFlowNestedLoops) |
ae09553c | 1806 | // correction terms for non-uniform acceptance: |
1807 | TString diffFlowDirectCorrectionTermsForNUAName = "fDiffFlowDirectCorrectionTermsForNUA"; | |
1808 | diffFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
1809 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
1810 | { | |
1811 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
1812 | { | |
1813 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
1814 | { | |
1815 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
1816 | { | |
1817 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] = new TProfile(Form("%s, %s, %s, %s, cti = %d",diffFlowDirectCorrectionTermsForNUAName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),Form("%s, %s, %s, %s, cti = %d",diffFlowDirectCorrectionTermsForNUAName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),1,lowerPtEtaEdge[pe],upperPtEtaEdge[pe],"s"); | |
1818 | fNestedLoopsList->Add(fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]); | |
1819 | } | |
1820 | } | |
1821 | } | |
1822 | } | |
1823 | ||
1824 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForNestedLoops() | |
1825 | ||
1826 | ||
1827 | //================================================================================================================================ | |
1828 | ||
1829 | ||
1830 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations() | |
1831 | { | |
1832 | // calculate all correlations needed for integrated flow | |
1833 | ||
1834 | // multiplicity: | |
1835 | Double_t dMult = (*fSMpk)(0,0); | |
1836 | ||
1837 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
1838 | Double_t dReQ1n = (*fReQ)(0,0); | |
1839 | Double_t dReQ2n = (*fReQ)(1,0); | |
1840 | Double_t dReQ3n = (*fReQ)(2,0); | |
1841 | Double_t dReQ4n = (*fReQ)(3,0); | |
1842 | Double_t dImQ1n = (*fImQ)(0,0); | |
1843 | Double_t dImQ2n = (*fImQ)(1,0); | |
1844 | Double_t dImQ3n = (*fImQ)(2,0); | |
1845 | Double_t dImQ4n = (*fImQ)(3,0); | |
1846 | ||
1847 | // real and imaginary parts of some expressions involving various combinations of Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
1848 | // (these expression appear in the Eqs. for the multi-particle correlations bellow) | |
1849 | ||
1850 | // Re[Q_{2n} Q_{n}^* Q_{n}^*] | |
1851 | Double_t reQ2nQ1nstarQ1nstar = pow(dReQ1n,2.)*dReQ2n + 2.*dReQ1n*dImQ1n*dImQ2n - pow(dImQ1n,2.)*dReQ2n; | |
1852 | ||
1853 | // Im[Q_{2n} Q_{n}^* Q_{n}^*] | |
1854 | //Double_t imQ2nQ1nstarQ1nstar = pow(dReQ1n,2.)*dImQ2n-2.*dReQ1n*dImQ1n*dReQ2n-pow(dImQ1n,2.)*dImQ2n; | |
1855 | ||
1856 | // Re[Q_{n} Q_{n} Q_{2n}^*] = Re[Q_{2n} Q_{n}^* Q_{n}^*] | |
1857 | Double_t reQ1nQ1nQ2nstar = reQ2nQ1nstarQ1nstar; | |
1858 | ||
1859 | // Re[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
1860 | Double_t reQ3nQ1nQ2nstarQ2nstar = (pow(dReQ2n,2.)-pow(dImQ2n,2.))*(dReQ3n*dReQ1n-dImQ3n*dImQ1n) | |
1861 | + 2.*dReQ2n*dImQ2n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n); | |
1862 | ||
1863 | // Im[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
1864 | //Double_t imQ3nQ1nQ2nstarQ2nstar = calculate and implement this (deleteMe) | |
1865 | ||
1866 | // Re[Q_{2n} Q_{2n} Q_{3n}^* Q_{1n}^*] = Re[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
1867 | Double_t reQ2nQ2nQ3nstarQ1nstar = reQ3nQ1nQ2nstarQ2nstar; | |
1868 | ||
1869 | // Re[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
1870 | Double_t reQ4nQ2nstarQ2nstar = pow(dReQ2n,2.)*dReQ4n+2.*dReQ2n*dImQ2n*dImQ4n-pow(dImQ2n,2.)*dReQ4n; | |
1871 | ||
1872 | // Im[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
1873 | //Double_t imQ4nQ2nstarQ2nstar = calculate and implement this (deleteMe) | |
1874 | ||
1875 | // Re[Q_{2n} Q_{2n} Q_{4n}^*] = Re[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
1876 | Double_t reQ2nQ2nQ4nstar = reQ4nQ2nstarQ2nstar; | |
1877 | ||
1878 | // Re[Q_{4n} Q_{3n}^* Q_{n}^*] | |
1879 | Double_t reQ4nQ3nstarQ1nstar = dReQ4n*(dReQ3n*dReQ1n-dImQ3n*dImQ1n)+dImQ4n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n); | |
1880 | ||
1881 | // Re[Q_{3n} Q_{n} Q_{4n}^*] = Re[Q_{4n} Q_{3n}^* Q_{n}^*] | |
1882 | Double_t reQ3nQ1nQ4nstar = reQ4nQ3nstarQ1nstar; | |
1883 | ||
1884 | // Im[Q_{4n} Q_{3n}^* Q_{n}^*] | |
1885 | //Double_t imQ4nQ3nstarQ1nstar = calculate and implement this (deleteMe) | |
1886 | ||
1887 | // Re[Q_{3n} Q_{2n}^* Q_{n}^*] | |
1888 | Double_t reQ3nQ2nstarQ1nstar = dReQ3n*dReQ2n*dReQ1n-dReQ3n*dImQ2n*dImQ1n+dImQ3n*dReQ2n*dImQ1n | |
1889 | + dImQ3n*dImQ2n*dReQ1n; | |
1890 | ||
1891 | // Re[Q_{2n} Q_{n} Q_{3n}^*] = Re[Q_{3n} Q_{2n}^* Q_{n}^*] | |
1892 | Double_t reQ2nQ1nQ3nstar = reQ3nQ2nstarQ1nstar; | |
1893 | ||
1894 | // Im[Q_{3n} Q_{2n}^* Q_{n}^*] | |
1895 | //Double_t imQ3nQ2nstarQ1nstar; //calculate and implement this (deleteMe) | |
1896 | ||
1897 | // Re[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
1898 | Double_t reQ3nQ1nstarQ1nstarQ1nstar = dReQ3n*pow(dReQ1n,3)-3.*dReQ1n*dReQ3n*pow(dImQ1n,2) | |
1899 | + 3.*dImQ1n*dImQ3n*pow(dReQ1n,2)-dImQ3n*pow(dImQ1n,3); | |
1900 | ||
1901 | // Im[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
1902 | //Double_t imQ3nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
1903 | ||
1904 | // |Q_{2n}|^2 |Q_{n}|^2 | |
1905 | Double_t dQ2nQ1nQ2nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)); | |
1906 | ||
1907 | // Re[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
1908 | Double_t reQ4nQ2nstarQ1nstarQ1nstar = (dReQ4n*dReQ2n+dImQ4n*dImQ2n)*(pow(dReQ1n,2)-pow(dImQ1n,2)) | |
1909 | + 2.*dReQ1n*dImQ1n*(dImQ4n*dReQ2n-dReQ4n*dImQ2n); | |
1910 | ||
1911 | // Im[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
1912 | //Double_t imQ4nQ2nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
1913 | ||
1914 | // Re[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
1915 | Double_t reQ2nQ1nQ1nstarQ1nstarQ1nstar = (dReQ2n*dReQ1n-dImQ2n*dImQ1n)*(pow(dReQ1n,3)-3.*dReQ1n*pow(dImQ1n,2)) | |
1916 | + (dReQ2n*dImQ1n+dReQ1n*dImQ2n)*(3.*dImQ1n*pow(dReQ1n,2)-pow(dImQ1n,3)); | |
1917 | ||
1918 | // Im[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
1919 | //Double_t imQ2nQ1nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
1920 | ||
1921 | // Re[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
1922 | Double_t reQ2nQ2nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
1923 | * (dReQ2n*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) + 2.*dImQ2n*dReQ1n*dImQ1n); | |
1924 | ||
1925 | // Im[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
1926 | //Double_t imQ2nQ2nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
1927 | // * (dImQ2n*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) - 2.*dReQ2n*dReQ1n*dImQ1n); | |
1928 | ||
1929 | // Re[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
1930 | Double_t reQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(dReQ1n,4.)*dReQ4n-6.*pow(dReQ1n,2.)*dReQ4n*pow(dImQ1n,2.) | |
1931 | + pow(dImQ1n,4.)*dReQ4n+4.*pow(dReQ1n,3.)*dImQ1n*dImQ4n | |
1932 | - 4.*pow(dImQ1n,3.)*dReQ1n*dImQ4n; | |
1933 | ||
1934 | // Im[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
1935 | //Double_t imQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(dReQ1n,4.)*dImQ4n-6.*pow(dReQ1n,2.)*dImQ4n*pow(dImQ1n,2.) | |
1936 | // + pow(dImQ1n,4.)*dImQ4n+4.*pow(dImQ1n,3.)*dReQ1n*dReQ4n | |
1937 | // - 4.*pow(dReQ1n,3.)*dImQ1n*dReQ4n; | |
1938 | ||
1939 | // Re[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
1940 | Double_t reQ3nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
1941 | * (dReQ1n*dReQ2n*dReQ3n-dReQ3n*dImQ1n*dImQ2n+dReQ2n*dImQ1n*dImQ3n+dReQ1n*dImQ2n*dImQ3n); | |
1942 | ||
1943 | // Im[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
1944 | //Double_t imQ3nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
1945 | // * (-dReQ2n*dReQ3n*dImQ1n-dReQ1n*dReQ3n*dImQ2n+dReQ1n*dReQ2n*dImQ3n-dImQ1n*dImQ2n*dImQ3n); | |
1946 | ||
1947 | ||
1948 | // Re[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
1949 | Double_t reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)*dReQ2n-2.*dReQ1n*dReQ2n*dImQ1n-dReQ2n*pow(dImQ1n,2.) | |
1950 | + dImQ2n*pow(dReQ1n,2.)+2.*dReQ1n*dImQ1n*dImQ2n-pow(dImQ1n,2.)*dImQ2n) | |
1951 | * (pow(dReQ1n,2.)*dReQ2n+2.*dReQ1n*dReQ2n*dImQ1n-dReQ2n*pow(dImQ1n,2.) | |
1952 | - dImQ2n*pow(dReQ1n,2.)+2.*dReQ1n*dImQ1n*dImQ2n+pow(dImQ1n,2.)*dImQ2n); | |
1953 | ||
1954 | // Im[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
1955 | //Double_t imQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = 2.*(pow(dReQ1n,2.)*dReQ2n-dReQ2n*pow(dImQ1n,2.) | |
1956 | // + 2.*dReQ1n*dImQ1n*dImQ2n)*(pow(dReQ1n,2.)*dImQ2n | |
1957 | // - 2.*dReQ1n*dImQ1n*dReQ2n-pow(dImQ1n,2.)*dImQ2n); | |
1958 | ||
1959 | // Re[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
1960 | Double_t reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
1961 | * (pow(dReQ1n,3.)*dReQ3n-3.*dReQ1n*dReQ3n*pow(dImQ1n,2.) | |
1962 | + 3.*pow(dReQ1n,2.)*dImQ1n*dImQ3n-pow(dImQ1n,3.)*dImQ3n); | |
1963 | ||
1964 | // Im[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
1965 | //Double_t imQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
1966 | // * (pow(dImQ1n,3.)*dReQ3n-3.*dImQ1n*dReQ3n*pow(dReQ1n,2.) | |
1967 | // - 3.*pow(dImQ1n,2.)*dReQ1n*dImQ3n+pow(dReQ1n,3.)*dImQ3n); | |
1968 | ||
1969 | // |Q_{2n}|^2 |Q_{n}|^4 | |
1970 | Double_t dQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))*pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.); | |
1971 | ||
1972 | // Re[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
1973 | Double_t reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
1974 | * (pow(dReQ1n,2.)*dReQ2n-dReQ2n*pow(dImQ1n,2.) | |
1975 | + 2.*dReQ1n*dImQ1n*dImQ2n); | |
1976 | ||
1977 | // Im[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
1978 | //Double_t imQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
1979 | // * (pow(dReQ1n,2.)*dImQ2n-dImQ2n*pow(dImQ1n,2.) | |
1980 | // - 2.*dReQ1n*dReQ2n*dImQ1n); | |
1981 | ||
1982 | ||
1983 | ||
1984 | ||
1985 | // ************************************** | |
1986 | // **** multi-particle correlations: **** | |
1987 | // ************************************** | |
1988 | // | |
1989 | // Remark 1: multi-particle correlations calculated with non-weighted Q-vectors are stored in 1D profile fQCorrelations[0]. // to be improved (wrong profiles) | |
1990 | // Remark 2: binning of fQCorrelations[0] is organized as follows: // to be improved (wrong profiles) | |
1991 | // -------------------------------------------------------------------------------------------------------------------- | |
1992 | // 1st bin: <2>_{1n|1n} = two1n1n = cos(n*(phi1-phi2))> | |
1993 | // 2nd bin: <2>_{2n|2n} = two2n2n = cos(2n*(phi1-phi2))> | |
1994 | // 3rd bin: <2>_{3n|3n} = two3n3n = cos(3n*(phi1-phi2))> | |
1995 | // 4th bin: <2>_{4n|4n} = two4n4n = cos(4n*(phi1-phi2))> | |
1996 | // 5th bin: ---- EMPTY ---- | |
1997 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1n = <cos(n*(2.*phi1-phi2-phi3))> | |
1998 | // 7th bin: <3>_{3n|2n,1n} = three3n2n1n = <cos(n*(3.*phi1-2.*phi2-phi3))> | |
1999 | // 8th bin: <3>_{4n|2n,2n} = three4n2n2n = <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
2000 | // 9th bin: <3>_{4n|3n,1n} = three4n3n1n = <cos(n*(4.*phi1-3.*phi2-phi3))> | |
2001 | // 10th bin: ---- EMPTY ---- | |
2002 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1n = <cos(n*(phi1+phi2-phi3-phi4))> | |
2003 | // 12th bin: <4>_{2n,1n|2n,1n} = four2n1n2n1n = <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
2004 | // 13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n = <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
2005 | // 14th bin: <4>_{3n|1n,1n,1n} = four3n1n1n1n = <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
2006 | // 15th bin: <4>_{3n,1n|3n,1n} = four3n1n3n1n = <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
2007 | // 16th bin: <4>_{3n,1n|2n,2n} = four3n1n2n2n = <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
2008 | // 17th bin: <4>_{4n|2n,1n,1n} = four4n2n1n1n = <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
2009 | // 18th bin: ---- EMPTY ---- | |
2010 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = five2n1n1n1n1n = <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
2011 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = five2n2n2n1n1n = <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
2012 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = five3n1n2n1n1n = <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
2013 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = five4n1n1n1n1n = <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
2014 | // 23rd bin: ---- EMPTY ---- | |
2015 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = six1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2016 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = six2n1n1n2n1n1n = <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
2017 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = six2n2n1n1n1n1n = <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
2018 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = six3n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
2019 | // 28th bin: ---- EMPTY ---- | |
2020 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = seven2n1n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
2021 | // 30th bin: ---- EMPTY ---- | |
2022 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = eight1n1n1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2023 | // -------------------------------------------------------------------------------------------------------------------- | |
2024 | ||
2025 | // 2-particle: | |
2026 | Double_t two1n1n = 0.; // <cos(n*(phi1-phi2))> | |
2027 | Double_t two2n2n = 0.; // <cos(2n*(phi1-phi2))> | |
2028 | Double_t two3n3n = 0.; // <cos(3n*(phi1-phi2))> | |
2029 | Double_t two4n4n = 0.; // <cos(4n*(phi1-phi2))> | |
2030 | ||
2031 | if(dMult>1) | |
2032 | { | |
2033 | two1n1n = (pow(dReQ1n,2.)+pow(dImQ1n,2.)-dMult)/(dMult*(dMult-1.)); | |
2034 | two2n2n = (pow(dReQ2n,2.)+pow(dImQ2n,2.)-dMult)/(dMult*(dMult-1.)); | |
2035 | two3n3n = (pow(dReQ3n,2.)+pow(dImQ3n,2.)-dMult)/(dMult*(dMult-1.)); | |
2036 | two4n4n = (pow(dReQ4n,2.)+pow(dImQ4n,2.)-dMult)/(dMult*(dMult-1.)); | |
2037 | ||
2038 | // average 2-particle correlations for single event: | |
2039 | fIntFlowCorrelationsAllEBE->SetBinContent(1,two1n1n); | |
2040 | fIntFlowCorrelationsAllEBE->SetBinContent(2,two2n2n); | |
2041 | fIntFlowCorrelationsAllEBE->SetBinContent(3,two3n3n); | |
2042 | fIntFlowCorrelationsAllEBE->SetBinContent(4,two4n4n); | |
2043 | ||
2044 | // average 2-particle correlations for all events: | |
2045 | fIntFlowCorrelationsAllPro->Fill(0.5,two1n1n,dMult*(dMult-1.)); | |
2046 | fIntFlowCorrelationsAllPro->Fill(1.5,two2n2n,dMult*(dMult-1.)); | |
2047 | fIntFlowCorrelationsAllPro->Fill(2.5,two3n3n,dMult*(dMult-1.)); | |
2048 | fIntFlowCorrelationsAllPro->Fill(3.5,two4n4n,dMult*(dMult-1.)); | |
2049 | ||
2050 | // store separetately <2> (to be improved: do I really need this?) | |
2051 | fIntFlowCorrelationsEBE->SetBinContent(1,two1n1n); // <2> | |
2052 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(1,dMult*(dMult-1.)); // eW_<2> | |
2053 | fIntFlowCorrelationsPro->Fill(0.5,two1n1n,dMult*(dMult-1.)); | |
2054 | ||
2055 | // distribution of <cos(n*(phi1-phi2))>: | |
2056 | //f2pDistribution->Fill(two1n1n,dMult*(dMult-1.)); | |
2057 | } // end of if(dMult>1) | |
2058 | ||
2059 | // 3-particle: | |
2060 | Double_t three2n1n1n = 0.; // <cos(n*(2.*phi1-phi2-phi3))> | |
2061 | Double_t three3n2n1n = 0.; // <cos(n*(3.*phi1-2.*phi2-phi3))> | |
2062 | Double_t three4n2n2n = 0.; // <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
2063 | Double_t three4n3n1n = 0.; // <cos(n*(4.*phi1-3.*phi2-phi3))> | |
2064 | ||
2065 | if(dMult>2) | |
2066 | { | |
2067 | three2n1n1n = (reQ2nQ1nstarQ1nstar-2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2068 | - (pow(dReQ2n,2.)+pow(dImQ2n,2.))+2.*dMult) | |
2069 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2070 | three3n2n1n = (reQ3nQ2nstarQ1nstar-(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2071 | - (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2072 | - (pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult) | |
2073 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2074 | three4n2n2n = (reQ4nQ2nstarQ2nstar-2.*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2075 | - (pow(dReQ4n,2.)+pow(dImQ4n,2.))+2.*dMult) | |
2076 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2077 | three4n3n1n = (reQ4nQ3nstarQ1nstar-(pow(dReQ4n,2.)+pow(dImQ4n,2.)) | |
2078 | - (pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2079 | - (pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult) | |
2080 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2081 | ||
2082 | // average 3-particle correlations for single event: | |
2083 | fIntFlowCorrelationsAllEBE->SetBinContent(6,three2n1n1n); | |
2084 | fIntFlowCorrelationsAllEBE->SetBinContent(7,three3n2n1n); | |
2085 | fIntFlowCorrelationsAllEBE->SetBinContent(8,three4n2n2n); | |
2086 | fIntFlowCorrelationsAllEBE->SetBinContent(9,three4n3n1n); | |
2087 | ||
2088 | // average 3-particle correlations for all events: | |
2089 | fIntFlowCorrelationsAllPro->Fill(5.5,three2n1n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2090 | fIntFlowCorrelationsAllPro->Fill(6.5,three3n2n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2091 | fIntFlowCorrelationsAllPro->Fill(7.5,three4n2n2n,dMult*(dMult-1.)*(dMult-2.)); | |
2092 | fIntFlowCorrelationsAllPro->Fill(8.5,three4n3n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2093 | } // end of if(dMult>2) | |
2094 | ||
2095 | // 4-particle: | |
2096 | Double_t four1n1n1n1n = 0.; // <cos(n*(phi1+phi2-phi3-phi4))> | |
2097 | Double_t four2n2n2n2n = 0.; // <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
2098 | Double_t four2n1n2n1n = 0.; // <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
2099 | Double_t four3n1n1n1n = 0.; // <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
2100 | Double_t four4n2n1n1n = 0.; // <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
2101 | Double_t four3n1n2n2n = 0.; // <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
2102 | Double_t four3n1n3n1n = 0.; // <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
2103 | ||
2104 | if(dMult>3) | |
2105 | { | |
2106 | four1n1n1n1n = (2.*dMult*(dMult-3.)+pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)-4.*(dMult-2.)*(pow(dReQ1n,2.) | |
2107 | + pow(dImQ1n,2.))-2.*reQ2nQ1nstarQ1nstar+(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2108 | / (dMult*(dMult-1)*(dMult-2.)*(dMult-3.)); | |
2109 | four2n2n2n2n = (2.*dMult*(dMult-3.)+pow((pow(dReQ2n,2.)+pow(dImQ2n,2.)),2.)-4.*(dMult-2.)*(pow(dReQ2n,2.) | |
2110 | + pow(dImQ2n,2.))-2.*reQ4nQ2nstarQ2nstar+(pow(dReQ4n,2.)+pow(dImQ4n,2.))) | |
2111 | / (dMult*(dMult-1)*(dMult-2.)*(dMult-3.)); | |
2112 | four2n1n2n1n = (dQ2nQ1nQ2nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar-2.*reQ2nQ1nstarQ1nstar) | |
2113 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2114 | - ((dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2115 | + (dMult-4.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-(pow(dReQ3n,2.)+pow(dImQ3n,2.))) | |
2116 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2117 | + (dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2118 | four3n1n1n1n = (reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar-3.*reQ2nQ1nstarQ1nstar) | |
2119 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2120 | + (2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))+3.*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2121 | + 6.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))-6.*dMult) | |
2122 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2123 | four4n2n1n1n = (reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar-2.*reQ3nQ2nstarQ1nstar) | |
2124 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2125 | - (reQ2nQ1nstarQ1nstar-2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))-2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2126 | - 3.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2127 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2128 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2129 | four3n1n2n2n = (reQ3nQ1nQ2nstarQ2nstar-reQ4nQ2nstarQ2nstar-reQ3nQ1nQ4nstar-2.*reQ3nQ2nstarQ1nstar) | |
2130 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2131 | - (2.*reQ1nQ1nQ2nstar-(pow(dReQ4n,2.)+pow(dImQ4n,2.))-2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2132 | - 4.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2133 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2134 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2135 | four3n1n3n1n = ((pow(dReQ3n,2.)+pow(dImQ3n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2136 | - 2.*reQ4nQ3nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar) | |
2137 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2138 | + ((pow(dReQ4n,2.)+pow(dImQ4n,2.))-(dMult-4.)*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2139 | + (pow(dReQ2n,2.)+pow(dImQ2n,2.))-(dMult-4.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2140 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2141 | + (dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2142 | ||
2143 | // average 4-particle correlations for single event: | |
2144 | fIntFlowCorrelationsAllEBE->SetBinContent(11,four1n1n1n1n); | |
2145 | fIntFlowCorrelationsAllEBE->SetBinContent(12,four2n1n2n1n); | |
2146 | fIntFlowCorrelationsAllEBE->SetBinContent(13,four2n2n2n2n); | |
2147 | fIntFlowCorrelationsAllEBE->SetBinContent(14,four3n1n1n1n); | |
2148 | fIntFlowCorrelationsAllEBE->SetBinContent(15,four3n1n3n1n); | |
2149 | fIntFlowCorrelationsAllEBE->SetBinContent(16,four3n1n2n2n); | |
2150 | fIntFlowCorrelationsAllEBE->SetBinContent(17,four4n2n1n1n); | |
2151 | ||
2152 | // average 4-particle correlations for all events: | |
2153 | fIntFlowCorrelationsAllPro->Fill(10.5,four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2154 | fIntFlowCorrelationsAllPro->Fill(11.5,four2n1n2n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2155 | fIntFlowCorrelationsAllPro->Fill(12.5,four2n2n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2156 | fIntFlowCorrelationsAllPro->Fill(13.5,four3n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2157 | fIntFlowCorrelationsAllPro->Fill(14.5,four3n1n3n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2158 | fIntFlowCorrelationsAllPro->Fill(15.5,four3n1n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2159 | fIntFlowCorrelationsAllPro->Fill(16.5,four4n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2160 | ||
2161 | // store separetately <4> (to be improved: do I really need this?) | |
2162 | fIntFlowCorrelationsEBE->SetBinContent(2,four1n1n1n1n); // <4> | |
2163 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(2,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); // eW_<4> | |
2164 | fIntFlowCorrelationsPro->Fill(1.5,four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2165 | ||
2166 | // distribution of <cos(n*(phi1+phi2-phi3-phi4))> | |
2167 | //f4pDistribution->Fill(four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2168 | ||
2169 | } // end of if(dMult>3) | |
2170 | ||
2171 | // 5-particle: | |
2172 | Double_t five2n1n1n1n1n = 0.; // <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
2173 | Double_t five2n2n2n1n1n = 0.; // <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
2174 | Double_t five3n1n2n1n1n = 0.; // <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
2175 | Double_t five4n1n1n1n1n = 0.; // <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
2176 | ||
2177 | if(dMult>4) | |
2178 | { | |
2179 | five2n1n1n1n1n = (reQ2nQ1nQ1nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar+6.*reQ3nQ2nstarQ1nstar) | |
2180 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2181 | - (reQ2nQ1nQ3nstar+3.*(dMult-6.)*reQ2nQ1nstarQ1nstar+3.*reQ1nQ1nQ2nstar) | |
2182 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2183 | - (2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2184 | + 3.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2185 | - 3.*(dMult-4.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2186 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2187 | - 3.*(pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2188 | - 2.*(2*dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult*(dMult-4.)) | |
2189 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2190 | ||
2191 | five2n2n2n1n1n = (reQ2nQ2nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ2nQ2nQ3nstarQ1nstar) | |
2192 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2193 | + 2.*(reQ4nQ2nstarQ2nstar+4.*reQ3nQ2nstarQ1nstar+reQ3nQ1nQ4nstar) | |
2194 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2195 | + (reQ2nQ2nQ4nstar-2.*(dMult-5.)*reQ2nQ1nstarQ1nstar+2.*reQ1nQ1nQ2nstar) | |
2196 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2197 | - (2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))+4.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2198 | + 1.*pow((pow(dReQ2n,2.)+pow(dImQ2n,2.)),2.) | |
2199 | - 2.*(3.*dMult-10.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2200 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2201 | - (4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2202 | - 4.*(dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))+4.*dMult*(dMult-6.)) | |
2203 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2204 | ||
2205 | five4n1n1n1n1n = (reQ4nQ1nstarQ1nstarQ1nstarQ1nstar-6.*reQ4nQ2nstarQ1nstarQ1nstar-4.*reQ3nQ1nstarQ1nstarQ1nstar) | |
2206 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2207 | + (8.*reQ4nQ3nstarQ1nstar+3.*reQ4nQ2nstarQ2nstar+12.*reQ3nQ2nstarQ1nstar+12.*reQ2nQ1nstarQ1nstar) | |
2208 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2209 | - (6.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))+8.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2210 | + 12.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))+24.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))-24.*dMult) | |
2211 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2212 | ||
2213 | five3n1n2n1n1n = (reQ3nQ1nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar) | |
2214 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2215 | - (reQ3nQ1nQ2nstarQ2nstar-3.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar) | |
2216 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2217 | - ((2.*dMult-13.)*reQ3nQ2nstarQ1nstar-reQ3nQ1nQ4nstar-9.*reQ2nQ1nstarQ1nstar) | |
2218 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2219 | - (2.*reQ1nQ1nQ2nstar+2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.)) | |
2220 | - 2.*(dMult-5.)*(pow(dReQ3n,2.)+pow(dImQ3n,2.))+2.*(pow(dReQ3n,2.) | |
2221 | + pow(dImQ3n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2222 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2223 | + (2.*(dMult-6.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2224 | - 2.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2225 | - pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2226 | + 2.*(3.*dMult-11.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2227 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2228 | - 4.*(dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2229 | ||
2230 | // average 5-particle correlations for single event: | |
2231 | fIntFlowCorrelationsAllEBE->SetBinContent(19,five2n1n1n1n1n); | |
2232 | fIntFlowCorrelationsAllEBE->SetBinContent(20,five2n2n2n1n1n); | |
2233 | fIntFlowCorrelationsAllEBE->SetBinContent(21,five3n1n2n1n1n); | |
2234 | fIntFlowCorrelationsAllEBE->SetBinContent(22,five4n1n1n1n1n); | |
2235 | ||
2236 | // average 5-particle correlations for all events: | |
2237 | fIntFlowCorrelationsAllPro->Fill(18.5,five2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2238 | fIntFlowCorrelationsAllPro->Fill(19.5,five2n2n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2239 | fIntFlowCorrelationsAllPro->Fill(20.5,five3n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2240 | fIntFlowCorrelationsAllPro->Fill(21.5,five4n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2241 | } // end of if(dMult>4) | |
2242 | ||
2243 | // 6-particle: | |
2244 | Double_t six1n1n1n1n1n1n = 0.; // <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2245 | Double_t six2n2n1n1n1n1n = 0.; // <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
2246 | Double_t six3n1n1n1n1n1n = 0.; // <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
2247 | Double_t six2n1n1n2n1n1n = 0.; // <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
2248 | ||
2249 | if(dMult>5) | |
2250 | { | |
2251 | six1n1n1n1n1n1n = (pow(pow(dReQ1n,2.)+pow(dImQ1n,2.),3.)+9.*dQ2nQ1nQ2nstarQ1nstar-6.*reQ2nQ1nQ1nstarQ1nstarQ1nstar) | |
2252 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2253 | + 4.*(reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar) | |
2254 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2255 | + 2.*(9.*(dMult-4.)*reQ2nQ1nstarQ1nstar+2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))) | |
2256 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2257 | - 9.*(pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)+(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2258 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-5.)) | |
2259 | + (18.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2260 | / (dMult*(dMult-1)*(dMult-3)*(dMult-4)) | |
2261 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2262 | ||
2263 | six2n1n1n2n1n1n = (dQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2264 | * (2.*five2n2n2n1n1n+4.*five2n1n1n1n1n+4.*five3n1n2n1n1n+4.*four2n1n2n1n+1.*four1n1n1n1n) | |
2265 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four1n1n1n1n+4.*two1n1n | |
2266 | + 2.*three2n1n1n+2.*three2n1n1n+4.*four3n1n1n1n+8.*three2n1n1n+2.*four4n2n1n1n | |
2267 | + 4.*four2n1n2n1n+2.*two2n2n+8.*four2n1n2n1n+4.*four3n1n3n1n+8.*three3n2n1n | |
2268 | + 4.*four3n1n2n2n+4.*four1n1n1n1n+4.*four2n1n2n1n+1.*four2n2n2n2n) | |
2269 | - dMult*(dMult-1.)*(dMult-2.)*(2.*three2n1n1n+8.*two1n1n+4.*two1n1n+2. | |
2270 | + 4.*two1n1n+4.*three2n1n1n+2.*two2n2n+4.*three2n1n1n+8.*three3n2n1n | |
2271 | + 8.*two2n2n+4.*three4n3n1n+4.*two3n3n+4.*three3n2n1n+4.*two1n1n | |
2272 | + 8.*three2n1n1n+4.*two1n1n+4.*three3n2n1n+4.*three2n1n1n+2.*two2n2n | |
2273 | + 4.*three3n2n1n+2.*three4n2n2n)-dMult*(dMult-1.) | |
2274 | * (4.*two1n1n+4.+4.*two1n1n+2.*two2n2n+1.+4.*two1n1n+4.*two2n2n+4.*two3n3n | |
2275 | + 1.+2.*two2n2n+1.*two4n4n)-dMult) | |
2276 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2277 | ||
2278 | six2n2n1n1n1n1n = (reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2279 | * (five4n1n1n1n1n+8.*five2n1n1n1n1n+6.*five2n2n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.) | |
2280 | * (4.*four3n1n1n1n+6.*four4n2n1n1n+12.*three2n1n1n+12.*four1n1n1n1n+24.*four2n1n2n1n | |
2281 | + 4.*four3n1n2n2n+3.*four2n2n2n2n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n | |
2282 | + 4.*three4n3n1n+3.*three4n2n2n+8.*three2n1n1n+24.*two1n1n+12.*two2n2n+12.*three2n1n1n+8.*three3n2n1n | |
2283 | + 1.*three4n2n2n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+2.*two2n2n+8.*two1n1n+6.)-dMult) | |
2284 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2285 | ||
2286 | six3n1n1n1n1n1n = (reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2287 | * (five4n1n1n1n1n+4.*five2n1n1n1n1n+6.*five3n1n2n1n1n+4.*four3n1n1n1n) | |
2288 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+6.*four1n1n1n1n | |
2289 | + 12.*three2n1n1n+12.*four2n1n2n1n+6.*four3n1n1n1n+12.*three3n2n1n+4.*four3n1n3n1n+3.*four3n1n2n2n) | |
2290 | - dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n+4.*three4n3n1n+3.*three4n2n2n+4.*two1n1n | |
2291 | + 12.*two1n1n+6.*three2n1n1n+12.*three2n1n1n+4.*three3n2n1n+12.*two2n2n+4.*three3n2n1n+4.*two3n3n+1.*three4n3n1n | |
2292 | + 6.*three3n2n1n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+1.*two1n1n+4.+6.*two1n1n+4.*two2n2n | |
2293 | + 1.*two3n3n)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2294 | ||
2295 | // average 6-particle correlations for single event: | |
2296 | fIntFlowCorrelationsAllEBE->SetBinContent(24,six1n1n1n1n1n1n); | |
2297 | fIntFlowCorrelationsAllEBE->SetBinContent(25,six2n1n1n2n1n1n); | |
2298 | fIntFlowCorrelationsAllEBE->SetBinContent(26,six2n2n1n1n1n1n); | |
2299 | fIntFlowCorrelationsAllEBE->SetBinContent(27,six3n1n1n1n1n1n); | |
2300 | ||
2301 | // average 6-particle correlations for all events: | |
2302 | fIntFlowCorrelationsAllPro->Fill(23.5,six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2303 | fIntFlowCorrelationsAllPro->Fill(24.5,six2n1n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2304 | fIntFlowCorrelationsAllPro->Fill(25.5,six2n2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2305 | fIntFlowCorrelationsAllPro->Fill(26.5,six3n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2306 | ||
2307 | // store separetately <6> (to be improved: do I really need this?) | |
2308 | fIntFlowCorrelationsEBE->SetBinContent(3,six1n1n1n1n1n1n); // <6> | |
2309 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(3,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // eW_<6> | |
2310 | fIntFlowCorrelationsPro->Fill(2.5,six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2311 | ||
2312 | // distribution of <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2313 | //f6pDistribution->Fill(six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2314 | } // end of if(dMult>5) | |
2315 | ||
2316 | // 7-particle: | |
2317 | Double_t seven2n1n1n1n1n1n1n = 0.; // <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
2318 | ||
2319 | if(dMult>6) | |
2320 | { | |
2321 | seven2n1n1n1n1n1n1n = (reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.) | |
2322 | * (2.*six3n1n1n1n1n1n+4.*six1n1n1n1n1n1n+1.*six2n2n1n1n1n1n+6.*six2n1n1n2n1n1n+8.*five2n1n1n1n1n) | |
2323 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(1.*five4n1n1n1n1n +8.*five2n1n1n1n1n+8.*four3n1n1n1n | |
2324 | + 12.*five3n1n2n1n1n+4.*five2n1n1n1n1n+3.*five2n2n2n1n1n+6.*five2n2n2n1n1n+6.*four1n1n1n1n+24.*four1n1n1n1n | |
2325 | + 12.*five2n1n1n1n1n+12.*five2n1n1n1n1n+12.*three2n1n1n+24.*four2n1n2n1n+4.*five3n1n2n1n1n+4.*five2n1n1n1n1n) | |
2326 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+12.*four1n1n1n1n+24.*three2n1n1n | |
2327 | + 24.*four2n1n2n1n+12.*four3n1n1n1n+24.*three3n2n1n+8.*four3n1n3n1n+6.*four3n1n2n2n+6.*three2n1n1n+12.*four1n1n1n1n | |
2328 | + 12.*four2n1n2n1n+6.*three2n1n1n+12.*four2n1n2n1n+4.*four3n1n2n2n+3.*four2n2n2n2n+4.*four1n1n1n1n+6.*three2n1n1n | |
2329 | + 24.*two1n1n+24.*four1n1n1n1n+4.*four3n1n1n1n+24.*two1n1n+24.*three2n1n1n+12.*two2n2n+24.*three2n1n1n+12.*four2n1n2n1n | |
2330 | + 8.*three3n2n1n+8.*four2n1n2n1n+1.*four4n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+1.*three2n1n1n+8.*two1n1n | |
2331 | + 12.*three3n2n1n+24.*two1n1n+12.*three2n1n1n+4.*three2n1n1n+8.*two1n1n+4.*three4n3n1n+24.*three2n1n1n+8.*three3n2n1n | |
2332 | + 12.*two1n1n+12.*two1n1n+3.*three4n2n2n+24.*two2n2n+6.*two2n2n+12.+12.*three3n2n1n+8.*two3n3n+12.*three2n1n1n+24.*two1n1n | |
2333 | + 4.*three3n2n1n+8.*three3n2n1n+2.*three4n3n1n+12.*two1n1n+8.*three2n1n1n+4.*three2n1n1n+2.*three3n2n1n+6.*two2n2n+8.*two2n2n | |
2334 | + 1.*three4n2n2n+4.*three3n2n1n+6.*three2n1n1n)-dMult*(dMult-1.)*(4.*two1n1n+2.*two1n1n+6.*two2n2n+8.+1.*two2n2n+4.*two3n3n | |
2335 | + 12.*two1n1n+4.*two1n1n+1.*two4n4n+8.*two2n2n+6.+2.*two3n3n+4.*two1n1n+1.*two2n2n)-dMult) | |
2336 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)); // to be improved (direct formula needed) | |
2337 | ||
2338 | // average 7-particle correlations for single event: | |
2339 | fIntFlowCorrelationsAllEBE->SetBinContent(29,seven2n1n1n1n1n1n1n); | |
2340 | ||
2341 | // average 7-particle correlations for all events: | |
2342 | fIntFlowCorrelationsAllPro->Fill(28.5,seven2n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)); | |
2343 | } // end of if(dMult>6) | |
2344 | ||
2345 | // 8-particle: | |
2346 | Double_t eight1n1n1n1n1n1n1n1n = 0.; // <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2347 | if(dMult>7) | |
2348 | { | |
2349 | eight1n1n1n1n1n1n1n1n = (pow(pow(dReQ1n,2.)+pow(dImQ1n,2.),4.)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.) | |
2350 | * (12.*seven2n1n1n1n1n1n1n+16.*six1n1n1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.) | |
2351 | * (8.*six3n1n1n1n1n1n+48.*six1n1n1n1n1n1n+6.*six2n2n1n1n1n1n+96.*five2n1n1n1n1n+72.*four1n1n1n1n+36.*six2n1n1n2n1n1n) | |
2352 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(2.*five4n1n1n1n1n+32.*five2n1n1n1n1n+36.*four1n1n1n1n | |
2353 | + 32.*four3n1n1n1n+48.*five2n1n1n1n1n+48.*five3n1n2n1n1n+144.*five2n1n1n1n1n+288.*four1n1n1n1n+36.*five2n2n2n1n1n | |
2354 | + 144.*three2n1n1n+96.*two1n1n+144.*four2n1n2n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.) | |
2355 | * (8.*four3n1n1n1n+48.*four1n1n1n1n+12.*four4n2n1n1n+96.*four2n1n2n1n+96.*three2n1n1n+72.*three2n1n1n+144.*two1n1n | |
2356 | + 16.*four3n1n3n1n+48.*four3n1n1n1n+144.*four1n1n1n1n+72.*four1n1n1n1n+96.*three3n2n1n+24.*four3n1n2n2n+144.*four2n1n2n1n | |
2357 | + 288.*two1n1n+288.*three2n1n1n+9.*four2n2n2n2n+72.*two2n2n+24.)-dMult*(dMult-1.)*(dMult-2.)*(12.*three2n1n1n+16.*two1n1n | |
2358 | + 24.*three3n2n1n+48.*three2n1n1n+96.*two1n1n+8.*three4n3n1n+32.*three3n2n1n+96.*three2n1n1n+144.*two1n1n+6.*three4n2n2n | |
2359 | + 96.*two2n2n+36.*two2n2n+72.+48.*three3n2n1n+16.*two3n3n+72.*three2n1n1n+144.*two1n1n)-dMult*(dMult-1.)*(8.*two1n1n | |
2360 | + 12.*two2n2n+16.+8.*two3n3n+48.*two1n1n+1.*two4n4n+16.*two2n2n+18.)-dMult) | |
2361 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); // to be improved (direct formula needed) | |
2362 | ||
2363 | // average 8-particle correlations for single event: | |
2364 | fIntFlowCorrelationsAllEBE->SetBinContent(31,eight1n1n1n1n1n1n1n1n); | |
2365 | ||
2366 | // average 8-particle correlations for all events: | |
2367 | fIntFlowCorrelationsAllPro->Fill(30.5,eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); | |
2368 | ||
2369 | // store separetately <8> (to be improved: do I really need this?) | |
2370 | fIntFlowCorrelationsEBE->SetBinContent(4,eight1n1n1n1n1n1n1n1n); // <8> | |
2371 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(4,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); // eW_<8> | |
2372 | fIntFlowCorrelationsPro->Fill(3.5,eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); | |
2373 | ||
2374 | // distribution of <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2375 | //f8pDistribution->Fill(eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); | |
2376 | } // end of if(dMult>7) | |
2377 | ||
2378 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations() | |
2379 | ||
2380 | ||
2381 | //================================================================================================================================ | |
2382 | ||
2383 | ||
2384 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrelations() | |
2385 | { | |
2386 | // Calculate averages of products of correlations for integrated flow // to be improved (this method can be implemented better) | |
2387 | ||
2388 | // a) Binning of fIntFlowProductOfCorrelationsPro is organized as follows: | |
2389 | // 1st bin: <<2><4>> | |
2390 | // 2nd bin: <<2><6>> | |
2391 | // 3rd bin: <<2><8>> | |
2392 | // 4th bin: <<4><6>> | |
2393 | // 5th bin: <<4><8>> | |
2394 | // 6th bin: <<6><8>> | |
2395 | ||
2396 | /* | |
2397 | Double_t dMult = (*fSMpk)(0,0); // multiplicity | |
2398 | ||
2399 | Double_t twoEBE = fIntFlowCorrelationsEBE->GetBinContent(1); // <2> | |
2400 | Double_t fourEBE = fIntFlowCorrelationsEBE->GetBinContent(2); // <4> | |
2401 | Double_t sixEBE = fIntFlowCorrelationsEBE->GetBinContent(3); // <6> | |
2402 | Double_t eightEBE = fIntFlowCorrelationsEBE->GetBinContent(4); // <8> | |
2403 | ||
2404 | Double_t eW2 = 0.; // event weight for <2> | |
2405 | Double_t eW4 = 0.; // event weight for <4> | |
2406 | Double_t eW6 = 0.; // event weight for <6> | |
2407 | Double_t eW8 = 0.; // event weight for <8> | |
2408 | ||
2409 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
2410 | { | |
2411 | eW2 = dMult*(dMult-1); | |
2412 | eW4 = dMult*(dMult-1)*(dMult-2)*(dMult-3); | |
2413 | eW6 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5); | |
2414 | eW8 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7); | |
2415 | } else | |
2416 | { | |
2417 | eW2 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j; | |
2418 | eW4 = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) | |
2419 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
2420 | + 3.*(*fSMpk)(1,2)-6.*(*fSMpk)(0,4); // dM1111 = sum_{i,j,k,l=1,i!=j!=k!=l}^M w_i w_j w_k w_l | |
2421 | } | |
2422 | ||
2423 | fIntFlowProductOfCorrelationsPro->Fill(0.5,twoEBE*fourEBE,eW2*eW4); // <<2><4>> | |
2424 | fIntFlowProductOfCorrelationsPro->Fill(1.5,twoEBE*sixEBE,eW2*eW6); // <<2><6>> | |
2425 | fIntFlowProductOfCorrelationsPro->Fill(2.5,twoEBE*eightEBE,eW2*eW8); // <<2><8>> | |
2426 | fIntFlowProductOfCorrelationsPro->Fill(3.5,fourEBE*sixEBE,eW4*eW6); // <<4><6>> | |
2427 | fIntFlowProductOfCorrelationsPro->Fill(4.5,fourEBE*eightEBE,eW4*eW8); // <<4><8>> | |
2428 | fIntFlowProductOfCorrelationsPro->Fill(5.5,sixEBE*eightEBE,eW6*eW8); // <<6><8>> | |
2429 | */ | |
2430 | ||
2431 | ||
2432 | Int_t counter = 0; | |
2433 | ||
2434 | for(Int_t ci1=1;ci1<4;ci1++) | |
2435 | { | |
2436 | for(Int_t ci2=ci1+1;ci2<=4;ci2++) | |
2437 | { | |
2438 | fIntFlowProductOfCorrelationsPro->Fill(0.5+counter++, | |
2439 | fIntFlowCorrelationsEBE->GetBinContent(ci1)*fIntFlowCorrelationsEBE->GetBinContent(ci2), | |
2440 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)*fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
2441 | } | |
2442 | } | |
2443 | ||
2444 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrelations() | |
2445 | ||
2446 | ||
2447 | //================================================================================================================================ | |
2448 | ||
2449 | ||
2450 | void AliFlowAnalysisWithQCumulants::CalculateCovariancesIntFlow() | |
2451 | { | |
2452 | // a) Calculate unbiased estimators Cov(<2>,<4>), Cov(<2>,<6>), Cov(<2>,<8>), Cov(<4>,<6>), Cov(<4>,<8>) and Cov(<6>,<8>) | |
2453 | // for covariances V_(<2>,<4>), V_(<2>,<6>), V_(<2>,<8>), V_(<4>,<6>), V_(<4>,<8>) and V_(<6>,<8>). | |
2454 | // b) Store in histogram fIntFlowCovariances for instance the following: | |
2455 | // | |
2456 | // Cov(<2>,<4>) * (sum_{i=1}^{N} w_{<2>}_i w_{<4>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<4>}_j)] | |
2457 | // | |
2458 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<4>} is event weight for <4>. | |
2459 | // c) Binning of fIntFlowCovariances is organized as follows: | |
2460 | // | |
2461 | // 1st bin: Cov(<2>,<4>) * (sum_{i=1}^{N} w_{<2>}_i w_{<4>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<4>}_j)] | |
2462 | // 2nd bin: Cov(<2>,<6>) * (sum_{i=1}^{N} w_{<2>}_i w_{<6>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<6>}_j)] | |
2463 | // 3rd bin: Cov(<2>,<8>) * (sum_{i=1}^{N} w_{<2>}_i w_{<8>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<8>}_j)] | |
2464 | // 4th bin: Cov(<4>,<6>) * (sum_{i=1}^{N} w_{<4>}_i w_{<6>}_i )/[(sum_{i=1}^{N} w_{<4>}_i) * (sum_{j=1}^{N} w_{<6>}_j)] | |
2465 | // 5th bin: Cov(<4>,<8>) * (sum_{i=1}^{N} w_{<4>}_i w_{<8>}_i )/[(sum_{i=1}^{N} w_{<4>}_i) * (sum_{j=1}^{N} w_{<8>}_j)] | |
2466 | // 6th bin: Cov(<6>,<8>) * (sum_{i=1}^{N} w_{<6>}_i w_{<8>}_i )/[(sum_{i=1}^{N} w_{<6>}_i) * (sum_{j=1}^{N} w_{<8>}_j)] | |
2467 | ||
2468 | for(Int_t power=0;power<2;power++) | |
2469 | { | |
2470 | if(!(fIntFlowCorrelationsPro && fIntFlowProductOfCorrelationsPro | |
2471 | && fIntFlowSumOfEventWeights[power] && fIntFlowSumOfProductOfEventWeights | |
2472 | && fIntFlowCovariances)) | |
2473 | { | |
2474 | cout<<"WARNING: fIntFlowCorrelationsPro && fIntFlowProductOfCorrelationsPro "<<endl; | |
2475 | cout<<" && fIntFlowSumOfEventWeights[power] && fIntFlowSumOfProductOfEventWeights"<<endl; | |
2476 | cout<<" && fIntFlowCovariances is NULL in AFAWQC::FCIF() !!!!"<<endl; | |
2477 | cout<<"power = "<<power<<endl; | |
2478 | exit(0); | |
2479 | } | |
2480 | } | |
2481 | ||
2482 | // average 2-, 4-, 6- and 8-particle correlations for all events: | |
2483 | Double_t correlation[4] = {0.}; | |
2484 | for(Int_t ci=0;ci<4;ci++) | |
2485 | { | |
2486 | correlation[ci] = fIntFlowCorrelationsPro->GetBinContent(ci+1); | |
2487 | } | |
2488 | // average products of 2-, 4-, 6- and 8-particle correlations: | |
2489 | Double_t productOfCorrelations[4][4] = {{0.}}; | |
2490 | Int_t productOfCorrelationsLabel = 1; | |
2491 | // denominators in the expressions for the unbiased estimator for covariance: | |
2492 | Double_t denominator[4][4] = {{0.}}; | |
2493 | Int_t sumOfProductOfEventWeightsLabel1 = 1; | |
2494 | // weight dependent prefactor which multiply unbiased estimators for covariances: | |
2495 | Double_t wPrefactor[4][4] = {{0.}}; | |
2496 | Int_t sumOfProductOfEventWeightsLabel2 = 1; | |
2497 | for(Int_t c1=0;c1<4;c1++) | |
2498 | { | |
2499 | for(Int_t c2=c1+1;c2<4;c2++) | |
2500 | { | |
2501 | productOfCorrelations[c1][c2] = fIntFlowProductOfCorrelationsPro->GetBinContent(productOfCorrelationsLabel); | |
2502 | if(fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) && fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)) | |
2503 | { | |
2504 | denominator[c1][c2] = 1.-(fIntFlowSumOfProductOfEventWeights->GetBinContent(sumOfProductOfEventWeightsLabel1))/ | |
2505 | (fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) | |
2506 | * fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)); | |
2507 | ||
2508 | wPrefactor[c1][c2] = fIntFlowSumOfProductOfEventWeights->GetBinContent(sumOfProductOfEventWeightsLabel2)/ | |
2509 | (fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) | |
2510 | * fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)); | |
2511 | ||
2512 | ||
2513 | } | |
2514 | productOfCorrelationsLabel++; | |
2515 | sumOfProductOfEventWeightsLabel1++; | |
2516 | sumOfProductOfEventWeightsLabel2++; | |
2517 | } | |
2518 | } | |
2519 | ||
2520 | // covariance label: | |
2521 | Int_t covarianceLabel = 1; | |
2522 | for(Int_t c1=0;c1<4;c1++) | |
2523 | { | |
2524 | for(Int_t c2=c1+1;c2<4;c2++) | |
2525 | { | |
2526 | if(denominator[c1][c2]) | |
2527 | { | |
2528 | // covariances: | |
2529 | Double_t cov = (productOfCorrelations[c1][c2]-correlation[c1]*correlation[c2])/denominator[c1][c2]; | |
2530 | // covarianced multiplied with weight dependent prefactor: | |
2531 | Double_t wCov = cov * wPrefactor[c1][c2]; | |
2532 | fIntFlowCovariances->SetBinContent(covarianceLabel,wCov); | |
2533 | } | |
2534 | covarianceLabel++; | |
2535 | } | |
2536 | } | |
2537 | ||
2538 | } // end of AliFlowAnalysisWithQCumulants::CalculateCovariancesIntFlow() | |
2539 | ||
2540 | ||
2541 | //================================================================================================================================ | |
2542 | ||
2543 | ||
2544 | void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsIntFlow() | |
2545 | { | |
2546 | // From profile fIntFlowCorrelationsPro access measured correlations and spread, | |
2547 | // correctly calculate the statistical errors and store the final results and | |
2548 | // statistical errors for correlations in histogram fIntFlowCorrelationsHist. | |
2549 | // | |
2550 | // Remark: Statistical error of correlation is calculated as: | |
2551 | // | |
2552 | // statistical error = termA * spread * termB: | |
2553 | // termA = sqrt{sum_{i=1}^{N} w^2}/(sum_{i=1}^{N} w) | |
2554 | // termB = 1/sqrt(1-termA^2) | |
2555 | ||
2556 | for(Int_t power=0;power<2;power++) | |
2557 | { | |
2558 | if(!(fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power])) | |
2559 | { | |
2560 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power] is NULL in AFAWQC::FCIF() !!!!"<<endl; | |
2561 | cout<<"power = "<<power<<endl; | |
2562 | exit(0); | |
2563 | } | |
2564 | } | |
2565 | ||
2566 | for(Int_t ci=1;ci<=4;ci++) // correlation index | |
2567 | { | |
2568 | Double_t correlation = fIntFlowCorrelationsPro->GetBinContent(ci); | |
2569 | Double_t spread = fIntFlowCorrelationsPro->GetBinError(ci); | |
2570 | Double_t sumOfLinearEventWeights = fIntFlowSumOfEventWeights[0]->GetBinContent(ci); | |
2571 | Double_t sumOfQuadraticEventWeights = fIntFlowSumOfEventWeights[1]->GetBinContent(ci); | |
2572 | Double_t termA = 0.; | |
2573 | Double_t termB = 0.; | |
2574 | if(sumOfLinearEventWeights) | |
2575 | { | |
2576 | termA = pow(sumOfQuadraticEventWeights,0.5)/sumOfLinearEventWeights; | |
2577 | } else | |
2578 | { | |
2579 | cout<<"WARNING: sumOfLinearEventWeights == 0 in AFAWQC::FCIF() !!!!"<<endl; | |
2580 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl; | |
2581 | } | |
2582 | if(1.-pow(termA,2.) > 0.) | |
2583 | { | |
2584 | termB = 1./pow(1-pow(termA,2.),0.5); | |
2585 | } else | |
2586 | { | |
2587 | cout<<"WARNING: 1.-pow(termA,2.) <= 0 in AFAWQC::FCIF() !!!!"<<endl; | |
2588 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl; | |
2589 | } | |
2590 | Double_t statisticalError = termA * spread * termB; | |
2591 | fIntFlowCorrelationsHist->SetBinContent(ci,correlation); | |
2592 | fIntFlowCorrelationsHist->SetBinError(ci,statisticalError); | |
2593 | } // end of for(Int_t ci=1;ci<=4;ci++) // correlation index | |
2594 | ||
2595 | } // end of AliFlowAnalysisWithQCumulants::FinalizeCorrelationsIntFlow() | |
2596 | ||
2597 | ||
2598 | //================================================================================================================================ | |
2599 | ||
2600 | ||
2601 | void AliFlowAnalysisWithQCumulants::FillAverageMultiplicities(Int_t nRP) | |
2602 | { | |
2603 | // Fill profile fAverageMultiplicity to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8 | |
2604 | ||
2605 | // Binning of fAverageMultiplicity is organized as follows: | |
2606 | // 1st bin: all events (including the empty ones) | |
2607 | // 2nd bin: event with # of RPs greater or equal to 1 | |
2608 | // 3rd bin: event with # of RPs greater or equal to 2 | |
2609 | // 4th bin: event with # of RPs greater or equal to 3 | |
2610 | // 5th bin: event with # of RPs greater or equal to 4 | |
2611 | // 6th bin: event with # of RPs greater or equal to 5 | |
2612 | // 7th bin: event with # of RPs greater or equal to 6 | |
2613 | // 8th bin: event with # of RPs greater or equal to 7 | |
2614 | // 9th bin: event with # of RPs greater or equal to 8 | |
2615 | ||
2616 | if(!fAvMultiplicity) | |
2617 | { | |
2618 | cout<<"WARNING: fAvMultiplicity is NULL in AFAWQC::FAM() !!!!"<<endl; | |
2619 | exit(0); | |
2620 | } | |
2621 | ||
2622 | if(nRP<0) | |
2623 | { | |
2624 | cout<<"WARNING: nRP<0 in in AFAWQC::FAM() !!!!"<<endl; | |
2625 | exit(0); | |
2626 | } | |
2627 | ||
2628 | for(Int_t i=0;i<9;i++) | |
2629 | { | |
2630 | if(nRP>=i) fAvMultiplicity->Fill(i+0.5,nRP,1); | |
2631 | } | |
2632 | ||
2633 | } // end of AliFlowAnalysisWithQCumulants::FillAverageMultiplicities(nRP) | |
2634 | ||
2635 | ||
2636 | //================================================================================================================================ | |
2637 | ||
2638 | ||
2639 | void AliFlowAnalysisWithQCumulants::CalculateCumulantsIntFlow() | |
2640 | { | |
2641 | // a) Calculate Q-cumulants from the measured multiparticle correlations. | |
2642 | // b) Propagate the statistical errors of measured multiparticle correlations to statistical errors of Q-cumulants. | |
2643 | // c) REMARK: Q-cumulants calculated in this method are biased by non-uniform acceptance of detector !!!! | |
2644 | // Method ApplyCorrectionForNonUniformAcceptance* (to be improved: finalize the name here) | |
2645 | // is called afterwards to correct for this bias. | |
2646 | // d) Store the results and statistical error of Q-cumulants in histogram fCumulants. | |
2647 | // Binning of fCumulants is organized as follows: | |
2648 | // | |
2649 | // 1st bin: QC{2} | |
2650 | // 2nd bin: QC{4} | |
2651 | // 3rd bin: QC{6} | |
2652 | // 4th bin: QC{8} | |
2653 | ||
2654 | if(!(fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants)) | |
2655 | { | |
2656 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants is NULL in AFAWQC::CCIF() !!!!"<<endl; | |
2657 | exit(0); | |
2658 | } | |
2659 | ||
2660 | // correlations: | |
2661 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
2662 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
2663 | Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
2664 | Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
2665 | ||
2666 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
2667 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <2> | |
2668 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <4> | |
2669 | Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <6> | |
2670 | Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <8> | |
2671 | ||
2672 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): | |
2673 | Double_t wCov24 = fIntFlowCovariances->GetBinContent(1); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
2674 | Double_t wCov26 = fIntFlowCovariances->GetBinContent(2); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
2675 | Double_t wCov28 = fIntFlowCovariances->GetBinContent(3); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
2676 | Double_t wCov46 = fIntFlowCovariances->GetBinContent(4); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
2677 | Double_t wCov48 = fIntFlowCovariances->GetBinContent(5); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
2678 | Double_t wCov68 = fIntFlowCovariances->GetBinContent(6); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) | |
2679 | ||
2680 | // Q-cumulants: | |
2681 | Double_t qc2 = 0.; // QC{2} | |
2682 | Double_t qc4 = 0.; // QC{4} | |
2683 | Double_t qc6 = 0.; // QC{6} | |
2684 | Double_t qc8 = 0.; // QC{8} | |
2685 | if(two) qc2 = two; | |
2686 | if(four) qc4 = four-2.*pow(two,2.); | |
2687 | if(six) qc6 = six-9.*two*four+12.*pow(two,3.); | |
2688 | if(eight) qc8 = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.); | |
2689 | ||
2690 | // statistical errors of Q-cumulants: | |
2691 | Double_t qc2Error = 0.; | |
2692 | Double_t qc4Error = 0.; | |
2693 | Double_t qc6Error = 0.; | |
2694 | Double_t qc8Error = 0.; | |
2695 | ||
2696 | // squared statistical errors of Q-cumulants: | |
2697 | //Double_t qc2ErrorSquared = 0.; | |
2698 | Double_t qc4ErrorSquared = 0.; | |
2699 | Double_t qc6ErrorSquared = 0.; | |
2700 | Double_t qc8ErrorSquared = 0.; | |
2701 | ||
2702 | // statistical error of QC{2}: | |
2703 | qc2Error = twoError; | |
2704 | ||
2705 | // statistical error of QC{4}: | |
2706 | qc4ErrorSquared = 16.*pow(two,2.)*pow(twoError,2)+pow(fourError,2.) | |
2707 | - 8.*two*wCov24; | |
2708 | if(qc4ErrorSquared>0.) | |
2709 | { | |
2710 | qc4Error = pow(qc4ErrorSquared,0.5); | |
2711 | } else | |
2712 | { | |
2713 | cout<<"WARNING: Statistical error of QC{4} is imaginary !!!!"<<endl; | |
2714 | } | |
2715 | ||
2716 | // statistical error of QC{6}: | |
2717 | qc6ErrorSquared = 81.*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) | |
2718 | + 81.*pow(two,2.)*pow(fourError,2.) | |
2719 | + pow(sixError,2.) | |
2720 | - 162.*two*(4.*pow(two,2.)-four)*wCov24 | |
2721 | + 18.*(4.*pow(two,2.)-four)*wCov26 | |
2722 | - 18.*two*wCov46; | |
2723 | ||
2724 | if(qc6ErrorSquared>0.) | |
2725 | { | |
2726 | qc6Error = pow(qc6ErrorSquared,0.5); | |
2727 | } else | |
2728 | { | |
2729 | cout<<"WARNING: Statistical error of QC{6} is imaginary !!!!"<<endl; | |
2730 | } | |
2731 | ||
2732 | // statistical error of QC{8}: | |
2733 | qc8ErrorSquared = 256.*pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) | |
2734 | + 1296.*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
2735 | + 256.*pow(two,2.)*pow(sixError,2.) | |
2736 | + pow(eightError,2.) | |
2737 | - 1152.*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
2738 | + 512.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
2739 | - 32.*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
2740 | - 1152.*two*(4.*pow(two,2.)-four)*wCov46 | |
2741 | + 72.*(4.*pow(two,2.)-four)*wCov48 | |
2742 | - 32.*two*wCov68; | |
2743 | if(qc8ErrorSquared>0.) | |
2744 | { | |
2745 | qc8Error = pow(qc8ErrorSquared,0.5); | |
2746 | } else | |
2747 | { | |
2748 | cout<<"WARNING: Statistical error of QC{8} is imaginary !!!!"<<endl; | |
2749 | } | |
2750 | ||
2751 | // store the results and statistical errors for Q-cumulants: | |
2752 | fIntFlowQcumulants->SetBinContent(1,qc2); | |
2753 | fIntFlowQcumulants->SetBinError(1,qc2Error); | |
2754 | fIntFlowQcumulants->SetBinContent(2,qc4); | |
2755 | fIntFlowQcumulants->SetBinError(2,qc4Error); | |
2756 | fIntFlowQcumulants->SetBinContent(3,qc6); | |
2757 | fIntFlowQcumulants->SetBinError(3,qc6Error); | |
2758 | fIntFlowQcumulants->SetBinContent(4,qc8); | |
2759 | fIntFlowQcumulants->SetBinError(4,qc8Error); | |
2760 | ||
2761 | } // end of AliFlowAnalysisWithQCumulants::CalculateCumulantsIntFlow() | |
2762 | ||
2763 | ||
2764 | //================================================================================================================================ | |
2765 | ||
2766 | ||
2767 | void AliFlowAnalysisWithQCumulants::CalculateIntFlow() | |
2768 | { | |
2769 | // a) Calculate the final results for integrated flow estimates from Q-cumulants. | |
2770 | // b) Propagate the statistical errors of measured multiparticle correlations to statistical errors of integrated flow estimates. | |
2771 | // c) Store the results and statistical errors of integrated flow estimates in histogram fIntFlow. | |
2772 | // Binning of fIntFlow is organized as follows: | |
2773 | // | |
2774 | // 1st bin: v{2,QC} | |
2775 | // 2nd bin: v{4,QC} | |
2776 | // 3rd bin: v{6,QC} | |
2777 | // 4th bin: v{8,QC} | |
2778 | ||
2779 | if(!(fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants && fIntFlow)) | |
2780 | { | |
2781 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants && fIntFlow is NULL in AFAWQC::CCIF() !!!!"<<endl; | |
2782 | exit(0); | |
2783 | } | |
2784 | ||
2785 | // Q-cumulants: | |
2786 | Double_t qc2 = fIntFlowQcumulants->GetBinContent(1); // QC{2} | |
2787 | Double_t qc4 = fIntFlowQcumulants->GetBinContent(2); // QC{4} | |
2788 | Double_t qc6 = fIntFlowQcumulants->GetBinContent(3); // QC{6} | |
2789 | Double_t qc8 = fIntFlowQcumulants->GetBinContent(4); // QC{8} | |
2790 | ||
2791 | // correlations: | |
2792 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
2793 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
2794 | Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
2795 | Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
2796 | ||
2797 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
2798 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <2> | |
2799 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <4> | |
2800 | Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <6> | |
2801 | Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <8> | |
2802 | ||
2803 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): | |
2804 | Double_t wCov24 = fIntFlowCovariances->GetBinContent(1); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
2805 | Double_t wCov26 = fIntFlowCovariances->GetBinContent(2); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
2806 | Double_t wCov28 = fIntFlowCovariances->GetBinContent(3); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
2807 | Double_t wCov46 = fIntFlowCovariances->GetBinContent(4); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
2808 | Double_t wCov48 = fIntFlowCovariances->GetBinContent(5); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
2809 | Double_t wCov68 = fIntFlowCovariances->GetBinContent(6); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) | |
2810 | ||
2811 | // integrated flow estimates: | |
2812 | Double_t v2 = 0.; // v{2,QC} | |
2813 | Double_t v4 = 0.; // v{4,QC} | |
2814 | Double_t v6 = 0.; // v{6,QC} | |
2815 | Double_t v8 = 0.; // v{8,QC} | |
2816 | ||
2817 | // calculate integrated flow estimates from Q-cumulants: | |
2818 | if(qc2>=0.) v2 = pow(qc2,1./2.); | |
2819 | if(qc4<=0.) v4 = pow(-1.*qc4,1./4.); | |
2820 | if(qc6>=0.) v6 = pow((1./4.)*qc6,1./6.); | |
2821 | if(qc8<=0.) v8 = pow((-1./33.)*qc8,1./8.); | |
2822 | ||
2823 | // statistical errors of integrated flow estimates: | |
2824 | Double_t v2Error = 0.; // statistical error of v{2,QC} | |
2825 | Double_t v4Error = 0.; // statistical error of v{4,QC} | |
2826 | Double_t v6Error = 0.; // statistical error of v{6,QC} | |
2827 | Double_t v8Error = 0.; // statistical error of v{8,QC} | |
2828 | ||
2829 | // squares of statistical errors of integrated flow estimates: | |
2830 | Double_t v2ErrorSquared = 0.; // squared statistical error of v{2,QC} | |
2831 | Double_t v4ErrorSquared = 0.; // squared statistical error of v{4,QC} | |
2832 | Double_t v6ErrorSquared = 0.; // squared statistical error of v{6,QC} | |
2833 | Double_t v8ErrorSquared = 0.; // squared statistical error of v{8,QC} | |
2834 | ||
2835 | // calculate squared statistical errors of integrated flow estimates: | |
2836 | if(two != 0.) | |
2837 | { | |
2838 | v2ErrorSquared = (1./(4.*two))*pow(twoError,2.); | |
2839 | } | |
2840 | if(2.*pow(two,2.)-four > 0.) | |
2841 | { | |
2842 | v4ErrorSquared = (1./pow(2.*pow(two,2.)-four,3./2.))* | |
2843 | (pow(two,2.)*pow(twoError,2.)+(1./16.)*pow(fourError,2.)-(1./2.)*two*wCov24); | |
2844 | } | |
2845 | if(six-9.*four*two+12.*pow(two,3.) > 0.) | |
2846 | { | |
2847 | v6ErrorSquared = ((1./2.)*(1./pow(2.,2./3.))*(1./pow(six-9.*four*two+12.*pow(two,3.),5./3.)))* | |
2848 | ((9./2.)*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) | |
2849 | + (9./2.)*pow(two,2.)*pow(fourError,2.)+(1./18.)*pow(sixError,2.) | |
2850 | - 9.*two*(4.*pow(two,2.)-four)*wCov24+(4.*pow(two,2.)-four)*wCov26-two*wCov46); | |
2851 | } | |
2852 | if(-1.*eight+16.*six*two+18.*pow(four,2.)-144.*four*pow(two,2.)+144.*pow(two,4.) > 0.) | |
2853 | { | |
2854 | v8ErrorSquared = (4./pow(33,1./4.))*(1./pow(-1.*eight+16.*six*two+18.*pow(four,2.)-144.*four*pow(two,2.)+144.*pow(two,4.),7./4.))* | |
2855 | (pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) | |
2856 | + (81./16.)*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
2857 | + pow(two,2.)*pow(sixError,2.) | |
2858 | + (1./256.)*pow(eightError,2.) | |
2859 | - (9./2.)*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
2860 | + 2.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
2861 | - (1./8.)*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
2862 | - (9./2.)*two*(4.*pow(two,2.)-four)*wCov46 | |
2863 | + (9./32.)*(4.*pow(two,2.)-four)*wCov48 | |
2864 | - (1./8.)*two*wCov68); | |
2865 | } | |
2866 | ||
2867 | // calculate statistical errors of integrated flow estimates: | |
2868 | if(v2ErrorSquared > 0.) | |
2869 | { | |
2870 | v2Error = pow(v2ErrorSquared,0.5); | |
2871 | } else | |
2872 | { | |
2873 | cout<<"WARNING: Statistical error of v{2,QC} is imaginary !!!!"<<endl; | |
2874 | } | |
2875 | if(v4ErrorSquared > 0.) | |
2876 | { | |
2877 | v4Error = pow(v4ErrorSquared,0.5); | |
2878 | } else | |
2879 | { | |
2880 | cout<<"WARNING: Statistical error of v{4,QC} is imaginary !!!!"<<endl; | |
2881 | } | |
2882 | if(v6ErrorSquared > 0.) | |
2883 | { | |
2884 | v6Error = pow(v6ErrorSquared,0.5); | |
2885 | } else | |
2886 | { | |
2887 | cout<<"WARNING: Statistical error of v{6,QC} is imaginary !!!!"<<endl; | |
2888 | } | |
2889 | if(v8ErrorSquared > 0.) | |
2890 | { | |
2891 | v8Error = pow(v8ErrorSquared,0.5); | |
2892 | } else | |
2893 | { | |
2894 | cout<<"WARNING: Statistical error of v{8,QC} is imaginary !!!!"<<endl; | |
2895 | } | |
2896 | ||
2897 | // store the results and statistical errors of integrated flow estimates: | |
2898 | fIntFlow->SetBinContent(1,v2); | |
2899 | fIntFlow->SetBinError(1,v2Error); | |
2900 | fIntFlow->SetBinContent(2,v4); | |
2901 | fIntFlow->SetBinError(2,v4Error); | |
2902 | fIntFlow->SetBinContent(3,v6); | |
2903 | fIntFlow->SetBinError(3,v6Error); | |
2904 | fIntFlow->SetBinContent(4,v8); | |
2905 | fIntFlow->SetBinError(4,v8Error); | |
2906 | ||
2907 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlow() | |
2908 | ||
2909 | ||
2910 | //================================================================================================================================ | |
2911 | ||
2912 | ||
2913 | void AliFlowAnalysisWithQCumulants::FillCommonHistResultsIntFlow() | |
2914 | { | |
2915 | // Fill in AliFlowCommonHistResults histograms relevant for 'NONAME' integrated flow (to be improved (name)) | |
2916 | ||
2917 | if(!fIntFlow) | |
2918 | { | |
2919 | cout<<"WARNING: fIntFlow is NULL in AFAWQC::FCHRIF() !!!!"<<endl; | |
2920 | exit(0); | |
2921 | } | |
2922 | ||
2923 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th)) | |
2924 | { | |
2925 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; | |
2926 | cout<<" is NULL in AFAWQC::FCHRIF() !!!!"<<endl; | |
2927 | exit(0); | |
2928 | } | |
2929 | ||
2930 | Double_t v2 = fIntFlow->GetBinContent(1); | |
2931 | Double_t v4 = fIntFlow->GetBinContent(2); | |
2932 | Double_t v6 = fIntFlow->GetBinContent(3); | |
2933 | Double_t v8 = fIntFlow->GetBinContent(4); | |
2934 | ||
2935 | Double_t v2Error = fIntFlow->GetBinError(1); | |
2936 | Double_t v4Error = fIntFlow->GetBinError(2); | |
2937 | Double_t v6Error = fIntFlow->GetBinError(3); | |
2938 | Double_t v8Error = fIntFlow->GetBinError(4); | |
2939 | ||
2940 | fCommonHistsResults2nd->FillIntegratedFlow(v2,v2Error); // to be improved (hardwired 2nd in the name) | |
2941 | fCommonHistsResults4th->FillIntegratedFlow(v4,v4Error); // to be improved (hardwired 4th in the name) | |
2942 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) // to be improved (calculate also 6th and 8th order) | |
2943 | { | |
2944 | fCommonHistsResults6th->FillIntegratedFlow(v6,v6Error); // to be improved (hardwired 6th in the name) | |
2945 | fCommonHistsResults8th->FillIntegratedFlow(v8,v8Error); // to be improved (hardwired 8th in the name) | |
2946 | } | |
2947 | ||
2948 | } // end of AliFlowAnalysisWithQCumulants::FillCommonHistResultsIntFlow() | |
2949 | ||
2950 | ||
2951 | //================================================================================================================================ | |
2952 | ||
2953 | ||
2954 | /* | |
2955 | void AliFlowAnalysisWithQCumulants::ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(Bool_t useParticleWeights, TString eventWeights) | |
2956 | { | |
2957 | // apply correction for non-uniform acceptance to cumulants for integrated flow | |
2958 | // (Remark: non-corrected cumulants are accessed from fCumulants[pW][0], corrected cumulants are stored in fCumulants[pW][1]) | |
2959 | ||
2960 | // shortcuts for the flags: | |
2961 | Int_t pW = (Int_t)(useParticleWeights); // 0=pWeights not used, 1=pWeights used | |
2962 | Int_t eW = -1; | |
2963 | ||
2964 | if(eventWeights == "exact") | |
2965 | { | |
2966 | eW = 0; | |
2967 | } | |
2968 | ||
2969 | if(!(fCumulants[pW][eW][0] && fCumulants[pW][eW][1] && fCorrections[pW][eW])) | |
2970 | { | |
2971 | cout<<"WARNING: fCumulants[pW][eW][0] && fCumulants[pW][eW][1] && fCorrections[pW][eW] is NULL in AFAWQC::ACFNUATCFIF() !!!!"<<endl; | |
2972 | cout<<"pW = "<<pW<<endl; | |
2973 | cout<<"eW = "<<eW<<endl; | |
2974 | exit(0); | |
2975 | } | |
2976 | ||
2977 | // non-corrected cumulants: | |
2978 | Double_t qc2 = fCumulants[pW][eW][0]->GetBinContent(1); | |
2979 | Double_t qc4 = fCumulants[pW][eW][0]->GetBinContent(2); | |
2980 | Double_t qc6 = fCumulants[pW][eW][0]->GetBinContent(3); | |
2981 | Double_t qc8 = fCumulants[pW][eW][0]->GetBinContent(4); | |
2982 | // statistical error of non-corrected cumulants: | |
2983 | Double_t qc2Error = fCumulants[pW][eW][0]->GetBinError(1); | |
2984 | Double_t qc4Error = fCumulants[pW][eW][0]->GetBinError(2); | |
2985 | Double_t qc6Error = fCumulants[pW][eW][0]->GetBinError(3); | |
2986 | Double_t qc8Error = fCumulants[pW][eW][0]->GetBinError(4); | |
2987 | // corrections for non-uniform acceptance: | |
2988 | Double_t qc2Correction = fCorrections[pW][eW]->GetBinContent(1); | |
2989 | Double_t qc4Correction = fCorrections[pW][eW]->GetBinContent(2); | |
2990 | Double_t qc6Correction = fCorrections[pW][eW]->GetBinContent(3); | |
2991 | Double_t qc8Correction = fCorrections[pW][eW]->GetBinContent(4); | |
2992 | // corrected cumulants: | |
2993 | Double_t qc2Corrected = qc2 + qc2Correction; | |
2994 | Double_t qc4Corrected = qc4 + qc4Correction; | |
2995 | Double_t qc6Corrected = qc6 + qc6Correction; | |
2996 | Double_t qc8Corrected = qc8 + qc8Correction; | |
2997 | ||
2998 | // ... to be improved (I need here also to correct error of QCs for NUA. | |
2999 | // For simplicity sake I assume at the moment that this correction is negliglible, but it will be added eventually...) | |
3000 | ||
3001 | // store corrected results and statistical errors for cumulants: | |
3002 | fCumulants[pW][eW][1]->SetBinContent(1,qc2Corrected); | |
3003 | fCumulants[pW][eW][1]->SetBinContent(2,qc4Corrected); | |
3004 | fCumulants[pW][eW][1]->SetBinContent(3,qc6Corrected); | |
3005 | fCumulants[pW][eW][1]->SetBinContent(4,qc8Corrected); | |
3006 | fCumulants[pW][eW][1]->SetBinError(1,qc2Error); // to be improved (correct also qc2Error for NUA) | |
3007 | fCumulants[pW][eW][1]->SetBinError(2,qc4Error); // to be improved (correct also qc4Error for NUA) | |
3008 | fCumulants[pW][eW][1]->SetBinError(3,qc6Error); // to be improved (correct also qc6Error for NUA) | |
3009 | fCumulants[pW][eW][1]->SetBinError(4,qc8Error); // to be improved (correct also qc8Error for NUA) | |
3010 | ||
3011 | } // end of AliFlowAnalysisWithQCumulants::ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(Bool_t useParticleWeights, TString eventWeights) | |
3012 | */ | |
3013 | ||
3014 | ||
3015 | //================================================================================================================================ | |
3016 | ||
3017 | ||
3018 | /* | |
3019 | void AliFlowAnalysisWithQCumulants::PrintQuantifyingCorrectionsForNonUniformAcceptance(Bool_t useParticleWeights, TString eventWeights) | |
3020 | { | |
3021 | // print on the screen QC{n,biased}/QC{n,corrected} | |
3022 | ||
3023 | // shortcuts for the flags: | |
3024 | Int_t pW = (Int_t)(useParticleWeights); // 0=pWeights not used, 1=pWeights used | |
3025 | ||
3026 | Int_t eW = -1; | |
3027 | ||
3028 | if(eventWeights == "exact") | |
3029 | { | |
3030 | eW = 0; | |
3031 | } | |
3032 | ||
3033 | if(!(fCumulants[pW][eW][0] && fCumulants[pW][eW][1])) | |
3034 | { | |
3035 | cout<<"WARNING: fCumulants[pW][eW][0] && fCumulants[pW][eW][1] is NULL in AFAWQC::PQCFNUA() !!!!"<<endl; | |
3036 | cout<<"pW = "<<pW<<endl; | |
3037 | cout<<"eW = "<<eW<<endl; | |
3038 | exit(0); | |
3039 | } | |
3040 | ||
3041 | cout<<endl; | |
3042 | cout<<" Quantifying the bias to Q-cumulants from"<<endl; | |
3043 | cout<<" non-uniform acceptance of the detector:"<<endl; | |
3044 | cout<<endl; | |
3045 | ||
3046 | if(fCumulants[pW][eW][1]->GetBinContent(1)) | |
3047 | { | |
3048 | cout<<" QC{2,biased}/QC{2,corrected} = "<<(fCumulants[pW][eW][0]->GetBinContent(1))/(fCumulants[pW][eW][1]->GetBinContent(1))<<endl; | |
3049 | } | |
3050 | if(fCumulants[pW][eW][1]->GetBinContent(2)) | |
3051 | { | |
3052 | cout<<" QC{4,biased}/QC{4,corrected} = "<<fCumulants[pW][eW][0]->GetBinContent(2)/fCumulants[pW][eW][1]->GetBinContent(2)<<endl; | |
3053 | } | |
3054 | ||
3055 | cout<<endl; | |
3056 | ||
3057 | } // end of AliFlowAnalysisWithQCumulants::PrintQuantifyingCorrectionsForNonUniformAcceptance(Bool_t useParticleWeights, TString eventWeights) | |
3058 | */ | |
3059 | ||
3060 | ||
3061 | //================================================================================================================================ | |
3062 | ||
3063 | ||
3064 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelationsUsingParticleWeights() | |
3065 | { | |
3066 | // Calculate all correlations needed for integrated flow using particle weights. | |
3067 | ||
3068 | // Remark 1: When particle weights are used the binning of fIntFlowCorrelationAllPro is organized as follows: | |
3069 | // | |
3070 | // 1st bin: <2>_{1n|1n} = two1n1nW1W1 = <w1 w2 cos(n*(phi1-phi2))> | |
3071 | // 2nd bin: <2>_{2n|2n} = two2n2nW2W2 = <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
3072 | // 3rd bin: <2>_{3n|3n} = two3n3nW3W3 = <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
3073 | // 4th bin: <2>_{4n|4n} = two4n4nW4W4 = <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
3074 | // 5th bin: ---- EMPTY ---- | |
3075 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1nW2W1W1 = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
3076 | // 7th bin: <3>_{3n|2n,1n} = ... | |
3077 | // 8th bin: <3>_{4n|2n,2n} = ... | |
3078 | // 9th bin: <3>_{4n|3n,1n} = ... | |
3079 | // 10th bin: ---- EMPTY ---- | |
3080 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1nW1W1W1W1 = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
3081 | // 12th bin: <4>_{2n,1n|2n,1n} = ... | |
3082 | // 13th bin: <4>_{2n,2n|2n,2n} = ... | |
3083 | // 14th bin: <4>_{3n|1n,1n,1n} = ... | |
3084 | // 15th bin: <4>_{3n,1n|3n,1n} = ... | |
3085 | // 16th bin: <4>_{3n,1n|2n,2n} = ... | |
3086 | // 17th bin: <4>_{4n|2n,1n,1n} = ... | |
3087 | // 18th bin: ---- EMPTY ---- | |
3088 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = ... | |
3089 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = ... | |
3090 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = ... | |
3091 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = ... | |
3092 | // 23rd bin: ---- EMPTY ---- | |
3093 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = ... | |
3094 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = ... | |
3095 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = ... | |
3096 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = ... | |
3097 | // 28th bin: ---- EMPTY ---- | |
3098 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = ... | |
3099 | // 30th bin: ---- EMPTY ---- | |
3100 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = ... | |
3101 | ||
3102 | // Remark 2: When particle weights are used there are some extra correlations. They are stored in | |
3103 | // fIntFlowExtraCorrelationsPro binning of which is organized as follows: | |
3104 | ||
3105 | // 1st bin: two1n1nW3W1 = <w1^3 w2 cos(n*(phi1-phi2))> | |
3106 | // 2nd bin: two1n1nW1W1W2 = <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
3107 | // ... | |
3108 | ||
3109 | // multiplicity (number of particles used to determine the reaction plane) | |
3110 | Double_t dMult = (*fSMpk)(0,0); | |
3111 | ||
3112 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
3113 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
3114 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
3115 | Double_t dReQ3n3k = (*fReQ)(2,3); | |
3116 | Double_t dReQ4n4k = (*fReQ)(3,4); | |
3117 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
3118 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
3119 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
3120 | Double_t dImQ3n3k = (*fImQ)(2,3); | |
3121 | Double_t dImQ4n4k = (*fImQ)(3,4); | |
3122 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
3123 | ||
3124 | // dMs are variables introduced in order to simplify some Eqs. bellow: | |
3125 | //.............................................................................................. | |
3126 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
3127 | Double_t dM22 = (*fSMpk)(1,2)-(*fSMpk)(0,4); // dM22 = sum_{i,j=1,i!=j}^M w_i^2 w_j^2 | |
3128 | Double_t dM33 = (*fSMpk)(1,3)-(*fSMpk)(0,6); // dM33 = sum_{i,j=1,i!=j}^M w_i^3 w_j^3 | |
3129 | Double_t dM44 = (*fSMpk)(1,4)-(*fSMpk)(0,8); // dM44 = sum_{i,j=1,i!=j}^M w_i^4 w_j^4 | |
3130 | Double_t dM31 = (*fSMpk)(0,3)*(*fSMpk)(0,1)-(*fSMpk)(0,4); // dM31 = sum_{i,j=1,i!=j}^M w_i^3 w_j | |
3131 | Double_t dM211 = (*fSMpk)(0,2)*(*fSMpk)(1,1)-2.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
3132 | - (*fSMpk)(1,2)+2.*(*fSMpk)(0,4); // dM211 = sum_{i,j,k=1,i!=j!=k}^M w_i^2 w_j w_k | |
3133 | Double_t dM1111 = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) | |
3134 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
3135 | + 3.*(*fSMpk)(1,2)-6.*(*fSMpk)(0,4); // dM1111 = sum_{i,j,k,l=1,i!=j!=k!=l}^M w_i w_j w_k w_l | |
3136 | //.............................................................................................. | |
3137 | ||
3138 | // 2-particle correlations: | |
3139 | Double_t two1n1nW1W1 = 0.; // <w1 w2 cos(n*(phi1-phi2))> | |
3140 | Double_t two2n2nW2W2 = 0.; // <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
3141 | Double_t two3n3nW3W3 = 0.; // <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
3142 | Double_t two4n4nW4W4 = 0.; // <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
3143 | if(dMult>1) | |
3144 | { | |
3145 | if(dM11) | |
3146 | { | |
3147 | two1n1nW1W1 = (pow(dReQ1n1k,2)+pow(dImQ1n1k,2)-(*fSMpk)(0,2))/dM11; | |
3148 | // average correlation <w1 w2 cos(n*(phi1-phi2))> for single event: | |
3149 | fIntFlowCorrelationsEBE->SetBinContent(1,two1n1nW1W1); | |
3150 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(1,dM11); | |
3151 | // average correlation <w1 w2 cos(n*(phi1-phi2))> for all events: | |
3152 | fIntFlowCorrelationsPro->Fill(0.5,two1n1nW1W1,dM11); | |
3153 | fIntFlowCorrelationsAllPro->Fill(0.5,two1n1nW1W1,dM11); | |
3154 | } | |
3155 | if(dM22) | |
3156 | { | |
3157 | two2n2nW2W2 = (pow(dReQ2n2k,2)+pow(dImQ2n2k,2)-(*fSMpk)(0,4))/dM22; | |
3158 | // ... | |
3159 | // average correlation <w1^2 w2^2 cos(2n*(phi1-phi2))> for all events: | |
3160 | fIntFlowCorrelationsAllPro->Fill(1.5,two2n2nW2W2,dM22); | |
3161 | } | |
3162 | if(dM33) | |
3163 | { | |
3164 | two3n3nW3W3 = (pow(dReQ3n3k,2)+pow(dImQ3n3k,2)-(*fSMpk)(0,6))/dM33; | |
3165 | // ... | |
3166 | // average correlation <w1^3 w2^3 cos(3n*(phi1-phi2))> for all events: | |
3167 | fIntFlowCorrelationsAllPro->Fill(2.5,two3n3nW3W3,dM33); | |
3168 | } | |
3169 | if(dM44) | |
3170 | { | |
3171 | two4n4nW4W4 = (pow(dReQ4n4k,2)+pow(dImQ4n4k,2)-(*fSMpk)(0,8))/dM44; | |
3172 | // ... | |
3173 | // average correlation <w1^4 w2^4 cos(4n*(phi1-phi2))> for all events: | |
3174 | fIntFlowCorrelationsAllPro->Fill(3.5,two4n4nW4W4,dM44); | |
3175 | } | |
3176 | } // end of if(dMult>1) | |
3177 | ||
3178 | // extra 2-particle correlations: | |
3179 | Double_t two1n1nW3W1 = 0.; // <w1^3 w2 cos(n*(phi1-phi2))> | |
3180 | Double_t two1n1nW1W1W2 = 0.; // <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
3181 | if(dMult>1) | |
3182 | { | |
3183 | if(dM31) | |
3184 | { | |
3185 | two1n1nW3W1 = (dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k-(*fSMpk)(0,4))/dM31; | |
3186 | fIntFlowExtraCorrelationsPro->Fill(0.5,two1n1nW3W1,dM31); | |
3187 | } | |
3188 | if(dM211) | |
3189 | { | |
3190 | two1n1nW1W1W2 = ((*fSMpk)(0,2)*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)-(*fSMpk)(0,2)) | |
3191 | - 2.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k | |
3192 | - (*fSMpk)(0,4)))/dM211; | |
3193 | fIntFlowExtraCorrelationsPro->Fill(1.5,two1n1nW1W1W2,dM211); | |
3194 | } | |
3195 | } // end of if(dMult>1) | |
3196 | //.............................................................................................. | |
3197 | ||
3198 | //.............................................................................................. | |
3199 | // 3-particle correlations: | |
3200 | Double_t three2n1n1nW2W1W1 = 0.; // <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
3201 | ||
3202 | if(dMult>2) | |
3203 | { | |
3204 | if(dM211) | |
3205 | { | |
3206 | three2n1n1nW2W1W1 = (pow(dReQ1n1k,2.)*dReQ2n2k+2.*dReQ1n1k*dImQ1n1k*dImQ2n2k-pow(dImQ1n1k,2.)*dReQ2n2k | |
3207 | - 2.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k) | |
3208 | - pow(dReQ2n2k,2)-pow(dImQ2n2k,2) | |
3209 | + 2.*(*fSMpk)(0,4))/dM211; | |
3210 | fIntFlowCorrelationsAllPro->Fill(5.5,three2n1n1nW2W1W1,dM211); | |
3211 | } | |
3212 | } // end of if(dMult>2) | |
3213 | //.............................................................................................. | |
3214 | ||
3215 | //.............................................................................................. | |
3216 | // 4-particle correlations: | |
3217 | Double_t four1n1n1n1nW1W1W1W1 = 0.; // <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
3218 | if(dMult>3) | |
3219 | { | |
3220 | if(dM1111) | |
3221 | { | |
3222 | four1n1n1n1nW1W1W1W1 = (pow(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.),2) | |
3223 | - 2.*(pow(dReQ1n1k,2.)*dReQ2n2k+2.*dReQ1n1k*dImQ1n1k*dImQ2n2k-pow(dImQ1n1k,2.)*dReQ2n2k) | |
3224 | + 8.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k) | |
3225 | + (pow(dReQ2n2k,2)+pow(dImQ2n2k,2)) | |
3226 | - 4.*(*fSMpk)(0,2)*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)) | |
3227 | - 6.*(*fSMpk)(0,4)+2.*(*fSMpk)(1,2))/dM1111; | |
3228 | ||
3229 | // average correlation <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> for single event: | |
3230 | fIntFlowCorrelationsEBE->SetBinContent(2,four1n1n1n1nW1W1W1W1); | |
3231 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(2,dM1111); | |
3232 | // average correlation <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> for all events: | |
3233 | fIntFlowCorrelationsPro->Fill(1.5,four1n1n1n1nW1W1W1W1,dM1111); | |
3234 | fIntFlowCorrelationsAllPro->Fill(10.5,four1n1n1n1nW1W1W1W1,dM1111); | |
3235 | } | |
3236 | } // end of if(dMult>3) | |
3237 | //.............................................................................................. | |
3238 | ||
3239 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelationsUsingParticleWeights() | |
3240 | ||
3241 | ||
3242 | //================================================================================================================================ | |
3243 | ||
3244 | ||
3245 | void AliFlowAnalysisWithQCumulants::CalculateWeightedQProductsForIntFlow() // to be improved (completed) | |
3246 | { | |
3247 | // calculate averages like <<2><4>>, <<2><6>>, <<4><6>>, etc. which are needed to calculate covariances | |
3248 | // Remark: here we take weighted correlations! | |
3249 | ||
3250 | /* | |
3251 | ||
3252 | // binning of fQProductsW is organized as follows: | |
3253 | // | |
3254 | // 1st bin: <2><4> | |
3255 | // 2nd bin: <2><6> | |
3256 | // 3rd bin: <2><8> | |
3257 | // 4th bin: <4><6> | |
3258 | // 5th bin: <4><8> | |
3259 | // 6th bin: <6><8> | |
3260 | ||
3261 | Double_t dMult = (*fSMpk)(0,0); // multiplicity (number of particles used to determine the reaction plane) | |
3262 | ||
3263 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
3264 | Double_t dM1111 = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) | |
3265 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
3266 | + 3.*(*fSMpk)(1,2)-6.*(*fSMpk)(0,4); // dM1111 = sum_{i,j,k,l=1,i!=j!=k!=l}^M w_i w_j w_k w_l | |
3267 | ||
3268 | Double_t twoEBEW = 0.; // <2> | |
3269 | Double_t fourEBEW = 0.; // <4> | |
3270 | ||
3271 | twoEBEW = fQCorrelationsEBE[1]->GetBinContent(1); | |
3272 | fourEBEW = fQCorrelationsEBE[1]->GetBinContent(11); | |
3273 | ||
3274 | // <2><4> | |
3275 | if(dMult>3) | |
3276 | { | |
3277 | fQProducts[1][0]->Fill(0.5,twoEBEW*fourEBEW,dM11*dM1111); | |
3278 | } | |
3279 | ||
3280 | */ | |
3281 | ||
3282 | } // end of AliFlowAnalysisWithQCumulants::CalculateWeightedQProductsForIntFlow() | |
3283 | ||
3284 | ||
3285 | //================================================================================================================================ | |
3286 | ||
3287 | ||
3288 | void AliFlowAnalysisWithQCumulants::InitializeArraysForIntFlow() | |
3289 | { | |
3290 | // Initialize all arrays used to calculate integrated flow. | |
3291 | ||
3292 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
3293 | { | |
3294 | fIntFlowCorrectionTermsForNUAEBE[sc] = NULL; | |
3295 | fIntFlowCorrectionTermsForNUAPro[sc] = NULL; | |
3296 | fIntFlowCorrectionTermsForNUAHist[sc] = NULL; | |
3297 | } | |
3298 | ||
3299 | for(Int_t power=0;power<2;power++) // linear or quadratic | |
3300 | { | |
3301 | fIntFlowSumOfEventWeights[power] = NULL; | |
3302 | } | |
3303 | ||
3304 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForIntFlow() | |
3305 | ||
3306 | ||
3307 | //================================================================================================================================ | |
3308 | ||
3309 | ||
3310 | void AliFlowAnalysisWithQCumulants::InitializeArraysForDiffFlow() | |
3311 | { | |
3312 | // Initialize all arrays needed to calculate differential flow. | |
3313 | // a) Initialize lists holding profiles; | |
3314 | // b) Initialize lists holding histograms; | |
3315 | // c) Initialize event-by-event quantities; | |
3316 | // d) Initialize profiles; | |
3317 | // e) Initialize histograms holding final results. | |
3318 | ||
3319 | // a) Initialize lists holding profiles; | |
3320 | for(Int_t t=0;t<2;t++) // type (RP, POI) | |
3321 | { | |
3322 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3323 | { | |
3324 | fDiffFlowCorrelationsProList[t][pe] = NULL; | |
3325 | fDiffFlowProductOfCorrelationsProList[t][pe] = NULL; | |
3326 | fDiffFlowCorrectionsProList[t][pe] = NULL; | |
3327 | } | |
3328 | } | |
3329 | ||
3330 | // b) Initialize lists holding histograms; | |
3331 | for(Int_t t=0;t<2;t++) // type (RP, POI) | |
3332 | { | |
3333 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3334 | { | |
3335 | fDiffFlowCorrelationsHistList[t][pe] = NULL; | |
3336 | for(Int_t power=0;power<2;power++) | |
3337 | { | |
3338 | fDiffFlowSumOfEventWeightsHistList[t][pe][power] = NULL; | |
3339 | } // end of for(Int_t power=0;power<2;power++) | |
3340 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe] = NULL; | |
3341 | fDiffFlowCorrectionsHistList[t][pe] = NULL; | |
3342 | fDiffFlowCovariancesHistList[t][pe] = NULL; | |
3343 | fDiffFlowCumulantsHistList[t][pe] = NULL; | |
3344 | fDiffFlowHistList[t][pe] = NULL; | |
3345 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3346 | } // enf of for(Int_t t=0;t<2;t++) // type (RP, POI) | |
3347 | ||
3348 | // c) Initialize event-by-event quantities: | |
3349 | // 1D: | |
3350 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
3351 | { | |
3352 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3353 | { | |
3354 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
3355 | { | |
3356 | for(Int_t k=0;k<9;k++) // power of weight | |
3357 | { | |
3358 | fReRPQ1dEBE[t][pe][m][k] = NULL; | |
3359 | fImRPQ1dEBE[t][pe][m][k] = NULL; | |
3360 | fs1dEBE[t][pe][k] = NULL; // to be improved (this doesn't need to be within loop over m) | |
3361 | } | |
3362 | } | |
3363 | } | |
3364 | } | |
3365 | // 1D: | |
3366 | for(Int_t t=0;t<2;t++) // type (RP or POI) | |
3367 | { | |
3368 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3369 | { | |
3370 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
3371 | { | |
3372 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
3373 | { | |
3374 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti] = NULL; | |
3375 | } | |
3376 | } | |
3377 | } | |
3378 | } | |
3379 | // 2D: | |
3380 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
3381 | { | |
3382 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
3383 | { | |
3384 | for(Int_t k=0;k<9;k++) // power of weight | |
3385 | { | |
3386 | fReRPQ2dEBE[t][m][k] = NULL; | |
3387 | fImRPQ2dEBE[t][m][k] = NULL; | |
3388 | fs2dEBE[t][k] = NULL; // to be improved (this doesn't need to be within loop over m) | |
3389 | } | |
3390 | } | |
3391 | } | |
3392 | ||
3393 | // d) Initialize profiles: | |
3394 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
3395 | { | |
3396 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3397 | { | |
3398 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
3399 | { | |
3400 | fDiffFlowCorrelationsPro[t][pe][ci] = NULL; | |
3401 | } // end of for(Int_t ci=0;ci<4;ci++) | |
3402 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
3403 | { | |
3404 | for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
3405 | { | |
3406 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2] = NULL; | |
3407 | } // end of for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
3408 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
3409 | // correction terms for nua: | |
3410 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
3411 | { | |
3412 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
3413 | { | |
3414 | fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] = NULL; | |
3415 | } | |
3416 | } | |
3417 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3418 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
3419 | ||
3420 | // e) Initialize histograms holding final results. | |
3421 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
3422 | { | |
3423 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3424 | { | |
3425 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
3426 | { | |
3427 | fDiffFlowCorrelationsHist[t][pe][ci] = NULL; | |
3428 | fDiffFlowCumulants[t][pe][ci] = NULL; | |
3429 | fDiffFlow[t][pe][ci] = NULL; | |
3430 | } // end of for(Int_t ci=0;ci<4;ci++) | |
3431 | for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++) | |
3432 | { | |
3433 | fDiffFlowCovariances[t][pe][covarianceIndex] = NULL; | |
3434 | } // end of for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++) | |
3435 | // correction terms for nua: | |
3436 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
3437 | { | |
3438 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
3439 | { | |
3440 | fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] = NULL; | |
3441 | } | |
3442 | } | |
3443 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3444 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
3445 | ||
3446 | // sum of event weights for reduced correlations: | |
3447 | for(Int_t t=0;t<2;t++) // type = RP or POI | |
3448 | { | |
3449 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3450 | { | |
3451 | for(Int_t p=0;p<2;p++) // power of weight is 1 or 2 | |
3452 | { | |
3453 | for(Int_t ew=0;ew<4;ew++) // event weight index for reduced correlations | |
3454 | { | |
3455 | fDiffFlowSumOfEventWeights[t][pe][p][ew] = NULL; | |
3456 | } | |
3457 | } | |
3458 | } | |
3459 | } | |
3460 | // product of event weights for both types of correlations: | |
3461 | for(Int_t t=0;t<2;t++) // type = RP or POI | |
3462 | { | |
3463 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3464 | { | |
3465 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
3466 | { | |
3467 | for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
3468 | { | |
3469 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] = NULL; | |
3470 | } | |
3471 | } | |
3472 | } | |
3473 | } | |
3474 | ||
3475 | ||
3476 | ||
3477 | ||
3478 | /* | |
3479 | ||
3480 | // nested lists in fDiffFlowProfiles: | |
3481 | for(Int_t t=0;t<2;t++) | |
3482 | { | |
3483 | fDFPType[t] = NULL; | |
3484 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1) | |
3485 | { | |
3486 | fDFPParticleWeights[t][pW] = NULL; | |
3487 | for(Int_t eW=0;eW<2;eW++) | |
3488 | { | |
3489 | fDFPEventWeights[t][pW][eW] = NULL; | |
3490 | fDiffFlowCorrelations[t][pW][eW] = NULL; | |
3491 | fDiffFlowProductsOfCorrelations[t][pW][eW] = NULL; | |
3492 | for(Int_t sc=0;sc<2;sc++) | |
3493 | { | |
3494 | fDiffFlowCorrectionTerms[t][pW][eW][sc] = NULL; | |
3495 | } | |
3496 | } | |
3497 | } | |
3498 | } | |
3499 | ||
3500 | ||
3501 | */ | |
3502 | ||
3503 | ||
3504 | ||
3505 | /* | |
3506 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1) | |
3507 | { | |
3508 | for(Int_t eW=0;eW<2;eW++) | |
3509 | { | |
3510 | // correlations: | |
3511 | for(Int_t correlationIndex=0;correlationIndex<4;correlationIndex++) | |
3512 | { | |
3513 | fCorrelationsPro[t][pW][eW][correlationIndex] = NULL; | |
3514 | } | |
3515 | // products of correlations: | |
3516 | for(Int_t productOfCorrelationsIndex=0;productOfCorrelationsIndex<6;productOfCorrelationsIndex++) | |
3517 | { | |
3518 | fProductsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex] = NULL; | |
3519 | } | |
3520 | // correction terms: | |
3521 | for(Int_t sc=0;sc<2;sc++) | |
3522 | { | |
3523 | for(Int_t correctionsIndex=0;correctionsIndex<2;correctionsIndex++) | |
3524 | { | |
3525 | fCorrectionTermsPro[t][pW][eW][sc][correctionsIndex] = NULL; | |
3526 | } | |
3527 | } | |
3528 | } | |
3529 | } | |
3530 | */ | |
3531 | ||
3532 | } // end of AliFlowAnalysisWithQCumulants::InitializeArraysForDiffFlow() | |
3533 | ||
3534 | ||
3535 | //================================================================================================================================ | |
3536 | /* | |
3537 | ||
3538 | ||
3539 | void AliFlowAnalysisWithQCumulants::CalculateCorrelationsForDifferentialFlow2D(TString type) | |
3540 | { | |
3541 | // calculate all reduced correlations needed for differential flow for each (pt,eta) bin: | |
3542 | ||
3543 | if(type == "RP") // to be improved (removed) | |
3544 | { | |
3545 | cout<<endl; | |
3546 | } | |
3547 | // ... | |
3548 | ||
3549 | ||
3550 | Int_t typeFlag = -1; | |
3551 | ||
3552 | // reduced correlations ares stored in fCorrelationsPro[t][pW][index] and are indexed as follows: | |
3553 | // index: | |
3554 | // 0: <2'> | |
3555 | // 1: <4'> | |
3556 | ||
3557 | // multiplicity: | |
3558 | Double_t dMult = (*fSMpk)(0,0); | |
3559 | ||
3560 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
3561 | Double_t dReQ1n = (*fReQ)(0,0); | |
3562 | Double_t dReQ2n = (*fReQ)(1,0); | |
3563 | //Double_t dReQ3n = (*fReQ)(2,0); | |
3564 | //Double_t dReQ4n = (*fReQ)(3,0); | |
3565 | Double_t dImQ1n = (*fImQ)(0,0); | |
3566 | Double_t dImQ2n = (*fImQ)(1,0); | |
3567 | //Double_t dImQ3n = (*fImQ)(2,0); | |
3568 | //Double_t dImQ4n = (*fImQ)(3,0); | |
3569 | ||
3570 | // looping over all (pt,eta) bins and calculating correlations needed for differential flow: | |
3571 | for(Int_t p=1;p<=fnBinsPt;p++) | |
3572 | { | |
3573 | for(Int_t e=1;e<=fnBinsEta;e++) | |
3574 | { | |
3575 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
3576 | Double_t p1n0kRe = 0.; | |
3577 | Double_t p1n0kIm = 0.; | |
3578 | ||
3579 | // number of POIs in particular (pt,eta) bin: | |
3580 | Double_t mp = 0.; | |
3581 | ||
3582 | // real and imaginary parts of q_{m*n,0} (non-weighted Q-vector evaluated for particles which are both RPs and POIs in particular (pt,eta) bin): | |
3583 | Double_t q1n0kRe = 0.; | |
3584 | Double_t q1n0kIm = 0.; | |
3585 | Double_t q2n0kRe = 0.; | |
3586 | Double_t q2n0kIm = 0.; | |
3587 | ||
3588 | // number of particles which are both RPs and POIs in particular (pt,eta) bin: | |
3589 | Double_t mq = 0.; | |
3590 | ||
3591 | // q_{m*n,0}: | |
3592 | q1n0kRe = fReEBE2D[2][0][0]->GetBinContent(fReEBE2D[2][0][0]->GetBin(p,e)) | |
3593 | * fReEBE2D[2][0][0]->GetBinEntries(fReEBE2D[2][0][0]->GetBin(p,e)); | |
3594 | q1n0kIm = fImEBE2D[2][0][0]->GetBinContent(fImEBE2D[2][0][0]->GetBin(p,e)) | |
3595 | * fImEBE2D[2][0][0]->GetBinEntries(fImEBE2D[2][0][0]->GetBin(p,e)); | |
3596 | q2n0kRe = fReEBE2D[2][1][0]->GetBinContent(fReEBE2D[2][1][0]->GetBin(p,e)) | |
3597 | * fReEBE2D[2][1][0]->GetBinEntries(fReEBE2D[2][1][0]->GetBin(p,e)); | |
3598 | q2n0kIm = fImEBE2D[2][1][0]->GetBinContent(fImEBE2D[2][1][0]->GetBin(p,e)) | |
3599 | * fImEBE2D[2][1][0]->GetBinEntries(fImEBE2D[2][1][0]->GetBin(p,e)); | |
3600 | ||
3601 | mq = fReEBE2D[2][0][0]->GetBinEntries(fReEBE2D[2][0][0]->GetBin(p,e)); // to be improved (cross-checked by accessing other profiles here) | |
3602 | ||
3603 | if(type == "POI") | |
3604 | { | |
3605 | // p_{m*n,0}: | |
3606 | p1n0kRe = fReEBE2D[1][0][0]->GetBinContent(fReEBE2D[1][0][0]->GetBin(p,e)) | |
3607 | * fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
3608 | p1n0kIm = fImEBE2D[1][0][0]->GetBinContent(fImEBE2D[1][0][0]->GetBin(p,e)) | |
3609 | * fImEBE2D[1][0][0]->GetBinEntries(fImEBE2D[1][0][0]->GetBin(p,e)); | |
3610 | ||
3611 | mp = fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); // to be improved (cross-checked by accessing other profiles here) | |
3612 | ||
3613 | typeFlag = 1; | |
3614 | } | |
3615 | else if(type == "RP") | |
3616 | { | |
3617 | // p_{m*n,0} = q_{m*n,0}: | |
3618 | p1n0kRe = q1n0kRe; | |
3619 | p1n0kIm = q1n0kIm; | |
3620 | mp = mq; | |
3621 | ||
3622 | typeFlag = 0; | |
3623 | } | |
3624 | ||
3625 | // count events with non-empty (pt,eta) bin: | |
3626 | if(mp>0) | |
3627 | { | |
3628 | fNonEmptyBins2D[typeFlag]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,1); | |
3629 | } | |
3630 | ||
3631 | // 2'-particle correlation for particular (pt,eta) bin: | |
3632 | Double_t two1n1nPtEta = 0.; | |
3633 | if(mp*dMult-mq) | |
3634 | { | |
3635 | two1n1nPtEta = (p1n0kRe*dReQ1n+p1n0kIm*dImQ1n-mq) | |
3636 | / (mp*dMult-mq); | |
3637 | ||
3638 | // fill the 2D profile to get the average correlation for each (pt,eta) bin: | |
3639 | if(type == "POI") | |
3640 | { | |
3641 | //f2pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
3642 | ||
3643 | fCorrelationsPro[1][0][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
3644 | } | |
3645 | else if(type == "RP") | |
3646 | { | |
3647 | //f2pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
3648 | fCorrelationsPro[0][0][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
3649 | } | |
3650 | } // end of if(mp*dMult-mq) | |
3651 | ||
3652 | // 4'-particle correlation: | |
3653 | Double_t four1n1n1n1nPtEta = 0.; | |
3654 | if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
3655 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression) | |
3656 | { | |
3657 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
3658 | - q2n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) | |
3659 | - 2.*q2n0kIm*dReQ1n*dImQ1n | |
3660 | - p1n0kRe*(dReQ1n*dReQ2n+dImQ1n*dImQ2n) | |
3661 | + p1n0kIm*(dImQ1n*dReQ2n-dReQ1n*dImQ2n) | |
3662 | - 2.*dMult*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
3663 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*mq | |
3664 | + 6.*(q1n0kRe*dReQ1n+q1n0kIm*dImQ1n) | |
3665 | + 1.*(q2n0kRe*dReQ2n+q2n0kIm*dImQ2n) | |
3666 | + 2.*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
3667 | + 2.*mq*dMult | |
3668 | - 6.*mq) | |
3669 | / ((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
3670 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
3671 | ||
3672 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
3673 | if(type == "POI") | |
3674 | { | |
3675 | //f4pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
3676 | // (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
3677 | // + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
3678 | ||
3679 | fCorrelationsPro[1][0][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
3680 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
3681 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
3682 | } | |
3683 | else if(type == "RP") | |
3684 | { | |
3685 | //f4pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
3686 | // (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
3687 | // + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
3688 | ||
3689 | fCorrelationsPro[0][0][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
3690 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
3691 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
3692 | } | |
3693 | } // end of if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
3694 | // +mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
3695 | ||
3696 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
3697 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
3698 | ||
3699 | ||
3700 | ||
3701 | ||
3702 | ||
3703 | } // end of AliFlowAnalysisWithQCumulants::CalculateCorrelationsForDifferentialFlow2D() | |
3704 | ||
3705 | ||
3706 | ||
3707 | ||
3708 | ||
3709 | ||
3710 | //================================================================================================================================ | |
3711 | ||
3712 | ||
3713 | void AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForDifferentialFlow2D(TString type) | |
3714 | { | |
3715 | // calculate all weighted correlations needed for differential flow | |
3716 | ||
3717 | if(type == "RP") // to be improved (removed) | |
3718 | { | |
3719 | cout<<endl; | |
3720 | } | |
3721 | // ... | |
3722 | ||
3723 | ||
3724 | ||
3725 | ||
3726 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
3727 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
3728 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
3729 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
3730 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
3731 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
3732 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
3733 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
3734 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
3735 | ||
3736 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
3737 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
3738 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
3739 | Double_t dSM1p3k = (*fSMpk)(0,3); | |
3740 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
3741 | Double_t dSM3p1k = (*fSMpk)(2,1); | |
3742 | ||
3743 | // looping over all (pt,eta) bins and calculating weighted correlations needed for differential flow: | |
3744 | for(Int_t p=1;p<=fnBinsPt;p++) | |
3745 | { | |
3746 | for(Int_t e=1;e<=fnBinsEta;e++) | |
3747 | { | |
3748 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
3749 | Double_t p1n0kRe = 0.; | |
3750 | Double_t p1n0kIm = 0.; | |
3751 | ||
3752 | // number of POIs in particular (pt,eta) bin): | |
3753 | Double_t mp = 0.; | |
3754 | ||
3755 | // real and imaginary parts of q_{m*n,k}: | |
3756 | // (weighted Q-vector evaluated for particles which are both RPs and POIs in particular (pt,eta) bin) | |
3757 | Double_t q1n2kRe = 0.; | |
3758 | Double_t q1n2kIm = 0.; | |
3759 | Double_t q2n1kRe = 0.; | |
3760 | Double_t q2n1kIm = 0.; | |
3761 | ||
3762 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
3763 | Double_t s1p1k = 0.; | |
3764 | Double_t s1p2k = 0.; | |
3765 | Double_t s1p3k = 0.; | |
3766 | ||
3767 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
3768 | Double_t dM0111 = 0.; | |
3769 | ||
3770 | if(type == "POI") | |
3771 | { | |
3772 | // p_{m*n,0}: | |
3773 | p1n0kRe = fReEBE2D[1][0][0]->GetBinContent(fReEBE2D[1][0][0]->GetBin(p,e)) | |
3774 | * fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
3775 | p1n0kIm = fImEBE2D[1][0][0]->GetBinContent(fImEBE2D[1][0][0]->GetBin(p,e)) | |
3776 | * fImEBE2D[1][0][0]->GetBinEntries(fImEBE2D[1][0][0]->GetBin(p,e)); | |
3777 | ||
3778 | mp = fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
3779 | ||
3780 | // q_{m*n,k}: | |
3781 | q1n2kRe = fReEBE2D[2][0][2]->GetBinContent(fReEBE2D[2][0][2]->GetBin(p,e)) | |
3782 | * fReEBE2D[2][0][2]->GetBinEntries(fReEBE2D[2][0][2]->GetBin(p,e)); | |
3783 | q1n2kIm = fImEBE2D[2][0][2]->GetBinContent(fImEBE2D[2][0][2]->GetBin(p,e)) | |
3784 | * fImEBE2D[2][0][2]->GetBinEntries(fImEBE2D[2][0][2]->GetBin(p,e)); | |
3785 | q2n1kRe = fReEBE2D[2][1][1]->GetBinContent(fReEBE2D[2][1][1]->GetBin(p,e)) | |
3786 | * fReEBE2D[2][1][1]->GetBinEntries(fReEBE2D[2][1][1]->GetBin(p,e)); | |
3787 | q2n1kIm = fImEBE2D[2][1][1]->GetBinContent(fImEBE2D[2][1][1]->GetBin(p,e)) | |
3788 | * fImEBE2D[2][1][1]->GetBinEntries(fImEBE2D[2][1][1]->GetBin(p,e)); | |
3789 | ||
3790 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
3791 | s1p1k = pow(fs2D[2][1]->GetBinContent(fs2D[2][1]->GetBin(p,e)),1.); | |
3792 | s1p2k = pow(fs2D[2][2]->GetBinContent(fs2D[2][2]->GetBin(p,e)),1.); | |
3793 | s1p3k = pow(fs2D[2][3]->GetBinContent(fs2D[2][3]->GetBin(p,e)),1.); | |
3794 | ||
3795 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
3796 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
3797 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
3798 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
3799 | } | |
3800 | else if(type == "RP") | |
3801 | { | |
3802 | p1n0kRe = fReEBE2D[0][0][0]->GetBinContent(fReEBE2D[0][0][0]->GetBin(p,e)) | |
3803 | * fReEBE2D[0][0][0]->GetBinEntries(fReEBE2D[0][0][0]->GetBin(p,e)); | |
3804 | p1n0kIm = fImEBE2D[0][0][0]->GetBinContent(fImEBE2D[0][0][0]->GetBin(p,e)) | |
3805 | * fImEBE2D[0][0][0]->GetBinEntries(fImEBE2D[0][0][0]->GetBin(p,e)); | |
3806 | ||
3807 | mp = fReEBE2D[0][0][0]->GetBinEntries(fReEBE2D[0][0][0]->GetBin(p,e)); | |
3808 | ||
3809 | // q_{m*n,k}: | |
3810 | q1n2kRe = fReEBE2D[0][0][2]->GetBinContent(fReEBE2D[0][0][2]->GetBin(p,e)) | |
3811 | * fReEBE2D[0][0][2]->GetBinEntries(fReEBE2D[0][0][2]->GetBin(p,e)); | |
3812 | q1n2kIm = fImEBE2D[0][0][2]->GetBinContent(fImEBE2D[0][0][2]->GetBin(p,e)) | |
3813 | * fImEBE2D[0][0][2]->GetBinEntries(fImEBE2D[0][0][2]->GetBin(p,e)); | |
3814 | q2n1kRe = fReEBE2D[0][1][1]->GetBinContent(fReEBE2D[0][1][1]->GetBin(p,e)) | |
3815 | * fReEBE2D[0][1][1]->GetBinEntries(fReEBE2D[0][1][1]->GetBin(p,e)); | |
3816 | q2n1kIm = fImEBE2D[0][1][1]->GetBinContent(fImEBE2D[0][1][1]->GetBin(p,e)) | |
3817 | * fImEBE2D[0][1][1]->GetBinEntries(fImEBE2D[0][1][1]->GetBin(p,e)); | |
3818 | ||
3819 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
3820 | s1p1k = pow(fs2D[0][1]->GetBinContent(fs2D[0][1]->GetBin(p,e)),1.); | |
3821 | s1p2k = pow(fs2D[0][2]->GetBinContent(fs2D[0][2]->GetBin(p,e)),1.); | |
3822 | s1p3k = pow(fs2D[0][3]->GetBinContent(fs2D[0][3]->GetBin(p,e)),1.); | |
3823 | ||
3824 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
3825 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
3826 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
3827 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
3828 | //............................................................................................... | |
3829 | } | |
3830 | ||
3831 | // 2'-particle correlation: | |
3832 | Double_t two1n1nW0W1PtEta = 0.; | |
3833 | if(mp*dSM1p1k-s1p1k) | |
3834 | { | |
3835 | two1n1nW0W1PtEta = (p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k-s1p1k) | |
3836 | / (mp*dSM1p1k-s1p1k); | |
3837 | ||
3838 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
3839 | if(type == "POI") | |
3840 | { | |
3841 | //f2pPtEtaPOIW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta, | |
3842 | // mp*dSM1p1k-s1p1k); | |
3843 | fCorrelationsPro[1][1][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,mp*dSM1p1k-s1p1k); | |
3844 | } | |
3845 | else if(type == "RP") | |
3846 | { | |
3847 | //f2pPtEtaRPW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta, | |
3848 | // mp*dSM1p1k-s1p1k); | |
3849 | fCorrelationsPro[0][1][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,mp*dSM1p1k-s1p1k); | |
3850 | } | |
3851 | } // end of if(mp*dMult-dmPrimePrimePtEta) | |
3852 | ||
3853 | // 4'-particle correlation: | |
3854 | Double_t four1n1n1n1nW0W1W1W1PtEta = 0.; | |
3855 | if(dM0111) | |
3856 | { | |
3857 | four1n1n1n1nW0W1W1W1PtEta = ((pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
3858 | - q2n1kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.)) | |
3859 | - 2.*q2n1kIm*dReQ1n1k*dImQ1n1k | |
3860 | - p1n0kRe*(dReQ1n1k*dReQ2n2k+dImQ1n1k*dImQ2n2k) | |
3861 | + p1n0kIm*(dImQ1n1k*dReQ2n2k-dReQ1n1k*dImQ2n2k) | |
3862 | - 2.*dSM1p2k*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
3863 | - 2.*(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*s1p1k | |
3864 | + 6.*(q1n2kRe*dReQ1n1k+q1n2kIm*dImQ1n1k) | |
3865 | + 1.*(q2n1kRe*dReQ2n2k+q2n1kIm*dImQ2n2k) | |
3866 | + 2.*(p1n0kRe*dReQ1n3k+p1n0kIm*dImQ1n3k) | |
3867 | + 2.*s1p1k*dSM1p2k | |
3868 | - 6.*s1p3k) | |
3869 | / dM0111; // to be imropoved (notation of dM0111) | |
3870 | ||
3871 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
3872 | if(type == "POI") | |
3873 | { | |
3874 | //f4pPtEtaPOIW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
3875 | fCorrelationsPro[1][1][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
3876 | } | |
3877 | else if(type == "RP") | |
3878 | { | |
3879 | //f4pPtEtaRPW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
3880 | fCorrelationsPro[0][1][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
3881 | } | |
3882 | } // end of if(dM0111) | |
3883 | ||
3884 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
3885 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
3886 | ||
3887 | ||
3888 | ||
3889 | ||
3890 | } // end of AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForDifferentialFlow2D(TString type) | |
3891 | ||
3892 | ||
3893 | //================================================================================================================================ | |
3894 | ||
3895 | */ | |
3896 | ||
3897 | /* | |
3898 | void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights) | |
3899 | { | |
3900 | // 1.) Access average for 2D correlations from profiles and store them in 2D final results histograms; | |
3901 | // 2.) Access spread for 2D correlations from profiles, calculate error and store it in 2D final results histograms; | |
3902 | // 3.) Make projections along pt and eta axis and store results and errors in 1D final results histograms. | |
3903 | ||
3904 | Int_t typeFlag = -1; | |
3905 | Int_t pWeightsFlag = -1; | |
3906 | Int_t eWeightsFlag = -1; | |
3907 | ||
3908 | if(type == "RP") | |
3909 | { | |
3910 | typeFlag = 0; | |
3911 | } else if(type == "POI") | |
3912 | { | |
3913 | typeFlag = 1; | |
3914 | } else | |
3915 | { | |
3916 | cout<<"WARNING: type must be either RP or POI in AFAWQC::FCFDF() !!!!"<<endl; | |
3917 | exit(0); | |
3918 | } | |
3919 | ||
3920 | if(!useParticleWeights) | |
3921 | { | |
3922 | pWeightsFlag = 0; | |
3923 | } else | |
3924 | { | |
3925 | pWeightsFlag = 1; | |
3926 | } | |
3927 | ||
3928 | if(eventWeights == "exact") | |
3929 | { | |
3930 | eWeightsFlag = 0; | |
3931 | } | |
3932 | ||
3933 | // shortcuts: | |
3934 | Int_t t = typeFlag; | |
3935 | Int_t pW = pWeightsFlag; | |
3936 | Int_t eW = eWeightsFlag; | |
3937 | ||
3938 | // from 2D histogram fNonEmptyBins2D make two 1D histograms fNonEmptyBins1D in pt and eta (to be improved (i.e. moved somewhere else)) | |
3939 | // pt: | |
3940 | for(Int_t p=1;p<fnBinsPt;p++) | |
3941 | { | |
3942 | Double_t contentPt = 0.; | |
3943 | for(Int_t e=1;e<=fnBinsEta;e++) | |
3944 | { | |
3945 | contentPt += (fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e))); | |
3946 | } | |
3947 | fNonEmptyBins1D[t][0]->SetBinContent(p,contentPt); | |
3948 | } | |
3949 | // eta: | |
3950 | for(Int_t e=1;e<fnBinsEta;e++) | |
3951 | { | |
3952 | Double_t contentEta = 0.; | |
3953 | for(Int_t p=1;p<=fnBinsPt;p++) | |
3954 | { | |
3955 | contentEta += (fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e))); | |
3956 | } | |
3957 | fNonEmptyBins1D[t][1]->SetBinContent(e,contentEta); | |
3958 | } | |
3959 | ||
3960 | // from 2D profile in (pt,eta) make two 1D profiles in (pt) and (eta): | |
3961 | TProfile *profile[2][4]; // [0=pt,1=eta][correlation index] // to be improved (do not hardwire the correlation index) | |
3962 | ||
3963 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
3964 | { | |
3965 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
3966 | { | |
3967 | if(pe==0) profile[pe][ci] = this->MakePtProjection(fCorrelationsPro[t][pW][eW][ci]); | |
3968 | if(pe==1) profile[pe][ci] = this->MakeEtaProjection(fCorrelationsPro[t][pW][eW][ci]); | |
3969 | } | |
3970 | } | |
3971 | ||
3972 | // transfer 2D profile into 2D histogram: | |
3973 | // to be improved (see in documentation if there is a method to transfer values from 2D profile into 2D histogram) | |
3974 | for(Int_t ci=0;ci<4;ci++) | |
3975 | { | |
3976 | for(Int_t p=1;p<=fnBinsPt;p++) | |
3977 | { | |
3978 | for(Int_t e=1;e<=fnBinsEta;e++) | |
3979 | { | |
3980 | Double_t correlation = fCorrelationsPro[t][pW][eW][ci]->GetBinContent(fCorrelationsPro[t][pW][eW][ci]->GetBin(p,e)); | |
3981 | Double_t spread = fCorrelationsPro[t][pW][eW][ci]->GetBinError(fCorrelationsPro[t][pW][eW][ci]->GetBin(p,e)); | |
3982 | Double_t nEvts = fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e)); | |
3983 | Double_t error = 0.; | |
3984 | fFinalCorrelations2D[t][pW][eW][ci]->SetBinContent(fFinalCorrelations2D[t][pW][eW][ci]->GetBin(p,e),correlation); | |
3985 | if(nEvts>0) | |
3986 | { | |
3987 | error = spread/pow(nEvts,0.5); | |
3988 | fFinalCorrelations2D[t][pW][eW][ci]->SetBinError(fFinalCorrelations2D[t][pW][eW][ci]->GetBin(p,e),error); | |
3989 | } | |
3990 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
3991 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
3992 | } // end of for(Int_t ci=0;ci<4;ci++) | |
3993 | ||
3994 | // transfer 1D profile into 1D histogram (pt): | |
3995 | // to be improved (see in documentation if there is a method to transfer values from 1D profile into 1D histogram) | |
3996 | for(Int_t ci=0;ci<4;ci++) | |
3997 | { | |
3998 | for(Int_t p=1;p<=fnBinsPt;p++) | |
3999 | { | |
4000 | if(profile[0][ci]) | |
4001 | { | |
4002 | Double_t correlation = profile[0][ci]->GetBinContent(p); | |
4003 | Double_t spread = profile[0][ci]->GetBinError(p); | |
4004 | Double_t nEvts = fNonEmptyBins1D[t][0]->GetBinContent(p); | |
4005 | Double_t error = 0.; | |
4006 | fFinalCorrelations1D[t][pW][eW][0][ci]->SetBinContent(p,correlation); | |
4007 | if(nEvts>0) | |
4008 | { | |
4009 | error = spread/pow(nEvts,0.5); | |
4010 | fFinalCorrelations1D[t][pW][eW][0][ci]->SetBinError(p,error); | |
4011 | } | |
4012 | } | |
4013 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
4014 | } // end of for(Int_t ci=0;ci<4;ci++) | |
4015 | ||
4016 | // transfer 1D profile into 1D histogram (eta): | |
4017 | // to be improved (see in documentation if there is a method to transfer values from 1D profile into 1D histogram) | |
4018 | for(Int_t ci=0;ci<4;ci++) | |
4019 | { | |
4020 | for(Int_t e=1;e<=fnBinsEta;e++) | |
4021 | { | |
4022 | if(profile[1][ci]) | |
4023 | { | |
4024 | Double_t correlation = profile[1][ci]->GetBinContent(e); | |
4025 | fFinalCorrelations1D[t][pW][eW][1][ci]->SetBinContent(e,correlation); | |
4026 | } | |
4027 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
4028 | } // end of for(Int_t ci=0;ci<4;ci++) | |
4029 | ||
4030 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights) | |
4031 | */ | |
4032 | ||
4033 | ||
4034 | //================================================================================================================================ | |
4035 | ||
4036 | ||
4037 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulants(TString type, TString ptOrEta) | |
4038 | { | |
4039 | // calcualate cumulants for differential flow from measured correlations | |
4040 | // Remark: cumulants calculated here are NOT corrected for non-uniform acceptance. This correction is applied in the method ... | |
4041 | // to be improved (description) | |
4042 | ||
4043 | Int_t typeFlag = -1; | |
4044 | Int_t ptEtaFlag = -1; | |
4045 | ||
4046 | if(type == "RP") | |
4047 | { | |
4048 | typeFlag = 0; | |
4049 | } else if(type == "POI") | |
4050 | { | |
4051 | typeFlag = 1; | |
4052 | } | |
4053 | ||
4054 | if(ptOrEta == "Pt") | |
4055 | { | |
4056 | ptEtaFlag = 0; | |
4057 | } else if(ptOrEta == "Eta") | |
4058 | { | |
4059 | ptEtaFlag = 1; | |
4060 | } | |
4061 | ||
4062 | // shortcuts: | |
4063 | Int_t t = typeFlag; | |
4064 | Int_t pe = ptEtaFlag; | |
4065 | ||
4066 | // common: | |
4067 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
4068 | ||
4069 | // correlation <<2>>: | |
4070 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); | |
4071 | ||
4072 | // 1D: | |
4073 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
4074 | { | |
4075 | // reduced correlations: | |
4076 | Double_t twoPrime = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); // <<2'>>(pt) | |
4077 | Double_t fourPrime = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); // <<4'>>(pt) | |
4078 | // final statistical error of reduced correlations: | |
4079 | //Double_t twoPrimeError = fFinalCorrelations1D[t][pW][eW][0][0]->GetBinError(p); | |
4080 | // QC{2'}: | |
4081 | Double_t qc2Prime = twoPrime; // QC{2'} | |
4082 | //Double_t qc2PrimeError = twoPrimeError; // final stat. error of QC{2'} | |
4083 | fDiffFlowCumulants[t][pe][0]->SetBinContent(b,qc2Prime); | |
4084 | //fFinalCumulantsPt[t][pW][eW][nua][0]->SetBinError(p,qc2PrimeError); | |
4085 | // QC{4'}: | |
4086 | Double_t qc4Prime = fourPrime - 2.*twoPrime*two; // QC{4'} = <<4'>> - 2*<<2'>><<2>> | |
4087 | fDiffFlowCumulants[t][pe][1]->SetBinContent(b,qc4Prime); | |
4088 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
4089 | ||
4090 | ||
4091 | /* | |
4092 | // 2D (pt,eta): | |
4093 | // to be improved (see documentation if I can do all this without looping) | |
4094 | for(Int_t p=1;p<=fnBinsPt;p++) | |
4095 | { | |
4096 | for(Int_t e=1;e<=fnBinsEta;e++) | |
4097 | { | |
4098 | // reduced correlations: | |
4099 | Double_t twoPrime = fFinalCorrelations2D[t][pW][eW][0]->GetBinContent(fFinalCorrelations2D[t][pW][eW][0]->GetBin(p,e)); // <<2'>>(pt,eta) | |
4100 | Double_t fourPrime = fFinalCorrelations2D[t][pW][eW][1]->GetBinContent(fFinalCorrelations2D[t][pW][eW][1]->GetBin(p,e)); // <<4'>>(pt,eta) | |
4101 | for(Int_t nua=0;nua<2;nua++) | |
4102 | { | |
4103 | // QC{2'}: | |
4104 | Double_t qc2Prime = twoPrime; // QC{2'} = <<2'>> | |
4105 | fFinalCumulants2D[t][pW][eW][nua][0]->SetBinContent(fFinalCumulants2D[t][pW][eW][nua][0]->GetBin(p,e),qc2Prime); | |
4106 | // QC{4'}: | |
4107 | Double_t qc4Prime = fourPrime - 2.*twoPrime*two; // QC{4'} = <<4'>> - 2*<<2'>><<2>> | |
4108 | fFinalCumulants2D[t][pW][eW][nua][1]->SetBinContent(fFinalCumulants2D[t][pW][eW][nua][1]->GetBin(p,e),qc4Prime); | |
4109 | } // end of for(Int_t nua=0;nua<2;nua++) | |
4110 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
4111 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
4112 | */ | |
4113 | ||
4114 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulants(TString type, Bool_t useParticleWeights, TString eventWeights); | |
4115 | ||
4116 | ||
4117 | //================================================================================================================================ | |
4118 | ||
4119 | ||
4120 | void AliFlowAnalysisWithQCumulants::CalculateFinalResultsForRPandPOIIntegratedFlow(TString type) | |
4121 | { | |
4122 | // calculate final results for integrated flow of RPs and POIs | |
4123 | ||
4124 | Int_t typeFlag = -1; | |
4125 | ||
4126 | if(type == "RP") | |
4127 | { | |
4128 | typeFlag = 0; | |
4129 | } else if(type == "POI") | |
4130 | { | |
4131 | typeFlag = 1; | |
4132 | } else | |
4133 | { | |
4134 | cout<<"WARNING: type must be either RP or POI in AFAWQC::CDF() !!!!"<<endl; | |
4135 | exit(0); | |
4136 | } | |
4137 | ||
4138 | // shortcuts: | |
4139 | Int_t t = typeFlag; | |
4140 | ||
4141 | // pt yield: | |
4142 | TH1F *yield2ndPt = NULL; | |
4143 | TH1F *yield4thPt = NULL; | |
4144 | TH1F *yield6thPt = NULL; | |
4145 | TH1F *yield8thPt = NULL; | |
4146 | ||
4147 | if(type == "POI") | |
4148 | { | |
4149 | yield2ndPt = (TH1F*)(fCommonHists2nd->GetHistPtPOI())->Clone(); | |
4150 | yield4thPt = (TH1F*)(fCommonHists4th->GetHistPtPOI())->Clone(); | |
4151 | yield6thPt = (TH1F*)(fCommonHists6th->GetHistPtPOI())->Clone(); | |
4152 | yield8thPt = (TH1F*)(fCommonHists8th->GetHistPtPOI())->Clone(); | |
4153 | } | |
4154 | else if(type == "RP") | |
4155 | { | |
4156 | yield2ndPt = (TH1F*)(fCommonHists2nd->GetHistPtRP())->Clone(); | |
4157 | yield4thPt = (TH1F*)(fCommonHists4th->GetHistPtRP())->Clone(); | |
4158 | yield6thPt = (TH1F*)(fCommonHists6th->GetHistPtRP())->Clone(); | |
4159 | yield8thPt = (TH1F*)(fCommonHists8th->GetHistPtRP())->Clone(); | |
4160 | } | |
4161 | ||
4162 | Int_t nBinsPt = yield2ndPt->GetNbinsX(); | |
4163 | ||
4164 | TH1D *flow2ndPt = NULL; | |
4165 | TH1D *flow4thPt = NULL; | |
4166 | TH1D *flow6thPt = NULL; | |
4167 | TH1D *flow8thPt = NULL; | |
4168 | ||
4169 | // to be improved (hardwired pt index) | |
4170 | flow2ndPt = (TH1D*)fDiffFlow[t][0][0]->Clone(); | |
4171 | flow4thPt = (TH1D*)fDiffFlow[t][0][1]->Clone(); | |
4172 | flow6thPt = (TH1D*)fDiffFlow[t][0][2]->Clone(); | |
4173 | flow8thPt = (TH1D*)fDiffFlow[t][0][3]->Clone(); | |
4174 | ||
4175 | Double_t dvn2nd = 0., dvn4th = 0., dvn6th = 0., dvn8th = 0.; // differential flow | |
4176 | Double_t dErrvn2nd = 0., dErrvn4th = 0., dErrvn6th = 0., dErrvn8th = 0.; // error on differential flow | |
4177 | ||
4178 | Double_t dVn2nd = 0., dVn4th = 0., dVn6th = 0., dVn8th = 0.; // integrated flow | |
4179 | Double_t dErrVn2nd = 0., dErrVn4th = 0., dErrVn6th = 0., dErrVn8th = 0.; // error on integrated flow | |
4180 | ||
4181 | Double_t dYield2nd = 0., dYield4th = 0., dYield6th = 0., dYield8th = 0.; // pt yield | |
4182 | Double_t dSum2nd = 0., dSum4th = 0., dSum6th = 0., dSum8th = 0.; // needed for normalizing integrated flow | |
4183 | ||
4184 | // looping over pt bins: | |
4185 | for(Int_t p=1;p<nBinsPt+1;p++) | |
4186 | { | |
4187 | dvn2nd = flow2ndPt->GetBinContent(p); | |
4188 | dvn4th = flow4thPt->GetBinContent(p); | |
4189 | dvn6th = flow6thPt->GetBinContent(p); | |
4190 | dvn8th = flow8thPt->GetBinContent(p); | |
4191 | ||
4192 | dErrvn2nd = flow2ndPt->GetBinError(p); | |
4193 | dErrvn4th = flow4thPt->GetBinError(p); | |
4194 | dErrvn6th = flow6thPt->GetBinError(p); | |
4195 | dErrvn8th = flow8thPt->GetBinError(p); | |
4196 | ||
4197 | dYield2nd = yield2ndPt->GetBinContent(p); | |
4198 | dYield4th = yield4thPt->GetBinContent(p); | |
4199 | dYield6th = yield6thPt->GetBinContent(p); | |
4200 | dYield8th = yield8thPt->GetBinContent(p); | |
4201 | ||
4202 | dVn2nd += dvn2nd*dYield2nd; | |
4203 | dVn4th += dvn4th*dYield4th; | |
4204 | dVn6th += dvn6th*dYield6th; | |
4205 | dVn8th += dvn8th*dYield8th; | |
4206 | ||
4207 | dSum2nd += dYield2nd; | |
4208 | dSum4th += dYield4th; | |
4209 | dSum6th += dYield6th; | |
4210 | dSum8th += dYield8th; | |
4211 | ||
4212 | dErrVn2nd += dYield2nd*dYield2nd*dErrvn2nd*dErrvn2nd; // ro be improved (check this relation) | |
4213 | dErrVn4th += dYield4th*dYield4th*dErrvn4th*dErrvn4th; | |
4214 | dErrVn6th += dYield6th*dYield6th*dErrvn6th*dErrvn6th; | |
4215 | dErrVn8th += dYield8th*dYield8th*dErrvn8th*dErrvn8th; | |
4216 | ||
4217 | } // end of for(Int_t p=1;p<nBinsPt+1;p++) | |
4218 | ||
4219 | // normalizing the results for integrated flow: | |
4220 | if(dSum2nd) | |
4221 | { | |
4222 | dVn2nd /= dSum2nd; | |
4223 | dErrVn2nd /= (dSum2nd*dSum2nd); | |
4224 | dErrVn2nd = TMath::Sqrt(dErrVn2nd); | |
4225 | } | |
4226 | if(dSum4th) | |
4227 | { | |
4228 | dVn4th /= dSum4th; | |
4229 | dErrVn4th /= (dSum4th*dSum4th); | |
4230 | dErrVn4th = TMath::Sqrt(dErrVn4th); | |
4231 | } | |
4232 | //if(dSum6th) dVn6th/=dSum6th; | |
4233 | //if(dSum8th) dVn8th/=dSum8th; | |
4234 | ||
4235 | // storing the results for integrated flow in common histos: (to be improved: new method for this?) | |
4236 | if(type == "POI") | |
4237 | { | |
4238 | fCommonHistsResults2nd->FillIntegratedFlowPOI(dVn2nd,dErrVn2nd); | |
4239 | fCommonHistsResults4th->FillIntegratedFlowPOI(dVn4th,dErrVn4th); | |
4240 | fCommonHistsResults6th->FillIntegratedFlowPOI(dVn6th,0.); // to be improved (errors) | |
4241 | fCommonHistsResults8th->FillIntegratedFlowPOI(dVn8th,0.); // to be improved (errors) | |
4242 | } | |
4243 | else if (type == "RP") | |
4244 | { | |
4245 | fCommonHistsResults2nd->FillIntegratedFlowRP(dVn2nd,dErrVn2nd); | |
4246 | fCommonHistsResults4th->FillIntegratedFlowRP(dVn4th,dErrVn4th); | |
4247 | fCommonHistsResults6th->FillIntegratedFlowRP(dVn6th,0.); // to be improved (errors) | |
4248 | fCommonHistsResults8th->FillIntegratedFlowRP(dVn8th,0.); // to be improved (errors) | |
4249 | } | |
4250 | ||
4251 | delete flow2ndPt; | |
4252 | delete flow4thPt; | |
4253 | //delete flow6thPt; | |
4254 | //delete flow8thPt; | |
4255 | ||
4256 | delete yield2ndPt; | |
4257 | delete yield4thPt; | |
4258 | delete yield6thPt; | |
4259 | delete yield8thPt; | |
4260 | ||
4261 | } // end of AliFlowAnalysisWithQCumulants::CalculateFinalResultsForRPandPOIIntegratedFlow(TString type) | |
4262 | ||
4263 | ||
4264 | //================================================================================================================================ | |
4265 | ||
4266 | ||
4267 | void AliFlowAnalysisWithQCumulants::InitializeArraysForDistributions() | |
4268 | { | |
4269 | // initialize arrays used for distributions: | |
4270 | ||
4271 | /* | |
4272 | ||
4273 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1) | |
4274 | { | |
4275 | for(Int_t eW=0;eW<2;eW++) | |
4276 | { | |
4277 | for(Int_t di=0;di<4;di++) // distribution index | |
4278 | { | |
4279 | fDistributions[pW][eW][di] = NULL; | |
4280 | } | |
4281 | } | |
4282 | } | |
4283 | ||
4284 | */ | |
4285 | ||
4286 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForDistributions() | |
4287 | ||
4288 | ||
4289 | //================================================================================================================================ | |
4290 | ||
4291 | ||
4292 | void AliFlowAnalysisWithQCumulants::BookEverythingForDistributions() | |
4293 | { | |
4294 | // book all histograms for distributions | |
4295 | ||
4296 | /* | |
4297 | //weighted <2>_{n|n} distribution | |
4298 | f2pDistribution = new TH1D("f2pDistribution","<2>_{n|n} distribution",100000,-0.02,0.1); | |
4299 | f2pDistribution->SetXTitle("<2>_{n|n}"); | |
4300 | f2pDistribution->SetYTitle("Counts"); | |
4301 | fHistList->Add(f2pDistribution); | |
4302 | ||
4303 | //weighted <4>_{n,n|n,n} distribution | |
4304 | f4pDistribution = new TH1D("f4pDistribution","<4>_{n,n|n,n} distribution",100000,-0.00025,0.002); | |
4305 | f4pDistribution->SetXTitle("<4>_{n,n|n,n}"); | |
4306 | f4pDistribution->SetYTitle("Counts"); | |
4307 | fHistList->Add(f4pDistribution); | |
4308 | ||
4309 | //weighted <6>_{n,n,n|n,n,n} distribution | |
4310 | f6pDistribution = new TH1D("f6pDistribution","<6>_{n,n,n|n,n,n} distribution",100000,-0.000005,0.000025); | |
4311 | f6pDistribution->SetXTitle("<6>_{n,n,n|n,n,n}"); | |
4312 | f6pDistribution->SetYTitle("Counts"); | |
4313 | fHistList->Add(f6pDistribution); | |
4314 | ||
4315 | //weighted <8>_{n,n,n,n|n,n,n,n} distribution | |
4316 | f8pDistribution = new TH1D("f8pDistribution","<8>_{n,n,n,n|n,n,n,n} distribution",100000,-0.000000001,0.00000001); | |
4317 | f8pDistribution->SetXTitle("<8>_{n,n,n,n|n,n,n,n}"); | |
4318 | f8pDistribution->SetYTitle("Counts"); | |
4319 | fHistList->Add(f8pDistribution); | |
4320 | */ | |
4321 | ||
4322 | } // end of void AliFlowAnalysisWithQCumulants::BookEverythingForDistributions() | |
4323 | ||
4324 | ||
4325 | //================================================================================================================================ | |
4326 | ||
4327 | ||
4328 | void AliFlowAnalysisWithQCumulants::BookAndNestAllLists() | |
4329 | { | |
4330 | // Book and nest all lists nested in the base list fHistList. | |
4331 | // a) Book and nest lists for integrated flow; | |
4332 | // b) Book and nest lists for differential flow; | |
4333 | // c) Book and nest list for particle weights; | |
4334 | // d) Book and nest list for distributions; | |
4335 | // e) Book and nest list for nested loops; | |
4336 | ||
4337 | // a) Book and nest all lists for integrated flow: | |
4338 | // base list for integrated flow: | |
4339 | fIntFlowList = new TList(); | |
4340 | fIntFlowList->SetName("Integrated Flow"); | |
4341 | fIntFlowList->SetOwner(kTRUE); | |
4342 | fHistList->Add(fIntFlowList); | |
4343 | // list holding profiles: | |
4344 | fIntFlowProfiles = new TList(); | |
4345 | fIntFlowProfiles->SetName("Profiles"); | |
4346 | fIntFlowProfiles->SetOwner(kTRUE); | |
4347 | fIntFlowList->Add(fIntFlowProfiles); | |
4348 | // list holding histograms with results: | |
4349 | fIntFlowResults = new TList(); | |
4350 | fIntFlowResults->SetName("Results"); | |
4351 | fIntFlowResults->SetOwner(kTRUE); | |
4352 | fIntFlowList->Add(fIntFlowResults); | |
4353 | ||
4354 | // b) Book and nest lists for differential flow; | |
4355 | fDiffFlowList = new TList(); | |
4356 | fDiffFlowList->SetName("Differential Flow"); | |
4357 | fDiffFlowList->SetOwner(kTRUE); | |
4358 | fHistList->Add(fDiffFlowList); | |
4359 | // list holding profiles: | |
4360 | fDiffFlowProfiles = new TList(); | |
4361 | fDiffFlowProfiles->SetName("Profiles"); | |
4362 | fDiffFlowProfiles->SetOwner(kTRUE); | |
4363 | fDiffFlowList->Add(fDiffFlowProfiles); | |
4364 | // list holding histograms with results: | |
4365 | fDiffFlowResults = new TList(); | |
4366 | fDiffFlowResults->SetName("Results"); | |
4367 | fDiffFlowResults->SetOwner(kTRUE); | |
4368 | fDiffFlowList->Add(fDiffFlowResults); | |
4369 | // flags used for naming nested lists in list fDiffFlowProfiles and fDiffFlowResults: | |
4370 | TList list; | |
4371 | list.SetOwner(kTRUE); | |
4372 | TString typeFlag[2] = {"RP","POI"}; | |
4373 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
4374 | TString powerFlag[2] = {"linear","quadratic"}; | |
4375 | // nested lists in fDiffFlowProfiles (~/Differential Flow/Profiles): | |
4376 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
4377 | { | |
4378 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4379 | { | |
4380 | // list holding profiles with correlations: | |
4381 | fDiffFlowCorrelationsProList[t][pe] = (TList*)list.Clone(); | |
4382 | fDiffFlowCorrelationsProList[t][pe]->SetName(Form("Profiles with correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
4383 | fDiffFlowProfiles->Add(fDiffFlowCorrelationsProList[t][pe]); | |
4384 | // list holding profiles with products of correlations: | |
4385 | fDiffFlowProductOfCorrelationsProList[t][pe] = (TList*)list.Clone(); | |
4386 | fDiffFlowProductOfCorrelationsProList[t][pe]->SetName(Form("Profiles with products of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
4387 | fDiffFlowProfiles->Add(fDiffFlowProductOfCorrelationsProList[t][pe]); | |
4388 | // list holding profiles with corrections: | |
4389 | fDiffFlowCorrectionsProList[t][pe] = (TList*)list.Clone(); | |
4390 | fDiffFlowCorrectionsProList[t][pe]->SetName(Form("Profiles with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
4391 | fDiffFlowProfiles->Add(fDiffFlowCorrectionsProList[t][pe]); | |
4392 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4393 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
4394 | // nested lists in fDiffFlowResults (~/Differential Flow/Results): | |
4395 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
4396 | { | |
4397 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4398 | { | |
4399 | // list holding histograms with correlations: | |
4400 | fDiffFlowCorrelationsHistList[t][pe] = (TList*)list.Clone(); | |
4401 | fDiffFlowCorrelationsHistList[t][pe]->SetName(Form("Correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
4402 | fDiffFlowResults->Add(fDiffFlowCorrelationsHistList[t][pe]); | |
4403 | // list holding histograms with corrections: | |
4404 | fDiffFlowCorrectionsHistList[t][pe] = (TList*)list.Clone(); | |
4405 | fDiffFlowCorrectionsHistList[t][pe]->SetName(Form("Histograms with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
4406 | fDiffFlowResults->Add(fDiffFlowCorrectionsHistList[t][pe]); | |
4407 | for(Int_t power=0;power<2;power++) | |
4408 | { | |
4409 | // list holding histograms with sums of event weights: | |
4410 | fDiffFlowSumOfEventWeightsHistList[t][pe][power] = (TList*)list.Clone(); | |
4411 | fDiffFlowSumOfEventWeightsHistList[t][pe][power]->SetName(Form("Sum of %s event weights (%s, %s)",powerFlag[power].Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
4412 | fDiffFlowResults->Add(fDiffFlowSumOfEventWeightsHistList[t][pe][power]); | |
4413 | } // end of for(Int_t power=0;power<2;power++) | |
4414 | // list holding histograms with sums of products of event weights: | |
4415 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe] = (TList*)list.Clone(); | |
4416 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]->SetName(Form("Sum of products of event weights (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
4417 | fDiffFlowResults->Add(fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]); | |
4418 | // list holding histograms with covariances of correlations: | |
4419 | fDiffFlowCovariancesHistList[t][pe] = (TList*)list.Clone(); | |
4420 | fDiffFlowCovariancesHistList[t][pe]->SetName(Form("Covariances of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
4421 | fDiffFlowResults->Add(fDiffFlowCovariancesHistList[t][pe]); | |
4422 | // list holding histograms with differential Q-cumulants: | |
4423 | fDiffFlowCumulantsHistList[t][pe] = (TList*)list.Clone(); | |
4424 | fDiffFlowCumulantsHistList[t][pe]->SetName(Form("Differential Q-cumulants (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
4425 | fDiffFlowResults->Add(fDiffFlowCumulantsHistList[t][pe]); | |
4426 | // list holding histograms with differential flow estimates from Q-cumulants: | |
4427 | fDiffFlowHistList[t][pe] = (TList*)list.Clone(); | |
4428 | fDiffFlowHistList[t][pe]->SetName(Form("Differential flow (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
4429 | fDiffFlowResults->Add(fDiffFlowHistList[t][pe]); | |
4430 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4431 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
4432 | ||
4433 | // c) Book and nest list for particle weights: | |
4434 | fWeightsList->SetName("Weights"); | |
4435 | fWeightsList->SetOwner(kTRUE); | |
4436 | fHistList->Add(fWeightsList); | |
4437 | ||
4438 | // d) Book and nest list for distributions: | |
4439 | fDistributionsList = new TList(); | |
4440 | fDistributionsList->SetName("Distributions"); | |
4441 | fDistributionsList->SetOwner(kTRUE); | |
4442 | fHistList->Add(fDistributionsList); | |
4443 | ||
4444 | // e) Book and nest list for nested loops: | |
4445 | fNestedLoopsList = new TList(); | |
4446 | fNestedLoopsList->SetName("Nested Loops"); | |
4447 | fNestedLoopsList->SetOwner(kTRUE); | |
4448 | fHistList->Add(fNestedLoopsList); | |
4449 | ||
4450 | } // end of void AliFlowAnalysisWithQCumulants::BookAndNestAllLists() | |
4451 | ||
4452 | ||
4453 | //================================================================================================================================ | |
4454 | ||
4455 | ||
4456 | void AliFlowAnalysisWithQCumulants::FillCommonHistResultsDiffFlow(TString type) | |
4457 | { | |
4458 | // fill common result histograms for differential flow | |
4459 | ||
4460 | Int_t typeFlag = -1; | |
4461 | //Int_t ptEtaFlag = -1; | |
4462 | ||
4463 | if(type == "RP") | |
4464 | { | |
4465 | typeFlag = 0; | |
4466 | } else if(type == "POI") | |
4467 | { | |
4468 | typeFlag = 1; | |
4469 | } | |
4470 | ||
4471 | // shortcuts: | |
4472 | Int_t t = typeFlag; | |
4473 | //Int_t pe = ptEtaFlag; | |
4474 | ||
4475 | // to be improved (implement protection here) | |
4476 | ||
4477 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th)) | |
4478 | { | |
4479 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; | |
4480 | cout<<" is NULL in AFAWQC::FCHRIF() !!!!"<<endl; | |
4481 | exit(0); | |
4482 | } | |
4483 | ||
4484 | // pt: | |
4485 | for(Int_t p=1;p<=fnBinsPt;p++) | |
4486 | { | |
4487 | Double_t v2 = fDiffFlow[t][0][0]->GetBinContent(p); | |
4488 | Double_t v4 = fDiffFlow[t][0][1]->GetBinContent(p); | |
4489 | Double_t v6 = fDiffFlow[t][0][2]->GetBinContent(p); | |
4490 | Double_t v8 = fDiffFlow[t][0][3]->GetBinContent(p); | |
4491 | ||
4492 | Double_t v2Error = fDiffFlow[t][0][0]->GetBinError(p); | |
4493 | Double_t v4Error = fDiffFlow[t][0][1]->GetBinError(p); | |
4494 | //Double_t v6Error = fFinalFlow1D[t][pW][nua][0][2]->GetBinError(p); | |
4495 | //Double_t v8Error = fFinalFlow1D[t][pW][nua][0][3]->GetBinError(p); | |
4496 | ||
4497 | if(type == "RP") | |
4498 | { | |
4499 | fCommonHistsResults2nd->FillDifferentialFlowPtRP(p,v2,v2Error); | |
4500 | fCommonHistsResults4th->FillDifferentialFlowPtRP(p,v4,v4Error); | |
4501 | fCommonHistsResults6th->FillDifferentialFlowPtRP(p,v6,0.); | |
4502 | fCommonHistsResults8th->FillDifferentialFlowPtRP(p,v8,0.); | |
4503 | } else if(type == "POI") | |
4504 | { | |
4505 | fCommonHistsResults2nd->FillDifferentialFlowPtPOI(p,v2,v2Error); | |
4506 | fCommonHistsResults4th->FillDifferentialFlowPtPOI(p,v4,v4Error); | |
4507 | fCommonHistsResults6th->FillDifferentialFlowPtPOI(p,v6,0.); | |
4508 | fCommonHistsResults8th->FillDifferentialFlowPtPOI(p,v8,0.); | |
4509 | } | |
4510 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
4511 | ||
4512 | // eta: | |
4513 | for(Int_t e=1;e<=fnBinsEta;e++) | |
4514 | { | |
4515 | Double_t v2 = fDiffFlow[t][1][0]->GetBinContent(e); | |
4516 | Double_t v4 = fDiffFlow[t][1][1]->GetBinContent(e); | |
4517 | Double_t v6 = fDiffFlow[t][1][2]->GetBinContent(e); | |
4518 | Double_t v8 = fDiffFlow[t][1][3]->GetBinContent(e); | |
4519 | ||
4520 | Double_t v2Error = fDiffFlow[t][1][0]->GetBinError(e); | |
4521 | Double_t v4Error = fDiffFlow[t][1][1]->GetBinError(e); | |
4522 | //Double_t v6Error = fDiffFlow[t][1][2]->GetBinError(e); | |
4523 | //Double_t v8Error = fDiffFlow[t][1][3]->GetBinError(e); | |
4524 | ||
4525 | if(type == "RP") | |
4526 | { | |
4527 | fCommonHistsResults2nd->FillDifferentialFlowEtaRP(e,v2,v2Error); | |
4528 | fCommonHistsResults4th->FillDifferentialFlowEtaRP(e,v4,v4Error); | |
4529 | fCommonHistsResults6th->FillDifferentialFlowEtaRP(e,v6,0.); | |
4530 | fCommonHistsResults8th->FillDifferentialFlowEtaRP(e,v8,0.); | |
4531 | } else if(type == "POI") | |
4532 | { | |
4533 | fCommonHistsResults2nd->FillDifferentialFlowEtaPOI(e,v2,v2Error); | |
4534 | fCommonHistsResults4th->FillDifferentialFlowEtaPOI(e,v4,v4Error); | |
4535 | fCommonHistsResults6th->FillDifferentialFlowEtaPOI(e,v6,0.); | |
4536 | fCommonHistsResults8th->FillDifferentialFlowEtaPOI(e,v8,0.); | |
4537 | } | |
4538 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
4539 | ||
4540 | } // end of void AliFlowAnalysisWithQCumulants::FillCommonHistResultsDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights, Bool_t correctedForNUA) | |
4541 | ||
4542 | ||
4543 | //================================================================================================================================ | |
4544 | ||
4545 | ||
4546 | void AliFlowAnalysisWithQCumulants::AccessConstants() | |
4547 | { | |
4548 | // access needed common constants from AliFlowCommonConstants | |
4549 | ||
4550 | fnBinsPhi = AliFlowCommonConstants::GetMaster()->GetNbinsPhi(); | |
4551 | fPhiMin = AliFlowCommonConstants::GetMaster()->GetPhiMin(); | |
4552 | fPhiMax = AliFlowCommonConstants::GetMaster()->GetPhiMax(); | |
4553 | if(fnBinsPhi) fPhiBinWidth = (fPhiMax-fPhiMin)/fnBinsPhi; | |
4554 | fnBinsPt = AliFlowCommonConstants::GetMaster()->GetNbinsPt(); | |
4555 | fPtMin = AliFlowCommonConstants::GetMaster()->GetPtMin(); | |
4556 | fPtMax = AliFlowCommonConstants::GetMaster()->GetPtMax(); | |
4557 | if(fnBinsPt) fPtBinWidth = (fPtMax-fPtMin)/fnBinsPt; | |
4558 | fnBinsEta = AliFlowCommonConstants::GetMaster()->GetNbinsEta(); | |
4559 | fEtaMin = AliFlowCommonConstants::GetMaster()->GetEtaMin(); | |
4560 | fEtaMax = AliFlowCommonConstants::GetMaster()->GetEtaMax(); | |
4561 | if(fnBinsEta) fEtaBinWidth = (fEtaMax-fEtaMin)/fnBinsEta; | |
4562 | ||
4563 | } // end of void AliFlowAnalysisWithQCumulants::AccessConstants() | |
4564 | ||
4565 | ||
4566 | //================================================================================================================================ | |
4567 | ||
4568 | ||
4569 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeights() | |
4570 | { | |
4571 | // Calculate sum of linear and quadratic event weights for correlations | |
4572 | ||
4573 | ||
4574 | /* | |
4575 | Double_t dMult = (*fSMpk)(0,0); // multiplicity | |
4576 | ||
4577 | Double_t eventWeight[4] = {0}; | |
4578 | ||
4579 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
4580 | { | |
4581 | eventWeight[0] = dMult*(dMult-1); // event weight for <2> | |
4582 | eventWeight[1] = dMult*(dMult-1)*(dMult-2)*(dMult-3); // event weight for <4> | |
4583 | eventWeight[2] = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5); // event weight for <6> | |
4584 | eventWeight[3] = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7); // event weight for <8> | |
4585 | } else | |
4586 | { | |
4587 | eventWeight[0] = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j; | |
4588 | eventWeight[1] = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) | |
4589 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
4590 | + 3.*(*fSMpk)(1,2)-6.*(*fSMpk)(0,4); // dM1111 = sum_{i,j,k,l=1,i!=j!=k!=l}^M w_i w_j w_k w_l | |
4591 | //eventWeight[2] = ... // to be improved (calculated) | |
4592 | //eventWeight[3] = ... // to be improved (calculated) | |
4593 | } | |
4594 | */ | |
4595 | ||
4596 | ||
4597 | for(Int_t p=0;p<2;p++) // power-1 | |
4598 | { | |
4599 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
4600 | { | |
4601 | fIntFlowSumOfEventWeights[p]->Fill(ci+0.5,pow(fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci+1),p+1)); | |
4602 | } | |
4603 | } | |
4604 | ||
4605 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeights() | |
4606 | ||
4607 | ||
4608 | //================================================================================================================================ | |
4609 | ||
4610 | ||
4611 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfProductOfEventWeights() | |
4612 | { | |
4613 | // Calculate sum of product of event weights for correlations | |
4614 | ||
4615 | ||
4616 | /* | |
4617 | Double_t dMult = (*fSMpk)(0,0); // multiplicity | |
4618 | ||
4619 | Double_t eventWeight[4] = {0}; | |
4620 | ||
4621 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
4622 | { | |
4623 | eventWeight[0] = dMult*(dMult-1); // event weight for <2> | |
4624 | eventWeight[1] = dMult*(dMult-1)*(dMult-2)*(dMult-3); // event weight for <4> | |
4625 | eventWeight[2] = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5); // event weight for <6> | |
4626 | eventWeight[3] = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7); // event weight for <8> | |
4627 | } else | |
4628 | { | |
4629 | eventWeight[0] = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j; | |
4630 | eventWeight[1] = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) | |
4631 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
4632 | + 3.*(*fSMpk)(1,2)-6.*(*fSMpk)(0,4); // dM1111 = sum_{i,j,k,l=1,i!=j!=k!=l}^M w_i w_j w_k w_l | |
4633 | //eventWeight[2] = ... // to be improved (calculated) | |
4634 | //eventWeight[3] = ... // to be improved (calculated) | |
4635 | } | |
4636 | ||
4637 | fIntFlowSumOfProductOfEventWeights->Fill(0.5,eventWeight[0]*eventWeight[1]); | |
4638 | fIntFlowSumOfProductOfEventWeights->Fill(1.5,eventWeight[0]*eventWeight[2]); | |
4639 | fIntFlowSumOfProductOfEventWeights->Fill(2.5,eventWeight[0]*eventWeight[3]); | |
4640 | fIntFlowSumOfProductOfEventWeights->Fill(3.5,eventWeight[1]*eventWeight[2]); | |
4641 | fIntFlowSumOfProductOfEventWeights->Fill(4.5,eventWeight[1]*eventWeight[3]); | |
4642 | fIntFlowSumOfProductOfEventWeights->Fill(5.5,eventWeight[2]*eventWeight[3]); | |
4643 | */ | |
4644 | ||
4645 | ||
4646 | Int_t counter = 0; | |
4647 | ||
4648 | for(Int_t ci1=1;ci1<4;ci1++) | |
4649 | { | |
4650 | for(Int_t ci2=ci1+1;ci2<=4;ci2++) | |
4651 | { | |
4652 | fIntFlowSumOfProductOfEventWeights->Fill(0.5+counter++, | |
4653 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)*fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
4654 | } | |
4655 | } | |
4656 | ||
4657 | ||
4658 | ||
4659 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowIntFlowSumOfProductOfEventWeights() | |
4660 | ||
4661 | ||
4662 | //================================================================================================================================ | |
4663 | ||
4664 | ||
4665 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelations(TString type, TString ptOrEta) | |
4666 | { | |
4667 | // calculate reduced correlations for RPs or POIs in pt or eta bins | |
4668 | ||
4669 | // multiplicity: | |
4670 | Double_t dMult = (*fSMpk)(0,0); | |
4671 | ||
4672 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
4673 | Double_t dReQ1n = (*fReQ)(0,0); | |
4674 | Double_t dReQ2n = (*fReQ)(1,0); | |
4675 | //Double_t dReQ3n = (*fReQ)(2,0); | |
4676 | //Double_t dReQ4n = (*fReQ)(3,0); | |
4677 | Double_t dImQ1n = (*fImQ)(0,0); | |
4678 | Double_t dImQ2n = (*fImQ)(1,0); | |
4679 | //Double_t dImQ3n = (*fImQ)(2,0); | |
4680 | //Double_t dImQ4n = (*fImQ)(3,0); | |
4681 | ||
4682 | // reduced correlations are stored in fDiffFlowCorrelationsPro[0=RP,1=POI][0=pt,1=eta][correlation index]. Correlation index runs as follows: | |
4683 | // | |
4684 | // 0: <<2'>> | |
4685 | // 1: <<4'>> | |
4686 | // 2: <<6'>> | |
4687 | // 3: <<8'>> | |
4688 | ||
4689 | Int_t t = -1; // type flag | |
4690 | Int_t pe = -1; // ptEta flag | |
4691 | ||
4692 | if(type == "RP") | |
4693 | { | |
4694 | t = 0; | |
4695 | } else if(type == "POI") | |
4696 | { | |
4697 | t = 1; | |
4698 | } | |
4699 | ||
4700 | if(ptOrEta == "Pt") | |
4701 | { | |
4702 | pe = 0; | |
4703 | } else if(ptOrEta == "Eta") | |
4704 | { | |
4705 | pe = 1; | |
4706 | } | |
4707 | ||
4708 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
4709 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
4710 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
4711 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
4712 | ||
4713 | // looping over all bins and calculating reduced correlations: | |
4714 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
4715 | { | |
4716 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
4717 | Double_t p1n0kRe = 0.; | |
4718 | Double_t p1n0kIm = 0.; | |
4719 | ||
4720 | // number of POIs in particular pt or eta bin: | |
4721 | Double_t mp = 0.; | |
4722 | ||
4723 | // real and imaginary parts of q_{m*n,0} (non-weighted Q-vector evaluated for particles which are both RPs and POIs in particular pt or eta bin): | |
4724 | Double_t q1n0kRe = 0.; | |
4725 | Double_t q1n0kIm = 0.; | |
4726 | Double_t q2n0kRe = 0.; | |
4727 | Double_t q2n0kIm = 0.; | |
4728 | ||
4729 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
4730 | Double_t mq = 0.; | |
4731 | ||
4732 | if(type == "POI") | |
4733 | { | |
4734 | // q_{m*n,0}: | |
4735 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
4736 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
4737 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
4738 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
4739 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
4740 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
4741 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
4742 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
4743 | ||
4744 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
4745 | } | |
4746 | else if(type == "RP") | |
4747 | { | |
4748 | // q_{m*n,0}: | |
4749 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
4750 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
4751 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
4752 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
4753 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
4754 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
4755 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
4756 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
4757 | ||
4758 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
4759 | } | |
4760 | ||
4761 | if(type == "POI") | |
4762 | { | |
4763 | // p_{m*n,0}: | |
4764 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
4765 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
4766 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
4767 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
4768 | ||
4769 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
4770 | ||
4771 | t = 1; // typeFlag = RP or POI | |
4772 | } | |
4773 | else if(type == "RP") | |
4774 | { | |
4775 | // p_{m*n,0} = q_{m*n,0}: | |
4776 | p1n0kRe = q1n0kRe; | |
4777 | p1n0kIm = q1n0kIm; | |
4778 | ||
4779 | mp = mq; | |
4780 | ||
4781 | t = 0; // typeFlag = RP or POI | |
4782 | } | |
4783 | ||
4784 | // 2'-particle correlation for particular (pt,eta) bin: | |
4785 | Double_t two1n1nPtEta = 0.; | |
4786 | if(mp*dMult-mq) | |
4787 | { | |
4788 | two1n1nPtEta = (p1n0kRe*dReQ1n+p1n0kIm*dImQ1n-mq) | |
4789 | / (mp*dMult-mq); | |
4790 | ||
4791 | if(type == "POI") // to be improved (I do not this if) | |
4792 | { | |
4793 | // fill profile to get <<2'>> for POIs | |
4794 | fDiffFlowCorrelationsPro[1][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nPtEta,mp*dMult-mq); | |
4795 | // histogram to store <2'> for POIs e-b-e (needed in some other methods): | |
4796 | fDiffFlowCorrelationsEBE[1][pe][0]->SetBinContent(b,two1n1nPtEta); | |
4797 | fDiffFlowEventWeightsForCorrelationsEBE[1][pe][0]->SetBinContent(b,mp*dMult-mq); | |
4798 | } | |
4799 | else if(type == "RP") // to be improved (I do not this if) | |
4800 | { | |
4801 | // profile to get <<2'>> for RPs: | |
4802 | fDiffFlowCorrelationsPro[0][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nPtEta,mp*dMult-mq); | |
4803 | // histogram to store <2'> for RPs e-b-e (needed in some other methods): | |
4804 | fDiffFlowCorrelationsEBE[0][pe][0]->SetBinContent(b,two1n1nPtEta); | |
4805 | fDiffFlowEventWeightsForCorrelationsEBE[0][pe][0]->SetBinContent(b,mp*dMult-mq); | |
4806 | } | |
4807 | } // end of if(mp*dMult-mq) | |
4808 | ||
4809 | // 4'-particle correlation: | |
4810 | Double_t four1n1n1n1nPtEta = 0.; | |
4811 | if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
4812 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression) | |
4813 | { | |
4814 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
4815 | - q2n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) | |
4816 | - 2.*q2n0kIm*dReQ1n*dImQ1n | |
4817 | - p1n0kRe*(dReQ1n*dReQ2n+dImQ1n*dImQ2n) | |
4818 | + p1n0kIm*(dImQ1n*dReQ2n-dReQ1n*dImQ2n) | |
4819 | - 2.*dMult*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
4820 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*mq | |
4821 | + 6.*(q1n0kRe*dReQ1n+q1n0kIm*dImQ1n) | |
4822 | + 1.*(q2n0kRe*dReQ2n+q2n0kIm*dImQ2n) | |
4823 | + 2.*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
4824 | + 2.*mq*dMult | |
4825 | - 6.*mq) | |
4826 | / ((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
4827 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
4828 | ||
4829 | if(type == "POI") | |
4830 | { | |
4831 | // profile to get <<4'>> for POIs: | |
4832 | fDiffFlowCorrelationsPro[1][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nPtEta, | |
4833 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
4834 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
4835 | // histogram to store <4'> for POIs e-b-e (needed in some other methods): | |
4836 | fDiffFlowCorrelationsEBE[1][pe][1]->SetBinContent(b,four1n1n1n1nPtEta); | |
4837 | fDiffFlowEventWeightsForCorrelationsEBE[1][pe][1]->SetBinContent(b,(mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
4838 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
4839 | } | |
4840 | else if(type == "RP") | |
4841 | { | |
4842 | // profile to get <<4'>> for RPs: | |
4843 | fDiffFlowCorrelationsPro[0][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nPtEta, | |
4844 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
4845 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
4846 | // histogram to store <4'> for RPs e-b-e (needed in some other methods): | |
4847 | fDiffFlowCorrelationsEBE[0][pe][1]->SetBinContent(b,four1n1n1n1nPtEta); | |
4848 | fDiffFlowEventWeightsForCorrelationsEBE[0][pe][1]->SetBinContent(b,(mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
4849 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
4850 | } | |
4851 | } // end of if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
4852 | // +mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
4853 | ||
4854 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
4855 | ||
4856 | ||
4857 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelations(TString type, TString ptOrEta); | |
4858 | ||
4859 | ||
4860 | //================================================================================================================================ | |
4861 | ||
4862 | ||
4863 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfEventWeights(TString type, TString ptOrEta) | |
4864 | { | |
4865 | // Calculate sums of various event weights for reduced correlations. | |
4866 | // (These quantitites are needed in expressions for unbiased estimators relevant for the statistical errors.) | |
4867 | ||
4868 | Int_t typeFlag = -1; | |
4869 | Int_t ptEtaFlag = -1; | |
4870 | ||
4871 | if(type == "RP") | |
4872 | { | |
4873 | typeFlag = 0; | |
4874 | } else if(type == "POI") | |
4875 | { | |
4876 | typeFlag = 1; | |
4877 | } | |
4878 | ||
4879 | if(ptOrEta == "Pt") | |
4880 | { | |
4881 | ptEtaFlag = 0; | |
4882 | } else if(ptOrEta == "Eta") | |
4883 | { | |
4884 | ptEtaFlag = 1; | |
4885 | } | |
4886 | ||
4887 | // shortcuts: | |
4888 | Int_t t = typeFlag; | |
4889 | Int_t pe = ptEtaFlag; | |
4890 | ||
4891 | // binning: | |
4892 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
4893 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
4894 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
4895 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
4896 | ||
4897 | for(Int_t rpq=0;rpq<3;rpq++) | |
4898 | { | |
4899 | for(Int_t m=0;m<4;m++) | |
4900 | { | |
4901 | for(Int_t k=0;k<9;k++) | |
4902 | { | |
4903 | if(!fReRPQ1dEBE[rpq][pe][m][k]) | |
4904 | { | |
4905 | cout<<"WARNING: fReRPQ1dEBE[rpq][pe][m][k] is NULL in AFAWQC::CSAPOEWFDF() !!!!"<<endl; | |
4906 | cout<<"pe = "<<pe<<endl; | |
4907 | cout<<"rpq = "<<rpq<<endl; | |
4908 | cout<<"m = "<<m<<endl; | |
4909 | cout<<"k = "<<k<<endl; | |
4910 | exit(0); | |
4911 | } | |
4912 | } | |
4913 | } | |
4914 | } | |
4915 | ||
4916 | // multiplicities: | |
4917 | Double_t dMult = (*fSMpk)(0,0); // total event multiplicity | |
4918 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
4919 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
4920 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
4921 | ||
4922 | // event weights for reduced correlations: | |
4923 | Double_t dw2 = 0.; // event weight for <2'> | |
4924 | Double_t dw4 = 0.; // event weight for <4'> | |
4925 | //Double_t dw6 = 0.; // event weight for <6'> | |
4926 | //Double_t dw8 = 0.; // event weight for <8'> | |
4927 | ||
4928 | // looping over bins: | |
4929 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
4930 | { | |
4931 | if(type == "RP") | |
4932 | { | |
4933 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
4934 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
4935 | } else if(type == "POI") | |
4936 | { | |
4937 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
4938 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
4939 | } | |
4940 | ||
4941 | // event weight for <2'>: | |
4942 | dw2 = mp*dMult-mq; | |
4943 | fDiffFlowSumOfEventWeights[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2); | |
4944 | fDiffFlowSumOfEventWeights[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw2,2.)); | |
4945 | ||
4946 | // event weight for <4'>: | |
4947 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
4948 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); | |
4949 | fDiffFlowSumOfEventWeights[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4); | |
4950 | fDiffFlowSumOfEventWeights[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw4,2.)); | |
4951 | ||
4952 | // event weight for <6'>: | |
4953 | //dw6 = ...; | |
4954 | //fDiffFlowSumOfEventWeights[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6); | |
4955 | //fDiffFlowSumOfEventWeights[t][pe][t][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw6,2.)); | |
4956 | ||
4957 | // event weight for <8'>: | |
4958 | //dw8 = ...; | |
4959 | //fDiffFlowSumOfEventWeights[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw8); | |
4960 | //fDiffFlowSumOfEventWeights[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw8,2.)); | |
4961 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
4962 | ||
4963 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfEventWeights() | |
4964 | ||
4965 | ||
4966 | //================================================================================================================================ | |
4967 | ||
4968 | ||
4969 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta) | |
4970 | { | |
4971 | // Calculate sum of products of various event weights for both types of correlations (the ones for int. and diff. flow). | |
4972 | // (These quantitites are needed in expressions for unbiased estimators relevant for the statistical errors.) | |
4973 | // | |
4974 | // Important: To fill fDiffFlowSumOfProductOfEventWeights[][][][] use bellow table (i,j) with following constraints: | |
4975 | // 1.) i<j | |
4976 | // 2.) do not store terms which DO NOT include reduced correlations; | |
4977 | // Table: | |
4978 | // [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>] x [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>] | |
4979 | ||
4980 | Int_t typeFlag = -1; | |
4981 | Int_t ptEtaFlag = -1; | |
4982 | ||
4983 | if(type == "RP") | |
4984 | { | |
4985 | typeFlag = 0; | |
4986 | } else if(type == "POI") | |
4987 | { | |
4988 | typeFlag = 1; | |
4989 | } | |
4990 | ||
4991 | if(ptOrEta == "Pt") | |
4992 | { | |
4993 | ptEtaFlag = 0; | |
4994 | } else if(ptOrEta == "Eta") | |
4995 | { | |
4996 | ptEtaFlag = 1; | |
4997 | } | |
4998 | ||
4999 | // shortcuts: | |
5000 | Int_t t = typeFlag; | |
5001 | Int_t pe = ptEtaFlag; | |
5002 | ||
5003 | // binning: | |
5004 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
5005 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
5006 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
5007 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
5008 | ||
5009 | // protection: | |
5010 | for(Int_t rpq=0;rpq<3;rpq++) | |
5011 | { | |
5012 | for(Int_t m=0;m<4;m++) | |
5013 | { | |
5014 | for(Int_t k=0;k<9;k++) | |
5015 | { | |
5016 | if(!fReRPQ1dEBE[rpq][pe][m][k]) | |
5017 | { | |
5018 | cout<<"WARNING: fReRPQ1dEBE[rpq][pe][m][k] is NULL in AFAWQC::CSAPOEWFDF() !!!!"<<endl; | |
5019 | cout<<"pe = "<<pe<<endl; | |
5020 | cout<<"rpq = "<<rpq<<endl; | |
5021 | cout<<"m = "<<m<<endl; | |
5022 | cout<<"k = "<<k<<endl; | |
5023 | exit(0); | |
5024 | } | |
5025 | } | |
5026 | } | |
5027 | } | |
5028 | ||
5029 | // multiplicities: | |
5030 | Double_t dMult = (*fSMpk)(0,0); // total event multiplicity | |
5031 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
5032 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
5033 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
5034 | ||
5035 | // event weights for correlations: | |
5036 | Double_t dW2 = dMult*(dMult-1); // event weight for <2> | |
5037 | Double_t dW4 = dMult*(dMult-1)*(dMult-2)*(dMult-3); // event weight for <4> | |
5038 | Double_t dW6 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5); // event weight for <6> | |
5039 | Double_t dW8 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7); // event weight for <8> | |
5040 | ||
5041 | // event weights for reduced correlations: | |
5042 | Double_t dw2 = 0.; // event weight for <2'> | |
5043 | Double_t dw4 = 0.; // event weight for <4'> | |
5044 | //Double_t dw6 = 0.; // event weight for <6'> | |
5045 | //Double_t dw8 = 0.; // event weight for <8'> | |
5046 | ||
5047 | // looping over bins: | |
5048 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
5049 | { | |
5050 | if(type == "RP") | |
5051 | { | |
5052 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
5053 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
5054 | } else if(type == "POI") | |
5055 | { | |
5056 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
5057 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
5058 | } | |
5059 | ||
5060 | // event weight for <2'>: | |
5061 | dw2 = mp*dMult-mq; | |
5062 | fDiffFlowSumOfProductOfEventWeights[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw2); // storing product of even weights for <2> and <2'> | |
5063 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW4); // storing product of even weights for <4> and <2'> | |
5064 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW6); // storing product of even weights for <6> and <2'> | |
5065 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW8); // storing product of even weights for <8> and <2'> | |
5066 | ||
5067 | // event weight for <4'>: | |
5068 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5069 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); | |
5070 | fDiffFlowSumOfProductOfEventWeights[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw4); // storing product of even weights for <2> and <4'> | |
5071 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw4); // storing product of even weights for <2'> and <4'> | |
5072 | fDiffFlowSumOfProductOfEventWeights[t][pe][2][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw4); // storing product of even weights for <4> and <4'> | |
5073 | fDiffFlowSumOfProductOfEventWeights[t][pe][3][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dW6); // storing product of even weights for <6> and <4'> | |
5074 | fDiffFlowSumOfProductOfEventWeights[t][pe][3][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dW8); // storing product of even weights for <8> and <4'> | |
5075 | ||
5076 | // event weight for <6'>: | |
5077 | //dw6 = ...; | |
5078 | //fDiffFlowSumOfProductOfEventWeights[t][pe][0][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw6); // storing product of even weights for <2> and <6'> | |
5079 | //fDiffFlowSumOfProductOfEventWeights[t][pe][1][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw6); // storing product of even weights for <2'> and <6'> | |
5080 | //fDiffFlowSumOfProductOfEventWeights[t][pe][2][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw6); // storing product of even weights for <4> and <6'> | |
5081 | //fDiffFlowSumOfProductOfEventWeights[t][pe][3][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dw6); // storing product of even weights for <4'> and <6'> | |
5082 | //fDiffFlowSumOfProductOfEventWeights[t][pe][4][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW6*dw6); // storing product of even weights for <6> and <6'> | |
5083 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dW8); // storing product of even weights for <6'> and <8> | |
5084 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dw8); // storing product of even weights for <6'> and <8'> | |
5085 | ||
5086 | // event weight for <8'>: | |
5087 | //dw8 = ...; | |
5088 | //fDiffFlowSumOfProductOfEventWeights[t][pe][0][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw8); // storing product of even weights for <2> and <8'> | |
5089 | //fDiffFlowSumOfProductOfEventWeights[t][pe][1][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw8); // storing product of even weights for <2'> and <8'> | |
5090 | //fDiffFlowSumOfProductOfEventWeights[t][pe][2][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw8); // storing product of even weights for <4> and <8'> | |
5091 | //fDiffFlowSumOfProductOfEventWeights[t][pe][3][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dw8); // storing product of even weights for <4'> and <8'> | |
5092 | //fDiffFlowSumOfProductOfEventWeights[t][pe][4][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW6*dw8); // storing product of even weights for <6> and <8'> | |
5093 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dw8); // storing product of even weights for <6'> and <8'> | |
5094 | //fDiffFlowSumOfProductOfEventWeights[t][pe][6][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW8*dw8); // storing product of even weights for <8> and <8'> | |
5095 | ||
5096 | // Table: | |
5097 | // [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>] x [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>] | |
5098 | ||
5099 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
5100 | ||
5101 | ||
5102 | ||
5103 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta) | |
5104 | ||
5105 | ||
5106 | //================================================================================================================================ | |
5107 | ||
5108 | ||
5109 | void AliFlowAnalysisWithQCumulants::FinalizeReducedCorrelations(TString type, TString ptOrEta) | |
5110 | { | |
5111 | // Transfer profiles into histograms and calculate statistical errors correctly. | |
5112 | ||
5113 | Int_t typeFlag = -1; | |
5114 | Int_t ptEtaFlag = -1; | |
5115 | ||
5116 | if(type == "RP") | |
5117 | { | |
5118 | typeFlag = 0; | |
5119 | } else if(type == "POI") | |
5120 | { | |
5121 | typeFlag = 1; | |
5122 | } | |
5123 | ||
5124 | if(ptOrEta == "Pt") | |
5125 | { | |
5126 | ptEtaFlag = 0; | |
5127 | } else if(ptOrEta == "Eta") | |
5128 | { | |
5129 | ptEtaFlag = 1; | |
5130 | } | |
5131 | ||
5132 | // shortcuts: | |
5133 | Int_t t = typeFlag; | |
5134 | Int_t pe = ptEtaFlag; | |
5135 | ||
5136 | for(Int_t rci=0;rci<4;rci++) | |
5137 | { | |
5138 | if(!fDiffFlowCorrelationsPro[t][pe][rci]) | |
5139 | { | |
5140 | cout<<"WARNING: fDiffFlowCorrelationsPro[t][pe][rci] is NULL in AFAWQC::FRC() !!!!"<<endl; | |
5141 | cout<<"t = "<<t<<endl; | |
5142 | cout<<"pe = "<<pe<<endl; | |
5143 | cout<<"rci = "<<rci<<endl; | |
5144 | exit(0); | |
5145 | } | |
5146 | for(Int_t power=0;power<2;power++) | |
5147 | { | |
5148 | if(!fDiffFlowSumOfEventWeights[t][pe][power][rci]) | |
5149 | { | |
5150 | cout<<"WARNING: fDiffFlowSumOfEventWeights[t][pe][power][rci] is NULL in AFAWQC::FRC() !!!!"<<endl; | |
5151 | cout<<"t = "<<t<<endl; | |
5152 | cout<<"pe = "<<pe<<endl; | |
5153 | cout<<"power = "<<power<<endl; | |
5154 | cout<<"rci = "<<rci<<endl; | |
5155 | exit(0); | |
5156 | } | |
5157 | } // end of for(Int_t power=0;power<2;power++) | |
5158 | } // end of for(Int_t rci=0;rci<4;rci++) | |
5159 | ||
5160 | // common: | |
5161 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
5162 | ||
5163 | // transfer 1D profile into 1D histogram: | |
5164 | Double_t correlation = 0.; | |
5165 | Double_t spread = 0.; | |
5166 | Double_t sumOfWeights = 0.; // sum of weights for particular reduced correlations for particular pt or eta bin | |
5167 | Double_t sumOfSquaredWeights = 0.; // sum of squared weights for particular reduced correlations for particular pt or eta bin | |
5168 | Double_t error = 0.; // error = termA * spread * termB | |
5169 | // termA = (sqrt(sumOfSquaredWeights)/sumOfWeights) | |
5170 | // termB = 1/pow(1-termA^2,0.5) | |
5171 | Double_t termA = 0.; | |
5172 | Double_t termB = 0.; | |
5173 | for(Int_t rci=0;rci<4;rci++) // index of reduced correlation | |
5174 | { | |
5175 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) // number of pt or eta bins | |
5176 | { | |
5177 | correlation = fDiffFlowCorrelationsPro[t][pe][rci]->GetBinContent(b); | |
5178 | spread = fDiffFlowCorrelationsPro[t][pe][rci]->GetBinError(b); | |
5179 | sumOfWeights = fDiffFlowSumOfEventWeights[t][pe][0][rci]->GetBinContent(b); | |
5180 | sumOfSquaredWeights = fDiffFlowSumOfEventWeights[t][pe][1][rci]->GetBinContent(b); | |
5181 | if(sumOfWeights) termA = (pow(sumOfSquaredWeights,0.5)/sumOfWeights); | |
5182 | if(1.-pow(termA,2.)>0.) termB = 1./pow(1.-pow(termA,2.),0.5); | |
5183 | error = termA*spread*termB; // final error (unbiased estimator for standard deviation) | |
5184 | fDiffFlowCorrelationsHist[t][pe][rci]->SetBinContent(b,correlation); | |
5185 | fDiffFlowCorrelationsHist[t][pe][rci]->SetBinError(b,error); | |
5186 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
5187 | } // end of for(Int_t rci=0;rci<4;rci++) | |
5188 | ||
5189 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeReducedCorrelations(TString type, TString ptOrEta) | |
5190 | ||
5191 | ||
5192 | //================================================================================================================================ | |
5193 | ||
5194 | ||
5195 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta) | |
5196 | { | |
5197 | // store products: <2><2'>, <2><4'>, <2><6'>, <2><8'>, <2'><4>, | |
5198 | // <2'><4'>, <2'><6>, <2'><6'>, <2'><8>, <2'><8'>, | |
5199 | // <4><4'>, <4><6'>, <4><8'>, <4'><6>, <4'><6'>, | |
5200 | // <4'><8>, <4'><8'>, <6><6'>, <6><8'>, <6'><8>, | |
5201 | // <6'><8'>, <8><8'>. | |
5202 | ||
5203 | Int_t typeFlag = -1; | |
5204 | Int_t ptEtaFlag = -1; | |
5205 | ||
5206 | if(type == "RP") | |
5207 | { | |
5208 | typeFlag = 0; | |
5209 | } else if(type == "POI") | |
5210 | { | |
5211 | typeFlag = 1; | |
5212 | } | |
5213 | ||
5214 | if(ptOrEta == "Pt") | |
5215 | { | |
5216 | ptEtaFlag = 0; | |
5217 | } else if(ptOrEta == "Eta") | |
5218 | { | |
5219 | ptEtaFlag = 1; | |
5220 | } | |
5221 | ||
5222 | // shortcuts: | |
5223 | Int_t t = typeFlag; | |
5224 | Int_t pe = ptEtaFlag; | |
5225 | ||
5226 | // common: | |
5227 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
5228 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
5229 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
5230 | ||
5231 | // protections // to be improved (add protection for all pointers in this method) | |
5232 | if(!fIntFlowCorrelationsEBE) | |
5233 | { | |
5234 | cout<<"WARNING: fIntFlowCorrelationsEBE is NULL in AFAWQC::CDFPOC() !!!!"<<endl; | |
5235 | exit(0); | |
5236 | } | |
5237 | ||
5238 | /* | |
5239 | Double_t dMult = (*fSMpk)(0,0); // multiplicity (number of particles used to determine the reaction plane) | |
5240 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
5241 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
5242 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
5243 | */ | |
5244 | ||
5245 | // e-b-e correlations: | |
5246 | Double_t twoEBE = fIntFlowCorrelationsEBE->GetBinContent(1); // <2> | |
5247 | Double_t fourEBE = fIntFlowCorrelationsEBE->GetBinContent(2); // <4> | |
5248 | Double_t sixEBE = fIntFlowCorrelationsEBE->GetBinContent(3); // <6> | |
5249 | Double_t eightEBE = fIntFlowCorrelationsEBE->GetBinContent(4); // <8> | |
5250 | ||
5251 | // event weights for correlations: | |
5252 | Double_t dW2 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1); // event weight for <2> | |
5253 | Double_t dW4 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2); // event weight for <4> | |
5254 | Double_t dW6 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(3); // event weight for <6> | |
5255 | Double_t dW8 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(4); // event weight for <8> | |
5256 | ||
5257 | // e-b-e reduced correlations: | |
5258 | Double_t twoReducedEBE = 0.; // <2'> | |
5259 | Double_t fourReducedEBE = 0.; // <4'> | |
5260 | Double_t sixReducedEBE = 0.; // <6'> | |
5261 | Double_t eightReducedEBE = 0.; // <8'> | |
5262 | ||
5263 | // event weights for reduced correlations: | |
5264 | Double_t dw2 = 0.; // event weight for <2'> | |
5265 | Double_t dw4 = 0.; // event weight for <4'> | |
5266 | //Double_t dw6 = 0.; // event weight for <6'> | |
5267 | //Double_t dw8 = 0.; // event weight for <8'> | |
5268 | ||
5269 | // looping over bins: | |
5270 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
5271 | { | |
5272 | // e-b-e reduced correlations: | |
5273 | twoReducedEBE = fDiffFlowCorrelationsEBE[t][pe][0]->GetBinContent(b); | |
5274 | fourReducedEBE = fDiffFlowCorrelationsEBE[t][pe][1]->GetBinContent(b); | |
5275 | sixReducedEBE = fDiffFlowCorrelationsEBE[t][pe][2]->GetBinContent(b); | |
5276 | eightReducedEBE = fDiffFlowCorrelationsEBE[t][pe][3]->GetBinContent(b); | |
5277 | ||
5278 | /* | |
5279 | // to be improved (I should not do this here again) | |
5280 | if(type == "RP") | |
5281 | { | |
5282 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
5283 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
5284 | } else if(type == "POI") | |
5285 | { | |
5286 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
5287 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
5288 | } | |
5289 | ||
5290 | // event weights for reduced correlations: | |
5291 | dw2 = mp*dMult-mq; // weight for <2'> | |
5292 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5293 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); // weight for <4'> | |
5294 | //dw6 = ... | |
5295 | //dw8 = ... | |
5296 | ||
5297 | */ | |
5298 | ||
5299 | dw2 = fDiffFlowEventWeightsForCorrelationsEBE[t][pe][0]->GetBinContent(b); | |
5300 | dw4 = fDiffFlowEventWeightsForCorrelationsEBE[t][pe][1]->GetBinContent(b); | |
5301 | ||
5302 | // storing all products: | |
5303 | fDiffFlowProductOfCorrelationsPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*twoReducedEBE,dW2*dw2); // storing <2><2'> | |
5304 | fDiffFlowProductOfCorrelationsPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*twoReducedEBE,dW4*dw2); // storing <4><2'> | |
5305 | fDiffFlowProductOfCorrelationsPro[t][pe][1][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*twoReducedEBE,dW6*dw2); // storing <6><2'> | |
5306 | fDiffFlowProductOfCorrelationsPro[t][pe][1][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*twoReducedEBE,dW8*dw2); // storing <8><2'> | |
5307 | ||
5308 | // event weight for <4'>: | |
5309 | fDiffFlowProductOfCorrelationsPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*fourReducedEBE,dW2*dw4); // storing <2><4'> | |
5310 | fDiffFlowProductOfCorrelationsPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*fourReducedEBE,dw2*dw4); // storing <2'><4'> | |
5311 | fDiffFlowProductOfCorrelationsPro[t][pe][2][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*fourReducedEBE,dW4*dw4); // storing <4><4'> | |
5312 | fDiffFlowProductOfCorrelationsPro[t][pe][3][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*fourReducedEBE,dW6*dw4); // storing <6><4'> | |
5313 | fDiffFlowProductOfCorrelationsPro[t][pe][3][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*fourReducedEBE,dW8*dw4); // storing <8><4'> | |
5314 | ||
5315 | // event weight for <6'>: | |
5316 | //dw6 = ...; | |
5317 | //fDiffFlowProductOfCorrelationsPro[t][pe][0][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*sixReducedEBE,dW2*dw6); // storing <2><6'> | |
5318 | //fDiffFlowProductOfCorrelationsPro[t][pe][1][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*sixReducedEBE,dw2*dw6); // storing <2'><6'> | |
5319 | //fDiffFlowProductOfCorrelationsPro[t][pe][2][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*sixReducedEBE,dW4*dw6); // storing <4><6'> | |
5320 | //fDiffFlowProductOfCorrelationsPro[t][pe][3][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourReducedEBE*sixReducedEBE,dw4*dw6); // storing <4'><6'> | |
5321 | //fDiffFlowProductOfCorrelationsPro[t][pe][4][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*sixReducedEBE,dW6*dw6); // storing <6><6'> | |
5322 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightEBE,dw6*dW8); // storing <6'><8> | |
5323 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightReducedEBE,dw6*dw8); // storing <6'><8'> | |
5324 | ||
5325 | // event weight for <8'>: | |
5326 | //dw8 = ...; | |
5327 | //fDiffFlowProductOfCorrelationsPro[t][pe][0][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*eightReducedEBE,dW2*dw8); // storing <2><8'> | |
5328 | //fDiffFlowProductOfCorrelationsPro[t][pe][1][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*eightReducedEBE,dw2*dw8); // storing <2'><8'> | |
5329 | //fDiffFlowProductOfCorrelationsPro[t][pe][2][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*eightReducedEBE,dW4*dw8); // storing <4><8'> | |
5330 | //fDiffFlowProductOfCorrelationsPro[t][pe][3][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourReducedEBE*eightReducedEBE,dw4*dw8); // storing <4'><8'> | |
5331 | //fDiffFlowProductOfCorrelationsPro[t][pe][4][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*eightReducedEBE,dW6*dw8); // storing <6><8'> | |
5332 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightReducedEBE,dw6*dw8); // storing <6'><8'> | |
5333 | //fDiffFlowProductOfCorrelationsPro[t][pe][6][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*eightReducedEBE,dW8*dw8); // storing <8><8'> | |
5334 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++ | |
5335 | ||
5336 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta) | |
5337 | ||
5338 | ||
5339 | //================================================================================================================================ | |
5340 | ||
5341 | ||
5342 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCovariances(TString type, TString ptOrEta) // to be improved (reimplemented) | |
5343 | { | |
5344 | // a) Calculate unbiased estimators Cov(<2>,<2'>), Cov(<2>,<4'>), Cov(<4>,<2'>), Cov(<4>,<4'>) and Cov(<2'>,<4'>) | |
5345 | // for covariances V(<2>,<2'>), V(<2>,<4'>), V(<4>,<2'>), V(<4>,<4'>) and V(<2'>,<4'>). | |
5346 | // b) Store in histogram fDiffFlowCovariances[t][pe][index] for instance the following: | |
5347 | // | |
5348 | // Cov(<2>,<2'>) * (sum_{i=1}^{N} w_{<2>}_i w_{<2'>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<2'>}_j)] | |
5349 | // | |
5350 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<2'>} is event weight for <2'>. | |
5351 | // c) Binning of fDiffFlowCovariances[t][pe][index] is organized as follows: | |
5352 | // | |
5353 | // 1st bin: Cov(<2>,<2'>) * (sum_{i=1}^{N} w_{<2>}_i w_{<2'>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<2'>}_j)] | |
5354 | // 2nd bin: Cov(<2>,<4'>) * (sum_{i=1}^{N} w_{<2>}_i w_{<4'>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<4'>}_j)] | |
5355 | // 3rd bin: Cov(<4>,<2'>) * (sum_{i=1}^{N} w_{<4>}_i w_{<2'>}_i )/[(sum_{i=1}^{N} w_{<4>}_i) * (sum_{j=1}^{N} w_{<2'>}_j)] | |
5356 | // 4th bin: Cov(<4>,<4'>) * (sum_{i=1}^{N} w_{<4>}_i w_{<4'>}_i )/[(sum_{i=1}^{N} w_{<4>}_i) * (sum_{j=1}^{N} w_{<4'>}_j)] | |
5357 | // 5th bin: Cov(<2'>,<4'>) * (sum_{i=1}^{N} w_{<2'>}_i w_{<4'>}_i )/[(sum_{i=1}^{N} w_{<2'>}_i) * (sum_{j=1}^{N} w_{<4'>}_j)] | |
5358 | // ... | |
5359 | ||
5360 | Int_t typeFlag = -1; | |
5361 | Int_t ptEtaFlag = -1; | |
5362 | ||
5363 | if(type == "RP") | |
5364 | { | |
5365 | typeFlag = 0; | |
5366 | } else if(type == "POI") | |
5367 | { | |
5368 | typeFlag = 1; | |
5369 | } | |
5370 | ||
5371 | if(ptOrEta == "Pt") | |
5372 | { | |
5373 | ptEtaFlag = 0; | |
5374 | } else if(ptOrEta == "Eta") | |
5375 | { | |
5376 | ptEtaFlag = 1; | |
5377 | } | |
5378 | ||
5379 | // shortcuts: | |
5380 | Int_t t = typeFlag; | |
5381 | Int_t pe = ptEtaFlag; | |
5382 | ||
5383 | // common: | |
5384 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
5385 | //Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
5386 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
5387 | //Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
5388 | ||
5389 | // average correlations: | |
5390 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
5391 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
5392 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
5393 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
5394 | ||
5395 | // sum of weights for correlation: | |
5396 | Double_t sumOfWeightsForTwo = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // sum_{i=1}^{N} w_{<2>} | |
5397 | Double_t sumOfWeightsForFour = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // sum_{i=1}^{N} w_{<4>} | |
5398 | //Double_t sumOfWeightsForSix = fIntFlowSumOfEventWeights[0]->GetBinContent(3); // sum_{i=1}^{N} w_{<6>} | |
5399 | //Double_t sumOfWeightsForEight = fIntFlowSumOfEventWeights[0]->GetBinContent(4); // sum_{i=1}^{N} w_{<8>} | |
5400 | ||
5401 | // average reduced correlations: | |
5402 | Double_t twoReduced = 0.; // <<2'>> | |
5403 | Double_t fourReduced = 0.; // <<4'>> | |
5404 | //Double_t sixReduced = 0.; // <<6'>> | |
5405 | //Double_t eightReduced = 0.; // <<8'>> | |
5406 | ||
5407 | // sum of weights for reduced correlation: | |
5408 | Double_t sumOfWeightsForTwoReduced = 0.; // sum_{i=1}^{N} w_{<2'>} | |
5409 | Double_t sumOfWeightsForFourReduced = 0.; // sum_{i=1}^{N} w_{<4'>} | |
5410 | //Double_t sumOfWeightsForSixReduced = 0.; // sum_{i=1}^{N} w_{<6'>} | |
5411 | //Double_t sumOfWeightsForEightReduced = 0.; // sum_{i=1}^{N} w_{<8'>} | |
5412 | ||
5413 | // product of weights for reduced correlation: | |
5414 | Double_t productOfWeightsForTwoTwoReduced = 0.; // sum_{i=1}^{N} w_{<2>}w_{<2'>} | |
5415 | Double_t productOfWeightsForTwoFourReduced = 0.; // sum_{i=1}^{N} w_{<2>}w_{<4'>} | |
5416 | Double_t productOfWeightsForFourTwoReduced = 0.; // sum_{i=1}^{N} w_{<4>}w_{<2'>} | |
5417 | Double_t productOfWeightsForFourFourReduced = 0.; // sum_{i=1}^{N} w_{<4>}w_{<4'>} | |
5418 | Double_t productOfWeightsForTwoReducedFourReduced = 0.; // sum_{i=1}^{N} w_{<2'>}w_{<4'>} | |
5419 | // ... | |
5420 | ||
5421 | // products for differential flow: | |
5422 | Double_t twoTwoReduced = 0; // <<2><2'>> | |
5423 | Double_t twoFourReduced = 0; // <<2><4'>> | |
5424 | Double_t fourTwoReduced = 0; // <<4><2'>> | |
5425 | Double_t fourFourReduced = 0; // <<4><4'>> | |
5426 | Double_t twoReducedFourReduced = 0; // <<2'><4'>> | |
5427 | ||
5428 | // denominators in the expressions for the unbiased estimators for covariances: | |
5429 | // denominator = 1 - term1/(term2*term3) | |
5430 | // prefactor = term1/(term2*term3) | |
5431 | Double_t denominator = 0.; | |
5432 | Double_t prefactor = 0.; | |
5433 | Double_t term1 = 0.; | |
5434 | Double_t term2 = 0.; | |
5435 | Double_t term3 = 0.; | |
5436 | ||
5437 | // unbiased estimators for covariances for differential flow: | |
5438 | Double_t covTwoTwoReduced = 0.; // Cov(<2>,<2'>) | |
5439 | Double_t wCovTwoTwoReduced = 0.; // Cov(<2>,<2'>) * prefactor(w_{<2>},w_{<2'>}) | |
5440 | Double_t covTwoFourReduced = 0.; // Cov(<2>,<4'>) | |
5441 | Double_t wCovTwoFourReduced = 0.; // Cov(<2>,<4'>) * prefactor(w_{<2>},w_{<4'>}) | |
5442 | Double_t covFourTwoReduced = 0.; // Cov(<4>,<2'>) | |
5443 | Double_t wCovFourTwoReduced = 0.; // Cov(<4>,<2'>) * prefactor(w_{<4>},w_{<2'>}) | |
5444 | Double_t covFourFourReduced = 0.; // Cov(<4>,<4'>) | |
5445 | Double_t wCovFourFourReduced = 0.; // Cov(<4>,<4'>) * prefactor(w_{<4>},w_{<4'>}) | |
5446 | Double_t covTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) | |
5447 | Double_t wCovTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) * prefactor(w_{<2'>},w_{<4'>}) | |
5448 | ||
5449 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
5450 | { | |
5451 | // average reduced corelations: | |
5452 | twoReduced = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); | |
5453 | fourReduced = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); | |
5454 | // average products: | |
5455 | twoTwoReduced = fDiffFlowProductOfCorrelationsPro[t][pe][0][1]->GetBinContent(b); | |
5456 | twoFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][0][3]->GetBinContent(b); | |
5457 | fourTwoReduced = fDiffFlowProductOfCorrelationsPro[t][pe][1][2]->GetBinContent(b); | |
5458 | fourFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][2][3]->GetBinContent(b); | |
5459 | twoReducedFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][1][3]->GetBinContent(b); | |
5460 | // sum of weights for reduced correlations: | |
5461 | sumOfWeightsForTwoReduced = fDiffFlowSumOfEventWeights[t][pe][0][0]->GetBinContent(b); | |
5462 | sumOfWeightsForFourReduced = fDiffFlowSumOfEventWeights[t][pe][0][1]->GetBinContent(b); | |
5463 | // products of weights for correlations: | |
5464 | productOfWeightsForTwoTwoReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][0][1]->GetBinContent(b); | |
5465 | productOfWeightsForTwoFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][0][3]->GetBinContent(b); | |
5466 | productOfWeightsForFourTwoReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][1][2]->GetBinContent(b); | |
5467 | productOfWeightsForFourFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][2][3]->GetBinContent(b); | |
5468 | productOfWeightsForTwoReducedFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][1][3]->GetBinContent(b); | |
5469 | // denominator for the unbiased estimator for covariances: 1 - term1/(term2*term3) | |
5470 | // prefactor (multiplies Cov's) = term1/(term2*term3) | |
5471 | // <2>,<2'>: | |
5472 | term1 = productOfWeightsForTwoTwoReduced; | |
5473 | term2 = sumOfWeightsForTwo; | |
5474 | term3 = sumOfWeightsForTwoReduced; | |
5475 | if(term2*term3>0.) | |
5476 | { | |
5477 | denominator = 1.-term1/(term2*term3); | |
5478 | prefactor = term1/(term2*term3); | |
5479 | if(denominator!=0.) | |
5480 | { | |
5481 | covTwoTwoReduced = (twoTwoReduced-two*twoReduced)/denominator; | |
5482 | wCovTwoTwoReduced = covTwoTwoReduced*prefactor; | |
5483 | fDiffFlowCovariances[t][pe][0]->SetBinContent(b,wCovTwoTwoReduced); | |
5484 | } | |
5485 | } | |
5486 | // <2>,<4'>: | |
5487 | term1 = productOfWeightsForTwoFourReduced; | |
5488 | term2 = sumOfWeightsForTwo; | |
5489 | term3 = sumOfWeightsForFourReduced; | |
5490 | if(term2*term3>0.) | |
5491 | { | |
5492 | denominator = 1.-term1/(term2*term3); | |
5493 | prefactor = term1/(term2*term3); | |
5494 | if(denominator!=0.) | |
5495 | { | |
5496 | covTwoFourReduced = (twoFourReduced-two*fourReduced)/denominator; | |
5497 | wCovTwoFourReduced = covTwoFourReduced*prefactor; | |
5498 | fDiffFlowCovariances[t][pe][1]->SetBinContent(b,wCovTwoFourReduced); | |
5499 | } | |
5500 | } | |
5501 | // <4>,<2'>: | |
5502 | term1 = productOfWeightsForFourTwoReduced; | |
5503 | term2 = sumOfWeightsForFour; | |
5504 | term3 = sumOfWeightsForTwoReduced; | |
5505 | if(term2*term3>0.) | |
5506 | { | |
5507 | denominator = 1.-term1/(term2*term3); | |
5508 | prefactor = term1/(term2*term3); | |
5509 | if(denominator!=0.) | |
5510 | { | |
5511 | covFourTwoReduced = (fourTwoReduced-four*twoReduced)/denominator; | |
5512 | wCovFourTwoReduced = covFourTwoReduced*prefactor; | |
5513 | fDiffFlowCovariances[t][pe][2]->SetBinContent(b,wCovFourTwoReduced); | |
5514 | } | |
5515 | } | |
5516 | // <4>,<4'>: | |
5517 | term1 = productOfWeightsForFourFourReduced; | |
5518 | term2 = sumOfWeightsForFour; | |
5519 | term3 = sumOfWeightsForFourReduced; | |
5520 | if(term2*term3>0.) | |
5521 | { | |
5522 | denominator = 1.-term1/(term2*term3); | |
5523 | prefactor = term1/(term2*term3); | |
5524 | if(denominator!=0.) | |
5525 | { | |
5526 | covFourFourReduced = (fourFourReduced-four*fourReduced)/denominator; | |
5527 | wCovFourFourReduced = covFourFourReduced*prefactor; | |
5528 | fDiffFlowCovariances[t][pe][3]->SetBinContent(b,wCovFourFourReduced); | |
5529 | } | |
5530 | } | |
5531 | // <2'>,<4'>: | |
5532 | term1 = productOfWeightsForTwoReducedFourReduced; | |
5533 | term2 = sumOfWeightsForTwoReduced; | |
5534 | term3 = sumOfWeightsForFourReduced; | |
5535 | if(term2*term3>0.) | |
5536 | { | |
5537 | denominator = 1.-term1/(term2*term3); | |
5538 | prefactor = term1/(term2*term3); | |
5539 | if(denominator!=0.) | |
5540 | { | |
5541 | covTwoReducedFourReduced = (twoReducedFourReduced-twoReduced*fourReduced)/denominator; | |
5542 | wCovTwoReducedFourReduced = covTwoReducedFourReduced*prefactor; | |
5543 | fDiffFlowCovariances[t][pe][4]->SetBinContent(b,wCovTwoReducedFourReduced); | |
5544 | } | |
5545 | } | |
5546 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
5547 | ||
5548 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCovariances(TString type, TString ptOrEta) | |
5549 | ||
5550 | ||
5551 | //================================================================================================================================ | |
5552 | ||
5553 | ||
5554 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlow(TString type, TString ptOrEta) | |
5555 | { | |
5556 | // calculate differential flow from differential cumulants and previously obtained integrated flow: (to be improved: description) | |
5557 | ||
5558 | Int_t typeFlag = -1; | |
5559 | Int_t ptEtaFlag = -1; | |
5560 | ||
5561 | if(type == "RP") | |
5562 | { | |
5563 | typeFlag = 0; | |
5564 | } else if(type == "POI") | |
5565 | { | |
5566 | typeFlag = 1; | |
5567 | } | |
5568 | ||
5569 | if(ptOrEta == "Pt") | |
5570 | { | |
5571 | ptEtaFlag = 0; | |
5572 | } else if(ptOrEta == "Eta") | |
5573 | { | |
5574 | ptEtaFlag = 1; | |
5575 | } | |
5576 | ||
5577 | // shortcuts: | |
5578 | Int_t t = typeFlag; | |
5579 | Int_t pe = ptEtaFlag; | |
5580 | ||
5581 | // common: | |
5582 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
5583 | ||
5584 | // correlations: | |
5585 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
5586 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
5587 | ||
5588 | // statistical errors of correlations: | |
5589 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); | |
5590 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); | |
5591 | ||
5592 | // reduced correlations: | |
5593 | Double_t twoReduced = 0.; // <<2'>> | |
5594 | Double_t fourReduced = 0.; // <<4'>> | |
5595 | ||
5596 | // statistical errors of reduced correlations: | |
5597 | Double_t twoReducedError = 0.; | |
5598 | Double_t fourReducedError = 0.; | |
5599 | ||
5600 | // covariances: | |
5601 | Double_t wCovTwoFour = fIntFlowCovariances->GetBinContent(1);// // Cov(<2>,<4>) * prefactor(<2>,<4>) | |
5602 | Double_t wCovTwoTwoReduced = 0.; // Cov(<2>,<2'>) * prefactor(<2>,<2'>) | |
5603 | Double_t wCovTwoFourReduced = 0.; // Cov(<2>,<4'>) * prefactor(<2>,<4'>) | |
5604 | Double_t wCovFourTwoReduced = 0.; // Cov(<4>,<2'>) * prefactor(<4>,<2'>) | |
5605 | Double_t wCovFourFourReduced = 0.; // Cov(<4>,<4'>) * prefactor(<4>,<4'>) | |
5606 | Double_t wCovTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) * prefactor(<2'>,<4'>) | |
5607 | ||
5608 | // differential flow: | |
5609 | Double_t v2Prime = 0.; // v'{2} | |
5610 | Double_t v4Prime = 0.; // v'{4} | |
5611 | ||
5612 | // statistical error of differential flow: | |
5613 | Double_t v2PrimeError = 0.; | |
5614 | Double_t v4PrimeError = 0.; | |
5615 | ||
5616 | // squared statistical error of differential flow: | |
5617 | Double_t v2PrimeErrorSquared = 0.; | |
5618 | Double_t v4PrimeErrorSquared = 0.; | |
5619 | ||
5620 | // loop over pt or eta bins: | |
5621 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
5622 | { | |
5623 | // reduced correlations and statistical errors: | |
5624 | twoReduced = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); | |
5625 | twoReducedError = fDiffFlowCorrelationsHist[t][pe][0]->GetBinError(b); | |
5626 | fourReduced = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); | |
5627 | fourReducedError = fDiffFlowCorrelationsHist[t][pe][1]->GetBinError(b); | |
5628 | // covariances: | |
5629 | wCovTwoTwoReduced = fDiffFlowCovariances[t][pe][0]->GetBinContent(b); | |
5630 | wCovTwoFourReduced = fDiffFlowCovariances[t][pe][1]->GetBinContent(b); | |
5631 | wCovFourTwoReduced = fDiffFlowCovariances[t][pe][2]->GetBinContent(b); | |
5632 | wCovFourFourReduced = fDiffFlowCovariances[t][pe][3]->GetBinContent(b); | |
5633 | wCovTwoReducedFourReduced = fDiffFlowCovariances[t][pe][4]->GetBinContent(b); | |
5634 | // differential flow: | |
5635 | // v'{2}: | |
5636 | if(two>0.) | |
5637 | { | |
5638 | v2Prime = twoReduced/pow(two,0.5); | |
5639 | v2PrimeErrorSquared = (1./4.)*pow(two,-3.)* | |
5640 | (pow(twoReduced,2.)*pow(twoError,2.) | |
5641 | + 4.*pow(two,2.)*pow(twoReducedError,2.) | |
5642 | - 4.*two*twoReduced*wCovTwoTwoReduced); | |
5643 | ||
5644 | ||
5645 | if(v2PrimeErrorSquared>0.) v2PrimeError = pow(v2PrimeErrorSquared,0.5); | |
5646 | fDiffFlow[t][pe][0]->SetBinContent(b,v2Prime); | |
5647 | fDiffFlow[t][pe][0]->SetBinError(b,v2PrimeError); | |
5648 | } | |
5649 | // differential flow: | |
5650 | // v'{4} | |
5651 | if(2.*pow(two,2.)-four > 0.) | |
5652 | { | |
5653 | v4Prime = (2.*two*twoReduced-fourReduced)/pow(2.*pow(two,2.)-four,3./4.); | |
5654 | v4PrimeErrorSquared = pow(2.*pow(two,2.)-four,-7./2.)* | |
5655 | (pow(2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced,2.)*pow(twoError,2.) | |
5656 | + (9./16.)*pow(2.*two*twoReduced-fourReduced,2.)*pow(fourError,2.) | |
5657 | + 4.*pow(two,2.)*pow(2.*pow(two,2.)-four,2.)*pow(twoReducedError,2.) | |
5658 | + pow(2.*pow(two,2.)-four,2.)*pow(fourReducedError,2.) | |
5659 | - (3./2.)*(2.*two*twoReduced-fourReduced) | |
5660 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoFour | |
5661 | - 4.*two*(2.*pow(two,2.)-four) | |
5662 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoTwoReduced | |
5663 | + 2.*(2.*pow(two,2.)-four) | |
5664 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoFourReduced | |
5665 | + 3.*two*(2.*pow(two,2.)-four)*(2.*two*twoReduced-fourReduced)*wCovFourTwoReduced | |
5666 | - (3./2.)*(2.*pow(two,2.)-four)*(2.*two*twoReduced-fourReduced)*wCovFourFourReduced | |
5667 | - 4.*two*pow(2.*pow(two,2.)-four,2.)*wCovTwoReducedFourReduced); | |
5668 | if(v4PrimeErrorSquared>0.) v4PrimeError = pow(v4PrimeErrorSquared,0.5); | |
5669 | fDiffFlow[t][pe][1]->SetBinContent(b,v4Prime); | |
5670 | fDiffFlow[t][pe][1]->SetBinError(b,v4PrimeError); | |
5671 | } | |
5672 | ||
5673 | } // end of for(Int_t b=1;b<=fnBinsPtEta[pe];b++) | |
5674 | ||
5675 | ||
5676 | ||
5677 | ||
5678 | /* | |
5679 | // 2D: | |
5680 | for(Int_t nua=0;nua<2;nua++) | |
5681 | { | |
5682 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5683 | { | |
5684 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5685 | { | |
5686 | // differential cumulants: | |
5687 | Double_t qc2Prime = fFinalCumulants2D[t][pW][eW][nua][0]->GetBinContent(fFinalCumulants2D[t][pW][eW][nua][0]->GetBin(p,e)); // QC{2'} | |
5688 | Double_t qc4Prime = fFinalCumulants2D[t][pW][eW][nua][1]->GetBinContent(fFinalCumulants2D[t][pW][eW][nua][1]->GetBin(p,e)); // QC{4'} | |
5689 | // differential flow: | |
5690 | Double_t v2Prime = 0.; | |
5691 | Double_t v4Prime = 0.; | |
5692 | if(v2) | |
5693 | { | |
5694 | v2Prime = qc2Prime/v2; | |
5695 | fFinalFlow2D[t][pW][eW][nua][0]->SetBinContent(fFinalFlow2D[t][pW][eW][nua][0]->GetBin(p,e),v2Prime); | |
5696 | } | |
5697 | if(v4) | |
5698 | { | |
5699 | v4Prime = -qc4Prime/pow(v4,3.); | |
5700 | fFinalFlow2D[t][pW][eW][nua][1]->SetBinContent(fFinalFlow2D[t][pW][eW][nua][1]->GetBin(p,e),v4Prime); | |
5701 | } | |
5702 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5703 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5704 | } // end of for(Int_t nua=0;nua<2;nua++) | |
5705 | */ | |
5706 | ||
5707 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlow(TString type, Bool_t useParticleWeights) | |
5708 | ||
5709 | ||
5710 | //================================================================================================================================ | |
5711 | ||
5712 | ||
5713 | void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags() | |
5714 | { | |
5715 | // a) Store all flags for integrated flow in profile fIntFlowFlags. | |
5716 | ||
5717 | if(!fIntFlowFlags) | |
5718 | { | |
5719 | cout<<"WARNING: fIntFlowFlags is NULL in AFAWQC::SFFIF() !!!!"<<endl; | |
5720 | exit(0); | |
5721 | } | |
5722 | ||
5723 | fIntFlowFlags->Fill(0.5,(Int_t)fUsePhiWeights||fUsePtWeights||fUseEtaWeights); // particle weights used or not | |
5724 | //fIntFlowFlags->Fill(1.5,""); // which event weight was used? // to be improved | |
5725 | fIntFlowFlags->Fill(2.5,(Int_t)fApplyCorrectionForNUA); // corrected for non-uniform acceptance or not | |
5726 | ||
5727 | } // end of void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags() | |
5728 | ||
5729 | ||
5730 | //================================================================================================================================ | |
5731 | ||
5732 | ||
5733 | void AliFlowAnalysisWithQCumulants::StoreDiffFlowFlags() | |
5734 | { | |
5735 | // Store all flags for differential flow in the profile fDiffFlowFlags. | |
5736 | ||
5737 | if(!fDiffFlowFlags) | |
5738 | { | |
5739 | cout<<"WARNING: fDiffFlowFlags is NULL in AFAWQC::SFFDF() !!!!"<<endl; | |
5740 | exit(0); | |
5741 | } | |
5742 | ||
5743 | fDiffFlowFlags->Fill(0.5,fUsePhiWeights||fUsePtWeights||fUseEtaWeights); // particle weights used or not | |
5744 | //fDiffFlowFlags->Fill(1.5,""); // which event weight was used? // to be improved | |
5745 | fDiffFlowFlags->Fill(2.5,fApplyCorrectionForNUA); // corrected for non-uniform acceptance or not | |
5746 | fDiffFlowFlags->Fill(3.5,fCalculate2DFlow); // calculate also 2D differential flow in (pt,eta) or not | |
5747 | ||
5748 | } // end of void AliFlowAnalysisWithQCumulants::StoreDiffFlowFlags() | |
5749 | ||
5750 | ||
5751 | //================================================================================================================================ | |
5752 | ||
5753 | ||
5754 | void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms(TList *outputListHistos) | |
5755 | { | |
5756 | // Access all pointers to common control and common result histograms and profiles. | |
5757 | ||
5758 | if(outputListHistos) | |
5759 | { | |
5760 | TString commonHistsName = "AliFlowCommonHistQC"; | |
5761 | commonHistsName += fAnalysisLabel->Data(); | |
5762 | AliFlowCommonHist *commonHist = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHistsName.Data())); | |
5763 | if(commonHist) this->SetCommonHists(commonHist); | |
5764 | TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC"; | |
5765 | commonHists2ndOrderName += fAnalysisLabel->Data(); | |
5766 | AliFlowCommonHist *commonHist2nd = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists2ndOrderName.Data())); | |
5767 | if(commonHist2nd) this->SetCommonHists2nd(commonHist2nd); | |
5768 | TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC"; | |
5769 | commonHists4thOrderName += fAnalysisLabel->Data(); | |
5770 | AliFlowCommonHist *commonHist4th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists4thOrderName.Data())); | |
5771 | if(commonHist4th) this->SetCommonHists4th(commonHist4th); | |
5772 | TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC"; | |
5773 | commonHists6thOrderName += fAnalysisLabel->Data(); | |
5774 | AliFlowCommonHist *commonHist6th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists6thOrderName.Data())); | |
5775 | if(commonHist6th) this->SetCommonHists6th(commonHist6th); | |
5776 | TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC"; | |
5777 | commonHists8thOrderName += fAnalysisLabel->Data(); | |
5778 | AliFlowCommonHist *commonHist8th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists8thOrderName.Data())); | |
5779 | if(commonHist8th) this->SetCommonHists8th(commonHist8th); | |
5780 | TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC"; | |
5781 | commonHistResults2ndOrderName += fAnalysisLabel->Data(); | |
5782 | AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*> | |
5783 | (outputListHistos->FindObject(commonHistResults2ndOrderName.Data())); | |
5784 | if(commonHistRes2nd) this->SetCommonHistsResults2nd(commonHistRes2nd); | |
5785 | TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC"; | |
5786 | commonHistResults4thOrderName += fAnalysisLabel->Data(); | |
5787 | AliFlowCommonHistResults *commonHistRes4th = dynamic_cast<AliFlowCommonHistResults*> | |
5788 | (outputListHistos->FindObject(commonHistResults4thOrderName.Data())); | |
5789 | if(commonHistRes4th) this->SetCommonHistsResults4th(commonHistRes4th); | |
5790 | TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC"; | |
5791 | commonHistResults6thOrderName += fAnalysisLabel->Data(); | |
5792 | AliFlowCommonHistResults *commonHistRes6th = dynamic_cast<AliFlowCommonHistResults*> | |
5793 | (outputListHistos->FindObject(commonHistResults6thOrderName.Data())); | |
5794 | if(commonHistRes6th) this->SetCommonHistsResults6th(commonHistRes6th); | |
5795 | TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC"; | |
5796 | commonHistResults8thOrderName += fAnalysisLabel->Data(); | |
5797 | AliFlowCommonHistResults *commonHistRes8th = dynamic_cast<AliFlowCommonHistResults*> | |
5798 | (outputListHistos->FindObject(commonHistResults8thOrderName.Data())); | |
5799 | if(commonHistRes8th) this->SetCommonHistsResults8th(commonHistRes8th); | |
5800 | } else | |
5801 | { | |
5802 | cout<<"WARNING: outputListHistos is NULL in AFAWQC::GPFCH() !!!!"<<endl; | |
5803 | exit(0); | |
5804 | } | |
5805 | ||
5806 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms(TList *outputListHistos) | |
5807 | ||
5808 | ||
5809 | //================================================================================================================================ | |
5810 | ||
5811 | ||
5812 | void AliFlowAnalysisWithQCumulants::GetPointersForParticleWeightsHistograms(TList *outputListHistos) | |
5813 | { | |
5814 | // Get pointers for histograms with particle weights. | |
5815 | ||
5816 | if(outputListHistos) | |
5817 | { | |
5818 | TList *weightsList = dynamic_cast<TList*>(outputListHistos->FindObject("Weights")); | |
5819 | if(weightsList) this->SetWeightsList(weightsList); | |
5820 | TString fUseParticleWeightsName = "fUseParticleWeightsQC"; // to be improved (hirdwired label QC) | |
5821 | fUseParticleWeightsName += fAnalysisLabel->Data(); | |
5822 | TProfile *useParticleWeights = dynamic_cast<TProfile*>(weightsList->FindObject(fUseParticleWeightsName.Data())); | |
5823 | if(useParticleWeights) | |
5824 | { | |
5825 | this->SetUseParticleWeights(useParticleWeights); | |
5826 | fUsePhiWeights = (Int_t)fUseParticleWeights->GetBinContent(1); | |
5827 | fUsePtWeights = (Int_t)fUseParticleWeights->GetBinContent(2); | |
5828 | fUseEtaWeights = (Int_t)fUseParticleWeights->GetBinContent(3); | |
5829 | } | |
5830 | } else | |
5831 | { | |
5832 | cout<<"WARNING: outputListHistos is NULL in AFAWQC::GPFPWH() !!!!"<<endl; | |
5833 | exit(0); | |
5834 | } | |
5835 | ||
5836 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForParticleWeightsHistograms(TList *outputListHistos); | |
5837 | ||
5838 | ||
5839 | //================================================================================================================================ | |
5840 | ||
5841 | ||
5842 | void AliFlowAnalysisWithQCumulants::GetPointersForIntFlowHistograms(TList *outputListHistos) | |
5843 | { | |
5844 | // Get pointers for histograms and profiles relevant for integrated flow: | |
5845 | // a) Get pointer to base list for integrated flow holding profile fIntFlowFlags and lists fIntFlowProfiles and fIntFlowResults. | |
5846 | // b) Get pointer to profile fIntFlowFlags holding all flags for integrated flow. | |
5847 | // c) Get pointer to list fIntFlowProfiles and pointers to all objects that she holds. | |
5848 | // d) Get pointer to list fIntFlowResults and pointers to all objects that she holds. | |
5849 | ||
5850 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data member?) | |
5851 | TString powerFlag[2] = {"linear","quadratic"}; // to be improved (should I promote this to data member?) | |
5852 | ||
5853 | if(outputListHistos) | |
5854 | { | |
5855 | // a) Get pointer to base list for integrated flow holding profile fIntFlowFlags and lists fIntFlowProfiles and fIntFlowResults: | |
5856 | TList *intFlowList = NULL; | |
5857 | intFlowList = dynamic_cast<TList*>(outputListHistos->FindObject("Integrated Flow")); | |
5858 | if(!intFlowList) | |
5859 | { | |
5860 | cout<<"WARNING: intFlowList is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
5861 | exit(0); | |
5862 | } | |
5863 | ||
5864 | // b) Get pointer to profile fIntFlowFlags holding all flags for integrated flow: | |
5865 | TString intFlowFlagsName = "fIntFlowFlags"; | |
5866 | intFlowFlagsName += fAnalysisLabel->Data(); | |
5867 | TProfile *intFlowFlags = dynamic_cast<TProfile*>(intFlowList->FindObject(intFlowFlagsName.Data())); | |
5868 | Bool_t bApplyCorrectionForNUA = kFALSE; | |
5869 | if(intFlowFlags) | |
5870 | { | |
5871 | this->SetIntFlowFlags(intFlowFlags); | |
5872 | bApplyCorrectionForNUA = (Int_t)intFlowFlags->GetBinContent(3); | |
5873 | this->SetApplyCorrectionForNUA(bApplyCorrectionForNUA); | |
5874 | } else | |
5875 | { | |
5876 | cout<<"WARNING: intFlowFlags is NULL in FAWQC::GPFIFH() !!!!"<<endl; | |
5877 | } | |
5878 | ||
5879 | // c) Get pointer to list fIntFlowProfiles and pointers to all objects that she holds: | |
5880 | TList *intFlowProfiles = NULL; | |
5881 | intFlowProfiles = dynamic_cast<TList*>(intFlowList->FindObject("Profiles")); | |
5882 | if(intFlowProfiles) | |
5883 | { | |
5884 | // average multiplicities: | |
5885 | TString avMultiplicityName = "fAvMultiplicity"; | |
5886 | avMultiplicityName += fAnalysisLabel->Data(); | |
5887 | TProfile *avMultiplicity = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(avMultiplicityName.Data())); | |
5888 | if(avMultiplicity) | |
5889 | { | |
5890 | this->SetAvMultiplicity(avMultiplicity); | |
5891 | } else | |
5892 | { | |
5893 | cout<<"WARNING: avMultiplicity is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
5894 | } | |
5895 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with wrong errors!): | |
5896 | TString intFlowCorrelationsProName = "fIntFlowCorrelationsPro"; | |
5897 | intFlowCorrelationsProName += fAnalysisLabel->Data(); | |
5898 | TProfile *intFlowCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowCorrelationsProName.Data())); | |
5899 | if(intFlowCorrelationsPro) | |
5900 | { | |
5901 | this->SetIntFlowCorrelationsPro(intFlowCorrelationsPro); | |
5902 | } else | |
5903 | { | |
5904 | cout<<"WARNING: intFlowCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
5905 | } | |
5906 | // average all correlations for integrated flow (with wrong errors!): | |
5907 | TString intFlowCorrelationsAllProName = "fIntFlowCorrelationsAllPro"; | |
5908 | intFlowCorrelationsAllProName += fAnalysisLabel->Data(); | |
5909 | TProfile *intFlowCorrelationsAllPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowCorrelationsAllProName.Data())); | |
5910 | if(intFlowCorrelationsAllPro) | |
5911 | { | |
5912 | this->SetIntFlowCorrelationsAllPro(intFlowCorrelationsAllPro); | |
5913 | } else | |
5914 | { | |
5915 | cout<<"WARNING: intFlowCorrelationsAllPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
5916 | } | |
5917 | // average extra correlations for integrated flow (which appear only when particle weights are used): | |
5918 | // (to be improved: Weak point in implementation, I am assuming here that method GetPointersForParticleWeightsHistograms() was called) | |
5919 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
5920 | { | |
5921 | TString intFlowExtraCorrelationsProName = "fIntFlowExtraCorrelationsPro"; | |
5922 | intFlowExtraCorrelationsProName += fAnalysisLabel->Data(); | |
5923 | TProfile *intFlowExtraCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowExtraCorrelationsProName.Data())); | |
5924 | if(intFlowExtraCorrelationsPro) | |
5925 | { | |
5926 | this->SetIntFlowExtraCorrelationsPro(intFlowExtraCorrelationsPro); | |
5927 | } else | |
5928 | { | |
5929 | cout<<"WARNING: intFlowExtraCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
5930 | } | |
5931 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
5932 | // average products of correlations <2>, <4>, <6> and <8>: | |
5933 | TString intFlowProductOfCorrelationsProName = "fIntFlowProductOfCorrelationsPro"; | |
5934 | intFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
5935 | TProfile *intFlowProductOfCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowProductOfCorrelationsProName.Data())); | |
5936 | if(intFlowProductOfCorrelationsPro) | |
5937 | { | |
5938 | this->SetIntFlowProductOfCorrelationsPro(intFlowProductOfCorrelationsPro); | |
5939 | } else | |
5940 | { | |
5941 | cout<<"WARNING: intFlowProductOfCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
5942 | } | |
5943 | // average correction terms for non-uniform acceptance (with wrong errors!): | |
5944 | for(Int_t sc=0;sc<2;sc++) | |
5945 | { | |
5946 | TString intFlowCorrectionTermsForNUAProName = "fIntFlowCorrectionTermsForNUAPro"; | |
5947 | intFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
5948 | TProfile *intFlowCorrectionTermsForNUAPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject((Form("%s: %s terms",intFlowCorrectionTermsForNUAProName.Data(),sinCosFlag[sc].Data())))); | |
5949 | if(intFlowCorrectionTermsForNUAPro) | |
5950 | { | |
5951 | this->SetIntFlowCorrectionTermsForNUAPro(intFlowCorrectionTermsForNUAPro,sc); | |
5952 | } else | |
5953 | { | |
5954 | cout<<"WARNING: intFlowCorrectionTermsForNUAPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
5955 | cout<<"sc = "<<sc<<endl; | |
5956 | } | |
5957 | } // end of for(Int_t sc=0;sc<2;sc++) | |
5958 | } else // to if(intFlowProfiles) | |
5959 | { | |
5960 | cout<<"WARNING: intFlowProfiles is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
5961 | } | |
5962 | ||
5963 | // d) Get pointer to list fIntFlowResults and pointers to all objects that she holds. | |
5964 | TList *intFlowResults = NULL; | |
5965 | intFlowResults = dynamic_cast<TList*>(intFlowList->FindObject("Results")); | |
5966 | if(intFlowResults) | |
5967 | { | |
5968 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with correct errors!): | |
5969 | TString intFlowCorrelationsHistName = "fIntFlowCorrelationsHist"; | |
5970 | intFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
5971 | TH1D *intFlowCorrelationsHist = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCorrelationsHistName.Data())); | |
5972 | if(intFlowCorrelationsHist) | |
5973 | { | |
5974 | this->SetIntFlowCorrelationsHist(intFlowCorrelationsHist); | |
5975 | } else | |
5976 | { | |
5977 | cout<<"WARNING: intFlowCorrelationsHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
5978 | } | |
5979 | // average all correlations for integrated flow (with correct errors!): | |
5980 | TString intFlowCorrelationsAllHistName = "fIntFlowCorrelationsAllHist"; | |
5981 | intFlowCorrelationsAllHistName += fAnalysisLabel->Data(); | |
5982 | TH1D *intFlowCorrelationsAllHist = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCorrelationsAllHistName.Data())); | |
5983 | if(intFlowCorrelationsAllHist) | |
5984 | { | |
5985 | this->SetIntFlowCorrelationsAllHist(intFlowCorrelationsAllHist); | |
5986 | } else | |
5987 | { | |
5988 | cout<<"WARNING: intFlowCorrelationsAllHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
5989 | } | |
5990 | // average correction terms for non-uniform acceptance (with correct errors!): | |
5991 | TString intFlowCorrectionTermsForNUAHistName = "fIntFlowCorrectionTermsForNUAHist"; | |
5992 | intFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
5993 | for(Int_t sc=0;sc<2;sc++) | |
5994 | { | |
5995 | TH1D *intFlowCorrectionTermsForNUAHist = dynamic_cast<TH1D*>(intFlowResults->FindObject((Form("%s: %s terms",intFlowCorrectionTermsForNUAHistName.Data(),sinCosFlag[sc].Data())))); | |
5996 | if(intFlowCorrectionTermsForNUAHist) | |
5997 | { | |
5998 | this->SetIntFlowCorrectionTermsForNUAHist(intFlowCorrectionTermsForNUAHist,sc); | |
5999 | } else | |
6000 | { | |
6001 | cout<<"WARNING: intFlowCorrectionTermsForNUAHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
6002 | cout<<"sc = "<<sc<<endl; | |
6003 | } | |
6004 | } // end of for(Int_t sc=0;sc<2;sc++) | |
6005 | // covariances (multiplied with weight dependent prefactor): | |
6006 | TString intFlowCovariancesName = "fIntFlowCovariances"; | |
6007 | intFlowCovariancesName += fAnalysisLabel->Data(); | |
6008 | TH1D *intFlowCovariances = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCovariancesName.Data())); | |
6009 | if(intFlowCovariances) | |
6010 | { | |
6011 | this->SetIntFlowCovariances(intFlowCovariances); | |
6012 | } else | |
6013 | { | |
6014 | cout<<"WARNING: intFlowCovariances is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
6015 | } | |
6016 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>: | |
6017 | TString intFlowSumOfEventWeightsName = "fIntFlowSumOfEventWeights"; | |
6018 | intFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
6019 | for(Int_t power=0;power<2;power++) | |
6020 | { | |
6021 | TH1D *intFlowSumOfEventWeights = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s: %s",intFlowSumOfEventWeightsName.Data(),powerFlag[power].Data()))); | |
6022 | if(intFlowSumOfEventWeights) | |
6023 | { | |
6024 | this->SetIntFlowSumOfEventWeights(intFlowSumOfEventWeights,power); | |
6025 | } else | |
6026 | { | |
6027 | cout<<"WARNING: intFlowSumOfEventWeights is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
6028 | cout<<"power = "<<power<<endl; | |
6029 | } | |
6030 | } // end of for(Int_t power=0;power<2;power++) | |
6031 | // sum of products of event weights for correlations <2>, <4>, <6> and <8>: | |
6032 | TString intFlowSumOfProductOfEventWeightsName = "fIntFlowSumOfProductOfEventWeights"; | |
6033 | intFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
6034 | TH1D *intFlowSumOfProductOfEventWeights = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowSumOfProductOfEventWeightsName.Data())); | |
6035 | if(intFlowSumOfProductOfEventWeights) | |
6036 | { | |
6037 | this->SetIntFlowSumOfProductOfEventWeights(intFlowSumOfProductOfEventWeights); | |
6038 | } else | |
6039 | { | |
6040 | cout<<"WARNING: intFlowSumOfProductOfEventWeights is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
6041 | } | |
6042 | // final results for integrated Q-cumulants: | |
6043 | TString intFlowQcumulantsName = "fIntFlowQcumulants"; | |
6044 | intFlowQcumulantsName += fAnalysisLabel->Data(); | |
6045 | TH1D *intFlowQcumulants = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowQcumulantsName.Data())); | |
6046 | if(intFlowQcumulants) | |
6047 | { | |
6048 | this->SetIntFlowQcumulants(intFlowQcumulants); | |
6049 | } else | |
6050 | { | |
6051 | cout<<"WARNING: intFlowQcumulants is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
6052 | } | |
6053 | // final integrated flow estimates from Q-cumulants: | |
6054 | TString intFlowName = "fIntFlow"; | |
6055 | intFlowName += fAnalysisLabel->Data(); | |
6056 | TH1D *intFlow = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowName.Data())); | |
6057 | if(intFlow) | |
6058 | { | |
6059 | this->SetIntFlow(intFlow); | |
6060 | } else | |
6061 | { | |
6062 | cout<<"WARNING: intFlow is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
6063 | } | |
6064 | } else // to if(intFlowResults) | |
6065 | { | |
6066 | cout<<"WARNING: intFlowResults is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
6067 | } | |
6068 | } // end of if(outputListHistos) | |
6069 | ||
6070 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForIntFlowHistograms(TList *outputListHistos) | |
6071 | ||
6072 | ||
6073 | //================================================================================================================================ | |
6074 | ||
6075 | ||
6076 | void AliFlowAnalysisWithQCumulants::GetPointersForDiffFlowHistograms(TList *outputListHistos) | |
6077 | { | |
6078 | // Get pointer to all objects relevant for differential flow. | |
6079 | // a) Define flags locally (to be improved: should I promote flags to data members?); | |
6080 | // b) Get pointer to base list for differential flow fDiffFlowList and nested lists fDiffFlowListProfiles and fDiffFlowListResults; | |
6081 | // c) Get pointer to profile fDiffFlowFlags holding all flags for differential flow; | |
6082 | // d) Get pointers to all nested lists in fDiffFlowListProfiles and to profiles which they hold; | |
6083 | // e) Get pointers to all nested lists in fDiffFlowListResults and to histograms which they hold. | |
6084 | ||
6085 | // a) Define flags locally (to be improved: should I promote flags to data members?): | |
6086 | TString typeFlag[2] = {"RP","POI"}; | |
6087 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
6088 | TString powerFlag[2] = {"linear","quadratic"}; | |
6089 | TString sinCosFlag[2] = {"sin","cos"}; | |
6090 | TString differentialCumulantIndex[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"}; | |
6091 | TString differentialFlowIndex[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; | |
6092 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; | |
6093 | TString mixedCorrelationIndex[8] = {"<2>","<2'>","<4>","<4'>","<6>","<6'>","<8>","<8'>"}; | |
6094 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; | |
6095 | ||
6096 | // b) Get pointer to base list for differential flow fDiffFlowList and nested lists fDiffFlowListProfiles and fDiffFlowListResults: | |
6097 | TList *diffFlowList = NULL; | |
6098 | diffFlowList = dynamic_cast<TList*>(outputListHistos->FindObject("Differential Flow")); | |
6099 | if(!diffFlowList) | |
6100 | { | |
6101 | cout<<"WARNING: diffFlowList is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6102 | exit(0); | |
6103 | } | |
6104 | // list holding nested lists containing profiles: | |
6105 | TList *diffFlowListProfiles = NULL; | |
6106 | diffFlowListProfiles = dynamic_cast<TList*>(diffFlowList->FindObject("Profiles")); | |
6107 | if(!diffFlowListProfiles) | |
6108 | { | |
6109 | cout<<"WARNING: diffFlowListProfiles is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6110 | exit(0); | |
6111 | } | |
6112 | // list holding nested lists containing 2D and 1D histograms with final results: | |
6113 | TList *diffFlowListResults = NULL; | |
6114 | diffFlowListResults = dynamic_cast<TList*>(diffFlowList->FindObject("Results")); | |
6115 | if(!diffFlowListResults) | |
6116 | { | |
6117 | cout<<"WARNING: diffFlowListResults is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6118 | exit(0); | |
6119 | } | |
6120 | ||
6121 | // c) Get pointer to profile holding all flags for differential flow; | |
6122 | TString diffFlowFlagsName = "fDiffFlowFlags"; | |
6123 | diffFlowFlagsName += fAnalysisLabel->Data(); | |
6124 | TProfile *diffFlowFlags = dynamic_cast<TProfile*>(diffFlowList->FindObject(diffFlowFlagsName.Data())); | |
6125 | Bool_t bCalculate2DFlow = kFALSE; | |
6126 | if(diffFlowFlags) | |
6127 | { | |
6128 | this->SetDiffFlowFlags(diffFlowFlags); | |
6129 | bCalculate2DFlow = (Int_t)diffFlowFlags->GetBinContent(4); | |
6130 | this->SetCalculate2DFlow(bCalculate2DFlow); // to be improved (shoul I call this setter somewhere else?) | |
6131 | } | |
6132 | ||
6133 | // d) Get pointers to all nested lists in fDiffFlowListProfiles and to profiles which they hold; | |
6134 | // correlations: | |
6135 | TList *diffFlowCorrelationsProList[2][2] = {{NULL}}; | |
6136 | TString diffFlowCorrelationsProName = "fDiffFlowCorrelationsPro"; | |
6137 | diffFlowCorrelationsProName += fAnalysisLabel->Data(); | |
6138 | TProfile *diffFlowCorrelationsPro[2][2][4] = {{{NULL}}}; | |
6139 | // products of correlations: | |
6140 | TList *diffFlowProductOfCorrelationsProList[2][2] = {{NULL}}; | |
6141 | TString diffFlowProductOfCorrelationsProName = "fDiffFlowProductOfCorrelationsPro"; | |
6142 | diffFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
6143 | TProfile *diffFlowProductOfCorrelationsPro[2][2][8][8] = {{{{NULL}}}}; | |
6144 | // corrections: | |
6145 | TList *diffFlowCorrectionsProList[2][2] = {{NULL}}; | |
6146 | TString diffFlowCorrectionTermsForNUAProName = "fDiffFlowCorrectionTermsForNUAPro"; | |
6147 | diffFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
6148 | TProfile *diffFlowCorrectionTermsForNUAPro[2][2][2][10] = {{{{NULL}}}}; | |
6149 | for(Int_t t=0;t<2;t++) | |
6150 | { | |
6151 | for(Int_t pe=0;pe<2;pe++) | |
6152 | { | |
6153 | diffFlowCorrelationsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
6154 | if(!diffFlowCorrelationsProList[t][pe]) | |
6155 | { | |
6156 | cout<<"WARNING: diffFlowCorrelationsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6157 | cout<<"t = "<<t<<endl; | |
6158 | cout<<"pe = "<<pe<<endl; | |
6159 | exit(0); | |
6160 | } | |
6161 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
6162 | { | |
6163 | diffFlowCorrelationsPro[t][pe][ci] = dynamic_cast<TProfile*>(diffFlowCorrelationsProList[t][pe]->FindObject(Form("%s, %s, %s, %s",diffFlowCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[ci].Data()))); | |
6164 | if(diffFlowCorrelationsPro[t][pe][ci]) | |
6165 | { | |
6166 | this->SetDiffFlowCorrelationsPro(diffFlowCorrelationsPro[t][pe][ci],t,pe,ci); | |
6167 | } else | |
6168 | { | |
6169 | cout<<"WARNING: diffFlowCorrelationsPro[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6170 | cout<<"t = "<<t<<endl; | |
6171 | cout<<"pe = "<<pe<<endl; | |
6172 | cout<<"ci = "<<ci<<endl; | |
6173 | } | |
6174 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
6175 | // products of correlations: | |
6176 | diffFlowProductOfCorrelationsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with products of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
6177 | if(!diffFlowProductOfCorrelationsProList[t][pe]) | |
6178 | { | |
6179 | cout<<"WARNING: ddiffFlowProductOfCorrelationsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6180 | cout<<"t = "<<t<<endl; | |
6181 | cout<<"pe = "<<pe<<endl; | |
6182 | exit(0); | |
6183 | } | |
6184 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
6185 | { | |
6186 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
6187 | { | |
6188 | diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2] = dynamic_cast<TProfile*>(diffFlowProductOfCorrelationsProList[t][pe]->FindObject(Form("%s, %s, %s, %s, %s",diffFlowProductOfCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data()))); | |
6189 | if(diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]) | |
6190 | { | |
6191 | this->SetDiffFlowProductOfCorrelationsPro(diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2],t,pe,mci1,mci2); | |
6192 | } else | |
6193 | { | |
6194 | cout<<"WARNING: diffFlowCorrelationsPro[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6195 | cout<<"t = "<<t<<endl; | |
6196 | cout<<"pe = "<<pe<<endl; | |
6197 | cout<<"mci1 = "<<mci1<<endl; | |
6198 | cout<<"mci2 = "<<mci2<<endl; | |
6199 | } | |
6200 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
6201 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
6202 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
6203 | // corrections: | |
6204 | diffFlowCorrectionsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
6205 | if(!diffFlowCorrectionsProList[t][pe]) | |
6206 | { | |
6207 | cout<<"WARNING: diffFlowCorrectionsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6208 | cout<<"t = "<<t<<endl; | |
6209 | cout<<"pe = "<<pe<<endl; | |
6210 | exit(0); | |
6211 | } | |
6212 | // correction terms for NUA: | |
6213 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
6214 | { | |
6215 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
6216 | { | |
6217 | diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] = dynamic_cast<TProfile*>(diffFlowCorrectionsProList[t][pe]->FindObject(Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1))); | |
6218 | if(diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]) | |
6219 | { | |
6220 | this->SetDiffFlowCorrectionTermsForNUAPro(diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti],t,pe,sc,cti); | |
6221 | } else | |
6222 | { | |
6223 | cout<<"WARNING: diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6224 | cout<<"t = "<<t<<endl; | |
6225 | cout<<"pe = "<<pe<<endl; | |
6226 | cout<<"sc = "<<sc<<endl; | |
6227 | cout<<"cti = "<<cti<<endl; | |
6228 | } | |
6229 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
6230 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
6231 | // ... | |
6232 | } // end of for(Int_t pe=0;pe<2;pe++) | |
6233 | } // end of for(Int_t t=0;t<2;t++) | |
6234 | ||
6235 | // e) Get pointers to all nested lists in fDiffFlowListResults and to histograms which they hold. | |
6236 | // reduced correlations: | |
6237 | TList *diffFlowCorrelationsHistList[2][2] = {{NULL}}; | |
6238 | TString diffFlowCorrelationsHistName = "fDiffFlowCorrelationsHist"; | |
6239 | diffFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
6240 | TH1D *diffFlowCorrelationsHist[2][2][4] = {{{NULL}}}; | |
6241 | // corrections for NUA: | |
6242 | TList *diffFlowCorrectionsHistList[2][2] = {{NULL}}; | |
6243 | TString diffFlowCorrectionTermsForNUAHistName = "fDiffFlowCorrectionTermsForNUAHist"; | |
6244 | diffFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
6245 | TH1D *diffFlowCorrectionTermsForNUAHist[2][2][2][10] = {{{{NULL}}}}; | |
6246 | // differential Q-cumulants: | |
6247 | TList *diffFlowCumulantsHistList[2][2] = {{NULL}}; | |
6248 | TString diffFlowCumulantsName = "fDiffFlowCumulants"; | |
6249 | diffFlowCumulantsName += fAnalysisLabel->Data(); | |
6250 | TH1D *diffFlowCumulants[2][2][4] = {{{NULL}}}; | |
6251 | // differential flow estimates from Q-cumulants: | |
6252 | TList *diffFlowHistList[2][2] = {{NULL}}; | |
6253 | TString diffFlowName = "fDiffFlow"; | |
6254 | diffFlowName += fAnalysisLabel->Data(); | |
6255 | TH1D *diffFlow[2][2][4] = {{{NULL}}}; | |
6256 | // differential covariances: | |
6257 | TList *diffFlowCovariancesHistList[2][2] = {{NULL}}; | |
6258 | TString diffFlowCovariancesName = "fDiffFlowCovariances"; | |
6259 | diffFlowCovariancesName += fAnalysisLabel->Data(); | |
6260 | TH1D *diffFlowCovariances[2][2][5] = {{{NULL}}}; | |
6261 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
6262 | { | |
6263 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6264 | { | |
6265 | // reduced correlations: | |
6266 | diffFlowCorrelationsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
6267 | if(!diffFlowCorrelationsHistList[t][pe]) | |
6268 | { | |
6269 | cout<<"WARNING: diffFlowCorrelationsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6270 | cout<<"t = "<<t<<endl; | |
6271 | cout<<"pe = "<<pe<<endl; | |
6272 | exit(0); | |
6273 | } | |
6274 | for(Int_t index=0;index<4;index++) | |
6275 | { | |
6276 | diffFlowCorrelationsHist[t][pe][index] = dynamic_cast<TH1D*>(diffFlowCorrelationsHistList[t][pe]->FindObject(Form("%s, %s, %s, %s",diffFlowCorrelationsHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[index].Data()))); | |
6277 | if(diffFlowCorrelationsHist[t][pe][index]) | |
6278 | { | |
6279 | this->SetDiffFlowCorrelationsHist(diffFlowCorrelationsHist[t][pe][index],t,pe,index); | |
6280 | } else | |
6281 | { | |
6282 | cout<<"WARNING: diffFlowCorrelationsHist[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6283 | cout<<"t = "<<t<<endl; | |
6284 | cout<<"pe = "<<pe<<endl; | |
6285 | cout<<"index = "<<index<<endl; | |
6286 | exit(0); | |
6287 | } | |
6288 | } // end of for(Int_t index=0;index<4;index++) | |
6289 | // corrections: | |
6290 | diffFlowCorrectionsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Histograms with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
6291 | if(!diffFlowCorrectionsHistList[t][pe]) | |
6292 | { | |
6293 | cout<<"WARNING: diffFlowCorrectionsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6294 | cout<<"t = "<<t<<endl; | |
6295 | cout<<"pe = "<<pe<<endl; | |
6296 | exit(0); | |
6297 | } | |
6298 | // correction terms for NUA: | |
6299 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
6300 | { | |
6301 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
6302 | { | |
6303 | diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] = dynamic_cast<TH1D*>(diffFlowCorrectionsHistList[t][pe]->FindObject(Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1))); | |
6304 | if(diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]) | |
6305 | { | |
6306 | this->SetDiffFlowCorrectionTermsForNUAHist(diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti],t,pe,sc,cti); | |
6307 | } else | |
6308 | { | |
6309 | cout<<"WARNING: diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6310 | cout<<"t = "<<t<<endl; | |
6311 | cout<<"pe = "<<pe<<endl; | |
6312 | cout<<"sc = "<<sc<<endl; | |
6313 | cout<<"cti = "<<cti<<endl; | |
6314 | } | |
6315 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
6316 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
6317 | // ... | |
6318 | // differential Q-cumulants: | |
6319 | diffFlowCumulantsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Differential Q-cumulants (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
6320 | if(!diffFlowCumulantsHistList[t][pe]) | |
6321 | { | |
6322 | cout<<"WARNING: diffFlowCumulantsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6323 | cout<<"t = "<<t<<endl; | |
6324 | cout<<"pe = "<<pe<<endl; | |
6325 | exit(0); | |
6326 | } | |
6327 | for(Int_t index=0;index<4;index++) | |
6328 | { | |
6329 | diffFlowCumulants[t][pe][index] = dynamic_cast<TH1D*>(diffFlowCumulantsHistList[t][pe]->FindObject(Form("%s, %s, %s, %s",diffFlowCumulantsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialCumulantIndex[index].Data()))); | |
6330 | if(diffFlowCumulants[t][pe][index]) | |
6331 | { | |
6332 | this->SetDiffFlowCumulants(diffFlowCumulants[t][pe][index],t,pe,index); | |
6333 | } else | |
6334 | { | |
6335 | cout<<"WARNING: diffFlowCumulants[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6336 | cout<<"t = "<<t<<endl; | |
6337 | cout<<"pe = "<<pe<<endl; | |
6338 | cout<<"index = "<<index<<endl; | |
6339 | exit(0); | |
6340 | } | |
6341 | } // end of for(Int_t index=0;index<4;index++) | |
6342 | // differential flow estimates from Q-cumulants: | |
6343 | diffFlowHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Differential flow (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
6344 | if(!diffFlowHistList[t][pe]) | |
6345 | { | |
6346 | cout<<"WARNING: diffFlowHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6347 | cout<<"t = "<<t<<endl; | |
6348 | cout<<"pe = "<<pe<<endl; | |
6349 | exit(0); | |
6350 | } | |
6351 | for(Int_t index=0;index<4;index++) | |
6352 | { | |
6353 | diffFlow[t][pe][index] = dynamic_cast<TH1D*>(diffFlowHistList[t][pe]->FindObject(Form("%s, %s, %s, %s",diffFlowName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialFlowIndex[index].Data()))); | |
6354 | if(diffFlow[t][pe][index]) | |
6355 | { | |
6356 | this->SetDiffFlow(diffFlow[t][pe][index],t,pe,index); | |
6357 | } else | |
6358 | { | |
6359 | cout<<"WARNING: diffFlow[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6360 | cout<<"t = "<<t<<endl; | |
6361 | cout<<"pe = "<<pe<<endl; | |
6362 | cout<<"index = "<<index<<endl; | |
6363 | exit(0); | |
6364 | } | |
6365 | } // end of for(Int_t index=0;index<4;index++) | |
6366 | // differential covariances: | |
6367 | diffFlowCovariancesHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Covariances of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
6368 | if(!diffFlowCovariancesHistList[t][pe]) | |
6369 | { | |
6370 | cout<<"WARNING: diffFlowCovariancesHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6371 | cout<<"t = "<<t<<endl; | |
6372 | cout<<"pe = "<<pe<<endl; | |
6373 | exit(0); | |
6374 | } | |
6375 | for(Int_t covIndex=0;covIndex<5;covIndex++) | |
6376 | { | |
6377 | diffFlowCovariances[t][pe][covIndex] = dynamic_cast<TH1D*>(diffFlowCovariancesHistList[t][pe]->FindObject(Form("%s, %s, %s, %s",diffFlowCovariancesName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),covarianceName[covIndex].Data()))); | |
6378 | if(diffFlowCovariances[t][pe][covIndex]) | |
6379 | { | |
6380 | this->SetDiffFlowCovariances(diffFlowCovariances[t][pe][covIndex],t,pe,covIndex); | |
6381 | } else | |
6382 | { | |
6383 | cout<<"WARNING: diffFlowCovariances[t][pe][covIndex] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6384 | cout<<"t = "<<t<<endl; | |
6385 | cout<<"pe = "<<pe<<endl; | |
6386 | cout<<"covIndex = "<<covIndex<<endl; | |
6387 | exit(0); | |
6388 | } | |
6389 | } // end of for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
6390 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6391 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
6392 | // sum of event weights for reduced correlations: | |
6393 | TList *diffFlowSumOfEventWeightsHistList[2][2][2] = {{{NULL}}}; | |
6394 | TString diffFlowSumOfEventWeightsName = "fDiffFlowSumOfEventWeights"; | |
6395 | diffFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
6396 | TH1D *diffFlowSumOfEventWeights[2][2][2][4] = {{{{NULL}}}}; | |
6397 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
6398 | { | |
6399 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6400 | { | |
6401 | for(Int_t p=0;p<2;p++) // power of event weights is either 1 or 2 | |
6402 | { | |
6403 | diffFlowSumOfEventWeightsHistList[t][pe][p] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Sum of %s event weights (%s, %s)",powerFlag[p].Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
6404 | if(!diffFlowSumOfEventWeightsHistList[t][pe][p]) | |
6405 | { | |
6406 | cout<<"WARNING: diffFlowSumOfEventWeightsHistList[t][pe][p] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6407 | cout<<"t = "<<t<<endl; | |
6408 | cout<<"pe = "<<pe<<endl; | |
6409 | cout<<"power = "<<p<<endl; | |
6410 | exit(0); | |
6411 | } | |
6412 | for(Int_t ew=0;ew<4;ew++) // index of reduced correlation | |
6413 | { | |
6414 | diffFlowSumOfEventWeights[t][pe][p][ew] = dynamic_cast<TH1D*>(diffFlowSumOfEventWeightsHistList[t][pe][p]->FindObject(Form("%s, %s, %s, %s, %s",diffFlowSumOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),powerFlag[p].Data(),reducedCorrelationIndex[ew].Data()))); | |
6415 | if(diffFlowSumOfEventWeights[t][pe][p][ew]) | |
6416 | { | |
6417 | this->SetDiffFlowSumOfEventWeights(diffFlowSumOfEventWeights[t][pe][p][ew],t,pe,p,ew); | |
6418 | } else | |
6419 | { | |
6420 | cout<<"WARNING: diffFlowSumOfEventWeights[t][pe][p][ew] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6421 | cout<<"t = "<<t<<endl; | |
6422 | cout<<"pe = "<<pe<<endl; | |
6423 | cout<<"power = "<<p<<endl; | |
6424 | cout<<"ew = "<<ew<<endl; | |
6425 | exit(0); | |
6426 | } | |
6427 | } | |
6428 | } // end of for(Int_t p=0;p<2;p++) // power of event weights is either 1 or 2 | |
6429 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6430 | } // end of for(Int_t t=0;t<2;t++) // type is RP or POI | |
6431 | // | |
6432 | TList *diffFlowSumOfProductOfEventWeightsHistList[2][2] = {{NULL}}; | |
6433 | TString diffFlowSumOfProductOfEventWeightsName = "fDiffFlowSumOfProductOfEventWeights"; | |
6434 | diffFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
6435 | TH1D *diffFlowSumOfProductOfEventWeights[2][2][8][8] = {{{{NULL}}}}; | |
6436 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
6437 | { | |
6438 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6439 | { | |
6440 | diffFlowSumOfProductOfEventWeightsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Sum of products of event weights (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
6441 | if(!diffFlowSumOfProductOfEventWeightsHistList[t][pe]) | |
6442 | { | |
6443 | cout<<"WARNING: diffFlowSumOfProductOfEventWeightsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6444 | cout<<"t = "<<t<<endl; | |
6445 | cout<<"pe = "<<pe<<endl; | |
6446 | exit(0); | |
6447 | } | |
6448 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
6449 | { | |
6450 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
6451 | { | |
6452 | diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] = dynamic_cast<TH1D*>(diffFlowSumOfProductOfEventWeightsHistList[t][pe]->FindObject(Form("%s, %s, %s, %s, %s",diffFlowSumOfProductOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data()))); | |
6453 | if(diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]) | |
6454 | { | |
6455 | this->SetDiffFlowSumOfProductOfEventWeights(diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2],t,pe,mci1,mci2); | |
6456 | } else | |
6457 | { | |
6458 | cout<<"WARNING: diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
6459 | cout<<"t = "<<t<<endl; | |
6460 | cout<<"pe = "<<pe<<endl; | |
6461 | cout<<"mci1 = "<<mci1<<endl; | |
6462 | cout<<"mci2 = "<<mci2<<endl; | |
6463 | exit(0); | |
6464 | } | |
6465 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
6466 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
6467 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
6468 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6469 | } // end of for(Int_t t=0;t<2;t++) // type is RP or POI | |
6470 | ||
6471 | } // end void AliFlowAnalysisWithQCumulants::GetPointersForDiffFlowHistograms(TList *outputListHistos) | |
6472 | ||
6473 | ||
6474 | //================================================================================================================================ | |
6475 | ||
6476 | ||
6477 | void AliFlowAnalysisWithQCumulants::BookEverythingForDifferentialFlow() | |
6478 | { | |
6479 | // Book all histograms and profiles needed for differential flow. | |
6480 | // a) Define flags locally (to be improved: should I promote flags to data members?); | |
6481 | // b) Book profile to hold all flags for differential flow; | |
6482 | // c) Book e-b-e quantities; | |
6483 | // d) Book profiles; | |
6484 | // e) Book histograms holding final results. | |
6485 | ||
6486 | // a) Define flags locally (to be improved: should I promote flags to data members?): | |
6487 | TString typeFlag[2] = {"RP","POI"}; | |
6488 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
6489 | TString powerFlag[2] = {"linear","quadratic"}; | |
6490 | TString sinCosFlag[2] = {"sin","cos"}; | |
6491 | TString differentialCumulantIndex[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"}; | |
6492 | TString differentialFlowIndex[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; | |
6493 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; | |
6494 | TString mixedCorrelationIndex[8] = {"<2>","<2'>","<4>","<4'>","<6>","<6'>","<8>","<8'>"}; | |
6495 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; | |
6496 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6497 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6498 | Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6499 | ||
6500 | // b) Book profile to hold all flags for differential flow: | |
6501 | TString diffFlowFlagsName = "fDiffFlowFlags"; | |
6502 | diffFlowFlagsName += fAnalysisLabel->Data(); | |
6503 | fDiffFlowFlags = new TProfile(diffFlowFlagsName.Data(),"Flags for Differential Flow",4,0,4); | |
6504 | fDiffFlowFlags->SetTickLength(-0.01,"Y"); | |
6505 | fDiffFlowFlags->SetMarkerStyle(25); | |
6506 | fDiffFlowFlags->SetLabelSize(0.05); | |
6507 | fDiffFlowFlags->SetLabelOffset(0.02,"Y"); | |
6508 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(1,"Particle Weights"); | |
6509 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(2,"Event Weights"); | |
6510 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(3,"Corrected for NUA?"); | |
6511 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(4,"Calculated 2D flow?"); | |
6512 | fDiffFlowList->Add(fDiffFlowFlags); | |
6513 | ||
6514 | // c) Book e-b-e quantities: | |
6515 | // Event-by-event r_{m*n,k}(pt,eta), p_{m*n,k}(pt,eta) and q_{m*n,k}(pt,eta) | |
6516 | // Explanantion of notation: | |
6517 | // 1.) n is harmonic, m is multiple of harmonic; | |
6518 | // 2.) k is power of particle weight; | |
6519 | // 3.) r_{m*n,k}(pt,eta) = Q-vector evaluated in harmonic m*n for RPs in particular (pt,eta) bin (i-th RP is weighted with w_i^k); | |
6520 | // 4.) p_{m*n,k}(pt,eta) = Q-vector evaluated in harmonic m*n for POIs in particular (pt,eta) bin | |
6521 | // (if i-th POI is also RP, than it is weighted with w_i^k); | |
6522 | // 5.) q_{m*n,k}(pt,eta) = Q-vector evaluated in harmonic m*n for particles which are both RPs and POIs in particular (pt,eta) bin | |
6523 | // (i-th RP&&POI is weighted with w_i^k) | |
6524 | ||
6525 | // 1D: | |
6526 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP && POI ) | |
6527 | { | |
6528 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6529 | { | |
6530 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
6531 | { | |
6532 | for(Int_t k=0;k<9;k++) // power of particle weight | |
6533 | { | |
6534 | fReRPQ1dEBE[t][pe][m][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%dpower%dRe",t,pe,m,k), | |
6535 | Form("TypeFlag%dpteta%dmultiple%dpower%dRe",t,pe,m,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6536 | fImRPQ1dEBE[t][pe][m][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%dpower%dIm",t,pe,m,k), | |
6537 | Form("TypeFlag%dpteta%dmultiple%dpower%dIm",t,pe,m,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6538 | } | |
6539 | } | |
6540 | } | |
6541 | } | |
6542 | // to be improved (add explanation of fs1dEBE[t][pe][k]): | |
6543 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
6544 | { | |
6545 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6546 | { | |
6547 | for(Int_t k=0;k<9;k++) // power of particle weight | |
6548 | { | |
6549 | fs1dEBE[t][pe][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%d",t,pe,k), | |
6550 | Form("TypeFlag%dpteta%dmultiple%d",t,pe,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6551 | } | |
6552 | } | |
6553 | } | |
6554 | // correction terms for nua: | |
6555 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
6556 | { | |
6557 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6558 | { | |
6559 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
6560 | { | |
6561 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
6562 | { | |
6563 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti] = new TH1D(Form("typeFlag%d pteta%d sincos%d cti%d",t,pe,sc,cti), | |
6564 | Form("typeFlag%d pteta%d sincos%d cti%d",t,pe,sc,cti),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6565 | } | |
6566 | } | |
6567 | } | |
6568 | } | |
6569 | // 2D: | |
6570 | TProfile2D styleRe("typeMultiplePowerRe","typeMultiplePowerRe",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
6571 | TProfile2D styleIm("typeMultiplePowerIm","typeMultiplePowerIm",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
6572 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
6573 | { | |
6574 | for(Int_t m=0;m<4;m++) | |
6575 | { | |
6576 | for(Int_t k=0;k<9;k++) | |
6577 | { | |
6578 | fReRPQ2dEBE[t][m][k] = (TProfile2D*)styleRe.Clone(Form("typeFlag%dmultiple%dpower%dRe",t,m,k)); | |
6579 | fImRPQ2dEBE[t][m][k] = (TProfile2D*)styleIm.Clone(Form("typeFlag%dmultiple%dpower%dIm",t,m,k)); | |
6580 | } | |
6581 | } | |
6582 | } | |
6583 | TProfile2D styleS("typePower","typePower",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
6584 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
6585 | { | |
6586 | for(Int_t k=0;k<9;k++) | |
6587 | { | |
6588 | fs2dEBE[t][k] = (TProfile2D*)styleS.Clone(Form("typeFlag%dpower%d",t,k)); | |
6589 | } | |
6590 | } | |
6591 | // reduced correlations e-b-e: | |
6592 | TString diffFlowCorrelationsEBEName = "fDiffFlowCorrelationsEBE"; | |
6593 | diffFlowCorrelationsEBEName += fAnalysisLabel->Data(); | |
6594 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
6595 | { | |
6596 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6597 | { | |
6598 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
6599 | { | |
6600 | fDiffFlowCorrelationsEBE[t][pe][rci] = new TH1D(Form("%s, %s, %s, %s",diffFlowCorrelationsEBEName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),Form("%s, %s, %s, %s",diffFlowCorrelationsEBEName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6601 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
6602 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6603 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
6604 | // event weights for reduced correlations e-b-e: | |
6605 | TString diffFlowEventWeightsForCorrelationsEBEName = "fDiffFlowEventWeightsForCorrelationsEBE"; | |
6606 | diffFlowEventWeightsForCorrelationsEBEName += fAnalysisLabel->Data(); | |
6607 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
6608 | { | |
6609 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6610 | { | |
6611 | for(Int_t rci=0;rci<4;rci++) // event weight for reduced correlation index | |
6612 | { | |
6613 | fDiffFlowEventWeightsForCorrelationsEBE[t][pe][rci] = new TH1D(Form("%s, %s, %s, eW for %s",diffFlowEventWeightsForCorrelationsEBEName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),Form("%s, %s, %s, eW for %s",diffFlowEventWeightsForCorrelationsEBEName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6614 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
6615 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6616 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
6617 | ||
6618 | // d) Book profiles; | |
6619 | // reduced correlations: | |
6620 | TString diffFlowCorrelationsProName = "fDiffFlowCorrelationsPro"; | |
6621 | diffFlowCorrelationsProName += fAnalysisLabel->Data(); | |
6622 | // corrections terms: | |
6623 | TString diffFlowCorrectionTermsForNUAProName = "fDiffFlowCorrectionTermsForNUAPro"; | |
6624 | diffFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
6625 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
6626 | { | |
6627 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6628 | { | |
6629 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
6630 | { | |
6631 | // reduced correlations: | |
6632 | fDiffFlowCorrelationsPro[t][pe][rci] = new TProfile(Form("%s, %s, %s, %s",diffFlowCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),Form("%s, %s, %s, %s",diffFlowCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe],"s"); | |
6633 | fDiffFlowCorrelationsPro[t][pe][rci]->SetXTitle(ptEtaFlag[pe].Data()); | |
6634 | fDiffFlowCorrelationsProList[t][pe]->Add(fDiffFlowCorrelationsPro[t][pe][rci]); // to be improved (add dedicated list to hold reduced correlations) | |
6635 | } // end of for(Int_t rci=0;rci<4;rci++) // correlation index | |
6636 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6637 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
6638 | // correction terms for nua: | |
6639 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
6640 | { | |
6641 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6642 | { | |
6643 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
6644 | { | |
6645 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
6646 | { | |
6647 | fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] = new TProfile(Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6648 | fDiffFlowCorrectionsProList[t][pe]->Add(fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]); | |
6649 | } | |
6650 | } | |
6651 | } | |
6652 | } | |
6653 | // e) Book histograms holding final results. | |
6654 | // reduced correlations: | |
6655 | TString diffFlowCorrelationsHistName = "fDiffFlowCorrelationsHist"; | |
6656 | diffFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
6657 | // corrections terms: | |
6658 | TString diffFlowCorrectionTermsForNUAHistName = "fDiffFlowCorrectionTermsForNUAHist"; | |
6659 | diffFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
6660 | // differential covariances: | |
6661 | TString diffFlowCovariancesName = "fDiffFlowCovariances"; | |
6662 | diffFlowCovariancesName += fAnalysisLabel->Data(); | |
6663 | // differential Q-cumulants: | |
6664 | TString diffFlowCumulantsName = "fDiffFlowCumulants"; | |
6665 | diffFlowCumulantsName += fAnalysisLabel->Data(); | |
6666 | // differential flow: | |
6667 | TString diffFlowName = "fDiffFlow"; | |
6668 | diffFlowName += fAnalysisLabel->Data(); | |
6669 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
6670 | { | |
6671 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6672 | { | |
6673 | for(Int_t index=0;index<4;index++) | |
6674 | { | |
6675 | // reduced correlations: | |
6676 | fDiffFlowCorrelationsHist[t][pe][index] = new TH1D(Form("%s, %s, %s, %s",diffFlowCorrelationsHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[index].Data()),Form("%s, %s, %s, %s",diffFlowCorrelationsHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[index].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6677 | fDiffFlowCorrelationsHist[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
6678 | fDiffFlowCorrelationsHistList[t][pe]->Add(fDiffFlowCorrelationsHist[t][pe][index]); | |
6679 | // differential Q-cumulants: | |
6680 | fDiffFlowCumulants[t][pe][index] = new TH1D(Form("%s, %s, %s, %s",diffFlowCumulantsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialCumulantIndex[index].Data()),Form("%s, %s, %s, %s",diffFlowCumulantsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialCumulantIndex[index].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6681 | fDiffFlowCumulants[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
6682 | fDiffFlowCumulantsHistList[t][pe]->Add(fDiffFlowCumulants[t][pe][index]); | |
6683 | // differential flow estimates from Q-cumulants: | |
6684 | fDiffFlow[t][pe][index] = new TH1D(Form("%s, %s, %s, %s",diffFlowName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialFlowIndex[index].Data()),Form("%s, %s, %s, %s",diffFlowName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialFlowIndex[index].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6685 | fDiffFlow[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
6686 | fDiffFlowHistList[t][pe]->Add(fDiffFlow[t][pe][index]); | |
6687 | } // end of for(Int_t index=0;index<4;index++) | |
6688 | for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
6689 | { | |
6690 | // differential covariances: | |
6691 | fDiffFlowCovariances[t][pe][covIndex] = new TH1D(Form("%s, %s, %s, %s",diffFlowCovariancesName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),covarianceName[covIndex].Data()),Form("%s, %s, %s, %s",diffFlowCovariancesName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),covarianceName[covIndex].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6692 | fDiffFlowCovariances[t][pe][covIndex]->SetXTitle(ptEtaFlag[pe].Data()); | |
6693 | fDiffFlowCovariancesHistList[t][pe]->Add(fDiffFlowCovariances[t][pe][covIndex]); | |
6694 | } // end of for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
6695 | // products of both types of correlations: | |
6696 | TString diffFlowProductOfCorrelationsProName = "fDiffFlowProductOfCorrelationsPro"; | |
6697 | diffFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
6698 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
6699 | { | |
6700 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
6701 | { | |
6702 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2] = new TProfile(Form("%s, %s, %s, %s, %s",diffFlowProductOfCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data()),Form("%s, %s, %s, %s #times %s",diffFlowProductOfCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6703 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]->SetXTitle(ptEtaFlag[pe].Data()); | |
6704 | fDiffFlowProductOfCorrelationsProList[t][pe]->Add(fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]); | |
6705 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
6706 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
6707 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
6708 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6709 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
6710 | // sums of event weights for reduced correlations: | |
6711 | TString diffFlowSumOfEventWeightsName = "fDiffFlowSumOfEventWeights"; | |
6712 | diffFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
6713 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
6714 | { | |
6715 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6716 | { | |
6717 | for(Int_t p=0;p<2;p++) // power of weights is either 1 or 2 | |
6718 | { | |
6719 | for(Int_t ew=0;ew<4;ew++) // index of reduced correlation | |
6720 | { | |
6721 | fDiffFlowSumOfEventWeights[t][pe][p][ew] = new TH1D(Form("%s, %s, %s, %s, %s",diffFlowSumOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),powerFlag[p].Data(),reducedCorrelationIndex[ew].Data()),Form("%s, %s, %s, power = %s, %s",diffFlowSumOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),powerFlag[p].Data(),reducedCorrelationIndex[ew].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6722 | fDiffFlowSumOfEventWeights[t][pe][p][ew]->SetXTitle(ptEtaFlag[pe].Data()); | |
6723 | fDiffFlowSumOfEventWeightsHistList[t][pe][p]->Add(fDiffFlowSumOfEventWeights[t][pe][p][ew]); // to be improved (add dedicated list to hold all this) | |
6724 | } | |
6725 | } | |
6726 | } | |
6727 | } | |
6728 | // sum of products of event weights for both types of correlations: | |
6729 | TString diffFlowSumOfProductOfEventWeightsName = "fDiffFlowSumOfProductOfEventWeights"; | |
6730 | diffFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
6731 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
6732 | { | |
6733 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6734 | { | |
6735 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
6736 | { | |
6737 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
6738 | { | |
6739 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] = new TH1D(Form("%s, %s, %s, %s, %s",diffFlowSumOfProductOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data()),Form("%s, %s, %s, %s #times %s",diffFlowSumOfProductOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6740 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]->SetXTitle(ptEtaFlag[pe].Data()); | |
6741 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]->Add(fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]); | |
6742 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
6743 | } | |
6744 | } | |
6745 | } | |
6746 | } | |
6747 | // correction terms for nua: | |
6748 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
6749 | { | |
6750 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
6751 | { | |
6752 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
6753 | { | |
6754 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
6755 | { | |
6756 | fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] = new TH1D(Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
6757 | fDiffFlowCorrectionsHistList[t][pe]->Add(fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]); | |
6758 | } | |
6759 | } | |
6760 | } | |
6761 | } | |
6762 | ||
6763 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForDifferentialFlow() | |
6764 | ||
6765 | ||
6766 | //================================================================================================================================ | |
6767 | ||
6768 | /* | |
6769 | void AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNUAForIntQcumulants() // to be improved (do I really need this method?) | |
6770 | { | |
6771 | // Calculate final corrections for non-uniform acceptance for Q-cumulants. | |
6772 | ||
6773 | // Corrections for non-uniform acceptance are stored in histogram fCorrectionsForNUA, | |
6774 | // binning of fCorrectionsForNUA is organized as follows: | |
6775 | // | |
6776 | // 1st bin: correction to QC{2} | |
6777 | // 2nd bin: correction to QC{4} | |
6778 | // 3rd bin: correction to QC{6} | |
6779 | // 4th bin: correction to QC{8} | |
6780 | ||
6781 | // shortcuts flags: | |
6782 | Int_t pW = (Int_t)(useParticleWeights); | |
6783 | ||
6784 | Int_t eW = -1; | |
6785 | ||
6786 | if(eventWeights == "exact") | |
6787 | { | |
6788 | eW = 0; | |
6789 | } | |
6790 | ||
6791 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms flag | |
6792 | { | |
6793 | if(!(fQCorrelations[pW][eW] && fQCorrections[pW][eW][sc] && fCorrections[pW][eW])) | |
6794 | { | |
6795 | cout<<"WARNING: fQCorrelations[pW][eW] && fQCorrections[pW][eW][sc] && fCorrections[pW][eW] is NULL in AFAWQC::CFCFNUAFIF() !!!!"<<endl; | |
6796 | cout<<"pW = "<<pW<<endl; | |
6797 | cout<<"eW = "<<eW<<endl; | |
6798 | cout<<"sc = "<<sc<<endl; | |
6799 | exit(0); | |
6800 | } | |
6801 | } | |
6802 | ||
6803 | // measured 2-, 4-, 6- and 8-particle azimuthal correlations (biased with non-uniform acceptance!): | |
6804 | Double_t two = fQCorrelations[pW][eW]->GetBinContent(1); // <<2>> | |
6805 | //Double_t four = fQCorrelations[pW][eW]->GetBinContent(11); // <<4>> | |
6806 | //Double_t six = fQCorrelations[pW][eW]->GetBinContent(24); // <<6>> | |
6807 | //Double_t eight = fQCorrelations[pW][eW]->GetBinContent(31); // <<8>> | |
6808 | ||
6809 | // correction terms to QC{2}: | |
6810 | // <<cos(n*phi1)>>^2 | |
6811 | Double_t two1stTerm = pow(fQCorrections[pW][eW][1]->GetBinContent(1),2); | |
6812 | // <<sin(n*phi1)>>^2 | |
6813 | Double_t two2ndTerm = pow(fQCorrections[pW][eW][0]->GetBinContent(1),2); | |
6814 | // final corrections for non-uniform acceptance to QC{2}: | |
6815 | Double_t correctionQC2 = -1.*two1stTerm-1.*two2ndTerm; | |
6816 | fCorrections[pW][eW]->SetBinContent(1,correctionQC2); | |
6817 | ||
6818 | // correction terms to QC{4}: | |
6819 | // <<cos(n*phi1)>> <<cos(n*(phi1-phi2-phi3))>> | |
6820 | Double_t four1stTerm = fQCorrections[pW][eW][1]->GetBinContent(1)*fQCorrections[pW][eW][1]->GetBinContent(3); | |
6821 | // <<sin(n*phi1)>> <<sin(n*(phi1-phi2-phi3))>> | |
6822 | Double_t four2ndTerm = fQCorrections[pW][eW][0]->GetBinContent(1)*fQCorrections[pW][eW][0]->GetBinContent(3); | |
6823 | // <<cos(n*(phi1+phi2))>>^2 | |
6824 | Double_t four3rdTerm = pow(fQCorrections[pW][eW][1]->GetBinContent(2),2); | |
6825 | // <<sin(n*(phi1+phi2))>>^2 | |
6826 | Double_t four4thTerm = pow(fQCorrections[pW][eW][0]->GetBinContent(2),2); | |
6827 | // <<cos(n*(phi1+phi2))>> (<<cos(n*phi1)>>^2 - <<sin(n*phi1)>>^2) | |
6828 | Double_t four5thTerm = fQCorrections[pW][eW][1]->GetBinContent(2) | |
6829 | * (pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)-pow(fQCorrections[pW][eW][0]->GetBinContent(1),2)); | |
6830 | // <<sin(n*(phi1+phi2))>> <<cos(n*phi1)>> <<sin(n*phi1)>> | |
6831 | Double_t four6thTerm = fQCorrections[pW][eW][0]->GetBinContent(2) | |
6832 | * fQCorrections[pW][eW][1]->GetBinContent(1) | |
6833 | * fQCorrections[pW][eW][0]->GetBinContent(1); | |
6834 | // <<cos(n*(phi1-phi2))>> (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2) | |
6835 | Double_t four7thTerm = two*(pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)+pow(fQCorrections[pW][eW][0]->GetBinContent(1),2)); | |
6836 | // (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2)^2 | |
6837 | Double_t four8thTerm = pow(pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)+pow(fQCorrections[pW][eW][0]->GetBinContent(1),2),2); | |
6838 | // final correction to QC{4}: | |
6839 | Double_t correctionQC4 = -4.*four1stTerm+4.*four2ndTerm-four3rdTerm-four4thTerm | |
6840 | + 4.*four5thTerm+8.*four6thTerm+8.*four7thTerm-6.*four8thTerm; | |
6841 | fCorrections[pW][eW]->SetBinContent(2,correctionQC4); | |
6842 | ||
6843 | // ... to be improved (continued for 6th and 8th order) | |
6844 | ||
6845 | ||
6846 | } // end of AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNUAForIntQcumulants() | |
6847 | */ | |
6848 | ||
6849 | //================================================================================================================================ | |
6850 | ||
6851 | ||
6852 | void AliFlowAnalysisWithQCumulants::CalculateQcumulantsCorrectedForNUAIntFlow() | |
6853 | { | |
6854 | // Calculate generalized Q-cumulants (cumulants corrected for non-unifom acceptance). | |
6855 | ||
6856 | // measured 2-, 4-, 6- and 8-particle correlations (biased by non-uniform acceptance!): | |
6857 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
6858 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
6859 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
6860 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
6861 | ||
6862 | // statistical error of measured 2-, 4-, 6- and 8-particle correlations: | |
6863 | //Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <<2>> | |
6864 | //Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <<4>> | |
6865 | //Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <<6>> | |
6866 | //Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <<8>> | |
6867 | ||
6868 | // QC{2}: | |
6869 | // <<cos(n*phi1)>>^2 | |
6870 | Double_t two1stTerm = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2); | |
6871 | //Double_t two1stTermErrorSquared = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(1),2); | |
6872 | // <<sin(n*phi1)>>^2 | |
6873 | Double_t two2ndTerm = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2); | |
6874 | //Double_t two2ndTermErrorSquared = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(1),2); | |
6875 | // generalized QC{2}: | |
6876 | Double_t gQC2 = two - two1stTerm - two2ndTerm; // to be improved (terminology, notation) | |
6877 | fIntFlowQcumulants->SetBinContent(1,gQC2); | |
6878 | //fIntFlowQcumulants->SetBinError(1,0.); // to be improved (propagate error) | |
6879 | ||
6880 | // QC{4}: | |
6881 | // <<cos(n*phi1)>> <<cos(n*(phi1-phi2-phi3))>> | |
6882 | Double_t four1stTerm = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1) | |
6883 | * fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(3); | |
6884 | // <<sin(n*phi1)>> <<sin(n*(phi1-phi2-phi3))>> | |
6885 | Double_t four2ndTerm = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1) | |
6886 | * fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(3); | |
6887 | // <<cos(n*(phi1+phi2))>>^2 | |
6888 | Double_t four3rdTerm = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2),2); | |
6889 | // <<sin(n*(phi1+phi2))>>^2 | |
6890 | Double_t four4thTerm = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2),2); | |
6891 | // <<cos(n*(phi1+phi2))>> (<<cos(n*phi1)>>^2 - <<sin(n*phi1)>>^2) | |
6892 | Double_t four5thTerm = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2) | |
6893 | * (pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2) | |
6894 | - pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2)); | |
6895 | // <<sin(n*(phi1+phi2))>> <<cos(n*phi1)>> <<sin(n*phi1)>> | |
6896 | Double_t four6thTerm = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2) | |
6897 | * fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1) | |
6898 | * fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1); | |
6899 | // <<cos(n*(phi1-phi2))>> (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2) | |
6900 | Double_t four7thTerm = two*(pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2) | |
6901 | + pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2)); | |
6902 | // (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2)^2 | |
6903 | Double_t four8thTerm = pow(pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2) | |
6904 | + pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2),2); | |
6905 | // generalized QC{4}: | |
6906 | Double_t gQC4 = four-2.*pow(two,2.)-4.*four1stTerm+4.*four2ndTerm-four3rdTerm | |
6907 | - four4thTerm+4.*four5thTerm+8.*four6thTerm+8.*four7thTerm-6.*four8thTerm; | |
6908 | fIntFlowQcumulants->SetBinContent(2,gQC4); | |
6909 | //fIntFlowQcumulants->SetBinError(2,0.); // to be improved (propagate error) | |
6910 | ||
6911 | // ... to be improved (continued for 6th and 8th order) | |
6912 | ||
6913 | } // end of void AliFlowAnalysisWithQCumulants::CalculateQcumulantsCorrectedForNUAIntFlow() | |
6914 | ||
6915 | ||
6916 | //================================================================================================================================ | |
6917 | ||
6918 | ||
6919 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectedForNUA() | |
6920 | { | |
6921 | // Calculate integrated flow from generalized Q-cumulants (corrected for non-uniform acceptance). | |
6922 | ||
6923 | // to be improved: add protection for NULL pointers, propagate statistical errors from | |
6924 | // measured correlations and correction terms | |
6925 | ||
6926 | // generalized Q-cumulants: | |
6927 | Double_t qc2 = fIntFlowQcumulants->GetBinContent(1); // QC{2} | |
6928 | Double_t qc4 = fIntFlowQcumulants->GetBinContent(2); // QC{4} | |
6929 | //Double_t qc6 = fIntFlowQcumulants->GetBinContent(3); // QC{6} | |
6930 | //Double_t qc8 = fIntFlowQcumulants->GetBinContent(4); // QC{8} | |
6931 | ||
6932 | // integrated flow estimates: | |
6933 | Double_t v2 = 0.; // v{2,QC} | |
6934 | Double_t v4 = 0.; // v{4,QC} | |
6935 | //Double_t v6 = 0.; // v{6,QC} | |
6936 | //Double_t v8 = 0.; // v{8,QC} | |
6937 | ||
6938 | // calculate integrated flow estimates from generalized Q-cumulants: | |
6939 | if(qc2>=0.) v2 = pow(qc2,1./2.); | |
6940 | if(qc4<=0.) v4 = pow(-1.*qc4,1./4.); | |
6941 | //if(qc6>=0.) v6 = pow((1./4.)*qc6,1./6.); | |
6942 | //if(qc8<=0.) v8 = pow((-1./33.)*qc8,1./8.); | |
6943 | ||
6944 | // store integrated flow estimates from generalized Q-cumulants: | |
6945 | fIntFlow->SetBinContent(1,v2); | |
6946 | fIntFlow->SetBinContent(2,v4); | |
6947 | //fIntFlow->SetBinContent(3,v6); | |
6948 | //fIntFlow->SetBinContent(4,v8); | |
6949 | ||
6950 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectedForNUA() | |
6951 | ||
6952 | ||
6953 | //================================================================================================================================ | |
6954 | ||
6955 | ||
6956 | void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUAIntFlow() | |
6957 | { | |
6958 | // From profile fIntFlowCorrectionTermsForNUAPro[2] access measured corretion terms | |
6959 | // and their spread, correctly calculate the statistical errors and store the final | |
6960 | // results and statistical errors for correction terms in histogram fIntFlowCorrectionTermsForNUAHist[2]. | |
91d019b8 | 6961 | // |
ae09553c | 6962 | // Remark: Statistical error of correction temrs is calculated as: |
6963 | // | |
6964 | // statistical error = termA * spread * termB: | |
6965 | // termA = sqrt{sum_{i=1}^{N} w^2}/(sum_{i=1}^{N} w) | |
6966 | // termB = 1/sqrt(1-termA^2) | |
91d019b8 | 6967 | |
ae09553c | 6968 | /* // to be improved (implement protection here) |
6969 | for(Int_t power=0;power<2;power++) | |
6970 | { | |
6971 | if(!(fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power])) | |
6972 | { | |
6973 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power] is NULL in AFAWQC::FCIF() !!!!"<<endl; | |
6974 | cout<<"power = "<<power<<endl; | |
6975 | exit(0); | |
91d019b8 | 6976 | } |
ae09553c | 6977 | } |
6978 | */ | |
6979 | ||
6980 | for(Int_t sc=0;sc<2;sc++) // sin or cos correction terms | |
6981 | { | |
6982 | for(Int_t ci=1;ci<=10;ci++) // correction term index | |
6983 | { | |
6984 | Double_t correction = fIntFlowCorrectionTermsForNUAPro[sc]->GetBinContent(ci); | |
6985 | //Double_t spread = fIntFlowCorrectionTermsForNUAPro[sc]->GetBinError(ci); | |
6986 | //Double_t sumOfLinearEventWeights = fIntFlowSumOfEventWeights[0]->GetBinContent(ci); | |
6987 | //Double_t sumOfQuadraticEventWeights = fIntFlowSumOfEventWeights[1]->GetBinContent(ci); | |
6988 | //Double_t termA = 0.; | |
6989 | //Double_t termB = 0.; | |
6990 | //if(sumOfLinearEventWeights) | |
6991 | //{ | |
6992 | // termA = pow(sumOfQuadraticEventWeights,0.5)/sumOfLinearEventWeights; | |
6993 | //} else | |
6994 | // { | |
6995 | // cout<<"WARNING: sumOfLinearEventWeights == 0 in AFAWQC::FCIF() !!!!"<<endl; | |
6996 | // cout<<" (for "<<2*ci<<"-particle correlation)"<<endl; | |
6997 | // } | |
6998 | /* | |
6999 | if(1.-pow(termA,2.) > 0.) | |
91d019b8 | 7000 | { |
ae09553c | 7001 | termB = 1./pow(1-pow(termA,2.),0.5); |
7002 | } else | |
7003 | { | |
7004 | cout<<"WARNING: 1.-pow(termA,2.) <= 0 in AFAWQC::FCIF() !!!!"<<endl; | |
7005 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl; | |
7006 | } | |
7007 | Double_t statisticalError = termA * spread * termB; | |
7008 | */ | |
7009 | fIntFlowCorrectionTermsForNUAHist[sc]->SetBinContent(ci,correction); | |
7010 | //fIntFlowCorrectionTermsForNUAHist[sc]->SetBinError(ci,statisticalError); | |
7011 | } // end of for(Int_t ci=1;ci<=10;ci++) // correction term index | |
7012 | } // end of for(Int sc=0;sc<2;sc++) // sin or cos correction terms | |
7013 | ||
7014 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUAIntFlow() | |
7015 | ||
7016 | ||
7017 | //================================================================================================================================ | |
7018 | ||
7019 | ||
7020 | void AliFlowAnalysisWithQCumulants::GetPointersForNestedLoopsHistograms(TList *outputListHistos) | |
7021 | { | |
7022 | // Get pointers to all objects relevant for calculations with nested loops. | |
7023 | ||
7024 | if(outputListHistos) | |
7025 | { | |
7026 | TList *nestedLoopsList = dynamic_cast<TList*>(outputListHistos->FindObject("Nested Loops")); | |
7027 | if(nestedLoopsList) | |
7028 | { | |
7029 | this->SetNestedLoopsList(nestedLoopsList); | |
7030 | } else | |
7031 | { | |
7032 | cout<<"WARNING: nestedLoopsList is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
7033 | exit(0); | |
91d019b8 | 7034 | } |
7035 | ||
7036 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
ae09553c | 7037 | TString typeFlag[2] = {"RP","POI"}; // to be improved (should I promote this to data members?) |
7038 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; // to be improved (should I promote this to data members?) | |
91d019b8 | 7039 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; // to be improved (should I promote this to data members?) |
ae09553c | 7040 | |
7041 | TString evaluateNestedLoopsName = "fEvaluateNestedLoops"; | |
7042 | evaluateNestedLoopsName += fAnalysisLabel->Data(); | |
7043 | TProfile *evaluateNestedLoops = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(evaluateNestedLoopsName.Data())); | |
7044 | Bool_t bEvaluateIntFlowNestedLoops = kFALSE; | |
7045 | Bool_t bEvaluateDiffFlowNestedLoops = kFALSE; | |
7046 | if(evaluateNestedLoops) | |
7047 | { | |
7048 | this->SetEvaluateNestedLoops(evaluateNestedLoops); | |
7049 | bEvaluateIntFlowNestedLoops = (Int_t)evaluateNestedLoops->GetBinContent(1); | |
7050 | bEvaluateDiffFlowNestedLoops = (Int_t)evaluateNestedLoops->GetBinContent(2); | |
7051 | } | |
7052 | // nested loops relevant for integrated flow: | |
7053 | if(bEvaluateIntFlowNestedLoops) | |
7054 | { | |
91d019b8 | 7055 | // correlations: |
ae09553c | 7056 | TString intFlowDirectCorrelationsName = "fIntFlowDirectCorrelations"; |
91d019b8 | 7057 | intFlowDirectCorrelationsName += fAnalysisLabel->Data(); |
ae09553c | 7058 | TProfile *intFlowDirectCorrelations = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(intFlowDirectCorrelationsName.Data())); |
91d019b8 | 7059 | if(intFlowDirectCorrelations) |
7060 | { | |
ae09553c | 7061 | this->SetIntFlowDirectCorrelations(intFlowDirectCorrelations); |
91d019b8 | 7062 | } else |
7063 | { | |
ae09553c | 7064 | cout<<"WARNING: intFlowDirectCorrelations is NULL in AFAWQC::GPFNLH() !!!!"<<endl; |
7065 | exit(0); | |
91d019b8 | 7066 | } |
7067 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
7068 | { | |
ae09553c | 7069 | TString intFlowExtraDirectCorrelationsName = "fIntFlowExtraDirectCorrelations"; |
91d019b8 | 7070 | intFlowExtraDirectCorrelationsName += fAnalysisLabel->Data(); |
ae09553c | 7071 | TProfile *intFlowExtraDirectCorrelations = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(intFlowExtraDirectCorrelationsName.Data())); |
91d019b8 | 7072 | if(intFlowExtraDirectCorrelations) |
7073 | { | |
ae09553c | 7074 | this->SetIntFlowExtraDirectCorrelations(intFlowExtraDirectCorrelations); |
91d019b8 | 7075 | } else |
7076 | { | |
ae09553c | 7077 | cout<<"WARNING: intFlowExtraDirectCorrelations is NULL in AFAWQC::GPFNLH() !!!!"<<endl; |
7078 | exit(0); | |
91d019b8 | 7079 | } |
7080 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
ae09553c | 7081 | // correction terms for non-uniform acceptance: |
7082 | TString intFlowDirectCorrectionTermsForNUAName = "fIntFlowDirectCorrectionTermsForNUA"; | |
91d019b8 | 7083 | intFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); |
ae09553c | 7084 | TProfile *intFlowDirectCorrectionTermsForNUA[2] = {NULL}; |
7085 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
7086 | { | |
7087 | intFlowDirectCorrectionTermsForNUA[sc] = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(Form("%s: %s terms",intFlowDirectCorrectionTermsForNUAName.Data(),sinCosFlag[sc].Data()))); | |
91d019b8 | 7088 | if(intFlowDirectCorrectionTermsForNUA[sc]) |
7089 | { | |
ae09553c | 7090 | this->SetIntFlowDirectCorrectionTermsForNUA(intFlowDirectCorrectionTermsForNUA[sc],sc); |
91d019b8 | 7091 | } else |
7092 | { | |
7093 | cout<<"WARNING: intFlowDirectCorrectionTermsForNUA[sc] is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
ae09553c | 7094 | cout<<"sc = "<<sc<<endl; |
7095 | exit(0); | |
91d019b8 | 7096 | } |
ae09553c | 7097 | } // end of for(Int_t sc=0;sc<2;sc++) |
7098 | } // end of if(bEvaluateIntFlowNestedLoops) | |
91d019b8 | 7099 | |
ae09553c | 7100 | // nested loops relevant for differential flow: |
7101 | if(bEvaluateDiffFlowNestedLoops) | |
91d019b8 | 7102 | { |
7103 | // correlations: | |
ae09553c | 7104 | TString diffFlowDirectCorrelationsName = "fDiffFlowDirectCorrelations"; |
7105 | diffFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
91d019b8 | 7106 | TProfile *diffFlowDirectCorrelations[2][2][4] = {{{NULL}}}; |
ae09553c | 7107 | for(Int_t t=0;t<2;t++) |
7108 | { | |
7109 | for(Int_t pe=0;pe<2;pe++) | |
7110 | { | |
7111 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
7112 | { | |
7113 | diffFlowDirectCorrelations[t][pe][ci] = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(Form("%s, %s, %s, %s",diffFlowDirectCorrelationsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[ci].Data()))); | |
7114 | if(diffFlowDirectCorrelations[t][pe][ci]) | |
7115 | { | |
7116 | this->SetDiffFlowDirectCorrelations(diffFlowDirectCorrelations[t][pe][ci],t,pe,ci); | |
7117 | } else | |
7118 | { | |
7119 | cout<<"WARNING: diffFlowDirectCorrelations[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7120 | cout<<"t = "<<t<<endl; | |
7121 | cout<<"pe = "<<pe<<endl; | |
7122 | cout<<"ci = "<<ci<<endl; | |
7123 | } | |
7124 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
7125 | } // end of for(Int_t pe=0;pe<2;pe++) | |
91d019b8 | 7126 | } // end of for(Int_t t=0;t<2;t++) |
ae09553c | 7127 | // correction terms for non-uniform acceptance: |
7128 | TString diffFlowDirectCorrectionTermsForNUAName = "fDiffFlowDirectCorrectionTermsForNUA"; | |
7129 | diffFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
7130 | TProfile *diffFlowDirectCorrectionTermsForNUA[2][2][2][10] = {{{{NULL}}}}; | |
7131 | for(Int_t t=0;t<2;t++) | |
7132 | { | |
7133 | for(Int_t pe=0;pe<2;pe++) | |
7134 | { | |
7135 | // correction terms for NUA: | |
7136 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
7137 | { | |
7138 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
7139 | { | |
7140 | diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(Form("%s, %s, %s, %s, cti = %d",diffFlowDirectCorrectionTermsForNUAName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1))); | |
7141 | if(diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]) | |
7142 | { | |
7143 | this->SetDiffFlowDirectCorrectionTermsForNUA(diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti],t,pe,sc,cti); | |
7144 | } else | |
7145 | { | |
7146 | cout<<"WARNING: diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7147 | cout<<"t = "<<t<<endl; | |
7148 | cout<<"pe = "<<pe<<endl; | |
7149 | cout<<"sc = "<<sc<<endl; | |
7150 | cout<<"cti = "<<cti<<endl; | |
7151 | } | |
7152 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
7153 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
7154 | } // end of for(Int_t pe=0;pe<2;pe++) | |
7155 | } // end of for(Int_t t=0;t<2;t++) | |
7156 | } // end of if(bEvaluateDiffFlowNestedLoops) | |
7157 | } else // to if(outputListHistos) | |
7158 | { | |
7159 | cout<<"WARNING: outputListHistos is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
7160 | exit(0); | |
7161 | } | |
7162 | ||
7163 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForNestedLoopsHistograms(TList *outputListHistos) | |
7164 | ||
7165 | ||
7166 | //================================================================================================================================ | |
7167 | ||
7168 | ||
7169 | void AliFlowAnalysisWithQCumulants::StoreHarmonic() | |
7170 | { | |
7171 | // Store flow harmonic in common control histograms. | |
7172 | ||
7173 | (fCommonHists->GetHarmonic())->Fill(0.5,fHarmonic); | |
7174 | (fCommonHists2nd->GetHarmonic())->Fill(0.5,fHarmonic); | |
7175 | (fCommonHists4th->GetHarmonic())->Fill(0.5,fHarmonic); | |
7176 | (fCommonHists6th->GetHarmonic())->Fill(0.5,fHarmonic); | |
7177 | (fCommonHists8th->GetHarmonic())->Fill(0.5,fHarmonic); | |
7178 | ||
7179 | } // end of void AliFlowAnalysisWithQCumulants::StoreHarmonic() | |
7180 | ||
7181 | ||
7182 | //================================================================================================================================ | |
7183 | ||
7184 | ||
7185 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelationsUsingParticleWeights(TString type, TString ptOrEta) // type = RP or POI | |
7186 | { | |
7187 | // Calculate all correlations needed for differential flow using particle weights. | |
7188 | ||
7189 | Int_t t = -1; // type flag | |
7190 | Int_t pe = -1; // ptEta flag | |
7191 | ||
7192 | if(type == "RP") | |
7193 | { | |
7194 | t = 0; | |
7195 | } else if(type == "POI") | |
7196 | { | |
7197 | t = 1; | |
7198 | } | |
7199 | ||
7200 | if(ptOrEta == "Pt") | |
7201 | { | |
7202 | pe = 0; | |
7203 | } else if(ptOrEta == "Eta") | |
7204 | { | |
7205 | pe = 1; | |
7206 | } | |
7207 | ||
7208 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
7209 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
7210 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
7211 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
7212 | ||
7213 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
7214 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
7215 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
7216 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
7217 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
7218 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
7219 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
7220 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
7221 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
7222 | ||
7223 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
7224 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
7225 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
7226 | Double_t dSM1p3k = (*fSMpk)(0,3); | |
7227 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
7228 | Double_t dSM3p1k = (*fSMpk)(2,1); | |
7229 | ||
7230 | // looping over all bins and calculating reduced correlations: | |
7231 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7232 | { | |
7233 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
7234 | Double_t p1n0kRe = 0.; | |
7235 | Double_t p1n0kIm = 0.; | |
7236 | ||
7237 | // number of POIs in particular (pt,eta) bin): | |
7238 | Double_t mp = 0.; | |
7239 | ||
7240 | // real and imaginary parts of q_{m*n,k}: | |
7241 | // (weighted Q-vector evaluated for particles which are both RPs and POIs in particular (pt,eta) bin) | |
7242 | Double_t q1n2kRe = 0.; | |
7243 | Double_t q1n2kIm = 0.; | |
7244 | Double_t q2n1kRe = 0.; | |
7245 | Double_t q2n1kIm = 0.; | |
7246 | ||
7247 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
7248 | Double_t s1p1k = 0.; | |
7249 | Double_t s1p2k = 0.; | |
7250 | Double_t s1p3k = 0.; | |
7251 | ||
7252 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
7253 | Double_t dM0111 = 0.; | |
7254 | ||
7255 | if(type == "POI") | |
7256 | { | |
7257 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
7258 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
7259 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
7260 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
7261 | ||
7262 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
7263 | ||
7264 | t = 1; // typeFlag = RP or POI | |
7265 | ||
7266 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
7267 | q1n2kRe = fReRPQ1dEBE[2][pe][0][2]->GetBinContent(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
7268 | * fReRPQ1dEBE[2][pe][0][2]->GetBinEntries(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
7269 | q1n2kIm = fImRPQ1dEBE[2][pe][0][2]->GetBinContent(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
7270 | * fImRPQ1dEBE[2][pe][0][2]->GetBinEntries(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
7271 | q2n1kRe = fReRPQ1dEBE[2][pe][1][1]->GetBinContent(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
7272 | * fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
7273 | q2n1kIm = fImRPQ1dEBE[2][pe][1][1]->GetBinContent(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
7274 | * fImRPQ1dEBE[2][pe][1][1]->GetBinEntries(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
7275 | ||
7276 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
7277 | s1p1k = pow(fs1dEBE[2][pe][1]->GetBinContent(b)*fs1dEBE[2][pe][1]->GetBinEntries(b),1.); | |
7278 | s1p2k = pow(fs1dEBE[2][pe][2]->GetBinContent(b)*fs1dEBE[2][pe][2]->GetBinEntries(b),1.); | |
7279 | s1p3k = pow(fs1dEBE[2][pe][3]->GetBinContent(b)*fs1dEBE[2][pe][3]->GetBinEntries(b),1.); | |
7280 | ||
7281 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
7282 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
7283 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
7284 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
7285 | } | |
7286 | else if(type == "RP") | |
7287 | { | |
7288 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
7289 | q1n2kRe = fReRPQ1dEBE[0][pe][0][2]->GetBinContent(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
7290 | * fReRPQ1dEBE[0][pe][0][2]->GetBinEntries(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
7291 | q1n2kIm = fImRPQ1dEBE[0][pe][0][2]->GetBinContent(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
7292 | * fImRPQ1dEBE[0][pe][0][2]->GetBinEntries(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
7293 | q2n1kRe = fReRPQ1dEBE[0][pe][1][1]->GetBinContent(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
7294 | * fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
7295 | q2n1kIm = fImRPQ1dEBE[0][pe][1][1]->GetBinContent(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
7296 | * fImRPQ1dEBE[0][pe][1][1]->GetBinEntries(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
7297 | ||
7298 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
7299 | s1p1k = pow(fs1dEBE[0][pe][1]->GetBinContent(b)*fs1dEBE[0][pe][1]->GetBinEntries(b),1.); | |
7300 | s1p2k = pow(fs1dEBE[0][pe][2]->GetBinContent(b)*fs1dEBE[0][pe][2]->GetBinEntries(b),1.); | |
7301 | s1p3k = pow(fs1dEBE[0][pe][3]->GetBinContent(b)*fs1dEBE[0][pe][3]->GetBinEntries(b),1.); | |
7302 | ||
7303 | // to be improved (cross-checked): | |
7304 | p1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
7305 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
7306 | p1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
7307 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
7308 | ||
7309 | mp = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
7310 | ||
7311 | t = 0; // typeFlag = RP or POI | |
7312 | ||
7313 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
7314 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
7315 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
7316 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
7317 | //............................................................................................... | |
7318 | } | |
7319 | ||
7320 | // 2'-particle correlation: | |
7321 | Double_t two1n1nW0W1 = 0.; | |
7322 | if(mp*dSM1p1k-s1p1k) | |
7323 | { | |
7324 | two1n1nW0W1 = (p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k-s1p1k) | |
7325 | / (mp*dSM1p1k-s1p1k); | |
7326 | ||
7327 | // fill profile to get <<2'>> | |
7328 | fDiffFlowCorrelationsPro[t][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nW0W1,mp*dSM1p1k-s1p1k); | |
7329 | // histogram to store <2'> e-b-e (needed in some other methods): | |
7330 | fDiffFlowCorrelationsEBE[t][pe][0]->SetBinContent(b,two1n1nW0W1); | |
7331 | fDiffFlowEventWeightsForCorrelationsEBE[t][pe][0]->SetBinContent(b,mp*dSM1p1k-s1p1k); | |
7332 | } // end of if(mp*dSM1p1k-s1p1k) | |
7333 | ||
7334 | // 4'-particle correlation: | |
7335 | Double_t four1n1n1n1nW0W1W1W1 = 0.; | |
7336 | if(dM0111) | |
7337 | { | |
7338 | four1n1n1n1nW0W1W1W1 = ((pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
7339 | - q2n1kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.)) | |
7340 | - 2.*q2n1kIm*dReQ1n1k*dImQ1n1k | |
7341 | - p1n0kRe*(dReQ1n1k*dReQ2n2k+dImQ1n1k*dImQ2n2k) | |
7342 | + p1n0kIm*(dImQ1n1k*dReQ2n2k-dReQ1n1k*dImQ2n2k) | |
7343 | - 2.*dSM1p2k*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
7344 | - 2.*(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*s1p1k | |
7345 | + 6.*(q1n2kRe*dReQ1n1k+q1n2kIm*dImQ1n1k) | |
7346 | + 1.*(q2n1kRe*dReQ2n2k+q2n1kIm*dImQ2n2k) | |
7347 | + 2.*(p1n0kRe*dReQ1n3k+p1n0kIm*dImQ1n3k) | |
7348 | + 2.*s1p1k*dSM1p2k | |
7349 | - 6.*s1p3k) | |
7350 | / dM0111; // to be improved (notation of dM0111) | |
7351 | ||
7352 | // fill profile to get <<4'>> | |
7353 | fDiffFlowCorrelationsPro[t][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nW0W1W1W1,dM0111); | |
7354 | // histogram to store <4'> e-b-e (needed in some other methods): | |
7355 | fDiffFlowCorrelationsEBE[t][pe][1]->SetBinContent(b,four1n1n1n1nW0W1W1W1); | |
7356 | fDiffFlowEventWeightsForCorrelationsEBE[t][pe][1]->SetBinContent(b,dM0111); | |
7357 | } // end of if(dM0111) | |
7358 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7359 | ||
7360 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelationsUsingParticleWeights(TString type, TString ptOrEta); // type = RP or POI | |
7361 | ||
7362 | ||
7363 | //================================================================================================================================ | |
7364 | ||
7365 | ||
7366 | void AliFlowAnalysisWithQCumulants::FillCommonControlHistograms(AliFlowEventSimple *anEvent) | |
7367 | { | |
7368 | // Fill common control histograms. | |
7369 | ||
7370 | Int_t nRP = anEvent->GetEventNSelTracksRP(); // number of RPs (i.e. number of particles used to determine the reaction plane) | |
7371 | fCommonHists->FillControlHistograms(anEvent); | |
7372 | if(nRP>1) | |
7373 | { | |
7374 | fCommonHists2nd->FillControlHistograms(anEvent); | |
7375 | if(nRP>3) | |
7376 | { | |
7377 | fCommonHists4th->FillControlHistograms(anEvent); | |
7378 | if(nRP>5) | |
7379 | { | |
7380 | fCommonHists6th->FillControlHistograms(anEvent); | |
7381 | if(nRP>7) | |
7382 | { | |
7383 | fCommonHists8th->FillControlHistograms(anEvent); | |
7384 | } // end of if(nRP>7) | |
7385 | } // end of if(nRP>5) | |
7386 | } // end of if(nRP>3) | |
7387 | } // end of if(nRP>1) | |
7388 | ||
7389 | } // end of void AliFlowAnalysisWithQCumulants::FillCommonControlHistograms(AliFlowEventSimple *anEvent) | |
7390 | ||
7391 | ||
7392 | //================================================================================================================================ | |
7393 | ||
7394 | ||
7395 | void AliFlowAnalysisWithQCumulants::ResetEventByEventQuantities() | |
7396 | { | |
7397 | // Reset all event by event quantities. | |
7398 | ||
7399 | // integrated flow: | |
7400 | fReQ->Zero(); | |
7401 | fImQ->Zero(); | |
7402 | fSMpk->Zero(); | |
7403 | fIntFlowCorrelationsEBE->Reset(); | |
7404 | fIntFlowEventWeightsForCorrelationsEBE->Reset(); | |
7405 | fIntFlowCorrelationsAllEBE->Reset(); | |
7406 | ||
7407 | if(fApplyCorrectionForNUA) | |
7408 | { | |
7409 | for(Int_t sc=0;sc<2;sc++) | |
7410 | { | |
7411 | fIntFlowCorrectionTermsForNUAEBE[sc]->Reset(); | |
7412 | } | |
7413 | } | |
7414 | ||
7415 | // differential flow: | |
7416 | // 1D: | |
7417 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
7418 | { | |
7419 | for(Int_t pe=0;pe<2;pe++) // 1D in pt or eta | |
7420 | { | |
7421 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
7422 | { | |
7423 | for(Int_t k=0;k<9;k++) // power of weight | |
7424 | { | |
7425 | if(fReRPQ1dEBE[t][pe][m][k]) fReRPQ1dEBE[t][pe][m][k]->Reset(); | |
7426 | if(fImRPQ1dEBE[t][pe][m][k]) fImRPQ1dEBE[t][pe][m][k]->Reset(); | |
7427 | } | |
7428 | } | |
7429 | } | |
7430 | } | |
7431 | ||
7432 | for(Int_t t=0;t<3;t++) // type (0 = RP, 1 = POI, 2 = RP&&POI ) | |
7433 | { | |
7434 | for(Int_t pe=0;pe<2;pe++) // 1D in pt or eta | |
7435 | { | |
7436 | for(Int_t k=0;k<9;k++) | |
7437 | { | |
7438 | if(fs1dEBE[t][pe][k]) fs1dEBE[t][pe][k]->Reset(); | |
7439 | } | |
7440 | } | |
7441 | } | |
7442 | ||
7443 | // e-b-e reduced correlations: | |
7444 | for(Int_t t=0;t<2;t++) // type (0 = RP, 1 = POI) | |
7445 | { | |
7446 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
7447 | { | |
7448 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
7449 | { | |
7450 | if(fDiffFlowCorrelationsEBE[t][pe][rci]) fDiffFlowCorrelationsEBE[t][pe][rci]->Reset(); | |
7451 | if(fDiffFlowEventWeightsForCorrelationsEBE[t][pe][rci]) fDiffFlowEventWeightsForCorrelationsEBE[t][pe][rci]->Reset(); | |
7452 | } | |
7453 | } | |
7454 | } | |
7455 | ||
7456 | // correction terms for NUA: | |
7457 | for(Int_t t=0;t<2;t++) // type (0 = RP, 1 = POI) | |
7458 | { | |
7459 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
7460 | { | |
7461 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
7462 | { | |
7463 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
7464 | { | |
7465 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti]->Reset(); | |
7466 | } | |
7467 | } | |
7468 | } | |
7469 | } | |
7470 | ||
7471 | // 2D (pt,eta) | |
7472 | if(fCalculate2DFlow) | |
7473 | { | |
7474 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
7475 | { | |
7476 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
7477 | { | |
7478 | for(Int_t k=0;k<9;k++) // power of weight | |
7479 | { | |
7480 | if(fReRPQ2dEBE[t][m][k]) fReRPQ2dEBE[t][m][k]->Reset(); | |
7481 | if(fImRPQ2dEBE[t][m][k]) fImRPQ2dEBE[t][m][k]->Reset(); | |
7482 | } | |
7483 | } | |
7484 | } | |
7485 | for(Int_t t=0;t<3;t++) // type (0 = RP, 1 = POI, 2 = RP&&POI ) | |
7486 | { | |
7487 | for(Int_t k=0;k<9;k++) | |
7488 | { | |
7489 | if(fs2dEBE[t][k]) fs2dEBE[t][k]->Reset(); | |
7490 | } | |
7491 | } | |
7492 | } // end of if(fCalculate2DFlow) | |
7493 | ||
7494 | } // end of void AliFlowAnalysisWithQCumulants::ResetEventByEventQuantities(); | |
7495 | ||
7496 | ||
7497 | //================================================================================================================================ | |
7498 | ||
7499 | ||
7500 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTerms(TString type, TString ptOrEta) | |
7501 | { | |
7502 | // Calculate correction terms for non-uniform acceptance for differential flow (sin terms). | |
7503 | ||
7504 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][0][cti], where cti runs as follows: | |
7505 | // 0: <<sin n(psi1)>> | |
7506 | // 1: <<sin n(psi1+phi2)>> | |
7507 | // 2: <<sin n(psi1+phi2-phi3)>> | |
7508 | // 3: <<sin n(psi1-phi2-phi3)>>: | |
7509 | // 4: | |
7510 | // 5: | |
7511 | // 6: | |
7512 | ||
7513 | // multiplicity: | |
7514 | Double_t dMult = (*fSMpk)(0,0); | |
7515 | ||
7516 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
7517 | Double_t dReQ1n = (*fReQ)(0,0); | |
7518 | Double_t dReQ2n = (*fReQ)(1,0); | |
7519 | //Double_t dReQ3n = (*fReQ)(2,0); | |
7520 | //Double_t dReQ4n = (*fReQ)(3,0); | |
7521 | Double_t dImQ1n = (*fImQ)(0,0); | |
7522 | Double_t dImQ2n = (*fImQ)(1,0); | |
7523 | //Double_t dImQ3n = (*fImQ)(2,0); | |
7524 | //Double_t dImQ4n = (*fImQ)(3,0); | |
7525 | ||
7526 | Int_t t = -1; // type flag | |
7527 | Int_t pe = -1; // ptEta flag | |
7528 | ||
7529 | if(type == "RP") | |
7530 | { | |
7531 | t = 0; | |
7532 | } else if(type == "POI") | |
7533 | { | |
7534 | t = 1; | |
7535 | } | |
7536 | ||
7537 | if(ptOrEta == "Pt") | |
7538 | { | |
7539 | pe = 0; | |
7540 | } else if(ptOrEta == "Eta") | |
7541 | { | |
7542 | pe = 1; | |
7543 | } | |
7544 | ||
7545 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
7546 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
7547 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
7548 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
7549 | ||
7550 | // looping over all bins and calculating correction terms: | |
7551 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7552 | { | |
7553 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
7554 | Double_t p1n0kRe = 0.; | |
7555 | Double_t p1n0kIm = 0.; | |
7556 | ||
7557 | // number of POIs in particular pt or eta bin: | |
7558 | Double_t mp = 0.; | |
7559 | ||
7560 | // real and imaginary parts of q_{m*n,0} (non-weighted Q-vector evaluated for particles which are both RPs and POIs in particular pt or eta bin): | |
7561 | Double_t q1n0kRe = 0.; | |
7562 | Double_t q1n0kIm = 0.; | |
7563 | Double_t q2n0kRe = 0.; | |
7564 | Double_t q2n0kIm = 0.; | |
7565 | ||
7566 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
7567 | Double_t mq = 0.; | |
7568 | ||
7569 | if(type == "POI") | |
7570 | { | |
7571 | // q_{m*n,0}: | |
7572 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
7573 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
7574 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
7575 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
7576 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
7577 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
7578 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
7579 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
7580 | ||
7581 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
7582 | } | |
7583 | else if(type == "RP") | |
7584 | { | |
7585 | // q_{m*n,0}: | |
7586 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
7587 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
7588 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
7589 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
7590 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
7591 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
7592 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
7593 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
7594 | ||
7595 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
7596 | } | |
7597 | if(type == "POI") | |
7598 | { | |
7599 | // p_{m*n,0}: | |
7600 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
7601 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
7602 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
7603 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
7604 | ||
7605 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
7606 | ||
7607 | t = 1; // typeFlag = RP or POI | |
7608 | } | |
7609 | else if(type == "RP") | |
7610 | { | |
7611 | // p_{m*n,0} = q_{m*n,0}: | |
7612 | p1n0kRe = q1n0kRe; | |
7613 | p1n0kIm = q1n0kIm; | |
7614 | ||
7615 | mp = mq; | |
7616 | ||
7617 | t = 0; // typeFlag = RP or POI | |
7618 | } | |
7619 | ||
7620 | // <<sin n(psi1)>>: | |
7621 | Double_t sinP1nPsi = 0.; | |
7622 | if(mp) | |
7623 | { | |
7624 | sinP1nPsi = p1n0kIm/mp; | |
7625 | // fill profile for <<sin n(psi1)>>: | |
7626 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi,mp); | |
7627 | // histogram to store <sin n(psi1)> e-b-e (needed in some other methods): | |
7628 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][0]->SetBinContent(b,sinP1nPsi); | |
7629 | } // end of if(mp) | |
7630 | ||
7631 | // <<sin n(psi1+phi2)>>: | |
7632 | Double_t sinP1nPsiP1nPhi = 0.; | |
7633 | if(mp*dMult-mq) | |
7634 | { | |
7635 | sinP1nPsiP1nPhi = (p1n0kRe*dImQ1n+p1n0kIm*dReQ1n-q2n0kIm)/(mp*dMult-mq); | |
7636 | // fill profile for <<sin n(psi1+phi2)>>: | |
7637 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsiP1nPhi,mp*dMult-mq); | |
7638 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
7639 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][1]->SetBinContent(b,sinP1nPsiP1nPhi); | |
7640 | } // end of if(mp*dMult-mq) | |
7641 | ||
7642 | // <<sin n(psi1+phi2-phi3)>>: | |
7643 | Double_t sinP1nPsi1P1nPhi2MPhi3 = 0.; | |
7644 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
7645 | { | |
91d019b8 | 7646 | sinP1nPsi1P1nPhi2MPhi3 = (p1n0kIm*(pow(dImQ1n,2.)+pow(dReQ1n,2.)-dMult) |
7647 | - 1.*(q2n0kIm*dReQ1n-q2n0kRe*dImQ1n) | |
7648 | - mq*dImQ1n+2.*q1n0kIm) | |
ae09553c | 7649 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); |
7650 | // fill profile for <<sin n(psi1+phi2)>>: | |
7651 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1P1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
7652 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
7653 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][2]->SetBinContent(b,sinP1nPsi1P1nPhi2MPhi3); | |
7654 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
7655 | ||
7656 | // <<sin n(psi1-phi2-phi3)>>: | |
7657 | Double_t sinP1nPsi1M1nPhi2MPhi3 = 0.; | |
7658 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
7659 | { | |
91d019b8 | 7660 | sinP1nPsi1M1nPhi2MPhi3 = (p1n0kIm*(pow(dReQ1n,2.)-pow(dImQ1n,2.))-2.*p1n0kRe*dReQ1n*dImQ1n |
7661 | - 1.*(p1n0kIm*dReQ2n-p1n0kRe*dImQ2n) | |
7662 | + 2.*mq*dImQ1n-2.*q1n0kIm) | |
ae09553c | 7663 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); |
7664 | // fill profile for <<sin n(psi1+phi2)>>: | |
7665 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1M1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
7666 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
7667 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][3]->SetBinContent(b,sinP1nPsi1M1nPhi2MPhi3); | |
7668 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
7669 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7670 | ||
7671 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTerms(TString type, TString ptOrEta) | |
7672 | ||
7673 | ||
7674 | //================================================================================================================================ | |
7675 | ||
7676 | ||
7677 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTerms(TString type, TString ptOrEta) | |
7678 | { | |
7679 | // Calculate correction terms for non-uniform acceptance for differential flow (cos terms). | |
7680 | ||
7681 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][1][cti], where cti runs as follows: | |
7682 | // 0: <<cos n(psi)>> | |
7683 | // 1: <<cos n(psi1+phi2)>> | |
7684 | // 2: <<cos n(psi1+phi2-phi3)>> | |
7685 | // 3: <<cos n(psi1-phi2-phi3)>> | |
7686 | // 4: | |
7687 | // 5: | |
7688 | // 6: | |
7689 | ||
7690 | // multiplicity: | |
7691 | Double_t dMult = (*fSMpk)(0,0); | |
7692 | ||
7693 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
7694 | Double_t dReQ1n = (*fReQ)(0,0); | |
7695 | Double_t dReQ2n = (*fReQ)(1,0); | |
7696 | //Double_t dReQ3n = (*fReQ)(2,0); | |
7697 | //Double_t dReQ4n = (*fReQ)(3,0); | |
7698 | Double_t dImQ1n = (*fImQ)(0,0); | |
7699 | Double_t dImQ2n = (*fImQ)(1,0); | |
7700 | //Double_t dImQ3n = (*fImQ)(2,0); | |
7701 | //Double_t dImQ4n = (*fImQ)(3,0); | |
7702 | ||
7703 | Int_t t = -1; // type flag | |
7704 | Int_t pe = -1; // ptEta flag | |
7705 | ||
7706 | if(type == "RP") | |
7707 | { | |
7708 | t = 0; | |
7709 | } else if(type == "POI") | |
7710 | { | |
7711 | t = 1; | |
7712 | } | |
7713 | ||
7714 | if(ptOrEta == "Pt") | |
7715 | { | |
7716 | pe = 0; | |
7717 | } else if(ptOrEta == "Eta") | |
7718 | { | |
7719 | pe = 1; | |
7720 | } | |
7721 | ||
7722 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
7723 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
7724 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
7725 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
7726 | ||
7727 | // looping over all bins and calculating correction terms: | |
7728 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7729 | { | |
7730 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
7731 | Double_t p1n0kRe = 0.; | |
7732 | Double_t p1n0kIm = 0.; | |
7733 | ||
7734 | // number of POIs in particular pt or eta bin: | |
7735 | Double_t mp = 0.; | |
7736 | ||
7737 | // real and imaginary parts of q_{m*n,0} (non-weighted Q-vector evaluated for particles which are both RPs and POIs in particular pt or eta bin): | |
7738 | Double_t q1n0kRe = 0.; | |
7739 | Double_t q1n0kIm = 0.; | |
7740 | Double_t q2n0kRe = 0.; | |
7741 | Double_t q2n0kIm = 0.; | |
7742 | ||
7743 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
7744 | Double_t mq = 0.; | |
7745 | ||
7746 | if(type == "POI") | |
7747 | { | |
7748 | // q_{m*n,0}: | |
7749 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
7750 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
7751 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
7752 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
7753 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
7754 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
7755 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
7756 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
7757 | ||
7758 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
7759 | } | |
7760 | else if(type == "RP") | |
7761 | { | |
7762 | // q_{m*n,0}: | |
7763 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
7764 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
7765 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
7766 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
7767 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
7768 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
7769 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
7770 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
7771 | ||
7772 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
7773 | } | |
7774 | if(type == "POI") | |
7775 | { | |
7776 | // p_{m*n,0}: | |
7777 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
7778 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
7779 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
7780 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
7781 | ||
7782 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
7783 | ||
7784 | t = 1; // typeFlag = RP or POI | |
7785 | } | |
7786 | else if(type == "RP") | |
7787 | { | |
7788 | // p_{m*n,0} = q_{m*n,0}: | |
7789 | p1n0kRe = q1n0kRe; | |
7790 | p1n0kIm = q1n0kIm; | |
7791 | ||
7792 | mp = mq; | |
7793 | ||
7794 | t = 0; // typeFlag = RP or POI | |
7795 | } | |
7796 | ||
7797 | // <<cos n(psi1)>>: | |
7798 | Double_t cosP1nPsi = 0.; | |
7799 | if(mp) | |
7800 | { | |
7801 | cosP1nPsi = p1n0kRe/mp; | |
7802 | ||
7803 | // fill profile for <<cos n(psi1)>>: | |
7804 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi,mp); | |
7805 | // histogram to store <cos n(psi1)> e-b-e (needed in some other methods): | |
7806 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][0]->SetBinContent(b,cosP1nPsi); | |
7807 | } // end of if(mp) | |
7808 | ||
7809 | // <<cos n(psi1+phi2)>>: | |
7810 | Double_t cosP1nPsiP1nPhi = 0.; | |
7811 | if(mp*dMult-mq) | |
7812 | { | |
7813 | cosP1nPsiP1nPhi = (p1n0kRe*dReQ1n-p1n0kIm*dImQ1n-q2n0kRe)/(mp*dMult-mq); | |
7814 | // fill profile for <<sin n(psi1+phi2)>>: | |
7815 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsiP1nPhi,mp*dMult-mq); | |
7816 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
7817 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][1]->SetBinContent(b,cosP1nPsiP1nPhi); | |
7818 | } // end of if(mp*dMult-mq) | |
7819 | ||
7820 | // <<cos n(psi1+phi2-phi3)>>: | |
7821 | Double_t cosP1nPsi1P1nPhi2MPhi3 = 0.; | |
7822 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
7823 | { | |
91d019b8 | 7824 | cosP1nPsi1P1nPhi2MPhi3 = (p1n0kRe*(pow(dImQ1n,2.)+pow(dReQ1n,2.)-dMult) |
7825 | - 1.*(q2n0kRe*dReQ1n+q2n0kIm*dImQ1n) | |
7826 | - mq*dReQ1n+2.*q1n0kRe) | |
ae09553c | 7827 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); |
7828 | // fill profile for <<sin n(psi1+phi2)>>: | |
7829 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1P1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
7830 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
7831 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][2]->SetBinContent(b,cosP1nPsi1P1nPhi2MPhi3); | |
7832 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
7833 | ||
7834 | // <<cos n(psi1-phi2-phi3)>>: | |
7835 | Double_t cosP1nPsi1M1nPhi2MPhi3 = 0.; | |
7836 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
7837 | { | |
91d019b8 | 7838 | cosP1nPsi1M1nPhi2MPhi3 = (p1n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.))+2.*p1n0kIm*dReQ1n*dImQ1n |
7839 | - 1.*(p1n0kRe*dReQ2n+p1n0kIm*dImQ2n) | |
7840 | - 2.*mq*dReQ1n+2.*q1n0kRe) | |
ae09553c | 7841 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); |
7842 | // fill profile for <<sin n(psi1+phi2)>>: | |
7843 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1M1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
7844 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
7845 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][3]->SetBinContent(b,cosP1nPsi1M1nPhi2MPhi3); | |
7846 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
7847 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7848 | ||
7849 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTerms(TString type, TString ptOrEta) | |
7850 | ||
7851 | ||
7852 | //================================================================================================================================== | |
7853 | ||
7854 | ||
7855 | void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUADiffFlow(TString type, TString ptOrEta) | |
7856 | { | |
7857 | // Transfer prolfiles into histogams and correctly propagate the error (to be improved: description) | |
7858 | ||
7859 | // to be improved: debugged - I do not correctly transfer all profiles into histos (bug appears only after merging) | |
7860 | ||
7861 | Int_t t = -1; // type flag | |
7862 | Int_t pe = -1; // ptEta flag | |
7863 | ||
7864 | if(type == "RP") | |
7865 | { | |
7866 | t = 0; | |
7867 | } else if(type == "POI") | |
7868 | { | |
7869 | t = 1; | |
7870 | } | |
7871 | ||
7872 | if(ptOrEta == "Pt") | |
7873 | { | |
7874 | pe = 0; | |
7875 | } else if(ptOrEta == "Eta") | |
7876 | { | |
7877 | pe = 1; | |
7878 | } | |
7879 | ||
7880 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
7881 | //Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
7882 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
7883 | //Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
7884 | ||
7885 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
7886 | { | |
7887 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
7888 | { | |
7889 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7890 | { | |
7891 | Double_t correctionTerm = fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]->GetBinContent(b); | |
7892 | fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]->SetBinContent(b,correctionTerm); | |
7893 | // to be improved (propagate error correctly) | |
7894 | // ... | |
7895 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7896 | } // correction term index | |
7897 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
7898 | ||
7899 | }// end of void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUADiffFlow(TString type, TString ptOrEta) | |
7900 | ||
7901 | ||
7902 | //================================================================================================================================== | |
7903 | ||
7904 | ||
7905 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulantsCorrectedForNUA(TString type, TString ptOrEta) | |
7906 | { | |
7907 | // Calculate generalized differential flow Q-cumulants (corrected for non-uniform acceptance) | |
7908 | ||
7909 | Int_t typeFlag = -1; | |
7910 | Int_t ptEtaFlag = -1; | |
7911 | ||
7912 | if(type == "RP") | |
7913 | { | |
7914 | typeFlag = 0; | |
7915 | } else if(type == "POI") | |
7916 | { | |
7917 | typeFlag = 1; | |
7918 | } | |
7919 | ||
7920 | if(ptOrEta == "Pt") | |
7921 | { | |
7922 | ptEtaFlag = 0; | |
7923 | } else if(ptOrEta == "Eta") | |
7924 | { | |
7925 | ptEtaFlag = 1; | |
7926 | } | |
7927 | ||
7928 | // shortcuts: | |
7929 | Int_t t = typeFlag; | |
7930 | Int_t pe = ptEtaFlag; | |
7931 | ||
7932 | // common: | |
7933 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
91d019b8 | 7934 | |
7935 | // 2-particle correlation: | |
7936 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
7937 | // sin term coming from integrated flow: | |
ae09553c | 7938 | Double_t sinP1nPhi = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1); // <<sin(n*phi1)>> |
7939 | Double_t sinP1nPhi1P1nPhi2 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2); // <<sin(n*(phi1+phi2))>> | |
7940 | Double_t sinP1nPhi1M1nPhi2M1nPhi3 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(3); // <<sin(n*(phi1-phi2-phi3))>> | |
91d019b8 | 7941 | // cos term coming from integrated flow: |
ae09553c | 7942 | Double_t cosP1nPhi = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1); // <<cos(n*phi1)>> |
7943 | Double_t cosP1nPhi1P1nPhi2 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2); // <<cos(n*(phi1+phi2))>> | |
7944 | Double_t cosP1nPhi1M1nPhi2M1nPhi3 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(3); // <<cos(n*(phi1-phi2-phi3))>> | |
7945 | ||
7946 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7947 | { | |
7948 | Double_t twoPrime = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); // <<2'>> | |
7949 | Double_t fourPrime = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); // <<4'>> | |
7950 | Double_t sinP1nPsi = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][0]->GetBinContent(b); // <<sin n(Psi)>> | |
7951 | Double_t cosP1nPsi = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][0]->GetBinContent(b); // <<cos n(Psi)>> | |
7952 | Double_t sinP1nPsi1P1nPhi2 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][1]->GetBinContent(b); // <<sin n(psi1+phi2)>> | |
7953 | Double_t cosP1nPsi1P1nPhi2 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][1]->GetBinContent(b); // <<cos n(psi1+phi2)>> | |
7954 | Double_t sinP1nPsi1P1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][2]->GetBinContent(b); // <<sin n(psi1+phi2-phi3)>> | |
7955 | Double_t cosP1nPsi1P1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][2]->GetBinContent(b); // <<cos n(psi1+phi2-phi3)>> | |
7956 | Double_t sinP1nPsi1M1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][3]->GetBinContent(b); // <<sin n(psi1-phi2-phi3)>> | |
7957 | Double_t cosP1nPsi1M1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][3]->GetBinContent(b); // <<cos n(psi1-phi2-phi3)>> | |
7958 | // generalized QC{2'}: | |
7959 | Double_t qc2Prime = twoPrime - sinP1nPsi*sinP1nPhi - cosP1nPsi*cosP1nPhi; | |
91d019b8 | 7960 | fDiffFlowCumulants[t][pe][0]->SetBinContent(b,qc2Prime); |
ae09553c | 7961 | // generalized QC{4'}: |
91d019b8 | 7962 | Double_t qc4Prime = fourPrime-2.*twoPrime*two |
7963 | - cosP1nPsi*cosP1nPhi1M1nPhi2M1nPhi3 | |
7964 | + sinP1nPsi*sinP1nPhi1M1nPhi2M1nPhi3 | |
7965 | - cosP1nPhi*cosP1nPsi1M1nPhi2M1nPhi3 | |
7966 | + sinP1nPhi*sinP1nPsi1M1nPhi2M1nPhi3 | |
7967 | - 2.*cosP1nPhi*cosP1nPsi1P1nPhi2M1nPhi3 | |
7968 | - 2.*sinP1nPhi*sinP1nPsi1P1nPhi2M1nPhi3 | |
7969 | - cosP1nPsi1P1nPhi2*cosP1nPhi1P1nPhi2 | |
7970 | - sinP1nPsi1P1nPhi2*sinP1nPhi1P1nPhi2 | |
7971 | + 2.*cosP1nPhi1P1nPhi2*(cosP1nPsi*cosP1nPhi-sinP1nPsi*sinP1nPhi) | |
7972 | + 2.*sinP1nPhi1P1nPhi2*(cosP1nPsi*sinP1nPhi+sinP1nPsi*cosP1nPhi) | |
7973 | + 4.*two*(cosP1nPsi*cosP1nPhi+sinP1nPsi*sinP1nPhi) | |
7974 | + 2.*cosP1nPsi1P1nPhi2*(pow(cosP1nPhi,2.)-pow(sinP1nPhi,2.)) | |
7975 | + 4.*sinP1nPsi1P1nPhi2*cosP1nPhi*sinP1nPhi | |
7976 | + 4.*twoPrime*(pow(cosP1nPhi,2.)+pow(sinP1nPhi,2.)) | |
7977 | - 6.*(pow(cosP1nPhi,2.)-pow(sinP1nPhi,2.)) | |
7978 | * (cosP1nPsi*cosP1nPhi-sinP1nPsi*sinP1nPhi) | |
7979 | - 12.*cosP1nPhi*sinP1nPhi | |
7980 | * (sinP1nPsi*cosP1nPhi+cosP1nPsi*sinP1nPhi); | |
ae09553c | 7981 | fDiffFlowCumulants[t][pe][1]->SetBinContent(b,qc4Prime); |
7982 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
7983 | ||
7984 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulantsCorrectedForNUA(TString type, TString ptOrEta) | |
7985 | ||
7986 | ||
7987 | //================================================================================================================================== | |
7988 | ||
7989 | ||
7990 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectedForNUA(TString type, TString ptOrEta) | |
7991 | { | |
7992 | // Calculate differential flow corrected for non-uniform acceptance. | |
7993 | ||
7994 | // to be improved (rewritten completely) | |
7995 | ||
7996 | Int_t typeFlag = -1; | |
7997 | Int_t ptEtaFlag = -1; | |
7998 | ||
7999 | if(type == "RP") | |
8000 | { | |
8001 | typeFlag = 0; | |
8002 | } else if(type == "POI") | |
8003 | { | |
8004 | typeFlag = 1; | |
8005 | } | |
8006 | ||
8007 | if(ptOrEta == "Pt") | |
8008 | { | |
8009 | ptEtaFlag = 0; | |
8010 | } else if(ptOrEta == "Eta") | |
8011 | { | |
8012 | ptEtaFlag = 1; | |
8013 | } | |
8014 | ||
8015 | // shortcuts: | |
8016 | Int_t t = typeFlag; | |
8017 | Int_t pe = ptEtaFlag; | |
8018 | ||
8019 | // common: | |
8020 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
8021 | ||
8022 | // to be improved: access here generalized QC{2} and QC{4} instead: | |
8023 | Double_t dV2 = fIntFlow->GetBinContent(1); | |
8024 | Double_t dV4 = fIntFlow->GetBinContent(2); | |
8025 | ||
8026 | // loop over pt or eta bins: | |
8027 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
8028 | { | |
8029 | // generalized QC{2'}: | |
8030 | Double_t gQC2Prime = fDiffFlowCumulants[t][pe][0]->GetBinContent(b); | |
8031 | // v'{2}: | |
8032 | if(dV2>0) | |
8033 | { | |
8034 | Double_t v2Prime = gQC2Prime/dV2; | |
8035 | fDiffFlow[t][pe][0]->SetBinContent(b,v2Prime); | |
8036 | } | |
8037 | // generalized QC{4'}: | |
8038 | Double_t gQC4Prime = fDiffFlowCumulants[t][pe][1]->GetBinContent(b); | |
8039 | // v'{4}: | |
8040 | if(dV4>0) | |
8041 | { | |
8042 | Double_t v4Prime = -gQC4Prime/pow(dV4,3.); | |
8043 | fDiffFlow[t][pe][1]->SetBinContent(b,v4Prime); | |
8044 | } | |
8045 | } // end of for(Int_t b=1;b<=fnBinsPtEta[pe];b++) | |
8046 | ||
8047 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectedForNUA(TString type, TString ptOrEta); | |
8048 | ||
8049 | ||
91d019b8 | 8050 | //================================================================================================================================== |
8051 | ||
ae09553c | 8052 | |
8053 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoops(AliFlowEventSimple* anEvent) | |
8054 | { | |
91d019b8 | 8055 | // Evaluate with nested loops multiparticle correlations for integrated flow (without using the particle weights). |
ae09553c | 8056 | |
91d019b8 | 8057 | // Remark: Results are stored in profile fIntFlowDirectCorrelations whose binning is organized as follows: |
ae09553c | 8058 | // |
8059 | // 1st bin: <2>_{1n|1n} = two1n1n = cos(n*(phi1-phi2))> | |
8060 | // 2nd bin: <2>_{2n|2n} = two2n2n = cos(2n*(phi1-phi2))> | |
8061 | // 3rd bin: <2>_{3n|3n} = two3n3n = cos(3n*(phi1-phi2))> | |
8062 | // 4th bin: <2>_{4n|4n} = two4n4n = cos(4n*(phi1-phi2))> | |
8063 | // 5th bin: ---- EMPTY ---- | |
8064 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1n = <cos(n*(2.*phi1-phi2-phi3))> | |
8065 | // 7th bin: <3>_{3n|2n,1n} = three3n2n1n = <cos(n*(3.*phi1-2.*phi2-phi3))> | |
8066 | // 8th bin: <3>_{4n|2n,2n} = three4n2n2n = <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
8067 | // 9th bin: <3>_{4n|3n,1n} = three4n3n1n = <cos(n*(4.*phi1-3.*phi2-phi3))> | |
8068 | // 10th bin: ---- EMPTY ---- | |
8069 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1n = <cos(n*(phi1+phi2-phi3-phi4))> | |
8070 | // 12th bin: <4>_{2n,1n|2n,1n} = four2n1n2n1n = <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
8071 | // 13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n = <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
8072 | // 14th bin: <4>_{3n|1n,1n,1n} = four3n1n1n1n = <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
8073 | // 15th bin: <4>_{3n,1n|3n,1n} = four3n1n3n1n = <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
8074 | // 16th bin: <4>_{3n,1n|2n,2n} = four3n1n2n2n = <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
8075 | // 17th bin: <4>_{4n|2n,1n,1n} = four4n2n1n1n = <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
8076 | // 18th bin: ---- EMPTY ---- | |
8077 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = five2n1n1n1n1n = <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
8078 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = five2n2n2n1n1n = <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
8079 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = five3n1n2n1n1n = <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
8080 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = five4n1n1n1n1n = <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
8081 | // 23rd bin: ---- EMPTY ---- | |
8082 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = six1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
8083 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = six2n1n1n2n1n1n = <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
8084 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = six2n2n1n1n1n1n = <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
8085 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = six3n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
8086 | // 28th bin: ---- EMPTY ---- | |
8087 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = seven2n1n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
8088 | // 30th bin: ---- EMPTY ---- | |
8089 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = eight1n1n1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
8090 | ||
8091 | Int_t nPrim = anEvent->NumberOfTracks(); | |
8092 | AliFlowTrackSimple *aftsTrack = NULL; | |
8093 | Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.; | |
8094 | Int_t n = fHarmonic; | |
91d019b8 | 8095 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) |
8096 | Double_t dMult = (*fSMpk)(0,0); | |
8097 | cout<<endl; | |
8098 | cout<<"Multiparticle correlations: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
8099 | if(dMult<2) | |
8100 | { | |
8101 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
8102 | } else if (dMult>fMaxAllowedMultiplicity) | |
8103 | { | |
8104 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
8105 | } else | |
8106 | { | |
ae09553c | 8107 | cout<<"... evaluating nested loops (without using particle weights)..."<<endl; |
91d019b8 | 8108 | } |
8109 | ||
ae09553c | 8110 | // 2-particle correlations: |
91d019b8 | 8111 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) |
8112 | { | |
ae09553c | 8113 | for(Int_t i1=0;i1<nPrim;i1++) |
8114 | { | |
8115 | aftsTrack=anEvent->GetTrack(i1); | |
8116 | if(!(aftsTrack->InRPSelection())) continue; | |
8117 | phi1=aftsTrack->Phi(); | |
8118 | for(Int_t i2=0;i2<nPrim;i2++) | |
8119 | { | |
8120 | if(i2==i1)continue; | |
8121 | aftsTrack=anEvent->GetTrack(i2); | |
8122 | if(!(aftsTrack->InRPSelection())) continue; | |
91d019b8 | 8123 | phi2=aftsTrack->Phi(); |
ae09553c | 8124 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; |
8125 | // fill the profile with 2-p correlations: | |
8126 | fIntFlowDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),1.); // <cos(n*(phi1-phi2))> | |
8127 | fIntFlowDirectCorrelations->Fill(1.5,cos(2.*n*(phi1-phi2)),1.); // <cos(2n*(phi1-phi2))> | |
8128 | fIntFlowDirectCorrelations->Fill(2.5,cos(3.*n*(phi1-phi2)),1.); // <cos(3n*(phi1-phi2))> | |
8129 | fIntFlowDirectCorrelations->Fill(3.5,cos(4.*n*(phi1-phi2)),1.); // <cos(4n*(phi1-phi2))> | |
8130 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
8131 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8132 | } // end of if(nPrim>=2) |
ae09553c | 8133 | |
8134 | // 3-particle correlations: | |
91d019b8 | 8135 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) |
8136 | { | |
ae09553c | 8137 | for(Int_t i1=0;i1<nPrim;i1++) |
8138 | { | |
8139 | aftsTrack=anEvent->GetTrack(i1); | |
8140 | if(!(aftsTrack->InRPSelection())) continue; | |
8141 | phi1=aftsTrack->Phi(); | |
8142 | for(Int_t i2=0;i2<nPrim;i2++) | |
8143 | { | |
8144 | if(i2==i1)continue; | |
8145 | aftsTrack=anEvent->GetTrack(i2); | |
8146 | if(!(aftsTrack->InRPSelection())) continue; | |
8147 | phi2=aftsTrack->Phi(); | |
8148 | for(Int_t i3=0;i3<nPrim;i3++) | |
8149 | { | |
8150 | if(i3==i1||i3==i2)continue; | |
8151 | aftsTrack=anEvent->GetTrack(i3); | |
8152 | if(!(aftsTrack->InRPSelection())) continue; | |
8153 | phi3=aftsTrack->Phi(); | |
8154 | if(nPrim==3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; | |
91d019b8 | 8155 | // fill the profile with 3-p correlations: |
ae09553c | 8156 | fIntFlowDirectCorrelations->Fill(5.,cos(2.*n*phi1-n*(phi2+phi3)),1.); //<3>_{2n|nn,n} |
8157 | fIntFlowDirectCorrelations->Fill(6.,cos(3.*n*phi1-2.*n*phi2-n*phi3),1.); //<3>_{3n|2n,n} | |
8158 | fIntFlowDirectCorrelations->Fill(7.,cos(4.*n*phi1-2.*n*phi2-2.*n*phi3),1.); //<3>_{4n|2n,2n} | |
8159 | fIntFlowDirectCorrelations->Fill(8.,cos(4.*n*phi1-3.*n*phi2-n*phi3),1.); //<3>_{4n|3n,n} | |
8160 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
8161 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
8162 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8163 | } // end of if(nPrim>=3) |
ae09553c | 8164 | |
91d019b8 | 8165 | // 4-particle correlations: |
8166 | if(nPrim>=4 && nPrim<=fMaxAllowedMultiplicity) | |
ae09553c | 8167 | { |
8168 | for(Int_t i1=0;i1<nPrim;i1++) | |
8169 | { | |
8170 | aftsTrack=anEvent->GetTrack(i1); | |
8171 | if(!(aftsTrack->InRPSelection())) continue; | |
8172 | phi1=aftsTrack->Phi(); | |
8173 | for(Int_t i2=0;i2<nPrim;i2++) | |
8174 | { | |
8175 | if(i2==i1)continue; | |
8176 | aftsTrack=anEvent->GetTrack(i2); | |
8177 | if(!(aftsTrack->InRPSelection())) continue; | |
8178 | phi2=aftsTrack->Phi(); | |
8179 | for(Int_t i3=0;i3<nPrim;i3++) | |
8180 | { | |
8181 | if(i3==i1||i3==i2)continue; | |
8182 | aftsTrack=anEvent->GetTrack(i3); | |
8183 | if(!(aftsTrack->InRPSelection())) continue; | |
8184 | phi3=aftsTrack->Phi(); | |
8185 | for(Int_t i4=0;i4<nPrim;i4++) | |
8186 | { | |
8187 | if(i4==i1||i4==i2||i4==i3)continue; | |
8188 | aftsTrack=anEvent->GetTrack(i4); | |
8189 | if(!(aftsTrack->InRPSelection())) continue; | |
8190 | phi4=aftsTrack->Phi(); | |
8191 | if(nPrim==4) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<"\r"<<flush; | |
91d019b8 | 8192 | // fill the profile with 4-p correlations: |
ae09553c | 8193 | fIntFlowDirectCorrelations->Fill(10.,cos(n*phi1+n*phi2-n*phi3-n*phi4),1.); // <4>_{n,n|n,n} |
8194 | fIntFlowDirectCorrelations->Fill(11.,cos(2.*n*phi1+n*phi2-2.*n*phi3-n*phi4),1.); // <4>_{2n,n|2n,n} | |
8195 | fIntFlowDirectCorrelations->Fill(12.,cos(2.*n*phi1+2*n*phi2-2.*n*phi3-2.*n*phi4),1.); // <4>_{2n,2n|2n,2n} | |
8196 | fIntFlowDirectCorrelations->Fill(13.,cos(3.*n*phi1-n*phi2-n*phi3-n*phi4),1.); // <4>_{3n|n,n,n} | |
8197 | fIntFlowDirectCorrelations->Fill(14.,cos(3.*n*phi1+n*phi2-3.*n*phi3-n*phi4),1.); // <4>_{3n,n|3n,n} | |
8198 | fIntFlowDirectCorrelations->Fill(15.,cos(3.*n*phi1+n*phi2-2.*n*phi3-2.*n*phi4),1.); // <4>_{3n,n|2n,2n} | |
8199 | fIntFlowDirectCorrelations->Fill(16.,cos(4.*n*phi1-2.*n*phi2-n*phi3-n*phi4),1.); // <4>_{4n|2n,n,n} | |
8200 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
8201 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
8202 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
8203 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8204 | } // end of if(nPrim>=) |
ae09553c | 8205 | |
8206 | // 5-particle correlations: | |
91d019b8 | 8207 | if(nPrim>=5 && nPrim<=fMaxAllowedMultiplicity) |
8208 | { | |
ae09553c | 8209 | for(Int_t i1=0;i1<nPrim;i1++) |
8210 | { | |
8211 | aftsTrack=anEvent->GetTrack(i1); | |
8212 | if(!(aftsTrack->InRPSelection())) continue; | |
8213 | phi1=aftsTrack->Phi(); | |
8214 | for(Int_t i2=0;i2<nPrim;i2++) | |
8215 | { | |
8216 | if(i2==i1)continue; | |
8217 | aftsTrack=anEvent->GetTrack(i2); | |
8218 | if(!(aftsTrack->InRPSelection())) continue; | |
8219 | phi2=aftsTrack->Phi(); | |
8220 | for(Int_t i3=0;i3<nPrim;i3++) | |
8221 | { | |
8222 | if(i3==i1||i3==i2)continue; | |
8223 | aftsTrack=anEvent->GetTrack(i3); | |
8224 | if(!(aftsTrack->InRPSelection())) continue; | |
8225 | phi3=aftsTrack->Phi(); | |
8226 | for(Int_t i4=0;i4<nPrim;i4++) | |
8227 | { | |
8228 | if(i4==i1||i4==i2||i4==i3)continue; | |
8229 | aftsTrack=anEvent->GetTrack(i4); | |
8230 | if(!(aftsTrack->InRPSelection())) continue; | |
8231 | phi4=aftsTrack->Phi(); | |
8232 | for(Int_t i5=0;i5<nPrim;i5++) | |
8233 | { | |
8234 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
8235 | aftsTrack=anEvent->GetTrack(i5); | |
8236 | if(!(aftsTrack->InRPSelection())) continue; | |
8237 | phi5=aftsTrack->Phi(); | |
8238 | if(nPrim==5) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<"\r"<<flush; | |
91d019b8 | 8239 | // fill the profile with 5-p correlations: |
ae09553c | 8240 | fIntFlowDirectCorrelations->Fill(18.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),1.); //<5>_{2n,n|n,n,n} |
8241 | fIntFlowDirectCorrelations->Fill(19.,cos(2.*n*phi1+2.*n*phi2-2.*n*phi3-n*phi4-n*phi5),1.); //<5>_{2n,2n|2n,n,n} | |
8242 | fIntFlowDirectCorrelations->Fill(20.,cos(3.*n*phi1+n*phi2-2.*n*phi3-n*phi4-n*phi5),1.); //<5>_{3n,n|2n,n,n} | |
8243 | fIntFlowDirectCorrelations->Fill(21.,cos(4.*n*phi1-n*phi2-n*phi3-n*phi4-n*phi5),1.); //<5>_{4n|n,n,n,n} | |
8244 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
8245 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
8246 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
8247 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
8248 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8249 | } // end of if(nPrim>=5) |
ae09553c | 8250 | |
91d019b8 | 8251 | // 6-particle correlations: |
ae09553c | 8252 | if(nPrim>=6 && nPrim<=fMaxAllowedMultiplicity) |
8253 | { | |
8254 | for(Int_t i1=0;i1<nPrim;i1++) | |
8255 | { | |
8256 | aftsTrack=anEvent->GetTrack(i1); | |
8257 | if(!(aftsTrack->InRPSelection())) continue; | |
8258 | phi1=aftsTrack->Phi(); | |
8259 | for(Int_t i2=0;i2<nPrim;i2++) | |
8260 | { | |
8261 | if(i2==i1)continue; | |
8262 | aftsTrack=anEvent->GetTrack(i2); | |
8263 | if(!(aftsTrack->InRPSelection())) continue; | |
8264 | phi2=aftsTrack->Phi(); | |
8265 | for(Int_t i3=0;i3<nPrim;i3++) | |
8266 | { | |
8267 | if(i3==i1||i3==i2)continue; | |
8268 | aftsTrack=anEvent->GetTrack(i3); | |
8269 | if(!(aftsTrack->InRPSelection())) continue; | |
8270 | phi3=aftsTrack->Phi(); | |
8271 | for(Int_t i4=0;i4<nPrim;i4++) | |
8272 | { | |
8273 | if(i4==i1||i4==i2||i4==i3)continue; | |
8274 | aftsTrack=anEvent->GetTrack(i4); | |
8275 | if(!(aftsTrack->InRPSelection())) continue; | |
8276 | phi4=aftsTrack->Phi(); | |
8277 | for(Int_t i5=0;i5<nPrim;i5++) | |
8278 | { | |
8279 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
8280 | aftsTrack=anEvent->GetTrack(i5); | |
8281 | if(!(aftsTrack->InRPSelection())) continue; | |
8282 | phi5=aftsTrack->Phi(); | |
8283 | for(Int_t i6=0;i6<nPrim;i6++) | |
8284 | { | |
8285 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
8286 | aftsTrack=anEvent->GetTrack(i6); | |
8287 | if(!(aftsTrack->InRPSelection())) continue; | |
8288 | phi6=aftsTrack->Phi(); | |
8289 | if(nPrim==6) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<"\r"<<flush; | |
91d019b8 | 8290 | // fill the profile with 6-p correlations: |
ae09553c | 8291 | fIntFlowDirectCorrelations->Fill(23.,cos(n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6),1.); //<6>_{n,n,n|n,n,n} |
8292 | fIntFlowDirectCorrelations->Fill(24.,cos(2.*n*phi1+n*phi2+n*phi3-2.*n*phi4-n*phi5-n*phi6),1.); //<6>_{2n,n,n|2n,n,n} | |
8293 | fIntFlowDirectCorrelations->Fill(25.,cos(2.*n*phi1+2.*n*phi2-n*phi3-n*phi4-n*phi5-n*phi6),1.); //<6>_{2n,2n|n,n,n,n} | |
8294 | fIntFlowDirectCorrelations->Fill(26.,cos(3.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5-n*phi6),1.); //<6>_{3n,n|n,n,n,n} | |
8295 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
8296 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
8297 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
8298 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
8299 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
8300 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8301 | } // end of if(nPrim>=6) |
ae09553c | 8302 | |
8303 | // 7-particle correlations: | |
91d019b8 | 8304 | if(nPrim>=7 && nPrim<=fMaxAllowedMultiplicity) |
8305 | { | |
ae09553c | 8306 | for(Int_t i1=0;i1<nPrim;i1++) |
8307 | { | |
8308 | aftsTrack=anEvent->GetTrack(i1); | |
8309 | if(!(aftsTrack->InRPSelection())) continue; | |
8310 | phi1=aftsTrack->Phi(); | |
8311 | for(Int_t i2=0;i2<nPrim;i2++) | |
8312 | { | |
8313 | if(i2==i1)continue; | |
8314 | aftsTrack=anEvent->GetTrack(i2); | |
8315 | if(!(aftsTrack->InRPSelection())) continue; | |
8316 | phi2=aftsTrack->Phi(); | |
8317 | for(Int_t i3=0;i3<nPrim;i3++) | |
8318 | { | |
8319 | if(i3==i1||i3==i2)continue; | |
8320 | aftsTrack=anEvent->GetTrack(i3); | |
8321 | if(!(aftsTrack->InRPSelection())) continue; | |
8322 | phi3=aftsTrack->Phi(); | |
8323 | for(Int_t i4=0;i4<nPrim;i4++) | |
8324 | { | |
8325 | if(i4==i1||i4==i2||i4==i3)continue; | |
8326 | aftsTrack=anEvent->GetTrack(i4); | |
8327 | if(!(aftsTrack->InRPSelection())) continue; | |
8328 | phi4=aftsTrack->Phi(); | |
8329 | for(Int_t i5=0;i5<nPrim;i5++) | |
8330 | { | |
8331 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
8332 | aftsTrack=anEvent->GetTrack(i5); | |
8333 | if(!(aftsTrack->InRPSelection())) continue; | |
8334 | phi5=aftsTrack->Phi(); | |
8335 | for(Int_t i6=0;i6<nPrim;i6++) | |
8336 | { | |
8337 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
8338 | aftsTrack=anEvent->GetTrack(i6); | |
8339 | if(!(aftsTrack->InRPSelection())) continue; | |
8340 | phi6=aftsTrack->Phi(); | |
8341 | for(Int_t i7=0;i7<nPrim;i7++) | |
8342 | { | |
8343 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue; | |
8344 | aftsTrack=anEvent->GetTrack(i7); | |
8345 | if(!(aftsTrack->InRPSelection())) continue; | |
8346 | phi7=aftsTrack->Phi(); | |
8347 | if(nPrim==7) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<" "<<i7<<"\r"<<flush; | |
91d019b8 | 8348 | // fill the profile with 7-p correlation: |
ae09553c | 8349 | fIntFlowDirectCorrelations->Fill(28.,cos(2.*n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6-n*phi7),1.); // <7>_{2n,n,n|n,n,n,n} |
8350 | } // end of for(Int_t i7=0;i7<nPrim;i7++) | |
8351 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
8352 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
8353 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
8354 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
8355 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
8356 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8357 | } // end of if(nPrim>=7) |
ae09553c | 8358 | |
8359 | // 8-particle correlations: | |
91d019b8 | 8360 | if(nPrim>=8 && nPrim<=fMaxAllowedMultiplicity) |
8361 | { | |
ae09553c | 8362 | for(Int_t i1=0;i1<nPrim;i1++) |
8363 | { | |
8364 | aftsTrack=anEvent->GetTrack(i1); | |
8365 | if(!(aftsTrack->InRPSelection())) continue; | |
8366 | phi1=aftsTrack->Phi(); | |
8367 | for(Int_t i2=0;i2<nPrim;i2++) | |
8368 | { | |
8369 | if(i2==i1)continue; | |
8370 | aftsTrack=anEvent->GetTrack(i2); | |
8371 | if(!(aftsTrack->InRPSelection())) continue; | |
8372 | phi2=aftsTrack->Phi(); | |
8373 | for(Int_t i3=0;i3<nPrim;i3++) | |
8374 | { | |
8375 | if(i3==i1||i3==i2)continue; | |
8376 | aftsTrack=anEvent->GetTrack(i3); | |
8377 | if(!(aftsTrack->InRPSelection())) continue; | |
8378 | phi3=aftsTrack->Phi(); | |
8379 | for(Int_t i4=0;i4<nPrim;i4++) | |
8380 | { | |
8381 | if(i4==i1||i4==i2||i4==i3)continue; | |
8382 | aftsTrack=anEvent->GetTrack(i4); | |
8383 | if(!(aftsTrack->InRPSelection())) continue; | |
8384 | phi4=aftsTrack->Phi(); | |
8385 | for(Int_t i5=0;i5<nPrim;i5++) | |
8386 | { | |
8387 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
8388 | aftsTrack=anEvent->GetTrack(i5); | |
8389 | if(!(aftsTrack->InRPSelection())) continue; | |
8390 | phi5=aftsTrack->Phi(); | |
8391 | for(Int_t i6=0;i6<nPrim;i6++) | |
8392 | { | |
8393 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
8394 | aftsTrack=anEvent->GetTrack(i6); | |
8395 | if(!(aftsTrack->InRPSelection())) continue; | |
8396 | phi6=aftsTrack->Phi(); | |
8397 | for(Int_t i7=0;i7<nPrim;i7++) | |
8398 | { | |
8399 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue; | |
8400 | aftsTrack=anEvent->GetTrack(i7); | |
8401 | if(!(aftsTrack->InRPSelection())) continue; | |
8402 | phi7=aftsTrack->Phi(); | |
8403 | for(Int_t i8=0;i8<nPrim;i8++) | |
8404 | { | |
8405 | if(i8==i1||i8==i2||i8==i3||i8==i4||i8==i5||i8==i6||i8==i7)continue; | |
8406 | aftsTrack=anEvent->GetTrack(i8); | |
8407 | if(!(aftsTrack->InRPSelection())) continue; | |
91d019b8 | 8408 | phi8=aftsTrack->Phi(); |
ae09553c | 8409 | cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<" "<<i7<<" "<<i8<<"\r"<<flush; |
91d019b8 | 8410 | // fill the profile with 8-p correlation: |
ae09553c | 8411 | fIntFlowDirectCorrelations->Fill(30.,cos(n*phi1+n*phi2+n*phi3+n*phi4-n*phi5-n*phi6-n*phi7-n*phi8),1.); // <8>_{n,n,n,n|n,n,n,n} |
8412 | } // end of for(Int_t i8=0;i8<nPrim;i8++) | |
8413 | } // end of for(Int_t i7=0;i7<nPrim;i7++) | |
8414 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
8415 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
8416 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
8417 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
8418 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
91d019b8 | 8419 | } // end of for(Int_t i1=0;i1<nPrim;i1++) |
8420 | } // end of if(nPrim>=8) | |
8421 | ||
8422 | cout<<endl; | |
8423 | ||
ae09553c | 8424 | } // end of AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoops(AliFlowEventSimple* anEvent) |
8425 | ||
91d019b8 | 8426 | |
8427 | //================================================================================================================================== | |
8428 | ||
8429 | ||
ae09553c | 8430 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrelations() |
8431 | { | |
8432 | // Cross-check results for multiparticle correlations needed for int. flow: results from Q-vectors vs results from nested loops. | |
8433 | ||
8434 | cout<<endl; | |
8435 | cout<<endl; | |
91d019b8 | 8436 | cout<<" *****************************************"<<endl; |
ae09553c | 8437 | cout<<" **** cross-checking the correlations ****"<<endl; |
8438 | cout<<" **** for integrated flow ****"<<endl; | |
91d019b8 | 8439 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
8440 | { | |
8441 | cout<<" **** (particle weights not used) ****"<<endl; | |
8442 | } else | |
8443 | { | |
8444 | cout<<" **** (particle weights used) ****"<<endl; | |
ae09553c | 8445 | } |
8446 | cout<<" *****************************************"<<endl; | |
8447 | cout<<endl; | |
8448 | cout<<endl; | |
91d019b8 | 8449 | |
8450 | Int_t ciMax = 32; // to be improved (removed eventually when I calculate 6th and 8th order with particle weights) | |
8451 | ||
8452 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
8453 | { | |
8454 | ciMax = 11; | |
8455 | } | |
ae09553c | 8456 | |
91d019b8 | 8457 | for(Int_t ci=1;ci<=ciMax;ci++) |
8458 | { | |
8459 | if(strcmp((fIntFlowCorrelationsAllPro->GetXaxis())->GetBinLabel(ci), "") == 0) continue; // to be improved (access finalized histogram here) | |
8460 | cout<<(fIntFlowCorrelationsAllPro->GetXaxis())->GetBinLabel(ci)<<":"<<endl; // to be improved (access finalized histogram here) | |
ae09553c | 8461 | cout<<"from Q-vectors = "<<fIntFlowCorrelationsAllPro->GetBinContent(ci)<<endl; // to be improved (access finalized histogram here) |
8462 | cout<<"from nested loops = "<<fIntFlowDirectCorrelations->GetBinContent(ci)<<endl; | |
8463 | cout<<endl; | |
91d019b8 | 8464 | } |
ae09553c | 8465 | |
8466 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrelations() | |
8467 | ||
8468 | ||
8469 | //================================================================================================================================ | |
8470 | ||
8471 | ||
8472 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrectionTermsForNUA() | |
8473 | { | |
8474 | // Cross-check results for corrections terms for non-uniform acceptance needed for int. flow: results from Q-vectors vs results from nested loops. | |
8475 | ||
8476 | cout<<endl; | |
8477 | cout<<endl; | |
91d019b8 | 8478 | cout<<" *********************************************"<<endl; |
ae09553c | 8479 | cout<<" **** cross-checking the correction terms ****"<<endl; |
8480 | cout<<" **** for non-uniform acceptance relevant ****"<<endl; | |
8481 | cout<<" **** for integrated flow ****"<<endl; | |
91d019b8 | 8482 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
8483 | { | |
8484 | cout<<" **** (particle weights not used) ****"<<endl; | |
8485 | } else | |
8486 | { | |
8487 | cout<<" **** (particle weights used) ****"<<endl; | |
ae09553c | 8488 | } |
8489 | cout<<" *********************************************"<<endl; | |
8490 | cout<<endl; | |
8491 | cout<<endl; | |
8492 | ||
91d019b8 | 8493 | for(Int_t ci=1;ci<=10;ci++) // correction term index |
8494 | { | |
8495 | for(Int_t sc=0;sc<2;sc++) // sin or cos term | |
8496 | { | |
8497 | if(strcmp((fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->GetBinLabel(ci), "") == 0) continue; // to be improved (access finalized histogram here) | |
8498 | cout<<(fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->GetBinLabel(ci)<<":"<<endl; // to be improved (access finalized histogram here) | |
ae09553c | 8499 | cout<<"from Q-vectors = "<<fIntFlowCorrectionTermsForNUAPro[sc]->GetBinContent(ci)<<endl; // to be improved (access finalized histogram here) |
8500 | cout<<"from nested loops = "<<fIntFlowDirectCorrectionTermsForNUA[sc]->GetBinContent(ci)<<endl; | |
8501 | cout<<endl; | |
91d019b8 | 8502 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos term |
8503 | } // end of for(Int_t ci=1;ci<=10;ci++) // correction term index | |
ae09553c | 8504 | |
91d019b8 | 8505 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrectionTermsForNUA() |
ae09553c | 8506 | |
91d019b8 | 8507 | |
8508 | //================================================================================================================================ | |
8509 | ||
8510 | ||
ae09553c | 8511 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent) |
91d019b8 | 8512 | { |
8513 | // Evaluate with nested loops multiparticle correlations for integrated flow (using the particle weights). | |
ae09553c | 8514 | |
91d019b8 | 8515 | // Results are stored in profile fIntFlowDirectCorrelations. |
8516 | // Remark 1: When particle weights are used the binning of fIntFlowDirectCorrelations is organized as follows: | |
8517 | // | |
ae09553c | 8518 | // 1st bin: <2>_{1n|1n} = two1n1nW1W1 = <w1 w2 cos(n*(phi1-phi2))> |
8519 | // 2nd bin: <2>_{2n|2n} = two2n2nW2W2 = <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
8520 | // 3rd bin: <2>_{3n|3n} = two3n3nW3W3 = <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
8521 | // 4th bin: <2>_{4n|4n} = two4n4nW4W4 = <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
8522 | // 5th bin: ---- EMPTY ---- | |
8523 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1nW2W1W1 = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
8524 | // 7th bin: <3>_{3n|2n,1n} = ... | |
8525 | // 8th bin: <3>_{4n|2n,2n} = ... | |
91d019b8 | 8526 | // 9th bin: <3>_{4n|3n,1n} = ... |
ae09553c | 8527 | // 10th bin: ---- EMPTY ---- |
8528 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1nW1W1W1W1 = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
8529 | // 12th bin: <4>_{2n,1n|2n,1n} = ... | |
8530 | // 13th bin: <4>_{2n,2n|2n,2n} = ... | |
8531 | // 14th bin: <4>_{3n|1n,1n,1n} = ... | |
8532 | // 15th bin: <4>_{3n,1n|3n,1n} = ... | |
8533 | // 16th bin: <4>_{3n,1n|2n,2n} = ... | |
8534 | // 17th bin: <4>_{4n|2n,1n,1n} = ... | |
8535 | // 18th bin: ---- EMPTY ---- | |
8536 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = ... | |
8537 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = ... | |
8538 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = ... | |
8539 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = ... | |
8540 | // 23rd bin: ---- EMPTY ---- | |
8541 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = ... | |
8542 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = ... | |
8543 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = ... | |
8544 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = ... | |
8545 | // 28th bin: ---- EMPTY ---- | |
8546 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = ... | |
8547 | // 30th bin: ---- EMPTY ---- | |
8548 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = ... | |
91d019b8 | 8549 | |
8550 | // Remark 2: When particle weights are used there are some extra correlations. They are stored in | |
8551 | // fIntFlowExtraDirectCorrelations binning of which is organized as follows: | |
8552 | ||
ae09553c | 8553 | // 1st bin: two1n1nW3W1 = <w1^3 w2 cos(n*(phi1-phi2))> |
8554 | // 2nd bin: two1n1nW1W1W2 = <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
91d019b8 | 8555 | // ... |
8556 | ||
ae09553c | 8557 | Int_t nPrim = anEvent->NumberOfTracks(); |
8558 | AliFlowTrackSimple *aftsTrack = NULL; | |
8559 | //Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.; | |
8560 | //Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1., wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.; | |
8561 | Double_t phi1=0., phi2=0., phi3=0., phi4=0.; | |
8562 | Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1.; | |
8563 | Int_t n = fHarmonic; | |
8564 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
91d019b8 | 8565 | Double_t dMult = (*fSMpk)(0,0); |
8566 | cout<<endl; | |
8567 | cout<<"Multiparticle correlations: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
8568 | if(dMult<2) | |
8569 | { | |
8570 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
8571 | } else if (dMult>fMaxAllowedMultiplicity) | |
8572 | { | |
8573 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
8574 | } else | |
8575 | { | |
ae09553c | 8576 | cout<<"... evaluating nested loops (using particle weights) ..."<<endl; |
91d019b8 | 8577 | } |
8578 | ||
ae09553c | 8579 | // 2-particle correlations: |
91d019b8 | 8580 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) |
ae09553c | 8581 | { |
8582 | // 2 nested loops multiparticle correlations using particle weights: | |
8583 | for(Int_t i1=0;i1<nPrim;i1++) | |
8584 | { | |
8585 | aftsTrack=anEvent->GetTrack(i1); | |
8586 | if(!(aftsTrack->InRPSelection())) continue; | |
8587 | phi1=aftsTrack->Phi(); | |
8588 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
8589 | for(Int_t i2=0;i2<nPrim;i2++) | |
8590 | { | |
8591 | if(i2==i1)continue; | |
8592 | aftsTrack=anEvent->GetTrack(i2); | |
8593 | if(!(aftsTrack->InRPSelection())) continue; | |
8594 | phi2=aftsTrack->Phi(); | |
8595 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
8596 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
8597 | // 2-p correlations using particle weights: | |
8598 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),wPhi1*wPhi2); // <w1 w2 cos( n*(phi1-phi2))> | |
8599 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(1.5,cos(2.*n*(phi1-phi2)),pow(wPhi1,2)*pow(wPhi2,2)); // <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
8600 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(2.5,cos(3.*n*(phi1-phi2)),pow(wPhi1,3)*pow(wPhi2,3)); // <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
8601 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(3.5,cos(4.*n*(phi1-phi2)),pow(wPhi1,4)*pow(wPhi2,4)); // <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
91d019b8 | 8602 | // extra correlations: |
8603 | // 2-p extra correlations (do not appear if particle weights are not used): | |
8604 | if(fUsePhiWeights) fIntFlowExtraDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),pow(wPhi1,3)*wPhi2); // <w1^3 w2 cos(n*(phi1-phi2))> | |
ae09553c | 8605 | // ... |
8606 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
8607 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8608 | } // end of if(nPrim>=2) |
8609 | ||
8610 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
ae09553c | 8611 | { |
8612 | // 3 nested loops multiparticle correlations using particle weights: | |
8613 | for(Int_t i1=0;i1<nPrim;i1++) | |
8614 | { | |
8615 | aftsTrack=anEvent->GetTrack(i1); | |
8616 | if(!(aftsTrack->InRPSelection())) continue; | |
8617 | phi1=aftsTrack->Phi(); | |
8618 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
8619 | for(Int_t i2=0;i2<nPrim;i2++) | |
8620 | { | |
8621 | if(i2==i1)continue; | |
8622 | aftsTrack=anEvent->GetTrack(i2); | |
8623 | if(!(aftsTrack->InRPSelection())) continue; | |
8624 | phi2=aftsTrack->Phi(); | |
8625 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
8626 | for(Int_t i3=0;i3<nPrim;i3++) | |
8627 | { | |
8628 | if(i3==i1||i3==i2)continue; | |
8629 | aftsTrack=anEvent->GetTrack(i3); | |
8630 | if(!(aftsTrack->InRPSelection())) continue; | |
8631 | phi3=aftsTrack->Phi(); | |
91d019b8 | 8632 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); |
ae09553c | 8633 | if(nPrim==3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; |
8634 | // 3-p correlations using particle weights: | |
8635 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(5.5,cos(2.*n*phi1-n*(phi2+phi3)),pow(wPhi1,2)*wPhi2*wPhi3); // <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
91d019b8 | 8636 | // ... |
8637 | // extra correlations: | |
8638 | // 2-p extra correlations (do not appear if particle weights are not used): | |
ae09553c | 8639 | if(fUsePhiWeights) fIntFlowExtraDirectCorrelations->Fill(1.5,cos(n*(phi1-phi2)),wPhi1*wPhi2*pow(wPhi3,2)); // <w1 w2 w3^2 cos(n*(phi1-phi2))> |
8640 | // ... | |
91d019b8 | 8641 | // 3-p extra correlations (do not appear if particle weights are not used): |
8642 | // ... | |
ae09553c | 8643 | } // end of for(Int_t i3=0;i3<nPrim;i3++) |
8644 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
8645 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8646 | } // end of if(nPrim>=3) |
ae09553c | 8647 | |
91d019b8 | 8648 | if(nPrim>=4 && nPrim<=fMaxAllowedMultiplicity) |
8649 | { | |
ae09553c | 8650 | // 4 nested loops multiparticle correlations using particle weights: |
8651 | for(Int_t i1=0;i1<nPrim;i1++) | |
8652 | { | |
8653 | aftsTrack=anEvent->GetTrack(i1); | |
8654 | if(!(aftsTrack->InRPSelection())) continue; | |
8655 | phi1=aftsTrack->Phi(); | |
8656 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
8657 | for(Int_t i2=0;i2<nPrim;i2++) | |
8658 | { | |
8659 | if(i2==i1)continue; | |
8660 | aftsTrack=anEvent->GetTrack(i2); | |
8661 | if(!(aftsTrack->InRPSelection())) continue; | |
8662 | phi2=aftsTrack->Phi(); | |
8663 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
8664 | for(Int_t i3=0;i3<nPrim;i3++) | |
8665 | { | |
8666 | if(i3==i1||i3==i2)continue; | |
8667 | aftsTrack=anEvent->GetTrack(i3); | |
8668 | if(!(aftsTrack->InRPSelection())) continue; | |
8669 | phi3=aftsTrack->Phi(); | |
8670 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
8671 | for(Int_t i4=0;i4<nPrim;i4++) | |
8672 | { | |
8673 | if(i4==i1||i4==i2||i4==i3)continue; | |
8674 | aftsTrack=anEvent->GetTrack(i4); | |
8675 | if(!(aftsTrack->InRPSelection())) continue; | |
8676 | phi4=aftsTrack->Phi(); | |
8677 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi()))); | |
91d019b8 | 8678 | if(nPrim>=4) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<"\r"<<flush; // to be improved (replace eventually this if statement with if(nPrim==4)) |
ae09553c | 8679 | // 4-p correlations using particle weights: |
8680 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(10.5,cos(n*phi1+n*phi2-n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); | |
91d019b8 | 8681 | // extra correlations: |
8682 | // 2-p extra correlations (do not appear if particle weights are not used): | |
8683 | // ... | |
8684 | // 3-p extra correlations (do not appear if particle weights are not used): | |
8685 | // ... | |
8686 | // 4-p extra correlations (do not appear if particle weights are not used): | |
ae09553c | 8687 | // ... |
8688 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
8689 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
8690 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
8691 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8692 | } // end of if(nPrim>=4) |
8693 | ||
ae09553c | 8694 | cout<<endl; |
91d019b8 | 8695 | |
ae09553c | 8696 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent) |
91d019b8 | 8697 | |
ae09553c | 8698 | |
8699 | //================================================================================================================================ | |
91d019b8 | 8700 | |
8701 | ||
8702 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowExtraCorrelations() | |
8703 | { | |
8704 | // Cross-check results for extra multiparticle correlations needed for int. flow | |
ae09553c | 8705 | // which appear only when particle weights are used: results from Q-vectors vs results from nested loops. |
8706 | ||
8707 | cout<<endl; | |
8708 | cout<<endl; | |
8709 | cout<<" ***********************************************"<<endl; | |
8710 | cout<<" **** cross-checking the extra correlations ****"<<endl; | |
8711 | cout<<" **** for integrated flow ****"<<endl; | |
8712 | cout<<" ***********************************************"<<endl; | |
8713 | cout<<endl; | |
8714 | cout<<endl; | |
91d019b8 | 8715 | |
8716 | for(Int_t eci=1;eci<=2;eci++) // to be improved (increased eciMax eventually when I calculate 6th and 8th) | |
8717 | { | |
8718 | if(strcmp((fIntFlowExtraCorrelationsPro->GetXaxis())->GetBinLabel(eci), "") == 0) continue; | |
8719 | cout<<(fIntFlowExtraCorrelationsPro->GetXaxis())->GetBinLabel(eci)<<":"<<endl; | |
ae09553c | 8720 | cout<<"from Q-vectors = "<<fIntFlowExtraCorrelationsPro->GetBinContent(eci)<<endl; |
8721 | cout<<"from nested loops = "<<fIntFlowExtraDirectCorrelations->GetBinContent(eci)<<endl; | |
8722 | cout<<endl; | |
91d019b8 | 8723 | } |
8724 | ||
8725 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowExtraCorrelations() | |
8726 | ||
8727 | ||
ae09553c | 8728 | //================================================================================================================================ |
91d019b8 | 8729 | |
8730 | ||
8731 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrectionsForNUAWithNestedLoops(AliFlowEventSimple* anEvent) | |
8732 | { | |
8733 | // Evaluate with nested loops correction terms for non-uniform acceptance relevant for NONAME integrated flow (to be improved (name)). | |
8734 | // | |
8735 | // Remark: Both sin and cos correction terms are calculated in this method. Sin terms are stored in fIntFlowDirectCorrectionTermsForNUA[0], | |
8736 | // and cos terms in fIntFlowCorrectionTermsForNUAPro[sc]fIntFlowDirectCorrectionTermsForNUA[1]. Binning of fIntFlowDirectCorrectionTermsForNUA[sc] is organized as follows | |
8737 | // (sc stands for either sin or cos): | |
8738 | ||
ae09553c | 8739 | // 1st bin: <<sc(n*(phi1))>> |
8740 | // 2nd bin: <<sc(n*(phi1+phi2))>> | |
8741 | // 3rd bin: <<sc(n*(phi1-phi2-phi3))>> | |
8742 | // ... | |
91d019b8 | 8743 | |
ae09553c | 8744 | Int_t nPrim = anEvent->NumberOfTracks(); |
8745 | AliFlowTrackSimple *aftsTrack = NULL; | |
8746 | Double_t phi1=0., phi2=0., phi3=0.; | |
8747 | Int_t n = fHarmonic; | |
8748 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
91d019b8 | 8749 | Double_t dMult = (*fSMpk)(0,0); |
8750 | cout<<endl; | |
8751 | cout<<"Correction terms for non-uniform acceptance: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
8752 | if(dMult<1) | |
8753 | { | |
8754 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
8755 | } else if (dMult>fMaxAllowedMultiplicity) | |
8756 | { | |
8757 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
8758 | } else | |
8759 | { | |
ae09553c | 8760 | cout<<"... evaluating nested loops (without using particle weights)..."<<endl; |
91d019b8 | 8761 | } |
8762 | ||
8763 | if(nPrim>=1 && nPrim<=fMaxAllowedMultiplicity) | |
8764 | { | |
ae09553c | 8765 | // 1-particle correction terms for non-uniform acceptance: |
8766 | for(Int_t i1=0;i1<nPrim;i1++) | |
8767 | { | |
8768 | aftsTrack=anEvent->GetTrack(i1); | |
8769 | if(!(aftsTrack->InRPSelection())) continue; | |
8770 | phi1=aftsTrack->Phi(); | |
8771 | if(nPrim==1) cout<<i1<<"\r"<<flush; | |
91d019b8 | 8772 | // sin terms: |
ae09553c | 8773 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(0.5,sin(n*phi1),1.); // <sin(n*phi1)> |
91d019b8 | 8774 | // cos terms: |
ae09553c | 8775 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(0.5,cos(n*phi1),1.); // <cos(n*phi1)> |
91d019b8 | 8776 | } // end of for(Int_t i1=0;i1<nPrim;i1++) |
8777 | } // end of if(nPrim>=1) | |
8778 | ||
8779 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
8780 | { | |
ae09553c | 8781 | // 2-particle correction terms for non-uniform acceptance: |
8782 | for(Int_t i1=0;i1<nPrim;i1++) | |
8783 | { | |
8784 | aftsTrack=anEvent->GetTrack(i1); | |
8785 | if(!(aftsTrack->InRPSelection())) continue; | |
8786 | phi1=aftsTrack->Phi(); | |
8787 | for(Int_t i2=0;i2<nPrim;i2++) | |
8788 | { | |
8789 | if(i2==i1)continue; | |
8790 | aftsTrack=anEvent->GetTrack(i2); | |
8791 | if(!(aftsTrack->InRPSelection())) continue; | |
8792 | phi2=aftsTrack->Phi(); | |
8793 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
91d019b8 | 8794 | // sin terms: |
ae09553c | 8795 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(1.5,sin(n*(phi1+phi2)),1.); // <<sin(n*(phi1+phi2))>> |
91d019b8 | 8796 | // cos terms: |
ae09553c | 8797 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(1.5,cos(n*(phi1+phi2)),1.); // <<cos(n*(phi1+phi2))>> |
8798 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
8799 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8800 | } // end of if(nPrim>=2) |
8801 | ||
8802 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
8803 | { | |
ae09553c | 8804 | // 3-particle correction terms for non-uniform acceptance: |
8805 | for(Int_t i1=0;i1<nPrim;i1++) | |
8806 | { | |
8807 | aftsTrack=anEvent->GetTrack(i1); | |
8808 | if(!(aftsTrack->InRPSelection())) continue; | |
8809 | phi1=aftsTrack->Phi(); | |
8810 | for(Int_t i2=0;i2<nPrim;i2++) | |
8811 | { | |
8812 | if(i2==i1)continue; | |
8813 | aftsTrack=anEvent->GetTrack(i2); | |
8814 | if(!(aftsTrack->InRPSelection())) continue; | |
8815 | phi2=aftsTrack->Phi(); | |
8816 | for(Int_t i3=0;i3<nPrim;i3++) | |
8817 | { | |
8818 | if(i3==i1||i3==i2)continue; | |
8819 | aftsTrack=anEvent->GetTrack(i3); | |
8820 | if(!(aftsTrack->InRPSelection())) continue; | |
8821 | phi3=aftsTrack->Phi(); | |
8822 | if(nPrim>=3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; // to be improved (eventually I will change this if statement) | |
91d019b8 | 8823 | // sin terms: |
ae09553c | 8824 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(2.5,sin(n*(phi1-phi2-phi3)),1.); // <<sin(n*(phi1-phi2-phi3))>> |
8825 | // cos terms: | |
8826 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(2.5,cos(n*(phi1-phi2-phi3)),1.); // <<cos(n*(phi1-phi2-phi3))>> | |
8827 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
8828 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
8829 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8830 | } // end of if(nPrim>=3) |
8831 | ||
8832 | cout<<endl; | |
ae09553c | 8833 | } |
8834 | //================================================================================================================================ | |
8835 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoops(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
8836 | { | |
8837 | // Evaluate reduced correlations with nested loops without using the particle weights. | |
91d019b8 | 8838 | |
8839 | // Remark 1: Reduced correlations are evaluated in pt bin number fCrossCheckInPtBinNo and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
8840 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrelations[t][pe][ci], where indices runs as follows: | |
8841 | // [0=RP,1=POI][0=Pt,1=Eta][0=<2'>,1=<4'>,2=<6'>,3=<8'>] | |
ae09553c | 8842 | // Remark 3: <2'> = <cos(n*(psi1-phi2))> |
8843 | // <4'> = <cos(n*(psi1+phi2-phi3-phi4))> | |
91d019b8 | 8844 | // ... |
8845 | ||
ae09553c | 8846 | Int_t typeFlag = -1; |
8847 | Int_t ptEtaFlag = -1; | |
8848 | if(type == "RP") | |
8849 | { | |
8850 | typeFlag = 0; | |
8851 | } else if(type == "POI") | |
8852 | { | |
8853 | typeFlag = 1; | |
8854 | } | |
8855 | if(ptOrEta == "Pt") | |
8856 | { | |
8857 | ptEtaFlag = 0; | |
8858 | } else if(ptOrEta == "Eta") | |
8859 | { | |
8860 | ptEtaFlag = 1; | |
8861 | } | |
8862 | // shortcuts: | |
8863 | Int_t t = typeFlag; | |
8864 | Int_t pe = ptEtaFlag; | |
8865 | ||
91d019b8 | 8866 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; |
8867 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
8868 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
8869 | ||
ae09553c | 8870 | Int_t nPrim = anEvent->NumberOfTracks(); |
8871 | AliFlowTrackSimple *aftsTrack = NULL; | |
8872 | ||
8873 | Double_t psi1=0., phi2=0., phi3=0., phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
8874 | ||
8875 | Int_t n = fHarmonic; | |
8876 | ||
8877 | // 2'-particle correlations: | |
8878 | for(Int_t i1=0;i1<nPrim;i1++) | |
8879 | { | |
8880 | aftsTrack=anEvent->GetTrack(i1); | |
91d019b8 | 8881 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
8882 | if(ptOrEta == "Pt") | |
ae09553c | 8883 | { |
8884 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
91d019b8 | 8885 | } else if (ptOrEta == "Eta") |
8886 | { | |
8887 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
8888 | } | |
ae09553c | 8889 | psi1=aftsTrack->Phi(); |
8890 | for(Int_t i2=0;i2<nPrim;i2++) | |
8891 | { | |
8892 | if(i2==i1)continue; | |
8893 | aftsTrack=anEvent->GetTrack(i2); | |
8894 | // RP condition (!(first) particle in the correlator must be RP): | |
8895 | if(!(aftsTrack->InRPSelection()))continue; | |
8896 | phi2=aftsTrack->Phi(); | |
91d019b8 | 8897 | // 2'-particle correlations: |
ae09553c | 8898 | fDiffFlowDirectCorrelations[t][pe][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(1.*n*(psi1-phi2)),1.); // <cos(n*(psi1-phi2)) |
8899 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
8900 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
8901 | ||
8902 | /* | |
8903 | ||
8904 | // 3'-particle correlations: | |
8905 | for(Int_t i1=0;i1<nPrim;i1++) | |
8906 | { | |
8907 | aftsTrack=anEvent->GetTrack(i1); | |
91d019b8 | 8908 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
8909 | if(ptOrEta == "Pt") | |
ae09553c | 8910 | { |
8911 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
91d019b8 | 8912 | } else if (ptOrEta == "Eta") |
8913 | { | |
8914 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
8915 | } | |
ae09553c | 8916 | psi1=aftsTrack->Phi(); |
8917 | for(Int_t i2=0;i2<nPrim;i2++) | |
8918 | { | |
8919 | if(i2==i1)continue; | |
8920 | aftsTrack=anEvent->GetTrack(i2); | |
91d019b8 | 8921 | // RP condition (!(first) particle in the correlator must be RP): |
ae09553c | 8922 | if(!(aftsTrack->InRPSelection())) continue; |
8923 | phi2=aftsTrack->Phi(); | |
8924 | for(Int_t i3=0;i3<nPrim;i3++) | |
8925 | { | |
8926 | if(i3==i1||i3==i2)continue; | |
8927 | aftsTrack=anEvent->GetTrack(i3); | |
91d019b8 | 8928 | // RP condition (!(first) particle in the correlator must be RP): |
ae09553c | 8929 | if(!(aftsTrack->InRPSelection())) continue; |
8930 | phi3=aftsTrack->Phi(); | |
91d019b8 | 8931 | // to be improved : where to store it? ->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(2.*phi1-phi2-phi3)),1.); // <w1 w2 w3 cos(n(2psi1-phi2-phi3))> |
ae09553c | 8932 | }//end of for(Int_t i3=0;i3<nPrim;i3++) |
8933 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
8934 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 8935 | |
8936 | */ | |
8937 | ||
ae09553c | 8938 | // 4'-particle correlations: |
8939 | for(Int_t i1=0;i1<nPrim;i1++) | |
8940 | { | |
8941 | aftsTrack=anEvent->GetTrack(i1); | |
91d019b8 | 8942 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
8943 | if(ptOrEta == "Pt") | |
ae09553c | 8944 | { |
8945 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
91d019b8 | 8946 | } else if (ptOrEta == "Eta") |
8947 | { | |
8948 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
8949 | } | |
ae09553c | 8950 | psi1=aftsTrack->Phi(); |
8951 | for(Int_t i2=0;i2<nPrim;i2++) | |
8952 | { | |
8953 | if(i2==i1) continue; | |
8954 | aftsTrack=anEvent->GetTrack(i2); | |
8955 | // RP condition (!(first) particle in the correlator must be RP): | |
8956 | if(!(aftsTrack->InRPSelection())) continue; | |
8957 | phi2=aftsTrack->Phi(); | |
8958 | for(Int_t i3=0;i3<nPrim;i3++) | |
8959 | { | |
8960 | if(i3==i1||i3==i2) continue; | |
8961 | aftsTrack=anEvent->GetTrack(i3); | |
8962 | // RP condition (!(first) particle in the correlator must be RP): | |
8963 | if(!(aftsTrack->InRPSelection())) continue; | |
8964 | phi3=aftsTrack->Phi(); | |
8965 | for(Int_t i4=0;i4<nPrim;i4++) | |
8966 | { | |
8967 | if(i4==i1||i4==i2||i4==i3) continue; | |
8968 | aftsTrack=anEvent->GetTrack(i4); | |
8969 | // RP condition (!(first) particle in the correlator must be RP): | |
8970 | if(!(aftsTrack->InRPSelection())) continue; | |
8971 | phi4=aftsTrack->Phi(); | |
8972 | // 4'-particle correlations: | |
8973 | fDiffFlowDirectCorrelations[t][pe][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3-phi4)),1.); // <cos(n(psi1+phi2-phi3-phi4))> | |
8974 | }//end of for(Int_t i4=0;i4<nPrim;i4++) | |
8975 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
8976 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
8977 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
8978 | ||
8979 | ||
8980 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoops(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
8981 | ||
8982 | ||
8983 | //================================================================================================================================ | |
8984 | ||
8985 | ||
8986 | void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrelations(TString type, TString ptOrEta) | |
8987 | { | |
8988 | // Compare correlations needed for diff. flow calculated with nested loops and those calculated from Q-vectors | |
8989 | ||
8990 | Int_t typeFlag = -1; | |
8991 | Int_t ptEtaFlag = -1; | |
8992 | if(type == "RP") | |
8993 | { | |
8994 | typeFlag = 0; | |
8995 | } else if(type == "POI") | |
8996 | { | |
8997 | typeFlag = 1; | |
8998 | } | |
8999 | if(ptOrEta == "Pt") | |
9000 | { | |
9001 | ptEtaFlag = 0; | |
9002 | } else if(ptOrEta == "Eta") | |
9003 | { | |
9004 | ptEtaFlag = 1; | |
9005 | } | |
9006 | // shortcuts: | |
9007 | Int_t t = typeFlag; | |
9008 | Int_t pe = ptEtaFlag; | |
91d019b8 | 9009 | |
ae09553c | 9010 | TString RPorPOIString[2] = {"RP ","POI"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) |
9011 | TString PtOrEtaString[2] = {"pt","eta"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
9012 | TString reducedCorrelations[4] = {"<<cos(n(psi1-phi2))>>","<<cos(n(psi1+phi2-phi3-phi4))>>","",""}; // to be improved (access this from pro or hist) | |
91d019b8 | 9013 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; |
9014 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
9015 | ||
9016 | Int_t crossCheckInPtEtaBinNo[2] = {fCrossCheckInPtBinNo,fCrossCheckInEtaBinNo}; | |
9017 | ||
9018 | ||
ae09553c | 9019 | cout<<endl; |
9020 | cout<<" *****************************************"<<endl; | |
9021 | cout<<" **** cross-checking the correlations ****"<<endl; | |
9022 | cout<<" **** for differential flow ****"<<endl; | |
9023 | cout<<" **** "<<RPorPOIString[t]<<" ****"<<endl; | |
91d019b8 | 9024 | cout<<" *****************************************"<<endl; |
9025 | cout<<endl; | |
9026 | cout<<" "<<PtOrEtaString[pe]<<" bin: "<<lowerPtEtaEdge[pe]<<" <= "<<PtOrEtaString[pe]<<" < "<<upperPtEtaEdge[pe]<<endl; | |
ae09553c | 9027 | cout<<endl; |
91d019b8 | 9028 | |
9029 | for(Int_t rci=0;rci<2;rci++) // to be improved (calculate 6th and 8th order) | |
9030 | { | |
9031 | cout<<" "<<reducedCorrelations[rci].Data()<<":"<<endl; | |
ae09553c | 9032 | cout<<" from Q-vectors = "<<fDiffFlowCorrelationsPro[t][pe][rci]->GetBinContent(crossCheckInPtEtaBinNo[pe])<<endl; |
9033 | cout<<" from nested loops = "<<fDiffFlowDirectCorrelations[t][pe][rci]->GetBinContent(1)<<endl; | |
9034 | cout<<endl; | |
91d019b8 | 9035 | } // end of for(Int_t rci=0;rci<4;rci++) |
ae09553c | 9036 | |
9037 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrelations(TString type, TString ptOrEta) | |
91d019b8 | 9038 | |
9039 | ||
ae09553c | 9040 | //================================================================================================================================ |
91d019b8 | 9041 | |
9042 | ||
ae09553c | 9043 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) |
91d019b8 | 9044 | { |
ae09553c | 9045 | // Evaluate reduced correlations with nested loops without using the particle weights. |
91d019b8 | 9046 | |
9047 | // Remark 1: Reduced correlations are evaluated in pt bin number fCrossCheckInPtBinNo and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
9048 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrelations[t][pe][ci], where indices runs as follows: | |
9049 | // [0=RP,1=POI][0=Pt,1=Eta][0=<2'>,1=<4'>,2=<6'>,3=<8'>] | |
ae09553c | 9050 | // Remark 3: <2'> = <w2 cos(n*(psi1-phi2))> |
9051 | // <4'> = <w2 w3 w4 cos(n*(psi1+phi2-phi3-phi4))> | |
91d019b8 | 9052 | // ... |
9053 | ||
ae09553c | 9054 | Int_t typeFlag = -1; |
9055 | Int_t ptEtaFlag = -1; | |
9056 | if(type == "RP") | |
9057 | { | |
9058 | typeFlag = 0; | |
9059 | } else if(type == "POI") | |
9060 | { | |
9061 | typeFlag = 1; | |
9062 | } | |
9063 | if(ptOrEta == "Pt") | |
9064 | { | |
9065 | ptEtaFlag = 0; | |
9066 | } else if(ptOrEta == "Eta") | |
9067 | { | |
9068 | ptEtaFlag = 1; | |
9069 | } | |
9070 | // shortcuts: | |
9071 | Int_t t = typeFlag; | |
9072 | Int_t pe = ptEtaFlag; | |
9073 | ||
91d019b8 | 9074 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; |
9075 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
9076 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9077 | ||
ae09553c | 9078 | Int_t nPrim = anEvent->NumberOfTracks(); |
9079 | AliFlowTrackSimple *aftsTrack = NULL; | |
9080 | ||
9081 | Double_t psi1=0., phi2=0., phi3=0., phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
9082 | Double_t wPhi2=1., wPhi3=1., wPhi4=1.;// wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.; | |
9083 | ||
9084 | Int_t n = fHarmonic; | |
9085 | ||
9086 | // 2'-particle correlations: | |
9087 | for(Int_t i1=0;i1<nPrim;i1++) | |
9088 | { | |
9089 | aftsTrack=anEvent->GetTrack(i1); | |
91d019b8 | 9090 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
9091 | if(ptOrEta == "Pt") | |
ae09553c | 9092 | { |
9093 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection()))) continue; | |
91d019b8 | 9094 | } else if (ptOrEta == "Eta") |
9095 | { | |
9096 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection()))) continue; | |
9097 | } | |
ae09553c | 9098 | psi1=aftsTrack->Phi(); |
9099 | for(Int_t i2=0;i2<nPrim;i2++) | |
9100 | { | |
9101 | if(i2==i1) continue; | |
9102 | aftsTrack=anEvent->GetTrack(i2); | |
9103 | // RP condition (!(first) particle in the correlator must be RP): | |
9104 | if(!(aftsTrack->InRPSelection())) continue; | |
9105 | phi2=aftsTrack->Phi(); | |
9106 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
91d019b8 | 9107 | // 2'-particle correlations: |
ae09553c | 9108 | fDiffFlowDirectCorrelations[t][pe][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(1.*n*(psi1-phi2)),wPhi2); // <w2 cos(n*(psi1-phi2)) |
9109 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
9110 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
9111 | ||
9112 | // 4'-particle correlations: | |
9113 | for(Int_t i1=0;i1<nPrim;i1++) | |
9114 | { | |
9115 | aftsTrack=anEvent->GetTrack(i1); | |
91d019b8 | 9116 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
9117 | if(ptOrEta == "Pt") | |
ae09553c | 9118 | { |
9119 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection()))) continue; | |
91d019b8 | 9120 | } else if (ptOrEta == "Eta") |
9121 | { | |
9122 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection()))) continue; | |
9123 | } | |
ae09553c | 9124 | psi1=aftsTrack->Phi(); |
9125 | for(Int_t i2=0;i2<nPrim;i2++) | |
9126 | { | |
9127 | if(i2==i1) continue; | |
9128 | aftsTrack=anEvent->GetTrack(i2); | |
9129 | // RP condition (!(first) particle in the correlator must be RP): | |
9130 | if(!(aftsTrack->InRPSelection())) continue; | |
9131 | phi2=aftsTrack->Phi(); | |
9132 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
9133 | for(Int_t i3=0;i3<nPrim;i3++) | |
9134 | { | |
9135 | if(i3==i1||i3==i2) continue; | |
9136 | aftsTrack=anEvent->GetTrack(i3); | |
9137 | // RP condition (!(first) particle in the correlator must be RP): | |
9138 | if(!(aftsTrack->InRPSelection())) continue; | |
9139 | phi3=aftsTrack->Phi(); | |
9140 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
9141 | for(Int_t i4=0;i4<nPrim;i4++) | |
9142 | { | |
9143 | if(i4==i1||i4==i2||i4==i3) continue; | |
9144 | aftsTrack=anEvent->GetTrack(i4); | |
9145 | // RP condition (!(first) particle in the correlator must be RP): | |
9146 | if(!(aftsTrack->InRPSelection())) continue; | |
9147 | phi4=aftsTrack->Phi(); | |
9148 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi()))); | |
9149 | // 4'-particle correlations <w2 w3 w4 cos(n(psi1+phi2-phi3-phi4))>: | |
9150 | fDiffFlowDirectCorrelations[t][pe][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3-phi4)),wPhi2*wPhi3*wPhi4); | |
9151 | }//end of for(Int_t i4=0;i4<nPrim;i4++) | |
9152 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
9153 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
9154 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
9155 | ||
9156 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
9157 | ||
9158 | ||
9159 | //================================================================================================================================ | |
91d019b8 | 9160 | |
9161 | ||
9162 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
9163 | { | |
9164 | // Evaluate with nested loops correction terms for non-uniform acceptance (both sin and cos terms) relevant for differential flow. | |
9165 | ||
9166 | // Remark 1: Reduced correction terms for non-uniform acceptance are evaluated in pt bin number fCrossCheckInPtBinNo | |
9167 | // and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
9168 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrections[t][pe][sc][cti], where first three indices runs as: | |
ae09553c | 9169 | // [0=RP,1=POI][0=Pt,1=Eta][0=sin terms,1=cos terms], whilst the cti (correction term index) runs as follows: |
91d019b8 | 9170 | // cti: |
ae09553c | 9171 | // 0: <<sc n(psi1)>> |
9172 | // 1: <<sc n(psi1+phi2)>> | |
9173 | // 2: <<sc n(psi1+phi2-phi3)>> | |
9174 | // 3: <<sc n(psi1-phi2-phi3)>> | |
9175 | // 4: | |
9176 | // 5: | |
9177 | // 6: | |
9178 | ||
9179 | Int_t typeFlag = -1; | |
9180 | Int_t ptEtaFlag = -1; | |
9181 | if(type == "RP") | |
9182 | { | |
9183 | typeFlag = 0; | |
9184 | } else if(type == "POI") | |
9185 | { | |
9186 | typeFlag = 1; | |
9187 | } | |
9188 | if(ptOrEta == "Pt") | |
9189 | { | |
9190 | ptEtaFlag = 0; | |
9191 | } else if(ptOrEta == "Eta") | |
9192 | { | |
9193 | ptEtaFlag = 1; | |
9194 | } | |
9195 | // shortcuts: | |
9196 | Int_t t = typeFlag; | |
9197 | Int_t pe = ptEtaFlag; | |
9198 | ||
91d019b8 | 9199 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; |
9200 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
9201 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9202 | ||
ae09553c | 9203 | Int_t nPrim = anEvent->NumberOfTracks(); |
9204 | AliFlowTrackSimple *aftsTrack = NULL; | |
9205 | ||
9206 | Double_t psi1=0., phi2=0., phi3=0.;// phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
9207 | ||
9208 | Int_t n = fHarmonic; | |
9209 | ||
9210 | // 1-particle correction terms: | |
9211 | for(Int_t i1=0;i1<nPrim;i1++) | |
9212 | { | |
9213 | aftsTrack=anEvent->GetTrack(i1); | |
91d019b8 | 9214 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
9215 | if(ptOrEta == "Pt") | |
ae09553c | 9216 | { |
9217 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection()))) continue; | |
91d019b8 | 9218 | } else if (ptOrEta == "Eta") |
9219 | { | |
9220 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection()))) continue; | |
9221 | } | |
ae09553c | 9222 | psi1=aftsTrack->Phi(); |
91d019b8 | 9223 | // sin terms: |
ae09553c | 9224 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*psi1),1.); // <<sin(n*(psi1))>> |
91d019b8 | 9225 | // cos terms: |
ae09553c | 9226 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*psi1),1.); // <<cos(n*(psi1))>> |
91d019b8 | 9227 | }//end of for(Int_t i1=0;i1<nPrim;i1++) |
9228 | ||
ae09553c | 9229 | // 2-particle correction terms: |
9230 | for(Int_t i1=0;i1<nPrim;i1++) | |
9231 | { | |
9232 | aftsTrack=anEvent->GetTrack(i1); | |
91d019b8 | 9233 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
9234 | if(ptOrEta == "Pt") | |
ae09553c | 9235 | { |
9236 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection()))) continue; | |
91d019b8 | 9237 | } else if (ptOrEta == "Eta") |
9238 | { | |
9239 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection()))) continue; | |
9240 | } | |
ae09553c | 9241 | psi1=aftsTrack->Phi(); |
9242 | for(Int_t i2=0;i2<nPrim;i2++) | |
9243 | { | |
9244 | if(i2==i1) continue; | |
9245 | aftsTrack=anEvent->GetTrack(i2); | |
9246 | // RP condition (!(first) particle in the correlator must be RP): | |
9247 | if(!(aftsTrack->InRPSelection())) continue; | |
9248 | phi2=aftsTrack->Phi(); | |
91d019b8 | 9249 | // sin terms: |
ae09553c | 9250 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2)),1.); // <<sin(n*(psi1+phi2))>> |
91d019b8 | 9251 | // cos terms: |
ae09553c | 9252 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2)),1.); // <<cos(n*(psi1+phi2))>> |
9253 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
91d019b8 | 9254 | }//end of for(Int_t i1=0;i1<nPrim;i1++) |
9255 | ||
ae09553c | 9256 | // 3-particle correction terms: |
9257 | for(Int_t i1=0;i1<nPrim;i1++) | |
9258 | { | |
9259 | aftsTrack=anEvent->GetTrack(i1); | |
91d019b8 | 9260 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
9261 | if(ptOrEta == "Pt") | |
ae09553c | 9262 | { |
9263 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
91d019b8 | 9264 | } else if (ptOrEta == "Eta") |
9265 | { | |
9266 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
9267 | } | |
ae09553c | 9268 | psi1=aftsTrack->Phi(); |
9269 | for(Int_t i2=0;i2<nPrim;i2++) | |
9270 | { | |
9271 | if(i2==i1) continue; | |
9272 | aftsTrack=anEvent->GetTrack(i2); | |
91d019b8 | 9273 | // RP condition (!(first) particle in the correlator must be RP): |
ae09553c | 9274 | if(!(aftsTrack->InRPSelection())) continue; |
9275 | phi2=aftsTrack->Phi(); | |
9276 | for(Int_t i3=0;i3<nPrim;i3++) | |
9277 | { | |
9278 | if(i3==i1||i3==i2) continue; | |
9279 | aftsTrack=anEvent->GetTrack(i3); | |
91d019b8 | 9280 | // RP condition (!(first) particle in the correlator must be RP): |
ae09553c | 9281 | if(!(aftsTrack->InRPSelection())) continue; |
9282 | phi3=aftsTrack->Phi(); | |
91d019b8 | 9283 | // sin terms: |
ae09553c | 9284 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2-phi3)),1.); // <<sin(n*(psi1+phi2-phi3))>> |
9285 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1-phi2-phi3)),1.); // <<sin(n*(psi1-phi2-phi3))>> | |
91d019b8 | 9286 | // cos terms: |
ae09553c | 9287 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3)),1.); // <<cos(n*(psi1+phi2-phi3))>> |
9288 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1-phi2-phi3)),1.); // <<cos(n*(psi1-phi2-phi3))>> | |
9289 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
9290 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
9291 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
91d019b8 | 9292 | |
9293 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
9294 | ||
9295 | ||
ae09553c | 9296 | //================================================================================================================================ |
91d019b8 | 9297 | |
9298 | ||
9299 | void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrectionTermsForNUA(TString type, TString ptOrEta) | |
9300 | { | |
ae09553c | 9301 | // Compare corrections temrs for non-uniform acceptance needed for diff. flow calculated with nested loops and those calculated from Q-vectors |
9302 | ||
9303 | Int_t typeFlag = -1; | |
9304 | Int_t ptEtaFlag = -1; | |
9305 | if(type == "RP") | |
9306 | { | |
9307 | typeFlag = 0; | |
9308 | } else if(type == "POI") | |
9309 | { | |
9310 | typeFlag = 1; | |
9311 | } | |
9312 | if(ptOrEta == "Pt") | |
9313 | { | |
9314 | ptEtaFlag = 0; | |
9315 | } else if(ptOrEta == "Eta") | |
9316 | { | |
9317 | ptEtaFlag = 1; | |
9318 | } | |
9319 | // shortcuts: | |
9320 | Int_t t = typeFlag; | |
9321 | Int_t pe = ptEtaFlag; | |
91d019b8 | 9322 | |
ae09553c | 9323 | TString RPorPOIString[2] = {"RP ","POI"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) |
91d019b8 | 9324 | TString PtOrEtaString[2] = {"pt","eta"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) |
ae09553c | 9325 | //TString sinCosFlag[2] = {"sin","cos"}; // to be improved (eventually promote to data member) |
9326 | TString reducedCorrectionSinTerms[4] = {"<<sin(n(psi1))>>","<<sin(n(psi1+phi2))>>","<<sin(n*(psi1+phi2-phi3))>>","<<sin(n*(psi1-phi2-phi3))>>"}; // to be improved (access this from pro or hist) | |
9327 | TString reducedCorrectionCosTerms[4] = {"<<cos(n(psi1))>>","<<cos(n(psi1+phi2))>>","<<cos(n*(psi1+phi2-phi3))>>","<<cos(n*(psi1-phi2-phi3))>>"}; // to be improved (access this from pro or hist) | |
91d019b8 | 9328 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; |
9329 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
9330 | ||
9331 | Int_t crossCheckInPtEtaBinNo[2] = {fCrossCheckInPtBinNo,fCrossCheckInEtaBinNo}; | |
9332 | ||
ae09553c | 9333 | cout<<endl; |
9334 | cout<<" ******************************************"<<endl; | |
9335 | cout<<" **** cross-checking the correction ****"<<endl; | |
9336 | cout<<" **** terms for non-uniform acceptance ****"<<endl; | |
9337 | cout<<" **** for differential flow ****"<<endl; | |
9338 | cout<<" **** "<<RPorPOIString[t]<<" ****"<<endl; | |
91d019b8 | 9339 | cout<<" ******************************************"<<endl; |
9340 | cout<<endl; | |
9341 | cout<<" "<<PtOrEtaString[pe]<<" bin: "<<lowerPtEtaEdge[pe]<<" <= "<<PtOrEtaString[pe]<<" < "<<upperPtEtaEdge[pe]<<endl; | |
ae09553c | 9342 | cout<<endl; |
91d019b8 | 9343 | |
9344 | for(Int_t cti=0;cti<4;cti++) // correction term index | |
9345 | { | |
9346 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
9347 | { | |
9348 | if(sc==0) // to be improved (this can be implemented better) | |
9349 | { | |
9350 | cout<<" "<<reducedCorrectionSinTerms[cti].Data()<<":"<<endl; | |
9351 | } else | |
9352 | { | |
9353 | cout<<" "<<reducedCorrectionCosTerms[cti].Data()<<":"<<endl; | |
9354 | } | |
ae09553c | 9355 | cout<<" from Q-vectors = "<<fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]->GetBinContent(crossCheckInPtEtaBinNo[pe])<<endl; |
9356 | cout<<" from nested loops = "<<fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]->GetBinContent(1)<<endl; | |
9357 | cout<<endl; | |
91d019b8 | 9358 | } |
9359 | } // end of for(Int_t rci=0;rci<4;rci++) | |
9360 | ||
9361 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrectionTermsForNUA(TString type, TString ptOrEta) | |
9362 | ||
9363 | ||
ae09553c | 9364 | //================================================================================================================================ |