]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
SUMMARY :
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 7 Jan 2011 09:27:55 +0000 (09:27 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 7 Jan 2011 09:27:55 +0000 (09:27 +0000)
Preparation of the p+p 7 TeV analyses.

---------------------------
1. CheckCascade :
* Trigger Selection :
      introduction of TString fTriggerMaskType = type of trigger to use in UserExec : AliVEvent::kMB or kHighMult ?
      Note : default = event is selected in the task
* Pile-up :
       introduction of Bool_t fkRejectEventPileUp = kTRUE to enable the rejection of events tagged as pile-up by SPD (AliESDEvent::IsPileupFromSPD)
      + control plot : TH1F fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx
* Primary tracks & Multiplicity bins :
       nTrackPrimaryMultiplicity      = fESDtrackCuts->CountAcceptedTracks(lESDevent)
       TH1F fHistPrimaryTrackMultiplicityForTrigEvt,
       TH1F fHistPrimaryTrackMultiplicityForCascadeEvt
* Armenteros plot :
        Fix following Lee Barnby's suggestion : f2dHistArmenteros->Fill( lChargeXi*lAlphaXi, lPtArmXi   );
* c.Tau :
        TH1F fHistcTauXiMinus to check (x4), filled with cascade candidates : Mpdg +- 10 MeV/c2 ~ Mpdg +- 5sigma
* TPC PID :
        introduction of a new set of param. for the TPC PID (Aleph param.) for LHC10d p+p Pass2.
        = feature of the "one pad cluster" reconstruction in TPC.
        Bool_t fkIsDataRecoWith1PadTPCCluster = switch from one case to the other
        Almost official, got from A.Kalweit
               fAlephParameters[0] = 1.28949/50.;
               fAlephParameters[1] = 2.74095e+01;
               fAlephParameters[2] = TMath::Exp(-3.21763e+01);
               fAlephParameters[3] = 2.44026;
               fAlephParameters[4] = 6.58800;
        Logically, the same problem holds for the recent MC prod (LHC10fa6) : a new parameterization will also be needed for MC ...
        Home made param. (temporary)
               fAlephParameters[0] = 0.04;
               fAlephParameters[1] = 17.5;
               fAlephParameters[2] = 3.4e-09;
               fAlephParameters[3] = 2.15;
               fAlephParameters[4] = 3.91720e+00;
* Angular correlation :
    - retain only primary tracks (use of AliESDtrackCuts)
    - option to exclude cascade whose pt < ... GeV/c
    - introduction of 3 options to follow for the correlations:
          1.1 - "TrigAnyCasc-AssoAnyPrim"
          1.2 - "TrigCascLeading-AssoAnyPrim"
          2.  - "TrigLeadingTrck-AssoCasc" (= default)
   TString fAngularCorrelationType = data member used for the option switch

2. macros/AddTaskCheckCascade
* taskcheckcascade-> SetTriggerMaskType     ("kMB");
* taskcheckcascade-> SetRejectEventPileUp   (kTRUE);
* taskcheckcascade-> SetAlephParamFor1PadTPCCluster(kTRUE);
* taskcheckcascade-> SetAngularCorrelationType     ("TrigLeadingTrck-AssoCasc");

3. CheckPerformance
* Trigger Selection :
      introduction of TString fTriggerMaskType = type of trigger to use in UserExec : AliVEvent::kMB or kHighMult ?
      Note : default = event is selected in the task
* Pile-up :
       introduction of Bool_t fkRejectEventPileUp = kTRUE to enable the rejection of events tagged as pile-up by SPD (AliESDEvent::IsPileupFromSPD)
      + control plot : TH1F fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx
* Primary tracks & Multiplicity bins :
       nTrackPrimaryMultiplicity      = fESDtrackCuts->CountAcceptedTracks(lESDevent)
       TH1F fHistMCTrackMultiplicity is now filled with AliStack::GetNprimary()
* Resolution of the phi angle :
       TH2F DeltaPhi(MC casc,Reco casc) vs Pt(mc) (azimuthal correlation ...) x4
* Resolution of multiplicity estimator :
       TH2F f2dHistRecoMultVsMCMult : Reco prim tracks Vs MC gen. primaries (eta<0.8)
* TPC PID :
        introduction of a new set of param. for the TPC PID (Aleph param.) for LHC10f6a prod = MC for LHC10d Pass2.
        = feature of the "one pad cluster" reconstruction in TPC.
       Home made param. (temporary)
               fAlephParameters[0] = 0.04;
               fAlephParameters[1] = 17.5;
               fAlephParameters[2] = 3.4e-09;
               fAlephParameters[3] = 2.15;
               fAlephParameters[4] = 3.91720e+00;

4. macros/AddTaskCheckPerformanceCascade
* taskCheckPerfCascade-> SetTriggerMaskType     ("kMB");
* taskCheckPerfCascade-> SetRejectEventPileUp   (kTRUE);
* taskCheckPerfCascade-> SetAlephParamFor1PadTPCCluster(kTRUE);

PWG2/SPECTRA/AliAnalysisTaskCheckCascade.cxx
PWG2/SPECTRA/AliAnalysisTaskCheckCascade.h
PWG2/SPECTRA/AliAnalysisTaskCheckPerformanceCascade.cxx
PWG2/SPECTRA/AliAnalysisTaskCheckPerformanceCascade.h
PWG2/SPECTRA/macros/AddTaskCheckCascade.C
PWG2/SPECTRA/macros/AddTaskCheckPerformanceCascade.C

index c84bf804dd73c16956685d4aa80c9f85e41b449f..a7459fa2aeac2901cdf294b027c08e0617cd3cbe 100644 (file)
 //              3. Supply an AliCFContainer meant to define the optimised topological selections
 //              4. Rough azimuthal correlation study (Eta, Phi)
 //            Adapted to Cascade : A.Maire Mar2008, antonin.maire@ires.in2p3.fr
-//            Modified :           A.Maire Mar2010, antonin.maire@ires.in2p3.fr
+//            Modified :           A.Maire Nov2010, antonin.maire@ires.in2p3.fr
 //-----------------------------------------------------------------
 
 
 
 class TTree;
 class TParticle;
-class TVector3;
 
 //class AliMCEventHandler;
 //class AliMCEvent;
@@ -56,9 +55,10 @@ class AliAODv0;
 
 #include "AliESDEvent.h"
 #include "AliAODEvent.h"
-//      #include "AliV0vertexer.h"
-//      #include "AliCascadeVertexer.h"
+//     #include "AliV0vertexer.h"
+//     #include "AliCascadeVertexer.h"
 #include "AliESDpid.h"
+#include "AliESDtrackCuts.h"
 
 #include "AliInputEventHandler.h"
 #include "AliAnalysisManager.h"
@@ -78,22 +78,25 @@ ClassImp(AliAnalysisTaskCheckCascade)
 
 //________________________________________________________________________
 AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade() 
-  : AliAnalysisTaskSE(), fAnalysisType("ESD"), fCollidingSystems(0), fESDpid(0), /*fPaveTextBookKeeping(0),*/
-    fkRerunV0CascVertexers      (0),
-    fkQualityCutZprimVtxPos     (kTRUE),
-    fkQualityCutNoTPConlyPrimVtx(kTRUE),
-    fkQualityCutTPCrefit        (kTRUE),
-    fkQualityCut80TPCcls        (kTRUE),
-    fkExtraSelections           (0),
+  : AliAnalysisTaskSE(), fAnalysisType("ESD"), fTriggerMaskType("kMB"), fCollidingSystems(0), fESDpid(0), fESDtrackCuts(0), /*fPaveTextBookKeeping(0),*/
+    fkRerunV0CascVertexers         (0),
+    fkQualityCutZprimVtxPos        (kTRUE),
+    fkRejectEventPileUp            (kTRUE),
+    fkQualityCutNoTPConlyPrimVtx   (kTRUE),
+    fkQualityCutTPCrefit           (kTRUE),
+    fkQualityCut80TPCcls           (kTRUE),
+    fkIsDataRecoWith1PadTPCCluster (kTRUE),
+    fkExtraSelections              (0),
+    fAngularCorrelationType        ("TrigLeadingTrck-AssoCasc"),
 
        // - Cascade part initialisation
     fListHistCascade(0),
     fHistCascadeMultiplicityBeforeTrigSel(0),
-    fHistCascadeMultiplicityForTrigEvt(0), fHistTrackMultiplicityForTrigEvt(0), fHistTPCrefitTrackMultiplicityForTrigEvt(0),
-    fHistCascadeMultiplicityForTrigEvtAndZprimVtx(0),
+    fHistCascadeMultiplicityForTrigEvt(0), fHistTrackMultiplicityForTrigEvt(0), fHistTPCrefitTrackMultiplicityForTrigEvt(0), fHistPrimaryTrackMultiplicityForTrigEvt(0),
+    fHistCascadeMultiplicityForTrigEvtAndZprimVtx(0), fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx(0),
     fHistCascadeMultiplicityForSelEvt(0),
     fHistPosBestPrimaryVtxXForSelEvt(0), fHistPosBestPrimaryVtxYForSelEvt(0), fHistPosBestPrimaryVtxZForSelEvt(0),
-    fHistTPCrefitTrackMultiplicityForCascadeEvt(0),
+    fHistTPCrefitTrackMultiplicityForCascadeEvt(0), fHistPrimaryTrackMultiplicityForCascadeEvt(0),
     fHistPosV0TPCClusters(0), fHistNegV0TPCClusters(0), fHistBachTPCClusters(0),
     fHistVtxStatus(0),
 
@@ -126,6 +129,8 @@ AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade()
     fHistRapXi(0), fHistRapOmega(0), fHistEtaXi(0),
     fHistThetaXi(0), fHistPhiXi(0),
 
+    fHistcTauXiMinus(0), fHistcTauXiPlus(0), fHistcTauOmegaMinus(0), fHistcTauOmegaPlus(0),
+
     f2dHistArmenteros(0),                      
     f2dHistEffMassLambdaVsEffMassXiMinus(0), f2dHistEffMassXiVsEffMassOmegaMinus(0),
     f2dHistEffMassLambdaVsEffMassXiPlus(0), f2dHistEffMassXiVsEffMassOmegaPlus(0),
@@ -162,22 +167,25 @@ AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade()
 
 //________________________________________________________________________
 AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade(const char *name) 
-  : AliAnalysisTaskSE(name), fAnalysisType("ESD"), fCollidingSystems(0), fESDpid(0), /*fPaveTextBookKeeping(0),*/
-    fkRerunV0CascVertexers      (0),
-    fkQualityCutZprimVtxPos     (kTRUE),
-    fkQualityCutNoTPConlyPrimVtx(kTRUE),
-    fkQualityCutTPCrefit        (kTRUE),
-    fkQualityCut80TPCcls        (kTRUE),
-    fkExtraSelections           (0),
+  : AliAnalysisTaskSE(name), fAnalysisType("ESD"), fTriggerMaskType("kMB"), fCollidingSystems(0), fESDpid(0), fESDtrackCuts(0), /*fPaveTextBookKeeping(0),*/
+    fkRerunV0CascVertexers         (0),
+    fkQualityCutZprimVtxPos        (kTRUE),
+    fkRejectEventPileUp            (kTRUE),
+    fkQualityCutNoTPConlyPrimVtx   (kTRUE),
+    fkQualityCutTPCrefit           (kTRUE),
+    fkQualityCut80TPCcls           (kTRUE),
+    fkIsDataRecoWith1PadTPCCluster (kTRUE),
+    fkExtraSelections              (0),
+    fAngularCorrelationType        ("TrigLeadingTrck-AssoCasc"),
      
        // - Cascade part initialisation
     fListHistCascade(0),
     fHistCascadeMultiplicityBeforeTrigSel(0),
-    fHistCascadeMultiplicityForTrigEvt(0), fHistTrackMultiplicityForTrigEvt(0), fHistTPCrefitTrackMultiplicityForTrigEvt(0),
-    fHistCascadeMultiplicityForTrigEvtAndZprimVtx(0),
+    fHistCascadeMultiplicityForTrigEvt(0), fHistTrackMultiplicityForTrigEvt(0), fHistTPCrefitTrackMultiplicityForTrigEvt(0), fHistPrimaryTrackMultiplicityForTrigEvt(0),
+    fHistCascadeMultiplicityForTrigEvtAndZprimVtx(0), fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx(0),
     fHistCascadeMultiplicityForSelEvt(0),
     fHistPosBestPrimaryVtxXForSelEvt(0), fHistPosBestPrimaryVtxYForSelEvt(0), fHistPosBestPrimaryVtxZForSelEvt(0),
-    fHistTPCrefitTrackMultiplicityForCascadeEvt(0),
+    fHistTPCrefitTrackMultiplicityForCascadeEvt(0), fHistPrimaryTrackMultiplicityForCascadeEvt(0),
     fHistPosV0TPCClusters(0), fHistNegV0TPCClusters(0), fHistBachTPCClusters(0),
     fHistVtxStatus(0),
 
@@ -210,6 +218,8 @@ AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade(const char *name)
     fHistRapXi(0), fHistRapOmega(0), fHistEtaXi(0),
     fHistThetaXi(0), fHistPhiXi(0),
 
+    fHistcTauXiMinus(0), fHistcTauXiPlus(0), fHistcTauOmegaMinus(0), fHistcTauOmegaPlus(0),
+
     f2dHistArmenteros(0),                      
     f2dHistEffMassLambdaVsEffMassXiMinus(0), f2dHistEffMassXiVsEffMassOmegaMinus(0),
     f2dHistEffMassLambdaVsEffMassXiPlus(0), f2dHistEffMassXiVsEffMassOmegaPlus(0),
@@ -260,68 +270,8 @@ AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade(const char *name)
 //         fCascSels[7] = 100.   ;  // max radius of the fiducial volume                  (PDC07 : 100    / LHC09a4 : 100   )
         */
         
-        // Extra Loose
-        /*
-        fV0Sels[0] =  33.  ;  // max allowed chi2
-        fV0Sels[1] =   0.01;  // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05)
-        fV0Sels[2] =   0.01;  // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05)
-        fV0Sels[3] =   2.0 ;  // max allowed DCA between the daughter tracks       (LHC09a4 : 0.5)
-        fV0Sels[4] =   0.0 ;  // min allowed cosine of V0's pointing angle         (LHC09a4 : 0.99)
-        fV0Sels[5] =   0.2 ;  // min radius of the fiducial volume                 (LHC09a4 : 0.2)
-        fV0Sels[6] = 100.  ;  // max radius of the fiducial volume                 (LHC09a4 : 100.0)
         
-        fCascSels[0] =  33.   ;  // max allowed chi2 (same as PDC07)
-        fCascSels[1] =   0.01 ;  // min allowed V0 impact parameter                    (PDC07 : 0.05   / LHC09a4 : 0.025 )
-        fCascSels[2] =   0.008;  // "window" around the Lambda mass                    (PDC07 : 0.008  / LHC09a4 : 0.010 )
-        fCascSels[3] =   0.01 ;  // min allowed bachelor's impact parameter            (PDC07 : 0.035  / LHC09a4 : 0.025 )
-        fCascSels[4] =   2.0  ;  // max allowed DCA between the V0 and the bachelor    (PDC07 : 0.1    / LHC09a4 : 0.2   )
-        fCascSels[5] =   0.98 ;  // min allowed cosine of the cascade pointing angle   (PDC07 : 0.9985 / LHC09a4 : 0.998 )
-        fCascSels[6] =   0.2  ;  // min radius of the fiducial volume                  (PDC07 : 0.9    / LHC09a4 : 0.2   )
-        fCascSels[7] = 100.   ;  // max radius of the fiducial volume                  (PDC07 : 100    / LHC09a4 : 100   )
-
-        */
-        
-        // Archi loose (seems not efficient essentially just  an increase of backgnd wrt HyperLoose set)
-        /*
-//         fV0Sels[0] =  33.  ;  // max allowed chi2
-//         fV0Sels[1] =   0.0001;  // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05)
-//         fV0Sels[2] =   0.0001;  // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05)
-//         fV0Sels[3] =   5.0 ;  // max allowed DCA between the daughter tracks       (LHC09a4 : 0.5)
-//         fV0Sels[4] =   0.0 ;  // min allowed cosine of V0's pointing angle         (LHC09a4 : 0.99)
-//         fV0Sels[5] =   0.1 ;  // min radius of the fiducial volume                 (LHC09a4 : 0.2)
-//         fV0Sels[6] = 100.  ;  // max radius of the fiducial volume                 (LHC09a4 : 100.0)
-//         
-//         fCascSels[0] =  33.   ;  // max allowed chi2 (same as PDC07)
-//         fCascSels[1] =   0.0001 ;  // min allowed V0 impact parameter                    (PDC07 : 0.05   / LHC09a4 : 0.025 )
-//         fCascSels[2] =   0.008;  // "window" around the Lambda mass                    (PDC07 : 0.008  / LHC09a4 : 0.010 )
-//         fCascSels[3] =   0.0001 ;  // min allowed bachelor's impact parameter            (PDC07 : 0.035  / LHC09a4 : 0.025 )
-//         fCascSels[4] =   5.0  ;  // max allowed DCA between the V0 and the bachelor    (PDC07 : 0.1    / LHC09a4 : 0.2   )
-//         fCascSels[5] =   0.90 ;  // min allowed cosine of the cascade pointing angle   (PDC07 : 0.9985 / LHC09a4 : 0.998 )
-//         fCascSels[6] =   0.1  ;  // min radius of the fiducial volume                  (PDC07 : 0.9    / LHC09a4 : 0.2   )
-//         fCascSels[7] = 100.   ;  // max radius of the fiducial volume                  (PDC07 : 100    / LHC09a4 : 100   )
-        */
-
-        // Hyper Loose "à la 900 GeV 2009 data"
-        /*
-        fV0Sels[0] =  33.  ;  // max allowed chi2
-        fV0Sels[1] =   0.001; // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05)
-        fV0Sels[2] =   0.001; // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05)
-        fV0Sels[3] =   5.0 ;  // max allowed DCA between the daughter tracks       (LHC09a4 : 0.5)
-        fV0Sels[4] =   0.0 ;  // min allowed cosine of V0's pointing angle         (LHC09a4 : 0.99)
-        fV0Sels[5] =   0.1 ;  // min radius of the fiducial volume                 (LHC09a4 : 0.2)
-        fV0Sels[6] = 100.  ;  // max radius of the fiducial volume                 (LHC09a4 : 100.0)
-        
-        fCascSels[0] =  33.   ;  // max allowed chi2 (same as PDC07)
-        fCascSels[1] =   0.001;  // min allowed V0 impact parameter                    (PDC07 : 0.05   / LHC09a4 : 0.025 )
-        fCascSels[2] =   0.008;  // "window" around the Lambda mass                    (PDC07 : 0.008  / LHC09a4 : 0.010 )
-        fCascSels[3] =   0.001;  // min allowed bachelor's impact parameter            (PDC07 : 0.035  / LHC09a4 : 0.025 )
-        fCascSels[4] =   5.0  ;  // max allowed DCA between the V0 and the bachelor    (PDC07 : 0.1    / LHC09a4 : 0.2   )
-        fCascSels[5] =   0.95 ;  // min allowed cosine of the cascade pointing angle   (PDC07 : 0.9985 / LHC09a4 : 0.998 )
-        fCascSels[6] =   0.1  ;  // min radius of the fiducial volume                  (PDC07 : 0.9    / LHC09a4 : 0.2   )
-        fCascSels[7] = 100.   ;  // max radius of the fiducial volume                  (PDC07 : 100    / LHC09a4 : 100   )
-        */
-        
-        // Hyper Loose "à la 900 GeV 2009 data", with lower cosine of pointing angle for Xi
+        // Hyper Loose "à la 900 GeV 2009 data", with lower cosine of pointing angle for Xi (0.95 down to 0.82) = 900 GeV paper
         
         fV0Sels[0] =  33.  ;  // max allowed chi2
         fV0Sels[1] =   0.001; // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05)
@@ -340,6 +290,7 @@ AliAnalysisTaskCheckCascade::AliAnalysisTaskCheckCascade(const char *name)
         fCascSels[6] =   0.1  ;  // min radius of the fiducial volume                  (PDC07 : 0.9    / LHC09a4 : 0.2   )
         fCascSels[7] = 100.   ;  // max radius of the fiducial volume                  (PDC07 : 100    / LHC09a4 : 100   )
         
+        
         //New default vtxR (http://alisoft.cern.ch/viewvc?view=rev&root=AliRoot&revision=40955, 5 May 2010)
         /*
         fV0Sels[0] =  33.  ;  // max allowed chi2
@@ -403,6 +354,7 @@ AliAnalysisTaskCheckCascade::~AliAnalysisTaskCheckCascade()
         
   if (fListHistCascade)         { delete fListHistCascade;     fListHistCascade = 0x0;    }
   if (fESDpid)                  { delete fESDpid;              fESDpid = 0x0;} // fESDpid is not stored into the TList
+  if (fESDtrackCuts)            { delete fESDtrackCuts;        fESDtrackCuts = 0x0; }
   //if (fPaveTextBookKeeping)     { delete fPaveTextBookKeeping; fPaveTextBookKeeping = 0x0;} // fPaveTextBookKeeping is not strored in the TList
 }
 
@@ -426,29 +378,54 @@ if(! fESDpid){
   
   if( !lmcEvtHandler ){ // !0x0 = real data or !1 = there is an MC handler available (useMC = kTRUE in AnalysisTrainNew), so = data from MC
         
-        // Reasonable parameters extracted for real p-p event (Dec 2009 - GSI Pass5) - A.Kalweit
-        fAlephParameters[0] = 0.0283086;        // No extra-division to apply in SetBlochParam
-        fAlephParameters[1] = 2.63394e+01;
-        fAlephParameters[2] = 5.04114e-11;
-        fAlephParameters[3] = 2.12543e+00;
-        fAlephParameters[4] = 4.88663e+00; 
-        Printf("CheckCascade - Check Aleph Param in case of REAL Data (fAlephParameters[1] = %f)\n",  fAlephParameters[1]);
+        if(fkIsDataRecoWith1PadTPCCluster){
+                // Parameters extracted for LHC10d Pass2 - A. Kalweit
+                fAlephParameters[0] = 1.28949/50.; // = 0,0257898
+                fAlephParameters[1] = 2.74095e+01;
+                fAlephParameters[2] = TMath::Exp(-3.21763e+01);
+                fAlephParameters[3] = 2.44026;
+                fAlephParameters[4] = 6.58800;
+        }
+        else {
+                // Reasonable parameters extracted for real p-p event (Dec 2009 - GSI Pass5) - A.Kalweit
+                fAlephParameters[0] = 0.0283086;        // No extra-division to apply in SetBlochParam
+                fAlephParameters[1] = 2.63394e+01;
+                fAlephParameters[2] = 5.04114e-11;
+                fAlephParameters[3] = 2.12543e+00;
+                fAlephParameters[4] = 4.88663e+00; 
+        }
+        
+        Printf("CheckCascade -      Check Aleph Param in case of REAL Data (fAlephParameters[3] = %f)  (To be compared with : 2.44026 for 1-pad-cluster prod. / 2.12543 otherwise)\n",  fAlephParameters[3]);
+
   }
-  else {
-        // Reasonable parameters extracted for p-p simulation (LHC09a4) - A.Kalweit
-         // fAlephParameters[0] = 4.23232575531564326e+00;//50*0.76176e-1; // do not forget to divide this value by 50 in SetBlochParam !
-         // fAlephParameters[1] = 8.68482806165147636e+00;//10.632; 
-         // fAlephParameters[2] = 1.34000000000000005e-05;//0.13279e-4;
-         // fAlephParameters[3] = 2.30445734159456084e+00;//1.8631;
-         // fAlephParameters[4] = 2.25624744086878559e+00;//1.9479;  
-          
-        // Reasonable parameters extracted for MC LHC09d10 event (Jan 2010) - A.Kalweit
-        fAlephParameters[0] = 2.15898e+00/50.;
-        fAlephParameters[1] = 1.75295e+01;
-        fAlephParameters[2] = 3.40030e-09;
-        fAlephParameters[3] = 1.96178e+00;
-        fAlephParameters[4] = 3.91720e+00;
-        Printf("CheckCascade - Check Aleph Param win case MC data (fAlephParameters[1] = %f)\n",  fAlephParameters[1]);
+  else { // MC reco
+        if(fkIsDataRecoWith1PadTPCCluster){
+                // Home made parameterization for LHC10f6a production = p+p 7 TeV
+                fAlephParameters[0] = 0.04;
+                fAlephParameters[1] = 17.5;
+                fAlephParameters[2] = 3.4e-09;
+                fAlephParameters[3] = 2.15;
+                fAlephParameters[4] = 3.91720e+00; 
+                
+                // Home made parameterization for LHC10e13 production = p+p 900 GeV/c
+                
+        }
+        else {
+                // Reasonable parameters extracted for p-p simulation (LHC09a4) - A.Kalweit
+                // fAlephParameters[0] = 4.23232575531564326e+00;//50*0.76176e-1; // do not forget to divide this value by 50 in SetBlochParam !
+                // fAlephParameters[1] = 8.68482806165147636e+00;//10.632; 
+                // fAlephParameters[2] = 1.34000000000000005e-05;//0.13279e-4;
+                // fAlephParameters[3] = 2.30445734159456084e+00;//1.8631;
+                // fAlephParameters[4] = 2.25624744086878559e+00;//1.9479;  
+                
+                // Reasonable parameters extracted for MC LHC09d10 event (Jan 2010) - A.Kalweit
+                fAlephParameters[0] = 2.15898e+00/50.;
+                fAlephParameters[1] = 1.75295e+01;
+                fAlephParameters[2] = 3.40030e-09;
+                fAlephParameters[3] = 1.96178e+00;
+                fAlephParameters[4] = 3.91720e+00;
+        }
+        Printf("CheckCascade -      Check Aleph Param in case of MC Data (fAlephParameters[3] = %f) (To be compared with : 2.15 for 1-pad-cluster prod. / 1.96178 otherwise)\n",  fAlephParameters[3]);
   }
 
   fESDpid = new AliESDpid();
@@ -459,6 +436,12 @@ if(! fESDpid){
                                                      fAlephParameters[4] );
 }
  
+if(! fESDtrackCuts ){
+      fESDtrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kTRUE); // Std definition of primary (see kTRUE argument) tracks for 2010
+      fESDtrackCuts->SetEtaRange(-0.8,+0.8);
+      fESDtrackCuts->SetPtRange(0.15, 1e10);
+      Printf("CheckCascade - ESDtrackCuts set up to 2010 std ITS-TPC cuts...");
+}
  
 /* 
 if( !fPaveTextBookKeeping){
@@ -584,6 +567,17 @@ if(! fHistTPCrefitTrackMultiplicityForTrigEvt) {
 }
 
 
+if(! fHistPrimaryTrackMultiplicityForTrigEvt) {        
+       if(fCollidingSystems)// AA collisions   
+               fHistPrimaryTrackMultiplicityForTrigEvt = new TH1F("fHistPrimaryTrackMultiplicityForTrigEvt", 
+                       "Primary track Multiplicity (for triggered evt);Nbr of primary tracks/Evt;Events", 
+                       100, 0, 10000);                 
+       else // pp collisions
+               fHistPrimaryTrackMultiplicityForTrigEvt = new TH1F("fHistPrimaryTrackMultiplicityForTrigEvt", 
+                       "Primary track Multiplicity (for triggered evt);Nbr of primary tracks/Evt;Events", 
+                       200, 0, 200);
+       fListHistCascade->Add(fHistPrimaryTrackMultiplicityForTrigEvt);
+}
 
 
         // - Histos for events passing the trigger selection + |z(prim. vertex)| < XX cm
@@ -602,6 +596,22 @@ if(! fHistCascadeMultiplicityForTrigEvtAndZprimVtx) {
 }
 
 
+        // - Histos for events passing the trigger selection + |z(prim. vertex)| < XX cm + after pile-up rejection
+        //--------------
+        
+if(! fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx) {
+        if(fCollidingSystems)// AA collisions
+                fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx = new TH1F("fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx", 
+                        "Cascades per event;Nbr of Cascades/Evt;Events", 
+                        100, 0, 100);           
+        else // pp collisions
+                fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx = new TH1F("fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx", 
+                        "Cascades per event;Nbr of Cascades/Evt;Events", 
+                        25, 0, 25);
+        fListHistCascade->Add(fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx);
+}
+
+
         // - Histos for events passing the event selection at the analysis level
         //--------------
         
@@ -617,6 +627,7 @@ if(! fHistCascadeMultiplicityForSelEvt) {
        fListHistCascade->Add(fHistCascadeMultiplicityForSelEvt);
 }
 
+
 if(! fHistPosBestPrimaryVtxXForSelEvt ){
        fHistPosBestPrimaryVtxXForSelEvt   = new TH1F( "fHistPosBestPrimaryVtxXForSelEvt" , "Best Prim. Vertex Position in x; x (cm); Events" , 360, -0.9, 0.9 );
        fListHistCascade->Add(fHistPosBestPrimaryVtxXForSelEvt);
@@ -650,6 +661,18 @@ if(! fHistTPCrefitTrackMultiplicityForCascadeEvt) {
        fListHistCascade->Add(fHistTPCrefitTrackMultiplicityForCascadeEvt);
 }
 
+if(! fHistPrimaryTrackMultiplicityForCascadeEvt) {     
+       if(fCollidingSystems)// AA collisions   
+               fHistPrimaryTrackMultiplicityForCascadeEvt = new TH1F("fHistPrimaryTrackMultiplicityForCascadeEvt", 
+                       "Primary track Multiplicity (for evt with Casc.);Nbr of primary tracks/Evt;Events", 
+                       100, 0, 10000);                 
+       else // pp collisions
+               fHistPrimaryTrackMultiplicityForCascadeEvt = new TH1F("fHistPrimaryTrackMultiplicityForCascadeEvt", 
+                       "Primary track Multiplicity (for evt with Casc.);Nbr of primary tracks/Evt;Events", 
+                       200, 0, 200);
+       fListHistCascade->Add(fHistPrimaryTrackMultiplicityForCascadeEvt);
+}
+
 if(! fHistPosV0TPCClusters ){
         fHistPosV0TPCClusters = new TH1F("fHistPosV0TPCClusters", "TPC clusters for Pos. V0 daughter track, in Casc; Nbr of TPC clusters (V0 Pos.); Track counts", 165, 0.0 ,165.0);
         fListHistCascade->Add(fHistPosV0TPCClusters);
@@ -919,6 +942,27 @@ if(! fHistPhiXi ){
 }
 
 
+if(! fHistcTauXiMinus){
+        fHistcTauXiMinus = new TH1F("fHistcTauXiMinus", "Lifetime c.#tau for #Xi^{-}; L_{3D}.m_{PDG}(#Xi^{-}) / p_{3D} (cm); Counts", 100, 0., 50.);
+        fListHistCascade->Add(fHistcTauXiMinus);
+}
+
+if(! fHistcTauXiPlus){
+        fHistcTauXiPlus = new TH1F("fHistcTauXiPlus", "Lifetime c.#tau for #Xi^{+}; L_{3D}.m_{PDG}(#bar{#Xi}^{+}) / p_{3D} (cm); Counts", 100, 0., 50.);
+        fListHistCascade->Add(fHistcTauXiPlus);
+}
+
+if(! fHistcTauOmegaMinus){
+        fHistcTauOmegaMinus = new TH1F("fHistcTauOmegaMinus", "Lifetime c.#tau for #Omega^{-}; L_{3D}.m_{PDG}(#Omega^{-}) / p_{3D} (cm); Counts", 100, 0., 50.);
+        fListHistCascade->Add(fHistcTauOmegaMinus);
+}
+
+if(! fHistcTauOmegaPlus){
+        fHistcTauOmegaPlus = new TH1F("fHistcTauOmegaPlus", "Lifetime c.#tau for #Omega^{+}; L_{3D}.m_{PDG}(#bar{#Omega}^{+}) / p_{3D} (cm); Counts", 100, 0., 50.);
+        fListHistCascade->Add(fHistcTauOmegaPlus);
+}
+
+
 if(! f2dHistArmenteros) {
        f2dHistArmenteros = new TH2F( "f2dHistArmenteros", "#alpha_{Arm}(casc. cand.) Vs Pt_{Arm}(casc. cand.); #alpha_{Arm} ; Pt_{Arm} (GeV/c)", 140, -1.2, 1.2, 300, 0., 0.3);
        fListHistCascade->Add(f2dHistArmenteros);
@@ -1019,9 +1063,9 @@ if(! fCFContCascadePIDXiMinus)  {
   fCFContCascadePIDXiMinus->SetBinLimits(1,   1.2  ,   2.0 );  // Xi Effective mass
   fCFContCascadePIDXiMinus->SetBinLimits(2,  -1.1  ,   1.1 );  // Rapidity
   if(fCollidingSystems) 
-        fCFContCascadePIDXiMinus->SetBinLimits(3, 0.0, 20000.0  );    // SPD tracklets Multiplicity
+        fCFContCascadePIDXiMinus->SetBinLimits(3, 0.0, 20000.0  );    // Primary track Multiplicity
   else
-        fCFContCascadePIDXiMinus->SetBinLimits(3, 0.0, 250.0  );     // SPD tracklets Multiplicity
+        fCFContCascadePIDXiMinus->SetBinLimits(3, 0.0, 250.0  );     // Primary track Multiplicity
   
   // Setting the step title : one per PID case
   fCFContCascadePIDXiMinus->SetStepTitle(0, "No PID");
@@ -1036,7 +1080,7 @@ if(! fCFContCascadePIDXiMinus)  {
   fCFContCascadePIDXiMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
   fCFContCascadePIDXiMinus->SetVarTitle(1, "M( #Lambda , #pi^{-} ) (GeV/c^{2})");
   fCFContCascadePIDXiMinus->SetVarTitle(2, "Y_{#Xi}");
-  fCFContCascadePIDXiMinus->SetVarTitle(3, "SPD tracklets Multiplicity");
+  fCFContCascadePIDXiMinus->SetVarTitle(3, "Primary track Multiplicity");
   
   fListHistCascade->Add(fCFContCascadePIDXiMinus);
   
@@ -1062,9 +1106,9 @@ if(! fCFContCascadePIDXiPlus)  {
   fCFContCascadePIDXiPlus->SetBinLimits(1,   1.2  ,   2.0 );   // Xi Effective mass
   fCFContCascadePIDXiPlus->SetBinLimits(2,  -1.1  ,   1.1 );   // Rapidity
   if(fCollidingSystems) 
-        fCFContCascadePIDXiPlus->SetBinLimits(3, 0.0, 20000.0  );    // SPD tracklets Multiplicity
+        fCFContCascadePIDXiPlus->SetBinLimits(3, 0.0, 20000.0  );    // Primary track Multiplicity
   else
-        fCFContCascadePIDXiPlus->SetBinLimits(3, 0.0, 250.0  );     // SPD tracklets Multiplicity
+        fCFContCascadePIDXiPlus->SetBinLimits(3, 0.0, 250.0  );     // Primary track Multiplicity
   
   // Setting the step title : one per PID case
   fCFContCascadePIDXiPlus->SetStepTitle(0, "No PID");
@@ -1079,7 +1123,7 @@ if(! fCFContCascadePIDXiPlus)  {
   fCFContCascadePIDXiPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
   fCFContCascadePIDXiPlus->SetVarTitle(1, "M( #Lambda , #pi^{+} ) (GeV/c^{2})");
   fCFContCascadePIDXiPlus->SetVarTitle(2, "Y_{#Xi}");
-  fCFContCascadePIDXiPlus->SetVarTitle(3, "SPD tracklets Multiplicity");
+  fCFContCascadePIDXiPlus->SetVarTitle(3, "Primary track Multiplicity");
   
   fListHistCascade->Add(fCFContCascadePIDXiPlus);
   
@@ -1106,9 +1150,9 @@ if(! fCFContCascadePIDOmegaMinus)  {
   fCFContCascadePIDOmegaMinus->SetBinLimits(1,   1.5  ,   2.5 );       // Omega Effective mass
   fCFContCascadePIDOmegaMinus->SetBinLimits(2,  -1.1  ,   1.1 );       // Rapidity
   if(fCollidingSystems) 
-        fCFContCascadePIDOmegaMinus->SetBinLimits(3, 0.0, 20000.0  );    //SPD tracklets Multiplicity
+        fCFContCascadePIDOmegaMinus->SetBinLimits(3, 0.0, 20000.0  );    //Primary track Multiplicity
   else
-        fCFContCascadePIDOmegaMinus->SetBinLimits(3, 0.0, 250.0  );     // SPD tracklets Multiplicity
+        fCFContCascadePIDOmegaMinus->SetBinLimits(3, 0.0, 250.0  );     // Primary track Multiplicity
   
   // Setting the step title : one per PID case
   fCFContCascadePIDOmegaMinus->SetStepTitle(0, "No PID");
@@ -1123,7 +1167,7 @@ if(! fCFContCascadePIDOmegaMinus)  {
   fCFContCascadePIDOmegaMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
   fCFContCascadePIDOmegaMinus->SetVarTitle(1, "M( #Lambda , K^{-} ) (GeV/c^{2})");
   fCFContCascadePIDOmegaMinus->SetVarTitle(2, "Y_{#Omega}");
-  fCFContCascadePIDOmegaMinus->SetVarTitle(3, "SPD tracklets Multiplicity");
+  fCFContCascadePIDOmegaMinus->SetVarTitle(3, "Primary track Multiplicity");
   
   fListHistCascade->Add(fCFContCascadePIDOmegaMinus);
   
@@ -1149,9 +1193,9 @@ if(! fCFContCascadePIDOmegaPlus)  {
   fCFContCascadePIDOmegaPlus->SetBinLimits(1,   1.5  ,   2.5 );        // Omega Effective mass
   fCFContCascadePIDOmegaPlus->SetBinLimits(2,  -1.1  ,   1.1 );        // Rapidity
   if(fCollidingSystems) 
-        fCFContCascadePIDOmegaPlus->SetBinLimits(3, 0.0, 20000.0  );    // SPD tracklets Multiplicity
+        fCFContCascadePIDOmegaPlus->SetBinLimits(3, 0.0, 20000.0  );    // Primary track Multiplicity
   else
-        fCFContCascadePIDOmegaPlus->SetBinLimits(3, 0.0, 250.0  );     // SPD tracklets Multiplicity
+        fCFContCascadePIDOmegaPlus->SetBinLimits(3, 0.0, 250.0  );     // Primary track Multiplicity
   
   // Setting the step title : one per PID case
   fCFContCascadePIDOmegaPlus->SetStepTitle(0, "No PID");
@@ -1166,7 +1210,7 @@ if(! fCFContCascadePIDOmegaPlus)  {
   fCFContCascadePIDOmegaPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
   fCFContCascadePIDOmegaPlus->SetVarTitle(1, "M( #Lambda , K^{+} ) (GeV/c^{2})");
   fCFContCascadePIDOmegaPlus->SetVarTitle(2, "Y_{#Omega}");
-  fCFContCascadePIDOmegaPlus->SetVarTitle(3, "SPD tracklets Multiplicity"); 
+  fCFContCascadePIDOmegaPlus->SetVarTitle(3, "Primary track Multiplicity"); 
   
   fListHistCascade->Add(fCFContCascadePIDOmegaPlus);
   
@@ -1295,11 +1339,11 @@ if(! fCFContCascadeCuts){
   fCFContCascadeCuts->SetBinLimits(15,  -1.1  ,  1.1  );       // Y(Omega)
   fCFContCascadeCuts->SetBinLimits(16, -10.0  , 10.0  );       // BestPrimaryVtxPosZ
   if(fCollidingSystems){
-       fCFContCascadeCuts->SetBinLimits(17,   0.0, 10000.0  );    // TPCrefitTrackMultiplicity
+       fCFContCascadeCuts->SetBinLimits(17,   0.0, 10000.0  );    // nTrackPrimaryMultiplicity
        fCFContCascadeCuts->SetBinLimits(18,   0.0, 10000.0  );    // SPDTrackletsMultiplicity
   }
   else{  
-       fCFContCascadeCuts->SetBinLimits(17,   0.0, 250.0  );     // TPCrefitTrackMultiplicity
+       fCFContCascadeCuts->SetBinLimits(17,   0.0, 250.0  );     // nTrackPrimaryMultiplicity
        fCFContCascadeCuts->SetBinLimits(18,   0.0, 200.0  );     // SPDTrackletsMultiplicity
   }
   fCFContCascadeCuts->SetBinLimits(19,  68.0  ,164.0  );       // BachTPCClusters
@@ -1325,11 +1369,11 @@ if(! fCFContCascadeCuts){
   fCFContCascadeCuts->SetBinLimits(15,  -1.1  ,  1.1  );       // Y(Omega)
   fCFContCascadeCuts->SetBinLimits(16, -10.0  , 10.0  );       // BestPrimaryVtxPosZ
   if(fCollidingSystems){
-       fCFContCascadeCuts->SetBinLimits(17,   0.0, 10000.0  );    // TPCrefitTrackMultiplicity
+       fCFContCascadeCuts->SetBinLimits(17,   0.0, 10000.0  );    // nTrackPrimaryMultiplicity
        fCFContCascadeCuts->SetBinLimits(18,   0.0, 10000.0  );    // SPDTrackletsMultiplicity
   }
   else{  
-       fCFContCascadeCuts->SetBinLimits(17,   0.0, 250.0  );     // TPCrefitTrackMultiplicity
+       fCFContCascadeCuts->SetBinLimits(17,   0.0, 250.0  );     // nTrackPrimaryMultiplicity
        fCFContCascadeCuts->SetBinLimits(18,   0.0, 200.0  );     // SPDTrackletsMultiplicity
   }
   fCFContCascadeCuts->SetBinLimits(19,  25.0  ,165.0  );       // BachTPCClusters
@@ -1369,7 +1413,7 @@ if(! fCFContCascadeCuts){
   
   fCFContCascadeCuts->SetVarTitle(16, "Z-position(BestPrimVtx) (cm)");
   
-  fCFContCascadeCuts->SetVarTitle(17, "TPCrefit track Multiplicity");
+  fCFContCascadeCuts->SetVarTitle(17, "Primary Track Multiplicity");
   fCFContCascadeCuts->SetVarTitle(18, "SPD tracklets Multiplicity");
   fCFContCascadeCuts->SetVarTitle(19, "Bach.TPC Clusters");
   
@@ -1390,13 +1434,40 @@ if(! fHnSpAngularCorrXiMinus){
    Int_t    bins[5] = { 360, 120, 100, 150, 40};
    Double_t xmin[5] = {-50., -3.,  0.,  0., 1.30};
    Double_t xmax[5] = { 310., 3., 10., 15., 1.34};
-   fHnSpAngularCorrXiMinus = new THnSparseF("fHnSpAngularCorrXiMinus", "Angular Correlation for #Xi^{-}:", 5, bins, xmin, xmax);
-       fHnSpAngularCorrXiMinus->GetAxis(0)->SetTitle(" #Delta#phi(Casc,Track) (deg)");
-       fHnSpAngularCorrXiMinus->GetAxis(1)->SetTitle(" #Delta#eta(Casc,Track)");
-       fHnSpAngularCorrXiMinus->GetAxis(2)->SetTitle(" Pt_{Casc} (GeV/c)");
-       fHnSpAngularCorrXiMinus->GetAxis(3)->SetTitle(" Pt_{any track} (GeV/c)");
-       fHnSpAngularCorrXiMinus->GetAxis(4)->SetTitle(" Eff. Inv Mass (GeV/c^{2})");
-       fHnSpAngularCorrXiMinus->Sumw2();
+
+    TString strHnSparseTitle("");
+    TString strAxisTitle[5];
+    if(fAngularCorrelationType == "TrigAnyCasc-AssoAnyPrim" ){
+        strHnSparseTitle = "Angular Correlation for #Xi^{-}: Trig = Casc. / Asso = all prim. tracks";
+        strAxisTitle[0]  = " #Delta#phi(Casc,Track) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Casc,Track)";
+        strAxisTitle[2]  = " Pt_{Casc} (GeV/c)";
+        strAxisTitle[3]  = " Pt_{asso. track} (GeV/c)";
+    }
+    else if(fAngularCorrelationType == "TrigCascLeading-AssoAnyPrim"){
+        strHnSparseTitle = "Angular Correlation for #Xi^{-}: Trig = Casc. (leading part.) / Asso = all prim. tracks";
+        strAxisTitle[0]  = " #Delta#phi(Casc_{LEADING},Track) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Casc_{LEADING},Track)";
+        strAxisTitle[2]  = " Pt(Casc_{LEADING}) (GeV/c)";
+        strAxisTitle[3]  = " Pt_{asso. track} (GeV/c)";
+    }
+    else if(fAngularCorrelationType == "TrigLeadingTrck-AssoCasc"){
+        strHnSparseTitle = "Angular Correlation for #Xi^{-}: Trig = leading track / Asso = any cascade";
+        strAxisTitle[0]  = " #Delta#phi(Leading Track,Casc) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Leading Track,Casc)";
+        strAxisTitle[2]  = " Pt(asso. Casc) (GeV/c)";
+        strAxisTitle[3]  = " Pt_{Leading track} (GeV/c)";
+
+    }
+        strAxisTitle[4]  = " Eff. Inv Mass (GeV/c^{2})";
+
+   fHnSpAngularCorrXiMinus = new THnSparseF("fHnSpAngularCorrXiMinus", strHnSparseTitle.Data(), 5, bins, xmin, xmax);
+        fHnSpAngularCorrXiMinus->GetAxis(0)->SetTitle( strAxisTitle[0].Data() );
+        fHnSpAngularCorrXiMinus->GetAxis(1)->SetTitle( strAxisTitle[1].Data() );
+        fHnSpAngularCorrXiMinus->GetAxis(2)->SetTitle( strAxisTitle[2].Data() );
+        fHnSpAngularCorrXiMinus->GetAxis(3)->SetTitle( strAxisTitle[3].Data() );
+        fHnSpAngularCorrXiMinus->GetAxis(4)->SetTitle( strAxisTitle[4].Data() );
+        fHnSpAngularCorrXiMinus->Sumw2();
    fListHistCascade->Add(fHnSpAngularCorrXiMinus);
 }
 
@@ -1409,12 +1480,39 @@ if(! fHnSpAngularCorrXiPlus){
    Int_t    bins[5] = { 360, 120, 100, 150, 40};
    Double_t xmin[5] = {-50., -3.,  0.,  0., 1.30};
    Double_t xmax[5] = { 310., 3., 10., 15., 1.34};
-   fHnSpAngularCorrXiPlus = new THnSparseF("fHnSpAngularCorrXiPlus", "Angular Correlation for #Xi^{+}:", 5, bins, xmin, xmax);
-       fHnSpAngularCorrXiPlus->GetAxis(0)->SetTitle(" #Delta#phi(Casc,Track) (deg)");
-       fHnSpAngularCorrXiPlus->GetAxis(1)->SetTitle(" #Delta#eta(Casc,Track)");
-       fHnSpAngularCorrXiPlus->GetAxis(2)->SetTitle(" Pt_{Casc} (GeV/c)");
-       fHnSpAngularCorrXiPlus->GetAxis(3)->SetTitle(" Pt_{any track} (GeV/c)");
-       fHnSpAngularCorrXiPlus->GetAxis(4)->SetTitle(" Eff. Inv Mass (GeV/c^{2})");
+   
+    TString strHnSparseTitle("");
+    TString strAxisTitle[5];
+    if(fAngularCorrelationType == "TrigAnyCasc-AssoAnyPrim" ){
+        strHnSparseTitle = "Angular Correlation for #bar{#Xi}^{+}: Trig = Casc. / Asso = all prim. tracks";
+        strAxisTitle[0]  = " #Delta#phi(Casc,Track) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Casc,Track)";
+        strAxisTitle[2]  = " Pt_{Casc} (GeV/c)";
+        strAxisTitle[3]  = " Pt_{asso. track} (GeV/c)";
+    }
+    else if(fAngularCorrelationType == "TrigCascLeading-AssoAnyPrim"){
+        strHnSparseTitle = "Angular Correlation for #bar{#Xi}^{+}: Trig = Casc. (leading part.) / Asso = all prim. tracks";
+        strAxisTitle[0]  = " #Delta#phi(Casc_{LEADING},Track) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Casc_{LEADING},Track)";
+        strAxisTitle[2]  = " Pt(Casc_{LEADING}) (GeV/c)";
+        strAxisTitle[3]  = " Pt_{asso. track} (GeV/c)";
+    }
+    else if(fAngularCorrelationType == "TrigLeadingTrck-AssoCasc"){
+        strHnSparseTitle = "Angular Correlation for #bar{#Xi}^{+}: Trig = leading track / Asso = any cascade";
+        strAxisTitle[0]  = " #Delta#phi(Leading Track,Casc) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Leading Track,Casc)";
+        strAxisTitle[2]  = " Pt(asso. Casc) (GeV/c)";
+        strAxisTitle[3]  = " Pt_{Leading track} (GeV/c)";
+
+    }
+        strAxisTitle[4]  = " Eff. Inv Mass (GeV/c^{2})";
+
+   fHnSpAngularCorrXiPlus = new THnSparseF("fHnSpAngularCorrXiPlus", strHnSparseTitle.Data(), 5, bins, xmin, xmax);
+       fHnSpAngularCorrXiPlus->GetAxis(0)->SetTitle( strAxisTitle[0].Data() );
+       fHnSpAngularCorrXiPlus->GetAxis(1)->SetTitle( strAxisTitle[1].Data() );
+       fHnSpAngularCorrXiPlus->GetAxis(2)->SetTitle( strAxisTitle[2].Data() );
+       fHnSpAngularCorrXiPlus->GetAxis(3)->SetTitle( strAxisTitle[3].Data() );
+       fHnSpAngularCorrXiPlus->GetAxis(4)->SetTitle( strAxisTitle[4].Data() );
        fHnSpAngularCorrXiPlus->Sumw2();
    fListHistCascade->Add(fHnSpAngularCorrXiPlus);
 }
@@ -1429,12 +1527,39 @@ if(! fHnSpAngularCorrOmegaMinus){
    Int_t    bins[5] = { 360, 120, 100, 150, 40};
    Double_t xmin[5] = {-50., -3.,  0.,  0., 1.65};
    Double_t xmax[5] = { 310., 3., 10., 15., 1.69};
-   fHnSpAngularCorrOmegaMinus = new THnSparseF("fHnSpAngularCorrOmegaMinus", "Angular Correlation for #Omega^{-}:", 5, bins, xmin, xmax);
-       fHnSpAngularCorrOmegaMinus->GetAxis(0)->SetTitle(" #Delta#phi(Casc,Track) (deg)");
-       fHnSpAngularCorrOmegaMinus->GetAxis(1)->SetTitle(" #Delta#eta(Casc,Track)");
-       fHnSpAngularCorrOmegaMinus->GetAxis(2)->SetTitle(" Pt_{Casc} (GeV/c)");
-       fHnSpAngularCorrOmegaMinus->GetAxis(3)->SetTitle(" Pt_{any track} (GeV/c)");
-       fHnSpAngularCorrOmegaMinus->GetAxis(4)->SetTitle(" Eff. Inv Mass (GeV/c^{2})");
+   
+    TString strHnSparseTitle("");
+    TString strAxisTitle[5];
+    if(fAngularCorrelationType == "TrigAnyCasc-AssoAnyPrim" ){
+        strHnSparseTitle = "Angular Correlation for #Omega^{-}: Trig = Casc. / Asso = all prim. tracks";
+        strAxisTitle[0]  = " #Delta#phi(Casc,Track) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Casc,Track)";
+        strAxisTitle[2]  = " Pt_{Casc} (GeV/c)";
+        strAxisTitle[3]  = " Pt_{asso. track} (GeV/c)";
+    }
+    else if(fAngularCorrelationType == "TrigCascLeading-AssoAnyPrim"){
+        strHnSparseTitle = "Angular Correlation for #Omega^{-}: Trig = Casc. (leading part.) / Asso = all prim. tracks";
+        strAxisTitle[0]  = " #Delta#phi(Casc_{LEADING},Track) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Casc_{LEADING},Track)";
+        strAxisTitle[2]  = " Pt(Casc_{LEADING}) (GeV/c)";
+        strAxisTitle[3]  = " Pt_{asso. track} (GeV/c)";
+    }
+    else if(fAngularCorrelationType == "TrigLeadingTrck-AssoCasc"){
+        strHnSparseTitle = "Angular Correlation for #Omega^{-}: Trig = leading track / Asso = any cascade";
+        strAxisTitle[0]  = " #Delta#phi(Leading Track,Casc) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Leading Track,Casc)";
+        strAxisTitle[2]  = " Pt(asso. Casc) (GeV/c)";
+        strAxisTitle[3]  = " Pt_{Leading track} (GeV/c)";
+
+    }
+        strAxisTitle[4]  = " Eff. Inv Mass (GeV/c^{2})";
+    
+   fHnSpAngularCorrOmegaMinus = new THnSparseF("fHnSpAngularCorrOmegaMinus", strHnSparseTitle.Data(), 5, bins, xmin, xmax);
+       fHnSpAngularCorrOmegaMinus->GetAxis(0)->SetTitle( strAxisTitle[0].Data() );
+       fHnSpAngularCorrOmegaMinus->GetAxis(1)->SetTitle( strAxisTitle[1].Data() );
+       fHnSpAngularCorrOmegaMinus->GetAxis(2)->SetTitle( strAxisTitle[2].Data() );
+       fHnSpAngularCorrOmegaMinus->GetAxis(3)->SetTitle( strAxisTitle[3].Data() );
+       fHnSpAngularCorrOmegaMinus->GetAxis(4)->SetTitle( strAxisTitle[4].Data() );
        fHnSpAngularCorrOmegaMinus->Sumw2();
    fListHistCascade->Add(fHnSpAngularCorrOmegaMinus);
 }
@@ -1448,12 +1573,39 @@ if(! fHnSpAngularCorrOmegaPlus){
    Int_t    bins[5] = { 360, 120, 100, 150, 40};
    Double_t xmin[5] = {-50., -3.,  0.,  0., 1.65};
    Double_t xmax[5] = { 310., 3., 10., 15., 1.69};
-   fHnSpAngularCorrOmegaPlus = new THnSparseF("fHnSpAngularCorrOmegaPlus", "Angular Correlation for #Omega^{+}:", 5, bins, xmin, xmax);
-       fHnSpAngularCorrOmegaPlus->GetAxis(0)->SetTitle(" #Delta#phi(Casc,Track) (deg)");
-       fHnSpAngularCorrOmegaPlus->GetAxis(1)->SetTitle(" #Delta#eta(Casc,Track)");
-       fHnSpAngularCorrOmegaPlus->GetAxis(2)->SetTitle(" Pt_{Casc} (GeV/c)");
-       fHnSpAngularCorrOmegaPlus->GetAxis(3)->SetTitle(" Pt_{any track} (GeV/c)");
-       fHnSpAngularCorrOmegaPlus->GetAxis(4)->SetTitle(" Eff. Inv Mass (GeV/c^{2})");
+   
+    TString strHnSparseTitle("");
+    TString strAxisTitle[5];
+        if(fAngularCorrelationType == "TrigAnyCasc-AssoAnyPrim" ){
+        strHnSparseTitle = "Angular Correlation for #bar{#Omega}^{+}: Trig = Casc. / Asso = all prim. tracks";
+        strAxisTitle[0]  = " #Delta#phi(Casc,Track) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Casc,Track)";
+        strAxisTitle[2]  = " Pt_{Casc} (GeV/c)";
+        strAxisTitle[3]  = " Pt_{asso. track} (GeV/c)";
+    }
+    else if(fAngularCorrelationType == "TrigCascLeading-AssoAnyPrim"){
+        strHnSparseTitle = "Angular Correlation for #bar{#Omega}^{+}: Trig = Casc. (leading part.) / Asso = all prim. tracks";
+        strAxisTitle[0]  = " #Delta#phi(Casc_{LEADING},Track) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Casc_{LEADING},Track)";
+        strAxisTitle[2]  = " Pt(Casc_{LEADING}) (GeV/c)";
+        strAxisTitle[3]  = " Pt_{asso. track} (GeV/c)";
+    }
+    else if(fAngularCorrelationType == "TrigLeadingTrck-AssoCasc"){
+        strHnSparseTitle = "Angular Correlation for #bar{#Omega}^{+}: Trig = leading track / Asso = any cascade";
+        strAxisTitle[0]  = " #Delta#phi(Leading Track,Casc) (deg)";
+        strAxisTitle[1]  = " #Delta#eta(Leading Track,Casc)";
+        strAxisTitle[2]  = " Pt(asso. Casc) (GeV/c)";
+        strAxisTitle[3]  = " Pt_{Leading track} (GeV/c)";
+
+    }
+        strAxisTitle[4]  = " Eff. Inv Mass (GeV/c^{2})";
+   
+   fHnSpAngularCorrOmegaPlus = new THnSparseF("fHnSpAngularCorrOmegaPlus", strHnSparseTitle.Data(), 5, bins, xmin, xmax);
+       fHnSpAngularCorrOmegaPlus->GetAxis(0)->SetTitle( strAxisTitle[0].Data() );
+       fHnSpAngularCorrOmegaPlus->GetAxis(1)->SetTitle( strAxisTitle[1].Data() );
+       fHnSpAngularCorrOmegaPlus->GetAxis(2)->SetTitle( strAxisTitle[2].Data() );
+       fHnSpAngularCorrOmegaPlus->GetAxis(3)->SetTitle( strAxisTitle[3].Data() );
+       fHnSpAngularCorrOmegaPlus->GetAxis(4)->SetTitle( strAxisTitle[4].Data() );
        fHnSpAngularCorrOmegaPlus->Sumw2();
    fListHistCascade->Add(fHnSpAngularCorrOmegaPlus);
 }
@@ -1478,7 +1630,8 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
         AliAODEvent *lAODevent = 0x0;
         Int_t    ncascades                      = -1;
         Int_t    nTrackMultiplicity             = -1;
-        Int_t    nTrackWithTPCrefitMultiplicity =  0;
+        Int_t    nTrackWithTPCrefitMultiplicity = -1;
+        Int_t    nTrackPrimaryMultiplicity      = -1;
 
         Short_t  lStatusTrackingPrimVtx         = -2;
         Double_t lTrkgPrimaryVtxPos[3]          = {-100.0, -100.0, -100.0};
@@ -1513,7 +1666,10 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
         
         UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
         Bool_t isSelected = 0;
-        isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
+        if(     fTriggerMaskType == "kMB")           isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
+        else if(fTriggerMaskType == "kHighMult")     isSelected = (maskIsSelected & AliVEvent::kHighMult) == AliVEvent::kHighMult;
+        else                                         isSelected = 1; // default = select anyway (use case = run without Phys Selection task)
+        
         if ( ! isSelected ) { 
                 PostData(1, fListHistCascade); 
                 return;
@@ -1527,7 +1683,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
         // 1 - Cascade vertexer (ESD)
         
         if(fkRerunV0CascVertexers){ // FIXME : relaunch V0 and Cascade vertexers
-//                 if(fAnalysisType == "ESD" ){
+                if(fAnalysisType == "ESD" ){
 //                         lESDevent->ResetCascades();
 //                         lESDevent->ResetV0s();
 //                 
@@ -1539,12 +1695,13 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
 //                 
 //                         lV0vtxer.Tracks2V0vertices(lESDevent);
 //                         lCascVtxer.V0sTracks2CascadeVertices(lESDevent);
-//                }
+               }
         }// end if(RelaunchV0CascVertexers)
         
         //-------------------------------------------------
        ncascades                      = lESDevent->GetNumberOfCascades();
         nTrackWithTPCrefitMultiplicity = DoESDTrackWithTPCrefitMultiplicity(lESDevent);
+        nTrackPrimaryMultiplicity      = fESDtrackCuts->CountAcceptedTracks(lESDevent);
 
   }//if (fAnalysisType == "ESD")
   
@@ -1557,6 +1714,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
        }
        ncascades                      = lAODevent->GetNumberOfCascades();
         nTrackWithTPCrefitMultiplicity = -1;
+        nTrackPrimaryMultiplicity      = -1;
         
         fHistCascadeMultiplicityBeforeTrigSel->Fill ( ncascades );
   }
@@ -1568,6 +1726,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
         //-------------------------------------------------
         fHistTrackMultiplicityForTrigEvt         ->Fill( nTrackMultiplicity             );
         fHistTPCrefitTrackMultiplicityForTrigEvt ->Fill( nTrackWithTPCrefitMultiplicity );
+        fHistPrimaryTrackMultiplicityForTrigEvt  ->Fill( nTrackPrimaryMultiplicity      );
         fHistCascadeMultiplicityForTrigEvt       ->Fill( ncascades                      );
 
 
@@ -1604,6 +1763,17 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
         
         fHistCascadeMultiplicityForTrigEvtAndZprimVtx->Fill( ncascades  );
         
+        // FIXME : quality selection regarding pile-up rejection 
+        if(fkRejectEventPileUp) {
+                if(lESDevent->IsPileupFromSPD() ){// minContributors=3, minZdist=0.8, nSigmaZdist=3., nSigmaDiamXY=2., nSigmaDiamZ=5.  -> see http://alisoft.cern.ch/viewvc/trunk/STEER/AliESDEvent.h?root=AliRoot&r1=41914&r2=42199&pathrev=42199
+                        AliWarning("Pb / Event tagged as pile-up by SPD... return !"); 
+                        PostData(1, fListHistCascade); 
+                        return; 
+                }
+        }
+        
+        fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx->Fill( ncascades  );
+        
         // FIXME : remove TPC-only primary vertex : retain only events with tracking + SPD vertex
         if(fkQualityCutNoTPConlyPrimVtx) {
                 const AliESDVertex *lPrimarySPDVtx = lESDevent->GetPrimaryVertexSPD();
@@ -1675,7 +1845,8 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
        Double_t lDcaXiDaughters = -1. ;
        Double_t lXiCosineOfPointingAngle = -1. ;
        Double_t lPosXi[3] = { -1000.0, -1000.0, -1000.0 };
-       Double_t lXiRadius = -1000. ;
+       Double_t lXiRadius2D = -1000. ;
+        Double_t lXiRadius3D = -1000. ;
         
         // - 2nd part of initialisation : Nbr of clusters within TPC for the 3 daughter cascade tracks
         Int_t    lPosTPCClusters    = -1; // For ESD only ...//FIXME : wait for availability in AOD
@@ -1785,7 +1956,8 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
                // Take care : the best available vertex should be used (like in AliCascadeVertexer)
        
        xi->GetXYZcascade( lPosXi[0],  lPosXi[1], lPosXi[2] ); 
-       lXiRadius                       = TMath::Sqrt( lPosXi[0]*lPosXi[0]  +  lPosXi[1]*lPosXi[1] );
+       lXiRadius2D    = TMath::Sqrt( lPosXi[0]*lPosXi[0]  +  lPosXi[1]*lPosXi[1] );
+        lXiRadius3D    = TMath::Sqrt( lPosXi[0]*lPosXi[0]  +  lPosXi[1]*lPosXi[1] +  lPosXi[2]*lPosXi[2]);
                
                
 
@@ -1893,9 +2065,9 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
                
                if(lDcaXiDaughters > 0.05) continue; // > 0.1 by default
                //if(lXiCosineOfPointingAngle < 0.999 ) continue;
-               if(lXiRadius < 1.0) continue;
-               if(lXiRadius > 100) continue;
-               if(TMath::Abs(lInvMassLambdaAsCascDghter-1.11568) > 0.007) continue;
+               if(lXiRadius2D < 1.0) continue;
+               if(lXiRadius2D > 100) continue;
+               if(TMath::Abs(lInvMassLambdaAsCascDghter-1.11568) > 0.008) continue;
                if(lDcaV0DaughtersXi > 0.3) continue;
                
                if(lV0CosineOfPointingAngleXi > 0.9999) continue;
@@ -2163,7 +2335,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
         //        << " : mass(Xi) = " << xi->GetEffMassXi() 
         //        << " / charge = "   << lChargeXi
         //        << " / pt(Casc) = " << lXiTransvMom
-        //        << " / Decay 2d R(Xi) = " << lXiRadius 
+        //        << " / Decay 2d R(Xi) = " << lXiRadius2D 
         //        << " / Track Index(Pos)  = " << lIdxPosXi << "/ Nb(TPC clusters) = " << lPosTPCClusters 
         //        << " / Track Index(Neg)  = " << lIdxNegXi << "/ Nb(TPC clusters) = " << lNegTPCClusters 
         //        << " / Track Index(Bach) = " << lBachIdx  << "/ Nb(TPC clusters) = " << lBachTPCClusters 
@@ -2226,7 +2398,8 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
                lPosXi[0] = xi->DecayVertexXiX();
                lPosXi[1] = xi->DecayVertexXiY();
                lPosXi[2] = xi->DecayVertexXiZ();
-       lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0]  +  lPosXi[1]*lPosXi[1] );
+       lXiRadius2D = TMath::Sqrt( lPosXi[0]*lPosXi[0]  +  lPosXi[1]*lPosXi[1] );
+        lXiRadius3D = TMath::Sqrt( lPosXi[0]*lPosXi[0]  +  lPosXi[1]*lPosXi[1] +  lPosXi[2]*lPosXi[2] );
                
 
                // - II.Step 3 : around the tracks : Bach + V0 (AOD)
@@ -2367,13 +2540,14 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
         //         << " : mass(Omega-) = " << lInvMassOmegaMinus
         //         << " / charge = "   << lChargeXi
         //         << " / pt(Casc) = " << lXiTransvMom
-        //         << " / Decay 2d R(Xi) = " << lXiRadius 
+        //         << " / Decay 2d R(Xi) = " << lXiRadius2D 
         //         << endl;
   
 
        // - II.Fill.Step 1      : primary vertex
   
         fHistTPCrefitTrackMultiplicityForCascadeEvt->Fill( nTrackWithTPCrefitMultiplicity );
+        fHistPrimaryTrackMultiplicityForCascadeEvt ->Fill( nTrackPrimaryMultiplicity );
         
         fHistPosV0TPCClusters           ->Fill( lPosTPCClusters  );
         fHistNegV0TPCClusters           ->Fill( lNegTPCClusters  );
@@ -2403,7 +2577,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
         if( ( (lChargeXi<0) && lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC ) ||
             ( (lChargeXi>0) && lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC )  )
                 // NOTE : 
-                // with this condition, it could happen that a cascade candidate satisfies the wrong requirement,
+                // with this PID condition, it could happen that a cascade candidate satisfies the wrong requirement,
                 // e.g. one looks at a Xi- candidate for which lIsBachelorPionForTPC && lIsPosProtonForTPC && lIsNegPionForTPC = kFALSE
                 //      Expectation: it should be excluded.
                 //      but lIsBachelorPionForTPC && lIsNegProtonForTPC && lIsPosPionForTPC = kTRUE
@@ -2418,7 +2592,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
                 fHistDcaXiDaughters            ->Fill( lDcaXiDaughters          );     // Flag CascadeVtxer: Cut Variable e 
                 fHistDcaBachToPrimVertex       ->Fill( lDcaBachToPrimVertexXi   );     // Flag CascadeVtxer: Cut Variable d
                 fHistXiCosineOfPointingAngle   ->Fill( lXiCosineOfPointingAngle );     // Flag CascadeVtxer: Cut Variable f
-                fHistXiRadius                  ->Fill( lXiRadius                );     // Flag CascadeVtxer: Cut Variable g+h
+                fHistXiRadius                  ->Fill( lXiRadius2D                );   // Flag CascadeVtxer: Cut Variable g+h
                 
                 
                 // II.Fill.Step 3
@@ -2438,7 +2612,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
                 fHistChargeXi                   ->Fill( lChargeXi      );
                 fHistV0toXiCosineOfPointingAngle->Fill( lV0toXiCosineOfPointingAngle );
         
-                if( TMath::Abs( lInvMassXiMinus-1.3217 ) < 0.012 || TMath::Abs( lInvMassXiPlus-1.3217 ) < 0.012){// One InvMass should be different from 0
+                if( TMath::Abs( lInvMassXiMinus-1.3217 ) < 0.010 || TMath::Abs( lInvMassXiPlus-1.3217 ) < 0.010){// One InvMass should be different from 0
                         fHistXiTransvMom        ->Fill( lXiTransvMom   );
                         fHistXiTotMom           ->Fill( lXiTotMom      );
         
@@ -2449,13 +2623,21 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
                         fHistEtaXi              ->Fill( lEta           );
                         fHistThetaXi            ->Fill( lTheta         );
                         fHistPhiXi              ->Fill( lPhi           );
+
                 }
+                
+                if( (lChargeXi < 0) && (TMath::Abs( lInvMassXiMinus-1.3217 ) < 0.010) )         fHistcTauXiMinus     ->Fill( lXiRadius3D * 1.3271/lXiTotMom );
+                if( (lChargeXi > 0) && (TMath::Abs( lInvMassXiPlus -1.3217 ) < 0.010) )         fHistcTauXiPlus      ->Fill( lXiRadius3D * 1.3271/lXiTotMom );
 
-                if( TMath::Abs( lInvMassOmegaMinus-1.672 ) < 0.012 || TMath::Abs( lInvMassOmegaPlus-1.672 ) < 0.012 ){// One InvMass should be different from 0
+                if( TMath::Abs( lInvMassOmegaMinus-1.672 ) < 0.010 || TMath::Abs( lInvMassOmegaPlus-1.672 ) < 0.010 ){// One InvMass should be different from 0
                         fHistRapOmega           ->Fill( lRapOmega            ); 
+
                 }
+                
+                if( (lChargeXi < 0) && (TMath::Abs( lInvMassOmegaMinus-1.672 ) < 0.010) )        fHistcTauOmegaMinus ->Fill( lXiRadius3D * 1.67245/lXiTotMom );
+                if( (lChargeXi > 0) && (TMath::Abs( lInvMassOmegaPlus- 1.672 ) < 0.010) )        fHistcTauOmegaPlus  ->Fill( lXiRadius3D * 1.67245/lXiTotMom );
         
-                f2dHistArmenteros              ->Fill( lAlphaXi, lPtArmXi   );
+                f2dHistArmenteros              ->Fill( lChargeXi*lAlphaXi, lPtArmXi   );
         }// end with PID ...
        
        // II.Fill.Step 5 : inv mass plots 1D
@@ -2478,16 +2660,16 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
        if( lChargeXi < 0 ) {
                f2dHistEffMassLambdaVsEffMassXiMinus->Fill( lInvMassLambdaAsCascDghter, lInvMassXiMinus ); 
                f2dHistEffMassXiVsEffMassOmegaMinus ->Fill( lInvMassXiMinus, lInvMassOmegaMinus );
-               f2dHistXiRadiusVsEffMassXiMinus     ->Fill( lXiRadius, lInvMassXiMinus );
-               f2dHistXiRadiusVsEffMassOmegaMinus  ->Fill( lXiRadius, lInvMassOmegaMinus );
+               f2dHistXiRadiusVsEffMassXiMinus     ->Fill( lXiRadius2D, lInvMassXiMinus );
+               f2dHistXiRadiusVsEffMassOmegaMinus  ->Fill( lXiRadius2D, lInvMassOmegaMinus );
                f3dHistXiPtVsEffMassVsYXiMinus      ->Fill( lXiTransvMom, lInvMassXiMinus,    lRapXi    );
                f3dHistXiPtVsEffMassVsYOmegaMinus   ->Fill( lXiTransvMom, lInvMassOmegaMinus, lRapOmega );
        }
        else{
                f2dHistEffMassLambdaVsEffMassXiPlus ->Fill( lInvMassLambdaAsCascDghter, lInvMassXiPlus );
                f2dHistEffMassXiVsEffMassOmegaPlus  ->Fill( lInvMassXiPlus, lInvMassOmegaPlus );
-               f2dHistXiRadiusVsEffMassXiPlus      ->Fill( lXiRadius, lInvMassXiPlus);
-               f2dHistXiRadiusVsEffMassOmegaPlus   ->Fill( lXiRadius, lInvMassOmegaPlus );
+               f2dHistXiRadiusVsEffMassXiPlus      ->Fill( lXiRadius2D, lInvMassXiPlus);
+               f2dHistXiRadiusVsEffMassOmegaPlus   ->Fill( lXiRadius2D, lInvMassOmegaPlus );
                f3dHistXiPtVsEffMassVsYXiPlus       ->Fill( lXiTransvMom, lInvMassXiPlus,    lRapXi    );
                f3dHistXiPtVsEffMassVsYOmegaPlus    ->Fill( lXiTransvMom, lInvMassOmegaPlus, lRapOmega );
        }
@@ -2501,7 +2683,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
                lContainerPIDVars[0] = lXiTransvMom       ;
                lContainerPIDVars[1] = lInvMassXiMinus    ;
                lContainerPIDVars[2] = lRapXi             ;
-               lContainerPIDVars[3] = lSPDTrackletsMultiplicity;       // FIXME : SPDTrackletsMultiplicity is not available for AOD ... = -1
+               lContainerPIDVars[3] = nTrackPrimaryMultiplicity;       // FIXME : nTrackPrimaryMultiplicity not set for AOD ... = -1
                        
                // No PID
                        fCFContCascadePIDXiMinus->Fill(lContainerPIDVars, 0); // No PID
@@ -2539,7 +2721,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
                lContainerPIDVars[0] = lXiTransvMom       ;
                lContainerPIDVars[1] = lInvMassXiPlus     ;
                lContainerPIDVars[2] = lRapXi             ;
-               lContainerPIDVars[3] = lSPDTrackletsMultiplicity;       // FIXME : SPDTrackletsMultiplicity is not available for AOD ... = -1
+               lContainerPIDVars[3] = nTrackPrimaryMultiplicity;       // FIXME : nTrackPrimaryMultiplicity not set for AOD ... = -1
                        
                // No PID
                        fCFContCascadePIDXiPlus->Fill(lContainerPIDVars, 0); // No PID
@@ -2577,7 +2759,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
                lContainerPIDVars[0] = lXiTransvMom       ;
                lContainerPIDVars[1] = lInvMassOmegaMinus ;
                lContainerPIDVars[2] = lRapOmega          ;
-               lContainerPIDVars[3] = lSPDTrackletsMultiplicity;       // FIXME : SPDTrackletsMultiplicity is not available for AOD ... = -1
+               lContainerPIDVars[3] = nTrackPrimaryMultiplicity;       // FIXME : nTrackPrimaryMultiplicity not set for AOD ... = -1
                        
                // No PID
                        fCFContCascadePIDOmegaMinus->Fill(lContainerPIDVars, 0); // No PID
@@ -2615,7 +2797,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
                lContainerPIDVars[0] = lXiTransvMom       ;
                lContainerPIDVars[1] = lInvMassOmegaPlus ;
                lContainerPIDVars[2] = lRapOmega          ;
-               lContainerPIDVars[3] = lSPDTrackletsMultiplicity;       // FIXME : SPDTrackletsMultiplicity is not available for AOD ... = -1
+               lContainerPIDVars[3] = nTrackPrimaryMultiplicity;       // FIXME : nTrackPrimaryMultiplicity not set for AOD ... = -1
                        
                // No PID
                        fCFContCascadePIDOmegaPlus->Fill(lContainerPIDVars, 0); // No PID
@@ -2653,7 +2835,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
         lContainerCutVars[0]  = lDcaXiDaughters;
         lContainerCutVars[1]  = lDcaBachToPrimVertexXi;
         lContainerCutVars[2]  = lXiCosineOfPointingAngle;
-        lContainerCutVars[3]  = lXiRadius;
+        lContainerCutVars[3]  = lXiRadius2D;
         lContainerCutVars[4]  = lInvMassLambdaAsCascDghter;
         lContainerCutVars[5]  = lDcaV0DaughtersXi;
         lContainerCutVars[6]  = lV0CosineOfPointingAngleXi;
@@ -2665,7 +2847,7 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
         lContainerCutVars[13] = lXiTransvMom;
         
         lContainerCutVars[16] = lBestPrimaryVtxPos[2];
-        lContainerCutVars[17] = nTrackWithTPCrefitMultiplicity;  // FIXME : nTrackWithTPCrefitMultiplicity not checked for AOD ... = 0
+        lContainerCutVars[17] = nTrackPrimaryMultiplicity;       // FIXME : nTrackPrimaryMultiplicity not checked for AOD ... = 0
         lContainerCutVars[18] = lSPDTrackletsMultiplicity;       // FIXME : SPDTrackletsMultiplicity is not available for AOD ... = -1
         lContainerCutVars[19] = lBachTPCClusters;                // FIXME : BachTPCClusters          is not available for AOD ... = -1
         
@@ -2700,12 +2882,12 @@ void AliAnalysisTaskCheckCascade::UserExec(Option_t *)
         // II.Fill.Step 8 :  angular correlations
         
         if( lChargeXi < 0 ){
-                if( lIsBachelorPionForTPC   && lIsPosProtonForTPC    && lIsNegPionForTPC )      DoAngularCorrelation("Xi-",    lInvMassXiMinus,    lArrTrackID, lTVect3MomXi, lEta);
-                if( lIsBachelorKaonForTPC   && lIsPosProtonForTPC    && lIsNegPionForTPC )      DoAngularCorrelation("Omega-", lInvMassOmegaMinus, lArrTrackID, lTVect3MomXi, lEta);
+                if( lIsBachelorPionForTPC   && lIsPosProtonForTPC    && lIsNegPionForTPC )      DoAngularCorrelation("Xi-",    lInvMassXiMinus,    lArrTrackID, lTVect3MomXi, lEta, lRapXi);
+                if( lIsBachelorKaonForTPC   && lIsPosProtonForTPC    && lIsNegPionForTPC )      DoAngularCorrelation("Omega-", lInvMassOmegaMinus, lArrTrackID, lTVect3MomXi, lEta, lRapOmega);
         }
         else{
-                if( lIsBachelorPionForTPC   && lIsNegProtonForTPC    && lIsPosPionForTPC )      DoAngularCorrelation("Xi+",    lInvMassXiPlus,    lArrTrackID, lTVect3MomXi, lEta);
-                if( lIsBachelorKaonForTPC   && lIsNegProtonForTPC    && lIsPosPionForTPC )      DoAngularCorrelation("Omega+", lInvMassOmegaPlus, lArrTrackID, lTVect3MomXi, lEta);
+                if( lIsBachelorPionForTPC   && lIsNegProtonForTPC    && lIsPosPionForTPC )      DoAngularCorrelation("Xi+",    lInvMassXiPlus,    lArrTrackID, lTVect3MomXi, lEta, lRapXi);
+                if( lIsBachelorKaonForTPC   && lIsNegProtonForTPC    && lIsPosPionForTPC )      DoAngularCorrelation("Omega+", lInvMassOmegaPlus, lArrTrackID, lTVect3MomXi, lEta, lRapOmega);
         }
         
        
@@ -2721,81 +2903,193 @@ void AliAnalysisTaskCheckCascade::DoAngularCorrelation( const Char_t   *lCascTyp
                                                              Double_t  lInvMassCascade, 
                                                        const Int_t    *lArrTrackID,
                                                              TVector3 &lTVect3MomXi, 
-                                                             Double_t  lEtaXi ){
+                                                             Double_t  lEtaXi,
+                                                              Double_t  lRapCascade){
   // Perform the Delta(Phi)Delta(Eta) analysis 
   // by properly filling the THnSparseF 
-       
-       TString lStrCascType( lCascType );
-       
-       Double_t lCascPdgMass = 0.0;
-       if( lStrCascType.Contains("Xi") )       lCascPdgMass = 1.3217;
-       if( lStrCascType.Contains("Omega") )    lCascPdgMass = 1.6724;
-       
-       if( lInvMassCascade > lCascPdgMass + 0.010) return;
-       if( lInvMassCascade < lCascPdgMass - 0.010) return;
-       // Check the Xi- candidate is within the proper mass window m0 +- 10 MeV
-       
-       
-       // 1st loop: check there is no track with a higher pt ...
-       // = The cascade is meant to be a leading particle : Pt(Casc) > any track in the event
-       for(Int_t TrckIdx = 0; TrckIdx < (InputEvent())->GetNumberOfTracks() ; TrckIdx++ )
-       {// Loop over all the tracks of the event
-       
-               AliVTrack *lCurrentTrck = dynamic_cast<AliVTrack*>( (InputEvent())->GetTrack( TrckIdx ) );
-                       if (!lCurrentTrck ) {
-                               AliWarning("ERROR Correl. Study : Could not retrieve a track while looping over the event tracks ...");
-                               continue;
-                       }
-               if(lTVect3MomXi.Pt() < lCurrentTrck->Pt() ) return;     
-               // Room for improvement: //FIXME
-               // 1. There is a given resolution on pt : maybe release the cut Pt(casc) < Pt(track)*90% ?
-               // 2. Apply this cut only when DeltaPhi(casc, track) > 90 deg = when track is in the away-side ?
-               // 3. Anti-splitting cut (like in Femto analysis) ?
-                       
-       }// end control loop
-       
-       // 2nd loop: filling loop
-       for(Int_t TrckIdx = 0; TrckIdx < (InputEvent())->GetNumberOfTracks() ; TrckIdx++ )
-       {// Loop over all the tracks of the event
-       
-               AliVTrack *lCurrentTrck = dynamic_cast<AliVTrack*>( (InputEvent())->GetTrack( TrckIdx ) );
-                       if (!lCurrentTrck ) {
-                               AliWarning("ERROR Correl. Study : Could not retrieve a track while looping over the event tracks ...");
-                               continue;
-                       }
-                               
-               // Room for improvement: //FIXME
-               // 1. Loop only on primary tracks ?     
-               // 2. Exclude the tracks that build the condisdered cascade = the bachelor + the V0 dghters
-               //     This may bias the outcome, especially for low multplicity events.
-               // Note : For ESD event, track ID == track index.
-                       if(lCurrentTrck->GetID() == lArrTrackID[0]) continue;
-                       if(lCurrentTrck->GetID() == lArrTrackID[1]) continue;
-                       if(lCurrentTrck->GetID() == lArrTrackID[2]) continue;
-                       
-               TVector3 lTVect3MomTrck(lCurrentTrck->Px(), lCurrentTrck->Py(), lCurrentTrck->Pz() );
-               
-               // 2 hypotheses made here :
-               //   - The Xi trajectory is a straight line,
-               //   - The Xi doesn't loose any energy by crossing the first layer(s) of ITS, if ever;
-               //      So, meaning hyp: vect p(Xi) at the emission = vect p(Xi) at the decay vertex
-               //      By doing this, we introduce a systematic error on the cascade Phi ...
-               // Room for improvement: take into account the curvature of the Xi trajectory //FIXME
-       
-               Double_t lHnSpFillVar[5] = {0.};
-               lHnSpFillVar[0] = lTVect3MomXi.DeltaPhi(lTVect3MomTrck) * 180.0/TMath::Pi(); // Delta phi(Casc,Track) (deg)
-               if(lHnSpFillVar[0] < -50.0) lHnSpFillVar[0] += 360.0;           
-               lHnSpFillVar[1] = lEtaXi - lCurrentTrck->Eta();                            // Delta eta(Casc,Track)
-               lHnSpFillVar[2] = lTVect3MomXi.Pt();                                       // Pt_{Casc}
-               lHnSpFillVar[3] = lCurrentTrck->Pt();                                      // Pt_{any track}
-               lHnSpFillVar[4] = lInvMassCascade;                                         // Eff. Inv Mass (control var)
-               
-               if(      lStrCascType.Contains("Xi-") )      fHnSpAngularCorrXiMinus    ->Fill( lHnSpFillVar );
-               else if( lStrCascType.Contains("Xi+") )      fHnSpAngularCorrXiPlus     ->Fill( lHnSpFillVar );
-               else if( lStrCascType.Contains("Omega-") )   fHnSpAngularCorrOmegaMinus ->Fill( lHnSpFillVar );
-               else if( lStrCascType.Contains("Omega+") )   fHnSpAngularCorrOmegaPlus  ->Fill( lHnSpFillVar );
-       
-       }// end - Loop over all the tracks in the event
+
+        if( fAnalysisType == "AOD") return; // FIXME : AOD development lost, because of AliESDtrack needed by AliESDtrackCuts
+
+        TString lStrCascType( lCascType );
+
+        // Check the Xi- candidate is within the proper mass window m0 +- 10 MeV
+        Double_t lCascPdgMass = 0.0;
+        if( lStrCascType.Contains("Xi") )       lCascPdgMass = 1.3217;
+        if( lStrCascType.Contains("Omega") )    lCascPdgMass = 1.6724;
+
+        if( lInvMassCascade > lCascPdgMass + 0.010) return;
+        if( lInvMassCascade < lCascPdgMass - 0.010) return;
+
+        // Check the Xi- candidate is within the proper rapidity window (flat efficiency)
+        if( lRapCascade >  0.5 ) return;
+        if( lRapCascade < -0.5 ) return;
+
+
+        // 3 options to follow for the correlations:
+        // 1.1 - "TrigAnyCasc-AssoAnyPrim"
+        // 1.2 - "TrigCascLeading-AssoAnyPrim"
+        // 2.  - "TrigLeadingTrck-AssoCasc"
+
+        if(fAngularCorrelationType.Contains("AssoAnyPrim") ){
+        //----------------------- Option 1 ---------------------------------------------------------------------------------------------------
+        // Cascade    = trigger, 
+        // Associated = all the primary tracks in the event.
+        //     1.1 Cascade = trigger above a certain pt but nothing more complicated than that
+        //     1.2 Cascade = leading particle (à la heavy-ion -> test for coalescence)
+
+                Bool_t kRejectLowPtCascades = kTRUE;
+                if(kRejectLowPtCascades && (lTVect3MomXi.Pt() < 1.7) ) return;
+                // Do not even consider the cascade of low pt for the correlation ...
+
+                if(fAngularCorrelationType == "TrigCascLeading-AssoAnyPrim"){// Require the Cascade To be the Leading Part. in the event
+
+                        // 1st loop: check there is no primary track with a higher pt ...
+                        // = The cascade is meant to be a leading particle : Pt(Casc) > any primary track in the event
+                        for(Int_t TrckIdx = 0; TrckIdx < (InputEvent())->GetNumberOfTracks() ; TrckIdx++ )
+                        {// Loop over all the tracks of the event
+
+                                AliESDtrack *lCurrentTrck = dynamic_cast<AliESDtrack*>( (InputEvent())->GetTrack( TrckIdx ) );
+                                        if (!lCurrentTrck ) {
+                                                AliWarning("ERROR Correl. Study : Could not retrieve a track while looping over the event tracks ...");
+                                                continue;
+                                        }
+
+                                if( !fESDtrackCuts->AcceptTrack(lCurrentTrck) ) continue;
+                                // Just consider primary tracks (= reject track that are not primary ones)
+                                if(lTVect3MomXi.Pt() < lCurrentTrck->Pt() ) return;    
+                                // Room for improvement: //FIXME
+                                // 1. There is a given resolution on pt : maybe release the cut Pt(casc) < Pt(track)*90% ?
+                                // 2. Apply this cut only when DeltaPhi(casc, track) > 90 deg = when track is in the near-side ?
+                                // 3. Anti-splitting cut (like in Femto analysis) ? = now done via ESDtrackCuts ...
+
+                        }// end control loop
+                }// end of prelim. check : Cascade = leading part in the event
+
+                // 2nd loop: filling loop
+                for(Int_t TrckIdx = 0; TrckIdx < (InputEvent())->GetNumberOfTracks() ; TrckIdx++ )
+                {// Loop over all the tracks of the event
+
+                        AliESDtrack *lCurrentTrck = dynamic_cast<AliESDtrack*>( (InputEvent())->GetTrack( TrckIdx ) );
+                                if (!lCurrentTrck ) {
+                                        AliWarning("ERROR Correl. Study : Could not retrieve a track while looping over the event tracks ...");
+                                        continue;
+                                }
+                        // Just consider primary tracks (= reject track that are not primary ones)
+                        if( !fESDtrackCuts->AcceptTrack(lCurrentTrck) ) continue;
+
+                        // Room for improvement: //FIXME
+                        // 1.  
+                        // 2. Exclude the tracks that build the condisdered cascade = the bachelor + the V0 dghters
+                        //     This may bias the outcome, especially for low multplicity events.
+                        // Note : For ESD event, track ID == track index.
+                                if(lCurrentTrck->GetID() == lArrTrackID[0]) continue;
+                                if(lCurrentTrck->GetID() == lArrTrackID[1]) continue;
+                                if(lCurrentTrck->GetID() == lArrTrackID[2]) continue;
+
+                        TVector3 lTVect3MomTrck(lCurrentTrck->Px(), lCurrentTrck->Py(), lCurrentTrck->Pz() );
+
+                        // 2 hypotheses made here :
+                        //   - The Xi trajectory is a straight line,
+                        //   - The Xi doesn't loose any energy by crossing the first layer(s) of ITS, if ever;
+                        //      So, meaning hyp: vect p(Xi) at the emission = vect p(Xi) at the decay vertex
+                        //      By doing this, we introduce a systematic error on the cascade Phi ...
+                        // Room for improvement: take into account the curvature of the Xi trajectory ?
+                        //                       or rather, the resolution in space of the decay vertex ...
+                        //FIXME
+
+                        Double_t lHnSpFillVar[5] = {0.};
+                        lHnSpFillVar[0] = lTVect3MomXi.DeltaPhi(lTVect3MomTrck) * 180.0/TMath::Pi(); // Delta phi(Casc,Track) (deg)
+                        if(lHnSpFillVar[0] < -50.0) lHnSpFillVar[0] += 360.0;  
+                        lHnSpFillVar[1] = lEtaXi - lCurrentTrck->Eta();                 // Delta eta(Casc,Track)
+                        lHnSpFillVar[2] = lTVect3MomXi.Pt();                            // Pt_{Casc}
+                        lHnSpFillVar[3] = lCurrentTrck->Pt();                           // Pt_{any track}
+                        lHnSpFillVar[4] = lInvMassCascade;                              // Eff. Inv Mass (control var)
+
+                        if(      lStrCascType.Contains("Xi-") )      fHnSpAngularCorrXiMinus    ->Fill( lHnSpFillVar );
+                        else if( lStrCascType.Contains("Xi+") )      fHnSpAngularCorrXiPlus     ->Fill( lHnSpFillVar );
+                        else if( lStrCascType.Contains("Omega-") )   fHnSpAngularCorrOmegaMinus ->Fill( lHnSpFillVar );
+                        else if( lStrCascType.Contains("Omega+") )   fHnSpAngularCorrOmegaPlus  ->Fill( lHnSpFillVar );
+
+                }// end - Loop over all the tracks in the event
+
+        }// end of correlation type : "Trig = Casc - Asso = AnyPrim", (cases 1.1 and 1.2)
+
+
+
+        else if(fAngularCorrelationType == "TrigLeadingTrck-AssoCasc"){
+
+        //----------------------- Option 2 ---------------------------------------------------------------------------------------------------
+        // Trigger    = trigger,
+        // Associated = the cascade'S' in the event
+        // NOTE : several good cascades could be present in the event (e.g. one leading track as trigger, 2 associated Xi) ...
+        //       The present function will then be called several times.
+        //        = issue for the normalisation ...
+
+                // 1st loop: 
+                //            find the index of the (1) primary track (2) which is the leading particle in pt
+                // NOTE :  we do not take into account the Cascade pt, i.e. pt(Casc) could be greater or lower than pt(Leading) ...
+                Int_t    lLeadingPrimTrackIdx = -1;
+                Double_t lPtMax               =  0.1;
+
+                for(Int_t TrckIdx = 0; TrckIdx < (InputEvent())->GetNumberOfTracks() ; TrckIdx++ )
+                {// Loop over all the tracks of the event
+
+                        AliESDtrack *lCurrentTrck = dynamic_cast<AliESDtrack*>( (InputEvent())->GetTrack( TrckIdx ) );
+                                if (!lCurrentTrck ) {
+                                        AliWarning("ERROR Correl. Study : Could not retrieve a track while looping over the event tracks ...");
+                                        continue;
+                                }
+        
+                        // Primary track selection
+                        if( !fESDtrackCuts->AcceptTrack(lCurrentTrck) ) continue;
+        
+                        // Exclude the tracks that build the condisdered cascade = the bachelor + the V0 dghters
+                        //     This may bias the outcome, especially for low multplicity events.
+                        // Note : For ESD event, track ID == track index.
+                        if(lCurrentTrck->GetID() == lArrTrackID[0]) continue;
+                        if(lCurrentTrck->GetID() == lArrTrackID[1]) continue;
+                        if(lCurrentTrck->GetID() == lArrTrackID[2]) continue;
+        
+                        // Towards the leading track
+                        if( lPtMax < lCurrentTrck->Pt() ){
+                                lLeadingPrimTrackIdx = TMath::Abs( lCurrentTrck->GetID() );
+                                lPtMax               = lCurrentTrck->Pt();
+                        }
+                }// end leading track finding loop
+        
+                if( lLeadingPrimTrackIdx < 0 ) return;
+                if( lPtMax < 0.101 )           return;
+        
+        
+                // 2nd step: filling ONCE the THnSparse
+                AliESDtrack *lLeadingTrck = dynamic_cast<AliESDtrack*>( (InputEvent())->GetTrack( lLeadingPrimTrackIdx ) );
+                
+                TVector3 lTVect3MomLeadingTrck( lLeadingTrck->Px(), lLeadingTrck->Py(), lLeadingTrck->Pz() );
+                
+                // 2 hypotheses made here :
+                //   - The Xi trajectory is a straight line,
+                //   - The Xi doesn't loose any energy by crossing the first layer(s) of ITS, if ever;
+                //      So, meaning hyp: vect p(Xi) at the emission = vect p(Xi) at the decay vertex
+                //      By doing this, we introduce a systematic error on the cascade Phi ...
+                // Room for improvement: take into account the curvature of the Xi trajectory ?
+                //                       or rather, the resolution in space of the decay vertex ...
+                //FIXME
+        
+                Double_t lHnSpFillVar[5] = {0.};
+                lHnSpFillVar[0] = lTVect3MomLeadingTrck.DeltaPhi(lTVect3MomXi) * 180.0/TMath::Pi(); // Delta phi(leading Track, Casc) (deg)
+                if(lHnSpFillVar[0] < -50.0) lHnSpFillVar[0] += 360.0;
+                lHnSpFillVar[1] = lLeadingTrck->Eta() - lEtaXi;                 // Delta eta(leading Track, Casc)
+                lHnSpFillVar[2] = lTVect3MomXi.Pt();                            // Pt_{Casc}
+                lHnSpFillVar[3] = lLeadingTrck->Pt();                           // Pt_{leading track}
+                lHnSpFillVar[4] = lInvMassCascade;                              // Eff. Inv Mass (control var)
+                
+                if(      lStrCascType.Contains("Xi-") )      fHnSpAngularCorrXiMinus    ->Fill( lHnSpFillVar );
+                else if( lStrCascType.Contains("Xi+") )      fHnSpAngularCorrXiPlus     ->Fill( lHnSpFillVar );
+                else if( lStrCascType.Contains("Omega-") )   fHnSpAngularCorrOmegaMinus ->Fill( lHnSpFillVar );
+                else if( lStrCascType.Contains("Omega+") )   fHnSpAngularCorrOmegaPlus  ->Fill( lHnSpFillVar );
+        }// end of correlation type : "Trig = LeadingTrck -Asso = Casc"
+        else
+                return;
 
 }
 
index a3b8d74ab4d56401c4298267a8ef5aa1b389af3e..9e9354606b35e16cd0d773ce39c27c0b4d2854f8 100644 (file)
@@ -25,7 +25,7 @@ class THnSparse;
  
 class AliESDpid;
 class AliESDEvent;
-class AliPhysicsSelection;
+class AliESDtrackCuts;
 class AliCFContainer;
 
 
@@ -45,19 +45,24 @@ class AliAnalysisTaskCheckCascade : public AliAnalysisTaskSE {
                                            Double_t  lInvMassCascade, 
                                      const Int_t    *lArrTrackID,
                                            TVector3 &lTVect3MomXi, 
-                                           Double_t  lEtaXi);
+                                           Double_t  lEtaXi,
+                                            Double_t  lRapCascade);
   virtual Int_t  DoESDTrackWithTPCrefitMultiplicity(const AliESDEvent *lESDevent);
   
   virtual void   Terminate(Option_t *);
   
   void SetCollidingSystems           (Short_t collidingSystems          = 0    ) { fCollidingSystems = collidingSystems;}
   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 SetQualityCutNoTPConlyPrimVtx (Bool_t qualityCutNoTPConlyPrimVtx = kTRUE) { fkQualityCutNoTPConlyPrimVtx =  qualityCutNoTPConlyPrimVtx;}
-  void SetQualityCutTPCrefit         (Bool_t qualityCutTPCrefit         = kTRUE) { fkQualityCutTPCrefit         =  qualityCutTPCrefit;        }
-  void SetQualityCut80TPCcls         (Bool_t qualityCut80TPCcls         = kTRUE) { fkQualityCut80TPCcls         =  qualityCut80TPCcls;        }
-  void SetExtraSelections            (Bool_t extraSelections            = 0    ) { fkExtraSelections            =  extraSelections;           }
+  void SetTriggerMaskType            (const char* triggerMaskType       = "kMB") { fTriggerMaskType  = triggerMaskType;}
+  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 SetQualityCut80TPCcls         (Bool_t qualityCut80TPCcls         = kTRUE) { fkQualityCut80TPCcls           =  qualityCut80TPCcls;        }
+  void SetAlephParamFor1PadTPCCluster(Bool_t onePadTPCCluster           = kTRUE) { fkIsDataRecoWith1PadTPCCluster = onePadTPCCluster ;          }
+  void SetExtraSelections            (Bool_t extraSelections            = 0    ) { fkExtraSelections              =  extraSelections;           }
+  void SetAngularCorrelationType     (const char* correlationType       = "TrigLeadingTrck-AssoCasc") {fAngularCorrelationType = correlationType; }
 
 
  private:
@@ -66,18 +71,23 @@ class AliAnalysisTaskCheckCascade : public AliAnalysisTaskSE {
         // http://root.cern.ch/download/doc/11InputOutput.pdf, page 14
 
 
-        TString         fAnalysisType;                  // "ESD" or "AOD" analysis type        
+        TString         fAnalysisType;                  // "ESD" or "AOD" analysis type
+        TString         fTriggerMaskType;               // type of trigger to use in UserExec : AliVEvent::kMB or kHighMult ?
         Short_t         fCollidingSystems;              // 0 = pp collisions or 1 = AA collisions
 
         AliESDpid       *fESDpid;                       // Tool data member to manage the TPC Bethe-Bloch info
+        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, ...)
 
         Bool_t          fkRerunV0CascVertexers;         // Boolean : kTRUE = relaunch both V0 + Cascade vertexers
         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          fkQualityCut80TPCcls;           // Boolean : kTRUE = ask for 80 TPC clusters for each daughter track
+        Bool_t          fkIsDataRecoWith1PadTPCCluster; // Boolean : kTRUE = data reconstructed with the "one pad cluster" algo in TPC (important for the ALEPH param for TPC PID)
         Bool_t          fkExtraSelections;              // Boolean : kTRUE = apply tighter selections, before starting the analysis
+        TString         fAngularCorrelationType;        // type of correlation to compute : "TrigAnyCasc-AssoAnyPrim", "TrigCascLeading-AssoAnyPrim", "TrigLeadingTrck-AssoCasc"
         
         Double_t        fAlephParameters[5];            // Array to store the 5 param values for the TPC Bethe-Bloch parametrisation
         Double_t        fV0Sels[7];                     // Array to store the 7 values for the different selections V0 related (if fkRerunV0CascVertexers)
@@ -93,9 +103,13 @@ class AliAnalysisTaskCheckCascade : public AliAnalysisTaskSE {
         TH1F    *fHistCascadeMultiplicityForTrigEvt;              //! Cascade multiplicity distribution
         TH1F    *fHistTrackMultiplicityForTrigEvt;                //! Track multiplicity distribution (without any cut = include ITS stand-alone + global tracks)
         TH1F    *fHistTPCrefitTrackMultiplicityForTrigEvt;        //! Track multiplicity distribution for tracks with TPCrefit
+        TH1F    *fHistPrimaryTrackMultiplicityForTrigEvt;         //! Track multiplicity distribution for the primary tracks (See fESDtrackCuts)
         
         // - General histos (filled for any triggered event + (|z(prim. vtx)| < 10 cm ) )
         TH1F    *fHistCascadeMultiplicityForTrigEvtAndZprimVtx;   //! Cascade multiplicity distribution
+        
+        // - General histos (filled for any triggered event + (|z(prim. vtx)| < 10 cm ) + after pile-up rejection from SPD )
+        TH1F    *fHistCascadeMultiplicityForTrigEvtNonPiledUpAndZprimVtx;   //! Cascade multiplicity distribution
 
         // - General histos (filled for events selected in this analysis (|z(prim. vtx)| < 10 cm + prim vtx = SPD or Tracking) )
         TH1F    *fHistCascadeMultiplicityForSelEvt;     //! Cascade multiplicity distribution
@@ -108,6 +122,7 @@ class AliAnalysisTaskCheckCascade : public AliAnalysisTaskSE {
 
         // - Characteristics for event with >1 cascade : Track Multiplicity, TPC clusters + Prim. vertex positions
         TH1F   *fHistTPCrefitTrackMultiplicityForCascadeEvt;   //! TPCrefit Track multiplicity distribution for event with >1 cascade candidate (NB: after quality sel. within the task)
+        TH1F    *fHistPrimaryTrackMultiplicityForCascadeEvt;    //! Track multiplicity distribution for the primary tracks for event with >1 cascade candidate (See fESDtrackCuts)
 
         TH1F    *fHistPosV0TPCClusters;                 //! TPC clusters distribution for Positive V0 daughter track
         TH1F    *fHistNegV0TPCClusters;                 //! TPC clusters distribution for Negative V0 daughter track
@@ -178,6 +193,11 @@ class AliAnalysisTaskCheckCascade : public AliAnalysisTaskSE {
        TH1F    *fHistEtaXi;                            //! eta distrib. of all the cascade candidates, around the mass peak of Xi-/+
        TH1F    *fHistThetaXi;                          //! theta distrib. of all the cascade candidates, around the mass peak of Xi-/+
        TH1F    *fHistPhiXi;                            //! phi distrib. of all the cascade candidates, around the mass peak of Xi-/+
+        
+        TH1F    *fHistcTauXiMinus;                      //! lifetime c.Tau, around the mass peak of Xi-
+        TH1F    *fHistcTauXiPlus;                       //! lifetime c.Tau, around the mass peak of Xi+
+        TH1F    *fHistcTauOmegaMinus;                   //! lifetime c.Tau, around the mass peak of Omega-
+        TH1F    *fHistcTauOmegaPlus;                    //! lifetime c.Tau, around the mass peak of Omega+
        
        TH2F    *f2dHistArmenteros;                     //! alpha(casc. cand.) Vs PtArm(casc. cand.)
        
@@ -223,7 +243,7 @@ class AliAnalysisTaskCheckCascade : public AliAnalysisTaskSE {
   AliAnalysisTaskCheckCascade(const AliAnalysisTaskCheckCascade&);            // not implemented
   AliAnalysisTaskCheckCascade& operator=(const AliAnalysisTaskCheckCascade&); // not implemented
   
-  ClassDef(AliAnalysisTaskCheckCascade, 11);
+  ClassDef(AliAnalysisTaskCheckCascade, 12);
 };
 
 #endif
index 0523001dc44db5c04cdc08faae07c8496a0413bd..cb52b6fe158b9ed684cffa1397fcbb94e91c48a4 100644 (file)
@@ -17,7 +17,7 @@
 //            It works with MC info and ESD.
 //              Use with AOD tree = under development
 //            Origin   : A.Maire Mar2009, antonin.maire@ires.in2p3.fr
-//            Modified : A.Maire Jan2010, antonin.maire@ires.in2p3.fr
+//            Modified : A.Maire Nov2010, antonin.maire@ires.in2p3.fr
 //-----------------------------------------------------------------
 
 
@@ -27,6 +27,7 @@
 #include "TFile.h"
 #include "TH1F.h"
 #include "TH2F.h"
+#include "TVector3.h"
 #include "TCanvas.h"
 #include "TParticle.h"
 #include "TMath.h"
@@ -41,8 +42,9 @@
 
 #include "AliCFContainer.h"
 #include "AliESDpid.h"
-//    #include "AliV0vertexer.h"
-//    #include "AliCascadeVertexer.h"
+#include "AliESDtrackCuts.h"
+//   #include "AliV0vertexer.h"
+//   #include "AliCascadeVertexer.h"
 #include "AliESDEvent.h"
 #include "AliESDcascade.h"
 
@@ -57,17 +59,21 @@ ClassImp(AliAnalysisTaskCheckPerformanceCascade)
      //_____Dummy constructor________________________________________________________________
 AliAnalysisTaskCheckPerformanceCascade::AliAnalysisTaskCheckPerformanceCascade() 
 : AliAnalysisTaskSE(), // <- take care to AliAnalysisTask( empty )
-  fDebugCascade(0), fAnalysisType("ESD"), fCollidingSystems(0), fESDpid(0), /*fPaveTextBookKeeping(0),*/
-    fkRerunV0CascVertexers      (0),
-    fkQualityCutZprimVtxPos     (kTRUE),
-    fkQualityCutNoTPConlyPrimVtx(kTRUE),
-    fkQualityCutTPCrefit        (kTRUE),
-    fkQualityCut80TPCcls        (kTRUE),
-    fkExtraSelections           (0),
+  fDebugCascade(0), fAnalysisType("ESD"), fTriggerMaskType("kMB"), fCollidingSystems(0), fESDpid(0), fESDtrackCuts(0), /*fPaveTextBookKeeping(0),*/
+    fkRerunV0CascVertexers         (0),
+    fkQualityCutZprimVtxPos        (kTRUE),
+    fkRejectEventPileUp            (kTRUE),
+    fkQualityCutNoTPConlyPrimVtx   (kTRUE),
+    fkQualityCutTPCrefit           (kTRUE),
+    fkQualityCut80TPCcls           (kTRUE),
+    fkIsDataRecoWith1PadTPCCluster (kTRUE),
+    fkExtraSelections              (0),
     
        // - Cascade part initialisation
 fListHistCascade(0),
     fHistMCTrackMultiplicity(0), 
+       // - Resolution of the multiplicity estimator
+    f2dHistRecoMultVsMCMult(0),
 
     fHistEtaGenProton(0),
     fHistEtaGenAntiProton(0),
@@ -197,6 +203,12 @@ fListHistCascade(0),
     f2dHistAsMCResROmegaMinus(0),
     f2dHistAsMCResROmegaPlus(0),
 
+        // - Resolution in phi as function of generated Pt
+    f2dHistAsMCResPhiXiMinus(0),
+    f2dHistAsMCResPhiXiPlus(0),
+    f2dHistAsMCResPhiOmegaMinus(0),
+    f2dHistAsMCResPhiOmegaPlus(0),
+                               
     fCFContCascadePIDAsXiMinus(0),
     fCFContCascadePIDAsXiPlus(0),
     fCFContCascadePIDAsOmegaMinus(0),
@@ -217,17 +229,21 @@ fListHistCascade(0),
 //_____Non-default Constructor________________________________________________________________
 AliAnalysisTaskCheckPerformanceCascade::AliAnalysisTaskCheckPerformanceCascade(const char *name) 
   : AliAnalysisTaskSE(name),
-    fDebugCascade(0), fAnalysisType("ESD"), fCollidingSystems(0), fESDpid(0),  /*fPaveTextBookKeeping(0),*/
-    fkRerunV0CascVertexers      (0),
-    fkQualityCutZprimVtxPos     (kTRUE),
-    fkQualityCutNoTPConlyPrimVtx(kTRUE),
-    fkQualityCutTPCrefit        (kTRUE),
-    fkQualityCut80TPCcls        (kTRUE),
-    fkExtraSelections           (0),
+    fDebugCascade(0), fAnalysisType("ESD"), fTriggerMaskType("kMB"), fCollidingSystems(0), fESDpid(0), fESDtrackCuts(0), /*fPaveTextBookKeeping(0),*/
+    fkRerunV0CascVertexers         (0),
+    fkQualityCutZprimVtxPos        (kTRUE),
+    fkRejectEventPileUp            (kTRUE),
+    fkQualityCutNoTPConlyPrimVtx   (kTRUE),
+    fkQualityCutTPCrefit           (kTRUE),
+    fkQualityCut80TPCcls           (kTRUE),
+    fkIsDataRecoWith1PadTPCCluster (kTRUE),
+    fkExtraSelections              (0),
       
        // - Cascade part initialisation
 fListHistCascade(0),
     fHistMCTrackMultiplicity(0), 
+       // - Resolution of the multiplicity estimator
+    f2dHistRecoMultVsMCMult(0),
 
     fHistEtaGenProton(0),
     fHistEtaGenAntiProton(0),
@@ -312,7 +328,7 @@ fListHistCascade(0),
        // - Effective mass histos with combined PID
     fHistMassWithCombPIDXiMinus(0), fHistMassWithCombPIDXiPlus(0),
     fHistMassWithCombPIDOmegaMinus(0), fHistMassWithCombPIDOmegaPlus(0),
-       
+
        // - PID Probability versus MC Pt(bachelor track)
     f2dHistPIDprobaKaonVsMCPtBach(0), f2dHistPIDprobaPionVsMCPtBach(0),
     
@@ -330,9 +346,9 @@ fListHistCascade(0),
        // - Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID
     f2dHistAsMCandCombPIDGenPtVsGenYXiMinus(0),
     f2dHistAsMCandCombPIDGenPtVsGenYXiPlus(0),
-    f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0),
+    f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0), 
     f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus(0),
-          
+    
        // - Generated Pt Vs generated y, for the cascade candidates associated with MC
     f2dHistAsMCGenPtVsGenYXiMinus(0),
     f2dHistAsMCGenPtVsGenYXiPlus(0),
@@ -357,6 +373,12 @@ fListHistCascade(0),
     f2dHistAsMCResROmegaMinus(0),
     f2dHistAsMCResROmegaPlus(0),
 
+       // - Resolution in phi as function of generated Pt
+    f2dHistAsMCResPhiXiMinus(0),
+    f2dHistAsMCResPhiXiPlus(0),
+    f2dHistAsMCResPhiOmegaMinus(0),
+    f2dHistAsMCResPhiOmegaPlus(0),
+
     fCFContCascadePIDAsXiMinus(0),
     fCFContCascadePIDAsXiPlus(0),
     fCFContCascadePIDAsOmegaMinus(0),
@@ -392,6 +414,7 @@ fListHistCascade(0),
 //         fCascSels[7] = 100.   ;  // max radius of the fiducial volume                  (PDC07 : 100    / LHC09a4 : 100   )
         
         // Hyper Loose
+        
         fV0Sels[0] =  33.  ;  // max allowed chi2
         fV0Sels[1] =   0.001; // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05)
         fV0Sels[2] =   0.001; // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05)
@@ -408,7 +431,28 @@ fListHistCascade(0),
         fCascSels[5] =   0.82 ;  //FIXME min allowed cosine of the cascade pointing angle   (PDC07 : 0.9985 / LHC09a4 : 0.998 )
         fCascSels[6] =   0.1  ;  // min radius of the fiducial volume                  (PDC07 : 0.9    / LHC09a4 : 0.2   )
         fCascSels[7] = 100.   ;  // max radius of the fiducial volume                  (PDC07 : 100    / LHC09a4 : 100   )
-
+        
+        
+        //New default vtxR (http://alisoft.cern.ch/viewvc?view=rev&root=AliRoot&revision=40955, 5 May 2010)        
+        /*
+        fV0Sels[0] =  33.  ;  // max allowed chi2
+        fV0Sels[1] =   0.05;  // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05)
+        fV0Sels[2] =   0.05;  // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05)
+        fV0Sels[3] =   1.5 ;  // max allowed DCA between the daughter tracks       (LHC09a4 : 0.5)
+        fV0Sels[4] =   0.9 ;  // min allowed cosine of V0's pointing angle         (LHC09a4 : 0.99)
+        fV0Sels[5] =   0.2 ;  // min radius of the fiducial volume                 (LHC09a4 : 0.2)
+        fV0Sels[6] = 100.  ;  // max radius of the fiducial volume                 (LHC09a4 : 100.0)
+        
+        fCascSels[0] =  33.   ;  // max allowed chi2 (same as PDC07)
+        fCascSels[1] =   0.01 ;  // min allowed V0 impact parameter                    (PDC07 : 0.05   / LHC09a4 : 0.025 )
+        fCascSels[2] =   0.008;  // "window" around the Lambda mass                    (PDC07 : 0.008  / LHC09a4 : 0.010 )
+        fCascSels[3] =   0.01 ;  // min allowed bachelor's impact parameter            (PDC07 : 0.035  / LHC09a4 : 0.025 )
+        fCascSels[4] =   2.0  ;  // max allowed DCA between the V0 and the bachelor    (PDC07 : 0.1    / LHC09a4 : 0.2   )
+        fCascSels[5] =   0.98 ;  // min allowed cosine of the cascade pointing angle   (PDC07 : 0.9985 / LHC09a4 : 0.998 )
+        fCascSels[6] =   0.2  ;  // min radius of the fiducial volume                  (PDC07 : 0.9    / LHC09a4 : 0.2   )
+        fCascSels[7] = 100.   ;  // max radius of the fiducial volume                  (PDC07 : 100    / LHC09a4 : 100   )
+        */
+        
   DefineOutput(1, TList::Class());
  
 }
@@ -426,6 +470,7 @@ AliAnalysisTaskCheckPerformanceCascade::~AliAnalysisTaskCheckPerformanceCascade(
 
   if (fListHistCascade)      { delete fListHistCascade;     fListHistCascade = 0x0;  }  
   if (fESDpid)               { delete fESDpid;              fESDpid = 0x0;} // fESDpid is not stored into the TList
+  if (fESDtrackCuts)         { delete fESDtrackCuts;        fESDtrackCuts = 0x0; }
   /*if (fPaveTextBookKeeping)  { delete fPaveTextBookKeeping; fPaveTextBookKeeping = 0x0; } // fPaveTextBookKeeping is not stored into the TList*/
 }
 
@@ -447,19 +492,32 @@ void AliAnalysisTaskCheckPerformanceCascade::UserCreateOutputObjects()
         
 if(! fESDpid){
 
-       // Reasonable parameters extracted for p-p simulation (LHC09a4) - A.Kalweit
-       // fAlephParameters[0] = 4.23232575531564326e+00/50;//50*0.76176e-1;
-       // fAlephParameters[1] = 8.68482806165147636e+00;//10.632; 
-       // fAlephParameters[2] = 1.34000000000000005e-05;//0.13279e-4;
-       // fAlephParameters[3] = 2.30445734159456084e+00;//1.8631;
-       // fAlephParameters[4] = 2.25624744086878559e+00;//1.9479;
-        
-        // Param for LHC09d10 prod - A.Kalweit
-        fAlephParameters[0] = 2.15898e+00/50.;
-        fAlephParameters[1] = 1.75295e+01;
-        fAlephParameters[2] = 3.40030e-09;
-        fAlephParameters[3] = 1.96178e+00;
-        fAlephParameters[4] = 3.91720e+00; 
+         if(fkIsDataRecoWith1PadTPCCluster){
+                // Home made parameterization for LHC10f6a production = p+p 7 TeV
+                fAlephParameters[0] = 0.04;
+                fAlephParameters[1] = 17.5;
+                fAlephParameters[2] = 3.4e-09;
+                fAlephParameters[3] = 2.15;
+                fAlephParameters[4] = 3.91720e+00;
+                
+                // Home made parameterization for LHC10e13 production = p+p 900 GeV/c
+         }
+         else {
+                // Reasonable parameters extracted for p-p simulation (LHC09a4) - A.Kalweit
+                 // fAlephParameters[0] = 4.23232575531564326e+00/50;//50*0.76176e-1;
+                 // fAlephParameters[1] = 8.68482806165147636e+00;//10.632; 
+                 // fAlephParameters[2] = 1.34000000000000005e-05;//0.13279e-4;
+                 // fAlephParameters[3] = 2.30445734159456084e+00;//1.8631;
+                 // fAlephParameters[4] = 2.25624744086878559e+00;//1.9479;
+                
+                // Param for LHC09d10 prod - A.Kalweit
+                fAlephParameters[0] = 2.15898e+00/50.;
+                fAlephParameters[1] = 1.75295e+01;
+                fAlephParameters[2] = 3.40030e-09;
+                fAlephParameters[3] = 1.96178e+00;
+                fAlephParameters[4] = 3.91720e+00; 
+         }
+         Printf("CheckPerfCascade - Check Aleph Param in case of MC Data   (fAlephParameters[3] = %f) (To be compared with : 2.15 for 1-pad-cluster prod. / 1.96178 otherwise)\n",  fAlephParameters[3]);
         
   fESDpid = new AliESDpid();
   fESDpid->GetTPCResponse().SetBetheBlochParameters( fAlephParameters[0],
@@ -469,6 +527,15 @@ if(! fESDpid){
                                                      fAlephParameters[4] );
 }
 
+
+if(! fESDtrackCuts ){
+      fESDtrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kTRUE); // Std definition of primary (see kTRUE argument) tracks for 2010
+      fESDtrackCuts->SetEtaRange(-0.8,+0.8);
+      fESDtrackCuts->SetPtRange(0.15, 1e10);
+      Printf("CheckCascade - ESDtrackCuts set up to 2010 std ITS-TPC cuts...");
+}
+
+
 /*
 if( !fPaveTextBookKeeping){
         fPaveTextBookKeeping = new TPaveText(0.1, 0.1, 0.9, 0.9,"NDC");
@@ -546,6 +613,12 @@ if( !fPaveTextBookKeeping){
   fListHistCascade->Add(fHistMCTrackMultiplicity);
   }
   
+    // - Resolution of the multiplicity estimator
+  if(! f2dHistRecoMultVsMCMult){
+       f2dHistRecoMultVsMCMult = new TH2F("f2dHistRecoMultVsMCMult", "Resolution of the multiplicity estimator (prim. tracks); Reco Multiplicity (prim. tracks); MC multiplicity (gen. part.)", 150, 0., 150., 150, 0., 150.);
+       fListHistCascade->Add(f2dHistRecoMultVsMCMult);
+  }
+  
   if (!fHistEtaGenProton) {
      fHistEtaGenProton = new TH1F("fHistEtaGenProton", "#eta of any gen. p^{+};#eta;Number of prim. protons", 200, -10, 10);
      fListHistCascade->Add(fHistEtaGenProton);
@@ -1050,7 +1123,27 @@ if( !fPaveTextBookKeeping){
          fListHistCascade->Add(f2dHistAsMCResROmegaPlus);
   }
   
+                // - Resolution in phi as function of generated Pt
+    
+  if(! f2dHistAsMCResPhiXiMinus) {
+          f2dHistAsMCResPhiXiMinus = new TH2F( "f2dHistAsMCResPhiXiMinus", "Resolution in #phi for #Xi^{-}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco)   (deg)", 200, 0., 10., 60, -30., 30.);
+          fListHistCascade->Add(f2dHistAsMCResPhiXiMinus);
+  }
+  
+  if(! f2dHistAsMCResPhiXiPlus) {
+          f2dHistAsMCResPhiXiPlus = new TH2F( "f2dHistAsMCResPhiXiPlus", "Resolution in #phi for #Xi^{+}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco)   (deg)", 200, 0., 10., 60, -30., 30.);
+          fListHistCascade->Add(f2dHistAsMCResPhiXiPlus);
+  }
+  
+  if(! f2dHistAsMCResPhiOmegaMinus) {
+          f2dHistAsMCResPhiOmegaMinus = new TH2F( "f2dHistAsMCResPhiOmegaMinus", "Resolution in #phi for #Omega^{-}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco)   (deg)", 200, 0., 10., 60, -30., 30.);  
+          fListHistCascade->Add(f2dHistAsMCResPhiOmegaMinus);
+  }
   
+  if(! f2dHistAsMCResPhiOmegaPlus) {
+          f2dHistAsMCResPhiOmegaPlus = new TH2F( "f2dHistAsMCResPhiOmegaPlus", "Resolution in #phi for #Omega^{+}; Pt_{MC} (GeV/c); #phi(MC) - #phi(reco)   (deg)", 200, 0., 10., 60, -30., 30.);
+          fListHistCascade->Add(f2dHistAsMCResPhiOmegaPlus);
+  }
   
   
                 // - PID container
@@ -1073,9 +1166,9 @@ if(! fCFContCascadePIDAsXiMinus)  {
   fCFContCascadePIDAsXiMinus->SetBinLimits(1,   1.2  ,   2.0 );        // Xi Effective mass
   fCFContCascadePIDAsXiMinus->SetBinLimits(2,  -1.1  ,   1.1 );        // Rapidity
   if(fCollidingSystems) 
-       fCFContCascadePIDAsXiMinus->SetBinLimits(3, 0.0, 20000.0  );    // TPCrefitTrackMultiplicity
+       fCFContCascadePIDAsXiMinus->SetBinLimits(3, 0.0, 20000.0  );    // nTrackPrimaryMultiplicity
   else
-       fCFContCascadePIDAsXiMinus->SetBinLimits(3, 0.0, 250.0  );     // TPCrefitTrackMultiplicity
+       fCFContCascadePIDAsXiMinus->SetBinLimits(3, 0.0, 250.0  );     // nTrackPrimaryMultiplicity
   
   // Setting the step title : one per PID case
   fCFContCascadePIDAsXiMinus->SetStepTitle(0, "No PID");
@@ -1090,7 +1183,7 @@ if(! fCFContCascadePIDAsXiMinus)  {
   fCFContCascadePIDAsXiMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
   fCFContCascadePIDAsXiMinus->SetVarTitle(1, "M( #Lambda , #pi^{-} ) (GeV/c^{2})");
   fCFContCascadePIDAsXiMinus->SetVarTitle(2, "Y_{#Xi}");
-  fCFContCascadePIDAsXiMinus->SetVarTitle(3, "SPD tracklet Multiplicity");
+  fCFContCascadePIDAsXiMinus->SetVarTitle(3, "Primary Track Multiplicity");
   
   fListHistCascade->Add(fCFContCascadePIDAsXiMinus);
   
@@ -1116,9 +1209,9 @@ if(! fCFContCascadePIDAsXiPlus)  {
   fCFContCascadePIDAsXiPlus->SetBinLimits(1,   1.2  ,   2.0 ); // Xi Effective mass
   fCFContCascadePIDAsXiPlus->SetBinLimits(2,  -1.1  ,   1.1 ); // Rapidity
   if(fCollidingSystems) 
-       fCFContCascadePIDAsXiPlus->SetBinLimits(3, 0.0, 20000.0  );    // TPCrefitTrackMultiplicity
+       fCFContCascadePIDAsXiPlus->SetBinLimits(3, 0.0, 20000.0  );    // nTrackPrimaryMultiplicity
   else
-       fCFContCascadePIDAsXiPlus->SetBinLimits(3, 0.0, 250.0  );     // TPCrefitTrackMultiplicity
+       fCFContCascadePIDAsXiPlus->SetBinLimits(3, 0.0, 250.0  );     // nTrackPrimaryMultiplicity
   
   // Setting the step title : one per PID case
   fCFContCascadePIDAsXiPlus->SetStepTitle(0, "No PID");
@@ -1133,7 +1226,7 @@ if(! fCFContCascadePIDAsXiPlus)  {
   fCFContCascadePIDAsXiPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
   fCFContCascadePIDAsXiPlus->SetVarTitle(1, "M( #Lambda , #pi^{+} ) (GeV/c^{2})");
   fCFContCascadePIDAsXiPlus->SetVarTitle(2, "Y_{#Xi}");
-  fCFContCascadePIDAsXiPlus->SetVarTitle(3, "SPD tracklet Multiplicity");
+  fCFContCascadePIDAsXiPlus->SetVarTitle(3, "Primary Track Multiplicity");
   
   fListHistCascade->Add(fCFContCascadePIDAsXiPlus);
   
@@ -1160,9 +1253,9 @@ if(! fCFContCascadePIDAsOmegaMinus)  {
   fCFContCascadePIDAsOmegaMinus->SetBinLimits(1,   1.5  ,   2.5 );     // Omega Effective mass
   fCFContCascadePIDAsOmegaMinus->SetBinLimits(2,  -1.1  ,   1.1 );     // Rapidity
   if(fCollidingSystems) 
-       fCFContCascadePIDAsOmegaMinus->SetBinLimits(3, 0.0, 20000.0  );    // TPCrefitTrackMultiplicity
+       fCFContCascadePIDAsOmegaMinus->SetBinLimits(3, 0.0, 20000.0  );    // nTrackPrimaryMultiplicity
   else
-       fCFContCascadePIDAsOmegaMinus->SetBinLimits(3, 0.0, 250.0  );     // TPCrefitTrackMultiplicity
+       fCFContCascadePIDAsOmegaMinus->SetBinLimits(3, 0.0, 250.0  );     // nTrackPrimaryMultiplicity
   
   // Setting the step title : one per PID case
   fCFContCascadePIDAsOmegaMinus->SetStepTitle(0, "No PID");
@@ -1177,7 +1270,7 @@ if(! fCFContCascadePIDAsOmegaMinus)  {
   fCFContCascadePIDAsOmegaMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
   fCFContCascadePIDAsOmegaMinus->SetVarTitle(1, "M( #Lambda , K^{-} ) (GeV/c^{2})");
   fCFContCascadePIDAsOmegaMinus->SetVarTitle(2, "Y_{#Omega}");
-  fCFContCascadePIDAsOmegaMinus->SetVarTitle(3, "SPD tracklet Multiplicity");
+  fCFContCascadePIDAsOmegaMinus->SetVarTitle(3, "Primary Track Multiplicity");
   
   fListHistCascade->Add(fCFContCascadePIDAsOmegaMinus);
   
@@ -1203,9 +1296,9 @@ if(! fCFContCascadePIDAsOmegaPlus)  {
   fCFContCascadePIDAsOmegaPlus->SetBinLimits(1,   1.5  ,   2.5 );      // Omega Effective mass
   fCFContCascadePIDAsOmegaPlus->SetBinLimits(2,  -1.1  ,   1.1 );      // Rapidity
   if(fCollidingSystems) 
-       fCFContCascadePIDAsOmegaPlus->SetBinLimits(3, 0.0, 20000.0  );    // TPCrefitTrackMultiplicity
+       fCFContCascadePIDAsOmegaPlus->SetBinLimits(3, 0.0, 20000.0  );    // nTrackPrimaryMultiplicity
   else
-       fCFContCascadePIDAsOmegaPlus->SetBinLimits(3, 0.0, 250.0  );     // TPCrefitTrackMultiplicity
+       fCFContCascadePIDAsOmegaPlus->SetBinLimits(3, 0.0, 250.0  );     // nTrackPrimaryMultiplicity
   
   // Setting the step title : one per PID case
   fCFContCascadePIDAsOmegaPlus->SetStepTitle(0, "No PID");
@@ -1220,7 +1313,7 @@ if(! fCFContCascadePIDAsOmegaPlus)  {
   fCFContCascadePIDAsOmegaPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
   fCFContCascadePIDAsOmegaPlus->SetVarTitle(1, "M( #Lambda , K^{+} ) (GeV/c^{2})");
   fCFContCascadePIDAsOmegaPlus->SetVarTitle(2, "Y_{#Omega}");
-  fCFContCascadePIDAsOmegaPlus->SetVarTitle(3, "SPD tracklet Multiplicity");
+  fCFContCascadePIDAsOmegaPlus->SetVarTitle(3, "Primary Track Multiplicity");
   
   fListHistCascade->Add(fCFContCascadePIDAsOmegaPlus);
   
@@ -1344,11 +1437,11 @@ if(! fCFContAsCascadeCuts){
   fCFContAsCascadeCuts->SetBinLimits(15,  -1.1  ,  1.1  );     // Y(Omega)
   fCFContAsCascadeCuts->SetBinLimits(16, -10.0  , 10.0  );     // BestPrimaryVtxPosZ
   if(fCollidingSystems){
-       fCFContAsCascadeCuts->SetBinLimits(17,   0.0, 10000.0  );    // TPCrefitTrackMultiplicity
+       fCFContAsCascadeCuts->SetBinLimits(17,   0.0, 10000.0  );    // nTrackPrimaryMultiplicity
        fCFContAsCascadeCuts->SetBinLimits(18,   0.0, 10000.0  );    // SPDTrackletsMultiplicity
   }
   else{  
-       fCFContAsCascadeCuts->SetBinLimits(17,   0.0, 250.0  );     // TPCrefitTrackMultiplicity
+       fCFContAsCascadeCuts->SetBinLimits(17,   0.0, 250.0  );     // nTrackPrimaryMultiplicity
        fCFContAsCascadeCuts->SetBinLimits(18,   0.0, 200.0  );     // SPDTrackletsMultiplicity
   }
   fCFContAsCascadeCuts->SetBinLimits(19,  68.0  ,164.0  );     // BachTPCClusters
@@ -1375,11 +1468,11 @@ if(! fCFContAsCascadeCuts){
   fCFContAsCascadeCuts->SetBinLimits(15,  -1.1  ,  1.1  );     // Y_MC(Omega)
   fCFContAsCascadeCuts->SetBinLimits(16, -10.0  , 10.0  );     // BestPrimaryVtxPosZ
   if(fCollidingSystems){
-       fCFContAsCascadeCuts->SetBinLimits(17,   0.0, 10000.0  );    // TPCrefitTrackMultiplicity
+       fCFContAsCascadeCuts->SetBinLimits(17,   0.0, 10000.0  );    // nTrackPrimaryMultiplicity
        fCFContAsCascadeCuts->SetBinLimits(18,   0.0, 10000.0  );    // SPDTrackletsMultiplicity
   }
   else{  
-       fCFContAsCascadeCuts->SetBinLimits(17,   0.0, 250.0  );     // TPCrefitTrackMultiplicity
+       fCFContAsCascadeCuts->SetBinLimits(17,   0.0, 250.0  );     // nTrackPrimaryMultiplicity
        fCFContAsCascadeCuts->SetBinLimits(18,   0.0, 200.0  );     // SPDTrackletsMultiplicity
   }
   fCFContAsCascadeCuts->SetBinLimits(19,  25.0  ,165.0  );     // BachTPCClusters
@@ -1418,7 +1511,7 @@ if(! fCFContAsCascadeCuts){
   
   fCFContAsCascadeCuts->SetVarTitle(16, "Z-position(BestPrimVtx) (cm)");
   
-  fCFContAsCascadeCuts->SetVarTitle(17, "TPCrefit track Multiplicity");
+  fCFContAsCascadeCuts->SetVarTitle(17, "Primary Track Multiplicity");
   fCFContAsCascadeCuts->SetVarTitle(18, "SPD tracklets Multiplicity");
   fCFContAsCascadeCuts->SetVarTitle(19, "Bach.TPC Clusters");
   
@@ -1500,7 +1593,10 @@ void AliAnalysisTaskCheckPerformanceCascade::UserExec(Option_t *)
    
         UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
         Bool_t isSelected = 0;
-        isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
+        if(     fTriggerMaskType == "kMB")           isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB;
+        else if(fTriggerMaskType == "kHighMult")     isSelected = (maskIsSelected & AliVEvent::kHighMult) == AliVEvent::kHighMult;
+        else                                         isSelected = 1; // default = select anyway (use case = run without Phys Selection task)
+        
         if ( ! isSelected ) { 
                 PostData(1, fListHistCascade); 
                 return;
@@ -1511,7 +1607,7 @@ void AliAnalysisTaskCheckPerformanceCascade::UserExec(Option_t *)
   //-------------------------------------------------
   // 1 - Cascade vertexer (ESD)
         if(fkRerunV0CascVertexers){ // FIXME : relaunch V0 and Cascade vertexers
-//                 if(fAnalysisType == "ESD" ){
+                if(fAnalysisType == "ESD" ){
 //                         lESDevent->ResetCascades();
 //                         lESDevent->ResetV0s();
 // 
@@ -1523,7 +1619,7 @@ void AliAnalysisTaskCheckPerformanceCascade::UserExec(Option_t *)
 // 
 //                         lV0vtxer.Tracks2V0vertices(lESDevent);
 //                         lCascVtxer.V0sTracks2CascadeVertices(lESDevent);
-//                 }
+                }
         }
 
 
@@ -1555,6 +1651,14 @@ void AliAnalysisTaskCheckPerformanceCascade::UserExec(Option_t *)
                                 return;
                         }
                 }
+                // FIXME : quality selection regarding pile-up rejection 
+                if(fkRejectEventPileUp) {
+                        if(lESDevent->IsPileupFromSPD() ){// minContributors=3, minZdist=0.8, nSigmaZdist=3., nSigmaDiamXY=2., nSigmaDiamZ=5.  -> see http://alisoft.cern.ch/viewvc/trunk/STEER/AliESDEvent.h?root=AliRoot&r1=41914&r2=42199&pathrev=42199
+                                AliWarning("Pb / Event tagged as pile-up by SPD... return !"); 
+                                PostData(1, fListHistCascade); 
+                                return; 
+                        }
+                }
                 // FIXME : remove TPC-only primary vertex : retain only events with tracking + SPD vertex
                 if(fkQualityCutNoTPConlyPrimVtx) {
                         if (!lPrimarySPDVtx->GetStatus() && !lPrimaryTrackingVtx->GetStatus() ){
@@ -1582,16 +1686,41 @@ void AliAnalysisTaskCheckPerformanceCascade::UserExec(Option_t *)
   else if(fAnalysisType == "AOD")       ncascades = lAODevent->GetNumberOfCascades();
        
   
-  Int_t iNumberOfPrimaries = -1;
-  iNumberOfPrimaries = lMCstack->GetNprimary();
+  Int_t   nNumberOfMCPrimaries       = -1;
+  Int_t   nMCPrimariesInAcceptance   =  0;
+  Int_t   nTrackPrimaryMultiplicity  = -1;
   
-       if(iNumberOfPrimaries < 1) return;
+  
+        nNumberOfMCPrimaries       = lMCstack->GetNprimary();
+        nTrackPrimaryMultiplicity  = fESDtrackCuts->CountAcceptedTracks(lESDevent);
+
+        if(nNumberOfMCPrimaries < 1) return;
     
-       fHistMCTrackMultiplicity->Fill( lMCstack->GetNtrack() );
-   
+        fHistMCTrackMultiplicity->Fill( nNumberOfMCPrimaries );
+    
+//_____________________________________________________________________________        
+// Part 1 - Loop over the MC primaries 
+        
+    for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < nNumberOfMCPrimaries; iCurrentLabelStack++) 
+    {// This is the begining of the loop on primaries
+      
+        TParticle* lCurrentParticle = 0x0; 
+                   lCurrentParticle = lMCstack->Particle( iCurrentLabelStack );
+        if(!lCurrentParticle){
+                Printf("MC Primary loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );
+                continue;
+        }
+       
+        if( TMath::Abs( lCurrentParticle->Eta() ) > 0.8 ) continue;
+        nMCPrimariesInAcceptance++;
+    }
+    
+    f2dHistRecoMultVsMCMult->Fill( nTrackPrimaryMultiplicity, nMCPrimariesInAcceptance );
+
+
    // For proton
    /*
-   for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < iNumberOfPrimaries; iCurrentLabelStack++) 
+   for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < nNumberOfMCPrimaries; iCurrentLabelStack++) 
        {// This is the begining of the loop on primaries, for protons
           
        TParticle* lCurrentParticle = lMCstack->Particle( iCurrentLabelStack );
@@ -1611,8 +1740,8 @@ void AliAnalysisTaskCheckPerformanceCascade::UserExec(Option_t *)
 
       
        
-//__________________________________________________________________________   
-// Part 1 - Loop over the different types of GENERATED cascades (Xi-+, Omega-+)        
+//_____________________________________________________________________________        
+// Part 2 - Loop over the different types of GENERATED cascades (Xi-+, Omega-+)        
 
        // - Initialisation of useful local variables
                
@@ -1737,7 +1866,7 @@ switch (iCascType)
   }// end switch cascade
 
 
-   for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < iNumberOfPrimaries; iCurrentLabelStack++) 
+   for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < nNumberOfMCPrimaries; iCurrentLabelStack++) 
     {// This is the begining of the loop on primaries
       
         TParticle* lCurrentParticle = 0x0; 
@@ -1749,7 +1878,7 @@ switch (iCascType)
        }
         
        if( lCurrentParticle->GetPdgCode() == lPdgCodeCasc ){  // Here !
-               //cout << "Xi- within loop " << iCurrentLabelStack << "/ " << iNumberOfPrimaries << endl;
+               //cout << "Xi- within loop " << iCurrentLabelStack << "/ " << nNumberOfMCPrimaries << endl;
                
                // -  Xi level ... _____________________________________________________________
                TParticle* xiMC = 0x0;
@@ -1894,7 +2023,7 @@ lHistPtMesDghter        = 0x0;
  
  
 //__________________________________________________________________________   
-// Part 2 - Loop over the reconstructed candidates
+// Part 3 - Loop over the reconstructed candidates
   
 
 for (Int_t iXi = 0; iXi < ncascades; iXi++) 
@@ -2143,7 +2272,7 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
        }// end if bachelor track with existing combined PID
        
        
-       // 3.1.B - TPC PID : 3-sigma bands on Bethe-Bloch curve
+       // 3.1.B - TPC PID : 4-sigma bands on Bethe-Bloch curve
         
         // Bachelor
         if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 4) lIsBachelorKaonForTPC = kTRUE;
@@ -2353,11 +2482,16 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
                                                      (mcMotherBach->Energy() - mcMotherBach->Pz() +1.e-13) );
         Double_t lmcEta            = mcMotherBach->Eta();
         Double_t lmcTransvRadius   = mcBach->R(); // to get the decay point of Xi, = the production vertex of Bachelor ...
+        
+        TVector3 lmcTVect3Mom( mcMotherBach->Px(), mcMotherBach->Py(), mcMotherBach->Pz() );
 
         Double_t lrecoPt           = xiESD->Pt();
         Double_t lrecoTransvRadius = TMath::Sqrt( xiESD->Xv() * xiESD->Xv() + xiESD->Yv() * xiESD->Yv() );
+        
+        TVector3 lrecoTVect3Mom( xiESD->Px(), xiESD->Py(), xiESD->Pz()  );
+        Double_t lDeltaPhiMcReco   = lmcTVect3Mom.DeltaPhi( lrecoTVect3Mom ) * 180.0/TMath::Pi();
 
-
+        
        // - Histos for the cascade candidates associated with MC
        
        if( lChargeXi < 0 && lAssoXiMinus){     
@@ -2367,6 +2501,7 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
                fHistAsMCGenEtaXiMinus        ->Fill( lmcEta           );
                f2dHistAsMCResPtXiMinus       ->Fill( lmcPt,           (lrecoPt - lmcPt)/ lmcPt );
                f2dHistAsMCResRXiMinus        ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius    );
+                f2dHistAsMCResPhiXiMinus      ->Fill( lmcPt, lDeltaPhiMcReco );
        }
        
        else if( lChargeXi > 0 && lAssoXiPlus){ 
@@ -2376,6 +2511,7 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
                fHistAsMCGenEtaXiPlus         ->Fill( lmcEta           );
                f2dHistAsMCResPtXiPlus        ->Fill( lmcPt,           (lrecoPt - lmcPt)/ lmcPt );
                f2dHistAsMCResRXiPlus         ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius    );
+                f2dHistAsMCResPhiXiPlus       ->Fill( lmcPt, lDeltaPhiMcReco );
        }
        
        else if( lChargeXi < 0 && lAssoOmegaMinus){     
@@ -2385,6 +2521,7 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
                fHistAsMCGenEtaOmegaMinus        ->Fill( lmcEta             );
                f2dHistAsMCResPtOmegaMinus       ->Fill( lmcPt,           (lrecoPt - lmcPt)/ lmcPt );
                f2dHistAsMCResROmegaMinus        ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius    );
+                f2dHistAsMCResPhiOmegaMinus      ->Fill( lmcPt, lDeltaPhiMcReco );
        }
        
        else if( lChargeXi > 0 && lAssoOmegaPlus){      
@@ -2394,7 +2531,8 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
                fHistAsMCGenEtaOmegaPlus         ->Fill( lmcEta            );
                f2dHistAsMCResPtOmegaPlus        ->Fill( lmcPt,           (lrecoPt - lmcPt)/ lmcPt );
                f2dHistAsMCResROmegaPlus         ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius    );
-       }
+                f2dHistAsMCResPhiOmegaPlus       ->Fill( lmcPt, lDeltaPhiMcReco );
+        }
         
         
         // - Step 6 : Containers = Cascade cuts + PID
@@ -2459,7 +2597,8 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
         
         
         
-        nTrackWithTPCrefitMultiplicity  = DoESDTrackWithTPCrefitMultiplicity(lESDevent);
+        nTrackWithTPCrefitMultiplicity  = DoESDTrackWithTPCrefitMultiplicity(lESDevent);  // FIXME : variable which is not used anymore at the moment ... 
+                                                                                          //    ->  keep it while the task is still under development.
         
         
         const AliMultiplicity *lAliMult = lESDevent->GetMultiplicity();
@@ -2484,7 +2623,7 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
         lContainerCutVars[13] = lmcPt;
 
         lContainerCutVars[16] = lBestPrimaryVtxPos[2];
-        lContainerCutVars[17] = nTrackWithTPCrefitMultiplicity;  // FIXME : nTrackWithTPCrefitMultiplicity not checked for AOD ...
+        lContainerCutVars[17] = nTrackPrimaryMultiplicity;       // FIXME : nTrackPrimaryMultiplicity not checked for AOD ...
         lContainerCutVars[18] = lSPDTrackletsMultiplicity;       // FIXME : SPDTrackletsMultiplicity is not available for AOD ... 
         lContainerCutVars[19] = lBachTPCClusters;                // FIXME : BachTPCClusters          is not available for AOD ... 
 
@@ -2533,7 +2672,7 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
                lContainerPIDVars[0] = lmcPt              ;
                lContainerPIDVars[1] = lInvMassXiMinus    ;
                lContainerPIDVars[2] = lmcRapCasc         ;
-               lContainerPIDVars[3] = lSPDTrackletsMultiplicity ;  // FIXME : SPDTrackletsMultiplicity is not available for AOD ... 
+               lContainerPIDVars[3] = nTrackPrimaryMultiplicity ;  // FIXME : nTrackPrimaryMultiplicity is not checked for AOD ... 
                        
                // No PID
                        fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 0); // No PID
@@ -2571,7 +2710,7 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
                lContainerPIDVars[0] = lmcPt              ;
                lContainerPIDVars[1] = lInvMassXiPlus     ;
                lContainerPIDVars[2] = lmcRapCasc           ;
-               lContainerPIDVars[3] = lSPDTrackletsMultiplicity ;    // FIXME : SPDTrackletsMultiplicity is not available for AOD ... 
+               lContainerPIDVars[3] = nTrackPrimaryMultiplicity ;    // FIXME : nTrackPrimaryMultiplicity is not checked for AOD ...  
                        
                // No PID
                        fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 0); // No PID
@@ -2609,7 +2748,7 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
                lContainerPIDVars[0] = lmcPt              ;
                lContainerPIDVars[1] = lInvMassOmegaMinus ;
                lContainerPIDVars[2] = lmcRapCasc         ;
-               lContainerPIDVars[3] = lSPDTrackletsMultiplicity ;    // FIXME : SPDTrackletsMultiplicity is not available for AOD ... 
+               lContainerPIDVars[3] = nTrackPrimaryMultiplicity ;  // FIXME : nTrackPrimaryMultiplicity is not checked for AOD ... 
                        
                // No PID
                        fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 0); // No PID
@@ -2647,7 +2786,7 @@ for (Int_t iXi = 0; iXi < ncascades; iXi++)
                lContainerPIDVars[0] = lmcPt              ;
                lContainerPIDVars[1] = lInvMassOmegaPlus  ;
                lContainerPIDVars[2] = lmcRapCasc         ;
-               lContainerPIDVars[3] = lSPDTrackletsMultiplicity ;    // FIXME : SPDTrackletsMultiplicity is not available for AOD ... 
+               lContainerPIDVars[3] = nTrackPrimaryMultiplicity ;  // FIXME : nTrackPrimaryMultiplicity is not checked for AOD ... 
                        
                // No PID
                        fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 0); // No PID
index 0e13760953bab11cae56391d39322e3885b3c3e8..f4cb4c3140d4793926e159d7e11ca32ad658b674 100644 (file)
@@ -17,6 +17,7 @@ class TH1F;
 class TH2F;
 class AliESDEvent;
 class AliESDpid;
+class AliESDtrackCuts;
 class AliCFContainer;
 
 #include "AliAnalysisTaskSE.h"
@@ -36,14 +37,18 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
   
   void SetDebugLevelCascade(Int_t lDebugCascade = 0)          {fDebugCascade = lDebugCascade;}
   void SetCollidingSystems (Short_t collidingSystems = 0)     {fCollidingSystems = collidingSystems;}
-  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 SetQualityCutNoTPConlyPrimVtx (Bool_t qualityCutNoTPConlyPrimVtx = kTRUE) { fkQualityCutNoTPConlyPrimVtx =  qualityCutNoTPConlyPrimVtx;}
-  void SetQualityCutTPCrefit         (Bool_t qualityCutTPCrefit         = kTRUE) { fkQualityCutTPCrefit         =  qualityCutTPCrefit;        }
-  void SetQualityCut80TPCcls         (Bool_t qualityCut80TPCcls         = kTRUE) { fkQualityCut80TPCcls         =  qualityCut80TPCcls;        }
-  void SetExtraSelections            (Bool_t extraSelections            = 0    ) { fkExtraSelections            =  extraSelections;           }
+  void SetAnalysisType     (const char* analysisType    = "ESD") { fAnalysisType     = analysisType;}
+  void SetTriggerMaskType  (const char* triggerMaskType = "kMB") { fTriggerMaskType  = triggerMaskType;}
+  
+  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 SetQualityCut80TPCcls         (Bool_t qualityCut80TPCcls         = kTRUE) { fkQualityCut80TPCcls           =  qualityCut80TPCcls;        }
+  void SetAlephParamFor1PadTPCCluster(Bool_t onePadTPCCluster           = kTRUE) { fkIsDataRecoWith1PadTPCCluster =  onePadTPCCluster ;         }
+  void SetExtraSelections            (Bool_t extraSelections            = 0    ) { fkExtraSelections              =  extraSelections;           }
 
  private:
         // Note : In ROOT, "//!" means "do not stream the data from Master node to Worker node" ...
@@ -52,16 +57,20 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
 
         Int_t           fDebugCascade;          // Denug Flag for this task devoted to cascade
         TString         fAnalysisType;          // "ESD" or "AOD" analysis type        
+        TString         fTriggerMaskType;       // type of trigger to use in UserExec : AliVEvent::kMB or kHighMult ?
         Short_t         fCollidingSystems;      // 0 = pp collisions or 1 = AA collisions
 
-        AliESDpid       *fESDpid;        // Tool data member to manage the TPC Bethe-Bloch info
+        AliESDpid       *fESDpid;                       // Tool data member to manage the TPC Bethe-Bloch info
+        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, ...)
 
         Bool_t          fkRerunV0CascVertexers;         // Boolean : kTRUE = relaunch both V0 + Cascade vertexers
         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          fkQualityCut80TPCcls;           // Boolean : kTRUE = ask for 80 TPC clusters for each daughter track
+        Bool_t          fkIsDataRecoWith1PadTPCCluster; // Boolean : kTRUE = data reconstructed with the "one pad cluster" algo in TPC (important for the ALEPH param for TPC PID)
         Bool_t          fkExtraSelections;              // Boolean : kTRUE = apply tighter selections, before starting the analysis
         
         Double_t        fAlephParameters[5];            // Array to store the 5 param values for the TPC Bethe-Bloch parametrisation
@@ -71,7 +80,9 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
        
        TList   *fListHistCascade;              //! List of Cascade histograms
                // - Histos 
-       TH1F    *fHistMCTrackMultiplicity;      //! MC Track multiplicity
+       TH1F    *fHistMCTrackMultiplicity;      //! MC Track multiplicity (gen. primaries)
+                // - Resolution of the multiplicity estimator
+        TH2F    *f2dHistRecoMultVsMCMult;       //! resolution of the multiplicity estimator (based on primary tracks)
        
        
        // proton
@@ -228,6 +239,13 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
        TH2F    *f2dHistAsMCResROmegaMinus;             //! resolution in transv. R = f(transv. gen. R), for Omega-
        TH2F    *f2dHistAsMCResROmegaPlus;              //! resolution in transv. R = f(transv. gen. R), for Omega+
         
+        // - Resolution in phi as function of generated Pt
+        TH2F    *f2dHistAsMCResPhiXiMinus;              //! resolution in azimuth Phi = f(gen. Pt), for Xi-
+        TH2F    *f2dHistAsMCResPhiXiPlus;               //! resolution in azimuth Phi = f(gen. Pt), for Xi+
+        TH2F    *f2dHistAsMCResPhiOmegaMinus;           //! resolution in azimuth Phi = f(gen. Pt), for Omega-
+        TH2F    *f2dHistAsMCResPhiOmegaPlus;            //! resolution in azimuth Phi = f(gen. Pt), for Omega+
+        
+        
         // - Compilation of all PID plots (3D = casc. transv. momemtum Vs Casc Eff mass Vs Y), stored into an AliCFContainer
        AliCFContainer  *fCFContCascadePIDAsXiMinus;      //! for Xi-   : Container to store any 3D histos with the different PID flavours
        AliCFContainer  *fCFContCascadePIDAsXiPlus;       //! for Xi+   : Container to store any 3D histos with the different PID flavours
@@ -240,7 +258,7 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
   AliAnalysisTaskCheckPerformanceCascade(const AliAnalysisTaskCheckPerformanceCascade&);            // not implemented
   AliAnalysisTaskCheckPerformanceCascade& operator=(const AliAnalysisTaskCheckPerformanceCascade&); // not implemented
   
-  ClassDef(AliAnalysisTaskCheckPerformanceCascade, 4);
+  ClassDef(AliAnalysisTaskCheckPerformanceCascade, 5);
 };
 
 #endif
index 91a91d877f01b76158c91e970b0c06195f714b05..46f3ff72b0836a9ae43a48fff4df62c744e40dea 100644 (file)
@@ -23,13 +23,16 @@ AliAnalysisTaskCheckCascade *AddTaskCheckCascade(Short_t       lCollidingSystems
    taskcheckcascade-> SetCollidingSystems           (lCollidingSystems);
    taskcheckcascade-> SetAnalysisType               (type);
    
+   taskcheckcascade-> SetTriggerMaskType            ("kMB");
    taskcheckcascade-> SetRelaunchV0CascVertexers    (0);     //NOTE
    taskcheckcascade-> SetQualityCutZprimVtxPos      (kTRUE);
+   taskcheckcascade-> SetRejectEventPileUp          (kTRUE);
    taskcheckcascade-> SetQualityCutNoTPConlyPrimVtx (kTRUE);
    taskcheckcascade-> SetQualityCutTPCrefit         (kTRUE);
    taskcheckcascade-> SetQualityCut80TPCcls         (kTRUE);
+   taskcheckcascade-> SetAlephParamFor1PadTPCCluster(kTRUE);
         // taskcheckcascade-> SetExtraSelections            (0);
-   
+   taskcheckcascade-> SetAngularCorrelationType     ("TrigLeadingTrck-AssoCasc"); // 1.1 - "TrigAnyCasc-AssoAnyPrim", 1.2 - "TrigCascLeading-AssoAnyPrim", 2. - "TrigLeadingTrck-AssoCasc"
    
    mgr->AddTask(taskcheckcascade);
 
@@ -44,7 +47,7 @@ AliAnalysisTaskCheckCascade *AddTaskCheckCascade(Short_t       lCollidingSystems
    if(DefaultCommonFileName == "AnalysisResults.root"){
         // Just change the Common File name IF it was not change before
         // -> To avoid screwing-up the analysis train and send the output of the previous task to a non-existing file
-        TString lCommonFileName = "sLHC09-CheckCascade";
+        TString lCommonFileName = "sLHC10-CheckCascade";
         if(lMasterJobSessionFlag.Length()){
                 lCommonFileName += "-";
                 lCommonFileName += lMasterJobSessionFlag.Data();
index 4dd5d4c9db646dcf680bddbc775657cbacab21ee..a7a27242b1bc776cfe94f9a4de366cde6ef49377 100644 (file)
@@ -23,11 +23,14 @@ AliAnalysisTaskCheckPerformanceCascade *AddTaskCheckPerformanceCascade(Short_t
    taskCheckPerfCascade->SetCollidingSystems            (lCollidingSystems);
    taskCheckPerfCascade->SetAnalysisType                (type);
    
+   taskCheckPerfCascade-> SetTriggerMaskType            ("kMB");
    taskCheckPerfCascade-> SetRelaunchV0CascVertexers    (0);     //NOTE
    taskCheckPerfCascade-> SetQualityCutZprimVtxPos      (kTRUE);
+   taskCheckPerfCascade-> SetRejectEventPileUp          (kTRUE);
    taskCheckPerfCascade-> SetQualityCutNoTPConlyPrimVtx (kTRUE);
    taskCheckPerfCascade-> SetQualityCutTPCrefit         (kTRUE);
    taskCheckPerfCascade-> SetQualityCut80TPCcls         (kTRUE);
+   taskCheckPerfCascade-> SetAlephParamFor1PadTPCCluster(kTRUE);
         // taskCheckPerfCascade-> SetExtraSelections            (0);
    
    
@@ -44,7 +47,7 @@ AliAnalysisTaskCheckPerformanceCascade *AddTaskCheckPerformanceCascade(Short_t
    if(DefaultCommonFileName == "AnalysisResults.root"){
         // Just change the Common File name IF it was not change before
         // -> To avoid screwing-up the analysis train and send the output of the previous task to a non-existing file
-        TString lCommonFileName = "sLHC09-CheckPerfCascade";
+        TString lCommonFileName = "sLHC10-CheckPerfCascade";
         if(lMasterJobSessionFlag.Length()){
                 lCommonFileName += "-";
                 lCommonFileName += lMasterJobSessionFlag.Data();