]>
Commit | Line | Data |
---|---|---|
f1d945a1 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
f1d945a1 | 16 | #include "Riostream.h" //needed as include |
17 | #include "AliFlowCommonConstants.h" //needed as include | |
18 | #include "AliFlowCommonHist.h" | |
19 | #include "AliFlowEventSimple.h" | |
20 | #include "AliFlowTrackSimple.h" | |
21 | ||
22 | #include "TString.h" | |
23 | #include "TProfile.h" | |
24 | #include "TMath.h" //needed as include | |
e35ddff0 | 25 | #include "TList.h" |
44e060e0 | 26 | #include "TH2F.h" |
f1d945a1 | 27 | #include "AliFlowVector.h" |
04f6283b | 28 | #include "TBrowser.h" |
f1d945a1 | 29 | |
30 | class TH1F; | |
31 | class TH1D; | |
32 | ||
33 | // AliFlowCommonHist: | |
34 | // | |
35 | // Description: Class to organise common histograms for Flow Analysis | |
a93de0f0 | 36 | // |
20c03187 | 37 | // authors: N. van der Kolk (kolk@nikhef.nl), A. Bilandzic (anteb@nikhef.nl), RS |
f1d945a1 | 38 | |
39 | ||
40 | ClassImp(AliFlowCommonHist) | |
41 | ||
42 | //----------------------------------------------------------------------- | |
43 | ||
44e060e0 | 44 | AliFlowCommonHist::AliFlowCommonHist(): |
45 | TNamed(), | |
b7cb54d5 | 46 | fHistMultRP(NULL), |
47 | fHistMultPOI(NULL), | |
1073c74a | 48 | fHistMultPOIvsRP(NULL), |
b7cb54d5 | 49 | fHistPtRP(NULL), |
50 | fHistPtPOI(NULL), | |
44e060e0 | 51 | fHistPtSub0(NULL), |
52 | fHistPtSub1(NULL), | |
b7cb54d5 | 53 | fHistPhiRP(NULL), |
54 | fHistPhiPOI(NULL), | |
44e060e0 | 55 | fHistPhiSub0(NULL), |
56 | fHistPhiSub1(NULL), | |
b7cb54d5 | 57 | fHistEtaRP(NULL), |
58 | fHistEtaPOI(NULL), | |
44e060e0 | 59 | fHistEtaSub0(NULL), |
60 | fHistEtaSub1(NULL), | |
61 | fHistPhiEtaRP(NULL), | |
62 | fHistPhiEtaPOI(NULL), | |
7573885c | 63 | fHistProMeanPtperBin(NULL), |
64 | fHistQ(NULL), | |
a93de0f0 | 65 | fHistAngleQ(NULL), |
66 | fHistAngleQSub0(NULL), | |
67 | fHistAngleQSub1(NULL), | |
2aa4ebcd | 68 | fHarmonic(NULL), |
c109b8c7 | 69 | fRefMultVsNoOfRPs(NULL), |
7573885c | 70 | fHistList(NULL) |
71 | { | |
72 | ||
73 | //default constructor | |
74 | ||
75 | } | |
76 | ||
77 | AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): | |
78 | TNamed(), | |
b7cb54d5 | 79 | fHistMultRP(new TH1F(*a.fHistMultRP)), |
80 | fHistMultPOI(new TH1F(*a.fHistMultPOI)), | |
1073c74a | 81 | fHistMultPOIvsRP(new TH2F(*a.fHistMultPOIvsRP)), |
b7cb54d5 | 82 | fHistPtRP(new TH1F(*a.fHistPtRP)), |
83 | fHistPtPOI(new TH1F(*a.fHistPtPOI)), | |
44e060e0 | 84 | fHistPtSub0(new TH1F(*a.fHistPtSub0)), |
85 | fHistPtSub1(new TH1F(*a.fHistPtSub1)), | |
b7cb54d5 | 86 | fHistPhiRP(new TH1F(*a.fHistPhiRP)), |
87 | fHistPhiPOI(new TH1F(*a.fHistPhiPOI)), | |
44e060e0 | 88 | fHistPhiSub0(new TH1F(*a.fHistPhiSub0)), |
89 | fHistPhiSub1(new TH1F(*a.fHistPhiSub1)), | |
b7cb54d5 | 90 | fHistEtaRP(new TH1F(*a.fHistEtaRP)), |
91 | fHistEtaPOI(new TH1F(*a.fHistEtaPOI)), | |
44e060e0 | 92 | fHistEtaSub0(new TH1F(*a.fHistEtaSub0)), |
93 | fHistEtaSub1(new TH1F(*a.fHistEtaSub1)), | |
94 | fHistPhiEtaRP(new TH2F(*a.fHistPhiEtaRP)), | |
95 | fHistPhiEtaPOI(new TH2F(*a.fHistPhiEtaPOI)), | |
7573885c | 96 | fHistProMeanPtperBin(new TProfile(*a.fHistProMeanPtperBin)), |
97 | fHistQ(new TH1F(*a.fHistQ)), | |
a93de0f0 | 98 | fHistAngleQ(new TH1F(*a.fHistAngleQ)), |
99 | fHistAngleQSub0(new TH1F(*a.fHistAngleQSub0)), | |
100 | fHistAngleQSub1(new TH1F(*a.fHistAngleQSub1)), | |
2aa4ebcd | 101 | fHarmonic(new TProfile(*a.fHarmonic)), |
c109b8c7 | 102 | fRefMultVsNoOfRPs(new TProfile(*a.fRefMultVsNoOfRPs)), |
7573885c | 103 | fHistList(NULL) |
104 | { | |
105 | // copy constructor | |
e35ddff0 | 106 | |
7573885c | 107 | fHistList = new TList(); |
b7cb54d5 | 108 | fHistList-> Add(fHistMultRP); |
1073c74a | 109 | fHistList-> Add(fHistMultPOI); |
110 | fHistList-> Add(fHistMultPOIvsRP); | |
b7cb54d5 | 111 | fHistList-> Add(fHistPtRP); |
44e060e0 | 112 | fHistList-> Add(fHistPtPOI); |
113 | fHistList-> Add(fHistPtSub0); | |
114 | fHistList-> Add(fHistPtSub1); | |
b7cb54d5 | 115 | fHistList-> Add(fHistPhiRP); |
44e060e0 | 116 | fHistList-> Add(fHistPhiPOI); |
117 | fHistList-> Add(fHistPhiSub0); | |
118 | fHistList-> Add(fHistPhiSub1); | |
b7cb54d5 | 119 | fHistList-> Add(fHistEtaRP); |
44e060e0 | 120 | fHistList-> Add(fHistEtaPOI); |
121 | fHistList-> Add(fHistEtaSub0); | |
122 | fHistList-> Add(fHistEtaSub1); | |
123 | fHistList-> Add(fHistPhiEtaRP); | |
124 | fHistList-> Add(fHistPhiEtaPOI); | |
7573885c | 125 | fHistList-> Add(fHistProMeanPtperBin); |
2aa4ebcd | 126 | fHistList-> Add(fHarmonic); |
c109b8c7 | 127 | fHistList-> Add(fRefMultVsNoOfRPs); |
a93de0f0 | 128 | fHistList-> Add(fHistQ); |
129 | fHistList-> Add(fHistAngleQ); | |
130 | fHistList-> Add(fHistAngleQSub0); | |
131 | fHistList-> Add(fHistAngleQSub1); | |
7573885c | 132 | // TListIter next = TListIter(a.fHistList); |
133 | ||
134 | } | |
135 | ||
e35ddff0 | 136 | |
137 | //----------------------------------------------------------------------- | |
138 | ||
44e060e0 | 139 | AliFlowCommonHist::AliFlowCommonHist(const char *anInput,const char *title): |
140 | TNamed(anInput,title), | |
44e060e0 | 141 | fHistMultRP(NULL), |
142 | fHistMultPOI(NULL), | |
1073c74a | 143 | fHistMultPOIvsRP(NULL), |
44e060e0 | 144 | fHistPtRP(NULL), |
145 | fHistPtPOI(NULL), | |
146 | fHistPtSub0(NULL), | |
147 | fHistPtSub1(NULL), | |
148 | fHistPhiRP(NULL), | |
149 | fHistPhiPOI(NULL), | |
150 | fHistPhiSub0(NULL), | |
151 | fHistPhiSub1(NULL), | |
152 | fHistEtaRP(NULL), | |
153 | fHistEtaPOI(NULL), | |
154 | fHistEtaSub0(NULL), | |
155 | fHistEtaSub1(NULL), | |
156 | fHistPhiEtaRP(NULL), | |
157 | fHistPhiEtaPOI(NULL), | |
158 | fHistProMeanPtperBin(NULL), | |
159 | fHistQ(NULL), | |
a93de0f0 | 160 | fHistAngleQ(NULL), |
161 | fHistAngleQSub0(NULL), | |
162 | fHistAngleQSub1(NULL), | |
44e060e0 | 163 | fHarmonic(NULL), |
c109b8c7 | 164 | fRefMultVsNoOfRPs(NULL), |
44e060e0 | 165 | fHistList(NULL) |
166 | { | |
e35ddff0 | 167 | |
f1d945a1 | 168 | //constructor creating histograms |
bee2efdc | 169 | Int_t iNbinsMult = AliFlowCommonConstants::GetMaster()->GetNbinsMult(); |
170 | Int_t iNbinsPt = AliFlowCommonConstants::GetMaster()->GetNbinsPt(); | |
171 | Int_t iNbinsPhi = AliFlowCommonConstants::GetMaster()->GetNbinsPhi(); | |
172 | Int_t iNbinsEta = AliFlowCommonConstants::GetMaster()->GetNbinsEta(); | |
173 | Int_t iNbinsQ = AliFlowCommonConstants::GetMaster()->GetNbinsQ(); | |
e35ddff0 | 174 | TString sName; |
175 | ||
bee2efdc | 176 | Double_t dMultMin = AliFlowCommonConstants::GetMaster()->GetMultMin(); |
177 | Double_t dMultMax = AliFlowCommonConstants::GetMaster()->GetMultMax(); | |
178 | Double_t dPtMin = AliFlowCommonConstants::GetMaster()->GetPtMin(); | |
179 | Double_t dPtMax = AliFlowCommonConstants::GetMaster()->GetPtMax(); | |
180 | Double_t dPhiMin = AliFlowCommonConstants::GetMaster()->GetPhiMin(); | |
181 | Double_t dPhiMax = AliFlowCommonConstants::GetMaster()->GetPhiMax(); | |
182 | Double_t dEtaMin = AliFlowCommonConstants::GetMaster()->GetEtaMin(); | |
183 | Double_t dEtaMax = AliFlowCommonConstants::GetMaster()->GetEtaMax(); | |
184 | Double_t dQMin = AliFlowCommonConstants::GetMaster()->GetQMin(); | |
185 | Double_t dQMax = AliFlowCommonConstants::GetMaster()->GetQMax(); | |
f1d945a1 | 186 | |
187 | cout<<"The settings for the common histograms are as follows:"<<endl; | |
e35ddff0 | 188 | cout<<"Multiplicity: "<<iNbinsMult<<" bins between "<<dMultMin<<" and "<<dMultMax<<endl; |
189 | cout<<"Pt: "<<iNbinsPt<<" bins between "<<dPtMin<<" and "<<dPtMax<<endl; | |
190 | cout<<"Phi: "<<iNbinsPhi<<" bins between "<<dPhiMin<<" and "<<dPhiMax<<endl; | |
191 | cout<<"Eta: "<<iNbinsEta<<" bins between "<<dEtaMin<<" and "<<dEtaMax<<endl; | |
192 | cout<<"Q: "<<iNbinsQ<<" bins between "<<dQMin<<" and "<<dQMax<<endl; | |
f1d945a1 | 193 | |
194 | //Multiplicity | |
b7cb54d5 | 195 | sName = "Control_Flow_MultRP_"; |
e35ddff0 | 196 | sName +=anInput; |
b7cb54d5 | 197 | fHistMultRP = new TH1F(sName.Data(), sName.Data(),iNbinsMult, dMultMin, dMultMax); |
198 | fHistMultRP ->SetXTitle("Multiplicity for RP selection"); | |
199 | fHistMultRP ->SetYTitle("Counts"); | |
f1d945a1 | 200 | |
b7cb54d5 | 201 | sName = "Control_Flow_MultPOI_"; |
e35ddff0 | 202 | sName +=anInput; |
b7cb54d5 | 203 | fHistMultPOI = new TH1F(sName.Data(), sName.Data(),iNbinsMult, dMultMin, dMultMax); |
204 | fHistMultPOI ->SetXTitle("Multiplicity for POI selection"); | |
205 | fHistMultPOI ->SetYTitle("Counts"); | |
f1d945a1 | 206 | |
1073c74a | 207 | sName = "Control_Flow_MultPOIvsRP_"; |
208 | sName +=anInput; | |
22b860f6 | 209 | fHistMultPOIvsRP = new TH2F(sName.Data(), sName.Data(),100, dMultMin, dMultMax,100, dMultMin, dMultMax); |
1073c74a | 210 | fHistMultPOIvsRP->SetXTitle("Multiplicity for RP selection"); |
211 | fHistMultPOIvsRP->SetYTitle("Multiplicity for POI selection"); | |
212 | ||
f1d945a1 | 213 | //Pt |
b7cb54d5 | 214 | sName = "Control_Flow_PtRP_"; |
e35ddff0 | 215 | sName +=anInput; |
b7cb54d5 | 216 | fHistPtRP = new TH1F(sName.Data(), sName.Data(),iNbinsPt, dPtMin, dPtMax); |
217 | fHistPtRP ->SetXTitle("P_{t} (GeV/c) for RP selection"); | |
218 | fHistPtRP ->SetYTitle("Counts"); | |
f1d945a1 | 219 | |
b7cb54d5 | 220 | sName = "Control_Flow_PtPOI_"; |
e35ddff0 | 221 | sName +=anInput; |
b7cb54d5 | 222 | fHistPtPOI = new TH1F(sName.Data(), sName.Data(),iNbinsPt, dPtMin, dPtMax); |
f1d945a1 | 223 | //binning has to be the same as for fHistProVPt! use to get Nprime! |
b7cb54d5 | 224 | fHistPtPOI ->SetXTitle("P_{t} (GeV/c) for POI selection"); |
225 | fHistPtPOI ->SetYTitle("Counts"); | |
f1d945a1 | 226 | |
44e060e0 | 227 | sName = "Control_Flow_PtSub0_"; |
228 | sName +=anInput; | |
229 | fHistPtSub0 = new TH1F(sName.Data(), sName.Data(),iNbinsPt, dPtMin, dPtMax); | |
230 | fHistPtSub0 ->SetXTitle("P_{t} (GeV/c) for Subevent 0 selection"); | |
231 | fHistPtSub0 ->SetYTitle("Counts"); | |
232 | ||
233 | sName = "Control_Flow_PtSub1_"; | |
234 | sName +=anInput; | |
235 | fHistPtSub1 = new TH1F(sName.Data(), sName.Data(),iNbinsPt, dPtMin, dPtMax); | |
236 | fHistPtSub1 ->SetXTitle("P_{t} (GeV/c) for Subevent 1 selection"); | |
237 | fHistPtSub1 ->SetYTitle("Counts"); | |
238 | ||
f1d945a1 | 239 | //Phi |
b7cb54d5 | 240 | sName = "Control_Flow_PhiRP_"; |
e35ddff0 | 241 | sName +=anInput; |
b7cb54d5 | 242 | fHistPhiRP = new TH1F(sName.Data(), sName.Data(),iNbinsPhi, dPhiMin, dPhiMax); |
243 | fHistPhiRP ->SetXTitle("#phi for RP selection"); | |
244 | fHistPhiRP ->SetYTitle("Counts"); | |
f1d945a1 | 245 | |
b7cb54d5 | 246 | sName = "Control_Flow_PhiPOI_"; |
e35ddff0 | 247 | sName +=anInput; |
b7cb54d5 | 248 | fHistPhiPOI = new TH1F(sName.Data(), sName.Data(),iNbinsPhi, dPhiMin, dPhiMax); |
249 | fHistPhiPOI ->SetXTitle("#phi for POI selection"); | |
250 | fHistPhiPOI ->SetYTitle("Counts"); | |
f1d945a1 | 251 | |
44e060e0 | 252 | sName = "Control_Flow_PhiSub0_"; |
253 | sName +=anInput; | |
254 | fHistPhiSub0 = new TH1F(sName.Data(), sName.Data(),iNbinsPhi, dPhiMin, dPhiMax); | |
255 | fHistPhiSub0 ->SetXTitle("#phi for Subevent 0 selection"); | |
256 | fHistPhiSub0 ->SetYTitle("Counts"); | |
257 | ||
258 | sName = "Control_Flow_PhiSub1_"; | |
259 | sName +=anInput; | |
260 | fHistPhiSub1 = new TH1F(sName.Data(), sName.Data(),iNbinsPhi, dPhiMin, dPhiMax); | |
261 | fHistPhiSub1 ->SetXTitle("#phi for Subevent 1 selection"); | |
262 | fHistPhiSub1 ->SetYTitle("Counts"); | |
263 | ||
f1d945a1 | 264 | //Eta |
b7cb54d5 | 265 | sName = "Control_Flow_EtaRP_"; |
e35ddff0 | 266 | sName +=anInput; |
b7cb54d5 | 267 | fHistEtaRP = new TH1F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax); |
268 | fHistEtaRP ->SetXTitle("#eta for RP selection"); | |
269 | fHistEtaRP ->SetYTitle("Counts"); | |
f1d945a1 | 270 | |
b7cb54d5 | 271 | sName = "Control_Flow_EtaPOI_"; |
e35ddff0 | 272 | sName +=anInput; |
b7cb54d5 | 273 | fHistEtaPOI = new TH1F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax); |
274 | fHistEtaPOI ->SetXTitle("#eta for POI selection"); | |
275 | fHistEtaPOI ->SetYTitle("Counts"); | |
f1d945a1 | 276 | |
44e060e0 | 277 | sName = "Control_Flow_EtaSub0_"; |
278 | sName +=anInput; | |
279 | fHistEtaSub0 = new TH1F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax); | |
280 | fHistEtaSub0 ->SetXTitle("#eta for Subevent 0 selection"); | |
281 | fHistEtaSub0 ->SetYTitle("Counts"); | |
282 | ||
283 | sName = "Control_Flow_EtaSub1_"; | |
284 | sName +=anInput; | |
285 | fHistEtaSub1 = new TH1F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax); | |
286 | fHistEtaSub1 ->SetXTitle("#eta for Subevent 1 selection"); | |
287 | fHistEtaSub1 ->SetYTitle("Counts"); | |
288 | ||
289 | //Phi vs Eta | |
290 | sName = "Control_Flow_PhiEtaRP_"; | |
291 | sName +=anInput; | |
292 | fHistPhiEtaRP = new TH2F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax, iNbinsPhi, dPhiMin, dPhiMax); | |
293 | fHistPhiEtaRP ->SetXTitle("#eta"); | |
294 | fHistPhiEtaRP ->SetYTitle("#phi"); | |
295 | ||
296 | sName = "Control_Flow_PhiEtaPOI_"; | |
297 | sName +=anInput; | |
298 | fHistPhiEtaPOI = new TH2F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax, iNbinsPhi, dPhiMin, dPhiMax); | |
299 | fHistPhiEtaPOI ->SetXTitle("#eta"); | |
300 | fHistPhiEtaPOI ->SetYTitle("#phi"); | |
301 | ||
f1d945a1 | 302 | //Mean Pt per pt bin |
e35ddff0 | 303 | sName = "Control_FlowPro_MeanPtperBin_"; |
304 | sName +=anInput; | |
305 | fHistProMeanPtperBin = new TProfile(sName.Data(), sName.Data(),iNbinsPt,dPtMin,dPtMax); | |
7ebf0358 | 306 | fHistProMeanPtperBin ->SetXTitle("P_{t} (GeV/c) "); |
307 | fHistProMeanPtperBin ->SetYTitle("<P_{t}> (GeV/c) "); | |
f1d945a1 | 308 | |
309 | //Q vector | |
e35ddff0 | 310 | sName = "Control_Flow_Q_"; |
311 | sName +=anInput; | |
312 | fHistQ = new TH1F(sName.Data(), sName.Data(),iNbinsQ, dQMin, dQMax); | |
7ebf0358 | 313 | fHistQ ->SetXTitle("Q_{vector}/Mult"); |
f1d945a1 | 314 | fHistQ ->SetYTitle("Counts"); |
2aa4ebcd | 315 | |
a93de0f0 | 316 | //Angle of Q vector |
317 | sName = "Control_Flow_AngleQ_"; | |
318 | sName +=anInput; | |
319 | fHistAngleQ = new TH1F(sName.Data(), sName.Data(),72, 0., TMath::Pi()); | |
320 | fHistAngleQ ->SetXTitle("Angle of Q_{vector}"); | |
321 | fHistAngleQ ->SetYTitle("Counts"); | |
322 | ||
323 | sName = "Control_Flow_AngleQSub0_"; | |
324 | sName +=anInput; | |
325 | fHistAngleQSub0 = new TH1F(sName.Data(), sName.Data(),72, 0., TMath::Pi()); | |
326 | fHistAngleQSub0 ->SetXTitle("Angle of Q_{vector} for Subevent 0"); | |
327 | fHistAngleQSub0 ->SetYTitle("Counts"); | |
328 | ||
329 | sName = "Control_Flow_AngleQSub1_"; | |
330 | sName +=anInput; | |
331 | fHistAngleQSub1 = new TH1F(sName.Data(), sName.Data(),72, 0., TMath::Pi()); | |
332 | fHistAngleQSub1 ->SetXTitle("Angle of Q_{vector} for Subevent 1"); | |
333 | fHistAngleQSub1 ->SetYTitle("Counts"); | |
334 | ||
2aa4ebcd | 335 | //harmonic |
336 | sName = "Control_Flow_Harmonic_"; | |
337 | sName +=anInput; | |
338 | fHarmonic = new TProfile(sName.Data(),sName.Data(),1,0,1); | |
339 | fHarmonic ->SetYTitle("harmonic"); | |
c109b8c7 | 340 | |
341 | //<reference multiplicity> versus # of RPs | |
342 | sName = "Reference_Multiplicity_Vs_Number_Of_RPs_"; | |
343 | sName +=anInput; | |
344 | fRefMultVsNoOfRPs = new TProfile(sName.Data(),sName.Data(),iNbinsMult, dMultMin, dMultMax); | |
345 | fRefMultVsNoOfRPs->SetYTitle("<reference multiplicity>"); | |
346 | fRefMultVsNoOfRPs->SetXTitle("# of RPs"); | |
e35ddff0 | 347 | |
7573885c | 348 | //list of histograms if added here also add in copy constructor |
e35ddff0 | 349 | fHistList = new TList(); |
b7cb54d5 | 350 | fHistList-> Add(fHistMultRP); |
1073c74a | 351 | fHistList-> Add(fHistMultPOI); |
352 | fHistList-> Add(fHistMultPOIvsRP); | |
b7cb54d5 | 353 | fHistList-> Add(fHistPtRP); |
44e060e0 | 354 | fHistList-> Add(fHistPtPOI); |
355 | fHistList-> Add(fHistPtSub0); | |
356 | fHistList-> Add(fHistPtSub1); | |
b7cb54d5 | 357 | fHistList-> Add(fHistPhiRP); |
44e060e0 | 358 | fHistList-> Add(fHistPhiPOI); |
359 | fHistList-> Add(fHistPhiSub0); | |
360 | fHistList-> Add(fHistPhiSub1); | |
b7cb54d5 | 361 | fHistList-> Add(fHistEtaRP); |
44e060e0 | 362 | fHistList-> Add(fHistEtaPOI); |
363 | fHistList-> Add(fHistEtaSub0); | |
364 | fHistList-> Add(fHistEtaSub1); | |
365 | fHistList-> Add(fHistPhiEtaRP); | |
366 | fHistList-> Add(fHistPhiEtaPOI); | |
2aa4ebcd | 367 | fHistList-> Add(fHistProMeanPtperBin); |
c109b8c7 | 368 | fHistList-> Add(fHarmonic); |
369 | fHistList-> Add(fRefMultVsNoOfRPs); | |
e35ddff0 | 370 | fHistList-> Add(fHistQ); |
a93de0f0 | 371 | fHistList-> Add(fHistAngleQ); |
372 | fHistList-> Add(fHistAngleQSub0); | |
373 | fHistList-> Add(fHistAngleQSub1); | |
e35ddff0 | 374 | |
f1d945a1 | 375 | } |
376 | ||
377 | ||
378 | //----------------------------------------------------------------------- | |
379 | ||
380 | AliFlowCommonHist::~AliFlowCommonHist() | |
381 | { | |
382 | //deletes histograms | |
b7cb54d5 | 383 | delete fHistMultRP; |
1073c74a | 384 | delete fHistMultPOI; |
385 | delete fHistMultPOIvsRP; | |
b7cb54d5 | 386 | delete fHistPtRP; |
44e060e0 | 387 | delete fHistPtPOI; |
388 | delete fHistPtSub0; | |
389 | delete fHistPtSub1; | |
b7cb54d5 | 390 | delete fHistPhiRP; |
44e060e0 | 391 | delete fHistPhiPOI; |
392 | delete fHistPhiSub0; | |
393 | delete fHistPhiSub1; | |
b7cb54d5 | 394 | delete fHistEtaRP; |
395 | delete fHistEtaPOI; | |
44e060e0 | 396 | delete fHistEtaSub0; |
397 | delete fHistEtaSub1; | |
398 | delete fHistPhiEtaRP; | |
399 | delete fHistPhiEtaPOI; | |
f1d945a1 | 400 | delete fHistProMeanPtperBin; |
401 | delete fHistQ; | |
a93de0f0 | 402 | delete fHistAngleQ; |
403 | delete fHistAngleQSub0; | |
404 | delete fHistAngleQSub1; | |
2aa4ebcd | 405 | delete fHarmonic; |
c109b8c7 | 406 | delete fRefMultVsNoOfRPs; |
e35ddff0 | 407 | delete fHistList; |
f1d945a1 | 408 | } |
409 | ||
410 | ||
411 | //----------------------------------------------------------------------- | |
412 | ||
e35ddff0 | 413 | Bool_t AliFlowCommonHist::FillControlHistograms(AliFlowEventSimple* anEvent) |
f1d945a1 | 414 | { |
415 | //Fills the control histograms | |
e35ddff0 | 416 | if (!anEvent){ |
f1d945a1 | 417 | cout<<"##### FillControlHistograms: FlowEvent pointer null"<<endl; |
418 | return kFALSE; | |
419 | } | |
420 | ||
04c6b875 | 421 | Double_t dPt, dPhi, dEta, dWeight; |
f1d945a1 | 422 | |
f1d945a1 | 423 | //fill the histograms |
e35ddff0 | 424 | AliFlowVector vQ = anEvent->GetQ(); |
f1d945a1 | 425 | //weight by the Multiplicity |
9d062fe3 | 426 | Double_t dQX = 0.; |
427 | Double_t dQY = 0.; | |
e60cd248 | 428 | if (vQ.GetMult()!=0) { |
9d062fe3 | 429 | dQX = vQ.X()/vQ.GetMult(); |
430 | dQY = vQ.Y()/vQ.GetMult(); | |
431 | } | |
e35ddff0 | 432 | vQ.Set(dQX,dQY); |
433 | fHistQ->Fill(vQ.Mod()); | |
a93de0f0 | 434 | fHistAngleQ->Fill(vQ.Phi()/2); |
435 | ||
436 | AliFlowVector* vQSub = new AliFlowVector[2]; | |
437 | anEvent->Get2Qsub(vQSub); | |
438 | AliFlowVector vQa = vQSub[0]; | |
439 | AliFlowVector vQb = vQSub[1]; | |
440 | fHistAngleQSub0->Fill(vQa.Phi()/2); | |
441 | fHistAngleQSub1->Fill(vQb.Phi()/2); | |
f1d945a1 | 442 | |
04c6b875 | 443 | Double_t dMultRP = 0.; |
444 | Double_t dMultPOI = 0.; | |
7ffdc193 | 445 | |
a93de0f0 | 446 | Int_t iNumberOfTracks = anEvent->NumberOfTracks(); |
e35ddff0 | 447 | AliFlowTrackSimple* pTrack = NULL; |
448 | ||
449 | for (Int_t i=0;i<iNumberOfTracks;i++) { | |
450 | pTrack = anEvent->GetTrack(i); | |
451 | if (pTrack ) { | |
04c6b875 | 452 | dWeight = pTrack->Weight(); |
b7cb54d5 | 453 | if (pTrack->InRPSelection()){ |
44e060e0 | 454 | //pt |
e35ddff0 | 455 | dPt = pTrack->Pt(); |
04c6b875 | 456 | fHistPtRP->Fill(dPt,dWeight); |
44e060e0 | 457 | //phi |
e35ddff0 | 458 | dPhi = pTrack->Phi(); |
459 | if (dPhi<0.) dPhi+=2*TMath::Pi(); | |
04c6b875 | 460 | fHistPhiRP->Fill(dPhi,dWeight); |
44e060e0 | 461 | //eta |
e35ddff0 | 462 | dEta = pTrack->Eta(); |
04c6b875 | 463 | fHistEtaRP->Fill(dEta,dWeight); |
44e060e0 | 464 | //eta vs phi |
04c6b875 | 465 | fHistPhiEtaRP->Fill(dEta,dPhi,dWeight); |
44e060e0 | 466 | //count |
04c6b875 | 467 | dMultRP += dWeight; |
44e060e0 | 468 | if (pTrack->InSubevent(0)){ |
469 | //Fill distributions for the subevent | |
04c6b875 | 470 | fHistPtSub0 -> Fill(dPt,dWeight); |
471 | fHistPhiSub0 -> Fill(dPhi,dWeight); | |
472 | fHistEtaSub0 -> Fill(dEta,dWeight); | |
44e060e0 | 473 | } |
474 | else if (pTrack->InSubevent(1)){ | |
475 | //Fill distributions for the subevent | |
04c6b875 | 476 | fHistPtSub1 -> Fill(dPt,dWeight); |
477 | fHistPhiSub1 -> Fill(dPhi,dWeight); | |
478 | fHistEtaSub1 -> Fill(dEta,dWeight); | |
44e060e0 | 479 | } |
f1d945a1 | 480 | } |
b7cb54d5 | 481 | if (pTrack->InPOISelection()){ |
44e060e0 | 482 | //pt |
e35ddff0 | 483 | dPt = pTrack->Pt(); |
04c6b875 | 484 | fHistPtPOI->Fill(dPt,dWeight); |
44e060e0 | 485 | //phi |
e35ddff0 | 486 | dPhi = pTrack->Phi(); |
487 | if (dPhi<0.) dPhi+=2*TMath::Pi(); | |
04c6b875 | 488 | fHistPhiPOI->Fill(dPhi,dWeight); |
44e060e0 | 489 | //eta |
e35ddff0 | 490 | dEta = pTrack->Eta(); |
04c6b875 | 491 | fHistEtaPOI->Fill(dEta,dWeight); |
44e060e0 | 492 | //eta vs phi |
04c6b875 | 493 | fHistPhiEtaPOI->Fill(dEta,dPhi,dWeight); |
44e060e0 | 494 | //mean pt |
04c6b875 | 495 | fHistProMeanPtperBin->Fill(dPt,dPt,dWeight); |
44e060e0 | 496 | //count |
04c6b875 | 497 | dMultPOI += dWeight; |
f1d945a1 | 498 | } |
499 | } //track | |
500 | } //loop over tracks | |
501 | ||
04c6b875 | 502 | fHistMultRP->Fill(dMultRP); |
503 | fHistMultPOI->Fill(dMultPOI); | |
1073c74a | 504 | fHistMultPOIvsRP->Fill(dMultRP,dMultPOI); |
c109b8c7 | 505 | |
506 | //<reference multiplicity> versus # of RPs: | |
507 | fRefMultVsNoOfRPs->Fill(dMultRP+0.5,anEvent->GetReferenceMultiplicity(),1.); | |
f1d945a1 | 508 | |
509 | return kTRUE; | |
510 | } | |
511 | ||
512 | //----------------------------------------------------------------------- | |
513 | ||
e8c3ff94 | 514 | Double_t AliFlowCommonHist::GetEntriesInPtBinRP(Int_t aBin) |
515 | { | |
b7cb54d5 | 516 | //get entries in bin aBin from fHistPtRP |
517 | Double_t dEntries = fHistPtRP->GetBinContent(aBin); | |
e8c3ff94 | 518 | |
519 | return dEntries; | |
520 | ||
521 | } | |
522 | ||
523 | //----------------------------------------------------------------------- | |
524 | ||
525 | Double_t AliFlowCommonHist::GetEntriesInPtBinPOI(Int_t aBin) | |
f1d945a1 | 526 | { |
b7cb54d5 | 527 | //get entries in bin aBin from fHistPtPOI |
528 | Double_t dEntries = fHistPtPOI->GetBinContent(aBin); | |
f1d945a1 | 529 | |
e35ddff0 | 530 | return dEntries; |
f1d945a1 | 531 | |
532 | } | |
533 | ||
534 | //----------------------------------------------------------------------- | |
535 | ||
e8c3ff94 | 536 | Double_t AliFlowCommonHist::GetEntriesInEtaBinRP(Int_t aBin) |
537 | { | |
b7cb54d5 | 538 | //get entries in bin aBin from fHistPtRP |
539 | Double_t dEntries = fHistEtaRP->GetBinContent(aBin); | |
e8c3ff94 | 540 | |
541 | return dEntries; | |
542 | ||
543 | } | |
544 | ||
545 | //----------------------------------------------------------------------- | |
546 | ||
547 | Double_t AliFlowCommonHist::GetEntriesInEtaBinPOI(Int_t aBin) | |
548 | { | |
b7cb54d5 | 549 | //get entries in bin aBin from fHistPtPOI |
550 | Double_t dEntries = fHistEtaPOI->GetBinContent(aBin); | |
e8c3ff94 | 551 | |
552 | return dEntries; | |
553 | ||
554 | } | |
555 | ||
556 | //----------------------------------------------------------------------- | |
557 | ||
e35ddff0 | 558 | Double_t AliFlowCommonHist::GetMeanPt(Int_t aBin) |
f1d945a1 | 559 | { |
e35ddff0 | 560 | //Get entry from bin aBin from fHistProMeanPtperBin |
561 | Double_t dMeanPt = fHistProMeanPtperBin->GetBinContent(aBin); | |
f1d945a1 | 562 | |
e35ddff0 | 563 | return dMeanPt; |
f1d945a1 | 564 | |
0683b7d5 | 565 | } |
566 | ||
567 | ||
e35ddff0 | 568 | //----------------------------------------------------------------------- |
569 | Double_t AliFlowCommonHist::Merge(TCollection *aList) | |
570 | { | |
571 | //merge fuction | |
567b3738 | 572 | //cout<<"entering merge function"<<endl; |
e35ddff0 | 573 | if (!aList) return 0; |
574 | if (aList->IsEmpty()) return 0; //no merging is needed | |
575 | ||
576 | Int_t iCount = 0; | |
577 | TIter next(aList); // list is supposed to contain only objects of the same type as this | |
578 | AliFlowCommonHist *toMerge; | |
579 | // make a temporary list | |
580 | TList *pTemp = new TList(); | |
581 | while ((toMerge=(AliFlowCommonHist*)next())) { | |
582 | pTemp->Add(toMerge->GetHistList()); | |
583 | iCount++; | |
584 | } | |
585 | // Now call merge for fHistList providing temp list | |
586 | fHistList->Merge(pTemp); | |
587 | // Cleanup | |
588 | delete pTemp; | |
589 | ||
567b3738 | 590 | //cout<<"Merged"<<endl; |
e35ddff0 | 591 | return (double)iCount; |
592 | ||
593 | } | |
594 | ||
9825d4a9 | 595 | void AliFlowCommonHist::Print(Option_t *option) const |
596 | { | |
20c03187 | 597 | // -*-*-*-*-*Print some global quantities for this histogram collection class *-*-*-*-*-*-*-* |
598 | // =============================================== | |
9825d4a9 | 599 | // printf( "TH1.Print Name = %s, Entries= %d, Total sum= %g\n",GetName(),Int_t(fEntries),GetSumOfWeights()); |
20c03187 | 600 | printf( "Class.Print Name = %s, Histogram list:\n",GetName()); |
099e1753 | 601 | |
602 | if (fHistList) { | |
603 | fHistList->Print(option); | |
604 | } | |
605 | else | |
606 | { | |
607 | printf( "Empty histogram list \n"); | |
608 | } | |
9825d4a9 | 609 | } |
610 | ||
04f6283b | 611 | //----------------------------------------------------------------------- |
612 | void AliFlowCommonHist::Browse(TBrowser *b) | |
613 | { | |
9825d4a9 | 614 | |
04f6283b | 615 | if (!b) return; |
616 | if (fHistList) b->Add(fHistList,"AliFlowCommonHistList"); | |
617 | } | |
9825d4a9 | 618 | |
e35ddff0 | 619 | |
620 | ||
621 |