Update in pr task : drathee
authorsjena <sjena@cern.ch>
Tue, 4 Nov 2014 11:42:42 +0000 (12:42 +0100)
committersjena <sjena@cern.ch>
Tue, 4 Nov 2014 11:42:42 +0000 (12:42 +0100)
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioHelper.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioHelper.h
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioPhy.cxx

index 477c270..ff1e74f 100644 (file)
@@ -132,10 +132,15 @@ const Char_t* AliEbyEPidRatioHelper::fgkTriggerNames[]       = {"kMB", "kCentral
 const Char_t* AliEbyEPidRatioHelper::fgkCentralityNames[]    = {"0-5%", "5-10%", "10-20%", "20-30%", "30-40%", "40-50%","50-60%", "60-70%", "70-80%", "80-90%", "90-100%"};
 
 const Char_t* AliEbyEPidRatioHelper::fgkPidName[4]      = {"Nch","Npi","Nka","Npr"};
+const Char_t* AliEbyEPidRatioHelper::fgkPidShLatex[4]      = {"N","#pi","K","p"};
 const Char_t* AliEbyEPidRatioHelper::fgkPidLatex[4][2]  = {{"N_{-}","N_{+}"}, {"N_{#pi^{-}}","N_{#pi^{+}}"},{"N_{K^{-}}","N_{K^{+}}"}, {"N_{#bar{p}}","N_{p}"}};
 const Char_t* AliEbyEPidRatioHelper::fgkPidTitles[4][2] = {{"Negative","Positive"},{"Anti-Pions","Pions"},{"Anti-Kaons","Kaons"}, {"Anti-Protons","Protons"}};
 
 
+const Char_t* AliEbyEPidRatioHelper::fgkNetHistName[4]      = {"","Plus","Minus","Net"};
+const Char_t* AliEbyEPidRatioHelper::fgkNetHistLatex[4]      = {"+ + +","+","-","+ - -"};
+const Int_t AliEbyEPidRatioHelper::fgkfNetHistBin[4][4]  = {{3000,2400,1600,1200}, {1500,1200,800,600},{1500,1200,800,600},{600,600,600,600}};
+
 
 //________________________________________________________________________
 AliEbyEPidRatioHelper::~AliEbyEPidRatioHelper() {
index 08a3d6e..cbe9955 100644 (file)
@@ -149,10 +149,19 @@ class AliEbyEPidRatioHelper : public TNamed {
   static const Char_t* fgkCentralityMaxNames[]; // Centrality names 
   static const Char_t* fgkTriggerNames[];       // Trigger names 
   static const Char_t* fgkCentralityNames[];    // Centrality names  
-  static const Char_t* fgkPidName[4];
-  static const Char_t* fgkPidLatex[4][2];
-  static const Char_t* fgkPidTitles[4][2];
+  static const Char_t* fgkPidName[4]; //
+  static const Char_t* fgkPidLatex[4][2];//
+  static const Char_t* fgkPidShLatex[4];//
+  static const Char_t* fgkPidTitles[4][2];//
  
+
+  static const Char_t *fgkNetHistName[4]; //
+  static const Char_t *fgkNetHistLatex[4]; //
+  static const Int_t fgkfNetHistBin[4][4]; //
+
+
+
+
  private:
 
   AliEbyEPidRatioHelper(const AliEbyEPidRatioHelper&); // not implemented
index 659eeaa..32fc336 100644 (file)
@@ -736,7 +736,27 @@ void  AliEbyEPidRatioPhy::AddHistSetRatio(const Char_t *name, const Char_t *titl
   list->Add(new TH2F(Form("fHistRatioPmPim%s",name), 
                     Form("(%s %s) : #bar{P}/#pi^{-};Centrality(11);#bar{P}/#pi^{-}", xyz.Data(), sTitle.Data()),
                     nBinsCent, centBinRange[0], centBinRange[1], nRbin,mRat[0],mRat[1]));
-  return;
+  
+
+  //------- - - -  -  -   -   - - -   - --- - - --- - - - - - -- --------
+
+  for (Int_t iPid = 0; iPid < 4; ++iPid) {
+    for (Int_t iNet = 0; iNet < 4; ++iNet) {
+      Int_t bin = AliEbyEPidRatioHelper::fgkfNetHistBin[iPid][iNet];
+      Float_t blow = -0.5;
+      Float_t bup  = bin-0.5;
+      
+      list->Add(new TH2F(Form("fHistDist%s%s%s",name, AliEbyEPidRatioHelper::fgkPidName[iPid], AliEbyEPidRatioHelper::fgkNetHistName[iNet]), 
+                        Form("(%s %s) : %s Distribution;Centrality(11);%s_{(%s)}", xyz.Data(), sTitle.Data(), 
+                             AliEbyEPidRatioHelper::fgkPidShLatex[iPid],AliEbyEPidRatioHelper::fgkPidShLatex[iPid],AliEbyEPidRatioHelper::fgkNetHistLatex[iNet]),
+                        nBinsCent, centBinRange[0], centBinRange[1], bin, blow,bup));    
+    }
+  }
+  
+
+
+
+return;
 }
 
 //________________________________________________________________________
@@ -864,31 +884,40 @@ void AliEbyEPidRatioPhy::FillHistSetRatio(const Char_t *name, Int_t idx, Bool_t
   Double_t KmPip = -1;if (np[idx][1][1] != 0 ) { KpPip  = (np[idx][2][1])/(np[idx][1][1]); KmPip =  (np[idx][2][0])/(np[idx][1][1]); }
   Double_t KmPim = -1;if (np[idx][1][0] != 0) KmPim = (np[idx][2][0])/(np[idx][1][0]);
   
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKPi%s",name))))->Fill(centralityBin, KPi);
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKpPip%s",name))))->Fill(centralityBin, KpPip);
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKmPip%s",name))))->Fill(centralityBin, KmPip);
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKmPim%s",name))))->Fill(centralityBin, KmPim);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioKPi%s",name))))->Fill(centralityBin, KPi);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioKpPip%s",name))))->Fill(centralityBin, KpPip);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioKmPip%s",name))))->Fill(centralityBin, KmPip);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioKmPim%s",name))))->Fill(centralityBin, KmPim);
 
   Double_t PK   = -1; if(np[idx][2][1]+np[idx][2][0] != 0 ) PK = (np[idx][3][1]+np[idx][3][0])/(np[idx][2][1]+np[idx][2][0]);
   Double_t PpKp = -1;
   Double_t PmKp = -1;if (np[idx][2][1] != 0 ) { PpKp  = (np[idx][3][1])/(np[idx][2][1]); PmKp =  (np[idx][3][0])/(np[idx][2][1]); }
   Double_t PmKm = -1;if (np[idx][2][0] != 0) PmKm = (np[idx][3][0])/(np[idx][2][0]);
 
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPK%s",name))))->Fill(centralityBin, PK);
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPpKp%s",name))))->Fill(centralityBin, PpKp);
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPmKp%s",name))))->Fill(centralityBin, PmKp);
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPmKm%s",name))))->Fill(centralityBin, PmKm);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioPK%s",name))))->Fill(centralityBin, PK);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioPpKp%s",name))))->Fill(centralityBin, PpKp);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioPmKp%s",name))))->Fill(centralityBin, PmKp);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioPmKm%s",name))))->Fill(centralityBin, PmKm);
 
   Double_t PPi   = -1; if(np[idx][1][1]+np[idx][1][0] != 0 ) PPi = (np[idx][3][1]+np[idx][3][0])/(np[idx][1][1]+np[idx][1][0]);
   Double_t PpPip = -1;
   Double_t PmPip = -1;if (np[idx][1][1] != 0 ) { PpPip  = (np[idx][3][1])/(np[idx][1][1]); PmPip =  (np[idx][3][0])/(np[idx][1][1]); }
   Double_t PmPim = -1;if (np[idx][1][0] != 0) PmPim = (np[idx][3][0])/(np[idx][1][0]);
 
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPPi%s",name))))->Fill(centralityBin,   PPi);
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPpPip%s",name))))->Fill(centralityBin, PpPip);
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPmPip%s",name))))->Fill(centralityBin, PmPip);
-  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPmPim%s",name))))->Fill(centralityBin, PmPim);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioPPi%s",name))))->Fill(centralityBin,   PPi);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioPpPip%s",name))))->Fill(centralityBin, PpPip);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioPmPip%s",name))))->Fill(centralityBin, PmPip);
+  (static_cast<TH2F*>(list->FindObject(Form("fHistRatioPmPim%s",name))))->Fill(centralityBin, PmPim);
   
+
+ for (Int_t iPid = 0; iPid < 4; ++iPid) {
+   (static_cast<TH2F*>(list->FindObject(Form("fHistDist%s%s%s",name, AliEbyEPidRatioHelper::fgkPidName[iPid], AliEbyEPidRatioHelper::fgkNetHistName[0]))))->Fill(centralityBin, np[idx][iPid][1]+np[idx][iPid][0]); 
+   (static_cast<TH2F*>(list->FindObject(Form("fHistDist%s%s%s",name, AliEbyEPidRatioHelper::fgkPidName[iPid], AliEbyEPidRatioHelper::fgkNetHistName[1]))))->Fill(centralityBin, np[idx][iPid][1]); 
+   (static_cast<TH2F*>(list->FindObject(Form("fHistDist%s%s%s",name, AliEbyEPidRatioHelper::fgkPidName[iPid], AliEbyEPidRatioHelper::fgkNetHistName[2]))))->Fill(centralityBin,                  np[idx][iPid][0]); 
+   (static_cast<TH2F*>(list->FindObject(Form("fHistDist%s%s%s",name, AliEbyEPidRatioHelper::fgkPidName[iPid], AliEbyEPidRatioHelper::fgkNetHistName[3]))))->Fill(centralityBin, np[idx][iPid][1]-np[idx][iPid][0]); 
+ }
+
+
   return;
 }