ROOT logo
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */
// Description: Maker to analyze Flow from the generated MC reaction plane.
//              This class is used to get the real value of the flow 
//              to compare the other methods to when analysing simulated events.

/* $Id$ */

#ifndef ALIFLOWANALYSISWITHMCEVENTPLANE_H
#define ALIFLOWANALYSISWITHMCEVENTPLANE_H

class TVector2;
class TString;
class TDirectoryFile;

class AliFlowTrackSimple;
class AliFlowEventSimple;
class AliFlowCommonHist;
class AliFlowCommonHistResults;

class TH1F;
class TH1D;
class TProfile;
class TProfile2D;
class TObjArray;
class TFile;
class TList;
class TComplex;
class Riostream;


 
class AliFlowAnalysisWithMCEventPlane {

 public:
 
   AliFlowAnalysisWithMCEventPlane();            //default constructor
   virtual  ~AliFlowAnalysisWithMCEventPlane();  //destructor
 
   void      WriteHistograms(TString* outputFileName);
   void      WriteHistograms(TString outputFileName);
   void      WriteHistograms(TDirectoryFile *outputFileName);
   void      Init();                                       //defines variables and histograms
   void      Make(AliFlowEventSimple* anEvent);            //calculates variables and fills histograms
   void      GetOutputHistograms(TList *outputListHistos); //get pointers to all output histograms (called before Finish()) 
   void      Finish();                                     //saves histograms
   
   void      SetDebug(Bool_t kt)          { this->fDebug = kt ; }
   Bool_t    GetDebug() const             { return this->fDebug ; }

   void      SetEventNumber(Int_t n)      { this->fEventNumber = n; }
   Int_t     GetEventNumber() const       { return this->fEventNumber; }

   // Output 
   TList*    GetHistList() const          { return this->fHistList ; }  
   AliFlowCommonHist* GetCommonHists() const  { return this->fCommonHists; }
   void      SetCommonHists(AliFlowCommonHist* const aCommonHist)  
     { this->fCommonHists = aCommonHist; }
   AliFlowCommonHistResults*  GetCommonHistsRes() const { return this->fCommonHistsRes; }
   void      SetCommonHistsRes( AliFlowCommonHistResults* const aCommonHistResult ) 
     { this->fCommonHistsRes = aCommonHistResult; }
   
   //histograms
   TH1F*     GetHistRP() const            {return this->fHistRP; } 
   void      SetHistRP(TH1F* const  aHistRP)     {this->fHistRP = aHistRP; }
   
   TProfile* GetHistProIntFlow() const    {return this->fHistProIntFlow; } 
   void      SetHistProIntFlow(TProfile* const aHistProIntFlow) 
     {this->fHistProIntFlow = aHistProIntFlow; }
     
   TProfile* GetHistProIntFlowVsM() const    {return this->fHistProIntFlowVsM; } 
   void      SetHistProIntFlowVsM(TProfile* const aHistProIntFlowVsM) 
     {this->fHistProIntFlowVsM = aHistProIntFlowVsM; }

   TProfile2D* GetHistProDiffFlowPtEtaRP() const    {return this->fHistProDiffFlowPtEtaRP; } 
   void      SetHistProDiffFlowPtEtaRP(TProfile2D* const aHistProDiffFlowPtEtaRP) 
     {this->fHistProDiffFlowPtEtaRP = aHistProDiffFlowPtEtaRP; }   
   
   TProfile* GetHistProDiffFlowPtRP() const    {return this->fHistProDiffFlowPtRP; } 
   void      SetHistProDiffFlowPtRP(TProfile* const aHistProDiffFlowPtRP) 
     {this->fHistProDiffFlowPtRP = aHistProDiffFlowPtRP; } 
   
   TProfile* GetHistProDiffFlowEtaRP() const   {return this->fHistProDiffFlowEtaRP; } 
   void      SetHistProDiffFlowEtaRP(TProfile* const aHistProDiffFlowEtaRP) 
     {this->fHistProDiffFlowEtaRP = aHistProDiffFlowEtaRP; } 
     
   TProfile2D* GetHistProDiffFlowPtEtaPOI()const     {return this->fHistProDiffFlowPtEtaPOI; } 
   void      SetHistProDiffFlowPtEtaPOI(TProfile2D* const aHistProDiffFlowPtEtaPOI) 
     {this->fHistProDiffFlowPtEtaPOI = aHistProDiffFlowPtEtaPOI; }   
   
   TProfile* GetHistProDiffFlowPtPOI()const    {return this->fHistProDiffFlowPtPOI; } 
   void      SetHistProDiffFlowPtPOI(TProfile* const aHistProDiffFlowPtPOI) 
     {this->fHistProDiffFlowPtPOI = aHistProDiffFlowPtPOI; } 
   
   TProfile* GetHistProDiffFlowEtaPOI()const   {return this->fHistProDiffFlowEtaPOI; } 
   void      SetHistProDiffFlowEtaPOI(TProfile* const aHistProDiffFlowEtaPOI) 
     {this->fHistProDiffFlowEtaPOI = aHistProDiffFlowEtaPOI; } 
     
   TH1D* GetHistSpreadOfFlow()const   {return this->fHistSpreadOfFlow; } 
   void      SetHistSpreadOfFlow(TH1D* const aHistSpreadOfFlow) 
     {this->fHistSpreadOfFlow = aHistSpreadOfFlow; }    
   
   // harmonic:
   void SetHarmonic(Int_t const harmonic) {this->fHarmonic = harmonic;};
   Int_t GetHarmonic() const {return this->fHarmonic;};
   
   // mixed harmonics:
   // a) methods:
   virtual void InitalizeArraysForMixedHarmonics();
   virtual void BookObjectsForMixedHarmonics();
   virtual void EvaluateMixedHarmonics(AliFlowEventSimple* anEvent);
   virtual void GetOutputHistoramsForMixedHarmonics(TList *mixedHarmonicsList);
   // b) setters and getters:
   void SetMixedHarmonicsList(TList* const mhl) {this->fMixedHarmonicsList = mhl;}
   TList* GetMixedHarmonicsList() const {return this->fMixedHarmonicsList;}    
   void SetEvaluateMixedHarmonics(Bool_t const emh) {this->fEvaluateMixedHarmonics = emh;};
   Bool_t GetEvalauteMixedHarmonics() const {return this->fEvaluateMixedHarmonics;};   
   void SetMixedHarmonicsSettings(TProfile* const mhs) {this->fMixedHarmonicsSettings = mhs;};
   TProfile* GetMixedHarmonicsSettings() const {return this->fMixedHarmonicsSettings;};  
   void SetPairCorrelator(TProfile* const spc, Int_t const cs) {this->fPairCorrelator[cs] = spc;};
   TProfile* GetPairCorrelator(Int_t const cs) const {return this->fPairCorrelator[cs];};
   void SetPairCorrelatorVsM(TProfile* const spcVsM, Int_t const cs) {this->fPairCorrelatorVsM[cs] = spcVsM;};
   TProfile* GetPairCorrelatorVsM(Int_t const cs) const {return this->fPairCorrelatorVsM[cs];};   
   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;};   
   void SetPairCorrelatorVsPtSumDiff(TProfile* const spcVspsd, Int_t const cs, Int_t const sd) {this->fPairCorrelatorVsPtSumDiff[cs][sd] = spcVspsd;};
   TProfile* GetPairCorrelatorVsPtSumDiff(Int_t const cs, Int_t const sd) const {return this->fPairCorrelatorVsPtSumDiff[cs][sd];};
   void SetNinCorrelator(Int_t const n) {this->fNinCorrelator = n;};
   Int_t GetNinCorrelator() const {return this->fNinCorrelator;};     
   void SetMinCorrelator(Int_t const m) {this->fMinCorrelator = m;};
   Int_t GetMinCorrelator() const {return this->fMinCorrelator;};     
   void SetXinPairAngle(Double_t const xipa) {this->fXinPairAngle = xipa;};
   Double_t GetXinPairAngle() const {return this->fXinPairAngle;};   
  
 private:
 
   AliFlowAnalysisWithMCEventPlane(const AliFlowAnalysisWithMCEventPlane& aAnalysis);             //copy constructor
   AliFlowAnalysisWithMCEventPlane& operator=(const AliFlowAnalysisWithMCEventPlane& aAnalysis);  //assignment operator 

      
#ifndef __CINT__
   TVector2*    fQsum;              // flow vector sum
   Double_t     fQ2sum;             // flow vector sum squared
#endif /*__CINT__*/

   Int_t        fEventNumber;       // event counter
   Bool_t       fDebug ;            //! flag for lyz analysis: more print statements

   TList*       fHistList;          //list to hold all output histograms  
    
   AliFlowCommonHist* fCommonHists;              // hist
   AliFlowCommonHistResults* fCommonHistsRes;    // hist
   
   TH1F*        fHistRP;                  // reaction plane
   TProfile*    fHistProIntFlow;          // profile used to calculate the integrated flow of RP particles
   TProfile*    fHistProIntFlowVsM;       // profile used to calculate the integrated flow of RP particles vs multiplicity
   TProfile2D*  fHistProDiffFlowPtEtaRP;  // profile used to calculate the differential flow (Pt,Eta) of RP particles
   TProfile*    fHistProDiffFlowPtRP;     // profile used to calculate the differential flow (Pt) of RP particles 
   TProfile*    fHistProDiffFlowEtaRP;    // profile used to calculate the differential flow (Eta) of RP particles 
   TProfile2D*  fHistProDiffFlowPtEtaPOI; // profile used to calculate the differential flow (Pt,Eta) of POI particles
   TProfile*    fHistProDiffFlowPtPOI;    // profile used to calculate the differential flow (Pt) of POI particles 
   TProfile*    fHistProDiffFlowEtaPOI;   // profile used to calculate the differential flow (Eta) of POI particles
   TH1D*        fHistSpreadOfFlow;        // histogram filled with reference flow calculated e-b-e    
   Int_t        fHarmonic;                // harmonic 
   
   // mixed harmonics:
   TList *fMixedHarmonicsList; // list to hold all objects relevant for mixed harmonics 
   Bool_t fEvaluateMixedHarmonics; // evaluate and store objects relevant for mixed harmonics
   TProfile *fMixedHarmonicsSettings; // profile used to hold all flags relevant for the mixed harmonics
   TProfile *fPairCorrelator[2]; // profiles used to calculate <cos[m*phi_{pair}-n*RP]> and <sin[m*phi_{pair}-n*RP]> (0 = cos, 1 = sin), where phi_{pair} = x*phi1+(1-x)*phi2
   TProfile *fPairCorrelatorVsM[2]; // <cos[m*phi_{pair}-n*RP]> and <sin[m*phi_{pair}-n*RP]> versus multiplicity (0 = cos, 1 = sin), where phi_{pair} = x*phi1+(1-x)*phi2
   Int_t fnBinsMult; // number of multiplicity bins for mixed harmonics analysis versus multiplicity  
   Double_t fMinMult; // minimal multiplicity for mixed harmonics analysis versus multiplicity  
   Double_t fMaxMult; // maximal multiplicity for mixed harmonics analysis versus multiplicity    
   TProfile *fPairCorrelatorVsPtSumDiff[2][2]; // <cos/sin[m*phi_{pair}-n*RP]> vs (1/2)(pt1+pt2) (0) and |pt1-pt2| (1), where phi_{pair} = x*phi1+(1-x)*phi2
   Int_t fNinCorrelator; // n in <cos[m*phi_{pair}-n*RP]> and <sin[m*phi_{pair}-n*RP]>, where phi_{pair} = x*phi1+(1-x)*phi2
   Int_t fMinCorrelator; // m in <cos[m*phi_{pair}-n*RP]> and <sin[m*phi_{pair}-n*RP]>, where phi_{pair} = x*phi1+(1-x)*phi2   
   Double_t fXinPairAngle; // x in definition phi_{pair} = x*phi1+(1-x)*phi2
                                       
   ClassDef(AliFlowAnalysisWithMCEventPlane,0)  // Analyse particle distribution versus MC reaction plane
  
  };

     
#endif


 AliFlowAnalysisWithMCEventPlane.h:1
 AliFlowAnalysisWithMCEventPlane.h:2
 AliFlowAnalysisWithMCEventPlane.h:3
 AliFlowAnalysisWithMCEventPlane.h:4
 AliFlowAnalysisWithMCEventPlane.h:5
 AliFlowAnalysisWithMCEventPlane.h:6
 AliFlowAnalysisWithMCEventPlane.h:7
 AliFlowAnalysisWithMCEventPlane.h:8
 AliFlowAnalysisWithMCEventPlane.h:9
 AliFlowAnalysisWithMCEventPlane.h:10
 AliFlowAnalysisWithMCEventPlane.h:11
 AliFlowAnalysisWithMCEventPlane.h:12
 AliFlowAnalysisWithMCEventPlane.h:13
 AliFlowAnalysisWithMCEventPlane.h:14
 AliFlowAnalysisWithMCEventPlane.h:15
 AliFlowAnalysisWithMCEventPlane.h:16
 AliFlowAnalysisWithMCEventPlane.h:17
 AliFlowAnalysisWithMCEventPlane.h:18
 AliFlowAnalysisWithMCEventPlane.h:19
 AliFlowAnalysisWithMCEventPlane.h:20
 AliFlowAnalysisWithMCEventPlane.h:21
 AliFlowAnalysisWithMCEventPlane.h:22
 AliFlowAnalysisWithMCEventPlane.h:23
 AliFlowAnalysisWithMCEventPlane.h:24
 AliFlowAnalysisWithMCEventPlane.h:25
 AliFlowAnalysisWithMCEventPlane.h:26
 AliFlowAnalysisWithMCEventPlane.h:27
 AliFlowAnalysisWithMCEventPlane.h:28
 AliFlowAnalysisWithMCEventPlane.h:29
 AliFlowAnalysisWithMCEventPlane.h:30
 AliFlowAnalysisWithMCEventPlane.h:31
 AliFlowAnalysisWithMCEventPlane.h:32
 AliFlowAnalysisWithMCEventPlane.h:33
 AliFlowAnalysisWithMCEventPlane.h:34
 AliFlowAnalysisWithMCEventPlane.h:35
 AliFlowAnalysisWithMCEventPlane.h:36
 AliFlowAnalysisWithMCEventPlane.h:37
 AliFlowAnalysisWithMCEventPlane.h:38
 AliFlowAnalysisWithMCEventPlane.h:39
 AliFlowAnalysisWithMCEventPlane.h:40
 AliFlowAnalysisWithMCEventPlane.h:41
 AliFlowAnalysisWithMCEventPlane.h:42
 AliFlowAnalysisWithMCEventPlane.h:43
 AliFlowAnalysisWithMCEventPlane.h:44
 AliFlowAnalysisWithMCEventPlane.h:45
 AliFlowAnalysisWithMCEventPlane.h:46
 AliFlowAnalysisWithMCEventPlane.h:47
 AliFlowAnalysisWithMCEventPlane.h:48
 AliFlowAnalysisWithMCEventPlane.h:49
 AliFlowAnalysisWithMCEventPlane.h:50
 AliFlowAnalysisWithMCEventPlane.h:51
 AliFlowAnalysisWithMCEventPlane.h:52
 AliFlowAnalysisWithMCEventPlane.h:53
 AliFlowAnalysisWithMCEventPlane.h:54
 AliFlowAnalysisWithMCEventPlane.h:55
 AliFlowAnalysisWithMCEventPlane.h:56
 AliFlowAnalysisWithMCEventPlane.h:57
 AliFlowAnalysisWithMCEventPlane.h:58
 AliFlowAnalysisWithMCEventPlane.h:59
 AliFlowAnalysisWithMCEventPlane.h:60
 AliFlowAnalysisWithMCEventPlane.h:61
 AliFlowAnalysisWithMCEventPlane.h:62
 AliFlowAnalysisWithMCEventPlane.h:63
 AliFlowAnalysisWithMCEventPlane.h:64
 AliFlowAnalysisWithMCEventPlane.h:65
 AliFlowAnalysisWithMCEventPlane.h:66
 AliFlowAnalysisWithMCEventPlane.h:67
 AliFlowAnalysisWithMCEventPlane.h:68
 AliFlowAnalysisWithMCEventPlane.h:69
 AliFlowAnalysisWithMCEventPlane.h:70
 AliFlowAnalysisWithMCEventPlane.h:71
 AliFlowAnalysisWithMCEventPlane.h:72
 AliFlowAnalysisWithMCEventPlane.h:73
 AliFlowAnalysisWithMCEventPlane.h:74
 AliFlowAnalysisWithMCEventPlane.h:75
 AliFlowAnalysisWithMCEventPlane.h:76
 AliFlowAnalysisWithMCEventPlane.h:77
 AliFlowAnalysisWithMCEventPlane.h:78
 AliFlowAnalysisWithMCEventPlane.h:79
 AliFlowAnalysisWithMCEventPlane.h:80
 AliFlowAnalysisWithMCEventPlane.h:81
 AliFlowAnalysisWithMCEventPlane.h:82
 AliFlowAnalysisWithMCEventPlane.h:83
 AliFlowAnalysisWithMCEventPlane.h:84
 AliFlowAnalysisWithMCEventPlane.h:85
 AliFlowAnalysisWithMCEventPlane.h:86
 AliFlowAnalysisWithMCEventPlane.h:87
 AliFlowAnalysisWithMCEventPlane.h:88
 AliFlowAnalysisWithMCEventPlane.h:89
 AliFlowAnalysisWithMCEventPlane.h:90
 AliFlowAnalysisWithMCEventPlane.h:91
 AliFlowAnalysisWithMCEventPlane.h:92
 AliFlowAnalysisWithMCEventPlane.h:93
 AliFlowAnalysisWithMCEventPlane.h:94
 AliFlowAnalysisWithMCEventPlane.h:95
 AliFlowAnalysisWithMCEventPlane.h:96
 AliFlowAnalysisWithMCEventPlane.h:97
 AliFlowAnalysisWithMCEventPlane.h:98
 AliFlowAnalysisWithMCEventPlane.h:99
 AliFlowAnalysisWithMCEventPlane.h:100
 AliFlowAnalysisWithMCEventPlane.h:101
 AliFlowAnalysisWithMCEventPlane.h:102
 AliFlowAnalysisWithMCEventPlane.h:103
 AliFlowAnalysisWithMCEventPlane.h:104
 AliFlowAnalysisWithMCEventPlane.h:105
 AliFlowAnalysisWithMCEventPlane.h:106
 AliFlowAnalysisWithMCEventPlane.h:107
 AliFlowAnalysisWithMCEventPlane.h:108
 AliFlowAnalysisWithMCEventPlane.h:109
 AliFlowAnalysisWithMCEventPlane.h:110
 AliFlowAnalysisWithMCEventPlane.h:111
 AliFlowAnalysisWithMCEventPlane.h:112
 AliFlowAnalysisWithMCEventPlane.h:113
 AliFlowAnalysisWithMCEventPlane.h:114
 AliFlowAnalysisWithMCEventPlane.h:115
 AliFlowAnalysisWithMCEventPlane.h:116
 AliFlowAnalysisWithMCEventPlane.h:117
 AliFlowAnalysisWithMCEventPlane.h:118
 AliFlowAnalysisWithMCEventPlane.h:119
 AliFlowAnalysisWithMCEventPlane.h:120
 AliFlowAnalysisWithMCEventPlane.h:121
 AliFlowAnalysisWithMCEventPlane.h:122
 AliFlowAnalysisWithMCEventPlane.h:123
 AliFlowAnalysisWithMCEventPlane.h:124
 AliFlowAnalysisWithMCEventPlane.h:125
 AliFlowAnalysisWithMCEventPlane.h:126
 AliFlowAnalysisWithMCEventPlane.h:127
 AliFlowAnalysisWithMCEventPlane.h:128
 AliFlowAnalysisWithMCEventPlane.h:129
 AliFlowAnalysisWithMCEventPlane.h:130
 AliFlowAnalysisWithMCEventPlane.h:131
 AliFlowAnalysisWithMCEventPlane.h:132
 AliFlowAnalysisWithMCEventPlane.h:133
 AliFlowAnalysisWithMCEventPlane.h:134
 AliFlowAnalysisWithMCEventPlane.h:135
 AliFlowAnalysisWithMCEventPlane.h:136
 AliFlowAnalysisWithMCEventPlane.h:137
 AliFlowAnalysisWithMCEventPlane.h:138
 AliFlowAnalysisWithMCEventPlane.h:139
 AliFlowAnalysisWithMCEventPlane.h:140
 AliFlowAnalysisWithMCEventPlane.h:141
 AliFlowAnalysisWithMCEventPlane.h:142
 AliFlowAnalysisWithMCEventPlane.h:143
 AliFlowAnalysisWithMCEventPlane.h:144
 AliFlowAnalysisWithMCEventPlane.h:145
 AliFlowAnalysisWithMCEventPlane.h:146
 AliFlowAnalysisWithMCEventPlane.h:147
 AliFlowAnalysisWithMCEventPlane.h:148
 AliFlowAnalysisWithMCEventPlane.h:149
 AliFlowAnalysisWithMCEventPlane.h:150
 AliFlowAnalysisWithMCEventPlane.h:151
 AliFlowAnalysisWithMCEventPlane.h:152
 AliFlowAnalysisWithMCEventPlane.h:153
 AliFlowAnalysisWithMCEventPlane.h:154
 AliFlowAnalysisWithMCEventPlane.h:155
 AliFlowAnalysisWithMCEventPlane.h:156
 AliFlowAnalysisWithMCEventPlane.h:157
 AliFlowAnalysisWithMCEventPlane.h:158
 AliFlowAnalysisWithMCEventPlane.h:159
 AliFlowAnalysisWithMCEventPlane.h:160
 AliFlowAnalysisWithMCEventPlane.h:161
 AliFlowAnalysisWithMCEventPlane.h:162
 AliFlowAnalysisWithMCEventPlane.h:163
 AliFlowAnalysisWithMCEventPlane.h:164
 AliFlowAnalysisWithMCEventPlane.h:165
 AliFlowAnalysisWithMCEventPlane.h:166
 AliFlowAnalysisWithMCEventPlane.h:167
 AliFlowAnalysisWithMCEventPlane.h:168
 AliFlowAnalysisWithMCEventPlane.h:169
 AliFlowAnalysisWithMCEventPlane.h:170
 AliFlowAnalysisWithMCEventPlane.h:171
 AliFlowAnalysisWithMCEventPlane.h:172
 AliFlowAnalysisWithMCEventPlane.h:173
 AliFlowAnalysisWithMCEventPlane.h:174
 AliFlowAnalysisWithMCEventPlane.h:175
 AliFlowAnalysisWithMCEventPlane.h:176
 AliFlowAnalysisWithMCEventPlane.h:177
 AliFlowAnalysisWithMCEventPlane.h:178
 AliFlowAnalysisWithMCEventPlane.h:179
 AliFlowAnalysisWithMCEventPlane.h:180
 AliFlowAnalysisWithMCEventPlane.h:181
 AliFlowAnalysisWithMCEventPlane.h:182
 AliFlowAnalysisWithMCEventPlane.h:183
 AliFlowAnalysisWithMCEventPlane.h:184
 AliFlowAnalysisWithMCEventPlane.h:185
 AliFlowAnalysisWithMCEventPlane.h:186
 AliFlowAnalysisWithMCEventPlane.h:187
 AliFlowAnalysisWithMCEventPlane.h:188
 AliFlowAnalysisWithMCEventPlane.h:189
 AliFlowAnalysisWithMCEventPlane.h:190
 AliFlowAnalysisWithMCEventPlane.h:191