ROOT logo
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */


#ifndef ALIFLOWANALYSISWITHLEEYANGZEROS_H
#define ALIFLOWANALYSISWITHLEEYANGZEROS_H

////////////////////////////////////////////////////////////////////
// Description: Maker to analyze Flow by the LeeYangZeros method
//              One needs to do two runs over the data; 
//              First to calculate the integrated flow 
//              and in the second to calculate the differential flow
// Author: Naomi van der Kolk (kolk@nikhef.nl)
////////////////////////////////////////////////////////////////////

class TH1F;
class TProfile;
class TDirectoryFile;
class TComplex;
class TString;
class TList;
class TVector2;
 
class AliFlowVector;
class AliFlowEventSimple;
class AliFlowLYZHist1; 
class AliFlowLYZHist2;
class AliFlowCommonHist;
class AliFlowCommonHistResults;

class AliFlowAnalysisWithLeeYangZeros {

 public:
 
   AliFlowAnalysisWithLeeYangZeros();                         //default constructor
   virtual  ~AliFlowAnalysisWithLeeYangZeros();               //destructor
 
   Bool_t    Init();                                          //defines variables and histograms
   Bool_t    Make(AliFlowEventSimple* anEvent);               //calculates variables and fills histograms
   void      GetOutputHistograms(TList *outputListHistos);    //get pointers to all output histograms (called before Finish()) 
   Bool_t    Finish();                                        //saves histograms
   void      WriteHistograms(TString* outputFileName);        //writes histograms locally
   void      WriteHistograms(TString outputFileName);         //writes histograms locally
   void      WriteHistograms(TDirectoryFile *outputFileName); //writes histograms locally
   
   Double_t  GetQtheta(AliFlowVector aQ, Double_t aTheta);
   
   void      SetFirstRun(Bool_t kt)       { this->fFirstRun = kt ; }
   Bool_t    GetFirstRun() const          { return this->fFirstRun ; }
   void      SetUseSum(Bool_t kt)         { this->fUseSum = kt ; }
   Bool_t    GetUseSum() const            { return this->fUseSum ; }
   void      SetDoubleLoop(Bool_t kt)     { this->fDoubleLoop = kt ; }
   Bool_t    GetDoubleLoop() const        { return this->fDoubleLoop ; }
   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; }
   void      SetQ2sum(Double_t d)         { this->fQ2sum = d; }
   Double_t  GetQ2sum() const             { return this->fQ2sum; }

   // 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; }
   //AliFlowLYZHist1* GetHist1() const             {return this->fHist1; } 
   void               SetHist1(AliFlowLYZHist1* const aLYZHist1[])  
     {for (Int_t i=0;i<5;i++) {this->fHist1[i] = aLYZHist1[i];} }
   //AliFlowLYZHist2* GetHist2() const             {return this->fHist2; } 
   void               SetHist2RP(AliFlowLYZHist2* const aLYZHist2RP[])  
     {for (Int_t i=0;i<5;i++) {this->fHist2RP[i] = aLYZHist2RP[i];} }
   void               SetHist2POI(AliFlowLYZHist2* const aLYZHist2POI[])  
     {for (Int_t i=0;i<5;i++) {this->fHist2POI[i] = aLYZHist2POI[i];} }

   TH1D*      GetHistVtheta() const   {return this->fHistVtheta; } 
   void       SetHistVtheta(TH1D* const aHistVtheta)     
   { this->fHistVtheta = aHistVtheta; }
   TProfile*  GetHistProVetaRP() const     {return this->fHistProVetaRP; }  
   void       SetHistProVetaRP(TProfile* const aHistProVetaRP)         
     {this->fHistProVetaRP = aHistProVetaRP; }
   TProfile*  GetHistProVetaPOI() const     {return this->fHistProVetaPOI; }  
   void       SetHistProVetaPOI(TProfile* const aHistProVetaPOI)         
     {this->fHistProVetaPOI = aHistProVetaPOI; }
   TProfile*  GetHistProVPtRP() const      {return this->fHistProVPtRP;}
   void       SetHistProVPtRP(TProfile* const aHistProVPtRP)           
     {this->fHistProVPtRP = aHistProVPtRP; }
   TProfile*  GetHistProVPtPOI() const      {return this->fHistProVPtPOI;}
   void       SetHistProVPtPOI(TProfile* const aHistProVPtPOI)           
     {this->fHistProVPtPOI = aHistProVPtPOI; }
   TH1D*      GetHistR0theta() const  {return this->fHistR0theta; }
   void       SetHistR0theta(TH1D* const aHistR0theta)   
     {this->fHistR0theta = aHistR0theta; }
   TProfile*  GetHistProReDenom() const  {return this->fHistProReDenom; } 
   void       SetHistProReDenom(TProfile* const aHistProReDenom)   
     {this->fHistProReDenom = aHistProReDenom; }
   TProfile*  GetHistProImDenom() const  {return this->fHistProImDenom; }
   void       SetHistProImDenom(TProfile* const aHistProImDenom)   
     {this->fHistProImDenom = aHistProImDenom; }
   TH1D*      GetHistReDtheta() const {return this->fHistReDtheta; } 
   void       SetHistReDtheta(TH1D* const aHistReDtheta) 
     {this->fHistReDtheta = aHistReDtheta; }
   TH1D*      GetHistImDtheta() const {return this->fHistImDtheta; }
   void       SetHistImDtheta(TH1D* const aHistImDtheta) 
     {this->fHistImDtheta = aHistImDtheta; } 
   TH1F*      GetHistQsumforChi() const  {return this->fHistQsumforChi; }
   void       SetHistQsumforChi(TH1F* const aHistQsumforChi) 
    {this->fHistQsumforChi = aHistQsumforChi; }

   void       SetFirstRunList(TList* const list) { this->fFirstRunList = list; }
   TList*     GetFirstRunList() const            { return this->fFirstRunList; }

   TComplex   GetGrtheta(AliFlowEventSimple* anEvent, Double_t aR, Double_t aTheta);
   TComplex   GetDiffFlow(AliFlowEventSimple* anEvent, Double_t aR, Int_t theta); 
	

 private:

   AliFlowAnalysisWithLeeYangZeros(const AliFlowAnalysisWithLeeYangZeros& aAnalysis);            // copy constructor
   AliFlowAnalysisWithLeeYangZeros& operator=(const AliFlowAnalysisWithLeeYangZeros& aAnalysis); //assignment operator

   Bool_t   MakeControlHistograms(AliFlowEventSimple* anEvent); 
   Bool_t   FillFromFlowEvent(AliFlowEventSimple* anEvent);
   Bool_t   SecondFillFromFlowEvent(AliFlowEventSimple* anEvent);

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

   Int_t        fEventNumber;     // event counter
        
   Bool_t       fFirstRun ;       // flag for lyz analysis: true=first run over data, false=second run 
   Bool_t       fUseSum ;         // flag for lyz analysis: true=use sum gen.function, false=use product gen.function
   Bool_t       fDoubleLoop ;     // flag for studying non flow effects
   Bool_t       fDebug ;          // flag for lyz analysis: more print statements

   TList*       fHistList;        //list to hold all output histograms 
   TList*       fFirstRunList;    //list from first run output
        
   TH1D*        fHistVtheta;      //hist of V(theta)      
   TProfile*    fHistProVetaRP;   //hist of v(eta) for RP selection
   TProfile*    fHistProVetaPOI;  //hist of v(eta) for POI selection
   TProfile*    fHistProVPtRP;    //hist of v(pt) for RP selection
   TProfile*    fHistProVPtPOI;   //hist of v(pt) for POI selection
   TH1D*        fHistR0theta;     //hist of r0(theta)    
   TProfile*    fHistProReDenom;  //hist of the real part of the denominator   
   TProfile*    fHistProImDenom;  //hist of the imaginary part of the denominator 
   TH1D*        fHistReDtheta;    //hist of the real part of D^theta   
   TH1D*        fHistImDtheta;    //hist of the imaginary part of D^theta  
   TH1F*        fHistQsumforChi;  //hist of sum of Q-vectors and the sum of the square of Q-vectors
  
    
  //class AliFlowLYZHist1 defines the histograms: fHistProGtheta, fHistProReGtheta, fHistProImGtheta
  AliFlowLYZHist1* fHist1[5];     //array of hist1

  //class AliFlowLYZHist1 defines the histograms: fHistProReNumer, fHistProImNumer, fHistProReNumerPt,
  //fHistProImNumerPt, fHistProReNumer2D, fHistProImNumer2D.
  AliFlowLYZHist2* fHist2RP[5];   //array of hist2
  AliFlowLYZHist2* fHist2POI[5];  //array of hist2

  AliFlowCommonHist*        fCommonHists;     //control histograms
  AliFlowCommonHistResults* fCommonHistsRes;  //final results histograms
 
  ClassDef(AliFlowAnalysisWithLeeYangZeros,0)  // macro for rootcint
};
 
     
#endif

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