]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/FLOW/Base/AliFlowAnalysisWithLeeYangZeros.h
Moving/split PWG2/FLOW to PWGCF/FLOW, PWG/FLOW/Base, PWG/FLOW/Tasks, PWG/Glauber
[u/mrichter/AliRoot.git] / PWG / FLOW / Base / AliFlowAnalysisWithLeeYangZeros.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 /* $Id$ */
5
6
7 #ifndef ALIFLOWANALYSISWITHLEEYANGZEROS_H
8 #define ALIFLOWANALYSISWITHLEEYANGZEROS_H
9
10 ////////////////////////////////////////////////////////////////////
11 // Description: Maker to analyze Flow by the LeeYangZeros method
12 //              One needs to do two runs over the data; 
13 //              First to calculate the integrated flow 
14 //              and in the second to calculate the differential flow
15 // Author: Naomi van der Kolk (kolk@nikhef.nl)
16 ////////////////////////////////////////////////////////////////////
17
18 class TH1F;
19 class TProfile;
20 class TDirectoryFile;
21 class TComplex;
22 class TString;
23 class TList;
24 class TVector2;
25  
26 class AliFlowVector;
27 class AliFlowEventSimple;
28 class AliFlowLYZHist1; 
29 class AliFlowLYZHist2;
30 class AliFlowCommonHist;
31 class AliFlowCommonHistResults;
32
33 class AliFlowAnalysisWithLeeYangZeros {
34
35  public:
36  
37    AliFlowAnalysisWithLeeYangZeros();                         //default constructor
38    virtual  ~AliFlowAnalysisWithLeeYangZeros();               //destructor
39  
40    Bool_t    Init();                                          //defines variables and histograms
41    Bool_t    Make(AliFlowEventSimple* anEvent);               //calculates variables and fills histograms
42    void      GetOutputHistograms(TList *outputListHistos);    //get pointers to all output histograms (called before Finish()) 
43    Bool_t    Finish();                                        //saves histograms
44    void      WriteHistograms(TString* outputFileName);        //writes histograms locally
45    void      WriteHistograms(TString outputFileName);         //writes histograms locally
46    void      WriteHistograms(TDirectoryFile *outputFileName); //writes histograms locally
47    
48    Double_t  GetQtheta(AliFlowVector aQ, Double_t aTheta);
49    
50    void      SetFirstRun(Bool_t kt)       { this->fFirstRun = kt ; }
51    Bool_t    GetFirstRun() const          { return this->fFirstRun ; }
52    void      SetUseSum(Bool_t kt)         { this->fUseSum = kt ; }
53    Bool_t    GetUseSum() const            { return this->fUseSum ; }
54    void      SetDoubleLoop(Bool_t kt)     { this->fDoubleLoop = kt ; }
55    Bool_t    GetDoubleLoop() const        { return this->fDoubleLoop ; }
56    void      SetDebug(Bool_t kt)          { this->fDebug = kt ; }
57    Bool_t    GetDebug() const             { return this->fDebug ; }
58    
59    void      SetEventNumber(Int_t n)      { this->fEventNumber = n; }
60    Int_t     GetEventNumber() const       { return this->fEventNumber; }
61    void      SetQ2sum(Double_t d)         { this->fQ2sum = d; }
62    Double_t  GetQ2sum() const             { return this->fQ2sum; }
63
64    // Output 
65    TList*             GetHistList() const      { return this->fHistList ; }     
66    AliFlowCommonHist* GetCommonHists() const   { return this->fCommonHists; }
67    void               SetCommonHists(AliFlowCommonHist* const aCommonHist)  
68      { this->fCommonHists = aCommonHist; }
69    AliFlowCommonHistResults* GetCommonHistsRes() const  
70      { return this->fCommonHistsRes; }
71    void               SetCommonHistsRes(AliFlowCommonHistResults* const aCommonHistResult) 
72      { this->fCommonHistsRes = aCommonHistResult; }
73    //AliFlowLYZHist1* GetHist1() const             {return this->fHist1; } 
74    void               SetHist1(AliFlowLYZHist1* const aLYZHist1[])  
75      {for (Int_t i=0;i<5;i++) {this->fHist1[i] = aLYZHist1[i];} }
76    //AliFlowLYZHist2* GetHist2() const             {return this->fHist2; } 
77    void               SetHist2RP(AliFlowLYZHist2* const aLYZHist2RP[])  
78      {for (Int_t i=0;i<5;i++) {this->fHist2RP[i] = aLYZHist2RP[i];} }
79    void               SetHist2POI(AliFlowLYZHist2* const aLYZHist2POI[])  
80      {for (Int_t i=0;i<5;i++) {this->fHist2POI[i] = aLYZHist2POI[i];} }
81
82    TH1D*      GetHistVtheta() const   {return this->fHistVtheta; } 
83    void       SetHistVtheta(TH1D* const aHistVtheta)     
84    { this->fHistVtheta = aHistVtheta; }
85    TProfile*  GetHistProVetaRP() const     {return this->fHistProVetaRP; }  
86    void       SetHistProVetaRP(TProfile* const aHistProVetaRP)         
87      {this->fHistProVetaRP = aHistProVetaRP; }
88    TProfile*  GetHistProVetaPOI() const     {return this->fHistProVetaPOI; }  
89    void       SetHistProVetaPOI(TProfile* const aHistProVetaPOI)         
90      {this->fHistProVetaPOI = aHistProVetaPOI; }
91    TProfile*  GetHistProVPtRP() const      {return this->fHistProVPtRP;}
92    void       SetHistProVPtRP(TProfile* const aHistProVPtRP)           
93      {this->fHistProVPtRP = aHistProVPtRP; }
94    TProfile*  GetHistProVPtPOI() const      {return this->fHistProVPtPOI;}
95    void       SetHistProVPtPOI(TProfile* const aHistProVPtPOI)           
96      {this->fHistProVPtPOI = aHistProVPtPOI; }
97    TH1D*      GetHistR0theta() const  {return this->fHistR0theta; }
98    void       SetHistR0theta(TH1D* const aHistR0theta)   
99      {this->fHistR0theta = aHistR0theta; }
100    TProfile*  GetHistProReDenom() const  {return this->fHistProReDenom; } 
101    void       SetHistProReDenom(TProfile* const aHistProReDenom)   
102      {this->fHistProReDenom = aHistProReDenom; }
103    TProfile*  GetHistProImDenom() const  {return this->fHistProImDenom; }
104    void       SetHistProImDenom(TProfile* const aHistProImDenom)   
105      {this->fHistProImDenom = aHistProImDenom; }
106    TH1D*      GetHistReDtheta() const {return this->fHistReDtheta; } 
107    void       SetHistReDtheta(TH1D* const aHistReDtheta) 
108      {this->fHistReDtheta = aHistReDtheta; }
109    TH1D*      GetHistImDtheta() const {return this->fHistImDtheta; }
110    void       SetHistImDtheta(TH1D* const aHistImDtheta) 
111      {this->fHistImDtheta = aHistImDtheta; } 
112    TH1F*      GetHistQsumforChi() const  {return this->fHistQsumforChi; }
113    void       SetHistQsumforChi(TH1F* const aHistQsumforChi) 
114     {this->fHistQsumforChi = aHistQsumforChi; }
115
116    void       SetFirstRunList(TList* const list) { this->fFirstRunList = list; }
117    TList*     GetFirstRunList() const            { return this->fFirstRunList; }
118
119    TComplex   GetGrtheta(AliFlowEventSimple* anEvent, Double_t aR, Double_t aTheta);
120    TComplex   GetDiffFlow(AliFlowEventSimple* anEvent, Double_t aR, Int_t theta); 
121         
122
123  private:
124
125    AliFlowAnalysisWithLeeYangZeros(const AliFlowAnalysisWithLeeYangZeros& aAnalysis);            // copy constructor
126    AliFlowAnalysisWithLeeYangZeros& operator=(const AliFlowAnalysisWithLeeYangZeros& aAnalysis); //assignment operator
127
128    Bool_t   MakeControlHistograms(AliFlowEventSimple* anEvent); 
129    Bool_t   FillFromFlowEvent(AliFlowEventSimple* anEvent);
130    Bool_t   SecondFillFromFlowEvent(AliFlowEventSimple* anEvent);
131
132 #ifndef __CINT__
133    
134    TVector2*  fQsum;         // flow vector sum              
135    Double_t  fQ2sum;         // flow vector sum squared                 
136       
137 #endif /*__CINT__*/
138
139    Int_t        fEventNumber;     // event counter
140         
141    Bool_t       fFirstRun ;       // flag for lyz analysis: true=first run over data, false=second run 
142    Bool_t       fUseSum ;         // flag for lyz analysis: true=use sum gen.function, false=use product gen.function
143    Bool_t       fDoubleLoop ;     // flag for studying non flow effects
144    Bool_t       fDebug ;          // flag for lyz analysis: more print statements
145
146    TList*       fHistList;        //list to hold all output histograms 
147    TList*       fFirstRunList;    //list from first run output
148         
149    TH1D*        fHistVtheta;      //hist of V(theta)      
150    TProfile*    fHistProVetaRP;   //hist of v(eta) for RP selection
151    TProfile*    fHistProVetaPOI;  //hist of v(eta) for POI selection
152    TProfile*    fHistProVPtRP;    //hist of v(pt) for RP selection
153    TProfile*    fHistProVPtPOI;   //hist of v(pt) for POI selection
154    TH1D*        fHistR0theta;     //hist of r0(theta)    
155    TProfile*    fHistProReDenom;  //hist of the real part of the denominator   
156    TProfile*    fHistProImDenom;  //hist of the imaginary part of the denominator 
157    TH1D*        fHistReDtheta;    //hist of the real part of D^theta   
158    TH1D*        fHistImDtheta;    //hist of the imaginary part of D^theta  
159    TH1F*        fHistQsumforChi;  //hist of sum of Q-vectors and the sum of the square of Q-vectors
160   
161     
162   //class AliFlowLYZHist1 defines the histograms: fHistProGtheta, fHistProReGtheta, fHistProImGtheta
163   AliFlowLYZHist1* fHist1[5];     //array of hist1
164
165   //class AliFlowLYZHist1 defines the histograms: fHistProReNumer, fHistProImNumer, fHistProReNumerPt,
166   //fHistProImNumerPt, fHistProReNumer2D, fHistProImNumer2D.
167   AliFlowLYZHist2* fHist2RP[5];   //array of hist2
168   AliFlowLYZHist2* fHist2POI[5];  //array of hist2
169
170   AliFlowCommonHist*        fCommonHists;     //control histograms
171   AliFlowCommonHistResults* fCommonHistsRes;  //final results histograms
172  
173   ClassDef(AliFlowAnalysisWithLeeYangZeros,0)  // macro for rootcint
174 };
175  
176      
177 #endif
178