]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMixedHarmonics.h
AliFlowCommonHists: use weights when filling the control histograms
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowAnalysisWithMixedHarmonics.h
CommitLineData
d66d46f7 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); *
5c078806 14 * b) Study flow of two-particle resonances; *
15 * c) Study strong parity violation. *
d66d46f7 16 * *
e999459d 17 * Author: Ante Bilandzic (abilandzic@gmail.com) *
d66d46f7 18 *********************************************************/
19
20#ifndef ALIFLOWANALYSISWITHMIXEDHARMONICS_H
21#define ALIFLOWANALYSISWITHMIXEDHARMONICS_H
22
23#include "AliFlowCommonConstants.h" // needed as include
24#include "TMatrixD.h"
25
929098e4 26class TDirectoryFile;
d66d46f7 27class TList;
28class TFile;
929098e4 29class TH1F;
30class TH1D;
67a6b178 31class TH2D;
d66d46f7 32class TProfile;
33class TProfile2D;
34
35class AliFlowEventSimple;
36class AliFlowCommonHist;
37class AliFlowCommonHistResults;
38
39//================================================================================================================
40
41class AliFlowAnalysisWithMixedHarmonics
42{
43 public:
44 AliFlowAnalysisWithMixedHarmonics();
45 virtual ~AliFlowAnalysisWithMixedHarmonics();
46 // 0.) Methods called in the constructor:
5c078806 47 virtual void InitializeArrays();
d66d46f7 48 // 1.) Method Init() and methods called within Init():
49 virtual void Init();
50 virtual void CrossCheckSettings();
51 virtual void AccessConstants();
52 virtual void BookAndNestAllLists();
53 virtual void BookProfileHoldingSettings();
54 virtual void BookCommonHistograms();
55 virtual void BookAllEventByEventQuantities();
56 virtual void BookAllAllEventQuantities();
57 virtual void BookAndFillWeightsHistograms();
e999459d 58 virtual void StoreHarmonic();
5c078806 59 // 2.) Method Make() and methods called within Make():
d66d46f7 60 virtual void Make(AliFlowEventSimple *anEvent);
61 virtual void CheckPointersUsedInMake();
62 virtual void Calculate3pCorrelator();
63 virtual void CalculateNonIsotropicTerms();
5c078806 64 virtual void CalculateDifferential3pCorrelator();
d66d46f7 65 virtual void ResetEventByEventQuantities();
66 // 3.) Method Finish() and methods called within Finish():
67 virtual void Finish();
d66d46f7 68 virtual void AccessSettings();
e999459d 69 virtual void CheckPointersUsedInFinish();
d66d46f7 70 virtual void CorrectForDetectorEffects();
e558a733 71 virtual void CorrectForDetectorEffectsVsM();
5c078806 72 virtual void PrintOnTheScreen();
d66d46f7 73 // 4.) Method GetOutputHistograms and method called within it:
74 virtual void GetOutputHistograms(TList *outputListHistos);
ecac11c2 75 virtual void GetPointersForBaseHistograms();
d66d46f7 76 virtual void GetPointersForCommonHistograms();
ecac11c2 77 virtual void GetPointersForAllEventProfiles();
d66d46f7 78 virtual void GetPointersForResultsHistograms();
79 // 5.) Other methods:
80 virtual void WriteHistograms(TString outputFileName);
81 virtual void WriteHistograms(TDirectoryFile *outputFileName);
82 // 6.) Setters and getters:
83 void SetHistList(TList* const hl) {this->fHistList = hl;}
84 TList* GetHistList() const {return this->fHistList;}
85 void SetHistListName(const char *hln) {this->fHistListName->Append(*hln);};
86 TString *GetHistListName() const {return this->fHistListName;};
e999459d 87 void SetHarmonic(Int_t const harmonic) {this->fHarmonic = harmonic;};
88 Int_t GetHarmonic() const {return this->fHarmonic;};
d66d46f7 89 void SetAnalysisLabel(const char *al) {this->fAnalysisLabel->Append(*al);};
90 TString *GetAnalysisLabel() const {return this->fAnalysisLabel;};
91 void SetAnalysisSettings(TProfile* const as) {this->fAnalysisSettings = as;};
ecac11c2 92 TProfile* GetAnalysisSettings() const {return this->fAnalysisSettings;};
d66d46f7 93 void SetNoOfMultipicityBins(Int_t const nomb) {this->fNoOfMultipicityBins = nomb;};
94 Int_t GetNoOfMultipicityBins() const {return this->fNoOfMultipicityBins;};
95 void SetMultipicityBinWidth(Double_t const mbw) {this->fMultipicityBinWidth = mbw;};
96 Double_t GetMultipicityBinWidth() const {return this->fMultipicityBinWidth;};
97 void SetMinMultiplicity(Double_t const mm) {this->fMinMultiplicity = mm;};
98 Double_t GetMinMultiplicity() const {return this->fMinMultiplicity;};
e999459d 99 void SetOppositeChargesPOI(Bool_t const ocp) {this->fOppositeChargesPOI = ocp;};
100 Bool_t GetOppositeChargesPOI() const {return this->fOppositeChargesPOI;};
101 void SetEvaluateDifferential3pCorrelator(Bool_t const ed3pc) {this->fEvaluateDifferential3pCorrelator = ed3pc;};
102 Bool_t GetEvaluateDifferential3pCorrelator() const {return this->fEvaluateDifferential3pCorrelator;};
d66d46f7 103 void SetCorrectForDetectorEffects(Bool_t const cfde) {this->fCorrectForDetectorEffects = cfde;};
104 Bool_t GetCorrectForDetectorEffects() const {return this->fCorrectForDetectorEffects;};
5c078806 105 void SetPrintOnTheScreen(Bool_t const pots) {this->fPrintOnTheScreen = pots;};
106 Bool_t GetPrintOnTheScreen() const {return this->fPrintOnTheScreen;};
d66d46f7 107 void SetCommonHists(AliFlowCommonHist* const ch) {this->fCommonHists = ch;};
108 AliFlowCommonHist* GetCommonHists() const {return this->fCommonHists;};
109 void SetWeightsList(TList* const wl) {this->fWeightsList = (TList*)wl->Clone();}
110 TList* GetWeightsList() const {return this->fWeightsList;}
111 void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
112 Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
113 void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
114 Bool_t GetUsePtWeights() const {return this->fUsePtWeights;};
115 void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;};
116 Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;};
117 void SetUseParticleWeights(TProfile* const uPW) {this->fUseParticleWeights = uPW;};
118 TProfile* GetUseParticleWeights() const {return this->fUseParticleWeights;};
119 void SetPhiWeights(TH1F* const histPhiWeights) {this->fPhiWeights = histPhiWeights;};
120 TH1F* GetPhiWeights() const {return this->fPhiWeights;};
121 void SetPtWeights(TH1D* const histPtWeights) {this->fPtWeights = histPtWeights;};
122 TH1D* GetPtWeights() const {return this->fPtWeights;};
123 void SetEtaWeights(TH1D* const histEtaWeights) {this->fEtaWeights = histEtaWeights;};
124 TH1D* GetEtaWeights() const {return this->fEtaWeights;};
ecac11c2 125 void SetProfileList(TList* const plist) {this->fProfileList = plist;}
126 TList* GetProfileList() const {return this->fProfileList;}
d66d46f7 127 void Set3pCorrelatorPro(TProfile* const s3pPro) {this->f3pCorrelatorPro = s3pPro;};
128 TProfile* Get3pCorrelatorPro() const {return this->f3pCorrelatorPro;};
ecac11c2 129 void SetNonIsotropicTermsPro(TProfile* const nitPro) {this->fNonIsotropicTermsPro = nitPro;};
d66d46f7 130 TProfile* GetNonIsotropicTermsPro() const {return this->fNonIsotropicTermsPro;};
ecac11c2 131 void Set3pCorrelatorVsMPro(TProfile* const s3pVsMPro) {this->f3pCorrelatorVsMPro = s3pVsMPro;};
d66d46f7 132 TProfile* Get3pCorrelatorVsMPro() const {return this->f3pCorrelatorVsMPro;};
ecac11c2 133 void SetNonIsotropicTermsVsMPro(TProfile2D* const nitVsMPro) {this->fNonIsotropicTermsVsMPro = nitVsMPro;};
d66d46f7 134 TProfile2D* GetNonIsotropicTermsVsMPro() const {return this->fNonIsotropicTermsVsMPro;};
135 void SetResultsList(TList* const rlist) {this->fResultsList = rlist;}
5c078806 136 TList* GetResultsList() const {return this->fResultsList;}
137 void Set3pCorrelatorHist(TH1D* const s3pHist) {this->f3pCorrelatorHist = s3pHist;};
e558a733 138 TH1D* Get3pCorrelatorHist() const {return this->f3pCorrelatorHist;};
139 void Set3pCorrelatorVsMHist(TH1D* const s3pVsMHist) {this->f3pCorrelatorVsMHist = s3pVsMHist;};
140 TH1D* Get3pCorrelatorVsMHist() const {return this->f3pCorrelatorVsMHist;};
d66d46f7 141 void SetDetectorBiasHist(TH1D* const dbHist) {this->fDetectorBiasHist = dbHist;};
142 TH1D* GetDetectorBiasHist() const {return this->fDetectorBiasHist;};
d66d46f7 143 void SetDetectorBiasVsMHist(TH1D* const dbVsMHist) {this->fDetectorBiasVsMHist = dbVsMHist;};
144 TH1D* GetDetectorBiasVsMHist() const {return this->fDetectorBiasVsMHist;};
5c078806 145 void Set3pCorrelatorVsPtSumDiffPro(TProfile* const s3pcvpsd, Int_t const sd) {this->f3pCorrelatorVsPtSumDiffPro[sd] = s3pcvpsd;};
146 TProfile* Get3pCorrelatorVsPtSumDiffPro(Int_t sd) const {return this->f3pCorrelatorVsPtSumDiffPro[sd];};
147
d66d46f7 148 private:
149 AliFlowAnalysisWithMixedHarmonics(const AliFlowAnalysisWithMixedHarmonics& afawQc);
150 AliFlowAnalysisWithMixedHarmonics& operator=(const AliFlowAnalysisWithMixedHarmonics& afawQc);
151 // 0.) Base:
152 TList *fHistList; // base list to hold all output objects
153 TString *fHistListName; // name of base list
e999459d 154 Int_t fHarmonic; // harmonic n in cos[n*(phi1+phi2-2phi3)] and cos[n*(psi1+psi2-2phi3)]
d66d46f7 155 TString *fAnalysisLabel; // analysis label
156 TProfile *fAnalysisSettings; // profile to hold analysis settings
d66d46f7 157 Int_t fNoOfMultipicityBins; // number of multiplicity bins
158 Double_t fMultipicityBinWidth; // width of multiplicity bin
159 Double_t fMinMultiplicity; // minimal multiplicity
e999459d 160 Bool_t fOppositeChargesPOI; // two POIs, psi1 and psi2, in correlator <<cos[psi1+psi2-2phi3)]>> will be taken with opposite charges
161 Bool_t fEvaluateDifferential3pCorrelator; // evaluate <<cos[psi1+psi2-2phi3)]>>, where psi1 and psi2 are two POIs
d66d46f7 162 Bool_t fCorrectForDetectorEffects; // correct 3-p correlator for detector effects
5c078806 163 Bool_t fPrintOnTheScreen; // print or not the final results on the screen
d66d46f7 164 // 1.) Common:
165 AliFlowCommonHist *fCommonHists; // common control histograms (filled only with events with 3 or more tracks for 3-p correlators)
166 Int_t fnBinsPhi; // number of phi bins
167 Double_t fPhiMin; // minimum phi
168 Double_t fPhiMax; // maximum phi
169 Double_t fPhiBinWidth; // bin width for phi histograms
170 Int_t fnBinsPt; // number of pt bins
171 Double_t fPtMin; // minimum pt
172 Double_t fPtMax; // maximum pt
173 Double_t fPtBinWidth; // bin width for pt histograms
174 Int_t fnBinsEta; // number of eta bins
175 Double_t fEtaMin; // minimum eta
176 Double_t fEtaMax; // maximum eta
177 Double_t fEtaBinWidth; // bin width for eta histograms
178 // 2a.) Particle weights:
179 TList *fWeightsList; // list to hold all histograms with particle weights: fUseParticleWeights, fPhiWeights, fPtWeights and fEtaWeights
180 Bool_t fUsePhiWeights; // use phi weights
181 Bool_t fUsePtWeights; // use pt weights
182 Bool_t fUseEtaWeights; // use eta weights
183 TProfile *fUseParticleWeights; // profile with three bins to hold values of fUsePhiWeights, fUsePtWeights and fUseEtaWeights
184 TH1F *fPhiWeights; // histogram holding phi weights
185 TH1D *fPtWeights; // histogram holding phi weights
186 TH1D *fEtaWeights; // histogram holding phi weights
187 // 3.) Event-by-event quantities:
188 TMatrixD *fReQnk; // fReQ[n][k] = Re[Q_{n,k}] = sum_{i=1}^{M} w_{i}^{k} cos(n*phi_{i})
189 TMatrixD *fImQnk; // fImQ[n][k] = Im[Q_{n,k}] = sum_{i=1}^{M} w_{i}^{k} sin(n*phi_{i})
190 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
5c078806 191 TProfile *fRePEBE[2]; // real part of p_n vs [(p1+p2)/2,|p1-p2|]
192 TProfile *fImPEBE[2]; // imaginary part of p_n vs [(p1+p2)/2,|p1-p2|]
e999459d 193 TProfile *fOverlapEBE[2][2]; // cos[n(psi-phi)] vs [(p1+p2)/2,|p1-p2|], where phi stands for 1st/2nd POI which is also RP
d66d46f7 194 // 4.) Profiles:
ecac11c2 195 TList *fProfileList; // list holding all all-event profiles
e999459d 196 TProfile *f3pCorrelatorPro; // 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> (not corrected for detector effects)
197 TProfile *fNonIsotropicTermsPro; // non-isotropic terms in the decomposition of 3-p correlator <<cos[n(phi1+phi2-2phi3)]>>
198 TProfile *f3pCorrelatorVsMPro; // 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> vs multiplicity
199 TProfile2D *fNonIsotropicTermsVsMPro; // non-isotropic terms in the decomposition of <cos[n(phi1+phi2-2phi3))]> vs multiplicity
200 TProfile *f3pCorrelatorVsPtSumDiffPro[2]; // differential 3-p correlator <<cos[psi1+psi2-2phi3)]>> vs [(p1+p2)/2,|p1-p2|]
d66d46f7 201 // 5.) Final results:
202 TList *fResultsList; // list holding objects with final results
e999459d 203 TH1D *f3pCorrelatorHist; // 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> corrected for detector effects
204 TH1D *fDetectorBiasHist; // bias coming from detector inefficiencies to 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> (in %)
205 TH1D *f3pCorrelatorVsMHist; // 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> vs multiplicity corrected for detector effects
206 TH1D *fDetectorBiasVsMHist; // bias coming from detector inefficiencies to 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> (in %) versus multiplicity
5c078806 207
d66d46f7 208 ClassDef(AliFlowAnalysisWithMixedHarmonics, 0);
209
210};
211
212//================================================================================================================
213
214#endif
215
216
217
218
219