1 /*************************************************************************
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /**********************************
17 * functions and equations needed *
18 * for calculation of Q-cumulants *
19 * and final flow estimates *
21 * author: Ante Bilandzic *
23 *********************************/
25 #define AliQCumulantsFunctions_cxx
27 #include "Riostream.h"
31 #include "TParticle.h"
34 #include "TProfile2D.h"
35 #include "TProfile3D.h"
41 #include "AliFlowEventSimple.h"
42 #include "AliFlowTrackSimple.h"
43 #include "AliFlowAnalysisWithCumulants.h"
44 #include "AliFlowCommonConstants.h"
45 #include "AliFlowCommonHist.h"
46 #include "AliFlowCommonHistResults.h"
47 #include "AliQCumulantsFunctions.h"
49 ClassImp(AliQCumulantsFunctions)
51 //================================================================================================================_
53 AliQCumulantsFunctions::AliQCumulantsFunctions():
65 fbinPt3p2n1n1nRP(NULL),
66 fbinPt3p1n1n2nRP(NULL),
67 fbinPt4p1n1n1n1nRP(NULL),
68 fbinEta2p1n1nRP(NULL),
69 fbinEta2p2n2nRP(NULL),
70 fbinEta3p2n1n1nRP(NULL),
71 fbinEta3p1n1n2nRP(NULL),
72 fbinEta4p1n1n1n1nRP(NULL),
73 fbinPt2p1n1nPOI(NULL),
74 fbinPt2p2n2nPOI(NULL),
75 fbinPt3p2n1n1nPOI(NULL),
76 fbinPt3p1n1n2nPOI(NULL),
77 fbinPt4p1n1n1n1nPOI(NULL),
78 fbinEta2p1n1nPOI(NULL),
79 fbinEta2p2n2nPOI(NULL),
80 fbinEta3p2n1n1nPOI(NULL),
81 fbinEta3p1n1n2nPOI(NULL),
82 fbinEta4p1n1n1n1nPOI(NULL),
83 fch2nd(NULL),//ch = common histogram (control)
87 fchr2nd(NULL),//chr = common histogram results
95 AliQCumulantsFunctions::~AliQCumulantsFunctions()
100 AliQCumulantsFunctions::AliQCumulantsFunctions(TH1D *intRes, TH1D *diffRes2nd, TH1D *diffRes4th, TH1D *covar, TProfile *AvMult, TProfile *QVector, TProfile *QCorr, TProfile *QProd, TProfile *Direct, TProfile *binPt2p1n1nRP, TProfile *binPt2p2n2nRP, TProfile *binPt3p2n1n1nRP, TProfile *binPt3p1n1n2nRP, TProfile *binPt4p1n1n1n1nRP, TProfile *binEta2p1n1nRP, TProfile *binEta2p2n2nRP, TProfile *binEta3p2n1n1nRP, TProfile *binEta3p1n1n2nRP, TProfile *binEta4p1n1n1n1nRP, TProfile *binPt2p1n1nPOI, TProfile *binPt2p2n2nPOI, TProfile *binPt3p2n1n1nPOI, TProfile *binPt3p1n1n2nPOI, TProfile *binPt4p1n1n1n1nPOI, TProfile *binEta2p1n1nPOI, TProfile *binEta2p2n2nPOI, TProfile *binEta3p2n1n1nPOI, TProfile *binEta3p1n1n2nPOI, TProfile *binEta4p1n1n1n1nPOI, AliFlowCommonHist *ch2nd, AliFlowCommonHist *ch4th, AliFlowCommonHist *ch6th, AliFlowCommonHist *ch8th, AliFlowCommonHistResults *chr2nd, AliFlowCommonHistResults *chr4th, AliFlowCommonHistResults *chr6th, AliFlowCommonHistResults *chr8th):
102 fDiffRes2nd(diffRes2nd),
103 fDiffRes4th(diffRes4th),
110 fbinPt2p1n1nRP(binPt2p1n1nRP),
111 fbinPt2p2n2nRP(binPt2p2n2nRP),
112 fbinPt3p2n1n1nRP(binPt3p2n1n1nRP),
113 fbinPt3p1n1n2nRP(binPt3p1n1n2nRP),
114 fbinPt4p1n1n1n1nRP(binPt4p1n1n1n1nRP),
115 fbinEta2p1n1nRP(binEta2p1n1nRP),
116 fbinEta2p2n2nRP(binEta2p2n2nRP),
117 fbinEta3p2n1n1nRP(binEta3p2n1n1nRP),
118 fbinEta3p1n1n2nRP(binEta3p1n1n2nRP),
119 fbinEta4p1n1n1n1nRP(binEta4p1n1n1n1nRP),
120 fbinPt2p1n1nPOI(binPt2p1n1nPOI),
121 fbinPt2p2n2nPOI(binPt2p2n2nPOI),
122 fbinPt3p2n1n1nPOI(binPt3p2n1n1nPOI),
123 fbinPt3p1n1n2nPOI(binPt3p1n1n2nPOI),
124 fbinPt4p1n1n1n1nPOI(binPt4p1n1n1n1nPOI),
125 fbinEta2p1n1nPOI(binEta2p1n1nPOI),
126 fbinEta2p2n2nPOI(binEta2p2n2nPOI),
127 fbinEta3p2n1n1nPOI(binEta3p2n1n1nPOI),
128 fbinEta3p1n1n2nPOI(binEta3p1n1n2nPOI),
129 fbinEta4p1n1n1n1nPOI(binEta4p1n1n1n1nPOI),
142 //================================================================================================================
144 void AliQCumulantsFunctions::Calculate()
149 Int_t n = 2; //to be improved
151 //---------------------------------------------------------------------------------------------------------
152 //avarage multiplicity
153 Double_t AvM = fAvMult->GetBinContent(1);
156 Double_t nEvts = fAvMult->GetBinEntries(1);
158 //2-, 4- and 6-particle azimuthal correlation:
159 Double_t two = fQCorr->GetBinContent(1); //<<2>>_{n|n}
160 Double_t four = fQCorr->GetBinContent(11); //<<4>>_{n,n|n,n}
161 Double_t six = fQCorr->GetBinContent(24); //<<6>>_{n,n,n|n,n,n}
162 Double_t eight = fQCorr->GetBinContent(31); //<<8>>_{n,n,n,n|n,n,n,n}
164 //errors of 2-, 4- and 6-particle azimuthal correlation:
165 Double_t twoErr = fQCorr->GetBinError(1); //sigma_{<<2>>_{n|n}}
166 Double_t fourErr = fQCorr->GetBinError(11); //sigma_{<<4>>_{n,n|n,n}}
167 Double_t sixErr = fQCorr->GetBinError(21); //sigma_{<<6>>_{n,n,n|n,n,n}}
168 //Double_t eightErr = fQCorr->GetBinError(); //sigma_{<<8>>_{n,n,n,n|n,n,n,n}}
170 //covariances of multi-particle correlations
171 Double_t cov24=fQProd->GetBinContent(1)-two*four; //cov24=<<2>*<4>>-<<2>>*<<4>>
172 Double_t cov26=fQProd->GetBinContent(2)-two*six; //cov26=<<2>*<6>>-<<2>>*<<6>>
173 //Double_t cov28=fQProd->GetBinContent(3)-two*eight; //cov28=<<2>*<8>>-<<2>>*<<8>>
174 Double_t cov46=fQProd->GetBinContent(4)-four*six; //cov46=<<4>*<6>>-<<4>>*<<6>>
175 //Double_t cov48=fQProd->GetBinContent(5)-four*eight; //cov48=<<4>*<8>>-<<4>>*<<8>>
176 //Double_t cov68=fQProd->GetBinContent(6)-six*eight; //cov68=<<6>*<8>>-<<6>>*<<8>>
178 fCovar->SetBinContent(1,cov24);
179 fCovar->SetBinContent(2,cov26);
180 //fCovar->SetBinContent(3,cov28);
181 fCovar->SetBinContent(4,cov46);
182 //fCovar->SetBinContent(5,cov48);
183 //fCovar->SetBinContent(6,cov68);
185 //2nd, 4th and 6th order Q-cumulant and theirs errors:
186 Double_t secondOrderQCumulant = two; //c_n{2}
187 Double_t secondOrderQCumulantError = twoErr; //sigma_{c_n{2}}
189 Double_t fourthOrderQCumulant = four-2.*pow(two,2.);//c_n{4}
190 Double_t fourthOrderQCumulantError = 0.; //sigma_{c_n{4}}
192 if(16.*pow(two,2.)*pow(twoErr,2.)+pow(fourErr,2.)-8.*two*cov24>0.)
194 fourthOrderQCumulantError = pow(16.*pow(two,2.)*pow(twoErr,2.)+pow(fourErr,2.)-8.*two*cov24,0.5);//sigma_{c_n{4}}
197 Double_t sixthOrderQCumulant = six-9.*two*four+12.*pow(two,3.); //c_n{6}
198 Double_t sixthOrderQCumulantError = 0.; //sigma_{c_n{6}}
200 if(81.*pow(4.*two*two-four,2.)*pow(twoErr,2.)+81.*pow(two,2.)*pow(fourErr,2.)+pow(sixErr,2.)-162.*(4.*two*two-four)*two*cov24+18.*(4.*two*two-four)*cov26-18.*two*cov46>0.)
202 sixthOrderQCumulantError = pow(81.*pow(4.*two*two-four,2.)*pow(twoErr,2.)+81.*pow(two,2.)*pow(fourErr,2.)+pow(sixErr,2.)-162.*(4.*two*two-four)*two*cov24+18.*(4.*two*two-four)*cov26-18.*two*cov46,0.5);//sigma_{c_n{6}}
205 Double_t eightOrderQCumulant = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.);
207 //integrated flow estimates from Q-cumulants:
209 cout<<"**************************************"<<endl;
210 cout<<"**************************************"<<endl;
211 cout<<"flow estimates from Q-cumulants (RP):"<<endl;
214 Double_t vn2=0.,vn4=0.,vn6=0.,vn8=0.;
215 Double_t sd2=0.,sd4=0.,sd6=0.,sd8=0.;
216 if(secondOrderQCumulant>0.){
217 vn2 = pow(secondOrderQCumulant,0.5);//v_n{2}
218 sd2 = 0.5*pow(secondOrderQCumulant,-0.5)*secondOrderQCumulantError;//sigma_{v_n{2}}
219 cout<<" v_"<<n<<"{2} = "<<vn2<<" +/- "<<sd2<<endl;
220 fIntRes->SetBinContent(1,vn2);
221 fIntRes->SetBinError(1,sd2);
223 fchr2nd->FillIntegratedFlow(vn2,sd2);//to be removed
224 fchr2nd->FillChi(vn2*pow(AvM,0.5));//to be removed
225 fchr2nd->FillIntegratedFlowRP(vn2,sd2);
227 cout<<" v_"<<n<<"{2} = Im"<<endl;
229 if(four!=0. && fourthOrderQCumulant<0.){
230 vn4 = pow(-fourthOrderQCumulant,1./4.); //v_n{4}
231 sd4 = 0.25*pow(-fourthOrderQCumulant,-3./4.)*fourthOrderQCumulantError;//sigma_{v_n{4}}
232 cout<<" v_"<<n<<"{4} = "<<vn4<<" +/- "<<sd4<<endl;
233 fIntRes->SetBinContent(2,vn4);
234 fIntRes->SetBinError(2,sd4);
236 fchr4th->FillIntegratedFlow(vn4,sd4);//to be removed
237 fchr4th->FillChi(vn4*pow(AvM,0.5));//to be removed
238 fchr4th->FillIntegratedFlowRP(vn4,sd4);
240 cout<<" v_"<<n<<"{4} = Im"<<endl;
242 if(six!=0. && sixthOrderQCumulant>0.){
243 vn6 = pow((1./4.)*sixthOrderQCumulant,1./6.); //v_n{6}
244 sd6 = (1./6.)*pow(2.,-1./3.)*pow(sixthOrderQCumulant,-5./6.)*sixthOrderQCumulantError;
245 cout<<" v_"<<n<<"{6} = "<<vn6<<" +/- "<<sd6<<endl;
246 fIntRes->SetBinContent(3,vn6);
247 fIntRes->SetBinError(3,sd6);
249 fchr6th->FillIntegratedFlow(vn6,sd6);//to be removed
250 fchr6th->FillChi(vn6*pow(AvM,0.5));//to be removed
251 fchr6th->FillIntegratedFlowRP(vn6,sd6);
253 cout<<" v_"<<n<<"{6} = Im"<<endl;
255 if(eight!=0. && eightOrderQCumulant<0.){
256 vn8 = pow((-1./33.)*eightOrderQCumulant,1./8.); //v_n{8}
257 cout<<" v_"<<n<<"{8} = "<<vn8<<" +/- "<<sd8<<endl;
258 fIntRes->SetBinContent(4,vn8);
259 fIntRes->SetBinError(4,sd8);
261 fchr8th->FillIntegratedFlow(vn8,sd8);//to be removed
262 fchr8th->FillChi(vn8*pow(AvM,0.5));//to be removed
263 fchr8th->FillIntegratedFlowRP(vn8,sd8);
265 cout<<" v_"<<n<<"{8} = Im"<<endl;
268 cout<<" nEvts = "<<nEvts<<", AvM = "<<AvM<<endl;
269 cout<<"**************************************"<<endl;
270 cout<<"**************************************"<<endl;
272 //---------------------------------------------------------------------------------------------------------
274 //---------------------------------------------------------------------------------------------------------
275 //differential flow (RP)
278 Double_t secondOrderQCumulantDiffFlowPtRP = 0.;
279 Double_t fourthOrderQCumulantDiffFlowPtRP = 0.;
281 Int_t nBinsPtRP = fbinPt2p1n1nRP->GetNbinsX();
283 for(Int_t bb=1;bb<nBinsPtRP+1;bb++)
285 if(fbinPt2p1n1nRP->GetBinEntries(bb)>0.&&vn2!=0)
287 secondOrderQCumulantDiffFlowPtRP = fbinPt2p1n1nRP->GetBinContent(bb);
288 fDiffRes2nd->SetBinContent(bb,secondOrderQCumulantDiffFlowPtRP/vn2);
290 fchr2nd->FillDifferentialFlowPtRP(bb,secondOrderQCumulantDiffFlowPtRP/vn2, 0.);//to be improved (errors)
292 if(fbinPt4p1n1n1n1nRP->GetBinEntries(bb)>0.&&vn4!=0.)
294 fourthOrderQCumulantDiffFlowPtRP = fbinPt4p1n1n1n1nRP->GetBinContent(bb)-2.*fbinPt2p1n1nRP->GetBinContent(bb)*pow(vn2,2.);
295 fDiffRes4th->SetBinContent(bb,-1.*fourthOrderQCumulantDiffFlowPtRP/pow(vn4,3.));
297 fchr4th->FillDifferentialFlowPtRP(bb,-1.*fourthOrderQCumulantDiffFlowPtRP/pow(vn4,3.), 0.);//to be improved (errors)
302 Double_t secondOrderQCumulantDiffFlowEtaRP = 0.;
303 Double_t fourthOrderQCumulantDiffFlowEtaRP = 0.;
305 Int_t nBinsEtaRP = fbinEta2p1n1nRP->GetNbinsX();
307 for(Int_t bb=1;bb<nBinsEtaRP+1;bb++)
309 if(fbinEta2p1n1nRP->GetBinEntries(bb)>0.&&vn2!=0)
311 secondOrderQCumulantDiffFlowEtaRP = fbinEta2p1n1nRP->GetBinContent(bb);
312 fDiffRes2nd->SetBinContent(bb,secondOrderQCumulantDiffFlowEtaRP/vn2);
314 fchr2nd->FillDifferentialFlowEtaRP(bb,secondOrderQCumulantDiffFlowEtaRP/vn2, 0.);//to be improved (errors)
316 if(fbinEta4p1n1n1n1nRP->GetBinEntries(bb)>0.&&vn4!=0.)
318 fourthOrderQCumulantDiffFlowEtaRP = fbinEta4p1n1n1n1nRP->GetBinContent(bb)-2.*fbinEta2p1n1nRP->GetBinContent(bb)*pow(vn2,2.);
319 fDiffRes4th->SetBinContent(bb,-1.*fourthOrderQCumulantDiffFlowEtaRP/pow(vn4,3.));
321 fchr4th->FillDifferentialFlowEtaRP(bb,-1.*fourthOrderQCumulantDiffFlowEtaRP/pow(vn4,3.), 0.);//to be improved (errors)
325 //differential flow (POI)
326 Int_t nBinsPtPOI = fbinPt2p1n1nPOI->GetNbinsX();
327 Int_t nBinsEtaPOI = fbinEta2p1n1nPOI->GetNbinsX();
330 Double_t secondOrderQCumulantDiffFlowPtPOI = 0.;
331 Double_t fourthOrderQCumulantDiffFlowPtPOI = 0.;
333 Double_t dVn2ndPOI=0.,dSd2ndPOI=0.,dDiffvn2nd=0.,dYield2nd=0.,dSum2nd=0.;
334 Double_t dVn4thPOI=0.,dSd4thPOI=0.,dDiffvn4th=0.,dYield4th=0.,dSum4th=0.;
336 Double_t dVn2ndPOIEta=0.,dDiffvn2ndEta=0.,dYield2ndEta=0.,dSum2ndEta=0.;//to be removed
338 for(Int_t bb=1;bb<nBinsPtPOI+1;bb++)
341 if(fbinPt2p1n1nPOI->GetBinEntries(bb)>0.&&vn2!=0)
343 //cout<<"bin = "<<bb<<" : "<<(fch2nd->GetHistPtDiff())->GetBinContent(bb)<<endl;
345 secondOrderQCumulantDiffFlowPtPOI = fbinPt2p1n1nPOI->GetBinContent(bb);
346 fDiffRes2nd->SetBinContent(bb,secondOrderQCumulantDiffFlowPtPOI/vn2);
348 fchr2nd->FillDifferentialFlowPtPOI(bb,secondOrderQCumulantDiffFlowPtPOI/vn2, 0.);//to be improved (errors) && bb or bb+1
349 //-------------------------------------------------------------
350 //integrated flow (POI, Pt, 2nd order):
351 dDiffvn2nd=(fchr2nd->GetHistDiffFlowPtPOI())->GetBinContent(bb);
352 dYield2nd=(fch2nd->GetHistPtDiff())->GetBinContent(bb);
353 dVn2ndPOI+=dDiffvn2nd*dYield2nd;
355 //-------------------------------------------------------------
358 if(fbinPt4p1n1n1n1nPOI->GetBinEntries(bb)>0.&&vn4!=0.)
360 fourthOrderQCumulantDiffFlowPtPOI = fbinPt4p1n1n1n1nPOI->GetBinContent(bb)-2.*fbinPt2p1n1nPOI->GetBinContent(bb)*pow(vn2,2.);
361 fDiffRes4th->SetBinContent(bb,-1.*fourthOrderQCumulantDiffFlowPtPOI/pow(vn4,3.));
363 fchr4th->FillDifferentialFlowPtPOI(bb,-1.*fourthOrderQCumulantDiffFlowPtPOI/pow(vn4,3.), 0.);//to be improved (errors)
364 //-------------------------------------------------------------
365 //integrated flow (POI, Pt, 4th order):
366 dDiffvn4th=(fchr4th->GetHistDiffFlowPtPOI())->GetBinContent(bb);
367 dYield4th=(fch4th->GetHistPtDiff())->GetBinContent(bb);
368 dVn4thPOI+=dDiffvn4th*dYield4th;
370 //-------------------------------------------------------------
374 //---------------------------------------------------------------------------------------------------
375 //integrated flow estimates from Q-cumulants (POI):
377 cout<<"**************************************"<<endl;
378 cout<<"**************************************"<<endl;
379 cout<<"flow estimates from Q-cumulants (POI):"<<endl;
381 //storing the final results for integrated flow (POI):
383 if(dSum2nd && fchr2nd)
386 fchr2nd->FillIntegratedFlowPOI(dVn2ndPOI,0.);//to be improved (errors)
387 cout<<" v_"<<n<<"{2} = "<<dVn2ndPOI<<" +/- "<<dSd2ndPOI<<endl;
390 cout<<" v_"<<n<<"{2} = Im"<<endl;
394 if(dSum4th && fchr4th)
397 fchr4th->FillIntegratedFlowPOI(dVn4thPOI,0.);//to be improved (errors)
398 cout<<" v_"<<n<<"{4} = "<<dVn4thPOI<<" +/- "<<dSd4thPOI<<endl;
401 cout<<" v_"<<n<<"{4} = Im"<<endl;
405 cout<<" nEvts = "<<nEvts<<", AvM = "<<AvM<<endl;
406 cout<<"**************************************"<<endl;
407 cout<<"**************************************"<<endl;
409 //---------------------------------------------------------------------------------------------------
413 Double_t secondOrderQCumulantDiffFlowEtaPOI = 0.;
414 Double_t fourthOrderQCumulantDiffFlowEtaPOI = 0.;
416 for(Int_t bb=1;bb<nBinsEtaPOI+1;bb++)
418 if(fbinEta2p1n1nPOI->GetBinEntries(bb)>0.&&vn2!=0)
420 secondOrderQCumulantDiffFlowEtaPOI = fbinEta2p1n1nPOI->GetBinContent(bb);
421 fDiffRes2nd->SetBinContent(bb,secondOrderQCumulantDiffFlowEtaPOI/vn2);
423 fchr2nd->FillDifferentialFlowEtaPOI(bb,secondOrderQCumulantDiffFlowEtaPOI/vn2, 0.);//to be improved (errors)
425 if(fbinEta4p1n1n1n1nPOI->GetBinEntries(bb)>0.&&vn4!=0.)
427 fourthOrderQCumulantDiffFlowEtaPOI = fbinEta4p1n1n1n1nPOI->GetBinContent(bb)-2.*fbinEta2p1n1nPOI->GetBinContent(bb)*pow(vn2,2.);
428 fDiffRes4th->SetBinContent(bb,-1.*fourthOrderQCumulantDiffFlowEtaPOI/pow(vn4,3.));
430 fchr4th->FillDifferentialFlowEtaPOI(bb,-1.*fourthOrderQCumulantDiffFlowEtaPOI/pow(vn4,3.), 0.);//to be improved (errors)
434 //---------------------------------------------------------------------------------------------------------
478 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
479 // !!!! to be removed !!!!
480 for(Int_t bb=1;bb<nBinsEtaPOI+1;bb++)
482 //integrated flow (POI, Eta, 2nd order):
483 dDiffvn2ndEta=(fchr2nd->GetHistDiffFlowEtaPOI())->GetBinContent(bb);
484 dYield2ndEta=(fch2nd->GetHistEtaDiff())->GetBinContent(bb);
485 // cout<<"bin = "<<bb<<" : "<<dDiffvn2ndEta<<" "<<dYield2ndEta<<endl;
487 dVn2ndPOIEta+=dDiffvn2ndEta*dYield2ndEta;
488 dSum2ndEta+=dYield2ndEta;
491 //check why for small number of events there is a mismatch here (should be exactly the same)://to be removed
492 //cout<<dSum2nd<<" to be improved "<<(fch2nd->GetHistPtDiff())->Integral()<<endl;//to be removed
496 dVn2ndPOIEta/=dSum2ndEta;
497 //cout<<"POI Pt vs POI Eta:"<<endl;
498 //cout<<dVn2ndPOI<<" vs "<<dVn2ndPOIEta<<endl;
499 //cout<<dSum2nd<<" vs "<<dSum2ndEta<<endl;
500 // cout<<"eta = "<<(fchr2nd->GetHistDiffFlowEtaPOI())->GetBinContent(44)<<endl;
501 // cout<<"poi = "<<(fchr2nd->GetHistDiffFlowPtPOI())->GetBinContent(14)<<endl;
502 // cout<<"+++++++++"<<endl;
505 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
521 Double_t first=16.*pow(two*twoErr,2.);
522 Double_t second=pow(fourErr,2.);
523 Double_t third=-8.*two*cov24;
528 cout<<" 1st = "<<(1./16.)*first/(pow(-fourthOrderQCumulant,1.5))<<endl;
529 cout<<" 2nd = "<<(1./16.)*second/(pow(-fourthOrderQCumulant,1.5))<<endl;
530 cout<<" 3rd = "<<(1./16.)*third/(pow(-fourthOrderQCumulant,1.5))<<endl;
532 cout<<" nEvts = "<<nEvts<<", AvM = "<<AvM<<endl;
535 cout<<"c-c = "<<pow((1./16.)*((first+second+third)/(pow(-fourthOrderQCumulant,1.5))),0.5)<<endl;
542 //<Q-vector components>
543 Double_t AvQx = fQVector->GetBinContent(1); //<Q_x>
544 Double_t AvQy = fQVector->GetBinContent(2); //<Q_y>
545 Double_t AvQ2x = fQVector->GetBinContent(3); //<(Q_x)^2>
546 Double_t AvQ2y = fQVector->GetBinContent(4); //<(Q_y)^2>
547 Double_t AvQ2 = fQVector->GetBinContent(5); //<|Q|^2>
548 Double_t AvQ4 = fQVector->GetBinContent(6); //<|Q|^4>
549 Double_t AvQ_2n2 = fQVector->GetBinContent(7); //<|Q_2n|^2>
550 Double_t ReQ2nQnstarQnstar = fQVector->GetBinContent(8); //<Re[Q_n^2 * Q_2n^*]>
551 Double_t ImQ2nQnstarQnstar = fQVector->GetBinContent(9); //<Im[Q_n^2 * Q_2n^*]>
552 Double_t AvQ_3n2 = fQVector->GetBinContent(10); //<|Q_3n|^2>
553 Double_t AvQ_4n2 = fQVector->GetBinContent(11); //<|Q_4n|^2>
554 Double_t AvQ_5n2 = fQVector->GetBinContent(12); //<|Q_5n|^2>
555 Double_t ReQ3nQ2nstarQnstar = fQVector->GetBinContent(13); //Re<Q_{3n} Q_{2n}^* Q_{n}^*>
556 Double_t ReQ3nQnstarQnstarQnstar = fQVector->GetBinContent(14); //Re<Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*>
557 Double_t HereQ2nQnQ2nstarQnstar = fQVector->GetBinContent(15); //<|Q_{2n}|^2 |Q_{n}|^2>
558 Double_t HereQ2nQnQnstarQnstarQnstar = fQVector->GetBinContent(16); //Re<Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*>
559 Double_t AvQ6 = fQVector->GetBinContent(17); //<|Q|^6>
567 //direct particle correlations
568 Double_t twoDirect_n_n = fDirect->GetBinContent(1);
569 Double_t fourDirect = fDirect->GetBinContent(2);
570 Double_t threeDirect_2n_n_n = fDirect->GetBinContent(3);
571 Double_t threeDirect_3n_2n_n = fDirect->GetBinContent(4);
572 Double_t fourDirect_3n_n_n_n = fDirect->GetBinContent(5);
573 Double_t fourDirect_2n_n_2n_n = fDirect->GetBinContent(6);
574 Double_t fiveDirect_2n_n_n_n_n = fDirect->GetBinContent(7);
575 Double_t sixDirect_n_n_n_n_n_n = fDirect->GetBinContent(8);
576 Double_t twoDirect_2n_2n = fDirect->GetBinContent(9);
577 Double_t twoDirect_3n_3n = fDirect->GetBinContent(10);
578 Double_t twoDirect_4n_4n = fDirect->GetBinContent(11);
579 Double_t twoDirect_5n_5n = fDirect->GetBinContent(12);
593 //two particle correlations
594 Double_t two_n_n=(AvQ2-AvM)/(AvM*(AvM-1));
595 Double_t two_2n_2n=(AvQ_2n2-AvM)/(AvM*(AvM-1));
596 Double_t two_3n_3n=(AvQ_3n2-AvM)/(AvM*(AvM-1));
597 Double_t two_4n_4n=(AvQ_4n2-AvM)/(AvM*(AvM-1));
598 Double_t two_5n_5n=(AvQ_5n2-AvM)/(AvM*(AvM-1));
606 //four particle correlations:
608 Double_t four_n_n_n_n = (AvQ4+AvQ_2n2-4.*(AvM-2.)*AvQ2-2.*ReQ2nQnstarQnstar)/(AvM*(AvM-1)*(AvM-2)*(AvM-3))+2./((AvM-1)*(AvM-2));
612 //Double_t four_3n_n_n_n=(ReQ3nQnstarQnstarQnstar)/(AvM*(AvM-1)*(AvM-2)*(AvM-3))-3.*(three_3n_2n_n+three_2n_n_n)/(AvM-3.)-(3.*two+3.*two_2n+two_3n)/((AvM-2.)*(AvM-3.))-1./((AvM-1.)*(AvM-2.)*(AvM-3.)); OK!!!
613 //Double_t four_3n_n_n_n_=(ReQ3nQnstarQnstarQnstar-3.*ReQ3nQ2nstarQnstar-3.*ReQ2nQnstarQnstar)/(AvM*(AvM-1.)*(AvM-2.)*(AvM-3.))+ (2.*AvQ_3n2 + 3.*AvQ_2n2 + 6.*AvQ2-6.*AvM ) /(AvM*(AvM-1.)*(AvM-2.)*(AvM-3.)); OK!!! (final version)
617 //Double_t four_2n_n_2n_n = (HereQ2nQnQ2nstarQnstar)/(AvM*(AvM-1)*(AvM-2)*(AvM-3))-2.*(three_2n_n_n+three_3n_2n_n)/(AvM-3.)-((AvM+1.)*two+AvM*two_2n+two_3n)/((AvM-2.)*(AvM-3.))-(AvM)/((AvM-1)*(AvM-2)*(AvM-3)); OK!!!
618 //Double_t four_2n_n_2n_n_Alternative = (HereQ2nQnQ2nstarQnstar-2.*ReQ3nQ2nstarQnstar-2.*ReQ2nQnstarQnstar)/(AvM*(AvM-1)*(AvM-2)*(AvM-3))-((AvM-5)*AvQ2+(AvM-4)*AvQ_2n2-AvQ_3n2)/(AvM*(AvM-1)*(AvM-2)*(AvM-3))+(AvM-6)/((AvM-1)*(AvM-2)*(AvM-3)); OK!!! (final version)
622 //Double_t six_n_n_n_n_n_n=AvQ6/(AvM*(AvM-1)*(AvM-2)*(AvM-3)*(AvM-4)*(AvM-5)) - 3.*(2.*five_2n_n_n_n_n)/(AvM-5) - (2.*four_3n_n_n_n+9.*(AvM-2.)*four+9.*four_2n_n_2n_n)/((AvM-4)*(AvM-5)) - 3.*(2.*(3.*AvM-5.)*three_2n_n_n+2.*three_3n_2n_n)/((AvM-3)*(AvM-4)*(AvM-5)) - ((18.*AvM*AvM-45.*AvM+33.)*two+3.*(3.*AvM-4.)*two_2n+two_3n)/((AvM-2)*(AvM-3)*(AvM-4)*(AvM-5)) - (6.*AvM*AvM-9.*AvM+4.)/((AvM-1)*(AvM-2)*(AvM-3)*(AvM-4)*(AvM-5)); OK!!!
623 //Double_t six_n_n_n_n_n_n = (AvQ6+9.*HereQ2nQnQ2nstarQnstar-6.*HereQ2nQnQnstarQnstarQnstar)/(AvM*(AvM-1)*(AvM-2)*(AvM-3)*(AvM-4)*(AvM-5)) + 4.*(ReQ3nQnstarQnstarQnstar-3.*ReQ3nQ2nstarQnstar)/(AvM*(AvM-1)*(AvM-2)*(AvM-3)*(AvM-4)*(AvM-5)) + 2.*(9.*(AvM-4.)*ReQ2nQnstarQnstar+2.*AvQ_3n2)/(AvM*(AvM-1)*(AvM-2)*(AvM-3)*(AvM-4)*(AvM-5)) - 9.*(AvQ4+AvQ_2n2)/(AvM*(AvM-1)*(AvM-2)*(AvM-3)*(AvM-5)) + (18.*AvQ2 )/(AvM*(AvM-1)*(AvM-3)*(AvM-4)) - (6.)/((AvM-1)*(AvM-2)*(AvM-3)); OK!!! (final version)
634 cout<<"<4>_{3n,n,n,n} correlation from Q-vector = "<<four_3n_n_n_n<<endl;AvQ2
635 cout<<"<4>_{3n,n,n,n} correlation directly = "<<fourDirect_3n_n_n_n<<endl;
637 cout<<"<4>_{2n,n,2n,n} correlation from Q-vector = "<<four_2n_n_2n_n<<endl;
638 cout<<"<4>_{2n,n,2n,n} correlation directly = "<<fourDirect_2n_n_2n_n<<endl;
640 cout<<"<5>_{2n,n,n,n,n} correlation from Q-vector = "<<five_2n_n_n_n_n<<endl;
641 cout<<"<5>_{2n,n,n,n,n} correlation directly = "<<fiveDirect_2n_n_n_n_n<<endl;
643 cout<<"<6>_{n,n,n,n,n,n} correlation from Q-vector = "<<six_n_n_n_n_n_n<<endl;
644 cout<<"<6>_{n,n,n,n,n,n} correlation directly = "<<sixDirect_n_n_n_n_n_n<<endl;
654 Double_t fourthOrderQCumulant = (AvQ4+AvQ_2n2-2.*ReQ2nQnstarQnstar)/(AvM*(AvM-1.)*(AvM-2.)*(AvM-3.)) - (2.*AvQ2*AvQ2)/(AvM*AvM*(AvM-1.)*(AvM-1.)) - (8.*AvQ2)/(AvM*(AvM-1.)*(AvM-1.)*(AvM-3.)) + 2./((AvM-1.)*(AvM-1.)*(AvM-2.));
656 Double_t sixthOrderQCumulant = (AvQ6+9.*HereQ2nQnQ2nstarQnstar-6.*HereQ2nQnQnstarQnstarQnstar)/(AvM*(AvM-1)*(AvM-2)*(AvM-3)*(AvM-4)*(AvM-5)) + 4.*(ReQ3nQnstarQnstarQnstar - 3.*ReQ3nQ2nstarQnstar+AvQ_3n2)/(AvM*(AvM-1)*(AvM-2)*(AvM-3)*(AvM-4)*(AvM-5)) + 18.*(4.*AvM+(AvM-5.)*AvQ2)*ReQ2nQnstarQnstar/(AvM*AvM*(AvM-1)*(AvM-1)*(AvM-2)*(AvM-3)*(AvM-5)) - 9.*(4.*AvM+(AvM-5.)*AvQ2)*(AvQ4+AvQ_2n2)/(AvM*AvM*(AvM-1)*(AvM-1)*(AvM-2)*(AvM-3)*(AvM-5)) + 36.*(5.*AvM-11.)*AvQ2/(AvM*(AvM-1)*(AvM-1)*(AvM-1)*(AvM-2)*(AvM-3)*(AvM-4)) + 12.*AvQ2*AvQ2*(6.*AvM-3.*AvQ2+AvM*AvQ2)/(AvM*AvM*AvM*(AvM-1)*(AvM-1)*(AvM-1)*(AvM-3)) - 24./((AvM-1)*(AvM-1)*(AvM-1)*(AvM-2)*(AvM-3));
666 //cout<<"should be the same? "<<threeDirect_3n_2n_n<<" "<<three_2n_n_nTemp<<endl;
676 cout<<"***************************"<<endl;
678 cout<<"multiplicity = "<<AvM<<endl;
681 Double_t two=(AvQ2-AvM)/(AvM*(AvM-1));
682 Double_t two_2n=(AvQ_2n2-AvM)/(AvM*(AvM-1));
683 Double_t two_3n=(AvQ_3n2-AvM)/(AvM*(AvM-1));
684 Double_t two_4n=(AvQ_4n2-AvM)/(AvM*(AvM-1));
685 Double_t two_5n=(AvQ_5n2-AvM)/(AvM*(AvM-1));
688 //cout<<"two's = "<<two<<" "<<two_2n<<" "<<two_3n<<" "<<two_4n<<" "<<two_5n<<endl;
690 Double_t four=(2.*AvM*(AvM-3.)+AvQ4-4.*(AvM-2.)*AvQ2-2.*ReQ2nQnstarQnstar+AvQ_2n2)/(AvM*(AvM-1)*(AvM-2)*(AvM-3));
691 Double_t three_2n_n_n=(ReQ2nQnstarQnstar-AvM-2*AvM*(AvM-1)*two-AvM*(AvM-1)*two_2n)/(AvM*(AvM-1)*(AvM-2));
694 Double_t three_3n_2n_n=(ReQ3nQ2nstarQnstar-AvM*(AvM-1)*(two+two_2n+two_3n)-AvM)/(AvM*(AvM-1)*(AvM-2));
697 //Double_t four_3n_n_n_n=(ReQ3nQnstarQnstarQnstar-3.*AvM*(AvM-1)*(AvM-2)*(three_2n_n_n+three_3n_2n_n)-AvM*(AvM-1)*(3.*two+3.*two_2n+two_3n)-AvM)/(AvM*(AvM-1)*(AvM-2)*(AvM-3));
699 Double_t four_3n_n_n_n=(ReQ3nQnstarQnstarQnstar)/(AvM*(AvM-1)*(AvM-2)*(AvM-3))-3.*(three_3n_2n_n+three_2n_n_n)/(AvM-3.)-(3.*two+3.*two_2n+two_3n)/((AvM-2.)*(AvM-3.))-1./((AvM-1.)*(AvM-2.)*(AvM-3.));
704 Double_t four_2n_n_2n_n=(HereQ2nQnQ2nstarQnstar-2.*AvM*(AvM-1)*(AvM-2)*(three_2n_n_n+three_3n_2n_n)-AvM*(AvM-1)*((AvM+1)*two+AvM*two_2n+two_3n)-AvM*AvM)/(AvM*(AvM-1)*(AvM-2)*(AvM-3));
721 cout<<"<2> correlation from Q-vector = "<<two<<endl;
722 cout<<"<2> correlation directly = "<<twoDirect_n_n<<endl;
724 cout<<"<4> correlation from Q-vector = "<<four<<endl;
725 cout<<"<4> correlation directly = "<<fourDirect<<endl;
727 cout<<"<3>_{2n,n,n} correlation from Q-vector = "<<three_2n_n_n<<endl;
728 cout<<"<3>_{2n,n,n} correlation directly = "<<threeDirect_2n_n_n<<endl;
730 cout<<"<3>_{3n,2n,n} correlation from Q-vector = "<<three_3n_2n_n<<endl;
731 cout<<"<3>_{3n,2n,n} correlation directly = "<<threeDirect_3n_2n_n<<endl;
733 cout<<"<4>_{3n,n,n,n} correlation from Q-vector = "<<four_3n_n_n_n<<endl;
734 cout<<"<4>_{3n,n,n,n} correlation directly = "<<fourDirect_3n_n_n_n<<endl;
736 cout<<"<4>_{2n,n,2n,n} correlation from Q-vector = "<<four_2n_n_2n_n<<endl;
737 cout<<"<4>_{2n,n,2n,n} correlation directly = "<<fourDirect_2n_n_2n_n<<endl;
739 cout<<"<5>_{2n,n,n,n,n} correlation from Q-vector = "<<five_2n_n_n_n_n<<endl;
740 cout<<"<5>_{2n,n,n,n,n} correlation directly = "<<fiveDirect_2n_n_n_n_n<<endl;
742 cout<<"<6>_{n,n,n,n,n,n} correlation from Q-vector = "<<six_n_n_n_n_n_n<<endl;
743 cout<<"<6>_{n,n,n,n,n,n} correlation directly = "<<sixDirect_n_n_n_n_n_n<<endl;
749 //have so far: <2>, <2>_{2n}, <3>_{2n,n,n}, <4>
752 //cout<<"temp re = "<<ReQ2nQnstarQnstar<<endl;
753 //cout<<"temp im = "<<ImQ2nQnstarQnstar<<endl;
754 //cout<<AvQ2<<" "<<sqrt(AvQ4)<<endl;
761 cout<<"v_2{2} = "<<100*sqrt(two)<<"%"<<endl;
763 cout<<"v_2{2} = Im"<<endl;
767 cout<<"v_2{4} = "<<100*pow(four,1./4.)<<"%"<<endl;
769 cout<<"v_2{4} = Im"<<endl;
775 cout<<"AvM = "<<AvM<<endl;
777 cout<<"*************************************"<<endl;
778 cout<<"*************************************"<<endl;
779 cout<<"flow estimates from Q-cumulants:"<<endl;
780 Double_t cumulant2Q=two;
781 Double_t cumulant4Q=four-2.*two*two;
782 Double_t cumulant6Q=12.*two*two*two-9.*two*four+six_n_n_n_n_n_n;
786 cout<<"v_2{2} = "<<100*pow(cumulant2Q,1./2.)<<"%"<<endl;
788 cout<<"v_2{2} = Im"<<endl;
791 cout<<"v_2{4} = "<<100*pow(-cumulant4Q,1./4.)<<"%"<<endl;
793 cout<<"v_2{4} = Im"<<endl;
796 cout<<"v_2{6} = "<<100*pow((1./4.)*cumulant6Q,1./6.)<<"%"<<endl;
798 cout<<"v_2{6} = Im"<<endl;
801 cout<<"*************************************"<<endl;
802 cout<<"*************************************"<<endl;
807 cout<<"*************************************"<<endl;
808 cout<<"*************************************"<<endl;
809 cout<<"flow estimates from Q-cumulants"<<endl;
810 cout<<"without multiplicities fluctuations:"<<endl;
811 Double_t cumulant2QnoFluct=fQCorr->GetBinContent(1);
812 Double_t cumulant4QnoFluct=fQCorr->GetBinContent(11)-2.*fQCorr->GetBinContent(1)*fQCorr->GetBinContent(1);
813 Double_t cumulant6QnoFluct=12.*fQCorr->GetBinContent(1)*fQCorr->GetBinContent(1)*fQCorr->GetBinContent(1) - 9.*fQCorr->GetBinContent(1)*fQCorr->GetBinContent(11)+fQCorr->GetBinContent(21);
816 if(cumulant2QnoFluct>0.){
817 cout<<"v_2{2} = "<<100*pow(cumulant2QnoFluct,1./2.)<<"%"<<endl;
818 fIntRes->SetBinContent(1,100*pow(cumulant2QnoFluct,1./2.));
820 cout<<"v_2{2} = Im"<<endl;
822 if(cumulant4QnoFluct<0.){
823 cout<<"v_2{4} = "<<100*pow(-cumulant4QnoFluct,1./4.)<<"%"<<endl;
824 fIntRes->SetBinContent(2,100*pow(-cumulant4QnoFluct,1./4.));
826 cout<<"v_2{4} = Im"<<endl;
828 if(cumulant6QnoFluct>0.){
829 cout<<"v_2{6} = "<<100*pow((1./4.)*cumulant6QnoFluct,1./6.)<<"%"<<endl;
830 fIntRes->SetBinContent(3,100*pow((1./4.)*cumulant6QnoFluct,1./6.));
832 cout<<"v_2{6} = Im"<<endl;
835 cout<<"*************************************"<<endl;
836 cout<<"*************************************"<<endl;
844 cout<<"*****************************************************************"<<endl;
845 cout<<"*****************************************************************"<<endl;
846 cout<<"direct (nested loops) correlations vs correlations from Q-vectors"<<endl;
847 cout<<"for ARBITRARY multiplicity:"<<endl;
849 cout<<"avarage multiplicity = "<<AvM<<endl;
851 cout<<"<2>_{n|n} correlation from Q-vector = "<<fQCorr->GetBinContent(1)<<endl;
852 cout<<"<2>_{n|n} correlation nested loops = "<<fDirect->GetBinContent(1)<<endl;
854 cout<<"<4>_{n,n|n,n} correlation from Q-vector = "<<fQCorr->GetBinContent(11)<<endl;
855 cout<<"<4>_{n,n|n,n} correlation nested loops = "<<fDirect->GetBinContent(2)<<endl;
857 cout<<"<6>_{n,n,n|n,n,n} correlation from Q-vector = "<<fQCorr->GetBinContent(21)<<endl;
858 cout<<"<6>_{n,n,n|n,n,n} correlation nested loops = "<<fDirect->GetBinContent(8)<<endl;
859 cout<<"*****************************************************************"<<endl;
860 cout<<"*****************************************************************"<<endl;
868 cout<<"****** BDO ******"<<endl;
870 cout<<"v_2{4} = "<<100*pow(-BDO4,1./4.)<<"%"<<endl;
872 cout<<"v_2{4} = Im"<<endl;
875 cout<<"v_2{6} = "<<100*pow((1./4.)*BDO6,1./6.)<<"%"<<endl;
877 cout<<"v_2{6} = Im"<<endl;
883 cout<<"fourth order Q-cumulant should be the same and BDO4? "<<fourthOrderQCumulant<<" "<<cumulant4Q<<" "<<BDO4<<endl;
886 cout<<"sixth order Q-cumulant should be the same and BDO6? "<<sixthOrderQCumulant<<" "<<cumulant6Q<<" "<<BDO6<<endl;
889 cout<<"*************************************"<<endl;
890 cout<<"*************************************"<<endl;
895 cout<<"*********************"<<endl;
896 cout<<"multiplicity = "<<AvM<<endl;
897 cout<<"correlations: "<<endl;
898 cout<<"direct = "<<twoDirect_n_n<<endl;
899 cout<<"approx = "<<two_n_n<<endl;
900 cout<<"weight = "<<fQCorr->GetBinContent(1)<<endl;
901 cout<<"*********************"<<endl;
902 cout<<"test = "<<fQCorr->GetBinContent(11)<<" "<<four<<endl;
934 Bool_t bNestedLoopsResults=kFALSE;
935 if(bNestedLoopsResults)
937 //needed for direct correlations (obtained from nested loops)
940 cout<<" **** cross-checking the formulas ****"<<endl;
941 cout<<" **** for integrated flow ****"<<endl;
942 cout<<"(selected only events for which 0 < M < 12 "<<endl;
943 cout<<" from dataset in /data/alice2/ante/AOD) "<<endl;
946 cout<<" nEvts = "<<nEvts<<", AvM = "<<AvM<<endl;
948 cout<<"<2>_{n|n} from Q-vectors = "<<fQCorr->GetBinContent(1)<<endl;
949 cout<<"<2>_{n|n} from nested loops = "<<fDirect->GetBinContent(1)<<endl;
951 cout<<"<2>_{2n|2n} from Q-vectors = "<<fQCorr->GetBinContent(2)<<endl;
952 cout<<"<2>_{2n|2n} from nested loops = "<<fDirect->GetBinContent(2)<<endl;
954 cout<<"<2>_{3n|3n} from Q-vectors = "<<fQCorr->GetBinContent(3)<<endl;
955 cout<<"<2>_{3n|3n} from nested loops = "<<fDirect->GetBinContent(3)<<endl;
957 cout<<"<2>_{4n|4n} from Q-vectors = "<<fQCorr->GetBinContent(4)<<endl;
958 cout<<"<2>_{4n|4n} from nested loops = "<<fDirect->GetBinContent(4)<<endl;
960 cout<<"<3>_{2n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(6)<<endl;
961 cout<<"<3>_{2n,n,n} from nested loops = "<<fDirect->GetBinContent(6)<<endl;
963 cout<<"<3>_{3n,2n,n} from Q-vectors = "<<fQCorr->GetBinContent(7)<<endl;
964 cout<<"<3>_{3n,2n,n} from nested loops = "<<fDirect->GetBinContent(7)<<endl;
966 cout<<"<3>_{4n,2n,2n} from Q-vectors = "<<fQCorr->GetBinContent(8)<<endl;
967 cout<<"<3>_{4n,2n,2n} from nested loops = "<<fDirect->GetBinContent(8)<<endl;
969 cout<<"<3>_{4n,3n,n} from Q-vectors = "<<fQCorr->GetBinContent(9)<<endl;
970 cout<<"<3>_{4n,3n,n} from nested loops = "<<fDirect->GetBinContent(9)<<endl;
972 cout<<"<4>_{n,n|n,n} from Q-vectors = "<<fQCorr->GetBinContent(11)<<endl;
973 cout<<"<4>_{n,n|n,n} from nested loops = "<<fDirect->GetBinContent(11)<<endl;
975 cout<<"<4>_{2n,n|2n,n} from Q-vectors = "<<fQCorr->GetBinContent(12)<<endl;
976 cout<<"<4>_{2n,n|2n,n} from nested loops = "<<fDirect->GetBinContent(12)<<endl;
978 cout<<"<4>_{2n,2n|2n,2n} from Q-vectors = "<<fQCorr->GetBinContent(13)<<endl;
979 cout<<"<4>_{2n,2n|2n,2n} from nested loops = "<<fDirect->GetBinContent(13)<<endl;
981 cout<<"<4>_{3n|n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(14)<<endl;
982 cout<<"<4>_{3n|n,n,n} from nested loops = "<<fDirect->GetBinContent(14)<<endl;
984 cout<<"<4>_{3n,n|3n,n} from Q-vectors = "<<fQCorr->GetBinContent(15)<<endl;
985 cout<<"<4>_{3n,n|3n,n} from nested loops = "<<fDirect->GetBinContent(15)<<endl;
987 cout<<"<4>_{3n,n|2n,2n} from Q-vectors = "<<fQCorr->GetBinContent(16)<<endl;
988 cout<<"<4>_{3n,n|2n,2n} from nested loops = "<<fDirect->GetBinContent(16)<<endl;
990 cout<<"<4>_{4n|2n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(17)<<endl;
991 cout<<"<4>_{4n|2n,n,n} from nested loops = "<<fDirect->GetBinContent(17)<<endl;
993 cout<<"<5>_{2n,n|n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(19)<<endl;
994 cout<<"<5>_{2n,n|n,n,n} from nested loops = "<<fDirect->GetBinContent(19)<<endl;
996 cout<<"<5>_{2n,2n|2n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(20)<<endl;
997 cout<<"<5>_{2n,2n|2n,n,n} from nested loops = "<<fDirect->GetBinContent(20)<<endl;
999 cout<<"<5>_{3n,n|2n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(21)<<endl;
1000 cout<<"<5>_{3n,n|2n,n,n} from nested loops = "<<fDirect->GetBinContent(21)<<endl;
1002 cout<<"<5>_{4n|n,n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(22)<<endl;
1003 cout<<"<5>_{4n|n,n,n,n} from nested loops = "<<fDirect->GetBinContent(22)<<endl;
1005 cout<<"<6>_{n,n,n|n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(24)<<endl;
1006 cout<<"<6>_{n,n,n|n,n,n} from nested loops = "<<fDirect->GetBinContent(24)<<endl;
1008 cout<<"<6>_{2n,n,n|2n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(25)<<endl;
1009 cout<<"<6>_{2n,n,n|2n,n,n} from nested loops = "<<fDirect->GetBinContent(25)<<endl;
1011 cout<<"<6>_{2n,2n|n,n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(26)<<endl;
1012 cout<<"<6>_{2n,2n|n,n,n,n} from nested loops = "<<fDirect->GetBinContent(26)<<endl;
1014 cout<<"<6>_{3n,n|n,n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(27)<<endl;
1015 cout<<"<6>_{3n,n|n,n,n,n} from nested loops = "<<fDirect->GetBinContent(27)<<endl;
1017 cout<<"<7>_{2n,n,n|n,n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(29)<<endl;
1018 cout<<"<7>_{2n,n,n|n,n,n,n} from nested loops = "<<fDirect->GetBinContent(29)<<endl;
1020 cout<<"<8>_{n,n,n,n|n,n,n,n} from Q-vectors = "<<fQCorr->GetBinContent(31)<<endl;
1021 cout<<"<8>_{n,n,n,n|n,n,n,n} from nested loops = "<<fDirect->GetBinContent(31)<<endl;
1024 //DIFFERENTIAL FLOW:
1025 //41st bin: <2'>_{n|n}
1026 //42nd bin: <2'>_{2n|2n}
1027 //46th bin: <3'>_{2n|n,n}
1028 //47th bin: <3'>_{n,n|2n}
1029 //51st bin: <4'>_{n,n|n,n}
1033 cout<<" **** cross-checking the formulas ****"<<endl;
1034 cout<<" **** for differential flow ****"<<endl;
1035 cout<<"(selected only events for which 0 < M < 12 "<<endl;
1036 cout<<" from dataset in /data/alice2/ante/AOD) "<<endl;
1039 cout<<"nEvts = "<<nEvts<<", AvM = "<<AvM<<endl;
1040 cout<<"0.5 < Pt < 0.6 GeV"<<endl;
1042 cout<<"<2'>_{n|n} from Q-vectors = "<<fbinPt2p1n1nPOI->GetBinContent(6)<<endl;
1043 cout<<"<2'>_{n|n} from nested loops = "<<fDirect->GetBinContent(41)<<endl;
1045 cout<<"<2'>_{2n|2n} from Q-vectors = "<<fbinPt2p2n2nPOI->GetBinContent(6)<<endl;
1046 cout<<"<2'>_{2n|2n} from nested loops = "<<fDirect->GetBinContent(42)<<endl;
1048 cout<<"<3'>_{2n|n,n} from Q-vectors = "<<fbinPt3p2n1n1nPOI->GetBinContent(6)<<endl;
1049 cout<<"<3'>_{2n|n,n} from nested loops = "<<fDirect->GetBinContent(46)<<endl;
1051 cout<<"<3'>_{n,n|2n} from Q-vectors = "<<fbinPt3p1n1n2nPOI->GetBinContent(6)<<endl;
1052 cout<<"<3'>_{n,n|2n} from nested loops = "<<fDirect->GetBinContent(47)<<endl;
1054 cout<<"<4'>_{n,n|n,n} from Q-vectors = "<<fbinPt4p1n1n1n1nPOI->GetBinContent(6)<<endl;
1055 cout<<"<4'>_{n,n|n,n} from nested loops = "<<fDirect->GetBinContent(51)<<endl;
1057 cout<<"<5'>_{2n,n|n,n,n} from Q-vectors = "<<endl;
1058 cout<<"<5'>_{2n,n|n,n,n} from nested loops = "<<fDirect->GetBinContent(56)<<endl;
1060 cout<<"<6'>_{n,n,n|n,n,n} from Q-vectors = "<<endl;
1061 cout<<"<6'>_{n,n,n|n,n,n} from nested loops = "<<fDirect->GetBinContent(61)<<endl;
1063 cout<<"<7'>_{2n,n,n|n,n,n,n} from Q-vectors = "<<endl;
1064 cout<<"<7'>_{2n,n,n|n,n,n,n} from nested loops = "<<fDirect->GetBinContent(66)<<endl;
1066 cout<<"<8'>_{n,n,n,n|n,n,n,n} from Q-vectors = "<<endl;
1067 cout<<"<8'>_{n,n,n,n|n,n,n,n} from nested loops = "<<fDirect->GetBinContent(71)<<endl;
1069 }//end of if(bNestedLoopsResults)