]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/FLOW/Tasks/AliAnalysisTaskQCumulants.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWG / FLOW / Tasks / AliAnalysisTaskQCumulants.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  * analysis task for Q-cumulants      * 
9  *                                    * 
10  * authors: Naomi van der Kolk        *
11  *           (kolk@nikhef.nl)         *  
12  *          Raimond Snellings         *
13  *           (snelling@nikhef.nl)     * 
14  *          Ante Bilandzic            *
15  *           (anteb@nikhef.nl)        * 
16  * ***********************************/
17
18 #ifndef ALIANALYSISTASKQCUMULANTS_H
19 #define ALIANALYSISTASKQCUMULANTS_H
20
21 #include "AliAnalysisTaskSE.h"
22 #include "AliFlowCommonConstants.h"
23
24 class TString;
25 class TList;
26 class AliFlowEventSimple;
27 class AliFlowAnalysisWithQCumulants;
28
29 //================================================================================================================
30
31 class AliAnalysisTaskQCumulants : public AliAnalysisTaskSE{
32  public:
33   AliAnalysisTaskQCumulants();
34   AliAnalysisTaskQCumulants(const char *name, Bool_t useParticleWeights=kFALSE);
35   virtual ~AliAnalysisTaskQCumulants(){}; 
36   
37   virtual void UserCreateOutputObjects();
38   virtual void UserExec(Option_t *option);
39   virtual void Terminate(Option_t *);
40   
41   // Common:
42   void SetBookOnlyBasicCCH(Bool_t const bobcch) {this->fBookOnlyBasicCCH = bobcch;};
43   Bool_t GetBookOnlyBasicCCH() const {return this->fBookOnlyBasicCCH;};  
44   void SetFillMultipleControlHistograms(Bool_t const fmch) {this->fFillMultipleControlHistograms = fmch;};
45   Bool_t GetFillMultipleControlHistograms() const {return this->fFillMultipleControlHistograms;}; 
46   void SetHarmonic(Int_t const harmonic) {this->fHarmonic = harmonic;};
47   Int_t GetHarmonic() const {return this->fHarmonic;};
48   void SetApplyCorrectionForNUA(Bool_t const applyCorrectionForNUA) {this->fApplyCorrectionForNUA = applyCorrectionForNUA;};
49   Bool_t GetApplyCorrectionForNUA() const {return this->fApplyCorrectionForNUA;};
50   void SetApplyCorrectionForNUAVsM(Bool_t const applyCorrectionForNUAVsM) {this->fApplyCorrectionForNUAVsM = applyCorrectionForNUAVsM;};
51   Bool_t GetApplyCorrectionForNUAVsM() const {return this->fApplyCorrectionForNUAVsM;};      
52   void SetPropagateErrorAlsoFromNIT(Bool_t const peafNIT) {this->fPropagateErrorAlsoFromNIT = peafNIT;};
53   Bool_t GetPropagateErrorAlsoFromNIT() const {return this->fPropagateErrorAlsoFromNIT;};  
54   void SetCalculateDiffFlow(Bool_t const calculateDiffFlow) {this->fCalculateDiffFlow = calculateDiffFlow;};
55   Bool_t GetCalculateDiffFlow() const {return this->fCalculateDiffFlow;};
56   void SetCalculate2DDiffFlow(Bool_t const calculate2DDiffFlow) {this->fCalculate2DDiffFlow = calculate2DDiffFlow;};
57   Bool_t GetCalculate2DDiffFlow() const {return this->fCalculate2DDiffFlow;};
58   void SetCalculateDiffFlowVsEta(Bool_t const cdfve) {this->fCalculateDiffFlowVsEta = cdfve;};
59   Bool_t GetCalculateDiffFlowVsEta() const {return this->fCalculateDiffFlowVsEta;};  
60   void SetStoreDistributions(Bool_t const storeDistributions) {this->fStoreDistributions = storeDistributions;};
61   Bool_t GetStoreDistributions() const {return this->fStoreDistributions;};
62   void SetCalculateCumulantsVsM(Bool_t const ccvm) {this->fCalculateCumulantsVsM = ccvm;};
63   Bool_t GetCalculateCumulantsVsM() const {return this->fCalculateCumulantsVsM;};
64   void SetCalculateAllCorrelationsVsM(Bool_t const cacvm) {this->fCalculateAllCorrelationsVsM = cacvm;};
65   Bool_t GetCalculateAllCorrelationsVsM() const {return this->fCalculateAllCorrelationsVsM;}; 
66   void SetCalculateMixedHarmonics(Bool_t const cmh) {this->fCalculateMixedHarmonics = cmh;};
67   Bool_t GetCalculateMixedHarmonics() const {return this->fCalculateMixedHarmonics;};   
68   void SetCalculateMixedHarmonicsVsM(Bool_t const cmhvm) {this->fCalculateMixedHarmonicsVsM = cmhvm;};
69   Bool_t GetCalculateMixedHarmonicsVsM() const {return this->fCalculateMixedHarmonicsVsM;}; 
70   void SetStoreControlHistograms(Bool_t const sch) {this->fStoreControlHistograms = sch;};
71   Bool_t GetStoreControlHistograms() const {return this->fStoreControlHistograms;};
72   void SetMinimumBiasReferenceFlow(Bool_t const mmrf) {this->fMinimumBiasReferenceFlow = mmrf;};
73   Bool_t GetMinimumBiasReferenceFlow() const {return this->fMinimumBiasReferenceFlow;};     
74   void SetForgetAboutCovariances(Bool_t const fac) {this->fForgetAboutCovariances = fac;};
75   Bool_t GetForgetAboutCovariances() const {return this->fForgetAboutCovariances;};   
76   void SetStorePhiDistributionForOneEvent(Bool_t const spdfoe) {this->fStorePhiDistributionForOneEvent = spdfoe;};
77   Bool_t GetStorePhiDistributionForOneEvent() const {return this->fStorePhiDistributionForOneEvent;};
78   void SetPhiDistributionForOneEventSettings(Double_t const pdfoes, Int_t const i) {this->fPhiDistributionForOneEventSettings[i] = pdfoes;};
79   Double_t GetPhiDistributionForOneEventSettings(Int_t const i) const {return this->fPhiDistributionForOneEventSettings[i];};  
80   void SetExactNoRPs(Int_t const enr) {this->fExactNoRPs = enr;};
81   Int_t GetExactNoRPs() const {return this->fExactNoRPs;}; 
82   void SetUse2DHistograms(Bool_t const u2dh){this->fUse2DHistograms = u2dh;if(u2dh){this->fStoreControlHistograms = kTRUE;}};
83   Bool_t GetUse2DHistograms() const {return this->fUse2DHistograms;};
84   void SetFillProfilesVsMUsingWeights(Bool_t const fpvmuw){this->fFillProfilesVsMUsingWeights = fpvmuw;};
85   Bool_t GetFillProfilesVsMUsingWeights() const {return this->fFillProfilesVsMUsingWeights;};
86   void SetUseQvectorTerms(Bool_t const uqvt){this->fUseQvectorTerms = uqvt;if(uqvt){this->fStoreControlHistograms = kTRUE;}};
87   Bool_t GetUseQvectorTerms() const {return this->fUseQvectorTerms;};
88  
89   // Multiparticle correlations vs multiplicity:
90   void SetnBinsMult(Int_t const nbm) {this->fnBinsMult = nbm;};
91   Int_t GetnBinsMult() const {return this->fnBinsMult;};  
92   void SetMinMult(Double_t const minm) {this->fMinMult = minm;};
93   Double_t GetMinMult() const {return this->fMinMult;};
94   void SetMaxMult(Double_t const maxm) {this->fMaxMult = maxm;};
95   Double_t GetMaxMult() const {return this->fMaxMult;};
96   // Particle weights:
97   void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
98   Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
99   void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
100   Bool_t GetUsePtWeights() const {return this->fUsePtWeights;};
101   void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;};
102   Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;};
103   void SetUseTrackWeights(Bool_t const uTrackW) {this->fUseTrackWeights = uTrackW;};
104   Bool_t GetUseTrackWeights() const {return this->fUseTrackWeights;};
105   // Event weights:
106   void SetMultiplicityWeight(const char *multiplicityWeight) {*this->fMultiplicityWeight = multiplicityWeight;};
107   void SetMultiplicityIs(AliFlowCommonConstants::ERefMultSource mi) {this->fMultiplicityIs = mi;};
108   // # of bins for correlation axis in fDistributions[4], fCorrelation2468VsMult[4] and fCorrelationProduct2468VsMult[1]
109   void SetnBinsForCorrelations(Int_t const nb) {this->fnBinsForCorrelations = nb;};
110   Int_t GetnBinsForCorrelations() const {return this->fnBinsForCorrelations;};
111   // Boundaries for distributions of correlations:
112   void SetMinValueOfCorrelation(Int_t const ci, Double_t const minValue) {this->fMinValueOfCorrelation[ci] = minValue;};
113   Double_t GetMinValueOfCorrelation(Int_t ci) const {return this->fMinValueOfCorrelation[ci];};
114   void SetMaxValueOfCorrelation(Int_t const ci, Double_t const maxValue) {this->fMaxValueOfCorrelation[ci] = maxValue;};
115   Double_t GetMaxValueOfCorrelation(Int_t ci) const {return this->fMaxValueOfCorrelation[ci];};
116   // min and max values of correlation products:
117   void SetMinValueOfCorrelationProduct(Int_t const cpi, Double_t const minValue) {this->fMinValueOfCorrelationProduct[cpi] = minValue;};
118   Double_t GetMinValueOfCorrelationProduct(Int_t cpi) const {return this->fMinValueOfCorrelationProduct[cpi];};
119   void SetMaxValueOfCorrelationProduct(Int_t const cpi, Double_t const maxValue) {this->fMaxValueOfCorrelationProduct[cpi] = maxValue;};
120   Double_t GetMaxValueOfCorrelationProduct(Int_t cpi) const {return this->fMaxValueOfCorrelationProduct[cpi];};
121   // min and max values of QvectorTerms:
122   void SetMinValueOfQvectorTerms(Int_t const qvti, Double_t const minValue) {this->fMinValueOfQvectorTerms[qvti] = minValue;};
123   Double_t GetMinValueOfQvectorTerms(Int_t qvti) const {return this->fMinValueOfQvectorTerms[qvti];};
124   void SetMaxValueOfQvectorTerms(Int_t const qvti, Double_t const maxValue) {this->fMaxValueOfQvectorTerms[qvti] = maxValue;};
125   Double_t GetMaxValueOfQvectorTerms(Int_t qvti) const {return this->fMaxValueOfQvectorTerms[qvti];};
126   // bootstrap:
127   void SetUseBootstrap(Bool_t const ub) {this->fUseBootstrap = ub;};
128   Bool_t GetUseBootstrap() const {return this->fUseBootstrap;};
129   void SetUseBootstrapVsM(Bool_t const ubVsM) {this->fUseBootstrapVsM = ubVsM;};
130   Bool_t GetUseBootstrapVsM() const {return this->fUseBootstrapVsM;};
131   void SetnSubsamples(Int_t const ns) {this->fnSubsamples = ns;};
132   Int_t GetnSubsamples() const {return this->fnSubsamples;};
133
134  private:
135   AliAnalysisTaskQCumulants(const AliAnalysisTaskQCumulants& aatqc);
136   AliAnalysisTaskQCumulants& operator=(const AliAnalysisTaskQCumulants& aatqc);
137   
138   AliFlowEventSimple *fEvent;         // the input event
139   AliFlowAnalysisWithQCumulants *fQC; // Q-cumulant object
140   TList *fListHistos;                 // collection of output 
141   // Common:
142   Bool_t fBookOnlyBasicCCH;              // book only basis common control histrograms (by default book them all) 
143   Bool_t fFillMultipleControlHistograms; // fill separately control histos for events with >= 2, 4, 6 and 8 particles
144   Int_t fHarmonic;                       // harmonic  
145   Bool_t fApplyCorrectionForNUA;         // apply correction for non-uniform acceptance 
146   Bool_t fApplyCorrectionForNUAVsM;      // apply correction for non-uniform acceptance versus M    
147   Bool_t fPropagateErrorAlsoFromNIT;     // propagate error by taking into account also non-isotrpic terms  
148   Bool_t fCalculateDiffFlow;             // calculate differential flow in pt or eta
149   Bool_t fCalculate2DDiffFlow;           // calculate differential flow in (pt,eta) (Remark: this is very expensive in terms of CPU time)
150   Bool_t fCalculateDiffFlowVsEta;        // if you set kFALSE only differential flow vs pt is calculated  
151   Bool_t fStoreDistributions;            // store or not distributions of correlations
152   Bool_t fCalculateCumulantsVsM;         // calculate cumulants versus multiplicity  
153   Bool_t fCalculateAllCorrelationsVsM;   // calculate all correlations versus multiplicity   
154   Bool_t fCalculateMixedHarmonics;       // calculate all mixed harmonics correlations     
155   Bool_t fCalculateMixedHarmonicsVsM;    // calculate all mixed harmonics correlations versus multiplicity 
156   Bool_t fStoreControlHistograms;        // store or not control histograms
157   Bool_t fMinimumBiasReferenceFlow;      // store as reference flow in AliFlowCommonHistResults the minimum bias result (kFALSE by default)     
158   Bool_t fForgetAboutCovariances;        // when propagating error forget about the covariances  
159   Bool_t fStorePhiDistributionForOneEvent; // store phi distribution for one event to illustrate flow
160   Double_t fPhiDistributionForOneEventSettings[4]; // [v_min,v_max,refMult_min,refMult_max]
161   Int_t fExactNoRPs;                     // when shuffled, select only this number of RPs for the analysis 
162   Bool_t fUse2DHistograms;               // use TH2D instead of TProfile to improve numerical stability in reference flow calculation   
163   Bool_t fFillProfilesVsMUsingWeights;   // if the width of multiplicity bin is 1, weights are not needed   
164   Bool_t fUseQvectorTerms; // use TH2D with separate Q-vector terms instead of TProfile to improve numerical stability in reference flow calculation    
165   // Multiparticle correlations vs multiplicity:
166   Int_t fnBinsMult;                   // number of multiplicity bins for flow analysis versus multiplicity  
167   Double_t fMinMult;                  // minimal multiplicity for flow analysis versus multiplicity  
168   Double_t fMaxMult;                  // maximal multiplicity for flow analysis versus multiplicity    
169   // Particle weights:
170   Bool_t fUseParticleWeights;         // use any particle weights
171   Bool_t fUsePhiWeights;              // use phi weights
172   Bool_t fUsePtWeights;               // use pt weights
173   Bool_t fUseEtaWeights;              // use eta weights  
174   Bool_t fUseTrackWeights;            // use track weights (e.g. VZERO sector weights)  
175   TList *fWeightsList;                // list with weights
176   // Event weights:
177   TString *fMultiplicityWeight;       // event-by-event weights for multiparticle correlations ("combinations","unit" or "multiplicity")  
178   AliFlowCommonConstants::ERefMultSource fMultiplicityIs;           // by default "#RPs", other supported options are "RefMultFromESD" = ref. mult. from ESD, and "#POIs"
179   Int_t fnBinsForCorrelations; // # of bins for correlation axis in fDistributions[4], fCorrelation2468VsMult[4] and fCorrelationProduct2468VsMult[1]
180   // Boundaries for distributions of correlations:
181   Double_t fMinValueOfCorrelation[4]; // min values of <2>, <4>, <6> and <8>
182   Double_t fMaxValueOfCorrelation[4]; // max values of <2>, <4>, <6> and <8>
183   Double_t fMinValueOfCorrelationProduct[1]; // min values of <2><4>, <2><6>, <2><8>, <4><6> etc. TBI add the other ones when needed first time
184   Double_t fMaxValueOfCorrelationProduct[1]; // max values of <2><4>, <2><6>, <2><8>, <4><6> etc. TBI add the other ones when needed first time
185   Double_t fMinValueOfQvectorTerms[4]; // min value of Q-vector terms
186   Double_t fMaxValueOfQvectorTerms[4]; // max value of Q-vector terms
187   // Bootstrap:
188   Bool_t fUseBootstrap; // use bootstrap to estimate statistical spread
189   Bool_t fUseBootstrapVsM; // use bootstrap to estimate statistical spread for results vs M
190   Int_t fnSubsamples; // number of subsamples (SS), by default 10
191   
192   ClassDef(AliAnalysisTaskQCumulants, 2); 
193 };
194
195 //================================================================================================================
196
197 #endif
198
199
200
201
202
203
204
205
206
207
208