Option to exclude cut on vertex in centrality selection cleaning
authordelia <delia@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Apr 2012 15:32:18 +0000 (15:32 +0000)
committerdelia <delia@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Apr 2012 15:32:18 +0000 (15:32 +0000)
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckCascadePbPb.cxx
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckCascadePbPb.h
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckPerformanceCascadePbPb.cxx
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckPerformanceCascadePbPb.h
PWGLF/STRANGENESS/Cascades/macros/AddTaskCheckCascadePbPb.C
PWGLF/STRANGENESS/Cascades/macros/AddTaskCheckPerformanceCascadePbPb.C
PWGLF/STRANGENESS/Cascades/macros/runGridCascadePbPb.C
PWGLF/STRANGENESS/Cascades/macros/runProofCascadePbPb.C

index 43fe184..5ff22b2 100644 (file)
@@ -106,6 +106,7 @@ AliAnalysisTaskCheckCascadePbPb::AliAnalysisTaskCheckCascadePbPb()
     fCentrLowLim                (0),
     fCentrUpLim                 (0),
     fCentrEstimator             (0),
+    fkUseCleaning               (0),
     fVtxRange                   (0),
 
 
@@ -196,6 +197,7 @@ AliAnalysisTaskCheckCascadePbPb::AliAnalysisTaskCheckCascadePbPb(const char *nam
     fCentrLowLim                (0),
     fCentrUpLim                 (0),
     fCentrEstimator             (0),
+    fkUseCleaning               (0),
     fVtxRange                   (0),
      
        // - Cascade part initialisation
@@ -1290,7 +1292,16 @@ void AliAnalysisTaskCheckCascadePbPb::UserExec(Option_t *) {
   fHistCascadeMultiplicityBeforeEvSel->Fill (ncascades);
  
   //  Printf("Centrality percentile V0M for this event %f)\n",  centrality->GetCentralityPercentile("V0M"));
-  Float_t lcentrality = centrality->GetCentralityPercentile(fCentrEstimator.Data());
+  Float_t lcentrality = 0.;
+
+  if (fkUseCleaning) lcentrality = centrality->GetCentralityPercentile(fCentrEstimator.Data());
+  else {
+    lcentrality = centrality->GetCentralityPercentileUnchecked(fCentrEstimator.Data());
+    if (centrality->GetQuality()>1) {
+      PostData(1, fListHistCascade);
+      return;
+    }
+  }
   if (lcentrality<fCentrLowLim||lcentrality>=fCentrUpLim) { 
     PostData(1, fListHistCascade);
     return;
index c0527bd..0467dbc 100644 (file)
@@ -60,6 +60,7 @@ class AliAnalysisTaskCheckCascadePbPb : public AliAnalysisTaskSE {
   void SetCentralityLowLim           (Float_t centrlowlim               = 0.   ) { fCentrLowLim                 = centrlowlim;                }  
   void SetCentralityUpLim            (Float_t centruplim                = 100. ) { fCentrUpLim                  = centruplim;                 }
   void SetCentralityEst              (TString   centrest                = "V0M") { fCentrEstimator              = centrest;                   }
+  void SetUseCleaning                (Bool_t   usecleaning              = kTRUE) { fkUseCleaning                = usecleaning;                }
   void SetVertexRange                (Float_t vtxrange                  = 0.   ) { fVtxRange                    = vtxrange;                   }
 
  private:
@@ -83,6 +84,7 @@ class AliAnalysisTaskCheckCascadePbPb : public AliAnalysisTaskSE {
         Float_t         fCentrLowLim;                   // Lower limit for centrality percentile selection
         Float_t         fCentrUpLim;                    // Upper limit for centrality percentile selection
         TString         fCentrEstimator;                // string for the centrality estimator
+        Bool_t          fkUseCleaning;                  // Boolean : kTRUE = uses all the cleaning criteria of centrality selections (vertex cut + outliers) otherwise only outliers
         Float_t         fVtxRange;                      // to select events with |zvtx|<fVtxRange cm
 
        
@@ -236,7 +238,7 @@ class AliAnalysisTaskCheckCascadePbPb : public AliAnalysisTaskSE {
   AliAnalysisTaskCheckCascadePbPb(const AliAnalysisTaskCheckCascadePbPb&);            // not implemented
   AliAnalysisTaskCheckCascadePbPb& operator=(const AliAnalysisTaskCheckCascadePbPb&); // not implemented
   
-  ClassDef(AliAnalysisTaskCheckCascadePbPb, 4);
+  ClassDef(AliAnalysisTaskCheckCascadePbPb, 5);
 };
 
 #endif
index 03b7c6d..3ff3d02 100644 (file)
@@ -92,7 +92,7 @@ AliAnalysisTaskCheckPerformanceCascadePbPb::AliAnalysisTaskCheckPerformanceCasca
     fkQualityCutnTPCcls            (kTRUE),
     fMinnTPCcls                    (0), 
     fkExtraSelections              (0),
-    fCentrLowLim(0),    fCentrUpLim(0), fCentrEstimator(0),
+    fCentrLowLim(0),    fCentrUpLim(0), fCentrEstimator(0), fkUseCleaning(0),
     fVtxRange                      (0),
     fApplyAccCut                   (0),
 
@@ -328,7 +328,7 @@ AliAnalysisTaskCheckPerformanceCascadePbPb::AliAnalysisTaskCheckPerformanceCasca
     fkQualityCutnTPCcls            (kTRUE),
     fMinnTPCcls                    (0),
     fkExtraSelections              (0),
-    fCentrLowLim(0), fCentrUpLim(0), fCentrEstimator(0),
+    fCentrLowLim(0), fCentrUpLim(0), fCentrEstimator(0), fkUseCleaning(0),
     fVtxRange                      (0),
     fApplyAccCut                   (0),
 
@@ -1924,7 +1924,16 @@ void AliAnalysisTaskCheckPerformanceCascadePbPb::UserExec(Option_t *) {
       //  Printf("Centrality percentile V0M for this event %f)\n",  centrality->GetCentralityPercentile("V0M"));
 
 
-        Float_t lcentrality = centrality->GetCentralityPercentile(fCentrEstimator.Data());
+        Float_t lcentrality = 0.;
+        
+        if (fkUseCleaning) lcentrality = centrality->GetCentralityPercentile(fCentrEstimator.Data());
+        else {
+          lcentrality = centrality->GetCentralityPercentileUnchecked(fCentrEstimator.Data());
+          if (centrality->GetQuality()>1) {
+            PostData(1, fListHistCascade);
+            return;
+          } 
+        }
         if (lcentrality<fCentrLowLim||lcentrality>=fCentrUpLim) {
           PostData(1, fListHistCascade);
           return;
index 8e91754..34a6c95 100644 (file)
@@ -46,6 +46,7 @@ class AliAnalysisTaskCheckPerformanceCascadePbPb : public AliAnalysisTaskSE {
   void SetCentralityLowLim           (Float_t centrlowlim               = 0.   ) { fCentrLowLim                   = centrlowlim;                }
   void SetCentralityUpLim            (Float_t centruplim                = 100. ) { fCentrUpLim                    = centruplim;                 }
   void SetCentralityEst              (TString centrest                  = "V0M") { fCentrEstimator                = centrest;                   }  
+  void SetUseCleaning                (Bool_t   usecleaning              = kTRUE) { fkUseCleaning                = usecleaning;                }
   void SetVertexRange                (Float_t vtxrange                  = 0.   ) { fVtxRange                      = vtxrange;                   }
   void SetApplyAccCut                (Bool_t acccut                     = kFALSE){ fApplyAccCut                   = acccut;                     }    
 
@@ -70,6 +71,7 @@ class AliAnalysisTaskCheckPerformanceCascadePbPb : public AliAnalysisTaskSE {
         Float_t         fCentrLowLim;                   // Lower limit for centrality percentile selection
         Float_t         fCentrUpLim;                    // Upper limit for centrality percentile selection
         TString         fCentrEstimator;                // String for the centrality estimator
+        Bool_t          fkUseCleaning;                  // Boolean : kTRUE = uses all the cleaning criteria of centrality selections (vertex cut + outliers) otherwise only outliers
         Float_t         fVtxRange;                      // to select events with |zvtx|<fVtxRange cm
         Bool_t          fApplyAccCut;                   // flag to apply acceptance cuts to MC cascades        
         
@@ -310,7 +312,7 @@ class AliAnalysisTaskCheckPerformanceCascadePbPb : public AliAnalysisTaskSE {
   AliAnalysisTaskCheckPerformanceCascadePbPb(const AliAnalysisTaskCheckPerformanceCascadePbPb&);            // not implemented
   AliAnalysisTaskCheckPerformanceCascadePbPb& operator=(const AliAnalysisTaskCheckPerformanceCascadePbPb&); // not implemented
   
-  ClassDef(AliAnalysisTaskCheckPerformanceCascadePbPb, 4);
+  ClassDef(AliAnalysisTaskCheckPerformanceCascadePbPb, 5);
 };
 
 #endif
index 733772b..d867afe 100644 (file)
@@ -1,7 +1,8 @@
-AliAnalysisTaskCheckCascadePbPb *AddTaskCheckCascadePbPb( Int_t    minnTPCcls          = 70,
+AliAnalysisTaskCheckCascadePbPb *AddTaskCheckCascadePbPb( Int_t    minnTPCcls          = 80,
                                                           Float_t  centrlowlim         = 0.,
                                                           Float_t  centruplim          = 90.,
                                                           TString  centrest            = "V0M",
+                                                          Bool_t   kusecleaning        = kTRUE, 
                                                           Float_t  vtxlim              = 10.,
                                                           Bool_t   kextrasel           = kFALSE,
                                                           Bool_t   krelaunchvertexers  = kFALSE) {
@@ -36,6 +37,7 @@ AliAnalysisTaskCheckCascadePbPb *AddTaskCheckCascadePbPb( Int_t    minnTPCcls
    taskcheckcascadepbpb->SetCentralityLowLim           (centrlowlim);       // setting centrality selection vriables
    taskcheckcascadepbpb->SetCentralityUpLim            (centruplim);
    taskcheckcascadepbpb->SetCentralityEst              (centrest);
+   taskcheckcascadepbpb->SetUseCleaning                (kusecleaning);
    taskcheckcascadepbpb->SetVertexRange                (vtxlim);
 
    taskcheckcascadepbpb->SelectCollisionCandidates();
index d076fd2..05781fb 100644 (file)
@@ -1,7 +1,8 @@
-AliAnalysisTaskCheckPerformanceCascadePbPb *AddTaskCheckPerformanceCascadePbPb( Int_t    minnTPCcls          = 70,
+AliAnalysisTaskCheckPerformanceCascadePbPb *AddTaskCheckPerformanceCascadePbPb( Int_t    minnTPCcls          = 80,
                                                                                 Float_t  centrlowlim         = 0.,
                                                                                 Float_t  centruplim          = 90.,
                                                                                 TString  centrest            = "V0M",
+                                                                                Bool_t   kusecleaning        = kTRUE,
                                                                                 Float_t  vtxlim              = 10.,
                                                                                 Bool_t   kextrasel           = kFALSE,
                                                                                 Bool_t   kacccut             = kFALSE,
@@ -39,6 +40,7 @@ AliAnalysisTaskCheckPerformanceCascadePbPb *AddTaskCheckPerformanceCascadePbPb(
    taskCheckPerfCascadePbPb-> SetCentralityLowLim           (centrlowlim);       // setting centrality selection vriables
    taskCheckPerfCascadePbPb-> SetCentralityUpLim            (centruplim);
    taskCheckPerfCascadePbPb-> SetCentralityEst              (centrest);
+   taskCheckPerfCascadePbPb-> SetUseCleaning                (kusecleaning);
    taskCheckPerfCascadePbPb-> SetVertexRange                (vtxlim);
  
    taskCheckPerfCascadePbPb->SelectCollisionCandidates();   
index cd13816..24f7bd0 100644 (file)
@@ -9,6 +9,7 @@ void runGridCascadePbPb( Bool_t   useMC               = kTRUE,  // kTRUE if anal
                          Float_t  centrlowlim         = 0.,
                          Float_t  centruplim          = 90.,
                          TString  centrest            = "V0M",
+                         Bool_t   kusecleaning        = kTRUE,
                          Float_t  vtxlim              = 10.,
                          Int_t minnTPCcls             = 70, 
                          Bool_t   kextrasel           = kFALSE,
@@ -91,12 +92,12 @@ void runGridCascadePbPb( Bool_t   useMC               = kTRUE,  // kTRUE if anal
   if (runperformancetask) {
     gROOT->LoadMacro("$ALICE_ROOT/PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckPerformanceCascadePbPb.cxx++g");
     gROOT->LoadMacro("$ALICE_ROOT/PWGLF/STRANGENESS/Cascades/macros/AddTaskCheckPerformanceCascadePbPb.C");
-    AliAnalysisTaskCheckPerformanceCascadePbPb *task = AddTaskCheckPerformanceCascadePbPb(minnTPCcls, centrlowlim, centruplim, centrest,vtxlim,kextrasel ,kacccut ,krelaunchvertexers);
+    AliAnalysisTaskCheckPerformanceCascadePbPb *task = AddTaskCheckPerformanceCascadePbPb(minnTPCcls, centrlowlim, centruplim, centrest, kusecleaning, vtxlim,kextrasel ,kacccut ,krelaunchvertexers);
 
   } else {
     gROOT->LoadMacro("$ALICE_ROOT/PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckCascadePbPb.cxx++g");
     gROOT->LoadMacro("$ALICE_ROOT/PWGLF/STRANGENESS/Cascades/macros/AddTaskCheckCascadePbPb.C");
-    AliAnalysisTaskCheckCascadePbPb *task = AddTaskCheckCascadePbPb(minnTPCcls, centrlowlim, centruplim, centrest,vtxlim,kextrasel ,krelaunchvertexers);
+    AliAnalysisTaskCheckCascadePbPb *task = AddTaskCheckCascadePbPb(minnTPCcls, centrlowlim, centruplim, centrest, kusecleaning, vtxlim, kextrasel ,krelaunchvertexers);
 
   }
  
index b4b177d..cd80f55 100644 (file)
@@ -11,6 +11,7 @@ void runProofCascadePbPb(
                      Float_t  centrlowlim       = 0., 
                      Float_t  centruplim        = 90., 
                      TString  centrest          = "V0M",
+                     Bool_t   kusecleaning      = kTRUE,
                      Float_t  vtxlim            = 10., 
                      Int_t    minnTPCcls        = 70,     
                      Bool_t   kextrasel         = kFALSE,
@@ -49,7 +50,7 @@ void runProofCascadePbPb(
 
   Analysis(dataset.Data(), outFileMC, outFileData, 
            useMC, nEvents, nEventsSkip,
-           minnTPCcls, centrlowlim, centruplim, centrest, 
+           minnTPCcls, centrlowlim, centruplim, centrest, kusecleaning,
            vtxlim, kextrasel,
            runperformancetask, kacccut, krelaunchvertexers);
 
@@ -58,7 +59,7 @@ void runProofCascadePbPb(
 //________________________________________________________________________
 void Analysis(TString dataset, TString outFileMC, TString outFileData, 
               Bool_t useMC, Int_t nEvents, Int_t nEventsSkip, 
-              Int_t minnTPCcls, Float_t centrlowlim, Float_t centruplim, TString centrest,
+              Int_t minnTPCcls, Float_t centrlowlim, Float_t centruplim, TString centrest, Bool_t kusecleaning,
               Float_t vtxlim, 
               Bool_t kextrasel, Bool_t runperformancetask, Bool_t kacccut, Bool_t krelaunchvertexers) {
 
@@ -101,12 +102,12 @@ void Analysis(TString dataset, TString outFileMC, TString outFileData,
   if (runperformancetask) {
     gROOT->LoadMacro("$ALICE_ROOT/PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckPerformanceCascadePbPb.cxx++g");
     gROOT->LoadMacro("$ALICE_ROOT/PWGLF/STRANGENESS/Cascades/macros/AddTaskCheckPerformanceCascadePbPb.C");
-    AliAnalysisTaskCheckPerformanceCascadePbPb *task = AddTaskCheckPerformanceCascadePbPb(minnTPCcls, centrlowlim, centruplim, centrest,vtxlim,kextrasel ,kacccut ,krelaunchvertexers);
+    AliAnalysisTaskCheckPerformanceCascadePbPb *task = AddTaskCheckPerformanceCascadePbPb(minnTPCcls, centrlowlim, centruplim, centrest, kusecleaning, vtxlim,kextrasel ,kacccut ,krelaunchvertexers);
   
   } else {
     gROOT->LoadMacro("$ALICE_ROOT/PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckCascadePbPb.cxx++g");
     gROOT->LoadMacro("$ALICE_ROOT/PWGLF/STRANGENESS/Cascades/macros/AddTaskCheckCascadePbPb.C");
-    AliAnalysisTaskCheckCascadePbPb *task = AddTaskCheckCascadePbPb(minnTPCcls, centrlowlim, centruplim, centrest,vtxlim,kextrasel ,krelaunchvertexers);
+    AliAnalysisTaskCheckCascadePbPb *task = AddTaskCheckCascadePbPb(minnTPCcls, centrlowlim, centruplim, centrest, kusecleaning, vtxlim,kextrasel ,krelaunchvertexers);
 
   }