]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
moved to correction to pt,eta,phi, using THn, integration over ep in correction
authorpluettig <philipp.luettig@cern.ch>
Fri, 5 Dec 2014 17:21:57 +0000 (18:21 +0100)
committerpluettig <philipp.luettig@cern.ch>
Fri, 5 Dec 2014 17:21:57 +0000 (18:21 +0100)
PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPbAOD.cxx
PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPbAOD.h
PWGLF/SPECTRA/ChargedHadrons/dNdPt/macros/AddTask_dNdPt_PbPbAOD.C

index e17ed0b6428b6d7b66aab90a2556da87ad960e01..58b8ac9aadb76b7862bcc101be0a52639c24d549 100644 (file)
@@ -47,9 +47,10 @@ fPtResptCent(0),
 fMCRecPrimZvPtEtaCent(0),
 fMCGenZvPtEtaCent(0),
 fMCRecSecZvPtEtaCent(0),
-fMCRecPrimDeltaphiPtEtaPhiCent(0),
-fMCGenDeltaphiPtEtaPhiCent(0),
-fMCRecSecDeltaphiPtEtaPhiCent(0),
+fMCPtEtaPhiCent(0),
+fMCRecPrimPtEtaPhiCent(0),
+fMCGenPtEtaPhiCent(0),
+fMCRecSecPtEtaPhiCent(0),
 fEventStatistics(0),
 fEventStatisticsCentrality(0),
 fMCEventStatisticsCentrality(0),
@@ -236,9 +237,12 @@ void AlidNdPtAnalysisPbPbAOD::UserCreateOutputObjects()
   
   Int_t binsZvPtEtaCent[4]={fZvNbins-1,fPtNbins-1,fEtaNbins-1,fCentralityNbins-1};
   Int_t binsPhiPtEtaCent[5]={fDeltaphiNbins-1,fPtNbins-1,fEtaNbins-1,fPhiNbins-1,fCentralityNbins-1};
-  Int_t binsPhiPtCorrEtaCent[5]={fDeltaphiNbins-1,fPtCorrNbins-1,fEtaNbins-1,fPhiNbins-1,fCentralityNbins-1};
   Int_t binsZvMultCent[3]={fZvNbins-1,fMultNbins-1,fCentralityNbins-1};
   
+  Int_t binsPhiPtCorrEtaCent[4]={fPtCorrNbins-1,fEtaNbins-1,fPhiNbins-1,fCentralityNbins-1};
+  Double_t minbinsPhiPtCorrEtaCent[4] = {0.0, -1.5, 0, 0};
+  Double_t maxbinsPhiPtCorrEtaCent[4] = {200.0, 1.5, 2.*TMath::Pi(), 100};
+  
   Int_t binsOneOverPtPtResCent[3]={400,300,11};
   Double_t minbinsOneOverPtPtResCent[3]={0,0,0}; 
   Double_t maxbinsOneOverPtPtResCent[3]={1,0.015,100};
@@ -308,44 +312,49 @@ void AlidNdPtAnalysisPbPbAOD::UserCreateOutputObjects()
   fMCRecSecZvPtEtaCent->GetAxis(3)->SetTitle("Centrality");
   fMCRecSecZvPtEtaCent->Sumw2();
   
-  fMCRecPrimDeltaphiPtEtaPhiCent = new THnSparseF("fMCRecPrimDeltaphiPtEtaPhiCent","mcDeltaphi:mcPt:mcEta:mcPhi:Centrality",5,binsPhiPtCorrEtaCent);
-  fMCRecPrimDeltaphiPtEtaPhiCent->SetBinEdges(0,fBinsDeltaphi);
-  fMCRecPrimDeltaphiPtEtaPhiCent->SetBinEdges(1,fBinsPtCorr);
-  fMCRecPrimDeltaphiPtEtaPhiCent->SetBinEdges(2,fBinsEta);
-  fMCRecPrimDeltaphiPtEtaPhiCent->SetBinEdges(3,fBinsPhi);
-  fMCRecPrimDeltaphiPtEtaPhiCent->SetBinEdges(4,fBinsCentrality);
-  fMCRecPrimDeltaphiPtEtaPhiCent->GetAxis(0)->SetTitle("MC #Delta phi to rp");
-  fMCRecPrimDeltaphiPtEtaPhiCent->GetAxis(1)->SetTitle("MC Pt (GeV/c)");
-  fMCRecPrimDeltaphiPtEtaPhiCent->GetAxis(2)->SetTitle("MC Eta");
-  fMCRecPrimDeltaphiPtEtaPhiCent->GetAxis(3)->SetTitle("MC Phi");
-  fMCRecPrimDeltaphiPtEtaPhiCent->GetAxis(4)->SetTitle("Centrality");
-  fMCRecPrimDeltaphiPtEtaPhiCent->Sumw2();
-  
-  fMCGenDeltaphiPtEtaPhiCent = new THnSparseF("fMCGenDeltaphiPtEtaPhiCent","mcDeltaphi:mcPt:mcEta:mcPhi:Centrality",5,binsPhiPtCorrEtaCent);
-  fMCGenDeltaphiPtEtaPhiCent->SetBinEdges(0,fBinsDeltaphi);
-  fMCGenDeltaphiPtEtaPhiCent->SetBinEdges(1,fBinsPtCorr);
-  fMCGenDeltaphiPtEtaPhiCent->SetBinEdges(2,fBinsEta);
-  fMCGenDeltaphiPtEtaPhiCent->SetBinEdges(3,fBinsPhi);
-  fMCGenDeltaphiPtEtaPhiCent->SetBinEdges(4,fBinsCentrality);
-  fMCGenDeltaphiPtEtaPhiCent->GetAxis(0)->SetTitle("MC #Delta phi to rp");
-  fMCGenDeltaphiPtEtaPhiCent->GetAxis(1)->SetTitle("MC Pt (GeV/c)");
-  fMCGenDeltaphiPtEtaPhiCent->GetAxis(2)->SetTitle("MC Eta");
-  fMCGenDeltaphiPtEtaPhiCent->GetAxis(3)->SetTitle("MC Phi");
-  fMCGenDeltaphiPtEtaPhiCent->GetAxis(4)->SetTitle("Centrality");
-  fMCGenDeltaphiPtEtaPhiCent->Sumw2();
-  
-  fMCRecSecDeltaphiPtEtaPhiCent = new THnSparseF("fMCRecSecDeltaphiPtEtaPhiCent","mcDeltaphi:mcPt:mcEta:mcPhi:Centrality",5,binsPhiPtCorrEtaCent);
-  fMCRecSecDeltaphiPtEtaPhiCent->SetBinEdges(0,fBinsDeltaphi);
-  fMCRecSecDeltaphiPtEtaPhiCent->SetBinEdges(1,fBinsPtCorr);
-  fMCRecSecDeltaphiPtEtaPhiCent->SetBinEdges(2,fBinsEta);
-  fMCRecSecDeltaphiPtEtaPhiCent->SetBinEdges(3,fBinsPhi);
-  fMCRecSecDeltaphiPtEtaPhiCent->SetBinEdges(4,fBinsCentrality);
-  fMCRecSecDeltaphiPtEtaPhiCent->GetAxis(0)->SetTitle("MC Sec #Delta phi to rp");
-  fMCRecSecDeltaphiPtEtaPhiCent->GetAxis(1)->SetTitle("MC Sec Pt (GeV/c)");
-  fMCRecSecDeltaphiPtEtaPhiCent->GetAxis(2)->SetTitle("MC Sec Eta");
-  fMCRecSecDeltaphiPtEtaPhiCent->GetAxis(3)->SetTitle("MC Phi");
-  fMCRecSecDeltaphiPtEtaPhiCent->GetAxis(4)->SetTitle("Centrality");
-  fMCRecSecDeltaphiPtEtaPhiCent->Sumw2();
+  fMCPtEtaPhiCent = new THnF("fMCPtEtaPhiCent","Pt:Eta:Phi:Centrality",4,binsPhiPtCorrEtaCent, minbinsPhiPtCorrEtaCent, maxbinsPhiPtCorrEtaCent);
+  fMCPtEtaPhiCent->SetBinEdges(0,fBinsPtCorr);
+  fMCPtEtaPhiCent->SetBinEdges(1,fBinsEta);
+  fMCPtEtaPhiCent->SetBinEdges(2,fBinsPhi);
+  fMCPtEtaPhiCent->SetBinEdges(3,fBinsCentrality);
+  fMCPtEtaPhiCent->GetAxis(0)->SetTitle("Pt (GeV/c)");
+  fMCPtEtaPhiCent->GetAxis(1)->SetTitle("Eta");
+  fMCPtEtaPhiCent->GetAxis(2)->SetTitle("Phi");
+  fMCPtEtaPhiCent->GetAxis(3)->SetTitle("Centrality");
+  fMCPtEtaPhiCent->Sumw2();
+  
+  fMCRecPrimPtEtaPhiCent = new THnF("fMCRecPrimPtEtaPhiCent","mcPt:mcEta:mcPhi:Centrality",4,binsPhiPtCorrEtaCent, minbinsPhiPtCorrEtaCent, maxbinsPhiPtCorrEtaCent);
+  fMCRecPrimPtEtaPhiCent->SetBinEdges(0,fBinsPtCorr);
+  fMCRecPrimPtEtaPhiCent->SetBinEdges(1,fBinsEta);
+  fMCRecPrimPtEtaPhiCent->SetBinEdges(2,fBinsPhi);
+  fMCRecPrimPtEtaPhiCent->SetBinEdges(3,fBinsCentrality);
+  fMCRecPrimPtEtaPhiCent->GetAxis(0)->SetTitle("MC Pt (GeV/c)");
+  fMCRecPrimPtEtaPhiCent->GetAxis(1)->SetTitle("MC Eta");
+  fMCRecPrimPtEtaPhiCent->GetAxis(2)->SetTitle("MC Phi");
+  fMCRecPrimPtEtaPhiCent->GetAxis(3)->SetTitle("Centrality");
+  fMCRecPrimPtEtaPhiCent->Sumw2();
+  
+  fMCGenPtEtaPhiCent = new THnF("fMCGenPtEtaPhiCent","mcPt:mcEta:mcPhi:Centrality",4,binsPhiPtCorrEtaCent, minbinsPhiPtCorrEtaCent, maxbinsPhiPtCorrEtaCent);
+  fMCGenPtEtaPhiCent->SetBinEdges(0,fBinsPtCorr);
+  fMCGenPtEtaPhiCent->SetBinEdges(1,fBinsEta);
+  fMCGenPtEtaPhiCent->SetBinEdges(2,fBinsPhi);
+  fMCGenPtEtaPhiCent->SetBinEdges(3,fBinsCentrality);
+  fMCGenPtEtaPhiCent->GetAxis(0)->SetTitle("MC Pt (GeV/c)");
+  fMCGenPtEtaPhiCent->GetAxis(1)->SetTitle("MC Eta");
+  fMCGenPtEtaPhiCent->GetAxis(2)->SetTitle("MC Phi");
+  fMCGenPtEtaPhiCent->GetAxis(3)->SetTitle("Centrality");
+  fMCGenPtEtaPhiCent->Sumw2();
+  
+  fMCRecSecPtEtaPhiCent = new THnF("fMCRecSecPtEtaPhiCent","mcPt:mcEta:mcPhi:Centrality",4,binsPhiPtCorrEtaCent, minbinsPhiPtCorrEtaCent, maxbinsPhiPtCorrEtaCent);
+  fMCRecSecPtEtaPhiCent->SetBinEdges(0,fBinsPtCorr);
+  fMCRecSecPtEtaPhiCent->SetBinEdges(1,fBinsEta);
+  fMCRecSecPtEtaPhiCent->SetBinEdges(2,fBinsPhi);
+  fMCRecSecPtEtaPhiCent->SetBinEdges(3,fBinsCentrality);
+  fMCRecSecPtEtaPhiCent->GetAxis(0)->SetTitle("MC Sec Pt (GeV/c)");
+  fMCRecSecPtEtaPhiCent->GetAxis(1)->SetTitle("MC Sec Eta");
+  fMCRecSecPtEtaPhiCent->GetAxis(2)->SetTitle("MC Phi");
+  fMCRecSecPtEtaPhiCent->GetAxis(3)->SetTitle("Centrality");
+  fMCRecSecPtEtaPhiCent->Sumw2();
   
   fPt = new TH1F("fPt","fPt",2000,0,200);
   fPt->GetXaxis()->SetTitle("p_{T} (GeV/c)");
@@ -657,9 +666,10 @@ void AlidNdPtAnalysisPbPbAOD::UserCreateOutputObjects()
   fOutputList->Add(fMCRecPrimZvPtEtaCent);
   fOutputList->Add(fMCGenZvPtEtaCent);
   fOutputList->Add(fMCRecSecZvPtEtaCent);
-  fOutputList->Add(fMCRecPrimDeltaphiPtEtaPhiCent);
-  fOutputList->Add(fMCGenDeltaphiPtEtaPhiCent);
-  fOutputList->Add(fMCRecSecDeltaphiPtEtaPhiCent);
+  fOutputList->Add(fMCPtEtaPhiCent);
+  fOutputList->Add(fMCRecPrimPtEtaPhiCent);
+  fOutputList->Add(fMCGenPtEtaPhiCent);
+  fOutputList->Add(fMCRecSecPtEtaPhiCent);
   fOutputList->Add(fMCPt);
   fOutputList->Add(fEventStatistics);
   fOutputList->Add(fEventStatisticsCentrality);
@@ -747,8 +757,11 @@ void AlidNdPtAnalysisPbPbAOD::UserExec(Option_t *option)
   Double_t dMCTrackZvPtEtaCent[4] = {0};
   Double_t dTrackZvPtEtaCent[4] = {0};
   
-  Double_t dMCTrackDeltaphiPtEtaPhiCent[4] = {0};
-  Double_t dTrackDeltaphiPtEtaPhiCent[4] = {0};
+  Double_t dMCTrackDeltaphiPtEtaPhiCent[5] = {0};
+  Double_t dTrackDeltaphiPtEtaPhiCent[5] = {0};
+  
+  Double_t dMCTrackPtEtaPhiCent[4] = {0};
+  Double_t dTrackPtEtaPhiCent[4] = {0};
   
   Double_t dDCA[2] = {0};
   
@@ -899,7 +912,13 @@ void AlidNdPtAnalysisPbPbAOD::UserExec(Option_t *option)
          dMCTrackDeltaphiPtEtaPhiCent[2] = mcPart->Eta();
          dMCTrackDeltaphiPtEtaPhiCent[3] = mcPart->Phi();
          dMCTrackDeltaphiPtEtaPhiCent[4] = dCentrality;
-         fMCGenDeltaphiPtEtaPhiCent->Fill(dMCTrackDeltaphiPtEtaPhiCent);
+         
+         dMCTrackPtEtaPhiCent[0] = mcPart->Pt();
+         dMCTrackPtEtaPhiCent[1] = mcPart->Eta();
+         dMCTrackPtEtaPhiCent[2] = mcPart->Phi();
+         dMCTrackPtEtaPhiCent[3] = dCentrality;
+         
+         fMCGenPtEtaPhiCent->Fill(dMCTrackPtEtaPhiCent);
          
          bEventHasATrack = kTRUE;
          
@@ -966,6 +985,12 @@ void AlidNdPtAnalysisPbPbAOD::UserExec(Option_t *option)
        dMCTrackDeltaphiPtEtaPhiCent[1] = 0;
        dMCTrackDeltaphiPtEtaPhiCent[2] = 0;
        dMCTrackDeltaphiPtEtaPhiCent[3] = 0;
+       dMCTrackDeltaphiPtEtaPhiCent[4] = 0;
+       
+       dMCTrackPtEtaPhiCent[0] = 0;
+       dMCTrackPtEtaPhiCent[1] = 0;
+       dMCTrackPtEtaPhiCent[2] = 0;
+       dMCTrackPtEtaPhiCent[3] = 0;
        
        bIsPrimary = kFALSE;
        
@@ -1014,6 +1039,11 @@ void AlidNdPtAnalysisPbPbAOD::UserExec(Option_t *option)
        dTrackDeltaphiPtEtaPhiCent[3] = track->Phi();
        dTrackDeltaphiPtEtaPhiCent[4] = dCentrality;
        
+       dTrackPtEtaPhiCent[0] = track->Pt();
+       dTrackPtEtaPhiCent[1] = track->Eta();
+       dTrackPtEtaPhiCent[2] = track->Phi();
+       dTrackPtEtaPhiCent[3] = dCentrality;
+       
        
        if( fIsMonteCarlo )
        {
@@ -1039,10 +1069,15 @@ void AlidNdPtAnalysisPbPbAOD::UserExec(Option_t *option)
          dMCTrackDeltaphiPtEtaPhiCent[3] = mcPart->Phi();
          dMCTrackDeltaphiPtEtaPhiCent[4] = dCentrality;
          
+         dMCTrackPtEtaPhiCent[0] = mcPart->Pt();
+         dMCTrackPtEtaPhiCent[1] = mcPart->Eta();
+         dMCTrackPtEtaPhiCent[2] = mcPart->Phi();
+         dMCTrackPtEtaPhiCent[3] = dCentrality;
+         
          if(bIsPrimary && bIsHijingParticle)
          {
                fMCRecPrimZvPtEtaCent->Fill(dMCTrackZvPtEtaCent);
-               fMCRecPrimDeltaphiPtEtaPhiCent->Fill(dMCTrackDeltaphiPtEtaPhiCent);
+               fMCRecPrimPtEtaPhiCent->Fill(dMCTrackPtEtaPhiCent);
                fMCDCAPtPrimary->Fill(dDCAxyDCAzPt);
          }
          
@@ -1057,7 +1092,7 @@ void AlidNdPtAnalysisPbPbAOD::UserExec(Option_t *option)
                  if(bMotherIsHijingParticle) // only store secondaries, which come from a not embedded signal!
                  {
                        fMCRecSecZvPtEtaCent->Fill(dMCTrackZvPtEtaCent);
-                       fMCRecSecDeltaphiPtEtaPhiCent->Fill(dMCTrackDeltaphiPtEtaPhiCent);
+                       fMCRecSecPtEtaPhiCent->Fill(dMCTrackPtEtaPhiCent);
                        fMCDCAPtSecondary->Fill(dDCAxyDCAzPt);
                        //        delete moth;
                  }
@@ -1086,6 +1121,8 @@ void AlidNdPtAnalysisPbPbAOD::UserExec(Option_t *option)
        fZvPtEtaCent->Fill(dTrackZvPtEtaCent);
        fDeltaphiPtEtaPhiCent->Fill(dTrackDeltaphiPtEtaPhiCent);
        
+       if(fIsMonteCarlo) fMCPtEtaPhiCent->Fill(dTrackPtEtaPhiCent);
+       
        fDCAPtAccepted->Fill(dDCAxyDCAzPt);
        
        if( (dTrackZvPtEtaCent[1] > GetCutPtMin()) &&
index 3239051519c85d7cb9e04bbf3f257d9fd6eb33b1..66a23b62698b378cc07c4af7bfca09d8df79a8c2 100644 (file)
@@ -188,9 +188,10 @@ class AlidNdPtAnalysisPbPbAOD : public AliAnalysisTaskSE {
     THnSparseF         *fMCRecPrimZvPtEtaCent; //-> MC Zv:Pt:Eta:Cent
     THnSparseF         *fMCGenZvPtEtaCent; //-> MC Zv:Pt:Eta:Cent
     THnSparseF         *fMCRecSecZvPtEtaCent; //-> MC Zv:Pt:Eta:Cent, only secondaries
-    THnSparseF         *fMCRecPrimDeltaphiPtEtaPhiCent; //-> MC Phi:Pt:Eta:Phi:Cent, was fMCRecPrimDeltaphiPtEtaCent
-    THnSparseF         *fMCGenDeltaphiPtEtaPhiCent; //-> MC Phi:Pt:Eta:Phi:Cent, was fMCGenDeltaphiPtEtaCent
-    THnSparseF         *fMCRecSecDeltaphiPtEtaPhiCent; //-> MC Phi:Pt:Eta:Phi:Cent, only secondaries, was fMCRecSecDeltaphiPtEtaCent
+    THnF               *fMCPtEtaPhiCent; //-> MC Pt:Eta:Phi:Cent
+    THnF               *fMCRecPrimPtEtaPhiCent; //-> MC Pt:Eta:Phi:Cent, was fMCRecPrimDeltaphiPtEtaCent
+    THnF               *fMCGenPtEtaPhiCent; //-> MC Pt:Eta:Phi:Cent, was fMCGenDeltaphiPtEtaCent
+    THnF               *fMCRecSecPtEtaPhiCent; //-> MC Pt:Eta:Phi:Cent, only secondaries, was fMCRecSecDeltaphiPtEtaCent
     TH1F           *fEventStatistics; // contains statistics of number of events after each cut
     TH1F        *fEventStatisticsCentrality; // contains number of events vs centrality, events need to have a track in kinematic range
     TH1F           *fMCEventStatisticsCentrality; // contains MC number of events vs centrality, events need to have a track in kinematic range
index 6e6fa07ee745ea601f275ce2714800de082cf7c2..f5f757cf1b1f1b444503e3596897033ebbe3bba2 100644 (file)
@@ -48,6 +48,10 @@ AlidNdPtAnalysisPbPbAOD *AddTask_dNdPt_PbPbAOD( UInt_t uTriggerMask = AliVEvent:
   Int_t nBinPtCheck = sizeof(binsPtCheck)/sizeof(Double_t);
   task->SetBinsPtCheck(nBinPtCheck, binsPtCheck);
   
+  Double_t binsPtCorr[] = {0.0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 200.0};
+  Int_t nBinPtCorr = sizeof(binsPtCorr)/sizeof(Double_t);
+  task->SetBinsPtCorr(nBinPtCorr, binsPtCorr);
+  
 //   Double_t binsPhi[] = {0 ,0.10472 ,0.20944 ,0.314159 ,0.418879 ,0.523599 ,0.628319 ,0.733038 ,0.837758 ,0.942478 ,1.0472 ,1.15192 ,1.25664 ,1.36136 ,1.46608 ,1.5708 ,1.67552 ,1.78024 ,1.88496 ,1.98968 ,2.0944 ,2.19911 ,2.30383 ,2.40855 ,2.51327 ,2.61799 ,2.72271 ,2.82743 ,2.93215 ,3.03687 ,3.14159 ,3.24631 ,3.35103 ,3.45575 ,3.56047 ,3.66519 ,3.76991 ,3.87463 ,3.97935 ,4.08407 ,4.18879 ,4.29351 ,4.39823 ,4.50295 ,4.60767 ,4.71239 ,4.81711 ,4.92183 ,5.02655 ,5.13127 ,5.23599 ,5.34071 ,5.44543 ,5.55015 ,5.65487 ,5.75959 ,5.86431 ,5.96903 ,6.07375 ,6.17847 ,6.28319};
   
 //   Double_t binsPhi[] = {-1.*TMath::Pi(), -2.97625, -2.8109, -2.64555, -2.4802, -2.31486, -2.14951, -1.98416, -1.81882, -1.65347, -1.48812, -1.32278, -1.15743, -0.992082, -0.826735, -0.661388, -0.496041, -0.330694, -0.165347, 0, 0.165347, 0.330694, 0.496041, 0.661388, 0.826735, 0.992082, 1.15743, 1.32278, 1.48812, 1.65347, 1.81882, 1.98416, 2.14951, 2.31486, 2.4802, 2.64555, 2.8109, 2.97625, TMath::Pi()};