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