1 /*************************************************************************
\r
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
\r
4 * Author: The ALICE Off-line Project. *
\r
5 * Contributors are mentioned in the code where appropriate. *
\r
7 * Permission to use, copy, modify and distribute this software and its *
\r
8 * documentation strictly for non-commercial purposes is hereby granted *
\r
9 * without fee, provided that the above copyright notice appears in all *
\r
10 * copies and that both the copyright notice and this permission notice *
\r
11 * appear in the supporting documentation. The authors make no claims *
\r
12 * about the suitability of this software for any purpose. It is *
\r
13 * provided "as is" without express or implied warranty. *
\r
14 **************************************************************************/
18 /**********************************************************
19 * In this class azimuthal correlators in mixed harmonics *
20 * are implemented in terms of Q-vectors. This approach *
21 * doesn't require evaluation of nested loops. This class *
24 * a) Extract subdominant harmonics (like v1 and v4); *
25 * b) Study strong parity violation. *
27 * Author: Ante Bilandzic (abilandzic@gmail.com) *
28 *********************************************************/
\r
30 #define AliFlowAnalysisWithMixedHarmonics_cxx
\r
32 #include "Riostream.h"
\r
33 #include "AliFlowCommonConstants.h"
\r
34 #include "AliFlowCommonHist.h"
\r
35 #include "AliFlowCommonHistResults.h"
\r
41 #include "TProfile2D.h"
\r
43 #include "AliFlowEventSimple.h"
\r
44 #include "AliFlowTrackSimple.h"
\r
45 #include "AliFlowAnalysisWithMixedHarmonics.h"
\r
49 ClassImp(AliFlowAnalysisWithMixedHarmonics)
\r
51 //================================================================================================================
53 AliFlowAnalysisWithMixedHarmonics::AliFlowAnalysisWithMixedHarmonics():
\r
55 fHistListName(NULL),
\r
57 fAnalysisSettings(NULL),
58 fCorrelatorInteger(2),
59 fNoOfMultipicityBins(10),
60 fMultipicityBinWidth(2),
62 fCorrectForDetectorEffects(kTRUE),
\r
77 fUsePhiWeights(kFALSE),
\r
78 fUsePtWeights(kFALSE),
\r
79 fUseEtaWeights(kFALSE),
\r
80 fUseParticleWeights(NULL),
\r
87 f3pCorrelatorEBE(NULL),
88 fNonIsotropicTermsEBE(NULL),
89 f3pCorrelatorPro(NULL),
90 fNonIsotropicTermsPro(NULL),
91 f3pCorrelatorVsMPro(NULL),
92 fNonIsotropicTermsVsMPro(NULL),
94 f3pCorrelatorHist(NULL),
95 fDetectorBiasHist(NULL),
96 fNonIsotropicTermsHist(NULL),
97 f3pCorrelatorVsMHist(NULL),
98 fDetectorBiasVsMHist(NULL),
99 fNonIsotropicTermsVsMHist(NULL)
\r
102 \r // Base list to hold all output objects:
\r
103 fHistList = new TList();
104 fHistListName = new TString("cobjMH");
\r
105 fHistList->SetName(fHistListName->Data());
\r
106 fHistList->SetOwner(kTRUE);
108 // List to hold histograms with phi, pt and eta weights:
\r
109 fWeightsList = new TList();
111 // List to hold objects with final results:
\r
112 fResultsList = new TList();
114 } // AliFlowAnalysisWithMixedHarmonics::AliFlowAnalysisWithMixedHarmonics()
\r
116 //================================================================================================================
\r
118 AliFlowAnalysisWithMixedHarmonics::~AliFlowAnalysisWithMixedHarmonics()
\r
124 } // end of AliFlowAnalysisWithMixedHarmonics::~AliFlowAnalysisWithMixedHarmonics()
\r
126 //================================================================================================================
\r
128 void AliFlowAnalysisWithMixedHarmonics::Init()
\r
130 // Initialize and book all objects.
132 // a) Cross check if the user settings make sense before starting;
133 // b) Access all common constants;
134 // c) Book and nest all lists in the base list fHistList;
\r
135 // d) Book common control histograms;
136 // e) Book all event-by-event quantities;
137 // f) Book all all-event quantities;
138 // g) Book and fill histograms to hold phi, pt and eta weights.
140 this->CrossCheckSettings();
\r
141 this->AccessConstants();
142 this->BookAndNestAllLists();
143 this->BookProfileHoldingSettings();
\r
144 this->BookCommonHistograms();
145 this->BookAllEventByEventQuantities();
146 this->BookAllAllEventQuantities();
147 this->BookAndFillWeightsHistograms();
\r
149 } // end of void AliFlowAnalysisWithMixedHarmonics::Init()
\r
151 //================================================================================================================
\r
153 void AliFlowAnalysisWithMixedHarmonics::Make(AliFlowEventSimple* anEvent)
\r
155 // Running over data only in this method.
\r
157 // a) Define local variables;
158 // b) Fill common control histograms;
159 // c) Loop over data and calculate e-b-e quantities Q_{n,k} and S_{p,k};
160 // d) Calculate 3-p azimuthal correlator and non-isotropic terms in terms of Q_{n,k} and S_{p,k};
161 // e) Reset all event-by-event quantities.
\r
163 this->CheckPointersUsedInMake();
165 // a) Define local variables:
166 Double_t dPhi = 0.; // azimuthal angle in the laboratory frame
\r
167 Double_t dPt = 0.; // transverse momentum
\r
168 Double_t dEta = 0.; // pseudorapidity
\r
169 Double_t wPhi = 1.; // phi weight
\r
170 Double_t wPt = 1.; // pt weight
\r
171 Double_t wEta = 1.; // eta weight
172 AliFlowTrackSimple *aftsTrack = NULL; // simple track
174 // b) Fill common control histograms.
175 fCommonHists->FillControlHistograms(anEvent);
177 // c) Loop over data and calculate e-b-e quantities:
\r
178 Int_t nPrim = anEvent->NumberOfTracks(); // nPrim = total number of primary tracks, i.e. nPrim = nRP + nPOI + rest, where:
\r
179 // nRP = # of particles used to determine the reaction plane ("Reference Particles");
\r
180 // nPOI = # of particles of interest for a detailed flow analysis ("Particles of Interest");
\r
181 // rest = # of particles which are not niether RPs nor POIs.
\r
182 // Start loop over data:
183 for(Int_t i=0;i<nPrim;i++)
\r
185 aftsTrack=anEvent->GetTrack(i);
\r
188 if(!(aftsTrack->InRPSelection() || aftsTrack->InPOISelection())) continue; // consider only tracks which are either RPs or POIs
\r
189 Int_t n = fCorrelatorInteger; // integer n in the correlator cos[n(2phi1-phi2-phi3)]
\r
190 if(aftsTrack->InRPSelection()) // checking RP condition:
\r
192 dPhi = aftsTrack->Phi();
\r
193 dPt = aftsTrack->Pt();
\r
194 dEta = aftsTrack->Eta();
\r
195 if(fUsePhiWeights && fPhiWeights && fnBinsPhi) // determine phi-weight for this particle:
\r
197 wPhi = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*fnBinsPhi/TMath::TwoPi())));
\r
199 if(fUsePtWeights && fPtWeights && fnBinsPt) // determine pt-weight for this particle:
\r
201 wPt = fPtWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/fPtBinWidth)));
\r
203 if(fUseEtaWeights && fEtaWeights && fEtaBinWidth) // determine eta-weight for this particle:
\r
205 wEta = fEtaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fEtaBinWidth)));
\r
207 // Calculate Re[Q_{m*n,k}] and Im[Q_{m*n,k}], (m = 1,2 and k = 0,1,2,3) for this event:
\r
208 for(Int_t m=0;m<2;m++)
\r
210 for(Int_t k=0;k<4;k++) // to be improved (what is maximum k that I need?)
\r
212 (*fReQnk)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1)*n*dPhi);
\r
213 (*fImQnk)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1)*n*dPhi);
\r
216 // Calculate partially S_{p,k} for this event (final calculation of S_{p,k} follows after the loop over data bellow):
\r
217 for(Int_t p=0;p<4;p++) // to be improved (what is maximum p that I need?)
\r
219 for(Int_t k=0;k<4;k++) // to be improved (what is maximum k that I need?)
\r
221 (*fSpk)(p,k)+=pow(wPhi*wPt*wEta,k);
\r
224 } // end of if(aftsTrack->InRPSelection())
\r
225 } else // to if(aftsTrack)
\r
228 cout<<" WARNING (MH): No particle! (i.e. aftsTrack is a NULL pointer in AFAWMH::Make().)"<<endl;
\r
231 } // end of for(Int_t i=0;i<nPrim;i++)
\r
233 // Calculate the final expressions for S_{p,k}:
\r
234 for(Int_t p=0;p<4;p++) // to be improved (what is maximum p that I need?)
\r
236 for(Int_t k=0;k<4;k++) // to be improved (what is maximum that I need?)
\r
238 (*fSpk)(p,k)=pow((*fSpk)(p,k),p+1);
\r
242 // d) Calculate 3-p azimuthal correlator in terms of Q_{n,k} and S_{p,k}:
243 if(anEvent->GetEventNSelTracksRP() >= 3)
245 this->Calculate3pCorrelator();
247 if(anEvent->GetEventNSelTracksRP() >= 0) // to be improved (is this correct if statement?)
249 this->CalculateNonIsotropicTerms();
252 // e) Reset all event-by-event quantities:
\r
253 this->ResetEventByEventQuantities();
255 } // end of AliFlowAnalysisWithMixedHarmonics::Make(AliFlowEventSimple* anEvent)
\r\r
256 //================================================================================================================
\r
258 void AliFlowAnalysisWithMixedHarmonics::Finish()
\r
260 // Calculate the final results.
262 // a) Check all pointers used in this method;
263 // b) Access settings for analysis with mixed harmonics;
264 // c) Calculate errors for non-isotropic terms;
265 // d) Correct for detector effects;
266 // e) Quantify bias to 3-p correlator coming from detector effects.
268 this->CheckPointersUsedInFinish();
269 this->AccessSettings();
270 this->FinalizeNonIsotropicTerms();
271 this->CorrectForDetectorEffects();
272 this->QuantifyBiasFromDetectorEffects();
275 cout<<"*************************************"<<endl;
\r
276 cout<<"*************************************"<<endl;
\r
277 cout<<" flow estimates from mixed harmonics "<<endl;
279 if(fCorrelatorInteger!=1)
281 cout<< " cos["<<fCorrelatorInteger<<"(2phi1-phi2-phi3)] = "<<f3pCorrelatorPro->GetBinContent(1)<<endl;
284 cout<< " cos(2phi1-phi2-phi3) = "<<f3pCorrelatorPro->GetBinContent(1)<<endl;
288 cout<<"*************************************"<<endl;
\r
289 cout<<"*************************************"<<endl;
\r
291 } // end of AliFlowAnalysisWithMixedHarmonics::Finish()
\r
293 //================================================================================================================
\r
295 void AliFlowAnalysisWithMixedHarmonics::GetOutputHistograms(TList *outputListHistos)
\r
297 // Get pointers to all objects saved in the output file.
299 // a) Get pointers for common control histograms.
\r \r
300 if(outputListHistos)
\r
302 this->SetHistList(outputListHistos);
306 cout<<" WARNING (MH): fHistList is NULL in AFAWMH::GOH() !!!!"<<endl;
310 this->GetPointersForCommonHistograms();
311 this->GetPointersForResultsHistograms();
\r
315 cout<<" WARNING (MH): outputListHistos is NULL in AFAWMH::GOH() !!!!"<<endl;
320 } // end of void AliFlowAnalysisWithMixedHarmonics::GetOutputHistograms(TList *outputListHistos)
\r
322 //================================================================================================================
324 void AliFlowAnalysisWithMixedHarmonics::GetPointersForCommonHistograms()
\r
326 // Get pointers to common control histograms.
\r
328 TString commonHistsName = "AliFlowCommonHistMH";
\r
329 AliFlowCommonHist *commonHist = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHistsName.Data()));
\r
332 this->SetCommonHists(commonHist);
336 cout<<" WARNING (MH): commonHist is NULL in AFAWMH::GPFCH() !!!!"<<endl;
341 } // end of void AliFlowAnalysisWithMixedHarmonics::GetPointersForCommonHistograms()
343 //================================================================================================================
345 void AliFlowAnalysisWithMixedHarmonics::GetPointersForResultsHistograms()
\r
347 // Get pointers to histograms holding final results.
\r
349 TList *resultsList = NULL;
\r
350 resultsList = dynamic_cast<TList*>(fHistList->FindObject("Results"));
\r
353 cout<<"WARNING: resultsList is NULL in AFAWMH::GPFRH() !!!!"<<endl;
\r
357 TString s3pCorrelatorHistName = "f3pCorrelatorHist";
\r
358 TH1D *h3pCorrelatorHist = dynamic_cast<TH1D*>(resultsList->FindObject(s3pCorrelatorHistName.Data()));
\r
359 if(h3pCorrelatorHist)
\r
361 this->Set3pCorrelatorHist(h3pCorrelatorHist);
\r
363 TString detectorBiasHistName = "fDetectorBiasHist";
\r
364 TH1D *detectorBiasHist = dynamic_cast<TH1D*>(resultsList->FindObject(detectorBiasHistName.Data()));
\r
365 if(detectorBiasHist)
\r
367 this->SetDetectorBiasHist(detectorBiasHist);
\r
369 TString nonIsotropicTermsHistName = "fNonIsotropicTermsHist";
\r
370 TH1D *nonIsotropicTermsHist = dynamic_cast<TH1D*>(resultsList->FindObject(nonIsotropicTermsHistName.Data()));
\r
371 if(nonIsotropicTermsHist)
\r
373 this->SetNonIsotropicTermsHist(nonIsotropicTermsHist);
\r
376 } // end of void AliFlowAnalysisWithMixedHarmonics::GetPointersForResultsHistograms()
378 //================================================================================================================
380 void AliFlowAnalysisWithMixedHarmonics::WriteHistograms(TString outputFileName)
\r
382 // Store the final results in output .root file.
\r
383 TFile *output = new TFile(outputFileName.Data(),"RECREATE");
\r
384 fHistList->Write(fHistList->GetName(),TObject::kSingleKey);
\r
388 //================================================================================================================
\r
390 void AliFlowAnalysisWithMixedHarmonics::WriteHistograms(TDirectoryFile *outputFileName)
392 // Store the final results in output .root file.
393 fHistList->SetName("cobjMH");
394 fHistList->SetOwner(kTRUE);
395 outputFileName->Add(fHistList);
396 outputFileName->Write(outputFileName->GetName(),TObject::kSingleKey);
399 //================================================================================================================
401 void AliFlowAnalysisWithMixedHarmonics::BookAndNestAllLists()
\r
403 // Book and nest all list in base list fHistList.
406 fWeightsList->SetName("Weights");
\r
407 fWeightsList->SetOwner(kTRUE);
\r
408 fHistList->Add(fWeightsList);
410 fResultsList->SetName("Results");
\r
411 fResultsList->SetOwner(kTRUE);
\r
412 fHistList->Add(fResultsList);
414 } // end of void AliFlowAnalysisWithMixedHarmonics::BookAndNestAllLists()
416 //================================================================================================================
418 void AliFlowAnalysisWithMixedHarmonics::BookProfileHoldingSettings()
\r
420 // Book profile to hold all analysis settings.
422 TString analysisSettingsName = "fAnalysisSettings";
\r
423 fAnalysisSettings = new TProfile(analysisSettingsName.Data(),"Settings for analysis with mixed harmonics",5,0,5);
424 fAnalysisSettings->GetXaxis()->SetBinLabel(1,"Integer n in cos(n(2#phi_{1}-#phi_{2}-#phi_{3}))");
425 fAnalysisSettings->Fill(0.5,fCorrelatorInteger);
\r
426 fAnalysisSettings->GetXaxis()->SetBinLabel(2,"Corrected for detector effects?");
427 fAnalysisSettings->Fill(1.5,(Int_t)fCorrectForDetectorEffects);
428 fAnalysisSettings->GetXaxis()->SetBinLabel(3,"# of multiplicity bins");
429 fAnalysisSettings->Fill(2.5,fNoOfMultipicityBins);
430 fAnalysisSettings->GetXaxis()->SetBinLabel(4,"Width of multiplicity bins");
431 fAnalysisSettings->Fill(3.5,fMultipicityBinWidth);
432 fAnalysisSettings->GetXaxis()->SetBinLabel(5,"Minimal multiplicity");
433 fAnalysisSettings->Fill(4.5,fMinMultiplicity);
434 fHistList->Add(fAnalysisSettings);
436 } // end of void AliFlowAnalysisWithMixedHarmonics::BookProfileHoldingSettings()
438 //================================================================================================================
440 void AliFlowAnalysisWithMixedHarmonics::BookCommonHistograms()
\r
442 // Book common control histograms and common histograms for final results.
444 TString commonHistsName = "AliFlowCommonHistMH";
\r
445 fCommonHists = new AliFlowCommonHist(commonHistsName.Data());
\r
446 fHistList->Add(fCommonHists);
\r
448 } // end of void AliFlowAnalysisWithMixedHarmonics::BookCommonHistograms()
\r
450 //================================================================================================================
452 void AliFlowAnalysisWithMixedHarmonics::BookAllEventByEventQuantities()
\r
454 // Book all event-by-event quantitites.
456 // Q_{n,k} and S{p,k}:
457 fReQnk = new TMatrixD(2,4); // to be improved(bound on k)
\r
458 fImQnk = new TMatrixD(2,4); // to be improved(bound on k)
\r
459 fSpk = new TMatrixD(4,4); // to be improved(bound on p and k)
460 // 3-p correlator <cos[n(2phi1-phi2-phi3)]> for single event:
461 TString s3pCorrelatorEBEName = "f3pCorrelatorEBE";
\r
462 f3pCorrelatorEBE = new TH1D(s3pCorrelatorEBEName.Data(),"<cos[n(2#phi_{1}-#phi_{2}-#phi_{3})]> for single event",1,0,1);
463 // Correction terms for non-uniform acceptance to <cos[n(2phi1-phi2-phi3)]> for single event:
464 TString nonIsotropicTermsEBEName = "fNonIsotropicTermsEBE";
\r
465 fNonIsotropicTermsEBE = new TH1D(nonIsotropicTermsEBEName.Data(),"Non-isotropic terms for single event",10,0,10);
467 } // end fo void AliFlowAnalysisWithMixedHarmonics::BookAllEventByEventQuantities()
\r
468 //================================================================================================================
470 void AliFlowAnalysisWithMixedHarmonics::BookAllAllEventQuantities()
472 // Book all all-event quantitites.
474 // a) Book quantites without multiplicity binning;
475 // b) Book quantites with multiplicity binning.
477 // a) Book quantites without multiplicity binning:
478 // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with wrong error):
479 TString s3pCorrelatorProName = "f3pCorrelatorPro";
\r
480 f3pCorrelatorPro = new TProfile(s3pCorrelatorProName.Data(),"<<cos[n(2#phi_{1}-#phi_{2}-#phi_{3})]>> for all events (errors are wrong here!)",1,0,1,"s");
481 fHistList->Add(f3pCorrelatorPro);
482 // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with correct error):
483 TString s3pCorrelatorHistName = "f3pCorrelatorHist";
\r
484 f3pCorrelatorHist = new TH1D(s3pCorrelatorHistName.Data(),"<<cos[n(2#phi_{1}-#phi_{2}-#phi_{3})]>> for all events",1,0,1);
485 fResultsList->Add(f3pCorrelatorHist);
486 // Correction terms for non-uniform acceptance to <cos[n(2phi1-phi2-phi3)]> for all events (with wrong errors):
487 TString nonIsotropicTermsProName = "fNonIsotropicTermsPro";
\r
488 fNonIsotropicTermsPro = new TProfile(nonIsotropicTermsProName.Data(),"Non-isotropic terms for all events (errors are wrong here!)",10,0,10,"s");
489 fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(1,"cos(n(#phi_{1}))");
\r
490 fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(2,"sin(n(#phi_{1}))");
491 fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(3,"cos(2n(#phi_{1}))");
\r
492 fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(4,"sin(2n(#phi_{1}))");
\r
493 fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(5,"cos(n(#phi_{1}+#phi_{2}))");
\r
494 fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(6,"sin(n(#phi_{1}+#phi_{2}))");
495 fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(7,"cos(n(2#phi_{1}-#phi_{2}))");
\r
496 fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(8,"sin(n(2#phi_{1}-#phi_{2}))");
497 fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(9,"cos(n(#phi_{1}-#phi_{2}-#phi_{3}))");
\r
498 fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(10,"sin(n(#phi_{1}-#phi_{2}-#phi_{3})");
499 fHistList->Add(fNonIsotropicTermsPro);
500 // Correction terms for non-uniform acceptance to <cos[n(2phi1-phi2-phi3)]> for all events (with correct errors):
501 TString nonIsotropicTermsHistName = "fNonIsotropicTermsHist";
\r
502 fNonIsotropicTermsHist = new TH1D(nonIsotropicTermsHistName.Data(),"Non-isotropic terms for all events",10,0,10);
503 fNonIsotropicTermsHist->GetXaxis()->SetBinLabel(1,"cos(n(#phi_{1}))");
\r
504 fNonIsotropicTermsHist->GetXaxis()->SetBinLabel(2,"sin(n(#phi_{1}))");
505 fNonIsotropicTermsHist->GetXaxis()->SetBinLabel(3,"cos(2n(#phi_{1}))");
\r
506 fNonIsotropicTermsHist->GetXaxis()->SetBinLabel(4,"sin(2n(#phi_{1}))");
\r
507 fNonIsotropicTermsHist->GetXaxis()->SetBinLabel(5,"cos(n(#phi_{1}+#phi_{2}))");
\r
508 fNonIsotropicTermsHist->GetXaxis()->SetBinLabel(6,"sin(n(#phi_{1}+#phi_{2}))");
509 fNonIsotropicTermsHist->GetXaxis()->SetBinLabel(7,"cos(n(2#phi_{1}-#phi_{2}))");
\r
510 fNonIsotropicTermsHist->GetXaxis()->SetBinLabel(8,"sin(n(2#phi_{1}-#phi_{2}))");
511 fNonIsotropicTermsHist->GetXaxis()->SetBinLabel(9,"cos(n(#phi_{1}-#phi_{2}-#phi_{3}))");
\r
512 fNonIsotropicTermsHist->GetXaxis()->SetBinLabel(10,"sin(n(#phi_{1}-#phi_{2}-#phi_{3})");
513 fResultsList->Add(fNonIsotropicTermsHist);
514 // Quantified bias comming from detector inefficiencies to 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> (in %)
515 TString detectorBiasHistName = "fDetectorBiasHist";
\r
516 fDetectorBiasHist = new TH1D(detectorBiasHistName.Data(),"Bias coming from detector inefficiences",1,0,1);
517 fDetectorBiasHist->GetXaxis()->SetBinLabel(1,"#left|1 - #frac{corrected}{not-corrected}#right| (in %)");
518 fResultsList->Add(fDetectorBiasHist);
520 // b) Book quantites with multiplicity binning.
521 // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events versus multiplicity (with wrong error):
522 TString s3pCorrelatorVsMProName = "f3pCorrelatorVsMPro";
\r
523 f3pCorrelatorVsMPro = new TProfile(s3pCorrelatorVsMProName.Data(),"<<cos[n(2#phi_{1}-#phi_{2}-#phi_{3})]>> vs M for all events (errors are wrong here!)",fNoOfMultipicityBins+1,0,fNoOfMultipicityBins+1,"s");
524 for(Int_t b=1;b<=fNoOfMultipicityBins;b++)
526 f3pCorrelatorVsMPro->GetXaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+b*fMultipicityBinWidth)));
528 f3pCorrelatorVsMPro->GetXaxis()->SetBinLabel(fNoOfMultipicityBins+1,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth)));
529 fHistList->Add(f3pCorrelatorVsMPro);
530 // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with correct error):
531 TString s3pCorrelatorVsMHistName = "f3pCorrelatorVsMHist";
\r
532 f3pCorrelatorVsMHist = new TH1D(s3pCorrelatorVsMHistName.Data(),"<<cos[n(2#phi_{1}-#phi_{2}-#phi_{3})]>> vs M for all events",fNoOfMultipicityBins+1,0,fNoOfMultipicityBins+1);
533 for(Int_t b=1;b<=fNoOfMultipicityBins;b++)
535 f3pCorrelatorVsMHist->GetXaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+b*fMultipicityBinWidth)));
537 f3pCorrelatorVsMHist->GetXaxis()->SetBinLabel(fNoOfMultipicityBins+1,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth)));
538 fResultsList->Add(f3pCorrelatorVsMHist);
539 // Correction terms for non-uniform acceptance to <cos[n(2phi1-phi2-phi3)]> for all events vs M (with wrong errors):
540 TString nonIsotropicTermsVsMProName = "fNonIsotropicTermsVsMPro";
\r
541 fNonIsotropicTermsVsMPro = new TProfile2D(nonIsotropicTermsVsMProName.Data(),"Non-isotropic terms for all events vs M (errors are wrong here!)",10,0,10,fNoOfMultipicityBins+1,0,fNoOfMultipicityBins+1,"s");
542 fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(1,"cos(n(#phi_{1}))");
\r
543 fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(2,"sin(n(#phi_{1}))");
544 fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(3,"cos(2n(#phi_{1}))");
\r
545 fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(4,"sin(2n(#phi_{1}))");
\r
546 fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(5,"cos(n(#phi_{1}+#phi_{2}))");
\r
547 fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(6,"sin(n(#phi_{1}+#phi_{2}))");
548 fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(7,"cos(n(2#phi_{1}-#phi_{2}))");
\r
549 fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(8,"sin(n(2#phi_{1}-#phi_{2}))");
550 fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(9,"cos(n(#phi_{1}-#phi_{2}-#phi_{3}))");
\r
551 fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(10,"sin(n(#phi_{1}-#phi_{2}-#phi_{3})");
552 for(Int_t b=1;b<=fNoOfMultipicityBins;b++)
554 fNonIsotropicTermsVsMPro->GetYaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+b*fMultipicityBinWidth)));
556 fNonIsotropicTermsVsMPro->GetYaxis()->SetBinLabel(fNoOfMultipicityBins+1,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth)));
557 fHistList->Add(fNonIsotropicTermsVsMPro);
558 // Correction terms for non-uniform acceptance to <cos[n(2phi1-phi2-phi3)]> for all events (with correct errors):
559 TString nonIsotropicTermsVsMHistName = "fNonIsotropicTermsVsMHist";
\r
560 fNonIsotropicTermsVsMHist = new TH2D(nonIsotropicTermsVsMHistName.Data(),"Non-isotropic terms for all events vs M ",10,0,10,fNoOfMultipicityBins+1,0,fNoOfMultipicityBins+1);
561 fNonIsotropicTermsVsMHist->GetXaxis()->SetBinLabel(1,"cos(n(#phi_{1}))");
\r
562 fNonIsotropicTermsVsMHist->GetXaxis()->SetBinLabel(2,"sin(n(#phi_{1}))");
563 fNonIsotropicTermsVsMHist->GetXaxis()->SetBinLabel(3,"cos(2n(#phi_{1}))");
\r
564 fNonIsotropicTermsVsMHist->GetXaxis()->SetBinLabel(4,"sin(2n(#phi_{1}))");
\r
565 fNonIsotropicTermsVsMHist->GetXaxis()->SetBinLabel(5,"cos(n(#phi_{1}+#phi_{2}))");
\r
566 fNonIsotropicTermsVsMHist->GetXaxis()->SetBinLabel(6,"sin(n(#phi_{1}+#phi_{2}))");
567 fNonIsotropicTermsVsMHist->GetXaxis()->SetBinLabel(7,"cos(n(2#phi_{1}-#phi_{2}))");
\r
568 fNonIsotropicTermsVsMHist->GetXaxis()->SetBinLabel(8,"sin(n(2#phi_{1}-#phi_{2}))");
569 fNonIsotropicTermsVsMHist->GetXaxis()->SetBinLabel(9,"cos(n(#phi_{1}-#phi_{2}-#phi_{3}))");
\r
570 fNonIsotropicTermsVsMHist->GetXaxis()->SetBinLabel(10,"sin(n(#phi_{1}-#phi_{2}-#phi_{3})");
571 for(Int_t b=1;b<=fNoOfMultipicityBins;b++)
573 fNonIsotropicTermsVsMHist->GetYaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+b*fMultipicityBinWidth)));
575 fNonIsotropicTermsVsMHist->GetYaxis()->SetBinLabel(fNoOfMultipicityBins+1,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth)));
576 fResultsList->Add(fNonIsotropicTermsVsMHist);
577 // Quantified bias comming from detector inefficiencies to 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> (in %)
578 TString detectorBiasVsMHistName = "fDetectorBiasVsMHist";
\r
579 fDetectorBiasVsMHist = new TH1D(detectorBiasVsMHistName.Data(),"#left|1 - #frac{corrected}{not-corrected}#right| (in %)",fNoOfMultipicityBins+1,0,fNoOfMultipicityBins+1);
580 for(Int_t b=1;b<=fNoOfMultipicityBins;b++)
582 fDetectorBiasVsMHist->GetXaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+b*fMultipicityBinWidth)));
584 fDetectorBiasVsMHist->GetXaxis()->SetBinLabel(fNoOfMultipicityBins+1,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth)));
585 fResultsList->Add(fDetectorBiasVsMHist);
587 } // end of void AliFlowAnalysisWithMixedHarmonics::BookAllAllEventQuantities()
589 //================================================================================================================
591 void AliFlowAnalysisWithMixedHarmonics::AccessConstants()
\r
593 // Access needed common constants from AliFlowCommonConstants.
\r
595 fnBinsPhi = AliFlowCommonConstants::GetMaster()->GetNbinsPhi();
\r
596 fPhiMin = AliFlowCommonConstants::GetMaster()->GetPhiMin();
\r
597 fPhiMax = AliFlowCommonConstants::GetMaster()->GetPhiMax();
\r
598 if(fnBinsPhi) fPhiBinWidth = (fPhiMax-fPhiMin)/fnBinsPhi;
\r
599 fnBinsPt = AliFlowCommonConstants::GetMaster()->GetNbinsPt();
\r
600 fPtMin = AliFlowCommonConstants::GetMaster()->GetPtMin();
\r
601 fPtMax = AliFlowCommonConstants::GetMaster()->GetPtMax();
\r
602 if(fnBinsPt) fPtBinWidth = (fPtMax-fPtMin)/fnBinsPt;
\r
603 fnBinsEta = AliFlowCommonConstants::GetMaster()->GetNbinsEta();
\r
604 fEtaMin = AliFlowCommonConstants::GetMaster()->GetEtaMin();
\r
605 fEtaMax = AliFlowCommonConstants::GetMaster()->GetEtaMax();
\r
606 if(fnBinsEta) fEtaBinWidth = (fEtaMax-fEtaMin)/fnBinsEta;
\r
608 } // end of void AliFlowAnalysisWithMixedHarmonics::AccessConstants()
610 //================================================================================================================
\r
612 void AliFlowAnalysisWithMixedHarmonics::CrossCheckSettings()
\r
614 // Cross-check if the user settings make sense.
\r
616 } // end of void AliFlowAnalysisWithMixedHarmonics::CrossCheckSettings()
\r
618 //================================================================================================================
\r
620 void AliFlowAnalysisWithMixedHarmonics::BookAndFillWeightsHistograms()
\r
622 // Book and fill (by accessing file "weights.root") histograms which hold phi, pt and eta weights.
\r
626 cout<<"WARNING: fWeightsList is NULL in AFAWMH::BAFWH() !!!!"<<endl;
\r
629 // Profile to hold flags for weights:
\r
630 TString fUseParticleWeightsName = "fUseParticleWeightsMH";
\r
631 fUseParticleWeights = new TProfile(fUseParticleWeightsName.Data(),"0 = particle weight not used, 1 = particle weight used ",3,0,3);
\r
632 fUseParticleWeights->SetLabelSize(0.06);
\r
633 (fUseParticleWeights->GetXaxis())->SetBinLabel(1,"w_{#phi}");
\r
634 (fUseParticleWeights->GetXaxis())->SetBinLabel(2,"w_{p_{T}}");
\r
635 (fUseParticleWeights->GetXaxis())->SetBinLabel(3,"w_{#eta}");
\r
636 fUseParticleWeights->Fill(0.5,(Int_t)fUsePhiWeights);
\r
637 fUseParticleWeights->Fill(1.5,(Int_t)fUsePtWeights);
\r
638 fUseParticleWeights->Fill(2.5,(Int_t)fUseEtaWeights);
\r
639 fWeightsList->Add(fUseParticleWeights);
\r
643 if(fWeightsList->FindObject("phi_weights"))
\r
645 fPhiWeights = dynamic_cast<TH1F*>(fWeightsList->FindObject("phi_weights"));
\r
646 if(TMath::Abs(fPhiWeights->GetBinWidth(1)-fPhiBinWidth)>pow(10.,-6.))
\r
649 cout<<"WARNING (MH): Inconsistent binning in histograms for phi-weights throughout the code."<<endl;
\r
655 cout<<"WARNING (MH): fWeightsList->FindObject(\"phi_weights\") is NULL in AFAWMH::BAFWH() !!!!"<<endl;
\r
658 } // end of if(fUsePhiWeights)
\r
662 if(fWeightsList->FindObject("pt_weights"))
\r
664 fPtWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("pt_weights"));
\r
665 if(TMath::Abs(fPtWeights->GetBinWidth(1)-fPtBinWidth)>pow(10.,-6.))
\r
668 cout<<"WARNING (MH): Inconsistent binning in histograms for pt-weights throughout the code."<<endl;
\r
674 cout<<"WARNING (MH): fWeightsList->FindObject(\"pt_weights\") is NULL in AFAWMH::BAFWH() !!!!"<<endl;
\r
677 } // end of if(fUsePtWeights)
\r
679 if(fUseEtaWeights)
\r
681 if(fWeightsList->FindObject("eta_weights"))
\r
683 fEtaWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("eta_weights"));
\r
684 if(TMath::Abs(fEtaWeights->GetBinWidth(1)-fEtaBinWidth)>pow(10.,-6.))
\r
687 cout<<"WARNING (MH): Inconsistent binning in histograms for eta-weights throughout the code."<<endl;
\r
693 cout<<"WARNING: fUseEtaWeights && fWeightsList->FindObject(\"eta_weights\") is NULL in AFAWMH::BAFWH() !!!!"<<endl;
\r
696 } // end of if(fUseEtaWeights)
\r
698 } // end of AliFlowAnalysisWithMixedHarmonics::BookAndFillWeightsHistograms()
700 //================================================================================================================
702 void AliFlowAnalysisWithMixedHarmonics::CheckPointersUsedInMake()
\r
704 // Check pointers used in method Make().
\r
706 if(!fReQnk || !fImQnk || !fSpk || !f3pCorrelatorEBE)
709 cout<<" WARNING (MH): (!fReQnk || !fImQnk || !fSpk || !f3pCorrelatorEBE) is NULL !!!!"<<endl;
713 if(!f3pCorrelatorPro)
716 cout<<" WARNING (MH): (!f3pCorrelatorPro) is NULL !!!!"<<endl;
721 } // end of AliFlowAnalysisWithMixedHarmonics::CheckPointersUsedInMake()
723 //================================================================================================================
725 void AliFlowAnalysisWithMixedHarmonics::CheckPointersUsedInFinish()
\r
727 // Check pointers used in method Finish().
729 } // end of AliFlowAnalysisWithMixedHarmonics::CheckPointersUsedInFinish()
\r
731 //================================================================================================================
733 void AliFlowAnalysisWithMixedHarmonics::AccessSettings()
\r
735 // Access the settings for analysis with mixed harmonics.
737 fCorrelatorInteger = (Int_t)fAnalysisSettings->GetBinContent(1);
738 fCorrectForDetectorEffects = (Bool_t)fAnalysisSettings->GetBinContent(2);
739 fNoOfMultipicityBins = (Int_t)fAnalysisSettings->GetBinContent(3);
740 fMultipicityBinWidth = (Double_t)fAnalysisSettings->GetBinContent(4);
741 fMinMultiplicity = (Double_t)fAnalysisSettings->GetBinContent(5);
743 } // end of AliFlowAnalysisWithMixedHarmonics::AccessSettings()
745 //================================================================================================================
747 void AliFlowAnalysisWithMixedHarmonics::CorrectForDetectorEffects()
\r
749 // Correct measured 3-p correlator cos[n(2phi1-phi2-phi3)] for detector effects.
751 Double_t measured3pCorrelator = f3pCorrelatorPro->GetBinContent(1); // biased by detector effects
752 Double_t corrected3pCorrelator = 0.; // corrected for detector effects
753 Double_t nonIsotropicTerms[10] = {0.}; // there are 10 distinct non-isotropic terms
754 for(Int_t nit=0;nit<10;nit++)
756 nonIsotropicTerms[nit] = fNonIsotropicTermsPro->GetBinContent(nit+1);
758 // Calculate corrected 3-p correlator:
759 corrected3pCorrelator = measured3pCorrelator
760 - nonIsotropicTerms[2]*nonIsotropicTerms[4]
761 - nonIsotropicTerms[3]*nonIsotropicTerms[5]
762 - 2.*nonIsotropicTerms[0]*nonIsotropicTerms[6]
763 - 2.*nonIsotropicTerms[1]*nonIsotropicTerms[7]
764 + 2.*nonIsotropicTerms[2]*(pow(nonIsotropicTerms[0],2.)-pow(nonIsotropicTerms[1],2.))
765 + 4.*nonIsotropicTerms[3]*nonIsotropicTerms[0]*nonIsotropicTerms[1];
766 // Store corrected 3-p correlator:
767 f3pCorrelatorHist->SetBinContent(1,corrected3pCorrelator);
769 } // end of AliFlowAnalysisWithMixedHarmonics::CorrectForDetectorEffects()
771 //================================================================================================================
773 void AliFlowAnalysisWithMixedHarmonics::FinalizeNonIsotropicTerms()
\r
775 // Calculate correctly the errors of non-isotropic terms.
777 // Transfer mean values from profiles to histograms: // to be improved
778 for(Int_t mv=1;mv<=10;mv++)
780 fNonIsotropicTermsHist->SetBinContent(mv,fNonIsotropicTermsPro->GetBinContent(mv));
783 } // end of void AliFlowAnalysisWithMixedHarmonics::FinalizeNonIsotropicTerms()
785 //================================================================================================================
787 void AliFlowAnalysisWithMixedHarmonics::QuantifyBiasFromDetectorEffects()
\r
789 // Quantify bias from detector inefficiences to 3-p correlator.
791 // Remark: Bias is quantified as 1 - |corrected/nonCorrected| (in %) and stored in histogram fDetectorBias
794 if(f3pCorrelatorPro->GetBinContent(1))
796 bias = 100.*TMath::Abs(1.-f3pCorrelatorHist->GetBinContent(1)/f3pCorrelatorPro->GetBinContent(1));
798 fDetectorBiasHist->SetBinContent(1,bias);
800 } // end of void AliFlowAnalysisWithMixedHarmonics::QuantifyBiasFromDetectorEffects()
802 //================================================================================================================
\r\r
803 void AliFlowAnalysisWithMixedHarmonics::ResetEventByEventQuantities()
\r
805 // Reset all event by event quantities.
\r
811 f3pCorrelatorEBE->Reset();
\r
813 } // end of void AliFlowAnalysisWithMixedHarmonics::ResetEventByEventQuantities()
815 //================================================================================================================
817 void AliFlowAnalysisWithMixedHarmonics::Calculate3pCorrelator()
\r
819 // Calculate 3-p azimuthal correlator cos[n(2phi1-phi2-phi3)] in terms of Q_{n,k} and S_{p,k}.
\r
821 // a) Calculate 3-p correlator without using particle weights;
822 // b) Calculate 3-p correlator with using particle weights.
824 // a) Calculate 3-p correlator without using particle weights:
\r
825 if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights))
827 // Multiplicity (number of RPs):
\r
828 Double_t dMult = (*fSpk)(0,0);
\r
829 // Real and imaginary parts of non-weighted Q-vectors (Q_{n,0}) evaluated in harmonics n and 2n:
\r
830 Double_t dReQ1n = (*fReQnk)(0,0);
\r
831 Double_t dReQ2n = (*fReQnk)(1,0);
\r
832 Double_t dImQ1n = (*fImQnk)(0,0);
\r
833 Double_t dImQ2n = (*fImQnk)(1,0);
834 // 3-particle azimuthal correlator <cos(n*(2.*phi1-phi2-phi3))>:
\r
835 Double_t three2n1n1n = (pow(dReQ1n,2.)*dReQ2n + 2.*dReQ1n*dImQ1n*dImQ2n - pow(dImQ1n,2.)*dReQ2n
836 - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))
\r
837 - (pow(dReQ2n,2.)+pow(dImQ2n,2.))+2.*dMult)
\r
838 / (dMult*(dMult-1.)*(dMult-2.));
839 // Fill event-by-event histogram and all-events profile:
840 f3pCorrelatorEBE->SetBinContent(1,three2n1n1n);
841 f3pCorrelatorPro->Fill(0.5,three2n1n1n,dMult*(dMult-1.)*(dMult-2.));
843 // Correlator vs multiplicity: // to be improved
844 f3pCorrelatorVsMPro->Fill(0.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth),dMult*(dMult-1.)*(dMult-2.)); // to be improved (cross-checked)
845 } // end of if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights))
847 // b) Calculate 3-p correlator without using particle weights:
\r
848 if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)
851 } // end of if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)
853 } // end of void AliFlowAnalysisWithMixedHarmonics::Calculate3pCorrelator()
855 //================================================================================================================
857 void AliFlowAnalysisWithMixedHarmonics::CalculateNonIsotropicTerms()
859 // Calculate correction terms for non-uniform acceptance to 3-p correlator <cos[n(2phi1-phi2-phi3)]>.
861 // a) Calculate using particle weights;
862 // b) Calculate without using particle weights.
864 // These non-isotropic terms are stored in fNonIsotropicTermsPro. The same results but with
865 // correct errors are stored in fNonIsotropicTermsHist. Binning of fNonIsotropicTermsPro and
866 // fNonIsotropicTermsHist is organized as follows:
867 // 1st bin: <<cos(n*phi1)>>
\r
868 // 2nd bin: <<sin(n*phi1)>>
869 // 3rd bin: <<cos(2n*phi1)>>
\r
870 // 4th bin: <<sin(2n*phi1)>>
871 // 5th bin: <<cos(n*(phi1+phi2)>>
\r
872 // 6th bin: <<sin(n*(phi1+phi2)>>
873 // 7th bin: <<cos(n*(2phi1-phi2)>>
\r
874 // 8th bin: <<sin(n*(2phi1-phi2)>>
875 // 9th bin: <<cos(n*(phi1-phi2-phi3)>>
\r
876 // 10th bin: <<sin(n*(phi1-phi2-phi3)>>
878 // a) Calculate using particle weights:
879 if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights))
881 // Multiplicity (number of RPs):
\r
882 Double_t dMult = (*fSpk)(0,0);
\r
883 // Real and imaginary parts of non-weighted Q-vectors (Q_{n,0}) evaluated in harmonics n and 2n:
\r
884 Double_t dReQ1n = (*fReQnk)(0,0);
\r
885 Double_t dReQ2n = (*fReQnk)(1,0);
\r
886 Double_t dImQ1n = (*fImQnk)(0,0);
\r
887 Double_t dImQ2n = (*fImQnk)(1,0);
888 // 1-particle terms:
\r
889 Double_t cosP1n = 0.; // <cos(n*(phi1))>
890 Double_t sinP1n = 0.; // <sin(n*(phi1))>
891 Double_t cosP2n = 0.; // <cos(2n*(phi1))>
892 Double_t sinP2n = 0.; // <sin(2n*(phi1))>
\r
895 cosP1n = dReQ1n/dMult;
896 sinP1n = dImQ1n/dMult;
897 cosP2n = dReQ2n/dMult;
898 sinP2n = dImQ2n/dMult;
899 // Single event avarages:
\r
900 fNonIsotropicTermsEBE->SetBinContent(1,cosP1n); // <cos(n*(phi1))>
\r
901 fNonIsotropicTermsEBE->SetBinContent(2,sinP1n); // <sin(n*(phi1))>
\r
902 fNonIsotropicTermsEBE->SetBinContent(3,cosP2n); // <cos(2n*(phi1))>
\r
903 fNonIsotropicTermsEBE->SetBinContent(4,sinP2n); // <sin(2n*(phi1))>
904 // All-events avarages:
\r
905 fNonIsotropicTermsPro->Fill(0.5,cosP1n,dMult); // <<cos(n*(phi1))>>
906 fNonIsotropicTermsPro->Fill(1.5,sinP1n,dMult); // <<sin(n*(phi1))>>
907 fNonIsotropicTermsPro->Fill(2.5,cosP2n,dMult); // <<cos(2n*(phi1))>>
908 fNonIsotropicTermsPro->Fill(3.5,sinP2n,dMult); // <<sin(2n*(phi1))>>
\r
910 // 2-particle terms:
\r
911 Double_t cosP1nP1n = 0.; // <cos(n*(phi1+phi2))>
912 Double_t sinP1nP1n = 0.; // <sin(n*(phi1+phi2))>
913 Double_t cosP2nM1n = 0.; // <cos(n*(2phi1-phi2))>
914 Double_t sinP2nM1n = 0.; // <sin(n*(2phi1-phi2))>
\r
917 cosP1nP1n = (pow(dReQ1n,2)-pow(dImQ1n,2)-dReQ2n)/(dMult*(dMult-1));
918 sinP1nP1n = (2.*dReQ1n*dImQ1n-dImQ2n)/(dMult*(dMult-1));
\r
919 cosP2nM1n = (dReQ2n*dReQ1n+dImQ2n*dImQ1n-dReQ1n)/(dMult*(dMult-1));
920 sinP2nM1n = (dImQ2n*dReQ1n-dReQ2n*dImQ1n-dImQ1n)/(dMult*(dMult-1));
\r
921 // Single event avarages:
\r
922 fNonIsotropicTermsEBE->SetBinContent(5,cosP1nP1n); // <cos(n*(phi1+phi2))>
\r
923 fNonIsotropicTermsEBE->SetBinContent(6,sinP1nP1n); // <sin(n*(phi1+phi2))>
924 fNonIsotropicTermsEBE->SetBinContent(7,cosP2nM1n); // <cos(n*(2phi1-phi2))>
\r
925 fNonIsotropicTermsEBE->SetBinContent(8,sinP2nM1n); // <sin(n*(2phi1-phi2))>
\r
926 // All-events avarages:
\r
927 fNonIsotropicTermsPro->Fill(4.5,cosP1nP1n,dMult*(dMult-1.)); // <<cos(n*(phi1+phi2))>>
928 fNonIsotropicTermsPro->Fill(5.5,sinP1nP1n,dMult*(dMult-1.)); // <<sin(n*(phi1+phi2))>>
\r
929 fNonIsotropicTermsPro->Fill(6.5,cosP2nM1n,dMult*(dMult-1.)); // <<cos(n*(2phi1-phi2))>>
930 fNonIsotropicTermsPro->Fill(7.5,sinP2nM1n,dMult*(dMult-1.)); // <<sin(n*(2phi1-phi2))>>
\r
934 Double_t cosP1nM1nM1n = 0.; // <cos(n*(phi1-phi2-phi3))>
\r
935 Double_t sinP1nM1nM1n = 0.; // <sin(n*(phi1-phi2-phi3))>
\r
938 cosP1nM1nM1n = (dReQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))-dReQ1n*dReQ2n-dImQ1n*dImQ2n-2.*(dMult-1)*dReQ1n)
\r
939 / (dMult*(dMult-1)*(dMult-2));
940 sinP1nM1nM1n = (-dImQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))+dReQ1n*dImQ2n-dImQ1n*dReQ2n+2.*(dMult-1)*dImQ1n)
\r
941 / (dMult*(dMult-1)*(dMult-2));
\r
942 // Single event avarages:
\r
943 fNonIsotropicTermsEBE->SetBinContent(9,cosP1nM1nM1n); // <cos(n*(phi1-phi2-phi3))>
944 fNonIsotropicTermsEBE->SetBinContent(10,sinP1nM1nM1n); // <sin(n*(phi1-phi2-phi3))>
\r
945 // All-events avarages:
\r
946 fNonIsotropicTermsPro->Fill(8.5,cosP1nM1nM1n,dMult*(dMult-1.)*(dMult-2.)); // <<cos(n*(phi1-phi2-phi3))>>
947 fNonIsotropicTermsPro->Fill(9.5,sinP1nM1nM1n,dMult*(dMult-1.)*(dMult-2.)); // <<sin(n*(phi1-phi2-phi3))>>
\r
949 } // end of if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights))
951 // b) Calculate without using particle weights:
\r
952 if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)
955 } // end of if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)
957 } // end of void AliFlowAnalysisWithMixedHarmonics::CalculateNonIsotropicTerms()