]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithCumulants.h
cleanup of GFC cumulants (some well deserved attention)
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowAnalysisWithCumulants.h
index 4e86c7af78d76d773a7b26a87a5d74f765575d86..d46c42fed840e9e337437cfeeae439b60fbbef1d 100644 (file)
@@ -4,24 +4,27 @@
  * $Id$ 
  */
 
-/******************************** 
- * flow analysis with cumulants * 
- *                              * 
- * author: Ante Bilandzic       * 
- *          (anteb@nikhef.nl)   *
- *******************************/ 
+/************************************************* 
+ * Flow analysis with cumulants. In this class   *
+ * cumulants are calculated by making use of the *
+ * formalism of generating functions proposed by *
+ * Ollitrault et al.                             *
+ *                                               * 
+ *      Author: Ante Bilandzic                   * 
+ *              (abilandzic@gmail.com)           *
+ *************************************************/ 
 
 #ifndef ALIFLOWANALYSISWITHCUMULANTS_H
 #define ALIFLOWANALYSISWITHCUMULANTS_H
 
-#include "AliFlowCommonConstants.h"
-#include "AliFlowCumuConstants.h"
+#include "AliFlowCommonConstants.h" 
+#include "TMatrixD.h"
 
-class TObjArray;
 class TList;
 class TFile;
 
 class TH1D;
+class TH1F;
 class TProfile;
 class TProfile2D;
 class TProfile3D;
@@ -39,238 +42,247 @@ class AliFlowAnalysisWithCumulants{
  public:
   AliFlowAnalysisWithCumulants();
   virtual ~AliFlowAnalysisWithCumulants(); 
-  
+  // 0.) Methods called in the constructor:
+    virtual void InitializeArrays();
+  // 1.) Method Init() and methods called within Init():
   virtual void Init();
+    virtual void CrossCheckSettings();
+    virtual void AccessConstants();
+    virtual void BookAndNestAllLists();
+    virtual void BookProfileHoldingSettings();
+    virtual void BookCommonHistograms();
+    virtual void BookAndFillWeightsHistograms();
+    virtual void BookEverythingForReferenceFlow();
+    virtual void BookEverythingForDiffFlow();
+    virtual void StoreReferenceFlowFlags();
+    virtual void StoreDiffFlowFlags();  
+    virtual void BookEverythingForTuning();  
+  // 2.) Method Make() and methods called within Make():
   virtual void Make(AliFlowEventSimple* anEvent);
-  virtual void GetOutputHistograms(TList *outputListHistos); //get pointers to all output histograms (called before Finish()) 
-  virtual void Finish();
-  virtual void WriteHistograms(TString* outputFileName);
+     virtual void CheckPointersUsedInMake(); 
+     virtual void FillGeneratingFunctionForReferenceFlow(AliFlowEventSimple *anEvent);
+     virtual void FillQvectorComponents(AliFlowEventSimple *anEvent);    
+     virtual void FillGeneratingFunctionForDiffFlow(AliFlowEventSimple *anEvent); 
+     virtual void FillGeneratingFunctionsForDifferentTuningParameters(AliFlowEventSimple *anEvent);     
+  // 3.) Method Finish() and methods called within Finish():
+  virtual void Finish();  
+    virtual void CheckPointersUsedInFinish(); 
+    virtual void AccessSettings();
+    virtual void GetAvMultAndNoOfEvts();
+    virtual void CalculateCumulantsForReferenceFlow();
+    virtual void CalculateReferenceFlow();
+    virtual void CalculateReferenceFlowError();
+    virtual void FillCommonHistResultsForReferenceFlow();
+    virtual void CalculateCumulantsForDiffFlow(TString rpPoi,TString ptEta);
+    virtual void CalculateDifferentialFlow(TString rpPoi,TString ptEta);
+    virtual void CalculateDifferentialFlowErrors(TString rpPoi,TString ptEta);
+    virtual void FillCommonHistResultsForDifferentialFlow(TString rpPoi);
+    virtual void CalculateIntegratedFlow(TString rpPoi); // to be improved (add also possibility to integrate over eta yield)        
+    virtual void PrintFinalResults(TString rpPoi);
+    virtual void FinalizeTuning();
+  // 4.) Method GetOutputHistograms() and method called within it:
+  virtual void GetOutputHistograms(TList *outputListHistos);
+    virtual void GetPointersForBaseHistograms();
+    virtual void GetPointersForCommonControlHistograms();
+    virtual void GetPointersForCommonResultsHistograms();
+    virtual void GetPointersForParticleWeightsHistograms();
+    virtual void GetPointersForReferenceFlowObjects();
+    virtual void GetPointersForDiffFlowObjects();
+  virtual void WriteHistograms(TString *outputFileName);
   virtual void WriteHistograms(TString outputFileName);
   virtual void WriteHistograms(TDirectoryFile *outputFileName);
-  
-//----------------------------------------------------------------------------------------------------------------
-//                                            setters and getters                                                 
-//----------------------------------------------------------------------------------------------------------------
-  TList* GetHistList() const {return this->fHistList;}     
-  
-  void SetWeightsList(TList* wlist) {this->fWeightsList = wlist;}
-  TList* GetWeightsList() const {return this->fWeightsList;}
-  
-  void SetIntFlowResults(TH1D* const ifr)  {this->fIntFlowResultsGFC = ifr;};
-  TH1D* GetIntFlowResults() const    {return this->fIntFlowResultsGFC;};
-  
-  void SetDiffFlowResults2nd(TH1D* const diff2nd)  {this->fDiffFlowResults2ndOrderGFC = diff2nd;};
-  TH1D* GetDiffFlowResults2nd() const        {return this->fDiffFlowResults2ndOrderGFC;};
-  
-  void SetDiffFlowResults4th(TH1D* const diff4th)  {this->fDiffFlowResults4thOrderGFC = diff4th;};
-  TH1D* GetDiffFlowResults4th() const        {return this->fDiffFlowResults4thOrderGFC;};
-  
-  void SetDiffFlowResults6th(TH1D* const diff6th)  {this->fDiffFlowResults6thOrderGFC = diff6th;};
-  TH1D* GetDiffFlowResults6th() const        {return this->fDiffFlowResults6thOrderGFC;};
-  
-  void SetDiffFlowResults8th(TH1D* const diff8th)  {this->fDiffFlowResults8thOrderGFC = diff8th;};
-  TH1D* GetDiffFlowResults8th() const        {return this->fDiffFlowResults8thOrderGFC;};
-  
-  void SetCommonHistsResults2nd(AliFlowCommonHistResults* const chr2nd)  {this->fCommonHistsResults2nd = chr2nd;};
-  AliFlowCommonHistResults* GetCommonHistsResults2nd() const       {return this->fCommonHistsResults2nd;};
-  
-  void SetCommonHistsResults4th(AliFlowCommonHistResults* const chr4th)  {this->fCommonHistsResults4th = chr4th;};
-  AliFlowCommonHistResults* GetCommonHistsResults4th() const       {return this->fCommonHistsResults4th;};
-  
-  void SetCommonHistsResults6th(AliFlowCommonHistResults* const chr6th)  {this->fCommonHistsResults6th = chr6th;};
-  AliFlowCommonHistResults* GetCommonHistsResults6th() const       {return this->fCommonHistsResults6th;};
-  
-  void SetCommonHistsResults8th(AliFlowCommonHistResults* const chr8th)  {this->fCommonHistsResults8th = chr8th;};
-  AliFlowCommonHistResults* GetCommonHistsResults8th() const       {return this->fCommonHistsResults8th;};
-  
-  void SetIntFlowGenFun(TProfile2D* const ifgf)  {this->fIntFlowGenFun = ifgf;};
-  TProfile2D* GetIntFlowGenFun() const     {return this->fIntFlowGenFun;};
-
-  void SetIntFlowGenFun4(TProfile2D* const ifgf4)  {this->fIntFlowGenFun4 = ifgf4;}; //(only for other system of Eq.)
-  TProfile2D* GetIntFlowGenFun4() const      {return this->fIntFlowGenFun4;};  //(only for other system of Eq.)
-  
-  void SetIntFlowGenFun6(TProfile2D* const ifgf6)  {this->fIntFlowGenFun6 = ifgf6;}; //(only for other system of Eq.)
-  TProfile2D* GetIntFlowGenFun6() const      {return this->fIntFlowGenFun6;};  //(only for other system of Eq.)
-  
-  void SetIntFlowGenFun8(TProfile2D* const ifgf8)  {this->fIntFlowGenFun8 = ifgf8;}; //(only for other system of Eq.)
-  TProfile2D* GetIntFlowGenFun8() const      {return this->fIntFlowGenFun8;};  //(only for other system of Eq.)
-  
-  void SetIntFlowGenFun16(TProfile2D* const ifgf16)  {this->fIntFlowGenFun16 = ifgf16;}; //(only for other system of Eq.)
-  TProfile2D* GetIntFlowGenFun16() const       {return this->fIntFlowGenFun16;};   //(only for other system of Eq.)
-  void SetAverageMultiplicity4(TProfile* const am4)     {this->fAvMultIntFlow4GFC = am4;};  //(only for other system of Eq.)
-  TProfile* GetAverageMultiplicity4() const       {return this->fAvMultIntFlow4GFC;}; //(only for other system of Eq.)
-  
-  void SetAverageMultiplicity6(TProfile* const am6)     {this->fAvMultIntFlow6GFC = am6;};  //(only for other system of Eq.)
-  TProfile* GetAverageMultiplicity6() const       {return this->fAvMultIntFlow6GFC;}; //(only for other system of Eq.)
-  
-  void SetAverageMultiplicity8(TProfile* const am8)     {this->fAvMultIntFlow8GFC = am8;};  //(only for other system of Eq.)
-  TProfile* GetAverageMultiplicity8() const       {return this->fAvMultIntFlow8GFC;}; //(only for other system of Eq.)
-  
-  void SetAverageMultiplicity16(TProfile* const am16)    {this->fAvMultIntFlow16GFC = am16;}; //(only for other system of Eq.)
-  TProfile* GetAverageMultiplicity16() const       {return this->fAvMultIntFlow16GFC;}; //(only for other system of Eq.)
-  
-  //----------------------------------------------------------------------------------------------------------
-  //RP = Reaction Plane (RP denotes particles used to determine the reaction plane)
-  void SetDiffFlowPtRPGenFunRe(TProfile3D* const dfRPPtgfRe)  {this->fDiffFlowPtRPGenFunRe = dfRPPtgfRe;};
-  TProfile3D* GetDiffFlowPtRPGenFunRe() const            {return this->fDiffFlowPtRPGenFunRe;};
-  
-  void SetDiffFlowPtRPGenFunIm(TProfile3D* const dfRPPtgfIm)  {this->fDiffFlowPtRPGenFunIm = dfRPPtgfIm;};
-  TProfile3D* GetDiffPtRPFlowGenFunIm() const            {return this->fDiffFlowPtRPGenFunIm;};
-  
-  void SetNumberOfParticlesPerPtBinRP(TProfile* const nopppbRP) {this->fPtBinRPNoOfParticles = nopppbRP;};
-  TProfile* GetNumberOfParticlesPerPtBinRP() const         {return this->fPtBinRPNoOfParticles;};  
-  
-  void SetDiffFlowEtaRPGenFunRe(TProfile3D* const dfEtaRPgfRe)   {this->fDiffFlowEtaRPGenFunRe = dfEtaRPgfRe;};
-  TProfile3D* GetDiffFlowEtaRPGenFunRe() const              {return this->fDiffFlowEtaRPGenFunRe;};
-  
-  void SetDiffFlowEtaRPGenFunIm(TProfile3D* const dfEtaRPgfIm)   {this->fDiffFlowEtaRPGenFunIm = dfEtaRPgfIm;};
-  TProfile3D* GetDiffFlowEtaRPGenFunIm() const              {return this->fDiffFlowEtaRPGenFunIm;};
-  
-  void SetNumberOfParticlesPerEtaBinRP(TProfile* const noppebRP)    {this->fEtaBinRPNoOfParticles = noppebRP;};
-  TProfile* GetNumberOfParticlesPerEtaBinRP() const            {return this->fEtaBinRPNoOfParticles;}; 
-  //----------------------------------------------------------------------------------------------------------
-   
-  //----------------------------------------------------------------------------------------------------------
-  //POI = Particles Of Interest (POI denotes particles of interest for the final physical results for int. and diff. flow)
-  void SetDiffFlowPtPOIGenFunRe(TProfile3D* const dfPOIPtgfRe)  {this->fDiffFlowPtPOIGenFunRe = dfPOIPtgfRe;};
-  TProfile3D* GetDiffFlowPtPOIGenFunRe() const            {return this->fDiffFlowPtPOIGenFunRe;};
-  
-  void SetDiffFlowPtPOIGenFunIm(TProfile3D* const dfPOIPtgfIm)  {this->fDiffFlowPtPOIGenFunIm = dfPOIPtgfIm;};
-  TProfile3D* GetDiffPtPOIFlowGenFunIm() const            {return this->fDiffFlowPtPOIGenFunIm;};
-  
-  void SetNumberOfParticlesPerPtBinPOI(TProfile* const nopppbPOI) {this->fPtBinPOINoOfParticles = nopppbPOI;};
-  TProfile* GetNumberOfParticlesPerPtBinPOI() const         {return this->fPtBinPOINoOfParticles;};  
-  
-  void SetDiffFlowEtaPOIGenFunRe(TProfile3D* const dfEtaPOIgfRe)   {this->fDiffFlowEtaPOIGenFunRe = dfEtaPOIgfRe;};
-  TProfile3D* GetDiffFlowEtaPOIGenFunRe() const              {return this->fDiffFlowEtaPOIGenFunRe;};
-  
-  void SetDiffFlowEtaPOIGenFunIm(TProfile3D* const dfEtaPOIgfIm)   {this->fDiffFlowEtaPOIGenFunIm = dfEtaPOIgfIm;};
-  TProfile3D* GetDiffFlowEtaPOIGenFunIm() const              {return this->fDiffFlowEtaPOIGenFunIm;};
-  
-  void SetNumberOfParticlesPerEtaBinPOI(TProfile* const noppebPOI)    {this->fEtaBinPOINoOfParticles = noppebPOI;};
-  TProfile* GetNumberOfParticlesPerEtaBinPOI() const            {return this->fEtaBinPOINoOfParticles;};  
-  //----------------------------------------------------------------------------------------------------------
-    
-  void SetAverageMultiplicity(TProfile* const am)      {this->fAvMultIntFlowGFC = am;};
-  TProfile* GetAverageMultiplicity() const       {return this->fAvMultIntFlowGFC;};
-  
-  void SetQVectorComponents(TProfile* const sqvc)    {this->fQVectorComponentsGFC = sqvc;};
-  TProfile* GetQVectorComponents() const       {return this->fQVectorComponentsGFC;};
-  
-  void SetCommonHists(AliFlowCommonHist* const ch)  {this->fCommonHists = ch;};
-  AliFlowCommonHist* GetCommonHists() const   {return this->fCommonHists;};
-  
+  // 5.) Other methods:   
+  //     ...  
+  // 6.) Setters and getters:
+  //  6.0.) base:
+  void SetHistList(TList* const hl) {this->fHistList = hl;}
+  TList* GetHistList() const {return this->fHistList;}  
+  void SetHistListName(const char *hln) {this->fHistListName->Append(*hln);}; 
+  TString *GetHistListName() const {return this->fHistListName;};
+  void SetAnalysisSettings(TProfile* const as) {this->fAnalysisSettings = as;};
+  TProfile* GetAnalysisSettings() const {return this->fAnalysisSettings;};
+  //  6.1.) common:
+  void SetCommonHists(AliFlowCommonHist* const ch) {this->fCommonHists = ch;};
+  AliFlowCommonHist* GetCommonHists() const {return this->fCommonHists;};
+  void SetCommonHistsResults2nd(AliFlowCommonHistResults* const chr2nd) {this->fCommonHistsResults2nd = chr2nd;};
+  AliFlowCommonHistResults* GetCommonHistsResults2nd() const {return this->fCommonHistsResults2nd;};
+  void SetCommonHistsResults4th(AliFlowCommonHistResults* const chr4th) {this->fCommonHistsResults4th = chr4th;};
+  AliFlowCommonHistResults* GetCommonHistsResults4th() const {return this->fCommonHistsResults4th;};
+  void SetCommonHistsResults6th(AliFlowCommonHistResults* const chr6th) {this->fCommonHistsResults6th = chr6th;};
+  AliFlowCommonHistResults* GetCommonHistsResults6th() const {return this->fCommonHistsResults6th;};
+  void SetCommonHistsResults8th(AliFlowCommonHistResults* const chr8th) {this->fCommonHistsResults8th = chr8th;};
+  AliFlowCommonHistResults* GetCommonHistsResults8th() const {return this->fCommonHistsResults8th;};   
+  void SetHarmonic(Int_t const harmonic) {this->fHarmonic = harmonic;};
+  Int_t GetHarmonic() const {return this->fHarmonic;};   
+  void SetMultiple(Int_t const multiple) {this->fMultiple = multiple;};
+  Int_t GetMultiple() const {return this->fMultiple;};    
+  void SetR0(Double_t const r0) {this->fR0 = r0;};
+  Double_t GetR0() const {return this->fR0;}; 
+  void SetPrintFinalResults(Bool_t const printOrNot, Int_t const i) {this->fPrintFinalResults[i] = printOrNot;};
+  Bool_t GetPrintFinalResults(Int_t i) const {return this->fPrintFinalResults[i];};   
+  //  6.2.0.) particle weights:
+  void SetWeightsList(TList* const wlist) {this->fWeightsList = (TList*)wlist->Clone();}
+  TList* GetWeightsList() const {return this->fWeightsList;}  
   void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
   Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
-  
   void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
   Bool_t GetUsePtWeights() const {return this->fUsePtWeights;};
-  
   void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;};
   Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;};
-  
+  void SetUseParticleWeights(TProfile* const uPW) {this->fUseParticleWeights = uPW;};
+  TProfile* GetUseParticleWeights() const {return this->fUseParticleWeights;};
+  void SetPhiWeights(TH1F* const histPhiWeights) {this->fPhiWeights = histPhiWeights;};
+  TH1F* GetPhiWeights() const {return this->fPhiWeights;};
+  void SetPtWeights(TH1D* const histPtWeights) {this->fPtWeights = histPtWeights;};
+  TH1D* GetPtWeights() const {return this->fPtWeights;};
+  void SetEtaWeights(TH1D* const histEtaWeights) {this->fEtaWeights = histEtaWeights;};
+  TH1D* GetEtaWeights() const {return this->fEtaWeights;};
+  //  6.2.1.) event weights:
+  void SetMultiplicityWeight(const char *multiplicityWeight) {*this->fMultiplicityWeight = multiplicityWeight;};  
+  //  6.3.) reference flow:
+  void SetReferenceFlowFlags(TProfile* const rff) {this->fReferenceFlowFlags = rff;};
+  TProfile* GetReferenceFlowFlags() const {return this->fReferenceFlowFlags;};
+  void SetnBinsMult(Int_t const nbm) {this->fnBinsMult = nbm;};
+  Int_t GetnBinsMult() const {return this->fnBinsMult;};  
+  void SetMinMult(Double_t const minm) {this->fMinMult = minm;};
+  Double_t GetMinMult() const {return this->fMinMult;};
+  void SetMaxMult(Double_t const maxm) {this->fMaxMult = maxm;};
+  Double_t GetMaxMult() const {return this->fMaxMult;};
+  //  6.3.0.) profiles:
+  void SetReferenceFlowGenFun(TProfile2D* const rfgf) {this->fReferenceFlowGenFun = rfgf;};
+  TProfile2D* GetReferenceFlowGenFun() const {return this->fReferenceFlowGenFun;};  
+  void SetQvectorComponents(TProfile* const qvc) {this->fQvectorComponents = qvc;};
+  TProfile* GetQvectorComponents() const {return this->fQvectorComponents;};
   void SetAverageOfSquaredWeight(TProfile* const aosw) {this->fAverageOfSquaredWeight = aosw;};
   TProfile* GetSumOfSquaredWeight() const {return this->fAverageOfSquaredWeight;}; 
-//----------------------------------------------------------------------------------------------------------------
+  //  6.3.1.) results: 
+  void SetReferenceFlowCumulants(TH1D* const rfc) {this->fReferenceFlowCumulants = rfc;};
+  TH1D* GetReferenceFlowCumulants() const {return this->fReferenceFlowCumulants;}; 
+  void SetReferenceFlow(TH1D* const rf) {this->fReferenceFlow = rf;};
+  TH1D* GetReferenceFlow() const {return this->fReferenceFlow;}; 
+  void SetChi(TH1D* const c) {this->fChi = c;};
+  TH1D* GetChi() const {return this->fChi;}; 
+  // 6.4.) differential flow:
+  void SetDiffFlowFlags(TProfile* const dff) {this->fDiffFlowFlags = dff;};
+  TProfile* GetDiffFlowFlags() const {return this->fDiffFlowFlags;};
+  //  6.4.0.) profiles: 
+  void SetDiffFlowGenFun(TProfile3D* const dfgf, Int_t const ri, Int_t const rp, Int_t const pe) {this->fDiffFlowGenFun[ri][rp][pe] = dfgf;};
+  TProfile3D* GetDiffFlowGenFun(Int_t const ri, Int_t const rp, Int_t const pe) const {return this->fDiffFlowGenFun[ri][rp][pe];};
+  void SetNoOfParticlesInBin(TProfile* const nopib, Int_t const rp, Int_t const pe) {this->fNoOfParticlesInBin[rp][pe] = nopib;};
+  TProfile* GetNoOfParticlesInBin(Int_t const rp, Int_t const pe) const {return this->fNoOfParticlesInBin[rp][pe];};
+  //  6.4.1.) results:
+  void SetDiffFlowCumulants(TH1D* const dfc, Int_t const rp, Int_t const pe, Int_t const co) {this->fDiffFlowCumulants[rp][pe][co] = dfc;};
+  TH1D* GetDiffFlowCumulants(Int_t const rp, Int_t const pe, Int_t const co) const {return this->fDiffFlowCumulants[rp][pe][co];};
+  void SetDiffFlow(TH1D* const df, Int_t const rp, Int_t const pe, Int_t const co) {this->fDiffFlow[rp][pe][co] = df;};
+  TH1D* GetDiffFlow(Int_t const rp, Int_t const pe, Int_t const co) const {return this->fDiffFlow[rp][pe][co];};
+  // 6.x.) Tuning the interpolating parameter r0 and using cutoff at different order in series:
+  void SetTuningFlags(TProfile* const tf) {this->fTuningFlags = tf;};
+  TProfile* GetTuningFlags() const {return this->fTuningFlags;};
+  void SetTuneParameters(Bool_t const tp) {this->fTuneParameters = tp;};
+  Bool_t GetTuneParameters() const {return this->fTuneParameters;};  
+  void SetTuningR0(Double_t const tr0, Int_t const r) {this->fTuningR0[r] = tr0;};
+  Double_t GetTuningR0(Int_t const r) const {return this->fTuningR0[r];};
+  //  6.x.0.) profiles:
+  void SetTuningGenFun(TProfile2D* const tgf, Int_t const r, Int_t const pq) {this->fTuningGenFun[r][pq] = tgf;};
+  TProfile2D* GetTuningGenFun(Int_t const r, Int_t const pq) const {return this->fTuningGenFun[r][pq];};
+  //  6.x.1.) results:  
+  void SetTuningCumulants(TH1D* const tc, Int_t const r, Int_t const pq) {this->fTuningCumulants[r][pq] = tc;};
+  TH1D* GetTuningCumulants(Int_t const r, Int_t const pq) const {return this->fTuningCumulants[r][pq];};
+  void SetTuningFlow(TH1D* const tf, Int_t const r, Int_t const pq) {this->fTuningFlow[r][pq] = tf;};
+  TH1D* GetTuningFlow(Int_t const r, Int_t const pq) const {return this->fTuningFlow[r][pq];};
+  
  private:
   AliFlowAnalysisWithCumulants(const AliFlowAnalysisWithCumulants& afawc);
-  AliFlowAnalysisWithCumulants& operator=(const AliFlowAnalysisWithCumulants& afawc);
-  AliFlowTrackSimple* fTrack;                                   //track
-  static const Int_t fgkQmax = AliFlowCumuConstants::fgkQmax;     //needed for numerics
-  static const Int_t fgkPmax = AliFlowCumuConstants::fgkPmax;     //needed for numerics  
-  static const Int_t fgkQmax4 = AliFlowCumuConstants::fgkQmax4;   //needed for numerics (only for different system of Eq.)
-  static const Int_t fgkPmax4 = AliFlowCumuConstants::fgkPmax4;   //needed for numerics (only for different system of Eq.) 
-  static const Int_t fgkQmax6 = AliFlowCumuConstants::fgkQmax6;   //needed for numerics (only for different system of Eq.)
-  static const Int_t fgkPmax6 = AliFlowCumuConstants::fgkPmax6;   //needed for numerics (only for different system of Eq.) 
-  static const Int_t fgkQmax8 = AliFlowCumuConstants::fgkQmax8;   //needed for numerics (only for different system of Eq.)
-  static const Int_t fgkPmax8 = AliFlowCumuConstants::fgkPmax8;   //needed for numerics (only for different system of Eq.)  
-  static const Int_t fgkQmax16 = AliFlowCumuConstants::fgkQmax16; //needed for numerics (only for different system of Eq.)
-  static const Int_t fgkPmax16 = AliFlowCumuConstants::fgkPmax16; //needed for numerics (only for different system of Eq.)
-  static const Int_t fgkFlow = AliFlowCumuConstants::fgkFlow;     //integrated flow coefficient to be calculated
-  static const Int_t fgkMltpl = AliFlowCumuConstants::fgkMltpl;   //the multiple in p=m*n (diff. flow) 
-  TList* fHistList;                                             //list to hold all output histograms
-  TList* fWeightsList;                                          //list to hold all histograms with weights
-
-  Double_t fR0;         //needed for numerics
-  Double_t fPtMax;      //maximum pt
-  Double_t fPtMin;      //minimum pt
-  Double_t fBinWidthPt; //width of pt bin (in GeV)
-  Int_t    fgknBinsPt;  //number of pt bins
-  
-  Double_t fEtaMax;      //maximum pt
-  Double_t fEtaMin;      //minimum pt
-  Double_t fBinWidthEta; //width of pt bin (in GeV)
-  Int_t    fgknBinsEta;  //number of pt bins
-      
-  Double_t fAvQx;  //<Q_x>
-  Double_t fAvQy;  //<Q_y>
-  Double_t fAvQ2x; //<(Q_x)^2>
-  Double_t fAvQ2y; //<(Q_y)^2>
-
-  TProfile*          fAvMultIntFlowGFC; //average selected multiplicity
-  TProfile*          fQVectorComponentsGFC; //averages of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, 3rd bin: <(Q_x)^2>, 4th bin: <(Q_y)^2>)
+  AliFlowAnalysisWithCumulants& operator=(const AliFlowAnalysisWithCumulants& afawc); 
+  // 0.) Base:
+  TList *fHistList; // base list to hold all output objects
+  TString *fHistListName; // name of base list  
+  TProfile *fAnalysisSettings; // profile to hold analysis settings  
+  // 1.) Common:
+  AliFlowCommonHist *fCommonHists; // common control histograms (filled only with events with 3 or more tracks for 3-p correlators) 
+  AliFlowCommonHistResults *fCommonHistsResults2nd; // common result histograms for 2nd order cumulant
+  AliFlowCommonHistResults *fCommonHistsResults4th; // common result histograms for 4th order cumulant 
+  AliFlowCommonHistResults *fCommonHistsResults6th; // common result histograms for 6th order cumulant
+  AliFlowCommonHistResults *fCommonHistsResults8th; // common result histograms for 8th order cumulant
+  Int_t fnBinsPhi; // number of phi bins
+  Double_t fPhiMin; // minimum phi   
+  Double_t fPhiMax; // maximum phi 
+  Double_t fPhiBinWidth; // bin width for phi histograms  
+  Int_t fnBinsPt; // number of pt bins
+  Double_t fPtMin; // minimum pt   
+  Double_t fPtMax; // maximum pt  
+  Double_t fPtBinWidth; // bin width for pt histograms  
+  Int_t fnBinsEta; // number of eta bins
+  Double_t fEtaMin; // minimum eta   
+  Double_t fEtaMax; // maximum eta
+  Double_t fEtaBinWidth; // bin width for eta histograms
+  Int_t fHarmonic; // harmonic   
+  Int_t fMultiple; // the multiple m in p=m*n, where n is harmonic (relevant for differential flow) 
+  Double_t fR0; // r_{0} parameter
+  Bool_t fPrintFinalResults[3]; // print on the screen the final results [0=RF,1=RP,2=POI]
+  // 2a.) Particle weights:
+  TList *fWeightsList; // list to hold all histograms with particle weights: fUseParticleWeights, fPhiWeights, fPtWeights and fEtaWeights
+  Bool_t fUsePhiWeights; // use phi weights
+  Bool_t fUsePtWeights; // use pt weights
+  Bool_t fUseEtaWeights; // use eta weights
+  TProfile *fUseParticleWeights; // profile with three bins to hold values of fUsePhiWeights, fUsePtWeights and fUseEtaWeights
+  TH1F *fPhiWeights; // histogram holding phi weights
+  TH1D *fPtWeights; // histogram holding phi weights
+  TH1D *fEtaWeights; // histogram holding phi weights 
+  // 2b.) Event weights:
+  TString *fMultiplicityWeight; // event-by-event weight for reference flow generating function (can be "unit" or "multiplicity")
+  // 3.) Reference flow:       
+  //  3a.) lists:
+  TList *fReferenceFlowList; // list to hold all histograms and profiles relevant for reference flow 
+  TList *fReferenceFlowProfiles; // list to hold all profiles relevant for reference flow
+  TList *fReferenceFlowResults; // list to hold all histograms with final results relevant for reference flow  
+  //  3b.) flags:
+  TProfile *fReferenceFlowFlags; // profile to hold all flags for reference flow
+  Int_t fnBinsMult; // number of multiplicity bins for flow analysis versus multiplicity  
+  Double_t fMinMult; // minimal multiplicity for flow analysis versus multiplicity  
+  Double_t fMaxMult; // maximal multiplicity for flow analysis versus multiplicity  
+  //  3c.) event-by-event quantities:
+  TMatrixD *fGEBE; // reference flow generating function only for current event   
+  //  3d.) profiles:
+  TProfile2D *fReferenceFlowGenFun; // all-event average of the generating function used to calculate reference flow 
+  TProfile *fQvectorComponents; // averages of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, 3rd bin: <(Q_x)^2>, 4th bin: <(Q_y)^2>)
+  TProfile *fAverageOfSquaredWeight; // <<w^2>>, where w = wPhi*wPt*wEta       
+  //  3e.) results:
+  Double_t fAvM; // average multiplicity
+  Int_t fnEvts; // number of events
+  TH1D *fReferenceFlowCumulants; // final results for isotropic cumulants for reference flow   
+  TH1D *fReferenceFlow; // final results for reference flow  
+  TH1D *fChi; // final results for resolution 
+  // 4.) Differential flow:       
+  //  4a.) lists:
+  TList *fDiffFlowList; // list to hold all histograms and profiles relevant for differential flow 
+  TList *fDiffFlowProfiles; // list to hold all profiles relevant for differential flow
+  TList *fDiffFlowResults; // list to hold all histograms with final results relevant for differential flow  
+  //  4b.) flags:
+  TProfile *fDiffFlowFlags; // profile to hold all flags for reference flow
+  //  4c.) profiles:
+  TProfile3D *fDiffFlowGenFun[2][2][2]; // all-event avarage of generating function used for differential flow [0=Re,1=Im][0=RP,1=POI][0=pt,1=eta]  
+  TProfile *fNoOfParticlesInBin[2][2]; // number of particles in pt/eta bin for RPs/POIs [0=RP,1=POI][0=pt,1=eta]
+  //  4d.) results:
+  TH1D *fDiffFlowCumulants[2][2][4]; // isotropic differential flow cumulants [0=RP,1=POI][0=pt,1=eta][cumulant order]
+  TH1D *fDiffFlow[2][2][4]; // differential flow [0=RP,1=POI][0=pt,1=eta][cumulant order]
+  // x.) Tuning the interpolating parameter r0 and using cutoff at different order in series:
+  //  xa.) lists:
+  TList *fTuningList; // list to hold all histograms and profiles relevant for tuning 
+  TList *fTuningProfiles; // list to hold all profiles relevant for tuning
+  TList *fTuningResults; // list to hold all histograms with final results relevant for tuning  
+  //  xb.) flags:
+  TProfile *fTuningFlags; // profile to hold all flags for tuning
+  Bool_t fTuneParameters; // tune r0 and cut series at different order
+  Double_t fTuningR0[10]; // different r0 values (at maximum 10 different values allowed)
+  //  xc.) profiles:
+  TProfile2D *fTuningGenFun[10][5]; // generating function G evaluated for 10 different r0s and 5 different sets of (pmax,qmax)
+  //  xd.) results:  
+  TH1D *fTuningCumulants[10][5]; // isotropic cumulants for reference flow for 10 different r0s and 5 different sets of (pmax,qmax)
+  TH1D *fTuningFlow[10][5]; // reference flow for 10 different r0s and 5 different sets of (pmax,qmax) 
     
-  TH1D*              fIntFlowResultsGFC; //integrated flow final results
-  
-  TH1D*              fDiffFlowResults2ndOrderGFC; //differential flow final results (2nd order estimate) 
-  TH1D*              fDiffFlowResults4thOrderGFC; //differential flow final results (4th order estimate)
-  TH1D*              fDiffFlowResults6thOrderGFC; //differential flow final results (6th order estimate)
-  TH1D*              fDiffFlowResults8thOrderGFC; //differential flow final results (8th order estimate)
-  
-  AliFlowCommonHistResults*  fCommonHistsResults2nd; //final results for 2nd order int. and diff. flow stored in the common histograms 
-  AliFlowCommonHistResults*  fCommonHistsResults4th; //final results for 4th order int. and diff. flow stored in the common histograms 
-  AliFlowCommonHistResults*  fCommonHistsResults6th; //final results for 6th order int. and diff. flow stored in the common histograms
-  AliFlowCommonHistResults*  fCommonHistsResults8th; //final results for 8th order int. and diff. flow stored in the common histograms
-  
-  TProfile2D*        fIntFlowGenFun;   //avarage of the generating function for integrated flow 
-  
-  TProfile2D*        fIntFlowGenFun4;  //avarage of the generating function for integrated flow (only for different system of Eq.)
-  TProfile2D*        fIntFlowGenFun6;  //avarage of the generating function for integrated flow (only for different system of Eq.)
-  TProfile2D*        fIntFlowGenFun8;  //avarage of the generating function for integrated flow (only for different system of Eq.)
-  TProfile2D*        fIntFlowGenFun16; //avarage of the generating function for integrated flow (only for different system of Eq.)
-
-  TProfile*          fAvMultIntFlow4GFC;  //average selected multiplicity (only for different system of Eq.)
-  TProfile*          fAvMultIntFlow6GFC;  //average selected multiplicity (only for different system of Eq.) 
-  TProfile*          fAvMultIntFlow8GFC;  //average selected multiplicity (only for different system of Eq.)
-  TProfile*          fAvMultIntFlow16GFC; //average selected multiplicity (only for different system of Eq.)
-
-  //RP = Reaction Plane (RP denotes particles used to determine the reaction plane)                                                       
-  TProfile3D*        fDiffFlowPtRPGenFunRe; //avarage of the generating function for differential flow in Pt (real part)
-  TProfile3D*        fDiffFlowPtRPGenFunIm; //avarage of the generating function for differential flow in Pt (imaginary part)
-  TProfile*          fPtBinRPNoOfParticles; //number of particles per pt bin
-  TProfile3D*        fDiffFlowEtaRPGenFunRe; //avarage of the generating function for differential flow in Eta (real part)
-  TProfile3D*        fDiffFlowEtaRPGenFunIm; //avarage of the generating function for differential flow in Eta (imaginary part)
-  TProfile*          fEtaBinRPNoOfParticles; //number of particles per eta bin
-                                    
-  //POI = Particles Of Interest (POI denotes particles of interest for the final physical results for int. and diff. flow)                                                        
-  TProfile3D*        fDiffFlowPtPOIGenFunRe; //avarage of the generating function for differential flow in Pt (real part)
-  TProfile3D*        fDiffFlowPtPOIGenFunIm; //avarage of the generating function for differential flow in Pt (imaginary part)
-  TProfile*          fPtBinPOINoOfParticles; //number of particles per pt bin
-  TProfile3D*        fDiffFlowEtaPOIGenFunRe; //avarage of the generating function for differential flow in Eta (real part)
-  TProfile3D*        fDiffFlowEtaPOIGenFunIm; //avarage of the generating function for differential flow in Eta (imaginary part)
-  TProfile*          fEtaBinPOINoOfParticles; //number of particles per eta bin
-  
-  /*
-  TProfile2D *fDiffFlowGenFunRe0,*fDiffFlowGenFunRe1,*fDiffFlowGenFunRe2,*fDiffFlowGenFunRe3;//differential flow 
-  TProfile2D *fDiffFlowGenFunRe4,*fDiffFlowGenFunRe5,*fDiffFlowGenFunRe6,*fDiffFlowGenFunRe7;//differential flow
-  TProfile2D *fDiffFlowGenFunIm0,*fDiffFlowGenFunIm1,*fDiffFlowGenFunIm2,*fDiffFlowGenFunIm3;//differential flow
-  TProfile2D *fDiffFlowGenFunIm4,*fDiffFlowGenFunIm5,*fDiffFlowGenFunIm6,*fDiffFlowGenFunIm7;//differential flow
-  */
-  AliFlowCommonHist* fCommonHists;      //common control histograms
-  
-  Bool_t fOtherEquations; //numerical equations for cumulants solved up to different highest order 
-  
-  Bool_t fUsePhiWeights;  //phi weights
-  Bool_t fUsePtWeights;   //v_2(pt) weights
-  Bool_t fUseEtaWeights;  //v_2(eta) weights
-  
-  TProfile* fAverageOfSquaredWeight; //<w^2>      
-  
   ClassDef(AliFlowAnalysisWithCumulants, 0);
+
 };
 
 //================================================================================================================