]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
from naghmeh: adding AOD outlier cut for 2010 and 2011 data to flow event cuts
authorrbertens <rbertens@cern.ch>
Thu, 23 Jan 2014 16:09:53 +0000 (17:09 +0100)
committerrbertens <rbertens@cern.ch>
Thu, 23 Jan 2014 16:13:47 +0000 (17:13 +0100)
PWG/FLOW/Tasks/AliFlowEventCuts.cxx
PWG/FLOW/Tasks/AliFlowEventCuts.h
PWGCF/FLOW/macros/AddTaskFlowHigherOrdersAllPID.C

index 11eefa588ff4c8424446886ec964d9cc471af3ea..b1eb4f0178c45f8344173e883a26a9bb40337722 100644 (file)
@@ -1,5 +1,4 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
  * Author: The ALICE Off-line Project.                                    *
  * Contributors are mentioned in the code where appropriate.              *
@@ -42,6 +41,8 @@
 #include "AliTriggerAnalysis.h"
 #include "AliCollisionGeometry.h"
 #include "AliGenEventHeader.h"
+#include <iostream>
+using namespace std;
 
 ClassImp(AliFlowEventCuts)
 
@@ -89,7 +90,9 @@ AliFlowEventCuts::AliFlowEventCuts():
   fTrigAna(),
   fCutImpactParameter(kFALSE),
   fImpactParameterMin(0.0),
-  fImpactParameterMax(100.0)
+  fImpactParameterMax(100.0),
+  fhistTPCvsGlobalMult(0),
+  fData2011(kFALSE)
 {
   //constructor 
 }
@@ -138,7 +141,9 @@ AliFlowEventCuts::AliFlowEventCuts(const char* name, const char* title):
   fTrigAna(),
   fCutImpactParameter(kFALSE),
   fImpactParameterMin(0.0),
-  fImpactParameterMax(100.0)
+  fImpactParameterMax(100.0),
+  fhistTPCvsGlobalMult(0),
+  fData2011(kFALSE)
 {
   //constructor 
 }
@@ -185,6 +190,8 @@ AliFlowEventCuts::AliFlowEventCuts(const AliFlowEventCuts& that):
   fCentralityPercentileMin(that.fCentralityPercentileMin),
   fCutZDCtiming(that.fCutZDCtiming),
   fTrigAna(),
+  fhistTPCvsGlobalMult(that.fhistTPCvsGlobalMult),
+  fData2011(that.fData2011),
   fCutImpactParameter(that.fCutImpactParameter),
   fImpactParameterMin(that.fImpactParameterMin),
   fImpactParameterMax(that.fImpactParameterMax)
@@ -269,6 +276,8 @@ AliFlowEventCuts& AliFlowEventCuts::operator=(const AliFlowEventCuts& that)
   fCentralityPercentileMax=that.fCentralityPercentileMax;
   fCentralityPercentileMin=that.fCentralityPercentileMin;
   fCutZDCtiming=that.fCutZDCtiming;
+  fhistTPCvsGlobalMult=that.fhistTPCvsGlobalMult;
+  fData2011=that.fData2011;
   return *this;
 }
 
@@ -295,25 +304,31 @@ Bool_t AliFlowEventCuts::PassesCuts(AliVEvent *event, AliMCEvent *mcevent)
   AliAODEvent* aodevent = dynamic_cast<AliAODEvent*>(event);
   Int_t multTPC = 0;
   Int_t multGlobal = 0; 
+  multTPC = fStandardTPCcuts->Count(event);
+  multGlobal = fStandardGlobalCuts->Count(event);
   if (fQA)
   {
-    multTPC = fStandardTPCcuts->Count(event);
-    multGlobal = fStandardGlobalCuts->Count(event);
     QAbefore(0)->Fill(pvtxz);
     QAbefore(1)->Fill(multGlobal,multTPC);
   }
-  if (fCutTPCmultiplicityOutliers && esdevent)
+  if (  (fCutTPCmultiplicityOutliers && esdevent) ||  (fCutTPCmultiplicityOutliers && aodevent)  )
   {
     //this is pretty slow as we check the event track by track twice
     //this cut will work for 2010 PbPb data and is dependent on
     //TPC and ITS reco efficiency (e.g. geometry, calibration etc)
-    if (!fQA)
-    {
-      multTPC = fStandardTPCcuts->Count(event);
-      multGlobal = fStandardGlobalCuts->Count(event);
+    if(esdevent){
+      if (multTPC > ( 23+1.216*multGlobal)) {pass=kFALSE;}
+      if (multTPC < (-20+1.087*multGlobal)) {pass=kFALSE;}
     }
-    if (multTPC > ( 23+1.216*multGlobal)) {pass=kFALSE;}
-    if (multTPC < (-20+1.087*multGlobal)) {pass=kFALSE;}
+   
+    if(aodevent && fData2011){
+        if (multTPC > ( 62.87+1.78*multGlobal)) {pass=kFALSE;}
+        if (multTPC < (-36.73+1.48*multGlobal)) {pass=kFALSE;}
+      }
+    if(aodevent && ~fData2011){
+        if (multTPC > ( 32.1+1.59*multGlobal)) {pass=kFALSE;}
+        if (multTPC < (-40.3+1.22*multGlobal)) {pass=kFALSE;}
+      }
   }
   if (fCutNContributors)
   {
@@ -584,3 +599,4 @@ Long64_t AliFlowEventCuts::Merge(TCollection* list)
   return number;
 }
 
+
index 6ed557e5218d7c7ce93550a1d52484b4be06852d..ceddf83ee0b9220a19bfca4f7e421424b4f7646a 100644 (file)
@@ -31,7 +31,7 @@ class AliFlowEventCuts : public TNamed {
   AliFlowEventCuts(const AliFlowEventCuts& someCuts);
   AliFlowEventCuts& operator=(const AliFlowEventCuts& someCuts);
   virtual  ~AliFlowEventCuts();
-  
+   
   virtual Bool_t IsSelected(TObject* obj, TObject *objmc);
 
   Bool_t PassesCuts(AliVEvent* event, AliMCEvent *mcevent);
@@ -59,7 +59,7 @@ class AliFlowEventCuts : public TNamed {
   void SetCutSPDvertexerAnomaly(Bool_t b=kTRUE) {fCutSPDvertexerAnomaly=b;}
   void SetCutZDCtiming(Bool_t c=kTRUE) {fCutZDCtiming=c;}
   void SetCutSPDTRKVtxZ(Bool_t b=kTRUE) {fCutSPDTRKVtxZ=b;}
-  void SetCutTPCmultiplicityOutliers(Bool_t b=kTRUE) {fCutTPCmultiplicityOutliers=b;}
+  void SetCutTPCmultiplicityOutliers(Bool_t b=kTRUE) {fCutTPCmultiplicityOutliers=b;}  
 
   Int_t GetNumberOfTracksMax() const {return fNumberOfTracksMax;}
   Int_t GetNumberOfTracksMin() const {return fNumberOfTracksMin;}
@@ -87,9 +87,11 @@ class AliFlowEventCuts : public TNamed {
                                                                fCutCentralityPercentile=kTRUE; }
   void SetCentralityPercentileMethod( refMultMethod m) {fCentralityPercentileMethod=m;}
   void SetUseCentralityUnchecked(Bool_t b=kTRUE) {fUseCentralityUnchecked=b;}
-  
+  void SetUsedDataset(Bool_t b=kTRUE) {fData2011=b;}
   void Browse(TBrowser* b);
   Long64_t Merge(TCollection* list);  
+  TH2F *GetCorrelationTPCvsGlobalMultiplicity() {return fhistTPCvsGlobalMult;}  
+
 
  private:
   TList* fQA; //QA
@@ -134,6 +136,8 @@ class AliFlowEventCuts : public TNamed {
   Bool_t fCutImpactParameter; //cut on impact parameter (MC header)
   Double_t fImpactParameterMin; // min impact parameter
   Double_t fImpactParameterMax; // max impact parameter
+  TH2F *fhistTPCvsGlobalMult; //correlation between TPCMult and GlobalMult
+  Bool_t fData2011; //2011 data is used
 
   ClassDef(AliFlowEventCuts,4)
 };
index 150751a7bf969ef0a7ef8755cc260b1f9b4944d7..d72b7a001300972f5f2a2b236725851d8ff7f153 100644 (file)
@@ -1,29 +1,19 @@
-/////////////////////////////////////////////////////////////////////////////////////////////
-//
-// AddTask* macro for flow analysis
-// Creates a Flow Event task and adds it to the analysis manager.
-// Sets the cuts using the correction framework (CORRFW) classes.
-// Also creates Flow Analysis tasks and connects them to the output of the flow event task.
-//
-/////////////////////////////////////////////////////////////////////////////////////////////
-#include <stdio.h>
-#include <stdlib.h>
-
-void AddTaskFlowHigherOrdersAllPID(Int_t triggerSelectionString,
-                                  Float_t centrMin=0.,
-                                  Float_t centrMax=100.,
+void AddTaskFlowHigherOrdersAllPID(Int_t triggerSelectionString=AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral,
+                                   Float_t centrMin=0.,
+                                   Float_t centrMax=100.,
                                    Float_t etamin=-0.8,
                                    Float_t etamax=0.8,
-                                  TString fileNameBase="output",
-                                  TString uniqueStr="",
-                                  Int_t AODfilterBitRP = 768,
-                                  Int_t AODfilterBitPOI = 768,
-                                  Int_t charge=0,
-                                   Bool_t doQA=kFALSE,
-                                  Bool_t doPIDQA=kFALSE,
+                                   TString fileNameBase="output",
+                                   TString uniqueStr="",
+                                   Int_t AODfilterBitRP = 768,
+                                   Int_t AODfilterBitPOI = 768,
+                                   Int_t charge=0,
+                                   Bool_t doQA=kTRUE,
+                                   Bool_t doPIDQA=kFALSE,
                                    Bool_t isPID = kFALSE,
+                                   Bool_t is2011 = kTRUE,
                                    AliPID::EParticleType particleType=AliPID::kPion,
-                                   AliFlowTrackCuts::PIDsource sourcePID = AliFlowTrackCuts::kTOFbayesian) {
+                                   AliFlowTrackCuts::PIDsource sourcePID=AliFlowTrackCuts::kTOFbayesian) {
   // Define the range for eta subevents (for SP method)
   Double_t minA = -0.8;//
   Double_t maxA = 0.8;//
@@ -82,6 +72,7 @@ void AddTaskFlowHigherOrdersAllPID(Int_t triggerSelectionString,
   //===========================================================================
   // EVENTS CUTS:
   AliFlowEventCuts* cutsEvent = new AliFlowEventCuts("event cuts");
+  cutsEvent->SetUsedDataset(is2011);
   cutsEvent->SetCentralityPercentileRange(centrMin,centrMax);
   cutsEvent->SetCentralityPercentileMethod(AliFlowEventCuts::kV0);
 //  cutsEvent->SetRefMultMethod(AliFlowEventCuts::kVZERO);
@@ -90,7 +81,8 @@ void AddTaskFlowHigherOrdersAllPID(Int_t triggerSelectionString,
   cutsEvent->SetPrimaryVertexZrange(-10.,10.);
   cutsEvent->SetQA(doQA);
   cutsEvent->SetCutTPCmultiplicityOutliers();
-  
+
+
   // RP TRACK CUTS:
 //  AliFlowTrackCuts* cutsRP2 = AliFlowTrackCuts::GetStandardVZEROOnlyTrackCuts();
   AliFlowTrackCuts* cutsRP = new AliFlowTrackCuts("TPConlyRP");
@@ -391,3 +383,4 @@ void AddTaskFlowHigherOrdersAllPID(Int_t triggerSelectionString,
 
 }
 
+