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