added 3D histograms
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 7 Apr 2009 20:31:51 +0000 (20:31 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 7 Apr 2009 20:31:51 +0000 (20:31 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskMCEventPlane.cxx

index 3f1df2c..f4bdfa1 100644 (file)
@@ -18,6 +18,7 @@
 #include "Riostream.h"  //needed as include
 #include "TFile.h"      //needed as include
 #include "TProfile.h"   //needed as include
+#include "TProfile2D.h"   
 #include "TComplex.h"   //needed as include
 #include "TList.h"
 
@@ -52,8 +53,10 @@ ClassImp(AliFlowAnalysisWithMCEventPlane)
    fCommonHistsRes(NULL),
    fHistRP(NULL),
    fHistProIntFlow(NULL),
+   fHistProDiffFlowPtEtaRP(NULL),
    fHistProDiffFlowPtRP(NULL),
    fHistProDiffFlowEtaRP(NULL),
+   fHistProDiffFlowPtEtaPOI(NULL),
    fHistProDiffFlowPtPOI(NULL),
    fHistProDiffFlowEtaPOI(NULL)
 {
@@ -124,6 +127,11 @@ void AliFlowAnalysisWithMCEventPlane::Init() {
   (fHistProIntFlow->GetXaxis())->SetBinLabel(1,"v_{n}{2}");
   fHistProIntFlow->SetYTitle("");
   fHistList->Add(fHistProIntFlow);
+  
+  fHistProDiffFlowPtEtaRP = new TProfile2D("FlowPro_VPtEtaRP_MCEP","FlowPro_VPtEtaRP_MCEP",iNbinsPt,dPtMin,dPtMax,iNbinsEta,dEtaMin,dEtaMax);
+  fHistProDiffFlowPtEtaRP->SetXTitle("P_{t}");
+  fHistProDiffFlowPtEtaRP->SetYTitle("#eta");
+  fHistList->Add(fHistProDiffFlowPtEtaRP);
  
   fHistProDiffFlowPtRP = new TProfile("FlowPro_VPtRP_MCEP","FlowPro_VPtRP_MCEP",iNbinsPt,dPtMin,dPtMax);
   fHistProDiffFlowPtRP->SetXTitle("P_{t}");
@@ -135,6 +143,11 @@ void AliFlowAnalysisWithMCEventPlane::Init() {
   fHistProDiffFlowEtaRP->SetYTitle("");
   fHistList->Add(fHistProDiffFlowEtaRP);
   
+  fHistProDiffFlowPtEtaPOI = new TProfile2D("FlowPro_VPtEtaPOI_MCEP","FlowPro_VPtEtaPOI_MCEP",iNbinsPt,dPtMin,dPtMax,iNbinsEta,dEtaMin,dEtaMax);
+  fHistProDiffFlowPtEtaPOI->SetXTitle("P_{t}");
+  fHistProDiffFlowPtEtaPOI->SetYTitle("#eta");
+  fHistList->Add(fHistProDiffFlowPtEtaPOI);
+  
   fHistProDiffFlowPtPOI = new TProfile("FlowPro_VPtPOI_MCEP","FlowPro_VPtPOI_MCEP",iNbinsPt,dPtMin,dPtMax);
   fHistProDiffFlowPtPOI->SetXTitle("P_{t}");
   fHistProDiffFlowPtPOI->SetYTitle("");
@@ -192,6 +205,8 @@ void AliFlowAnalysisWithMCEventPlane::Make(AliFlowEventSimple* anEvent) {
            dEta = pTrack->Eta();
             //no-name int. flow (to be improved):
             fHistProIntFlow->Fill(0.,dv2);
+            //differential flow (Pt, Eta, RP):
+            fHistProDiffFlowPtEtaRP->Fill(dPt,dEta,dv2,1.);
             //differential flow (Pt, RP):
             fHistProDiffFlowPtRP->Fill(dPt,dv2,1.);
             //differential flow (Eta, RP):
@@ -204,6 +219,8 @@ void AliFlowAnalysisWithMCEventPlane::Make(AliFlowEventSimple* anEvent) {
            dv2  = TMath::Cos(2*(dPhi-aRP));
            dPt  = pTrack->Pt();
            dEta = pTrack->Eta();
+           //differential flow (Pt, Eta, POI):
+            fHistProDiffFlowPtEtaPOI->Fill(dPt,dEta,dv2,1.);
            //differential flow (Pt, POI):
             fHistProDiffFlowPtPOI->Fill(dPt,dv2,1.);
             //differential flow (Eta, POI):
index 6a4cc37..d2e084b 100644 (file)
@@ -67,6 +67,10 @@ class AliFlowAnalysisWithMCEventPlane {
    TProfile* GetHistProIntFlow()          {return this->fHistProIntFlow; } 
    void      SetHistProIntFlow(TProfile* aHistProIntFlow) 
      {this->fHistProIntFlow = aHistProIntFlow; }
+     
+   TProfile2D* GetHistProDiffFlowPtEtaRP()     {return this->fHistProDiffFlowPtEtaRP; } 
+   void      SetHistProDiffFlowPtEtaRP(TProfile2D* aHistProDiffFlowPtEtaRP) 
+     {this->fHistProDiffFlowPtEtaRP = aHistProDiffFlowPtEtaRP; }   
    
    TProfile* GetHistProDiffFlowPtRP()     {return this->fHistProDiffFlowPtRP; } 
    void      SetHistProDiffFlowPtRP(TProfile* aHistProDiffFlowPtRP) 
@@ -75,6 +79,10 @@ class AliFlowAnalysisWithMCEventPlane {
    TProfile* GetHistProDiffFlowEtaRP()    {return this->fHistProDiffFlowEtaRP; } 
    void      SetHistProDiffFlowEtaRP(TProfile* aHistProDiffFlowEtaRP) 
      {this->fHistProDiffFlowEtaRP = aHistProDiffFlowEtaRP; } 
+     
+   TProfile2D* GetHistProDiffFlowPtEtaPOI()     {return this->fHistProDiffFlowPtEtaPOI; } 
+   void      SetHistProDiffFlowPtEtaPOI(TProfile2D* aHistProDiffFlowPtEtaPOI) 
+     {this->fHistProDiffFlowPtEtaPOI = aHistProDiffFlowPtEtaPOI; }   
    
    TProfile* GetHistProDiffFlowPtPOI()    {return this->fHistProDiffFlowPtPOI; } 
    void      SetHistProDiffFlowPtPOI(TProfile* aHistProDiffFlowPtPOI) 
@@ -103,12 +111,14 @@ class AliFlowAnalysisWithMCEventPlane {
    AliFlowCommonHist* fCommonHists;              //
    AliFlowCommonHistResults* fCommonHistsRes;    //
    
-   TH1F*        fHistRP;                //reaction plane
-   TProfile*    fHistProIntFlow;        //profile used to calculate the integrated flow of RP particles
-   TProfile*    fHistProDiffFlowPtRP;   //profile used to calculate the differential flow (Pt) of RP particles 
-   TProfile*    fHistProDiffFlowEtaRP;  //profile used to calculate the differential flow (Eta) of RP particles 
-   TProfile*    fHistProDiffFlowPtPOI;  //profile used to calculate the differential flow (Pt) of POI particles 
-   TProfile*    fHistProDiffFlowEtaPOI; //profile used to calculate the differential flow (Eta) of POI particles    
+   TH1F*        fHistRP;                  // reaction plane
+   TProfile*    fHistProIntFlow;          // profile used to calculate the integrated flow of RP particles
+   TProfile2D*  fHistProDiffFlowPtEtaRP;  // profile used to calculate the differential flow (Pt,Eta) of RP particles
+   TProfile*    fHistProDiffFlowPtRP;     // profile used to calculate the differential flow (Pt) of RP particles 
+   TProfile*    fHistProDiffFlowEtaRP;    // profile used to calculate the differential flow (Eta) of RP particles 
+   TProfile2D*  fHistProDiffFlowPtEtaPOI; // profile used to calculate the differential flow (Pt,Eta) of POI particles
+   TProfile*    fHistProDiffFlowPtPOI;    // profile used to calculate the differential flow (Pt) of POI particles 
+   TProfile*    fHistProDiffFlowEtaPOI ;  // profile used to calculate the differential flow (Eta) of POI particles    
    
    ClassDef(AliFlowAnalysisWithMCEventPlane,1)  // Analyse particle distribution versus MC reaction plane
      };
index d83d1db..2c0596b 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "Riostream.h" //needed as include
 #include "TProfile.h"
+#include "TProfile2D.h"
 #include "TList.h"
 
 
@@ -138,13 +139,19 @@ void AliAnalysisTaskMCEventPlane::Terminate(Option_t *)
 
     TProfile *pHistProIntFlow = dynamic_cast<TProfile*> 
       (fListHistos->FindObject("FlowPro_V_MCEP")); 
+      
+    TProfile2D *pHistProDiffFlowPtEtaRP = dynamic_cast<TProfile2D*> 
+      (fListHistos->FindObject("FlowPro_VPtEtaRP_MCEP")); 
                                
     TProfile *pHistProDiffFlowPtRP = dynamic_cast<TProfile*> 
       (fListHistos->FindObject("FlowPro_VPtRP_MCEP")); 
      
     TProfile *pHistProDiffFlowEtaRP = dynamic_cast<TProfile*> 
       (fListHistos->FindObject("FlowPro_VetaRP_MCEP"));
-      
+    TProfile2D *pHistProDiffFlowPtEtaPOI = dynamic_cast<TProfile2D*> 
+      (fListHistos->FindObject("FlowPro_VPtEtaPOI_MCEP")); 
+          
     TProfile *pHistProDiffFlowPtPOI = dynamic_cast<TProfile*> 
       (fListHistos->FindObject("FlowPro_VPtPOI_MCEP")); 
      
@@ -157,8 +164,10 @@ void AliAnalysisTaskMCEventPlane::Terminate(Option_t *)
       fMcTerm->SetCommonHists(pCommonHists);
       fMcTerm->SetCommonHistsRes(pCommonHistResults);
       fMcTerm->SetHistProIntFlow(pHistProIntFlow);
+      fMcTerm->SetHistProDiffFlowPtEtaRP(pHistProDiffFlowPtEtaRP);
       fMcTerm->SetHistProDiffFlowPtRP(pHistProDiffFlowPtRP);      
       fMcTerm->SetHistProDiffFlowEtaRP(pHistProDiffFlowEtaRP);  
+      fMcTerm->SetHistProDiffFlowPtEtaPOI(pHistProDiffFlowPtEtaPOI);
       fMcTerm->SetHistProDiffFlowPtPOI(pHistProDiffFlowPtPOI);      
       fMcTerm->SetHistProDiffFlowEtaPOI(pHistProDiffFlowEtaPOI);          
       fMcTerm->Finish();