AliPhysics  09a22ae (09a22ae)
AliAnalysisTaskTwoMultiCorrelations.h
Go to the documentation of this file.
1 
2 //--------------------------------------------------------------------------------------//
3 // Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. //
4 // See cxx source for full Copyright notice //
5 // $Id$ //
6 //--------------------------------------------------------------------------------------//
7 
8 //--------------------------------------------------------------------------------------//
9 // Analysis task for the data analysis of the correlations between the anisotropic flow //
10 // harmonics v_n with the Pb-Pb data taken by the ALICE experiment. //
11 // The current script computes the multiparticle correlators using the method of the //
12 // Q-vectors for a maximum of 6 different harmonics and 8 particles). //
13 // //
14 // Author: Cindy Mordasini (cindy.mordasini@cern.ch) //
15 //--------------------------------------------------------------------------------------//
16 
17 #ifndef ALIANALYSISTASKTWOMULTICORRELATIONS_H
18 #define ALIANALYSISTASKTWOMULTICORRELATIONS_H
19 
20 #include "AliAnalysisTaskSE.h"
21 #include "AliAODTrack.h"
22 #include "AliAODEvent.h"
23 #include "AliMCEvent.h"
24 #include "AliAODMCParticle.h"
25 #include "AliVEvent.h"
26 #include "TProfile.h"
27 #include "TComplex.h"
28 #include "TH1D.h"
29 
30 //======================================================================================//
31 
33 public:
34 // The six following functions are mandatory for AliAnalysisTaskSE to use the class properly.
36  AliAnalysisTaskTwoMultiCorrelations(const char *name, Bool_t useParticleWeights=kFALSE);
38 
39  virtual void UserCreateOutputObjects();
40  virtual void UserExec(Option_t *);
41  virtual void Terminate(Option_t *);
42 
43 //--------------------------------------------------------------------------------------//
44 // Setters and getters for the data members.
45  void SetAnalysisType(Bool_t bothAnalysis, Bool_t mcAnalysis, Bool_t aodAnalysis)
46  {
47  this->fProcessBothKineAndReco = bothAnalysis;
48  this->fProcessOnlyKine = mcAnalysis;
49  this->fProcessOnlyReco = aodAnalysis;
50  } // End: SetAnalysisType(Bool_t, Bool_t, Bool_t)
51 
52  void SetGeneralParameters(Int_t maxNumberCorrelations, Int_t highestHarmonic, Int_t nbHarmonics, Bool_t useParticleWeights, Bool_t computeNestedLoops)
53  {
54  this->fMaxNumberCorrelations = maxNumberCorrelations;
55  this->fMaxFlowHarmonic = highestHarmonic;
56  this->fNumberHarmonicsInSC = nbHarmonics;
57  this->fUseParticleWeights = useParticleWeights;
58  this->fComputeNestedLoops = computeNestedLoops;
59  }; // End: void SetGeneralParameters(Int_t, Bool_t, Bool_t, Bool_t)
60 
61  void SetHarmonics(Int_t nOne, Int_t nTwo, Int_t nThree, Int_t nFour, Int_t nFive, Int_t nSix, Int_t nSeven, Int_t nEight)
62  {
63  this->fHarmonicOne = nOne;
64  this->fHarmonicTwo = nTwo;
65  this->fHarmonicThree = nThree;
66  this->fHarmonicFour = nFour;
67  this->fHarmonicFive = nFive;
68  this->fHarmonicSix = nSix;
69  this->fHarmonicSeven = nSeven;
70  this->fHarmonicEight = nEight;
71  }; // End: void SetHarmonics(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t)
72 
73  void SetCentralityRange(Int_t const nBins, Float_t minCentrality, Float_t maxCentrality)
74  {
75  this->fCentralityMin = minCentrality;
76  this->fCentralityMax = maxCentrality;
77  }; // End: void SetCentralityRange(Int_t const, Float_t, Float_t)
78 
79  void SetCutsRange(Float_t minPtCut, Float_t maxPtCut, Float_t minEtaCut, Float_t maxEtaCut)
80  {
81  this->fPtMin = minPtCut;
82  this->fPtMax = maxPtCut;
83  this->fEtaMin = minEtaCut;
84  this->fEtaMax = maxEtaCut;
85  }; // End: void SetCutsRange(Float_t, Float_t, Float_t, Float_t)
86 
87  void SetPreCutControlList(TList* const pccl) {this->fControlListPreCuts = pccl;};
89  void SetPostCutControlList(TList* const poccl) {this->fControlListPostCuts = poccl;};
91  void SetCorrelationResultsList(TList* const crl) {this->fFinalList = crl;};
92  TList* GetCorrelationResultsList() const {return this->fFinalList;}
93 
94 // Methods called in the constructor.
95  virtual void InitialiseArraysOfQvectors();
96  virtual void InitialiseArraysOfTProfiles();
97 
98 // Methods called in UserCreateOutputObjects().
99  virtual void BookAndNestAllLists();
100  virtual void BookControlListPreCuts();
101  virtual void BookControlListPostCuts();
102  virtual void BookFinalList();
103 
104 // Methods called in UserExec(Option_t *).
105  virtual void AODanalysis(AliAODEvent *aAODevent);
106  virtual void MCanalysis(AliMCEvent *aMCevent);
107  virtual void CalculateQvectors(long long nParticles, Double_t angles[], Double_t weights[]);
108  virtual void GSCfullAnalysis(long long nParticles, Double_t angles[], Double_t weights[]);
109  TComplex Q(Int_t n, Int_t p);
110  TComplex CalculateRecursion(Int_t n, Int_t *harmonic, Int_t mult=1, Int_t skip=0);
111  Double_t ComputeTwoNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile);
112  Double_t ComputeThreeNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile);
113  Double_t ComputeFourNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile);
114 
115 // Methods called in Terminate(Option_t *).
116 
117 
118 //--------------------------------------------------------------------------------------//
119 private:
122 
123 // General parameters.
124  Int_t fMaxNumberCorrelations; // Maximum number of particles in the correlator (Not going higher than 8-p correlations).
125  Int_t fMaxFlowHarmonic; // Maximum harmonic n for v_n (Not going further than v_6).
126  TComplex fQvectors[49][9]; // All needed combinations of Q-vectors (size: [fMaxFlowHarmonic*fMaxNumberCorrelations+1][fMaxNumberCorrelations+1]).
127  Int_t fNumberHarmonicsInSC; // Number of harmonics in the GSC.
128 
130  Bool_t fProcessBothKineAndReco; // Process both MC and AOD.
131  Bool_t fProcessOnlyKine; // Process only MC.
132  Bool_t fProcessOnlyReco; // Process only AOD.
133 
134  Bool_t fUseParticleWeights; // Use non-unit particle weights.
135  Bool_t fComputeNestedLoops; // Computate the nested loops for cross-check.
136 
137 // Structure of the output file.
138  TList* fMainList; // Main output list.
139  TList* fControlListPreCuts; // Secondary list with the control histograms before the cuts.
140  TList* fControlListPostCuts; // Secondary list with the control histograms after the cuts.
141  TList* fFinalList; // Secondary list with all the results of the correlators.
142  TList *fListTwoParticles; // Tertiary list with the 2-p correlations.
143  TList *fListThreeParticles; // Tertiary list with the 3-p correlations.
144  TList *fListFourParticles; // Tertiary list with the 4-p correlations.
145  TList *fListSixParticles; // Tertiary list with the 6- and 8-p correlations.
146 
147 // Ranges for the centrality and cuts.
148  Double_t fCentralityMin; // Minimum of the centrality.
149  Double_t fCentralityMax; // Maximum of the centrality.
150  Double_t fPtMin; // Minimum of the transverse momentum.
151  Double_t fPtMax; // Maximum of the transverse momentum.
152  Double_t fEtaMin; // Minimum of the pseudorapidity.
153  Double_t fEtaMax; // Maximum of the pseudorapidity.
154 
155 // Harmonics.
156  Int_t fHarmonicOne; // Harmonic n_1.
157  Int_t fHarmonicTwo; // Harmonic n_2.
158  Int_t fHarmonicThree; // Harmonic n_3.
159  Int_t fHarmonicFour; // Harmonic n_4.
160  Int_t fHarmonicFive; // Harmonic n_5.
161  Int_t fHarmonicSix; // Harmonic n_6.
162  Int_t fHarmonicSeven; // Harmonic n_7.
163  Int_t fHarmonicEight; // Harmonic n_8.
164 
165 // Control histograms before the application of the cuts.
171 
172 // Control histograms after the application of the cuts.
177 
178 // TProfiles for the final results.
181  TProfile *fProfileTwoCosine[5];
189 
190 // Version counter for the submissions on Grid.
194 }; // End of the definition of the class AliAnalysisTaskTwoMultiCorrelations
195 
196 #endif
197 
TProfile * fProfileCosineTwoNestedLoops[6]
<2>_{j,-j}, j: k,l,m,n,(k+l),(k-l).
TProfile * fProfileCosineTwoParticles[6]
Azimuthal angles distribution.
double Double_t
Definition: External.C:58
AliAnalysisTaskTwoMultiCorrelations & operator=(const AliAnalysisTaskTwoMultiCorrelations &aattmc)
TProfile * fProfileCosineThreeParticles[4]
N<<2>_{i,-i}<2>_{j,-j}> with nested loops.
TProfile * fProfileCosineSixParticles[4]
<4>_{i,j,-i,-j} with nested loops.
void SetCutsRange(Float_t minPtCut, Float_t maxPtCut, Float_t minEtaCut, Float_t maxEtaCut)
virtual void CalculateQvectors(long long nParticles, Double_t angles[], Double_t weights[])
TH1D * fHistoPhiPostCuts
Pseudorapidity distribution.
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
TProfile * fProfileCosineEightParticles
<6>_{h,i,j,-h,-i,-j}, hij: klm,kln,kmn,lmn.
void SetAnalysisType(Bool_t bothAnalysis, Bool_t mcAnalysis, Bool_t aodAnalysis)
Definition: External.C:212
TH1D * fHistoEtaPreCuts
Transverse momentum distribution.
void SetGeneralParameters(Int_t maxNumberCorrelations, Int_t highestHarmonic, Int_t nbHarmonics, Bool_t useParticleWeights, Bool_t computeNestedLoops)
TH1D * fHistoMultiplicityPreCuts
Azimuthal angles distribution.
TH1D * fHistoMultiplicityPostCuts
Multiplicity distribution.
TProfile * fProfileTwoCosine[5]
<2>_{j,-j} with nested loops.
Double_t ComputeThreeNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile)
Double_t ComputeFourNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile)
TProfile * fProfileCosineFourNestedLoops[6]
<4>_{i,j,-i,-j}, ij: kl,km,lm,kn,ln,mn.
TComplex CalculateRecursion(Int_t n, Int_t *harmonic, Int_t mult=1, Int_t skip=0)
TH1D * fHistoPhiPreCuts
Pseudorapidity distribution.
void SetHarmonics(Int_t nOne, Int_t nTwo, Int_t nThree, Int_t nFour, Int_t nFive, Int_t nSix, Int_t nSeven, Int_t nEight)
const char Option_t
Definition: External.C:48
TProfile * fProfileCosineFourParticles[6]
<3>_{h,i,j} with nested loops.
bool Bool_t
Definition: External.C:53
TH1D * fHistoEtaPostCuts
Transverse momentum distribution.
TProfile * fProfileCosineThreeNestedLoops[4]
<3>_{h,i,j}, h: (k+l),(k-l) (first two), j: (l-k),(-k-l) (last two).
Bool_t fProcessBothKineAndReco
Type of analysis: MC or AOD.
void SetCentralityRange(Int_t const nBins, Float_t minCentrality, Float_t maxCentrality)
TProfile * fProfileTwoCosineNestedLoops[5]
<<2>_{i,-i}<2>_{j,-j}> for ij: kl,km,lm, and <<2>_{i,-i}<2>_{j,-j}<2>_{h,-h}>, ijh: klm and <<4>_{k...
virtual void GSCfullAnalysis(long long nParticles, Double_t angles[], Double_t weights[])
Double_t ComputeTwoNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile)