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