]>
Commit | Line | Data |
---|---|---|
489d5531 | 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 | * * | |
ff70ca91 | 19 | * author: Ante Bilandzic * |
20 | * (abilandzic@gmail.com) * | |
489d5531 | 21 | *********************************/ |
22 | ||
23 | #define AliFlowAnalysisWithQCumulants_cxx | |
24 | ||
25 | #include "Riostream.h" | |
26 | #include "AliFlowCommonConstants.h" | |
27 | #include "AliFlowCommonHist.h" | |
28 | #include "AliFlowCommonHistResults.h" | |
29 | #include "TChain.h" | |
30 | ||
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 | // 2a.) particle 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 | // 2b.) event weights: | |
109 | fMultiplicityWeight(NULL), | |
110 | // 3.) integrated flow: | |
111 | fIntFlowList(NULL), | |
112 | fIntFlowProfiles(NULL), | |
113 | fIntFlowResults(NULL), | |
114 | fIntFlowFlags(NULL), | |
9da1a4f3 | 115 | fApplyCorrectionForNUA(kTRUE), |
116 | fnBinsMult(10000), | |
067e9bc8 | 117 | fMinMult(0.), |
118 | fMaxMult(10000.), | |
489d5531 | 119 | fReQ(NULL), |
120 | fImQ(NULL), | |
121 | fSMpk(NULL), | |
122 | fIntFlowCorrelationsEBE(NULL), | |
123 | fIntFlowEventWeightsForCorrelationsEBE(NULL), | |
124 | fIntFlowCorrelationsAllEBE(NULL), | |
9f33751d | 125 | fReferenceMultiplicityEBE(0.), |
489d5531 | 126 | fAvMultiplicity(NULL), |
127 | fIntFlowCorrelationsPro(NULL), | |
128 | fIntFlowCorrelationsAllPro(NULL), | |
129 | fIntFlowExtraCorrelationsPro(NULL), | |
130 | fIntFlowProductOfCorrelationsPro(NULL), | |
0328db2d | 131 | fIntFlowProductOfCorrectionTermsForNUAPro(NULL), |
489d5531 | 132 | fIntFlowCorrelationsHist(NULL), |
133 | fIntFlowCorrelationsAllHist(NULL), | |
134 | fIntFlowCovariances(NULL), | |
135 | fIntFlowSumOfProductOfEventWeights(NULL), | |
0328db2d | 136 | fIntFlowCovariancesNUA(NULL), |
137 | fIntFlowSumOfProductOfEventWeightsNUA(NULL), | |
489d5531 | 138 | fIntFlowQcumulants(NULL), |
139 | fIntFlow(NULL), | |
140 | // 4.) differential flow: | |
141 | fDiffFlowList(NULL), | |
142 | fDiffFlowProfiles(NULL), | |
143 | fDiffFlowResults(NULL), | |
144 | fDiffFlowFlags(NULL), | |
145 | fCalculate2DFlow(kFALSE), | |
146 | // 5.) distributions: | |
57340a27 | 147 | fDistributionsList(NULL), |
148 | fDistributionsFlags(NULL), | |
489d5531 | 149 | fStoreDistributions(kFALSE), |
150 | // x.) debugging and cross-checking: | |
151 | fNestedLoopsList(NULL), | |
152 | fEvaluateIntFlowNestedLoops(kFALSE), | |
153 | fEvaluateDiffFlowNestedLoops(kFALSE), | |
154 | fMaxAllowedMultiplicity(10), | |
155 | fEvaluateNestedLoops(NULL), | |
156 | fIntFlowDirectCorrelations(NULL), | |
157 | fIntFlowExtraDirectCorrelations(NULL), | |
158 | fCrossCheckInPtBinNo(10), | |
3b552efe | 159 | fCrossCheckInEtaBinNo(20), |
489d5531 | 160 | fNoOfParticlesInBin(NULL) |
161 | { | |
162 | // constructor | |
163 | ||
164 | // base list to hold all output objects: | |
165 | fHistList = new TList(); | |
166 | fHistList->SetName("cobjQC"); | |
167 | fHistList->SetOwner(kTRUE); | |
168 | ||
169 | // list to hold histograms with phi, pt and eta weights: | |
170 | fWeightsList = new TList(); | |
171 | ||
172 | // multiplicity weight: | |
173 | fMultiplicityWeight = new TString("combinations"); | |
174 | ||
175 | // analysis label; | |
176 | fAnalysisLabel = new TString(); | |
177 | ||
178 | // initialize all arrays: | |
179 | this->InitializeArraysForIntFlow(); | |
180 | this->InitializeArraysForDiffFlow(); | |
181 | this->InitializeArraysForDistributions(); | |
182 | this->InitializeArraysForNestedLoops(); | |
183 | ||
184 | } // end of constructor | |
185 | ||
186 | ||
187 | //================================================================================================================ | |
188 | ||
189 | ||
190 | AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants() | |
191 | { | |
192 | // destructor | |
193 | ||
194 | delete fHistList; | |
195 | ||
196 | } // end of AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants() | |
197 | ||
198 | ||
199 | //================================================================================================================ | |
200 | ||
201 | ||
202 | void AliFlowAnalysisWithQCumulants::Init() | |
203 | { | |
3b552efe | 204 | // a) Cross check if the settings make sense before starting the QC adventure; |
489d5531 | 205 | // b) Access all common constants; |
206 | // c) Book all objects; | |
3b552efe | 207 | // d) Store flags for integrated and differential flow; |
489d5531 | 208 | // e) Store flags for distributions of corelations; |
209 | // f) Store harmonic which will be estimated. | |
3b552efe | 210 | |
489d5531 | 211 | //save old value and prevent histograms from being added to directory |
212 | //to avoid name clashes in case multiple analaysis objects are used | |
213 | //in an analysis | |
214 | Bool_t oldHistAddStatus = TH1::AddDirectoryStatus(); | |
215 | TH1::AddDirectory(kFALSE); | |
216 | ||
3b552efe | 217 | // a) Cross check if the settings make sense before starting the QC adventure; |
489d5531 | 218 | this->CrossCheckSettings(); |
219 | // b) Access all common constants: | |
220 | this->AccessConstants(); | |
221 | // c) Book all objects: | |
222 | this->BookAndFillWeightsHistograms(); | |
223 | this->BookAndNestAllLists(); | |
224 | this->BookCommonHistograms(); | |
225 | this->BookEverythingForIntegratedFlow(); | |
226 | this->BookEverythingForDifferentialFlow(); | |
227 | this->BookEverythingForDistributions(); | |
228 | this->BookEverythingForNestedLoops(); | |
229 | // d) Store flags for integrated and differential flow: | |
230 | this->StoreIntFlowFlags(); | |
3b552efe | 231 | this->StoreDiffFlowFlags(); |
489d5531 | 232 | // e) Store flags for distributions of corelations: |
233 | this->StoreFlagsForDistributions(); | |
234 | // f) Store harmonic which will be estimated: | |
235 | this->StoreHarmonic(); | |
236 | ||
237 | TH1::AddDirectory(oldHistAddStatus); | |
238 | } // end of void AliFlowAnalysisWithQCumulants::Init() | |
239 | ||
240 | ||
241 | //================================================================================================================ | |
242 | ||
243 | ||
244 | void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent) | |
245 | { | |
246 | // Running over data only in this method. | |
247 | ||
248 | // a) Fill the common control histograms and call the method to fill fAvMultiplicity; | |
249 | // b) Loop over data and calculate e-b-e quantities; | |
250 | // c) Call all the methods; | |
251 | // d) Debugging and cross-checking (evaluate nested loops); | |
252 | // e) Reset all event by event quantities. | |
253 | ||
254 | Double_t dPhi = 0.; // azimuthal angle in the laboratory frame | |
255 | Double_t dPt = 0.; // transverse momentum | |
256 | Double_t dEta = 0.; // pseudorapidity | |
257 | ||
258 | Double_t wPhi = 1.; // phi weight | |
259 | Double_t wPt = 1.; // pt weight | |
260 | Double_t wEta = 1.; // eta weight | |
261 | ||
9f33751d | 262 | fReferenceMultiplicityEBE = anEvent->GetReferenceMultiplicity(); // reference multiplicity for current event |
489d5531 | 263 | Int_t nRP = anEvent->GetEventNSelTracksRP(); // number of RPs (i.e. number of particles used to determine the reaction plane) |
9f33751d | 264 | |
489d5531 | 265 | // a) Fill the common control histograms and call the method to fill fAvMultiplicity: |
266 | this->FillCommonControlHistograms(anEvent); | |
267 | this->FillAverageMultiplicities(nRP); | |
268 | ||
269 | // b) Loop over data and calculate e-b-e quantities: | |
9f33751d | 270 | Int_t nPrim = anEvent->NumberOfTracks(); // nPrim = total number of primary tracks, i.e. nPrim = nRP + nPOI where: |
489d5531 | 271 | // nRP = # of particles used to determine the reaction plane; |
272 | // nPOI = # of particles of interest for a detailed flow analysis; | |
489d5531 | 273 | |
274 | AliFlowTrackSimple *aftsTrack = NULL; | |
275 | ||
276 | for(Int_t i=0;i<nPrim;i++) | |
277 | { | |
278 | aftsTrack=anEvent->GetTrack(i); | |
279 | if(aftsTrack) | |
280 | { | |
281 | if(!(aftsTrack->InRPSelection() || aftsTrack->InPOISelection())) continue; // consider only tracks which are RPs or POIs | |
282 | Int_t n = fHarmonic; // shortcut for the harmonic | |
283 | if(aftsTrack->InRPSelection()) // RP condition: | |
284 | { | |
285 | dPhi = aftsTrack->Phi(); | |
286 | dPt = aftsTrack->Pt(); | |
287 | dEta = aftsTrack->Eta(); | |
288 | if(fUsePhiWeights && fPhiWeights && fnBinsPhi) // determine phi weight for this particle: | |
289 | { | |
290 | wPhi = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*fnBinsPhi/TMath::TwoPi()))); | |
291 | } | |
292 | if(fUsePtWeights && fPtWeights && fnBinsPt) // determine pt weight for this particle: | |
293 | { | |
294 | wPt = fPtWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/fPtBinWidth))); | |
295 | } | |
296 | if(fUseEtaWeights && fEtaWeights && fEtaBinWidth) // determine eta weight for this particle: | |
297 | { | |
298 | wEta = fEtaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fEtaBinWidth))); | |
299 | } | |
300 | ||
301 | // integrated flow: | |
302 | // calculate Re[Q_{m*n,k}] and Im[Q_{m*n,k}], m = 1,2,3,4, for this event: | |
303 | for(Int_t m=0;m<4;m++) | |
304 | { | |
305 | for(Int_t k=0;k<9;k++) | |
306 | { | |
307 | (*fReQ)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1)*n*dPhi); | |
308 | (*fImQ)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1)*n*dPhi); | |
309 | } | |
310 | } | |
311 | // calculate S^{M}_{p,k} for this event | |
312 | // Remark: final calculation of S^{M}_{p,k} follows after the loop over data bellow: | |
313 | for(Int_t p=0;p<8;p++) | |
314 | { | |
315 | for(Int_t k=0;k<9;k++) | |
316 | { | |
317 | (*fSMpk)(p,k)+=pow(wPhi*wPt*wEta,k); | |
318 | } | |
319 | } | |
320 | ||
321 | // differential flow: | |
322 | // 1D (pt): | |
323 | // (r_{m*m,k}(pt)): | |
324 | for(Int_t m=0;m<4;m++) | |
325 | { | |
326 | for(Int_t k=0;k<9;k++) | |
327 | { | |
328 | fReRPQ1dEBE[0][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
329 | fImRPQ1dEBE[0][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
330 | } | |
331 | } | |
332 | ||
333 | // s_{k}(pt) for RPs // to be improved (clarified) | |
334 | // Remark: final calculation of s_{p,k}(pt) follows after the loop over data bellow: | |
335 | for(Int_t k=0;k<9;k++) | |
336 | { | |
337 | fs1dEBE[0][0][k]->Fill(dPt,pow(wPhi*wPt*wEta,k),1.); | |
338 | } | |
339 | // 1D (eta): | |
340 | // (r_{m*m,k}(eta)): | |
341 | for(Int_t m=0;m<4;m++) | |
342 | { | |
343 | for(Int_t k=0;k<9;k++) | |
344 | { | |
345 | fReRPQ1dEBE[0][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
346 | fImRPQ1dEBE[0][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
347 | } | |
348 | } | |
349 | // s_{k}(eta) for RPs // to be improved (clarified) | |
350 | // Remark: final calculation of s_{p,k}(eta) follows after the loop over data bellow: | |
351 | for(Int_t k=0;k<9;k++) | |
352 | { | |
353 | fs1dEBE[0][1][k]->Fill(dEta,pow(wPhi*wPt*wEta,k),1.); | |
354 | } | |
355 | ||
356 | ||
357 | ||
358 | /* | |
359 | // 2D (pt,eta): | |
360 | if(fCalculate2DFlow) | |
361 | { | |
362 | // (r_{m*m,k}(pt,eta)): | |
363 | for(Int_t m=0;m<4;m++) | |
364 | { | |
365 | for(Int_t k=0;k<9;k++) | |
366 | { | |
367 | fReRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
368 | fImRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
369 | } | |
370 | } | |
371 | // s_{k}(pt,eta) for RPs // to be improved (clarified) | |
372 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
373 | for(Int_t k=0;k<9;k++) | |
374 | { | |
375 | fs2dEBE[0][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k),1.); | |
376 | } | |
377 | } // end of if(fCalculate2DFlow) | |
378 | */ | |
379 | ||
380 | ||
381 | ||
382 | if(aftsTrack->InPOISelection()) | |
383 | { | |
384 | // 1D (pt): | |
385 | // (q_{m*m,k}(pt)): | |
386 | for(Int_t m=0;m<4;m++) | |
387 | { | |
388 | for(Int_t k=0;k<9;k++) | |
389 | { | |
390 | fReRPQ1dEBE[2][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
391 | fImRPQ1dEBE[2][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
392 | } | |
393 | } | |
394 | // s_{k}(pt) for RP&&POIs // to be improved (clarified) | |
395 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
396 | for(Int_t k=0;k<9;k++) | |
397 | { | |
398 | fs1dEBE[2][0][k]->Fill(dPt,pow(wPhi*wPt*wEta,k),1.); | |
399 | } | |
400 | // 1D (eta): | |
401 | // (q_{m*m,k}(eta)): | |
402 | for(Int_t m=0;m<4;m++) | |
403 | { | |
404 | for(Int_t k=0;k<9;k++) | |
405 | { | |
406 | fReRPQ1dEBE[2][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
407 | fImRPQ1dEBE[2][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
408 | } | |
409 | } | |
410 | // s_{k}(eta) for RP&&POIs // to be improved (clarified) | |
411 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
412 | for(Int_t k=0;k<9;k++) | |
413 | { | |
414 | fs1dEBE[2][1][k]->Fill(dEta,pow(wPhi*wPt*wEta,k),1.); | |
415 | } | |
416 | ||
417 | /* | |
418 | // 2D (pt,eta) | |
419 | if(fCalculate2DFlow) | |
420 | { | |
421 | // (q_{m*m,k}(pt,eta)): | |
422 | for(Int_t m=0;m<4;m++) | |
423 | { | |
424 | for(Int_t k=0;k<9;k++) | |
425 | { | |
426 | fReRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
427 | fImRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
428 | } | |
429 | } | |
430 | // s_{k}(pt,eta) for RP&&POIs // to be improved (clarified) | |
431 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
432 | for(Int_t k=0;k<9;k++) | |
433 | { | |
434 | fs2dEBE[2][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k),1.); | |
435 | } | |
436 | } // end of if(fCalculate2DFlow) | |
437 | */ | |
438 | ||
439 | } // end of if(aftsTrack->InPOISelection()) | |
440 | ||
441 | ||
442 | ||
443 | } // end of if(pTrack->InRPSelection()) | |
444 | ||
445 | ||
446 | ||
447 | if(aftsTrack->InPOISelection()) | |
448 | { | |
449 | dPhi = aftsTrack->Phi(); | |
450 | dPt = aftsTrack->Pt(); | |
451 | dEta = aftsTrack->Eta(); | |
452 | ||
453 | // 1D (pt) | |
454 | // p_n(m*n,0): | |
455 | for(Int_t m=0;m<4;m++) | |
456 | { | |
457 | fReRPQ1dEBE[1][0][m][0]->Fill(dPt,TMath::Cos((m+1.)*n*dPhi),1.); | |
458 | fImRPQ1dEBE[1][0][m][0]->Fill(dPt,TMath::Sin((m+1.)*n*dPhi),1.); | |
459 | } | |
460 | // 1D (eta) | |
461 | // p_n(m*n,0): | |
462 | for(Int_t m=0;m<4;m++) | |
463 | { | |
464 | fReRPQ1dEBE[1][1][m][0]->Fill(dEta,TMath::Cos((m+1.)*n*dPhi),1.); | |
465 | fImRPQ1dEBE[1][1][m][0]->Fill(dEta,TMath::Sin((m+1.)*n*dPhi),1.); | |
466 | } | |
467 | ||
468 | ||
469 | /* | |
470 | // 2D (pt,eta): | |
471 | if(fCalculate2DFlow) | |
472 | { | |
473 | // p_n(m*n,0): | |
474 | for(Int_t m=0;m<4;m++) | |
475 | { | |
476 | fReRPQ2dEBE[1][m][0]->Fill(dPt,dEta,TMath::Cos((m+1.)*n*dPhi),1.); | |
477 | fImRPQ2dEBE[1][m][0]->Fill(dPt,dEta,TMath::Sin((m+1.)*n*dPhi),1.); | |
478 | } | |
479 | } // end of if(fCalculate2DFlow) | |
480 | */ | |
481 | ||
482 | ||
483 | } // end of if(pTrack->InPOISelection() ) | |
484 | ||
485 | ||
486 | } else // to if(aftsTrack) | |
487 | { | |
488 | cout<<endl; | |
489 | cout<<" WARNING: no particle! (i.e. aftsTrack is a NULL pointer in AFAWQC::Make().)"<<endl; | |
490 | cout<<endl; | |
491 | } | |
492 | } // end of for(Int_t i=0;i<nPrim;i++) | |
493 | ||
494 | // calculate the final expressions for S^{M}_{p,k}: | |
495 | for(Int_t p=0;p<8;p++) | |
496 | { | |
497 | for(Int_t k=0;k<9;k++) | |
498 | { | |
499 | (*fSMpk)(p,k)=pow((*fSMpk)(p,k),p+1); | |
500 | } | |
501 | } | |
502 | ||
503 | // ***************************** | |
504 | // **** CALL THE METHODS ******* | |
505 | // ***************************** | |
506 | // integrated flow: | |
507 | if(!fEvaluateIntFlowNestedLoops) | |
508 | { | |
509 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
510 | { | |
511 | if(nRP>1) this->CalculateIntFlowCorrelations(); // without using particle weights | |
0328db2d | 512 | } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
489d5531 | 513 | { |
514 | if(nRP>1) this->CalculateIntFlowCorrelationsUsingParticleWeights(); // with using particle weights | |
515 | } | |
516 | ||
517 | if(nRP>3) this->CalculateIntFlowProductOfCorrelations(); | |
518 | if(nRP>1) this->CalculateIntFlowSumOfEventWeights(); | |
519 | if(nRP>1) this->CalculateIntFlowSumOfProductOfEventWeights(); | |
520 | if(fApplyCorrectionForNUA) | |
521 | { | |
57340a27 | 522 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
523 | { | |
489d5531 | 524 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUASinTerms(); |
525 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUACosTerms(); | |
57340a27 | 526 | } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
527 | { | |
489d5531 | 528 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights(); |
57340a27 | 529 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights(); |
530 | } | |
0328db2d | 531 | |
532 | if(nRP>0) this->CalculateIntFlowProductOfCorrectionTermsForNUA(); | |
533 | if(nRP>0) this->CalculateIntFlowSumOfEventWeightsNUA(); | |
534 | if(nRP>0) this->CalculateIntFlowSumOfProductOfEventWeightsNUA(); | |
489d5531 | 535 | } // end of if(fApplyCorrectionForNUA) |
536 | } // end of if(!fEvaluateIntFlowNestedLoops) | |
537 | ||
538 | // differential flow: | |
539 | if(!fEvaluateDiffFlowNestedLoops) | |
540 | { | |
541 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
542 | { | |
543 | // without using particle weights: | |
544 | this->CalculateDiffFlowCorrelations("RP","Pt"); | |
545 | this->CalculateDiffFlowCorrelations("RP","Eta"); | |
546 | this->CalculateDiffFlowCorrelations("POI","Pt"); | |
57340a27 | 547 | this->CalculateDiffFlowCorrelations("POI","Eta"); |
548 | if(fApplyCorrectionForNUA) | |
549 | { | |
489d5531 | 550 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Pt"); |
551 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Eta"); | |
552 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Pt"); | |
553 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Eta"); | |
554 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Pt"); | |
555 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Eta"); | |
556 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Pt"); | |
57340a27 | 557 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Eta"); |
489d5531 | 558 | } // end of if(fApplyCorrectionForNUA) |
559 | } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
560 | { | |
561 | // with using particle weights: | |
562 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Pt"); | |
563 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Eta"); | |
564 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Pt"); | |
565 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Eta"); | |
57340a27 | 566 | if(fApplyCorrectionForNUA) |
567 | { | |
489d5531 | 568 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Pt"); |
569 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Eta"); | |
570 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Pt"); | |
571 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Eta"); | |
572 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Pt"); | |
573 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Eta"); | |
574 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Pt"); | |
57340a27 | 575 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Eta"); |
489d5531 | 576 | } // end of if(fApplyCorrectionForNUA) |
577 | } | |
57340a27 | 578 | |
489d5531 | 579 | // whether or not using particle weights the following is calculated in the same way: |
580 | this->CalculateDiffFlowProductOfCorrelations("RP","Pt"); | |
581 | this->CalculateDiffFlowProductOfCorrelations("RP","Eta"); | |
582 | this->CalculateDiffFlowProductOfCorrelations("POI","Pt"); | |
583 | this->CalculateDiffFlowProductOfCorrelations("POI","Eta"); | |
584 | this->CalculateDiffFlowSumOfEventWeights("RP","Pt"); | |
585 | this->CalculateDiffFlowSumOfEventWeights("RP","Eta"); | |
586 | this->CalculateDiffFlowSumOfEventWeights("POI","Pt"); | |
587 | this->CalculateDiffFlowSumOfEventWeights("POI","Eta"); | |
588 | this->CalculateDiffFlowSumOfProductOfEventWeights("RP","Pt"); | |
589 | this->CalculateDiffFlowSumOfProductOfEventWeights("RP","Eta"); | |
590 | this->CalculateDiffFlowSumOfProductOfEventWeights("POI","Pt"); | |
591 | this->CalculateDiffFlowSumOfProductOfEventWeights("POI","Eta"); | |
592 | } // end of if(!fEvaluateDiffFlowNestedLoops) | |
593 | ||
594 | ||
595 | ||
596 | // with weights: | |
597 | // ... | |
598 | ||
599 | /* | |
600 | // 2D differential flow | |
601 | if(fCalculate2DFlow) | |
602 | { | |
603 | // without weights: | |
604 | if(nRP>1) this->CalculateCorrelationsForDifferentialFlow2D("RP"); | |
605 | if(nRP>1) this->CalculateCorrelationsForDifferentialFlow2D("POI"); | |
606 | ||
607 | // with weights: | |
608 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
609 | { | |
610 | if(nRP>1) this->CalculateWeightedCorrelationsForDifferentialFlow2D("RP"); | |
611 | if(nRP>1) this->CalculateWeightedCorrelationsForDifferentialFlow2D("POI"); | |
612 | } | |
613 | } // end of if(fCalculate2DFlow) | |
614 | */ | |
57340a27 | 615 | |
616 | // distributions of correlations: | |
617 | if(fStoreDistributions) | |
618 | { | |
619 | this->StoreDistributionsOfCorrelations(); | |
620 | } | |
489d5531 | 621 | |
622 | // d) Debugging and cross-checking (evaluate nested loops): | |
623 | // d1) cross-checking results for integrated flow: | |
624 | if(fEvaluateIntFlowNestedLoops) | |
625 | { | |
626 | if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
627 | { | |
628 | // without using particle weights: | |
629 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
630 | { | |
631 | // correlations: | |
632 | this->CalculateIntFlowCorrelations(); // from Q-vectors | |
633 | this->EvaluateIntFlowCorrelationsWithNestedLoops(anEvent); // from nested loops (to be improved: do I have to pass here anEvent or not?) | |
634 | // correction for non-uniform acceptance: | |
635 | this->CalculateIntFlowCorrectionsForNUASinTerms(); // from Q-vectors (sin terms) | |
636 | this->CalculateIntFlowCorrectionsForNUACosTerms(); // from Q-vectors (cos terms) | |
637 | this->EvaluateIntFlowCorrectionsForNUAWithNestedLoops(anEvent); // from nested loops (both sin and cos terms) | |
638 | } | |
639 | // using particle weights: | |
640 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
641 | { | |
642 | // correlations: | |
643 | this->CalculateIntFlowCorrelationsUsingParticleWeights(); // from Q-vectors | |
644 | this->EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent); // from nested loops (to be improved: do I have to pass here anEvent or not?) | |
645 | // correction for non-uniform acceptance: | |
646 | this->CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights(); // from Q-vectors (sin terms) | |
647 | this->CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights(); // from Q-vectors (cos terms) | |
57340a27 | 648 | this->EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(anEvent); // from nested loops (both sin and cos terms) |
489d5531 | 649 | } |
650 | } else if (nPrim>fMaxAllowedMultiplicity) // to if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) | |
651 | { | |
652 | cout<<endl; | |
653 | cout<<"Skipping the event because multiplicity is "<<nPrim<<". Too high to evaluate nested loops!"<<endl; | |
654 | } else | |
655 | { | |
656 | cout<<endl; | |
657 | cout<<"Skipping the event because multiplicity is "<<nPrim<<"."<<endl; | |
658 | } | |
659 | } // end of if(fEvaluateIntFlowNestedLoops) | |
660 | ||
661 | // d2) cross-checking results for differential flow: | |
662 | if(fEvaluateDiffFlowNestedLoops) | |
663 | { | |
664 | if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
665 | { | |
666 | // without using particle weights: | |
667 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
668 | { | |
669 | // reduced correlations: | |
670 | // Q-vectors: | |
671 | this->CalculateDiffFlowCorrelations("RP","Pt"); | |
672 | this->CalculateDiffFlowCorrelations("RP","Eta"); | |
673 | this->CalculateDiffFlowCorrelations("POI","Pt"); | |
674 | this->CalculateDiffFlowCorrelations("POI","Eta"); | |
675 | // nested loops: | |
676 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"RP","Pt"); | |
677 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"RP","Eta"); | |
678 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"POI","Pt"); | |
679 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"POI","Eta"); | |
680 | // reduced corrections for non-uniform acceptance: | |
681 | // Q-vectors: | |
682 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Pt"); | |
683 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Eta"); | |
684 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Pt"); | |
685 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Eta"); | |
686 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Pt"); | |
687 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Eta"); | |
688 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Pt"); | |
689 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Eta"); | |
690 | // nested loops: | |
691 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"RP","Pt"); | |
692 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"RP","Eta"); | |
693 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"POI","Pt"); | |
694 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"POI","Eta"); | |
695 | } // end of if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
696 | // using particle weights: | |
697 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
698 | { | |
699 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Pt"); | |
700 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Eta"); | |
701 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Pt"); | |
702 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Eta"); | |
703 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Pt"); | |
704 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Eta"); | |
705 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Pt"); | |
706 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Eta"); | |
707 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Pt"); | |
708 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Eta"); | |
709 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Pt"); | |
710 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Eta"); | |
711 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"RP","Pt"); | |
712 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"RP","Eta"); | |
713 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"POI","Pt"); | |
3b552efe | 714 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"POI","Eta"); |
489d5531 | 715 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"RP","Pt"); |
716 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"RP","Eta"); | |
717 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"POI","Pt"); | |
718 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"POI","Eta"); | |
719 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
720 | } // end of if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
721 | } // end of if(fEvaluateDiffFlowNestedLoops) | |
722 | ||
723 | // e) Reset all event by event quantities: | |
724 | this->ResetEventByEventQuantities(); | |
725 | ||
726 | } // end of AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent) | |
727 | ||
728 | ||
729 | //================================================================================================================================ | |
730 | ||
731 | ||
732 | void AliFlowAnalysisWithQCumulants::Finish() | |
733 | { | |
734 | // Calculate the final results. | |
735 | // a) acces the constants; | |
736 | // b) access the flags; | |
737 | // c) calculate the final results for integrated flow (without and with weights); | |
738 | // d) store in AliFlowCommonHistResults and print the final results for integrated flow; | |
739 | // e) calculate the final results for differential flow (without and with weights); | |
740 | // f) print the final results for integrated flow obtained from differential flow (to be improved (terminology)); | |
741 | // g) cross-check the results: results from Q-vectors vs results from nested loops | |
742 | ||
743 | // ****************************** | |
744 | // **** ACCESS THE CONSTANTS **** | |
745 | // ****************************** | |
746 | ||
747 | this->AccessConstants(); | |
748 | ||
749 | if(fCommonHists && fCommonHists->GetHarmonic()) | |
750 | { | |
751 | fHarmonic = (Int_t)(fCommonHists->GetHarmonic())->GetBinContent(1); // to be improved (moved somewhere else) | |
752 | } | |
753 | ||
754 | // ************************** | |
ff70ca91 | 755 | // **** ACCESS THE FLAGS **** // to be improved (moved somewhere else) |
489d5531 | 756 | // ************************** |
757 | fUsePhiWeights = (Int_t)fUseParticleWeights->GetBinContent(1); | |
758 | fUsePtWeights = (Int_t)fUseParticleWeights->GetBinContent(2); | |
759 | fUseEtaWeights = (Int_t)fUseParticleWeights->GetBinContent(3); | |
3b552efe | 760 | fApplyCorrectionForNUA = (Int_t)fIntFlowFlags->GetBinContent(3); |
489d5531 | 761 | fPrintFinalResults[0] = (Int_t)fIntFlowFlags->GetBinContent(4); |
762 | fPrintFinalResults[1] = (Int_t)fIntFlowFlags->GetBinContent(5); | |
763 | fPrintFinalResults[2] = (Int_t)fIntFlowFlags->GetBinContent(6); | |
764 | fEvaluateIntFlowNestedLoops = (Int_t)fEvaluateNestedLoops->GetBinContent(1); | |
765 | fEvaluateDiffFlowNestedLoops = (Int_t)fEvaluateNestedLoops->GetBinContent(2); | |
766 | fCrossCheckInPtBinNo = (Int_t)fEvaluateNestedLoops->GetBinContent(3); | |
767 | fCrossCheckInEtaBinNo = (Int_t)fEvaluateNestedLoops->GetBinContent(4); | |
768 | ||
769 | // ********************************************************* | |
770 | // **** CALCULATE THE FINAL RESULTS FOR INTEGRATED FLOW **** | |
771 | // ********************************************************* | |
772 | ||
773 | this->FinalizeCorrelationsIntFlow(); | |
774 | this->CalculateCovariancesIntFlow(); | |
775 | this->CalculateCumulantsIntFlow(); | |
776 | this->CalculateIntFlow(); | |
777 | ||
778 | if(fApplyCorrectionForNUA) // to be improved (reorganized, etc) | |
779 | { | |
780 | this->FinalizeCorrectionTermsForNUAIntFlow(); | |
067e9bc8 | 781 | // this->CalculateCovariancesNUAIntFlow(); // to be improved (enabled eventually) |
489d5531 | 782 | this->CalculateQcumulantsCorrectedForNUAIntFlow(); |
783 | this->CalculateIntFlowCorrectedForNUA(); | |
784 | } | |
785 | ||
786 | // *************************************************************** | |
787 | // **** STORE AND PRINT THE FINAL RESULTS FOR INTEGRATED FLOW **** | |
788 | // *************************************************************** | |
789 | ||
790 | this->FillCommonHistResultsIntFlow(); | |
791 | ||
3b552efe | 792 | if(fPrintFinalResults[0]) |
793 | { | |
489d5531 | 794 | this->PrintFinalResultsForIntegratedFlow("NONAME"); // to be improved (name) |
795 | } | |
796 | ||
797 | // *********************************************************** | |
798 | // **** CALCULATE THE FINAL RESULTS FOR DIFFERENTIAL FLOW **** | |
799 | // *********************************************************** | |
800 | ||
801 | this->FinalizeReducedCorrelations("RP","Pt"); | |
802 | this->FinalizeReducedCorrelations("RP","Eta"); | |
803 | this->FinalizeReducedCorrelations("POI","Pt"); | |
804 | this->FinalizeReducedCorrelations("POI","Eta"); | |
805 | this->CalculateDiffFlowCovariances("RP","Pt"); | |
806 | this->CalculateDiffFlowCovariances("RP","Eta"); | |
807 | this->CalculateDiffFlowCovariances("POI","Pt"); | |
808 | this->CalculateDiffFlowCovariances("POI","Eta"); | |
809 | this->CalculateDiffFlowCumulants("RP","Pt"); | |
810 | this->CalculateDiffFlowCumulants("RP","Eta"); | |
811 | this->CalculateDiffFlowCumulants("POI","Pt"); | |
812 | this->CalculateDiffFlowCumulants("POI","Eta"); | |
813 | this->CalculateDiffFlow("RP","Pt"); | |
814 | this->CalculateDiffFlow("RP","Eta"); | |
815 | this->CalculateDiffFlow("POI","Pt"); | |
816 | this->CalculateDiffFlow("POI","Eta"); | |
817 | ||
818 | if(fApplyCorrectionForNUA) // to be improved (reorganized, etc) | |
819 | { | |
820 | this->FinalizeCorrectionTermsForNUADiffFlow("RP","Pt"); | |
821 | this->FinalizeCorrectionTermsForNUADiffFlow("RP","Eta"); | |
822 | this->FinalizeCorrectionTermsForNUADiffFlow("POI","Pt"); | |
823 | this->FinalizeCorrectionTermsForNUADiffFlow("POI","Eta"); | |
824 | this->CalculateDiffFlowCumulantsCorrectedForNUA("RP","Pt"); | |
825 | this->CalculateDiffFlowCumulantsCorrectedForNUA("RP","Eta"); | |
826 | this->CalculateDiffFlowCumulantsCorrectedForNUA("POI","Pt"); | |
827 | this->CalculateDiffFlowCumulantsCorrectedForNUA("POI","Eta"); | |
828 | this->CalculateDiffFlowCorrectedForNUA("RP","Pt"); | |
829 | this->CalculateDiffFlowCorrectedForNUA("RP","Eta"); | |
830 | this->CalculateDiffFlowCorrectedForNUA("POI","Pt"); | |
831 | this->CalculateDiffFlowCorrectedForNUA("POI","Eta"); | |
3b552efe | 832 | } |
489d5531 | 833 | |
834 | this->CalculateFinalResultsForRPandPOIIntegratedFlow("RP"); | |
835 | this->CalculateFinalResultsForRPandPOIIntegratedFlow("POI"); | |
836 | ||
837 | // ***************************************************************** | |
838 | // **** STORE AND PRINT THE FINAL RESULTS FOR DIFFERENTIAL FLOW **** | |
839 | // ***************************************************************** | |
840 | this->FillCommonHistResultsDiffFlow("RP"); | |
841 | this->FillCommonHistResultsDiffFlow("POI"); | |
842 | ||
3b552efe | 843 | if(fPrintFinalResults[1]) |
844 | { | |
489d5531 | 845 | this->PrintFinalResultsForIntegratedFlow("RP"); |
3b552efe | 846 | } |
847 | if(fPrintFinalResults[2]) | |
848 | { | |
489d5531 | 849 | this->PrintFinalResultsForIntegratedFlow("POI"); |
850 | } | |
851 | // g) cross-check the results: results from Q-vectors vs results from nested loops | |
852 | ||
853 | // g1) integrated flow: | |
854 | if(fEvaluateIntFlowNestedLoops) | |
855 | { | |
856 | this->CrossCheckIntFlowCorrelations(); | |
857 | this->CrossCheckIntFlowCorrectionTermsForNUA(); | |
858 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) this->CrossCheckIntFlowExtraCorrelations(); | |
859 | } // end of if(fEvaluateIntFlowNestedLoops) | |
860 | ||
861 | // g2) differential flow: | |
862 | if(fEvaluateDiffFlowNestedLoops) | |
863 | { | |
3b552efe | 864 | // correlations: |
489d5531 | 865 | this->PrintNumberOfParticlesInSelectedBin(); |
866 | this->CrossCheckDiffFlowCorrelations("RP","Pt"); | |
867 | this->CrossCheckDiffFlowCorrelations("RP","Eta"); | |
868 | this->CrossCheckDiffFlowCorrelations("POI","Pt"); | |
869 | this->CrossCheckDiffFlowCorrelations("POI","Eta"); | |
870 | // correction terms for non-uniform acceptance: | |
871 | this->CrossCheckDiffFlowCorrectionTermsForNUA("RP","Pt"); | |
872 | this->CrossCheckDiffFlowCorrectionTermsForNUA("RP","Eta"); | |
873 | this->CrossCheckDiffFlowCorrectionTermsForNUA("POI","Pt"); | |
874 | this->CrossCheckDiffFlowCorrectionTermsForNUA("POI","Eta"); | |
875 | } // end of if(fEvaluateDiffFlowNestedLoops) | |
876 | ||
877 | } // end of AliFlowAnalysisWithQCumulants::Finish() | |
878 | ||
879 | ||
880 | //================================================================================================================================ | |
881 | ||
882 | ||
883 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTerms() | |
884 | { | |
885 | // calculate corrections for non-uniform acceptance of the detector for no-name integrated flow (cos terms) | |
886 | ||
887 | // multiplicity: | |
888 | Double_t dMult = (*fSMpk)(0,0); | |
889 | ||
890 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
891 | Double_t dReQ1n = (*fReQ)(0,0); | |
892 | Double_t dReQ2n = (*fReQ)(1,0); | |
893 | //Double_t dReQ3n = (*fReQ)(2,0); | |
894 | //Double_t dReQ4n = (*fReQ)(3,0); | |
895 | Double_t dImQ1n = (*fImQ)(0,0); | |
896 | Double_t dImQ2n = (*fImQ)(1,0); | |
897 | //Double_t dImQ3n = (*fImQ)(2,0); | |
898 | //Double_t dImQ4n = (*fImQ)(3,0); | |
899 | ||
900 | // ************************************************************* | |
901 | // **** corrections for non-uniform acceptance (cos terms): **** | |
902 | // ************************************************************* | |
903 | // | |
904 | // Remark 1: corrections for non-uniform acceptance (cos terms) calculated with non-weighted Q-vectors | |
905 | // are stored in 1D profile fQCorrectionsCos. | |
906 | // Remark 2: binning of fIntFlowCorrectionTermsForNUAPro[1] is organized as follows: | |
907 | // -------------------------------------------------------------------------------------------------------------------- | |
908 | // 1st bin: <<cos(n*(phi1))>> = cosP1n | |
909 | // 2nd bin: <<cos(n*(phi1+phi2))>> = cosP1nP1n | |
910 | // 3rd bin: <<cos(n*(phi1-phi2-phi3))>> = cosP1nM1nM1n | |
911 | // 4th bin: <<cos(n*(2phi1-phi2))>> = cosP2nM1n | |
912 | // -------------------------------------------------------------------------------------------------------------------- | |
913 | ||
914 | // 1-particle: | |
915 | Double_t cosP1n = 0.; // <<cos(n*(phi1))>> | |
916 | ||
917 | if(dMult>0) | |
918 | { | |
919 | cosP1n = dReQ1n/dMult; | |
920 | ||
921 | // average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for single event: | |
922 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(1,cosP1n); | |
0328db2d | 923 | // event weights for NUA terms: |
924 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(1,dMult); | |
489d5531 | 925 | |
926 | // final average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for all events: | |
927 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(0.5,cosP1n,dMult); | |
928 | } | |
929 | ||
930 | // 2-particle: | |
3b552efe | 931 | Double_t cosP1nP1n = 0.; // <<cos(n*(phi1+phi2))>> |
489d5531 | 932 | Double_t cosP2nM1n = 0.; // <<cos(n*(2phi1-phi2))>> |
933 | ||
934 | if(dMult>1) | |
935 | { | |
936 | cosP1nP1n = (pow(dReQ1n,2)-pow(dImQ1n,2)-dReQ2n)/(dMult*(dMult-1)); | |
937 | cosP2nM1n = (dReQ2n*dReQ1n+dImQ2n*dImQ1n-dReQ1n)/(dMult*(dMult-1)); | |
938 | ||
939 | // average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for single event: | |
3b552efe | 940 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(2,cosP1nP1n); |
489d5531 | 941 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(4,cosP2nM1n); |
0328db2d | 942 | // event weights for NUA terms: |
943 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(2,dMult*(dMult-1)); | |
944 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(4,dMult*(dMult-1)); | |
945 | ||
489d5531 | 946 | // final average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for all events: |
3b552efe | 947 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(1.5,cosP1nP1n,dMult*(dMult-1)); |
489d5531 | 948 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(3.5,cosP2nM1n,dMult*(dMult-1)); |
949 | } | |
950 | ||
951 | // 3-particle: | |
952 | Double_t cosP1nM1nM1n = 0.; // <<cos(n*(phi1-phi2-phi3))>> | |
953 | ||
954 | if(dMult>2) | |
955 | { | |
956 | cosP1nM1nM1n = (dReQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))-dReQ1n*dReQ2n-dImQ1n*dImQ2n-2.*(dMult-1)*dReQ1n) | |
957 | / (dMult*(dMult-1)*(dMult-2)); | |
958 | ||
959 | // average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for single event: | |
960 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(3,cosP1nM1nM1n); | |
0328db2d | 961 | // event weights for NUA terms: |
962 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(3,dMult*(dMult-1)*(dMult-2)); | |
489d5531 | 963 | |
964 | // final average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for all events: | |
965 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(2.5,cosP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); | |
966 | } | |
967 | ||
968 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTerms() | |
969 | ||
970 | ||
971 | //================================================================================================================================ | |
972 | ||
973 | ||
974 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTerms() | |
975 | { | |
976 | // calculate corrections for non-uniform acceptance of the detector for no-name integrated flow (sin terms) | |
977 | ||
978 | // multiplicity: | |
979 | Double_t dMult = (*fSMpk)(0,0); | |
980 | ||
981 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
982 | Double_t dReQ1n = (*fReQ)(0,0); | |
983 | Double_t dReQ2n = (*fReQ)(1,0); | |
984 | //Double_t dReQ3n = (*fReQ)(2,0); | |
985 | //Double_t dReQ4n = (*fReQ)(3,0); | |
986 | Double_t dImQ1n = (*fImQ)(0,0); | |
987 | Double_t dImQ2n = (*fImQ)(1,0); | |
988 | //Double_t dImQ3n = (*fImQ)(2,0); | |
989 | //Double_t dImQ4n = (*fImQ)(3,0); | |
990 | ||
991 | // ************************************************************* | |
992 | // **** corrections for non-uniform acceptance (sin terms): **** | |
993 | // ************************************************************* | |
994 | // | |
995 | // Remark 1: corrections for non-uniform acceptance (sin terms) calculated with non-weighted Q-vectors | |
996 | // are stored in 1D profile fQCorrectionsSin. | |
997 | // Remark 2: binning of fIntFlowCorrectionTermsForNUAPro[0] is organized as follows: | |
998 | // -------------------------------------------------------------------------------------------------------------------- | |
999 | // 1st bin: <<sin(n*(phi1))>> = sinP1n | |
1000 | // 2nd bin: <<sin(n*(phi1+phi2))>> = sinP1nP1n | |
1001 | // 3rd bin: <<sin(n*(phi1-phi2-phi3))>> = sinP1nM1nM1n | |
1002 | // 4th bin: <<sin(n*(2phi1-phi2))>> = sinP2nM1n | |
1003 | // -------------------------------------------------------------------------------------------------------------------- | |
1004 | ||
1005 | // 1-particle: | |
1006 | Double_t sinP1n = 0.; // <sin(n*(phi1))> | |
1007 | ||
1008 | if(dMult>0) | |
1009 | { | |
1010 | sinP1n = dImQ1n/dMult; | |
1011 | ||
1012 | // average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for single event: | |
0328db2d | 1013 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(1,sinP1n); |
1014 | // event weights for NUA terms: | |
1015 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(1,dMult); | |
489d5531 | 1016 | |
1017 | // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
1018 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(0.5,sinP1n,dMult); | |
1019 | } | |
1020 | ||
1021 | // 2-particle: | |
1022 | Double_t sinP1nP1n = 0.; // <<sin(n*(phi1+phi2))>> | |
1023 | Double_t sinP2nM1n = 0.; // <<sin(n*(2phi1-phi2))>> | |
1024 | if(dMult>1) | |
1025 | { | |
3b552efe | 1026 | sinP1nP1n = (2.*dReQ1n*dImQ1n-dImQ2n)/(dMult*(dMult-1)); |
489d5531 | 1027 | sinP2nM1n = (dImQ2n*dReQ1n-dReQ2n*dImQ1n-dImQ1n)/(dMult*(dMult-1)); |
1028 | ||
1029 | // average non-weighted 2-particle correction (sin terms) for non-uniform acceptance for single event: | |
1030 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(2,sinP1nP1n); | |
3b552efe | 1031 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(4,sinP2nM1n); |
0328db2d | 1032 | // event weights for NUA terms: |
1033 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(2,dMult*(dMult-1)); | |
1034 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(4,dMult*(dMult-1)); | |
489d5531 | 1035 | |
1036 | // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
1037 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(1.5,sinP1nP1n,dMult*(dMult-1)); | |
1038 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(3.5,sinP2nM1n,dMult*(dMult-1)); | |
1039 | } | |
1040 | ||
1041 | // 3-particle: | |
1042 | Double_t sinP1nM1nM1n = 0.; // <<sin(n*(phi1-phi2-phi3))>> | |
1043 | ||
1044 | if(dMult>2) | |
1045 | { | |
1046 | sinP1nM1nM1n = (-dImQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))+dReQ1n*dImQ2n-dImQ1n*dReQ2n+2.*(dMult-1)*dImQ1n) | |
1047 | / (dMult*(dMult-1)*(dMult-2)); | |
1048 | ||
1049 | // average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for single event: | |
1050 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(3,sinP1nM1nM1n); | |
0328db2d | 1051 | // event weights for NUA terms: |
1052 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(3,dMult*(dMult-1)*(dMult-2)); | |
489d5531 | 1053 | |
1054 | // final average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for all events: | |
1055 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(2.5,sinP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); | |
1056 | } | |
1057 | ||
1058 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTerms() | |
1059 | ||
1060 | ||
1061 | //================================================================================================================================ | |
1062 | ||
1063 | ||
1064 | void AliFlowAnalysisWithQCumulants::GetOutputHistograms(TList *outputListHistos) | |
1065 | { | |
1066 | // a) Get pointers for common control and common result histograms and profiles. | |
1067 | // b) Get pointers for histograms with particle weights. | |
1068 | // c) Get pointers for histograms and profiles relevant for integrated flow. | |
1069 | // d) Get pointers for histograms and profiles relevant for differental flow. | |
1070 | // e) Get pointers for histograms and profiles holding results obtained with nested loops. | |
1071 | ||
1072 | if(outputListHistos) | |
3b552efe | 1073 | { |
1074 | this->SetHistList(outputListHistos); | |
1075 | if(!fHistList) | |
1076 | { | |
1077 | cout<<endl; | |
1078 | cout<<" WARNING (QC): fHistList is NULL in AFAWQC::GOH() !!!!"<<endl; | |
1079 | cout<<endl; | |
1080 | exit(0); | |
489d5531 | 1081 | } |
1082 | this->GetPointersForCommonHistograms(); | |
1083 | this->GetPointersForParticleWeightsHistograms(); | |
1084 | this->GetPointersForIntFlowHistograms(); | |
1085 | this->GetPointersForDiffFlowHistograms(); | |
1086 | this->GetPointersForNestedLoopsHistograms(); | |
3b552efe | 1087 | } else |
1088 | { | |
1089 | cout<<endl; | |
1090 | cout<<" WARNING (QC): outputListHistos is NULL in AFAWQC::GOH() !!!!"<<endl; | |
1091 | cout<<endl; | |
1092 | exit(0); | |
489d5531 | 1093 | } |
1094 | ||
1095 | } // end of void AliFlowAnalysisWithQCumulants::GetOutputHistograms(TList *outputListHistos) | |
ad87ae62 | 1096 | |
1097 | ||
489d5531 | 1098 | //================================================================================================================================ |
1099 | ||
1100 | ||
1101 | TProfile* AliFlowAnalysisWithQCumulants::MakePtProjection(TProfile2D *profilePtEta) const | |
ad87ae62 | 1102 | { |
489d5531 | 1103 | // project 2D profile onto pt axis to get 1D profile |
1104 | ||
1105 | Int_t nBinsPt = profilePtEta->GetNbinsX(); | |
1106 | Double_t dPtMin = (profilePtEta->GetXaxis())->GetXmin(); | |
1107 | Double_t dPtMax = (profilePtEta->GetXaxis())->GetXmax(); | |
1108 | ||
1109 | Int_t nBinsEta = profilePtEta->GetNbinsY(); | |
1110 | ||
1111 | TProfile *profilePt = new TProfile("","",nBinsPt,dPtMin,dPtMax); | |
1112 | ||
1113 | for(Int_t p=1;p<=nBinsPt;p++) | |
1114 | { | |
1115 | Double_t contentPt = 0.; | |
1116 | Double_t entryPt = 0.; | |
1117 | Double_t spreadPt = 0.; | |
1118 | Double_t sum1 = 0.; | |
1119 | Double_t sum2 = 0.; | |
1120 | Double_t sum3 = 0.; | |
1121 | for(Int_t e=1;e<=nBinsEta;e++) | |
1122 | { | |
1123 | contentPt += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))) | |
1124 | * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1125 | entryPt += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1126 | ||
1127 | sum1 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))) | |
1128 | * (pow(profilePtEta->GetBinError(profilePtEta->GetBin(p,e)),2.) | |
1129 | + pow(profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)),2.)); | |
1130 | sum2 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1131 | sum3 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))) | |
1132 | * (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))); | |
1133 | } | |
1134 | if(sum2>0. && sum1/sum2-pow(sum3/sum2,2.) > 0.) | |
1135 | { | |
1136 | spreadPt = pow(sum1/sum2-pow(sum3/sum2,2.),0.5); | |
1137 | } | |
1138 | profilePt->SetBinContent(p,contentPt); | |
1139 | profilePt->SetBinEntries(p,entryPt); | |
1140 | { | |
1141 | profilePt->SetBinError(p,spreadPt); | |
1142 | } | |
1143 | ||
1144 | } | |
1145 | ||
1146 | return profilePt; | |
1147 | ||
1148 | } // end of TProfile* AliFlowAnalysisWithQCumulants::MakePtProjection(TProfile2D *profilePtEta) | |
1149 | ||
1150 | ||
1151 | //================================================================================================================================ | |
1152 | ||
1153 | ||
1154 | TProfile* AliFlowAnalysisWithQCumulants::MakeEtaProjection(TProfile2D *profilePtEta) const | |
1155 | { | |
1156 | // project 2D profile onto eta axis to get 1D profile | |
1157 | ||
1158 | Int_t nBinsEta = profilePtEta->GetNbinsY(); | |
1159 | Double_t dEtaMin = (profilePtEta->GetYaxis())->GetXmin(); | |
1160 | Double_t dEtaMax = (profilePtEta->GetYaxis())->GetXmax(); | |
1161 | ||
1162 | Int_t nBinsPt = profilePtEta->GetNbinsX(); | |
1163 | ||
1164 | TProfile *profileEta = new TProfile("","",nBinsEta,dEtaMin,dEtaMax); | |
1165 | ||
1166 | for(Int_t e=1;e<=nBinsEta;e++) | |
1167 | { | |
1168 | Double_t contentEta = 0.; | |
1169 | Double_t entryEta = 0.; | |
1170 | for(Int_t p=1;p<=nBinsPt;p++) | |
1171 | { | |
1172 | contentEta += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))) | |
1173 | * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1174 | entryEta += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1175 | } | |
1176 | profileEta->SetBinContent(e,contentEta); | |
1177 | profileEta->SetBinEntries(e,entryEta); | |
1178 | } | |
1179 | ||
1180 | return profileEta; | |
1181 | ||
1182 | } // end of TProfile* AliFlowAnalysisWithQCumulants::MakeEtaProjection(TProfile2D *profilePtEta) | |
1183 | ||
1184 | ||
1185 | //================================================================================================================================ | |
1186 | ||
1187 | ||
1188 | void AliFlowAnalysisWithQCumulants::PrintFinalResultsForIntegratedFlow(TString type) | |
1189 | { | |
1190 | // printing on the screen the final results for integrated flow (NONAME, POI and RP) // to be improved (NONAME) | |
1191 | ||
1192 | Int_t n = fHarmonic; | |
1193 | ||
1194 | if(type == "NONAME" || type == "RP" || type == "POI") | |
1195 | { | |
1196 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th)) | |
1197 | { | |
1198 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; | |
1199 | cout<<" is NULL in AFAWQC::PFRFIF() !!!!"<<endl; | |
1200 | } | |
1201 | } else | |
1202 | { | |
1203 | cout<<"WARNING: type in not from {NONAME, RP, POI} in AFAWQC::PFRFIF() !!!!"<<endl; | |
1204 | exit(0); | |
1205 | } | |
1206 | ||
1207 | Double_t dVn[4] = {0.}; // array to hold Vn{2}, Vn{4}, Vn{6} and Vn{8} | |
1208 | Double_t dVnErr[4] = {0.}; // array to hold errors of Vn{2}, Vn{4}, Vn{6} and Vn{8} | |
1209 | ||
1210 | if(type == "NONAME") | |
1211 | { | |
1212 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinContent(1); | |
1213 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinError(1); | |
1214 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinContent(1); | |
1215 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinError(1); | |
1216 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinContent(1); | |
1217 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinError(1); | |
1218 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinContent(1); | |
1219 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinError(1); | |
1220 | } else if(type == "RP") | |
1221 | { | |
1222 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinContent(1); | |
1223 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinError(1); | |
1224 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinContent(1); | |
1225 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinError(1); | |
1226 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinContent(1); | |
1227 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinError(1); | |
1228 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinContent(1); | |
1229 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinError(1); | |
1230 | } else if(type == "POI") | |
1231 | { | |
1232 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinContent(1); | |
1233 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinError(1); | |
1234 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinContent(1); | |
1235 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinError(1); | |
1236 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinContent(1); | |
1237 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinError(1); | |
1238 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinContent(1); | |
1239 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinError(1); | |
1240 | } | |
1241 | ||
1242 | TString title = " flow estimates from Q-cumulants"; | |
1243 | TString subtitle = " ("; | |
1244 | ||
1245 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
1246 | { | |
1247 | subtitle.Append(type); | |
1248 | subtitle.Append(", without weights)"); | |
1249 | } else | |
1250 | { | |
1251 | subtitle.Append(type); | |
1252 | subtitle.Append(", with weights)"); | |
1253 | } | |
1254 | ||
1255 | cout<<endl; | |
1256 | cout<<"*************************************"<<endl; | |
1257 | cout<<"*************************************"<<endl; | |
1258 | cout<<title.Data()<<endl; | |
1259 | cout<<subtitle.Data()<<endl; | |
1260 | cout<<endl; | |
1261 | ||
1262 | for(Int_t i=0;i<4;i++) | |
1263 | { | |
1264 | if(dVn[i]>=0.) | |
1265 | { | |
1266 | cout<<" v_"<<n<<"{"<<2*(i+1)<<"} = "<<dVn[i]<<" +/- "<<dVnErr[i]<<endl; | |
1267 | } | |
1268 | else | |
1269 | { | |
1270 | cout<<" v_"<<n<<"{"<<2*(i+1)<<"} = Im"<<endl; | |
1271 | } | |
1272 | } | |
1273 | ||
1274 | cout<<endl; | |
1275 | /* | |
1276 | if(type == "NONAME") | |
1277 | { | |
1278 | cout<<" nEvts = "<<nEvtsNoName<<", AvM = "<<dMultNoName<<endl; // to be improved | |
1279 | } | |
1280 | else if (type == "RP") | |
1281 | { | |
1282 | cout<<" nEvts = "<<nEvtsRP<<", AvM = "<<dMultRP<<endl; // to be improved | |
1283 | } | |
1284 | else if (type == "POI") | |
1285 | { | |
1286 | cout<<" nEvts = "<<nEvtsPOI<<", AvM = "<<dMultPOI<<endl; // to be improved | |
1287 | } | |
1288 | */ | |
1289 | cout<<"*************************************"<<endl; | |
1290 | cout<<"*************************************"<<endl; | |
1291 | cout<<endl; | |
1292 | ||
1293 | }// end of AliFlowAnalysisWithQCumulants::PrintFinalResultsForIntegratedFlow(TString type="NONAME"); | |
1294 | ||
1295 | ||
1296 | //================================================================================================================================ | |
1297 | ||
1298 | ||
1299 | void AliFlowAnalysisWithQCumulants::WriteHistograms(TString outputFileName) | |
1300 | { | |
1301 | //store the final results in output .root file | |
1302 | TFile *output = new TFile(outputFileName.Data(),"RECREATE"); | |
1303 | //output->WriteObject(fHistList, "cobjQC","SingleKey"); | |
1304 | fHistList->Write(fHistList->GetName(), TObject::kSingleKey); | |
1305 | delete output; | |
1306 | } | |
1307 | ||
1308 | ||
1309 | //================================================================================================================================ | |
1310 | ||
1311 | ||
1312 | void AliFlowAnalysisWithQCumulants::WriteHistograms(TDirectoryFile *outputFileName) | |
1313 | { | |
1314 | //store the final results in output .root file | |
1315 | fHistList->SetName("cobjQC"); | |
1316 | fHistList->SetOwner(kTRUE); | |
1317 | outputFileName->Add(fHistList); | |
1318 | outputFileName->Write(outputFileName->GetName(), TObject::kSingleKey); | |
1319 | } | |
1320 | ||
1321 | ||
1322 | //================================================================================================================================ | |
1323 | ||
1324 | ||
1325 | void AliFlowAnalysisWithQCumulants::BookCommonHistograms() | |
1326 | { | |
1327 | // Book common control histograms and common histograms for final results. | |
1328 | // common control histogram (ALL events) | |
1329 | TString commonHistsName = "AliFlowCommonHistQC"; | |
1330 | commonHistsName += fAnalysisLabel->Data(); | |
1331 | fCommonHists = new AliFlowCommonHist(commonHistsName.Data()); | |
1332 | fHistList->Add(fCommonHists); | |
1333 | // common control histogram (for events with 2 and more particles) | |
1334 | TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC"; | |
1335 | commonHists2ndOrderName += fAnalysisLabel->Data(); | |
1336 | fCommonHists2nd = new AliFlowCommonHist(commonHists2ndOrderName.Data()); | |
1337 | fHistList->Add(fCommonHists2nd); | |
1338 | // common control histogram (for events with 4 and more particles) | |
1339 | TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC"; | |
1340 | commonHists4thOrderName += fAnalysisLabel->Data(); | |
1341 | fCommonHists4th = new AliFlowCommonHist(commonHists4thOrderName.Data()); | |
1342 | fHistList->Add(fCommonHists4th); | |
1343 | // common control histogram (for events with 6 and more particles) | |
1344 | TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC"; | |
1345 | commonHists6thOrderName += fAnalysisLabel->Data(); | |
1346 | fCommonHists6th = new AliFlowCommonHist(commonHists6thOrderName.Data()); | |
1347 | fHistList->Add(fCommonHists6th); | |
1348 | // common control histogram (for events with 8 and more particles) | |
1349 | TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC"; | |
1350 | commonHists8thOrderName += fAnalysisLabel->Data(); | |
1351 | fCommonHists8th = new AliFlowCommonHist(commonHists8thOrderName.Data()); | |
1352 | fHistList->Add(fCommonHists8th); | |
1353 | // common histograms for final results (calculated for events with 2 and more particles) | |
1354 | TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC"; | |
1355 | commonHistResults2ndOrderName += fAnalysisLabel->Data(); | |
1356 | fCommonHistsResults2nd = new AliFlowCommonHistResults(commonHistResults2ndOrderName.Data()); | |
1357 | fHistList->Add(fCommonHistsResults2nd); | |
1358 | // common histograms for final results (calculated for events with 4 and more particles) | |
1359 | TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC"; | |
1360 | commonHistResults4thOrderName += fAnalysisLabel->Data(); | |
1361 | fCommonHistsResults4th = new AliFlowCommonHistResults(commonHistResults4thOrderName.Data()); | |
1362 | fHistList->Add(fCommonHistsResults4th); | |
1363 | // common histograms for final results (calculated for events with 6 and more particles) | |
1364 | TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC"; | |
1365 | commonHistResults6thOrderName += fAnalysisLabel->Data(); | |
1366 | fCommonHistsResults6th = new AliFlowCommonHistResults(commonHistResults6thOrderName.Data()); | |
1367 | fHistList->Add(fCommonHistsResults6th); | |
1368 | // common histograms for final results (calculated for events with 8 and more particles) | |
1369 | TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC"; | |
1370 | commonHistResults8thOrderName += fAnalysisLabel->Data(); | |
1371 | fCommonHistsResults8th = new AliFlowCommonHistResults(commonHistResults8thOrderName.Data()); | |
1372 | fHistList->Add(fCommonHistsResults8th); | |
1373 | ||
1374 | } // end of void AliFlowAnalysisWithQCumulants::BookCommonHistograms() | |
1375 | ||
1376 | ||
1377 | //================================================================================================================================ | |
1378 | ||
1379 | ||
1380 | void AliFlowAnalysisWithQCumulants::BookAndFillWeightsHistograms() | |
1381 | { | |
1382 | // book and fill histograms which hold phi, pt and eta weights | |
1383 | ||
1384 | if(!fWeightsList) | |
1385 | { | |
1386 | cout<<"WARNING: fWeightsList is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1387 | exit(0); | |
1388 | } | |
1389 | ||
1390 | TString fUseParticleWeightsName = "fUseParticleWeightsQC"; | |
1391 | fUseParticleWeightsName += fAnalysisLabel->Data(); | |
1392 | fUseParticleWeights = new TProfile(fUseParticleWeightsName.Data(),"0 = particle weight not used, 1 = particle weight used ",3,0,3); | |
1393 | fUseParticleWeights->SetLabelSize(0.06); | |
1394 | (fUseParticleWeights->GetXaxis())->SetBinLabel(1,"w_{#phi}"); | |
1395 | (fUseParticleWeights->GetXaxis())->SetBinLabel(2,"w_{p_{T}}"); | |
1396 | (fUseParticleWeights->GetXaxis())->SetBinLabel(3,"w_{#eta}"); | |
1397 | fUseParticleWeights->Fill(0.5,(Int_t)fUsePhiWeights); | |
1398 | fUseParticleWeights->Fill(1.5,(Int_t)fUsePtWeights); | |
1399 | fUseParticleWeights->Fill(2.5,(Int_t)fUseEtaWeights); | |
1400 | fWeightsList->Add(fUseParticleWeights); | |
1401 | ||
1402 | if(fUsePhiWeights) | |
1403 | { | |
1404 | if(fWeightsList->FindObject("phi_weights")) | |
1405 | { | |
1406 | fPhiWeights = dynamic_cast<TH1F*>(fWeightsList->FindObject("phi_weights")); | |
1407 | if(TMath::Abs(fPhiWeights->GetBinWidth(1)-fPhiBinWidth)>pow(10.,-6.)) | |
1408 | { | |
1409 | cout<<endl; | |
1410 | cout<<"WARNING (QC): Inconsistent binning in histograms for phi-weights throughout the code."<<endl; | |
1411 | cout<<endl; | |
1412 | exit(0); | |
1413 | } | |
1414 | } else | |
1415 | { | |
1416 | cout<<"WARNING: fWeightsList->FindObject(\"phi_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1417 | exit(0); | |
1418 | } | |
1419 | } // end of if(fUsePhiWeights) | |
1420 | ||
1421 | if(fUsePtWeights) | |
1422 | { | |
1423 | if(fWeightsList->FindObject("pt_weights")) | |
1424 | { | |
1425 | fPtWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("pt_weights")); | |
1426 | if(TMath::Abs(fPtWeights->GetBinWidth(1)-fPtBinWidth)>pow(10.,-6.)) | |
1427 | { | |
1428 | cout<<endl; | |
1429 | cout<<"WARNING (QC): Inconsistent binning in histograms for pt-weights throughout the code."<<endl; | |
1430 | cout<<endl; | |
1431 | exit(0); | |
1432 | } | |
1433 | } else | |
1434 | { | |
1435 | cout<<"WARNING: fWeightsList->FindObject(\"pt_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1436 | exit(0); | |
1437 | } | |
1438 | } // end of if(fUsePtWeights) | |
1439 | ||
1440 | if(fUseEtaWeights) | |
1441 | { | |
1442 | if(fWeightsList->FindObject("eta_weights")) | |
1443 | { | |
1444 | fEtaWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("eta_weights")); | |
1445 | if(TMath::Abs(fEtaWeights->GetBinWidth(1)-fEtaBinWidth)>pow(10.,-6.)) | |
1446 | { | |
1447 | cout<<endl; | |
1448 | cout<<"WARNING (QC): Inconsistent binning in histograms for eta-weights throughout the code."<<endl; | |
1449 | cout<<endl; | |
1450 | exit(0); | |
1451 | } | |
1452 | } else | |
1453 | { | |
1454 | cout<<"WARNING: fUseEtaWeights && fWeightsList->FindObject(\"eta_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1455 | exit(0); | |
1456 | } | |
1457 | } // end of if(fUseEtaWeights) | |
1458 | ||
1459 | } // end of AliFlowAnalysisWithQCumulants::BookAndFillWeightsHistograms() | |
1460 | ||
1461 | ||
1462 | //================================================================================================================================ | |
1463 | ||
1464 | ||
1465 | void AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow() | |
1466 | { | |
1467 | // Book all objects for integrated flow: | |
1468 | // a) Book profile to hold all flags for integrated flow. | |
1469 | // b) Book event-by-event quantities. | |
1470 | // c) Book profiles. // to be improved (comment) | |
1471 | // d) Book histograms holding the final results. | |
1472 | ||
1473 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
1474 | TString powerFlag[2] = {"linear","quadratic"}; // to be improved (should I promote this to data members?) | |
1475 | ||
1476 | // a) Book profile to hold all flags for integrated flow: | |
1477 | TString intFlowFlagsName = "fIntFlowFlags"; | |
1478 | intFlowFlagsName += fAnalysisLabel->Data(); | |
1479 | fIntFlowFlags = new TProfile(intFlowFlagsName.Data(),"Flags for Integrated Flow",6,0,6); | |
1480 | fIntFlowFlags->SetTickLength(-0.01,"Y"); | |
1481 | fIntFlowFlags->SetMarkerStyle(25); | |
1482 | fIntFlowFlags->SetLabelSize(0.05); | |
1483 | fIntFlowFlags->SetLabelOffset(0.02,"Y"); | |
1484 | fIntFlowFlags->GetXaxis()->SetBinLabel(1,"Particle Weights"); | |
1485 | fIntFlowFlags->GetXaxis()->SetBinLabel(2,"Event Weights"); | |
1486 | fIntFlowFlags->GetXaxis()->SetBinLabel(3,"Corrected for NUA?"); | |
1487 | fIntFlowFlags->GetXaxis()->SetBinLabel(4,"Print NONAME results"); | |
1488 | fIntFlowFlags->GetXaxis()->SetBinLabel(5,"Print RP results"); | |
3b552efe | 1489 | fIntFlowFlags->GetXaxis()->SetBinLabel(6,"Print POI results"); |
489d5531 | 1490 | fIntFlowList->Add(fIntFlowFlags); |
1491 | ||
1492 | // b) Book event-by-event quantities: | |
1493 | // Re[Q_{m*n,k}], Im[Q_{m*n,k}] and S_{p,k}^M: | |
1494 | fReQ = new TMatrixD(4,9); | |
1495 | fImQ = new TMatrixD(4,9); | |
1496 | fSMpk = new TMatrixD(8,9); | |
1497 | // average correlations <2>, <4>, <6> and <8> for single event (bining is the same as in fIntFlowCorrelationsPro and fIntFlowCorrelationsHist): | |
1498 | TString intFlowCorrelationsEBEName = "fIntFlowCorrelationsEBE"; | |
1499 | intFlowCorrelationsEBEName += fAnalysisLabel->Data(); | |
1500 | fIntFlowCorrelationsEBE = new TH1D(intFlowCorrelationsEBEName.Data(),intFlowCorrelationsEBEName.Data(),4,0,4); | |
1501 | // weights for average correlations <2>, <4>, <6> and <8> for single event: | |
1502 | TString intFlowEventWeightsForCorrelationsEBEName = "fIntFlowEventWeightsForCorrelationsEBE"; | |
1503 | intFlowEventWeightsForCorrelationsEBEName += fAnalysisLabel->Data(); | |
1504 | fIntFlowEventWeightsForCorrelationsEBE = new TH1D(intFlowEventWeightsForCorrelationsEBEName.Data(),intFlowEventWeightsForCorrelationsEBEName.Data(),4,0,4); | |
1505 | // average all correlations for single event (bining is the same as in fIntFlowCorrelationsAllPro and fIntFlowCorrelationsAllHist): | |
1506 | TString intFlowCorrelationsAllEBEName = "fIntFlowCorrelationsAllEBE"; | |
1507 | intFlowCorrelationsAllEBEName += fAnalysisLabel->Data(); | |
1508 | fIntFlowCorrelationsAllEBE = new TH1D(intFlowCorrelationsAllEBEName.Data(),intFlowCorrelationsAllEBEName.Data(),32,0,32); | |
1509 | // average correction terms for non-uniform acceptance for single event | |
1510 | // (binning is the same as in fIntFlowCorrectionTermsForNUAPro[2] and fIntFlowCorrectionTermsForNUAHist[2]): | |
1511 | TString fIntFlowCorrectionTermsForNUAEBEName = "fIntFlowCorrectionTermsForNUAEBE"; | |
1512 | fIntFlowCorrectionTermsForNUAEBEName += fAnalysisLabel->Data(); | |
1513 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1514 | { | |
1515 | 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); | |
1516 | } | |
0328db2d | 1517 | // event weights for terms for non-uniform acceptance: |
1518 | TString fIntFlowEventWeightForCorrectionTermsForNUAEBEName = "fIntFlowEventWeightForCorrectionTermsForNUAEBE"; | |
1519 | fIntFlowEventWeightForCorrectionTermsForNUAEBEName += fAnalysisLabel->Data(); | |
1520 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1521 | { | |
1522 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc] = new TH1D(Form("%s: %s terms",fIntFlowEventWeightForCorrectionTermsForNUAEBEName.Data(),sinCosFlag[sc].Data()),Form("Event weights for terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),10,0,10); | |
1523 | } | |
489d5531 | 1524 | // c) Book profiles: // to be improved (comment) |
1525 | // profile to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8: | |
1526 | TString avMultiplicityName = "fAvMultiplicity"; | |
1527 | avMultiplicityName += fAnalysisLabel->Data(); | |
1528 | fAvMultiplicity = new TProfile(avMultiplicityName.Data(),"Average Multiplicities of RPs",9,0,9); | |
1529 | fAvMultiplicity->SetTickLength(-0.01,"Y"); | |
1530 | fAvMultiplicity->SetMarkerStyle(25); | |
1531 | fAvMultiplicity->SetLabelSize(0.05); | |
1532 | fAvMultiplicity->SetLabelOffset(0.02,"Y"); | |
1533 | fAvMultiplicity->SetYTitle("Average Multiplicity"); | |
1534 | (fAvMultiplicity->GetXaxis())->SetBinLabel(1,"all evts"); | |
1535 | (fAvMultiplicity->GetXaxis())->SetBinLabel(2,"n_{RP} #geq 1"); | |
1536 | (fAvMultiplicity->GetXaxis())->SetBinLabel(3,"n_{RP} #geq 2"); | |
1537 | (fAvMultiplicity->GetXaxis())->SetBinLabel(4,"n_{RP} #geq 3"); | |
1538 | (fAvMultiplicity->GetXaxis())->SetBinLabel(5,"n_{RP} #geq 4"); | |
1539 | (fAvMultiplicity->GetXaxis())->SetBinLabel(6,"n_{RP} #geq 5"); | |
1540 | (fAvMultiplicity->GetXaxis())->SetBinLabel(7,"n_{RP} #geq 6"); | |
1541 | (fAvMultiplicity->GetXaxis())->SetBinLabel(8,"n_{RP} #geq 7"); | |
1542 | (fAvMultiplicity->GetXaxis())->SetBinLabel(9,"n_{RP} #geq 8"); | |
1543 | fIntFlowProfiles->Add(fAvMultiplicity); | |
1544 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with wrong errors!): | |
1545 | TString intFlowCorrelationsProName = "fIntFlowCorrelationsPro"; | |
1546 | intFlowCorrelationsProName += fAnalysisLabel->Data(); | |
1547 | fIntFlowCorrelationsPro = new TProfile(intFlowCorrelationsProName.Data(),"Average correlations for all events",4,0,4,"s"); | |
1548 | fIntFlowCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1549 | fIntFlowCorrelationsPro->SetMarkerStyle(25); | |
1550 | fIntFlowCorrelationsPro->SetLabelSize(0.06); | |
1551 | fIntFlowCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
1552 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<2>>"); | |
1553 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<4>>"); | |
1554 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(3,"<<6>>"); | |
1555 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(4,"<<8>>"); | |
1556 | fIntFlowProfiles->Add(fIntFlowCorrelationsPro); | |
ff70ca91 | 1557 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> versus multiplicity for all events (error is biased estimator): |
1558 | TString correlationFlag[4] = {"<<2>>","<<4>>","<<6>>","<<8>>"}; | |
ff70ca91 | 1559 | for(Int_t ci=0;ci<4;ci++) // correlation index |
1560 | { | |
1561 | TString intFlowCorrelationsVsMProName = "fIntFlowCorrelationsVsMPro"; | |
1562 | intFlowCorrelationsVsMProName += fAnalysisLabel->Data(); | |
1563 | fIntFlowCorrelationsVsMPro[ci] = new TProfile(Form("%s, %s",intFlowCorrelationsVsMProName.Data(),correlationFlag[ci].Data()), | |
1564 | Form("%s vs multiplicity",correlationFlag[ci].Data()), | |
9da1a4f3 | 1565 | fnBinsMult,fMinMult,fMaxMult,"s"); |
ff70ca91 | 1566 | fIntFlowCorrelationsVsMPro[ci]->GetYaxis()->SetTitle(correlationFlag[ci].Data()); |
1567 | fIntFlowCorrelationsVsMPro[ci]->GetXaxis()->SetTitle("M"); | |
1568 | fIntFlowProfiles->Add(fIntFlowCorrelationsVsMPro[ci]); | |
1569 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
489d5531 | 1570 | // averaged all correlations for all events (with wrong errors!): |
1571 | TString intFlowCorrelationsAllProName = "fIntFlowCorrelationsAllPro"; | |
1572 | intFlowCorrelationsAllProName += fAnalysisLabel->Data(); | |
1573 | fIntFlowCorrelationsAllPro = new TProfile(intFlowCorrelationsAllProName.Data(),"Average correlations for all events",32,0,32,"s"); | |
1574 | fIntFlowCorrelationsAllPro->SetTickLength(-0.01,"Y"); | |
1575 | fIntFlowCorrelationsAllPro->SetMarkerStyle(25); | |
1576 | fIntFlowCorrelationsAllPro->SetLabelSize(0.03); | |
1577 | fIntFlowCorrelationsAllPro->SetLabelOffset(0.01,"Y"); | |
1578 | // 2-p correlations: | |
1579 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}"); | |
1580 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}"); | |
1581 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}"); | |
1582 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}"); | |
1583 | // 3-p correlations: | |
1584 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}"); | |
1585 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}"); | |
1586 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}"); | |
1587 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}"); | |
1588 | // 4-p correlations: | |
1589 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}"); | |
1590 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}"); | |
1591 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}"); | |
1592 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}"); | |
1593 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}"); | |
1594 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}"); | |
1595 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}"); | |
1596 | // 5-p correlations: | |
1597 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}"); | |
1598 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}"); | |
1599 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}"); | |
1600 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}"); | |
1601 | // 6-p correlations: | |
1602 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}"); | |
1603 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}"); | |
1604 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}"); | |
1605 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}"); | |
1606 | // 7-p correlations: | |
1607 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}"); | |
1608 | // 8-p correlations: | |
1609 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}"); | |
1610 | fIntFlowProfiles->Add(fIntFlowCorrelationsAllPro); | |
1611 | // when particle weights are used some extra correlations appear: | |
1612 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
1613 | { | |
1614 | TString intFlowExtraCorrelationsProName = "fIntFlowExtraCorrelationsPro"; | |
1615 | intFlowExtraCorrelationsProName += fAnalysisLabel->Data(); | |
1616 | fIntFlowExtraCorrelationsPro = new TProfile(intFlowExtraCorrelationsProName.Data(),"Average extra correlations for all events",100,0,100,"s"); | |
1617 | fIntFlowExtraCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1618 | fIntFlowExtraCorrelationsPro->SetMarkerStyle(25); | |
1619 | fIntFlowExtraCorrelationsPro->SetLabelSize(0.03); | |
1620 | fIntFlowExtraCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
1621 | // extra 2-p correlations: | |
1622 | (fIntFlowExtraCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<w1^3 w2 cos(n*(phi1-phi2))>>"); | |
1623 | (fIntFlowExtraCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<w1 w2 w3^2 cos(n*(phi1-phi2))>>"); | |
1624 | fIntFlowProfiles->Add(fIntFlowExtraCorrelationsPro); | |
1625 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
1626 | // average product of correlations <2>, <4>, <6> and <8>: | |
1627 | TString intFlowProductOfCorrelationsProName = "fIntFlowProductOfCorrelationsPro"; | |
1628 | intFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
1629 | fIntFlowProductOfCorrelationsPro = new TProfile(intFlowProductOfCorrelationsProName.Data(),"Average products of correlations",6,0,6); | |
1630 | fIntFlowProductOfCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1631 | fIntFlowProductOfCorrelationsPro->SetMarkerStyle(25); | |
1632 | fIntFlowProductOfCorrelationsPro->SetLabelSize(0.05); | |
1633 | fIntFlowProductOfCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
1634 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<2><4>>"); | |
1635 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<2><6>>"); | |
1636 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(3,"<<2><8>>"); | |
1637 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(4,"<<4><6>>"); | |
1638 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(5,"<<4><8>>"); | |
1639 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(6,"<<6><8>>"); | |
1640 | fIntFlowProfiles->Add(fIntFlowProductOfCorrelationsPro); | |
ff70ca91 | 1641 | // average product of correlations <2>, <4>, <6> and <8> versus multiplicity |
1642 | // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>] | |
1643 | TString intFlowProductOfCorrelationsVsMProName = "fIntFlowProductOfCorrelationsVsMPro"; | |
1644 | intFlowProductOfCorrelationsVsMProName += fAnalysisLabel->Data(); | |
1645 | TString productFlag[6] = {"<<2><4>>","<<2><6>>","<<2><8>>","<<4><6>>","<<4><8>>","<<6><8>>"}; | |
1646 | for(Int_t pi=0;pi<6;pi++) | |
1647 | { | |
1648 | fIntFlowProductOfCorrelationsVsMPro[pi] = new TProfile(Form("%s, %s",intFlowProductOfCorrelationsVsMProName.Data(),productFlag[pi].Data()), | |
1649 | Form("%s versus multiplicity",productFlag[pi].Data()), | |
9da1a4f3 | 1650 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1651 | fIntFlowProductOfCorrelationsVsMPro[pi]->GetXaxis()->SetTitle("M"); |
1652 | fIntFlowProfiles->Add(fIntFlowProductOfCorrelationsVsMPro[pi]); | |
1653 | } // end of for(Int_t pi=0;pi<6;pi++) | |
0328db2d | 1654 | // average product of correction terms for NUA: |
1655 | TString intFlowProductOfCorrectionTermsForNUAProName = "fIntFlowProductOfCorrectionTermsForNUAPro"; | |
1656 | intFlowProductOfCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
1657 | fIntFlowProductOfCorrectionTermsForNUAPro = new TProfile(intFlowProductOfCorrectionTermsForNUAProName.Data(),"Average products of correction terms for NUA",27,0,27); | |
1658 | fIntFlowProductOfCorrectionTermsForNUAPro->SetTickLength(-0.01,"Y"); | |
1659 | fIntFlowProductOfCorrectionTermsForNUAPro->SetMarkerStyle(25); | |
1660 | fIntFlowProductOfCorrectionTermsForNUAPro->SetLabelSize(0.05); | |
1661 | fIntFlowProductOfCorrectionTermsForNUAPro->SetLabelOffset(0.01,"Y"); | |
1662 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(1,"<<2><cos(#phi)>>"); | |
1663 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(2,"<<2><sin(#phi)>>"); | |
1664 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(3,"<<cos(#phi)><sin(#phi)>>"); | |
1665 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(4,"Cov(<2>,<cos(#phi_{1}+#phi_{2})>)"); | |
1666 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(5,"Cov(<2>,<sin(#phi_{1}+#phi_{2})>)"); | |
1667 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(6,"Cov(<2>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1668 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(7,"Cov(<2>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1669 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(8,"Cov(<4>,<cos(#phi)>)"); | |
1670 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(9,"Cov(<4>,<sin(#phi)>)"); | |
1671 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(10,"Cov(<4>,<cos(#phi_{1}+#phi_{2})>)"); | |
1672 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(11,"Cov(<4>,<sin(#phi_{1}+#phi_{2})>)"); | |
1673 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(12,"Cov(<4>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1674 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(13,"Cov(<4>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1675 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(14,"Cov(<cos(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1676 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(15,"Cov(<cos(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1677 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(16,"Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1678 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(17,"Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1679 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(18,"Cov(<sin(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1680 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(19,"Cov(<sin(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1681 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(20,"Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1682 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(21,"Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1683 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(22,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>)"); | |
1684 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(23,"Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1685 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(24,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1686 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(25,"Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1687 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(26,"Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1688 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(27,"Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>)"); | |
1689 | fIntFlowProfiles->Add(fIntFlowProductOfCorrectionTermsForNUAPro); | |
489d5531 | 1690 | // average correction terms for non-uniform acceptance (with wrong errors!): |
1691 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1692 | { | |
1693 | TString intFlowCorrectionTermsForNUAProName = "fIntFlowCorrectionTermsForNUAPro"; | |
1694 | intFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
1695 | 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"); | |
1696 | fIntFlowCorrectionTermsForNUAPro[sc]->SetTickLength(-0.01,"Y"); | |
1697 | fIntFlowCorrectionTermsForNUAPro[sc]->SetMarkerStyle(25); | |
1698 | fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelSize(0.03); | |
1699 | fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelOffset(0.01,"Y"); | |
1700 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(1,Form("<<%s(n(phi1))>>",sinCosFlag[sc].Data())); | |
1701 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(2,Form("<<%s(n(phi1+phi2))>>",sinCosFlag[sc].Data())); | |
1702 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(3,Form("<<%s(n(phi1-phi2-phi3))>>",sinCosFlag[sc].Data())); | |
1703 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(4,Form("<<%s(n(2phi1-phi2))>>",sinCosFlag[sc].Data())); | |
1704 | fIntFlowProfiles->Add(fIntFlowCorrectionTermsForNUAPro[sc]); | |
1705 | } // end of for(Int_t sc=0;sc<2;sc++) | |
1706 | ||
1707 | // d) Book histograms holding the final results: | |
1708 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with correct errors!): | |
1709 | TString intFlowCorrelationsHistName = "fIntFlowCorrelationsHist"; | |
1710 | intFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
1711 | fIntFlowCorrelationsHist = new TH1D(intFlowCorrelationsHistName.Data(),"Average correlations for all events",4,0,4); | |
1712 | fIntFlowCorrelationsHist->SetTickLength(-0.01,"Y"); | |
1713 | fIntFlowCorrelationsHist->SetMarkerStyle(25); | |
1714 | fIntFlowCorrelationsHist->SetLabelSize(0.06); | |
1715 | fIntFlowCorrelationsHist->SetLabelOffset(0.01,"Y"); | |
1716 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(1,"<<2>>"); | |
1717 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(2,"<<4>>"); | |
1718 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(3,"<<6>>"); | |
1719 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(4,"<<8>>"); | |
1720 | fIntFlowResults->Add(fIntFlowCorrelationsHist); | |
ff70ca91 | 1721 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with correct errors!) vs M: |
1722 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
1723 | { | |
1724 | TString intFlowCorrelationsVsMHistName = "fIntFlowCorrelationsVsMHist"; | |
1725 | intFlowCorrelationsVsMHistName += fAnalysisLabel->Data(); | |
1726 | fIntFlowCorrelationsVsMHist[ci] = new TH1D(Form("%s, %s",intFlowCorrelationsVsMHistName.Data(),correlationFlag[ci].Data()), | |
1727 | Form("%s vs multiplicity",correlationFlag[ci].Data()), | |
9da1a4f3 | 1728 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1729 | fIntFlowCorrelationsVsMHist[ci]->GetYaxis()->SetTitle(correlationFlag[ci].Data()); |
1730 | fIntFlowCorrelationsVsMHist[ci]->GetXaxis()->SetTitle("M"); | |
1731 | fIntFlowResults->Add(fIntFlowCorrelationsVsMHist[ci]); | |
1732 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
489d5531 | 1733 | // average all correlations for all events (with correct errors!): |
1734 | TString intFlowCorrelationsAllHistName = "fIntFlowCorrelationsAllHist"; | |
1735 | intFlowCorrelationsAllHistName += fAnalysisLabel->Data(); | |
1736 | fIntFlowCorrelationsAllHist = new TH1D(intFlowCorrelationsAllHistName.Data(),"Average correlations for all events",32,0,32); | |
1737 | fIntFlowCorrelationsAllHist->SetTickLength(-0.01,"Y"); | |
1738 | fIntFlowCorrelationsAllHist->SetMarkerStyle(25); | |
1739 | fIntFlowCorrelationsAllHist->SetLabelSize(0.03); | |
1740 | fIntFlowCorrelationsAllHist->SetLabelOffset(0.01,"Y"); | |
1741 | // 2-p correlations: | |
1742 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}"); | |
1743 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}"); | |
1744 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}"); | |
1745 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}"); | |
1746 | // 3-p correlations: | |
1747 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}"); | |
1748 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}"); | |
1749 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}"); | |
1750 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}"); | |
1751 | // 4-p correlations: | |
1752 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}"); | |
1753 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}"); | |
1754 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}"); | |
1755 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}"); | |
1756 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}"); | |
1757 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}"); | |
1758 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}"); | |
1759 | // 5-p correlations: | |
1760 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}"); | |
1761 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}"); | |
1762 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}"); | |
1763 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}"); | |
1764 | // 6-p correlations: | |
1765 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}"); | |
1766 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}"); | |
1767 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}"); | |
1768 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}"); | |
1769 | // 7-p correlations: | |
1770 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}"); | |
1771 | // 8-p correlations: | |
1772 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}"); | |
1773 | fIntFlowResults->Add(fIntFlowCorrelationsAllHist); | |
1774 | // average correction terms for non-uniform acceptance (with correct errors!): | |
1775 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1776 | { | |
1777 | TString intFlowCorrectionTermsForNUAHistName = "fIntFlowCorrectionTermsForNUAHist"; | |
1778 | intFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
1779 | 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); | |
1780 | fIntFlowCorrectionTermsForNUAHist[sc]->SetTickLength(-0.01,"Y"); | |
1781 | fIntFlowCorrectionTermsForNUAHist[sc]->SetMarkerStyle(25); | |
1782 | fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelSize(0.03); | |
1783 | fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelOffset(0.01,"Y"); | |
1784 | // ......................................................................... | |
1785 | // 1-p terms: | |
1786 | (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(1,Form("%s(n(#phi_{1}))>",sinCosFlag[sc].Data())); | |
1787 | // 2-p terms: | |
1788 | // 3-p terms: | |
1789 | // ... | |
1790 | // ......................................................................... | |
1791 | fIntFlowResults->Add(fIntFlowCorrectionTermsForNUAHist[sc]); | |
1792 | } // end of for(Int_t sc=0;sc<2;sc++) | |
1793 | // covariances (multiplied with weight dependent prefactor): | |
1794 | TString intFlowCovariancesName = "fIntFlowCovariances"; | |
1795 | intFlowCovariancesName += fAnalysisLabel->Data(); | |
1796 | fIntFlowCovariances = new TH1D(intFlowCovariancesName.Data(),"Covariances (multiplied with weight dependent prefactor)",6,0,6); | |
1797 | fIntFlowCovariances->SetLabelSize(0.04); | |
1798 | fIntFlowCovariances->SetMarkerStyle(25); | |
1799 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(1,"Cov(<2>,<4>)"); | |
1800 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(2,"Cov(<2>,<6>)"); | |
1801 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(3,"Cov(<2>,<8>)"); | |
1802 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(4,"Cov(<4>,<6>)"); | |
1803 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(5,"Cov(<4>,<8>)"); | |
1804 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(6,"Cov(<6>,<8>)"); | |
1805 | fIntFlowResults->Add(fIntFlowCovariances); | |
1806 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>: | |
1807 | TString intFlowSumOfEventWeightsName = "fIntFlowSumOfEventWeights"; | |
1808 | intFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
1809 | for(Int_t power=0;power<2;power++) | |
1810 | { | |
1811 | 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); | |
1812 | fIntFlowSumOfEventWeights[power]->SetLabelSize(0.05); | |
1813 | fIntFlowSumOfEventWeights[power]->SetMarkerStyle(25); | |
1814 | if(power == 0) | |
1815 | { | |
1816 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>}"); | |
1817 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<4>}"); | |
1818 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<6>}"); | |
1819 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<8>}"); | |
1820 | } else if (power == 1) | |
1821 | { | |
1822 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>}^{2}"); | |
1823 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<4>}^{2}"); | |
1824 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<6>}^{2}"); | |
1825 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<8>}^{2}"); | |
1826 | } | |
1827 | fIntFlowResults->Add(fIntFlowSumOfEventWeights[power]); | |
1828 | } | |
1829 | // sum of products of event weights for correlations <2>, <4>, <6> and <8>: | |
1830 | TString intFlowSumOfProductOfEventWeightsName = "fIntFlowSumOfProductOfEventWeights"; | |
1831 | intFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
1832 | fIntFlowSumOfProductOfEventWeights = new TH1D(intFlowSumOfProductOfEventWeightsName.Data(),"Sum of product of event weights for correlations",6,0,6); | |
1833 | fIntFlowSumOfProductOfEventWeights->SetLabelSize(0.05); | |
1834 | fIntFlowSumOfProductOfEventWeights->SetMarkerStyle(25); | |
1835 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>} w_{<4>}"); | |
1836 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<2>} w_{<6>}"); | |
1837 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<2>} w_{<8>}"); | |
1838 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<4>} w_{<6>}"); | |
1839 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(5,"#sum_{i=1}^{N} w_{<4>} w_{<8>}"); | |
1840 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(6,"#sum_{i=1}^{N} w_{<6>} w_{<8>}"); | |
1841 | fIntFlowResults->Add(fIntFlowSumOfProductOfEventWeights); | |
ff70ca91 | 1842 | // final result for covariances of correlations (multiplied with weight dependent prefactor) versus M |
1843 | // [0=Cov(2,4),1=Cov(2,6),2=Cov(2,8),3=Cov(4,6),4=Cov(4,8),5=Cov(6,8)]: | |
1844 | TString intFlowCovariancesVsMName = "fIntFlowCovariancesVsM"; | |
1845 | intFlowCovariancesVsMName += fAnalysisLabel->Data(); | |
1846 | TString covarianceFlag[6] = {"Cov(<2>,<4>)","Cov(<2>,<6>)","Cov(<2>,<8>)","Cov(<4>,<6>)","Cov(<4>,<8>)","Cov(<6>,<8>)"}; | |
1847 | for(Int_t ci=0;ci<6;ci++) | |
1848 | { | |
1849 | fIntFlowCovariancesVsM[ci] = new TH1D(Form("%s, %s",intFlowCovariancesVsMName.Data(),covarianceFlag[ci].Data()), | |
1850 | Form("%s vs multiplicity",covarianceFlag[ci].Data()), | |
9da1a4f3 | 1851 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1852 | fIntFlowCovariancesVsM[ci]->GetYaxis()->SetTitle(covarianceFlag[ci].Data()); |
1853 | fIntFlowCovariancesVsM[ci]->GetXaxis()->SetTitle("M"); | |
1854 | fIntFlowResults->Add(fIntFlowCovariancesVsM[ci]); | |
1855 | } | |
1856 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8> versus multiplicity | |
1857 | // [0=sum{w_{<2>}},1=sum{w_{<4>}},2=sum{w_{<6>}},3=sum{w_{<8>}}][0=linear 1,1=quadratic]: | |
1858 | TString intFlowSumOfEventWeightsVsMName = "fIntFlowSumOfEventWeightsVsM"; | |
1859 | intFlowSumOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
1860 | TString sumFlag[2][4] = {{"#sum_{i=1}^{N} w_{<2>}","#sum_{i=1}^{N} w_{<4>}","#sum_{i=1}^{N} w_{<6>}","#sum_{i=1}^{N} w_{<8>}"}, | |
1861 | {"#sum_{i=1}^{N} w_{<2>}^{2}","#sum_{i=1}^{N} w_{<4>}^{2}","#sum_{i=1}^{N} w_{<6>}^{2}","#sum_{i=1}^{N} w_{<8>}^{2}"}}; | |
1862 | for(Int_t si=0;si<4;si++) | |
1863 | { | |
1864 | for(Int_t power=0;power<2;power++) | |
1865 | { | |
1866 | fIntFlowSumOfEventWeightsVsM[si][power] = new TH1D(Form("%s, %s",intFlowSumOfEventWeightsVsMName.Data(),sumFlag[power][si].Data()), | |
1867 | Form("%s vs multiplicity",sumFlag[power][si].Data()), | |
9da1a4f3 | 1868 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1869 | fIntFlowSumOfEventWeightsVsM[si][power]->GetYaxis()->SetTitle(sumFlag[power][si].Data()); |
1870 | fIntFlowSumOfEventWeightsVsM[si][power]->GetXaxis()->SetTitle("M"); | |
1871 | fIntFlowResults->Add(fIntFlowSumOfEventWeightsVsM[si][power]); | |
1872 | } // end of for(Int_t power=0;power<2;power++) | |
1873 | } // end of for(Int_t si=0;si<4;si++) | |
1874 | // sum of products of event weights for correlations <2>, <4>, <6> and <8> vs M | |
1875 | // [0=sum{w_{<2>}w_{<4>}},1=sum{w_{<2>}w_{<6>}},2=sum{w_{<2>}w_{<8>}}, | |
1876 | // 3=sum{w_{<4>}w_{<6>}},4=sum{w_{<4>}w_{<8>}},5=sum{w_{<6>}w_{<8>}}]: | |
1877 | TString intFlowSumOfProductOfEventWeightsVsMName = "fIntFlowSumOfProductOfEventWeightsVsM"; | |
1878 | intFlowSumOfProductOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
1879 | TString sopowFlag[6] = {"#sum_{i=1}^{N} w_{<2>} w_{<4>}","#sum_{i=1}^{N} w_{<2>} w_{<6>}","#sum_{i=1}^{N} w_{<2>} w_{<8>}", | |
1880 | "#sum_{i=1}^{N} w_{<4>} w_{<6>}","#sum_{i=1}^{N} w_{<4>} w_{<8>}","#sum_{i=1}^{N} w_{<6>} w_{<8>}"}; | |
1881 | for(Int_t pi=0;pi<6;pi++) | |
1882 | { | |
1883 | fIntFlowSumOfProductOfEventWeightsVsM[pi] = new TH1D(Form("%s, %s",intFlowSumOfProductOfEventWeightsVsMName.Data(),sopowFlag[pi].Data()), | |
1884 | Form("%s versus multiplicity",sopowFlag[pi].Data()), | |
9da1a4f3 | 1885 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1886 | fIntFlowSumOfProductOfEventWeightsVsM[pi]->GetXaxis()->SetTitle("M"); |
1887 | fIntFlowSumOfProductOfEventWeightsVsM[pi]->GetYaxis()->SetTitle(sopowFlag[pi].Data()); | |
1888 | fIntFlowResults->Add(fIntFlowSumOfProductOfEventWeightsVsM[pi]); | |
1889 | } // end of for(Int_t pi=0;pi<6;pi++) | |
0328db2d | 1890 | // covariances of NUA terms (multiplied with weight dependent prefactor): |
1891 | TString intFlowCovariancesNUAName = "fIntFlowCovariancesNUA"; | |
1892 | intFlowCovariancesNUAName += fAnalysisLabel->Data(); | |
1893 | fIntFlowCovariancesNUA = new TH1D(intFlowCovariancesNUAName.Data(),"Covariances for NUA (multiplied with weight dependent prefactor)",27,0,27); | |
1894 | fIntFlowCovariancesNUA->SetLabelSize(0.04); | |
1895 | fIntFlowCovariancesNUA->SetMarkerStyle(25); | |
1896 | fIntFlowCovariancesNUA->GetXaxis()->SetLabelSize(0.02); | |
1897 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(1,"Cov(<2>,<cos(#phi)>"); | |
1898 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(2,"Cov(<2>,<sin(#phi)>)"); | |
1899 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(3,"Cov(<cos(#phi)>,<sin(#phi)>)"); | |
1900 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(4,"Cov(<2>,<cos(#phi_{1}+#phi_{2})>)"); | |
1901 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(5,"Cov(<2>,<sin(#phi_{1}+#phi_{2})>)"); | |
1902 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(6,"Cov(<2>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1903 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(7,"Cov(<2>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1904 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(8,"Cov(<4>,<cos(#phi)>)"); | |
1905 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(9,"Cov(<4>,<sin(#phi)>)"); | |
1906 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(10,"Cov(<4>,<cos(#phi_{1}+#phi_{2})>)"); | |
1907 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(11,"Cov(<4>,<sin(#phi_{1}+#phi_{2})>)"); | |
1908 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(12,"Cov(<4>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1909 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(13,"Cov(<4>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1910 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(14,"Cov(<cos(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1911 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(15,"Cov(<cos(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1912 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(16,"Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1913 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(17,"Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1914 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(18,"Cov(<sin(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1915 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(19,"Cov(<sin(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1916 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(20,"Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1917 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(21,"Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1918 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(22,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>)"); | |
1919 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(23,"Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1920 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(24,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1921 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(25,"Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1922 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(26,"Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1923 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(27,"Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>)"); | |
1924 | fIntFlowResults->Add(fIntFlowCovariancesNUA); | |
1925 | // sum of linear and quadratic event weights for NUA terms: | |
1926 | TString intFlowSumOfEventWeightsNUAName = "fIntFlowSumOfEventWeightsNUA"; | |
1927 | intFlowSumOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
1928 | for(Int_t sc=0;sc<2;sc++) | |
1929 | { | |
1930 | for(Int_t power=0;power<2;power++) | |
1931 | { | |
1932 | fIntFlowSumOfEventWeightsNUA[sc][power] = new TH1D(Form("%s: %s, %s",intFlowSumOfEventWeightsNUAName.Data(),powerFlag[power].Data(),sinCosFlag[sc].Data()),Form("Sum of %s event weights for NUA %s terms",powerFlag[power].Data(),sinCosFlag[sc].Data()),3,0,3); | |
1933 | fIntFlowSumOfEventWeightsNUA[sc][power]->SetLabelSize(0.05); | |
1934 | fIntFlowSumOfEventWeightsNUA[sc][power]->SetMarkerStyle(25); | |
1935 | if(power == 0) | |
1936 | { | |
1937 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(1,Form("#sum_{i=1}^{N} w_{<%s(#phi)>}",sinCosFlag[sc].Data())); | |
1938 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(2,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}+#phi_{2})>}",sinCosFlag[sc].Data())); | |
1939 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(3,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}-#phi_{2}-#phi_{3})>}",sinCosFlag[sc].Data())); | |
1940 | } else if(power == 1) | |
1941 | { | |
1942 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(1,Form("#sum_{i=1}^{N} w_{<%s(#phi)>}^{2}",sinCosFlag[sc].Data())); | |
1943 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(2,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}+#phi_{2})>}^{2}",sinCosFlag[sc].Data())); | |
1944 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(3,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}-#phi_{2}-#phi_{3})>}^{2}",sinCosFlag[sc].Data())); | |
1945 | } | |
1946 | fIntFlowResults->Add(fIntFlowSumOfEventWeightsNUA[sc][power]); | |
1947 | } | |
1948 | } | |
1949 | // sum of products of event weights for NUA terms: | |
1950 | TString intFlowSumOfProductOfEventWeightsNUAName = "fIntFlowSumOfProductOfEventWeightsNUA"; | |
1951 | intFlowSumOfProductOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
1952 | fIntFlowSumOfProductOfEventWeightsNUA = new TH1D(intFlowSumOfProductOfEventWeightsNUAName.Data(),"Sum of product of event weights for NUA terms",27,0,27); | |
1953 | fIntFlowSumOfProductOfEventWeightsNUA->SetLabelSize(0.05); | |
1954 | fIntFlowSumOfProductOfEventWeightsNUA->SetMarkerStyle(25); | |
1955 | (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>} w_{<cos(#phi)>}"); | |
1956 | (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<2>} w_{<sin(#phi)>}"); | |
1957 | (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<cos(#phi)>} w_{<sin(#phi)>}"); | |
1958 | // .... | |
1959 | // to be improved - add labels for remaining bins | |
1960 | // .... | |
1961 | fIntFlowResults->Add(fIntFlowSumOfProductOfEventWeightsNUA); | |
489d5531 | 1962 | // final results for integrated Q-cumulants: |
1963 | TString intFlowQcumulantsName = "fIntFlowQcumulants"; | |
1964 | intFlowQcumulantsName += fAnalysisLabel->Data(); | |
1965 | fIntFlowQcumulants = new TH1D(intFlowQcumulantsName.Data(),"Integrated Q-cumulants",4,0,4); | |
1966 | fIntFlowQcumulants->SetLabelSize(0.05); | |
1967 | fIntFlowQcumulants->SetMarkerStyle(25); | |
1968 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(1,"QC{2}"); | |
1969 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(2,"QC{4}"); | |
1970 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(3,"QC{6}"); | |
1971 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(4,"QC{8}"); | |
1972 | fIntFlowResults->Add(fIntFlowQcumulants); | |
ff70ca91 | 1973 | // final results for integrated Q-cumulants versus multiplicity: |
1974 | TString intFlowQcumulantsVsMName = "fIntFlowQcumulantsVsM"; | |
1975 | intFlowQcumulantsVsMName += fAnalysisLabel->Data(); | |
1976 | TString cumulantFlag[4] = {"QC{2}","QC{4}","QC{6}","QC{8}"}; | |
1977 | for(Int_t co=0;co<4;co++) // cumulant order | |
1978 | { | |
1979 | fIntFlowQcumulantsVsM[co] = new TH1D(Form("%s, %s",intFlowQcumulantsVsMName.Data(),cumulantFlag[co].Data()), | |
1980 | Form("%s vs multipicity",cumulantFlag[co].Data()), | |
9da1a4f3 | 1981 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1982 | fIntFlowQcumulantsVsM[co]->GetXaxis()->SetTitle("M"); |
1983 | fIntFlowQcumulantsVsM[co]->GetYaxis()->SetTitle(cumulantFlag[co].Data()); | |
1984 | fIntFlowResults->Add(fIntFlowQcumulantsVsM[co]); | |
1985 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
489d5531 | 1986 | // final integrated flow estimates from Q-cumulants: |
1987 | TString intFlowName = "fIntFlow"; | |
1988 | intFlowName += fAnalysisLabel->Data(); | |
1989 | // integrated flow from Q-cumulants: | |
1990 | fIntFlow = new TH1D(intFlowName.Data(),"Integrated flow estimates from Q-cumulants",4,0,4); | |
1991 | fIntFlow->SetLabelSize(0.05); | |
1992 | fIntFlow->SetMarkerStyle(25); | |
ff70ca91 | 1993 | (fIntFlow->GetXaxis())->SetBinLabel(1,"v_{2}{2,QC}"); // to be improved (harwired harmonic) |
1994 | (fIntFlow->GetXaxis())->SetBinLabel(2,"v_{2}{4,QC}"); // to be improved (harwired harmonic) | |
1995 | (fIntFlow->GetXaxis())->SetBinLabel(3,"v_{2}{6,QC}"); // to be improved (harwired harmonic) | |
1996 | (fIntFlow->GetXaxis())->SetBinLabel(4,"v_{2}{8,QC}"); // to be improved (harwired harmonic) | |
1997 | fIntFlowResults->Add(fIntFlow); | |
1998 | // integrated flow from Q-cumulants: versus multiplicity: | |
1999 | TString intFlowVsMName = "fIntFlowVsM"; | |
2000 | intFlowVsMName += fAnalysisLabel->Data(); | |
2001 | TString flowFlag[4] = {"v_{2}{2,QC}","v_{2}{4,QC}","v_{2}{6,QC}","v_{2}{8,QC}"}; // to be improved (harwired harmonic) | |
2002 | for(Int_t co=0;co<4;co++) // cumulant order | |
2003 | { | |
2004 | fIntFlowVsM[co] = new TH1D(Form("%s, %s",intFlowVsMName.Data(),flowFlag[co].Data()), | |
2005 | Form("%s vs multipicity",flowFlag[co].Data()), | |
9da1a4f3 | 2006 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 2007 | fIntFlowVsM[co]->GetXaxis()->SetTitle("M"); |
2008 | fIntFlowVsM[co]->GetYaxis()->SetTitle(flowFlag[co].Data()); | |
2009 | fIntFlowResults->Add(fIntFlowVsM[co]); | |
2010 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
489d5531 | 2011 | |
2012 | /* // to be improved (removed): | |
2013 | // final average weighted multi-particle correlations for all events calculated from Q-vectors | |
2014 | fQCorrelations[1] = new TProfile("Weighted correlations","final average multi-particle correlations from weighted Q-vectors",200,0,200,"s"); | |
2015 | fQCorrelations[1]->SetTickLength(-0.01,"Y"); | |
2016 | fQCorrelations[1]->SetMarkerStyle(25); | |
2017 | fQCorrelations[1]->SetLabelSize(0.03); | |
2018 | fQCorrelations[1]->SetLabelOffset(0.01,"Y"); | |
2019 | // 2-particle correlations: | |
2020 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(1,"<w_{1}w_{2}cos(n(#phi_{1}-#phi_{2}))>"); | |
2021 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(2,"<w_{1}^{2}w_{2}^{2}cos(2n(#phi_{1}-#phi_{2}))>"); | |
2022 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(3,"<w_{1}^{3}w_{2}^{3}cos(3n(#phi_{1}-#phi_{2}))>"); | |
2023 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(4,"<w_{1}^{4}w_{2}^{4}cos(4n(#phi_{1}-#phi_{2}))>"); | |
2024 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(5,"<w_{1}^{3}w_{2}cos(n(#phi_{1}-#phi_{2}))>"); | |
2025 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(6,"<w_{1}^{2}w_{2}w_{3}cos(n(#phi_{1}-#phi_{2}))>"); | |
2026 | // 3-particle correlations: | |
2027 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(21,"<w_{1}w_{2}w_{3}^{2}cos(n(2#phi_{1}-#phi_{2}-#phi_{3}))>"); | |
2028 | // 4-particle correlations: | |
2029 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(41,"<w_{1}w_{2}w_{3}w_{4}cos(n(#phi_{1}+#phi_{2}-#phi_{3}-#phi_{4}))>"); | |
2030 | // add fQCorrelations[1] to the list fIntFlowList: | |
2031 | fIntFlowList->Add(fQCorrelations[1]); | |
2032 | */ | |
2033 | ||
2034 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow() | |
2035 | ||
2036 | ||
2037 | //================================================================================================================================ | |
2038 | ||
2039 | ||
2040 | void AliFlowAnalysisWithQCumulants::InitializeArraysForNestedLoops() | |
2041 | { | |
2042 | // Initialize arrays of all objects relevant for calculations with nested loops. | |
2043 | ||
2044 | // integrated flow: | |
2045 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
2046 | { | |
2047 | fIntFlowDirectCorrectionTermsForNUA[sc] = NULL; | |
2048 | } | |
2049 | ||
2050 | // differential flow: | |
2051 | // correlations: | |
2052 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
2053 | { | |
2054 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2055 | { | |
2056 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
2057 | { | |
2058 | fDiffFlowDirectCorrelations[t][pe][ci] = NULL; | |
2059 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
2060 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2061 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
2062 | // correction terms for non-uniform acceptance: | |
2063 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
2064 | { | |
2065 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2066 | { | |
2067 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
2068 | { | |
2069 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
2070 | { | |
2071 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] = NULL; | |
2072 | } | |
2073 | } | |
2074 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2075 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
2076 | ||
2077 | ||
2078 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForNestedLoops() | |
2079 | ||
2080 | ||
2081 | //================================================================================================================================ | |
2082 | ||
2083 | ||
2084 | void AliFlowAnalysisWithQCumulants::BookEverythingForNestedLoops() | |
2085 | { | |
2086 | // Book all objects relevant for calculations with nested loops. | |
2087 | ||
2088 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
2089 | TString typeFlag[2] = {"RP","POI"}; // to be improved (should I promote this to data members?) | |
2090 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; // to be improved (should I promote this to data members?) | |
2091 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; // to be improved (should I promote this to data members?) | |
2092 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
2093 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
2094 | ||
2095 | TString evaluateNestedLoopsName = "fEvaluateNestedLoops"; | |
2096 | evaluateNestedLoopsName += fAnalysisLabel->Data(); | |
2097 | fEvaluateNestedLoops = new TProfile(evaluateNestedLoopsName.Data(),"Flags for nested loops",4,0,4); | |
2098 | fEvaluateNestedLoops->SetLabelSize(0.03); | |
2099 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(1,"fEvaluateIntFlowNestedLoops"); | |
2100 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(2,"fEvaluateDiffFlowNestedLoops"); | |
2101 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(3,"fCrossCheckInPtBinNo"); | |
2102 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(4,"fCrossCheckInEtaBinNo"); | |
2103 | fEvaluateNestedLoops->Fill(0.5,(Int_t)fEvaluateIntFlowNestedLoops); | |
2104 | fEvaluateNestedLoops->Fill(1.5,(Int_t)fEvaluateDiffFlowNestedLoops); | |
2105 | fEvaluateNestedLoops->Fill(2.5,fCrossCheckInPtBinNo); | |
2106 | fEvaluateNestedLoops->Fill(3.5,fCrossCheckInEtaBinNo); | |
2107 | fNestedLoopsList->Add(fEvaluateNestedLoops); | |
2108 | // nested loops for integrated flow: | |
2109 | if(fEvaluateIntFlowNestedLoops) | |
2110 | { | |
2111 | // correlations: | |
2112 | TString intFlowDirectCorrelationsName = "fIntFlowDirectCorrelations"; | |
2113 | intFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
2114 | fIntFlowDirectCorrelations = new TProfile(intFlowDirectCorrelationsName.Data(),"Multiparticle correlations calculated with nested loops (for int. flow)",32,0,32,"s"); | |
2115 | fNestedLoopsList->Add(fIntFlowDirectCorrelations); | |
2116 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
2117 | { | |
2118 | TString intFlowExtraDirectCorrelationsName = "fIntFlowExtraDirectCorrelations"; | |
2119 | intFlowExtraDirectCorrelationsName += fAnalysisLabel->Data(); | |
2120 | fIntFlowExtraDirectCorrelations = new TProfile(intFlowExtraDirectCorrelationsName.Data(),"Extra multiparticle correlations calculated with nested loops (for int. flow)",100,0,100,"s"); | |
2121 | fNestedLoopsList->Add(fIntFlowExtraDirectCorrelations); | |
2122 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
2123 | // correction terms for non-uniform acceptance: | |
2124 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
2125 | { | |
2126 | TString intFlowDirectCorrectionTermsForNUAName = "fIntFlowDirectCorrectionTermsForNUA"; | |
2127 | intFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
2128 | 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"); | |
2129 | fNestedLoopsList->Add(fIntFlowDirectCorrectionTermsForNUA[sc]); | |
2130 | } // end of for(Int_t sc=0;sc<2;sc++) | |
2131 | } // end of if(fEvaluateIntFlowNestedLoops) | |
2132 | ||
2133 | // nested loops for differential flow: | |
2134 | if(fEvaluateDiffFlowNestedLoops) | |
2135 | { | |
2136 | // reduced correlations: | |
2137 | TString diffFlowDirectCorrelationsName = "fDiffFlowDirectCorrelations"; | |
2138 | diffFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
2139 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
2140 | { | |
2141 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2142 | { | |
2143 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
2144 | { | |
2145 | // reduced correlations: | |
2146 | 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"); | |
2147 | fDiffFlowDirectCorrelations[t][pe][rci]->SetXTitle(ptEtaFlag[pe].Data()); | |
2148 | fNestedLoopsList->Add(fDiffFlowDirectCorrelations[t][pe][rci]); // to be improved (add dedicated list to hold reduced correlations) | |
2149 | } // end of for(Int_t rci=0;rci<4;rci++) // correlation index | |
2150 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2151 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
2152 | // correction terms for non-uniform acceptance: | |
2153 | TString diffFlowDirectCorrectionTermsForNUAName = "fDiffFlowDirectCorrectionTermsForNUA"; | |
2154 | diffFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
2155 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
2156 | { | |
2157 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2158 | { | |
2159 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
2160 | { | |
2161 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
2162 | { | |
2163 | 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"); | |
2164 | fNestedLoopsList->Add(fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]); | |
2165 | } | |
2166 | } | |
2167 | } | |
3b552efe | 2168 | } |
2169 | // number of RPs and POIs in selected pt and eta bins for cross-checkings: | |
2170 | TString noOfParticlesInBinName = "fNoOfParticlesInBin"; | |
2171 | fNoOfParticlesInBin = new TH1D(noOfParticlesInBinName.Data(),"Number of RPs and POIs in selected p_{T} and #eta bin",4,0,4); | |
489d5531 | 2172 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(1,"# of RPs in p_{T} bin"); |
2173 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(2,"# of RPs in #eta bin"); | |
2174 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(3,"# of POIs in p_{T} bin"); | |
3b552efe | 2175 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(4,"# of POIs in #eta bin"); |
489d5531 | 2176 | fNestedLoopsList->Add(fNoOfParticlesInBin); |
2177 | } // end of if(fEvaluateDiffFlowNestedLoops) | |
2178 | ||
2179 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForNestedLoops() | |
2180 | ||
2181 | ||
2182 | //================================================================================================================================ | |
2183 | ||
2184 | ||
2185 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations() | |
2186 | { | |
2187 | // calculate all correlations needed for integrated flow | |
57340a27 | 2188 | |
489d5531 | 2189 | // multiplicity: |
2190 | Double_t dMult = (*fSMpk)(0,0); | |
57340a27 | 2191 | |
489d5531 | 2192 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: |
2193 | Double_t dReQ1n = (*fReQ)(0,0); | |
2194 | Double_t dReQ2n = (*fReQ)(1,0); | |
2195 | Double_t dReQ3n = (*fReQ)(2,0); | |
2196 | Double_t dReQ4n = (*fReQ)(3,0); | |
2197 | Double_t dImQ1n = (*fImQ)(0,0); | |
2198 | Double_t dImQ2n = (*fImQ)(1,0); | |
2199 | Double_t dImQ3n = (*fImQ)(2,0); | |
2200 | Double_t dImQ4n = (*fImQ)(3,0); | |
2201 | ||
2202 | // real and imaginary parts of some expressions involving various combinations of Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
2203 | // (these expression appear in the Eqs. for the multi-particle correlations bellow) | |
2204 | ||
2205 | // Re[Q_{2n} Q_{n}^* Q_{n}^*] | |
2206 | Double_t reQ2nQ1nstarQ1nstar = pow(dReQ1n,2.)*dReQ2n + 2.*dReQ1n*dImQ1n*dImQ2n - pow(dImQ1n,2.)*dReQ2n; | |
2207 | ||
2208 | // Im[Q_{2n} Q_{n}^* Q_{n}^*] | |
2209 | //Double_t imQ2nQ1nstarQ1nstar = pow(dReQ1n,2.)*dImQ2n-2.*dReQ1n*dImQ1n*dReQ2n-pow(dImQ1n,2.)*dImQ2n; | |
2210 | ||
2211 | // Re[Q_{n} Q_{n} Q_{2n}^*] = Re[Q_{2n} Q_{n}^* Q_{n}^*] | |
2212 | Double_t reQ1nQ1nQ2nstar = reQ2nQ1nstarQ1nstar; | |
2213 | ||
2214 | // Re[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
2215 | Double_t reQ3nQ1nQ2nstarQ2nstar = (pow(dReQ2n,2.)-pow(dImQ2n,2.))*(dReQ3n*dReQ1n-dImQ3n*dImQ1n) | |
2216 | + 2.*dReQ2n*dImQ2n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n); | |
2217 | ||
2218 | // Im[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
2219 | //Double_t imQ3nQ1nQ2nstarQ2nstar = calculate and implement this (deleteMe) | |
2220 | ||
2221 | // Re[Q_{2n} Q_{2n} Q_{3n}^* Q_{1n}^*] = Re[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
2222 | Double_t reQ2nQ2nQ3nstarQ1nstar = reQ3nQ1nQ2nstarQ2nstar; | |
2223 | ||
2224 | // Re[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
2225 | Double_t reQ4nQ2nstarQ2nstar = pow(dReQ2n,2.)*dReQ4n+2.*dReQ2n*dImQ2n*dImQ4n-pow(dImQ2n,2.)*dReQ4n; | |
2226 | ||
2227 | // Im[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
2228 | //Double_t imQ4nQ2nstarQ2nstar = calculate and implement this (deleteMe) | |
2229 | ||
2230 | // Re[Q_{2n} Q_{2n} Q_{4n}^*] = Re[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
2231 | Double_t reQ2nQ2nQ4nstar = reQ4nQ2nstarQ2nstar; | |
2232 | ||
2233 | // Re[Q_{4n} Q_{3n}^* Q_{n}^*] | |
2234 | Double_t reQ4nQ3nstarQ1nstar = dReQ4n*(dReQ3n*dReQ1n-dImQ3n*dImQ1n)+dImQ4n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n); | |
2235 | ||
2236 | // Re[Q_{3n} Q_{n} Q_{4n}^*] = Re[Q_{4n} Q_{3n}^* Q_{n}^*] | |
2237 | Double_t reQ3nQ1nQ4nstar = reQ4nQ3nstarQ1nstar; | |
2238 | ||
2239 | // Im[Q_{4n} Q_{3n}^* Q_{n}^*] | |
2240 | //Double_t imQ4nQ3nstarQ1nstar = calculate and implement this (deleteMe) | |
2241 | ||
2242 | // Re[Q_{3n} Q_{2n}^* Q_{n}^*] | |
2243 | Double_t reQ3nQ2nstarQ1nstar = dReQ3n*dReQ2n*dReQ1n-dReQ3n*dImQ2n*dImQ1n+dImQ3n*dReQ2n*dImQ1n | |
2244 | + dImQ3n*dImQ2n*dReQ1n; | |
2245 | ||
2246 | // Re[Q_{2n} Q_{n} Q_{3n}^*] = Re[Q_{3n} Q_{2n}^* Q_{n}^*] | |
2247 | Double_t reQ2nQ1nQ3nstar = reQ3nQ2nstarQ1nstar; | |
2248 | ||
2249 | // Im[Q_{3n} Q_{2n}^* Q_{n}^*] | |
2250 | //Double_t imQ3nQ2nstarQ1nstar; //calculate and implement this (deleteMe) | |
2251 | ||
2252 | // Re[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2253 | Double_t reQ3nQ1nstarQ1nstarQ1nstar = dReQ3n*pow(dReQ1n,3)-3.*dReQ1n*dReQ3n*pow(dImQ1n,2) | |
2254 | + 3.*dImQ1n*dImQ3n*pow(dReQ1n,2)-dImQ3n*pow(dImQ1n,3); | |
2255 | ||
2256 | // Im[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2257 | //Double_t imQ3nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
2258 | ||
2259 | // |Q_{2n}|^2 |Q_{n}|^2 | |
2260 | Double_t dQ2nQ1nQ2nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)); | |
2261 | ||
2262 | // Re[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2263 | Double_t reQ4nQ2nstarQ1nstarQ1nstar = (dReQ4n*dReQ2n+dImQ4n*dImQ2n)*(pow(dReQ1n,2)-pow(dImQ1n,2)) | |
2264 | + 2.*dReQ1n*dImQ1n*(dImQ4n*dReQ2n-dReQ4n*dImQ2n); | |
2265 | ||
2266 | // Im[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2267 | //Double_t imQ4nQ2nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
2268 | ||
2269 | // Re[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2270 | Double_t reQ2nQ1nQ1nstarQ1nstarQ1nstar = (dReQ2n*dReQ1n-dImQ2n*dImQ1n)*(pow(dReQ1n,3)-3.*dReQ1n*pow(dImQ1n,2)) | |
2271 | + (dReQ2n*dImQ1n+dReQ1n*dImQ2n)*(3.*dImQ1n*pow(dReQ1n,2)-pow(dImQ1n,3)); | |
2272 | ||
2273 | // Im[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2274 | //Double_t imQ2nQ1nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
2275 | ||
2276 | // Re[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2277 | Double_t reQ2nQ2nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2278 | * (dReQ2n*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) + 2.*dImQ2n*dReQ1n*dImQ1n); | |
2279 | ||
2280 | // Im[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2281 | //Double_t imQ2nQ2nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2282 | // * (dImQ2n*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) - 2.*dReQ2n*dReQ1n*dImQ1n); | |
2283 | ||
2284 | // Re[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2285 | Double_t reQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(dReQ1n,4.)*dReQ4n-6.*pow(dReQ1n,2.)*dReQ4n*pow(dImQ1n,2.) | |
2286 | + pow(dImQ1n,4.)*dReQ4n+4.*pow(dReQ1n,3.)*dImQ1n*dImQ4n | |
2287 | - 4.*pow(dImQ1n,3.)*dReQ1n*dImQ4n; | |
2288 | ||
2289 | // Im[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2290 | //Double_t imQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(dReQ1n,4.)*dImQ4n-6.*pow(dReQ1n,2.)*dImQ4n*pow(dImQ1n,2.) | |
2291 | // + pow(dImQ1n,4.)*dImQ4n+4.*pow(dImQ1n,3.)*dReQ1n*dReQ4n | |
2292 | // - 4.*pow(dReQ1n,3.)*dImQ1n*dReQ4n; | |
2293 | ||
2294 | // Re[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2295 | Double_t reQ3nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2296 | * (dReQ1n*dReQ2n*dReQ3n-dReQ3n*dImQ1n*dImQ2n+dReQ2n*dImQ1n*dImQ3n+dReQ1n*dImQ2n*dImQ3n); | |
2297 | ||
2298 | // Im[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2299 | //Double_t imQ3nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2300 | // * (-dReQ2n*dReQ3n*dImQ1n-dReQ1n*dReQ3n*dImQ2n+dReQ1n*dReQ2n*dImQ3n-dImQ1n*dImQ2n*dImQ3n); | |
2301 | ||
2302 | ||
2303 | // Re[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2304 | Double_t reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)*dReQ2n-2.*dReQ1n*dReQ2n*dImQ1n-dReQ2n*pow(dImQ1n,2.) | |
2305 | + dImQ2n*pow(dReQ1n,2.)+2.*dReQ1n*dImQ1n*dImQ2n-pow(dImQ1n,2.)*dImQ2n) | |
2306 | * (pow(dReQ1n,2.)*dReQ2n+2.*dReQ1n*dReQ2n*dImQ1n-dReQ2n*pow(dImQ1n,2.) | |
2307 | - dImQ2n*pow(dReQ1n,2.)+2.*dReQ1n*dImQ1n*dImQ2n+pow(dImQ1n,2.)*dImQ2n); | |
2308 | ||
2309 | // Im[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2310 | //Double_t imQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = 2.*(pow(dReQ1n,2.)*dReQ2n-dReQ2n*pow(dImQ1n,2.) | |
2311 | // + 2.*dReQ1n*dImQ1n*dImQ2n)*(pow(dReQ1n,2.)*dImQ2n | |
2312 | // - 2.*dReQ1n*dImQ1n*dReQ2n-pow(dImQ1n,2.)*dImQ2n); | |
2313 | ||
2314 | // Re[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2315 | Double_t reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2316 | * (pow(dReQ1n,3.)*dReQ3n-3.*dReQ1n*dReQ3n*pow(dImQ1n,2.) | |
2317 | + 3.*pow(dReQ1n,2.)*dImQ1n*dImQ3n-pow(dImQ1n,3.)*dImQ3n); | |
2318 | ||
2319 | // Im[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2320 | //Double_t imQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2321 | // * (pow(dImQ1n,3.)*dReQ3n-3.*dImQ1n*dReQ3n*pow(dReQ1n,2.) | |
2322 | // - 3.*pow(dImQ1n,2.)*dReQ1n*dImQ3n+pow(dReQ1n,3.)*dImQ3n); | |
2323 | ||
2324 | // |Q_{2n}|^2 |Q_{n}|^4 | |
2325 | Double_t dQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))*pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.); | |
2326 | ||
2327 | // Re[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2328 | Double_t reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2329 | * (pow(dReQ1n,2.)*dReQ2n-dReQ2n*pow(dImQ1n,2.) | |
2330 | + 2.*dReQ1n*dImQ1n*dImQ2n); | |
2331 | ||
2332 | // Im[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2333 | //Double_t imQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2334 | // * (pow(dReQ1n,2.)*dImQ2n-dImQ2n*pow(dImQ1n,2.) | |
2335 | // - 2.*dReQ1n*dReQ2n*dImQ1n); | |
2336 | ||
2337 | ||
2338 | ||
2339 | ||
2340 | // ************************************** | |
2341 | // **** multi-particle correlations: **** | |
2342 | // ************************************** | |
2343 | // | |
2344 | // Remark 1: multi-particle correlations calculated with non-weighted Q-vectors are stored in 1D profile fQCorrelations[0]. // to be improved (wrong profiles) | |
2345 | // Remark 2: binning of fQCorrelations[0] is organized as follows: // to be improved (wrong profiles) | |
2346 | // -------------------------------------------------------------------------------------------------------------------- | |
2347 | // 1st bin: <2>_{1n|1n} = two1n1n = cos(n*(phi1-phi2))> | |
2348 | // 2nd bin: <2>_{2n|2n} = two2n2n = cos(2n*(phi1-phi2))> | |
2349 | // 3rd bin: <2>_{3n|3n} = two3n3n = cos(3n*(phi1-phi2))> | |
2350 | // 4th bin: <2>_{4n|4n} = two4n4n = cos(4n*(phi1-phi2))> | |
2351 | // 5th bin: ---- EMPTY ---- | |
2352 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1n = <cos(n*(2.*phi1-phi2-phi3))> | |
2353 | // 7th bin: <3>_{3n|2n,1n} = three3n2n1n = <cos(n*(3.*phi1-2.*phi2-phi3))> | |
2354 | // 8th bin: <3>_{4n|2n,2n} = three4n2n2n = <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
2355 | // 9th bin: <3>_{4n|3n,1n} = three4n3n1n = <cos(n*(4.*phi1-3.*phi2-phi3))> | |
2356 | // 10th bin: ---- EMPTY ---- | |
2357 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1n = <cos(n*(phi1+phi2-phi3-phi4))> | |
2358 | // 12th bin: <4>_{2n,1n|2n,1n} = four2n1n2n1n = <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
2359 | // 13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n = <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
2360 | // 14th bin: <4>_{3n|1n,1n,1n} = four3n1n1n1n = <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
2361 | // 15th bin: <4>_{3n,1n|3n,1n} = four3n1n3n1n = <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
2362 | // 16th bin: <4>_{3n,1n|2n,2n} = four3n1n2n2n = <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
2363 | // 17th bin: <4>_{4n|2n,1n,1n} = four4n2n1n1n = <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
2364 | // 18th bin: ---- EMPTY ---- | |
2365 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = five2n1n1n1n1n = <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
2366 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = five2n2n2n1n1n = <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
2367 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = five3n1n2n1n1n = <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
2368 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = five4n1n1n1n1n = <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
2369 | // 23rd bin: ---- EMPTY ---- | |
2370 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = six1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2371 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = six2n1n1n2n1n1n = <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
2372 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = six2n2n1n1n1n1n = <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
2373 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = six3n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
2374 | // 28th bin: ---- EMPTY ---- | |
2375 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = seven2n1n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
2376 | // 30th bin: ---- EMPTY ---- | |
2377 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = eight1n1n1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2378 | // -------------------------------------------------------------------------------------------------------------------- | |
2379 | ||
2380 | // 2-particle: | |
2381 | Double_t two1n1n = 0.; // <cos(n*(phi1-phi2))> | |
2382 | Double_t two2n2n = 0.; // <cos(2n*(phi1-phi2))> | |
2383 | Double_t two3n3n = 0.; // <cos(3n*(phi1-phi2))> | |
2384 | Double_t two4n4n = 0.; // <cos(4n*(phi1-phi2))> | |
2385 | ||
2386 | if(dMult>1) | |
2387 | { | |
2388 | two1n1n = (pow(dReQ1n,2.)+pow(dImQ1n,2.)-dMult)/(dMult*(dMult-1.)); | |
2389 | two2n2n = (pow(dReQ2n,2.)+pow(dImQ2n,2.)-dMult)/(dMult*(dMult-1.)); | |
2390 | two3n3n = (pow(dReQ3n,2.)+pow(dImQ3n,2.)-dMult)/(dMult*(dMult-1.)); | |
2391 | two4n4n = (pow(dReQ4n,2.)+pow(dImQ4n,2.)-dMult)/(dMult*(dMult-1.)); | |
2392 | ||
2393 | // average 2-particle correlations for single event: | |
2394 | fIntFlowCorrelationsAllEBE->SetBinContent(1,two1n1n); | |
2395 | fIntFlowCorrelationsAllEBE->SetBinContent(2,two2n2n); | |
2396 | fIntFlowCorrelationsAllEBE->SetBinContent(3,two3n3n); | |
2397 | fIntFlowCorrelationsAllEBE->SetBinContent(4,two4n4n); | |
2398 | ||
2399 | // average 2-particle correlations for all events: | |
2400 | fIntFlowCorrelationsAllPro->Fill(0.5,two1n1n,dMult*(dMult-1.)); | |
2401 | fIntFlowCorrelationsAllPro->Fill(1.5,two2n2n,dMult*(dMult-1.)); | |
2402 | fIntFlowCorrelationsAllPro->Fill(2.5,two3n3n,dMult*(dMult-1.)); | |
2403 | fIntFlowCorrelationsAllPro->Fill(3.5,two4n4n,dMult*(dMult-1.)); | |
2404 | ||
2405 | // store separetately <2> (to be improved: do I really need this?) | |
2406 | fIntFlowCorrelationsEBE->SetBinContent(1,two1n1n); // <2> | |
2407 | ||
2408 | // to be improved (this can be implemented better): | |
2409 | Double_t mWeight2p = 0.; | |
2410 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2411 | { | |
2412 | mWeight2p = dMult*(dMult-1.); | |
2413 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2414 | { | |
2415 | mWeight2p = 1.; | |
2416 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2417 | { | |
2418 | mWeight2p = dMult; | |
2419 | } | |
2420 | ||
2421 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(1,mWeight2p); // eW_<2> | |
2422 | fIntFlowCorrelationsPro->Fill(0.5,two1n1n,mWeight2p); | |
9f33751d | 2423 | fIntFlowCorrelationsVsMPro[0]->Fill(fReferenceMultiplicityEBE+0.5,two1n1n,mWeight2p); |
489d5531 | 2424 | |
2425 | // distribution of <cos(n*(phi1-phi2))>: | |
2426 | //f2pDistribution->Fill(two1n1n,dMult*(dMult-1.)); | |
2427 | } // end of if(dMult>1) | |
2428 | ||
2429 | // 3-particle: | |
2430 | Double_t three2n1n1n = 0.; // <cos(n*(2.*phi1-phi2-phi3))> | |
2431 | Double_t three3n2n1n = 0.; // <cos(n*(3.*phi1-2.*phi2-phi3))> | |
2432 | Double_t three4n2n2n = 0.; // <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
2433 | Double_t three4n3n1n = 0.; // <cos(n*(4.*phi1-3.*phi2-phi3))> | |
2434 | ||
2435 | if(dMult>2) | |
2436 | { | |
2437 | three2n1n1n = (reQ2nQ1nstarQ1nstar-2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2438 | - (pow(dReQ2n,2.)+pow(dImQ2n,2.))+2.*dMult) | |
2439 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2440 | three3n2n1n = (reQ3nQ2nstarQ1nstar-(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2441 | - (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2442 | - (pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult) | |
2443 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2444 | three4n2n2n = (reQ4nQ2nstarQ2nstar-2.*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2445 | - (pow(dReQ4n,2.)+pow(dImQ4n,2.))+2.*dMult) | |
2446 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2447 | three4n3n1n = (reQ4nQ3nstarQ1nstar-(pow(dReQ4n,2.)+pow(dImQ4n,2.)) | |
2448 | - (pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2449 | - (pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult) | |
2450 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2451 | ||
2452 | // average 3-particle correlations for single event: | |
2453 | fIntFlowCorrelationsAllEBE->SetBinContent(6,three2n1n1n); | |
2454 | fIntFlowCorrelationsAllEBE->SetBinContent(7,three3n2n1n); | |
2455 | fIntFlowCorrelationsAllEBE->SetBinContent(8,three4n2n2n); | |
2456 | fIntFlowCorrelationsAllEBE->SetBinContent(9,three4n3n1n); | |
2457 | ||
2458 | // average 3-particle correlations for all events: | |
2459 | fIntFlowCorrelationsAllPro->Fill(5.5,three2n1n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2460 | fIntFlowCorrelationsAllPro->Fill(6.5,three3n2n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2461 | fIntFlowCorrelationsAllPro->Fill(7.5,three4n2n2n,dMult*(dMult-1.)*(dMult-2.)); | |
2462 | fIntFlowCorrelationsAllPro->Fill(8.5,three4n3n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2463 | } // end of if(dMult>2) | |
2464 | ||
2465 | // 4-particle: | |
2466 | Double_t four1n1n1n1n = 0.; // <cos(n*(phi1+phi2-phi3-phi4))> | |
2467 | Double_t four2n2n2n2n = 0.; // <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
2468 | Double_t four2n1n2n1n = 0.; // <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
2469 | Double_t four3n1n1n1n = 0.; // <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
2470 | Double_t four4n2n1n1n = 0.; // <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
2471 | Double_t four3n1n2n2n = 0.; // <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
2472 | Double_t four3n1n3n1n = 0.; // <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
2473 | ||
2474 | if(dMult>3) | |
2475 | { | |
2476 | four1n1n1n1n = (2.*dMult*(dMult-3.)+pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)-4.*(dMult-2.)*(pow(dReQ1n,2.) | |
2477 | + pow(dImQ1n,2.))-2.*reQ2nQ1nstarQ1nstar+(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2478 | / (dMult*(dMult-1)*(dMult-2.)*(dMult-3.)); | |
2479 | four2n2n2n2n = (2.*dMult*(dMult-3.)+pow((pow(dReQ2n,2.)+pow(dImQ2n,2.)),2.)-4.*(dMult-2.)*(pow(dReQ2n,2.) | |
2480 | + pow(dImQ2n,2.))-2.*reQ4nQ2nstarQ2nstar+(pow(dReQ4n,2.)+pow(dImQ4n,2.))) | |
2481 | / (dMult*(dMult-1)*(dMult-2.)*(dMult-3.)); | |
2482 | four2n1n2n1n = (dQ2nQ1nQ2nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar-2.*reQ2nQ1nstarQ1nstar) | |
2483 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2484 | - ((dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2485 | + (dMult-4.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-(pow(dReQ3n,2.)+pow(dImQ3n,2.))) | |
2486 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2487 | + (dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2488 | four3n1n1n1n = (reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar-3.*reQ2nQ1nstarQ1nstar) | |
2489 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2490 | + (2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))+3.*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2491 | + 6.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))-6.*dMult) | |
2492 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2493 | four4n2n1n1n = (reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar-2.*reQ3nQ2nstarQ1nstar) | |
2494 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2495 | - (reQ2nQ1nstarQ1nstar-2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))-2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2496 | - 3.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2497 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2498 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2499 | four3n1n2n2n = (reQ3nQ1nQ2nstarQ2nstar-reQ4nQ2nstarQ2nstar-reQ3nQ1nQ4nstar-2.*reQ3nQ2nstarQ1nstar) | |
2500 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2501 | - (2.*reQ1nQ1nQ2nstar-(pow(dReQ4n,2.)+pow(dImQ4n,2.))-2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2502 | - 4.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2503 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2504 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2505 | four3n1n3n1n = ((pow(dReQ3n,2.)+pow(dImQ3n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2506 | - 2.*reQ4nQ3nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar) | |
2507 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2508 | + ((pow(dReQ4n,2.)+pow(dImQ4n,2.))-(dMult-4.)*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2509 | + (pow(dReQ2n,2.)+pow(dImQ2n,2.))-(dMult-4.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2510 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2511 | + (dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2512 | ||
2513 | // average 4-particle correlations for single event: | |
2514 | fIntFlowCorrelationsAllEBE->SetBinContent(11,four1n1n1n1n); | |
2515 | fIntFlowCorrelationsAllEBE->SetBinContent(12,four2n1n2n1n); | |
2516 | fIntFlowCorrelationsAllEBE->SetBinContent(13,four2n2n2n2n); | |
2517 | fIntFlowCorrelationsAllEBE->SetBinContent(14,four3n1n1n1n); | |
2518 | fIntFlowCorrelationsAllEBE->SetBinContent(15,four3n1n3n1n); | |
2519 | fIntFlowCorrelationsAllEBE->SetBinContent(16,four3n1n2n2n); | |
2520 | fIntFlowCorrelationsAllEBE->SetBinContent(17,four4n2n1n1n); | |
2521 | ||
2522 | // average 4-particle correlations for all events: | |
2523 | fIntFlowCorrelationsAllPro->Fill(10.5,four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2524 | fIntFlowCorrelationsAllPro->Fill(11.5,four2n1n2n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2525 | fIntFlowCorrelationsAllPro->Fill(12.5,four2n2n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2526 | fIntFlowCorrelationsAllPro->Fill(13.5,four3n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2527 | fIntFlowCorrelationsAllPro->Fill(14.5,four3n1n3n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2528 | fIntFlowCorrelationsAllPro->Fill(15.5,four3n1n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2529 | fIntFlowCorrelationsAllPro->Fill(16.5,four4n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2530 | ||
2531 | // store separetately <4> (to be improved: do I really need this?) | |
2532 | fIntFlowCorrelationsEBE->SetBinContent(2,four1n1n1n1n); // <4> | |
2533 | ||
2534 | // to be improved (this can be implemented better): | |
2535 | Double_t mWeight4p = 0.; | |
2536 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2537 | { | |
2538 | mWeight4p = dMult*(dMult-1.)*(dMult-2.)*(dMult-3.); | |
2539 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2540 | { | |
2541 | mWeight4p = 1.; | |
2542 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2543 | { | |
2544 | mWeight4p = dMult; | |
2545 | } | |
2546 | ||
2547 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(2,mWeight4p); // eW_<4> | |
2548 | fIntFlowCorrelationsPro->Fill(1.5,four1n1n1n1n,mWeight4p); | |
9f33751d | 2549 | fIntFlowCorrelationsVsMPro[1]->Fill(fReferenceMultiplicityEBE+0.5,four1n1n1n1n,mWeight4p); |
489d5531 | 2550 | |
2551 | // distribution of <cos(n*(phi1+phi2-phi3-phi4))> | |
2552 | //f4pDistribution->Fill(four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2553 | ||
2554 | } // end of if(dMult>3) | |
2555 | ||
2556 | // 5-particle: | |
2557 | Double_t five2n1n1n1n1n = 0.; // <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
2558 | Double_t five2n2n2n1n1n = 0.; // <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
2559 | Double_t five3n1n2n1n1n = 0.; // <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
2560 | Double_t five4n1n1n1n1n = 0.; // <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
2561 | ||
2562 | if(dMult>4) | |
2563 | { | |
2564 | five2n1n1n1n1n = (reQ2nQ1nQ1nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar+6.*reQ3nQ2nstarQ1nstar) | |
2565 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2566 | - (reQ2nQ1nQ3nstar+3.*(dMult-6.)*reQ2nQ1nstarQ1nstar+3.*reQ1nQ1nQ2nstar) | |
2567 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2568 | - (2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2569 | + 3.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2570 | - 3.*(dMult-4.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2571 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2572 | - 3.*(pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2573 | - 2.*(2*dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult*(dMult-4.)) | |
2574 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2575 | ||
2576 | five2n2n2n1n1n = (reQ2nQ2nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ2nQ2nQ3nstarQ1nstar) | |
2577 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2578 | + 2.*(reQ4nQ2nstarQ2nstar+4.*reQ3nQ2nstarQ1nstar+reQ3nQ1nQ4nstar) | |
2579 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2580 | + (reQ2nQ2nQ4nstar-2.*(dMult-5.)*reQ2nQ1nstarQ1nstar+2.*reQ1nQ1nQ2nstar) | |
2581 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2582 | - (2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))+4.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2583 | + 1.*pow((pow(dReQ2n,2.)+pow(dImQ2n,2.)),2.) | |
2584 | - 2.*(3.*dMult-10.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2585 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2586 | - (4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2587 | - 4.*(dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))+4.*dMult*(dMult-6.)) | |
2588 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2589 | ||
2590 | five4n1n1n1n1n = (reQ4nQ1nstarQ1nstarQ1nstarQ1nstar-6.*reQ4nQ2nstarQ1nstarQ1nstar-4.*reQ3nQ1nstarQ1nstarQ1nstar) | |
2591 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2592 | + (8.*reQ4nQ3nstarQ1nstar+3.*reQ4nQ2nstarQ2nstar+12.*reQ3nQ2nstarQ1nstar+12.*reQ2nQ1nstarQ1nstar) | |
2593 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2594 | - (6.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))+8.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2595 | + 12.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))+24.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))-24.*dMult) | |
2596 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2597 | ||
2598 | five3n1n2n1n1n = (reQ3nQ1nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar) | |
2599 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2600 | - (reQ3nQ1nQ2nstarQ2nstar-3.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar) | |
2601 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2602 | - ((2.*dMult-13.)*reQ3nQ2nstarQ1nstar-reQ3nQ1nQ4nstar-9.*reQ2nQ1nstarQ1nstar) | |
2603 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2604 | - (2.*reQ1nQ1nQ2nstar+2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.)) | |
2605 | - 2.*(dMult-5.)*(pow(dReQ3n,2.)+pow(dImQ3n,2.))+2.*(pow(dReQ3n,2.) | |
2606 | + pow(dImQ3n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2607 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2608 | + (2.*(dMult-6.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2609 | - 2.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2610 | - pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2611 | + 2.*(3.*dMult-11.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2612 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2613 | - 4.*(dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2614 | ||
2615 | // average 5-particle correlations for single event: | |
2616 | fIntFlowCorrelationsAllEBE->SetBinContent(19,five2n1n1n1n1n); | |
2617 | fIntFlowCorrelationsAllEBE->SetBinContent(20,five2n2n2n1n1n); | |
2618 | fIntFlowCorrelationsAllEBE->SetBinContent(21,five3n1n2n1n1n); | |
2619 | fIntFlowCorrelationsAllEBE->SetBinContent(22,five4n1n1n1n1n); | |
2620 | ||
2621 | // average 5-particle correlations for all events: | |
2622 | fIntFlowCorrelationsAllPro->Fill(18.5,five2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2623 | fIntFlowCorrelationsAllPro->Fill(19.5,five2n2n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2624 | fIntFlowCorrelationsAllPro->Fill(20.5,five3n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2625 | fIntFlowCorrelationsAllPro->Fill(21.5,five4n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2626 | } // end of if(dMult>4) | |
2627 | ||
2628 | // 6-particle: | |
2629 | Double_t six1n1n1n1n1n1n = 0.; // <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2630 | Double_t six2n2n1n1n1n1n = 0.; // <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
2631 | Double_t six3n1n1n1n1n1n = 0.; // <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
2632 | Double_t six2n1n1n2n1n1n = 0.; // <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
2633 | ||
2634 | if(dMult>5) | |
2635 | { | |
2636 | six1n1n1n1n1n1n = (pow(pow(dReQ1n,2.)+pow(dImQ1n,2.),3.)+9.*dQ2nQ1nQ2nstarQ1nstar-6.*reQ2nQ1nQ1nstarQ1nstarQ1nstar) | |
2637 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2638 | + 4.*(reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar) | |
2639 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2640 | + 2.*(9.*(dMult-4.)*reQ2nQ1nstarQ1nstar+2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))) | |
2641 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2642 | - 9.*(pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)+(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2643 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-5.)) | |
2644 | + (18.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2645 | / (dMult*(dMult-1)*(dMult-3)*(dMult-4)) | |
2646 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2647 | ||
2648 | six2n1n1n2n1n1n = (dQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2649 | * (2.*five2n2n2n1n1n+4.*five2n1n1n1n1n+4.*five3n1n2n1n1n+4.*four2n1n2n1n+1.*four1n1n1n1n) | |
2650 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four1n1n1n1n+4.*two1n1n | |
2651 | + 2.*three2n1n1n+2.*three2n1n1n+4.*four3n1n1n1n+8.*three2n1n1n+2.*four4n2n1n1n | |
2652 | + 4.*four2n1n2n1n+2.*two2n2n+8.*four2n1n2n1n+4.*four3n1n3n1n+8.*three3n2n1n | |
2653 | + 4.*four3n1n2n2n+4.*four1n1n1n1n+4.*four2n1n2n1n+1.*four2n2n2n2n) | |
2654 | - dMult*(dMult-1.)*(dMult-2.)*(2.*three2n1n1n+8.*two1n1n+4.*two1n1n+2. | |
2655 | + 4.*two1n1n+4.*three2n1n1n+2.*two2n2n+4.*three2n1n1n+8.*three3n2n1n | |
2656 | + 8.*two2n2n+4.*three4n3n1n+4.*two3n3n+4.*three3n2n1n+4.*two1n1n | |
2657 | + 8.*three2n1n1n+4.*two1n1n+4.*three3n2n1n+4.*three2n1n1n+2.*two2n2n | |
2658 | + 4.*three3n2n1n+2.*three4n2n2n)-dMult*(dMult-1.) | |
2659 | * (4.*two1n1n+4.+4.*two1n1n+2.*two2n2n+1.+4.*two1n1n+4.*two2n2n+4.*two3n3n | |
2660 | + 1.+2.*two2n2n+1.*two4n4n)-dMult) | |
2661 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2662 | ||
2663 | six2n2n1n1n1n1n = (reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2664 | * (five4n1n1n1n1n+8.*five2n1n1n1n1n+6.*five2n2n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.) | |
2665 | * (4.*four3n1n1n1n+6.*four4n2n1n1n+12.*three2n1n1n+12.*four1n1n1n1n+24.*four2n1n2n1n | |
2666 | + 4.*four3n1n2n2n+3.*four2n2n2n2n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n | |
2667 | + 4.*three4n3n1n+3.*three4n2n2n+8.*three2n1n1n+24.*two1n1n+12.*two2n2n+12.*three2n1n1n+8.*three3n2n1n | |
2668 | + 1.*three4n2n2n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+2.*two2n2n+8.*two1n1n+6.)-dMult) | |
2669 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2670 | ||
2671 | six3n1n1n1n1n1n = (reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2672 | * (five4n1n1n1n1n+4.*five2n1n1n1n1n+6.*five3n1n2n1n1n+4.*four3n1n1n1n) | |
2673 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+6.*four1n1n1n1n | |
2674 | + 12.*three2n1n1n+12.*four2n1n2n1n+6.*four3n1n1n1n+12.*three3n2n1n+4.*four3n1n3n1n+3.*four3n1n2n2n) | |
2675 | - dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n+4.*three4n3n1n+3.*three4n2n2n+4.*two1n1n | |
2676 | + 12.*two1n1n+6.*three2n1n1n+12.*three2n1n1n+4.*three3n2n1n+12.*two2n2n+4.*three3n2n1n+4.*two3n3n+1.*three4n3n1n | |
2677 | + 6.*three3n2n1n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+1.*two1n1n+4.+6.*two1n1n+4.*two2n2n | |
2678 | + 1.*two3n3n)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2679 | ||
2680 | // average 6-particle correlations for single event: | |
2681 | fIntFlowCorrelationsAllEBE->SetBinContent(24,six1n1n1n1n1n1n); | |
2682 | fIntFlowCorrelationsAllEBE->SetBinContent(25,six2n1n1n2n1n1n); | |
2683 | fIntFlowCorrelationsAllEBE->SetBinContent(26,six2n2n1n1n1n1n); | |
2684 | fIntFlowCorrelationsAllEBE->SetBinContent(27,six3n1n1n1n1n1n); | |
2685 | ||
2686 | // average 6-particle correlations for all events: | |
2687 | fIntFlowCorrelationsAllPro->Fill(23.5,six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2688 | fIntFlowCorrelationsAllPro->Fill(24.5,six2n1n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2689 | fIntFlowCorrelationsAllPro->Fill(25.5,six2n2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2690 | fIntFlowCorrelationsAllPro->Fill(26.5,six3n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2691 | ||
2692 | // store separetately <6> (to be improved: do I really need this?) | |
2693 | fIntFlowCorrelationsEBE->SetBinContent(3,six1n1n1n1n1n1n); // <6> | |
2694 | ||
2695 | // to be improved (this can be implemented better): | |
2696 | Double_t mWeight6p = 0.; | |
2697 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2698 | { | |
2699 | mWeight6p = dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.); | |
2700 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2701 | { | |
2702 | mWeight6p = 1.; | |
2703 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2704 | { | |
2705 | mWeight6p = dMult; | |
2706 | } | |
2707 | ||
2708 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(3,mWeight6p); // eW_<6> | |
2709 | fIntFlowCorrelationsPro->Fill(2.5,six1n1n1n1n1n1n,mWeight6p); | |
9f33751d | 2710 | fIntFlowCorrelationsVsMPro[2]->Fill(fReferenceMultiplicityEBE+0.5,six1n1n1n1n1n1n,mWeight6p); |
489d5531 | 2711 | |
2712 | // distribution of <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2713 | //f6pDistribution->Fill(six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2714 | } // end of if(dMult>5) | |
2715 | ||
2716 | // 7-particle: | |
2717 | Double_t seven2n1n1n1n1n1n1n = 0.; // <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
2718 | ||
2719 | if(dMult>6) | |
2720 | { | |
2721 | seven2n1n1n1n1n1n1n = (reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.) | |
2722 | * (2.*six3n1n1n1n1n1n+4.*six1n1n1n1n1n1n+1.*six2n2n1n1n1n1n+6.*six2n1n1n2n1n1n+8.*five2n1n1n1n1n) | |
2723 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(1.*five4n1n1n1n1n +8.*five2n1n1n1n1n+8.*four3n1n1n1n | |
2724 | + 12.*five3n1n2n1n1n+4.*five2n1n1n1n1n+3.*five2n2n2n1n1n+6.*five2n2n2n1n1n+6.*four1n1n1n1n+24.*four1n1n1n1n | |
2725 | + 12.*five2n1n1n1n1n+12.*five2n1n1n1n1n+12.*three2n1n1n+24.*four2n1n2n1n+4.*five3n1n2n1n1n+4.*five2n1n1n1n1n) | |
2726 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+12.*four1n1n1n1n+24.*three2n1n1n | |
2727 | + 24.*four2n1n2n1n+12.*four3n1n1n1n+24.*three3n2n1n+8.*four3n1n3n1n+6.*four3n1n2n2n+6.*three2n1n1n+12.*four1n1n1n1n | |
2728 | + 12.*four2n1n2n1n+6.*three2n1n1n+12.*four2n1n2n1n+4.*four3n1n2n2n+3.*four2n2n2n2n+4.*four1n1n1n1n+6.*three2n1n1n | |
2729 | + 24.*two1n1n+24.*four1n1n1n1n+4.*four3n1n1n1n+24.*two1n1n+24.*three2n1n1n+12.*two2n2n+24.*three2n1n1n+12.*four2n1n2n1n | |
2730 | + 8.*three3n2n1n+8.*four2n1n2n1n+1.*four4n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+1.*three2n1n1n+8.*two1n1n | |
2731 | + 12.*three3n2n1n+24.*two1n1n+12.*three2n1n1n+4.*three2n1n1n+8.*two1n1n+4.*three4n3n1n+24.*three2n1n1n+8.*three3n2n1n | |
2732 | + 12.*two1n1n+12.*two1n1n+3.*three4n2n2n+24.*two2n2n+6.*two2n2n+12.+12.*three3n2n1n+8.*two3n3n+12.*three2n1n1n+24.*two1n1n | |
2733 | + 4.*three3n2n1n+8.*three3n2n1n+2.*three4n3n1n+12.*two1n1n+8.*three2n1n1n+4.*three2n1n1n+2.*three3n2n1n+6.*two2n2n+8.*two2n2n | |
2734 | + 1.*three4n2n2n+4.*three3n2n1n+6.*three2n1n1n)-dMult*(dMult-1.)*(4.*two1n1n+2.*two1n1n+6.*two2n2n+8.+1.*two2n2n+4.*two3n3n | |
2735 | + 12.*two1n1n+4.*two1n1n+1.*two4n4n+8.*two2n2n+6.+2.*two3n3n+4.*two1n1n+1.*two2n2n)-dMult) | |
2736 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)); // to be improved (direct formula needed) | |
2737 | ||
2738 | // average 7-particle correlations for single event: | |
2739 | fIntFlowCorrelationsAllEBE->SetBinContent(29,seven2n1n1n1n1n1n1n); | |
2740 | ||
2741 | // average 7-particle correlations for all events: | |
2742 | fIntFlowCorrelationsAllPro->Fill(28.5,seven2n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)); | |
2743 | } // end of if(dMult>6) | |
2744 | ||
2745 | // 8-particle: | |
2746 | Double_t eight1n1n1n1n1n1n1n1n = 0.; // <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2747 | if(dMult>7) | |
2748 | { | |
2749 | eight1n1n1n1n1n1n1n1n = (pow(pow(dReQ1n,2.)+pow(dImQ1n,2.),4.)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.) | |
2750 | * (12.*seven2n1n1n1n1n1n1n+16.*six1n1n1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.) | |
2751 | * (8.*six3n1n1n1n1n1n+48.*six1n1n1n1n1n1n+6.*six2n2n1n1n1n1n+96.*five2n1n1n1n1n+72.*four1n1n1n1n+36.*six2n1n1n2n1n1n) | |
2752 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(2.*five4n1n1n1n1n+32.*five2n1n1n1n1n+36.*four1n1n1n1n | |
2753 | + 32.*four3n1n1n1n+48.*five2n1n1n1n1n+48.*five3n1n2n1n1n+144.*five2n1n1n1n1n+288.*four1n1n1n1n+36.*five2n2n2n1n1n | |
2754 | + 144.*three2n1n1n+96.*two1n1n+144.*four2n1n2n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.) | |
2755 | * (8.*four3n1n1n1n+48.*four1n1n1n1n+12.*four4n2n1n1n+96.*four2n1n2n1n+96.*three2n1n1n+72.*three2n1n1n+144.*two1n1n | |
2756 | + 16.*four3n1n3n1n+48.*four3n1n1n1n+144.*four1n1n1n1n+72.*four1n1n1n1n+96.*three3n2n1n+24.*four3n1n2n2n+144.*four2n1n2n1n | |
2757 | + 288.*two1n1n+288.*three2n1n1n+9.*four2n2n2n2n+72.*two2n2n+24.)-dMult*(dMult-1.)*(dMult-2.)*(12.*three2n1n1n+16.*two1n1n | |
2758 | + 24.*three3n2n1n+48.*three2n1n1n+96.*two1n1n+8.*three4n3n1n+32.*three3n2n1n+96.*three2n1n1n+144.*two1n1n+6.*three4n2n2n | |
2759 | + 96.*two2n2n+36.*two2n2n+72.+48.*three3n2n1n+16.*two3n3n+72.*three2n1n1n+144.*two1n1n)-dMult*(dMult-1.)*(8.*two1n1n | |
2760 | + 12.*two2n2n+16.+8.*two3n3n+48.*two1n1n+1.*two4n4n+16.*two2n2n+18.)-dMult) | |
2761 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); // to be improved (direct formula needed) | |
2762 | ||
2763 | // average 8-particle correlations for single event: | |
2764 | fIntFlowCorrelationsAllEBE->SetBinContent(31,eight1n1n1n1n1n1n1n1n); | |
2765 | ||
2766 | // average 8-particle correlations for all events: | |
2767 | fIntFlowCorrelationsAllPro->Fill(30.5,eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); | |
2768 | ||
2769 | // store separetately <8> (to be improved: do I really need this?) | |
2770 | fIntFlowCorrelationsEBE->SetBinContent(4,eight1n1n1n1n1n1n1n1n); // <8> | |
2771 | ||
2772 | // to be improved (this can be implemented better): | |
2773 | Double_t mWeight8p = 0.; | |
2774 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2775 | { | |
2776 | mWeight8p = dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.); | |
2777 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2778 | { | |
2779 | mWeight8p = 1.; | |
2780 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2781 | { | |
2782 | mWeight8p = dMult; | |
2783 | } | |
2784 | ||
2785 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(4,mWeight8p); // eW_<8> | |
2786 | fIntFlowCorrelationsPro->Fill(3.5,eight1n1n1n1n1n1n1n1n,mWeight8p); | |
9f33751d | 2787 | fIntFlowCorrelationsVsMPro[3]->Fill(fReferenceMultiplicityEBE+0.5,eight1n1n1n1n1n1n1n1n,mWeight8p); |
489d5531 | 2788 | |
2789 | // distribution of <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2790 | //f8pDistribution->Fill(eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); | |
2791 | } // end of if(dMult>7) | |
2792 | ||
2793 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations() | |
2794 | ||
2795 | ||
2796 | //================================================================================================================================ | |
2797 | ||
2798 | ||
2799 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrelations() | |
2800 | { | |
0328db2d | 2801 | // Calculate averages of products of correlations for integrated flow. |
489d5531 | 2802 | |
2803 | Int_t counter = 0; | |
2804 | ||
2805 | for(Int_t ci1=1;ci1<4;ci1++) | |
2806 | { | |
2807 | for(Int_t ci2=ci1+1;ci2<=4;ci2++) | |
2808 | { | |
ff70ca91 | 2809 | fIntFlowProductOfCorrelationsPro->Fill(0.5+counter, |
2810 | fIntFlowCorrelationsEBE->GetBinContent(ci1)* | |
2811 | fIntFlowCorrelationsEBE->GetBinContent(ci2), | |
2812 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* | |
2813 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
2814 | // products versus multiplicity: // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>] | |
9f33751d | 2815 | fIntFlowProductOfCorrelationsVsMPro[counter]->Fill(fReferenceMultiplicityEBE+0.5, |
ff70ca91 | 2816 | fIntFlowCorrelationsEBE->GetBinContent(ci1)* |
2817 | fIntFlowCorrelationsEBE->GetBinContent(ci2), | |
2818 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* | |
2819 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
2820 | counter++; | |
489d5531 | 2821 | } |
2822 | } | |
2823 | ||
2824 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrelations() | |
2825 | ||
2826 | ||
2827 | //================================================================================================================================ | |
2828 | ||
2829 | ||
0328db2d | 2830 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrectionTermsForNUA() |
2831 | { | |
2832 | // Calculate averages of products of correction terms for NUA. | |
2833 | ||
2834 | // a) Binning of fIntFlowProductOfCorrectionTermsForNUAPro is organized as follows: | |
2835 | // 1st bin: <<2><cos(phi)>> | |
2836 | // 2nd bin: <<2><sin(phi)>> | |
2837 | // 3rd bin: <<cos(phi)><sin(phi)>> | |
2838 | // 4th bin: <<2><cos(phi1+phi2)>> | |
2839 | // 5th bin: <<2><sin(phi1+phi2)>> | |
2840 | // 6th bin: <<2><cos(phi1-phi2-phi3)>> | |
2841 | // 7th bin: <<2><sin(phi1-phi2-phi3)>> | |
2842 | // 8th bin: <<4><cos(phi1)>> | |
2843 | // 9th bin: <<4><sin(phi1)>> | |
2844 | // 10th bin: <<4><cos(phi1+phi2)>> | |
2845 | // 11th bin: <<4><sin(phi1+phi2)>> | |
2846 | // 12th bin: <<4><cos(phi1-phi2-phi3)>> | |
2847 | // 13th bin: <<4><sin(phi1-phi2-phi3)>> | |
2848 | // 14th bin: <<cos(phi1)><cos(phi1+phi2)>> | |
2849 | // 15th bin: <<cos(phi1)><sin(phi1+phi2)>> | |
2850 | // 16th bin: <<cos(phi1)><cos(phi1-phi2-phi3)>> | |
2851 | // 17th bin: <<cos(phi1)><sin(phi1-phi2-phi3)>> | |
2852 | // 18th bin: <<sin(phi1)><cos(phi1+phi2)>> | |
2853 | // 19th bin: <<sin(phi1)><sin(phi1+phi2)>> | |
2854 | // 20th bin: <<sin(phi1)><cos(phi1-phi2-phi3)>> | |
2855 | // 21st bin: <<sin(phi1)><sin(phi1-phi2-phi3)>> | |
2856 | // 22nd bin: <<cos(phi1+phi2)><sin(phi1+phi2)>> | |
2857 | // 23rd bin: <<cos(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
2858 | // 24th bin: <<cos(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
2859 | // 25th bin: <<sin(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
2860 | // 26th bin: <<sin(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
2861 | // 27th bin: <<cos(phi1-phi2-phi3)><sin(phi1-phi2-phi3)>> | |
2862 | ||
2863 | // <<2><cos(phi)>>: | |
2864 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(0.5, | |
2865 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1), | |
2866 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2867 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
2868 | // <<2><sin(phi)>>: | |
2869 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(1.5, | |
2870 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1), | |
2871 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2872 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
2873 | // <<cos(phi)><sin(phi)>>: | |
2874 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(2.5, | |
2875 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1), | |
2876 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
2877 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
2878 | // <<2><cos(phi1+phi2)>>: | |
2879 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(3.5, | |
2880 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
2881 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2882 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
2883 | // <<2><sin(phi1+phi2)>>: | |
2884 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(4.5, | |
2885 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
2886 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2887 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
2888 | // <<2><cos(phi1-phi2-phi3)>>: | |
2889 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(5.5, | |
2890 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
2891 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2892 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
2893 | // <<2><sin(phi1-phi2-phi3)>>: | |
2894 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(6.5, | |
2895 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
2896 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2897 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
2898 | // <<4><cos(phi1)>>: | |
2899 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(7.5, | |
2900 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1), | |
2901 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2902 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
2903 | // <<4><sin(phi1)>>: | |
2904 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(8.5, | |
2905 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1), | |
2906 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2907 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
2908 | // <<4><cos(phi1+phi2)>>: | |
2909 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(9.5, | |
2910 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
2911 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2912 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
2913 | // <<4><sin(phi1+phi2)>>: | |
2914 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(10.5, | |
2915 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
2916 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2917 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
2918 | // <<4><cos(phi1-phi2-phi3)>>: | |
2919 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(11.5, | |
2920 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
2921 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2922 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
2923 | // <<4><sin(phi1-phi2-phi3)>>: | |
2924 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(12.5, | |
2925 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
2926 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2927 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
2928 | // <<cos(phi1)><cos(phi1+phi2)>>: | |
2929 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(13.5, | |
2930 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
2931 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
2932 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
2933 | // <<cos(phi1)><sin(phi1+phi2)>>: | |
2934 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(14.5, | |
2935 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
2936 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
2937 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
2938 | // <<cos(phi1)><cos(phi1-phi2-phi3)>>: | |
2939 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(15.5, | |
2940 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
2941 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
2942 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
2943 | // <<cos(phi1)><sin(phi1-phi2-phi3)>>: | |
2944 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(16.5, | |
2945 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
2946 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
2947 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
2948 | // <<sin(phi1)><cos(phi1+phi2)>>: | |
2949 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(17.5, | |
2950 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
2951 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
2952 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
2953 | // <<sin(phi1)><sin(phi1+phi2)>>: | |
2954 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(18.5, | |
2955 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
2956 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
2957 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
2958 | // <<sin(phi1)><cos(phi1-phi2-phi3)>>: | |
2959 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(19.5, | |
2960 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
2961 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
2962 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
2963 | // <<sin(phi1)><sin(phi1-phi2-phi3)>>: | |
2964 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(20.5, | |
2965 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
2966 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
2967 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
2968 | // <<cos(phi1+phi2)><sin(phi1+phi2)>>: | |
2969 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(21.5, | |
2970 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
2971 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2) | |
2972 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
2973 | // <<cos(phi1+phi2)><cos(phi1-phi2-phi3)>>: | |
2974 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(22.5, | |
2975 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
2976 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2) | |
2977 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
2978 | // <<cos(phi1+phi2)><sin(phi1-phi2-phi3)>>: | |
2979 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(23.5, | |
2980 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
2981 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2) | |
2982 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
2983 | // <<sin(phi1+phi2)><cos(phi1-phi2-phi3)>>: | |
2984 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(24.5, | |
2985 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
2986 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2) | |
2987 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
2988 | // <<sin(phi1+phi2)><sin(phi1-phi2-phi3)>>: | |
2989 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(25.5, | |
2990 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
2991 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2) | |
2992 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
2993 | // <<cos(phi1-phi2-phi3)><sin(phi1-phi2-phi3)>>: | |
2994 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(26.5, | |
2995 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
2996 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3) | |
2997 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
2998 | ||
2999 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrectionTermsForNUA() | |
3000 | ||
3001 | ||
3002 | //================================================================================================================================ | |
3003 | ||
3004 | ||
489d5531 | 3005 | void AliFlowAnalysisWithQCumulants::CalculateCovariancesIntFlow() |
3006 | { | |
3007 | // a) Calculate unbiased estimators Cov(<2>,<4>), Cov(<2>,<6>), Cov(<2>,<8>), Cov(<4>,<6>), Cov(<4>,<8>) and Cov(<6>,<8>) | |
3008 | // for covariances V_(<2>,<4>), V_(<2>,<6>), V_(<2>,<8>), V_(<4>,<6>), V_(<4>,<8>) and V_(<6>,<8>). | |
3009 | // b) Store in histogram fIntFlowCovariances for instance the following: | |
3010 | // | |
3011 | // 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)] | |
3012 | // | |
3013 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<4>} is event weight for <4>. | |
3014 | // c) Binning of fIntFlowCovariances is organized as follows: | |
3015 | // | |
3016 | // 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)] | |
3017 | // 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)] | |
3018 | // 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)] | |
3019 | // 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)] | |
3020 | // 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)] | |
3021 | // 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)] | |
3022 | ||
3023 | for(Int_t power=0;power<2;power++) | |
3024 | { | |
3025 | if(!(fIntFlowCorrelationsPro && fIntFlowProductOfCorrelationsPro | |
3026 | && fIntFlowSumOfEventWeights[power] && fIntFlowSumOfProductOfEventWeights | |
3027 | && fIntFlowCovariances)) | |
3028 | { | |
3029 | cout<<"WARNING: fIntFlowCorrelationsPro && fIntFlowProductOfCorrelationsPro "<<endl; | |
3030 | cout<<" && fIntFlowSumOfEventWeights[power] && fIntFlowSumOfProductOfEventWeights"<<endl; | |
3031 | cout<<" && fIntFlowCovariances is NULL in AFAWQC::FCIF() !!!!"<<endl; | |
3032 | cout<<"power = "<<power<<endl; | |
3033 | exit(0); | |
3034 | } | |
3035 | } | |
3036 | ||
3037 | // average 2-, 4-, 6- and 8-particle correlations for all events: | |
3038 | Double_t correlation[4] = {0.}; | |
3039 | for(Int_t ci=0;ci<4;ci++) | |
3040 | { | |
3041 | correlation[ci] = fIntFlowCorrelationsPro->GetBinContent(ci+1); | |
3042 | } | |
3043 | // average products of 2-, 4-, 6- and 8-particle correlations: | |
3044 | Double_t productOfCorrelations[4][4] = {{0.}}; | |
3045 | Int_t productOfCorrelationsLabel = 1; | |
3046 | // denominators in the expressions for the unbiased estimator for covariance: | |
3047 | Double_t denominator[4][4] = {{0.}}; | |
3048 | Int_t sumOfProductOfEventWeightsLabel1 = 1; | |
3049 | // weight dependent prefactor which multiply unbiased estimators for covariances: | |
3050 | Double_t wPrefactor[4][4] = {{0.}}; | |
3051 | Int_t sumOfProductOfEventWeightsLabel2 = 1; | |
3052 | for(Int_t c1=0;c1<4;c1++) | |
3053 | { | |
3054 | for(Int_t c2=c1+1;c2<4;c2++) | |
3055 | { | |
3056 | productOfCorrelations[c1][c2] = fIntFlowProductOfCorrelationsPro->GetBinContent(productOfCorrelationsLabel); | |
3057 | if(fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) && fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)) | |
3058 | { | |
3059 | denominator[c1][c2] = 1.-(fIntFlowSumOfProductOfEventWeights->GetBinContent(sumOfProductOfEventWeightsLabel1))/ | |
3060 | (fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) | |
3061 | * fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)); | |
3062 | ||
3063 | wPrefactor[c1][c2] = fIntFlowSumOfProductOfEventWeights->GetBinContent(sumOfProductOfEventWeightsLabel2)/ | |
3064 | (fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) | |
3065 | * fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)); | |
3066 | ||
3067 | ||
3068 | } | |
3069 | productOfCorrelationsLabel++; | |
3070 | sumOfProductOfEventWeightsLabel1++; | |
3071 | sumOfProductOfEventWeightsLabel2++; | |
3072 | } | |
3073 | } | |
3074 | ||
3075 | // covariance label: | |
3076 | Int_t covarianceLabel = 1; | |
3077 | for(Int_t c1=0;c1<4;c1++) | |
3078 | { | |
3079 | for(Int_t c2=c1+1;c2<4;c2++) | |
3080 | { | |
3081 | if(denominator[c1][c2]) | |
3082 | { | |
3083 | // covariances: | |
3084 | Double_t cov = (productOfCorrelations[c1][c2]-correlation[c1]*correlation[c2])/denominator[c1][c2]; | |
3085 | // covarianced multiplied with weight dependent prefactor: | |
3086 | Double_t wCov = cov * wPrefactor[c1][c2]; | |
3087 | fIntFlowCovariances->SetBinContent(covarianceLabel,wCov); | |
3088 | } | |
3089 | covarianceLabel++; | |
3090 | } | |
3091 | } | |
3092 | ||
9da1a4f3 | 3093 | // versus multiplicity: |
3094 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) | |
3095 | for(Int_t b=1;b<=nBins;b++) | |
3096 | { | |
3097 | // average 2-, 4-, 6- and 8-particle correlations for all events: | |
3098 | Double_t correlationVsM[4] = {0.}; | |
3099 | for(Int_t ci=0;ci<4;ci++) | |
3100 | { | |
3101 | correlationVsM[ci] = fIntFlowCorrelationsVsMPro[ci]->GetBinContent(b); | |
3102 | } // end of for(Int_t ci=0;ci<4;ci++) | |
3103 | // average products of 2-, 4-, 6- and 8-particle correlations: | |
3104 | Double_t productOfCorrelationsVsM[4][4] = {{0.}}; | |
3105 | Int_t productOfCorrelationsLabelVsM = 1; | |
3106 | // denominators in the expressions for the unbiased estimator for covariance: | |
3107 | Double_t denominatorVsM[4][4] = {{0.}}; | |
3108 | Int_t sumOfProductOfEventWeightsLabel1VsM = 1; | |
3109 | // weight dependent prefactor which multiply unbiased estimators for covariances: | |
3110 | Double_t wPrefactorVsM[4][4] = {{0.}}; | |
3111 | Int_t sumOfProductOfEventWeightsLabel2VsM = 1; | |
3112 | for(Int_t c1=0;c1<4;c1++) | |
3113 | { | |
3114 | for(Int_t c2=c1+1;c2<4;c2++) | |
3115 | { | |
3116 | productOfCorrelationsVsM[c1][c2] = fIntFlowProductOfCorrelationsVsMPro[productOfCorrelationsLabelVsM-1]->GetBinContent(b); | |
3117 | if(fIntFlowSumOfEventWeightsVsM[c1][0]->GetBinContent(b) && fIntFlowSumOfEventWeightsVsM[c2][0]->GetBinContent(b)) | |
3118 | { | |
3119 | denominatorVsM[c1][c2] = 1.-(fIntFlowSumOfProductOfEventWeightsVsM[sumOfProductOfEventWeightsLabel1VsM-1]->GetBinContent(b))/ | |
3120 | (fIntFlowSumOfEventWeightsVsM[c1][0]->GetBinContent(b) | |
3121 | * fIntFlowSumOfEventWeightsVsM[c2][0]->GetBinContent(b)); | |
3122 | ||
3123 | wPrefactorVsM[c1][c2] = fIntFlowSumOfProductOfEventWeightsVsM[sumOfProductOfEventWeightsLabel2VsM-1]->GetBinContent(b)/ | |
3124 | (fIntFlowSumOfEventWeightsVsM[c1][0]->GetBinContent(b) | |
3125 | * fIntFlowSumOfEventWeightsVsM[c2][0]->GetBinContent(b)); | |
3126 | ||
3127 | ||
3128 | } | |
3129 | productOfCorrelationsLabelVsM++; | |
3130 | sumOfProductOfEventWeightsLabel1VsM++; | |
3131 | sumOfProductOfEventWeightsLabel2VsM++; | |
3132 | } // end of for(Int_t c1=0;c1<4;c1++) | |
3133 | } // end of for(Int_t c2=c1+1;c2<4;c2++) | |
3134 | // covariance label: | |
3135 | Int_t covarianceLabelVsM = 1; | |
3136 | for(Int_t c1=0;c1<4;c1++) | |
3137 | { | |
3138 | for(Int_t c2=c1+1;c2<4;c2++) | |
3139 | { | |
3140 | if(denominatorVsM[c1][c2]) | |
3141 | { | |
3142 | // covariances: | |
3143 | Double_t covVsM = (productOfCorrelationsVsM[c1][c2]-correlationVsM[c1]*correlationVsM[c2])/denominatorVsM[c1][c2]; | |
3144 | // covarianced multiplied with weight dependent prefactor: | |
3145 | Double_t wCovVsM = covVsM * wPrefactorVsM[c1][c2]; | |
3146 | fIntFlowCovariancesVsM[covarianceLabelVsM-1]->SetBinContent(b,wCovVsM); | |
3147 | } | |
3148 | covarianceLabelVsM++; | |
3149 | } | |
3150 | } | |
3151 | } // end of for(Int_t b=1;b<=nBins;b++) | |
3152 | ||
489d5531 | 3153 | } // end of AliFlowAnalysisWithQCumulants::CalculateCovariancesIntFlow() |
3154 | ||
489d5531 | 3155 | //================================================================================================================================ |
3156 | ||
0328db2d | 3157 | void AliFlowAnalysisWithQCumulants::CalculateCovariancesNUAIntFlow() |
3158 | { | |
3159 | // a) Calculate unbiased estimators Cov(*,*) for true covariances V_(*,*) for NUA terms. | |
3160 | // b) Store in histogram fIntFlowCovariancesNUA for instance the following: | |
3161 | // | |
3162 | // Cov(<2>,<cos(phi)>) * (sum_{i=1}^{N} w_{<2>}_i w_{<cos(phi)>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<cos(phi)>}_j)] | |
3163 | // | |
3164 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<cos(phi)>} is event weight for <cos(phi)>. | |
3165 | // c) Binning of fIntFlowCovariancesNUA is organized as follows: | |
3166 | // | |
3167 | // 1st bin: Cov(<2>,<cos(phi)>) * (sum_{i=1}^{N} w_{<2>}_i w_{<cos(phi)>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<cos(phi)>}_j)] | |
3168 | // 2nd bin: Cov(<2>,<sin(phi)>) * (sum_{i=1}^{N} w_{<2>}_i w_{<sin(phi)>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<sin(phi)>}_j)] | |
3169 | // 3rd bin: Cov(<cos(phi)>,<sin(phi)>) * (sum_{i=1}^{N} w_{<cos(phi)>}_i w_{<sin(phi)>}_i )/[(sum_{i=1}^{N} w_{<cos(phi)>}_i) * (sum_{j=1}^{N} w_{<sin(phi)>}_j)] | |
3170 | // ... | |
3171 | ||
3172 | // Cov(<2>,<cos(phi)>): | |
3173 | Double_t product1 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(1); // <<2><cos(phi)>> | |
3174 | Double_t term1st1 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3175 | Double_t term2nd1 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi)>> | |
3176 | Double_t sumOfW1st1 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3177 | Double_t sumOfW2nd1 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi)>} | |
3178 | Double_t sumOfWW1 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(1); // W_{<2>} * W_{<cos(phi)>} | |
3179 | // numerator in the expression for the the unbiased estimator for covariance: | |
3180 | Double_t numerator1 = product1 - term1st1*term2nd1; | |
3181 | // denominator in the expression for the the unbiased estimator for covariance: | |
3182 | Double_t denominator1 = 1.-sumOfWW1/(sumOfW1st1*sumOfW2nd1); | |
3183 | // covariance: | |
3184 | Double_t covariance1 = numerator1/denominator1; | |
3185 | // weight dependent prefactor for covariance: | |
3186 | Double_t wPrefactor1 = sumOfWW1/(sumOfW1st1*sumOfW2nd1); | |
3187 | // finally, store "weighted" covariance: | |
3188 | fIntFlowCovariancesNUA->SetBinContent(1,wPrefactor1*covariance1); | |
3189 | ||
3190 | // Cov(<2>,<sin(phi)>): | |
3191 | Double_t product2 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(2); // <<2><sin(phi)>> | |
3192 | Double_t term1st2 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3193 | Double_t term2nd2 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi)>> | |
3194 | Double_t sumOfW1st2 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3195 | Double_t sumOfW2nd2 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi)>} | |
3196 | Double_t sumOfWW2 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(2); // W_{<2>} * W_{<sin(phi)>} | |
3197 | // numerator in the expression for the the unbiased estimator for covariance: | |
3198 | Double_t numerator2 = product2 - term1st2*term2nd2; | |
3199 | // denominator in the expression for the the unbiased estimator for covariance: | |
3200 | Double_t denominator2 = 1.-sumOfWW2/(sumOfW1st2*sumOfW2nd2); | |
3201 | // covariance: | |
3202 | Double_t covariance2 = numerator2/denominator2; | |
3203 | // weight dependent prefactor for covariance: | |
3204 | Double_t wPrefactor2 = sumOfWW2/(sumOfW1st2*sumOfW2nd2); | |
3205 | // finally, store "weighted" covariance: | |
3206 | fIntFlowCovariancesNUA->SetBinContent(2,wPrefactor2*covariance2); | |
3207 | ||
3208 | // Cov(<cos(phi)>,<sin(phi)>): | |
3209 | Double_t product3 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(3); // <<cos(phi)><sin(phi)>> | |
3210 | Double_t term1st3 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi)>> | |
3211 | Double_t term2nd3 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi)>> | |
3212 | Double_t sumOfW1st3 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi)>} | |
3213 | Double_t sumOfW2nd3 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi)>} | |
3214 | Double_t sumOfWW3 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(3); // W_{<cos(phi)>} * W_{<sin(phi)>} | |
3215 | // numerator in the expression for the the unbiased estimator for covariance: | |
3216 | Double_t numerator3 = product3 - term1st3*term2nd3; | |
3217 | // denominator in the expression for the the unbiased estimator for covariance: | |
3218 | Double_t denominator3 = 1.-sumOfWW3/(sumOfW1st3*sumOfW2nd3); | |
3219 | // covariance: | |
3220 | Double_t covariance3 = numerator3/denominator3; | |
3221 | // weight dependent prefactor for covariance: | |
3222 | Double_t wPrefactor3 = sumOfWW3/(sumOfW1st3*sumOfW2nd3); | |
3223 | // finally, store "weighted" covariance: | |
3224 | fIntFlowCovariancesNUA->SetBinContent(3,wPrefactor3*covariance3); | |
3225 | ||
3226 | // Cov(<2>,<cos(phi1+phi2)>): | |
3227 | Double_t product4 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(4); // <<2><cos(phi1+phi2)>> | |
3228 | Double_t term1st4 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3229 | Double_t term2nd4 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3230 | Double_t sumOfW1st4 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3231 | Double_t sumOfW2nd4 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3232 | Double_t sumOfWW4 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(4); // W_{<2>} * W_{<cos(phi1+phi2)>} | |
3233 | // numerator in the expression for the the unbiased estimator for covariance: | |
3234 | Double_t numerator4 = product4 - term1st4*term2nd4; | |
3235 | // denominator in the expression for the the unbiased estimator for covariance: | |
3236 | Double_t denominator4 = 1.-sumOfWW4/(sumOfW1st4*sumOfW2nd4); | |
3237 | // covariance: | |
3238 | Double_t covariance4 = numerator4/denominator4; | |
3239 | // weight dependent prefactor for covariance: | |
3240 | Double_t wPrefactor4 = sumOfWW4/(sumOfW1st4*sumOfW2nd4); | |
3241 | // finally, store "weighted" covariance: | |
3242 | fIntFlowCovariancesNUA->SetBinContent(4,wPrefactor4*covariance4); | |
3243 | ||
3244 | // Cov(<2>,<sin(phi1+phi2)>): | |
3245 | Double_t product5 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(5); // <<2><sin(phi1+phi2)>> | |
3246 | Double_t term1st5 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3247 | Double_t term2nd5 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3248 | Double_t sumOfW1st5 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3249 | Double_t sumOfW2nd5 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3250 | Double_t sumOfWW5 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(5); // W_{<2>} * W_{<sin(phi1+phi2)>} | |
3251 | // numerator in the expression for the the unbiased estimator for covariance: | |
3252 | Double_t numerator5 = product5 - term1st5*term2nd5; | |
3253 | // denominator in the expression for the the unbiased estimator for covariance: | |
3254 | Double_t denominator5 = 1.-sumOfWW5/(sumOfW1st5*sumOfW2nd5); | |
3255 | // covariance: | |
3256 | Double_t covariance5 = numerator5/denominator5; | |
3257 | // weight dependent prefactor for covariance: | |
3258 | Double_t wPrefactor5 = sumOfWW5/(sumOfW1st5*sumOfW2nd5); | |
3259 | // finally, store "weighted" covariance: | |
3260 | fIntFlowCovariancesNUA->SetBinContent(5,wPrefactor5*covariance5); | |
3261 | ||
3262 | // Cov(<2>,<cos(phi1-phi2-phi3)>): | |
3263 | Double_t product6 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(6); // <<2><cos(phi1-phi2-phi3)>> | |
3264 | Double_t term1st6 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3265 | Double_t term2nd6 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3266 | Double_t sumOfW1st6 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3267 | Double_t sumOfW2nd6 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3268 | Double_t sumOfWW6 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(6); // W_{<2>} * W_{<cos(phi1-phi2-phi3)>} | |
3269 | // numerator in the expression for the the unbiased estimator for covariance: | |
3270 | Double_t numerator6 = product6 - term1st6*term2nd6; | |
3271 | // denominator in the expression for the the unbiased estimator for covariance: | |
3272 | Double_t denominator6 = 1.-sumOfWW6/(sumOfW1st6*sumOfW2nd6); | |
3273 | // covariance: | |
3274 | Double_t covariance6 = numerator6/denominator6; | |
3275 | // weight dependent prefactor for covariance: | |
3276 | Double_t wPrefactor6 = sumOfWW6/(sumOfW1st6*sumOfW2nd6); | |
3277 | // finally, store "weighted" covariance: | |
3278 | fIntFlowCovariancesNUA->SetBinContent(6,wPrefactor6*covariance6); | |
3279 | ||
3280 | // Cov(<2>,<sin(phi1-phi2-phi3)>): | |
3281 | Double_t product7 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(7); // <<2><sin(phi1-phi2-phi3)>> | |
3282 | Double_t term1st7 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3283 | Double_t term2nd7 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3284 | Double_t sumOfW1st7 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3285 | Double_t sumOfW2nd7 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3286 | Double_t sumOfWW7 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(7); // W_{<2>} * W_{<sin(phi1-phi2-phi3)>} | |
3287 | // numerator in the expression for the the unbiased estimator for covariance: | |
3288 | Double_t numerator7 = product7 - term1st7*term2nd7; | |
3289 | // denominator in the expression for the the unbiased estimator for covariance: | |
3290 | Double_t denominator7 = 1.-sumOfWW7/(sumOfW1st7*sumOfW2nd7); | |
3291 | // covariance: | |
3292 | Double_t covariance7 = numerator7/denominator7; | |
3293 | // weight dependent prefactor for covariance: | |
3294 | Double_t wPrefactor7 = sumOfWW7/(sumOfW1st7*sumOfW2nd7); | |
3295 | // finally, store "weighted" covariance: | |
3296 | fIntFlowCovariancesNUA->SetBinContent(7,wPrefactor7*covariance7); | |
3297 | ||
3298 | // Cov(<4>,<cos(phi1>): | |
3299 | Double_t product8 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(8); // <<4><cos(phi1)>> | |
3300 | Double_t term1st8 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3301 | Double_t term2nd8 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3302 | Double_t sumOfW1st8 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3303 | Double_t sumOfW2nd8 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3304 | Double_t sumOfWW8 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(8); // W_{<4>} * W_{<cos(phi1)>} | |
3305 | // numerator in the expression for the the unbiased estimator for covariance: | |
3306 | Double_t numerator8 = product8 - term1st8*term2nd8; | |
3307 | // denominator in the expression for the the unbiased estimator for covariance: | |
3308 | Double_t denominator8 = 1.-sumOfWW8/(sumOfW1st8*sumOfW2nd8); | |
3309 | // covariance: | |
3310 | Double_t covariance8 = numerator8/denominator8; | |
3311 | // weight dependent prefactor for covariance: | |
3312 | Double_t wPrefactor8 = sumOfWW8/(sumOfW1st8*sumOfW2nd8); | |
3313 | // finally, store "weighted" covariance: | |
3314 | fIntFlowCovariancesNUA->SetBinContent(8,wPrefactor8*covariance8); | |
3315 | ||
3316 | // Cov(<4>,<sin(phi1)>): | |
3317 | Double_t product9 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(9); // <<4><sin(phi1)>> | |
3318 | Double_t term1st9 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3319 | Double_t term2nd9 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3320 | Double_t sumOfW1st9 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3321 | Double_t sumOfW2nd9 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3322 | Double_t sumOfWW9 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(9); // W_{<4>} * W_{<sin(phi1)>} | |
3323 | // numerator in the expression for the the unbiased estimator for covariance: | |
3324 | Double_t numerator9 = product9 - term1st9*term2nd9; | |
3325 | // denominator in the expression for the the unbiased estimator for covariance: | |
3326 | Double_t denominator9 = 1.-sumOfWW9/(sumOfW1st9*sumOfW2nd9); | |
3327 | // covariance: | |
3328 | Double_t covariance9 = numerator9/denominator9; | |
3329 | // weight dependent prefactor for covariance: | |
3330 | Double_t wPrefactor9 = sumOfWW9/(sumOfW1st9*sumOfW2nd9); | |
3331 | // finally, store "weighted" covariance: | |
3332 | fIntFlowCovariancesNUA->SetBinContent(9,wPrefactor9*covariance9); | |
3333 | ||
3334 | // Cov(<4>,<cos(phi1+phi2)>): | |
3335 | Double_t product10 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(10); // <<4><cos(phi1+phi2)>> | |
3336 | Double_t term1st10 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3337 | Double_t term2nd10 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3338 | Double_t sumOfW1st10 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3339 | Double_t sumOfW2nd10 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3340 | Double_t sumOfWW10 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(10); // W_{<4>} * W_{<cos(phi1+phi2)>} | |
3341 | // numerator in the expression for the the unbiased estimator for covariance: | |
3342 | Double_t numerator10 = product10 - term1st10*term2nd10; | |
3343 | // denominator in the expression for the the unbiased estimator for covariance: | |
3344 | Double_t denominator10 = 1.-sumOfWW10/(sumOfW1st10*sumOfW2nd10); | |
3345 | // covariance: | |
3346 | Double_t covariance10 = numerator10/denominator10; | |
3347 | // weight dependent prefactor for covariance: | |
3348 | Double_t wPrefactor10 = sumOfWW10/(sumOfW1st10*sumOfW2nd10); | |
3349 | // finally, store "weighted" covariance: | |
3350 | fIntFlowCovariancesNUA->SetBinContent(10,wPrefactor10*covariance10); | |
3351 | ||
3352 | // Cov(<4>,<sin(phi1+phi2)>): | |
3353 | Double_t product11 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(11); // <<4><sin(phi1+phi2)>> | |
3354 | Double_t term1st11 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3355 | Double_t term2nd11 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3356 | Double_t sumOfW1st11 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3357 | Double_t sumOfW2nd11 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3358 | Double_t sumOfWW11 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(11); // W_{<4>} * W_{<sin(phi1+phi2)>} | |
3359 | // numerator in the expression for the the unbiased estimator for covariance: | |
3360 | Double_t numerator11 = product11 - term1st11*term2nd11; | |
3361 | // denominator in the expression for the the unbiased estimator for covariance: | |
3362 | Double_t denominator11 = 1.-sumOfWW11/(sumOfW1st11*sumOfW2nd11); | |
3363 | // covariance: | |
3364 | Double_t covariance11 = numerator11/denominator11; | |
3365 | // weight dependent prefactor for covariance: | |
3366 | Double_t wPrefactor11 = sumOfWW11/(sumOfW1st11*sumOfW2nd11); | |
3367 | // finally, store "weighted" covariance: | |
3368 | fIntFlowCovariancesNUA->SetBinContent(11,wPrefactor11*covariance11); | |
3369 | ||
3370 | // Cov(<4>,<cos(phi1-phi2-phi3)>): | |
3371 | Double_t product12 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(12); // <<4><cos(phi1-phi2-phi3)>> | |
3372 | Double_t term1st12 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3373 | Double_t term2nd12 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3374 | Double_t sumOfW1st12 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3375 | Double_t sumOfW2nd12 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3376 | Double_t sumOfWW12 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(12); // W_{<4>} * W_{<cos(phi1-phi2-phi3)>} | |
3377 | // numerator in the expression for the the unbiased estimator for covariance: | |
3378 | Double_t numerator12 = product12 - term1st12*term2nd12; | |
3379 | // denominator in the expression for the the unbiased estimator for covariance: | |
3380 | Double_t denominator12 = 1.-sumOfWW12/(sumOfW1st12*sumOfW2nd12); | |
3381 | // covariance: | |
3382 | Double_t covariance12 = numerator12/denominator12; | |
3383 | // weight dependent prefactor for covariance: | |
3384 | Double_t wPrefactor12 = sumOfWW12/(sumOfW1st12*sumOfW2nd12); | |
3385 | // finally, store "weighted" covariance: | |
3386 | fIntFlowCovariancesNUA->SetBinContent(12,wPrefactor12*covariance12); | |
3387 | ||
3388 | // Cov(<4>,<sin(phi1-phi2-phi3)>): | |
3389 | Double_t product13 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(13); // <<4><sin(phi1-phi2-phi3)>> | |
3390 | Double_t term1st13 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3391 | Double_t term2nd13 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3392 | Double_t sumOfW1st13 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3393 | Double_t sumOfW2nd13 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3394 | Double_t sumOfWW13 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(13); // W_{<4>} * W_{<sin(phi1-phi2-phi3)>} | |
3395 | // numerator in the expression for the the unbiased estimator for covariance: | |
3396 | Double_t numerator13 = product13 - term1st13*term2nd13; | |
3397 | // denominator in the expression for the the unbiased estimator for covariance: | |
3398 | Double_t denominator13 = 1.-sumOfWW13/(sumOfW1st13*sumOfW2nd13); | |
3399 | // covariance: | |
3400 | Double_t covariance13 = numerator13/denominator13; | |
3401 | // weight dependent prefactor for covariance: | |
3402 | Double_t wPrefactor13 = sumOfWW13/(sumOfW1st13*sumOfW2nd13); | |
3403 | // finally, store "weighted" covariance: | |
3404 | fIntFlowCovariancesNUA->SetBinContent(13,wPrefactor13*covariance13); | |
3405 | ||
3406 | // Cov(<cos(phi1)>,<cos(phi1+phi2)>): | |
3407 | Double_t product14 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(14); // <<cos(phi1)><cos(phi1+phi2)>> | |
3408 | Double_t term1st14 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3409 | Double_t term2nd14 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3410 | Double_t sumOfW1st14 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3411 | Double_t sumOfW2nd14 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3412 | Double_t sumOfWW14 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(14); // W_{<cos(phi1)>} * W_{<cos(phi1+phi2)>} | |
3413 | // numerator in the expression for the the unbiased estimator for covariance: | |
3414 | Double_t numerator14 = product14 - term1st14*term2nd14; | |
3415 | // denominator in the expression for the the unbiased estimator for covariance: | |
3416 | Double_t denominator14 = 1.-sumOfWW14/(sumOfW1st14*sumOfW2nd14); | |
3417 | // covariance: | |
3418 | Double_t covariance14 = numerator14/denominator14; | |
3419 | // weight dependent prefactor for covariance: | |
3420 | Double_t wPrefactor14 = sumOfWW14/(sumOfW1st14*sumOfW2nd14); | |
3421 | // finally, store "weighted" covariance: | |
3422 | fIntFlowCovariancesNUA->SetBinContent(14,wPrefactor14*covariance14); | |
3423 | ||
3424 | // Cov(<cos(phi1)>,<sin(phi1+phi2)>): | |
3425 | Double_t product15 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(15); // <<cos(phi1)><sin(phi1+phi2)>> | |
3426 | Double_t term1st15 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3427 | Double_t term2nd15 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3428 | Double_t sumOfW1st15 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3429 | Double_t sumOfW2nd15 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3430 | Double_t sumOfWW15 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(15); // W_{<cos(phi1)>} * W_{<sin(phi1+phi2)>} | |
3431 | // numerator in the expression for the the unbiased estimator for covariance: | |
3432 | Double_t numerator15 = product15 - term1st15*term2nd15; | |
3433 | // denominator in the expression for the the unbiased estimator for covariance: | |
3434 | Double_t denominator15 = 1.-sumOfWW15/(sumOfW1st15*sumOfW2nd15); | |
3435 | // covariance: | |
3436 | Double_t covariance15 = numerator15/denominator15; | |
3437 | // weight dependent prefactor for covariance: | |
3438 | Double_t wPrefactor15 = sumOfWW15/(sumOfW1st15*sumOfW2nd15); | |
3439 | // finally, store "weighted" covariance: | |
3440 | fIntFlowCovariancesNUA->SetBinContent(15,wPrefactor15*covariance15); | |
3441 | ||
3442 | // Cov(<cos(phi1)>,<cos(phi1-phi2-phi3)>): | |
3443 | Double_t product16 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(16); // <<cos(phi1)><cos(phi1-phi2-phi3)>> | |
3444 | Double_t term1st16 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3445 | Double_t term2nd16 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3446 | Double_t sumOfW1st16 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3447 | Double_t sumOfW2nd16 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3448 | Double_t sumOfWW16 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(16); // W_{<cos(phi1)>} * W_{<cos(phi1-phi2-phi3)>} | |
3449 | // numerator in the expression for the the unbiased estimator for covariance: | |
3450 | Double_t numerator16 = product16 - term1st16*term2nd16; | |
3451 | // denominator in the expression for the the unbiased estimator for covariance: | |
3452 | Double_t denominator16 = 1.-sumOfWW16/(sumOfW1st16*sumOfW2nd16); | |
3453 | // covariance: | |
3454 | Double_t covariance16 = numerator16/denominator16; | |
3455 | // weight dependent prefactor for covariance: | |
3456 | Double_t wPrefactor16 = sumOfWW16/(sumOfW1st16*sumOfW2nd16); | |
3457 | // finally, store "weighted" covariance: | |
3458 | fIntFlowCovariancesNUA->SetBinContent(16,wPrefactor16*covariance16); | |
3459 | ||
3460 | // Cov(<cos(phi1)>,<sin(phi1-phi2-phi3)>): | |
3461 | Double_t product17 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(17); // <<cos(phi1)><sin(phi1-phi2-phi3)>> | |
3462 | Double_t term1st17 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3463 | Double_t term2nd17 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3464 | Double_t sumOfW1st17 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3465 | Double_t sumOfW2nd17 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3466 | Double_t sumOfWW17 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(17); // W_{<cos(phi1)>} * W_{<sin(phi1-phi2-phi3)>} | |
3467 | // numerator in the expression for the the unbiased estimator for covariance: | |
3468 | Double_t numerator17 = product17 - term1st17*term2nd17; | |
3469 | // denominator in the expression for the the unbiased estimator for covariance: | |
3470 | Double_t denominator17 = 1.-sumOfWW17/(sumOfW1st17*sumOfW2nd17); | |
3471 | // covariance: | |
3472 | Double_t covariance17 = numerator17/denominator17; | |
3473 | // weight dependent prefactor for covariance: | |
3474 | Double_t wPrefactor17 = sumOfWW17/(sumOfW1st17*sumOfW2nd17); | |
3475 | // finally, store "weighted" covariance: | |
3476 | fIntFlowCovariancesNUA->SetBinContent(17,wPrefactor17*covariance17); | |
3477 | ||
3478 | // Cov(<sin(phi1)>,<cos(phi1+phi2)>): | |
3479 | Double_t product18 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(18); // <<sin(phi1)><cos(phi1+phi2)>> | |
3480 | Double_t term1st18 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3481 | Double_t term2nd18 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3482 | Double_t sumOfW1st18 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3483 | Double_t sumOfW2nd18 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3484 | Double_t sumOfWW18 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(18); // W_{<sin(phi1)>} * W_{<cos(phi1+phi2)>} | |
3485 | // numerator in the expression for the the unbiased estimator for covariance: | |
3486 | Double_t numerator18 = product18 - term1st18*term2nd18; | |
3487 | // denominator in the expression for the the unbiased estimator for covariance: | |
3488 | Double_t denominator18 = 1.-sumOfWW18/(sumOfW1st18*sumOfW2nd18); | |
3489 | // covariance: | |
3490 | Double_t covariance18 = numerator18/denominator18; | |
3491 | // weight dependent prefactor for covariance: | |
3492 | Double_t wPrefactor18 = sumOfWW18/(sumOfW1st18*sumOfW2nd18); | |
3493 | // finally, store "weighted" covariance: | |
3494 | fIntFlowCovariancesNUA->SetBinContent(18,wPrefactor18*covariance18); | |
3495 | ||
3496 | // Cov(<sin(phi1)>,<sin(phi1+phi2)>): | |
3497 | Double_t product19 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(19); // <<sin(phi1)><sin(phi1+phi2)>> | |
3498 | Double_t term1st19 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3499 | Double_t term2nd19 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3500 | Double_t sumOfW1st19 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3501 | Double_t sumOfW2nd19 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3502 | Double_t sumOfWW19 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(19); // W_{<sin(phi1)>} * W_{<sin(phi1+phi2)>} | |
3503 | // numerator in the expression for the the unbiased estimator for covariance: | |
3504 | Double_t numerator19 = product19 - term1st19*term2nd19; | |
3505 | // denominator in the expression for the the unbiased estimator for covariance: | |
3506 | Double_t denominator19 = 1.-sumOfWW19/(sumOfW1st19*sumOfW2nd19); | |
3507 | // covariance: | |
3508 | Double_t covariance19 = numerator19/denominator19; | |
3509 | // weight dependent prefactor for covariance: | |
3510 | Double_t wPrefactor19 = sumOfWW19/(sumOfW1st19*sumOfW2nd19); | |
3511 | // finally, store "weighted" covariance: | |
3512 | fIntFlowCovariancesNUA->SetBinContent(19,wPrefactor19*covariance19); | |
3513 | ||
3514 | // Cov(<sin(phi1)>,<cos(phi1-phi2-phi3)>): | |
3515 | Double_t product20 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(20); // <<sin(phi1)><cos(phi1-phi2-phi3)>> | |
3516 | Double_t term1st20 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3517 | Double_t term2nd20 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3518 | Double_t sumOfW1st20 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3519 | Double_t sumOfW2nd20 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3520 | Double_t sumOfWW20 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(20); // W_{<sin(phi1)>} * W_{<cos(phi1-phi2-phi3)>} | |
3521 | // numerator in the expression for the the unbiased estimator for covariance: | |
3522 | Double_t numerator20 = product20 - term1st20*term2nd20; | |
3523 | // denominator in the expression for the the unbiased estimator for covariance: | |
3524 | Double_t denominator20 = 1.-sumOfWW20/(sumOfW1st20*sumOfW2nd20); | |
3525 | // covariance: | |
3526 | Double_t covariance20 = numerator20/denominator20; | |
3527 | // weight dependent prefactor for covariance: | |
3528 | Double_t wPrefactor20 = sumOfWW20/(sumOfW1st20*sumOfW2nd20); | |
3529 | // finally, store "weighted" covariance: | |
3530 | fIntFlowCovariancesNUA->SetBinContent(20,wPrefactor20*covariance20); | |
3531 | ||
3532 | // Cov(<sin(phi1)>,<sin(phi1-phi2-phi3)>): | |
3533 | Double_t product21 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(21); // <<sin(phi1)><sin(phi1-phi2-phi3)>> | |
3534 | Double_t term1st21 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3535 | Double_t term2nd21 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3536 | Double_t sumOfW1st21 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3537 | Double_t sumOfW2nd21 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3538 | Double_t sumOfWW21 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(21); // W_{<sin(phi1)>} * W_{<sin(phi1-phi2-phi3)>} | |
3539 | // numerator in the expression for the the unbiased estimator for covariance: | |
3540 | Double_t numerator21 = product21 - term1st21*term2nd21; | |
3541 | // denominator in the expression for the the unbiased estimator for covariance: | |
3542 | Double_t denominator21 = 1.-sumOfWW21/(sumOfW1st21*sumOfW2nd21); | |
3543 | // covariance: | |
3544 | Double_t covariance21 = numerator21/denominator21; | |
3545 | // weight dependent prefactor for covariance: | |
3546 | Double_t wPrefactor21 = sumOfWW21/(sumOfW1st21*sumOfW2nd21); | |
3547 | // finally, store "weighted" covariance: | |
3548 | fIntFlowCovariancesNUA->SetBinContent(21,wPrefactor21*covariance21); | |
3549 | ||
3550 | // Cov(<cos(phi1+phi2)>,<sin(phi1+phi2)>): | |
3551 | Double_t product22 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(22); // <<cos(phi1+phi2)><sin(phi1+phi2)>> | |
3552 | Double_t term1st22 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3553 | Double_t term2nd22 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3554 | Double_t sumOfW1st22 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3555 | Double_t sumOfW2nd22 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3556 | Double_t sumOfWW22 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(22); // W_{<cos(phi1+phi2)>} * W_{<sin(phi1+phi2)>} | |
3557 | // numerator in the expression for the the unbiased estimator for covariance: | |
3558 | Double_t numerator22 = product22 - term1st22*term2nd22; | |
3559 | // denominator in the expression for the the unbiased estimator for covariance: | |
3560 | Double_t denominator22 = 1.-sumOfWW22/(sumOfW1st22*sumOfW2nd22); | |
3561 | // covariance: | |
3562 | Double_t covariance22 = numerator22/denominator22; | |
3563 | // weight dependent prefactor for covariance: | |
3564 | Double_t wPrefactor22 = sumOfWW22/(sumOfW1st22*sumOfW2nd22); | |
3565 | // finally, store "weighted" covariance: | |
3566 | fIntFlowCovariancesNUA->SetBinContent(22,wPrefactor22*covariance22); | |
3567 | ||
3568 | // Cov(<cos(phi1+phi2)>,<cos(phi1-phi2-phi3)>): | |
3569 | Double_t product23 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(23); // <<cos(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
3570 | Double_t term1st23 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3571 | Double_t term2nd23 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3572 | Double_t sumOfW1st23 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3573 | Double_t sumOfW2nd23 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3574 | Double_t sumOfWW23 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(23); // W_{<cos(phi1+phi2)>} * W_{<cos(phi1-phi2-phi3)>} | |
3575 | // numerator in the expression for the the unbiased estimator for covariance: | |
3576 | Double_t numerator23 = product23 - term1st23*term2nd23; | |
3577 | // denominator in the expression for the the unbiased estimator for covariance: | |
3578 | Double_t denominator23 = 1.-sumOfWW23/(sumOfW1st23*sumOfW2nd23); | |
3579 | // covariance: | |
3580 | Double_t covariance23 = numerator23/denominator23; | |
3581 | // weight dependent prefactor for covariance: | |
3582 | Double_t wPrefactor23 = sumOfWW23/(sumOfW1st23*sumOfW2nd23); | |
3583 | // finally, store "weighted" covariance: | |
3584 | fIntFlowCovariancesNUA->SetBinContent(23,wPrefactor23*covariance23); | |
3585 | ||
3586 | // Cov(<cos(phi1+phi2)>,<sin(phi1-phi2-phi3)>): | |
3587 | Double_t product24 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(24); // <<cos(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
3588 | Double_t term1st24 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3589 | Double_t term2nd24 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3590 | Double_t sumOfW1st24 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3591 | Double_t sumOfW2nd24 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3592 | Double_t sumOfWW24 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(24); // W_{<cos(phi1+phi2)>} * W_{<sin(phi1-phi2-phi3)>} | |
3593 | // numerator in the expression for the the unbiased estimator for covariance: | |
3594 | Double_t numerator24 = product24 - term1st24*term2nd24; | |
3595 | // denominator in the expression for the the unbiased estimator for covariance: | |
3596 | Double_t denominator24 = 1.-sumOfWW24/(sumOfW1st24*sumOfW2nd24); | |
3597 | // covariance: | |
3598 | Double_t covariance24 = numerator24/denominator24; | |
3599 | // weight dependent prefactor for covariance: | |
3600 | Double_t wPrefactor24 = sumOfWW24/(sumOfW1st24*sumOfW2nd24); | |
3601 | // finally, store "weighted" covariance: | |
3602 | fIntFlowCovariancesNUA->SetBinContent(24,wPrefactor24*covariance24); | |
3603 | ||
3604 | // Cov(<sin(phi1+phi2)>,<cos(phi1-phi2-phi3)>): | |
3605 | Double_t product25 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(25); // <<sin(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
3606 | Double_t term1st25 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3607 | Double_t term2nd25 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3608 | Double_t sumOfW1st25 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3609 | Double_t sumOfW2nd25 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3610 | Double_t sumOfWW25 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(25); // W_{<sin(phi1+phi2)>} * W_{<cos(phi1-phi2-phi3)>} | |
3611 | // numerator in the expression for the the unbiased estimator for covariance: | |
3612 | Double_t numerator25 = product25 - term1st25*term2nd25; | |
3613 | // denominator in the expression for the the unbiased estimator for covariance: | |
3614 | Double_t denominator25 = 1.-sumOfWW25/(sumOfW1st25*sumOfW2nd25); | |
3615 | // covariance: | |
3616 | Double_t covariance25 = numerator25/denominator25; | |
3617 | // weight dependent prefactor for covariance: | |
3618 | Double_t wPrefactor25 = sumOfWW25/(sumOfW1st25*sumOfW2nd25); | |
3619 | // finally, store "weighted" covariance: | |
3620 | fIntFlowCovariancesNUA->SetBinContent(25,wPrefactor25*covariance25); | |
3621 | ||
3622 | // Cov(<sin(phi1+phi2)>,<sin(phi1-phi2-phi3)>): | |
3623 | Double_t product26 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(26); // <<sin(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
3624 | Double_t term1st26 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3625 | Double_t term2nd26 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3626 | Double_t sumOfW1st26 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3627 | Double_t sumOfW2nd26 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3628 | Double_t sumOfWW26 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(26); // W_{<sin(phi1+phi2)>} * W_{<sin(phi1-phi2-phi3)>} | |
3629 | // numerator in the expression for the the unbiased estimator for covariance: | |
3630 | Double_t numerator26 = product26 - term1st26*term2nd26; | |
3631 | // denominator in the expression for the the unbiased estimator for covariance: | |
3632 | Double_t denominator26 = 1.-sumOfWW26/(sumOfW1st26*sumOfW2nd26); | |
3633 | // covariance: | |
3634 | Double_t covariance26 = numerator26/denominator26; | |
3635 | // weight dependent prefactor for covariance: | |
3636 | Double_t wPrefactor26 = sumOfWW26/(sumOfW1st26*sumOfW2nd26); | |
3637 | // finally, store "weighted" covariance: | |
3638 | fIntFlowCovariancesNUA->SetBinContent(26,wPrefactor26*covariance26); | |
3639 | ||
3640 | // Cov(<cos(phi1-phi2-phi3)>,<sin(phi1-phi2-phi3)>): | |
3641 | Double_t product27 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(27); // <<cos(phi1-phi2-phi3)><sin(phi1-phi2-phi3)>> | |
3642 | Double_t term1st27 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1-phi2-phi3)>> | |
3643 | Double_t term2nd27 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3644 | Double_t sumOfW1st27 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1-phi2-phi3)>} | |
3645 | Double_t sumOfW2nd27 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3646 | Double_t sumOfWW27 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(27); // W_{<cos(phi1-phi2-phi3)>} * W_{<sin(phi1-phi2-phi3)>} | |
3647 | // numerator in the expression for the the unbiased estimator for covariance: | |
3648 | Double_t numerator27 = product27 - term1st27*term2nd27; | |
3649 | // denominator in the expression for the the unbiased estimator for covariance: | |
3650 | Double_t denominator27 = 1.-sumOfWW27/(sumOfW1st27*sumOfW2nd27); | |
3651 | // covariance: | |
3652 | Double_t covariance27 = numerator27/denominator27; | |
3653 | // weight dependent prefactor for covariance: | |
3654 | Double_t wPrefactor27 = sumOfWW27/(sumOfW1st27*sumOfW2nd27); | |
3655 | // finally, store "weighted" covariance: | |
3656 | fIntFlowCovariancesNUA->SetBinContent(27,wPrefactor27*covariance27); | |
3657 | ||
3658 | } // end of AliFlowAnalysisWithQCumulants::CalculateCovariancesNUAIntFlow() | |
3659 | ||
3660 | ||
3661 | //================================================================================================================================ | |
3662 | ||
3663 | ||
489d5531 | 3664 | void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsIntFlow() |
3665 | { | |
3666 | // From profile fIntFlowCorrelationsPro access measured correlations and spread, | |
3667 | // correctly calculate the statistical errors and store the final results and | |
3668 | // statistical errors for correlations in histogram fIntFlowCorrelationsHist. | |
3669 | // | |
3670 | // Remark: Statistical error of correlation is calculated as: | |
3671 | // | |
3672 | // statistical error = termA * spread * termB: | |
3673 | // termA = sqrt{sum_{i=1}^{N} w^2}/(sum_{i=1}^{N} w) | |
3674 | // termB = 1/sqrt(1-termA^2) | |
3675 | ||
3676 | for(Int_t power=0;power<2;power++) | |
3677 | { | |
3678 | if(!(fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power])) | |
3679 | { | |
3680 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power] is NULL in AFAWQC::FCIF() !!!!"<<endl; | |
3681 | cout<<"power = "<<power<<endl; | |
3682 | exit(0); | |
3683 | } | |
3684 | } | |
3685 | ||
3686 | for(Int_t ci=1;ci<=4;ci++) // correlation index | |
3687 | { | |
3688 | Double_t correlation = fIntFlowCorrelationsPro->GetBinContent(ci); | |
3689 | Double_t spread = fIntFlowCorrelationsPro->GetBinError(ci); | |
3690 | Double_t sumOfLinearEventWeights = fIntFlowSumOfEventWeights[0]->GetBinContent(ci); | |
3691 | Double_t sumOfQuadraticEventWeights = fIntFlowSumOfEventWeights[1]->GetBinContent(ci); | |
3692 | Double_t termA = 0.; | |
3693 | Double_t termB = 0.; | |
3694 | if(sumOfLinearEventWeights) | |
3695 | { | |
3696 | termA = pow(sumOfQuadraticEventWeights,0.5)/sumOfLinearEventWeights; | |
3697 | } else | |
3698 | { | |
3699 | cout<<"WARNING: sumOfLinearEventWeights == 0 in AFAWQC::FCIF() !!!!"<<endl; | |
3700 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl; | |
3701 | } | |
3702 | if(1.-pow(termA,2.) > 0.) | |
3703 | { | |
3704 | termB = 1./pow(1-pow(termA,2.),0.5); | |
3705 | } else | |
3706 | { | |
3707 | cout<<"WARNING: 1.-pow(termA,2.) <= 0 in AFAWQC::FCIF() !!!!"<<endl; | |
3708 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl; | |
3709 | } | |
3710 | Double_t statisticalError = termA * spread * termB; | |
3711 | fIntFlowCorrelationsHist->SetBinContent(ci,correlation); | |
3712 | fIntFlowCorrelationsHist->SetBinError(ci,statisticalError); | |
ff70ca91 | 3713 | } // end of for(Int_t ci=1;ci<=4;ci++) // correlation index |
3714 | ||
3715 | // versus multiplicity: | |
3716 | for(Int_t ci=0;ci<=3;ci++) // correlation index | |
3717 | { | |
3718 | Int_t nBins = fIntFlowCorrelationsVsMPro[ci]->GetNbinsX(); | |
3719 | for(Int_t b=1;b<=nBins;b++) // looping over multiplicity bins | |
3720 | { | |
3721 | Double_t correlationVsM = fIntFlowCorrelationsVsMPro[ci]->GetBinContent(b); | |
3722 | Double_t spreadVsM = fIntFlowCorrelationsVsMPro[ci]->GetBinError(b); | |
3723 | Double_t sumOfLinearEventWeightsVsM = fIntFlowSumOfEventWeightsVsM[ci][0]->GetBinContent(b); | |
3724 | Double_t sumOfQuadraticEventWeightsVsM = fIntFlowSumOfEventWeightsVsM[ci][1]->GetBinContent(b); | |
3725 | Double_t termAVsM = 0.; | |
3726 | Double_t termBVsM = 0.; | |
3727 | if(sumOfLinearEventWeightsVsM) | |
3728 | { | |
3729 | termAVsM = pow(sumOfQuadraticEventWeightsVsM,0.5)/sumOfLinearEventWeightsVsM; | |
3730 | } else | |
3731 | { | |
9da1a4f3 | 3732 | //cout<<"WARNING: sumOfLinearEventWeightsVsM == 0 in AFAWQC::FCIF() !!!!"<<endl; |
3733 | //cout<<" (for "<<2*(ci+1)<<"-particle correlation versus multiplicity)"<<endl; | |
ff70ca91 | 3734 | } |
3735 | if(1.-pow(termAVsM,2.) > 0.) | |
3736 | { | |
3737 | termBVsM = 1./pow(1-pow(termAVsM,2.),0.5); | |
3738 | } else | |
3739 | { | |
9da1a4f3 | 3740 | //cout<<"WARNING: 1.-pow(termAVsM,2.) <= 0 in AFAWQC::FCIF() !!!!"<<endl; |
3741 | //cout<<" (for "<<2*(ci+1)<<"-particle correlation versus multiplicity)"<<endl; | |
ff70ca91 | 3742 | } |
3743 | Double_t statisticalErrorVsM = termAVsM * spreadVsM * termBVsM; | |
3744 | fIntFlowCorrelationsVsMHist[ci]->SetBinContent(b,correlationVsM); | |
3745 | fIntFlowCorrelationsVsMHist[ci]->SetBinError(b,statisticalErrorVsM); | |
3746 | } // end of for(Int_t b=1;b<=nBins;b++) | |
3747 | } // end of for(Int_t ci=1;ci<=4;ci++) // correlation index | |
3748 | ||
489d5531 | 3749 | } // end of AliFlowAnalysisWithQCumulants::FinalizeCorrelationsIntFlow() |
3750 | ||
489d5531 | 3751 | //================================================================================================================================ |
3752 | ||
489d5531 | 3753 | void AliFlowAnalysisWithQCumulants::FillAverageMultiplicities(Int_t nRP) |
3754 | { | |
3755 | // Fill profile fAverageMultiplicity to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8 | |
3756 | ||
3757 | // Binning of fAverageMultiplicity is organized as follows: | |
3758 | // 1st bin: all events (including the empty ones) | |
3759 | // 2nd bin: event with # of RPs greater or equal to 1 | |
3760 | // 3rd bin: event with # of RPs greater or equal to 2 | |
3761 | // 4th bin: event with # of RPs greater or equal to 3 | |
3762 | // 5th bin: event with # of RPs greater or equal to 4 | |
3763 | // 6th bin: event with # of RPs greater or equal to 5 | |
3764 | // 7th bin: event with # of RPs greater or equal to 6 | |
3765 | // 8th bin: event with # of RPs greater or equal to 7 | |
3766 | // 9th bin: event with # of RPs greater or equal to 8 | |
3767 | ||
3768 | if(!fAvMultiplicity) | |
3769 | { | |
3770 | cout<<"WARNING: fAvMultiplicity is NULL in AFAWQC::FAM() !!!!"<<endl; | |
3771 | exit(0); | |
3772 | } | |
3773 | ||
3774 | if(nRP<0) | |
3775 | { | |
3776 | cout<<"WARNING: nRP<0 in in AFAWQC::FAM() !!!!"<<endl; | |
3777 | exit(0); | |
3778 | } | |
3779 | ||
3780 | for(Int_t i=0;i<9;i++) | |
3781 | { | |
3782 | if(nRP>=i) fAvMultiplicity->Fill(i+0.5,nRP,1); | |
3783 | } | |
3784 | ||
3785 | } // end of AliFlowAnalysisWithQCumulants::FillAverageMultiplicities(nRP) | |
3786 | ||
3787 | ||
3788 | //================================================================================================================================ | |
3789 | ||
3790 | ||
3791 | void AliFlowAnalysisWithQCumulants::CalculateCumulantsIntFlow() | |
3792 | { | |
3793 | // a) Calculate Q-cumulants from the measured multiparticle correlations. | |
3794 | // b) Propagate the statistical errors of measured multiparticle correlations to statistical errors of Q-cumulants. | |
3795 | // c) REMARK: Q-cumulants calculated in this method are biased by non-uniform acceptance of detector !!!! | |
3796 | // Method ApplyCorrectionForNonUniformAcceptance* (to be improved: finalize the name here) | |
3797 | // is called afterwards to correct for this bias. | |
3798 | // d) Store the results and statistical error of Q-cumulants in histogram fCumulants. | |
3799 | // Binning of fCumulants is organized as follows: | |
3800 | // | |
3801 | // 1st bin: QC{2} | |
3802 | // 2nd bin: QC{4} | |
3803 | // 3rd bin: QC{6} | |
3804 | // 4th bin: QC{8} | |
3805 | ||
3806 | if(!(fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants)) | |
3807 | { | |
3808 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants is NULL in AFAWQC::CCIF() !!!!"<<endl; | |
3809 | exit(0); | |
3810 | } | |
3811 | ||
3812 | // correlations: | |
3813 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
3814 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
3815 | Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
3816 | Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
3817 | ||
3818 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
3819 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <2> | |
3820 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <4> | |
3821 | Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <6> | |
3822 | Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <8> | |
3823 | ||
3824 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): | |
3825 | Double_t wCov24 = fIntFlowCovariances->GetBinContent(1); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
3826 | Double_t wCov26 = fIntFlowCovariances->GetBinContent(2); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
3827 | Double_t wCov28 = fIntFlowCovariances->GetBinContent(3); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
3828 | Double_t wCov46 = fIntFlowCovariances->GetBinContent(4); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
3829 | Double_t wCov48 = fIntFlowCovariances->GetBinContent(5); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
3830 | Double_t wCov68 = fIntFlowCovariances->GetBinContent(6); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) | |
3831 | ||
3832 | // Q-cumulants: | |
3833 | Double_t qc2 = 0.; // QC{2} | |
3834 | Double_t qc4 = 0.; // QC{4} | |
3835 | Double_t qc6 = 0.; // QC{6} | |
3836 | Double_t qc8 = 0.; // QC{8} | |
3837 | if(two) qc2 = two; | |
3838 | if(four) qc4 = four-2.*pow(two,2.); | |
3839 | if(six) qc6 = six-9.*two*four+12.*pow(two,3.); | |
3840 | if(eight) qc8 = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.); | |
3841 | ||
3842 | // statistical errors of Q-cumulants: | |
3843 | Double_t qc2Error = 0.; | |
3844 | Double_t qc4Error = 0.; | |
3845 | Double_t qc6Error = 0.; | |
3846 | Double_t qc8Error = 0.; | |
3847 | ||
3848 | // squared statistical errors of Q-cumulants: | |
3849 | //Double_t qc2ErrorSquared = 0.; | |
3850 | Double_t qc4ErrorSquared = 0.; | |
3851 | Double_t qc6ErrorSquared = 0.; | |
3852 | Double_t qc8ErrorSquared = 0.; | |
3853 | ||
3854 | // statistical error of QC{2}: | |
3855 | qc2Error = twoError; | |
3856 | ||
3857 | // statistical error of QC{4}: | |
3858 | qc4ErrorSquared = 16.*pow(two,2.)*pow(twoError,2)+pow(fourError,2.) | |
3859 | - 8.*two*wCov24; | |
3860 | if(qc4ErrorSquared>0.) | |
3861 | { | |
3862 | qc4Error = pow(qc4ErrorSquared,0.5); | |
3863 | } else | |
3864 | { | |
3865 | cout<<"WARNING: Statistical error of QC{4} is imaginary !!!!"<<endl; | |
3866 | } | |
3867 | ||
3868 | // statistical error of QC{6}: | |
3869 | qc6ErrorSquared = 81.*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) | |
3870 | + 81.*pow(two,2.)*pow(fourError,2.) | |
3871 | + pow(sixError,2.) | |
3872 | - 162.*two*(4.*pow(two,2.)-four)*wCov24 | |
3873 | + 18.*(4.*pow(two,2.)-four)*wCov26 | |
3874 | - 18.*two*wCov46; | |
3875 | ||
3876 | if(qc6ErrorSquared>0.) | |
3877 | { | |
3878 | qc6Error = pow(qc6ErrorSquared,0.5); | |
3879 | } else | |
3880 | { | |
3881 | cout<<"WARNING: Statistical error of QC{6} is imaginary !!!!"<<endl; | |
3882 | } | |
3883 | ||
3884 | // statistical error of QC{8}: | |
3885 | qc8ErrorSquared = 256.*pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) | |
3886 | + 1296.*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
3887 | + 256.*pow(two,2.)*pow(sixError,2.) | |
3888 | + pow(eightError,2.) | |
3889 | - 1152.*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
3890 | + 512.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
3891 | - 32.*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
3892 | - 1152.*two*(4.*pow(two,2.)-four)*wCov46 | |
3893 | + 72.*(4.*pow(two,2.)-four)*wCov48 | |
3894 | - 32.*two*wCov68; | |
3895 | if(qc8ErrorSquared>0.) | |
3896 | { | |
3897 | qc8Error = pow(qc8ErrorSquared,0.5); | |
3898 | } else | |
3899 | { | |
3900 | cout<<"WARNING: Statistical error of QC{8} is imaginary !!!!"<<endl; | |
3901 | } | |
3902 | ||
3903 | // store the results and statistical errors for Q-cumulants: | |
3904 | fIntFlowQcumulants->SetBinContent(1,qc2); | |
9f33751d | 3905 | if(TMath::Abs(qc2)>1.e-44){fIntFlowQcumulants->SetBinError(1,qc2Error);} |
489d5531 | 3906 | fIntFlowQcumulants->SetBinContent(2,qc4); |
9f33751d | 3907 | if(TMath::Abs(qc4)>1.e-44){fIntFlowQcumulants->SetBinError(2,qc4Error);} |
489d5531 | 3908 | fIntFlowQcumulants->SetBinContent(3,qc6); |
9f33751d | 3909 | if(TMath::Abs(qc6)>1.e-44){fIntFlowQcumulants->SetBinError(3,qc6Error);} |
489d5531 | 3910 | fIntFlowQcumulants->SetBinContent(4,qc8); |
9f33751d | 3911 | if(TMath::Abs(qc8)>1.e-44){fIntFlowQcumulants->SetBinError(4,qc8Error);} |
9da1a4f3 | 3912 | |
3913 | // versus multiplicity: | |
3914 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) | |
3915 | for(Int_t b=1;b<=nBins;b++) | |
3916 | { | |
3917 | // correlations: | |
3918 | two = fIntFlowCorrelationsVsMHist[0]->GetBinContent(b); // <<2>> | |
3919 | four = fIntFlowCorrelationsVsMHist[1]->GetBinContent(b); // <<4>> | |
3920 | six = fIntFlowCorrelationsVsMHist[2]->GetBinContent(b); // <<6>> | |
3921 | eight = fIntFlowCorrelationsVsMHist[3]->GetBinContent(b); // <<8>> | |
3922 | ||
3923 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
3924 | twoError = fIntFlowCorrelationsVsMHist[0]->GetBinError(b); // statistical error of <2> | |
3925 | fourError = fIntFlowCorrelationsVsMHist[1]->GetBinError(b); // statistical error of <4> | |
3926 | sixError = fIntFlowCorrelationsVsMHist[2]->GetBinError(b); // statistical error of <6> | |
3927 | eightError = fIntFlowCorrelationsVsMHist[3]->GetBinError(b); // statistical error of <8> | |
3928 | ||
3929 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): | |
3930 | wCov24 = fIntFlowCovariancesVsM[0]->GetBinContent(b); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
3931 | wCov26 = fIntFlowCovariancesVsM[1]->GetBinContent(b); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
3932 | wCov28 = fIntFlowCovariancesVsM[2]->GetBinContent(b); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
3933 | wCov46 = fIntFlowCovariancesVsM[3]->GetBinContent(b); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
3934 | wCov48 = fIntFlowCovariancesVsM[4]->GetBinContent(b); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
3935 | wCov68 = fIntFlowCovariancesVsM[5]->GetBinContent(b); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) | |
3936 | ||
3937 | // Q-cumulants: | |
3938 | qc2 = 0.; // QC{2} | |
3939 | qc4 = 0.; // QC{4} | |
3940 | qc6 = 0.; // QC{6} | |
3941 | qc8 = 0.; // QC{8} | |
3942 | if(two) qc2 = two; | |
3943 | if(four) qc4 = four-2.*pow(two,2.); | |
3944 | if(six) qc6 = six-9.*two*four+12.*pow(two,3.); | |
3945 | if(eight) qc8 = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.); | |
3946 | ||
3947 | // statistical errors of Q-cumulants: | |
3948 | qc2Error = 0.; | |
3949 | qc4Error = 0.; | |
3950 | qc6Error = 0.; | |
3951 | qc8Error = 0.; | |
3952 | ||
3953 | // squared statistical errors of Q-cumulants: | |
3954 | //Double_t qc2ErrorSquared = 0.; | |
3955 | qc4ErrorSquared = 0.; | |
3956 | qc6ErrorSquared = 0.; | |
3957 | qc8ErrorSquared = 0.; | |
3958 | ||
3959 | // statistical error of QC{2}: | |
3960 | qc2Error = twoError; | |
3961 | ||
3962 | // statistical error of QC{4}: | |
3963 | qc4ErrorSquared = 16.*pow(two,2.)*pow(twoError,2)+pow(fourError,2.) | |
3964 | - 8.*two*wCov24; | |
3965 | if(qc4ErrorSquared>0.) | |
3966 | { | |
3967 | qc4Error = pow(qc4ErrorSquared,0.5); | |
3968 | } else | |
3969 | { | |
3970 | // cout<<"WARNING: Statistical error of QC{4} is imaginary in multiplicity bin "<<b<<" !!!!"<<endl; | |
3971 | } | |
3972 | ||
3973 | // statistical error of QC{6}: | |
3974 | qc6ErrorSquared = 81.*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) | |
3975 | + 81.*pow(two,2.)*pow(fourError,2.) | |
3976 | + pow(sixError,2.) | |
3977 | - 162.*two*(4.*pow(two,2.)-four)*wCov24 | |
3978 | + 18.*(4.*pow(two,2.)-four)*wCov26 | |
3979 | - 18.*two*wCov46; | |
3980 | ||
3981 | if(qc6ErrorSquared>0.) | |
3982 | { | |
3983 | qc6Error = pow(qc6ErrorSquared,0.5); | |
3984 | } else | |
3985 | { | |
3986 | // cout<<"WARNING: Statistical error of QC{6} is imaginary in multiplicity bin "<<b<<" !!!!"<<endl; | |
3987 | } | |
3988 | ||
3989 | // statistical error of QC{8}: | |
3990 | qc8ErrorSquared = 256.*pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) | |
3991 | + 1296.*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
3992 | + 256.*pow(two,2.)*pow(sixError,2.) | |
3993 | + pow(eightError,2.) | |
3994 | - 1152.*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
3995 | + 512.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
3996 | - 32.*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
3997 | - 1152.*two*(4.*pow(two,2.)-four)*wCov46 | |
3998 | + 72.*(4.*pow(two,2.)-four)*wCov48 | |
3999 | - 32.*two*wCov68; | |
4000 | if(qc8ErrorSquared>0.) | |
4001 | { | |
4002 | qc8Error = pow(qc8ErrorSquared,0.5); | |
4003 | } else | |
4004 | { | |
4005 | // cout<<"WARNING: Statistical error of QC{8} is imaginary in multiplicity bin "<<b<<" !!!!"<<endl; | |
4006 | } | |
4007 | ||
4008 | // store the results and statistical errors for Q-cumulants: | |
4009 | fIntFlowQcumulantsVsM[0]->SetBinContent(b,qc2); | |
9f33751d | 4010 | if(TMath::Abs(qc2)>1.e-44){fIntFlowQcumulantsVsM[0]->SetBinError(b,qc2Error);} |
9da1a4f3 | 4011 | fIntFlowQcumulantsVsM[1]->SetBinContent(b,qc4); |
9f33751d | 4012 | if(TMath::Abs(qc4)>1.e-44){fIntFlowQcumulantsVsM[1]->SetBinError(b,qc4Error);} |
9da1a4f3 | 4013 | fIntFlowQcumulantsVsM[2]->SetBinContent(b,qc6); |
9f33751d | 4014 | if(TMath::Abs(qc6)>1.e-44){fIntFlowQcumulantsVsM[2]->SetBinError(b,qc6Error);} |
9da1a4f3 | 4015 | fIntFlowQcumulantsVsM[3]->SetBinContent(b,qc8); |
9f33751d | 4016 | if(TMath::Abs(qc8)>1.e-44){fIntFlowQcumulantsVsM[3]->SetBinError(b,qc8Error);} |
9da1a4f3 | 4017 | } // end of for(Int_t b=1;b<=nBins;b++) |
489d5531 | 4018 | |
4019 | } // end of AliFlowAnalysisWithQCumulants::CalculateCumulantsIntFlow() | |
4020 | ||
489d5531 | 4021 | //================================================================================================================================ |
4022 | ||
489d5531 | 4023 | void AliFlowAnalysisWithQCumulants::CalculateIntFlow() |
4024 | { | |
0328db2d | 4025 | // a) Calculate the final results for reference flow estimates from Q-cumulants. |
4026 | // b) Propagate the statistical errors of measured multiparticle correlations to statistical errors of reference flow estimates. | |
4027 | // c) Store the results and statistical errors of reference flow estimates in histogram fIntFlow. | |
489d5531 | 4028 | // Binning of fIntFlow is organized as follows: |
4029 | // | |
4030 | // 1st bin: v{2,QC} | |
4031 | // 2nd bin: v{4,QC} | |
4032 | // 3rd bin: v{6,QC} | |
4033 | // 4th bin: v{8,QC} | |
4034 | ||
4035 | if(!(fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants && fIntFlow)) | |
4036 | { | |
4037 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants && fIntFlow is NULL in AFAWQC::CCIF() !!!!"<<endl; | |
4038 | exit(0); | |
4039 | } | |
4040 | ||
4041 | // Q-cumulants: | |
4042 | Double_t qc2 = fIntFlowQcumulants->GetBinContent(1); // QC{2} | |
4043 | Double_t qc4 = fIntFlowQcumulants->GetBinContent(2); // QC{4} | |
4044 | Double_t qc6 = fIntFlowQcumulants->GetBinContent(3); // QC{6} | |
4045 | Double_t qc8 = fIntFlowQcumulants->GetBinContent(4); // QC{8} | |
4046 | ||
4047 | // correlations: | |
4048 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
4049 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
4050 | Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
4051 | Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
4052 | ||
4053 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
4054 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <2> | |
4055 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <4> | |
4056 | Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <6> | |
4057 | Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <8> | |
4058 | ||
4059 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): | |
4060 | Double_t wCov24 = fIntFlowCovariances->GetBinContent(1); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
4061 | Double_t wCov26 = fIntFlowCovariances->GetBinContent(2); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
4062 | Double_t wCov28 = fIntFlowCovariances->GetBinContent(3); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
4063 | Double_t wCov46 = fIntFlowCovariances->GetBinContent(4); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
4064 | Double_t wCov48 = fIntFlowCovariances->GetBinContent(5); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
4065 | Double_t wCov68 = fIntFlowCovariances->GetBinContent(6); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) | |
4066 | ||
4067 | // integrated flow estimates: | |
4068 | Double_t v2 = 0.; // v{2,QC} | |
4069 | Double_t v4 = 0.; // v{4,QC} | |
4070 | Double_t v6 = 0.; // v{6,QC} | |
4071 | Double_t v8 = 0.; // v{8,QC} | |
4072 | ||
4073 | // calculate integrated flow estimates from Q-cumulants: | |
4074 | if(qc2>=0.) v2 = pow(qc2,1./2.); | |
4075 | if(qc4<=0.) v4 = pow(-1.*qc4,1./4.); | |
4076 | if(qc6>=0.) v6 = pow((1./4.)*qc6,1./6.); | |
4077 | if(qc8<=0.) v8 = pow((-1./33.)*qc8,1./8.); | |
4078 | ||
4079 | // statistical errors of integrated flow estimates: | |
4080 | Double_t v2Error = 0.; // statistical error of v{2,QC} | |
4081 | Double_t v4Error = 0.; // statistical error of v{4,QC} | |
4082 | Double_t v6Error = 0.; // statistical error of v{6,QC} | |
4083 | Double_t v8Error = 0.; // statistical error of v{8,QC} | |
4084 | ||
4085 | // squares of statistical errors of integrated flow estimates: | |
4086 | Double_t v2ErrorSquared = 0.; // squared statistical error of v{2,QC} | |
4087 | Double_t v4ErrorSquared = 0.; // squared statistical error of v{4,QC} | |
4088 | Double_t v6ErrorSquared = 0.; // squared statistical error of v{6,QC} | |
4089 | Double_t v8ErrorSquared = 0.; // squared statistical error of v{8,QC} | |
4090 | ||
4091 | // calculate squared statistical errors of integrated flow estimates: | |
4092 | if(two > 0.) | |
4093 | { | |
4094 | v2ErrorSquared = (1./(4.*two))*pow(twoError,2.); | |
4095 | } | |
4096 | if(2.*pow(two,2.)-four > 0.) | |
4097 | { | |
4098 | v4ErrorSquared = (1./pow(2.*pow(two,2.)-four,3./2.))* | |
4099 | (pow(two,2.)*pow(twoError,2.)+(1./16.)*pow(fourError,2.)-(1./2.)*two*wCov24); | |
4100 | } | |
4101 | if(six-9.*four*two+12.*pow(two,3.) > 0.) | |
4102 | { | |
4103 | v6ErrorSquared = ((1./2.)*(1./pow(2.,2./3.))*(1./pow(six-9.*four*two+12.*pow(two,3.),5./3.)))* | |
4104 | ((9./2.)*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) | |
4105 | + (9./2.)*pow(two,2.)*pow(fourError,2.)+(1./18.)*pow(sixError,2.) | |
4106 | - 9.*two*(4.*pow(two,2.)-four)*wCov24+(4.*pow(two,2.)-four)*wCov26-two*wCov46); | |
4107 | } | |
4108 | if(-1.*eight+16.*six*two+18.*pow(four,2.)-144.*four*pow(two,2.)+144.*pow(two,4.) > 0.) | |
4109 | { | |
4110 | 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.))* | |
4111 | (pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) | |
4112 | + (81./16.)*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
4113 | + pow(two,2.)*pow(sixError,2.) | |
4114 | + (1./256.)*pow(eightError,2.) | |
4115 | - (9./2.)*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
4116 | + 2.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
4117 | - (1./8.)*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
4118 | - (9./2.)*two*(4.*pow(two,2.)-four)*wCov46 | |
4119 | + (9./32.)*(4.*pow(two,2.)-four)*wCov48 | |
4120 | - (1./8.)*two*wCov68); | |
4121 | } | |
4122 | ||
4123 | // calculate statistical errors of integrated flow estimates: | |
4124 | if(v2ErrorSquared > 0.) | |
4125 | { | |
4126 | v2Error = pow(v2ErrorSquared,0.5); | |
4127 | } else | |
4128 | { | |
4129 | cout<<"WARNING: Statistical error of v{2,QC} is imaginary !!!!"<<endl; | |
4130 | } | |
4131 | if(v4ErrorSquared > 0.) | |
4132 | { | |
4133 | v4Error = pow(v4ErrorSquared,0.5); | |
4134 | } else | |
4135 | { | |
4136 | cout<<"WARNING: Statistical error of v{4,QC} is imaginary !!!!"<<endl; | |
4137 | } | |
4138 | if(v6ErrorSquared > 0.) | |
4139 | { | |
4140 | v6Error = pow(v6ErrorSquared,0.5); | |
4141 | } else | |
4142 | { | |
4143 | cout<<"WARNING: Statistical error of v{6,QC} is imaginary !!!!"<<endl; | |
4144 | } | |
4145 | if(v8ErrorSquared > 0.) | |
4146 | { | |
4147 | v8Error = pow(v8ErrorSquared,0.5); | |
4148 | } else | |
4149 | { | |
4150 | cout<<"WARNING: Statistical error of v{8,QC} is imaginary !!!!"<<endl; | |
4151 | } | |
4152 | ||
4153 | // store the results and statistical errors of integrated flow estimates: | |
4154 | fIntFlow->SetBinContent(1,v2); | |
4155 | fIntFlow->SetBinError(1,v2Error); | |
4156 | fIntFlow->SetBinContent(2,v4); | |
4157 | fIntFlow->SetBinError(2,v4Error); | |
4158 | fIntFlow->SetBinContent(3,v6); | |
4159 | fIntFlow->SetBinError(3,v6Error); | |
4160 | fIntFlow->SetBinContent(4,v8); | |
4161 | fIntFlow->SetBinError(4,v8Error); | |
9da1a4f3 | 4162 | |
4163 | // versus multiplicity: | |
4164 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) | |
4165 | for(Int_t b=1;b<=nBins;b++) | |
4166 | { | |
4167 | // Q-cumulants: | |
4168 | qc2 = fIntFlowQcumulantsVsM[0]->GetBinContent(b); // QC{2} | |
4169 | qc4 = fIntFlowQcumulantsVsM[1]->GetBinContent(b); // QC{4} | |
4170 | qc6 = fIntFlowQcumulantsVsM[2]->GetBinContent(b); // QC{6} | |
4171 | qc8 = fIntFlowQcumulantsVsM[3]->GetBinContent(b); // QC{8} | |
4172 | ||
4173 | // correlations: | |
4174 | two = fIntFlowCorrelationsVsMHist[0]->GetBinContent(b); // <<2>> | |
4175 | four = fIntFlowCorrelationsVsMHist[1]->GetBinContent(b); // <<4>> | |
4176 | six = fIntFlowCorrelationsVsMHist[2]->GetBinContent(b); // <<6>> | |
4177 | eight = fIntFlowCorrelationsVsMHist[3]->GetBinContent(b); // <<8>> | |
4178 | ||
4179 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
4180 | twoError = fIntFlowCorrelationsVsMHist[0]->GetBinError(b); // statistical error of <2> | |
4181 | fourError = fIntFlowCorrelationsVsMHist[1]->GetBinError(b); // statistical error of <4> | |
4182 | sixError = fIntFlowCorrelationsVsMHist[2]->GetBinError(b); // statistical error of <6> | |
4183 | eightError = fIntFlowCorrelationsVsMHist[3]->GetBinError(b); // statistical error of <8> | |
4184 | ||
4185 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): | |
4186 | wCov24 = fIntFlowCovariancesVsM[0]->GetBinContent(b); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
4187 | wCov26 = fIntFlowCovariancesVsM[1]->GetBinContent(b); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
4188 | wCov28 = fIntFlowCovariancesVsM[2]->GetBinContent(b); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
4189 | wCov46 = fIntFlowCovariancesVsM[3]->GetBinContent(b); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
4190 | wCov48 = fIntFlowCovariancesVsM[4]->GetBinContent(b); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
4191 | wCov68 = fIntFlowCovariancesVsM[5]->GetBinContent(b); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) | |
4192 | ||
4193 | // integrated flow estimates: | |
4194 | v2 = 0.; // v{2,QC} | |
4195 | v4 = 0.; // v{4,QC} | |
4196 | v6 = 0.; // v{6,QC} | |
4197 | v8 = 0.; // v{8,QC} | |
4198 | ||
4199 | // calculate integrated flow estimates from Q-cumulants: | |
4200 | if(qc2>=0.) v2 = pow(qc2,1./2.); | |
4201 | if(qc4<=0.) v4 = pow(-1.*qc4,1./4.); | |
4202 | if(qc6>=0.) v6 = pow((1./4.)*qc6,1./6.); | |
4203 | if(qc8<=0.) v8 = pow((-1./33.)*qc8,1./8.); | |
4204 | ||
4205 | // statistical errors of integrated flow estimates: | |
4206 | v2Error = 0.; // statistical error of v{2,QC} | |
4207 | v4Error = 0.; // statistical error of v{4,QC} | |
4208 | v6Error = 0.; // statistical error of v{6,QC} | |
4209 | v8Error = 0.; // statistical error of v{8,QC} | |
4210 | ||
4211 | // squares of statistical errors of integrated flow estimates: | |
4212 | v2ErrorSquared = 0.; // squared statistical error of v{2,QC} | |
4213 | v4ErrorSquared = 0.; // squared statistical error of v{4,QC} | |
4214 | v6ErrorSquared = 0.; // squared statistical error of v{6,QC} | |
4215 | v8ErrorSquared = 0.; // squared statistical error of v{8,QC} | |
4216 | ||
4217 | // calculate squared statistical errors of integrated flow estimates: | |
4218 | if(two > 0.) | |
4219 | { | |
4220 | v2ErrorSquared = (1./(4.*two))*pow(twoError,2.); | |
4221 | } | |
4222 | if(2.*pow(two,2.)-four > 0.) | |
4223 | { | |
4224 | v4ErrorSquared = (1./pow(2.*pow(two,2.)-four,3./2.))* | |
4225 | (pow(two,2.)*pow(twoError,2.)+(1./16.)*pow(fourError,2.)-(1./2.)*two*wCov24); | |
4226 | } | |
4227 | if(six-9.*four*two+12.*pow(two,3.) > 0.) | |
4228 | { | |
4229 | v6ErrorSquared = ((1./2.)*(1./pow(2.,2./3.))*(1./pow(six-9.*four*two+12.*pow(two,3.),5./3.)))* | |
4230 | ((9./2.)*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) | |
4231 | + (9./2.)*pow(two,2.)*pow(fourError,2.)+(1./18.)*pow(sixError,2.) | |
4232 | - 9.*two*(4.*pow(two,2.)-four)*wCov24+(4.*pow(two,2.)-four)*wCov26-two*wCov46); | |
4233 | } | |
4234 | if(-1.*eight+16.*six*two+18.*pow(four,2.)-144.*four*pow(two,2.)+144.*pow(two,4.) > 0.) | |
4235 | { | |
4236 | 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.))* | |
4237 | (pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) | |
4238 | + (81./16.)*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
4239 | + pow(two,2.)*pow(sixError,2.) | |
4240 | + (1./256.)*pow(eightError,2.) | |
4241 | - (9./2.)*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
4242 | + 2.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
4243 | - (1./8.)*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
4244 | - (9./2.)*two*(4.*pow(two,2.)-four)*wCov46 | |
4245 | + (9./32.)*(4.*pow(two,2.)-four)*wCov48 | |
4246 | - (1./8.)*two*wCov68); | |
4247 | } | |
4248 | ||
4249 | // calculate statistical errors of integrated flow estimates: | |
4250 | if(v2ErrorSquared > 0.) | |
4251 | { | |
4252 | v2Error = pow(v2ErrorSquared,0.5); | |
4253 | } else | |
4254 | { | |
4255 | // cout<<"WARNING: Statistical error of v{2,QC} is imaginary !!!!"<<endl; | |
4256 | } | |
4257 | if(v4ErrorSquared > 0.) | |
4258 | { | |
4259 | v4Error = pow(v4ErrorSquared,0.5); | |
4260 | } else | |
4261 | { | |
4262 | // cout<<"WARNING: Statistical error of v{4,QC} is imaginary !!!!"<<endl; | |
4263 | } | |
4264 | if(v6ErrorSquared > 0.) | |
4265 | { | |
4266 | v6Error = pow(v6ErrorSquared,0.5); | |
4267 | } else | |
4268 | { | |
4269 | // cout<<"WARNING: Statistical error of v{6,QC} is imaginary !!!!"<<endl; | |
4270 | } | |
4271 | if(v8ErrorSquared > 0.) | |
4272 | { | |
4273 | v8Error = pow(v8ErrorSquared,0.5); | |
4274 | } else | |
4275 | { | |
4276 | // cout<<"WARNING: Statistical error of v{8,QC} is imaginary !!!!"<<endl; | |
4277 | } | |
4278 | ||
4279 | // store the results and statistical errors of integrated flow estimates: | |
4280 | fIntFlowVsM[0]->SetBinContent(b,v2); | |
4281 | fIntFlowVsM[0]->SetBinError(b,v2Error); | |
4282 | fIntFlowVsM[1]->SetBinContent(b,v4); | |
4283 | fIntFlowVsM[1]->SetBinError(b,v4Error); | |
4284 | fIntFlowVsM[2]->SetBinContent(b,v6); | |
4285 | fIntFlowVsM[2]->SetBinError(b,v6Error); | |
4286 | fIntFlowVsM[3]->SetBinContent(b,v8); | |
4287 | fIntFlowVsM[3]->SetBinError(b,v8Error); | |
4288 | } // end of for(Int_t b=1;b<=nBins;b++) | |
489d5531 | 4289 | |
4290 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlow() | |
4291 | ||
489d5531 | 4292 | //================================================================================================================================ |
4293 | ||
489d5531 | 4294 | void AliFlowAnalysisWithQCumulants::FillCommonHistResultsIntFlow() |
4295 | { | |
4296 | // Fill in AliFlowCommonHistResults histograms relevant for 'NONAME' integrated flow (to be improved (name)) | |
4297 | ||
4298 | if(!fIntFlow) | |
4299 | { | |
4300 | cout<<"WARNING: fIntFlow is NULL in AFAWQC::FCHRIF() !!!!"<<endl; | |
4301 | exit(0); | |
4302 | } | |
4303 | ||
4304 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th)) | |
4305 | { | |
4306 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; | |
4307 | cout<<" is NULL in AFAWQC::FCHRIF() !!!!"<<endl; | |
4308 | exit(0); | |
4309 | } | |
4310 | ||
4311 | Double_t v2 = fIntFlow->GetBinContent(1); | |
4312 | Double_t v4 = fIntFlow->GetBinContent(2); | |
4313 | Double_t v6 = fIntFlow->GetBinContent(3); | |
4314 | Double_t v8 = fIntFlow->GetBinContent(4); | |
4315 | ||
4316 | Double_t v2Error = fIntFlow->GetBinError(1); | |
4317 | Double_t v4Error = fIntFlow->GetBinError(2); | |
4318 | Double_t v6Error = fIntFlow->GetBinError(3); | |
4319 | Double_t v8Error = fIntFlow->GetBinError(4); | |
4320 | ||
4321 | fCommonHistsResults2nd->FillIntegratedFlow(v2,v2Error); // to be improved (hardwired 2nd in the name) | |
4322 | fCommonHistsResults4th->FillIntegratedFlow(v4,v4Error); // to be improved (hardwired 4th in the name) | |
4323 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) // to be improved (calculate also 6th and 8th order) | |
4324 | { | |
4325 | fCommonHistsResults6th->FillIntegratedFlow(v6,v6Error); // to be improved (hardwired 6th in the name) | |
4326 | fCommonHistsResults8th->FillIntegratedFlow(v8,v8Error); // to be improved (hardwired 8th in the name) | |
4327 | } | |
4328 | ||
4329 | } // end of AliFlowAnalysisWithQCumulants::FillCommonHistResultsIntFlow() | |
4330 | ||
4331 | ||
4332 | //================================================================================================================================ | |
4333 | ||
4334 | ||
4335 | /* | |
4336 | void AliFlowAnalysisWithQCumulants::ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(Bool_t useParticleWeights, TString eventWeights) | |
4337 | { | |
4338 | // apply correction for non-uniform acceptance to cumulants for integrated flow | |
4339 | // (Remark: non-corrected cumulants are accessed from fCumulants[pW][0], corrected cumulants are stored in fCumulants[pW][1]) | |
4340 | ||
4341 | // shortcuts for the flags: | |
4342 | Int_t pW = (Int_t)(useParticleWeights); // 0=pWeights not used, 1=pWeights used | |
4343 | Int_t eW = -1; | |
4344 | ||
4345 | if(eventWeights == "exact") | |
4346 | { | |
4347 | eW = 0; | |
4348 | } | |
4349 | ||
4350 | if(!(fCumulants[pW][eW][0] && fCumulants[pW][eW][1] && fCorrections[pW][eW])) | |
4351 | { | |
4352 | cout<<"WARNING: fCumulants[pW][eW][0] && fCumulants[pW][eW][1] && fCorrections[pW][eW] is NULL in AFAWQC::ACFNUATCFIF() !!!!"<<endl; | |
4353 | cout<<"pW = "<<pW<<endl; | |
4354 | cout<<"eW = "<<eW<<endl; | |
4355 | exit(0); | |
4356 | } | |
4357 | ||
4358 | // non-corrected cumulants: | |
4359 | Double_t qc2 = fCumulants[pW][eW][0]->GetBinContent(1); | |
4360 | Double_t qc4 = fCumulants[pW][eW][0]->GetBinContent(2); | |
4361 | Double_t qc6 = fCumulants[pW][eW][0]->GetBinContent(3); | |
4362 | Double_t qc8 = fCumulants[pW][eW][0]->GetBinContent(4); | |
4363 | // statistical error of non-corrected cumulants: | |
4364 | Double_t qc2Error = fCumulants[pW][eW][0]->GetBinError(1); | |
4365 | Double_t qc4Error = fCumulants[pW][eW][0]->GetBinError(2); | |
4366 | Double_t qc6Error = fCumulants[pW][eW][0]->GetBinError(3); | |
4367 | Double_t qc8Error = fCumulants[pW][eW][0]->GetBinError(4); | |
4368 | // corrections for non-uniform acceptance: | |
4369 | Double_t qc2Correction = fCorrections[pW][eW]->GetBinContent(1); | |
4370 | Double_t qc4Correction = fCorrections[pW][eW]->GetBinContent(2); | |
4371 | Double_t qc6Correction = fCorrections[pW][eW]->GetBinContent(3); | |
4372 | Double_t qc8Correction = fCorrections[pW][eW]->GetBinContent(4); | |
4373 | // corrected cumulants: | |
4374 | Double_t qc2Corrected = qc2 + qc2Correction; | |
4375 | Double_t qc4Corrected = qc4 + qc4Correction; | |
4376 | Double_t qc6Corrected = qc6 + qc6Correction; | |
4377 | Double_t qc8Corrected = qc8 + qc8Correction; | |
4378 | ||
4379 | // ... to be improved (I need here also to correct error of QCs for NUA. | |
4380 | // For simplicity sake I assume at the moment that this correction is negliglible, but it will be added eventually...) | |
4381 | ||
4382 | // store corrected results and statistical errors for cumulants: | |
4383 | fCumulants[pW][eW][1]->SetBinContent(1,qc2Corrected); | |
4384 | fCumulants[pW][eW][1]->SetBinContent(2,qc4Corrected); | |
4385 | fCumulants[pW][eW][1]->SetBinContent(3,qc6Corrected); | |
4386 | fCumulants[pW][eW][1]->SetBinContent(4,qc8Corrected); | |
4387 | fCumulants[pW][eW][1]->SetBinError(1,qc2Error); // to be improved (correct also qc2Error for NUA) | |
4388 | fCumulants[pW][eW][1]->SetBinError(2,qc4Error); // to be improved (correct also qc4Error for NUA) | |
4389 | fCumulants[pW][eW][1]->SetBinError(3,qc6Error); // to be improved (correct also qc6Error for NUA) | |
4390 | fCumulants[pW][eW][1]->SetBinError(4,qc8Error); // to be improved (correct also qc8Error for NUA) | |
4391 | ||
4392 | } // end of AliFlowAnalysisWithQCumulants::ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(Bool_t useParticleWeights, TString eventWeights) | |
4393 | */ | |
4394 | ||
4395 | ||
4396 | //================================================================================================================================ | |
4397 | ||
4398 | ||
4399 | /* | |
4400 | void AliFlowAnalysisWithQCumulants::PrintQuantifyingCorrectionsForNonUniformAcceptance(Bool_t useParticleWeights, TString eventWeights) | |
4401 | { | |
4402 | // print on the screen QC{n,biased}/QC{n,corrected} | |
4403 | ||
4404 | // shortcuts for the flags: | |
4405 | Int_t pW = (Int_t)(useParticleWeights); // 0=pWeights not used, 1=pWeights used | |
4406 | ||
4407 | Int_t eW = -1; | |
4408 | ||
4409 | if(eventWeights == "exact") | |
4410 | { | |
4411 | eW = 0; | |
4412 | } | |
4413 | ||
4414 | if(!(fCumulants[pW][eW][0] && fCumulants[pW][eW][1])) | |
4415 | { | |
4416 | cout<<"WARNING: fCumulants[pW][eW][0] && fCumulants[pW][eW][1] is NULL in AFAWQC::PQCFNUA() !!!!"<<endl; | |
4417 | cout<<"pW = "<<pW<<endl; | |
4418 | cout<<"eW = "<<eW<<endl; | |
4419 | exit(0); | |
4420 | } | |
4421 | ||
4422 | cout<<endl; | |
4423 | cout<<" Quantifying the bias to Q-cumulants from"<<endl; | |
4424 | cout<<" non-uniform acceptance of the detector:"<<endl; | |
4425 | cout<<endl; | |
4426 | ||
4427 | if(fCumulants[pW][eW][1]->GetBinContent(1)) | |
4428 | { | |
4429 | cout<<" QC{2,biased}/QC{2,corrected} = "<<(fCumulants[pW][eW][0]->GetBinContent(1))/(fCumulants[pW][eW][1]->GetBinContent(1))<<endl; | |
4430 | } | |
4431 | if(fCumulants[pW][eW][1]->GetBinContent(2)) | |
4432 | { | |
4433 | cout<<" QC{4,biased}/QC{4,corrected} = "<<fCumulants[pW][eW][0]->GetBinContent(2)/fCumulants[pW][eW][1]->GetBinContent(2)<<endl; | |
4434 | } | |
4435 | ||
4436 | cout<<endl; | |
4437 | ||
4438 | } // end of AliFlowAnalysisWithQCumulants::PrintQuantifyingCorrectionsForNonUniformAcceptance(Bool_t useParticleWeights, TString eventWeights) | |
4439 | */ | |
4440 | ||
4441 | ||
4442 | //================================================================================================================================ | |
4443 | ||
4444 | ||
4445 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelationsUsingParticleWeights() | |
4446 | { | |
4447 | // Calculate all correlations needed for integrated flow using particle weights. | |
4448 | ||
4449 | // Remark 1: When particle weights are used the binning of fIntFlowCorrelationAllPro is organized as follows: | |
4450 | // | |
4451 | // 1st bin: <2>_{1n|1n} = two1n1nW1W1 = <w1 w2 cos(n*(phi1-phi2))> | |
4452 | // 2nd bin: <2>_{2n|2n} = two2n2nW2W2 = <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
4453 | // 3rd bin: <2>_{3n|3n} = two3n3nW3W3 = <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
4454 | // 4th bin: <2>_{4n|4n} = two4n4nW4W4 = <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
4455 | // 5th bin: ---- EMPTY ---- | |
4456 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1nW2W1W1 = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
4457 | // 7th bin: <3>_{3n|2n,1n} = ... | |
4458 | // 8th bin: <3>_{4n|2n,2n} = ... | |
4459 | // 9th bin: <3>_{4n|3n,1n} = ... | |
4460 | // 10th bin: ---- EMPTY ---- | |
4461 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1nW1W1W1W1 = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
4462 | // 12th bin: <4>_{2n,1n|2n,1n} = ... | |
4463 | // 13th bin: <4>_{2n,2n|2n,2n} = ... | |
4464 | // 14th bin: <4>_{3n|1n,1n,1n} = ... | |
4465 | // 15th bin: <4>_{3n,1n|3n,1n} = ... | |
4466 | // 16th bin: <4>_{3n,1n|2n,2n} = ... | |
4467 | // 17th bin: <4>_{4n|2n,1n,1n} = ... | |
4468 | // 18th bin: ---- EMPTY ---- | |
4469 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = ... | |
4470 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = ... | |
4471 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = ... | |
4472 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = ... | |
4473 | // 23rd bin: ---- EMPTY ---- | |
4474 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = ... | |
4475 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = ... | |
4476 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = ... | |
4477 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = ... | |
4478 | // 28th bin: ---- EMPTY ---- | |
4479 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = ... | |
4480 | // 30th bin: ---- EMPTY ---- | |
4481 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = ... | |
4482 | ||
4483 | // Remark 2: When particle weights are used there are some extra correlations. They are stored in | |
4484 | // fIntFlowExtraCorrelationsPro binning of which is organized as follows: | |
4485 | ||
4486 | // 1st bin: two1n1nW3W1 = <w1^3 w2 cos(n*(phi1-phi2))> | |
4487 | // 2nd bin: two1n1nW1W1W2 = <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
4488 | ||
4489 | // multiplicity (number of particles used to determine the reaction plane) | |
4490 | Double_t dMult = (*fSMpk)(0,0); | |
4491 | ||
4492 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
4493 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
4494 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
4495 | Double_t dReQ3n3k = (*fReQ)(2,3); | |
4496 | Double_t dReQ4n4k = (*fReQ)(3,4); | |
4497 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
4498 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
4499 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
4500 | Double_t dImQ3n3k = (*fImQ)(2,3); | |
4501 | Double_t dImQ4n4k = (*fImQ)(3,4); | |
4502 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
4503 | ||
4504 | // dMs are variables introduced in order to simplify some Eqs. bellow: | |
4505 | //.............................................................................................. | |
4506 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
4507 | Double_t dM22 = (*fSMpk)(1,2)-(*fSMpk)(0,4); // dM22 = sum_{i,j=1,i!=j}^M w_i^2 w_j^2 | |
4508 | Double_t dM33 = (*fSMpk)(1,3)-(*fSMpk)(0,6); // dM33 = sum_{i,j=1,i!=j}^M w_i^3 w_j^3 | |
4509 | Double_t dM44 = (*fSMpk)(1,4)-(*fSMpk)(0,8); // dM44 = sum_{i,j=1,i!=j}^M w_i^4 w_j^4 | |
4510 | 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 | |
4511 | Double_t dM211 = (*fSMpk)(0,2)*(*fSMpk)(1,1)-2.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
4512 | - (*fSMpk)(1,2)+2.*(*fSMpk)(0,4); // dM211 = sum_{i,j,k=1,i!=j!=k}^M w_i^2 w_j w_k | |
4513 | Double_t dM1111 = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) | |
4514 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
4515 | + 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 | |
4516 | //.............................................................................................. | |
4517 | ||
4518 | // 2-particle correlations: | |
4519 | Double_t two1n1nW1W1 = 0.; // <w1 w2 cos(n*(phi1-phi2))> | |
4520 | Double_t two2n2nW2W2 = 0.; // <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
4521 | Double_t two3n3nW3W3 = 0.; // <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
4522 | Double_t two4n4nW4W4 = 0.; // <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
4523 | if(dMult>1) | |
4524 | { | |
4525 | if(dM11) | |
4526 | { | |
4527 | two1n1nW1W1 = (pow(dReQ1n1k,2)+pow(dImQ1n1k,2)-(*fSMpk)(0,2))/dM11; | |
4528 | // average correlation <w1 w2 cos(n*(phi1-phi2))> for single event: | |
4529 | fIntFlowCorrelationsEBE->SetBinContent(1,two1n1nW1W1); | |
4530 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(1,dM11); | |
4531 | // average correlation <w1 w2 cos(n*(phi1-phi2))> for all events: | |
4532 | fIntFlowCorrelationsPro->Fill(0.5,two1n1nW1W1,dM11); | |
4533 | fIntFlowCorrelationsAllPro->Fill(0.5,two1n1nW1W1,dM11); | |
4534 | } | |
4535 | if(dM22) | |
4536 | { | |
4537 | two2n2nW2W2 = (pow(dReQ2n2k,2)+pow(dImQ2n2k,2)-(*fSMpk)(0,4))/dM22; | |
4538 | // ... | |
4539 | // average correlation <w1^2 w2^2 cos(2n*(phi1-phi2))> for all events: | |
4540 | fIntFlowCorrelationsAllPro->Fill(1.5,two2n2nW2W2,dM22); | |
4541 | } | |
4542 | if(dM33) | |
4543 | { | |
4544 | two3n3nW3W3 = (pow(dReQ3n3k,2)+pow(dImQ3n3k,2)-(*fSMpk)(0,6))/dM33; | |
4545 | // ... | |
4546 | // average correlation <w1^3 w2^3 cos(3n*(phi1-phi2))> for all events: | |
4547 | fIntFlowCorrelationsAllPro->Fill(2.5,two3n3nW3W3,dM33); | |
4548 | } | |
4549 | if(dM44) | |
4550 | { | |
4551 | two4n4nW4W4 = (pow(dReQ4n4k,2)+pow(dImQ4n4k,2)-(*fSMpk)(0,8))/dM44; | |
4552 | // ... | |
4553 | // average correlation <w1^4 w2^4 cos(4n*(phi1-phi2))> for all events: | |
4554 | fIntFlowCorrelationsAllPro->Fill(3.5,two4n4nW4W4,dM44); | |
4555 | } | |
4556 | } // end of if(dMult>1) | |
4557 | ||
4558 | // extra 2-particle correlations: | |
4559 | Double_t two1n1nW3W1 = 0.; // <w1^3 w2 cos(n*(phi1-phi2))> | |
4560 | Double_t two1n1nW1W1W2 = 0.; // <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
4561 | if(dMult>1) | |
4562 | { | |
4563 | if(dM31) | |
4564 | { | |
4565 | two1n1nW3W1 = (dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k-(*fSMpk)(0,4))/dM31; | |
4566 | fIntFlowExtraCorrelationsPro->Fill(0.5,two1n1nW3W1,dM31); | |
4567 | } | |
4568 | if(dM211) | |
4569 | { | |
4570 | two1n1nW1W1W2 = ((*fSMpk)(0,2)*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)-(*fSMpk)(0,2)) | |
4571 | - 2.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k | |
4572 | - (*fSMpk)(0,4)))/dM211; | |
4573 | fIntFlowExtraCorrelationsPro->Fill(1.5,two1n1nW1W1W2,dM211); | |
4574 | } | |
4575 | } // end of if(dMult>1) | |
4576 | //.............................................................................................. | |
4577 | ||
4578 | //.............................................................................................. | |
4579 | // 3-particle correlations: | |
4580 | Double_t three2n1n1nW2W1W1 = 0.; // <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
4581 | ||
4582 | if(dMult>2) | |
4583 | { | |
4584 | if(dM211) | |
4585 | { | |
4586 | three2n1n1nW2W1W1 = (pow(dReQ1n1k,2.)*dReQ2n2k+2.*dReQ1n1k*dImQ1n1k*dImQ2n2k-pow(dImQ1n1k,2.)*dReQ2n2k | |
4587 | - 2.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k) | |
4588 | - pow(dReQ2n2k,2)-pow(dImQ2n2k,2) | |
4589 | + 2.*(*fSMpk)(0,4))/dM211; | |
4590 | fIntFlowCorrelationsAllPro->Fill(5.5,three2n1n1nW2W1W1,dM211); | |
4591 | } | |
4592 | } // end of if(dMult>2) | |
4593 | //.............................................................................................. | |
4594 | ||
4595 | //.............................................................................................. | |
4596 | // 4-particle correlations: | |
4597 | Double_t four1n1n1n1nW1W1W1W1 = 0.; // <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
4598 | if(dMult>3) | |
4599 | { | |
4600 | if(dM1111) | |
4601 | { | |
4602 | four1n1n1n1nW1W1W1W1 = (pow(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.),2) | |
4603 | - 2.*(pow(dReQ1n1k,2.)*dReQ2n2k+2.*dReQ1n1k*dImQ1n1k*dImQ2n2k-pow(dImQ1n1k,2.)*dReQ2n2k) | |
4604 | + 8.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k) | |
4605 | + (pow(dReQ2n2k,2)+pow(dImQ2n2k,2)) | |
4606 | - 4.*(*fSMpk)(0,2)*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)) | |
4607 | - 6.*(*fSMpk)(0,4)+2.*(*fSMpk)(1,2))/dM1111; | |
4608 | ||
4609 | // average correlation <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> for single event: | |
4610 | fIntFlowCorrelationsEBE->SetBinContent(2,four1n1n1n1nW1W1W1W1); | |
4611 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(2,dM1111); | |
4612 | // average correlation <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> for all events: | |
4613 | fIntFlowCorrelationsPro->Fill(1.5,four1n1n1n1nW1W1W1W1,dM1111); | |
4614 | fIntFlowCorrelationsAllPro->Fill(10.5,four1n1n1n1nW1W1W1W1,dM1111); | |
4615 | } | |
4616 | } // end of if(dMult>3) | |
4617 | //.............................................................................................. | |
4618 | ||
4619 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelationsUsingParticleWeights() | |
4620 | ||
4621 | ||
4622 | //================================================================================================================================ | |
4623 | ||
4624 | ||
4625 | void AliFlowAnalysisWithQCumulants::CalculateWeightedQProductsForIntFlow() // to be improved (completed) | |
4626 | { | |
4627 | // calculate averages like <<2><4>>, <<2><6>>, <<4><6>>, etc. which are needed to calculate covariances | |
4628 | // Remark: here we take weighted correlations! | |
4629 | ||
4630 | /* | |
4631 | ||
4632 | // binning of fQProductsW is organized as follows: | |
4633 | // | |
4634 | // 1st bin: <2><4> | |
4635 | // 2nd bin: <2><6> | |
4636 | // 3rd bin: <2><8> | |
4637 | // 4th bin: <4><6> | |
4638 | // 5th bin: <4><8> | |
4639 | // 6th bin: <6><8> | |
4640 | ||
4641 | Double_t dMult = (*fSMpk)(0,0); // multiplicity (number of particles used to determine the reaction plane) | |
4642 | ||
4643 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
4644 | Double_t dM1111 = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) | |
4645 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
4646 | + 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 | |
4647 | ||
4648 | Double_t twoEBEW = 0.; // <2> | |
4649 | Double_t fourEBEW = 0.; // <4> | |
4650 | ||
4651 | twoEBEW = fQCorrelationsEBE[1]->GetBinContent(1); | |
4652 | fourEBEW = fQCorrelationsEBE[1]->GetBinContent(11); | |
4653 | ||
4654 | // <2><4> | |
4655 | if(dMult>3) | |
4656 | { | |
4657 | fQProducts[1][0]->Fill(0.5,twoEBEW*fourEBEW,dM11*dM1111); | |
4658 | } | |
4659 | ||
4660 | */ | |
4661 | ||
4662 | } // end of AliFlowAnalysisWithQCumulants::CalculateWeightedQProductsForIntFlow() | |
4663 | ||
4664 | ||
4665 | //================================================================================================================================ | |
4666 | ||
4667 | ||
4668 | void AliFlowAnalysisWithQCumulants::InitializeArraysForIntFlow() | |
4669 | { | |
4670 | // Initialize all arrays used to calculate integrated flow. | |
4671 | ||
4672 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4673 | { | |
4674 | fIntFlowCorrectionTermsForNUAEBE[sc] = NULL; | |
0328db2d | 4675 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc] = NULL; |
489d5531 | 4676 | fIntFlowCorrectionTermsForNUAPro[sc] = NULL; |
4677 | fIntFlowCorrectionTermsForNUAHist[sc] = NULL; | |
0328db2d | 4678 | for(Int_t power=0;power<2;power++) // linear or quadratic |
4679 | { | |
4680 | fIntFlowSumOfEventWeightsNUA[sc][power] = NULL; | |
4681 | } | |
489d5531 | 4682 | } |
4683 | for(Int_t power=0;power<2;power++) // linear or quadratic | |
4684 | { | |
4685 | fIntFlowSumOfEventWeights[power] = NULL; | |
4686 | } | |
4687 | for(Int_t i=0;i<3;i++) // print on the screen the final results (0=NONAME, 1=RP, 2=POI) | |
4688 | { | |
4689 | fPrintFinalResults[i] = kTRUE; | |
4690 | } | |
ff70ca91 | 4691 | for(Int_t ci=0;ci<4;ci++) // correlation index or cumulant order |
4692 | { | |
4693 | fIntFlowCorrelationsVsMPro[ci] = NULL; | |
4694 | fIntFlowCorrelationsVsMHist[ci] = NULL; | |
4695 | fIntFlowQcumulantsVsM[ci] = NULL; | |
4696 | fIntFlowVsM[ci] = NULL; | |
4697 | for(Int_t lc=0;lc<2;lc++) | |
4698 | { | |
4699 | fIntFlowSumOfEventWeightsVsM[ci][lc] = NULL; | |
4700 | } | |
4701 | } | |
4702 | for(Int_t pi=0;pi<6;pi++) // product or covariance index | |
4703 | { | |
4704 | fIntFlowProductOfCorrelationsVsMPro[pi] = NULL; | |
4705 | fIntFlowCovariancesVsM[pi] = NULL; | |
4706 | fIntFlowSumOfProductOfEventWeightsVsM[pi] = NULL; | |
4707 | } | |
4708 | ||
489d5531 | 4709 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForIntFlow() |
4710 | ||
489d5531 | 4711 | //================================================================================================================================ |
4712 | ||
489d5531 | 4713 | void AliFlowAnalysisWithQCumulants::InitializeArraysForDiffFlow() |
4714 | { | |
4715 | // Initialize all arrays needed to calculate differential flow. | |
4716 | // a) Initialize lists holding profiles; | |
4717 | // b) Initialize lists holding histograms; | |
4718 | // c) Initialize event-by-event quantities; | |
4719 | // d) Initialize profiles; | |
4720 | // e) Initialize histograms holding final results. | |
4721 | ||
4722 | // a) Initialize lists holding profiles; | |
4723 | for(Int_t t=0;t<2;t++) // type (RP, POI) | |
4724 | { | |
4725 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4726 | { | |
4727 | fDiffFlowCorrelationsProList[t][pe] = NULL; | |
4728 | fDiffFlowProductOfCorrelationsProList[t][pe] = NULL; | |
4729 | fDiffFlowCorrectionsProList[t][pe] = NULL; | |
4730 | } | |
4731 | } | |
4732 | ||
4733 | // b) Initialize lists holding histograms; | |
4734 | for(Int_t t=0;t<2;t++) // type (RP, POI) | |
4735 | { | |
4736 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4737 | { | |
4738 | fDiffFlowCorrelationsHistList[t][pe] = NULL; | |
4739 | for(Int_t power=0;power<2;power++) | |
4740 | { | |
4741 | fDiffFlowSumOfEventWeightsHistList[t][pe][power] = NULL; | |
4742 | } // end of for(Int_t power=0;power<2;power++) | |
4743 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe] = NULL; | |
4744 | fDiffFlowCorrectionsHistList[t][pe] = NULL; | |
4745 | fDiffFlowCovariancesHistList[t][pe] = NULL; | |
4746 | fDiffFlowCumulantsHistList[t][pe] = NULL; | |
4747 | fDiffFlowHistList[t][pe] = NULL; | |
4748 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4749 | } // enf of for(Int_t t=0;t<2;t++) // type (RP, POI) | |
4750 | ||
4751 | // c) Initialize event-by-event quantities: | |
4752 | // 1D: | |
4753 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
4754 | { | |
4755 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4756 | { | |
4757 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
4758 | { | |
4759 | for(Int_t k=0;k<9;k++) // power of weight | |
4760 | { | |
4761 | fReRPQ1dEBE[t][pe][m][k] = NULL; | |
4762 | fImRPQ1dEBE[t][pe][m][k] = NULL; | |
4763 | fs1dEBE[t][pe][k] = NULL; // to be improved (this doesn't need to be within loop over m) | |
4764 | } | |
4765 | } | |
4766 | } | |
4767 | } | |
4768 | // 1D: | |
4769 | for(Int_t t=0;t<2;t++) // type (RP or POI) | |
4770 | { | |
4771 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4772 | { | |
4773 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4774 | { | |
4775 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
4776 | { | |
4777 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti] = NULL; | |
4778 | } | |
4779 | } | |
4780 | } | |
4781 | } | |
4782 | // 2D: | |
4783 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
4784 | { | |
4785 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
4786 | { | |
4787 | for(Int_t k=0;k<9;k++) // power of weight | |
4788 | { | |
4789 | fReRPQ2dEBE[t][m][k] = NULL; | |
4790 | fImRPQ2dEBE[t][m][k] = NULL; | |
4791 | fs2dEBE[t][k] = NULL; // to be improved (this doesn't need to be within loop over m) | |
4792 | } | |
4793 | } | |
4794 | } | |
4795 | ||
4796 | // d) Initialize profiles: | |
4797 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
4798 | { | |
4799 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4800 | { | |
4801 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
4802 | { | |
4803 | fDiffFlowCorrelationsPro[t][pe][ci] = NULL; | |
4804 | } // end of for(Int_t ci=0;ci<4;ci++) | |
4805 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
4806 | { | |
4807 | for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
4808 | { | |
4809 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2] = NULL; | |
4810 | } // end of for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
4811 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
4812 | // correction terms for nua: | |
4813 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4814 | { | |
4815 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
4816 | { | |
4817 | fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] = NULL; | |
4818 | } | |
4819 | } | |
4820 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4821 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
4822 | ||
4823 | // e) Initialize histograms holding final results. | |
4824 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
4825 | { | |
4826 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4827 | { | |
4828 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
4829 | { | |
4830 | fDiffFlowCorrelationsHist[t][pe][ci] = NULL; | |
4831 | fDiffFlowCumulants[t][pe][ci] = NULL; | |
4832 | fDiffFlow[t][pe][ci] = NULL; | |
4833 | } // end of for(Int_t ci=0;ci<4;ci++) | |
4834 | for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++) | |
4835 | { | |
4836 | fDiffFlowCovariances[t][pe][covarianceIndex] = NULL; | |
4837 | } // end of for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++) | |
4838 | // correction terms for nua: | |
4839 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4840 | { | |
4841 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
4842 | { | |
4843 | fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] = NULL; | |
4844 | } | |
4845 | } | |
4846 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4847 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
4848 | ||
4849 | // sum of event weights for reduced correlations: | |
4850 | for(Int_t t=0;t<2;t++) // type = RP or POI | |
4851 | { | |
4852 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4853 | { | |
4854 | for(Int_t p=0;p<2;p++) // power of weight is 1 or 2 | |
4855 | { | |
4856 | for(Int_t ew=0;ew<4;ew++) // event weight index for reduced correlations | |
4857 | { | |
4858 | fDiffFlowSumOfEventWeights[t][pe][p][ew] = NULL; | |
4859 | } | |
4860 | } | |
4861 | } | |
4862 | } | |
4863 | // product of event weights for both types of correlations: | |
4864 | for(Int_t t=0;t<2;t++) // type = RP or POI | |
4865 | { | |
4866 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4867 | { | |
4868 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
4869 | { | |
4870 | for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
4871 | { | |
4872 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] = NULL; | |
4873 | } | |
4874 | } | |
4875 | } | |
4876 | } | |
4877 | ||
4878 | ||
4879 | ||
4880 | ||
4881 | /* | |
4882 | ||
4883 | // nested lists in fDiffFlowProfiles: | |
4884 | for(Int_t t=0;t<2;t++) | |
4885 | { | |
4886 | fDFPType[t] = NULL; | |
4887 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1) | |
4888 | { | |
4889 | fDFPParticleWeights[t][pW] = NULL; | |
4890 | for(Int_t eW=0;eW<2;eW++) | |
4891 | { | |
4892 | fDFPEventWeights[t][pW][eW] = NULL; | |
4893 | fDiffFlowCorrelations[t][pW][eW] = NULL; | |
4894 | fDiffFlowProductsOfCorrelations[t][pW][eW] = NULL; | |
4895 | for(Int_t sc=0;sc<2;sc++) | |
4896 | { | |
4897 | fDiffFlowCorrectionTerms[t][pW][eW][sc] = NULL; | |
4898 | } | |
4899 | } | |
4900 | } | |
4901 | } | |
4902 | ||
4903 | ||
4904 | */ | |
4905 | ||
4906 | ||
4907 | ||
4908 | /* | |
4909 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1) | |
4910 | { | |
4911 | for(Int_t eW=0;eW<2;eW++) | |
4912 | { | |
4913 | // correlations: | |
4914 | for(Int_t correlationIndex=0;correlationIndex<4;correlationIndex++) | |
4915 | { | |
4916 | fCorrelationsPro[t][pW][eW][correlationIndex] = NULL; | |
4917 | } | |
4918 | // products of correlations: | |
4919 | for(Int_t productOfCorrelationsIndex=0;productOfCorrelationsIndex<6;productOfCorrelationsIndex++) | |
4920 | { | |
4921 | fProductsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex] = NULL; | |
4922 | } | |
4923 | // correction terms: | |
4924 | for(Int_t sc=0;sc<2;sc++) | |
4925 | { | |
4926 | for(Int_t correctionsIndex=0;correctionsIndex<2;correctionsIndex++) | |
4927 | { | |
4928 | fCorrectionTermsPro[t][pW][eW][sc][correctionsIndex] = NULL; | |
4929 | } | |
4930 | } | |
4931 | } | |
4932 | } | |
4933 | */ | |
4934 | ||
4935 | } // end of AliFlowAnalysisWithQCumulants::InitializeArraysForDiffFlow() | |
4936 | ||
4937 | ||
4938 | //================================================================================================================================ | |
4939 | /* | |
4940 | ||
4941 | ||
4942 | void AliFlowAnalysisWithQCumulants::CalculateCorrelationsForDifferentialFlow2D(TString type) | |
4943 | { | |
4944 | // calculate all reduced correlations needed for differential flow for each (pt,eta) bin: | |
4945 | ||
4946 | if(type == "RP") // to be improved (removed) | |
4947 | { | |
4948 | cout<<endl; | |
4949 | } | |
4950 | // ... | |
4951 | ||
4952 | ||
4953 | Int_t typeFlag = -1; | |
4954 | ||
4955 | // reduced correlations ares stored in fCorrelationsPro[t][pW][index] and are indexed as follows: | |
4956 | // index: | |
4957 | // 0: <2'> | |
4958 | // 1: <4'> | |
4959 | ||
4960 | // multiplicity: | |
4961 | Double_t dMult = (*fSMpk)(0,0); | |
4962 | ||
4963 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
4964 | Double_t dReQ1n = (*fReQ)(0,0); | |
4965 | Double_t dReQ2n = (*fReQ)(1,0); | |
4966 | //Double_t dReQ3n = (*fReQ)(2,0); | |
4967 | //Double_t dReQ4n = (*fReQ)(3,0); | |
4968 | Double_t dImQ1n = (*fImQ)(0,0); | |
4969 | Double_t dImQ2n = (*fImQ)(1,0); | |
4970 | //Double_t dImQ3n = (*fImQ)(2,0); | |
4971 | //Double_t dImQ4n = (*fImQ)(3,0); | |
4972 | ||
4973 | // looping over all (pt,eta) bins and calculating correlations needed for differential flow: | |
4974 | for(Int_t p=1;p<=fnBinsPt;p++) | |
4975 | { | |
4976 | for(Int_t e=1;e<=fnBinsEta;e++) | |
4977 | { | |
4978 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
4979 | Double_t p1n0kRe = 0.; | |
4980 | Double_t p1n0kIm = 0.; | |
4981 | ||
4982 | // number of POIs in particular (pt,eta) bin: | |
4983 | Double_t mp = 0.; | |
4984 | ||
4985 | // 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): | |
4986 | Double_t q1n0kRe = 0.; | |
4987 | Double_t q1n0kIm = 0.; | |
4988 | Double_t q2n0kRe = 0.; | |
4989 | Double_t q2n0kIm = 0.; | |
4990 | ||
4991 | // number of particles which are both RPs and POIs in particular (pt,eta) bin: | |
4992 | Double_t mq = 0.; | |
4993 | ||
4994 | // q_{m*n,0}: | |
4995 | q1n0kRe = fReEBE2D[2][0][0]->GetBinContent(fReEBE2D[2][0][0]->GetBin(p,e)) | |
4996 | * fReEBE2D[2][0][0]->GetBinEntries(fReEBE2D[2][0][0]->GetBin(p,e)); | |
4997 | q1n0kIm = fImEBE2D[2][0][0]->GetBinContent(fImEBE2D[2][0][0]->GetBin(p,e)) | |
4998 | * fImEBE2D[2][0][0]->GetBinEntries(fImEBE2D[2][0][0]->GetBin(p,e)); | |
4999 | q2n0kRe = fReEBE2D[2][1][0]->GetBinContent(fReEBE2D[2][1][0]->GetBin(p,e)) | |
5000 | * fReEBE2D[2][1][0]->GetBinEntries(fReEBE2D[2][1][0]->GetBin(p,e)); | |
5001 | q2n0kIm = fImEBE2D[2][1][0]->GetBinContent(fImEBE2D[2][1][0]->GetBin(p,e)) | |
5002 | * fImEBE2D[2][1][0]->GetBinEntries(fImEBE2D[2][1][0]->GetBin(p,e)); | |
5003 | ||
5004 | mq = fReEBE2D[2][0][0]->GetBinEntries(fReEBE2D[2][0][0]->GetBin(p,e)); // to be improved (cross-checked by accessing other profiles here) | |
5005 | ||
5006 | if(type == "POI") | |
5007 | { | |
5008 | // p_{m*n,0}: | |
5009 | p1n0kRe = fReEBE2D[1][0][0]->GetBinContent(fReEBE2D[1][0][0]->GetBin(p,e)) | |
5010 | * fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
5011 | p1n0kIm = fImEBE2D[1][0][0]->GetBinContent(fImEBE2D[1][0][0]->GetBin(p,e)) | |
5012 | * fImEBE2D[1][0][0]->GetBinEntries(fImEBE2D[1][0][0]->GetBin(p,e)); | |
5013 | ||
5014 | mp = fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); // to be improved (cross-checked by accessing other profiles here) | |
5015 | ||
5016 | typeFlag = 1; | |
5017 | } | |
5018 | else if(type == "RP") | |
5019 | { | |
5020 | // p_{m*n,0} = q_{m*n,0}: | |
5021 | p1n0kRe = q1n0kRe; | |
5022 | p1n0kIm = q1n0kIm; | |
5023 | mp = mq; | |
5024 | ||
5025 | typeFlag = 0; | |
5026 | } | |
5027 | ||
5028 | // count events with non-empty (pt,eta) bin: | |
5029 | if(mp>0) | |
5030 | { | |
5031 | fNonEmptyBins2D[typeFlag]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,1); | |
5032 | } | |
5033 | ||
5034 | // 2'-particle correlation for particular (pt,eta) bin: | |
5035 | Double_t two1n1nPtEta = 0.; | |
5036 | if(mp*dMult-mq) | |
5037 | { | |
5038 | two1n1nPtEta = (p1n0kRe*dReQ1n+p1n0kIm*dImQ1n-mq) | |
5039 | / (mp*dMult-mq); | |
5040 | ||
5041 | // fill the 2D profile to get the average correlation for each (pt,eta) bin: | |
5042 | if(type == "POI") | |
5043 | { | |
5044 | //f2pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5045 | ||
5046 | fCorrelationsPro[1][0][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5047 | } | |
5048 | else if(type == "RP") | |
5049 | { | |
5050 | //f2pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5051 | fCorrelationsPro[0][0][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5052 | } | |
5053 | } // end of if(mp*dMult-mq) | |
5054 | ||
5055 | // 4'-particle correlation: | |
5056 | Double_t four1n1n1n1nPtEta = 0.; | |
5057 | if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5058 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression) | |
5059 | { | |
5060 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
5061 | - q2n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) | |
5062 | - 2.*q2n0kIm*dReQ1n*dImQ1n | |
5063 | - p1n0kRe*(dReQ1n*dReQ2n+dImQ1n*dImQ2n) | |
5064 | + p1n0kIm*(dImQ1n*dReQ2n-dReQ1n*dImQ2n) | |
5065 | - 2.*dMult*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
5066 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*mq | |
5067 | + 6.*(q1n0kRe*dReQ1n+q1n0kIm*dImQ1n) | |
5068 | + 1.*(q2n0kRe*dReQ2n+q2n0kIm*dImQ2n) | |
5069 | + 2.*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
5070 | + 2.*mq*dMult | |
5071 | - 6.*mq) | |
5072 | / ((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5073 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5074 | ||
5075 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
5076 | if(type == "POI") | |
5077 | { | |
5078 | //f4pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5079 | // (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5080 | // + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5081 | ||
5082 | fCorrelationsPro[1][0][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5083 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5084 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5085 | } | |
5086 | else if(type == "RP") | |
5087 | { | |
5088 | //f4pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5089 | // (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5090 | // + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5091 | ||
5092 | fCorrelationsPro[0][0][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5093 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5094 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5095 | } | |
5096 | } // end of if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5097 | // +mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
5098 | ||
5099 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5100 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5101 | ||
5102 | ||
5103 | ||
5104 | ||
5105 | ||
5106 | } // end of AliFlowAnalysisWithQCumulants::CalculateCorrelationsForDifferentialFlow2D() | |
5107 | ||
5108 | ||
5109 | ||
5110 | ||
5111 | ||
5112 | ||
5113 | //================================================================================================================================ | |
5114 | ||
5115 | ||
5116 | void AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForDifferentialFlow2D(TString type) | |
5117 | { | |
5118 | // calculate all weighted correlations needed for differential flow | |
5119 | ||
5120 | if(type == "RP") // to be improved (removed) | |
5121 | { | |
5122 | cout<<endl; | |
5123 | } | |
5124 | // ... | |
5125 | ||
5126 | ||
5127 | ||
5128 | ||
5129 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
5130 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
5131 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
5132 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
5133 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
5134 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
5135 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
5136 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
5137 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
5138 | ||
5139 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
5140 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
5141 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
5142 | Double_t dSM1p3k = (*fSMpk)(0,3); | |
5143 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
5144 | Double_t dSM3p1k = (*fSMpk)(2,1); | |
5145 | ||
5146 | // looping over all (pt,eta) bins and calculating weighted correlations needed for differential flow: | |
5147 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5148 | { | |
5149 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5150 | { | |
5151 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
5152 | Double_t p1n0kRe = 0.; | |
5153 | Double_t p1n0kIm = 0.; | |
5154 | ||
5155 | // number of POIs in particular (pt,eta) bin): | |
5156 | Double_t mp = 0.; | |
5157 | ||
5158 | // real and imaginary parts of q_{m*n,k}: | |
5159 | // (weighted Q-vector evaluated for particles which are both RPs and POIs in particular (pt,eta) bin) | |
5160 | Double_t q1n2kRe = 0.; | |
5161 | Double_t q1n2kIm = 0.; | |
5162 | Double_t q2n1kRe = 0.; | |
5163 | Double_t q2n1kIm = 0.; | |
5164 | ||
5165 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
5166 | Double_t s1p1k = 0.; | |
5167 | Double_t s1p2k = 0.; | |
5168 | Double_t s1p3k = 0.; | |
5169 | ||
5170 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
5171 | Double_t dM0111 = 0.; | |
5172 | ||
5173 | if(type == "POI") | |
5174 | { | |
5175 | // p_{m*n,0}: | |
5176 | p1n0kRe = fReEBE2D[1][0][0]->GetBinContent(fReEBE2D[1][0][0]->GetBin(p,e)) | |
5177 | * fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
5178 | p1n0kIm = fImEBE2D[1][0][0]->GetBinContent(fImEBE2D[1][0][0]->GetBin(p,e)) | |
5179 | * fImEBE2D[1][0][0]->GetBinEntries(fImEBE2D[1][0][0]->GetBin(p,e)); | |
5180 | ||
5181 | mp = fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
5182 | ||
5183 | // q_{m*n,k}: | |
5184 | q1n2kRe = fReEBE2D[2][0][2]->GetBinContent(fReEBE2D[2][0][2]->GetBin(p,e)) | |
5185 | * fReEBE2D[2][0][2]->GetBinEntries(fReEBE2D[2][0][2]->GetBin(p,e)); | |
5186 | q1n2kIm = fImEBE2D[2][0][2]->GetBinContent(fImEBE2D[2][0][2]->GetBin(p,e)) | |
5187 | * fImEBE2D[2][0][2]->GetBinEntries(fImEBE2D[2][0][2]->GetBin(p,e)); | |
5188 | q2n1kRe = fReEBE2D[2][1][1]->GetBinContent(fReEBE2D[2][1][1]->GetBin(p,e)) | |
5189 | * fReEBE2D[2][1][1]->GetBinEntries(fReEBE2D[2][1][1]->GetBin(p,e)); | |
5190 | q2n1kIm = fImEBE2D[2][1][1]->GetBinContent(fImEBE2D[2][1][1]->GetBin(p,e)) | |
5191 | * fImEBE2D[2][1][1]->GetBinEntries(fImEBE2D[2][1][1]->GetBin(p,e)); | |
5192 | ||
5193 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
5194 | s1p1k = pow(fs2D[2][1]->GetBinContent(fs2D[2][1]->GetBin(p,e)),1.); | |
5195 | s1p2k = pow(fs2D[2][2]->GetBinContent(fs2D[2][2]->GetBin(p,e)),1.); | |
5196 | s1p3k = pow(fs2D[2][3]->GetBinContent(fs2D[2][3]->GetBin(p,e)),1.); | |
5197 | ||
5198 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
5199 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
5200 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
5201 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
5202 | } | |
5203 | else if(type == "RP") | |
5204 | { | |
5205 | p1n0kRe = fReEBE2D[0][0][0]->GetBinContent(fReEBE2D[0][0][0]->GetBin(p,e)) | |
5206 | * fReEBE2D[0][0][0]->GetBinEntries(fReEBE2D[0][0][0]->GetBin(p,e)); | |
5207 | p1n0kIm = fImEBE2D[0][0][0]->GetBinContent(fImEBE2D[0][0][0]->GetBin(p,e)) | |
5208 | * fImEBE2D[0][0][0]->GetBinEntries(fImEBE2D[0][0][0]->GetBin(p,e)); | |
5209 | ||
5210 | mp = fReEBE2D[0][0][0]->GetBinEntries(fReEBE2D[0][0][0]->GetBin(p,e)); | |
5211 | ||
5212 | // q_{m*n,k}: | |
5213 | q1n2kRe = fReEBE2D[0][0][2]->GetBinContent(fReEBE2D[0][0][2]->GetBin(p,e)) | |
5214 | * fReEBE2D[0][0][2]->GetBinEntries(fReEBE2D[0][0][2]->GetBin(p,e)); | |
5215 | q1n2kIm = fImEBE2D[0][0][2]->GetBinContent(fImEBE2D[0][0][2]->GetBin(p,e)) | |
5216 | * fImEBE2D[0][0][2]->GetBinEntries(fImEBE2D[0][0][2]->GetBin(p,e)); | |
5217 | q2n1kRe = fReEBE2D[0][1][1]->GetBinContent(fReEBE2D[0][1][1]->GetBin(p,e)) | |
5218 | * fReEBE2D[0][1][1]->GetBinEntries(fReEBE2D[0][1][1]->GetBin(p,e)); | |
5219 | q2n1kIm = fImEBE2D[0][1][1]->GetBinContent(fImEBE2D[0][1][1]->GetBin(p,e)) | |
5220 | * fImEBE2D[0][1][1]->GetBinEntries(fImEBE2D[0][1][1]->GetBin(p,e)); | |
5221 | ||
5222 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
5223 | s1p1k = pow(fs2D[0][1]->GetBinContent(fs2D[0][1]->GetBin(p,e)),1.); | |
5224 | s1p2k = pow(fs2D[0][2]->GetBinContent(fs2D[0][2]->GetBin(p,e)),1.); | |
5225 | s1p3k = pow(fs2D[0][3]->GetBinContent(fs2D[0][3]->GetBin(p,e)),1.); | |
5226 | ||
5227 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
5228 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
5229 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
5230 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
5231 | //............................................................................................... | |
5232 | } | |
5233 | ||
5234 | // 2'-particle correlation: | |
5235 | Double_t two1n1nW0W1PtEta = 0.; | |
5236 | if(mp*dSM1p1k-s1p1k) | |
5237 | { | |
5238 | two1n1nW0W1PtEta = (p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k-s1p1k) | |
5239 | / (mp*dSM1p1k-s1p1k); | |
5240 | ||
5241 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
5242 | if(type == "POI") | |
5243 | { | |
5244 | //f2pPtEtaPOIW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta, | |
5245 | // mp*dSM1p1k-s1p1k); | |
5246 | fCorrelationsPro[1][1][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,mp*dSM1p1k-s1p1k); | |
5247 | } | |
5248 | else if(type == "RP") | |
5249 | { | |
5250 | //f2pPtEtaRPW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta, | |
5251 | // mp*dSM1p1k-s1p1k); | |
5252 | fCorrelationsPro[0][1][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,mp*dSM1p1k-s1p1k); | |
5253 | } | |
5254 | } // end of if(mp*dMult-dmPrimePrimePtEta) | |
5255 | ||
5256 | // 4'-particle correlation: | |
5257 | Double_t four1n1n1n1nW0W1W1W1PtEta = 0.; | |
5258 | if(dM0111) | |
5259 | { | |
5260 | four1n1n1n1nW0W1W1W1PtEta = ((pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
5261 | - q2n1kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.)) | |
5262 | - 2.*q2n1kIm*dReQ1n1k*dImQ1n1k | |
5263 | - p1n0kRe*(dReQ1n1k*dReQ2n2k+dImQ1n1k*dImQ2n2k) | |
5264 | + p1n0kIm*(dImQ1n1k*dReQ2n2k-dReQ1n1k*dImQ2n2k) | |
5265 | - 2.*dSM1p2k*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
5266 | - 2.*(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*s1p1k | |
5267 | + 6.*(q1n2kRe*dReQ1n1k+q1n2kIm*dImQ1n1k) | |
5268 | + 1.*(q2n1kRe*dReQ2n2k+q2n1kIm*dImQ2n2k) | |
5269 | + 2.*(p1n0kRe*dReQ1n3k+p1n0kIm*dImQ1n3k) | |
5270 | + 2.*s1p1k*dSM1p2k | |
5271 | - 6.*s1p3k) | |
5272 | / dM0111; // to be imropoved (notation of dM0111) | |
5273 | ||
5274 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
5275 | if(type == "POI") | |
5276 | { | |
5277 | //f4pPtEtaPOIW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5278 | fCorrelationsPro[1][1][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5279 | } | |
5280 | else if(type == "RP") | |
5281 | { | |
5282 | //f4pPtEtaRPW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5283 | fCorrelationsPro[0][1][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5284 | } | |
5285 | } // end of if(dM0111) | |
5286 | ||
5287 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5288 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5289 | ||
5290 | ||
5291 | ||
5292 | ||
5293 | } // end of AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForDifferentialFlow2D(TString type) | |
5294 | ||
5295 | ||
5296 | //================================================================================================================================ | |
5297 | ||
5298 | */ | |
5299 | ||
5300 | /* | |
5301 | void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights) | |
5302 | { | |
5303 | // 1.) Access average for 2D correlations from profiles and store them in 2D final results histograms; | |
5304 | // 2.) Access spread for 2D correlations from profiles, calculate error and store it in 2D final results histograms; | |
5305 | // 3.) Make projections along pt and eta axis and store results and errors in 1D final results histograms. | |
5306 | ||
5307 | Int_t typeFlag = -1; | |
5308 | Int_t pWeightsFlag = -1; | |
5309 | Int_t eWeightsFlag = -1; | |
5310 | ||
5311 | if(type == "RP") | |
5312 | { | |
5313 | typeFlag = 0; | |
5314 | } else if(type == "POI") | |
5315 | { | |
5316 | typeFlag = 1; | |
5317 | } else | |
5318 | { | |
5319 | cout<<"WARNING: type must be either RP or POI in AFAWQC::FCFDF() !!!!"<<endl; | |
5320 | exit(0); | |
5321 | } | |
5322 | ||
5323 | if(!useParticleWeights) | |
5324 | { | |
5325 | pWeightsFlag = 0; | |
5326 | } else | |
5327 | { | |
5328 | pWeightsFlag = 1; | |
5329 | } | |
5330 | ||
5331 | if(eventWeights == "exact") | |
5332 | { | |
5333 | eWeightsFlag = 0; | |
5334 | } | |
5335 | ||
5336 | // shortcuts: | |
5337 | Int_t t = typeFlag; | |
5338 | Int_t pW = pWeightsFlag; | |
5339 | Int_t eW = eWeightsFlag; | |
5340 | ||
5341 | // from 2D histogram fNonEmptyBins2D make two 1D histograms fNonEmptyBins1D in pt and eta (to be improved (i.e. moved somewhere else)) | |
5342 | // pt: | |
5343 | for(Int_t p=1;p<fnBinsPt;p++) | |
5344 | { | |
5345 | Double_t contentPt = 0.; | |
5346 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5347 | { | |
5348 | contentPt += (fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e))); | |
5349 | } | |
5350 | fNonEmptyBins1D[t][0]->SetBinContent(p,contentPt); | |
5351 | } | |
5352 | // eta: | |
5353 | for(Int_t e=1;e<fnBinsEta;e++) | |
5354 | { | |
5355 | Double_t contentEta = 0.; | |
5356 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5357 | { | |
5358 | contentEta += (fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e))); | |
5359 | } | |
5360 | fNonEmptyBins1D[t][1]->SetBinContent(e,contentEta); | |
5361 | } | |
5362 | ||
5363 | // from 2D profile in (pt,eta) make two 1D profiles in (pt) and (eta): | |
5364 | TProfile *profile[2][4]; // [0=pt,1=eta][correlation index] // to be improved (do not hardwire the correlation index) | |
5365 | ||
5366 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5367 | { | |
5368 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
5369 | { | |
5370 | if(pe==0) profile[pe][ci] = this->MakePtProjection(fCorrelationsPro[t][pW][eW][ci]); | |
5371 | if(pe==1) profile[pe][ci] = this->MakeEtaProjection(fCorrelationsPro[t][pW][eW][ci]); | |
5372 | } | |
5373 | } | |
5374 | ||
5375 | // transfer 2D profile into 2D histogram: | |
5376 | // to be improved (see in documentation if there is a method to transfer values from 2D profile into 2D histogram) | |
5377 | for(Int_t ci=0;ci<4;ci++) | |
5378 | { | |
5379 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5380 | { | |
5381 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5382 | { | |
5383 | Double_t correlation = fCorrelationsPro[t][pW][eW][ci]->GetBinContent(fCorrelationsPro[t][pW][eW][ci]->GetBin(p,e)); | |
5384 | Double_t spread = fCorrelationsPro[t][pW][eW][ci]->GetBinError(fCorrelationsPro[t][pW][eW][ci]->GetBin(p,e)); | |
5385 | Double_t nEvts = fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e)); | |
5386 | Double_t error = 0.; | |
5387 | fFinalCorrelations2D[t][pW][eW][ci]->SetBinContent(fFinalCorrelations2D[t][pW][eW][ci]->GetBin(p,e),correlation); | |
5388 | if(nEvts>0) | |
5389 | { | |
5390 | error = spread/pow(nEvts,0.5); | |
5391 | fFinalCorrelations2D[t][pW][eW][ci]->SetBinError(fFinalCorrelations2D[t][pW][eW][ci]->GetBin(p,e),error); | |
5392 | } | |
5393 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5394 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5395 | } // end of for(Int_t ci=0;ci<4;ci++) | |
5396 | ||
5397 | // transfer 1D profile into 1D histogram (pt): | |
5398 | // to be improved (see in documentation if there is a method to transfer values from 1D profile into 1D histogram) | |
5399 | for(Int_t ci=0;ci<4;ci++) | |
5400 | { | |
5401 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5402 | { | |
5403 | if(profile[0][ci]) | |
5404 | { | |
5405 | Double_t correlation = profile[0][ci]->GetBinContent(p); | |
5406 | Double_t spread = profile[0][ci]->GetBinError(p); | |
5407 | Double_t nEvts = fNonEmptyBins1D[t][0]->GetBinContent(p); | |
5408 | Double_t error = 0.; | |
5409 | fFinalCorrelations1D[t][pW][eW][0][ci]->SetBinContent(p,correlation); | |
5410 | if(nEvts>0) | |
5411 | { | |
5412 | error = spread/pow(nEvts,0.5); | |
5413 | fFinalCorrelations1D[t][pW][eW][0][ci]->SetBinError(p,error); | |
5414 | } | |
5415 | } | |
5416 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5417 | } // end of for(Int_t ci=0;ci<4;ci++) | |
5418 | ||
5419 | // transfer 1D profile into 1D histogram (eta): | |
5420 | // to be improved (see in documentation if there is a method to transfer values from 1D profile into 1D histogram) | |
5421 | for(Int_t ci=0;ci<4;ci++) | |
5422 | { | |
5423 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5424 | { | |
5425 | if(profile[1][ci]) | |
5426 | { | |
5427 | Double_t correlation = profile[1][ci]->GetBinContent(e); | |
5428 | fFinalCorrelations1D[t][pW][eW][1][ci]->SetBinContent(e,correlation); | |
5429 | } | |
5430 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5431 | } // end of for(Int_t ci=0;ci<4;ci++) | |
5432 | ||
5433 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights) | |
5434 | */ | |
5435 | ||
5436 | ||
5437 | //================================================================================================================================ | |
5438 | ||
5439 | ||
5440 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulants(TString type, TString ptOrEta) | |
5441 | { | |
5442 | // calcualate cumulants for differential flow from measured correlations | |
5443 | // Remark: cumulants calculated here are NOT corrected for non-uniform acceptance. This correction is applied in the method ... | |
5444 | // to be improved (description) | |
5445 | ||
5446 | Int_t typeFlag = -1; | |
5447 | Int_t ptEtaFlag = -1; | |
5448 | ||
5449 | if(type == "RP") | |
5450 | { | |
5451 | typeFlag = 0; | |
5452 | } else if(type == "POI") | |
5453 | { | |
5454 | typeFlag = 1; | |
5455 | } | |
5456 | ||
5457 | if(ptOrEta == "Pt") | |
5458 | { | |
5459 | ptEtaFlag = 0; | |
5460 | } else if(ptOrEta == "Eta") | |
5461 | { | |
5462 | ptEtaFlag = 1; | |
5463 | } | |
5464 | ||
5465 | // shortcuts: | |
5466 | Int_t t = typeFlag; | |
5467 | Int_t pe = ptEtaFlag; | |
5468 | ||
5469 | // common: | |
5470 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
5471 | ||
5472 | // correlation <<2>>: | |
5473 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); | |
5474 | ||
5475 | // 1D: | |
5476 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
5477 | { | |
5478 | // reduced correlations: | |
5479 | Double_t twoPrime = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); // <<2'>>(pt) | |
5480 | Double_t fourPrime = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); // <<4'>>(pt) | |
5481 | // final statistical error of reduced correlations: | |
5482 | //Double_t twoPrimeError = fFinalCorrelations1D[t][pW][eW][0][0]->GetBinError(p); | |
5483 | // QC{2'}: | |
5484 | Double_t qc2Prime = twoPrime; // QC{2'} | |
5485 | //Double_t qc2PrimeError = twoPrimeError; // final stat. error of QC{2'} | |
5486 | fDiffFlowCumulants[t][pe][0]->SetBinContent(b,qc2Prime); | |
5487 | //fFinalCumulantsPt[t][pW][eW][nua][0]->SetBinError(p,qc2PrimeError); | |
5488 | // QC{4'}: | |
5489 | Double_t qc4Prime = fourPrime - 2.*twoPrime*two; // QC{4'} = <<4'>> - 2*<<2'>><<2>> | |
5490 | fDiffFlowCumulants[t][pe][1]->SetBinContent(b,qc4Prime); | |
5491 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5492 | ||
5493 | ||
5494 | /* | |
5495 | // 2D (pt,eta): | |
5496 | // to be improved (see documentation if I can do all this without looping) | |
5497 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5498 | { | |
5499 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5500 | { | |
5501 | // reduced correlations: | |
5502 | Double_t twoPrime = fFinalCorrelations2D[t][pW][eW][0]->GetBinContent(fFinalCorrelations2D[t][pW][eW][0]->GetBin(p,e)); // <<2'>>(pt,eta) | |
5503 | Double_t fourPrime = fFinalCorrelations2D[t][pW][eW][1]->GetBinContent(fFinalCorrelations2D[t][pW][eW][1]->GetBin(p,e)); // <<4'>>(pt,eta) | |
5504 | for(Int_t nua=0;nua<2;nua++) | |
5505 | { | |
5506 | // QC{2'}: | |
5507 | Double_t qc2Prime = twoPrime; // QC{2'} = <<2'>> | |
5508 | fFinalCumulants2D[t][pW][eW][nua][0]->SetBinContent(fFinalCumulants2D[t][pW][eW][nua][0]->GetBin(p,e),qc2Prime); | |
5509 | // QC{4'}: | |
5510 | Double_t qc4Prime = fourPrime - 2.*twoPrime*two; // QC{4'} = <<4'>> - 2*<<2'>><<2>> | |
5511 | fFinalCumulants2D[t][pW][eW][nua][1]->SetBinContent(fFinalCumulants2D[t][pW][eW][nua][1]->GetBin(p,e),qc4Prime); | |
5512 | } // end of for(Int_t nua=0;nua<2;nua++) | |
5513 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5514 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5515 | */ | |
5516 | ||
5517 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulants(TString type, Bool_t useParticleWeights, TString eventWeights); | |
5518 | ||
5519 | ||
5520 | //================================================================================================================================ | |
5521 | ||
5522 | ||
5523 | void AliFlowAnalysisWithQCumulants::CalculateFinalResultsForRPandPOIIntegratedFlow(TString type) | |
5524 | { | |
5525 | // calculate final results for integrated flow of RPs and POIs | |
5526 | ||
5527 | Int_t typeFlag = -1; | |
5528 | ||
5529 | if(type == "RP") | |
5530 | { | |
5531 | typeFlag = 0; | |
5532 | } else if(type == "POI") | |
5533 | { | |
5534 | typeFlag = 1; | |
5535 | } else | |
5536 | { | |
5537 | cout<<"WARNING: type must be either RP or POI in AFAWQC::CDF() !!!!"<<endl; | |
5538 | exit(0); | |
5539 | } | |
5540 | ||
5541 | // shortcuts: | |
5542 | Int_t t = typeFlag; | |
5543 | ||
5544 | // pt yield: | |
5545 | TH1F *yield2ndPt = NULL; | |
5546 | TH1F *yield4thPt = NULL; | |
5547 | TH1F *yield6thPt = NULL; | |
5548 | TH1F *yield8thPt = NULL; | |
5549 | ||
5550 | if(type == "POI") | |
5551 | { | |
5552 | yield2ndPt = (TH1F*)(fCommonHists2nd->GetHistPtPOI())->Clone(); | |
5553 | yield4thPt = (TH1F*)(fCommonHists4th->GetHistPtPOI())->Clone(); | |
5554 | yield6thPt = (TH1F*)(fCommonHists6th->GetHistPtPOI())->Clone(); | |
5555 | yield8thPt = (TH1F*)(fCommonHists8th->GetHistPtPOI())->Clone(); | |
5556 | } | |
5557 | else if(type == "RP") | |
5558 | { | |
5559 | yield2ndPt = (TH1F*)(fCommonHists2nd->GetHistPtRP())->Clone(); | |
5560 | yield4thPt = (TH1F*)(fCommonHists4th->GetHistPtRP())->Clone(); | |
5561 | yield6thPt = (TH1F*)(fCommonHists6th->GetHistPtRP())->Clone(); | |
5562 | yield8thPt = (TH1F*)(fCommonHists8th->GetHistPtRP())->Clone(); | |
5563 | } | |
5564 | ||
5565 | Int_t nBinsPt = yield2ndPt->GetNbinsX(); | |
5566 | ||
5567 | TH1D *flow2ndPt = NULL; | |
5568 | TH1D *flow4thPt = NULL; | |
5569 | TH1D *flow6thPt = NULL; | |
5570 | TH1D *flow8thPt = NULL; | |
5571 | ||
5572 | // to be improved (hardwired pt index) | |
5573 | flow2ndPt = (TH1D*)fDiffFlow[t][0][0]->Clone(); | |
5574 | flow4thPt = (TH1D*)fDiffFlow[t][0][1]->Clone(); | |
5575 | flow6thPt = (TH1D*)fDiffFlow[t][0][2]->Clone(); | |
5576 | flow8thPt = (TH1D*)fDiffFlow[t][0][3]->Clone(); | |
5577 | ||
5578 | Double_t dvn2nd = 0., dvn4th = 0., dvn6th = 0., dvn8th = 0.; // differential flow | |
5579 | Double_t dErrvn2nd = 0., dErrvn4th = 0., dErrvn6th = 0., dErrvn8th = 0.; // error on differential flow | |
5580 | ||
5581 | Double_t dVn2nd = 0., dVn4th = 0., dVn6th = 0., dVn8th = 0.; // integrated flow | |
5582 | Double_t dErrVn2nd = 0., dErrVn4th = 0., dErrVn6th = 0., dErrVn8th = 0.; // error on integrated flow | |
5583 | ||
5584 | Double_t dYield2nd = 0., dYield4th = 0., dYield6th = 0., dYield8th = 0.; // pt yield | |
5585 | Double_t dSum2nd = 0., dSum4th = 0., dSum6th = 0., dSum8th = 0.; // needed for normalizing integrated flow | |
5586 | ||
5587 | // looping over pt bins: | |
5588 | for(Int_t p=1;p<nBinsPt+1;p++) | |
5589 | { | |
5590 | dvn2nd = flow2ndPt->GetBinContent(p); | |
5591 | dvn4th = flow4thPt->GetBinContent(p); | |
5592 | dvn6th = flow6thPt->GetBinContent(p); | |
5593 | dvn8th = flow8thPt->GetBinContent(p); | |
5594 | ||
5595 | dErrvn2nd = flow2ndPt->GetBinError(p); | |
5596 | dErrvn4th = flow4thPt->GetBinError(p); | |
5597 | dErrvn6th = flow6thPt->GetBinError(p); | |
5598 | dErrvn8th = flow8thPt->GetBinError(p); | |
5599 | ||
5600 | dYield2nd = yield2ndPt->GetBinContent(p); | |
5601 | dYield4th = yield4thPt->GetBinContent(p); | |
5602 | dYield6th = yield6thPt->GetBinContent(p); | |
5603 | dYield8th = yield8thPt->GetBinContent(p); | |
5604 | ||
5605 | dVn2nd += dvn2nd*dYield2nd; | |
5606 | dVn4th += dvn4th*dYield4th; | |
5607 | dVn6th += dvn6th*dYield6th; | |
5608 | dVn8th += dvn8th*dYield8th; | |
5609 | ||
5610 | dSum2nd += dYield2nd; | |
5611 | dSum4th += dYield4th; | |
5612 | dSum6th += dYield6th; | |
5613 | dSum8th += dYield8th; | |
5614 | ||
5615 | dErrVn2nd += dYield2nd*dYield2nd*dErrvn2nd*dErrvn2nd; // ro be improved (check this relation) | |
5616 | dErrVn4th += dYield4th*dYield4th*dErrvn4th*dErrvn4th; | |
5617 | dErrVn6th += dYield6th*dYield6th*dErrvn6th*dErrvn6th; | |
5618 | dErrVn8th += dYield8th*dYield8th*dErrvn8th*dErrvn8th; | |
5619 | ||
5620 | } // end of for(Int_t p=1;p<nBinsPt+1;p++) | |
5621 | ||
5622 | // normalizing the results for integrated flow: | |
5623 | if(dSum2nd) | |
5624 | { | |
5625 | dVn2nd /= dSum2nd; | |
5626 | dErrVn2nd /= (dSum2nd*dSum2nd); | |
5627 | dErrVn2nd = TMath::Sqrt(dErrVn2nd); | |
5628 | } | |
5629 | if(dSum4th) | |
5630 | { | |
5631 | dVn4th /= dSum4th; | |
5632 | dErrVn4th /= (dSum4th*dSum4th); | |
5633 | dErrVn4th = TMath::Sqrt(dErrVn4th); | |
5634 | } | |
5635 | //if(dSum6th) dVn6th/=dSum6th; | |
5636 | //if(dSum8th) dVn8th/=dSum8th; | |
5637 | ||
5638 | // storing the results for integrated flow in common histos: (to be improved: new method for this?) | |
5639 | if(type == "POI") | |
5640 | { | |
5641 | fCommonHistsResults2nd->FillIntegratedFlowPOI(dVn2nd,dErrVn2nd); | |
5642 | fCommonHistsResults4th->FillIntegratedFlowPOI(dVn4th,dErrVn4th); | |
5643 | fCommonHistsResults6th->FillIntegratedFlowPOI(dVn6th,0.); // to be improved (errors) | |
5644 | fCommonHistsResults8th->FillIntegratedFlowPOI(dVn8th,0.); // to be improved (errors) | |
5645 | } | |
5646 | else if (type == "RP") | |
5647 | { | |
5648 | fCommonHistsResults2nd->FillIntegratedFlowRP(dVn2nd,dErrVn2nd); | |
5649 | fCommonHistsResults4th->FillIntegratedFlowRP(dVn4th,dErrVn4th); | |
5650 | fCommonHistsResults6th->FillIntegratedFlowRP(dVn6th,0.); // to be improved (errors) | |
5651 | fCommonHistsResults8th->FillIntegratedFlowRP(dVn8th,0.); // to be improved (errors) | |
5652 | } | |
5653 | ||
5654 | delete flow2ndPt; | |
5655 | delete flow4thPt; | |
5656 | //delete flow6thPt; | |
5657 | //delete flow8thPt; | |
5658 | ||
5659 | delete yield2ndPt; | |
5660 | delete yield4thPt; | |
5661 | delete yield6thPt; | |
5662 | delete yield8thPt; | |
5663 | ||
5664 | } // end of AliFlowAnalysisWithQCumulants::CalculateFinalResultsForRPandPOIIntegratedFlow(TString type) | |
5665 | ||
5666 | ||
5667 | //================================================================================================================================ | |
5668 | ||
5669 | ||
5670 | void AliFlowAnalysisWithQCumulants::InitializeArraysForDistributions() | |
5671 | { | |
5672 | // Initialize all arrays used for distributions. | |
5673 | ||
5674 | // a) Initialize arrays of histograms used to hold distributions of correlations; | |
5675 | // b) Initialize array to hold min and max values of correlations. | |
5676 | ||
5677 | // a) Initialize arrays of histograms used to hold distributions of correlations: | |
5678 | for(Int_t di=0;di<4;di++) // distribution index | |
5679 | { | |
5680 | fDistributions[di] = NULL; | |
5681 | } | |
5682 | ||
5683 | // b) Initialize default min and max values of correlations: | |
5684 | // (Remark: The default values bellow were chosen for v2=5% and M=500) | |
5685 | fMinValueOfCorrelation[0] = -0.01; // <2>_min | |
5686 | fMaxValueOfCorrelation[0] = 0.04; // <2>_max | |
5687 | fMinValueOfCorrelation[1] = -0.00002; // <4>_min | |
5688 | fMaxValueOfCorrelation[1] = 0.00015; // <4>_max | |
5689 | fMinValueOfCorrelation[2] = -0.0000003; // <6>_min | |
5690 | fMaxValueOfCorrelation[2] = 0.0000006; // <6>_max | |
5691 | fMinValueOfCorrelation[3] = -0.000000006; // <8>_min | |
5692 | fMaxValueOfCorrelation[3] = 0.000000003; // <8>_max | |
5693 | ||
5694 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForDistributions() | |
5695 | ||
5696 | ||
5697 | //================================================================================================================================ | |
5698 | ||
5699 | ||
5700 | void AliFlowAnalysisWithQCumulants::BookEverythingForDistributions() | |
5701 | { | |
5702 | // a) Book profile to hold all flags for distributions of correlations; | |
5703 | // b) Book all histograms to hold distributions of correlations. | |
5704 | ||
5705 | TString correlationIndex[4] = {"<2>","<4>","<6>","<8>"}; // to be improved (should I promote this to data members?) | |
5706 | ||
5707 | // a) Book profile to hold all flags for distributions of correlations: | |
5708 | TString distributionsFlagsName = "fDistributionsFlags"; | |
5709 | distributionsFlagsName += fAnalysisLabel->Data(); | |
5710 | fDistributionsFlags = new TProfile(distributionsFlagsName.Data(),"Flags for Distributions of Correlations",9,0,9); | |
5711 | fDistributionsFlags->SetTickLength(-0.01,"Y"); | |
5712 | fDistributionsFlags->SetMarkerStyle(25); | |
5713 | fDistributionsFlags->SetLabelSize(0.05); | |
5714 | fDistributionsFlags->SetLabelOffset(0.02,"Y"); | |
5715 | fDistributionsFlags->GetXaxis()->SetBinLabel(1,"Store or not?"); | |
5716 | fDistributionsFlags->GetXaxis()->SetBinLabel(2,"<2>_{min}"); | |
5717 | fDistributionsFlags->GetXaxis()->SetBinLabel(3,"<2>_{max}"); | |
5718 | fDistributionsFlags->GetXaxis()->SetBinLabel(4,"<4>_{min}"); | |
5719 | fDistributionsFlags->GetXaxis()->SetBinLabel(5,"<4>_{max}"); | |
5720 | fDistributionsFlags->GetXaxis()->SetBinLabel(6,"<6>_{min}"); | |
5721 | fDistributionsFlags->GetXaxis()->SetBinLabel(7,"<6>_{max}"); | |
5722 | fDistributionsFlags->GetXaxis()->SetBinLabel(8,"<8>_{min}"); | |
5723 | fDistributionsFlags->GetXaxis()->SetBinLabel(9,"<8>_{max}"); | |
5724 | fDistributionsList->Add(fDistributionsFlags); | |
5725 | ||
5726 | // b) Book all histograms to hold distributions of correlations. | |
5727 | if(fStoreDistributions) | |
5728 | { | |
5729 | TString distributionsName = "fDistributions"; | |
5730 | distributionsName += fAnalysisLabel->Data(); | |
5731 | for(Int_t di=0;di<4;di++) // distribution index | |
5732 | { | |
5733 | fDistributions[di] = new TH1D(Form("Distribution of %s",correlationIndex[di].Data()),Form("Distribution of %s",correlationIndex[di].Data()),10000,fMinValueOfCorrelation[di],fMaxValueOfCorrelation[di]); | |
5734 | fDistributions[di]->SetXTitle(correlationIndex[di].Data()); | |
5735 | fDistributionsList->Add(fDistributions[di]); | |
5736 | } // end of for(Int_t di=0;di<4;di++) // distribution index | |
5737 | } // end of if(fStoreDistributions) | |
5738 | ||
5739 | } // end of void AliFlowAnalysisWithQCumulants::BookEverythingForDistributions() | |
5740 | ||
5741 | ||
5742 | //================================================================================================================================ | |
5743 | ||
5744 | ||
5745 | void AliFlowAnalysisWithQCumulants::StoreFlagsForDistributions() | |
5746 | { | |
5747 | // Store all flags for distributiuons of correlations in profile fDistributionsFlags. | |
5748 | ||
5749 | if(!fDistributionsFlags) | |
5750 | { | |
5751 | cout<<"WARNING: fDistributionsFlags is NULL in AFAWQC::SDF() !!!!"<<endl; | |
5752 | exit(0); | |
5753 | } | |
5754 | ||
5755 | fDistributionsFlags->Fill(0.5,(Int_t)fStoreDistributions); // histos with distributions of correlations stored or not in the output file | |
5756 | // store min and max values of correlations: | |
5757 | for(Int_t di=0;di<4;di++) // distribution index | |
5758 | { | |
5759 | fDistributionsFlags->Fill(1.5+2.*(Double_t)di,fMinValueOfCorrelation[di]); | |
5760 | fDistributionsFlags->Fill(2.5+2.*(Double_t)di,fMaxValueOfCorrelation[di]); | |
5761 | } | |
5762 | ||
5763 | } // end of void AliFlowAnalysisWithQCumulants::StoreFlagsForDistributions() | |
5764 | ||
5765 | ||
5766 | //================================================================================================================================ | |
5767 | ||
5768 | ||
5769 | void AliFlowAnalysisWithQCumulants::StoreDistributionsOfCorrelations() | |
5770 | { | |
5771 | // Store distributions of correlations. | |
5772 | ||
5773 | if(!(fIntFlowCorrelationsEBE && fIntFlowEventWeightsForCorrelationsEBE)) | |
5774 | { | |
5775 | cout<<"WARNING: fIntFlowCorrelationsEBE && fIntFlowEventWeightsForCorrelationsEBE"<<endl; | |
5776 | cout<<" is NULL in AFAWQC::SDOC() !!!!"<<endl; | |
5777 | exit(0); | |
5778 | } | |
5779 | ||
5780 | for(Int_t di=0;di<4;di++) // distribution index | |
5781 | { | |
5782 | if(!fDistributions[di]) | |
5783 | { | |
5784 | cout<<"WARNING: fDistributions[di] is NULL in AFAWQC::SDOC() !!!!"<<endl; | |
5785 | cout<<"di = "<<di<<endl; | |
5786 | exit(0); | |
5787 | } else | |
5788 | { | |
5789 | fDistributions[di]->Fill(fIntFlowCorrelationsEBE->GetBinContent(di+1),fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(di+1)); | |
5790 | } | |
5791 | } // end of for(Int_t di=0;di<4;di++) // distribution index | |
5792 | ||
5793 | } // end of void AliFlowAnalysisWithQCumulants::StoreDistributionsOfCorrelations() | |
5794 | ||
5795 | ||
5796 | //================================================================================================================================ | |
5797 | ||
5798 | ||
5799 | void AliFlowAnalysisWithQCumulants::BookAndNestAllLists() | |
5800 | { | |
5801 | // Book and nest all lists nested in the base list fHistList. | |
5802 | // a) Book and nest lists for integrated flow; | |
5803 | // b) Book and nest lists for differential flow; | |
5804 | // c) Book and nest list for particle weights; | |
5805 | // d) Book and nest list for distributions; | |
5806 | // e) Book and nest list for nested loops; | |
5807 | ||
5808 | // a) Book and nest all lists for integrated flow: | |
5809 | // base list for integrated flow: | |
5810 | fIntFlowList = new TList(); | |
5811 | fIntFlowList->SetName("Integrated Flow"); | |
5812 | fIntFlowList->SetOwner(kTRUE); | |
5813 | fHistList->Add(fIntFlowList); | |
5814 | // list holding profiles: | |
5815 | fIntFlowProfiles = new TList(); | |
5816 | fIntFlowProfiles->SetName("Profiles"); | |
5817 | fIntFlowProfiles->SetOwner(kTRUE); | |
5818 | fIntFlowList->Add(fIntFlowProfiles); | |
5819 | // list holding histograms with results: | |
5820 | fIntFlowResults = new TList(); | |
5821 | fIntFlowResults->SetName("Results"); | |
5822 | fIntFlowResults->SetOwner(kTRUE); | |
5823 | fIntFlowList->Add(fIntFlowResults); | |
5824 | ||
5825 | // b) Book and nest lists for differential flow; | |
5826 | fDiffFlowList = new TList(); | |
5827 | fDiffFlowList->SetName("Differential Flow"); | |
5828 | fDiffFlowList->SetOwner(kTRUE); | |
5829 | fHistList->Add(fDiffFlowList); | |
5830 | // list holding profiles: | |
5831 | fDiffFlowProfiles = new TList(); | |
5832 | fDiffFlowProfiles->SetName("Profiles"); | |
5833 | fDiffFlowProfiles->SetOwner(kTRUE); | |
5834 | fDiffFlowList->Add(fDiffFlowProfiles); | |
5835 | // list holding histograms with results: | |
5836 | fDiffFlowResults = new TList(); | |
5837 | fDiffFlowResults->SetName("Results"); | |
5838 | fDiffFlowResults->SetOwner(kTRUE); | |
5839 | fDiffFlowList->Add(fDiffFlowResults); | |
5840 | // flags used for naming nested lists in list fDiffFlowProfiles and fDiffFlowResults: | |
5841 | TList list; | |
5842 | list.SetOwner(kTRUE); | |
5843 | TString typeFlag[2] = {"RP","POI"}; | |
5844 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
5845 | TString powerFlag[2] = {"linear","quadratic"}; | |
5846 | // nested lists in fDiffFlowProfiles (~/Differential Flow/Profiles): | |
5847 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
5848 | { | |
5849 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5850 | { | |
5851 | // list holding profiles with correlations: | |
5852 | fDiffFlowCorrelationsProList[t][pe] = (TList*)list.Clone(); | |
5853 | fDiffFlowCorrelationsProList[t][pe]->SetName(Form("Profiles with correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5854 | fDiffFlowProfiles->Add(fDiffFlowCorrelationsProList[t][pe]); | |
5855 | // list holding profiles with products of correlations: | |
5856 | fDiffFlowProductOfCorrelationsProList[t][pe] = (TList*)list.Clone(); | |
5857 | fDiffFlowProductOfCorrelationsProList[t][pe]->SetName(Form("Profiles with products of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5858 | fDiffFlowProfiles->Add(fDiffFlowProductOfCorrelationsProList[t][pe]); | |
5859 | // list holding profiles with corrections: | |
5860 | fDiffFlowCorrectionsProList[t][pe] = (TList*)list.Clone(); | |
5861 | fDiffFlowCorrectionsProList[t][pe]->SetName(Form("Profiles with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5862 | fDiffFlowProfiles->Add(fDiffFlowCorrectionsProList[t][pe]); | |
5863 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5864 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
5865 | // nested lists in fDiffFlowResults (~/Differential Flow/Results): | |
5866 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
5867 | { | |
5868 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5869 | { | |
5870 | // list holding histograms with correlations: | |
5871 | fDiffFlowCorrelationsHistList[t][pe] = (TList*)list.Clone(); | |
5872 | fDiffFlowCorrelationsHistList[t][pe]->SetName(Form("Correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5873 | fDiffFlowResults->Add(fDiffFlowCorrelationsHistList[t][pe]); | |
5874 | // list holding histograms with corrections: | |
5875 | fDiffFlowCorrectionsHistList[t][pe] = (TList*)list.Clone(); | |
5876 | fDiffFlowCorrectionsHistList[t][pe]->SetName(Form("Histograms with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5877 | fDiffFlowResults->Add(fDiffFlowCorrectionsHistList[t][pe]); | |
5878 | for(Int_t power=0;power<2;power++) | |
5879 | { | |
5880 | // list holding histograms with sums of event weights: | |
5881 | fDiffFlowSumOfEventWeightsHistList[t][pe][power] = (TList*)list.Clone(); | |
5882 | fDiffFlowSumOfEventWeightsHistList[t][pe][power]->SetName(Form("Sum of %s event weights (%s, %s)",powerFlag[power].Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5883 | fDiffFlowResults->Add(fDiffFlowSumOfEventWeightsHistList[t][pe][power]); | |
5884 | } // end of for(Int_t power=0;power<2;power++) | |
5885 | // list holding histograms with sums of products of event weights: | |
5886 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe] = (TList*)list.Clone(); | |
5887 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]->SetName(Form("Sum of products of event weights (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5888 | fDiffFlowResults->Add(fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]); | |
5889 | // list holding histograms with covariances of correlations: | |
5890 | fDiffFlowCovariancesHistList[t][pe] = (TList*)list.Clone(); | |
5891 | fDiffFlowCovariancesHistList[t][pe]->SetName(Form("Covariances of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5892 | fDiffFlowResults->Add(fDiffFlowCovariancesHistList[t][pe]); | |
5893 | // list holding histograms with differential Q-cumulants: | |
5894 | fDiffFlowCumulantsHistList[t][pe] = (TList*)list.Clone(); | |
5895 | fDiffFlowCumulantsHistList[t][pe]->SetName(Form("Differential Q-cumulants (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5896 | fDiffFlowResults->Add(fDiffFlowCumulantsHistList[t][pe]); | |
5897 | // list holding histograms with differential flow estimates from Q-cumulants: | |
5898 | fDiffFlowHistList[t][pe] = (TList*)list.Clone(); | |
5899 | fDiffFlowHistList[t][pe]->SetName(Form("Differential flow (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5900 | fDiffFlowResults->Add(fDiffFlowHistList[t][pe]); | |
5901 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5902 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
5903 | ||
5904 | // c) Book and nest list for particle weights: | |
5905 | fWeightsList->SetName("Weights"); | |
5906 | fWeightsList->SetOwner(kTRUE); | |
5907 | fHistList->Add(fWeightsList); | |
5908 | ||
5909 | // d) Book and nest list for distributions: | |
5910 | fDistributionsList = new TList(); | |
5911 | fDistributionsList->SetName("Distributions"); | |
5912 | fDistributionsList->SetOwner(kTRUE); | |
5913 | fHistList->Add(fDistributionsList); | |
5914 | ||
5915 | // e) Book and nest list for nested loops: | |
5916 | fNestedLoopsList = new TList(); | |
5917 | fNestedLoopsList->SetName("Nested Loops"); | |
5918 | fNestedLoopsList->SetOwner(kTRUE); | |
5919 | fHistList->Add(fNestedLoopsList); | |
5920 | ||
5921 | } // end of void AliFlowAnalysisWithQCumulants::BookAndNestAllLists() | |
5922 | ||
5923 | ||
5924 | //================================================================================================================================ | |
5925 | ||
5926 | ||
5927 | void AliFlowAnalysisWithQCumulants::FillCommonHistResultsDiffFlow(TString type) | |
5928 | { | |
5929 | // fill common result histograms for differential flow | |
5930 | ||
5931 | Int_t typeFlag = -1; | |
5932 | //Int_t ptEtaFlag = -1; | |
5933 | ||
5934 | if(type == "RP") | |
5935 | { | |
5936 | typeFlag = 0; | |
5937 | } else if(type == "POI") | |
5938 | { | |
5939 | typeFlag = 1; | |
5940 | } | |
5941 | ||
5942 | // shortcuts: | |
5943 | Int_t t = typeFlag; | |
5944 | //Int_t pe = ptEtaFlag; | |
5945 | ||
5946 | // to be improved (implement protection here) | |
5947 | ||
5948 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th)) | |
5949 | { | |
5950 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; | |
5951 | cout<<" is NULL in AFAWQC::FCHRIF() !!!!"<<endl; | |
5952 | exit(0); | |
5953 | } | |
5954 | ||
5955 | // pt: | |
5956 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5957 | { | |
5958 | Double_t v2 = fDiffFlow[t][0][0]->GetBinContent(p); | |
5959 | Double_t v4 = fDiffFlow[t][0][1]->GetBinContent(p); | |
5960 | Double_t v6 = fDiffFlow[t][0][2]->GetBinContent(p); | |
5961 | Double_t v8 = fDiffFlow[t][0][3]->GetBinContent(p); | |
5962 | ||
5963 | Double_t v2Error = fDiffFlow[t][0][0]->GetBinError(p); | |
5964 | Double_t v4Error = fDiffFlow[t][0][1]->GetBinError(p); | |
5965 | //Double_t v6Error = fFinalFlow1D[t][pW][nua][0][2]->GetBinError(p); | |
5966 | //Double_t v8Error = fFinalFlow1D[t][pW][nua][0][3]->GetBinError(p); | |
5967 | ||
5968 | if(type == "RP") | |
5969 | { | |
5970 | fCommonHistsResults2nd->FillDifferentialFlowPtRP(p,v2,v2Error); | |
5971 | fCommonHistsResults4th->FillDifferentialFlowPtRP(p,v4,v4Error); | |
5972 | fCommonHistsResults6th->FillDifferentialFlowPtRP(p,v6,0.); | |
5973 | fCommonHistsResults8th->FillDifferentialFlowPtRP(p,v8,0.); | |
5974 | } else if(type == "POI") | |
5975 | { | |
5976 | fCommonHistsResults2nd->FillDifferentialFlowPtPOI(p,v2,v2Error); | |
5977 | fCommonHistsResults4th->FillDifferentialFlowPtPOI(p,v4,v4Error); | |
5978 | fCommonHistsResults6th->FillDifferentialFlowPtPOI(p,v6,0.); | |
5979 | fCommonHistsResults8th->FillDifferentialFlowPtPOI(p,v8,0.); | |
5980 | } | |
5981 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5982 | ||
5983 | // eta: | |
5984 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5985 | { | |
5986 | Double_t v2 = fDiffFlow[t][1][0]->GetBinContent(e); | |
5987 | Double_t v4 = fDiffFlow[t][1][1]->GetBinContent(e); | |
5988 | Double_t v6 = fDiffFlow[t][1][2]->GetBinContent(e); | |
5989 | Double_t v8 = fDiffFlow[t][1][3]->GetBinContent(e); | |
5990 | ||
5991 | Double_t v2Error = fDiffFlow[t][1][0]->GetBinError(e); | |
5992 | Double_t v4Error = fDiffFlow[t][1][1]->GetBinError(e); | |
5993 | //Double_t v6Error = fDiffFlow[t][1][2]->GetBinError(e); | |
5994 | //Double_t v8Error = fDiffFlow[t][1][3]->GetBinError(e); | |
5995 | ||
5996 | if(type == "RP") | |
5997 | { | |
5998 | fCommonHistsResults2nd->FillDifferentialFlowEtaRP(e,v2,v2Error); | |
5999 | fCommonHistsResults4th->FillDifferentialFlowEtaRP(e,v4,v4Error); | |
6000 | fCommonHistsResults6th->FillDifferentialFlowEtaRP(e,v6,0.); | |
6001 | fCommonHistsResults8th->FillDifferentialFlowEtaRP(e,v8,0.); | |
6002 | } else if(type == "POI") | |
6003 | { | |
6004 | fCommonHistsResults2nd->FillDifferentialFlowEtaPOI(e,v2,v2Error); | |
6005 | fCommonHistsResults4th->FillDifferentialFlowEtaPOI(e,v4,v4Error); | |
6006 | fCommonHistsResults6th->FillDifferentialFlowEtaPOI(e,v6,0.); | |
6007 | fCommonHistsResults8th->FillDifferentialFlowEtaPOI(e,v8,0.); | |
6008 | } | |
6009 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
6010 | ||
6011 | } // end of void AliFlowAnalysisWithQCumulants::FillCommonHistResultsDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights, Bool_t correctedForNUA) | |
6012 | ||
6013 | ||
6014 | //================================================================================================================================ | |
6015 | ||
6016 | ||
6017 | void AliFlowAnalysisWithQCumulants::AccessConstants() | |
6018 | { | |
6019 | // Access needed common constants from AliFlowCommonConstants | |
6020 | ||
6021 | fnBinsPhi = AliFlowCommonConstants::GetMaster()->GetNbinsPhi(); | |
6022 | fPhiMin = AliFlowCommonConstants::GetMaster()->GetPhiMin(); | |
6023 | fPhiMax = AliFlowCommonConstants::GetMaster()->GetPhiMax(); | |
6024 | if(fnBinsPhi) fPhiBinWidth = (fPhiMax-fPhiMin)/fnBinsPhi; | |
6025 | fnBinsPt = AliFlowCommonConstants::GetMaster()->GetNbinsPt(); | |
6026 | fPtMin = AliFlowCommonConstants::GetMaster()->GetPtMin(); | |
6027 | fPtMax = AliFlowCommonConstants::GetMaster()->GetPtMax(); | |
6028 | if(fnBinsPt) fPtBinWidth = (fPtMax-fPtMin)/fnBinsPt; | |
6029 | fnBinsEta = AliFlowCommonConstants::GetMaster()->GetNbinsEta(); | |
6030 | fEtaMin = AliFlowCommonConstants::GetMaster()->GetEtaMin(); | |
6031 | fEtaMax = AliFlowCommonConstants::GetMaster()->GetEtaMax(); | |
6032 | if(fnBinsEta) fEtaBinWidth = (fEtaMax-fEtaMin)/fnBinsEta; | |
6033 | ||
6034 | } // end of void AliFlowAnalysisWithQCumulants::AccessConstants() | |
6035 | ||
6036 | ||
6037 | //================================================================================================================================ | |
6038 | ||
6039 | ||
6040 | void AliFlowAnalysisWithQCumulants::CrossCheckSettings() | |
6041 | { | |
6042 | // a) Cross check if the choice for multiplicity weights make sense; | |
6043 | ||
6044 | // a) Cross check if the choice for multiplicity weights make sense: | |
6045 | if(strcmp(fMultiplicityWeight->Data(),"combinations") && | |
6046 | strcmp(fMultiplicityWeight->Data(),"unit") && | |
6047 | strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
6048 | { | |
6049 | cout<<"WARNING (QC): Multiplicity weight can be either \"combinations\", \"unit\""<<endl; | |
6050 | cout<<" or \"multiplicity\". Certainly not \""<<fMultiplicityWeight->Data()<<"\"."<<endl; | |
6051 | exit(0); | |
6052 | } | |
6053 | ||
6054 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckSettings() | |
6055 | ||
489d5531 | 6056 | //================================================================================================================================ |
6057 | ||
489d5531 | 6058 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeights() |
6059 | { | |
0328db2d | 6060 | // Calculate sum of linear and quadratic event weights for correlations. |
9f33751d | 6061 | |
489d5531 | 6062 | for(Int_t p=0;p<2;p++) // power-1 |
6063 | { | |
6064 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
6065 | { | |
6066 | fIntFlowSumOfEventWeights[p]->Fill(ci+0.5,pow(fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci+1),p+1)); | |
9f33751d | 6067 | fIntFlowSumOfEventWeightsVsM[ci][p]->Fill(fReferenceMultiplicityEBE+0.5,pow(fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci+1),p+1)); |
489d5531 | 6068 | } |
6069 | } | |
6070 | ||
6071 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeights() | |
6072 | ||
489d5531 | 6073 | //================================================================================================================================ |
6074 | ||
0328db2d | 6075 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeightsNUA() |
489d5531 | 6076 | { |
0328db2d | 6077 | // Calculate sum of linear and quadratic event weights for NUA terms. |
6078 | ||
6079 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
489d5531 | 6080 | { |
0328db2d | 6081 | for(Int_t p=0;p<2;p++) // power-1 |
6082 | { | |
6083 | for(Int_t ci=0;ci<3;ci++) // nua term index | |
6084 | { | |
6085 | fIntFlowSumOfEventWeightsNUA[sc][p]->Fill(ci+0.5,pow(fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc]->GetBinContent(ci+1),p+1)); | |
489d5531 | 6086 | } |
0328db2d | 6087 | } |
6088 | } | |
6089 | ||
6090 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeightsNUA() | |
489d5531 | 6091 | |
0328db2d | 6092 | //================================================================================================================================ |
6093 | ||
0328db2d | 6094 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfProductOfEventWeights() |
6095 | { | |
ff70ca91 | 6096 | // Calculate sum of product of event weights for correlations. |
9f33751d | 6097 | |
489d5531 | 6098 | Int_t counter = 0; |
6099 | ||
6100 | for(Int_t ci1=1;ci1<4;ci1++) | |
6101 | { | |
6102 | for(Int_t ci2=ci1+1;ci2<=4;ci2++) | |
6103 | { | |
ff70ca91 | 6104 | fIntFlowSumOfProductOfEventWeights->Fill(0.5+counter, |
6105 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* | |
6106 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
9f33751d | 6107 | fIntFlowSumOfProductOfEventWeightsVsM[counter]->Fill(fReferenceMultiplicityEBE+0.5, |
ff70ca91 | 6108 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* |
6109 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
6110 | counter++; | |
489d5531 | 6111 | } |
6112 | } | |
6113 | ||
0328db2d | 6114 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfProductOfEventWeights() |
6115 | ||
0328db2d | 6116 | //================================================================================================================================ |
6117 | ||
0328db2d | 6118 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfProductOfEventWeightsNUA() |
6119 | { | |
6120 | // Calculate sum of product of event weights for NUA terms. | |
6121 | ||
6122 | // w_{<2>} * w_{<cos(#phi)>}: | |
6123 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(0.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6124 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
6125 | // w_{<2>} * w_{<sin(#phi)>}: | |
6126 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(1.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6127 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
6128 | // w_{<cos(#phi)> * w_{<sin(#phi)>}: | |
6129 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(2.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6130 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
6131 | // w_{<2>} * w{<cos(phi1+phi2)>} | |
6132 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(3.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6133 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6134 | // w_{<2>} * w{<sin(phi1+phi2)>} | |
6135 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(4.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6136 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6137 | // w_{<2>} * w{<cos(phi1-phi2-phi3)>} | |
6138 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(5.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6139 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6140 | // w_{<2>} * w{<sin(phi1-phi2-phi3)>} | |
6141 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(6.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6142 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6143 | // w_{<4>} * w{<cos(phi1)>} | |
6144 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(7.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6145 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
6146 | // w_{<4>} * w{<sin(phi1)>} | |
6147 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(8.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6148 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
6149 | // w_{<4>} * w{<cos(phi1+phi2)>} | |
6150 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(9.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6151 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6152 | // w_{<4>} * w{<sin(phi1+phi2)>} | |
6153 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(10.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6154 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6155 | // w_{<4>} * w{<cos(phi1-phi2-phi3)>} | |
6156 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(11.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6157 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6158 | // w_{<4>} * w{<sin(phi1-phi2-phi3)>} | |
6159 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(12.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6160 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6161 | // w_{<cos(phi1)>} * w{<cos(phi1+phi2)>} | |
6162 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(13.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6163 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6164 | // w_{<cos(phi1)>} * w{<sin(phi1+phi2)>} | |
6165 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(14.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6166 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6167 | // w_{<cos(phi1)>} * w{<cos(phi1-phi2-phi3)>} | |
6168 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(15.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6169 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6170 | // w_{<cos(phi1)>} * w{<sin(phi1-phi2-phi3)>} | |
6171 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(16.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6172 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6173 | // w_{<sin(phi1)>} * w{<cos(phi1+phi2)>} | |
6174 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(17.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6175 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6176 | // w_{<sin(phi1)>} * w{<sin(phi1+phi2)>} | |
6177 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(18.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6178 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6179 | // w_{<sin(phi1)>} * w{<cos(phi1-phi2-phi3)>} | |
6180 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(19.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6181 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6182 | // w_{<sin(phi1)>} * w{<sin(phi1-phi2-phi3)>} | |
6183 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(20.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6184 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6185 | // w_{<cos(phi1+phi2)>} * w{<sin(phi1+phi2))>} | |
6186 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(21.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)* | |
6187 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6188 | // w_{<cos(phi1+phi2)>} * w{<cos(phi1-phi2-phi3)>} | |
6189 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(22.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)* | |
6190 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6191 | // w_{<cos(phi1+phi2)>} * w{<sin(phi1-phi2-phi3)>} | |
6192 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(23.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)* | |
6193 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6194 | // w_{<sin(phi1+phi2)>} * w{<cos(phi1-phi2-phi3)>} | |
6195 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(24.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)* | |
6196 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6197 | // w_{<sin(phi1+phi2)>} * w{<sin(phi1-phi2-phi3)>} | |
6198 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(25.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)* | |
6199 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6200 | // w_{<cos(phi1-phi2-phi3)>} * w{<sin(phi1-phi2-phi3)>} | |
6201 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(26.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)* | |
6202 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6203 | ||
6204 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowIntFlowSumOfProductOfEventWeightsNUA() | |
489d5531 | 6205 | |
6206 | ||
6207 | //================================================================================================================================ | |
6208 | ||
6209 | ||
6210 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelations(TString type, TString ptOrEta) | |
6211 | { | |
6212 | // calculate reduced correlations for RPs or POIs in pt or eta bins | |
6213 | ||
6214 | // multiplicity: | |
6215 | Double_t dMult = (*fSMpk)(0,0); | |
6216 | ||
6217 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
6218 | Double_t dReQ1n = (*fReQ)(0,0); | |
6219 | Double_t dReQ2n = (*fReQ)(1,0); | |
6220 | //Double_t dReQ3n = (*fReQ)(2,0); | |
6221 | //Double_t dReQ4n = (*fReQ)(3,0); | |
6222 | Double_t dImQ1n = (*fImQ)(0,0); | |
6223 | Double_t dImQ2n = (*fImQ)(1,0); | |
6224 | //Double_t dImQ3n = (*fImQ)(2,0); | |
6225 | //Double_t dImQ4n = (*fImQ)(3,0); | |
6226 | ||
6227 | // reduced correlations are stored in fDiffFlowCorrelationsPro[0=RP,1=POI][0=pt,1=eta][correlation index]. Correlation index runs as follows: | |
6228 | // | |
6229 | // 0: <<2'>> | |
6230 | // 1: <<4'>> | |
6231 | // 2: <<6'>> | |
6232 | // 3: <<8'>> | |
6233 | ||
6234 | Int_t t = -1; // type flag | |
6235 | Int_t pe = -1; // ptEta flag | |
6236 | ||
6237 | if(type == "RP") | |
6238 | { | |
6239 | t = 0; | |
6240 | } else if(type == "POI") | |
6241 | { | |
6242 | t = 1; | |
6243 | } | |
6244 | ||
6245 | if(ptOrEta == "Pt") | |
6246 | { | |
6247 | pe = 0; | |
6248 | } else if(ptOrEta == "Eta") | |
6249 | { | |
6250 | pe = 1; | |
6251 | } | |
6252 | ||
6253 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6254 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6255 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6256 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6257 | ||
6258 | // looping over all bins and calculating reduced correlations: | |
6259 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6260 | { | |
6261 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
6262 | Double_t p1n0kRe = 0.; | |
6263 | Double_t p1n0kIm = 0.; | |
6264 | ||
6265 | // number of POIs in particular pt or eta bin: | |
6266 | Double_t mp = 0.; | |
6267 | ||
6268 | // 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): | |
6269 | Double_t q1n0kRe = 0.; | |
6270 | Double_t q1n0kIm = 0.; | |
6271 | Double_t q2n0kRe = 0.; | |
6272 | Double_t q2n0kIm = 0.; | |
6273 | ||
6274 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
6275 | Double_t mq = 0.; | |
6276 | ||
6277 | if(type == "POI") | |
6278 | { | |
6279 | // q_{m*n,0}: | |
6280 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
6281 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
6282 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
6283 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
6284 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
6285 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
6286 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
6287 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
6288 | ||
6289 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
6290 | } | |
6291 | else if(type == "RP") | |
6292 | { | |
6293 | // q_{m*n,0}: | |
6294 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
6295 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
6296 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
6297 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
6298 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
6299 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
6300 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
6301 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
6302 | ||
6303 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
6304 | } | |
6305 | ||
6306 | if(type == "POI") | |
6307 | { | |
6308 | // p_{m*n,0}: | |
6309 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
6310 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
6311 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
6312 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
6313 | ||
6314 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
6315 | ||
6316 | t = 1; // typeFlag = RP or POI | |
6317 | } | |
6318 | else if(type == "RP") | |
6319 | { | |
6320 | // p_{m*n,0} = q_{m*n,0}: | |
6321 | p1n0kRe = q1n0kRe; | |
6322 | p1n0kIm = q1n0kIm; | |
6323 | ||
6324 | mp = mq; | |
6325 | ||
6326 | t = 0; // typeFlag = RP or POI | |
6327 | } | |
6328 | ||
6329 | // 2'-particle correlation for particular (pt,eta) bin: | |
6330 | Double_t two1n1nPtEta = 0.; | |
6331 | if(mp*dMult-mq) | |
6332 | { | |
6333 | two1n1nPtEta = (p1n0kRe*dReQ1n+p1n0kIm*dImQ1n-mq) | |
6334 | / (mp*dMult-mq); | |
6335 | ||
6336 | if(type == "POI") // to be improved (I do not this if) | |
6337 | { | |
6338 | // fill profile to get <<2'>> for POIs | |
6339 | fDiffFlowCorrelationsPro[1][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nPtEta,mp*dMult-mq); | |
6340 | // histogram to store <2'> for POIs e-b-e (needed in some other methods): | |
6341 | fDiffFlowCorrelationsEBE[1][pe][0]->SetBinContent(b,two1n1nPtEta); | |
6342 | fDiffFlowEventWeightsForCorrelationsEBE[1][pe][0]->SetBinContent(b,mp*dMult-mq); | |
6343 | } | |
6344 | else if(type == "RP") // to be improved (I do not this if) | |
6345 | { | |
6346 | // profile to get <<2'>> for RPs: | |
6347 | fDiffFlowCorrelationsPro[0][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nPtEta,mp*dMult-mq); | |
6348 | // histogram to store <2'> for RPs e-b-e (needed in some other methods): | |
6349 | fDiffFlowCorrelationsEBE[0][pe][0]->SetBinContent(b,two1n1nPtEta); | |
6350 | fDiffFlowEventWeightsForCorrelationsEBE[0][pe][0]->SetBinContent(b,mp*dMult-mq); | |
6351 | } | |
6352 | } // end of if(mp*dMult-mq) | |
6353 | ||
6354 | // 4'-particle correlation: | |
6355 | Double_t four1n1n1n1nPtEta = 0.; | |
6356 | if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6357 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression) | |
6358 | { | |
6359 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
6360 | - q2n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) | |
6361 | - 2.*q2n0kIm*dReQ1n*dImQ1n | |
6362 | - p1n0kRe*(dReQ1n*dReQ2n+dImQ1n*dImQ2n) | |
6363 | + p1n0kIm*(dImQ1n*dReQ2n-dReQ1n*dImQ2n) | |
6364 | - 2.*dMult*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
6365 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*mq | |
6366 | + 6.*(q1n0kRe*dReQ1n+q1n0kIm*dImQ1n) | |
6367 | + 1.*(q2n0kRe*dReQ2n+q2n0kIm*dImQ2n) | |
6368 | + 2.*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
6369 | + 2.*mq*dMult | |
6370 | - 6.*mq) | |
6371 | / ((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6372 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6373 | ||
6374 | if(type == "POI") | |
6375 | { | |
6376 | // profile to get <<4'>> for POIs: | |
6377 | fDiffFlowCorrelationsPro[1][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nPtEta, | |
6378 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6379 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6380 | // histogram to store <4'> for POIs e-b-e (needed in some other methods): | |
6381 | fDiffFlowCorrelationsEBE[1][pe][1]->SetBinContent(b,four1n1n1n1nPtEta); | |
6382 | fDiffFlowEventWeightsForCorrelationsEBE[1][pe][1]->SetBinContent(b,(mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6383 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6384 | } | |
6385 | else if(type == "RP") | |
6386 | { | |
6387 | // profile to get <<4'>> for RPs: | |
6388 | fDiffFlowCorrelationsPro[0][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nPtEta, | |
6389 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6390 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6391 | // histogram to store <4'> for RPs e-b-e (needed in some other methods): | |
6392 | fDiffFlowCorrelationsEBE[0][pe][1]->SetBinContent(b,four1n1n1n1nPtEta); | |
6393 | fDiffFlowEventWeightsForCorrelationsEBE[0][pe][1]->SetBinContent(b,(mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6394 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6395 | } | |
6396 | } // end of if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6397 | // +mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
6398 | ||
6399 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6400 | ||
6401 | ||
6402 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelations(TString type, TString ptOrEta); | |
6403 | ||
6404 | ||
6405 | //================================================================================================================================ | |
6406 | ||
6407 | ||
6408 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfEventWeights(TString type, TString ptOrEta) | |
6409 | { | |
6410 | // Calculate sums of various event weights for reduced correlations. | |
6411 | // (These quantitites are needed in expressions for unbiased estimators relevant for the statistical errors.) | |
6412 | ||
6413 | Int_t typeFlag = -1; | |
6414 | Int_t ptEtaFlag = -1; | |
6415 | ||
6416 | if(type == "RP") | |
6417 | { | |
6418 | typeFlag = 0; | |
6419 | } else if(type == "POI") | |
6420 | { | |
6421 | typeFlag = 1; | |
6422 | } | |
6423 | ||
6424 | if(ptOrEta == "Pt") | |
6425 | { | |
6426 | ptEtaFlag = 0; | |
6427 | } else if(ptOrEta == "Eta") | |
6428 | { | |
6429 | ptEtaFlag = 1; | |
6430 | } | |
6431 | ||
6432 | // shortcuts: | |
6433 | Int_t t = typeFlag; | |
6434 | Int_t pe = ptEtaFlag; | |
6435 | ||
6436 | // binning: | |
6437 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6438 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6439 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6440 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6441 | ||
6442 | for(Int_t rpq=0;rpq<3;rpq++) | |
6443 | { | |
6444 | for(Int_t m=0;m<4;m++) | |
6445 | { | |
6446 | for(Int_t k=0;k<9;k++) | |
6447 | { | |
6448 | if(!fReRPQ1dEBE[rpq][pe][m][k]) | |
6449 | { | |
6450 | cout<<"WARNING: fReRPQ1dEBE[rpq][pe][m][k] is NULL in AFAWQC::CSAPOEWFDF() !!!!"<<endl; | |
6451 | cout<<"pe = "<<pe<<endl; | |
6452 | cout<<"rpq = "<<rpq<<endl; | |
6453 | cout<<"m = "<<m<<endl; | |
6454 | cout<<"k = "<<k<<endl; | |
6455 | exit(0); | |
6456 | } | |
6457 | } | |
6458 | } | |
6459 | } | |
6460 | ||
6461 | // multiplicities: | |
6462 | Double_t dMult = (*fSMpk)(0,0); // total event multiplicity | |
6463 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
6464 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
6465 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
6466 | ||
6467 | // event weights for reduced correlations: | |
6468 | Double_t dw2 = 0.; // event weight for <2'> | |
6469 | Double_t dw4 = 0.; // event weight for <4'> | |
6470 | //Double_t dw6 = 0.; // event weight for <6'> | |
6471 | //Double_t dw8 = 0.; // event weight for <8'> | |
6472 | ||
6473 | // looping over bins: | |
6474 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6475 | { | |
6476 | if(type == "RP") | |
6477 | { | |
6478 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
6479 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
6480 | } else if(type == "POI") | |
6481 | { | |
6482 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
6483 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
6484 | } | |
6485 | ||
6486 | // event weight for <2'>: | |
6487 | dw2 = mp*dMult-mq; | |
6488 | fDiffFlowSumOfEventWeights[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2); | |
6489 | fDiffFlowSumOfEventWeights[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw2,2.)); | |
6490 | ||
6491 | // event weight for <4'>: | |
6492 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6493 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); | |
6494 | fDiffFlowSumOfEventWeights[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4); | |
6495 | fDiffFlowSumOfEventWeights[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw4,2.)); | |
6496 | ||
6497 | // event weight for <6'>: | |
6498 | //dw6 = ...; | |
6499 | //fDiffFlowSumOfEventWeights[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6); | |
6500 | //fDiffFlowSumOfEventWeights[t][pe][t][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw6,2.)); | |
6501 | ||
6502 | // event weight for <8'>: | |
6503 | //dw8 = ...; | |
6504 | //fDiffFlowSumOfEventWeights[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw8); | |
6505 | //fDiffFlowSumOfEventWeights[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw8,2.)); | |
6506 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6507 | ||
6508 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfEventWeights() | |
6509 | ||
6510 | ||
6511 | //================================================================================================================================ | |
6512 | ||
6513 | ||
6514 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta) | |
6515 | { | |
6516 | // Calculate sum of products of various event weights for both types of correlations (the ones for int. and diff. flow). | |
6517 | // (These quantitites are needed in expressions for unbiased estimators relevant for the statistical errors.) | |
6518 | // | |
6519 | // Important: To fill fDiffFlowSumOfProductOfEventWeights[][][][] use bellow table (i,j) with following constraints: | |
6520 | // 1.) i<j | |
6521 | // 2.) do not store terms which DO NOT include reduced correlations; | |
6522 | // Table: | |
6523 | // [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'>] | |
6524 | ||
6525 | Int_t typeFlag = -1; | |
6526 | Int_t ptEtaFlag = -1; | |
6527 | ||
6528 | if(type == "RP") | |
6529 | { | |
6530 | typeFlag = 0; | |
6531 | } else if(type == "POI") | |
6532 | { | |
6533 | typeFlag = 1; | |
6534 | } | |
6535 | ||
6536 | if(ptOrEta == "Pt") | |
6537 | { | |
6538 | ptEtaFlag = 0; | |
6539 | } else if(ptOrEta == "Eta") | |
6540 | { | |
6541 | ptEtaFlag = 1; | |
6542 | } | |
6543 | ||
6544 | // shortcuts: | |
6545 | Int_t t = typeFlag; | |
6546 | Int_t pe = ptEtaFlag; | |
6547 | ||
6548 | // binning: | |
6549 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6550 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6551 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6552 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6553 | ||
6554 | // protection: | |
6555 | for(Int_t rpq=0;rpq<3;rpq++) | |
6556 | { | |
6557 | for(Int_t m=0;m<4;m++) | |
6558 | { | |
6559 | for(Int_t k=0;k<9;k++) | |
6560 | { | |
6561 | if(!fReRPQ1dEBE[rpq][pe][m][k]) | |
6562 | { | |
6563 | cout<<"WARNING: fReRPQ1dEBE[rpq][pe][m][k] is NULL in AFAWQC::CSAPOEWFDF() !!!!"<<endl; | |
6564 | cout<<"pe = "<<pe<<endl; | |
6565 | cout<<"rpq = "<<rpq<<endl; | |
6566 | cout<<"m = "<<m<<endl; | |
6567 | cout<<"k = "<<k<<endl; | |
6568 | exit(0); | |
6569 | } | |
6570 | } | |
6571 | } | |
6572 | } | |
6573 | ||
6574 | // multiplicities: | |
6575 | Double_t dMult = (*fSMpk)(0,0); // total event multiplicity | |
6576 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
6577 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
6578 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
6579 | ||
6580 | // event weights for correlations: | |
6581 | Double_t dW2 = dMult*(dMult-1); // event weight for <2> | |
6582 | Double_t dW4 = dMult*(dMult-1)*(dMult-2)*(dMult-3); // event weight for <4> | |
6583 | Double_t dW6 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5); // event weight for <6> | |
6584 | Double_t dW8 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7); // event weight for <8> | |
6585 | ||
6586 | // event weights for reduced correlations: | |
6587 | Double_t dw2 = 0.; // event weight for <2'> | |
6588 | Double_t dw4 = 0.; // event weight for <4'> | |
6589 | //Double_t dw6 = 0.; // event weight for <6'> | |
6590 | //Double_t dw8 = 0.; // event weight for <8'> | |
6591 | ||
6592 | // looping over bins: | |
6593 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6594 | { | |
6595 | if(type == "RP") | |
6596 | { | |
6597 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
6598 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
6599 | } else if(type == "POI") | |
6600 | { | |
6601 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
6602 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
6603 | } | |
6604 | ||
6605 | // event weight for <2'>: | |
6606 | dw2 = mp*dMult-mq; | |
6607 | fDiffFlowSumOfProductOfEventWeights[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw2); // storing product of even weights for <2> and <2'> | |
6608 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW4); // storing product of even weights for <4> and <2'> | |
6609 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW6); // storing product of even weights for <6> and <2'> | |
6610 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW8); // storing product of even weights for <8> and <2'> | |
6611 | ||
6612 | // event weight for <4'>: | |
6613 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6614 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); | |
6615 | fDiffFlowSumOfProductOfEventWeights[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw4); // storing product of even weights for <2> and <4'> | |
6616 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw4); // storing product of even weights for <2'> and <4'> | |
6617 | fDiffFlowSumOfProductOfEventWeights[t][pe][2][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw4); // storing product of even weights for <4> and <4'> | |
6618 | fDiffFlowSumOfProductOfEventWeights[t][pe][3][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dW6); // storing product of even weights for <6> and <4'> | |
6619 | fDiffFlowSumOfProductOfEventWeights[t][pe][3][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dW8); // storing product of even weights for <8> and <4'> | |
6620 | ||
6621 | // event weight for <6'>: | |
6622 | //dw6 = ...; | |
6623 | //fDiffFlowSumOfProductOfEventWeights[t][pe][0][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw6); // storing product of even weights for <2> and <6'> | |
6624 | //fDiffFlowSumOfProductOfEventWeights[t][pe][1][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw6); // storing product of even weights for <2'> and <6'> | |
6625 | //fDiffFlowSumOfProductOfEventWeights[t][pe][2][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw6); // storing product of even weights for <4> and <6'> | |
6626 | //fDiffFlowSumOfProductOfEventWeights[t][pe][3][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dw6); // storing product of even weights for <4'> and <6'> | |
6627 | //fDiffFlowSumOfProductOfEventWeights[t][pe][4][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW6*dw6); // storing product of even weights for <6> and <6'> | |
6628 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dW8); // storing product of even weights for <6'> and <8> | |
6629 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dw8); // storing product of even weights for <6'> and <8'> | |
6630 | ||
6631 | // event weight for <8'>: | |
6632 | //dw8 = ...; | |
6633 | //fDiffFlowSumOfProductOfEventWeights[t][pe][0][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw8); // storing product of even weights for <2> and <8'> | |
6634 | //fDiffFlowSumOfProductOfEventWeights[t][pe][1][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw8); // storing product of even weights for <2'> and <8'> | |
6635 | //fDiffFlowSumOfProductOfEventWeights[t][pe][2][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw8); // storing product of even weights for <4> and <8'> | |
6636 | //fDiffFlowSumOfProductOfEventWeights[t][pe][3][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dw8); // storing product of even weights for <4'> and <8'> | |
6637 | //fDiffFlowSumOfProductOfEventWeights[t][pe][4][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW6*dw8); // storing product of even weights for <6> and <8'> | |
6638 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dw8); // storing product of even weights for <6'> and <8'> | |
6639 | //fDiffFlowSumOfProductOfEventWeights[t][pe][6][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW8*dw8); // storing product of even weights for <8> and <8'> | |
6640 | ||
6641 | // Table: | |
6642 | // [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'>] | |
6643 | ||
6644 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6645 | ||
6646 | ||
6647 | ||
6648 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta) | |
6649 | ||
6650 | ||
6651 | //================================================================================================================================ | |
6652 | ||
6653 | ||
6654 | void AliFlowAnalysisWithQCumulants::FinalizeReducedCorrelations(TString type, TString ptOrEta) | |
6655 | { | |
6656 | // Transfer profiles into histograms and calculate statistical errors correctly. | |
6657 | ||
6658 | Int_t typeFlag = -1; | |
6659 | Int_t ptEtaFlag = -1; | |
6660 | ||
6661 | if(type == "RP") | |
6662 | { | |
6663 | typeFlag = 0; | |
6664 | } else if(type == "POI") | |
6665 | { | |
6666 | typeFlag = 1; | |
6667 | } | |
6668 | ||
6669 | if(ptOrEta == "Pt") | |
6670 | { | |
6671 | ptEtaFlag = 0; | |
6672 | } else if(ptOrEta == "Eta") | |
6673 | { | |
6674 | ptEtaFlag = 1; | |
6675 | } | |
6676 | ||
6677 | // shortcuts: | |
6678 | Int_t t = typeFlag; | |
6679 | Int_t pe = ptEtaFlag; | |
6680 | ||
6681 | for(Int_t rci=0;rci<4;rci++) | |
6682 | { | |
6683 | if(!fDiffFlowCorrelationsPro[t][pe][rci]) | |
6684 | { | |
6685 | cout<<"WARNING: fDiffFlowCorrelationsPro[t][pe][rci] is NULL in AFAWQC::FRC() !!!!"<<endl; | |
6686 | cout<<"t = "<<t<<endl; | |
6687 | cout<<"pe = "<<pe<<endl; | |
6688 | cout<<"rci = "<<rci<<endl; | |
6689 | exit(0); | |
6690 | } | |
6691 | for(Int_t power=0;power<2;power++) | |
6692 | { | |
6693 | if(!fDiffFlowSumOfEventWeights[t][pe][power][rci]) | |
6694 | { | |
6695 | cout<<"WARNING: fDiffFlowSumOfEventWeights[t][pe][power][rci] is NULL in AFAWQC::FRC() !!!!"<<endl; | |
6696 | cout<<"t = "<<t<<endl; | |
6697 | cout<<"pe = "<<pe<<endl; | |
6698 | cout<<"power = "<<power<<endl; | |
6699 | cout<<"rci = "<<rci<<endl; | |
6700 | exit(0); | |
6701 | } | |
6702 | } // end of for(Int_t power=0;power<2;power++) | |
6703 | } // end of for(Int_t rci=0;rci<4;rci++) | |
6704 | ||
6705 | // common: | |
6706 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6707 | ||
6708 | // transfer 1D profile into 1D histogram: | |
6709 | Double_t correlation = 0.; | |
6710 | Double_t spread = 0.; | |
6711 | Double_t sumOfWeights = 0.; // sum of weights for particular reduced correlations for particular pt or eta bin | |
6712 | Double_t sumOfSquaredWeights = 0.; // sum of squared weights for particular reduced correlations for particular pt or eta bin | |
6713 | Double_t error = 0.; // error = termA * spread * termB | |
6714 | // termA = (sqrt(sumOfSquaredWeights)/sumOfWeights) | |
6715 | // termB = 1/pow(1-termA^2,0.5) | |
6716 | Double_t termA = 0.; | |
6717 | Double_t termB = 0.; | |
6718 | for(Int_t rci=0;rci<4;rci++) // index of reduced correlation | |
6719 | { | |
6720 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) // number of pt or eta bins | |
6721 | { | |
6722 | correlation = fDiffFlowCorrelationsPro[t][pe][rci]->GetBinContent(b); | |
6723 | spread = fDiffFlowCorrelationsPro[t][pe][rci]->GetBinError(b); | |
6724 | sumOfWeights = fDiffFlowSumOfEventWeights[t][pe][0][rci]->GetBinContent(b); | |
6725 | sumOfSquaredWeights = fDiffFlowSumOfEventWeights[t][pe][1][rci]->GetBinContent(b); | |
6726 | if(sumOfWeights) termA = (pow(sumOfSquaredWeights,0.5)/sumOfWeights); | |
6727 | if(1.-pow(termA,2.)>0.) termB = 1./pow(1.-pow(termA,2.),0.5); | |
6728 | error = termA*spread*termB; // final error (unbiased estimator for standard deviation) | |
6729 | fDiffFlowCorrelationsHist[t][pe][rci]->SetBinContent(b,correlation); | |
6730 | fDiffFlowCorrelationsHist[t][pe][rci]->SetBinError(b,error); | |
6731 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6732 | } // end of for(Int_t rci=0;rci<4;rci++) | |
6733 | ||
6734 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeReducedCorrelations(TString type, TString ptOrEta) | |
6735 | ||
6736 | ||
6737 | //================================================================================================================================ | |
6738 | ||
6739 | ||
6740 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta) | |
6741 | { | |
6742 | // store products: <2><2'>, <2><4'>, <2><6'>, <2><8'>, <2'><4>, | |
6743 | // <2'><4'>, <2'><6>, <2'><6'>, <2'><8>, <2'><8'>, | |
6744 | // <4><4'>, <4><6'>, <4><8'>, <4'><6>, <4'><6'>, | |
6745 | // <4'><8>, <4'><8'>, <6><6'>, <6><8'>, <6'><8>, | |
6746 | // <6'><8'>, <8><8'>. | |
6747 | ||
6748 | Int_t typeFlag = -1; | |
6749 | Int_t ptEtaFlag = -1; | |
6750 | ||
6751 | if(type == "RP") | |
6752 | { | |
6753 | typeFlag = 0; | |
6754 | } else if(type == "POI") | |
6755 | { | |
6756 | typeFlag = 1; | |
6757 | } | |
6758 | ||
6759 | if(ptOrEta == "Pt") | |
6760 | { | |
6761 | ptEtaFlag = 0; | |
6762 | } else if(ptOrEta == "Eta") | |
6763 | { | |
6764 | ptEtaFlag = 1; | |
6765 | } | |
6766 | ||
6767 | // shortcuts: | |
6768 | Int_t t = typeFlag; | |
6769 | Int_t pe = ptEtaFlag; | |
6770 | ||
6771 | // common: | |
6772 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6773 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6774 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6775 | ||
6776 | // protections // to be improved (add protection for all pointers in this method) | |
6777 | if(!fIntFlowCorrelationsEBE) | |
6778 | { | |
6779 | cout<<"WARNING: fIntFlowCorrelationsEBE is NULL in AFAWQC::CDFPOC() !!!!"<<endl; | |
6780 | exit(0); | |
6781 | } | |
6782 | ||
6783 | /* | |
6784 | Double_t dMult = (*fSMpk)(0,0); // multiplicity (number of particles used to determine the reaction plane) | |
6785 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
6786 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
6787 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
6788 | */ | |
6789 | ||
6790 | // e-b-e correlations: | |
6791 | Double_t twoEBE = fIntFlowCorrelationsEBE->GetBinContent(1); // <2> | |
6792 | Double_t fourEBE = fIntFlowCorrelationsEBE->GetBinContent(2); // <4> | |
6793 | Double_t sixEBE = fIntFlowCorrelationsEBE->GetBinContent(3); // <6> | |
6794 | Double_t eightEBE = fIntFlowCorrelationsEBE->GetBinContent(4); // <8> | |
6795 | ||
6796 | // event weights for correlations: | |
6797 | Double_t dW2 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1); // event weight for <2> | |
6798 | Double_t dW4 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2); // event weight for <4> | |
6799 | Double_t dW6 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(3); // event weight for <6> | |
6800 | Double_t dW8 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(4); // event weight for <8> | |
6801 | ||
6802 | // e-b-e reduced correlations: | |
6803 | Double_t twoReducedEBE = 0.; // <2'> | |
6804 | Double_t fourReducedEBE = 0.; // <4'> | |
6805 | Double_t sixReducedEBE = 0.; // <6'> | |
6806 | Double_t eightReducedEBE = 0.; // <8'> | |
6807 | ||
6808 | // event weights for reduced correlations: | |
6809 | Double_t dw2 = 0.; // event weight for <2'> | |
6810 | Double_t dw4 = 0.; // event weight for <4'> | |
6811 | //Double_t dw6 = 0.; // event weight for <6'> | |
6812 | //Double_t dw8 = 0.; // event weight for <8'> | |
6813 | ||
6814 | // looping over bins: | |
6815 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6816 | { | |
6817 | // e-b-e reduced correlations: | |
6818 | twoReducedEBE = fDiffFlowCorrelationsEBE[t][pe][0]->GetBinContent(b); | |
6819 | fourReducedEBE = fDiffFlowCorrelationsEBE[t][pe][1]->GetBinContent(b); | |
6820 | sixReducedEBE = fDiffFlowCorrelationsEBE[t][pe][2]->GetBinContent(b); | |
6821 | eightReducedEBE = fDiffFlowCorrelationsEBE[t][pe][3]->GetBinContent(b); | |
6822 | ||
6823 | /* | |
6824 | // to be improved (I should not do this here again) | |
6825 | if(type == "RP") | |
6826 | { | |
6827 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
6828 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
6829 | } else if(type == "POI") | |
6830 | { | |
6831 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
6832 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
6833 | } | |
6834 | ||
6835 | // event weights for reduced correlations: | |
6836 | dw2 = mp*dMult-mq; // weight for <2'> | |
6837 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6838 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); // weight for <4'> | |
6839 | //dw6 = ... | |
6840 | //dw8 = ... | |
6841 | ||
6842 | */ | |
6843 | ||
6844 | dw2 = fDiffFlowEventWeightsForCorrelationsEBE[t][pe][0]->GetBinContent(b); | |
6845 | dw4 = fDiffFlowEventWeightsForCorrelationsEBE[t][pe][1]->GetBinContent(b); | |
6846 | ||
6847 | // storing all products: | |
6848 | fDiffFlowProductOfCorrelationsPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*twoReducedEBE,dW2*dw2); // storing <2><2'> | |
6849 | fDiffFlowProductOfCorrelationsPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*twoReducedEBE,dW4*dw2); // storing <4><2'> | |
6850 | fDiffFlowProductOfCorrelationsPro[t][pe][1][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*twoReducedEBE,dW6*dw2); // storing <6><2'> | |
6851 | fDiffFlowProductOfCorrelationsPro[t][pe][1][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*twoReducedEBE,dW8*dw2); // storing <8><2'> | |
6852 | ||
6853 | // event weight for <4'>: | |
6854 | fDiffFlowProductOfCorrelationsPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*fourReducedEBE,dW2*dw4); // storing <2><4'> | |
6855 | fDiffFlowProductOfCorrelationsPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*fourReducedEBE,dw2*dw4); // storing <2'><4'> | |
6856 | fDiffFlowProductOfCorrelationsPro[t][pe][2][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*fourReducedEBE,dW4*dw4); // storing <4><4'> | |
6857 | fDiffFlowProductOfCorrelationsPro[t][pe][3][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*fourReducedEBE,dW6*dw4); // storing <6><4'> | |
6858 | fDiffFlowProductOfCorrelationsPro[t][pe][3][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*fourReducedEBE,dW8*dw4); // storing <8><4'> | |
6859 | ||
6860 | // event weight for <6'>: | |
6861 | //dw6 = ...; | |
6862 | //fDiffFlowProductOfCorrelationsPro[t][pe][0][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*sixReducedEBE,dW2*dw6); // storing <2><6'> | |
6863 | //fDiffFlowProductOfCorrelationsPro[t][pe][1][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*sixReducedEBE,dw2*dw6); // storing <2'><6'> | |
6864 | //fDiffFlowProductOfCorrelationsPro[t][pe][2][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*sixReducedEBE,dW4*dw6); // storing <4><6'> | |
6865 | //fDiffFlowProductOfCorrelationsPro[t][pe][3][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourReducedEBE*sixReducedEBE,dw4*dw6); // storing <4'><6'> | |
6866 | //fDiffFlowProductOfCorrelationsPro[t][pe][4][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*sixReducedEBE,dW6*dw6); // storing <6><6'> | |
6867 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightEBE,dw6*dW8); // storing <6'><8> | |
6868 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightReducedEBE,dw6*dw8); // storing <6'><8'> | |
6869 | ||
6870 | // event weight for <8'>: | |
6871 | //dw8 = ...; | |
6872 | //fDiffFlowProductOfCorrelationsPro[t][pe][0][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*eightReducedEBE,dW2*dw8); // storing <2><8'> | |
6873 | //fDiffFlowProductOfCorrelationsPro[t][pe][1][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*eightReducedEBE,dw2*dw8); // storing <2'><8'> | |
6874 | //fDiffFlowProductOfCorrelationsPro[t][pe][2][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*eightReducedEBE,dW4*dw8); // storing <4><8'> | |
6875 | //fDiffFlowProductOfCorrelationsPro[t][pe][3][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourReducedEBE*eightReducedEBE,dw4*dw8); // storing <4'><8'> | |
6876 | //fDiffFlowProductOfCorrelationsPro[t][pe][4][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*eightReducedEBE,dW6*dw8); // storing <6><8'> | |
6877 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightReducedEBE,dw6*dw8); // storing <6'><8'> | |
6878 | //fDiffFlowProductOfCorrelationsPro[t][pe][6][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*eightReducedEBE,dW8*dw8); // storing <8><8'> | |
6879 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++ | |
6880 | ||
6881 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta) | |
6882 | ||
6883 | ||
6884 | //================================================================================================================================ | |
6885 | ||
6886 | ||
6887 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCovariances(TString type, TString ptOrEta) // to be improved (reimplemented) | |
6888 | { | |
6889 | // a) Calculate unbiased estimators Cov(<2>,<2'>), Cov(<2>,<4'>), Cov(<4>,<2'>), Cov(<4>,<4'>) and Cov(<2'>,<4'>) | |
6890 | // for covariances V(<2>,<2'>), V(<2>,<4'>), V(<4>,<2'>), V(<4>,<4'>) and V(<2'>,<4'>). | |
6891 | // b) Store in histogram fDiffFlowCovariances[t][pe][index] for instance the following: | |
6892 | // | |
6893 | // 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)] | |
6894 | // | |
6895 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<2'>} is event weight for <2'>. | |
6896 | // c) Binning of fDiffFlowCovariances[t][pe][index] is organized as follows: | |
6897 | // | |
6898 | // 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)] | |
6899 | // 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)] | |
6900 | // 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)] | |
6901 | // 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)] | |
6902 | // 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)] | |
6903 | // ... | |
6904 | ||
6905 | Int_t typeFlag = -1; | |
6906 | Int_t ptEtaFlag = -1; | |
6907 | ||
6908 | if(type == "RP") | |
6909 | { | |
6910 | typeFlag = 0; | |
6911 | } else if(type == "POI") | |
6912 | { | |
6913 | typeFlag = 1; | |
6914 | } | |
6915 | ||
6916 | if(ptOrEta == "Pt") | |
6917 | { | |
6918 | ptEtaFlag = 0; | |
6919 | } else if(ptOrEta == "Eta") | |
6920 | { | |
6921 | ptEtaFlag = 1; | |
6922 | } | |
6923 | ||
6924 | // shortcuts: | |
6925 | Int_t t = typeFlag; | |
6926 | Int_t pe = ptEtaFlag; | |
6927 | ||
6928 | // common: | |
6929 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6930 | //Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6931 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6932 | //Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6933 | ||
6934 | // average correlations: | |
6935 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
6936 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
6937 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
6938 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
6939 | ||
6940 | // sum of weights for correlation: | |
6941 | Double_t sumOfWeightsForTwo = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // sum_{i=1}^{N} w_{<2>} | |
6942 | Double_t sumOfWeightsForFour = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // sum_{i=1}^{N} w_{<4>} | |
6943 | //Double_t sumOfWeightsForSix = fIntFlowSumOfEventWeights[0]->GetBinContent(3); // sum_{i=1}^{N} w_{<6>} | |
6944 | //Double_t sumOfWeightsForEight = fIntFlowSumOfEventWeights[0]->GetBinContent(4); // sum_{i=1}^{N} w_{<8>} | |
6945 | ||
6946 | // average reduced correlations: | |
6947 | Double_t twoReduced = 0.; // <<2'>> | |
6948 | Double_t fourReduced = 0.; // <<4'>> | |
6949 | //Double_t sixReduced = 0.; // <<6'>> | |
6950 | //Double_t eightReduced = 0.; // <<8'>> | |
6951 | ||
6952 | // sum of weights for reduced correlation: | |
6953 | Double_t sumOfWeightsForTwoReduced = 0.; // sum_{i=1}^{N} w_{<2'>} | |
6954 | Double_t sumOfWeightsForFourReduced = 0.; // sum_{i=1}^{N} w_{<4'>} | |
6955 | //Double_t sumOfWeightsForSixReduced = 0.; // sum_{i=1}^{N} w_{<6'>} | |
6956 | //Double_t sumOfWeightsForEightReduced = 0.; // sum_{i=1}^{N} w_{<8'>} | |
6957 | ||
6958 | // product of weights for reduced correlation: | |
6959 | Double_t productOfWeightsForTwoTwoReduced = 0.; // sum_{i=1}^{N} w_{<2>}w_{<2'>} | |
6960 | Double_t productOfWeightsForTwoFourReduced = 0.; // sum_{i=1}^{N} w_{<2>}w_{<4'>} | |
6961 | Double_t productOfWeightsForFourTwoReduced = 0.; // sum_{i=1}^{N} w_{<4>}w_{<2'>} | |
6962 | Double_t productOfWeightsForFourFourReduced = 0.; // sum_{i=1}^{N} w_{<4>}w_{<4'>} | |
6963 | Double_t productOfWeightsForTwoReducedFourReduced = 0.; // sum_{i=1}^{N} w_{<2'>}w_{<4'>} | |
6964 | // ... | |
6965 | ||
6966 | // products for differential flow: | |
6967 | Double_t twoTwoReduced = 0; // <<2><2'>> | |
6968 | Double_t twoFourReduced = 0; // <<2><4'>> | |
6969 | Double_t fourTwoReduced = 0; // <<4><2'>> | |
6970 | Double_t fourFourReduced = 0; // <<4><4'>> | |
6971 | Double_t twoReducedFourReduced = 0; // <<2'><4'>> | |
6972 | ||
6973 | // denominators in the expressions for the unbiased estimators for covariances: | |
6974 | // denominator = 1 - term1/(term2*term3) | |
6975 | // prefactor = term1/(term2*term3) | |
6976 | Double_t denominator = 0.; | |
6977 | Double_t prefactor = 0.; | |
6978 | Double_t term1 = 0.; | |
6979 | Double_t term2 = 0.; | |
6980 | Double_t term3 = 0.; | |
6981 | ||
6982 | // unbiased estimators for covariances for differential flow: | |
6983 | Double_t covTwoTwoReduced = 0.; // Cov(<2>,<2'>) | |
6984 | Double_t wCovTwoTwoReduced = 0.; // Cov(<2>,<2'>) * prefactor(w_{<2>},w_{<2'>}) | |
6985 | Double_t covTwoFourReduced = 0.; // Cov(<2>,<4'>) | |
6986 | Double_t wCovTwoFourReduced = 0.; // Cov(<2>,<4'>) * prefactor(w_{<2>},w_{<4'>}) | |
6987 | Double_t covFourTwoReduced = 0.; // Cov(<4>,<2'>) | |
6988 | Double_t wCovFourTwoReduced = 0.; // Cov(<4>,<2'>) * prefactor(w_{<4>},w_{<2'>}) | |
6989 | Double_t covFourFourReduced = 0.; // Cov(<4>,<4'>) | |
6990 | Double_t wCovFourFourReduced = 0.; // Cov(<4>,<4'>) * prefactor(w_{<4>},w_{<4'>}) | |
6991 | Double_t covTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) | |
6992 | Double_t wCovTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) * prefactor(w_{<2'>},w_{<4'>}) | |
6993 | ||
6994 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6995 | { | |
6996 | // average reduced corelations: | |
6997 | twoReduced = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); | |
6998 | fourReduced = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); | |
6999 | // average products: | |
7000 | twoTwoReduced = fDiffFlowProductOfCorrelationsPro[t][pe][0][1]->GetBinContent(b); | |
7001 | twoFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][0][3]->GetBinContent(b); | |
7002 | fourTwoReduced = fDiffFlowProductOfCorrelationsPro[t][pe][1][2]->GetBinContent(b); | |
7003 | fourFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][2][3]->GetBinContent(b); | |
7004 | twoReducedFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][1][3]->GetBinContent(b); | |
7005 | // sum of weights for reduced correlations: | |
7006 | sumOfWeightsForTwoReduced = fDiffFlowSumOfEventWeights[t][pe][0][0]->GetBinContent(b); | |
7007 | sumOfWeightsForFourReduced = fDiffFlowSumOfEventWeights[t][pe][0][1]->GetBinContent(b); | |
7008 | // products of weights for correlations: | |
7009 | productOfWeightsForTwoTwoReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][0][1]->GetBinContent(b); | |
7010 | productOfWeightsForTwoFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][0][3]->GetBinContent(b); | |
7011 | productOfWeightsForFourTwoReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][1][2]->GetBinContent(b); | |
7012 | productOfWeightsForFourFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][2][3]->GetBinContent(b); | |
7013 | productOfWeightsForTwoReducedFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][1][3]->GetBinContent(b); | |
7014 | // denominator for the unbiased estimator for covariances: 1 - term1/(term2*term3) | |
7015 | // prefactor (multiplies Cov's) = term1/(term2*term3) | |
7016 | // <2>,<2'>: | |
7017 | term1 = productOfWeightsForTwoTwoReduced; | |
7018 | term2 = sumOfWeightsForTwo; | |
7019 | term3 = sumOfWeightsForTwoReduced; | |
7020 | if(term2*term3>0.) | |
7021 | { | |
7022 | denominator = 1.-term1/(term2*term3); | |
7023 | prefactor = term1/(term2*term3); | |
0328db2d | 7024 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7025 | { |
7026 | covTwoTwoReduced = (twoTwoReduced-two*twoReduced)/denominator; | |
7027 | wCovTwoTwoReduced = covTwoTwoReduced*prefactor; | |
7028 | fDiffFlowCovariances[t][pe][0]->SetBinContent(b,wCovTwoTwoReduced); | |
7029 | } | |
7030 | } | |
7031 | // <2>,<4'>: | |
7032 | term1 = productOfWeightsForTwoFourReduced; | |
7033 | term2 = sumOfWeightsForTwo; | |
7034 | term3 = sumOfWeightsForFourReduced; | |
7035 | if(term2*term3>0.) | |
7036 | { | |
7037 | denominator = 1.-term1/(term2*term3); | |
7038 | prefactor = term1/(term2*term3); | |
0328db2d | 7039 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7040 | { |
7041 | covTwoFourReduced = (twoFourReduced-two*fourReduced)/denominator; | |
7042 | wCovTwoFourReduced = covTwoFourReduced*prefactor; | |
7043 | fDiffFlowCovariances[t][pe][1]->SetBinContent(b,wCovTwoFourReduced); | |
7044 | } | |
7045 | } | |
7046 | // <4>,<2'>: | |
7047 | term1 = productOfWeightsForFourTwoReduced; | |
7048 | term2 = sumOfWeightsForFour; | |
7049 | term3 = sumOfWeightsForTwoReduced; | |
7050 | if(term2*term3>0.) | |
7051 | { | |
7052 | denominator = 1.-term1/(term2*term3); | |
7053 | prefactor = term1/(term2*term3); | |
0328db2d | 7054 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7055 | { |
7056 | covFourTwoReduced = (fourTwoReduced-four*twoReduced)/denominator; | |
7057 | wCovFourTwoReduced = covFourTwoReduced*prefactor; | |
7058 | fDiffFlowCovariances[t][pe][2]->SetBinContent(b,wCovFourTwoReduced); | |
7059 | } | |
7060 | } | |
7061 | // <4>,<4'>: | |
7062 | term1 = productOfWeightsForFourFourReduced; | |
7063 | term2 = sumOfWeightsForFour; | |
7064 | term3 = sumOfWeightsForFourReduced; | |
7065 | if(term2*term3>0.) | |
7066 | { | |
7067 | denominator = 1.-term1/(term2*term3); | |
7068 | prefactor = term1/(term2*term3); | |
0328db2d | 7069 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7070 | { |
7071 | covFourFourReduced = (fourFourReduced-four*fourReduced)/denominator; | |
7072 | wCovFourFourReduced = covFourFourReduced*prefactor; | |
7073 | fDiffFlowCovariances[t][pe][3]->SetBinContent(b,wCovFourFourReduced); | |
7074 | } | |
7075 | } | |
7076 | // <2'>,<4'>: | |
7077 | term1 = productOfWeightsForTwoReducedFourReduced; | |
7078 | term2 = sumOfWeightsForTwoReduced; | |
7079 | term3 = sumOfWeightsForFourReduced; | |
7080 | if(term2*term3>0.) | |
7081 | { | |
7082 | denominator = 1.-term1/(term2*term3); | |
7083 | prefactor = term1/(term2*term3); | |
0328db2d | 7084 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7085 | { |
7086 | covTwoReducedFourReduced = (twoReducedFourReduced-twoReduced*fourReduced)/denominator; | |
7087 | wCovTwoReducedFourReduced = covTwoReducedFourReduced*prefactor; | |
7088 | fDiffFlowCovariances[t][pe][4]->SetBinContent(b,wCovTwoReducedFourReduced); | |
7089 | } | |
7090 | } | |
7091 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7092 | ||
7093 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCovariances(TString type, TString ptOrEta) | |
7094 | ||
7095 | ||
7096 | //================================================================================================================================ | |
7097 | ||
7098 | ||
7099 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlow(TString type, TString ptOrEta) | |
7100 | { | |
7101 | // calculate differential flow from differential cumulants and previously obtained integrated flow: (to be improved: description) | |
7102 | ||
7103 | Int_t typeFlag = -1; | |
7104 | Int_t ptEtaFlag = -1; | |
7105 | ||
7106 | if(type == "RP") | |
7107 | { | |
7108 | typeFlag = 0; | |
7109 | } else if(type == "POI") | |
7110 | { | |
7111 | typeFlag = 1; | |
7112 | } | |
7113 | ||
7114 | if(ptOrEta == "Pt") | |
7115 | { | |
7116 | ptEtaFlag = 0; | |
7117 | } else if(ptOrEta == "Eta") | |
7118 | { | |
7119 | ptEtaFlag = 1; | |
7120 | } | |
7121 | ||
7122 | // shortcuts: | |
7123 | Int_t t = typeFlag; | |
7124 | Int_t pe = ptEtaFlag; | |
7125 | ||
7126 | // common: | |
7127 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
7128 | ||
7129 | // correlations: | |
7130 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
7131 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
7132 | ||
7133 | // statistical errors of correlations: | |
7134 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); | |
7135 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); | |
7136 | ||
7137 | // reduced correlations: | |
7138 | Double_t twoReduced = 0.; // <<2'>> | |
7139 | Double_t fourReduced = 0.; // <<4'>> | |
7140 | ||
7141 | // statistical errors of reduced correlations: | |
7142 | Double_t twoReducedError = 0.; | |
7143 | Double_t fourReducedError = 0.; | |
7144 | ||
7145 | // covariances: | |
7146 | Double_t wCovTwoFour = fIntFlowCovariances->GetBinContent(1);// // Cov(<2>,<4>) * prefactor(<2>,<4>) | |
7147 | Double_t wCovTwoTwoReduced = 0.; // Cov(<2>,<2'>) * prefactor(<2>,<2'>) | |
7148 | Double_t wCovTwoFourReduced = 0.; // Cov(<2>,<4'>) * prefactor(<2>,<4'>) | |
7149 | Double_t wCovFourTwoReduced = 0.; // Cov(<4>,<2'>) * prefactor(<4>,<2'>) | |
7150 | Double_t wCovFourFourReduced = 0.; // Cov(<4>,<4'>) * prefactor(<4>,<4'>) | |
7151 | Double_t wCovTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) * prefactor(<2'>,<4'>) | |
7152 | ||
7153 | // differential flow: | |
7154 | Double_t v2Prime = 0.; // v'{2} | |
7155 | Double_t v4Prime = 0.; // v'{4} | |
7156 | ||
7157 | // statistical error of differential flow: | |
7158 | Double_t v2PrimeError = 0.; | |
7159 | Double_t v4PrimeError = 0.; | |
7160 | ||
7161 | // squared statistical error of differential flow: | |
7162 | Double_t v2PrimeErrorSquared = 0.; | |
7163 | Double_t v4PrimeErrorSquared = 0.; | |
7164 | ||
7165 | // loop over pt or eta bins: | |
7166 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7167 | { | |
7168 | // reduced correlations and statistical errors: | |
7169 | twoReduced = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); | |
7170 | twoReducedError = fDiffFlowCorrelationsHist[t][pe][0]->GetBinError(b); | |
7171 | fourReduced = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); | |
7172 | fourReducedError = fDiffFlowCorrelationsHist[t][pe][1]->GetBinError(b); | |
7173 | // covariances: | |
7174 | wCovTwoTwoReduced = fDiffFlowCovariances[t][pe][0]->GetBinContent(b); | |
7175 | wCovTwoFourReduced = fDiffFlowCovariances[t][pe][1]->GetBinContent(b); | |
7176 | wCovFourTwoReduced = fDiffFlowCovariances[t][pe][2]->GetBinContent(b); | |
7177 | wCovFourFourReduced = fDiffFlowCovariances[t][pe][3]->GetBinContent(b); | |
7178 | wCovTwoReducedFourReduced = fDiffFlowCovariances[t][pe][4]->GetBinContent(b); | |
7179 | // differential flow: | |
7180 | // v'{2}: | |
7181 | if(two>0.) | |
7182 | { | |
7183 | v2Prime = twoReduced/pow(two,0.5); | |
7184 | v2PrimeErrorSquared = (1./4.)*pow(two,-3.)* | |
7185 | (pow(twoReduced,2.)*pow(twoError,2.) | |
7186 | + 4.*pow(two,2.)*pow(twoReducedError,2.) | |
7187 | - 4.*two*twoReduced*wCovTwoTwoReduced); | |
7188 | ||
7189 | ||
7190 | if(v2PrimeErrorSquared>0.) v2PrimeError = pow(v2PrimeErrorSquared,0.5); | |
7191 | fDiffFlow[t][pe][0]->SetBinContent(b,v2Prime); | |
60694576 | 7192 | if(TMath::Abs(v2Prime)>1.e-44)fDiffFlow[t][pe][0]->SetBinError(b,v2PrimeError); |
489d5531 | 7193 | } |
7194 | // differential flow: | |
7195 | // v'{4} | |
7196 | if(2.*pow(two,2.)-four > 0.) | |
7197 | { | |
7198 | v4Prime = (2.*two*twoReduced-fourReduced)/pow(2.*pow(two,2.)-four,3./4.); | |
7199 | v4PrimeErrorSquared = pow(2.*pow(two,2.)-four,-7./2.)* | |
7200 | (pow(2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced,2.)*pow(twoError,2.) | |
7201 | + (9./16.)*pow(2.*two*twoReduced-fourReduced,2.)*pow(fourError,2.) | |
7202 | + 4.*pow(two,2.)*pow(2.*pow(two,2.)-four,2.)*pow(twoReducedError,2.) | |
7203 | + pow(2.*pow(two,2.)-four,2.)*pow(fourReducedError,2.) | |
7204 | - (3./2.)*(2.*two*twoReduced-fourReduced) | |
7205 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoFour | |
7206 | - 4.*two*(2.*pow(two,2.)-four) | |
7207 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoTwoReduced | |
7208 | + 2.*(2.*pow(two,2.)-four) | |
7209 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoFourReduced | |
7210 | + 3.*two*(2.*pow(two,2.)-four)*(2.*two*twoReduced-fourReduced)*wCovFourTwoReduced | |
7211 | - (3./2.)*(2.*pow(two,2.)-four)*(2.*two*twoReduced-fourReduced)*wCovFourFourReduced | |
7212 | - 4.*two*pow(2.*pow(two,2.)-four,2.)*wCovTwoReducedFourReduced); | |
7213 | if(v4PrimeErrorSquared>0.) v4PrimeError = pow(v4PrimeErrorSquared,0.5); | |
7214 | fDiffFlow[t][pe][1]->SetBinContent(b,v4Prime); | |
60694576 | 7215 | if(TMath::Abs(v4Prime)>1.e-44)fDiffFlow[t][pe][1]->SetBinError(b,v4PrimeError); |
489d5531 | 7216 | } |
7217 | ||
7218 | } // end of for(Int_t b=1;b<=fnBinsPtEta[pe];b++) | |
7219 | ||
7220 | ||
7221 | ||
7222 | ||
7223 | /* | |
7224 | // 2D: | |
7225 | for(Int_t nua=0;nua<2;nua++) | |
7226 | { | |
7227 | for(Int_t p=1;p<=fnBinsPt;p++) | |
7228 | { | |
7229 | for(Int_t e=1;e<=fnBinsEta;e++) | |
7230 | { | |
7231 | // differential cumulants: | |
7232 | Double_t qc2Prime = fFinalCumulants2D[t][pW][eW][nua][0]->GetBinContent(fFinalCumulants2D[t][pW][eW][nua][0]->GetBin(p,e)); // QC{2'} | |
7233 | Double_t qc4Prime = fFinalCumulants2D[t][pW][eW][nua][1]->GetBinContent(fFinalCumulants2D[t][pW][eW][nua][1]->GetBin(p,e)); // QC{4'} | |
7234 | // differential flow: | |
7235 | Double_t v2Prime = 0.; | |
7236 | Double_t v4Prime = 0.; | |
7237 | if(v2) | |
7238 | { | |
7239 | v2Prime = qc2Prime/v2; | |
7240 | fFinalFlow2D[t][pW][eW][nua][0]->SetBinContent(fFinalFlow2D[t][pW][eW][nua][0]->GetBin(p,e),v2Prime); | |
7241 | } | |
7242 | if(v4) | |
7243 | { | |
7244 | v4Prime = -qc4Prime/pow(v4,3.); | |
7245 | fFinalFlow2D[t][pW][eW][nua][1]->SetBinContent(fFinalFlow2D[t][pW][eW][nua][1]->GetBin(p,e),v4Prime); | |
7246 | } | |
7247 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
7248 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
7249 | } // end of for(Int_t nua=0;nua<2;nua++) | |
7250 | */ | |
7251 | ||
7252 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlow(TString type, Bool_t useParticleWeights) | |
7253 | ||
7254 | ||
7255 | //================================================================================================================================ | |
7256 | ||
7257 | ||
7258 | void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags() | |
7259 | { | |
7260 | // a) Store all flags for integrated flow in profile fIntFlowFlags. | |
7261 | ||
7262 | if(!fIntFlowFlags) | |
7263 | { | |
7264 | cout<<"WARNING: fIntFlowFlags is NULL in AFAWQC::SFFIF() !!!!"<<endl; | |
7265 | exit(0); | |
7266 | } | |
7267 | ||
7268 | // particle weights used or not: | |
7269 | fIntFlowFlags->Fill(0.5,(Int_t)fUsePhiWeights||fUsePtWeights||fUseEtaWeights); | |
7270 | // which event weights were used: | |
7271 | if(strcmp(fMultiplicityWeight->Data(),"combinations")) | |
7272 | { | |
7273 | fIntFlowFlags->Fill(1.5,0); // 0 = "combinations" (default) | |
7274 | } else if(strcmp(fMultiplicityWeight->Data(),"unit")) | |
7275 | { | |
7276 | fIntFlowFlags->Fill(1.5,1); // 1 = "unit" | |
7277 | } else if(strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
7278 | { | |
7279 | fIntFlowFlags->Fill(1.5,2); // 2 = "multiplicity" | |
7280 | } | |
7281 | // corrected for non-uniform acceptance or not: | |
7282 | fIntFlowFlags->Fill(2.5,(Int_t)fApplyCorrectionForNUA); | |
7283 | fIntFlowFlags->Fill(3.5,(Int_t)fPrintFinalResults[0]); | |
7284 | fIntFlowFlags->Fill(4.5,(Int_t)fPrintFinalResults[1]); | |
7285 | fIntFlowFlags->Fill(5.5,(Int_t)fPrintFinalResults[2]); | |
7286 | ||
7287 | } // end of void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags() | |
7288 | ||
7289 | ||
7290 | //================================================================================================================================ | |
7291 | ||
7292 | ||
7293 | void AliFlowAnalysisWithQCumulants::StoreDiffFlowFlags() | |
7294 | { | |
7295 | // Store all flags for differential flow in the profile fDiffFlowFlags. | |
7296 | ||
7297 | if(!fDiffFlowFlags) | |
7298 | { | |
7299 | cout<<"WARNING: fDiffFlowFlags is NULL in AFAWQC::SFFDF() !!!!"<<endl; | |
7300 | exit(0); | |
7301 | } | |
7302 | ||
7303 | fDiffFlowFlags->Fill(0.5,fUsePhiWeights||fUsePtWeights||fUseEtaWeights); // particle weights used or not | |
7304 | //fDiffFlowFlags->Fill(1.5,""); // which event weight was used? // to be improved | |
7305 | fDiffFlowFlags->Fill(2.5,fApplyCorrectionForNUA); // corrected for non-uniform acceptance or not | |
7306 | fDiffFlowFlags->Fill(3.5,fCalculate2DFlow); // calculate also 2D differential flow in (pt,eta) or not | |
7307 | ||
7308 | } // end of void AliFlowAnalysisWithQCumulants::StoreDiffFlowFlags() | |
7309 | ||
7310 | ||
7311 | //================================================================================================================================ | |
7312 | ||
7313 | ||
7314 | void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms() | |
7315 | { | |
7316 | // Access all pointers to common control and common result histograms and profiles. | |
7317 | ||
7318 | TString commonHistsName = "AliFlowCommonHistQC"; | |
7319 | commonHistsName += fAnalysisLabel->Data(); | |
7320 | AliFlowCommonHist *commonHist = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHistsName.Data())); | |
7321 | if(commonHist) this->SetCommonHists(commonHist); | |
7322 | TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC"; | |
7323 | commonHists2ndOrderName += fAnalysisLabel->Data(); | |
7324 | AliFlowCommonHist *commonHist2nd = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists2ndOrderName.Data())); | |
7325 | if(commonHist2nd) this->SetCommonHists2nd(commonHist2nd); | |
7326 | TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC"; | |
7327 | commonHists4thOrderName += fAnalysisLabel->Data(); | |
7328 | AliFlowCommonHist *commonHist4th = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists4thOrderName.Data())); | |
7329 | if(commonHist4th) this->SetCommonHists4th(commonHist4th); | |
7330 | TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC"; | |
7331 | commonHists6thOrderName += fAnalysisLabel->Data(); | |
7332 | AliFlowCommonHist *commonHist6th = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists6thOrderName.Data())); | |
7333 | if(commonHist6th) this->SetCommonHists6th(commonHist6th); | |
7334 | TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC"; | |
7335 | commonHists8thOrderName += fAnalysisLabel->Data(); | |
7336 | AliFlowCommonHist *commonHist8th = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists8thOrderName.Data())); | |
7337 | if(commonHist8th) this->SetCommonHists8th(commonHist8th); | |
7338 | TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC"; | |
7339 | commonHistResults2ndOrderName += fAnalysisLabel->Data(); | |
ecac11c2 | 7340 | AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*> (fHistList->FindObject(commonHistResults2ndOrderName.Data())); |
489d5531 | 7341 | if(commonHistRes2nd) this->SetCommonHistsResults2nd(commonHistRes2nd); |
7342 | TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC"; | |
7343 | commonHistResults4thOrderName += fAnalysisLabel->Data(); | |
7344 | AliFlowCommonHistResults *commonHistRes4th = dynamic_cast<AliFlowCommonHistResults*> | |
7345 | (fHistList->FindObject(commonHistResults4thOrderName.Data())); | |
7346 | if(commonHistRes4th) this->SetCommonHistsResults4th(commonHistRes4th); | |
7347 | TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC"; | |
7348 | commonHistResults6thOrderName += fAnalysisLabel->Data(); | |
7349 | AliFlowCommonHistResults *commonHistRes6th = dynamic_cast<AliFlowCommonHistResults*> | |
7350 | (fHistList->FindObject(commonHistResults6thOrderName.Data())); | |
7351 | if(commonHistRes6th) this->SetCommonHistsResults6th(commonHistRes6th); | |
7352 | TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC"; | |
7353 | commonHistResults8thOrderName += fAnalysisLabel->Data(); | |
7354 | AliFlowCommonHistResults *commonHistRes8th = dynamic_cast<AliFlowCommonHistResults*> | |
7355 | (fHistList->FindObject(commonHistResults8thOrderName.Data())); | |
7356 | if(commonHistRes8th) this->SetCommonHistsResults8th(commonHistRes8th); | |
7357 | ||
7358 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms() | |
7359 | ||
7360 | ||
7361 | //================================================================================================================================ | |
7362 | ||
7363 | ||
7364 | void AliFlowAnalysisWithQCumulants::GetPointersForParticleWeightsHistograms() | |
7365 | { | |
7366 | // Get pointers for histograms with particle weights. | |
7367 | ||
7368 | TList *weightsList = dynamic_cast<TList*>(fHistList->FindObject("Weights")); | |
7369 | if(weightsList) this->SetWeightsList(weightsList); | |
7370 | TString fUseParticleWeightsName = "fUseParticleWeightsQC"; // to be improved (hirdwired label QC) | |
7371 | fUseParticleWeightsName += fAnalysisLabel->Data(); | |
7372 | TProfile *useParticleWeights = dynamic_cast<TProfile*>(weightsList->FindObject(fUseParticleWeightsName.Data())); | |
7373 | if(useParticleWeights) | |
7374 | { | |
7375 | this->SetUseParticleWeights(useParticleWeights); | |
7376 | fUsePhiWeights = (Int_t)fUseParticleWeights->GetBinContent(1); | |
7377 | fUsePtWeights = (Int_t)fUseParticleWeights->GetBinContent(2); | |
7378 | fUseEtaWeights = (Int_t)fUseParticleWeights->GetBinContent(3); | |
7379 | } | |
7380 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForParticleWeightsHistograms(); | |
7381 | ||
7382 | ||
7383 | //================================================================================================================================ | |
7384 | ||
7385 | ||
7386 | void AliFlowAnalysisWithQCumulants::GetPointersForIntFlowHistograms() | |
7387 | { | |
7388 | // Get pointers for histograms and profiles relevant for integrated flow: | |
7389 | // a) Get pointer to base list for integrated flow holding profile fIntFlowFlags and lists fIntFlowProfiles and fIntFlowResults. | |
7390 | // b) Get pointer to profile fIntFlowFlags holding all flags for integrated flow. | |
7391 | // c) Get pointer to list fIntFlowProfiles and pointers to all objects that she holds. | |
7392 | // d) Get pointer to list fIntFlowResults and pointers to all objects that she holds. | |
7393 | ||
7394 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data member?) | |
7395 | TString powerFlag[2] = {"linear","quadratic"}; // to be improved (should I promote this to data member?) | |
ff70ca91 | 7396 | TString correlationFlag[4] = {"<<2>>","<<4>>","<<6>>","<<8>>"}; // to be improved (should I promote this to data member?) |
489d5531 | 7397 | |
7398 | // a) Get pointer to base list for integrated flow holding profile fIntFlowFlags and lists fIntFlowProfiles and fIntFlowResults: | |
7399 | TList *intFlowList = NULL; | |
7400 | intFlowList = dynamic_cast<TList*>(fHistList->FindObject("Integrated Flow")); | |
7401 | if(!intFlowList) | |
7402 | { | |
7403 | cout<<"WARNING: intFlowList is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7404 | exit(0); | |
7405 | } | |
7406 | ||
7407 | // b) Get pointer to profile fIntFlowFlags holding all flags for integrated flow: | |
7408 | TString intFlowFlagsName = "fIntFlowFlags"; | |
7409 | intFlowFlagsName += fAnalysisLabel->Data(); | |
7410 | TProfile *intFlowFlags = dynamic_cast<TProfile*>(intFlowList->FindObject(intFlowFlagsName.Data())); | |
7411 | Bool_t bApplyCorrectionForNUA = kFALSE; | |
7412 | if(intFlowFlags) | |
7413 | { | |
7414 | this->SetIntFlowFlags(intFlowFlags); | |
7415 | bApplyCorrectionForNUA = (Int_t)intFlowFlags->GetBinContent(3); | |
7416 | this->SetApplyCorrectionForNUA(bApplyCorrectionForNUA); | |
7417 | } else | |
7418 | { | |
7419 | cout<<"WARNING: intFlowFlags is NULL in FAWQC::GPFIFH() !!!!"<<endl; | |
7420 | } | |
7421 | ||
7422 | // c) Get pointer to list fIntFlowProfiles and pointers to all objects that she holds: | |
7423 | TList *intFlowProfiles = NULL; | |
7424 | intFlowProfiles = dynamic_cast<TList*>(intFlowList->FindObject("Profiles")); | |
7425 | if(intFlowProfiles) | |
7426 | { | |
7427 | // average multiplicities: | |
7428 | TString avMultiplicityName = "fAvMultiplicity"; | |
7429 | avMultiplicityName += fAnalysisLabel->Data(); | |
7430 | TProfile *avMultiplicity = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(avMultiplicityName.Data())); | |
7431 | if(avMultiplicity) | |
7432 | { | |
7433 | this->SetAvMultiplicity(avMultiplicity); | |
7434 | } else | |
7435 | { | |
7436 | cout<<"WARNING: avMultiplicity is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7437 | } | |
7438 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with wrong errors!): | |
7439 | TString intFlowCorrelationsProName = "fIntFlowCorrelationsPro"; | |
7440 | intFlowCorrelationsProName += fAnalysisLabel->Data(); | |
7441 | TProfile *intFlowCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowCorrelationsProName.Data())); | |
7442 | if(intFlowCorrelationsPro) | |
7443 | { | |
7444 | this->SetIntFlowCorrelationsPro(intFlowCorrelationsPro); | |
7445 | } else | |
7446 | { | |
7447 | cout<<"WARNING: intFlowCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
ff70ca91 | 7448 | } |
7449 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> versus multiplicity for all events (error is wrong here): | |
7450 | TString intFlowCorrelationsVsMProName = "fIntFlowCorrelationsVsMPro"; | |
7451 | intFlowCorrelationsVsMProName += fAnalysisLabel->Data(); | |
7452 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
7453 | { | |
7454 | TProfile *intFlowCorrelationsVsMPro = dynamic_cast<TProfile*> | |
7455 | (intFlowProfiles->FindObject(Form("%s, %s",intFlowCorrelationsVsMProName.Data(),correlationFlag[ci].Data()))); | |
7456 | if(intFlowCorrelationsVsMPro) | |
7457 | { | |
7458 | this->SetIntFlowCorrelationsVsMPro(intFlowCorrelationsVsMPro,ci); | |
7459 | } else | |
7460 | { | |
7461 | cout<<"WARNING: "<<Form("intFlowCorrelationsVsMPro[%d]",ci)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7462 | } | |
7463 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
489d5531 | 7464 | // average all correlations for integrated flow (with wrong errors!): |
7465 | TString intFlowCorrelationsAllProName = "fIntFlowCorrelationsAllPro"; | |
7466 | intFlowCorrelationsAllProName += fAnalysisLabel->Data(); | |
7467 | TProfile *intFlowCorrelationsAllPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowCorrelationsAllProName.Data())); | |
7468 | if(intFlowCorrelationsAllPro) | |
7469 | { | |
7470 | this->SetIntFlowCorrelationsAllPro(intFlowCorrelationsAllPro); | |
7471 | } else | |
7472 | { | |
7473 | cout<<"WARNING: intFlowCorrelationsAllPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7474 | } | |
7475 | // average extra correlations for integrated flow (which appear only when particle weights are used): | |
7476 | // (to be improved: Weak point in implementation, I am assuming here that method GetPointersForParticleWeightsHistograms() was called) | |
7477 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
7478 | { | |
7479 | TString intFlowExtraCorrelationsProName = "fIntFlowExtraCorrelationsPro"; | |
7480 | intFlowExtraCorrelationsProName += fAnalysisLabel->Data(); | |
7481 | TProfile *intFlowExtraCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowExtraCorrelationsProName.Data())); | |
7482 | if(intFlowExtraCorrelationsPro) | |
7483 | { | |
7484 | this->SetIntFlowExtraCorrelationsPro(intFlowExtraCorrelationsPro); | |
7485 | } else | |
7486 | { | |
7487 | cout<<"WARNING: intFlowExtraCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7488 | } | |
7489 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
7490 | // average products of correlations <2>, <4>, <6> and <8>: | |
7491 | TString intFlowProductOfCorrelationsProName = "fIntFlowProductOfCorrelationsPro"; | |
7492 | intFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
7493 | TProfile *intFlowProductOfCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowProductOfCorrelationsProName.Data())); | |
7494 | if(intFlowProductOfCorrelationsPro) | |
7495 | { | |
7496 | this->SetIntFlowProductOfCorrelationsPro(intFlowProductOfCorrelationsPro); | |
7497 | } else | |
7498 | { | |
7499 | cout<<"WARNING: intFlowProductOfCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
ff70ca91 | 7500 | } |
7501 | // average product of correlations <2>, <4>, <6> and <8> versus multiplicity | |
7502 | // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>] | |
7503 | TString intFlowProductOfCorrelationsVsMProName = "fIntFlowProductOfCorrelationsVsMPro"; | |
7504 | intFlowProductOfCorrelationsVsMProName += fAnalysisLabel->Data(); | |
7505 | TString productFlag[6] = {"<<2><4>>","<<2><6>>","<<2><8>>","<<4><6>>","<<4><8>>","<<6><8>>"}; | |
7506 | for(Int_t pi=0;pi<6;pi++) | |
7507 | { | |
7508 | TProfile *intFlowProductOfCorrelationsVsMPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(Form("%s, %s",intFlowProductOfCorrelationsVsMProName.Data(),productFlag[pi].Data()))); | |
7509 | if(intFlowProductOfCorrelationsVsMPro) | |
7510 | { | |
7511 | this->SetIntFlowProductOfCorrelationsVsMPro(intFlowProductOfCorrelationsVsMPro,pi); | |
7512 | } else | |
7513 | { | |
7514 | cout<<"WARNING: "<<Form("intFlowProductOfCorrelationsVsMPro[%d]",pi)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7515 | } | |
7516 | } // end of for(Int_t pi=0;pi<6;pi++) | |
489d5531 | 7517 | // average correction terms for non-uniform acceptance (with wrong errors!): |
7518 | for(Int_t sc=0;sc<2;sc++) | |
7519 | { | |
7520 | TString intFlowCorrectionTermsForNUAProName = "fIntFlowCorrectionTermsForNUAPro"; | |
7521 | intFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
7522 | TProfile *intFlowCorrectionTermsForNUAPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject((Form("%s: %s terms",intFlowCorrectionTermsForNUAProName.Data(),sinCosFlag[sc].Data())))); | |
7523 | if(intFlowCorrectionTermsForNUAPro) | |
7524 | { | |
7525 | this->SetIntFlowCorrectionTermsForNUAPro(intFlowCorrectionTermsForNUAPro,sc); | |
7526 | } else | |
7527 | { | |
7528 | cout<<"WARNING: intFlowCorrectionTermsForNUAPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7529 | cout<<"sc = "<<sc<<endl; | |
7530 | } | |
7531 | } // end of for(Int_t sc=0;sc<2;sc++) | |
0328db2d | 7532 | // average products of correction terms for NUA: |
7533 | TString intFlowProductOfCorrectionTermsForNUAProName = "fIntFlowProductOfCorrectionTermsForNUAPro"; | |
7534 | intFlowProductOfCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
7535 | TProfile *intFlowProductOfCorrectionTermsForNUAPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowProductOfCorrectionTermsForNUAProName.Data())); | |
7536 | if(intFlowProductOfCorrectionTermsForNUAPro) | |
7537 | { | |
7538 | this->SetIntFlowProductOfCorrectionTermsForNUAPro(intFlowProductOfCorrectionTermsForNUAPro); | |
7539 | } else | |
7540 | { | |
7541 | cout<<"WARNING: intFlowProductOfCorrectionTermsForNUAPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7542 | } | |
489d5531 | 7543 | } else // to if(intFlowProfiles) |
7544 | { | |
7545 | cout<<"WARNING: intFlowProfiles is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7546 | } | |
7547 | ||
7548 | // d) Get pointer to list fIntFlowResults and pointers to all objects that she holds. | |
7549 | TList *intFlowResults = NULL; | |
7550 | intFlowResults = dynamic_cast<TList*>(intFlowList->FindObject("Results")); | |
7551 | if(intFlowResults) | |
7552 | { | |
7553 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with correct errors!): | |
7554 | TString intFlowCorrelationsHistName = "fIntFlowCorrelationsHist"; | |
7555 | intFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
7556 | TH1D *intFlowCorrelationsHist = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCorrelationsHistName.Data())); | |
7557 | if(intFlowCorrelationsHist) | |
7558 | { | |
7559 | this->SetIntFlowCorrelationsHist(intFlowCorrelationsHist); | |
7560 | } else | |
7561 | { | |
7562 | cout<<"WARNING: intFlowCorrelationsHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7563 | } | |
ff70ca91 | 7564 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with correct errors!) vs M: |
7565 | TString intFlowCorrelationsVsMHistName = "fIntFlowCorrelationsVsMHist"; | |
7566 | intFlowCorrelationsVsMHistName += fAnalysisLabel->Data(); | |
7567 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
7568 | { | |
7569 | TH1D *intFlowCorrelationsVsMHist = dynamic_cast<TH1D*> | |
7570 | (intFlowResults->FindObject(Form("%s, %s",intFlowCorrelationsVsMHistName.Data(),correlationFlag[ci].Data()))); | |
7571 | if(intFlowCorrelationsVsMHist) | |
7572 | { | |
7573 | this->SetIntFlowCorrelationsVsMHist(intFlowCorrelationsVsMHist,ci); | |
7574 | } else | |
7575 | { | |
7576 | cout<<"WARNING: "<<Form("intFlowCorrelationsVsMHist[%d]",ci)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7577 | } | |
7578 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
489d5531 | 7579 | // average all correlations for integrated flow (with correct errors!): |
7580 | TString intFlowCorrelationsAllHistName = "fIntFlowCorrelationsAllHist"; | |
7581 | intFlowCorrelationsAllHistName += fAnalysisLabel->Data(); | |
7582 | TH1D *intFlowCorrelationsAllHist = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCorrelationsAllHistName.Data())); | |
7583 | if(intFlowCorrelationsAllHist) | |
7584 | { | |
7585 | this->SetIntFlowCorrelationsAllHist(intFlowCorrelationsAllHist); | |
7586 | } else | |
7587 | { | |
7588 | cout<<"WARNING: intFlowCorrelationsAllHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7589 | } | |
7590 | // average correction terms for non-uniform acceptance (with correct errors!): | |
7591 | TString intFlowCorrectionTermsForNUAHistName = "fIntFlowCorrectionTermsForNUAHist"; | |
7592 | intFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
7593 | for(Int_t sc=0;sc<2;sc++) | |
7594 | { | |
7595 | TH1D *intFlowCorrectionTermsForNUAHist = dynamic_cast<TH1D*>(intFlowResults->FindObject((Form("%s: %s terms",intFlowCorrectionTermsForNUAHistName.Data(),sinCosFlag[sc].Data())))); | |
7596 | if(intFlowCorrectionTermsForNUAHist) | |
7597 | { | |
7598 | this->SetIntFlowCorrectionTermsForNUAHist(intFlowCorrectionTermsForNUAHist,sc); | |
7599 | } else | |
7600 | { | |
7601 | cout<<"WARNING: intFlowCorrectionTermsForNUAHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7602 | cout<<"sc = "<<sc<<endl; | |
7603 | } | |
7604 | } // end of for(Int_t sc=0;sc<2;sc++) | |
7605 | // covariances (multiplied with weight dependent prefactor): | |
7606 | TString intFlowCovariancesName = "fIntFlowCovariances"; | |
7607 | intFlowCovariancesName += fAnalysisLabel->Data(); | |
7608 | TH1D *intFlowCovariances = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCovariancesName.Data())); | |
7609 | if(intFlowCovariances) | |
7610 | { | |
7611 | this->SetIntFlowCovariances(intFlowCovariances); | |
7612 | } else | |
7613 | { | |
7614 | cout<<"WARNING: intFlowCovariances is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7615 | } | |
7616 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>: | |
7617 | TString intFlowSumOfEventWeightsName = "fIntFlowSumOfEventWeights"; | |
7618 | intFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
7619 | for(Int_t power=0;power<2;power++) | |
7620 | { | |
7621 | TH1D *intFlowSumOfEventWeights = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s: %s",intFlowSumOfEventWeightsName.Data(),powerFlag[power].Data()))); | |
7622 | if(intFlowSumOfEventWeights) | |
7623 | { | |
7624 | this->SetIntFlowSumOfEventWeights(intFlowSumOfEventWeights,power); | |
7625 | } else | |
7626 | { | |
7627 | cout<<"WARNING: intFlowSumOfEventWeights is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7628 | cout<<"power = "<<power<<endl; | |
7629 | } | |
7630 | } // end of for(Int_t power=0;power<2;power++) | |
7631 | // sum of products of event weights for correlations <2>, <4>, <6> and <8>: | |
7632 | TString intFlowSumOfProductOfEventWeightsName = "fIntFlowSumOfProductOfEventWeights"; | |
7633 | intFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
7634 | TH1D *intFlowSumOfProductOfEventWeights = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowSumOfProductOfEventWeightsName.Data())); | |
7635 | if(intFlowSumOfProductOfEventWeights) | |
7636 | { | |
7637 | this->SetIntFlowSumOfProductOfEventWeights(intFlowSumOfProductOfEventWeights); | |
7638 | } else | |
7639 | { | |
7640 | cout<<"WARNING: intFlowSumOfProductOfEventWeights is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7641 | } | |
ff70ca91 | 7642 | // final result for covariances of correlations (multiplied with weight dependent prefactor) versus M |
7643 | // [0=Cov(2,4),1=Cov(2,6),2=Cov(2,8),3=Cov(4,6),4=Cov(4,8),5=Cov(6,8)]: | |
7644 | TString intFlowCovariancesVsMName = "fIntFlowCovariancesVsM"; | |
7645 | intFlowCovariancesVsMName += fAnalysisLabel->Data(); | |
7646 | TString covarianceFlag[6] = {"Cov(<2>,<4>)","Cov(<2>,<6>)","Cov(<2>,<8>)","Cov(<4>,<6>)","Cov(<4>,<8>)","Cov(<6>,<8>)"}; | |
7647 | for(Int_t ci=0;ci<6;ci++) | |
7648 | { | |
7649 | TH1D *intFlowCovariancesVsM = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s, %s",intFlowCovariancesVsMName.Data(),covarianceFlag[ci].Data()))); | |
7650 | if(intFlowCovariancesVsM) | |
7651 | { | |
7652 | this->SetIntFlowCovariancesVsM(intFlowCovariancesVsM,ci); | |
7653 | } else | |
7654 | { | |
7655 | cout<<"WARNING: "<<Form("intFlowCovariancesVsM[%d]",ci)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7656 | } | |
7657 | } // end of for(Int_t ci=0;ci<6;ci++) | |
7658 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8> versus multiplicity | |
7659 | // [0=sum{w_{<2>}},1=sum{w_{<4>}},2=sum{w_{<6>}},3=sum{w_{<8>}}][0=linear 1,1=quadratic]: | |
7660 | TString intFlowSumOfEventWeightsVsMName = "fIntFlowSumOfEventWeightsVsM"; | |
7661 | intFlowSumOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
7662 | TString sumFlag[2][4] = {{"#sum_{i=1}^{N} w_{<2>}","#sum_{i=1}^{N} w_{<4>}","#sum_{i=1}^{N} w_{<6>}","#sum_{i=1}^{N} w_{<8>}"}, | |
7663 | {"#sum_{i=1}^{N} w_{<2>}^{2}","#sum_{i=1}^{N} w_{<4>}^{2}","#sum_{i=1}^{N} w_{<6>}^{2}","#sum_{i=1}^{N} w_{<8>}^{2}"}}; | |
7664 | for(Int_t si=0;si<4;si++) | |
7665 | { | |
7666 | for(Int_t power=0;power<2;power++) | |
7667 | { | |
7668 | TH1D *intFlowSumOfEventWeightsVsM = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s, %s",intFlowSumOfEventWeightsVsMName.Data(),sumFlag[power][si].Data()))); | |
7669 | if(intFlowSumOfEventWeightsVsM) | |
7670 | { | |
7671 | this->SetIntFlowSumOfEventWeightsVsM(intFlowSumOfEventWeightsVsM,si,power); | |
7672 | } else | |
7673 | { | |
7674 | cout<<"WARNING: "<<Form("intFlowSumOfEventWeightsVsM[%d][%d]",si,power)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7675 | } | |
7676 | } // end of for(Int_t power=0;power<2;power++) | |
7677 | } // end of for(Int_t si=0;si<4;si++) | |
7678 | // sum of products of event weights for correlations <2>, <4>, <6> and <8> vs M | |
7679 | // [0=sum{w_{<2>}w_{<4>}},1=sum{w_{<2>}w_{<6>}},2=sum{w_{<2>}w_{<8>}}, | |
7680 | // 3=sum{w_{<4>}w_{<6>}},4=sum{w_{<4>}w_{<8>}},5=sum{w_{<6>}w_{<8>}}]: | |
7681 | TString intFlowSumOfProductOfEventWeightsVsMName = "fIntFlowSumOfProductOfEventWeightsVsM"; | |
7682 | intFlowSumOfProductOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
7683 | TString sopowFlag[6] = {"#sum_{i=1}^{N} w_{<2>} w_{<4>}","#sum_{i=1}^{N} w_{<2>} w_{<6>}","#sum_{i=1}^{N} w_{<2>} w_{<8>}", | |
7684 | "#sum_{i=1}^{N} w_{<4>} w_{<6>}","#sum_{i=1}^{N} w_{<4>} w_{<8>}","#sum_{i=1}^{N} w_{<6>} w_{<8>}"}; | |
7685 | for(Int_t pi=0;pi<6;pi++) | |
7686 | { | |
7687 | TH1D *intFlowSumOfProductOfEventWeightsVsM = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s, %s",intFlowSumOfProductOfEventWeightsVsMName.Data(),sopowFlag[pi].Data()))); | |
7688 | if(intFlowSumOfProductOfEventWeightsVsM) | |
7689 | { | |
7690 | this->SetIntFlowSumOfProductOfEventWeightsVsM(intFlowSumOfProductOfEventWeightsVsM,pi); | |
7691 | } else | |
7692 | { | |
7693 | cout<<"WARNING: "<<Form("intFlowSumOfProductOfEventWeightsVsM[%d]",pi)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7694 | } | |
7695 | } // end of for(Int_t pi=0;pi<6;pi++) | |
0328db2d | 7696 | // covariances for NUA (multiplied with weight dependent prefactor): |
7697 | TString intFlowCovariancesNUAName = "fIntFlowCovariancesNUA"; | |
7698 | intFlowCovariancesNUAName += fAnalysisLabel->Data(); | |
7699 | TH1D *intFlowCovariancesNUA = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCovariancesNUAName.Data())); | |
7700 | if(intFlowCovariancesNUA) | |
7701 | { | |
7702 | this->SetIntFlowCovariancesNUA(intFlowCovariancesNUA); | |
7703 | } else | |
7704 | { | |
7705 | cout<<"WARNING: intFlowCovariancesNUA is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7706 | } | |
7707 | // sum of linear and quadratic event weights NUA terms: | |
7708 | TString intFlowSumOfEventWeightsNUAName = "fIntFlowSumOfEventWeightsNUA"; | |
7709 | intFlowSumOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
7710 | for(Int_t sc=0;sc<2;sc++) | |
7711 | { | |
7712 | for(Int_t power=0;power<2;power++) | |
7713 | { | |
7714 | TH1D *intFlowSumOfEventWeightsNUA = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s: %s, %s",intFlowSumOfEventWeightsNUAName.Data(),powerFlag[power].Data(),sinCosFlag[sc].Data()))); | |
7715 | if(intFlowSumOfEventWeightsNUA) | |
7716 | { | |
7717 | this->SetIntFlowSumOfEventWeightsNUA(intFlowSumOfEventWeightsNUA,sc,power); | |
7718 | } else | |
7719 | { | |
7720 | cout<<"WARNING: intFlowSumOfEventWeightsNUA is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7721 | cout<<"sc = "<<sc<<endl; | |
7722 | cout<<"power = "<<power<<endl; | |
7723 | } | |
7724 | } // end of for(Int_t power=0;power<2;power++) | |
7725 | } // end of for(Int_t sc=0;sc<2;sc++) | |
7726 | // sum of products of event weights for NUA terms: | |
7727 | TString intFlowSumOfProductOfEventWeightsNUAName = "fIntFlowSumOfProductOfEventWeightsNUA"; | |
7728 | intFlowSumOfProductOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
7729 | TH1D *intFlowSumOfProductOfEventWeightsNUA = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowSumOfProductOfEventWeightsNUAName.Data())); | |
7730 | if(intFlowSumOfProductOfEventWeightsNUA) | |
7731 | { | |
7732 | this->SetIntFlowSumOfProductOfEventWeightsNUA(intFlowSumOfProductOfEventWeightsNUA); | |
7733 | } else | |
7734 | { | |
7735 | cout<<"WARNING: intFlowSumOfProductOfEventWeightsNUA is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7736 | } | |
489d5531 | 7737 | // final results for integrated Q-cumulants: |
7738 | TString intFlowQcumulantsName = "fIntFlowQcumulants"; | |
7739 | intFlowQcumulantsName += fAnalysisLabel->Data(); | |
7740 | TH1D *intFlowQcumulants = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowQcumulantsName.Data())); | |
7741 | if(intFlowQcumulants) | |
7742 | { | |
7743 | this->SetIntFlowQcumulants(intFlowQcumulants); | |
7744 | } else | |
7745 | { | |
7746 | cout<<"WARNING: intFlowQcumulants is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7747 | } | |
ff70ca91 | 7748 | // final results for integrated Q-cumulants versus multiplicity: |
7749 | TString intFlowQcumulantsVsMName = "fIntFlowQcumulantsVsM"; | |
7750 | intFlowQcumulantsVsMName += fAnalysisLabel->Data(); | |
7751 | TString cumulantFlag[4] = {"QC{2}","QC{4}","QC{6}","QC{8}"}; | |
7752 | for(Int_t co=0;co<4;co++) // cumulant order | |
7753 | { | |
7754 | TH1D *intFlowQcumulantsVsM = dynamic_cast<TH1D*> | |
7755 | (intFlowResults->FindObject(Form("%s, %s",intFlowQcumulantsVsMName.Data(),cumulantFlag[co].Data()))); | |
7756 | if(intFlowQcumulantsVsM) | |
7757 | { | |
7758 | this->SetIntFlowQcumulantsVsM(intFlowQcumulantsVsM,co); | |
7759 | } else | |
7760 | { | |
7761 | cout<<"WARNING: "<<Form("intFlowQcumulantsVsM[%d]",co)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7762 | } | |
7763 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
489d5531 | 7764 | // final integrated flow estimates from Q-cumulants: |
7765 | TString intFlowName = "fIntFlow"; | |
7766 | intFlowName += fAnalysisLabel->Data(); | |
7767 | TH1D *intFlow = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowName.Data())); | |
7768 | if(intFlow) | |
7769 | { | |
7770 | this->SetIntFlow(intFlow); | |
7771 | } else | |
7772 | { | |
7773 | cout<<"WARNING: intFlow is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
ff70ca91 | 7774 | } |
7775 | // integrated flow from Q-cumulants versus multiplicity: | |
7776 | TString intFlowVsMName = "fIntFlowVsM"; | |
7777 | intFlowVsMName += fAnalysisLabel->Data(); | |
7778 | TString flowFlag[4] = {"v_{2}{2,QC}","v_{2}{4,QC}","v_{2}{6,QC}","v_{2}{8,QC}"}; // to be improved (harwired harmonic) | |
7779 | for(Int_t co=0;co<4;co++) // cumulant order | |
7780 | { | |
7781 | TH1D *intFlowVsM = dynamic_cast<TH1D*> | |
7782 | (intFlowResults->FindObject(Form("%s, %s",intFlowVsMName.Data(),flowFlag[co].Data()))); | |
7783 | if(intFlowVsM) | |
7784 | { | |
7785 | this->SetIntFlowVsM(intFlowVsM,co); | |
7786 | } else | |
7787 | { | |
7788 | cout<<"WARNING: "<<Form("intFlowVsM[%d]",co)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7789 | } | |
7790 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
489d5531 | 7791 | } else // to if(intFlowResults) |
7792 | { | |
7793 | cout<<"WARNING: intFlowResults is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7794 | } | |
ff70ca91 | 7795 | |
489d5531 | 7796 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForIntFlowHistograms() |
7797 | ||
489d5531 | 7798 | //================================================================================================================================ |
7799 | ||
489d5531 | 7800 | void AliFlowAnalysisWithQCumulants::GetPointersForDiffFlowHistograms() |
7801 | { | |
7802 | // Get pointer to all objects relevant for differential flow. | |
7803 | // a) Define flags locally (to be improved: should I promote flags to data members?); | |
7804 | // b) Get pointer to base list for differential flow fDiffFlowList and nested lists fDiffFlowListProfiles and fDiffFlowListResults; | |
7805 | // c) Get pointer to profile fDiffFlowFlags holding all flags for differential flow; | |
7806 | // d) Get pointers to all nested lists in fDiffFlowListProfiles and to profiles which they hold; | |
7807 | // e) Get pointers to all nested lists in fDiffFlowListResults and to histograms which they hold. | |
7808 | ||
7809 | // a) Define flags locally (to be improved: should I promote flags to data members?): | |
7810 | TString typeFlag[2] = {"RP","POI"}; | |
7811 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
7812 | TString powerFlag[2] = {"linear","quadratic"}; | |
7813 | TString sinCosFlag[2] = {"sin","cos"}; | |
7814 | TString differentialCumulantIndex[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"}; | |
7815 | TString differentialFlowIndex[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; | |
7816 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; | |
7817 | TString mixedCorrelationIndex[8] = {"<2>","<2'>","<4>","<4'>","<6>","<6'>","<8>","<8'>"}; | |
7818 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; | |
7819 | ||
7820 | // b) Get pointer to base list for differential flow fDiffFlowList and nested lists fDiffFlowListProfiles and fDiffFlowListResults: | |
7821 | TList *diffFlowList = NULL; | |
7822 | diffFlowList = dynamic_cast<TList*>(fHistList->FindObject("Differential Flow")); | |
7823 | if(!diffFlowList) | |
7824 | { | |
7825 | cout<<"WARNING: diffFlowList is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7826 | exit(0); | |
7827 | } | |
7828 | // list holding nested lists containing profiles: | |
7829 | TList *diffFlowListProfiles = NULL; | |
7830 | diffFlowListProfiles = dynamic_cast<TList*>(diffFlowList->FindObject("Profiles")); | |
7831 | if(!diffFlowListProfiles) | |
7832 | { | |
7833 | cout<<"WARNING: diffFlowListProfiles is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7834 | exit(0); | |
7835 | } | |
7836 | // list holding nested lists containing 2D and 1D histograms with final results: | |
7837 | TList *diffFlowListResults = NULL; | |
7838 | diffFlowListResults = dynamic_cast<TList*>(diffFlowList->FindObject("Results")); | |
7839 | if(!diffFlowListResults) | |
7840 | { | |
7841 | cout<<"WARNING: diffFlowListResults is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7842 | exit(0); | |
7843 | } | |
7844 | ||
7845 | // c) Get pointer to profile holding all flags for differential flow; | |
7846 | TString diffFlowFlagsName = "fDiffFlowFlags"; | |
7847 | diffFlowFlagsName += fAnalysisLabel->Data(); | |
7848 | TProfile *diffFlowFlags = dynamic_cast<TProfile*>(diffFlowList->FindObject(diffFlowFlagsName.Data())); | |
7849 | Bool_t bCalculate2DFlow = kFALSE; | |
7850 | if(diffFlowFlags) | |
7851 | { | |
7852 | this->SetDiffFlowFlags(diffFlowFlags); | |
7853 | bCalculate2DFlow = (Int_t)diffFlowFlags->GetBinContent(4); | |
7854 | this->SetCalculate2DFlow(bCalculate2DFlow); // to be improved (shoul I call this setter somewhere else?) | |
7855 | } | |
7856 | ||
7857 | // d) Get pointers to all nested lists in fDiffFlowListProfiles and to profiles which they hold; | |
7858 | // correlations: | |
7859 | TList *diffFlowCorrelationsProList[2][2] = {{NULL}}; | |
7860 | TString diffFlowCorrelationsProName = "fDiffFlowCorrelationsPro"; | |
7861 | diffFlowCorrelationsProName += fAnalysisLabel->Data(); | |
7862 | TProfile *diffFlowCorrelationsPro[2][2][4] = {{{NULL}}}; | |
7863 | // products of correlations: | |
7864 | TList *diffFlowProductOfCorrelationsProList[2][2] = {{NULL}}; | |
7865 | TString diffFlowProductOfCorrelationsProName = "fDiffFlowProductOfCorrelationsPro"; | |
7866 | diffFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
7867 | TProfile *diffFlowProductOfCorrelationsPro[2][2][8][8] = {{{{NULL}}}}; | |
7868 | // corrections: | |
7869 | TList *diffFlowCorrectionsProList[2][2] = {{NULL}}; | |
7870 | TString diffFlowCorrectionTermsForNUAProName = "fDiffFlowCorrectionTermsForNUAPro"; | |
7871 | diffFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
7872 | TProfile *diffFlowCorrectionTermsForNUAPro[2][2][2][10] = {{{{NULL}}}}; | |
7873 | for(Int_t t=0;t<2;t++) | |
7874 | { | |
7875 | for(Int_t pe=0;pe<2;pe++) | |
7876 | { | |
7877 | diffFlowCorrelationsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
7878 | if(!diffFlowCorrelationsProList[t][pe]) | |
7879 | { | |
7880 | cout<<"WARNING: diffFlowCorrelationsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7881 | cout<<"t = "<<t<<endl; | |
7882 | cout<<"pe = "<<pe<<endl; | |
7883 | exit(0); | |
7884 | } | |
7885 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
7886 | { | |
7887 | 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()))); | |
7888 | if(diffFlowCorrelationsPro[t][pe][ci]) | |
7889 | { | |
7890 | this->SetDiffFlowCorrelationsPro(diffFlowCorrelationsPro[t][pe][ci],t,pe,ci); | |
7891 | } else | |
7892 | { | |
7893 | cout<<"WARNING: diffFlowCorrelationsPro[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7894 | cout<<"t = "<<t<<endl; | |
7895 | cout<<"pe = "<<pe<<endl; | |
7896 | cout<<"ci = "<<ci<<endl; | |
7897 | } | |
7898 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
7899 | // products of correlations: | |
7900 | diffFlowProductOfCorrelationsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with products of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
7901 | if(!diffFlowProductOfCorrelationsProList[t][pe]) | |
7902 | { | |
7903 | cout<<"WARNING: ddiffFlowProductOfCorrelationsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7904 | cout<<"t = "<<t<<endl; | |
7905 | cout<<"pe = "<<pe<<endl; | |
7906 | exit(0); | |
7907 | } | |
7908 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
7909 | { | |
7910 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
7911 | { | |
7912 | 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()))); | |
7913 | if(diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]) | |
7914 | { | |
7915 | this->SetDiffFlowProductOfCorrelationsPro(diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2],t,pe,mci1,mci2); | |
7916 | } else | |
7917 | { | |
7918 | cout<<"WARNING: diffFlowCorrelationsPro[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7919 | cout<<"t = "<<t<<endl; | |
7920 | cout<<"pe = "<<pe<<endl; | |
7921 | cout<<"mci1 = "<<mci1<<endl; | |
7922 | cout<<"mci2 = "<<mci2<<endl; | |
7923 | } | |
7924 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
7925 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
7926 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
7927 | // corrections: | |
7928 | diffFlowCorrectionsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
7929 | if(!diffFlowCorrectionsProList[t][pe]) | |
7930 | { | |
7931 | cout<<"WARNING: diffFlowCorrectionsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7932 | cout<<"t = "<<t<<endl; | |
7933 | cout<<"pe = "<<pe<<endl; | |
7934 | exit(0); | |
7935 | } | |
7936 | // correction terms for NUA: | |
7937 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
7938 | { | |
7939 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
7940 | { | |
7941 | 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))); | |
7942 | if(diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]) | |
7943 | { | |
7944 | this->SetDiffFlowCorrectionTermsForNUAPro(diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti],t,pe,sc,cti); | |
7945 | } else | |
7946 | { | |
7947 | cout<<"WARNING: diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7948 | cout<<"t = "<<t<<endl; | |
7949 | cout<<"pe = "<<pe<<endl; | |
7950 | cout<<"sc = "<<sc<<endl; | |
7951 | cout<<"cti = "<<cti<<endl; | |
7952 | } | |
7953 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
7954 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
7955 | // ... | |
7956 | } // end of for(Int_t pe=0;pe<2;pe++) | |
7957 | } // end of for(Int_t t=0;t<2;t++) | |
7958 | ||
7959 | // e) Get pointers to all nested lists in fDiffFlowListResults and to histograms which they hold. | |
7960 | // reduced correlations: | |
7961 | TList *diffFlowCorrelationsHistList[2][2] = {{NULL}}; | |
7962 | TString diffFlowCorrelationsHistName = "fDiffFlowCorrelationsHist"; | |
7963 | diffFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
7964 | TH1D *diffFlowCorrelationsHist[2][2][4] = {{{NULL}}}; | |
7965 | // corrections for NUA: | |
7966 | TList *diffFlowCorrectionsHistList[2][2] = {{NULL}}; | |
7967 | TString diffFlowCorrectionTermsForNUAHistName = "fDiffFlowCorrectionTermsForNUAHist"; | |
7968 | diffFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
7969 | TH1D *diffFlowCorrectionTermsForNUAHist[2][2][2][10] = {{{{NULL}}}}; | |
7970 | // differential Q-cumulants: | |
7971 | TList *diffFlowCumulantsHistList[2][2] = {{NULL}}; | |
7972 | TString diffFlowCumulantsName = "fDiffFlowCumulants"; | |
7973 | diffFlowCumulantsName += fAnalysisLabel->Data(); | |
7974 | TH1D *diffFlowCumulants[2][2][4] = {{{NULL}}}; | |
7975 | // differential flow estimates from Q-cumulants: | |
7976 | TList *diffFlowHistList[2][2] = {{NULL}}; | |
7977 | TString diffFlowName = "fDiffFlow"; | |
7978 | diffFlowName += fAnalysisLabel->Data(); | |
7979 | TH1D *diffFlow[2][2][4] = {{{NULL}}}; | |
7980 | // differential covariances: | |
7981 | TList *diffFlowCovariancesHistList[2][2] = {{NULL}}; | |
7982 | TString diffFlowCovariancesName = "fDiffFlowCovariances"; | |
7983 | diffFlowCovariancesName += fAnalysisLabel->Data(); | |
7984 | TH1D *diffFlowCovariances[2][2][5] = {{{NULL}}}; | |
7985 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
7986 | { | |
7987 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
7988 | { | |
7989 | // reduced correlations: | |
7990 | diffFlowCorrelationsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
7991 | if(!diffFlowCorrelationsHistList[t][pe]) | |
7992 | { | |
7993 | cout<<"WARNING: diffFlowCorrelationsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7994 | cout<<"t = "<<t<<endl; | |
7995 | cout<<"pe = "<<pe<<endl; | |
7996 | exit(0); | |
7997 | } | |
7998 | for(Int_t index=0;index<4;index++) | |
7999 | { | |
8000 | 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()))); | |
8001 | if(diffFlowCorrelationsHist[t][pe][index]) | |
8002 | { | |
8003 | this->SetDiffFlowCorrelationsHist(diffFlowCorrelationsHist[t][pe][index],t,pe,index); | |
8004 | } else | |
8005 | { | |
8006 | cout<<"WARNING: diffFlowCorrelationsHist[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8007 | cout<<"t = "<<t<<endl; | |
8008 | cout<<"pe = "<<pe<<endl; | |
8009 | cout<<"index = "<<index<<endl; | |
8010 | exit(0); | |
8011 | } | |
8012 | } // end of for(Int_t index=0;index<4;index++) | |
8013 | // corrections: | |
8014 | diffFlowCorrectionsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Histograms with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8015 | if(!diffFlowCorrectionsHistList[t][pe]) | |
8016 | { | |
8017 | cout<<"WARNING: diffFlowCorrectionsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8018 | cout<<"t = "<<t<<endl; | |
8019 | cout<<"pe = "<<pe<<endl; | |
8020 | exit(0); | |
8021 | } | |
8022 | // correction terms for NUA: | |
8023 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8024 | { | |
8025 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8026 | { | |
8027 | 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))); | |
8028 | if(diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]) | |
8029 | { | |
8030 | this->SetDiffFlowCorrectionTermsForNUAHist(diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti],t,pe,sc,cti); | |
8031 | } else | |
8032 | { | |
8033 | cout<<"WARNING: diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8034 | cout<<"t = "<<t<<endl; | |
8035 | cout<<"pe = "<<pe<<endl; | |
8036 | cout<<"sc = "<<sc<<endl; | |
8037 | cout<<"cti = "<<cti<<endl; | |
8038 | } | |
8039 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
8040 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8041 | // ... | |
8042 | // differential Q-cumulants: | |
8043 | diffFlowCumulantsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Differential Q-cumulants (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8044 | if(!diffFlowCumulantsHistList[t][pe]) | |
8045 | { | |
8046 | cout<<"WARNING: diffFlowCumulantsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8047 | cout<<"t = "<<t<<endl; | |
8048 | cout<<"pe = "<<pe<<endl; | |
8049 | exit(0); | |
8050 | } | |
8051 | for(Int_t index=0;index<4;index++) | |
8052 | { | |
8053 | 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()))); | |
8054 | if(diffFlowCumulants[t][pe][index]) | |
8055 | { | |
8056 | this->SetDiffFlowCumulants(diffFlowCumulants[t][pe][index],t,pe,index); | |
8057 | } else | |
8058 | { | |
8059 | cout<<"WARNING: diffFlowCumulants[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8060 | cout<<"t = "<<t<<endl; | |
8061 | cout<<"pe = "<<pe<<endl; | |
8062 | cout<<"index = "<<index<<endl; | |
8063 | exit(0); | |
8064 | } | |
8065 | } // end of for(Int_t index=0;index<4;index++) | |
8066 | // differential flow estimates from Q-cumulants: | |
8067 | diffFlowHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Differential flow (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8068 | if(!diffFlowHistList[t][pe]) | |
8069 | { | |
8070 | cout<<"WARNING: diffFlowHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8071 | cout<<"t = "<<t<<endl; | |
8072 | cout<<"pe = "<<pe<<endl; | |
8073 | exit(0); | |
8074 | } | |
8075 | for(Int_t index=0;index<4;index++) | |
8076 | { | |
8077 | 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()))); | |
8078 | if(diffFlow[t][pe][index]) | |
8079 | { | |
8080 | this->SetDiffFlow(diffFlow[t][pe][index],t,pe,index); | |
8081 | } else | |
8082 | { | |
8083 | cout<<"WARNING: diffFlow[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8084 | cout<<"t = "<<t<<endl; | |
8085 | cout<<"pe = "<<pe<<endl; | |
8086 | cout<<"index = "<<index<<endl; | |
8087 | exit(0); | |
8088 | } | |
8089 | } // end of for(Int_t index=0;index<4;index++) | |
8090 | // differential covariances: | |
8091 | diffFlowCovariancesHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Covariances of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8092 | if(!diffFlowCovariancesHistList[t][pe]) | |
8093 | { | |
8094 | cout<<"WARNING: diffFlowCovariancesHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8095 | cout<<"t = "<<t<<endl; | |
8096 | cout<<"pe = "<<pe<<endl; | |
8097 | exit(0); | |
8098 | } | |
8099 | for(Int_t covIndex=0;covIndex<5;covIndex++) | |
8100 | { | |
8101 | 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()))); | |
8102 | if(diffFlowCovariances[t][pe][covIndex]) | |
8103 | { | |
8104 | this->SetDiffFlowCovariances(diffFlowCovariances[t][pe][covIndex],t,pe,covIndex); | |
8105 | } else | |
8106 | { | |
8107 | cout<<"WARNING: diffFlowCovariances[t][pe][covIndex] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8108 | cout<<"t = "<<t<<endl; | |
8109 | cout<<"pe = "<<pe<<endl; | |
8110 | cout<<"covIndex = "<<covIndex<<endl; | |
8111 | exit(0); | |
8112 | } | |
8113 | } // end of for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
8114 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8115 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8116 | // sum of event weights for reduced correlations: | |
8117 | TList *diffFlowSumOfEventWeightsHistList[2][2][2] = {{{NULL}}}; | |
8118 | TString diffFlowSumOfEventWeightsName = "fDiffFlowSumOfEventWeights"; | |
8119 | diffFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
8120 | TH1D *diffFlowSumOfEventWeights[2][2][2][4] = {{{{NULL}}}}; | |
8121 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8122 | { | |
8123 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8124 | { | |
8125 | for(Int_t p=0;p<2;p++) // power of event weights is either 1 or 2 | |
8126 | { | |
8127 | 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()))); | |
8128 | if(!diffFlowSumOfEventWeightsHistList[t][pe][p]) | |
8129 | { | |
8130 | cout<<"WARNING: diffFlowSumOfEventWeightsHistList[t][pe][p] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8131 | cout<<"t = "<<t<<endl; | |
8132 | cout<<"pe = "<<pe<<endl; | |
8133 | cout<<"power = "<<p<<endl; | |
8134 | exit(0); | |
8135 | } | |
8136 | for(Int_t ew=0;ew<4;ew++) // index of reduced correlation | |
8137 | { | |
8138 | 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()))); | |
8139 | if(diffFlowSumOfEventWeights[t][pe][p][ew]) | |
8140 | { | |
8141 | this->SetDiffFlowSumOfEventWeights(diffFlowSumOfEventWeights[t][pe][p][ew],t,pe,p,ew); | |
8142 | } else | |
8143 | { | |
8144 | cout<<"WARNING: diffFlowSumOfEventWeights[t][pe][p][ew] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8145 | cout<<"t = "<<t<<endl; | |
8146 | cout<<"pe = "<<pe<<endl; | |
8147 | cout<<"power = "<<p<<endl; | |
8148 | cout<<"ew = "<<ew<<endl; | |
8149 | exit(0); | |
8150 | } | |
8151 | } | |
8152 | } // end of for(Int_t p=0;p<2;p++) // power of event weights is either 1 or 2 | |
8153 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8154 | } // end of for(Int_t t=0;t<2;t++) // type is RP or POI | |
8155 | // | |
8156 | TList *diffFlowSumOfProductOfEventWeightsHistList[2][2] = {{NULL}}; | |
8157 | TString diffFlowSumOfProductOfEventWeightsName = "fDiffFlowSumOfProductOfEventWeights"; | |
8158 | diffFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
8159 | TH1D *diffFlowSumOfProductOfEventWeights[2][2][8][8] = {{{{NULL}}}}; | |
8160 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8161 | { | |
8162 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8163 | { | |
8164 | diffFlowSumOfProductOfEventWeightsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Sum of products of event weights (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8165 | if(!diffFlowSumOfProductOfEventWeightsHistList[t][pe]) | |
8166 | { | |
8167 | cout<<"WARNING: diffFlowSumOfProductOfEventWeightsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8168 | cout<<"t = "<<t<<endl; | |
8169 | cout<<"pe = "<<pe<<endl; | |
8170 | exit(0); | |
8171 | } | |
8172 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8173 | { | |
8174 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8175 | { | |
8176 | 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()))); | |
8177 | if(diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]) | |
8178 | { | |
8179 | this->SetDiffFlowSumOfProductOfEventWeights(diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2],t,pe,mci1,mci2); | |
8180 | } else | |
8181 | { | |
8182 | cout<<"WARNING: diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8183 | cout<<"t = "<<t<<endl; | |
8184 | cout<<"pe = "<<pe<<endl; | |
8185 | cout<<"mci1 = "<<mci1<<endl; | |
8186 | cout<<"mci2 = "<<mci2<<endl; | |
8187 | exit(0); | |
8188 | } | |
8189 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
8190 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8191 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8192 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8193 | } // end of for(Int_t t=0;t<2;t++) // type is RP or POI | |
8194 | ||
8195 | } // end void AliFlowAnalysisWithQCumulants::GetPointersForDiffFlowHistograms() | |
8196 | ||
8197 | ||
8198 | //================================================================================================================================ | |
8199 | ||
8200 | ||
8201 | void AliFlowAnalysisWithQCumulants::BookEverythingForDifferentialFlow() | |
8202 | { | |
8203 | // Book all histograms and profiles needed for differential flow. | |
8204 | // a) Define flags locally (to be improved: should I promote flags to data members?); | |
8205 | // b) Book profile to hold all flags for differential flow; | |
8206 | // c) Book e-b-e quantities; | |
8207 | // d) Book profiles; | |
8208 | // e) Book histograms holding final results. | |
8209 | ||
8210 | // a) Define flags locally (to be improved: should I promote flags to data members?): | |
8211 | TString typeFlag[2] = {"RP","POI"}; | |
8212 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
8213 | TString powerFlag[2] = {"linear","quadratic"}; | |
8214 | TString sinCosFlag[2] = {"sin","cos"}; | |
8215 | TString differentialCumulantIndex[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"}; | |
8216 | TString differentialFlowIndex[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; | |
8217 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; | |
8218 | TString mixedCorrelationIndex[8] = {"<2>","<2'>","<4>","<4'>","<6>","<6'>","<8>","<8'>"}; | |
8219 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; | |
8220 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
8221 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
8222 | Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
8223 | ||
8224 | // b) Book profile to hold all flags for differential flow: | |
8225 | TString diffFlowFlagsName = "fDiffFlowFlags"; | |
8226 | diffFlowFlagsName += fAnalysisLabel->Data(); | |
8227 | fDiffFlowFlags = new TProfile(diffFlowFlagsName.Data(),"Flags for Differential Flow",4,0,4); | |
8228 | fDiffFlowFlags->SetTickLength(-0.01,"Y"); | |
8229 | fDiffFlowFlags->SetMarkerStyle(25); | |
8230 | fDiffFlowFlags->SetLabelSize(0.05); | |
8231 | fDiffFlowFlags->SetLabelOffset(0.02,"Y"); | |
8232 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(1,"Particle Weights"); | |
8233 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(2,"Event Weights"); | |
8234 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(3,"Corrected for NUA?"); | |
8235 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(4,"Calculated 2D flow?"); | |
8236 | fDiffFlowList->Add(fDiffFlowFlags); | |
8237 | ||
8238 | // c) Book e-b-e quantities: | |
8239 | // Event-by-event r_{m*n,k}(pt,eta), p_{m*n,k}(pt,eta) and q_{m*n,k}(pt,eta) | |
8240 | // Explanantion of notation: | |
8241 | // 1.) n is harmonic, m is multiple of harmonic; | |
8242 | // 2.) k is power of particle weight; | |
8243 | // 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); | |
8244 | // 4.) p_{m*n,k}(pt,eta) = Q-vector evaluated in harmonic m*n for POIs in particular (pt,eta) bin | |
8245 | // (if i-th POI is also RP, than it is weighted with w_i^k); | |
8246 | // 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 | |
8247 | // (i-th RP&&POI is weighted with w_i^k) | |
8248 | ||
8249 | // 1D: | |
8250 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP && POI ) | |
8251 | { | |
8252 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8253 | { | |
8254 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
8255 | { | |
8256 | for(Int_t k=0;k<9;k++) // power of particle weight | |
8257 | { | |
8258 | fReRPQ1dEBE[t][pe][m][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%dpower%dRe",t,pe,m,k), | |
8259 | Form("TypeFlag%dpteta%dmultiple%dpower%dRe",t,pe,m,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8260 | fImRPQ1dEBE[t][pe][m][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%dpower%dIm",t,pe,m,k), | |
8261 | Form("TypeFlag%dpteta%dmultiple%dpower%dIm",t,pe,m,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8262 | } | |
8263 | } | |
8264 | } | |
8265 | } | |
8266 | // to be improved (add explanation of fs1dEBE[t][pe][k]): | |
8267 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
8268 | { | |
8269 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8270 | { | |
8271 | for(Int_t k=0;k<9;k++) // power of particle weight | |
8272 | { | |
8273 | fs1dEBE[t][pe][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%d",t,pe,k), | |
8274 | Form("TypeFlag%dpteta%dmultiple%d",t,pe,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8275 | } | |
8276 | } | |
8277 | } | |
8278 | // correction terms for nua: | |
8279 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
8280 | { | |
8281 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8282 | { | |
8283 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8284 | { | |
8285 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8286 | { | |
8287 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti] = new TH1D(Form("typeFlag%d pteta%d sincos%d cti%d",t,pe,sc,cti), | |
8288 | Form("typeFlag%d pteta%d sincos%d cti%d",t,pe,sc,cti),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8289 | } | |
8290 | } | |
8291 | } | |
8292 | } | |
8293 | // 2D: | |
8294 | TProfile2D styleRe("typeMultiplePowerRe","typeMultiplePowerRe",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
8295 | TProfile2D styleIm("typeMultiplePowerIm","typeMultiplePowerIm",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
8296 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
8297 | { | |
8298 | for(Int_t m=0;m<4;m++) | |
8299 | { | |
8300 | for(Int_t k=0;k<9;k++) | |
8301 | { | |
8302 | fReRPQ2dEBE[t][m][k] = (TProfile2D*)styleRe.Clone(Form("typeFlag%dmultiple%dpower%dRe",t,m,k)); | |
8303 | fImRPQ2dEBE[t][m][k] = (TProfile2D*)styleIm.Clone(Form("typeFlag%dmultiple%dpower%dIm",t,m,k)); | |
8304 | } | |
8305 | } | |
8306 | } | |
8307 | TProfile2D styleS("typePower","typePower",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
8308 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
8309 | { | |
8310 | for(Int_t k=0;k<9;k++) | |
8311 | { | |
8312 | fs2dEBE[t][k] = (TProfile2D*)styleS.Clone(Form("typeFlag%dpower%d",t,k)); | |
8313 | } | |
8314 | } | |
8315 | // reduced correlations e-b-e: | |
8316 | TString diffFlowCorrelationsEBEName = "fDiffFlowCorrelationsEBE"; | |
8317 | diffFlowCorrelationsEBEName += fAnalysisLabel->Data(); | |
8318 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8319 | { | |
8320 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8321 | { | |
8322 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
8323 | { | |
8324 | 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]); | |
8325 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
8326 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8327 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8328 | // event weights for reduced correlations e-b-e: | |
8329 | TString diffFlowEventWeightsForCorrelationsEBEName = "fDiffFlowEventWeightsForCorrelationsEBE"; | |
8330 | diffFlowEventWeightsForCorrelationsEBEName += fAnalysisLabel->Data(); | |
8331 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8332 | { | |
8333 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8334 | { | |
8335 | for(Int_t rci=0;rci<4;rci++) // event weight for reduced correlation index | |
8336 | { | |
8337 | 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]); | |
8338 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
8339 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8340 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8341 | ||
8342 | // d) Book profiles; | |
8343 | // reduced correlations: | |
8344 | TString diffFlowCorrelationsProName = "fDiffFlowCorrelationsPro"; | |
8345 | diffFlowCorrelationsProName += fAnalysisLabel->Data(); | |
8346 | // corrections terms: | |
8347 | TString diffFlowCorrectionTermsForNUAProName = "fDiffFlowCorrectionTermsForNUAPro"; | |
8348 | diffFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
8349 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8350 | { | |
8351 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8352 | { | |
8353 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
8354 | { | |
8355 | // reduced correlations: | |
8356 | 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"); | |
8357 | fDiffFlowCorrelationsPro[t][pe][rci]->SetXTitle(ptEtaFlag[pe].Data()); | |
8358 | fDiffFlowCorrelationsProList[t][pe]->Add(fDiffFlowCorrelationsPro[t][pe][rci]); // to be improved (add dedicated list to hold reduced correlations) | |
8359 | } // end of for(Int_t rci=0;rci<4;rci++) // correlation index | |
8360 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8361 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8362 | // correction terms for nua: | |
8363 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
8364 | { | |
8365 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8366 | { | |
8367 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8368 | { | |
8369 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8370 | { | |
8371 | 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]); | |
8372 | fDiffFlowCorrectionsProList[t][pe]->Add(fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]); | |
8373 | } | |
8374 | } | |
8375 | } | |
8376 | } | |
8377 | // e) Book histograms holding final results. | |
8378 | // reduced correlations: | |
8379 | TString diffFlowCorrelationsHistName = "fDiffFlowCorrelationsHist"; | |
8380 | diffFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
8381 | // corrections terms: | |
8382 | TString diffFlowCorrectionTermsForNUAHistName = "fDiffFlowCorrectionTermsForNUAHist"; | |
8383 | diffFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
8384 | // differential covariances: | |
8385 | TString diffFlowCovariancesName = "fDiffFlowCovariances"; | |
8386 | diffFlowCovariancesName += fAnalysisLabel->Data(); | |
8387 | // differential Q-cumulants: | |
8388 | TString diffFlowCumulantsName = "fDiffFlowCumulants"; | |
8389 | diffFlowCumulantsName += fAnalysisLabel->Data(); | |
8390 | // differential flow: | |
8391 | TString diffFlowName = "fDiffFlow"; | |
8392 | diffFlowName += fAnalysisLabel->Data(); | |
8393 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8394 | { | |
8395 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8396 | { | |
8397 | for(Int_t index=0;index<4;index++) | |
8398 | { | |
8399 | // reduced correlations: | |
8400 | 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]); | |
8401 | fDiffFlowCorrelationsHist[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
8402 | fDiffFlowCorrelationsHistList[t][pe]->Add(fDiffFlowCorrelationsHist[t][pe][index]); | |
8403 | // differential Q-cumulants: | |
8404 | 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]); | |
8405 | fDiffFlowCumulants[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
8406 | fDiffFlowCumulantsHistList[t][pe]->Add(fDiffFlowCumulants[t][pe][index]); | |
8407 | // differential flow estimates from Q-cumulants: | |
8408 | 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]); | |
8409 | fDiffFlow[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
8410 | fDiffFlowHistList[t][pe]->Add(fDiffFlow[t][pe][index]); | |
8411 | } // end of for(Int_t index=0;index<4;index++) | |
8412 | for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
8413 | { | |
8414 | // differential covariances: | |
8415 | 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]); | |
8416 | fDiffFlowCovariances[t][pe][covIndex]->SetXTitle(ptEtaFlag[pe].Data()); | |
8417 | fDiffFlowCovariancesHistList[t][pe]->Add(fDiffFlowCovariances[t][pe][covIndex]); | |
8418 | } // end of for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
8419 | // products of both types of correlations: | |
8420 | TString diffFlowProductOfCorrelationsProName = "fDiffFlowProductOfCorrelationsPro"; | |
8421 | diffFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
8422 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8423 | { | |
8424 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8425 | { | |
8426 | 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]); | |
8427 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]->SetXTitle(ptEtaFlag[pe].Data()); | |
8428 | fDiffFlowProductOfCorrelationsProList[t][pe]->Add(fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]); | |
8429 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
8430 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8431 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8432 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8433 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8434 | // sums of event weights for reduced correlations: | |
8435 | TString diffFlowSumOfEventWeightsName = "fDiffFlowSumOfEventWeights"; | |
8436 | diffFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
8437 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8438 | { | |
8439 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8440 | { | |
8441 | for(Int_t p=0;p<2;p++) // power of weights is either 1 or 2 | |
8442 | { | |
8443 | for(Int_t ew=0;ew<4;ew++) // index of reduced correlation | |
8444 | { | |
8445 | 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]); | |
8446 | fDiffFlowSumOfEventWeights[t][pe][p][ew]->SetXTitle(ptEtaFlag[pe].Data()); | |
8447 | fDiffFlowSumOfEventWeightsHistList[t][pe][p]->Add(fDiffFlowSumOfEventWeights[t][pe][p][ew]); // to be improved (add dedicated list to hold all this) | |
8448 | } | |
8449 | } | |
8450 | } | |
8451 | } | |
8452 | // sum of products of event weights for both types of correlations: | |
8453 | TString diffFlowSumOfProductOfEventWeightsName = "fDiffFlowSumOfProductOfEventWeights"; | |
8454 | diffFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
8455 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8456 | { | |
8457 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8458 | { | |
8459 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8460 | { | |
8461 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8462 | { | |
8463 | 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]); | |
8464 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]->SetXTitle(ptEtaFlag[pe].Data()); | |
8465 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]->Add(fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]); | |
8466 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
8467 | } | |
8468 | } | |
8469 | } | |
8470 | } | |
8471 | // correction terms for nua: | |
8472 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
8473 | { | |
8474 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8475 | { | |
8476 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8477 | { | |
8478 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8479 | { | |
8480 | 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]); | |
8481 | fDiffFlowCorrectionsHistList[t][pe]->Add(fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]); | |
8482 | } | |
8483 | } | |
8484 | } | |
8485 | } | |
8486 | ||
8487 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForDifferentialFlow() | |
8488 | ||
8489 | ||
8490 | //================================================================================================================================ | |
8491 | ||
8492 | /* | |
8493 | void AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNUAForIntQcumulants() // to be improved (do I really need this method?) | |
8494 | { | |
8495 | // Calculate final corrections for non-uniform acceptance for Q-cumulants. | |
8496 | ||
8497 | // Corrections for non-uniform acceptance are stored in histogram fCorrectionsForNUA, | |
8498 | // binning of fCorrectionsForNUA is organized as follows: | |
8499 | // | |
8500 | // 1st bin: correction to QC{2} | |
8501 | // 2nd bin: correction to QC{4} | |
8502 | // 3rd bin: correction to QC{6} | |
8503 | // 4th bin: correction to QC{8} | |
8504 | ||
8505 | // shortcuts flags: | |
8506 | Int_t pW = (Int_t)(useParticleWeights); | |
8507 | ||
8508 | Int_t eW = -1; | |
8509 | ||
8510 | if(eventWeights == "exact") | |
8511 | { | |
8512 | eW = 0; | |
8513 | } | |
8514 | ||
8515 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms flag | |
8516 | { | |
8517 | if(!(fQCorrelations[pW][eW] && fQCorrections[pW][eW][sc] && fCorrections[pW][eW])) | |
8518 | { | |
8519 | cout<<"WARNING: fQCorrelations[pW][eW] && fQCorrections[pW][eW][sc] && fCorrections[pW][eW] is NULL in AFAWQC::CFCFNUAFIF() !!!!"<<endl; | |
8520 | cout<<"pW = "<<pW<<endl; | |
8521 | cout<<"eW = "<<eW<<endl; | |
8522 | cout<<"sc = "<<sc<<endl; | |
8523 | exit(0); | |
8524 | } | |
8525 | } | |
8526 | ||
8527 | // measured 2-, 4-, 6- and 8-particle azimuthal correlations (biased with non-uniform acceptance!): | |
8528 | Double_t two = fQCorrelations[pW][eW]->GetBinContent(1); // <<2>> | |
8529 | //Double_t four = fQCorrelations[pW][eW]->GetBinContent(11); // <<4>> | |
8530 | //Double_t six = fQCorrelations[pW][eW]->GetBinContent(24); // <<6>> | |
8531 | //Double_t eight = fQCorrelations[pW][eW]->GetBinContent(31); // <<8>> | |
8532 | ||
8533 | // correction terms to QC{2}: | |
8534 | // <<cos(n*phi1)>>^2 | |
8535 | Double_t two1stTerm = pow(fQCorrections[pW][eW][1]->GetBinContent(1),2); | |
8536 | // <<sin(n*phi1)>>^2 | |
8537 | Double_t two2ndTerm = pow(fQCorrections[pW][eW][0]->GetBinContent(1),2); | |
8538 | // final corrections for non-uniform acceptance to QC{2}: | |
8539 | Double_t correctionQC2 = -1.*two1stTerm-1.*two2ndTerm; | |
8540 | fCorrections[pW][eW]->SetBinContent(1,correctionQC2); | |
8541 | ||
8542 | // correction terms to QC{4}: | |
8543 | // <<cos(n*phi1)>> <<cos(n*(phi1-phi2-phi3))>> | |
8544 | Double_t four1stTerm = fQCorrections[pW][eW][1]->GetBinContent(1)*fQCorrections[pW][eW][1]->GetBinContent(3); | |
8545 | // <<sin(n*phi1)>> <<sin(n*(phi1-phi2-phi3))>> | |
8546 | Double_t four2ndTerm = fQCorrections[pW][eW][0]->GetBinContent(1)*fQCorrections[pW][eW][0]->GetBinContent(3); | |
8547 | // <<cos(n*(phi1+phi2))>>^2 | |
8548 | Double_t four3rdTerm = pow(fQCorrections[pW][eW][1]->GetBinContent(2),2); | |
8549 | // <<sin(n*(phi1+phi2))>>^2 | |
8550 | Double_t four4thTerm = pow(fQCorrections[pW][eW][0]->GetBinContent(2),2); | |
8551 | // <<cos(n*(phi1+phi2))>> (<<cos(n*phi1)>>^2 - <<sin(n*phi1)>>^2) | |
8552 | Double_t four5thTerm = fQCorrections[pW][eW][1]->GetBinContent(2) | |
8553 | * (pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)-pow(fQCorrections[pW][eW][0]->GetBinContent(1),2)); | |
8554 | // <<sin(n*(phi1+phi2))>> <<cos(n*phi1)>> <<sin(n*phi1)>> | |
8555 | Double_t four6thTerm = fQCorrections[pW][eW][0]->GetBinContent(2) | |
8556 | * fQCorrections[pW][eW][1]->GetBinContent(1) | |
8557 | * fQCorrections[pW][eW][0]->GetBinContent(1); | |
8558 | // <<cos(n*(phi1-phi2))>> (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2) | |
8559 | Double_t four7thTerm = two*(pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)+pow(fQCorrections[pW][eW][0]->GetBinContent(1),2)); | |
8560 | // (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2)^2 | |
8561 | Double_t four8thTerm = pow(pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)+pow(fQCorrections[pW][eW][0]->GetBinContent(1),2),2); | |
8562 | // final correction to QC{4}: | |
8563 | Double_t correctionQC4 = -4.*four1stTerm+4.*four2ndTerm-four3rdTerm-four4thTerm | |
8564 | + 4.*four5thTerm+8.*four6thTerm+8.*four7thTerm-6.*four8thTerm; | |
8565 | fCorrections[pW][eW]->SetBinContent(2,correctionQC4); | |
8566 | ||
8567 | // ... to be improved (continued for 6th and 8th order) | |
8568 | ||
8569 | ||
8570 | } // end of AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNUAForIntQcumulants() | |
8571 | */ | |
8572 | ||
8573 | //================================================================================================================================ | |
8574 | ||
8575 | ||
8576 | void AliFlowAnalysisWithQCumulants::CalculateQcumulantsCorrectedForNUAIntFlow() | |
8577 | { | |
8578 | // Calculate generalized Q-cumulants (cumulants corrected for non-unifom acceptance). | |
8579 | ||
8580 | // measured 2-, 4-, 6- and 8-particle correlations (biased by non-uniform acceptance!): | |
8581 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
8582 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
8583 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
8584 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
8585 | ||
8586 | // statistical error of measured 2-, 4-, 6- and 8-particle correlations: | |
8587 | //Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <<2>> | |
8588 | //Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <<4>> | |
8589 | //Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <<6>> | |
8590 | //Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <<8>> | |
8591 | ||
8592 | // QC{2}: | |
8593 | // <<cos(n*phi1)>>^2 | |
8594 | Double_t two1stTerm = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2); | |
8595 | //Double_t two1stTermErrorSquared = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(1),2); | |
8596 | // <<sin(n*phi1)>>^2 | |
8597 | Double_t two2ndTerm = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2); | |
8598 | //Double_t two2ndTermErrorSquared = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(1),2); | |
8599 | // generalized QC{2}: | |
8600 | Double_t gQC2 = two - two1stTerm - two2ndTerm; // to be improved (terminology, notation) | |
8601 | fIntFlowQcumulants->SetBinContent(1,gQC2); | |
8602 | //fIntFlowQcumulants->SetBinError(1,0.); // to be improved (propagate error) | |
8603 | ||
8604 | // QC{4}: | |
8605 | // <<cos(n*phi1)>> <<cos(n*(phi1-phi2-phi3))>> | |
8606 | Double_t four1stTerm = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1) | |
8607 | * fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(3); | |
8608 | // <<sin(n*phi1)>> <<sin(n*(phi1-phi2-phi3))>> | |
8609 | Double_t four2ndTerm = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1) | |
8610 | * fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(3); | |
8611 | // <<cos(n*(phi1+phi2))>>^2 | |
8612 | Double_t four3rdTerm = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2),2); | |
8613 | // <<sin(n*(phi1+phi2))>>^2 | |
8614 | Double_t four4thTerm = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2),2); | |
8615 | // <<cos(n*(phi1+phi2))>> (<<cos(n*phi1)>>^2 - <<sin(n*phi1)>>^2) | |
8616 | Double_t four5thTerm = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2) | |
8617 | * (pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2) | |
8618 | - pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2)); | |
8619 | // <<sin(n*(phi1+phi2))>> <<cos(n*phi1)>> <<sin(n*phi1)>> | |
8620 | Double_t four6thTerm = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2) | |
8621 | * fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1) | |
8622 | * fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1); | |
8623 | // <<cos(n*(phi1-phi2))>> (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2) | |
8624 | Double_t four7thTerm = two*(pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2) | |
8625 | + pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2)); | |
8626 | // (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2)^2 | |
8627 | Double_t four8thTerm = pow(pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2) | |
8628 | + pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2),2); | |
8629 | // generalized QC{4}: | |
8630 | Double_t gQC4 = four-2.*pow(two,2.)-4.*four1stTerm+4.*four2ndTerm-four3rdTerm | |
8631 | - four4thTerm+4.*four5thTerm+8.*four6thTerm+8.*four7thTerm-6.*four8thTerm; | |
8632 | fIntFlowQcumulants->SetBinContent(2,gQC4); | |
8633 | //fIntFlowQcumulants->SetBinError(2,0.); // to be improved (propagate error) | |
8634 | ||
8635 | // ... to be improved (continued for 6th and 8th order) | |
8636 | ||
8637 | } // end of void AliFlowAnalysisWithQCumulants::CalculateQcumulantsCorrectedForNUAIntFlow() | |
8638 | ||
8639 | ||
8640 | //================================================================================================================================ | |
8641 | ||
8642 | ||
8643 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectedForNUA() | |
8644 | { | |
8645 | // Calculate integrated flow from generalized Q-cumulants (corrected for non-uniform acceptance). | |
8646 | ||
8647 | // to be improved: add protection for NULL pointers, propagate statistical errors from | |
8648 | // measured correlations and correction terms | |
8649 | ||
8650 | // generalized Q-cumulants: | |
8651 | Double_t qc2 = fIntFlowQcumulants->GetBinContent(1); // QC{2} | |
8652 | Double_t qc4 = fIntFlowQcumulants->GetBinContent(2); // QC{4} | |
8653 | //Double_t qc6 = fIntFlowQcumulants->GetBinContent(3); // QC{6} | |
8654 | //Double_t qc8 = fIntFlowQcumulants->GetBinContent(4); // QC{8} | |
8655 | ||
8656 | // integrated flow estimates: | |
8657 | Double_t v2 = 0.; // v{2,QC} | |
8658 | Double_t v4 = 0.; // v{4,QC} | |
8659 | //Double_t v6 = 0.; // v{6,QC} | |
8660 | //Double_t v8 = 0.; // v{8,QC} | |
8661 | ||
8662 | // calculate integrated flow estimates from generalized Q-cumulants: | |
8663 | if(qc2>=0.) v2 = pow(qc2,1./2.); | |
8664 | if(qc4<=0.) v4 = pow(-1.*qc4,1./4.); | |
8665 | //if(qc6>=0.) v6 = pow((1./4.)*qc6,1./6.); | |
8666 | //if(qc8<=0.) v8 = pow((-1./33.)*qc8,1./8.); | |
8667 | ||
8668 | // store integrated flow estimates from generalized Q-cumulants: | |
8669 | fIntFlow->SetBinContent(1,v2); | |
8670 | fIntFlow->SetBinContent(2,v4); | |
8671 | //fIntFlow->SetBinContent(3,v6); | |
8672 | //fIntFlow->SetBinContent(4,v8); | |
0328db2d | 8673 | |
8674 | /* | |
8675 | // propagate correctly error by including non-isotropic terms (to be improved - moved somewhere else): | |
8676 | // correlations: | |
8677 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
8678 | //Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
8679 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
8680 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
8681 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
8682 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <2> | |
8683 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <4> | |
8684 | //Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <6> | |
8685 | //Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <8> | |
8686 | // nua terms: | |
8687 | Double_t c1 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1); // <<cos(phi1)>> | |
8688 | Double_t c2 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
8689 | Double_t c3 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
8690 | Double_t s1 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1); // <<sin(phi1)>> | |
8691 | Double_t s2 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
8692 | Double_t s3 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
8693 | // statistical errors of nua terms: | |
8694 | Double_t c1Error = fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(1); // statistical error of <cos(phi1)> | |
8695 | Double_t c2Error = fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(2); // statistical error of <cos(phi1+phi2)> | |
8696 | Double_t c3Error = fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(3); // statistical error of <cos(phi1-phi2-phi3)> | |
8697 | Double_t s1Error = fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(1); // statistical error of <sin(phi1)> | |
8698 | Double_t s2Error = fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(2); // statistical error of <sin(phi1+phi2)> | |
8699 | Double_t s3Error = fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(3); // statistical error of <sin(phi1-phi2-phi3)> | |
8700 | ||
8701 | // covariances for nua: | |
8702 | Double_t wCov24 = fIntFlowCovariances->GetBinContent(1); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
8703 | Double_t wCov2c1 = fIntFlowCovariancesNUA->GetBinContent(1); | |
8704 | Double_t wCov2s1 = fIntFlowCovariancesNUA->GetBinContent(2); | |
8705 | Double_t wCovc1s1 = fIntFlowCovariancesNUA->GetBinContent(3); | |
8706 | Double_t wCov2c2 = fIntFlowCovariancesNUA->GetBinContent(4); | |
8707 | Double_t wCov2s2 = fIntFlowCovariancesNUA->GetBinContent(5); | |
8708 | Double_t wCov2c3 = fIntFlowCovariancesNUA->GetBinContent(6); | |
8709 | Double_t wCov2s3 = fIntFlowCovariancesNUA->GetBinContent(7); | |
8710 | Double_t wCov4c1 = fIntFlowCovariancesNUA->GetBinContent(8); | |
8711 | Double_t wCov4s1 = fIntFlowCovariancesNUA->GetBinContent(9); | |
8712 | Double_t wCov4c2 = fIntFlowCovariancesNUA->GetBinContent(10); | |
8713 | Double_t wCov4s2 = fIntFlowCovariancesNUA->GetBinContent(11); | |
8714 | Double_t wCov4c3 = fIntFlowCovariancesNUA->GetBinContent(12); | |
8715 | Double_t wCov4s3 = fIntFlowCovariancesNUA->GetBinContent(13); | |
8716 | Double_t wCovc1c2 = fIntFlowCovariancesNUA->GetBinContent(14); | |
8717 | Double_t wCovc1s2 = fIntFlowCovariancesNUA->GetBinContent(15); | |
8718 | Double_t wCovc1c3 = fIntFlowCovariancesNUA->GetBinContent(16); | |
8719 | Double_t wCovc1s3 = fIntFlowCovariancesNUA->GetBinContent(17); | |
8720 | Double_t wCovs1c2 = fIntFlowCovariancesNUA->GetBinContent(18); | |
8721 | Double_t wCovs1s2 = fIntFlowCovariancesNUA->GetBinContent(19); | |
8722 | Double_t wCovs1c3 = fIntFlowCovariancesNUA->GetBinContent(20); | |
8723 | Double_t wCovs1s3 = fIntFlowCovariancesNUA->GetBinContent(21); | |
8724 | Double_t wCovc2s2 = fIntFlowCovariancesNUA->GetBinContent(22); | |
8725 | Double_t wCovc2c3 = fIntFlowCovariancesNUA->GetBinContent(23); | |
8726 | Double_t wCovc2s3 = fIntFlowCovariancesNUA->GetBinContent(24); | |
8727 | Double_t wCovs2c3 = fIntFlowCovariancesNUA->GetBinContent(25); | |
8728 | Double_t wCovs2s3 = fIntFlowCovariancesNUA->GetBinContent(26); | |
8729 | Double_t wCovc3s3 = fIntFlowCovariancesNUA->GetBinContent(27); | |
8730 | */ | |
8731 | ||
8732 | /* | |
8733 | // 2nd order: | |
8734 | Double_t err2ndSquared = (1./(4.*pow(v2,2.))) | |
8735 | * (pow(twoError,2.)+4.*pow(s1*s1Error,2.)+4.*pow(c1*c1Error,2.) | |
8736 | // to be improved (add eventually also covariance terms) | |
8737 | //- 4.*c1*wCov2c1-4.*s1*wCov2s1+8.*c1*s1*wCovc1s1 | |
8738 | ); | |
8739 | if(err2ndSquared>=0.) | |
8740 | { | |
8741 | fIntFlow->SetBinError(1,pow(err2ndSquared,0.5)); // to be improved (enabled eventually) | |
8742 | } else | |
8743 | { | |
8744 | cout<<"WARNING: Statistical error of v{2,QC} (with non-isotropic terms included) is imaginary !!!! "<<endl; | |
8745 | } | |
8746 | // 4th order: | |
8747 | Double_t err4thSquared = (1./(16.*pow(v4,6.))) | |
8748 | * (pow(4.*pow(two,2.)-8.*(pow(c1,2.)+pow(s1,2.)),2.)*pow(twoError,2.) | |
8749 | + pow(fourError,2.) | |
8750 | + 16.*pow(6.*pow(c1,3.)-2.*c1*c2+c3+6.*c1*pow(s1,2.)-2.*s1*s2-4.*c1*two,2.)*pow(c1Error,2.) | |
8751 | + 16.*pow(6.*pow(c1,2.)*s1+2.*c2*s1+6.*pow(s1,3.)-2.*c1*s2-s3-4.*s1*two,2.)*pow(s1Error,2.) | |
8752 | + 4.*pow(c2-2.*(pow(c1,2.)-pow(s1,2.)),2.)*pow(c2Error,2.) | |
8753 | + 4.*pow(4*c1*s1-s2,2.)*pow(s2Error,2.) | |
8754 | + 16.*pow(c1,2.)*pow(c3Error,2.) | |
8755 | + 16.*pow(s1,2.)*pow(s3Error,2.) | |
8756 | // to be improved (add eventually also covariance terms) | |
8757 | // ... | |
8758 | ); | |
8759 | if(err4thSquared>=0.) | |
8760 | { | |
8761 | fIntFlow->SetBinError(2,pow(err4thSquared,0.5)); // to be improved (enabled eventually) | |
8762 | } else | |
8763 | { | |
8764 | cout<<"WARNING: Statistical error of v{4,QC} (with non-isotropic terms included) is imaginary !!!! "<<endl; | |
8765 | } | |
8766 | */ | |
8767 | ||
489d5531 | 8768 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectedForNUA() |
8769 | ||
8770 | ||
8771 | //================================================================================================================================ | |
8772 | ||
8773 | ||
8774 | void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUAIntFlow() | |
8775 | { | |
0328db2d | 8776 | // From profile fIntFlowCorrectionTermsForNUAPro[sc] access measured correction terms for NUA |
489d5531 | 8777 | // and their spread, correctly calculate the statistical errors and store the final |
0328db2d | 8778 | // results and statistical errors for correction terms for NUA in histogram fIntFlowCorrectionTermsForNUAHist[sc]. |
489d5531 | 8779 | // |
8780 | // Remark: Statistical error of correction temrs is calculated as: | |
8781 | // | |
8782 | // statistical error = termA * spread * termB: | |
8783 | // termA = sqrt{sum_{i=1}^{N} w^2}/(sum_{i=1}^{N} w) | |
8784 | // termB = 1/sqrt(1-termA^2) | |
8785 | ||
489d5531 | 8786 | for(Int_t sc=0;sc<2;sc++) // sin or cos correction terms |
8787 | { | |
0328db2d | 8788 | for(Int_t ci=1;ci<=3;ci++) // correction term index |
489d5531 | 8789 | { |
8790 | Double_t correction = fIntFlowCorrectionTermsForNUAPro[sc]->GetBinContent(ci); | |
0328db2d | 8791 | Double_t spread = fIntFlowCorrectionTermsForNUAPro[sc]->GetBinError(ci); |
8792 | Double_t sumOfLinearEventWeights = fIntFlowSumOfEventWeightsNUA[sc][0]->GetBinContent(ci); | |
8793 | Double_t sumOfQuadraticEventWeights = fIntFlowSumOfEventWeightsNUA[sc][1]->GetBinContent(ci); | |
8794 | Double_t termA = 0.; | |
8795 | Double_t termB = 0.; | |
8796 | if(sumOfLinearEventWeights) | |
8797 | { | |
8798 | termA = pow(sumOfQuadraticEventWeights,0.5)/sumOfLinearEventWeights; | |
8799 | } else | |
8800 | { | |
8801 | cout<<"WARNING: sumOfLinearEventWeights == 0 in AFAWQC::FCTFNIF() !!!!"<<endl; | |
8802 | cout<<" (for "<<ci<<"-th correction term)"<<endl; | |
8803 | } | |
489d5531 | 8804 | if(1.-pow(termA,2.) > 0.) |
8805 | { | |
8806 | termB = 1./pow(1-pow(termA,2.),0.5); | |
8807 | } else | |
8808 | { | |
0328db2d | 8809 | cout<<"WARNING: 1.-pow(termA,2.) <= 0 in AFAWQC::FCTFNIF() !!!!"<<endl; |
8810 | cout<<" (for "<<ci<<"-th correction term)"<<endl; | |
489d5531 | 8811 | } |
8812 | Double_t statisticalError = termA * spread * termB; | |
489d5531 | 8813 | fIntFlowCorrectionTermsForNUAHist[sc]->SetBinContent(ci,correction); |
0328db2d | 8814 | fIntFlowCorrectionTermsForNUAHist[sc]->SetBinError(ci,statisticalError); |
489d5531 | 8815 | } // end of for(Int_t ci=1;ci<=10;ci++) // correction term index |
8816 | } // end of for(Int sc=0;sc<2;sc++) // sin or cos correction terms | |
8817 | ||
8818 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUAIntFlow() | |
8819 | ||
8820 | ||
8821 | //================================================================================================================================ | |
8822 | ||
8823 | ||
8824 | void AliFlowAnalysisWithQCumulants::GetPointersForNestedLoopsHistograms() | |
8825 | { | |
8826 | // Get pointers to all objects relevant for calculations with nested loops. | |
8827 | ||
8828 | TList *nestedLoopsList = dynamic_cast<TList*>(fHistList->FindObject("Nested Loops")); | |
8829 | if(nestedLoopsList) | |
8830 | { | |
8831 | this->SetNestedLoopsList(nestedLoopsList); | |
8832 | } else | |
8833 | { | |
8834 | cout<<"WARNING: nestedLoopsList is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
8835 | exit(0); | |
8836 | } | |
8837 | ||
8838 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
8839 | TString typeFlag[2] = {"RP","POI"}; // to be improved (should I promote this to data members?) | |
8840 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; // to be improved (should I promote this to data members?) | |
8841 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; // to be improved (should I promote this to data members?) | |
8842 | ||
8843 | TString evaluateNestedLoopsName = "fEvaluateNestedLoops"; | |
8844 | evaluateNestedLoopsName += fAnalysisLabel->Data(); | |
8845 | TProfile *evaluateNestedLoops = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(evaluateNestedLoopsName.Data())); | |
8846 | Bool_t bEvaluateIntFlowNestedLoops = kFALSE; | |
8847 | Bool_t bEvaluateDiffFlowNestedLoops = kFALSE; | |
8848 | if(evaluateNestedLoops) | |
8849 | { | |
8850 | this->SetEvaluateNestedLoops(evaluateNestedLoops); | |
8851 | bEvaluateIntFlowNestedLoops = (Int_t)evaluateNestedLoops->GetBinContent(1); | |
8852 | bEvaluateDiffFlowNestedLoops = (Int_t)evaluateNestedLoops->GetBinContent(2); | |
8853 | } | |
8854 | // nested loops relevant for integrated flow: | |
8855 | if(bEvaluateIntFlowNestedLoops) | |
8856 | { | |
8857 | // correlations: | |
8858 | TString intFlowDirectCorrelationsName = "fIntFlowDirectCorrelations"; | |
8859 | intFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
8860 | TProfile *intFlowDirectCorrelations = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(intFlowDirectCorrelationsName.Data())); | |
8861 | if(intFlowDirectCorrelations) | |
8862 | { | |
8863 | this->SetIntFlowDirectCorrelations(intFlowDirectCorrelations); | |
8864 | } else | |
8865 | { | |
8866 | cout<<"WARNING: intFlowDirectCorrelations is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
8867 | exit(0); | |
8868 | } | |
8869 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
8870 | { | |
8871 | TString intFlowExtraDirectCorrelationsName = "fIntFlowExtraDirectCorrelations"; | |
8872 | intFlowExtraDirectCorrelationsName += fAnalysisLabel->Data(); | |
8873 | TProfile *intFlowExtraDirectCorrelations = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(intFlowExtraDirectCorrelationsName.Data())); | |
8874 | if(intFlowExtraDirectCorrelations) | |
8875 | { | |
8876 | this->SetIntFlowExtraDirectCorrelations(intFlowExtraDirectCorrelations); | |
8877 | } else | |
8878 | { | |
8879 | cout<<"WARNING: intFlowExtraDirectCorrelations is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
8880 | exit(0); | |
8881 | } | |
8882 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
8883 | // correction terms for non-uniform acceptance: | |
8884 | TString intFlowDirectCorrectionTermsForNUAName = "fIntFlowDirectCorrectionTermsForNUA"; | |
8885 | intFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
8886 | TProfile *intFlowDirectCorrectionTermsForNUA[2] = {NULL}; | |
8887 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
8888 | { | |
8889 | intFlowDirectCorrectionTermsForNUA[sc] = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(Form("%s: %s terms",intFlowDirectCorrectionTermsForNUAName.Data(),sinCosFlag[sc].Data()))); | |
8890 | if(intFlowDirectCorrectionTermsForNUA[sc]) | |
8891 | { | |
8892 | this->SetIntFlowDirectCorrectionTermsForNUA(intFlowDirectCorrectionTermsForNUA[sc],sc); | |
8893 | } else | |
8894 | { | |
8895 | cout<<"WARNING: intFlowDirectCorrectionTermsForNUA[sc] is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
8896 | cout<<"sc = "<<sc<<endl; | |
8897 | exit(0); | |
8898 | } | |
8899 | } // end of for(Int_t sc=0;sc<2;sc++) | |
8900 | } // end of if(bEvaluateIntFlowNestedLoops) | |
8901 | ||
8902 | // nested loops relevant for differential flow: | |
8903 | if(bEvaluateDiffFlowNestedLoops) | |
8904 | { | |
8905 | // correlations: | |
8906 | TString diffFlowDirectCorrelationsName = "fDiffFlowDirectCorrelations"; | |
8907 | diffFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
8908 | TProfile *diffFlowDirectCorrelations[2][2][4] = {{{NULL}}}; | |
8909 | for(Int_t t=0;t<2;t++) | |
8910 | { | |
8911 | for(Int_t pe=0;pe<2;pe++) | |
8912 | { | |
8913 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
8914 | { | |
8915 | 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()))); | |
8916 | if(diffFlowDirectCorrelations[t][pe][ci]) | |
8917 | { | |
8918 | this->SetDiffFlowDirectCorrelations(diffFlowDirectCorrelations[t][pe][ci],t,pe,ci); | |
8919 | } else | |
8920 | { | |
8921 | cout<<"WARNING: diffFlowDirectCorrelations[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8922 | cout<<"t = "<<t<<endl; | |
8923 | cout<<"pe = "<<pe<<endl; | |
8924 | cout<<"ci = "<<ci<<endl; | |
8925 | } | |
8926 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
8927 | } // end of for(Int_t pe=0;pe<2;pe++) | |
8928 | } // end of for(Int_t t=0;t<2;t++) | |
8929 | // correction terms for non-uniform acceptance: | |
8930 | TString diffFlowDirectCorrectionTermsForNUAName = "fDiffFlowDirectCorrectionTermsForNUA"; | |
8931 | diffFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
8932 | TProfile *diffFlowDirectCorrectionTermsForNUA[2][2][2][10] = {{{{NULL}}}}; | |
8933 | for(Int_t t=0;t<2;t++) | |
8934 | { | |
8935 | for(Int_t pe=0;pe<2;pe++) | |
8936 | { | |
8937 | // correction terms for NUA: | |
8938 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8939 | { | |
8940 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8941 | { | |
8942 | 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))); | |
8943 | if(diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]) | |
8944 | { | |
8945 | this->SetDiffFlowDirectCorrectionTermsForNUA(diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti],t,pe,sc,cti); | |
8946 | } else | |
8947 | { | |
8948 | cout<<"WARNING: diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8949 | cout<<"t = "<<t<<endl; | |
8950 | cout<<"pe = "<<pe<<endl; | |
8951 | cout<<"sc = "<<sc<<endl; | |
8952 | cout<<"cti = "<<cti<<endl; | |
8953 | } | |
8954 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
8955 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8956 | } // end of for(Int_t pe=0;pe<2;pe++) | |
8957 | } // end of for(Int_t t=0;t<2;t++) | |
8958 | // number of RPs and POIs in selected pt and eta bins for cross-checkings: | |
8959 | TString noOfParticlesInBinName = "fNoOfParticlesInBin"; | |
8960 | TH1D *noOfParticlesInBin = NULL; | |
8961 | noOfParticlesInBin = dynamic_cast<TH1D*>(nestedLoopsList->FindObject(noOfParticlesInBinName.Data())); | |
8962 | if(noOfParticlesInBin) | |
8963 | { | |
8964 | this->SetNoOfParticlesInBin(noOfParticlesInBin); | |
8965 | } else | |
8966 | { | |
8967 | cout<<endl; | |
8968 | cout<<" WARNING (QC): noOfParticlesInBin is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8969 | cout<<endl; | |
8970 | } | |
8971 | } // end of if(bEvaluateDiffFlowNestedLoops) | |
8972 | ||
8973 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForNestedLoopsHistograms() | |
8974 | ||
8975 | ||
8976 | //================================================================================================================================ | |
8977 | ||
8978 | ||
8979 | void AliFlowAnalysisWithQCumulants::StoreHarmonic() | |
8980 | { | |
8981 | // Store flow harmonic in common control histograms. | |
8982 | ||
8983 | (fCommonHists->GetHarmonic())->Fill(0.5,fHarmonic); | |
8984 | (fCommonHists2nd->GetHarmonic())->Fill(0.5,fHarmonic); | |
8985 | (fCommonHists4th->GetHarmonic())->Fill(0.5,fHarmonic); | |
8986 | (fCommonHists6th->GetHarmonic())->Fill(0.5,fHarmonic); | |
8987 | (fCommonHists8th->GetHarmonic())->Fill(0.5,fHarmonic); | |
8988 | ||
8989 | } // end of void AliFlowAnalysisWithQCumulants::StoreHarmonic() | |
8990 | ||
8991 | ||
8992 | //================================================================================================================================ | |
8993 | ||
8994 | ||
8995 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelationsUsingParticleWeights(TString type, TString ptOrEta) // type = RP or POI | |
8996 | { | |
8997 | // Calculate all correlations needed for differential flow using particle weights. | |
8998 | ||
8999 | Int_t t = -1; // type flag | |
9000 | Int_t pe = -1; // ptEta flag | |
9001 | ||
9002 | if(type == "RP") | |
9003 | { | |
9004 | t = 0; | |
9005 | } else if(type == "POI") | |
9006 | { | |
9007 | t = 1; | |
9008 | } | |
9009 | ||
9010 | if(ptOrEta == "Pt") | |
9011 | { | |
9012 | pe = 0; | |
9013 | } else if(ptOrEta == "Eta") | |
9014 | { | |
9015 | pe = 1; | |
9016 | } | |
9017 | ||
9018 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9019 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9020 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9021 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9022 | ||
9023 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
9024 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
9025 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
9026 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
9027 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
9028 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
9029 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
9030 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
9031 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
9032 | ||
9033 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
9034 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
9035 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
9036 | Double_t dSM1p3k = (*fSMpk)(0,3); | |
9037 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
9038 | Double_t dSM3p1k = (*fSMpk)(2,1); | |
9039 | ||
9040 | // looping over all bins and calculating reduced correlations: | |
9041 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9042 | { | |
9043 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
9044 | Double_t p1n0kRe = 0.; | |
9045 | Double_t p1n0kIm = 0.; | |
9046 | ||
9047 | // number of POIs in particular (pt,eta) bin): | |
9048 | Double_t mp = 0.; | |
9049 | ||
9050 | // real and imaginary parts of q_{m*n,k}: | |
9051 | // (weighted Q-vector evaluated for particles which are both RPs and POIs in particular (pt,eta) bin) | |
9052 | Double_t q1n2kRe = 0.; | |
9053 | Double_t q1n2kIm = 0.; | |
9054 | Double_t q2n1kRe = 0.; | |
9055 | Double_t q2n1kIm = 0.; | |
9056 | ||
9057 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
9058 | Double_t s1p1k = 0.; | |
9059 | Double_t s1p2k = 0.; | |
9060 | Double_t s1p3k = 0.; | |
9061 | ||
9062 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
9063 | Double_t dM0111 = 0.; | |
9064 | ||
9065 | if(type == "POI") | |
9066 | { | |
9067 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9068 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9069 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9070 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9071 | ||
9072 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9073 | ||
9074 | t = 1; // typeFlag = RP or POI | |
9075 | ||
9076 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
9077 | q1n2kRe = fReRPQ1dEBE[2][pe][0][2]->GetBinContent(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
9078 | * fReRPQ1dEBE[2][pe][0][2]->GetBinEntries(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
9079 | q1n2kIm = fImRPQ1dEBE[2][pe][0][2]->GetBinContent(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
9080 | * fImRPQ1dEBE[2][pe][0][2]->GetBinEntries(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
9081 | q2n1kRe = fReRPQ1dEBE[2][pe][1][1]->GetBinContent(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
9082 | * fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
9083 | q2n1kIm = fImRPQ1dEBE[2][pe][1][1]->GetBinContent(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
9084 | * fImRPQ1dEBE[2][pe][1][1]->GetBinEntries(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
9085 | ||
9086 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
9087 | s1p1k = pow(fs1dEBE[2][pe][1]->GetBinContent(b)*fs1dEBE[2][pe][1]->GetBinEntries(b),1.); | |
9088 | s1p2k = pow(fs1dEBE[2][pe][2]->GetBinContent(b)*fs1dEBE[2][pe][2]->GetBinEntries(b),1.); | |
9089 | s1p3k = pow(fs1dEBE[2][pe][3]->GetBinContent(b)*fs1dEBE[2][pe][3]->GetBinEntries(b),1.); | |
9090 | ||
9091 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
9092 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
9093 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
9094 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
9095 | } | |
9096 | else if(type == "RP") | |
9097 | { | |
9098 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
9099 | q1n2kRe = fReRPQ1dEBE[0][pe][0][2]->GetBinContent(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
9100 | * fReRPQ1dEBE[0][pe][0][2]->GetBinEntries(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
9101 | q1n2kIm = fImRPQ1dEBE[0][pe][0][2]->GetBinContent(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
9102 | * fImRPQ1dEBE[0][pe][0][2]->GetBinEntries(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
9103 | q2n1kRe = fReRPQ1dEBE[0][pe][1][1]->GetBinContent(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
9104 | * fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
9105 | q2n1kIm = fImRPQ1dEBE[0][pe][1][1]->GetBinContent(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
9106 | * fImRPQ1dEBE[0][pe][1][1]->GetBinEntries(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
9107 | ||
9108 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
9109 | s1p1k = pow(fs1dEBE[0][pe][1]->GetBinContent(b)*fs1dEBE[0][pe][1]->GetBinEntries(b),1.); | |
9110 | s1p2k = pow(fs1dEBE[0][pe][2]->GetBinContent(b)*fs1dEBE[0][pe][2]->GetBinEntries(b),1.); | |
9111 | s1p3k = pow(fs1dEBE[0][pe][3]->GetBinContent(b)*fs1dEBE[0][pe][3]->GetBinEntries(b),1.); | |
9112 | ||
9113 | // to be improved (cross-checked): | |
9114 | p1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9115 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9116 | p1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9117 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9118 | ||
9119 | mp = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9120 | ||
9121 | t = 0; // typeFlag = RP or POI | |
9122 | ||
9123 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
9124 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
9125 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
9126 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
9127 | //............................................................................................... | |
9128 | } | |
9129 | ||
9130 | // 2'-particle correlation: | |
9131 | Double_t two1n1nW0W1 = 0.; | |
9132 | if(mp*dSM1p1k-s1p1k) | |
9133 | { | |
9134 | two1n1nW0W1 = (p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k-s1p1k) | |
9135 | / (mp*dSM1p1k-s1p1k); | |
9136 | ||
9137 | // fill profile to get <<2'>> | |
9138 | fDiffFlowCorrelationsPro[t][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nW0W1,mp*dSM1p1k-s1p1k); | |
9139 | // histogram to store <2'> e-b-e (needed in some other methods): | |
9140 | fDiffFlowCorrelationsEBE[t][pe][0]->SetBinContent(b,two1n1nW0W1); | |
9141 | fDiffFlowEventWeightsForCorrelationsEBE[t][pe][0]->SetBinContent(b,mp*dSM1p1k-s1p1k); | |
9142 | } // end of if(mp*dSM1p1k-s1p1k) | |
9143 | ||
9144 | // 4'-particle correlation: | |
9145 | Double_t four1n1n1n1nW0W1W1W1 = 0.; | |
9146 | if(dM0111) | |
9147 | { | |
9148 | four1n1n1n1nW0W1W1W1 = ((pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
9149 | - q2n1kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.)) | |
9150 | - 2.*q2n1kIm*dReQ1n1k*dImQ1n1k | |
9151 | - p1n0kRe*(dReQ1n1k*dReQ2n2k+dImQ1n1k*dImQ2n2k) | |
9152 | + p1n0kIm*(dImQ1n1k*dReQ2n2k-dReQ1n1k*dImQ2n2k) | |
9153 | - 2.*dSM1p2k*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
9154 | - 2.*(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*s1p1k | |
9155 | + 6.*(q1n2kRe*dReQ1n1k+q1n2kIm*dImQ1n1k) | |
9156 | + 1.*(q2n1kRe*dReQ2n2k+q2n1kIm*dImQ2n2k) | |
9157 | + 2.*(p1n0kRe*dReQ1n3k+p1n0kIm*dImQ1n3k) | |
9158 | + 2.*s1p1k*dSM1p2k | |
9159 | - 6.*s1p3k) | |
9160 | / dM0111; // to be improved (notation of dM0111) | |
9161 | ||
9162 | // fill profile to get <<4'>> | |
9163 | fDiffFlowCorrelationsPro[t][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nW0W1W1W1,dM0111); | |
9164 | // histogram to store <4'> e-b-e (needed in some other methods): | |
9165 | fDiffFlowCorrelationsEBE[t][pe][1]->SetBinContent(b,four1n1n1n1nW0W1W1W1); | |
9166 | fDiffFlowEventWeightsForCorrelationsEBE[t][pe][1]->SetBinContent(b,dM0111); | |
9167 | } // end of if(dM0111) | |
9168 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9169 | ||
9170 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelationsUsingParticleWeights(TString type, TString ptOrEta); // type = RP or POI | |
9171 | ||
9172 | ||
9173 | //================================================================================================================================ | |
9174 | ||
9175 | ||
9176 | void AliFlowAnalysisWithQCumulants::FillCommonControlHistograms(AliFlowEventSimple *anEvent) | |
9177 | { | |
9178 | // Fill common control histograms. | |
9179 | ||
9180 | Int_t nRP = anEvent->GetEventNSelTracksRP(); // number of RPs (i.e. number of particles used to determine the reaction plane) | |
9181 | fCommonHists->FillControlHistograms(anEvent); | |
9182 | if(nRP>1) | |
9183 | { | |
9184 | fCommonHists2nd->FillControlHistograms(anEvent); | |
9185 | if(nRP>3) | |
9186 | { | |
9187 | fCommonHists4th->FillControlHistograms(anEvent); | |
9188 | if(nRP>5) | |
9189 | { | |
9190 | fCommonHists6th->FillControlHistograms(anEvent); | |
9191 | if(nRP>7) | |
9192 | { | |
9193 | fCommonHists8th->FillControlHistograms(anEvent); | |
9194 | } // end of if(nRP>7) | |
9195 | } // end of if(nRP>5) | |
9196 | } // end of if(nRP>3) | |
9197 | } // end of if(nRP>1) | |
9198 | ||
9199 | } // end of void AliFlowAnalysisWithQCumulants::FillCommonControlHistograms(AliFlowEventSimple *anEvent) | |
9200 | ||
9201 | ||
9202 | //================================================================================================================================ | |
9203 | ||
9204 | ||
9205 | void AliFlowAnalysisWithQCumulants::ResetEventByEventQuantities() | |
9206 | { | |
9207 | // Reset all event by event quantities. | |
9208 | ||
9209 | // integrated flow: | |
9210 | fReQ->Zero(); | |
9211 | fImQ->Zero(); | |
9212 | fSMpk->Zero(); | |
9213 | fIntFlowCorrelationsEBE->Reset(); | |
9214 | fIntFlowEventWeightsForCorrelationsEBE->Reset(); | |
9215 | fIntFlowCorrelationsAllEBE->Reset(); | |
9216 | ||
9217 | if(fApplyCorrectionForNUA) | |
9218 | { | |
9219 | for(Int_t sc=0;sc<2;sc++) | |
9220 | { | |
9221 | fIntFlowCorrectionTermsForNUAEBE[sc]->Reset(); | |
0328db2d | 9222 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc]->Reset(); |
489d5531 | 9223 | } |
9224 | } | |
9225 | ||
9226 | // differential flow: | |
9227 | // 1D: | |
9228 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
9229 | { | |
9230 | for(Int_t pe=0;pe<2;pe++) // 1D in pt or eta | |
9231 | { | |
9232 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
9233 | { | |
9234 | for(Int_t k=0;k<9;k++) // power of weight | |
9235 | { | |
9236 | if(fReRPQ1dEBE[t][pe][m][k]) fReRPQ1dEBE[t][pe][m][k]->Reset(); | |
9237 | if(fImRPQ1dEBE[t][pe][m][k]) fImRPQ1dEBE[t][pe][m][k]->Reset(); | |
9238 | } | |
9239 | } | |
9240 | } | |
9241 | } | |
9242 | ||
9243 | for(Int_t t=0;t<3;t++) // type (0 = RP, 1 = POI, 2 = RP&&POI ) | |
9244 | { | |
9245 | for(Int_t pe=0;pe<2;pe++) // 1D in pt or eta | |
9246 | { | |
9247 | for(Int_t k=0;k<9;k++) | |
9248 | { | |
9249 | if(fs1dEBE[t][pe][k]) fs1dEBE[t][pe][k]->Reset(); | |
9250 | } | |
9251 | } | |
9252 | } | |
9253 | ||
9254 | // e-b-e reduced correlations: | |
9255 | for(Int_t t=0;t<2;t++) // type (0 = RP, 1 = POI) | |
9256 | { | |
9257 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
9258 | { | |
9259 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
9260 | { | |
9261 | if(fDiffFlowCorrelationsEBE[t][pe][rci]) fDiffFlowCorrelationsEBE[t][pe][rci]->Reset(); | |
9262 | if(fDiffFlowEventWeightsForCorrelationsEBE[t][pe][rci]) fDiffFlowEventWeightsForCorrelationsEBE[t][pe][rci]->Reset(); | |
9263 | } | |
9264 | } | |
9265 | } | |
9266 | ||
9267 | // correction terms for NUA: | |
9268 | for(Int_t t=0;t<2;t++) // type (0 = RP, 1 = POI) | |
9269 | { | |
9270 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
9271 | { | |
9272 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9273 | { | |
9274 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
9275 | { | |
9276 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti]->Reset(); | |
9277 | } | |
9278 | } | |
9279 | } | |
9280 | } | |
9281 | ||
9282 | // 2D (pt,eta) | |
9283 | if(fCalculate2DFlow) | |
9284 | { | |
9285 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
9286 | { | |
9287 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
9288 | { | |
9289 | for(Int_t k=0;k<9;k++) // power of weight | |
9290 | { | |
9291 | if(fReRPQ2dEBE[t][m][k]) fReRPQ2dEBE[t][m][k]->Reset(); | |
9292 | if(fImRPQ2dEBE[t][m][k]) fImRPQ2dEBE[t][m][k]->Reset(); | |
9293 | } | |
9294 | } | |
9295 | } | |
9296 | for(Int_t t=0;t<3;t++) // type (0 = RP, 1 = POI, 2 = RP&&POI ) | |
9297 | { | |
9298 | for(Int_t k=0;k<9;k++) | |
9299 | { | |
9300 | if(fs2dEBE[t][k]) fs2dEBE[t][k]->Reset(); | |
9301 | } | |
9302 | } | |
9303 | } // end of if(fCalculate2DFlow) | |
9304 | ||
9305 | } // end of void AliFlowAnalysisWithQCumulants::ResetEventByEventQuantities(); | |
9306 | ||
9307 | ||
9308 | //================================================================================================================================ | |
9309 | ||
9310 | ||
9311 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTerms(TString type, TString ptOrEta) | |
9312 | { | |
9313 | // Calculate correction terms for non-uniform acceptance for differential flow (sin terms). | |
9314 | ||
9315 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][0][cti], where cti runs as follows: | |
9316 | // 0: <<sin n(psi1)>> | |
9317 | // 1: <<sin n(psi1+phi2)>> | |
9318 | // 2: <<sin n(psi1+phi2-phi3)>> | |
9319 | // 3: <<sin n(psi1-phi2-phi3)>>: | |
9320 | // 4: | |
9321 | // 5: | |
9322 | // 6: | |
9323 | ||
9324 | // multiplicity: | |
9325 | Double_t dMult = (*fSMpk)(0,0); | |
9326 | ||
9327 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
9328 | Double_t dReQ1n = (*fReQ)(0,0); | |
9329 | Double_t dReQ2n = (*fReQ)(1,0); | |
9330 | //Double_t dReQ3n = (*fReQ)(2,0); | |
9331 | //Double_t dReQ4n = (*fReQ)(3,0); | |
9332 | Double_t dImQ1n = (*fImQ)(0,0); | |
9333 | Double_t dImQ2n = (*fImQ)(1,0); | |
9334 | //Double_t dImQ3n = (*fImQ)(2,0); | |
9335 | //Double_t dImQ4n = (*fImQ)(3,0); | |
9336 | ||
9337 | Int_t t = -1; // type flag | |
9338 | Int_t pe = -1; // ptEta flag | |
9339 | ||
9340 | if(type == "RP") | |
9341 | { | |
9342 | t = 0; | |
9343 | } else if(type == "POI") | |
9344 | { | |
9345 | t = 1; | |
9346 | } | |
9347 | ||
9348 | if(ptOrEta == "Pt") | |
9349 | { | |
9350 | pe = 0; | |
9351 | } else if(ptOrEta == "Eta") | |
9352 | { | |
9353 | pe = 1; | |
9354 | } | |
9355 | ||
9356 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9357 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9358 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9359 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9360 | ||
9361 | // looping over all bins and calculating correction terms: | |
9362 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9363 | { | |
9364 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
9365 | Double_t p1n0kRe = 0.; | |
9366 | Double_t p1n0kIm = 0.; | |
9367 | ||
9368 | // number of POIs in particular pt or eta bin: | |
9369 | Double_t mp = 0.; | |
9370 | ||
9371 | // 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): | |
9372 | Double_t q1n0kRe = 0.; | |
9373 | Double_t q1n0kIm = 0.; | |
9374 | Double_t q2n0kRe = 0.; | |
9375 | Double_t q2n0kIm = 0.; | |
9376 | ||
9377 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
9378 | Double_t mq = 0.; | |
9379 | ||
9380 | if(type == "POI") | |
9381 | { | |
9382 | // q_{m*n,0}: | |
9383 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9384 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9385 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9386 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9387 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9388 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9389 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9390 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9391 | ||
9392 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9393 | } | |
9394 | else if(type == "RP") | |
9395 | { | |
9396 | // q_{m*n,0}: | |
9397 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9398 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9399 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9400 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9401 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9402 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9403 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9404 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9405 | ||
9406 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9407 | } | |
9408 | if(type == "POI") | |
9409 | { | |
9410 | // p_{m*n,0}: | |
9411 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9412 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9413 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9414 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9415 | ||
9416 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9417 | ||
9418 | t = 1; // typeFlag = RP or POI | |
9419 | } | |
9420 | else if(type == "RP") | |
9421 | { | |
9422 | // p_{m*n,0} = q_{m*n,0}: | |
9423 | p1n0kRe = q1n0kRe; | |
9424 | p1n0kIm = q1n0kIm; | |
9425 | ||
9426 | mp = mq; | |
9427 | ||
9428 | t = 0; // typeFlag = RP or POI | |
9429 | } | |
9430 | ||
9431 | // <<sin n(psi1)>>: | |
9432 | Double_t sinP1nPsi = 0.; | |
9433 | if(mp) | |
9434 | { | |
9435 | sinP1nPsi = p1n0kIm/mp; | |
9436 | // fill profile for <<sin n(psi1)>>: | |
9437 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi,mp); | |
9438 | // histogram to store <sin n(psi1)> e-b-e (needed in some other methods): | |
9439 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][0]->SetBinContent(b,sinP1nPsi); | |
9440 | } // end of if(mp) | |
9441 | ||
9442 | // <<sin n(psi1+phi2)>>: | |
9443 | Double_t sinP1nPsiP1nPhi = 0.; | |
9444 | if(mp*dMult-mq) | |
9445 | { | |
9446 | sinP1nPsiP1nPhi = (p1n0kRe*dImQ1n+p1n0kIm*dReQ1n-q2n0kIm)/(mp*dMult-mq); | |
9447 | // fill profile for <<sin n(psi1+phi2)>>: | |
9448 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsiP1nPhi,mp*dMult-mq); | |
9449 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9450 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][1]->SetBinContent(b,sinP1nPsiP1nPhi); | |
9451 | } // end of if(mp*dMult-mq) | |
9452 | ||
9453 | // <<sin n(psi1+phi2-phi3)>>: | |
9454 | Double_t sinP1nPsi1P1nPhi2MPhi3 = 0.; | |
9455 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9456 | { | |
9457 | sinP1nPsi1P1nPhi2MPhi3 = (p1n0kIm*(pow(dImQ1n,2.)+pow(dReQ1n,2.)-dMult) | |
9458 | - 1.*(q2n0kIm*dReQ1n-q2n0kRe*dImQ1n) | |
9459 | - mq*dImQ1n+2.*q1n0kIm) | |
9460 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9461 | // fill profile for <<sin n(psi1+phi2)>>: | |
9462 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1P1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9463 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9464 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][2]->SetBinContent(b,sinP1nPsi1P1nPhi2MPhi3); | |
9465 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9466 | ||
9467 | // <<sin n(psi1-phi2-phi3)>>: | |
9468 | Double_t sinP1nPsi1M1nPhi2MPhi3 = 0.; | |
9469 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9470 | { | |
9471 | sinP1nPsi1M1nPhi2MPhi3 = (p1n0kIm*(pow(dReQ1n,2.)-pow(dImQ1n,2.))-2.*p1n0kRe*dReQ1n*dImQ1n | |
9472 | - 1.*(p1n0kIm*dReQ2n-p1n0kRe*dImQ2n) | |
9473 | + 2.*mq*dImQ1n-2.*q1n0kIm) | |
9474 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9475 | // fill profile for <<sin n(psi1+phi2)>>: | |
9476 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1M1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9477 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9478 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][3]->SetBinContent(b,sinP1nPsi1M1nPhi2MPhi3); | |
9479 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9480 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9481 | ||
9482 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTerms(TString type, TString ptOrEta) | |
9483 | ||
9484 | ||
9485 | //================================================================================================================================ | |
9486 | ||
9487 | ||
9488 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTerms(TString type, TString ptOrEta) | |
9489 | { | |
9490 | // Calculate correction terms for non-uniform acceptance for differential flow (cos terms). | |
9491 | ||
9492 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][1][cti], where cti runs as follows: | |
9493 | // 0: <<cos n(psi)>> | |
9494 | // 1: <<cos n(psi1+phi2)>> | |
9495 | // 2: <<cos n(psi1+phi2-phi3)>> | |
9496 | // 3: <<cos n(psi1-phi2-phi3)>> | |
9497 | // 4: | |
9498 | // 5: | |
9499 | // 6: | |
9500 | ||
9501 | // multiplicity: | |
9502 | Double_t dMult = (*fSMpk)(0,0); | |
9503 | ||
9504 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
9505 | Double_t dReQ1n = (*fReQ)(0,0); | |
9506 | Double_t dReQ2n = (*fReQ)(1,0); | |
9507 | //Double_t dReQ3n = (*fReQ)(2,0); | |
9508 | //Double_t dReQ4n = (*fReQ)(3,0); | |
9509 | Double_t dImQ1n = (*fImQ)(0,0); | |
9510 | Double_t dImQ2n = (*fImQ)(1,0); | |
9511 | //Double_t dImQ3n = (*fImQ)(2,0); | |
9512 | //Double_t dImQ4n = (*fImQ)(3,0); | |
9513 | ||
9514 | Int_t t = -1; // type flag | |
9515 | Int_t pe = -1; // ptEta flag | |
9516 | ||
9517 | if(type == "RP") | |
9518 | { | |
9519 | t = 0; | |
9520 | } else if(type == "POI") | |
9521 | { | |
9522 | t = 1; | |
9523 | } | |
9524 | ||
9525 | if(ptOrEta == "Pt") | |
9526 | { | |
9527 | pe = 0; | |
9528 | } else if(ptOrEta == "Eta") | |
9529 | { | |
9530 | pe = 1; | |
9531 | } | |
9532 | ||
9533 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9534 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9535 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9536 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9537 | ||
9538 | // looping over all bins and calculating correction terms: | |
9539 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9540 | { | |
9541 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
9542 | Double_t p1n0kRe = 0.; | |
9543 | Double_t p1n0kIm = 0.; | |
9544 | ||
9545 | // number of POIs in particular pt or eta bin: | |
9546 | Double_t mp = 0.; | |
9547 | ||
9548 | // 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): | |
9549 | Double_t q1n0kRe = 0.; | |
9550 | Double_t q1n0kIm = 0.; | |
9551 | Double_t q2n0kRe = 0.; | |
9552 | Double_t q2n0kIm = 0.; | |
9553 | ||
9554 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
9555 | Double_t mq = 0.; | |
9556 | ||
9557 | if(type == "POI") | |
9558 | { | |
9559 | // q_{m*n,0}: | |
9560 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9561 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9562 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9563 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9564 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9565 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9566 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9567 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9568 | ||
9569 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9570 | } | |
9571 | else if(type == "RP") | |
9572 | { | |
9573 | // q_{m*n,0}: | |
9574 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9575 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9576 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9577 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9578 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9579 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9580 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9581 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9582 | ||
9583 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9584 | } | |
9585 | if(type == "POI") | |
9586 | { | |
9587 | // p_{m*n,0}: | |
9588 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9589 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9590 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9591 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9592 | ||
9593 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9594 | ||
9595 | t = 1; // typeFlag = RP or POI | |
9596 | } | |
9597 | else if(type == "RP") | |
9598 | { | |
9599 | // p_{m*n,0} = q_{m*n,0}: | |
9600 | p1n0kRe = q1n0kRe; | |
9601 | p1n0kIm = q1n0kIm; | |
9602 | ||
9603 | mp = mq; | |
9604 | ||
9605 | t = 0; // typeFlag = RP or POI | |
9606 | } | |
9607 | ||
9608 | // <<cos n(psi1)>>: | |
9609 | Double_t cosP1nPsi = 0.; | |
9610 | if(mp) | |
9611 | { | |
9612 | cosP1nPsi = p1n0kRe/mp; | |
9613 | ||
9614 | // fill profile for <<cos n(psi1)>>: | |
9615 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi,mp); | |
9616 | // histogram to store <cos n(psi1)> e-b-e (needed in some other methods): | |
9617 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][0]->SetBinContent(b,cosP1nPsi); | |
9618 | } // end of if(mp) | |
9619 | ||
9620 | // <<cos n(psi1+phi2)>>: | |
9621 | Double_t cosP1nPsiP1nPhi = 0.; | |
9622 | if(mp*dMult-mq) | |
9623 | { | |
9624 | cosP1nPsiP1nPhi = (p1n0kRe*dReQ1n-p1n0kIm*dImQ1n-q2n0kRe)/(mp*dMult-mq); | |
9625 | // fill profile for <<sin n(psi1+phi2)>>: | |
9626 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsiP1nPhi,mp*dMult-mq); | |
9627 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9628 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][1]->SetBinContent(b,cosP1nPsiP1nPhi); | |
9629 | } // end of if(mp*dMult-mq) | |
9630 | ||
9631 | // <<cos n(psi1+phi2-phi3)>>: | |
9632 | Double_t cosP1nPsi1P1nPhi2MPhi3 = 0.; | |
9633 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9634 | { | |
9635 | cosP1nPsi1P1nPhi2MPhi3 = (p1n0kRe*(pow(dImQ1n,2.)+pow(dReQ1n,2.)-dMult) | |
9636 | - 1.*(q2n0kRe*dReQ1n+q2n0kIm*dImQ1n) | |
9637 | - mq*dReQ1n+2.*q1n0kRe) | |
9638 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9639 | // fill profile for <<sin n(psi1+phi2)>>: | |
9640 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1P1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9641 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9642 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][2]->SetBinContent(b,cosP1nPsi1P1nPhi2MPhi3); | |
9643 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9644 | ||
9645 | // <<cos n(psi1-phi2-phi3)>>: | |
9646 | Double_t cosP1nPsi1M1nPhi2MPhi3 = 0.; | |
9647 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9648 | { | |
9649 | cosP1nPsi1M1nPhi2MPhi3 = (p1n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.))+2.*p1n0kIm*dReQ1n*dImQ1n | |
9650 | - 1.*(p1n0kRe*dReQ2n+p1n0kIm*dImQ2n) | |
9651 | - 2.*mq*dReQ1n+2.*q1n0kRe) | |
9652 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9653 | // fill profile for <<sin n(psi1+phi2)>>: | |
9654 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1M1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9655 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9656 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][3]->SetBinContent(b,cosP1nPsi1M1nPhi2MPhi3); | |
9657 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9658 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9659 | ||
9660 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTerms(TString type, TString ptOrEta) | |
9661 | ||
9662 | ||
9663 | //================================================================================================================================== | |
9664 | ||
9665 | ||
9666 | void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUADiffFlow(TString type, TString ptOrEta) | |
9667 | { | |
9668 | // Transfer prolfiles into histogams and correctly propagate the error (to be improved: description) | |
9669 | ||
9670 | // to be improved: debugged - I do not correctly transfer all profiles into histos (bug appears only after merging) | |
9671 | ||
9672 | Int_t t = -1; // type flag | |
9673 | Int_t pe = -1; // ptEta flag | |
9674 | ||
9675 | if(type == "RP") | |
9676 | { | |
9677 | t = 0; | |
9678 | } else if(type == "POI") | |
9679 | { | |
9680 | t = 1; | |
9681 | } | |
9682 | ||
9683 | if(ptOrEta == "Pt") | |
9684 | { | |
9685 | pe = 0; | |
9686 | } else if(ptOrEta == "Eta") | |
9687 | { | |
9688 | pe = 1; | |
9689 | } | |
9690 | ||
9691 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9692 | //Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9693 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9694 | //Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9695 | ||
9696 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9697 | { | |
9698 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
9699 | { | |
9700 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9701 | { | |
9702 | Double_t correctionTerm = fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]->GetBinContent(b); | |
9703 | fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]->SetBinContent(b,correctionTerm); | |
9704 | // to be improved (propagate error correctly) | |
9705 | // ... | |
9706 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9707 | } // correction term index | |
9708 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9709 | ||
9710 | }// end of void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUADiffFlow(TString type, TString ptOrEta) | |
9711 | ||
9712 | ||
9713 | //================================================================================================================================== | |
9714 | ||
9715 | ||
9716 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulantsCorrectedForNUA(TString type, TString ptOrEta) | |
9717 | { | |
9718 | // Calculate generalized differential flow Q-cumulants (corrected for non-uniform acceptance) | |
9719 | ||
9720 | Int_t typeFlag = -1; | |
9721 | Int_t ptEtaFlag = -1; | |
9722 | ||
9723 | if(type == "RP") | |
9724 | { | |
9725 | typeFlag = 0; | |
9726 | } else if(type == "POI") | |
9727 | { | |
9728 | typeFlag = 1; | |
9729 | } | |
9730 | ||
9731 | if(ptOrEta == "Pt") | |
9732 | { | |
9733 | ptEtaFlag = 0; | |
9734 | } else if(ptOrEta == "Eta") | |
9735 | { | |
9736 | ptEtaFlag = 1; | |
9737 | } | |
9738 | ||
9739 | // shortcuts: | |
9740 | Int_t t = typeFlag; | |
9741 | Int_t pe = ptEtaFlag; | |
9742 | ||
9743 | // common: | |
9744 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9745 | ||
9746 | // 2-particle correlation: | |
9747 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
9748 | // sin term coming from integrated flow: | |
9749 | Double_t sinP1nPhi = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1); // <<sin(n*phi1)>> | |
9750 | Double_t sinP1nPhi1P1nPhi2 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2); // <<sin(n*(phi1+phi2))>> | |
9751 | Double_t sinP1nPhi1M1nPhi2M1nPhi3 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(3); // <<sin(n*(phi1-phi2-phi3))>> | |
9752 | // cos term coming from integrated flow: | |
9753 | Double_t cosP1nPhi = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1); // <<cos(n*phi1)>> | |
9754 | Double_t cosP1nPhi1P1nPhi2 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2); // <<cos(n*(phi1+phi2))>> | |
9755 | Double_t cosP1nPhi1M1nPhi2M1nPhi3 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(3); // <<cos(n*(phi1-phi2-phi3))>> | |
9756 | ||
9757 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9758 | { | |
9759 | Double_t twoPrime = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); // <<2'>> | |
9760 | Double_t fourPrime = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); // <<4'>> | |
9761 | Double_t sinP1nPsi = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][0]->GetBinContent(b); // <<sin n(Psi)>> | |
9762 | Double_t cosP1nPsi = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][0]->GetBinContent(b); // <<cos n(Psi)>> | |
9763 | Double_t sinP1nPsi1P1nPhi2 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][1]->GetBinContent(b); // <<sin n(psi1+phi2)>> | |
9764 | Double_t cosP1nPsi1P1nPhi2 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][1]->GetBinContent(b); // <<cos n(psi1+phi2)>> | |
9765 | Double_t sinP1nPsi1P1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][2]->GetBinContent(b); // <<sin n(psi1+phi2-phi3)>> | |
9766 | Double_t cosP1nPsi1P1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][2]->GetBinContent(b); // <<cos n(psi1+phi2-phi3)>> | |
9767 | Double_t sinP1nPsi1M1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][3]->GetBinContent(b); // <<sin n(psi1-phi2-phi3)>> | |
9768 | Double_t cosP1nPsi1M1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][3]->GetBinContent(b); // <<cos n(psi1-phi2-phi3)>> | |
9769 | // generalized QC{2'}: | |
9770 | Double_t qc2Prime = twoPrime - sinP1nPsi*sinP1nPhi - cosP1nPsi*cosP1nPhi; | |
9771 | fDiffFlowCumulants[t][pe][0]->SetBinContent(b,qc2Prime); | |
9772 | // generalized QC{4'}: | |
9773 | Double_t qc4Prime = fourPrime-2.*twoPrime*two | |
9774 | - cosP1nPsi*cosP1nPhi1M1nPhi2M1nPhi3 | |
9775 | + sinP1nPsi*sinP1nPhi1M1nPhi2M1nPhi3 | |
9776 | - cosP1nPhi*cosP1nPsi1M1nPhi2M1nPhi3 | |
9777 | + sinP1nPhi*sinP1nPsi1M1nPhi2M1nPhi3 | |
9778 | - 2.*cosP1nPhi*cosP1nPsi1P1nPhi2M1nPhi3 | |
9779 | - 2.*sinP1nPhi*sinP1nPsi1P1nPhi2M1nPhi3 | |
9780 | - cosP1nPsi1P1nPhi2*cosP1nPhi1P1nPhi2 | |
9781 | - sinP1nPsi1P1nPhi2*sinP1nPhi1P1nPhi2 | |
9782 | + 2.*cosP1nPhi1P1nPhi2*(cosP1nPsi*cosP1nPhi-sinP1nPsi*sinP1nPhi) | |
9783 | + 2.*sinP1nPhi1P1nPhi2*(cosP1nPsi*sinP1nPhi+sinP1nPsi*cosP1nPhi) | |
9784 | + 4.*two*(cosP1nPsi*cosP1nPhi+sinP1nPsi*sinP1nPhi) | |
9785 | + 2.*cosP1nPsi1P1nPhi2*(pow(cosP1nPhi,2.)-pow(sinP1nPhi,2.)) | |
9786 | + 4.*sinP1nPsi1P1nPhi2*cosP1nPhi*sinP1nPhi | |
9787 | + 4.*twoPrime*(pow(cosP1nPhi,2.)+pow(sinP1nPhi,2.)) | |
9788 | - 6.*(pow(cosP1nPhi,2.)-pow(sinP1nPhi,2.)) | |
9789 | * (cosP1nPsi*cosP1nPhi-sinP1nPsi*sinP1nPhi) | |
9790 | - 12.*cosP1nPhi*sinP1nPhi | |
9791 | * (sinP1nPsi*cosP1nPhi+cosP1nPsi*sinP1nPhi); | |
9792 | fDiffFlowCumulants[t][pe][1]->SetBinContent(b,qc4Prime); | |
9793 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
9794 | ||
9795 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulantsCorrectedForNUA(TString type, TString ptOrEta) | |
9796 | ||
9797 | ||
9798 | //================================================================================================================================== | |
9799 | ||
9800 | ||
9801 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectedForNUA(TString type, TString ptOrEta) | |
9802 | { | |
9803 | // Calculate differential flow corrected for non-uniform acceptance. | |
9804 | ||
9805 | // to be improved (rewritten completely) | |
9806 | ||
9807 | Int_t typeFlag = -1; | |
9808 | Int_t ptEtaFlag = -1; | |
9809 | ||
9810 | if(type == "RP") | |
9811 | { | |
9812 | typeFlag = 0; | |
9813 | } else if(type == "POI") | |
9814 | { | |
9815 | typeFlag = 1; | |
9816 | } | |
9817 | ||
9818 | if(ptOrEta == "Pt") | |
9819 | { | |
9820 | ptEtaFlag = 0; | |
9821 | } else if(ptOrEta == "Eta") | |
9822 | { | |
9823 | ptEtaFlag = 1; | |
9824 | } | |
9825 | ||
9826 | // shortcuts: | |
9827 | Int_t t = typeFlag; | |
9828 | Int_t pe = ptEtaFlag; | |
9829 | ||
9830 | // common: | |
9831 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9832 | ||
9833 | // to be improved: access here generalized QC{2} and QC{4} instead: | |
9834 | Double_t dV2 = fIntFlow->GetBinContent(1); | |
9835 | Double_t dV4 = fIntFlow->GetBinContent(2); | |
9836 | ||
9837 | // loop over pt or eta bins: | |
9838 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9839 | { | |
9840 | // generalized QC{2'}: | |
9841 | Double_t gQC2Prime = fDiffFlowCumulants[t][pe][0]->GetBinContent(b); | |
9842 | // v'{2}: | |
9843 | if(dV2>0) | |
9844 | { | |
9845 | Double_t v2Prime = gQC2Prime/dV2; | |
9846 | fDiffFlow[t][pe][0]->SetBinContent(b,v2Prime); | |
9847 | } | |
9848 | // generalized QC{4'}: | |
9849 | Double_t gQC4Prime = fDiffFlowCumulants[t][pe][1]->GetBinContent(b); | |
9850 | // v'{4}: | |
9851 | if(dV4>0) | |
9852 | { | |
9853 | Double_t v4Prime = -gQC4Prime/pow(dV4,3.); | |
9854 | fDiffFlow[t][pe][1]->SetBinContent(b,v4Prime); | |
9855 | } | |
9856 | } // end of for(Int_t b=1;b<=fnBinsPtEta[pe];b++) | |
9857 | ||
9858 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectedForNUA(TString type, TString ptOrEta); | |
9859 | ||
9860 | ||
9861 | //================================================================================================================================== | |
9862 | ||
9863 | ||
0328db2d | 9864 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoops(AliFlowEventSimple * const anEvent) |
489d5531 | 9865 | { |
9866 | // Evaluate with nested loops multiparticle correlations for integrated flow (without using the particle weights). | |
9867 | ||
9868 | // Remark: Results are stored in profile fIntFlowDirectCorrelations whose binning is organized as follows: | |
9869 | // | |
9870 | // 1st bin: <2>_{1n|1n} = two1n1n = cos(n*(phi1-phi2))> | |
9871 | // 2nd bin: <2>_{2n|2n} = two2n2n = cos(2n*(phi1-phi2))> | |
9872 | // 3rd bin: <2>_{3n|3n} = two3n3n = cos(3n*(phi1-phi2))> | |
9873 | // 4th bin: <2>_{4n|4n} = two4n4n = cos(4n*(phi1-phi2))> | |
9874 | // 5th bin: ---- EMPTY ---- | |
9875 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1n = <cos(n*(2.*phi1-phi2-phi3))> | |
9876 | // 7th bin: <3>_{3n|2n,1n} = three3n2n1n = <cos(n*(3.*phi1-2.*phi2-phi3))> | |
9877 | // 8th bin: <3>_{4n|2n,2n} = three4n2n2n = <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
9878 | // 9th bin: <3>_{4n|3n,1n} = three4n3n1n = <cos(n*(4.*phi1-3.*phi2-phi3))> | |
9879 | // 10th bin: ---- EMPTY ---- | |
9880 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1n = <cos(n*(phi1+phi2-phi3-phi4))> | |
9881 | // 12th bin: <4>_{2n,1n|2n,1n} = four2n1n2n1n = <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
9882 | // 13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n = <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
9883 | // 14th bin: <4>_{3n|1n,1n,1n} = four3n1n1n1n = <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
9884 | // 15th bin: <4>_{3n,1n|3n,1n} = four3n1n3n1n = <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
9885 | // 16th bin: <4>_{3n,1n|2n,2n} = four3n1n2n2n = <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
9886 | // 17th bin: <4>_{4n|2n,1n,1n} = four4n2n1n1n = <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
9887 | // 18th bin: ---- EMPTY ---- | |
9888 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = five2n1n1n1n1n = <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
9889 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = five2n2n2n1n1n = <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
9890 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = five3n1n2n1n1n = <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
9891 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = five4n1n1n1n1n = <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
9892 | // 23rd bin: ---- EMPTY ---- | |
9893 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = six1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
9894 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = six2n1n1n2n1n1n = <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
9895 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = six2n2n1n1n1n1n = <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
9896 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = six3n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
9897 | // 28th bin: ---- EMPTY ---- | |
9898 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = seven2n1n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
9899 | // 30th bin: ---- EMPTY ---- | |
9900 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = eight1n1n1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
9901 | ||
9902 | Int_t nPrim = anEvent->NumberOfTracks(); | |
9903 | AliFlowTrackSimple *aftsTrack = NULL; | |
9904 | Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.; | |
9905 | Int_t n = fHarmonic; | |
9906 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
9907 | Double_t dMult = (*fSMpk)(0,0); | |
9908 | cout<<endl; | |
9909 | cout<<"Multiparticle correlations: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
9910 | if(dMult<2) | |
9911 | { | |
9912 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
9913 | } else if (dMult>fMaxAllowedMultiplicity) | |
9914 | { | |
9915 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
9916 | } else | |
9917 | { | |
9918 | cout<<"... evaluating nested loops (without using particle weights)..."<<endl; | |
9919 | } | |
9920 | ||
9921 | // 2-particle correlations: | |
9922 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
9923 | { | |
9924 | for(Int_t i1=0;i1<nPrim;i1++) | |
9925 | { | |
9926 | aftsTrack=anEvent->GetTrack(i1); | |
9927 | if(!(aftsTrack->InRPSelection())) continue; | |
9928 | phi1=aftsTrack->Phi(); | |
9929 | for(Int_t i2=0;i2<nPrim;i2++) | |
9930 | { | |
9931 | if(i2==i1)continue; | |
9932 | aftsTrack=anEvent->GetTrack(i2); | |
9933 | if(!(aftsTrack->InRPSelection())) continue; | |
9934 | phi2=aftsTrack->Phi(); | |
9935 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
9936 | // fill the profile with 2-p correlations: | |
9937 | fIntFlowDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),1.); // <cos(n*(phi1-phi2))> | |
9938 | fIntFlowDirectCorrelations->Fill(1.5,cos(2.*n*(phi1-phi2)),1.); // <cos(2n*(phi1-phi2))> | |
9939 | fIntFlowDirectCorrelations->Fill(2.5,cos(3.*n*(phi1-phi2)),1.); // <cos(3n*(phi1-phi2))> | |
9940 | fIntFlowDirectCorrelations->Fill(3.5,cos(4.*n*(phi1-phi2)),1.); // <cos(4n*(phi1-phi2))> | |
9941 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
9942 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
9943 | } // end of if(nPrim>=2) | |
9944 | ||
9945 | // 3-particle correlations: | |
9946 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
9947 | { | |
9948 | for(Int_t i1=0;i1<nPrim;i1++) | |
9949 | { | |
9950 | aftsTrack=anEvent->GetTrack(i1); | |
9951 | if(!(aftsTrack->InRPSelection())) continue; | |
9952 | phi1=aftsTrack->Phi(); | |
9953 | for(Int_t i2=0;i2<nPrim;i2++) | |
9954 | { | |
9955 | if(i2==i1)continue; | |
9956 | aftsTrack=anEvent->GetTrack(i2); | |
9957 | if(!(aftsTrack->InRPSelection())) continue; | |
9958 | phi2=aftsTrack->Phi(); | |
9959 | for(Int_t i3=0;i3<nPrim;i3++) | |
9960 | { | |
9961 | if(i3==i1||i3==i2)continue; | |
9962 | aftsTrack=anEvent->GetTrack(i3); | |
9963 | if(!(aftsTrack->InRPSelection())) continue; | |
9964 | phi3=aftsTrack->Phi(); | |
9965 | if(nPrim==3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; | |
9966 | // fill the profile with 3-p correlations: | |
9967 | fIntFlowDirectCorrelations->Fill(5.,cos(2.*n*phi1-n*(phi2+phi3)),1.); //<3>_{2n|nn,n} | |
9968 | fIntFlowDirectCorrelations->Fill(6.,cos(3.*n*phi1-2.*n*phi2-n*phi3),1.); //<3>_{3n|2n,n} | |
9969 | fIntFlowDirectCorrelations->Fill(7.,cos(4.*n*phi1-2.*n*phi2-2.*n*phi3),1.); //<3>_{4n|2n,2n} | |
9970 | fIntFlowDirectCorrelations->Fill(8.,cos(4.*n*phi1-3.*n*phi2-n*phi3),1.); //<3>_{4n|3n,n} | |
9971 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
9972 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
9973 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
9974 | } // end of if(nPrim>=3) | |
9975 | ||
9976 | // 4-particle correlations: | |
9977 | if(nPrim>=4 && nPrim<=fMaxAllowedMultiplicity) | |
9978 | { | |
9979 | for(Int_t i1=0;i1<nPrim;i1++) | |
9980 | { | |
9981 | aftsTrack=anEvent->GetTrack(i1); | |
9982 | if(!(aftsTrack->InRPSelection())) continue; | |
9983 | phi1=aftsTrack->Phi(); | |
9984 | for(Int_t i2=0;i2<nPrim;i2++) | |
9985 | { | |
9986 | if(i2==i1)continue; | |
9987 | aftsTrack=anEvent->GetTrack(i2); | |
9988 | if(!(aftsTrack->InRPSelection())) continue; | |
9989 | phi2=aftsTrack->Phi(); | |
9990 | for(Int_t i3=0;i3<nPrim;i3++) | |
9991 | { | |
9992 | if(i3==i1||i3==i2)continue; | |
9993 | aftsTrack=anEvent->GetTrack(i3); | |
9994 | if(!(aftsTrack->InRPSelection())) continue; | |
9995 | phi3=aftsTrack->Phi(); | |
9996 | for(Int_t i4=0;i4<nPrim;i4++) | |
9997 | { | |
9998 | if(i4==i1||i4==i2||i4==i3)continue; | |
9999 | aftsTrack=anEvent->GetTrack(i4); | |
10000 | if(!(aftsTrack->InRPSelection())) continue; | |
10001 | phi4=aftsTrack->Phi(); | |
10002 | if(nPrim==4) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<"\r"<<flush; | |
10003 | // fill the profile with 4-p correlations: | |
10004 | fIntFlowDirectCorrelations->Fill(10.,cos(n*phi1+n*phi2-n*phi3-n*phi4),1.); // <4>_{n,n|n,n} | |
10005 | fIntFlowDirectCorrelations->Fill(11.,cos(2.*n*phi1+n*phi2-2.*n*phi3-n*phi4),1.); // <4>_{2n,n|2n,n} | |
10006 | fIntFlowDirectCorrelations->Fill(12.,cos(2.*n*phi1+2*n*phi2-2.*n*phi3-2.*n*phi4),1.); // <4>_{2n,2n|2n,2n} | |
10007 | fIntFlowDirectCorrelations->Fill(13.,cos(3.*n*phi1-n*phi2-n*phi3-n*phi4),1.); // <4>_{3n|n,n,n} | |
10008 | fIntFlowDirectCorrelations->Fill(14.,cos(3.*n*phi1+n*phi2-3.*n*phi3-n*phi4),1.); // <4>_{3n,n|3n,n} | |
10009 | fIntFlowDirectCorrelations->Fill(15.,cos(3.*n*phi1+n*phi2-2.*n*phi3-2.*n*phi4),1.); // <4>_{3n,n|2n,2n} | |
10010 | fIntFlowDirectCorrelations->Fill(16.,cos(4.*n*phi1-2.*n*phi2-n*phi3-n*phi4),1.); // <4>_{4n|2n,n,n} | |
10011 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10012 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10013 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10014 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10015 | } // end of if(nPrim>=) | |
10016 | ||
10017 | // 5-particle correlations: | |
10018 | if(nPrim>=5 && nPrim<=fMaxAllowedMultiplicity) | |
10019 | { | |
10020 | for(Int_t i1=0;i1<nPrim;i1++) | |
10021 | { | |
10022 | aftsTrack=anEvent->GetTrack(i1); | |
10023 | if(!(aftsTrack->InRPSelection())) continue; | |
10024 | phi1=aftsTrack->Phi(); | |
10025 | for(Int_t i2=0;i2<nPrim;i2++) | |
10026 | { | |
10027 | if(i2==i1)continue; | |
10028 | aftsTrack=anEvent->GetTrack(i2); | |
10029 | if(!(aftsTrack->InRPSelection())) continue; | |
10030 | phi2=aftsTrack->Phi(); | |
10031 | for(Int_t i3=0;i3<nPrim;i3++) | |
10032 | { | |
10033 | if(i3==i1||i3==i2)continue; | |
10034 | aftsTrack=anEvent->GetTrack(i3); | |
10035 | if(!(aftsTrack->InRPSelection())) continue; | |
10036 | phi3=aftsTrack->Phi(); | |
10037 | for(Int_t i4=0;i4<nPrim;i4++) | |
10038 | { | |
10039 | if(i4==i1||i4==i2||i4==i3)continue; | |
10040 | aftsTrack=anEvent->GetTrack(i4); | |
10041 | if(!(aftsTrack->InRPSelection())) continue; | |
10042 | phi4=aftsTrack->Phi(); | |
10043 | for(Int_t i5=0;i5<nPrim;i5++) | |
10044 | { | |
10045 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10046 | aftsTrack=anEvent->GetTrack(i5); | |
10047 | if(!(aftsTrack->InRPSelection())) continue; | |
10048 | phi5=aftsTrack->Phi(); | |
10049 | if(nPrim==5) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<"\r"<<flush; | |
10050 | // fill the profile with 5-p correlations: | |
10051 | fIntFlowDirectCorrelations->Fill(18.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),1.); //<5>_{2n,n|n,n,n} | |
10052 | fIntFlowDirectCorrelations->Fill(19.,cos(2.*n*phi1+2.*n*phi2-2.*n*phi3-n*phi4-n*phi5),1.); //<5>_{2n,2n|2n,n,n} | |
10053 | fIntFlowDirectCorrelations->Fill(20.,cos(3.*n*phi1+n*phi2-2.*n*phi3-n*phi4-n*phi5),1.); //<5>_{3n,n|2n,n,n} | |
10054 | fIntFlowDirectCorrelations->Fill(21.,cos(4.*n*phi1-n*phi2-n*phi3-n*phi4-n*phi5),1.); //<5>_{4n|n,n,n,n} | |
10055 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10056 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10057 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10058 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10059 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10060 | } // end of if(nPrim>=5) | |
10061 | ||
10062 | // 6-particle correlations: | |
10063 | if(nPrim>=6 && nPrim<=fMaxAllowedMultiplicity) | |
10064 | { | |
10065 | for(Int_t i1=0;i1<nPrim;i1++) | |
10066 | { | |
10067 | aftsTrack=anEvent->GetTrack(i1); | |
10068 | if(!(aftsTrack->InRPSelection())) continue; | |
10069 | phi1=aftsTrack->Phi(); | |
10070 | for(Int_t i2=0;i2<nPrim;i2++) | |
10071 | { | |
10072 | if(i2==i1)continue; | |
10073 | aftsTrack=anEvent->GetTrack(i2); | |
10074 | if(!(aftsTrack->InRPSelection())) continue; | |
10075 | phi2=aftsTrack->Phi(); | |
10076 | for(Int_t i3=0;i3<nPrim;i3++) | |
10077 | { | |
10078 | if(i3==i1||i3==i2)continue; | |
10079 | aftsTrack=anEvent->GetTrack(i3); | |
10080 | if(!(aftsTrack->InRPSelection())) continue; | |
10081 | phi3=aftsTrack->Phi(); | |
10082 | for(Int_t i4=0;i4<nPrim;i4++) | |
10083 | { | |
10084 | if(i4==i1||i4==i2||i4==i3)continue; | |
10085 | aftsTrack=anEvent->GetTrack(i4); | |
10086 | if(!(aftsTrack->InRPSelection())) continue; | |
10087 | phi4=aftsTrack->Phi(); | |
10088 | for(Int_t i5=0;i5<nPrim;i5++) | |
10089 | { | |
10090 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10091 | aftsTrack=anEvent->GetTrack(i5); | |
10092 | if(!(aftsTrack->InRPSelection())) continue; | |
10093 | phi5=aftsTrack->Phi(); | |
10094 | for(Int_t i6=0;i6<nPrim;i6++) | |
10095 | { | |
10096 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
10097 | aftsTrack=anEvent->GetTrack(i6); | |
10098 | if(!(aftsTrack->InRPSelection())) continue; | |
10099 | phi6=aftsTrack->Phi(); | |
10100 | if(nPrim==6) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<"\r"<<flush; | |
10101 | // fill the profile with 6-p correlations: | |
10102 | fIntFlowDirectCorrelations->Fill(23.,cos(n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6),1.); //<6>_{n,n,n|n,n,n} | |
10103 | 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} | |
10104 | 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} | |
10105 | 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} | |
10106 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
10107 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10108 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10109 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10110 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10111 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10112 | } // end of if(nPrim>=6) | |
10113 | ||
10114 | // 7-particle correlations: | |
10115 | if(nPrim>=7 && nPrim<=fMaxAllowedMultiplicity) | |
10116 | { | |
10117 | for(Int_t i1=0;i1<nPrim;i1++) | |
10118 | { | |
10119 | aftsTrack=anEvent->GetTrack(i1); | |
10120 | if(!(aftsTrack->InRPSelection())) continue; | |
10121 | phi1=aftsTrack->Phi(); | |
10122 | for(Int_t i2=0;i2<nPrim;i2++) | |
10123 | { | |
10124 | if(i2==i1)continue; | |
10125 | aftsTrack=anEvent->GetTrack(i2); | |
10126 | if(!(aftsTrack->InRPSelection())) continue; | |
10127 | phi2=aftsTrack->Phi(); | |
10128 | for(Int_t i3=0;i3<nPrim;i3++) | |
10129 | { | |
10130 | if(i3==i1||i3==i2)continue; | |
10131 | aftsTrack=anEvent->GetTrack(i3); | |
10132 | if(!(aftsTrack->InRPSelection())) continue; | |
10133 | phi3=aftsTrack->Phi(); | |
10134 | for(Int_t i4=0;i4<nPrim;i4++) | |
10135 | { | |
10136 | if(i4==i1||i4==i2||i4==i3)continue; | |
10137 | aftsTrack=anEvent->GetTrack(i4); | |
10138 | if(!(aftsTrack->InRPSelection())) continue; | |
10139 | phi4=aftsTrack->Phi(); | |
10140 | for(Int_t i5=0;i5<nPrim;i5++) | |
10141 | { | |
10142 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10143 | aftsTrack=anEvent->GetTrack(i5); | |
10144 | if(!(aftsTrack->InRPSelection())) continue; | |
10145 | phi5=aftsTrack->Phi(); | |
10146 | for(Int_t i6=0;i6<nPrim;i6++) | |
10147 | { | |
10148 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
10149 | aftsTrack=anEvent->GetTrack(i6); | |
10150 | if(!(aftsTrack->InRPSelection())) continue; | |
10151 | phi6=aftsTrack->Phi(); | |
10152 | for(Int_t i7=0;i7<nPrim;i7++) | |
10153 | { | |
10154 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue; | |
10155 | aftsTrack=anEvent->GetTrack(i7); | |
10156 | if(!(aftsTrack->InRPSelection())) continue; | |
10157 | phi7=aftsTrack->Phi(); | |
10158 | if(nPrim==7) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<" "<<i7<<"\r"<<flush; | |
10159 | // fill the profile with 7-p correlation: | |
10160 | 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} | |
10161 | } // end of for(Int_t i7=0;i7<nPrim;i7++) | |
10162 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
10163 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10164 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10165 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10166 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10167 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10168 | } // end of if(nPrim>=7) | |
10169 | ||
10170 | // 8-particle correlations: | |
10171 | if(nPrim>=8 && nPrim<=fMaxAllowedMultiplicity) | |
10172 | { | |
10173 | for(Int_t i1=0;i1<nPrim;i1++) | |
10174 | { | |
10175 | aftsTrack=anEvent->GetTrack(i1); | |
10176 | if(!(aftsTrack->InRPSelection())) continue; | |
10177 | phi1=aftsTrack->Phi(); | |
10178 | for(Int_t i2=0;i2<nPrim;i2++) | |
10179 | { | |
10180 | if(i2==i1)continue; | |
10181 | aftsTrack=anEvent->GetTrack(i2); | |
10182 | if(!(aftsTrack->InRPSelection())) continue; | |
10183 | phi2=aftsTrack->Phi(); | |
10184 | for(Int_t i3=0;i3<nPrim;i3++) | |
10185 | { | |
10186 | if(i3==i1||i3==i2)continue; | |
10187 | aftsTrack=anEvent->GetTrack(i3); | |
10188 | if(!(aftsTrack->InRPSelection())) continue; | |
10189 | phi3=aftsTrack->Phi(); | |
10190 | for(Int_t i4=0;i4<nPrim;i4++) | |
10191 | { | |
10192 | if(i4==i1||i4==i2||i4==i3)continue; | |
10193 | aftsTrack=anEvent->GetTrack(i4); | |
10194 | if(!(aftsTrack->InRPSelection())) continue; | |
10195 | phi4=aftsTrack->Phi(); | |
10196 | for(Int_t i5=0;i5<nPrim;i5++) | |
10197 | { | |
10198 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10199 | aftsTrack=anEvent->GetTrack(i5); | |
10200 | if(!(aftsTrack->InRPSelection())) continue; | |
10201 | phi5=aftsTrack->Phi(); | |
10202 | for(Int_t i6=0;i6<nPrim;i6++) | |
10203 | { | |
10204 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
10205 | aftsTrack=anEvent->GetTrack(i6); | |
10206 | if(!(aftsTrack->InRPSelection())) continue; | |
10207 | phi6=aftsTrack->Phi(); | |
10208 | for(Int_t i7=0;i7<nPrim;i7++) | |
10209 | { | |
10210 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue; | |
10211 | aftsTrack=anEvent->GetTrack(i7); | |
10212 | if(!(aftsTrack->InRPSelection())) continue; | |
10213 | phi7=aftsTrack->Phi(); | |
10214 | for(Int_t i8=0;i8<nPrim;i8++) | |
10215 | { | |
10216 | if(i8==i1||i8==i2||i8==i3||i8==i4||i8==i5||i8==i6||i8==i7)continue; | |
10217 | aftsTrack=anEvent->GetTrack(i8); | |
10218 | if(!(aftsTrack->InRPSelection())) continue; | |
10219 | phi8=aftsTrack->Phi(); | |
10220 | cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<" "<<i7<<" "<<i8<<"\r"<<flush; | |
10221 | // fill the profile with 8-p correlation: | |
10222 | 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} | |
10223 | } // end of for(Int_t i8=0;i8<nPrim;i8++) | |
10224 | } // end of for(Int_t i7=0;i7<nPrim;i7++) | |
10225 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
10226 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10227 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10228 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10229 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10230 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10231 | } // end of if(nPrim>=8) | |
10232 | ||
10233 | cout<<endl; | |
10234 | ||
10235 | } // end of AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoops(AliFlowEventSimple* anEvent) | |
10236 | ||
10237 | ||
10238 | //================================================================================================================================== | |
10239 | ||
10240 | ||
10241 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrelations() | |
10242 | { | |
10243 | // Cross-check results for multiparticle correlations needed for int. flow: results from Q-vectors vs results from nested loops. | |
10244 | ||
10245 | cout<<endl; | |
10246 | cout<<endl; | |
10247 | cout<<" *****************************************"<<endl; | |
10248 | cout<<" **** cross-checking the correlations ****"<<endl; | |
10249 | cout<<" **** for integrated flow ****"<<endl; | |
10250 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
10251 | { | |
10252 | cout<<" **** (particle weights not used) ****"<<endl; | |
10253 | } else | |
10254 | { | |
10255 | cout<<" **** (particle weights used) ****"<<endl; | |
10256 | } | |
10257 | cout<<" *****************************************"<<endl; | |
10258 | cout<<endl; | |
10259 | cout<<endl; | |
10260 | ||
10261 | Int_t ciMax = 32; // to be improved (removed eventually when I calculate 6th and 8th order with particle weights) | |
10262 | ||
10263 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
10264 | { | |
10265 | ciMax = 11; | |
10266 | } | |
10267 | ||
10268 | for(Int_t ci=1;ci<=ciMax;ci++) | |
10269 | { | |
10270 | if(strcmp((fIntFlowCorrelationsAllPro->GetXaxis())->GetBinLabel(ci), "") == 0) continue; // to be improved (access finalized histogram here) | |
10271 | cout<<(fIntFlowCorrelationsAllPro->GetXaxis())->GetBinLabel(ci)<<":"<<endl; // to be improved (access finalized histogram here) | |
10272 | cout<<"from Q-vectors = "<<fIntFlowCorrelationsAllPro->GetBinContent(ci)<<endl; // to be improved (access finalized histogram here) | |
10273 | cout<<"from nested loops = "<<fIntFlowDirectCorrelations->GetBinContent(ci)<<endl; | |
10274 | cout<<endl; | |
10275 | } | |
10276 | ||
10277 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrelations() | |
10278 | ||
10279 | ||
10280 | //================================================================================================================================ | |
10281 | ||
10282 | ||
10283 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrectionTermsForNUA() | |
10284 | { | |
10285 | // Cross-check results for corrections terms for non-uniform acceptance needed for int. flow: results from Q-vectors vs results from nested loops. | |
10286 | ||
10287 | cout<<endl; | |
10288 | cout<<endl; | |
10289 | cout<<" *********************************************"<<endl; | |
10290 | cout<<" **** cross-checking the correction terms ****"<<endl; | |
10291 | cout<<" **** for non-uniform acceptance relevant ****"<<endl; | |
10292 | cout<<" **** for integrated flow ****"<<endl; | |
10293 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
10294 | { | |
10295 | cout<<" **** (particle weights not used) ****"<<endl; | |
10296 | } else | |
10297 | { | |
10298 | cout<<" **** (particle weights used) ****"<<endl; | |
10299 | } | |
10300 | cout<<" *********************************************"<<endl; | |
10301 | cout<<endl; | |
10302 | cout<<endl; | |
10303 | ||
10304 | for(Int_t ci=1;ci<=10;ci++) // correction term index | |
10305 | { | |
10306 | for(Int_t sc=0;sc<2;sc++) // sin or cos term | |
10307 | { | |
10308 | if(strcmp((fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->GetBinLabel(ci), "") == 0) continue; // to be improved (access finalized histogram here) | |
10309 | cout<<(fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->GetBinLabel(ci)<<":"<<endl; // to be improved (access finalized histogram here) | |
10310 | cout<<"from Q-vectors = "<<fIntFlowCorrectionTermsForNUAPro[sc]->GetBinContent(ci)<<endl; // to be improved (access finalized histogram here) | |
10311 | cout<<"from nested loops = "<<fIntFlowDirectCorrectionTermsForNUA[sc]->GetBinContent(ci)<<endl; | |
10312 | cout<<endl; | |
10313 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos term | |
10314 | } // end of for(Int_t ci=1;ci<=10;ci++) // correction term index | |
10315 | ||
10316 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrectionTermsForNUA() | |
10317 | ||
10318 | ||
10319 | //================================================================================================================================ | |
10320 | ||
10321 | ||
0328db2d | 10322 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent) |
489d5531 | 10323 | { |
10324 | // Evaluate with nested loops multiparticle correlations for integrated flow (using the particle weights). | |
10325 | ||
10326 | // Results are stored in profile fIntFlowDirectCorrelations. | |
10327 | // Remark 1: When particle weights are used the binning of fIntFlowDirectCorrelations is organized as follows: | |
10328 | // | |
10329 | // 1st bin: <2>_{1n|1n} = two1n1nW1W1 = <w1 w2 cos(n*(phi1-phi2))> | |
10330 | // 2nd bin: <2>_{2n|2n} = two2n2nW2W2 = <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
10331 | // 3rd bin: <2>_{3n|3n} = two3n3nW3W3 = <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
10332 | // 4th bin: <2>_{4n|4n} = two4n4nW4W4 = <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
10333 | // 5th bin: ---- EMPTY ---- | |
10334 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1nW2W1W1 = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
10335 | // 7th bin: <3>_{3n|2n,1n} = ... | |
10336 | // 8th bin: <3>_{4n|2n,2n} = ... | |
10337 | // 9th bin: <3>_{4n|3n,1n} = ... | |
10338 | // 10th bin: ---- EMPTY ---- | |
10339 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1nW1W1W1W1 = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
10340 | // 12th bin: <4>_{2n,1n|2n,1n} = ... | |
10341 | // 13th bin: <4>_{2n,2n|2n,2n} = ... | |
10342 | // 14th bin: <4>_{3n|1n,1n,1n} = ... | |
10343 | // 15th bin: <4>_{3n,1n|3n,1n} = ... | |
10344 | // 16th bin: <4>_{3n,1n|2n,2n} = ... | |
10345 | // 17th bin: <4>_{4n|2n,1n,1n} = ... | |
10346 | // 18th bin: ---- EMPTY ---- | |
10347 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = ... | |
10348 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = ... | |
10349 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = ... | |
10350 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = ... | |
10351 | // 23rd bin: ---- EMPTY ---- | |
10352 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = ... | |
10353 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = ... | |
10354 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = ... | |
10355 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = ... | |
10356 | // 28th bin: ---- EMPTY ---- | |
10357 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = ... | |
10358 | // 30th bin: ---- EMPTY ---- | |
10359 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = ... | |
57340a27 | 10360 | |
489d5531 | 10361 | // Remark 2: When particle weights are used there are some extra correlations. They are stored in |
10362 | // fIntFlowExtraDirectCorrelations binning of which is organized as follows: | |
57340a27 | 10363 | |
489d5531 | 10364 | // 1st bin: two1n1nW3W1 = <w1^3 w2 cos(n*(phi1-phi2))> |
10365 | // 2nd bin: two1n1nW1W1W2 = <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
10366 | // ... | |
57340a27 | 10367 | |
489d5531 | 10368 | Int_t nPrim = anEvent->NumberOfTracks(); |
10369 | AliFlowTrackSimple *aftsTrack = NULL; | |
10370 | //Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.; | |
10371 | //Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1., wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.; | |
10372 | Double_t phi1=0., phi2=0., phi3=0., phi4=0.; | |
10373 | Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1.; | |
10374 | Int_t n = fHarmonic; | |
10375 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
10376 | Double_t dMult = (*fSMpk)(0,0); | |
10377 | cout<<endl; | |
10378 | cout<<"Multiparticle correlations: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
10379 | if(dMult<2) | |
10380 | { | |
10381 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
10382 | } else if (dMult>fMaxAllowedMultiplicity) | |
10383 | { | |
10384 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
10385 | } else | |
10386 | { | |
10387 | cout<<"... evaluating nested loops (using particle weights) ..."<<endl; | |
10388 | } | |
10389 | ||
10390 | // 2-particle correlations: | |
10391 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
10392 | { | |
10393 | // 2 nested loops multiparticle correlations using particle weights: | |
10394 | for(Int_t i1=0;i1<nPrim;i1++) | |
10395 | { | |
10396 | aftsTrack=anEvent->GetTrack(i1); | |
10397 | if(!(aftsTrack->InRPSelection())) continue; | |
10398 | phi1=aftsTrack->Phi(); | |
10399 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
10400 | for(Int_t i2=0;i2<nPrim;i2++) | |
10401 | { | |
10402 | if(i2==i1)continue; | |
10403 | aftsTrack=anEvent->GetTrack(i2); | |
10404 | if(!(aftsTrack->InRPSelection())) continue; | |
10405 | phi2=aftsTrack->Phi(); | |
10406 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
10407 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
10408 | // 2-p correlations using particle weights: | |
10409 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),wPhi1*wPhi2); // <w1 w2 cos( n*(phi1-phi2))> | |
10410 | 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))> | |
10411 | 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))> | |
10412 | 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))> | |
10413 | // extra correlations: | |
10414 | // 2-p extra correlations (do not appear if particle weights are not used): | |
10415 | if(fUsePhiWeights) fIntFlowExtraDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),pow(wPhi1,3)*wPhi2); // <w1^3 w2 cos(n*(phi1-phi2))> | |
10416 | // ... | |
10417 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10418 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10419 | } // end of if(nPrim>=2) | |
10420 | ||
10421 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
57340a27 | 10422 | { |
489d5531 | 10423 | // 3 nested loops multiparticle correlations using particle weights: |
10424 | for(Int_t i1=0;i1<nPrim;i1++) | |
57340a27 | 10425 | { |
489d5531 | 10426 | aftsTrack=anEvent->GetTrack(i1); |
10427 | if(!(aftsTrack->InRPSelection())) continue; | |
10428 | phi1=aftsTrack->Phi(); | |
10429 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
10430 | for(Int_t i2=0;i2<nPrim;i2++) | |
10431 | { | |
10432 | if(i2==i1)continue; | |
10433 | aftsTrack=anEvent->GetTrack(i2); | |
10434 | if(!(aftsTrack->InRPSelection())) continue; | |
10435 | phi2=aftsTrack->Phi(); | |
10436 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
10437 | for(Int_t i3=0;i3<nPrim;i3++) | |
10438 | { | |
10439 | if(i3==i1||i3==i2)continue; | |
10440 | aftsTrack=anEvent->GetTrack(i3); | |
10441 | if(!(aftsTrack->InRPSelection())) continue; | |
10442 | phi3=aftsTrack->Phi(); | |
10443 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
10444 | if(nPrim==3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; | |
10445 | // 3-p correlations using particle weights: | |
10446 | 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))> | |
10447 | // ... | |
10448 | // extra correlations: | |
10449 | // 2-p extra correlations (do not appear if particle weights are not used): | |
10450 | if(fUsePhiWeights) fIntFlowExtraDirectCorrelations->Fill(1.5,cos(n*(phi1-phi2)),wPhi1*wPhi2*pow(wPhi3,2)); // <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
10451 | // ... | |
10452 | // 3-p extra correlations (do not appear if particle weights are not used): | |
10453 | // ... | |
10454 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10455 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10456 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10457 | } // end of if(nPrim>=3) | |
57340a27 | 10458 | |
489d5531 | 10459 | if(nPrim>=4 && nPrim<=fMaxAllowedMultiplicity) |
10460 | { | |
10461 | // 4 nested loops multiparticle correlations using particle weights: | |
10462 | for(Int_t i1=0;i1<nPrim;i1++) | |
10463 | { | |
10464 | aftsTrack=anEvent->GetTrack(i1); | |
10465 | if(!(aftsTrack->InRPSelection())) continue; | |
10466 | phi1=aftsTrack->Phi(); | |
10467 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
10468 | for(Int_t i2=0;i2<nPrim;i2++) | |
10469 | { | |
10470 | if(i2==i1)continue; | |
10471 | aftsTrack=anEvent->GetTrack(i2); | |
10472 | if(!(aftsTrack->InRPSelection())) continue; | |
10473 | phi2=aftsTrack->Phi(); | |
10474 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
10475 | for(Int_t i3=0;i3<nPrim;i3++) | |
10476 | { | |
10477 | if(i3==i1||i3==i2)continue; | |
10478 | aftsTrack=anEvent->GetTrack(i3); | |
10479 | if(!(aftsTrack->InRPSelection())) continue; | |
10480 | phi3=aftsTrack->Phi(); | |
10481 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
10482 | for(Int_t i4=0;i4<nPrim;i4++) | |
10483 | { | |
10484 | if(i4==i1||i4==i2||i4==i3)continue; | |
10485 | aftsTrack=anEvent->GetTrack(i4); | |
10486 | if(!(aftsTrack->InRPSelection())) continue; | |
10487 | phi4=aftsTrack->Phi(); | |
10488 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi()))); | |
10489 | if(nPrim>=4) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<"\r"<<flush; // to be improved (replace eventually this if statement with if(nPrim==4)) | |
10490 | // 4-p correlations using particle weights: | |
10491 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(10.5,cos(n*phi1+n*phi2-n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); | |
10492 | // extra correlations: | |
10493 | // 2-p extra correlations (do not appear if particle weights are not used): | |
10494 | // ... | |
10495 | // 3-p extra correlations (do not appear if particle weights are not used): | |
10496 | // ... | |
10497 | // 4-p extra correlations (do not appear if particle weights are not used): | |
10498 | // ... | |
10499 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10500 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10501 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10502 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10503 | } // end of if(nPrim>=4) | |
57340a27 | 10504 | |
489d5531 | 10505 | cout<<endl; |
57340a27 | 10506 | |
489d5531 | 10507 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent) |
57340a27 | 10508 | |
489d5531 | 10509 | |
10510 | //================================================================================================================================ | |
10511 | ||
10512 | ||
10513 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowExtraCorrelations() | |
57340a27 | 10514 | { |
489d5531 | 10515 | // Cross-check results for extra multiparticle correlations needed for int. flow |
10516 | // which appear only when particle weights are used: results from Q-vectors vs results from nested loops. | |
57340a27 | 10517 | |
489d5531 | 10518 | cout<<endl; |
10519 | cout<<endl; | |
10520 | cout<<" ***********************************************"<<endl; | |
10521 | cout<<" **** cross-checking the extra correlations ****"<<endl; | |
10522 | cout<<" **** for integrated flow ****"<<endl; | |
10523 | cout<<" ***********************************************"<<endl; | |
10524 | cout<<endl; | |
10525 | cout<<endl; | |
10526 | ||
10527 | for(Int_t eci=1;eci<=2;eci++) // to be improved (increased eciMax eventually when I calculate 6th and 8th) | |
57340a27 | 10528 | { |
489d5531 | 10529 | if(strcmp((fIntFlowExtraCorrelationsPro->GetXaxis())->GetBinLabel(eci), "") == 0) continue; |
10530 | cout<<(fIntFlowExtraCorrelationsPro->GetXaxis())->GetBinLabel(eci)<<":"<<endl; | |
10531 | cout<<"from Q-vectors = "<<fIntFlowExtraCorrelationsPro->GetBinContent(eci)<<endl; | |
10532 | cout<<"from nested loops = "<<fIntFlowExtraDirectCorrelations->GetBinContent(eci)<<endl; | |
10533 | cout<<endl; | |
10534 | } | |
57340a27 | 10535 | |
489d5531 | 10536 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowExtraCorrelations() |
57340a27 | 10537 | |
10538 | ||
489d5531 | 10539 | //================================================================================================================================ |
3b552efe | 10540 | |
10541 | ||
0328db2d | 10542 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrectionsForNUAWithNestedLoops(AliFlowEventSimple * const anEvent) |
489d5531 | 10543 | { |
10544 | // Evaluate with nested loops correction terms for non-uniform acceptance relevant for NONAME integrated flow (to be improved (name)). | |
10545 | // | |
10546 | // Remark: Both sin and cos correction terms are calculated in this method. Sin terms are stored in fIntFlowDirectCorrectionTermsForNUA[0], | |
10547 | // and cos terms in fIntFlowDirectCorrectionTermsForNUA[1]. Binning of fIntFlowDirectCorrectionTermsForNUA[sc] is organized as follows | |
10548 | // (sc stands for either sin or cos): | |
10549 | ||
10550 | // 1st bin: <<sc(n*(phi1))>> | |
10551 | // 2nd bin: <<sc(n*(phi1+phi2))>> | |
10552 | // 3rd bin: <<sc(n*(phi1-phi2-phi3))>> | |
10553 | // 4th bin: <<sc(n*(2phi1-phi2))>> | |
10554 | ||
10555 | Int_t nPrim = anEvent->NumberOfTracks(); | |
10556 | AliFlowTrackSimple *aftsTrack = NULL; | |
10557 | Double_t phi1=0., phi2=0., phi3=0.; | |
10558 | Int_t n = fHarmonic; | |
10559 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
10560 | Double_t dMult = (*fSMpk)(0,0); | |
10561 | cout<<endl; | |
10562 | cout<<"Correction terms for non-uniform acceptance: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
10563 | if(dMult<1) | |
3b552efe | 10564 | { |
489d5531 | 10565 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; |
10566 | } else if (dMult>fMaxAllowedMultiplicity) | |
3b552efe | 10567 | { |
489d5531 | 10568 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; |
10569 | } else | |
10570 | { | |
10571 | cout<<"... evaluating nested loops (without using particle weights)..."<<endl; | |
10572 | } | |
10573 | ||
10574 | if(nPrim>=1 && nPrim<=fMaxAllowedMultiplicity) | |
10575 | { | |
10576 | // 1-particle correction terms for non-uniform acceptance: | |
10577 | for(Int_t i1=0;i1<nPrim;i1++) | |
10578 | { | |
10579 | aftsTrack=anEvent->GetTrack(i1); | |
10580 | if(!(aftsTrack->InRPSelection())) continue; | |
10581 | phi1=aftsTrack->Phi(); | |
10582 | if(nPrim==1) cout<<i1<<"\r"<<flush; | |
10583 | // sin terms: | |
10584 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(0.5,sin(n*phi1),1.); // <sin(n*phi1)> | |
10585 | // cos terms: | |
10586 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(0.5,cos(n*phi1),1.); // <cos(n*phi1)> | |
10587 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10588 | } // end of if(nPrim>=1) | |
10589 | ||
10590 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
10591 | { | |
10592 | // 2-particle correction terms for non-uniform acceptance: | |
10593 | for(Int_t i1=0;i1<nPrim;i1++) | |
10594 | { | |
10595 | aftsTrack=anEvent->GetTrack(i1); | |
10596 | if(!(aftsTrack->InRPSelection())) continue; | |
10597 | phi1=aftsTrack->Phi(); | |
10598 | for(Int_t i2=0;i2<nPrim;i2++) | |
3b552efe | 10599 | { |
489d5531 | 10600 | if(i2==i1)continue; |
10601 | aftsTrack=anEvent->GetTrack(i2); | |
10602 | if(!(aftsTrack->InRPSelection())) continue; | |
10603 | phi2=aftsTrack->Phi(); | |
10604 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
10605 | // sin terms: | |
3b552efe | 10606 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(1.5,sin(n*(phi1+phi2)),1.); // <<sin(n*(phi1+phi2))>> |
489d5531 | 10607 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(3.5,sin(n*(2*phi1-phi2)),1.); // <<sin(n*(2*phi1-phi2))>> |
10608 | // cos terms: | |
3b552efe | 10609 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(1.5,cos(n*(phi1+phi2)),1.); // <<cos(n*(phi1+phi2))>> |
489d5531 | 10610 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(3.5,cos(n*(2*phi1-phi2)),1.); // <<cos(n*(2*phi1-phi2))>> |
10611 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10612 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10613 | } // end of if(nPrim>=2) | |
10614 | ||
10615 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
10616 | { | |
10617 | // 3-particle correction terms for non-uniform acceptance: | |
10618 | for(Int_t i1=0;i1<nPrim;i1++) | |
10619 | { | |
10620 | aftsTrack=anEvent->GetTrack(i1); | |
10621 | if(!(aftsTrack->InRPSelection())) continue; | |
10622 | phi1=aftsTrack->Phi(); | |
10623 | for(Int_t i2=0;i2<nPrim;i2++) | |
10624 | { | |
10625 | if(i2==i1)continue; | |
10626 | aftsTrack=anEvent->GetTrack(i2); | |
10627 | if(!(aftsTrack->InRPSelection())) continue; | |
10628 | phi2=aftsTrack->Phi(); | |
10629 | for(Int_t i3=0;i3<nPrim;i3++) | |
10630 | { | |
10631 | if(i3==i1||i3==i2)continue; | |
10632 | aftsTrack=anEvent->GetTrack(i3); | |
10633 | if(!(aftsTrack->InRPSelection())) continue; | |
10634 | phi3=aftsTrack->Phi(); | |
10635 | if(nPrim>=3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; // to be improved (eventually I will change this if statement) | |
10636 | // sin terms: | |
10637 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(2.5,sin(n*(phi1-phi2-phi3)),1.); // <<sin(n*(phi1-phi2-phi3))>> | |
10638 | // cos terms: | |
10639 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(2.5,cos(n*(phi1-phi2-phi3)),1.); // <<cos(n*(phi1-phi2-phi3))>> | |
10640 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10641 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10642 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10643 | } // end of if(nPrim>=3) | |
10644 | ||
10645 | cout<<endl; | |
10646 | } | |
10647 | //================================================================================================================================ | |
0328db2d | 10648 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoops(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 10649 | { |
10650 | // Evaluate reduced correlations with nested loops without using the particle weights. | |
10651 | ||
10652 | // Remark 1: Reduced correlations are evaluated in pt bin number fCrossCheckInPtBinNo and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
10653 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrelations[t][pe][ci], where indices runs as follows: | |
10654 | // [0=RP,1=POI][0=Pt,1=Eta][0=<2'>,1=<4'>,2=<6'>,3=<8'>] | |
10655 | // Remark 3: <2'> = <cos(n*(psi1-phi2))> | |
10656 | // <4'> = <cos(n*(psi1+phi2-phi3-phi4))> | |
10657 | // ... | |
10658 | ||
10659 | Int_t typeFlag = -1; | |
10660 | Int_t ptEtaFlag = -1; | |
10661 | if(type == "RP") | |
10662 | { | |
10663 | typeFlag = 0; | |
10664 | } else if(type == "POI") | |
10665 | { | |
10666 | typeFlag = 1; | |
10667 | } | |
10668 | if(ptOrEta == "Pt") | |
10669 | { | |
10670 | ptEtaFlag = 0; | |
10671 | } else if(ptOrEta == "Eta") | |
10672 | { | |
10673 | ptEtaFlag = 1; | |
10674 | } | |
10675 | // shortcuts: | |
10676 | Int_t t = typeFlag; | |
10677 | Int_t pe = ptEtaFlag; | |
10678 | ||
10679 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
10680 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
10681 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
10682 | ||
10683 | Int_t nPrim = anEvent->NumberOfTracks(); | |
10684 | AliFlowTrackSimple *aftsTrack = NULL; | |
10685 | ||
10686 | Double_t psi1=0., phi2=0., phi3=0., phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
10687 | ||
3b552efe | 10688 | Int_t n = fHarmonic; |
489d5531 | 10689 | |
10690 | // 2'-particle correlations: | |
10691 | for(Int_t i1=0;i1<nPrim;i1++) | |
10692 | { | |
10693 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 10694 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
10695 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 10696 | { |
10697 | if(ptOrEta == "Pt") | |
10698 | { | |
10699 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10700 | } else if (ptOrEta == "Eta") | |
10701 | { | |
10702 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 10703 | } |
10704 | } else // this is diff flow of RPs | |
10705 | { | |
489d5531 | 10706 | if(ptOrEta == "Pt") |
10707 | { | |
10708 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
10709 | } else if (ptOrEta == "Eta") | |
10710 | { | |
10711 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 10712 | } |
10713 | } | |
489d5531 | 10714 | |
10715 | psi1=aftsTrack->Phi(); | |
10716 | for(Int_t i2=0;i2<nPrim;i2++) | |
10717 | { | |
10718 | if(i2==i1)continue; | |
10719 | aftsTrack=anEvent->GetTrack(i2); | |
10720 | // RP condition (!(first) particle in the correlator must be RP): | |
10721 | if(!(aftsTrack->InRPSelection()))continue; | |
10722 | phi2=aftsTrack->Phi(); | |
10723 | // 2'-particle correlations: | |
10724 | fDiffFlowDirectCorrelations[t][pe][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(1.*n*(psi1-phi2)),1.); // <cos(n*(psi1-phi2)) | |
10725 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
10726 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
10727 | ||
10728 | /* | |
10729 | ||
10730 | // 3'-particle correlations: | |
10731 | for(Int_t i1=0;i1<nPrim;i1++) | |
10732 | { | |
10733 | aftsTrack=anEvent->GetTrack(i1); | |
10734 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) | |
10735 | if(ptOrEta == "Pt") | |
10736 | { | |
10737 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10738 | } else if (ptOrEta == "Eta") | |
10739 | { | |
10740 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10741 | } | |
10742 | psi1=aftsTrack->Phi(); | |
10743 | for(Int_t i2=0;i2<nPrim;i2++) | |
10744 | { | |
10745 | if(i2==i1)continue; | |
10746 | aftsTrack=anEvent->GetTrack(i2); | |
10747 | // RP condition (!(first) particle in the correlator must be RP): | |
10748 | if(!(aftsTrack->InRPSelection())) continue; | |
10749 | phi2=aftsTrack->Phi(); | |
10750 | for(Int_t i3=0;i3<nPrim;i3++) | |
10751 | { | |
10752 | if(i3==i1||i3==i2)continue; | |
10753 | aftsTrack=anEvent->GetTrack(i3); | |
10754 | // RP condition (!(first) particle in the correlator must be RP): | |
10755 | if(!(aftsTrack->InRPSelection())) continue; | |
10756 | phi3=aftsTrack->Phi(); | |
10757 | // 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))> | |
10758 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
10759 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
10760 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
10761 | ||
10762 | */ | |
10763 | ||
10764 | // 4'-particle correlations: | |
10765 | for(Int_t i1=0;i1<nPrim;i1++) | |
10766 | { | |
10767 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 10768 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
10769 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 10770 | { |
10771 | if(ptOrEta == "Pt") | |
10772 | { | |
10773 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10774 | } else if (ptOrEta == "Eta") | |
10775 | { | |
10776 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 10777 | } |
10778 | } else // this is diff flow of RPs | |
10779 | { | |
489d5531 | 10780 | if(ptOrEta == "Pt") |
10781 | { | |
10782 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
10783 | } else if (ptOrEta == "Eta") | |
10784 | { | |
10785 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 10786 | } |
10787 | } | |
489d5531 | 10788 | |
10789 | psi1=aftsTrack->Phi(); | |
10790 | for(Int_t i2=0;i2<nPrim;i2++) | |
10791 | { | |
10792 | if(i2==i1) continue; | |
10793 | aftsTrack=anEvent->GetTrack(i2); | |
10794 | // RP condition (!(first) particle in the correlator must be RP): | |
10795 | if(!(aftsTrack->InRPSelection())) continue; | |
10796 | phi2=aftsTrack->Phi(); | |
10797 | for(Int_t i3=0;i3<nPrim;i3++) | |
10798 | { | |
10799 | if(i3==i1||i3==i2) continue; | |
10800 | aftsTrack=anEvent->GetTrack(i3); | |
10801 | // RP condition (!(first) particle in the correlator must be RP): | |
10802 | if(!(aftsTrack->InRPSelection())) continue; | |
10803 | phi3=aftsTrack->Phi(); | |
10804 | for(Int_t i4=0;i4<nPrim;i4++) | |
10805 | { | |
10806 | if(i4==i1||i4==i2||i4==i3) continue; | |
10807 | aftsTrack=anEvent->GetTrack(i4); | |
10808 | // RP condition (!(first) particle in the correlator must be RP): | |
10809 | if(!(aftsTrack->InRPSelection())) continue; | |
10810 | phi4=aftsTrack->Phi(); | |
10811 | // 4'-particle correlations: | |
10812 | fDiffFlowDirectCorrelations[t][pe][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3-phi4)),1.); // <cos(n(psi1+phi2-phi3-phi4))> | |
10813 | }//end of for(Int_t i4=0;i4<nPrim;i4++) | |
10814 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
10815 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
10816 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
10817 | ||
10818 | // count # of RPs and POIs in selected pt and eta bins for cross-checkings: | |
3b552efe | 10819 | for(Int_t i=0;i<nPrim;i++) |
10820 | { | |
10821 | aftsTrack=anEvent->GetTrack(i); | |
10822 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) | |
10823 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 10824 | { |
10825 | if(ptOrEta == "Pt") | |
10826 | { | |
10827 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10828 | } else if (ptOrEta == "Eta") | |
10829 | { | |
10830 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 10831 | } |
10832 | } else // this is diff flow of RPs | |
10833 | { | |
489d5531 | 10834 | if(ptOrEta == "Pt") |
10835 | { | |
10836 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
10837 | } else if (ptOrEta == "Eta") | |
10838 | { | |
10839 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 10840 | } |
10841 | } | |
10842 | if(t==1)t++; | |
10843 | fNoOfParticlesInBin->Fill(t+pe+0.5); | |
489d5531 | 10844 | } |
10845 | ||
10846 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoops(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
10847 | ||
10848 | ||
10849 | //================================================================================================================================ | |
10850 | ||
10851 | ||
10852 | void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrelations(TString type, TString ptOrEta) | |
10853 | { | |
10854 | // Compare correlations needed for diff. flow calculated with nested loops and those calculated from Q-vectors | |
10855 | ||
10856 | Int_t typeFlag = -1; | |
10857 | Int_t ptEtaFlag = -1; | |
10858 | if(type == "RP") | |
10859 | { | |
10860 | typeFlag = 0; | |
10861 | } else if(type == "POI") | |
10862 | { | |
10863 | typeFlag = 1; | |
10864 | } | |
10865 | if(ptOrEta == "Pt") | |
10866 | { | |
10867 | ptEtaFlag = 0; | |
10868 | } else if(ptOrEta == "Eta") | |
10869 | { | |
10870 | ptEtaFlag = 1; | |
10871 | } | |
10872 | // shortcuts: | |
10873 | Int_t t = typeFlag; | |
10874 | Int_t pe = ptEtaFlag; | |
10875 | ||
10876 | TString rpORpoiString[2] = {"RP ","POI"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
10877 | TString ptORetaString[2] = {"pt","eta"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
10878 | TString reducedCorrelations[4] = {"<<cos(n(psi1-phi2))>>","<<cos(n(psi1+phi2-phi3-phi4))>>","",""}; // to be improved (access this from pro or hist) | |
10879 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
10880 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
10881 | ||
10882 | Int_t crossCheckInPtEtaBinNo[2] = {fCrossCheckInPtBinNo,fCrossCheckInEtaBinNo}; | |
10883 | ||
10884 | ||
10885 | cout<<endl; | |
10886 | cout<<" *****************************************"<<endl; | |
10887 | cout<<" **** cross-checking the correlations ****"<<endl; | |
10888 | cout<<" **** for differential flow ("<<rpORpoiString[t]<<") ****"<<endl; | |
10889 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
10890 | { | |
10891 | cout<<" **** (particle weights not used) ****"<<endl; | |
10892 | } else | |
10893 | { | |
10894 | cout<<" **** (particle weights used) ****"<<endl; | |
10895 | } | |
10896 | cout<<" *****************************************"<<endl; | |
10897 | cout<<endl; | |
10898 | cout<<" "<<ptORetaString[pe]<<" bin: "<<lowerPtEtaEdge[pe]<<" <= "<<ptORetaString[pe]<<" < "<<upperPtEtaEdge[pe]<<endl; | |
10899 | cout<<endl; | |
10900 | ||
10901 | for(Int_t rci=0;rci<2;rci++) // to be improved (calculate 6th and 8th order) | |
10902 | { | |
10903 | cout<<" "<<reducedCorrelations[rci].Data()<<":"<<endl; | |
10904 | cout<<" from Q-vectors = "<<fDiffFlowCorrelationsPro[t][pe][rci]->GetBinContent(crossCheckInPtEtaBinNo[pe])<<endl; | |
10905 | cout<<" from nested loops = "<<fDiffFlowDirectCorrelations[t][pe][rci]->GetBinContent(1)<<endl; | |
10906 | cout<<endl; | |
10907 | } // end of for(Int_t rci=0;rci<4;rci++) | |
10908 | ||
10909 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrelations(TString type, TString ptOrEta) | |
10910 | ||
3b552efe | 10911 | //================================================================================================================================ |
10912 | ||
489d5531 | 10913 | void AliFlowAnalysisWithQCumulants::PrintNumberOfParticlesInSelectedBin() |
3b552efe | 10914 | { |
10915 | // Print on the screen number of RPs and POIs in selected pt and eta bin for cross checkings. | |
10916 | ||
10917 | cout<<endl; | |
10918 | cout<<"Number of RPs in selected pt bin = "<<fNoOfParticlesInBin->GetBinContent(1)<<endl; | |
10919 | cout<<"Number of RPs in selected eta bin = "<<fNoOfParticlesInBin->GetBinContent(2)<<endl; | |
10920 | cout<<"Number of POIs in selected pt bin = "<<fNoOfParticlesInBin->GetBinContent(3)<<endl; | |
10921 | cout<<"Number of POIs in selected eta bin = "<<fNoOfParticlesInBin->GetBinContent(4)<<endl; | |
10922 | ||
489d5531 | 10923 | } // end of void AliFlowAnalysisWithQCumulants::PrintNumberOfParticlesInSelectedBin() |
10924 | ||
3b552efe | 10925 | //================================================================================================================================ |
10926 | ||
0328db2d | 10927 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 10928 | { |
10929 | // Evaluate reduced correlations with nested loops without using the particle weights. | |
10930 | ||
10931 | // Remark 1: Reduced correlations are evaluated in pt bin number fCrossCheckInPtBinNo and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
10932 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrelations[t][pe][ci], where indices runs as follows: | |
10933 | // [0=RP,1=POI][0=Pt,1=Eta][0=<2'>,1=<4'>,2=<6'>,3=<8'>] | |
10934 | // Remark 3: <2'> = <w2 cos(n*(psi1-phi2))> | |
10935 | // <4'> = <w2 w3 w4 cos(n*(psi1+phi2-phi3-phi4))> | |
10936 | // ... | |
10937 | ||
10938 | Int_t typeFlag = -1; | |
10939 | Int_t ptEtaFlag = -1; | |
10940 | if(type == "RP") | |
10941 | { | |
10942 | typeFlag = 0; | |
10943 | } else if(type == "POI") | |
10944 | { | |
10945 | typeFlag = 1; | |
10946 | } | |
10947 | if(ptOrEta == "Pt") | |
10948 | { | |
10949 | ptEtaFlag = 0; | |
10950 | } else if(ptOrEta == "Eta") | |
10951 | { | |
10952 | ptEtaFlag = 1; | |
10953 | } | |
10954 | // shortcuts: | |
10955 | Int_t t = typeFlag; | |
10956 | Int_t pe = ptEtaFlag; | |
10957 | ||
10958 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
10959 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
10960 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
10961 | ||
10962 | Int_t nPrim = anEvent->NumberOfTracks(); | |
10963 | AliFlowTrackSimple *aftsTrack = NULL; | |
10964 | ||
10965 | Double_t psi1=0., phi2=0., phi3=0., phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
10966 | Double_t wPhi2=1., wPhi3=1., wPhi4=1.;// wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.; | |
10967 | ||
10968 | Int_t n = fHarmonic; | |
10969 | ||
10970 | // 2'-particle correlations: | |
10971 | for(Int_t i1=0;i1<nPrim;i1++) | |
10972 | { | |
10973 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 10974 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
10975 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 10976 | { |
10977 | if(ptOrEta == "Pt") | |
10978 | { | |
10979 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10980 | } else if (ptOrEta == "Eta") | |
10981 | { | |
10982 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 10983 | } |
10984 | } else // this is diff flow of RPs | |
10985 | { | |
489d5531 | 10986 | if(ptOrEta == "Pt") |
10987 | { | |
10988 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
10989 | } else if (ptOrEta == "Eta") | |
10990 | { | |
10991 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 10992 | } |
489d5531 | 10993 | } |
10994 | psi1=aftsTrack->Phi(); | |
10995 | for(Int_t i2=0;i2<nPrim;i2++) | |
10996 | { | |
10997 | if(i2==i1) continue; | |
10998 | aftsTrack=anEvent->GetTrack(i2); | |
10999 | // RP condition (!(first) particle in the correlator must be RP): | |
11000 | if(!(aftsTrack->InRPSelection())) continue; | |
11001 | phi2=aftsTrack->Phi(); | |
11002 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11003 | // 2'-particle correlations: | |
11004 | fDiffFlowDirectCorrelations[t][pe][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(1.*n*(psi1-phi2)),wPhi2); // <w2 cos(n*(psi1-phi2)) | |
11005 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11006 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11007 | ||
11008 | // 4'-particle correlations: | |
11009 | for(Int_t i1=0;i1<nPrim;i1++) | |
11010 | { | |
11011 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11012 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11013 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11014 | { |
11015 | if(ptOrEta == "Pt") | |
11016 | { | |
11017 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11018 | } else if (ptOrEta == "Eta") | |
11019 | { | |
11020 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11021 | } |
11022 | } else // this is diff flow of RPs | |
11023 | { | |
489d5531 | 11024 | if(ptOrEta == "Pt") |
11025 | { | |
11026 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11027 | } else if (ptOrEta == "Eta") | |
11028 | { | |
11029 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11030 | } |
489d5531 | 11031 | } |
11032 | psi1=aftsTrack->Phi(); | |
11033 | for(Int_t i2=0;i2<nPrim;i2++) | |
11034 | { | |
11035 | if(i2==i1) continue; | |
11036 | aftsTrack=anEvent->GetTrack(i2); | |
11037 | // RP condition (!(first) particle in the correlator must be RP): | |
11038 | if(!(aftsTrack->InRPSelection())) continue; | |
11039 | phi2=aftsTrack->Phi(); | |
11040 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11041 | for(Int_t i3=0;i3<nPrim;i3++) | |
11042 | { | |
11043 | if(i3==i1||i3==i2) continue; | |
11044 | aftsTrack=anEvent->GetTrack(i3); | |
11045 | // RP condition (!(first) particle in the correlator must be RP): | |
11046 | if(!(aftsTrack->InRPSelection())) continue; | |
11047 | phi3=aftsTrack->Phi(); | |
11048 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
11049 | for(Int_t i4=0;i4<nPrim;i4++) | |
11050 | { | |
11051 | if(i4==i1||i4==i2||i4==i3) continue; | |
11052 | aftsTrack=anEvent->GetTrack(i4); | |
11053 | // RP condition (!(first) particle in the correlator must be RP): | |
11054 | if(!(aftsTrack->InRPSelection())) continue; | |
11055 | phi4=aftsTrack->Phi(); | |
11056 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi()))); | |
11057 | // 4'-particle correlations <w2 w3 w4 cos(n(psi1+phi2-phi3-phi4))>: | |
11058 | fDiffFlowDirectCorrelations[t][pe][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3-phi4)),wPhi2*wPhi3*wPhi4); | |
11059 | }//end of for(Int_t i4=0;i4<nPrim;i4++) | |
11060 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
11061 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11062 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11063 | ||
11064 | // count # of RPs and POIs in selected pt and eta bins for cross-checkings: (to be improved - moved to dedicated method) | |
3b552efe | 11065 | for(Int_t i=0;i<nPrim;i++) |
11066 | { | |
489d5531 | 11067 | aftsTrack=anEvent->GetTrack(i); |
11068 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) | |
11069 | if(typeFlag==1) // this is diff flow of POIs | |
11070 | { | |
11071 | if(ptOrEta == "Pt") | |
11072 | { | |
11073 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11074 | } else if (ptOrEta == "Eta") | |
11075 | { | |
11076 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11077 | } | |
11078 | } else // this is diff flow of RPs | |
11079 | { | |
11080 | if(ptOrEta == "Pt") | |
11081 | { | |
11082 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11083 | } else if (ptOrEta == "Eta") | |
11084 | { | |
11085 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11086 | } | |
11087 | } | |
11088 | if(t==1)t++; | |
11089 | fNoOfParticlesInBin->Fill(t+pe+0.5); | |
11090 | } | |
11091 | ||
11092 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
11093 | ||
11094 | ||
11095 | //================================================================================================================================ | |
11096 | ||
11097 | ||
0328db2d | 11098 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 11099 | { |
11100 | // Evaluate with nested loops correction terms for non-uniform acceptance (both sin and cos terms) relevant for differential flow. | |
11101 | ||
11102 | // Remark 1: Reduced correction terms for non-uniform acceptance are evaluated in pt bin number fCrossCheckInPtBinNo | |
11103 | // and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
11104 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrections[t][pe][sc][cti], where first three indices runs as: | |
11105 | // [0=RP,1=POI][0=Pt,1=Eta][0=sin terms,1=cos terms], whilst the cti (correction term index) runs as follows: | |
11106 | // cti: | |
11107 | // 0: <<sc n(psi1)>> | |
11108 | // 1: <<sc n(psi1+phi2)>> | |
11109 | // 2: <<sc n(psi1+phi2-phi3)>> | |
11110 | // 3: <<sc n(psi1-phi2-phi3)>> | |
11111 | // 4: | |
11112 | // 5: | |
11113 | // 6: | |
11114 | ||
11115 | Int_t typeFlag = -1; | |
11116 | Int_t ptEtaFlag = -1; | |
11117 | if(type == "RP") | |
11118 | { | |
11119 | typeFlag = 0; | |
11120 | } else if(type == "POI") | |
11121 | { | |
11122 | typeFlag = 1; | |
11123 | } | |
11124 | if(ptOrEta == "Pt") | |
11125 | { | |
11126 | ptEtaFlag = 0; | |
11127 | } else if(ptOrEta == "Eta") | |
11128 | { | |
11129 | ptEtaFlag = 1; | |
11130 | } | |
11131 | // shortcuts: | |
11132 | Int_t t = typeFlag; | |
11133 | Int_t pe = ptEtaFlag; | |
11134 | ||
11135 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
11136 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
11137 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
11138 | ||
11139 | Int_t nPrim = anEvent->NumberOfTracks(); | |
11140 | AliFlowTrackSimple *aftsTrack = NULL; | |
11141 | ||
11142 | Double_t psi1=0., phi2=0., phi3=0.;// phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
11143 | ||
11144 | Int_t n = fHarmonic; | |
11145 | ||
11146 | // 1-particle correction terms: | |
11147 | for(Int_t i1=0;i1<nPrim;i1++) | |
11148 | { | |
11149 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11150 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11151 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11152 | { |
11153 | if(ptOrEta == "Pt") | |
11154 | { | |
11155 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11156 | } else if (ptOrEta == "Eta") | |
11157 | { | |
11158 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11159 | } |
11160 | } else // this is diff flow of RPs | |
11161 | { | |
489d5531 | 11162 | if(ptOrEta == "Pt") |
11163 | { | |
11164 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11165 | } else if (ptOrEta == "Eta") | |
11166 | { | |
11167 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11168 | } |
11169 | } | |
489d5531 | 11170 | psi1=aftsTrack->Phi(); |
11171 | // sin terms: | |
11172 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*psi1),1.); // <<sin(n*(psi1))>> | |
11173 | // cos terms: | |
11174 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*psi1),1.); // <<cos(n*(psi1))>> | |
11175 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11176 | ||
11177 | // 2-particle correction terms: | |
11178 | for(Int_t i1=0;i1<nPrim;i1++) | |
11179 | { | |
11180 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11181 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11182 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11183 | { |
11184 | if(ptOrEta == "Pt") | |
11185 | { | |
11186 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11187 | } else if (ptOrEta == "Eta") | |
11188 | { | |
11189 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11190 | } |
11191 | } else // this is diff flow of RPs | |
11192 | { | |
489d5531 | 11193 | if(ptOrEta == "Pt") |
11194 | { | |
11195 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11196 | } else if (ptOrEta == "Eta") | |
11197 | { | |
11198 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11199 | } |
489d5531 | 11200 | } |
11201 | psi1=aftsTrack->Phi(); | |
11202 | for(Int_t i2=0;i2<nPrim;i2++) | |
11203 | { | |
11204 | if(i2==i1) continue; | |
11205 | aftsTrack=anEvent->GetTrack(i2); | |
11206 | // RP condition (!(first) particle in the correlator must be RP): | |
11207 | if(!(aftsTrack->InRPSelection())) continue; | |
11208 | phi2=aftsTrack->Phi(); | |
11209 | // sin terms: | |
11210 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2)),1.); // <<sin(n*(psi1+phi2))>> | |
11211 | // cos terms: | |
11212 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2)),1.); // <<cos(n*(psi1+phi2))>> | |
11213 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11214 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11215 | ||
11216 | // 3-particle correction terms: | |
11217 | for(Int_t i1=0;i1<nPrim;i1++) | |
11218 | { | |
11219 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11220 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11221 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11222 | { |
11223 | if(ptOrEta == "Pt") | |
11224 | { | |
11225 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11226 | } else if (ptOrEta == "Eta") | |
11227 | { | |
11228 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11229 | } |
11230 | } else // this is diff flow of RPs | |
11231 | { | |
489d5531 | 11232 | if(ptOrEta == "Pt") |
11233 | { | |
11234 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11235 | } else if (ptOrEta == "Eta") | |
11236 | { | |
11237 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11238 | } |
489d5531 | 11239 | } |
11240 | psi1=aftsTrack->Phi(); | |
11241 | for(Int_t i2=0;i2<nPrim;i2++) | |
11242 | { | |
11243 | if(i2==i1) continue; | |
11244 | aftsTrack=anEvent->GetTrack(i2); | |
11245 | // RP condition (!(first) particle in the correlator must be RP): | |
11246 | if(!(aftsTrack->InRPSelection())) continue; | |
11247 | phi2=aftsTrack->Phi(); | |
11248 | for(Int_t i3=0;i3<nPrim;i3++) | |
11249 | { | |
11250 | if(i3==i1||i3==i2) continue; | |
11251 | aftsTrack=anEvent->GetTrack(i3); | |
11252 | // RP condition (!(first) particle in the correlator must be RP): | |
11253 | if(!(aftsTrack->InRPSelection())) continue; | |
11254 | phi3=aftsTrack->Phi(); | |
11255 | // sin terms: | |
11256 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2-phi3)),1.); // <<sin(n*(psi1+phi2-phi3))>> | |
11257 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1-phi2-phi3)),1.); // <<sin(n*(psi1-phi2-phi3))>> | |
11258 | // cos terms: | |
11259 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3)),1.); // <<cos(n*(psi1+phi2-phi3))>> | |
11260 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1-phi2-phi3)),1.); // <<cos(n*(psi1-phi2-phi3))>> | |
11261 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
11262 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11263 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11264 | ||
11265 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
11266 | ||
11267 | ||
11268 | //================================================================================================================================ | |
11269 | ||
11270 | ||
11271 | void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrectionTermsForNUA(TString type, TString ptOrEta) | |
11272 | { | |
11273 | // Compare corrections temrs for non-uniform acceptance needed for diff. flow calculated with nested loops and those calculated from Q-vectors | |
11274 | ||
11275 | Int_t typeFlag = -1; | |
11276 | Int_t ptEtaFlag = -1; | |
11277 | if(type == "RP") | |
11278 | { | |
11279 | typeFlag = 0; | |
11280 | } else if(type == "POI") | |
11281 | { | |
11282 | typeFlag = 1; | |
11283 | } | |
11284 | if(ptOrEta == "Pt") | |
11285 | { | |
11286 | ptEtaFlag = 0; | |
11287 | } else if(ptOrEta == "Eta") | |
11288 | { | |
11289 | ptEtaFlag = 1; | |
11290 | } | |
11291 | // shortcuts: | |
11292 | Int_t t = typeFlag; | |
11293 | Int_t pe = ptEtaFlag; | |
11294 | ||
11295 | TString rpORpoiString[2] = {"RP ","POI"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
11296 | TString ptORetaString[2] = {"pt","eta"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
11297 | //TString sinCosFlag[2] = {"sin","cos"}; // to be improved (eventually promote to data member) | |
11298 | 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) | |
11299 | 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) | |
11300 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
11301 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
11302 | ||
11303 | Int_t crossCheckInPtEtaBinNo[2] = {fCrossCheckInPtBinNo,fCrossCheckInEtaBinNo}; | |
11304 | ||
11305 | cout<<endl; | |
11306 | cout<<" ******************************************"<<endl; | |
11307 | cout<<" **** cross-checking the correction ****"<<endl; | |
46b94261 | 11308 | cout<<" **** terms for non-uniform acceptance ****"<<endl; |
489d5531 | 11309 | cout<<" **** for differential flow ("<<rpORpoiString[t]<<") ****"<<endl; |
11310 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
11311 | { | |
11312 | cout<<" **** (particle weights not used) ****"<<endl; | |
11313 | } else | |
11314 | { | |
11315 | cout<<" **** (particle weights used) ****"<<endl; | |
11316 | } | |
11317 | cout<<" ******************************************"<<endl; | |
11318 | cout<<endl; | |
11319 | cout<<" "<<ptORetaString[pe]<<" bin: "<<lowerPtEtaEdge[pe]<<" <= "<<ptORetaString[pe]<<" < "<<upperPtEtaEdge[pe]<<endl; | |
11320 | cout<<endl; | |
11321 | ||
11322 | for(Int_t cti=0;cti<4;cti++) // correction term index | |
11323 | { | |
11324 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
11325 | { | |
11326 | if(sc==0) // to be improved (this can be implemented better) | |
11327 | { | |
11328 | cout<<" "<<reducedCorrectionSinTerms[cti].Data()<<":"<<endl; | |
11329 | } else | |
11330 | { | |
11331 | cout<<" "<<reducedCorrectionCosTerms[cti].Data()<<":"<<endl; | |
11332 | } | |
11333 | cout<<" from Q-vectors = "<<fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]->GetBinContent(crossCheckInPtEtaBinNo[pe])<<endl; | |
11334 | cout<<" from nested loops = "<<fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]->GetBinContent(1)<<endl; | |
11335 | cout<<endl; | |
11336 | } | |
11337 | } // end of for(Int_t rci=0;rci<4;rci++) | |
11338 | ||
11339 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrectionTermsForNUA(TString type, TString ptOrEta) | |
11340 | ||
11341 | ||
57340a27 | 11342 | //================================================================================================================================ |
11343 | ||
489d5531 | 11344 | |
11345 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights() | |
11346 | { | |
11347 | // Calculate corrections using particle weights for non-uniform acceptance of the detector for no-name integrated flow (cos terms). | |
11348 | ||
11349 | // ********************************************************************** | |
11350 | // **** weighted corrections for non-uniform acceptance (cos terms): **** | |
11351 | // ********************************************************************** | |
57340a27 | 11352 | |
489d5531 | 11353 | // Remark 1: When particle weights are used the binning of fIntFlowCorrectionTermsForNUAPro[1] is organized as follows: |
57340a27 | 11354 | // |
489d5531 | 11355 | // 1st bin: <<w1 cos(n*(phi1))>> = cosP1nW1 |
11356 | // 2nd bin: <<w1 w2 cos(n*(phi1+phi2))>> = cosP1nP1nW1W1 | |
11357 | // 3rd bin: <<w1 w2 w3 cos(n*(phi1-phi2-phi3))>> = cosP1nM1nM1nW1W1W1 | |
11358 | // ... | |
11359 | ||
11360 | // multiplicity (number of particles used to determine the reaction plane) | |
11361 | Double_t dMult = (*fSMpk)(0,0); | |
11362 | ||
11363 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
11364 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
11365 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
11366 | //Double_t dReQ3n3k = (*fReQ)(2,3); | |
11367 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
11368 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
11369 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
11370 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
11371 | //Double_t dImQ3n3k = (*fImQ)(2,3); | |
11372 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
11373 | //Double_t dImQ1n3k = (*fImQ)(0,3); | |
11374 | ||
11375 | // dMs are variables introduced in order to simplify some Eqs. bellow: | |
11376 | //.............................................................................................. | |
11377 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
57340a27 | 11378 | Double_t dM111 = (*fSMpk)(2,1)-3.*(*fSMpk)(0,2)*(*fSMpk)(0,1) |
489d5531 | 11379 | + 2.*(*fSMpk)(0,3); // dM111 = sum_{i,j,k=1,i!=j!=k}^M w_i w_j w_k |
11380 | //.............................................................................................. | |
ecac11c2 | 11381 | // 1-particle: |
489d5531 | 11382 | Double_t cosP1nW1 = 0.; // <<w1 cos(n*(phi1))>> |
11383 | ||
0328db2d | 11384 | if(dMult>0 && TMath::Abs((*fSMpk)(0,1))>1e-6) |
489d5531 | 11385 | { |
11386 | cosP1nW1 = dReQ1n1k/(*fSMpk)(0,1); | |
11387 | ||
11388 | // average weighted 1-particle correction (cos terms) for non-uniform acceptance for single event: | |
11389 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(1,cosP1nW1); | |
11390 | ||
11391 | // final average weighted 1-particle correction (cos terms) for non-uniform acceptance for all events: | |
11392 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(0.5,cosP1nW1,(*fSMpk)(0,1)); | |
11393 | } | |
11394 | ||
11395 | // 2-particle: | |
11396 | Double_t cosP1nP1nW1W1 = 0.; // <<w1 w2 cos(n*(phi1+phi2))>> | |
11397 | ||
0328db2d | 11398 | if(dMult>1 && TMath::Abs(dM11)>1e-6) |
489d5531 | 11399 | { |
11400 | cosP1nP1nW1W1 = (pow(dReQ1n1k,2)-pow(dImQ1n1k,2)-dReQ2n2k)/dM11; | |
11401 | ||
11402 | // average weighted 2-particle correction (cos terms) for non-uniform acceptance for single event: | |
11403 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(2,cosP1nP1nW1W1); | |
11404 | ||
11405 | // final average weighted 2-particle correction (cos terms) for non-uniform acceptance for all events: | |
11406 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(1.5,cosP1nP1nW1W1,dM11); | |
11407 | } | |
11408 | ||
11409 | // 3-particle: | |
11410 | Double_t cosP1nM1nM1nW1W1W1 = 0.; // <<w1 w2 w3 cos(n*(phi1-phi2-phi3))>> | |
11411 | ||
0328db2d | 11412 | if(dMult>2 && TMath::Abs(dM111)>1e-6) |
489d5531 | 11413 | { |
57340a27 | 11414 | cosP1nM1nM1nW1W1W1 = (dReQ1n1k*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)) |
11415 | - dReQ1n1k*dReQ2n2k-dImQ1n1k*dImQ2n2k | |
11416 | - 2.*((*fSMpk)(0,2))*dReQ1n1k | |
489d5531 | 11417 | + 2.*dReQ1n3k) |
11418 | / dM111; | |
11419 | ||
11420 | // average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for single event: | |
11421 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(3,cosP1nM1nM1nW1W1W1); | |
11422 | ||
11423 | // final average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for all events: | |
11424 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(2.5,cosP1nM1nM1nW1W1W1,dM111); | |
11425 | } | |
11426 | ||
11427 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights() | |
11428 | ||
11429 | ||
11430 | //================================================================================================================================ | |
11431 | ||
11432 | ||
11433 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights() | |
11434 | { | |
11435 | // calculate corrections using particle weights for non-uniform acceptance of the detector for no-name integrated flow (sin terms) | |
11436 | ||
11437 | // ********************************************************************** | |
11438 | // **** weighted corrections for non-uniform acceptance (sin terms): **** | |
11439 | // ********************************************************************** | |
11440 | ||
11441 | // Remark 1: When particle weights are used the binning of fIntFlowCorrectionTermsForNUAPro[0] is organized as follows: | |
57340a27 | 11442 | // |
489d5531 | 11443 | // 1st bin: <<w1 sin(n*(phi1))>> = sinP1nW1 |
11444 | // 2nd bin: <<w1 w2 sin(n*(phi1+phi2))>> = sinP1nP1nW1W1 | |
11445 | // 3rd bin: <<w1 w2 w3 sin(n*(phi1-phi2-phi3))>> = sinP1nM1nM1nW1W1W1 | |
11446 | // ... | |
11447 | ||
11448 | // multiplicity (number of particles used to determine the reaction plane) | |
11449 | Double_t dMult = (*fSMpk)(0,0); | |
11450 | ||
11451 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
11452 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
11453 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
11454 | //Double_t dReQ3n3k = (*fReQ)(2,3); | |
11455 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
11456 | //Double_t dReQ1n3k = (*fReQ)(0,3); | |
11457 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
11458 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
11459 | //Double_t dImQ3n3k = (*fImQ)(2,3); | |
11460 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
11461 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
11462 | ||
11463 | // dMs are variables introduced in order to simplify some Eqs. bellow: | |
11464 | //.............................................................................................. | |
11465 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
57340a27 | 11466 | Double_t dM111 = (*fSMpk)(2,1)-3.*(*fSMpk)(0,2)*(*fSMpk)(0,1) |
489d5531 | 11467 | + 2.*(*fSMpk)(0,3); // dM111 = sum_{i,j,k=1,i!=j!=k}^M w_i w_j w_k |
11468 | //.............................................................................................. | |
11469 | ||
11470 | // 1-particle: | |
11471 | Double_t sinP1nW1 = 0.; // <<w1 sin(n*(phi1))>> | |
11472 | ||
0328db2d | 11473 | if(dMult>0 && TMath::Abs((*fSMpk)(0,1))>1e-6) |
489d5531 | 11474 | { |
11475 | sinP1nW1 = dImQ1n1k/((*fSMpk)(0,1)); | |
11476 | ||
11477 | // average weighted 1-particle correction (sin terms) for non-uniform acceptance for single event: | |
11478 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(1,sinP1nW1); | |
11479 | ||
11480 | // final average weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
11481 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(0.5,sinP1nW1,(*fSMpk)(0,1)); | |
11482 | } | |
11483 | ||
11484 | // 2-particle: | |
11485 | Double_t sinP1nP1nW1W1 = 0.; // <<w1 w2 sin(n*(phi1+phi2))>> | |
11486 | ||
0328db2d | 11487 | if(dMult>1 && TMath::Abs(dM11)>1e-6) |
489d5531 | 11488 | { |
11489 | sinP1nP1nW1W1 = (2.*dReQ1n1k*dImQ1n1k-dImQ2n2k)/dM11; | |
11490 | ||
11491 | // average weighted 2-particle correction (sin terms) for non-uniform acceptance for single event: | |
11492 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(2,sinP1nP1nW1W1); | |
11493 | ||
11494 | // final average weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
11495 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(1.5,sinP1nP1nW1W1,dM11); | |
11496 | } | |
11497 | ||
11498 | // 3-particle: | |
11499 | Double_t sinP1nM1nM1nW1W1W1 = 0.; // <<w1 w2 w3 sin(n*(phi1-phi2-phi3))>> | |
11500 | ||
0328db2d | 11501 | if(dMult>2 && TMath::Abs(dM111)>1e-6) |
489d5531 | 11502 | { |
57340a27 | 11503 | sinP1nM1nM1nW1W1W1 = (-dImQ1n1k*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)) |
11504 | + dReQ1n1k*dImQ2n2k-dImQ1n1k*dReQ2n2k | |
11505 | + 2.*((*fSMpk)(0,2))*dImQ1n1k | |
489d5531 | 11506 | - 2.*dImQ1n3k) |
11507 | / dM111; | |
11508 | ||
11509 | // average weighted 3-particle correction (sin terms) for non-uniform acceptance for single event: | |
11510 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(3,sinP1nM1nM1nW1W1W1); | |
11511 | ||
11512 | // final average weighted 3-particle correction (sin terms) for non-uniform acceptance for all events: | |
11513 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(2.5,sinP1nM1nM1nW1W1W1,dM111); | |
11514 | } | |
11515 | ||
11516 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights() | |
11517 | ||
11518 | ||
57340a27 | 11519 | //================================================================================================================================ |
489d5531 | 11520 | |
11521 | ||
0328db2d | 11522 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent) |
489d5531 | 11523 | { |
11524 | // Evaluate with nested loops correction terms for non-uniform acceptance for integrated flow (using the particle weights). | |
11525 | ||
57340a27 | 11526 | // Results are stored in profiles fIntFlowDirectCorrectionTermsForNUA[0] (sin terms) and |
11527 | // fIntFlowDirectCorrectionTermsForNUA[1] (cos terms). | |
489d5531 | 11528 | |
57340a27 | 11529 | // Remark 1: When particle weights are used the binning of fIntFlowDirectCorrectionTermsForNUA[sc] is |
489d5531 | 11530 | // organized as follows (sc stands for either sin or cos): |
11531 | // | |
11532 | // 1st bin: <<w1 sc(n*(phi1))>> = scP1nW1 | |
11533 | // 2nd bin: <<w1 w2 sc(n*(phi1+phi2))>> = scP1nP1nW1W1 | |
11534 | // 3rd bin: <<w1 w2 w3 sc(n*(phi1-phi2-phi3))>> = scP1nM1nM1nW1W1W1 | |
3b552efe | 11535 | // ... |
489d5531 | 11536 | |
11537 | Int_t nPrim = anEvent->NumberOfTracks(); | |
11538 | AliFlowTrackSimple *aftsTrack = NULL; | |
11539 | //Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.; | |
11540 | //Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1., wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.; | |
11541 | Double_t phi1=0., phi2=0., phi3=0.; | |
11542 | Double_t wPhi1=1., wPhi2=1., wPhi3=1.; | |
11543 | Int_t n = fHarmonic; | |
11544 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
11545 | Double_t dMult = (*fSMpk)(0,0); | |
11546 | cout<<endl; | |
11547 | cout<<"Correction terms for non-uniform acceptance: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
11548 | if(dMult<1) | |
11549 | { | |
11550 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
11551 | } else if (dMult>fMaxAllowedMultiplicity) | |
11552 | { | |
11553 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
11554 | } else | |
11555 | { | |
11556 | cout<<"... evaluating nested loops (using particle weights) ..."<<endl; | |
11557 | } | |
11558 | ||
11559 | // 1-particle correction terms using particle weights: | |
11560 | if(nPrim>=1 && nPrim<=fMaxAllowedMultiplicity) | |
11561 | { | |
11562 | for(Int_t i1=0;i1<nPrim;i1++) | |
11563 | { | |
11564 | aftsTrack=anEvent->GetTrack(i1); | |
11565 | if(!(aftsTrack->InRPSelection())) continue; | |
11566 | phi1=aftsTrack->Phi(); | |
11567 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
57340a27 | 11568 | // 1-particle correction terms using particle weights: |
489d5531 | 11569 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[0]->Fill(0.5,sin(n*phi1),wPhi1); // <w1 sin(n*phi1)> |
11570 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[1]->Fill(0.5,cos(n*phi1),wPhi1); // <w1 cos(n*phi1)> | |
57340a27 | 11571 | } // end of for(Int_t i1=0;i1<nPrim;i1++) |
11572 | } // end of if(nPrim>=1 && nPrim<=fMaxAllowedMultiplicity) | |
11573 | ||
489d5531 | 11574 | // 2-particle correction terms using particle weights: |
11575 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
11576 | { | |
11577 | for(Int_t i1=0;i1<nPrim;i1++) | |
11578 | { | |
11579 | aftsTrack=anEvent->GetTrack(i1); | |
11580 | if(!(aftsTrack->InRPSelection())) continue; | |
11581 | phi1=aftsTrack->Phi(); | |
11582 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
11583 | for(Int_t i2=0;i2<nPrim;i2++) | |
11584 | { | |
11585 | if(i2==i1)continue; | |
11586 | aftsTrack=anEvent->GetTrack(i2); | |
11587 | if(!(aftsTrack->InRPSelection())) continue; | |
11588 | phi2=aftsTrack->Phi(); | |
11589 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11590 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
57340a27 | 11591 | // 2-p correction terms using particle weights: |
489d5531 | 11592 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[0]->Fill(1.5,sin(n*(phi1+phi2)),wPhi1*wPhi2); // <w1 w2 sin(n*(phi1+phi2))> |
11593 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[1]->Fill(1.5,cos(n*(phi1+phi2)),wPhi1*wPhi2); // <w1 w2 cos(n*(phi1+phi2))> | |
11594 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
11595 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
11596 | } // end of if(nPrim>=2) | |
11597 | ||
11598 | // 3-particle correction terms using particle weights: | |
11599 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
11600 | { | |
11601 | for(Int_t i1=0;i1<nPrim;i1++) | |
11602 | { | |
11603 | aftsTrack=anEvent->GetTrack(i1); | |
11604 | if(!(aftsTrack->InRPSelection())) continue; | |
11605 | phi1=aftsTrack->Phi(); | |
11606 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
11607 | for(Int_t i2=0;i2<nPrim;i2++) | |
11608 | { | |
11609 | if(i2==i1)continue; | |
11610 | aftsTrack=anEvent->GetTrack(i2); | |
11611 | if(!(aftsTrack->InRPSelection())) continue; | |
11612 | phi2=aftsTrack->Phi(); | |
11613 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11614 | for(Int_t i3=0;i3<nPrim;i3++) | |
11615 | { | |
11616 | if(i3==i1||i3==i2)continue; | |
11617 | aftsTrack=anEvent->GetTrack(i3); | |
11618 | if(!(aftsTrack->InRPSelection())) continue; | |
11619 | phi3=aftsTrack->Phi(); | |
11620 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
11621 | if(nPrim==3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; | |
57340a27 | 11622 | // 3-p correction terms using particle weights: |
489d5531 | 11623 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[0]->Fill(2.5,sin(n*(phi1-phi2-phi3)),wPhi1*wPhi2*wPhi3); // <w1 w2 w3 sin(n*(phi1-phi2-phi3))> |
11624 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[1]->Fill(2.5,cos(n*(phi1-phi2-phi3)),wPhi1*wPhi2*wPhi3); // <w1 w2 w3 cos(n*(phi1-phi2-phi3))> | |
11625 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
11626 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
11627 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
11628 | } // end of if(nPrim>=3) | |
11629 | ||
57340a27 | 11630 | /* |
11631 | ||
489d5531 | 11632 | if(nPrim>=4 && nPrim<=fMaxAllowedMultiplicity) |
11633 | { | |
11634 | // 4 nested loops multiparticle correlations using particle weights: | |
11635 | for(Int_t i1=0;i1<nPrim;i1++) | |
11636 | { | |
11637 | aftsTrack=anEvent->GetTrack(i1); | |
11638 | if(!(aftsTrack->InRPSelection())) continue; | |
11639 | phi1=aftsTrack->Phi(); | |
11640 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
11641 | for(Int_t i2=0;i2<nPrim;i2++) | |
11642 | { | |
11643 | if(i2==i1)continue; | |
11644 | aftsTrack=anEvent->GetTrack(i2); | |
11645 | if(!(aftsTrack->InRPSelection())) continue; | |
11646 | phi2=aftsTrack->Phi(); | |
11647 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11648 | for(Int_t i3=0;i3<nPrim;i3++) | |
11649 | { | |
11650 | if(i3==i1||i3==i2)continue; | |
11651 | aftsTrack=anEvent->GetTrack(i3); | |
11652 | if(!(aftsTrack->InRPSelection())) continue; | |
11653 | phi3=aftsTrack->Phi(); | |
11654 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
11655 | for(Int_t i4=0;i4<nPrim;i4++) | |
11656 | { | |
11657 | if(i4==i1||i4==i2||i4==i3)continue; | |
11658 | aftsTrack=anEvent->GetTrack(i4); | |
11659 | if(!(aftsTrack->InRPSelection())) continue; | |
11660 | phi4=aftsTrack->Phi(); | |
11661 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi()))); | |
11662 | if(nPrim>=4) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<"\r"<<flush; // to be improved (replace eventually this if statement with if(nPrim==4)) | |
11663 | // 4-p correlations using particle weights: | |
11664 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(10.5,cos(n*phi1+n*phi2-n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); | |
11665 | // extra correlations: | |
11666 | // 2-p extra correlations (do not appear if particle weights are not used): | |
11667 | // ... | |
11668 | // 3-p extra correlations (do not appear if particle weights are not used): | |
11669 | // ... | |
11670 | // 4-p extra correlations (do not appear if particle weights are not used): | |
11671 | // ... | |
11672 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
11673 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
11674 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
11675 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
11676 | } // end of if(nPrim>=4) | |
11677 | ||
11678 | */ | |
11679 | ||
11680 | cout<<endl; | |
11681 | ||
11682 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent) | |
11683 | ||
11684 | ||
57340a27 | 11685 | //================================================================================================================================ |
489d5531 | 11686 | |
11687 | ||
11688 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights(TString type, TString ptOrEta) | |
11689 | { | |
11690 | // Calculate correction terms for non-uniform acceptance for differential flow (cos terms) using particle weights. | |
57340a27 | 11691 | |
489d5531 | 11692 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][1][cti], where cti runs as follows: |
57340a27 | 11693 | // |
489d5531 | 11694 | // 0: <<cos n(psi)>> |
11695 | // 1: <<w2 cos n(psi1+phi2)>> | |
11696 | // 2: <<w2 w3 cos n(psi1+phi2-phi3)>> | |
11697 | // 3: <<w2 w3 cos n(psi1-phi2-phi3)>> | |
11698 | // 4: | |
11699 | // 5: | |
11700 | // 6: | |
11701 | ||
11702 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
11703 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
11704 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
11705 | //Double_t dReQ1n3k = (*fReQ)(0,3); | |
11706 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
11707 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
11708 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
11709 | //Double_t dImQ1n3k = (*fImQ)(0,3); | |
11710 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
11711 | ||
11712 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
11713 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
11714 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
11715 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
11716 | ||
11717 | Int_t t = -1; // type flag | |
11718 | Int_t pe = -1; // ptEta flag | |
11719 | ||
11720 | if(type == "RP") | |
11721 | { | |
11722 | t = 0; | |
11723 | } else if(type == "POI") | |
11724 | { | |
11725 | t = 1; | |
11726 | } | |
11727 | ||
11728 | if(ptOrEta == "Pt") | |
11729 | { | |
11730 | pe = 0; | |
11731 | } else if(ptOrEta == "Eta") | |
11732 | { | |
11733 | pe = 1; | |
11734 | } | |
11735 | ||
11736 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
11737 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
11738 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
11739 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
11740 | ||
11741 | // looping over all bins and calculating correction terms: | |
11742 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
11743 | { | |
11744 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
11745 | Double_t p1n0kRe = 0.; | |
11746 | Double_t p1n0kIm = 0.; | |
11747 | ||
11748 | // number of POIs in particular pt or eta bin: | |
11749 | Double_t mp = 0.; | |
11750 | ||
11751 | // real and imaginary parts of q_{m*n,0} (weighted Q-vector evaluated for particles which are both RPs and POIs in particular pt or eta bin): | |
11752 | Double_t q1n2kRe = 0.; | |
11753 | Double_t q1n2kIm = 0.; | |
11754 | Double_t q2n1kRe = 0.; | |
11755 | Double_t q2n1kIm = 0.; | |
46b94261 | 11756 | |
489d5531 | 11757 | // s_{1,1}, s_{1,2} // to be improved (add explanation) |
11758 | Double_t s1p1k = 0.; | |
11759 | Double_t s1p2k = 0.; | |
46b94261 | 11760 | |
489d5531 | 11761 | // number of particles which are both RPs and POIs in particular pt or eta bin: |
46b94261 | 11762 | Double_t mq = 0.; |
489d5531 | 11763 | |
11764 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
11765 | Double_t dM01 = 0.; | |
11766 | Double_t dM011 = 0.; | |
11767 | ||
11768 | if(type == "POI") | |
11769 | { | |
11770 | // q_{m*n,k}: | |
11771 | q1n2kRe = fReRPQ1dEBE[2][pe][0][2]->GetBinContent(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
11772 | * fReRPQ1dEBE[2][pe][0][2]->GetBinEntries(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
11773 | q1n2kIm = fImRPQ1dEBE[2][pe][0][2]->GetBinContent(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
11774 | * fImRPQ1dEBE[2][pe][0][2]->GetBinEntries(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
11775 | q2n1kRe = fReRPQ1dEBE[2][pe][1][1]->GetBinContent(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
11776 | * fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
11777 | q2n1kIm = fImRPQ1dEBE[2][pe][1][1]->GetBinContent(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
11778 | * fImRPQ1dEBE[2][pe][1][1]->GetBinEntries(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
11779 | mq = fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
46b94261 | 11780 | |
489d5531 | 11781 | s1p1k = pow(fs1dEBE[2][pe][1]->GetBinContent(b)*fs1dEBE[2][pe][1]->GetBinEntries(b),1.); |
11782 | s1p2k = pow(fs1dEBE[2][pe][2]->GetBinContent(b)*fs1dEBE[2][pe][2]->GetBinEntries(b),1.); | |
11783 | }else if(type == "RP") | |
11784 | { | |
11785 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
11786 | q1n2kRe = fReRPQ1dEBE[0][pe][0][2]->GetBinContent(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
11787 | * fReRPQ1dEBE[0][pe][0][2]->GetBinEntries(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
11788 | q1n2kIm = fImRPQ1dEBE[0][pe][0][2]->GetBinContent(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
11789 | * fImRPQ1dEBE[0][pe][0][2]->GetBinEntries(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
11790 | q2n1kRe = fReRPQ1dEBE[0][pe][1][1]->GetBinContent(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
11791 | * fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
11792 | q2n1kIm = fImRPQ1dEBE[0][pe][1][1]->GetBinContent(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
11793 | * fImRPQ1dEBE[0][pe][1][1]->GetBinEntries(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
11794 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
11795 | s1p1k = pow(fs1dEBE[0][pe][1]->GetBinContent(b)*fs1dEBE[0][pe][1]->GetBinEntries(b),1.); | |
11796 | s1p2k = pow(fs1dEBE[0][pe][2]->GetBinContent(b)*fs1dEBE[0][pe][2]->GetBinEntries(b),1.); | |
3b552efe | 11797 | //s1p3k = pow(fs1dEBE[0][pe][3]->GetBinContent(b)*fs1dEBE[0][pe][3]->GetBinEntries(b),1.); |
11798 | ||
489d5531 | 11799 | mq = fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) |
11800 | } | |
3b552efe | 11801 | |
489d5531 | 11802 | if(type == "POI") |
3b552efe | 11803 | { |
11804 | // p_{m*n,k}: | |
489d5531 | 11805 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) |
11806 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
11807 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
3b552efe | 11808 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); |
11809 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
489d5531 | 11810 | // M01 from Eq. (118) in QC2c (to be improved (notation)): |
3b552efe | 11811 | dM01 = mp*dSM1p1k-s1p1k; |
11812 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
11813 | - 2.*(s1p1k*dSM1p1k-s1p2k); | |
11814 | ||
11815 | // typeFlag = RP (0) or POI (1): | |
11816 | t = 1; | |
11817 | } else if(type == "RP") | |
489d5531 | 11818 | { |
11819 | // to be improved (cross-checked): | |
11820 | p1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
11821 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
11822 | p1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
11823 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
11824 | mp = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
11825 | // M01 from Eq. (118) in QC2c (to be improved (notation)): | |
3b552efe | 11826 | dM01 = mp*dSM1p1k-s1p1k; |
11827 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
11828 | - 2.*(s1p1k*dSM1p1k-s1p2k); | |
489d5531 | 11829 | // typeFlag = RP (0) or POI (1): |
3b552efe | 11830 | t = 0; |
11831 | } | |
489d5531 | 11832 | |
11833 | // <<cos n(psi1)>>: | |
11834 | Double_t cosP1nPsi = 0.; | |
11835 | if(mp) | |
11836 | { | |
11837 | cosP1nPsi = p1n0kRe/mp; | |
11838 | ||
11839 | // fill profile for <<cos n(psi1)>>: | |
11840 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi,mp); | |
11841 | // histogram to store <cos n(psi1)> e-b-e (needed in some other methods): | |
11842 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][0]->SetBinContent(b,cosP1nPsi); | |
46b94261 | 11843 | } // end of if(mp) |
57340a27 | 11844 | |
489d5531 | 11845 | // <<w2 cos n(psi1+phi2)>>: |
11846 | Double_t cosP1nPsiP1nPhiW2 = 0.; | |
11847 | if(dM01) | |
11848 | { | |
11849 | cosP1nPsiP1nPhiW2 = (p1n0kRe*dReQ1n1k-p1n0kIm*dImQ1n1k-q2n1kRe)/(dM01); | |
11850 | // fill profile for <<w2 cos n(psi1+phi2)>>: | |
11851 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsiP1nPhiW2,dM01); | |
11852 | // histogram to store <w2 cos n(psi1+phi2)> e-b-e (needed in some other methods): | |
11853 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][1]->SetBinContent(b,cosP1nPsiP1nPhiW2); | |
11854 | } // end of if(dM01) | |
11855 | ||
11856 | // <<w2 w3 cos n(psi1+phi2-phi3)>>: | |
11857 | Double_t cosP1nPsi1P1nPhi2MPhi3W2W3 = 0.; | |
11858 | if(dM011) | |
11859 | { | |
46b94261 | 11860 | cosP1nPsi1P1nPhi2MPhi3W2W3 = (p1n0kRe*(pow(dImQ1n1k,2.)+pow(dReQ1n1k,2.)) |
11861 | - p1n0kRe*dSM1p2k | |
11862 | - q2n1kRe*dReQ1n1k-q2n1kIm*dImQ1n1k | |
11863 | - s1p1k*dReQ1n1k | |
11864 | + 2.*q1n2kRe) | |
11865 | / dM011; | |
489d5531 | 11866 | // fill profile for <<w1 w2 w3 cos n(psi1+phi2)>>: |
11867 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1P1nPhi2MPhi3W2W3,dM011); | |
11868 | // histogram to store <w1 w2 w3 cos n(psi1+phi2)> e-b-e (needed in some other methods): | |
11869 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][2]->SetBinContent(b,cosP1nPsi1P1nPhi2MPhi3W2W3); | |
11870 | } // end of if(dM011) | |
11871 | ||
11872 | // <<w2 w3 cos n(psi1-phi2-phi3)>>: | |
11873 | Double_t cosP1nPsi1M1nPhi2MPhi3W2W3 = 0.; | |
11874 | if(dM011) | |
11875 | { | |
11876 | cosP1nPsi1M1nPhi2MPhi3W2W3 = (p1n0kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.))+2.*p1n0kIm*dReQ1n1k*dImQ1n1k | |
11877 | - 1.*(p1n0kRe*dReQ2n2k+p1n0kIm*dImQ2n2k) | |
46b94261 | 11878 | - 2.*s1p1k*dReQ1n1k |
489d5531 | 11879 | + 2.*q1n2kRe) |
11880 | / dM011; | |
11881 | // fill profile for <<w1 w2 w3 cos n(psi1+phi2)>>: | |
11882 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1M1nPhi2MPhi3W2W3,dM011); | |
11883 | // histogram to store <w1 w2 w3 cos n(psi1+phi2)> e-b-e (needed in some other methods): | |
11884 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][3]->SetBinContent(b,cosP1nPsi1M1nPhi2MPhi3W2W3); | |
11885 | } // end of if(dM011) | |
11886 | ||
11887 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
46b94261 | 11888 | |
57340a27 | 11889 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights(TString type, TString ptOrEta) |
11890 | ||
489d5531 | 11891 | |
11892 | //================================================================================================================================ | |
11893 | ||
11894 | ||
11895 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights(TString type, TString ptOrEta) | |
11896 | { | |
11897 | // Calculate correction terms for non-uniform acceptance for differential flow (sin terms). | |
11898 | ||
11899 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][0][cti], where cti runs as follows: | |
11900 | // 0: <<sin n(psi1)>> | |
11901 | // 1: <<w2 sin n(psi1+phi2)>> | |
11902 | // 2: <<w2 w3 sin n(psi1+phi2-phi3)>> | |
11903 | // 3: <<w2 w3 sin n(psi1-phi2-phi3)>>: | |
11904 | // 4: | |
11905 | // 5: | |
11906 | // 6: | |
11907 | ||
11908 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
11909 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
11910 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
11911 | //Double_t dReQ1n3k = (*fReQ)(0,3); | |
11912 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
11913 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
11914 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
11915 | //Double_t dImQ1n3k = (*fImQ)(0,3); | |
11916 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
11917 | ||
11918 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
11919 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
11920 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
11921 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
11922 | ||
11923 | Int_t t = -1; // type flag | |
11924 | Int_t pe = -1; // ptEta flag | |
11925 | ||
11926 | if(type == "RP") | |
11927 | { | |
11928 | t = 0; | |
11929 | } else if(type == "POI") | |
11930 | { | |
11931 | t = 1; | |
11932 | } | |
11933 | ||
11934 | if(ptOrEta == "Pt") | |
11935 | { | |
11936 | pe = 0; | |
11937 | } else if(ptOrEta == "Eta") | |
11938 | { | |
11939 | pe = 1; | |
11940 | } | |
11941 | ||
11942 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
11943 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
11944 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
11945 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
11946 | ||
11947 | // looping over all bins and calculating correction terms: | |
11948 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
11949 | { | |
11950 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
11951 | Double_t p1n0kRe = 0.; | |
11952 | Double_t p1n0kIm = 0.; | |
11953 | ||
11954 | // number of POIs in particular pt or eta bin: | |
11955 | Double_t mp = 0.; | |
11956 | ||
11957 | // real and imaginary parts of q_{m*n,0} (weighted Q-vector evaluated for particles which are both RPs and POIs in particular pt or eta bin): | |
11958 | Double_t q1n2kRe = 0.; | |
11959 | Double_t q1n2kIm = 0.; | |
11960 | Double_t q2n1kRe = 0.; | |
11961 | Double_t q2n1kIm = 0.; | |
46b94261 | 11962 | |
489d5531 | 11963 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) |
11964 | Double_t s1p1k = 0.; | |
11965 | Double_t s1p2k = 0.; | |
46b94261 | 11966 | |
489d5531 | 11967 | // number of particles which are both RPs and POIs in particular pt or eta bin: |
46b94261 | 11968 | Double_t mq = 0.; |
489d5531 | 11969 | |
11970 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
11971 | Double_t dM01 = 0.; | |
11972 | Double_t dM011 = 0.; | |
11973 | ||
11974 | if(type == "POI") | |
11975 | { | |
11976 | // q_{m*n,k}: | |
11977 | q1n2kRe = fReRPQ1dEBE[2][pe][0][2]->GetBinContent(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
11978 | * fReRPQ1dEBE[2][pe][0][2]->GetBinEntries(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
11979 | q1n2kIm = fImRPQ1dEBE[2][pe][0][2]->GetBinContent(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
11980 | * fImRPQ1dEBE[2][pe][0][2]->GetBinEntries(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
11981 | q2n1kRe = fReRPQ1dEBE[2][pe][1][1]->GetBinContent(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
11982 | * fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
11983 | q2n1kIm = fImRPQ1dEBE[2][pe][1][1]->GetBinContent(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
11984 | * fImRPQ1dEBE[2][pe][1][1]->GetBinEntries(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
11985 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
46b94261 | 11986 | |
489d5531 | 11987 | s1p1k = pow(fs1dEBE[2][pe][1]->GetBinContent(b)*fs1dEBE[2][pe][1]->GetBinEntries(b),1.); |
11988 | s1p2k = pow(fs1dEBE[2][pe][2]->GetBinContent(b)*fs1dEBE[2][pe][2]->GetBinEntries(b),1.); | |
11989 | }else if(type == "RP") | |
11990 | { | |
11991 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
11992 | q1n2kRe = fReRPQ1dEBE[0][pe][0][2]->GetBinContent(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
11993 | * fReRPQ1dEBE[0][pe][0][2]->GetBinEntries(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
11994 | q1n2kIm = fImRPQ1dEBE[0][pe][0][2]->GetBinContent(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
11995 | * fImRPQ1dEBE[0][pe][0][2]->GetBinEntries(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
11996 | q2n1kRe = fReRPQ1dEBE[0][pe][1][1]->GetBinContent(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
11997 | * fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
11998 | q2n1kIm = fImRPQ1dEBE[0][pe][1][1]->GetBinContent(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
11999 | * fImRPQ1dEBE[0][pe][1][1]->GetBinEntries(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
12000 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
12001 | s1p1k = pow(fs1dEBE[0][pe][1]->GetBinContent(b)*fs1dEBE[0][pe][1]->GetBinEntries(b),1.); | |
12002 | s1p2k = pow(fs1dEBE[0][pe][2]->GetBinContent(b)*fs1dEBE[0][pe][2]->GetBinEntries(b),1.); | |
12003 | //s1p3k = pow(fs1dEBE[0][pe][3]->GetBinContent(b)*fs1dEBE[0][pe][3]->GetBinEntries(b),1.); | |
3b552efe | 12004 | } |
12005 | ||
12006 | if(type == "POI") | |
12007 | { | |
12008 | // p_{m*n,k}: | |
489d5531 | 12009 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) |
12010 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
12011 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
3b552efe | 12012 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); |
12013 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
489d5531 | 12014 | // M01 from Eq. (118) in QC2c (to be improved (notation)): |
3b552efe | 12015 | dM01 = mp*dSM1p1k-s1p1k; |
12016 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
12017 | - 2.*(s1p1k*dSM1p1k-s1p2k); | |
12018 | // typeFlag = RP (0) or POI (1): | |
12019 | t = 1; | |
489d5531 | 12020 | } else if(type == "RP") |
3b552efe | 12021 | { |
489d5531 | 12022 | // to be improved (cross-checked): |
12023 | p1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
12024 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
12025 | p1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
12026 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
12027 | mp = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
12028 | // M01 from Eq. (118) in QC2c (to be improved (notation)): | |
3b552efe | 12029 | dM01 = mp*dSM1p1k-s1p1k; |
12030 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
489d5531 | 12031 | - 2.*(s1p1k*dSM1p1k-s1p2k); |
12032 | // typeFlag = RP (0) or POI (1): | |
3b552efe | 12033 | t = 0; |
12034 | } | |
12035 | ||
489d5531 | 12036 | // <<sin n(psi1)>>: |
12037 | Double_t sinP1nPsi = 0.; | |
12038 | if(mp) | |
12039 | { | |
12040 | sinP1nPsi = p1n0kIm/mp; | |
12041 | ||
12042 | // fill profile for <<sin n(psi1)>>: | |
12043 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi,mp); | |
12044 | // histogram to store <sin n(psi1)> e-b-e (needed in some other methods): | |
12045 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][0]->SetBinContent(b,sinP1nPsi); | |
46b94261 | 12046 | } // end of if(mp) |
12047 | ||
489d5531 | 12048 | // <<w2 sin n(psi1+phi2)>>: |
12049 | Double_t sinP1nPsiP1nPhiW2 = 0.; | |
12050 | if(dM01) | |
12051 | { | |
12052 | sinP1nPsiP1nPhiW2 = (p1n0kRe*dImQ1n1k+p1n0kIm*dReQ1n1k-q2n1kIm)/(dM01); | |
12053 | // fill profile for <<w2 sin n(psi1+phi2)>>: | |
12054 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsiP1nPhiW2,dM01); | |
12055 | // histogram to store <w2 sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
12056 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][1]->SetBinContent(b,sinP1nPsiP1nPhiW2); | |
12057 | } // end of if(mp*dMult-mq) | |
12058 | ||
12059 | // <<w2 w3 sin n(psi1+phi2-phi3)>>: | |
12060 | Double_t sinP1nPsi1P1nPhi2MPhi3W2W3 = 0.; | |
12061 | if(dM011) | |
12062 | { | |
46b94261 | 12063 | sinP1nPsi1P1nPhi2MPhi3W2W3 = (p1n0kIm*(pow(dImQ1n1k,2.)+pow(dReQ1n1k,2.)) |
12064 | - p1n0kIm*dSM1p2k | |
12065 | + q2n1kRe*dImQ1n1k-q2n1kIm*dReQ1n1k | |
12066 | - s1p1k*dImQ1n1k | |
12067 | + 2.*q1n2kIm) | |
12068 | / dM011; | |
489d5531 | 12069 | // fill profile for <<w2 w3 sin n(psi1+phi2-phi3)>>: |
12070 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1P1nPhi2MPhi3W2W3,dM011); | |
12071 | // histogram to store <w2 w3 sin n(psi1+phi2-phi3)> e-b-e (needed in some other methods): | |
12072 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][2]->SetBinContent(b,sinP1nPsi1P1nPhi2MPhi3W2W3); | |
12073 | } // end of if(dM011) | |
12074 | ||
12075 | // <<w2 w3 sin n(psi1-phi2-phi3)>>: | |
12076 | Double_t sinP1nPsi1M1nPhi2MPhi3W2W3 = 0.; | |
12077 | if(dM011) | |
12078 | { | |
12079 | sinP1nPsi1M1nPhi2MPhi3W2W3 = (p1n0kIm*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.))-2.*p1n0kRe*dReQ1n1k*dImQ1n1k | |
12080 | + 1.*(p1n0kRe*dImQ2n2k-p1n0kIm*dReQ2n2k) | |
46b94261 | 12081 | + 2.*s1p1k*dImQ1n1k |
489d5531 | 12082 | - 2.*q1n2kIm) |
12083 | / dM011; | |
12084 | // fill profile for <<w2 w3 sin n(psi1-phi2-phi3)>>: | |
12085 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1M1nPhi2MPhi3W2W3,dM011); | |
12086 | // histogram to store <w2 w3 sin n(psi1-phi2-phi3)> e-b-e (needed in some other methods): | |
12087 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][3]->SetBinContent(b,sinP1nPsi1M1nPhi2MPhi3W2W3); | |
12088 | } // end of if(dM011) | |
12089 | ||
12090 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
12091 | ||
12092 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights(TString type, TString ptOrEta) | |
12093 | ||
12094 | ||
12095 | //================================================================================================================================ | |
12096 | ||
12097 | ||
0328db2d | 12098 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 12099 | { |
57340a27 | 12100 | // Evaluate with nested loops correction terms for non-uniform acceptance |
489d5531 | 12101 | // with using particle weights (both sin and cos terms) relevant for differential flow. |
12102 | ||
57340a27 | 12103 | // Remark 1: "w1" in expressions bellow is a particle weight used only for particles which were |
12104 | // flagged both as POI and RP. | |
489d5531 | 12105 | // Remark 2: Reduced correction terms for non-uniform acceptance are evaluated in pt bin number fCrossCheckInPtBinNo |
12106 | // and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
12107 | // Remark 3: Results are stored in 1 bin profiles fDiffFlowDirectCorrections[t][pe][sc][cti], where first three indices runs as: | |
12108 | // [0=RP,1=POI][0=Pt,1=Eta][0=sin terms,1=cos terms], whilst the cti (correction term index) runs as follows: | |
12109 | // cti: | |
12110 | // 0: <<sc n(psi1)>> | |
12111 | // 1: <<w2 sc n(psi1+phi2)>> | |
12112 | // 2: <<w2 w3 sc n(psi1+phi2-phi3)>> | |
12113 | // 3: <<w2 w3 sc n(psi1-phi2-phi3)>> | |
12114 | // 4: | |
12115 | // 5: | |
12116 | // 6: | |
46b94261 | 12117 | |
489d5531 | 12118 | Int_t typeFlag = -1; |
12119 | Int_t ptEtaFlag = -1; | |
12120 | if(type == "RP") | |
12121 | { | |
12122 | typeFlag = 0; | |
12123 | } else if(type == "POI") | |
12124 | { | |
12125 | typeFlag = 1; | |
12126 | } | |
12127 | if(ptOrEta == "Pt") | |
12128 | { | |
12129 | ptEtaFlag = 0; | |
12130 | } else if(ptOrEta == "Eta") | |
12131 | { | |
12132 | ptEtaFlag = 1; | |
12133 | } | |
12134 | // shortcuts: | |
12135 | Int_t t = typeFlag; | |
12136 | Int_t pe = ptEtaFlag; | |
12137 | ||
12138 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
12139 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
12140 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
12141 | ||
12142 | Int_t nPrim = anEvent->NumberOfTracks(); | |
12143 | AliFlowTrackSimple *aftsTrack = NULL; | |
12144 | ||
12145 | Double_t psi1=0., phi2=0., phi3=0.;// phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
12146 | Double_t wPhi2=1., wPhi3=1.; | |
12147 | ||
12148 | Int_t n = fHarmonic; | |
12149 | ||
12150 | // 1'-particle correction terms: | |
12151 | for(Int_t i1=0;i1<nPrim;i1++) | |
12152 | { | |
12153 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 12154 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
12155 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 12156 | { |
12157 | if(ptOrEta == "Pt") | |
12158 | { | |
12159 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
12160 | } else if (ptOrEta == "Eta") | |
12161 | { | |
12162 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 12163 | } |
12164 | } else // this is diff flow of RPs | |
12165 | { | |
489d5531 | 12166 | if(ptOrEta == "Pt") |
12167 | { | |
12168 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
12169 | } else if (ptOrEta == "Eta") | |
12170 | { | |
12171 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 12172 | } |
489d5531 | 12173 | } |
12174 | psi1=aftsTrack->Phi(); | |
12175 | // sin terms: | |
12176 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*psi1),1.); // <<sin(n*(psi1))>> | |
12177 | // cos terms: | |
12178 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*psi1),1.); // <<cos(n*(psi1))>> | |
12179 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
12180 | ||
12181 | // 2'-particle correction terms: | |
12182 | for(Int_t i1=0;i1<nPrim;i1++) | |
12183 | { | |
12184 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 12185 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
12186 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 12187 | { |
12188 | if(ptOrEta == "Pt") | |
12189 | { | |
12190 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
12191 | } else if (ptOrEta == "Eta") | |
12192 | { | |
12193 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 12194 | } |
12195 | } else // this is diff flow of RPs | |
12196 | { | |
489d5531 | 12197 | if(ptOrEta == "Pt") |
12198 | { | |
12199 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
12200 | } else if (ptOrEta == "Eta") | |
12201 | { | |
12202 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 12203 | } |
489d5531 | 12204 | } |
12205 | psi1=aftsTrack->Phi(); | |
12206 | for(Int_t i2=0;i2<nPrim;i2++) | |
12207 | { | |
12208 | if(i2==i1) continue; | |
12209 | aftsTrack=anEvent->GetTrack(i2); | |
12210 | // RP condition (!(first) particle in the correlator must be RP): | |
12211 | if(!(aftsTrack->InRPSelection())) continue; | |
46b94261 | 12212 | phi2=aftsTrack->Phi(); |
489d5531 | 12213 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); |
12214 | // sin terms: | |
12215 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2)),wPhi2); // <<w2 sin(n*(psi1+phi2))>> | |
12216 | // cos terms: | |
12217 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2)),wPhi2); // <<w2 cos(n*(psi1+phi2))>> | |
12218 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
12219 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
12220 | ||
12221 | // 3'-particle correction terms: | |
12222 | for(Int_t i1=0;i1<nPrim;i1++) | |
12223 | { | |
12224 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 12225 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
12226 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 12227 | { |
12228 | if(ptOrEta == "Pt") | |
12229 | { | |
12230 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
12231 | } else if (ptOrEta == "Eta") | |
12232 | { | |
12233 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 12234 | } |
12235 | } else // this is diff flow of RPs | |
12236 | { | |
489d5531 | 12237 | if(ptOrEta == "Pt") |
12238 | { | |
12239 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
12240 | } else if (ptOrEta == "Eta") | |
12241 | { | |
12242 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 12243 | } |
489d5531 | 12244 | } |
12245 | psi1=aftsTrack->Phi(); | |
12246 | for(Int_t i2=0;i2<nPrim;i2++) | |
12247 | { | |
12248 | if(i2==i1) continue; | |
12249 | aftsTrack=anEvent->GetTrack(i2); | |
12250 | // RP condition (!(first) particle in the correlator must be RP): | |
12251 | if(!(aftsTrack->InRPSelection())) continue; | |
12252 | phi2=aftsTrack->Phi(); | |
12253 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
12254 | for(Int_t i3=0;i3<nPrim;i3++) | |
12255 | { | |
12256 | if(i3==i1||i3==i2) continue; | |
12257 | aftsTrack=anEvent->GetTrack(i3); | |
12258 | // RP condition (!(first) particle in the correlator must be RP): | |
12259 | if(!(aftsTrack->InRPSelection())) continue; | |
12260 | phi3=aftsTrack->Phi(); | |
12261 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
12262 | // sin terms: | |
12263 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2-phi3)),wPhi2*wPhi3); // <<wPhi2*wPhi3 sin(n*(psi1+phi2-phi3))>> | |
12264 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1-phi2-phi3)),wPhi2*wPhi3); // <<wPhi2*wPhi3 sin(n*(psi1-phi2-phi3))>> | |
12265 | // cos terms: | |
12266 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3)),wPhi2*wPhi3); // <<wPhi2*wPhi3 cos(n*(psi1+phi2-phi3))>> | |
12267 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1-phi2-phi3)),wPhi2*wPhi3); // <<wPhi2*wPhi3 cos(n*(psi1-phi2-phi3))>> | |
12268 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
12269 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
46b94261 | 12270 | }//end of for(Int_t i1=0;i1<nPrim;i1++) |
489d5531 | 12271 | |
12272 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
12273 | ||
12274 | ||
57340a27 | 12275 | |
12276 | ||
12277 |