]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithScalarProduct.h
improved avarages caculation supressing multiplicty fluctuations
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowAnalysisWithScalarProduct.h
... / ...
CommitLineData
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#include "TString.h"
11
12class AliFlowTrackSimple;
13class AliFlowEventSimple;
14class AliFlowCommonHist;
15class AliFlowCommonHistResults;
16
17class TProfile;
18class TList;
19class TFile;
20class Riostream;
21
22/////////////////////////////////////////////////////////////////////////////
23// Description: Maker to analyze Flow from the Scalar Product method.
24//
25// authors: N. van der Kolk (kolk@nikhef.nl), A. Bilandzic (anteb@nikhef.nl)
26/////////////////////////////////////////////////////////////////////////////
27
28class AliFlowAnalysisWithScalarProduct {
29
30 public:
31
32 AliFlowAnalysisWithScalarProduct(); //default constructor
33 virtual ~AliFlowAnalysisWithScalarProduct(); //destructor
34
35 void Init(); //defines variables and histograms
36 void Make(AliFlowEventSimple* anEvent); //calculates variables and fills histograms
37 void GetOutputHistograms(TList *outputListHistos); //get pointers to all output histograms (called before Finish())
38 void Finish(); //saves histograms
39 void WriteHistograms(TString* outputFileName); //writes histograms locally
40 void WriteHistograms(TString outputFileName); //writes histograms locally
41 void WriteHistograms(TDirectoryFile *outputFileName); //writes histograms locally
42
43 void SetDebug(Bool_t kt) { this->fDebug = kt ; }
44 Bool_t GetDebug() const { return this->fDebug ; }
45
46 Double_t CalculateStatisticalError(Int_t bin,
47 Double_t aStatErrorQaQb,
48 TProfile* aHistProUQ,
49 TProfile* aHistProUQQaQb,
50 TH1D** aHistSumOfWeights);
51
52
53 //phi weights
54 void SetWeightsList(TList* const aWeightsList) {this->fWeightsList = (TList*)aWeightsList->Clone();}
55 TList* GetWeightsList() const {return this->fWeightsList;}
56 void SetUsePhiWeights(Bool_t const aPhiW) {this->fUsePhiWeights = aPhiW;}
57 Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;}
58
59 // Output
60 TList* GetHistList() const { return this->fHistList ; } // Gets output histogram list
61 //histogram getters
62 TProfile* GetHistProUQetaRP() const {return this->fHistProUQetaRP;}
63 TProfile* GetHistProUQetaPOI() const {return this->fHistProUQetaPOI;}
64 TProfile* GetHistProUQPtRP() const {return this->fHistProUQPtRP;}
65 TProfile* GetHistProUQPtPOI() const {return this->fHistProUQPtPOI;}
66 TProfile* GetHistProQaQb() const {return this->fHistProQaQb;}
67 TH1D* GetHistSumOfLinearWeights() const {return this->fHistSumOfLinearWeights;}
68 TH1D* GetHistSumOfQuadraticWeights() const {return this->fHistSumOfQuadraticWeights;}
69 TProfile* GetHistProUQQaQbPtRP() const {return this->fHistProUQQaQbPtRP;}
70 TProfile* GetHistProUQQaQbEtaRP() const {return this->fHistProUQQaQbEtaRP;}
71 TProfile* GetHistProUQQaQbPtPOI() const {return this->fHistProUQQaQbPtPOI;}
72 TProfile* GetHistProUQQaQbEtaPOI() const {return this->fHistProUQQaQbEtaPOI;}
73 TH1D* GetHistSumOfWeightsPtRP(Int_t i) const {return this->fHistSumOfWeightsPtRP[i];}
74 TH1D* GetHistSumOfWeightsEtaRP(Int_t i) const {return this->fHistSumOfWeightsEtaRP[i];}
75 TH1D* GetHistSumOfWeightsPtPOI(Int_t i) const {return this->fHistSumOfWeightsPtPOI[i];}
76 TH1D* GetHistSumOfWeightsEtaPOI(Int_t i) const {return this->fHistSumOfWeightsEtaPOI[i];}
77 AliFlowCommonHist* GetCommonHists() const {return this->fCommonHists; }
78 AliFlowCommonHistResults* GetCommonHistsRes() const {return this->fCommonHistsRes; }
79
80 //histogram setters
81 void SetHistProUQetaRP(TProfile* const aHistProUQetaRP)
82 {this->fHistProUQetaRP = aHistProUQetaRP;}
83 void SetHistProUQetaPOI(TProfile* const aHistProUQetaPOI)
84 {this->fHistProUQetaPOI = aHistProUQetaPOI;}
85 void SetHistProUQPtRP(TProfile* const aHistProUQPtRP)
86 {this->fHistProUQPtRP = aHistProUQPtRP;}
87 void SetHistProUQPtPOI(TProfile* const aHistProUQPtPOI)
88 {this->fHistProUQPtPOI = aHistProUQPtPOI;}
89 void SetHistProQaQb(TProfile* const aHistProQaQb)
90 {this->fHistProQaQb = aHistProQaQb;}
91 void SetHistSumOfLinearWeights(TH1D* const aHistSumOfLinearWeights)
92 {this->fHistSumOfLinearWeights = aHistSumOfLinearWeights;}
93 void SetHistSumOfQuadraticWeights(TH1D* const aHistSumOfQuadraticWeights)
94 {this->fHistSumOfQuadraticWeights = aHistSumOfQuadraticWeights;}
95 void SetHistProUQQaQbPtRP(TProfile* const aHistProUQQaQbPtRP)
96 {this->fHistProUQQaQbPtRP = aHistProUQQaQbPtRP;}
97 void SetHistProUQQaQbEtaRP(TProfile* const aHistProUQQaQbEtaRP)
98 {this->fHistProUQQaQbEtaRP = aHistProUQQaQbEtaRP;}
99 void SetHistProUQQaQbPtPOI(TProfile* const aHistProUQQaQbPtPOI)
100 {this->fHistProUQQaQbPtPOI = aHistProUQQaQbPtPOI;}
101 void SetHistProUQQaQbEtaPOI(TProfile* const aHistProUQQaQbEtaPOI)
102 {this->fHistProUQQaQbEtaPOI = aHistProUQQaQbEtaPOI;}
103 void SetHistSumOfWeightsPtRP(TH1D* const aHistSumOfWeightsPtRP, Int_t const i)
104 {this->fHistSumOfWeightsPtRP[i] = aHistSumOfWeightsPtRP;}
105 void SetHistSumOfWeightsEtaRP(TH1D* const aHistSumOfWeightsEtaRP, Int_t const i)
106 {this->fHistSumOfWeightsEtaRP[i] = aHistSumOfWeightsEtaRP;}
107 void SetHistSumOfWeightsPtPOI(TH1D* const aHistSumOfWeightsPtPOI, Int_t const i)
108 {this->fHistSumOfWeightsPtPOI[i] = aHistSumOfWeightsPtPOI;}
109 void SetHistSumOfWeightsEtaPOI(TH1D* const aHistSumOfWeightsEtaPOI, Int_t const i)
110 {this->fHistSumOfWeightsEtaPOI[i] = aHistSumOfWeightsEtaPOI;}
111 void SetCommonHists(AliFlowCommonHist* const someCommonHists)
112 {this->fCommonHists = someCommonHists; }
113 void SetCommonHistsRes(AliFlowCommonHistResults* const someCommonHistsRes)
114 {this->fCommonHistsRes = someCommonHistsRes; }
115
116
117 private:
118 AliFlowAnalysisWithScalarProduct(const AliFlowAnalysisWithScalarProduct& anAnalysis); //copy constructor
119 AliFlowAnalysisWithScalarProduct& operator=(const AliFlowAnalysisWithScalarProduct& anAnalysis); //assignment operator
120
121 Int_t fEventNumber; // event counter
122 Bool_t fDebug ; // flag for analysis: more print statements
123
124 TList* fWeightsList; // list holding input histograms with phi weights
125 Bool_t fUsePhiWeights; // use phi weights
126 TH1F* fPhiWeights; // histogram holding phi weights
127
128 TList* fHistList; //list to hold all output histograms
129 TProfile* fHistProUQetaRP; //uQ(eta) for RP
130 TProfile* fHistProUQetaPOI; //uQ(eta) for POI
131 TProfile* fHistProUQPtRP; //uQ(pt) for RP
132 TProfile* fHistProUQPtPOI; //uQ(pt) for POI
133 TProfile* fHistProQaQb; //average of QaQb (for event plane resolution)
134 TH1D* fHistSumOfLinearWeights; //holds sum of Ma*Mb
135 TH1D* fHistSumOfQuadraticWeights; //holds sum of (Ma*Mb)^2
136
137 TProfile* fHistProUQQaQbPtRP; //holds weighted average of <QuQaQb>
138 TProfile* fHistProUQQaQbEtaRP; //holds weighted average of <QuQaQb>
139 TProfile* fHistProUQQaQbPtPOI; //holds weighted average of <QuQaQb>
140 TProfile* fHistProUQQaQbEtaPOI; //holds weighted average of <QuQaQb>
141 TH1D* fHistSumOfWeightsPtRP[3]; //holds sums of 0: Mq-1, 1: (Mq-1)^2, 2: (Mq-1)*Ma*Mb for each bin
142 TH1D* fHistSumOfWeightsEtaRP[3]; //holds sums of 0: Mq-1, 1: (Mq-1)^2, 2: (Mq-1)*Ma*Mb for each bin
143 TH1D* fHistSumOfWeightsPtPOI[3]; //holds sums of 0: Mq-1, 1: (Mq-1)^2, 2: (Mq-1)*Ma*Mb for each bin
144 TH1D* fHistSumOfWeightsEtaPOI[3]; //holds sums of 0: Mq-1, 1: (Mq-1)^2, 2: (Mq-1)*Ma*Mb for each bin
145
146 AliFlowCommonHist* fCommonHists; //control histograms
147 AliFlowCommonHistResults* fCommonHistsRes; //results histograms
148
149 ClassDef(AliFlowAnalysisWithScalarProduct,0) // macro for rootcint
150 };
151
152
153#endif