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