]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMixedHarmonics.h
extension for mixed harmonics and some ^M
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowAnalysisWithMixedHarmonics.h
1 /* 
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. 
3  * See cxx source for full Copyright notice 
4  * $Id$ 
5  */
6
7 /********************************************************** 
8  * In this class azimuthal correlators in mixed harmonics *
9  * are implemented in terms of Q-vectors. This approach   *
10  * doesn't require evaluation of nested loops. This class *
11  * can be used to:                                        *
12  *                                                        *  
13  *  a) Extract subdominant harmonics (like v1 and v4);    *
14  *  b) Study strong parity violation.                     * 
15  *                                                        * 
16  * Author: Ante Bilandzic (abilandzic@gmail.com)          *
17  *********************************************************/ 
18
19 #ifndef ALIFLOWANALYSISWITHMIXEDHARMONICS_H
20 #define ALIFLOWANALYSISWITHMIXEDHARMONICS_H
21
22 #include "AliFlowCommonConstants.h" // needed as include
23 #include "TMatrixD.h"
24
25 class TList;
26 class TFile;
27 class TH1;
28 class TH2;
29 class TProfile;
30 class TProfile2D;
31
32 class AliFlowEventSimple;
33 class AliFlowCommonHist;
34 class AliFlowCommonHistResults;
35
36 //================================================================================================================
37
38 class AliFlowAnalysisWithMixedHarmonics
39 {
40  public:
41   AliFlowAnalysisWithMixedHarmonics();
42   virtual ~AliFlowAnalysisWithMixedHarmonics(); 
43   // 0.) Methods called in the constructor:
44   // 1.) Method Init() and methods called within Init():
45   virtual void Init();
46     virtual void CrossCheckSettings();
47     virtual void AccessConstants();
48     virtual void BookAndNestAllLists();
49     virtual void BookProfileHoldingSettings();
50     virtual void BookCommonHistograms();
51     virtual void BookAllEventByEventQuantities();
52     virtual void BookAllAllEventQuantities();
53     virtual void BookAndFillWeightsHistograms();
54   // 2.) Method Make() and methods called within Make():
55   virtual void Make(AliFlowEventSimple *anEvent);
56     virtual void CheckPointersUsedInMake();
57     virtual void Calculate3pCorrelator();
58     virtual void CalculateNonIsotropicTerms();
59     virtual void ResetEventByEventQuantities();
60   // 3.) Method Finish() and methods called within Finish():
61   virtual void Finish();  
62     virtual void CheckPointersUsedInFinish(); 
63     virtual void AccessSettings();       
64     virtual void FinalizeNonIsotropicTerms();       
65     virtual void CorrectForDetectorEffects();
66     virtual void QuantifyBiasFromDetectorEffects();
67   // 4.) Method GetOutputHistograms and method called within it:
68   virtual void GetOutputHistograms(TList *outputListHistos);
69     virtual void GetPointersForBaseHistograms();
70     virtual void GetPointersForCommonHistograms();
71     virtual void GetPointersForAllEventProfiles();
72     virtual void GetPointersForResultsHistograms();
73   // 5.) Other methods:   
74   virtual void WriteHistograms(TString outputFileName);
75   virtual void WriteHistograms(TDirectoryFile *outputFileName);  
76   // 6.) Setters and getters:
77   void SetHistList(TList* const hl) {this->fHistList = hl;}
78   TList* GetHistList() const {return this->fHistList;}  
79   void SetHistListName(const char *hln) {this->fHistListName->Append(*hln);}; 
80   TString *GetHistListName() const {return this->fHistListName;};
81   void SetAnalysisLabel(const char *al) {this->fAnalysisLabel->Append(*al);}; 
82   TString *GetAnalysisLabel() const {return this->fAnalysisLabel;};
83   void SetAnalysisSettings(TProfile* const as) {this->fAnalysisSettings = as;};
84   TProfile* GetAnalysisSettings() const {return this->fAnalysisSettings;};
85   void SetCorrelatorInteger(Int_t const ci) {this->fCorrelatorInteger = ci;};
86   Int_t GetCorrelatorInteger() const {return this->fCorrelatorInteger;}; 
87   void SetNoOfMultipicityBins(Int_t const nomb) {this->fNoOfMultipicityBins = nomb;};
88   Int_t GetNoOfMultipicityBins() const {return this->fNoOfMultipicityBins;};   
89   void SetMultipicityBinWidth(Double_t const mbw) {this->fMultipicityBinWidth = mbw;};
90   Double_t GetMultipicityBinWidth() const {return this->fMultipicityBinWidth;};   
91   void SetMinMultiplicity(Double_t const mm) {this->fMinMultiplicity = mm;};
92   Double_t GetMinMultiplicity() const {return this->fMinMultiplicity;}; 
93   void SetCorrectForDetectorEffects(Bool_t const cfde) {this->fCorrectForDetectorEffects = cfde;};
94   Bool_t GetCorrectForDetectorEffects() const {return this->fCorrectForDetectorEffects;}; 
95   void SetCommonHists(AliFlowCommonHist* const ch) {this->fCommonHists = ch;};
96   AliFlowCommonHist* GetCommonHists() const {return this->fCommonHists;};
97   void SetWeightsList(TList* const wl) {this->fWeightsList = (TList*)wl->Clone();}
98   TList* GetWeightsList() const {return this->fWeightsList;}  
99   void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
100   Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
101   void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
102   Bool_t GetUsePtWeights() const {return this->fUsePtWeights;};
103   void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;};
104   Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;};
105   void SetUseParticleWeights(TProfile* const uPW) {this->fUseParticleWeights = uPW;};
106   TProfile* GetUseParticleWeights() const {return this->fUseParticleWeights;};
107   void SetPhiWeights(TH1F* const histPhiWeights) {this->fPhiWeights = histPhiWeights;};
108   TH1F* GetPhiWeights() const {return this->fPhiWeights;};
109   void SetPtWeights(TH1D* const histPtWeights) {this->fPtWeights = histPtWeights;};
110   TH1D* GetPtWeights() const {return this->fPtWeights;};
111   void SetEtaWeights(TH1D* const histEtaWeights) {this->fEtaWeights = histEtaWeights;};
112   TH1D* GetEtaWeights() const {return this->fEtaWeights;};
113   void SetProfileList(TList* const plist) {this->fProfileList = plist;}
114   TList* GetProfileList() const {return this->fProfileList;}  
115   void Set3pCorrelatorPro(TProfile* const s3pPro) {this->f3pCorrelatorPro = s3pPro;};
116   TProfile* Get3pCorrelatorPro() const {return this->f3pCorrelatorPro;};
117   void SetNonIsotropicTermsPro(TProfile* const nitPro) {this->fNonIsotropicTermsPro = nitPro;};
118   TProfile* GetNonIsotropicTermsPro() const {return this->fNonIsotropicTermsPro;};
119   void Set3pCorrelatorVsMPro(TProfile* const s3pVsMPro) {this->f3pCorrelatorVsMPro = s3pVsMPro;};
120   TProfile* Get3pCorrelatorVsMPro() const {return this->f3pCorrelatorVsMPro;};
121   void SetNonIsotropicTermsVsMPro(TProfile2D* const nitVsMPro) {this->fNonIsotropicTermsVsMPro = nitVsMPro;};
122   TProfile2D* GetNonIsotropicTermsVsMPro() const {return this->fNonIsotropicTermsVsMPro;};
123   void SetResultsList(TList* const rlist) {this->fResultsList = rlist;}
124   TList* GetResultsList() const {return this->fResultsList;}  
125   void Set3pCorrelatorHist(TH1D* const s3pcHist) {this->f3pCorrelatorHist = s3pcHist;};
126   TH1D* Get3pCorrelatorHist() const {return this->f3pCorrelatorHist;};
127   void SetDetectorBiasHist(TH1D* const dbHist) {this->fDetectorBiasHist = dbHist;};
128   TH1D* GetDetectorBiasHist() const {return this->fDetectorBiasHist;};  
129   void SetNonIsotropicTermsHist(TH1D* const nitHist) {this->fNonIsotropicTermsHist = nitHist;};
130   TH1D* GetNonIsotropicTermsHist() const {return this->fNonIsotropicTermsHist;};  
131   void Set3pCorrelatorVsMHist(TH1D* const s3pcVsMHist) {this->f3pCorrelatorVsMHist = s3pcVsMHist;};
132   TH1D* Get3pCorrelatorVsMHist() const {return this->f3pCorrelatorVsMHist;};
133   void SetDetectorBiasVsMHist(TH1D* const dbVsMHist) {this->fDetectorBiasVsMHist = dbVsMHist;};
134   TH1D* GetDetectorBiasVsMHist() const {return this->fDetectorBiasVsMHist;};  
135   void SetNonIsotropicTermsVsMHist(TH2D* const nitVsMHist) {this->fNonIsotropicTermsVsMHist = nitVsMHist;};
136   TH2D* GetNonIsotropicTermsVsMHist() const {return this->fNonIsotropicTermsVsMHist;};
137   
138  private:
139   AliFlowAnalysisWithMixedHarmonics(const AliFlowAnalysisWithMixedHarmonics& afawQc);
140   AliFlowAnalysisWithMixedHarmonics& operator=(const AliFlowAnalysisWithMixedHarmonics& afawQc); 
141   // 0.) Base:
142   TList *fHistList; // base list to hold all output objects
143   TString *fHistListName; // name of base list
144   TString *fAnalysisLabel; // analysis label 
145   TProfile *fAnalysisSettings; // profile to hold analysis settings
146   Int_t fCorrelatorInteger; // integer n in cos[n(2phi1-phi2-phi3)]
147   Int_t fNoOfMultipicityBins; // number of multiplicity bins
148   Double_t fMultipicityBinWidth; // width of multiplicity bin
149   Double_t fMinMultiplicity; // minimal multiplicity
150   Bool_t fCorrectForDetectorEffects; // correct 3-p correlator for detector effects
151   // 1.) Common:
152   AliFlowCommonHist *fCommonHists; // common control histograms (filled only with events with 3 or more tracks for 3-p correlators) 
153   Int_t fnBinsPhi; // number of phi bins
154   Double_t fPhiMin; // minimum phi   
155   Double_t fPhiMax; // maximum phi 
156   Double_t fPhiBinWidth; // bin width for phi histograms  
157   Int_t fnBinsPt; // number of pt bins
158   Double_t fPtMin; // minimum pt   
159   Double_t fPtMax; // maximum pt  
160   Double_t fPtBinWidth; // bin width for pt histograms  
161   Int_t fnBinsEta; // number of eta bins
162   Double_t fEtaMin; // minimum eta   
163   Double_t fEtaMax; // maximum eta
164   Double_t fEtaBinWidth; // bin width for eta histograms 
165   // 2a.) Particle weights:
166   TList *fWeightsList; // list to hold all histograms with particle weights: fUseParticleWeights, fPhiWeights, fPtWeights and fEtaWeights
167   Bool_t fUsePhiWeights; // use phi weights
168   Bool_t fUsePtWeights; // use pt weights
169   Bool_t fUseEtaWeights; // use eta weights
170   TProfile *fUseParticleWeights; // profile with three bins to hold values of fUsePhiWeights, fUsePtWeights and fUseEtaWeights
171   TH1F *fPhiWeights; // histogram holding phi weights
172   TH1D *fPtWeights; // histogram holding phi weights
173   TH1D *fEtaWeights; // histogram holding phi weights 
174   // 3.) Event-by-event quantities:
175   TMatrixD *fReQnk; // fReQ[n][k] = Re[Q_{n,k}] = sum_{i=1}^{M} w_{i}^{k} cos(n*phi_{i})
176   TMatrixD *fImQnk; // fImQ[n][k] = Im[Q_{n,k}] = sum_{i=1}^{M} w_{i}^{k} sin(n*phi_{i})
177   TMatrixD *fSpk; // fS[p][k] = S_{p,k} = (sum_{i=1}^{M} w_{i}^{k})^{p+1} // note p+1 in the power to use 0th index in p in non-trivial way
178   TH1D *f3pCorrelatorEBE; // 3-p correlator <cos[n(2phi1-phi2-phi3)]> for single event
179   TH1D *fNonIsotropicTermsEBE; // correction terms to 3-p correlator <cos[n(2phi1-phi2-phi3)]> for single event
180   // 4.) Profiles:
181   TList *fProfileList; // list holding all all-event profiles 
182   TProfile *f3pCorrelatorPro; // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with wrong errors)
183   TProfile *fNonIsotropicTermsPro; // correction terms to 3-p correlator <cos[n(2phi1-phi2-phi3)]> for all events (with wrong errors)
184   TProfile *f3pCorrelatorVsMPro; // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with wrong errors) versus multiplicity
185   TProfile2D *fNonIsotropicTermsVsMPro; // correction terms to <cos[n(2phi1-phi2-phi3)]> for all events (with wrong errors) versus multiplicity
186   // 5.) Final results:
187   TList *fResultsList; // list holding objects with final results 
188   TH1D *f3pCorrelatorHist; // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with correct errors)
189   TH1D *fDetectorBiasHist; // bias comming from detector inefficiencies to 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> (in %)
190   TH1D *fNonIsotropicTermsHist; // correction terms to 3-p correlator <cos[n(2phi1-phi2-phi3)]> for all events (with correct errors)
191   TH1D *f3pCorrelatorVsMHist; // 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> for all events (with correct errors) versus multiplicity
192   TH1D *fDetectorBiasVsMHist; // bias comming from detector inefficiencies to 3-p correlator <<cos[n(2phi1-phi2-phi3)]>> (in %) versus multiplicity
193   TH2D *fNonIsotropicTermsVsMHist; // correction terms to <cos[n(2phi1-phi2-phi3)]> for all events (with correct errors) versus multiplicity
194   
195   ClassDef(AliFlowAnalysisWithMixedHarmonics, 0);
196
197 };
198
199 //================================================================================================================
200
201 #endif
202
203
204
205
206