]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Returning the 2D histograms from the CF containers
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 6 Feb 2010 16:08:45 +0000 (16:08 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 6 Feb 2010 16:08:45 +0000 (16:08 +0000)
PWG2/SPECTRA/AliProtonAnalysis.cxx
PWG2/SPECTRA/AliProtonAnalysis.h

index de39c4e92c06ebdf2bba3ed0bdd8ddea9237859c..38a98509747f8355db3bef341893137aee4d2eb3 100644 (file)
@@ -405,7 +405,7 @@ TH1D *AliProtonAnalysis::GetProtonYHistogram() {
   Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
 
   //TH1D *fYProtons = (TH1D *)fHistYPtProtons->ProjectionX("fYProtons",0,fHistYPtProtons->GetYaxis()->GetNbins(),"");
-  TH1D *fYProtons = fProtonContainer->ShowProjection(0,3); //variable-step
+  TH1D *fYProtons = fProtonContainer->ShowProjection(0,kStepInPhaseSpace); //variable-step
    
   fYProtons->SetStats(kFALSE);
   fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
@@ -424,7 +424,7 @@ TH1D *AliProtonAnalysis::GetAntiProtonYHistogram() {
   Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
   
   //TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionX("fYAntiProtons",0,fHistYPtAntiProtons->GetYaxis()->GetNbins(),"");
-  TH1D *fYAntiProtons = fAntiProtonContainer->ShowProjection(0,3);//variable-step 
+  TH1D *fYAntiProtons = fAntiProtonContainer->ShowProjection(0,kStepInPhaseSpace);//variable-step 
  
   fYAntiProtons->SetStats(kFALSE);
   fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
@@ -443,7 +443,7 @@ TH1D *AliProtonAnalysis::GetProtonPtHistogram() {
   Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
   
   //TH1D *fPtProtons = (TH1D *)fHistYPtProtons->ProjectionY("fPtProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),""); 
-  TH1D *fPtProtons = fProtonContainer->ShowProjection(1,3); //variable-step
+  TH1D *fPtProtons = fProtonContainer->ShowProjection(1,kStepInPhaseSpace); //variable-step
 
   fPtProtons->SetStats(kFALSE);
   fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
@@ -462,7 +462,7 @@ TH1D *AliProtonAnalysis::GetAntiProtonPtHistogram() {
   Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
   
   //TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionY("fPtAntiProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),""); 
-  TH1D *fPtAntiProtons = fAntiProtonContainer->ShowProjection(1,3); //variable-step
+  TH1D *fPtAntiProtons = fAntiProtonContainer->ShowProjection(1,kStepInPhaseSpace); //variable-step
 
   fPtAntiProtons->SetStats(kFALSE);
   fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
index 45bc75851428525b2a9c049dcc3cb2e638537221..2e7c14d33b7ac7af3a3fc3a71e4b0e97cdff7e44 100644 (file)
@@ -75,8 +75,12 @@ class AliProtonAnalysis : public TObject {
   AliCFContainer *GetProtonContainer() const {return fProtonContainer;}
   AliCFContainer *GetAntiProtonContainer() const {return fAntiProtonContainer;}
 
-  TH2D *GetProtonYPtHistogram() const {return fHistYPtProtons;}
-  TH2D *GetAntiProtonYPtHistogram() const {return fHistYPtAntiProtons;}
+  //TH2D *GetProtonYPtHistogram() const {return fHistYPtProtons;}
+  //TH2D *GetAntiProtonYPtHistogram() const {return fHistYPtAntiProtons;}
+  TH2D *GetProtonYPtHistogram() const {
+    return fProtonContainer->ShowProjection(0,1,kStepInPhaseSpace);}
+  TH2D *GetAntiProtonYPtHistogram() const {
+    return fAntiProtonContainer->ShowProjection(0,1,kStepInPhaseSpace);}
   TH1D *GetProtonYHistogram();
   TH1D *GetAntiProtonYHistogram();
   TH1D *GetProtonPtHistogram();