]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowAnalysisWithLeeYangZeros.h
update to work on caf for all methods and working for ESD, AOD and monte carlo
[u/mrichter/AliRoot.git] / PWG2 / FLOW / 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 #include "AliFlowVector.h" //needed as include
11
12 //class AliFlowTrackSimple;
13 class AliFlowEventSimple;
14 class AliFlowLYZHist1; 
15 class AliFlowLYZHist2;
16 class AliFlowCommonHist;
17 class AliFlowCommonHistResults;
18
19 class TH1F;
20 class TH1D;
21 class TProfile;
22 class TProfile2D;
23 class TObjArray;
24 class TFile;
25 class TComplex;
26 class TString;
27 class TList;
28 class Riostream;
29
30
31 // Description: Maker to analyze Flow by the LeeYangZeros method
32 //              One needs to do two runs over the data; 
33 //              First to calculate the integrated flow 
34 //              and in the second to calculate the differential flow
35  
36 class AliFlowAnalysisWithLeeYangZeros {
37
38  public:
39  
40    AliFlowAnalysisWithLeeYangZeros();              //default constructor
41    virtual  ~AliFlowAnalysisWithLeeYangZeros();    //destructor
42  
43    Bool_t    Init();                               //defines variables and histograms
44    Bool_t    Make(AliFlowEventSimple* anEvent);    //calculates variables and fills histograms
45    Bool_t    Finish();                             //saves histograms
46    
47    Double_t  GetQtheta(AliFlowVector aQ, Double_t aTheta);
48
49    void      SetFirstRun(Bool_t kt)       { this->fFirstRun = kt ; }
50    Bool_t    GetFirstRun() const          { return this->fFirstRun ; }
51    void      SetUseSum(Bool_t kt)         { this->fUseSum = kt ; }
52    Bool_t    GetUseSum() const            { return this->fUseSum ; }
53    void      SetDoubleLoop(Bool_t kt)     { this->fDoubleLoop = kt ; }
54    Bool_t    GetDoubleLoop() const        { return this->fDoubleLoop ; }
55    void      SetDebug(Bool_t kt)          { this->fDebug = kt ; }
56    Bool_t    GetDebug() const             { return this->fDebug ; }
57    
58    void      SetEventNumber(Int_t n)      { this->fEventNumber = n; }
59    Int_t     GetEventNumber() const       { return this->fEventNumber; }
60    void      SetQ2sum(Double_t d)         { this->fQ2sum = d; }
61    Double_t  GetQ2sum()                   { return this->fQ2sum; }
62
63    // Output 
64    TList*             GetHistList() const      { return this->fHistList ; }     
65    AliFlowCommonHist* GetCommonHists() const   { return this->fCommonHists; }
66    void               SetCommonHists(AliFlowCommonHist* aCommonHist)  
67      { this->fCommonHists = aCommonHist; }
68    AliFlowCommonHistResults* GetCommonHistsRes() const  
69      { return this->fCommonHistsRes; }
70    void               SetCommonHistsRes(AliFlowCommonHistResults* aCommonHistResult) 
71      { this->fCommonHistsRes = aCommonHistResult; }
72    //AliFlowLYZHist1* GetHist1() const             {return this->fHist1; } 
73    void               SetHist1(AliFlowLYZHist1* aLYZHist1[])  
74      {for (Int_t i=0;i<5;i++) {this->fHist1[i] = aLYZHist1[i];} }
75    //AliFlowLYZHist2* GetHist2() const             {return this->fHist2; } 
76    void               SetHist2(AliFlowLYZHist2* aLYZHist2[])  
77      {for (Int_t i=0;i<5;i++) {this->fHist2[i] = aLYZHist2[i];} }
78
79    TProfile*  GetHistProVtheta() const   {return this->fHistProVtheta; } 
80    void       SetHistProVtheta(TProfile* aHistProVtheta)     
81      { this->fHistProVtheta = aHistProVtheta; }
82    TProfile*  GetHistProVeta() const     {return this->fHistProVeta; }  
83    void       SetHistProVeta(TProfile* aHistProVeta)         
84      {this->fHistProVeta = aHistProVeta; }
85    TProfile*  GetHistProVPt() const      {return this->fHistProVPt;}
86    void       SetHistProVPt(TProfile* aHistProVPt)           
87      {this->fHistProVPt = aHistProVPt; }
88    TProfile*  GetHistProR0theta() const  {return this->fHistProR0theta; }
89    void       SetHistProR0theta(TProfile* aHistProR0theta)   
90      {this->fHistProR0theta = aHistProR0theta; }
91    TProfile*  GetHistProReDenom() const  {return this->fHistProReDenom; } 
92    void       SetHistProReDenom(TProfile* aHistProReDenom)   
93      {this->fHistProReDenom = aHistProReDenom; }
94    TProfile*  GetHistProImDenom() const  {return this->fHistProImDenom; }
95    void       SetHistProImDenom(TProfile* aHistProImDenom)   
96      {this->fHistProImDenom = aHistProImDenom; }
97    TProfile*  GetHistProReDtheta() const {return this->fHistProReDtheta; } 
98    void       SetHistProReDtheta(TProfile* aHistProReDtheta) 
99      {this->fHistProReDtheta = aHistProReDtheta; }
100    TProfile*  GetHistProImDtheta() const {return this->fHistProImDtheta; }
101    void       SetHistProImDtheta(TProfile* aHistProImDtheta) 
102      {this->fHistProImDtheta = aHistProImDtheta; }
103    TH1F*      GetHistQsumforChi() {return this->fHistQsumforChi; }
104    void       SetHistQsumforChi(TH1F* aHistQsumforChi) 
105     {this->fHistQsumforChi = aHistQsumforChi; }
106
107    void       SetFirstRunList(TList* list) { this->fFirstRunList = list; }
108    TList*     GetFirstRunList()            { return this->fFirstRunList; }
109
110  private:
111
112    AliFlowAnalysisWithLeeYangZeros(const AliFlowAnalysisWithLeeYangZeros& aAnalysis);            // copy constructor
113    AliFlowAnalysisWithLeeYangZeros& operator=(const AliFlowAnalysisWithLeeYangZeros& aAnalysis); //assignment operator
114
115    Bool_t   MakeControlHistograms(AliFlowEventSimple* anEvent); 
116    Bool_t   FillFromFlowEvent(AliFlowEventSimple* anEvent);
117    Bool_t   SecondFillFromFlowEvent(AliFlowEventSimple* anEvent);
118
119    TComplex GetGrtheta(AliFlowEventSimple* anEvent, Double_t aR, Double_t aTheta);
120    TComplex GetDiffFlow(AliFlowEventSimple* anEvent, Double_t aR, Int_t theta); 
121    Double_t GetR0(TH1D* fHistGtheta);
122    
123 #ifndef __CINT__
124    
125    TVector2*  fQsum;         // flow vector sum              
126    Double_t  fQ2sum;        // flow vector sum squared                 
127       
128 #endif /*__CINT__*/
129
130    Int_t        fEventNumber;       // event counter
131         
132    Bool_t       fFirstRun ;         // flag for lyz analysis: true=first run over data, false=second run 
133    Bool_t       fUseSum ;           // flag for lyz analysis: true=use sum gen.function, false=use product gen.function
134    Bool_t       fDoubleLoop ;       // flag for studying non flow effects
135    Bool_t       fDebug ;            // flag for lyz analysis: more print statements
136
137    TList*       fHistList;          //list to hold all output histograms 
138    TList*       fFirstRunList;      //list from first run output
139         
140    TProfile*    fHistProVtheta;      
141    TProfile*    fHistProVeta;        
142    TProfile*    fHistProVPt;         
143    TProfile*    fHistProR0theta;     
144    TProfile*    fHistProReDenom;     
145    TProfile*    fHistProImDenom;     
146    TProfile*    fHistProReDtheta;    
147    TProfile*    fHistProImDtheta; 
148    TH1F*        fHistQsumforChi;                 //
149   
150     
151   //class AliFlowLYZHist1 defines the histograms: fHistProGtheta, fHistProReGtheta, fHistProImGtheta
152   AliFlowLYZHist1* fHist1[5];       //
153
154   //class AliFlowLYZHist1 defines the histograms: fHistProReNumer, fHistProImNumer, fHistProReNumerPt,
155   //fHistProImNumerPt, fHistProReNumer2D, fHistProImNumer2D.
156   AliFlowLYZHist2* fHist2[5];       //
157
158   AliFlowCommonHist*        fCommonHists;     //
159   AliFlowCommonHistResults* fCommonHistsRes;  //
160  
161   ClassDef(AliFlowAnalysisWithLeeYangZeros,1)  // macro for rootcint
162     };
163  
164      
165 #endif
166