Filling properly the control histograms for the two particle coorelators
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Oct 2010 19:35:48 +0000 (19:35 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Oct 2010 19:35:48 +0000 (19:35 +0000)
PWG2/EBYE/AliBalance.cxx
PWG2/EBYE/AliBalance.h

index 5e4a644..3150251 100644 (file)
@@ -617,6 +617,33 @@ void AliBalance::CalculateBalance(TObjArray *gTrackArray) {
 }
 
 //____________________________________________________________________//
+TH1F *AliBalance::GetHistNnn() {
+  //Return the control histogram of the -- component
+  for(Int_t iBin = 1; iBin <= fNumberOfBins; iBin++)
+    fHistfNnn->SetBinContent(iBin,GetNnn(iBin-1));
+
+  return fHistfNnn;
+}
+
+//____________________________________________________________________//
+TH1F *AliBalance::GetHistNpp() {
+  //Return the control histogram of the ++ component
+  for(Int_t iBin = 1; iBin <= fNumberOfBins; iBin++)
+    fHistfNpp->SetBinContent(iBin,GetNpp(iBin-1));
+
+  return fHistfNpp;
+}
+
+//____________________________________________________________________//
+TH1F *AliBalance::GetHistNpn() {
+  //Return the control histogram of the +- component
+  for(Int_t iBin = 1; iBin <= fNumberOfBins; iBin++)
+    fHistfNpn->SetBinContent(iBin,GetNpn(iBin-1));
+
+  return fHistfNpn;
+}
+
+//____________________________________________________________________//
 Double_t AliBalance::GetBalance(Int_t p2) {
   // Returns the value of the balance function in bin p2
   fB[p2] = 0.5*(((fNpn[p2] - 2.0*fNnn[p2])/fNn) + ((fNpn[p2] - 2.0*fNpp[p2])/fNp))/fP2Step;
index d1fc672..f32a244 100644 (file)
@@ -49,9 +49,9 @@ class AliBalance : public TObject {
   Double_t GetNpp(Int_t p2) const { return 1.0*fNpp[p2]; }
   Double_t GetNpn(Int_t p2) const { return 1.0*fNpn[p2]; }
  
-  TH1F *GetHistNnn() {return fHistfNnn;}
-  TH1F *GetHistNpp() {return fHistfNpp;}
-  TH1F *GetHistNpn() {return fHistfNpn;}
+  TH1F *GetHistNnn();
+  TH1F *GetHistNpp();
+  TH1F *GetHistNpn();
 
   void CalculateBalance(TObjArray *gTrackArray);