]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowLeeYangZerosMaker.h
First V0 QAing version
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowLeeYangZerosMaker.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 AliFlowLeeYangZerosMaker_H
8 #define AliFlowLeeYangZerosMaker_H
9
10 //#include <iostream>
11 //using namespace std; //required for resolving the 'cout' symbol
12
13 //#include "Riostream.h"
14 #include "TVector2.h"          //called explicitly
15 #include "AliFlowSelection.h"  //only with AliFlowSelection* called ???
16 #include "AliFlowTrack.h"      //only with AliFlowTrack* called ???
17
18 //class AliFlowTrack;          //why doesn't compile?
19 //class AliFlowSelection;      //why doesn't compile?
20
21 class AliFlowEvent;
22 class AliFlowLYZHist1; 
23 class AliFlowLYZHist2;
24 //class AliFlowLYZSummary;     //class not yet finished
25
26 class TH1F;
27 class TH1D;
28 class TProfile;
29 class TProfile2D;
30 class TObjArray;
31 class TFile;
32 class TTree;
33 class TComplex;
34 class Riostream;
35
36
37 // Description: Maker to analyze Flow by the LeeYangZeros method
38 //              One needs to do two runs over the data; 
39 //              First to calculate the integrated flow 
40 //              and in the second to calculate the differential flow
41  
42 class AliFlowLeeYangZerosMaker {
43
44  public:
45  
46    AliFlowLeeYangZerosMaker();                                            //default constructor
47  
48    AliFlowLeeYangZerosMaker(const AliFlowSelection* fFlowSelect);          //custum constructor
49
50    AliFlowLeeYangZerosMaker(const AliFlowLeeYangZerosMaker&);              //copy constuctor (dummy)
51
52    AliFlowLeeYangZerosMaker& operator=(const AliFlowLeeYangZerosMaker&);   //assignment operator (dummy)
53    
54    virtual  ~AliFlowLeeYangZerosMaker();                                   //destructor
55  
56    Bool_t    Init();    //defines variables and histograms
57    Bool_t    Make(AliFlowEvent* fFlowEvent);    //calculates variables and fills histograms
58    Bool_t    Finish();  //saves histograms
59
60    Double_t  GetQtheta(AliFlowSelection* fFlowSelect, TObjArray* fFlowTracks, Float_t fTheta);
61
62    void      SetFirstRun(Bool_t kt)              { this->fFirstRun = kt ; }
63    Bool_t    GetFirstRun() const                 { return this->fFirstRun ; }
64    void      SetUseSum(Bool_t kt)                { this->fUseSum = kt ; }
65    Bool_t    GetUseSum() const                   { return this->fUseSum ; }
66    void      SetDebug(Bool_t kt)                 { this->fDebug = kt ; }
67    Bool_t    GetDebug() const                    { return this->fDebug ; }
68
69
70    // Output 
71    void     SetHistFileName(TString name)       { this->fHistFileName = name ; } // Sets output file name
72    TString  GetHistFileName() const             { return this->fHistFileName ; } // Gets output file name
73    TFile*   GetHistFile() const                 { return this->fHistFile ; }     // Gets output file
74   
75    // input for second run
76    void     SetFirstRunFileName(TString name)   { this->firstRunFileName = name ; } // Sets input file name
77    TString  GetFirstRunFileName() const         { return this->firstRunFileName ; } // Gets output file name
78    void     SetFirstRunFile(TFile* file)        { this->firstRunFile = file ; }        // Sets first run file
79
80  private:
81    Bool_t   MakeControlHistograms(AliFlowEvent* fFlowEvent); 
82    Bool_t   FillFromFlowEvent(AliFlowEvent* fFlowEvent);
83    Bool_t   SecondFillFromFlowEvent(AliFlowEvent* fFlowEvent);
84
85    //Double_t GetQtheta(AliFlowSelection* fFlowSelect, TObjArray* fFlowTracks, Float_t fTheta) const;
86    TComplex GetGrtheta(AliFlowSelection* fFlowSelect, Float_t fR, Float_t fTheta);
87    TComplex GetDiffFlow(AliFlowSelection* fFlowSelect, Float_t fR, Int_t theta); 
88    Float_t  GetR0(TH1D* fHistGtheta);
89
90   
91    
92 #ifndef __CINT__
93    TVector2  fQ;            // flow vector
94    TVector2  fQsum;         // flow vector sum
95    Float_t   fQ2sum;        // flow vector sum squared
96    Double_t  fQtheta;       // flow vector projected on ref. angle theta
97    
98 #endif /*__CINT__*/
99
100    Int_t     fEventNumber;  // event counter
101    Int_t     fMult;         // multiplicity
102    Int_t     fNbins;        // number of bins
103    Float_t   fTheta;        // ref. angle theta
104    
105    AliFlowEvent*      fFlowEvent;    //! pointer to AliFlowEvent
106    AliFlowSelection*  fFlowSelect;   //! pointer to AliFlowSelection
107    TObjArray*         fFlowTracks ;  //! pointer to the TrackCollection
108    AliFlowTrack*      fFlowTrack ;   //! pointer to the AliFlowTrack
109    //AliFlowLYZSummary* fLYZSummary;   //! 
110    TTree*             fFlowTree;     //!
111
112    Bool_t       fFirstRun ;         //! flag for lyz analysis: true=first run over data, false=second run 
113    Bool_t       fUseSum ;           //! flag for lyz analysis: true=use sum gen.function, false=use product gen.function
114    Bool_t       fDebug ;            //! flag for lyz analysis: more print statements
115
116    TString      fHistFileName;      //!
117    TFile*       fHistFile;          //!
118    TFile*       fSummaryFile;       //!
119    TDirectory * fFistLoop;          //!
120    TString      firstRunFileName;   //!
121    TFile*       firstRunFile;       //!
122   // for single histograms
123   TH1F*        fHistOrigMult;      //!
124   TH1F*        fHistMult;          //!
125   TH1F*        fHistQ;             //!
126   TH1F*        fHistPt;            //!
127   TH1F*        fHistEta;           //!
128   TH1F*        fHistPhi;           //!
129   TH1F*        fHistQtheta;        //!
130    
131
132   TProfile*    fHistProVthetaHar1;     //!
133   TProfile*    fHistProVthetaHar2;     //!
134   TProfile*    fHistProVetaHar1;       //!
135   TProfile*    fHistProVetaHar2;       //!
136   TProfile*    fHistProVPtHar1;        //!
137   TProfile*    fHistProVPtHar2;        //!
138   TH1D*        fHistVPtHar2;           //!
139   TProfile*    fHistProVR0;            //!
140   TH1D*        fHistVR0;               //!
141   TProfile*    fHistProV;              //!
142   TProfile*    fHistProR0thetaHar1;    //!
143   TProfile*    fHistProR0thetaHar2;    //!
144   TProfile*    fHistProReDenomHar1;    //!
145   TProfile*    fHistProReDenomHar2;    //!
146   TProfile*    fHistProImDenomHar1;    //!
147   TProfile*    fHistProImDenomHar2;    //!
148   TProfile*    fHistProReDtheta;       //!
149   TProfile*    fHistProImDtheta;       //!
150    
151    
152   //class AliFlowLYZHist1 defines the histograms: fHistProGtheta, fHistProReGtheta, fHistProImGtheta
153   AliFlowLYZHist1* fHist1[2][5];       //!
154
155   //class AliFlowLYZHist1 defines the histograms: fHistProReNumer, fHistProImNumer, fHistProReNumerPt,
156   //fHistProImNumerPt, fHistProReNumer2D, fHistProImNumer2D.
157   AliFlowLYZHist2* fHist2[2][5];       //!
158  
159   ClassDef(AliFlowLeeYangZerosMaker,0)  // macro for rootcint
160     };
161  
162      
163 #endif