]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
K0s analysis update (Matt Steinpries)
authorDhevan Raja Gangadharan <dhevan.raja.gangadharan@cern.ch>
Fri, 3 Jan 2014 14:00:11 +0000 (15:00 +0100)
committerDhevan Raja Gangadharan <dhevan.raja.gangadharan@cern.ch>
Fri, 3 Jan 2014 14:00:11 +0000 (15:00 +0100)
PWGCF/FEMTOSCOPY/K0Analysis/AliFemtoK0Analysis.cxx
PWGCF/FEMTOSCOPY/K0Analysis/AliFemtoK0Analysis.h

index 6f847980f5c6183a2608663ca037422f5d1581df..d681626f7ffc8d5c541d8646fd3384216407d8d5 100644 (file)
@@ -498,9 +498,6 @@ void AliFemtoK0Analysis::Exec(Option_t *)
   }
 
   
-  int zBin=0;
-  double zStep=2*10/double(kZVertexBins), zstart=-10.;
-
   /////////////////////////////////////////////////
 
 
@@ -564,13 +561,15 @@ void AliFemtoK0Analysis::Exec(Option_t *)
   if(vertex[0]<10e-5 && vertex[1]<10e-5 &&  vertex[2]<10e-5) return;
   if(fabs(vertex[2]) > 10) return; // Z-vertex Cut
 
+  int zBin=0;
+  double zStep=2*10/double(kZVertexBins), zStart=-10.;
   for(int i=0; i<kZVertexBins; i++)
   {
-    if((vertex[2] > zstart+i*zStep) && (vertex[2] < zstart+(i+1)*zStep))
-    {
-      zBin=i;
-      break;
-    }
+   if((vertex[2] > zStart+i*zStep) && (vertex[2] < zStart+(i+1)*zStep))
+   {
+    zBin=i;
+    break;
+   }
   }
   
   //Event plane
@@ -578,13 +577,20 @@ void AliFemtoK0Analysis::Exec(Option_t *)
   AliEventplane *eventplane = fAOD->GetEventplane();
   if(fPsiBinning && !eventplane) return;
   double psiEP = eventplane->GetEventplane("V0",fAOD,2); //[-PI/2,PI/2]
-  if(psiEP < -0.25*PI) psiBin = 0;
-  else if(psiEP < 0.0) psiBin = 1;
-  else if(psiEP < 0.25*PI) psiBin = 2;
-  else psiBin = 3;
-  if(!fPsiBinning) psiBin = 0;
   ((TH1F*)fOutputList->FindObject("fHistPsi"))->Fill(psiEP);
 
+  double psiStep = PI/double(kPsiBins);
+  double psiStart = -0.5*PI;
+  for(int i=0; i<kPsiBins; i++)
+  {
+   if((psiEP > psiStart+i*psiStep) && (psiEP < psiStart+(i+1)*psiStep))
+   {
+    psiBin = i;
+    break;
+   }
+  }
+  if(!fPsiBinning) psiBin = 0;
+
 ////////////////////////////////////////////////////////////////
 //Cut Values and constants
 
index 56f08e2b654f735b29cee1d84e0a8151246651fb..c1c9e8ab7c9249c5886a4d5c7b44b29132f32490 100644 (file)
@@ -50,7 +50,7 @@ class AliFemtoK0Analysis : public AliAnalysisTaskSE {
   {
     kCentBins    = 16,
     kZVertexBins = 10,
-    kPsiBins    = 4,
+    kPsiBins    = 9,
     kEventsToMix =  5,
     kMultLimit   = 300,              //maximum number of v0s, array size