]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/FLOW/Base/AliFlowAnalysisWithScalarProduct.h
add correlation coefficient equal to 1 in case of propagation of fully correlated...
[u/mrichter/AliRoot.git] / PWG / FLOW / Base / AliFlowAnalysisWithScalarProduct.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 ALIFLOWANALYSISWITHSCALARPRODUCT_H
8 #define ALIFLOWANALYSISWITHSCALARPRODUCT_H
9
10 class AliFlowTrackSimple;
11 class AliFlowEventSimple;
12 class AliFlowCommonHist;
13 class AliFlowCommonHistResults;
14
15 #include  "TList.h"
16 #include "AliFlowAnalysis.h"
17
18 class TH1D;
19 class TH1F;
20 class TH2D;
21 class TProfile;
22 class TDirectoryFile;
23
24 /////////////////////////////////////////////////////////////////////////////
25 // Description: Maker to analyze Flow from the Event Plane method.
26 //              Adaptation based on Scalar Product
27 // authors: Naomi van del Kolk (kolk@nikhef.nl)
28 //          Ante Bilandzic (anteb@nikhef.nl)
29 // mods:    Carlos Perez (cperez@nikhef.nl)
30 /////////////////////////////////////////////////////////////////////////////
31  
32 class AliFlowAnalysisWithScalarProduct : public AliFlowAnalysis {
33  public:
34  
35    AliFlowAnalysisWithScalarProduct();            //default constructor
36    virtual  ~AliFlowAnalysisWithScalarProduct();  //destructor
37  
38    void Init();                                       //Define output objects
39    void Make(AliFlowEventSimple* anEvent);            //Main routine
40    void GetOutputHistograms(TList *outputListHistos); //Copy output objects from TList
41    void Finish();                                     //Fill results
42    void WriteHistograms(TDirectoryFile *outputFileName) const; //writes histograms locally (for OnTheFly)
43
44
45    void SetHarmonic(Int_t iHarmonic)          { fHarmonic = iHarmonic; }
46    void SetApplyCorrectionForNUA(Bool_t iVal) { fApplyCorrectionForNUA = iVal?1:0; }
47    void SetNormalizationType(Int_t iVal)      { fNormalizationType = iVal; }
48    void SetDebug(Bool_t bVal)                 { fDebug = bVal; }
49    void SetBookOnlyBasicCCH(Bool_t bVal)           { fMinimalBook = bVal; }
50    void SetTotalQvector(Int_t iVal)           { fTotalQvector = iVal; }
51
52    void SetUsePhiWeights(Bool_t bVal)        { fUsePhiWeights = bVal; }
53    void SetWeightsList(TList* const aWeightsList)  { fWeightsList = (TList*)aWeightsList->Clone(); }
54   
55    TList*    GetHistList()      const { return fHistList; }
56    TProfile* GetHistProConfig() const { return fHistProConfig; }
57    TProfile* GetHistProUQ(Int_t iRFPorPOI, Int_t iPTorETA) const { return fHistProUQ[iRFPorPOI][iPTorETA]; }
58    TProfile* GetHistProQaQbNorm() const  { return fHistProQaQbNorm; }
59    TProfile* GetHistProNUAq()     const  { return fHistProNUAq; }
60    TProfile* GetHistProNUAu(Int_t iRFPorPOI, Int_t iPTorETA, Int_t iIMorRE) const { return fHistProNUAu[iRFPorPOI][iPTorETA][iIMorRE]; }
61    TH1D*     GetHistSumOfWeights() const { return fHistSumOfWeights; }
62    TProfile* GetHistProUQQaQb( Int_t iRFPorPOI, Int_t iPTorETA ) const { return fHistProUQQaQb[iRFPorPOI][iPTorETA]; }
63    TH1D*     GetHistSumOfWeightsu(Int_t iRFPorPOI, Int_t iPTorETA, Int_t iWeight) const { return fHistSumOfWeightsu[iRFPorPOI][iPTorETA][iWeight]; }
64    AliFlowCommonHist*        GetCommonHists()    const { return fCommonHists; }
65    AliFlowCommonHistResults* GetCommonHistsRes() const { return fCommonHistsRes; }
66    
67  private:
68    AliFlowAnalysisWithScalarProduct(const AliFlowAnalysisWithScalarProduct& anAnalysis);            //copy constructor
69    AliFlowAnalysisWithScalarProduct& operator=(const AliFlowAnalysisWithScalarProduct& anAnalysis); //assignment operator
70    Double_t CalculateStatisticalError( Int_t RFPorPOI, Int_t PTorETA, Int_t bin, Double_t errV ) const;
71    Double_t ComputeResolution( Double_t x ) const;
72    Double_t FindXi( Double_t res, Double_t prec ) const;
73
74       
75    Int_t fDebug ;                // flag for analysis: more print statements
76    Bool_t fMinimalBook;          // flag to turn off QA and minimize FlowCommonHist
77    Int_t fUsePhiWeights;         // use phi weights
78    Int_t fApplyCorrectionForNUA; // apply correction for non-uniform acceptance
79    Int_t fHarmonic;              // harmonic 
80    Int_t fNormalizationType;     // 0: EP mode || 1: SP mode
81    Int_t fTotalQvector;          // 1:Qa 2:Qb 3:QaQb
82
83    TList*     fWeightsList;      // list holding input histograms with phi weights
84    TList*     fHistList;         // list to hold all output histograms  
85    TProfile*  fHistProConfig;    // configuration values
86    TProfile*  fHistProQaQbNorm;  // average of QaQb
87    TH1D*      fHistSumOfWeights; // holds sum of Na*Nb and (Na*Nb)^2
88    TProfile*  fHistProNUAq;      // NUA related qq
89
90    //QAHists
91    TProfile* fHistProQNorm; // QNorm
92    TProfile* fHistProQaQb; // QaQb
93    TProfile* fHistProQaQbM; // QaQb/MaMb
94    TH2D* fHistMaMb;         // MaMb
95    TH2D* fHistQNormQaQbNorm; // QNorm vs QaQbNorm
96    TH2D* fHistQaNormMa; // QaNorm Ma
97    TH2D* fHistQbNormMb; // QbNorm Mb
98    TH1D* fResolution; // Resolution
99    TH1D* fHistQaQb; // QaQb
100    TH1D* fHistQaQbCos; // QaQbCos
101    TH1I* fHistNumberOfSubtractedDaughters; //how many daughters were subtracted during Q calculation?
102
103    AliFlowCommonHist*        fCommonHists;    // control histograms
104    AliFlowCommonHist*        fCommonHistsuQ;  // control histograms
105    AliFlowCommonHistResults* fCommonHistsRes; // results histograms
106
107    TH1F*      fPhiWeightsSub[2];           // histogram holding phi weights for subevents
108    TProfile*  fHistProUQ[2][2];            // uQ for RP|POI PT|ETA
109    TProfile*  fHistProUQQaQb[2][2];        // holds weighted average of <QuQaQb> for RP|POI PT|ETA
110    TH1D*      fHistSumOfWeightsu[2][2][3]; // holds sums of 0: Nq', 1: Nq'^2, 2: Nq'*Na*Nb
111    TProfile*  fHistProNUAu[2][2][2];          // NUA related qq for RP|POI PT|ETA
112
113    ClassDef(AliFlowAnalysisWithScalarProduct,1)  // class version
114 };
115  
116
117 #endif