]>
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), |
ef749f67 | 64 | fHistWeightvsPhi(NULL), |
7573885c | 65 | fHistQ(NULL), |
a93de0f0 | 66 | fHistAngleQ(NULL), |
67 | fHistAngleQSub0(NULL), | |
68 | fHistAngleQSub1(NULL), | |
2aa4ebcd | 69 | fHarmonic(NULL), |
c109b8c7 | 70 | fRefMultVsNoOfRPs(NULL), |
7573885c | 71 | fHistList(NULL) |
72 | { | |
73 | ||
74 | //default constructor | |
75 | ||
76 | } | |
77 | ||
78 | AliFlowCommonHist::AliFlowCommonHist(const AliFlowCommonHist& a): | |
79 | TNamed(), | |
b7cb54d5 | 80 | fHistMultRP(new TH1F(*a.fHistMultRP)), |
81 | fHistMultPOI(new TH1F(*a.fHistMultPOI)), | |
1073c74a | 82 | fHistMultPOIvsRP(new TH2F(*a.fHistMultPOIvsRP)), |
b7cb54d5 | 83 | fHistPtRP(new TH1F(*a.fHistPtRP)), |
84 | fHistPtPOI(new TH1F(*a.fHistPtPOI)), | |
44e060e0 | 85 | fHistPtSub0(new TH1F(*a.fHistPtSub0)), |
86 | fHistPtSub1(new TH1F(*a.fHistPtSub1)), | |
b7cb54d5 | 87 | fHistPhiRP(new TH1F(*a.fHistPhiRP)), |
88 | fHistPhiPOI(new TH1F(*a.fHistPhiPOI)), | |
44e060e0 | 89 | fHistPhiSub0(new TH1F(*a.fHistPhiSub0)), |
90 | fHistPhiSub1(new TH1F(*a.fHistPhiSub1)), | |
b7cb54d5 | 91 | fHistEtaRP(new TH1F(*a.fHistEtaRP)), |
92 | fHistEtaPOI(new TH1F(*a.fHistEtaPOI)), | |
44e060e0 | 93 | fHistEtaSub0(new TH1F(*a.fHistEtaSub0)), |
94 | fHistEtaSub1(new TH1F(*a.fHistEtaSub1)), | |
95 | fHistPhiEtaRP(new TH2F(*a.fHistPhiEtaRP)), | |
96 | fHistPhiEtaPOI(new TH2F(*a.fHistPhiEtaPOI)), | |
7573885c | 97 | fHistProMeanPtperBin(new TProfile(*a.fHistProMeanPtperBin)), |
ef749f67 | 98 | fHistWeightvsPhi(new TH2F(*a.fHistWeightvsPhi)), |
7573885c | 99 | fHistQ(new TH1F(*a.fHistQ)), |
a93de0f0 | 100 | fHistAngleQ(new TH1F(*a.fHistAngleQ)), |
101 | fHistAngleQSub0(new TH1F(*a.fHistAngleQSub0)), | |
102 | fHistAngleQSub1(new TH1F(*a.fHistAngleQSub1)), | |
2aa4ebcd | 103 | fHarmonic(new TProfile(*a.fHarmonic)), |
c109b8c7 | 104 | fRefMultVsNoOfRPs(new TProfile(*a.fRefMultVsNoOfRPs)), |
7573885c | 105 | fHistList(NULL) |
106 | { | |
107 | // copy constructor | |
e35ddff0 | 108 | |
7573885c | 109 | fHistList = new TList(); |
b7cb54d5 | 110 | fHistList-> Add(fHistMultRP); |
1073c74a | 111 | fHistList-> Add(fHistMultPOI); |
112 | fHistList-> Add(fHistMultPOIvsRP); | |
b7cb54d5 | 113 | fHistList-> Add(fHistPtRP); |
44e060e0 | 114 | fHistList-> Add(fHistPtPOI); |
115 | fHistList-> Add(fHistPtSub0); | |
116 | fHistList-> Add(fHistPtSub1); | |
b7cb54d5 | 117 | fHistList-> Add(fHistPhiRP); |
44e060e0 | 118 | fHistList-> Add(fHistPhiPOI); |
119 | fHistList-> Add(fHistPhiSub0); | |
120 | fHistList-> Add(fHistPhiSub1); | |
b7cb54d5 | 121 | fHistList-> Add(fHistEtaRP); |
44e060e0 | 122 | fHistList-> Add(fHistEtaPOI); |
123 | fHistList-> Add(fHistEtaSub0); | |
124 | fHistList-> Add(fHistEtaSub1); | |
125 | fHistList-> Add(fHistPhiEtaRP); | |
126 | fHistList-> Add(fHistPhiEtaPOI); | |
ef749f67 | 127 | fHistList-> Add(fHistProMeanPtperBin); |
128 | fHistList-> Add(fHistWeightvsPhi); | |
2aa4ebcd | 129 | fHistList-> Add(fHarmonic); |
c109b8c7 | 130 | fHistList-> Add(fRefMultVsNoOfRPs); |
a93de0f0 | 131 | fHistList-> Add(fHistQ); |
132 | fHistList-> Add(fHistAngleQ); | |
133 | fHistList-> Add(fHistAngleQSub0); | |
134 | fHistList-> Add(fHistAngleQSub1); | |
7573885c | 135 | // TListIter next = TListIter(a.fHistList); |
136 | ||
137 | } | |
138 | ||
e35ddff0 | 139 | |
140 | //----------------------------------------------------------------------- | |
141 | ||
44e060e0 | 142 | AliFlowCommonHist::AliFlowCommonHist(const char *anInput,const char *title): |
143 | TNamed(anInput,title), | |
44e060e0 | 144 | fHistMultRP(NULL), |
145 | fHistMultPOI(NULL), | |
1073c74a | 146 | fHistMultPOIvsRP(NULL), |
44e060e0 | 147 | fHistPtRP(NULL), |
148 | fHistPtPOI(NULL), | |
149 | fHistPtSub0(NULL), | |
150 | fHistPtSub1(NULL), | |
151 | fHistPhiRP(NULL), | |
152 | fHistPhiPOI(NULL), | |
153 | fHistPhiSub0(NULL), | |
154 | fHistPhiSub1(NULL), | |
155 | fHistEtaRP(NULL), | |
156 | fHistEtaPOI(NULL), | |
157 | fHistEtaSub0(NULL), | |
158 | fHistEtaSub1(NULL), | |
159 | fHistPhiEtaRP(NULL), | |
160 | fHistPhiEtaPOI(NULL), | |
161 | fHistProMeanPtperBin(NULL), | |
ef749f67 | 162 | fHistWeightvsPhi(NULL), |
44e060e0 | 163 | fHistQ(NULL), |
a93de0f0 | 164 | fHistAngleQ(NULL), |
165 | fHistAngleQSub0(NULL), | |
166 | fHistAngleQSub1(NULL), | |
44e060e0 | 167 | fHarmonic(NULL), |
c109b8c7 | 168 | fRefMultVsNoOfRPs(NULL), |
44e060e0 | 169 | fHistList(NULL) |
170 | { | |
e35ddff0 | 171 | |
f1d945a1 | 172 | //constructor creating histograms |
bee2efdc | 173 | Int_t iNbinsMult = AliFlowCommonConstants::GetMaster()->GetNbinsMult(); |
174 | Int_t iNbinsPt = AliFlowCommonConstants::GetMaster()->GetNbinsPt(); | |
175 | Int_t iNbinsPhi = AliFlowCommonConstants::GetMaster()->GetNbinsPhi(); | |
176 | Int_t iNbinsEta = AliFlowCommonConstants::GetMaster()->GetNbinsEta(); | |
177 | Int_t iNbinsQ = AliFlowCommonConstants::GetMaster()->GetNbinsQ(); | |
e35ddff0 | 178 | TString sName; |
179 | ||
bee2efdc | 180 | Double_t dMultMin = AliFlowCommonConstants::GetMaster()->GetMultMin(); |
181 | Double_t dMultMax = AliFlowCommonConstants::GetMaster()->GetMultMax(); | |
182 | Double_t dPtMin = AliFlowCommonConstants::GetMaster()->GetPtMin(); | |
183 | Double_t dPtMax = AliFlowCommonConstants::GetMaster()->GetPtMax(); | |
184 | Double_t dPhiMin = AliFlowCommonConstants::GetMaster()->GetPhiMin(); | |
185 | Double_t dPhiMax = AliFlowCommonConstants::GetMaster()->GetPhiMax(); | |
186 | Double_t dEtaMin = AliFlowCommonConstants::GetMaster()->GetEtaMin(); | |
187 | Double_t dEtaMax = AliFlowCommonConstants::GetMaster()->GetEtaMax(); | |
188 | Double_t dQMin = AliFlowCommonConstants::GetMaster()->GetQMin(); | |
189 | Double_t dQMax = AliFlowCommonConstants::GetMaster()->GetQMax(); | |
f1d945a1 | 190 | |
191 | cout<<"The settings for the common histograms are as follows:"<<endl; | |
e35ddff0 | 192 | cout<<"Multiplicity: "<<iNbinsMult<<" bins between "<<dMultMin<<" and "<<dMultMax<<endl; |
193 | cout<<"Pt: "<<iNbinsPt<<" bins between "<<dPtMin<<" and "<<dPtMax<<endl; | |
194 | cout<<"Phi: "<<iNbinsPhi<<" bins between "<<dPhiMin<<" and "<<dPhiMax<<endl; | |
195 | cout<<"Eta: "<<iNbinsEta<<" bins between "<<dEtaMin<<" and "<<dEtaMax<<endl; | |
196 | cout<<"Q: "<<iNbinsQ<<" bins between "<<dQMin<<" and "<<dQMax<<endl; | |
f1d945a1 | 197 | |
198 | //Multiplicity | |
b7cb54d5 | 199 | sName = "Control_Flow_MultRP_"; |
e35ddff0 | 200 | sName +=anInput; |
b7cb54d5 | 201 | fHistMultRP = new TH1F(sName.Data(), sName.Data(),iNbinsMult, dMultMin, dMultMax); |
202 | fHistMultRP ->SetXTitle("Multiplicity for RP selection"); | |
203 | fHistMultRP ->SetYTitle("Counts"); | |
f1d945a1 | 204 | |
b7cb54d5 | 205 | sName = "Control_Flow_MultPOI_"; |
e35ddff0 | 206 | sName +=anInput; |
b7cb54d5 | 207 | fHistMultPOI = new TH1F(sName.Data(), sName.Data(),iNbinsMult, dMultMin, dMultMax); |
208 | fHistMultPOI ->SetXTitle("Multiplicity for POI selection"); | |
209 | fHistMultPOI ->SetYTitle("Counts"); | |
f1d945a1 | 210 | |
1073c74a | 211 | sName = "Control_Flow_MultPOIvsRP_"; |
212 | sName +=anInput; | |
22b860f6 | 213 | fHistMultPOIvsRP = new TH2F(sName.Data(), sName.Data(),100, dMultMin, dMultMax,100, dMultMin, dMultMax); |
1073c74a | 214 | fHistMultPOIvsRP->SetXTitle("Multiplicity for RP selection"); |
215 | fHistMultPOIvsRP->SetYTitle("Multiplicity for POI selection"); | |
216 | ||
f1d945a1 | 217 | //Pt |
b7cb54d5 | 218 | sName = "Control_Flow_PtRP_"; |
e35ddff0 | 219 | sName +=anInput; |
b7cb54d5 | 220 | fHistPtRP = new TH1F(sName.Data(), sName.Data(),iNbinsPt, dPtMin, dPtMax); |
221 | fHistPtRP ->SetXTitle("P_{t} (GeV/c) for RP selection"); | |
222 | fHistPtRP ->SetYTitle("Counts"); | |
f1d945a1 | 223 | |
b7cb54d5 | 224 | sName = "Control_Flow_PtPOI_"; |
e35ddff0 | 225 | sName +=anInput; |
b7cb54d5 | 226 | fHistPtPOI = new TH1F(sName.Data(), sName.Data(),iNbinsPt, dPtMin, dPtMax); |
f1d945a1 | 227 | //binning has to be the same as for fHistProVPt! use to get Nprime! |
b7cb54d5 | 228 | fHistPtPOI ->SetXTitle("P_{t} (GeV/c) for POI selection"); |
229 | fHistPtPOI ->SetYTitle("Counts"); | |
f1d945a1 | 230 | |
44e060e0 | 231 | sName = "Control_Flow_PtSub0_"; |
232 | sName +=anInput; | |
233 | fHistPtSub0 = new TH1F(sName.Data(), sName.Data(),iNbinsPt, dPtMin, dPtMax); | |
234 | fHistPtSub0 ->SetXTitle("P_{t} (GeV/c) for Subevent 0 selection"); | |
235 | fHistPtSub0 ->SetYTitle("Counts"); | |
236 | ||
237 | sName = "Control_Flow_PtSub1_"; | |
238 | sName +=anInput; | |
239 | fHistPtSub1 = new TH1F(sName.Data(), sName.Data(),iNbinsPt, dPtMin, dPtMax); | |
240 | fHistPtSub1 ->SetXTitle("P_{t} (GeV/c) for Subevent 1 selection"); | |
241 | fHistPtSub1 ->SetYTitle("Counts"); | |
242 | ||
f1d945a1 | 243 | //Phi |
b7cb54d5 | 244 | sName = "Control_Flow_PhiRP_"; |
e35ddff0 | 245 | sName +=anInput; |
b7cb54d5 | 246 | fHistPhiRP = new TH1F(sName.Data(), sName.Data(),iNbinsPhi, dPhiMin, dPhiMax); |
247 | fHistPhiRP ->SetXTitle("#phi for RP selection"); | |
248 | fHistPhiRP ->SetYTitle("Counts"); | |
f1d945a1 | 249 | |
b7cb54d5 | 250 | sName = "Control_Flow_PhiPOI_"; |
e35ddff0 | 251 | sName +=anInput; |
b7cb54d5 | 252 | fHistPhiPOI = new TH1F(sName.Data(), sName.Data(),iNbinsPhi, dPhiMin, dPhiMax); |
253 | fHistPhiPOI ->SetXTitle("#phi for POI selection"); | |
254 | fHistPhiPOI ->SetYTitle("Counts"); | |
f1d945a1 | 255 | |
44e060e0 | 256 | sName = "Control_Flow_PhiSub0_"; |
257 | sName +=anInput; | |
258 | fHistPhiSub0 = new TH1F(sName.Data(), sName.Data(),iNbinsPhi, dPhiMin, dPhiMax); | |
259 | fHistPhiSub0 ->SetXTitle("#phi for Subevent 0 selection"); | |
260 | fHistPhiSub0 ->SetYTitle("Counts"); | |
261 | ||
262 | sName = "Control_Flow_PhiSub1_"; | |
263 | sName +=anInput; | |
264 | fHistPhiSub1 = new TH1F(sName.Data(), sName.Data(),iNbinsPhi, dPhiMin, dPhiMax); | |
265 | fHistPhiSub1 ->SetXTitle("#phi for Subevent 1 selection"); | |
266 | fHistPhiSub1 ->SetYTitle("Counts"); | |
267 | ||
f1d945a1 | 268 | //Eta |
b7cb54d5 | 269 | sName = "Control_Flow_EtaRP_"; |
e35ddff0 | 270 | sName +=anInput; |
b7cb54d5 | 271 | fHistEtaRP = new TH1F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax); |
272 | fHistEtaRP ->SetXTitle("#eta for RP selection"); | |
273 | fHistEtaRP ->SetYTitle("Counts"); | |
f1d945a1 | 274 | |
b7cb54d5 | 275 | sName = "Control_Flow_EtaPOI_"; |
e35ddff0 | 276 | sName +=anInput; |
b7cb54d5 | 277 | fHistEtaPOI = new TH1F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax); |
278 | fHistEtaPOI ->SetXTitle("#eta for POI selection"); | |
279 | fHistEtaPOI ->SetYTitle("Counts"); | |
f1d945a1 | 280 | |
44e060e0 | 281 | sName = "Control_Flow_EtaSub0_"; |
282 | sName +=anInput; | |
283 | fHistEtaSub0 = new TH1F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax); | |
284 | fHistEtaSub0 ->SetXTitle("#eta for Subevent 0 selection"); | |
285 | fHistEtaSub0 ->SetYTitle("Counts"); | |
286 | ||
287 | sName = "Control_Flow_EtaSub1_"; | |
288 | sName +=anInput; | |
289 | fHistEtaSub1 = new TH1F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax); | |
290 | fHistEtaSub1 ->SetXTitle("#eta for Subevent 1 selection"); | |
291 | fHistEtaSub1 ->SetYTitle("Counts"); | |
292 | ||
293 | //Phi vs Eta | |
294 | sName = "Control_Flow_PhiEtaRP_"; | |
295 | sName +=anInput; | |
296 | fHistPhiEtaRP = new TH2F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax, iNbinsPhi, dPhiMin, dPhiMax); | |
297 | fHistPhiEtaRP ->SetXTitle("#eta"); | |
298 | fHistPhiEtaRP ->SetYTitle("#phi"); | |
299 | ||
300 | sName = "Control_Flow_PhiEtaPOI_"; | |
301 | sName +=anInput; | |
302 | fHistPhiEtaPOI = new TH2F(sName.Data(), sName.Data(),iNbinsEta, dEtaMin, dEtaMax, iNbinsPhi, dPhiMin, dPhiMax); | |
303 | fHistPhiEtaPOI ->SetXTitle("#eta"); | |
304 | fHistPhiEtaPOI ->SetYTitle("#phi"); | |
305 | ||
f1d945a1 | 306 | //Mean Pt per pt bin |
e35ddff0 | 307 | sName = "Control_FlowPro_MeanPtperBin_"; |
308 | sName +=anInput; | |
309 | fHistProMeanPtperBin = new TProfile(sName.Data(), sName.Data(),iNbinsPt,dPtMin,dPtMax); | |
7ebf0358 | 310 | fHistProMeanPtperBin ->SetXTitle("P_{t} (GeV/c) "); |
311 | fHistProMeanPtperBin ->SetYTitle("<P_{t}> (GeV/c) "); | |
f1d945a1 | 312 | |
ef749f67 | 313 | //Particle weight |
314 | sName = "Control_Flow_WeightvsPhi_"; | |
315 | sName +=anInput; | |
316 | fHistWeightvsPhi = new TH2F(sName.Data(), sName.Data(), iNbinsPhi, dPhiMin, dPhiMax, 300, 0., 3.); | |
317 | fHistWeightvsPhi ->SetXTitle("#phi"); | |
318 | fHistWeightvsPhi ->SetYTitle("weight"); | |
319 | ||
f1d945a1 | 320 | //Q vector |
e35ddff0 | 321 | sName = "Control_Flow_Q_"; |
322 | sName +=anInput; | |
323 | fHistQ = new TH1F(sName.Data(), sName.Data(),iNbinsQ, dQMin, dQMax); | |
7ebf0358 | 324 | fHistQ ->SetXTitle("Q_{vector}/Mult"); |
f1d945a1 | 325 | fHistQ ->SetYTitle("Counts"); |
2aa4ebcd | 326 | |
a93de0f0 | 327 | //Angle of Q vector |
328 | sName = "Control_Flow_AngleQ_"; | |
329 | sName +=anInput; | |
330 | fHistAngleQ = new TH1F(sName.Data(), sName.Data(),72, 0., TMath::Pi()); | |
331 | fHistAngleQ ->SetXTitle("Angle of Q_{vector}"); | |
332 | fHistAngleQ ->SetYTitle("Counts"); | |
333 | ||
334 | sName = "Control_Flow_AngleQSub0_"; | |
335 | sName +=anInput; | |
336 | fHistAngleQSub0 = new TH1F(sName.Data(), sName.Data(),72, 0., TMath::Pi()); | |
337 | fHistAngleQSub0 ->SetXTitle("Angle of Q_{vector} for Subevent 0"); | |
338 | fHistAngleQSub0 ->SetYTitle("Counts"); | |
339 | ||
340 | sName = "Control_Flow_AngleQSub1_"; | |
341 | sName +=anInput; | |
342 | fHistAngleQSub1 = new TH1F(sName.Data(), sName.Data(),72, 0., TMath::Pi()); | |
343 | fHistAngleQSub1 ->SetXTitle("Angle of Q_{vector} for Subevent 1"); | |
344 | fHistAngleQSub1 ->SetYTitle("Counts"); | |
345 | ||
2aa4ebcd | 346 | //harmonic |
347 | sName = "Control_Flow_Harmonic_"; | |
348 | sName +=anInput; | |
349 | fHarmonic = new TProfile(sName.Data(),sName.Data(),1,0,1); | |
350 | fHarmonic ->SetYTitle("harmonic"); | |
c109b8c7 | 351 | |
352 | //<reference multiplicity> versus # of RPs | |
353 | sName = "Reference_Multiplicity_Vs_Number_Of_RPs_"; | |
354 | sName +=anInput; | |
355 | fRefMultVsNoOfRPs = new TProfile(sName.Data(),sName.Data(),iNbinsMult, dMultMin, dMultMax); | |
356 | fRefMultVsNoOfRPs->SetYTitle("<reference multiplicity>"); | |
357 | fRefMultVsNoOfRPs->SetXTitle("# of RPs"); | |
e35ddff0 | 358 | |
7573885c | 359 | //list of histograms if added here also add in copy constructor |
e35ddff0 | 360 | fHistList = new TList(); |
b7cb54d5 | 361 | fHistList-> Add(fHistMultRP); |
1073c74a | 362 | fHistList-> Add(fHistMultPOI); |
363 | fHistList-> Add(fHistMultPOIvsRP); | |
b7cb54d5 | 364 | fHistList-> Add(fHistPtRP); |
44e060e0 | 365 | fHistList-> Add(fHistPtPOI); |
366 | fHistList-> Add(fHistPtSub0); | |
367 | fHistList-> Add(fHistPtSub1); | |
b7cb54d5 | 368 | fHistList-> Add(fHistPhiRP); |
44e060e0 | 369 | fHistList-> Add(fHistPhiPOI); |
370 | fHistList-> Add(fHistPhiSub0); | |
371 | fHistList-> Add(fHistPhiSub1); | |
b7cb54d5 | 372 | fHistList-> Add(fHistEtaRP); |
44e060e0 | 373 | fHistList-> Add(fHistEtaPOI); |
374 | fHistList-> Add(fHistEtaSub0); | |
375 | fHistList-> Add(fHistEtaSub1); | |
376 | fHistList-> Add(fHistPhiEtaRP); | |
377 | fHistList-> Add(fHistPhiEtaPOI); | |
2aa4ebcd | 378 | fHistList-> Add(fHistProMeanPtperBin); |
ef749f67 | 379 | fHistList-> Add(fHistWeightvsPhi); |
c109b8c7 | 380 | fHistList-> Add(fHarmonic); |
381 | fHistList-> Add(fRefMultVsNoOfRPs); | |
e35ddff0 | 382 | fHistList-> Add(fHistQ); |
a93de0f0 | 383 | fHistList-> Add(fHistAngleQ); |
384 | fHistList-> Add(fHistAngleQSub0); | |
385 | fHistList-> Add(fHistAngleQSub1); | |
e35ddff0 | 386 | |
f1d945a1 | 387 | } |
388 | ||
389 | ||
390 | //----------------------------------------------------------------------- | |
391 | ||
392 | AliFlowCommonHist::~AliFlowCommonHist() | |
393 | { | |
394 | //deletes histograms | |
b7cb54d5 | 395 | delete fHistMultRP; |
1073c74a | 396 | delete fHistMultPOI; |
397 | delete fHistMultPOIvsRP; | |
b7cb54d5 | 398 | delete fHistPtRP; |
44e060e0 | 399 | delete fHistPtPOI; |
400 | delete fHistPtSub0; | |
401 | delete fHistPtSub1; | |
b7cb54d5 | 402 | delete fHistPhiRP; |
44e060e0 | 403 | delete fHistPhiPOI; |
404 | delete fHistPhiSub0; | |
405 | delete fHistPhiSub1; | |
b7cb54d5 | 406 | delete fHistEtaRP; |
407 | delete fHistEtaPOI; | |
44e060e0 | 408 | delete fHistEtaSub0; |
409 | delete fHistEtaSub1; | |
410 | delete fHistPhiEtaRP; | |
411 | delete fHistPhiEtaPOI; | |
f1d945a1 | 412 | delete fHistProMeanPtperBin; |
ef749f67 | 413 | delete fHistWeightvsPhi; |
f1d945a1 | 414 | delete fHistQ; |
a93de0f0 | 415 | delete fHistAngleQ; |
416 | delete fHistAngleQSub0; | |
417 | delete fHistAngleQSub1; | |
2aa4ebcd | 418 | delete fHarmonic; |
c109b8c7 | 419 | delete fRefMultVsNoOfRPs; |
e35ddff0 | 420 | delete fHistList; |
f1d945a1 | 421 | } |
422 | ||
423 | ||
424 | //----------------------------------------------------------------------- | |
425 | ||
ef749f67 | 426 | Bool_t AliFlowCommonHist::FillControlHistograms(AliFlowEventSimple* anEvent,TList *weightsList, Bool_t usePhiWeights, Bool_t usePtWeights, Bool_t useEtaWeights) |
f1d945a1 | 427 | { |
428 | //Fills the control histograms | |
e35ddff0 | 429 | if (!anEvent){ |
f1d945a1 | 430 | cout<<"##### FillControlHistograms: FlowEvent pointer null"<<endl; |
431 | return kFALSE; | |
432 | } | |
433 | ||
ef749f67 | 434 | //track datamembers |
435 | Double_t dPt = 0.; | |
436 | Double_t dPhi = 0.; | |
437 | Double_t dEta = 0.; | |
438 | Double_t dWeight = 1.; | |
439 | ||
440 | //weights used for corrections | |
441 | Double_t dWPhi = 1.; | |
442 | Double_t dWPt = 1.; | |
443 | Double_t dWEta = 1.; | |
444 | ||
445 | TH1F *phiWeights = NULL; | |
446 | TH1F *phiWeightsSub0 = NULL; | |
447 | TH1F *phiWeightsSub1 = NULL; | |
448 | TH1D *ptWeights = NULL; | |
449 | TH1D *etaWeights = NULL; | |
450 | ||
451 | Int_t nBinsPhi = 0; | |
452 | Int_t nBinsPhiSub0 = 0; | |
453 | Int_t nBinsPhiSub1 = 0; | |
454 | Double_t dBinWidthPt = 0.; | |
455 | Double_t dPtMin = 0.; | |
456 | Double_t dBinWidthEta = 0.; | |
457 | Double_t dEtaMin = 0.; | |
458 | ||
459 | if(weightsList) | |
460 | { | |
461 | if(usePhiWeights) | |
462 | { | |
463 | phiWeights = dynamic_cast<TH1F *>(weightsList->FindObject("phi_weights")); | |
464 | if(phiWeights) nBinsPhi = phiWeights->GetNbinsX(); | |
465 | phiWeightsSub0 = dynamic_cast<TH1F *>(weightsList->FindObject("phi_weights_sub0")); | |
466 | if(phiWeightsSub0) nBinsPhiSub0 = phiWeightsSub0->GetNbinsX(); | |
467 | phiWeightsSub1 = dynamic_cast<TH1F *>(weightsList->FindObject("phi_weights_sub1")); | |
468 | if(phiWeightsSub1) nBinsPhiSub1 = phiWeightsSub1->GetNbinsX(); | |
469 | } | |
470 | if(usePtWeights) | |
471 | { | |
472 | ptWeights = dynamic_cast<TH1D *>(weightsList->FindObject("pt_weights")); | |
473 | if(ptWeights) | |
474 | { | |
475 | dBinWidthPt = ptWeights->GetBinWidth(1); // assuming that all bins have the same width | |
476 | dPtMin = (ptWeights->GetXaxis())->GetXmin(); | |
477 | } | |
478 | } | |
479 | if(useEtaWeights) | |
480 | { | |
481 | etaWeights = dynamic_cast<TH1D *>(weightsList->FindObject("eta_weights")); | |
482 | if(etaWeights) | |
483 | { | |
484 | dBinWidthEta = etaWeights->GetBinWidth(1); // assuming that all bins have the same width | |
485 | dEtaMin = (etaWeights->GetXaxis())->GetXmin(); | |
486 | } | |
487 | } | |
488 | } // end of if(weightsList) | |
f1d945a1 | 489 | |
ef749f67 | 490 | |
491 | ||
f1d945a1 | 492 | //fill the histograms |
ef749f67 | 493 | AliFlowVector vQ = anEvent->GetQ(2, weightsList, usePhiWeights, usePtWeights, useEtaWeights); |
f1d945a1 | 494 | //weight by the Multiplicity |
9d062fe3 | 495 | Double_t dQX = 0.; |
496 | Double_t dQY = 0.; | |
e60cd248 | 497 | if (vQ.GetMult()!=0) { |
9d062fe3 | 498 | dQX = vQ.X()/vQ.GetMult(); |
499 | dQY = vQ.Y()/vQ.GetMult(); | |
500 | } | |
e35ddff0 | 501 | vQ.Set(dQX,dQY); |
502 | fHistQ->Fill(vQ.Mod()); | |
a93de0f0 | 503 | fHistAngleQ->Fill(vQ.Phi()/2); |
504 | ||
505 | AliFlowVector* vQSub = new AliFlowVector[2]; | |
ef749f67 | 506 | anEvent->Get2Qsub(vQSub, 2, weightsList, usePhiWeights, usePtWeights, useEtaWeights); |
a93de0f0 | 507 | AliFlowVector vQa = vQSub[0]; |
508 | AliFlowVector vQb = vQSub[1]; | |
509 | fHistAngleQSub0->Fill(vQa.Phi()/2); | |
510 | fHistAngleQSub1->Fill(vQb.Phi()/2); | |
f1d945a1 | 511 | |
04c6b875 | 512 | Double_t dMultRP = 0.; |
513 | Double_t dMultPOI = 0.; | |
7ffdc193 | 514 | |
a93de0f0 | 515 | Int_t iNumberOfTracks = anEvent->NumberOfTracks(); |
e35ddff0 | 516 | AliFlowTrackSimple* pTrack = NULL; |
517 | ||
518 | for (Int_t i=0;i<iNumberOfTracks;i++) { | |
519 | pTrack = anEvent->GetTrack(i); | |
520 | if (pTrack ) { | |
04c6b875 | 521 | dWeight = pTrack->Weight(); |
ef749f67 | 522 | dPt = pTrack->Pt(); |
523 | dPhi = pTrack->Phi(); | |
524 | if (dPhi<0.) dPhi+=2*TMath::Pi(); | |
525 | dEta = pTrack->Eta(); | |
526 | ||
527 | //weights are only used for the RP selection | |
b7cb54d5 | 528 | if (pTrack->InRPSelection()){ |
ef749f67 | 529 | // determine Phi weight: |
530 | if(phiWeights && nBinsPhi) { | |
531 | dWPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi()))); | |
532 | } | |
533 | // determine v'(pt) weight: | |
534 | if(ptWeights && dBinWidthPt) { | |
535 | dWPt=ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-dPtMin)/dBinWidthPt))); | |
536 | } | |
537 | // determine v'(eta) weight: | |
538 | if(etaWeights && dBinWidthEta) { | |
539 | dWEta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-dEtaMin)/dBinWidthEta))); | |
540 | } | |
541 | ||
542 | //the total weight is the product | |
543 | Double_t dW = dWeight*dWPhi*dWPt*dWEta; | |
544 | ||
44e060e0 | 545 | //pt |
ef749f67 | 546 | fHistPtRP->Fill(dPt,dW); |
44e060e0 | 547 | //phi |
ef749f67 | 548 | fHistPhiRP->Fill(dPhi,dW); |
44e060e0 | 549 | //eta |
ef749f67 | 550 | fHistEtaRP->Fill(dEta,dW); |
44e060e0 | 551 | //eta vs phi |
ef749f67 | 552 | fHistPhiEtaRP->Fill(dEta,dPhi,dW); |
553 | //weight vs phi | |
554 | fHistWeightvsPhi->Fill(dPhi,dW); | |
44e060e0 | 555 | //count |
ef749f67 | 556 | dMultRP += dW; |
557 | } | |
558 | if (pTrack->InRPSelection() && pTrack->InSubevent(0)) { | |
559 | // determine Phi weight: | |
560 | if(phiWeightsSub0 && nBinsPhiSub0){ | |
561 | dWPhi = phiWeightsSub0->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhiSub0/TMath::TwoPi()))); | |
562 | } | |
563 | // determine v'(pt) weight: | |
564 | if(ptWeights && dBinWidthPt) { | |
565 | dWPt=ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-dPtMin)/dBinWidthPt))); | |
566 | } | |
567 | // determine v'(eta) weight: | |
568 | if(etaWeights && dBinWidthEta) { | |
569 | dWEta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-dEtaMin)/dBinWidthEta))); | |
570 | } | |
571 | ||
572 | //the total weight is the product | |
573 | Double_t dW = dWeight*dWPhi*dWPt*dWEta; | |
574 | ||
575 | //pt | |
576 | fHistPtSub0 ->Fill(dPt,dW); | |
577 | //phi | |
578 | fHistPhiSub0 ->Fill(dPhi,dW); | |
579 | //eta | |
580 | fHistEtaSub0 ->Fill(dEta,dW); | |
581 | } | |
582 | if (pTrack->InRPSelection() && pTrack->InSubevent(1)) { | |
583 | // determine Phi weight: | |
584 | if(phiWeightsSub1 && nBinsPhiSub1){ | |
585 | dWPhi = phiWeightsSub1->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhiSub1/TMath::TwoPi()))); | |
586 | } | |
587 | // determine v'(pt) weight: | |
588 | if(ptWeights && dBinWidthPt) { | |
589 | dWPt=ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-dPtMin)/dBinWidthPt))); | |
590 | } | |
591 | // determine v'(eta) weight: | |
592 | if(etaWeights && dBinWidthEta) { | |
593 | dWEta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-dEtaMin)/dBinWidthEta))); | |
594 | } | |
595 | ||
596 | //the total weight is the product | |
597 | Double_t dW = dWeight*dWPhi*dWPt*dWEta; | |
598 | ||
599 | //pt | |
600 | fHistPtSub1 -> Fill(dPt,dW); | |
601 | //phi | |
602 | fHistPhiSub1 -> Fill(dPhi,dW); | |
603 | //eta | |
604 | fHistEtaSub1 -> Fill(dEta,dW); | |
f1d945a1 | 605 | } |
b7cb54d5 | 606 | if (pTrack->InPOISelection()){ |
ef749f67 | 607 | |
608 | Double_t dW = dWeight; //no pt, phi or eta weights | |
609 | ||
44e060e0 | 610 | //pt |
ef749f67 | 611 | fHistPtPOI ->Fill(dPt,dW); |
44e060e0 | 612 | //phi |
ef749f67 | 613 | fHistPhiPOI ->Fill(dPhi,dW); |
44e060e0 | 614 | //eta |
ef749f67 | 615 | fHistEtaPOI ->Fill(dEta,dW); |
44e060e0 | 616 | //eta vs phi |
ef749f67 | 617 | fHistPhiEtaPOI ->Fill(dEta,dPhi,dW); |
44e060e0 | 618 | //mean pt |
ef749f67 | 619 | fHistProMeanPtperBin ->Fill(dPt,dPt,dW); |
44e060e0 | 620 | //count |
ef749f67 | 621 | dMultPOI += dW; |
f1d945a1 | 622 | } |
623 | } //track | |
624 | } //loop over tracks | |
625 | ||
04c6b875 | 626 | fHistMultRP->Fill(dMultRP); |
627 | fHistMultPOI->Fill(dMultPOI); | |
1073c74a | 628 | fHistMultPOIvsRP->Fill(dMultRP,dMultPOI); |
c109b8c7 | 629 | |
630 | //<reference multiplicity> versus # of RPs: | |
631 | fRefMultVsNoOfRPs->Fill(dMultRP+0.5,anEvent->GetReferenceMultiplicity(),1.); | |
f1d945a1 | 632 | |
633 | return kTRUE; | |
634 | } | |
635 | ||
636 | //----------------------------------------------------------------------- | |
637 | ||
e8c3ff94 | 638 | Double_t AliFlowCommonHist::GetEntriesInPtBinRP(Int_t aBin) |
639 | { | |
b7cb54d5 | 640 | //get entries in bin aBin from fHistPtRP |
641 | Double_t dEntries = fHistPtRP->GetBinContent(aBin); | |
e8c3ff94 | 642 | |
643 | return dEntries; | |
644 | ||
645 | } | |
646 | ||
647 | //----------------------------------------------------------------------- | |
648 | ||
649 | Double_t AliFlowCommonHist::GetEntriesInPtBinPOI(Int_t aBin) | |
f1d945a1 | 650 | { |
b7cb54d5 | 651 | //get entries in bin aBin from fHistPtPOI |
652 | Double_t dEntries = fHistPtPOI->GetBinContent(aBin); | |
f1d945a1 | 653 | |
e35ddff0 | 654 | return dEntries; |
f1d945a1 | 655 | |
656 | } | |
657 | ||
658 | //----------------------------------------------------------------------- | |
659 | ||
e8c3ff94 | 660 | Double_t AliFlowCommonHist::GetEntriesInEtaBinRP(Int_t aBin) |
661 | { | |
b7cb54d5 | 662 | //get entries in bin aBin from fHistPtRP |
663 | Double_t dEntries = fHistEtaRP->GetBinContent(aBin); | |
e8c3ff94 | 664 | |
665 | return dEntries; | |
666 | ||
667 | } | |
668 | ||
669 | //----------------------------------------------------------------------- | |
670 | ||
671 | Double_t AliFlowCommonHist::GetEntriesInEtaBinPOI(Int_t aBin) | |
672 | { | |
b7cb54d5 | 673 | //get entries in bin aBin from fHistPtPOI |
674 | Double_t dEntries = fHistEtaPOI->GetBinContent(aBin); | |
e8c3ff94 | 675 | |
676 | return dEntries; | |
677 | ||
678 | } | |
679 | ||
680 | //----------------------------------------------------------------------- | |
681 | ||
e35ddff0 | 682 | Double_t AliFlowCommonHist::GetMeanPt(Int_t aBin) |
f1d945a1 | 683 | { |
e35ddff0 | 684 | //Get entry from bin aBin from fHistProMeanPtperBin |
685 | Double_t dMeanPt = fHistProMeanPtperBin->GetBinContent(aBin); | |
f1d945a1 | 686 | |
e35ddff0 | 687 | return dMeanPt; |
f1d945a1 | 688 | |
0683b7d5 | 689 | } |
690 | ||
691 | ||
e35ddff0 | 692 | //----------------------------------------------------------------------- |
693 | Double_t AliFlowCommonHist::Merge(TCollection *aList) | |
694 | { | |
695 | //merge fuction | |
567b3738 | 696 | //cout<<"entering merge function"<<endl; |
e35ddff0 | 697 | if (!aList) return 0; |
698 | if (aList->IsEmpty()) return 0; //no merging is needed | |
699 | ||
700 | Int_t iCount = 0; | |
701 | TIter next(aList); // list is supposed to contain only objects of the same type as this | |
702 | AliFlowCommonHist *toMerge; | |
703 | // make a temporary list | |
704 | TList *pTemp = new TList(); | |
705 | while ((toMerge=(AliFlowCommonHist*)next())) { | |
706 | pTemp->Add(toMerge->GetHistList()); | |
707 | iCount++; | |
708 | } | |
709 | // Now call merge for fHistList providing temp list | |
710 | fHistList->Merge(pTemp); | |
711 | // Cleanup | |
712 | delete pTemp; | |
713 | ||
567b3738 | 714 | //cout<<"Merged"<<endl; |
e35ddff0 | 715 | return (double)iCount; |
716 | ||
717 | } | |
718 | ||
9825d4a9 | 719 | void AliFlowCommonHist::Print(Option_t *option) const |
720 | { | |
20c03187 | 721 | // -*-*-*-*-*Print some global quantities for this histogram collection class *-*-*-*-*-*-*-* |
722 | // =============================================== | |
9825d4a9 | 723 | // printf( "TH1.Print Name = %s, Entries= %d, Total sum= %g\n",GetName(),Int_t(fEntries),GetSumOfWeights()); |
20c03187 | 724 | printf( "Class.Print Name = %s, Histogram list:\n",GetName()); |
099e1753 | 725 | |
726 | if (fHistList) { | |
727 | fHistList->Print(option); | |
728 | } | |
729 | else | |
730 | { | |
731 | printf( "Empty histogram list \n"); | |
732 | } | |
9825d4a9 | 733 | } |
734 | ||
04f6283b | 735 | //----------------------------------------------------------------------- |
736 | void AliFlowCommonHist::Browse(TBrowser *b) | |
737 | { | |
9825d4a9 | 738 | |
04f6283b | 739 | if (!b) return; |
740 | if (fHistList) b->Add(fHistList,"AliFlowCommonHistList"); | |
741 | } | |
9825d4a9 | 742 | |
e35ddff0 | 743 | |
744 | ||
745 |