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