]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLeeYangZeros.h
fixing coding violations from FC
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / 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
19 #include "AliFlowVector.h" //needed as include
20
21 //class AliFlowTrackSimple;
22 class AliFlowEventSimple;
23 class AliFlowLYZHist1; 
24 class AliFlowLYZHist2;
25 class AliFlowCommonHist;
26 class AliFlowCommonHistResults;
27
28 class TH1F;
29 class TH1D;
30 class TProfile;
31 class TProfile2D;
32 class TObjArray;
33 class TFile;
34 class TDirectoryFile;
35 class TComplex;
36 class TString;
37 class TList;
38 class Riostream;
39
40  
41 class AliFlowAnalysisWithLeeYangZeros {
42
43  public:
44  
45    AliFlowAnalysisWithLeeYangZeros();                         //default constructor
46    virtual  ~AliFlowAnalysisWithLeeYangZeros();               //destructor
47  
48    Bool_t    Init();                                          //defines variables and histograms
49    Bool_t    Make(AliFlowEventSimple* anEvent);               //calculates variables and fills histograms
50    void      GetOutputHistograms(TList *outputListHistos);    //get pointers to all output histograms (called before Finish()) 
51    Bool_t    Finish();                                        //saves histograms
52    void      WriteHistograms(TString* outputFileName);        //writes histograms locally
53    void      WriteHistograms(TString outputFileName);         //writes histograms locally
54    void      WriteHistograms(TDirectoryFile *outputFileName); //writes histograms locally
55    
56    Double_t  GetQtheta(AliFlowVector aQ, Double_t aTheta);
57    
58    void      SetFirstRun(Bool_t kt)       { this->fFirstRun = kt ; }
59    Bool_t    GetFirstRun() const          { return this->fFirstRun ; }
60    void      SetUseSum(Bool_t kt)         { this->fUseSum = kt ; }
61    Bool_t    GetUseSum() const            { return this->fUseSum ; }
62    void      SetDoubleLoop(Bool_t kt)     { this->fDoubleLoop = kt ; }
63    Bool_t    GetDoubleLoop() const        { return this->fDoubleLoop ; }
64    void      SetDebug(Bool_t kt)          { this->fDebug = kt ; }
65    Bool_t    GetDebug() const             { return this->fDebug ; }
66    
67    void      SetEventNumber(Int_t n)      { this->fEventNumber = n; }
68    Int_t     GetEventNumber() const       { return this->fEventNumber; }
69    void      SetQ2sum(Double_t d)         { this->fQ2sum = d; }
70    Double_t  GetQ2sum() const             { return this->fQ2sum; }
71
72    // Output 
73    TList*             GetHistList() const      { return this->fHistList ; }     
74    AliFlowCommonHist* GetCommonHists() const   { return this->fCommonHists; }
75    void               SetCommonHists(AliFlowCommonHist* const aCommonHist)  
76      { this->fCommonHists = aCommonHist; }
77    AliFlowCommonHistResults* GetCommonHistsRes() const  
78      { return this->fCommonHistsRes; }
79    void               SetCommonHistsRes(AliFlowCommonHistResults* const aCommonHistResult) 
80      { this->fCommonHistsRes = aCommonHistResult; }
81    //AliFlowLYZHist1* GetHist1() const             {return this->fHist1; } 
82    void               SetHist1(AliFlowLYZHist1* const aLYZHist1[])  
83      {for (Int_t i=0;i<5;i++) {this->fHist1[i] = aLYZHist1[i];} }
84    //AliFlowLYZHist2* GetHist2() const             {return this->fHist2; } 
85    void               SetHist2RP(AliFlowLYZHist2* const aLYZHist2RP[])  
86      {for (Int_t i=0;i<5;i++) {this->fHist2RP[i] = aLYZHist2RP[i];} }
87    void               SetHist2POI(AliFlowLYZHist2* const aLYZHist2POI[])  
88      {for (Int_t i=0;i<5;i++) {this->fHist2POI[i] = aLYZHist2POI[i];} }
89
90    TProfile*  GetHistProVtheta() const   {return this->fHistProVtheta; } 
91    void       SetHistProVtheta(TProfile* const aHistProVtheta)     
92      { this->fHistProVtheta = aHistProVtheta; }
93    TProfile*  GetHistProVetaRP() const     {return this->fHistProVetaRP; }  
94    void       SetHistProVetaRP(TProfile* const aHistProVetaRP)         
95      {this->fHistProVetaRP = aHistProVetaRP; }
96    TProfile*  GetHistProVetaPOI() const     {return this->fHistProVetaPOI; }  
97    void       SetHistProVetaPOI(TProfile* const aHistProVetaPOI)         
98      {this->fHistProVetaPOI = aHistProVetaPOI; }
99    TProfile*  GetHistProVPtRP() const      {return this->fHistProVPtRP;}
100    void       SetHistProVPtRP(TProfile* const aHistProVPtRP)           
101      {this->fHistProVPtRP = aHistProVPtRP; }
102    TProfile*  GetHistProVPtPOI() const      {return this->fHistProVPtPOI;}
103    void       SetHistProVPtPOI(TProfile* const aHistProVPtPOI)           
104      {this->fHistProVPtPOI = aHistProVPtPOI; }
105    TProfile*  GetHistProR0theta() const  {return this->fHistProR0theta; }
106    void       SetHistProR0theta(TProfile* const aHistProR0theta)   
107      {this->fHistProR0theta = aHistProR0theta; }
108    TProfile*  GetHistProReDenom() const  {return this->fHistProReDenom; } 
109    void       SetHistProReDenom(TProfile* const aHistProReDenom)   
110      {this->fHistProReDenom = aHistProReDenom; }
111    TProfile*  GetHistProImDenom() const  {return this->fHistProImDenom; }
112    void       SetHistProImDenom(TProfile* const aHistProImDenom)   
113      {this->fHistProImDenom = aHistProImDenom; }
114    TProfile*  GetHistProReDtheta() const {return this->fHistProReDtheta; } 
115    void       SetHistProReDtheta(TProfile* const aHistProReDtheta) 
116      {this->fHistProReDtheta = aHistProReDtheta; }
117    TProfile*  GetHistProImDtheta() const {return this->fHistProImDtheta; }
118    void       SetHistProImDtheta(TProfile* const aHistProImDtheta) 
119      {this->fHistProImDtheta = aHistProImDtheta; }
120    TH1F*      GetHistQsumforChi() const  {return this->fHistQsumforChi; }
121    void       SetHistQsumforChi(TH1F* const aHistQsumforChi) 
122     {this->fHistQsumforChi = aHistQsumforChi; }
123
124    void       SetFirstRunList(TList* const list) { this->fFirstRunList = list; }
125    TList*     GetFirstRunList() const            { return this->fFirstRunList; }
126
127    TComplex   GetGrtheta(AliFlowEventSimple* anEvent, Double_t aR, Double_t aTheta);
128    TComplex   GetDiffFlow(AliFlowEventSimple* anEvent, Double_t aR, Int_t theta); 
129         
130
131  private:
132
133    AliFlowAnalysisWithLeeYangZeros(const AliFlowAnalysisWithLeeYangZeros& aAnalysis);            // copy constructor
134    AliFlowAnalysisWithLeeYangZeros& operator=(const AliFlowAnalysisWithLeeYangZeros& aAnalysis); //assignment operator
135
136    Bool_t   MakeControlHistograms(AliFlowEventSimple* anEvent); 
137    Bool_t   FillFromFlowEvent(AliFlowEventSimple* anEvent);
138    Bool_t   SecondFillFromFlowEvent(AliFlowEventSimple* anEvent);
139
140 #ifndef __CINT__
141    
142    TVector2*  fQsum;         // flow vector sum              
143    Double_t  fQ2sum;         // flow vector sum squared                 
144       
145 #endif /*__CINT__*/
146
147    Int_t        fEventNumber;     // event counter
148         
149    Bool_t       fFirstRun ;       // flag for lyz analysis: true=first run over data, false=second run 
150    Bool_t       fUseSum ;         // flag for lyz analysis: true=use sum gen.function, false=use product gen.function
151    Bool_t       fDoubleLoop ;     // flag for studying non flow effects
152    Bool_t       fDebug ;          // flag for lyz analysis: more print statements
153
154    TList*       fHistList;        //list to hold all output histograms 
155    TList*       fFirstRunList;    //list from first run output
156         
157    TProfile*    fHistProVtheta;   //hist of V(theta)      
158    TProfile*    fHistProVetaRP;   //hist of v(eta) for RP selection
159    TProfile*    fHistProVetaPOI;  //hist of v(eta) for POI selection
160    TProfile*    fHistProVPtRP;    //hist of v(pt) for RP selection
161    TProfile*    fHistProVPtPOI;   //hist of v(pt) for POI selection
162    TProfile*    fHistProR0theta;  //hist of r0(theta)    
163    TProfile*    fHistProReDenom;  //hist of the real part of the denominator   
164    TProfile*    fHistProImDenom;  //hist of the imaginary part of the denominator 
165    TProfile*    fHistProReDtheta; //hist of the real part of D^theta   
166    TProfile*    fHistProImDtheta; //hist of the imaginary part of D^theta  
167    TH1F*        fHistQsumforChi;  //hist of sum of Q-vectors and the sum of the square of Q-vectors
168   
169     
170   //class AliFlowLYZHist1 defines the histograms: fHistProGtheta, fHistProReGtheta, fHistProImGtheta
171   AliFlowLYZHist1* fHist1[5];     //array of hist1
172
173   //class AliFlowLYZHist1 defines the histograms: fHistProReNumer, fHistProImNumer, fHistProReNumerPt,
174   //fHistProImNumerPt, fHistProReNumer2D, fHistProImNumer2D.
175   AliFlowLYZHist2* fHist2RP[5];   //array of hist2
176   AliFlowLYZHist2* fHist2POI[5];  //array of hist2
177
178   AliFlowCommonHist*        fCommonHists;     //control histograms
179   AliFlowCommonHistResults* fCommonHistsRes;  //final results histograms
180  
181   ClassDef(AliFlowAnalysisWithLeeYangZeros,1)  // macro for rootcint
182 };
183  
184      
185 #endif
186