From: snelling Date: Tue, 7 Apr 2009 20:31:51 +0000 (+0000) Subject: added 3D histograms X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=9cc9e6cc2aa9ba86cb755227bb74c4f08f751b71;p=u%2Fmrichter%2FAliRoot.git added 3D histograms --- diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx b/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx index 3f1df2c14c9..f4bdfa1c7aa 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx +++ b/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx @@ -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): diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h b/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h index 6a4cc37959d..d2e084b4c60 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h +++ b/PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h @@ -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 }; diff --git a/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskMCEventPlane.cxx b/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskMCEventPlane.cxx index d83d1db01d0..2c0596b12d8 100644 --- a/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskMCEventPlane.cxx +++ b/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskMCEventPlane.cxx @@ -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 (fListHistos->FindObject("FlowPro_V_MCEP")); + + TProfile2D *pHistProDiffFlowPtEtaRP = dynamic_cast + (fListHistos->FindObject("FlowPro_VPtEtaRP_MCEP")); TProfile *pHistProDiffFlowPtRP = dynamic_cast (fListHistos->FindObject("FlowPro_VPtRP_MCEP")); TProfile *pHistProDiffFlowEtaRP = dynamic_cast (fListHistos->FindObject("FlowPro_VetaRP_MCEP")); - + + TProfile2D *pHistProDiffFlowPtEtaPOI = dynamic_cast + (fListHistos->FindObject("FlowPro_VPtEtaPOI_MCEP")); + TProfile *pHistProDiffFlowPtPOI = dynamic_cast (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();