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