Addded pPb vertex and pileup rejection,
authorhqvigsta <hqvigsta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 May 2013 10:38:38 +0000 (10:38 +0000)
committerhqvigsta <hqvigsta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 May 2013 10:38:38 +0000 (10:38 +0000)
as described in
https://twiki.cern.ch/twiki/bin/viewauth/ALICE/PAVertexSelectionStudies .

Author: Paul Batzing <pbatzing@cern.ch>
Signed-off-by: Henrik Qvigstad <henrik.qvigstad@cern.ch>

PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0Flow.cxx
PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0Flow.h

index 9e58cf2..3b84476 100644 (file)
@@ -54,6 +54,7 @@
 #include "TProfile.h"
 #include "AliOADBContainer.h"
 #include "AliEPFlattener.h"
+#include "AliAnalysisUtils.h"
 
 // Analysis task to fill histograms with PHOS ESD or AOD clusters and cells
 // Authors : Dmitri Peressounko
@@ -148,6 +149,7 @@ AliAnalysisTaskPi0Flow::AliAnalysisTaskPi0Flow(const char *name, Period period)
   fNonLinCorr = new TF1("nonlib",rnlin,0.,40.,0);
 
 
+
 }
 //___________________________________________________________________________
 AliAnalysisTaskPi0Flow::~AliAnalysisTaskPi0Flow()
@@ -2553,6 +2555,13 @@ Bool_t AliAnalysisTaskPi0Flow::RejectEventVertex()
     return true; // reject
   LogSelection(2, fInternalRunNumber);
 
+  if( kLHC13 == fPeriod ) {//pPb vertex and pileup cut
+    const bool vertexSelected = GetAnalysisUtils()->IsVertexSelected2013pA(fEvent);
+    if(! vertexSelected ) return true;//reject
+    const bool pileupSelected = GetAnalysisUtils()->IsPileUpEvent(fEvent);
+    if(! pileupSelected ) return true;//reject   
+  }
+
   return false; // accept event.
 }
 
@@ -2842,3 +2851,15 @@ Bool_t AliAnalysisTaskPi0Flow::TestCoreLambda(Double_t pt,Double_t l1,Double_t l
               0.5*c*(l1-l1Mean)*(l2-l2Mean)/l1Sigma/l2Sigma ;
   return (R2<2.5*2.5) ;  
 }
+
+
+AliAnalysisUtils* AliAnalysisTaskPi0Flow::GetAnalysisUtils()
+{
+  static AliAnalysisUtils* utils = 0x0;
+  if(utils) 
+    return utils;
+
+  utils = new AliAnalysisUtils();
+
+  return utils;
+}
index b966977..a81f213 100644 (file)
@@ -24,6 +24,7 @@ class AliPHOSCalibData;
 class AliESDtrack ;
 class AliESDCaloCluster ;
 class AliEPFlattener;
+class AliAnalysisUtils;
 
 #include "TArrayD.h"
 
@@ -135,7 +136,7 @@ protected:
     UInt_t GetNumberOfCentralityBins() { return fCentEdges.GetSize()-1; }
     TList* GetCaloPhotonsPHOSList(UInt_t vtxBin, UInt_t centBin, UInt_t rpBin);
     
-
+    AliAnalysisUtils* GetAnalysisUtils();
 
 
 protected:
@@ -204,6 +205,7 @@ protected:
     TVector3 fVertexVector;
     Int_t fVtxBin;
 
+
     // Step 4: Centrality
     Float_t fCentralityV0M ; //!Centrality of the currecnt event
     Int_t fCentBin ;       //! Current centrality bin