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 5e4a6441190bd80fcfd0cb4a9ca6541140be6c15..3150251cbaa7682a2fc4eb22441c5c4a7f1bf439 100644 (file)
@@ -616,6 +616,33 @@ void AliBalance::CalculateBalance(TObjArray *gTrackArray) {
     Printf("bin: %d - Npp: %lf - Nnn: %lf - Nnp: %lf - Npn: %lf",i,fNpp[i],fNnn[i],fNpn[i],fNpn[i]);*/
 }
 
+//____________________________________________________________________//
+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
index d1fc67203b74eb3039b7f08ea03bb13e1dd72218..f32a24405afda484fbdb5617cdb186c924e0eed5 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);