Mods for running with different Z-vertex cuts
authordelia <delia@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 10 Nov 2012 17:20:29 +0000 (17:20 +0000)
committerdelia <delia@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 10 Nov 2012 17:20:29 +0000 (17:20 +0000)
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckCascadepp276.cxx
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckCascadepp276.h
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckPerformanceCascadepp276.cxx
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckPerformanceCascadepp276.h
PWGLF/STRANGENESS/Cascades/macros/AddTaskCheckCascadepp276.C
PWGLF/STRANGENESS/Cascades/macros/AddTaskCheckPerformanceCascadepp276.C

index 3f89451..0ca2492 100644 (file)
@@ -95,6 +95,7 @@ class AliAODv0;
 
 #include "AliAnalysisTaskCheckCascadepp276.h"
 
+
 using std::cout;
 using std::endl;
 
@@ -109,15 +110,17 @@ AliAnalysisTaskCheckCascadepp276::AliAnalysisTaskCheckCascadepp276()
     fESDtrackCuts               (0),
     fPIDResponse                (0),
     fkRerunV0CascVertexers      (0),
+    fkSDDSelectionOn            (kTRUE),
     fkQualityCutZprimVtxPos     (kTRUE),
     fkQualityCutNoTPConlyPrimVtx(kTRUE),
     fkQualityCutTPCrefit        (kTRUE),
     fkQualityCutnTPCcls         (kTRUE),
     fkQualityCutPileup          (kTRUE),
-    fkSDDonSelection            (kTRUE),
+    fwithSDD                    (kTRUE),
     fMinnTPCcls                 (0),
     fkExtraSelections           (0),
     fVtxRange                   (0),
+    fVtxRangeMin                (0),
     fMinPtCutOnDaughterTracks   (0),
     fEtaCutOnDaughterTracks     (0),
 
@@ -201,15 +204,17 @@ AliAnalysisTaskCheckCascadepp276::AliAnalysisTaskCheckCascadepp276(const char *n
     fESDtrackCuts               (0), 
     fPIDResponse                (0),
     fkRerunV0CascVertexers      (0),
+    fkSDDSelectionOn            (kTRUE),
     fkQualityCutZprimVtxPos     (kTRUE),
     fkQualityCutNoTPConlyPrimVtx(kTRUE),
     fkQualityCutTPCrefit        (kTRUE),
     fkQualityCutnTPCcls         (kTRUE),
     fkQualityCutPileup          (kTRUE),
-    fkSDDonSelection            (kTRUE),
+    fwithSDD                    (kTRUE),
     fMinnTPCcls                 (0),
     fkExtraSelections           (0),
     fVtxRange                   (0),
+    fVtxRangeMin                (0),
     fMinPtCutOnDaughterTracks   (0),
     fEtaCutOnDaughterTracks     (0),
      
@@ -986,9 +991,10 @@ void AliAnalysisTaskCheckCascadepp276::UserExec(Option_t *) {
   Int_t nTrackMultiplicityAfterSDDSel = 0;
   // - Selection for ESD and AOD
   if (fAnalysisType == "ESD") {
-      TString trcl = lESDevent->GetFiredTriggerClasses();
-      //cout<<"Fired Trigger Classes: "<<trcl<<endl;
-      if (fkSDDonSelection){
+     if (fkSDDSelectionOn) {
+        TString trcl = lESDevent->GetFiredTriggerClasses();
+        //cout<<"Fired Trigger Classes: "<<trcl<<endl;
+        if (fwithSDD){
           if(!(trcl.Contains("ALLNOTRD"))) {
                cout<<"We are selecting events with SDD turn ON. This event has the SDD turn OFF. =>  RETURN!! (Exclude it)..."<<endl;
                PostData(1, fListHistCascade);
@@ -999,7 +1005,7 @@ void AliAnalysisTaskCheckCascadepp276::UserExec(Option_t *) {
                PostData(6, fCFContCascadeCuts);
                return;
           }
-      } else if (!fkSDDonSelection){
+        } else if (!fwithSDD){
           if((trcl.Contains("ALLNOTRD"))) {
                cout<<"We are selecting events with SDD turn OFF. This event has the SDD turn ON. =>  RETURN!! (Exclude it)..."<<endl;
                PostData(1, fListHistCascade);
@@ -1010,13 +1016,15 @@ void AliAnalysisTaskCheckCascadepp276::UserExec(Option_t *) {
                PostData(6, fCFContCascadeCuts);
                return;
           }
-      }
-      // - Take the number of cascades and tracks after the SDD selection
-      ncascadesAfterSDDSel = lESDevent->GetNumberOfCascades();
-      nTrackMultiplicityAfterSDDSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
+        }
+     }
+     // - Take the number of cascades and tracks after the SDD selection
+     ncascadesAfterSDDSel = lESDevent->GetNumberOfCascades();
+     nTrackMultiplicityAfterSDDSel = fESDtrackCuts->GetReferenceMultiplicity(lESDevent,AliESDtrackCuts::kTrackletsITSTPC,0.5);
   } else if (fAnalysisType == "AOD") {
-      TString trcl = lAODevent->GetFiredTriggerClasses();
-      if (fkSDDonSelection){
+     if (fkSDDSelectionOn) {
+        TString trcl = lAODevent->GetFiredTriggerClasses();
+        if (fwithSDD){
            if(!(trcl.Contains("ALLNOTRD"))) {
                 PostData(1, fListHistCascade);
                 PostData(2, fCFContCascadePIDXiMinus);
@@ -1027,7 +1035,7 @@ void AliAnalysisTaskCheckCascadepp276::UserExec(Option_t *) {
                 cout<<"We are selecting events with SDD turn ON. This event has the SDD turn OFF. =>  RETURN!! (Exclude it)..."<<endl;
                 return;
            }
-      } else if (!fkSDDonSelection) {
+        } else if (!fwithSDD) {
            if((trcl.Contains("ALLNOTRD"))) {
                 PostData(1, fListHistCascade);
                 PostData(2, fCFContCascadePIDXiMinus);
@@ -1038,10 +1046,11 @@ void AliAnalysisTaskCheckCascadepp276::UserExec(Option_t *) {
                 cout<<"We are selecting events with SDD turn OFF. This event has the SDD turn ON. =>  RETURN!! (Exclude it)..."<<endl;
                 return;
            }
-      }
-      // - Take the number of cascades and tracks after the SDD selection
-      ncascadesAfterSDDSel = lAODevent->GetNumberOfCascades();
-      nTrackMultiplicityAfterSDDSel = -100; //FIXME: I can't find the equivalent method for the AOD
+        }
+     }
+     // - Take the number of cascades and tracks after the SDD selection
+     ncascadesAfterSDDSel = lAODevent->GetNumberOfCascades();
+     nTrackMultiplicityAfterSDDSel = -100; //FIXME: I can't find the equivalent method for the AOD
   }
   // - Fill the plots
   fHistCascadeMultiplicityAfterSDDSel->Fill(ncascadesAfterSDDSel);
@@ -1146,7 +1155,7 @@ void AliAnalysisTaskCheckCascadepp276::UserExec(Option_t *) {
       //if(TMath::Abs(lMagneticField ) < 10e-6) continue;
       // - Selection on the primary vertex Z position 
       if (fkQualityCutZprimVtxPos) {
-          if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange ) {
+          if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {
                AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
                PostData(1, fListHistCascade);
                PostData(2, fCFContCascadePIDXiMinus);
@@ -1187,7 +1196,7 @@ void AliAnalysisTaskCheckCascadepp276::UserExec(Option_t *) {
       //if(TMath::Abs(lMagneticField ) < 10e-6) continue;
       // - Selection on the primary vertex Z position 
       if (fkQualityCutZprimVtxPos) {
-          if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange ) {
+          if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {
               AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
               PostData(1, fListHistCascade);
               PostData(2, fCFContCascadePIDXiMinus);
index e3c37d8..e1ce31e 100644 (file)
@@ -15,6 +15,7 @@
 //                Adapted to Cascade : A.Maire Mar2008, antonin.maire@ires.in2p3.fr
 //                Modified :           A.Maire Mar2010, antonin.maire@ires.in2p3.fr
 //                Modified for PbPb analysis: M. Nicassio Feb 2011, maria.nicassio@ba.infn.it
+//                Modified for pp2.76 analysis: D. Colella Feb2012, domenico.colella@ba.infn.it
 //-----------------------------------------------------------------
 
 class TList;
@@ -59,15 +60,17 @@ class AliAnalysisTaskCheckCascadepp276 : public AliAnalysisTaskSE {
   
   void SetAnalysisType               (const char* analysisType          = "ESD") { fAnalysisType                = analysisType;               }
   void SetRelaunchV0CascVertexers    (Bool_t rerunV0CascVertexers       = 0    ) { fkRerunV0CascVertexers       = rerunV0CascVertexers;       }
+  void SetSDDSelection               (Bool_t sddOnSelection             = kTRUE) { fkSDDSelectionOn             = sddOnSelection;             }
   void SetQualityCutZprimVtxPos      (Bool_t qualityCutZprimVtxPos      = kTRUE) { fkQualityCutZprimVtxPos      = qualityCutZprimVtxPos;      }
   void SetQualityCutNoTPConlyPrimVtx (Bool_t qualityCutNoTPConlyPrimVtx = kTRUE) { fkQualityCutNoTPConlyPrimVtx = qualityCutNoTPConlyPrimVtx; }
   void SetQualityCutTPCrefit         (Bool_t qualityCutTPCrefit         = kTRUE) { fkQualityCutTPCrefit         = qualityCutTPCrefit;         }
   void SetQualityCutnTPCcls          (Bool_t qualityCutnTPCcls          = kTRUE) { fkQualityCutnTPCcls          = qualityCutnTPCcls;          }
   void SetQualityCutPileup           (Bool_t qualityCutPileup           = kTRUE) { fkQualityCutPileup           = qualityCutPileup;           }
-  void SetSDDSelection               (Bool_t sddOnSelection             = kTRUE) { fkSDDonSelection             = sddOnSelection;             }
+  void SetWithSDDOn                  (Bool_t withsddOn                  = kTRUE) { fwithSDD                     = withsddOn;                  }
   void SetQualityCutMinnTPCcls       (Int_t  minnTPCcls                 = 70   ) { fMinnTPCcls                  = minnTPCcls;                 }
   void SetExtraSelections            (Bool_t extraSelections            = 0    ) { fkExtraSelections            = extraSelections;            }
   void SetVertexRange                (Float_t vtxrange                  = 0.   ) { fVtxRange                    = vtxrange;                   }
+  void SetVertexRangeMin             (Float_t vtxrangemin               = 0.   ) { fVtxRangeMin                 = vtxrangemin;                }
   void SetMinptCutOnDaughterTracks   (Float_t minptdaughtrks            = 0.   ) { fMinPtCutOnDaughterTracks    = minptdaughtrks;             }
   void SetEtaCutOnDaughterTracks     (Float_t etadaughtrks              = 0.   ) { fEtaCutOnDaughterTracks      = etadaughtrks;               }
 
@@ -79,19 +82,20 @@ class AliAnalysisTaskCheckCascadepp276 : public AliAnalysisTaskSE {
 
         TString         fAnalysisType;                  // "ESD" or "AOD" analysis type        
         AliESDtrackCuts *fESDtrackCuts;                 // ESD track cuts used for primary track definition
-        //TPaveText       *fPaveTextBookKeeping;          // TString to store all the relevant info necessary for book keeping (v0 cuts, cascade cuts, quality cuts, ...)
         AliPIDResponse  *fPIDResponse;                  //! PID response object
 
         Bool_t          fkRerunV0CascVertexers;         // Boolean : kTRUE = relaunch both V0 + Cascade vertexers
+        Bool_t          fkSDDSelectionOn;               // Boolena : kTRUE = select events with SDD on
         Bool_t          fkQualityCutZprimVtxPos;        // Boolean : kTRUE = cut on the prim.vtx  z-position
         Bool_t          fkQualityCutNoTPConlyPrimVtx;   // Boolean : kTRUE = prim vtx should be SPD or Tracking vertex
         Bool_t          fkQualityCutTPCrefit;           // Boolean : kTRUE = ask for TPCrefit for the 3 daughter tracks
         Bool_t          fkQualityCutnTPCcls;            // Boolean : kTRUE = ask for fMinnTPCcls TPC clusters for each daughter track
         Bool_t          fkQualityCutPileup;             // Boolean : kTRUE = ask for No Pileup events
-        Bool_t          fkSDDonSelection;               // Boolena : kTRUE = select events with SDD on
+        Bool_t          fwithSDD;                       // Boolean : kTRUE = select events with SDD reco
         Int_t           fMinnTPCcls;                    // Minimum number of TPC cluster for daughter tracks
         Bool_t          fkExtraSelections;              // Boolean : kTRUE = apply tighter selections, before starting the analysis
         Float_t         fVtxRange;                      // to select events with |zvtx|<fVtxRange cm
+        Float_t         fVtxRangeMin;                   // to select events with |zvtx|>fVtxRangeMin cm
         Float_t         fMinPtCutOnDaughterTracks;      // minimum pt cut on daughter tracks
         Float_t         fEtaCutOnDaughterTracks;        // pseudorapidity cut on daughter tracks
        
index f15c9e7..23d837e 100644 (file)
@@ -98,14 +98,17 @@ AliAnalysisTaskCheckPerformanceCascadepp276::AliAnalysisTaskCheckPerformanceCasc
     fESDtrackCuts                  (0), 
     fPIDResponse                   (0),
     fkRerunV0CascVertexers         (0),
+    fkSDDselectionOn               (kTRUE),
     fkQualityCutZprimVtxPos        (kTRUE),
     fkRejectEventPileUp            (kTRUE),
     fkQualityCutNoTPConlyPrimVtx   (kTRUE),
     fkQualityCutTPCrefit           (kTRUE),
     fkQualityCutnTPCcls            (kTRUE),
+    fwithSDD                       (kTRUE),
     fMinnTPCcls                    (0),
     fkExtraSelections              (0),
     fVtxRange                      (0),
+    fVtxRangeMin                   (0),
     fApplyAccCut                   (0),
     fMinPtCutOnDaughterTracks      (0),
     fEtaCutOnDaughterTracks        (0),
@@ -293,14 +296,17 @@ AliAnalysisTaskCheckPerformanceCascadepp276::AliAnalysisTaskCheckPerformanceCasc
     fESDtrackCuts                  (0),
     fPIDResponse                   (0),
     fkRerunV0CascVertexers         (0),
+    fkSDDselectionOn               (kTRUE),
     fkQualityCutZprimVtxPos        (kTRUE),
     fkRejectEventPileUp            (kTRUE),
     fkQualityCutNoTPConlyPrimVtx   (kTRUE),
     fkQualityCutTPCrefit           (kTRUE),
     fkQualityCutnTPCcls            (kTRUE),
+    fwithSDD                       (kTRUE),
     fMinnTPCcls                    (0),
     fkExtraSelections              (0),
     fVtxRange                      (0),
+    fVtxRangeMin                   (0),
     fApplyAccCut                   (0),
     fMinPtCutOnDaughterTracks      (0),
     fEtaCutOnDaughterTracks        (0),
@@ -1492,41 +1498,42 @@ void AliAnalysisTaskCheckPerformanceCascadepp276::UserExec(Option_t *) {
    //----------------
    // - SDD selection
    //----------------
-   //NOT NEEDED IN MC
    // - Define variables
    Int_t  ncascadesAfterSDDSel          = -1; //number of cascades after SDD selection
    Int_t  nTrackMultiplicityAfterSDDSel = -1; //number of tracks after SDD selection
-   /*TString trcl = " ";
-   trcl = lESDevent->GetFiredTriggerClasses();
-   if (fAnalysisType == "ESD") trcl = lESDevent->GetFiredTriggerClasses();
-   else if (fAnalysisType == "AOD") trcl = lAODevent->GetFiredTriggerClasses();
-   if (fkSDDonSelection){   // ---> Select event with SDD ON
-        if(!(trcl.Contains("ALLNOTRD"))) {
-            PostData(1, fListHistCascade);
-            PostData(2, fCFContCascadePIDAsXiMinus);
-            PostData(3, fCFContCascadePIDAsXiPlus);
-            PostData(4, fCFContCascadePIDAsOmegaMinus);
-            PostData(5, fCFContCascadePIDAsOmegaPlus);
-            PostData(6, fCFContAsCascadeCuts);
-            cout<<"Bad event: SDD turn OFF =>  RETURN!! (Exclude it)..."<<endl;
-            return;
-        } else {
-            cout<<"Good event: SDD turn ON."<<endl;
-        }
-   } else if (!fkSDDonSelection){  // ---> Select event with SDD OFF
-        if((trcl.Contains("ALLNOTRD"))) {
-            PostData(1, fListHistCascade);
-            PostData(2, fCFContCascadePIDAsXiMinus);
-            PostData(3, fCFContCascadePIDAsXiPlus);
-            PostData(4, fCFContCascadePIDAsOmegaMinus);
-            PostData(5, fCFContCascadePIDAsOmegaPlus);
-            PostData(6, fCFContAsCascadeCuts);
-            cout<<"Bad event:  SDD turn ON =>  RETURN!! (Exclude it)..."<<endl;
-            return;
-        } else {
-            cout<<"Good event: SDD turn OFF."<<endl;
+   if (fkSDDselectionOn) {
+        TString trcl = " ";
+        trcl = lESDevent->GetFiredTriggerClasses();
+        if (fAnalysisType == "ESD") trcl = lESDevent->GetFiredTriggerClasses();
+        else if (fAnalysisType == "AOD") trcl = lAODevent->GetFiredTriggerClasses();
+        if (fwithSDD){   // ---> Select event with SDD ON
+            if(!(trcl.Contains("ALLNOTRD"))) {
+                 PostData(1, fListHistCascade);
+                 PostData(2, fCFContCascadePIDAsXiMinus);
+                 PostData(3, fCFContCascadePIDAsXiPlus);
+                 PostData(4, fCFContCascadePIDAsOmegaMinus);
+                 PostData(5, fCFContCascadePIDAsOmegaPlus);
+                 PostData(6, fCFContAsCascadeCuts);
+                 cout<<"Bad event: SDD turn OFF =>  RETURN!! (Exclude it)..."<<endl;
+                 return;
+            } else {
+                 cout<<"Good event: SDD turn ON."<<endl;
+            }
+        } else if (!fwithSDD){  // ---> Select event with SDD OFF
+            if((trcl.Contains("ALLNOTRD"))) {
+                 PostData(1, fListHistCascade);
+                 PostData(2, fCFContCascadePIDAsXiMinus);
+                 PostData(3, fCFContCascadePIDAsXiPlus);
+                 PostData(4, fCFContCascadePIDAsOmegaMinus);
+                 PostData(5, fCFContCascadePIDAsOmegaPlus);
+                 PostData(6, fCFContAsCascadeCuts);
+                 cout<<"Bad event:  SDD turn ON =>  RETURN!! (Exclude it)..."<<endl;
+                 return;
+            } else {
+                 cout<<"Good event: SDD turn OFF."<<endl;
+            }
         }
-   }*/
+   }
    // - Take the number of cascades and tracks after the SDD selection
    if (fAnalysisType == "ESD") {
        Int_t lMultiplicity = -100;
@@ -1725,15 +1732,15 @@ void AliAnalysisTaskCheckPerformanceCascadepp276::UserExec(Option_t *) {
        lMagneticField = lESDevent->GetMagneticField();
        // - Selection on the primary vertex Z position 
        if (fkQualityCutZprimVtxPos) {
-          if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange ) {
-               AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
-               PostData(1, fListHistCascade);
-               PostData(2, fCFContCascadePIDAsXiMinus);
-               PostData(3, fCFContCascadePIDAsXiPlus);
-               PostData(4, fCFContCascadePIDAsOmegaMinus);
-               PostData(5, fCFContCascadePIDAsOmegaPlus);
-               PostData(6, fCFContAsCascadeCuts);
-               return;
+           if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange || TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {
+                AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
+                PostData(1, fListHistCascade);
+                PostData(2, fCFContCascadePIDAsXiMinus);
+                PostData(3, fCFContCascadePIDAsXiPlus);
+                PostData(4, fCFContCascadePIDAsOmegaMinus);
+                PostData(5, fCFContCascadePIDAsOmegaPlus);
+                PostData(6, fCFContAsCascadeCuts);
+                return;
           }
        }
        // - Take the number of cascades and tracks after vertex Z position selection
@@ -1765,15 +1772,15 @@ void AliAnalysisTaskCheckPerformanceCascadepp276::UserExec(Option_t *) {
        lMagneticField = lAODevent->GetMagneticField();
        // - Selection on the primary vertex Z position 
        if (fkQualityCutZprimVtxPos) {
-           if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange ) {
-               AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
-               PostData(1, fListHistCascade);
-               PostData(2, fCFContCascadePIDAsXiMinus);
-               PostData(3, fCFContCascadePIDAsXiPlus);
-               PostData(4, fCFContCascadePIDAsOmegaMinus);
-               PostData(5, fCFContCascadePIDAsOmegaPlus);
-               PostData(6, fCFContAsCascadeCuts);
-               return;
+           if (TMath::Abs(lBestPrimaryVtxPos[2]) > fVtxRange && TMath::Abs(lBestPrimaryVtxPos[2]) < fVtxRangeMin) {
+                AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
+                PostData(1, fListHistCascade);
+                PostData(2, fCFContCascadePIDAsXiMinus);
+                PostData(3, fCFContCascadePIDAsXiPlus);
+                PostData(4, fCFContCascadePIDAsOmegaMinus);
+                PostData(5, fCFContCascadePIDAsOmegaPlus);
+                PostData(6, fCFContAsCascadeCuts);
+                return;
            }
        }
        // - Take the number of cascades and tracks after vertex Z position selection
index 38133c5..86bc02e 100644 (file)
@@ -9,6 +9,7 @@
 // //            It works with MC info and ESD and AOD tree 
 // //            Origin   : A.Maire Jan2010, antonin.maire@ires.in2p3.fr
 // //            Modified : M.Nicassio Feb2011, maria.nicassio@ba.infn.it
+// //            Modified : D. Colella Feb2012, domenico.colella@ba.infn.it
 // //-----------------------------------------------------------------
 
 class TList;
@@ -37,19 +38,21 @@ class AliAnalysisTaskCheckPerformanceCascadepp276 : public AliAnalysisTaskSE {
   
   void SetAnalysisType     (const char* analysisType    = "ESD") { fAnalysisType     = analysisType;}
   
-  void SetRelaunchV0CascVertexers    (Bool_t rerunV0CascVertexers       = 0    ) { fkRerunV0CascVertexers        = rerunV0CascVertexers;      }
-  void SetQualityCutZprimVtxPos      (Bool_t qualityCutZprimVtxPos      = kTRUE) { fkQualityCutZprimVtxPos       = qualityCutZprimVtxPos;     }
-  void SetRejectEventPileUp          (Bool_t rejectPileUp               = kTRUE) { fkRejectEventPileUp           = rejectPileUp;              }
-  void SetQualityCutNoTPConlyPrimVtx (Bool_t qualityCutNoTPConlyPrimVtx = kTRUE) { fkQualityCutNoTPConlyPrimVtx  = qualityCutNoTPConlyPrimVtx;}
-  void SetQualityCutTPCrefit         (Bool_t qualityCutTPCrefit         = kTRUE) { fkQualityCutTPCrefit          = qualityCutTPCrefit;        }
-  void SetQualityCutnTPCcls          (Bool_t qualityCutnTPCcls          = kTRUE) { fkQualityCutnTPCcls           = qualityCutnTPCcls;         }
-  void SetSDDSelection               (Bool_t sddOnSelection             = kTRUE) { fkSDDonSelection              = sddOnSelection;            }
-  void SetQualityCutMinnTPCcls       (Int_t minnTPCcls                  = 70   ) { fMinnTPCcls                   = minnTPCcls;                }
-  void SetExtraSelections            (Bool_t extraSelections            = 0    ) { fkExtraSelections             = extraSelections;           }
-  void SetVertexRange                (Float_t vtxrange                  = 0.   ) { fVtxRange                     = vtxrange;                  }
-  void SetApplyAccCut                (Bool_t acccut                     = kFALSE){ fApplyAccCut                  = acccut;                    }    
-  void SetMinptCutOnDaughterTracks   (Float_t minptdaughtrks            = 0.   ) { fMinPtCutOnDaughterTracks     = minptdaughtrks;            }
-  void SetEtaCutOnDaughterTracks     (Float_t etadaughtrks              = 0.   ) { fEtaCutOnDaughterTracks       = etadaughtrks;              }
+  void SetRelaunchV0CascVertexers    (Bool_t  rerunV0CascVertexers       = 0    ) { fkRerunV0CascVertexers        = rerunV0CascVertexers;      }
+  void SetSDDSelection               (Bool_t  sddOnSelection             = kTRUE) { fkSDDselectionOn              = sddOnSelection;            }
+  void SetQualityCutZprimVtxPos      (Bool_t  qualityCutZprimVtxPos      = kTRUE) { fkQualityCutZprimVtxPos       = qualityCutZprimVtxPos;     }
+  void SetRejectEventPileUp          (Bool_t  rejectPileUp               = kTRUE) { fkRejectEventPileUp           = rejectPileUp;              }
+  void SetQualityCutNoTPConlyPrimVtx (Bool_t  qualityCutNoTPConlyPrimVtx = kTRUE) { fkQualityCutNoTPConlyPrimVtx  = qualityCutNoTPConlyPrimVtx;}
+  void SetQualityCutTPCrefit         (Bool_t  qualityCutTPCrefit         = kTRUE) { fkQualityCutTPCrefit          = qualityCutTPCrefit;        }
+  void SetQualityCutnTPCcls          (Bool_t  qualityCutnTPCcls          = kTRUE) { fkQualityCutnTPCcls           = qualityCutnTPCcls;         }
+  void SetWithSDDOn                  (Bool_t  withsddOn                  = kTRUE) { fwithSDD                      = withsddOn;                 }
+  void SetQualityCutMinnTPCcls       (Int_t   minnTPCcls                 = 70   ) { fMinnTPCcls                   = minnTPCcls;                }
+  void SetExtraSelections            (Bool_t  extraSelections            = 0    ) { fkExtraSelections             = extraSelections;           }
+  void SetVertexRange                (Float_t vtxrange                   = 0.   ) { fVtxRange                     = vtxrange;                  }
+  void SetVertexRangeMin             (Float_t vtxrangemin                = 0.   ) { fVtxRangeMin                  = vtxrangemin;               }
+  void SetApplyAccCut                (Bool_t  acccut                     = kFALSE){ fApplyAccCut                  = acccut;                    }    
+  void SetMinptCutOnDaughterTracks   (Float_t minptdaughtrks             = 0.   ) { fMinPtCutOnDaughterTracks     = minptdaughtrks;            }
+  void SetEtaCutOnDaughterTracks     (Float_t etadaughtrks               = 0.   ) { fEtaCutOnDaughterTracks       = etadaughtrks;              }
 
  private:
         // Note : In ROOT, "//!" means "do not stream the data from Master node to Worker node" ...
@@ -62,15 +65,17 @@ class AliAnalysisTaskCheckPerformanceCascadepp276 : public AliAnalysisTaskSE {
         AliPIDResponse *fPIDResponse;           //! PID response object        
 
         Bool_t          fkRerunV0CascVertexers;         // Boolean : kTRUE = relaunch both V0 + Cascade vertexers
+        Bool_t          fkSDDselectionOn;               // Boolean : kTRUE = enable the selection based on the SDD status
         Bool_t          fkQualityCutZprimVtxPos;        // Boolean : kTRUE = cut on the prim.vtx  z-position
         Bool_t          fkRejectEventPileUp;            // Boolean : kTRUE = enable the rejection of events tagged as pile-up by SPD (AliESDEvent::IsPileupFromSPD)
         Bool_t          fkQualityCutNoTPConlyPrimVtx;   // Boolean : kTRUE = prim vtx should be SPD or Tracking vertex
         Bool_t          fkQualityCutTPCrefit;           // Boolean : kTRUE = ask for TPCrefit for the 3 daughter tracks
-        Bool_t          fkQualityCutnTPCcls;           // Boolean : kTRUE = ask for 80 TPC clusters for each daughter track
-        Bool_t          fkSDDonSelection;               // Boolean : kTRUE = select events with SDD on
-        Int_t           fMinnTPCcls;                    // Boolean : set the value for the minimum numeber of TPC clusters
+        Bool_t          fkQualityCutnTPCcls;            // Boolean : kTRUE = ask for n TPC clusters for each daughter track
+        Bool_t          fwithSDD;                       // Boolean : kTRUE = select events with SDD reco
+        Int_t           fMinnTPCcls;                    // Boolean : set the value for the minimum number of TPC clusters
         Bool_t          fkExtraSelections;              // Boolean : kTRUE = apply tighter selections, before starting the analysis
         Float_t         fVtxRange;                      // to select events with |zvtx|<fVtxRange cm
+        Float_t         fVtxRangeMin;                   // to select events with |zvtx|>fVtxRangeMin cm
         Bool_t          fApplyAccCut;                   // flag to apply acceptance cuts to MC cascades       
         Float_t         fMinPtCutOnDaughterTracks;      // minimum pt cut on daughter tracks
         Float_t         fEtaCutOnDaughterTracks;        // pseudorapidity cut on daughter tracks 
index 8e1e264..15446f6 100644 (file)
@@ -1,10 +1,13 @@
 AliAnalysisTaskCheckCascadepp276 *AddTaskCheckCascadepp276( Int_t    minnTPCcls             = 70,
                                                             Float_t  vtxlim                 = 10.,
+                                                            Float_t  vtxlimmin              = 0.,
+                                                            Bool_t   fwithsdd               = kFALSE,
                                                             Bool_t   kextrasel              = kFALSE,
                                                             Bool_t   krelaunchvertexers     = kFALSE,
                                                             Bool_t   ksddonselection        = kTRUE,
                                                             Float_t  minptondaughtertracks  = 0.,
-                                                            Float_t  etacutondaughtertracks = .8) {
+                                                            Float_t  etacutondaughtertracks = .8,
+                                                            Bool_t   standardAnalysis       = kTRUE ) {
 
    // Creates, configures and attaches to the train a cascades check task.
    // Get the pointer to the existing analysis manager via the static access method.
@@ -28,15 +31,17 @@ AliAnalysisTaskCheckCascadepp276 *AddTaskCheckCascadepp276( Int_t    minnTPCcls
 
    taskcheckcascadepp276->SetAnalysisType               (type);
    taskcheckcascadepp276->SetRelaunchV0CascVertexers    (krelaunchvertexers);
+   taskcheckcascadepp276->SetSDDSelection               (fwithsdd);          // if TRUE apply the sdd selection
    taskcheckcascadepp276->SetQualityCutZprimVtxPos      (kTRUE);             // selects vertices in +-10cm
    taskcheckcascadepp276->SetQualityCutNoTPConlyPrimVtx (kTRUE);             // retains only events with tracking + SPD vertex
    taskcheckcascadepp276->SetQualityCutTPCrefit         (kTRUE);             // requires TPC refit flag to be true to select a track
    taskcheckcascadepp276->SetQualityCutnTPCcls          (kTRUE);             // rejects tracks that have less than n clusters in the TPC
    taskcheckcascadepp276->SetQualityCutPileup           (kTRUE);
-   taskcheckcascadepp276->SetSDDSelection               (ksddonselection);   // selects events with SDD on
+   taskcheckcascadepp276->SetWithSDDOn                  (ksddonselection);   // selects events with SDD on
    taskcheckcascadepp276->SetQualityCutMinnTPCcls       (minnTPCcls);        // minimum number of TPC clusters to accept daughter tracks
    taskcheckcascadepp276->SetExtraSelections            (kextrasel);         // used to add other selection cuts
    taskcheckcascadepp276->SetVertexRange                (vtxlim);
+   taskcheckcascadepp276->SetVertexRangeMin             (vtxlimmin);
    taskcheckcascadepp276->SetMinptCutOnDaughterTracks   (minptondaughtertracks);  
    taskcheckcascadepp276->SetEtaCutOnDaughterTracks     (etacutondaughtertracks);
 
@@ -49,7 +54,9 @@ AliAnalysisTaskCheckCascadepp276 *AddTaskCheckCascadepp276( Int_t    minnTPCcls
    // User file name (if need be)
    
    TString outputFileName = AliAnalysisManager::GetCommonFileName();
-   outputFileName += ":PWGLFStrangeness.outputCheckCascadepp276";
+   if (standardAnalysis) outputFileName += ":PWGLFStrangeness.outputCheckCascadepp276";
+   else                  outputFileName += Form(":PWGLFStrangeness.outputCheckCascadepp276_vtxlim%2.1f-%2.1f",vtxlim,vtxlimmin);
+
    Printf("AddTaskCheckCascade - Set OutputFileName : \n %s\n", outputFileName.Data() );
 
    AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("clistCasc",
index 35473d2..e01bbaf 100644 (file)
@@ -1,11 +1,14 @@
 AliAnalysisTaskCheckPerformanceCascadepp276 *AddTaskCheckPerformanceCascadepp276( Int_t    minnTPCcls             = 70,
                                                                                   Float_t  vtxlim                 = 10.,
+                                                                                  Float_t  vtxlimmin              = 0.,
+                                                                                  Bool_t   fwithsdd               = kFALSE,
                                                                                   Bool_t   kextrasel              = kFALSE,
                                                                                   Bool_t   kacccut                = kFALSE,
                                                                                   Bool_t   krelaunchvertexers     = kFALSE,
-                                                                                  Bool_t   ksddonselection        = kTRUE,
+                                                                                  Bool_t   ksddonselection        = kFALSE,
                                                                                   Float_t  minptondaughtertracks  = 0.,
-                                                                                  Float_t  etacutondaughtertracks = 9999999. ) {
+                                                                                  Float_t  etacutondaughtertracks = .8,
+                                                                                  Bool_t   standardAnalysis       = kTRUE ) {
 // Creates, configures and attaches to the train a cascades check task.
    // Get the pointer to the existing analysis manager via the static access method.
    //==============================================================================
@@ -28,16 +31,18 @@ AliAnalysisTaskCheckPerformanceCascadepp276 *AddTaskCheckPerformanceCascadepp276
 
    taskCheckPerfCascadepp276->SetAnalysisType               (type);
    taskCheckPerfCascadepp276->SetRelaunchV0CascVertexers    (krelaunchvertexers);     
+   taskCheckPerfCascadepp276->SetSDDSelection               (fwithsdd);
    taskCheckPerfCascadepp276->SetQualityCutZprimVtxPos      (kTRUE);
    taskCheckPerfCascadepp276->SetRejectEventPileUp          (kFALSE);
    taskCheckPerfCascadepp276->SetQualityCutNoTPConlyPrimVtx (kTRUE);
    taskCheckPerfCascadepp276->SetQualityCutTPCrefit         (kTRUE);
    taskCheckPerfCascadepp276->SetQualityCutnTPCcls          (kTRUE);             
-   taskCheckPerfCascadepp276->SetSDDSelection               (ksddonselection);
+   taskCheckPerfCascadepp276->SetWithSDDOn                  (ksddonselection);
    taskCheckPerfCascadepp276->SetQualityCutMinnTPCcls       (minnTPCcls);    
    taskCheckPerfCascadepp276->SetExtraSelections            (kextrasel);
    taskCheckPerfCascadepp276->SetApplyAccCut                (kacccut);
    taskCheckPerfCascadepp276->SetVertexRange                (vtxlim);
+   taskCheckPerfCascadepp276->SetVertexRangeMin             (vtxlimmin);
    taskCheckPerfCascadepp276->SetMinptCutOnDaughterTracks   (minptondaughtertracks); 
    taskCheckPerfCascadepp276->SetEtaCutOnDaughterTracks     (etacutondaughtertracks);
  
@@ -50,7 +55,8 @@ AliAnalysisTaskCheckPerformanceCascadepp276 *AddTaskCheckPerformanceCascadepp276
    // User file name (if need be)
 
    TString outputFileName = AliAnalysisManager::GetCommonFileName();
-   outputFileName += ":PWGLFStrangeness.outputCheckPerformanceCascadepp276";
+   if (standardAnalysis) outputFileName += ":PWGLFStrangeness.outputCheckPerformanceCascadepp276";
+   else                  outputFileName += Form(":PWGLFStrangeness.outputCheckPerformanceCascadepp276_vtxlim%2.1f-%2.1f",vtxlim,vtxlimmin); 
    Printf("AddTaskCheckPerformanceCascadepp276 - Set OutputFileName : \n %s\n", outputFileName.Data() );
    
    AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("clistCascPerf",