]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALRecoUtils.cxx
bookkeep pt hard info when generating on-the-fly pythia events
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALRecoUtils.cxx
index df9784044082f151f05e49415a14c88f796c7976..066ab29c97b025bad50ed767447896b67a435de9 100644 (file)
@@ -13,7 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id: AliEMCALRecoUtils.cxx 33808 2009-07-15 09:48:08Z gconesab $ */
+/* $Id: AliEMCALRecoUtils.cxx | Sun Dec 8 06:56:48 2013 +0100 | Constantin Loizides  $ */
 
 ///////////////////////////////////////////////////////////////////////////////
 //
@@ -58,7 +58,6 @@
 #include "AliTrackerBase.h"
 #include "AliEMCALPIDUtils.h"
 
-
 ClassImp(AliEMCALRecoUtils)
   
 //_____________________________________
@@ -73,15 +72,18 @@ AliEMCALRecoUtils::AliEMCALRecoUtils():
   fRejectExoticCluster(kFALSE),           fRejectExoticCells(kFALSE), 
   fExoticCellFraction(0),                 fExoticCellDiffTime(0),                 fExoticCellMinAmplitude(0),
   fPIDUtils(),                            fAODFilterMask(0),
+  fAODHybridTracks(0),                    fAODTPCOnlyTracks(0),
   fMatchedTrackIndex(0x0),                fMatchedClusterIndex(0x0), 
   fResidualEta(0x0), fResidualPhi(0x0),   fCutEtaPhiSum(kFALSE),                  fCutEtaPhiSeparate(kFALSE), 
   fCutR(0),                               fCutEta(0),                             fCutPhi(0),
   fClusterWindow(0),                      fMass(0),                           
   fStepSurface(0),                        fStepCluster(0),
+  fITSTrackSA(kFALSE),                    fEMCalSurfaceDistance(430.),
   fTrackCutsType(0),                      fCutMinTrackPt(0),                      fCutMinNClusterTPC(0), 
   fCutMinNClusterITS(0),                  fCutMaxChi2PerClusterTPC(0),            fCutMaxChi2PerClusterITS(0),
   fCutRequireTPCRefit(kFALSE),            fCutRequireITSRefit(kFALSE),            fCutAcceptKinkDaughters(kFALSE),
-  fCutMaxDCAToVertexXY(0),                fCutMaxDCAToVertexZ(0),                 fCutDCAToVertex2D(kFALSE)
+  fCutMaxDCAToVertexXY(0),                fCutMaxDCAToVertexZ(0),                 fCutDCAToVertex2D(kFALSE),
+  fCutRequireITSStandAlone(kFALSE),       fCutRequireITSpureSA(kFALSE) 
 {
 //
   // Constructor.
@@ -99,7 +101,6 @@ AliEMCALRecoUtils::AliEMCALRecoUtils():
   fResidualEta           = new TArrayF();
   fPIDUtils              = new AliEMCALPIDUtils();
 
-  InitTrackCuts();
 }
 
 //______________________________________________________________________
@@ -119,6 +120,7 @@ AliEMCALRecoUtils::AliEMCALRecoUtils(const AliEMCALRecoUtils & reco)
   fExoticCellFraction(reco.fExoticCellFraction),             fExoticCellDiffTime(reco.fExoticCellDiffTime),               
   fExoticCellMinAmplitude(reco.fExoticCellMinAmplitude),
   fPIDUtils(reco.fPIDUtils),                                 fAODFilterMask(reco.fAODFilterMask),
+  fAODHybridTracks(reco.fAODHybridTracks),                   fAODTPCOnlyTracks(reco.fAODTPCOnlyTracks),
   fMatchedTrackIndex(  reco.fMatchedTrackIndex?  new TArrayI(*reco.fMatchedTrackIndex):0x0),
   fMatchedClusterIndex(reco.fMatchedClusterIndex?new TArrayI(*reco.fMatchedClusterIndex):0x0),
   fResidualEta(        reco.fResidualEta?        new TArrayF(*reco.fResidualEta):0x0),
@@ -127,17 +129,19 @@ AliEMCALRecoUtils::AliEMCALRecoUtils(const AliEMCALRecoUtils & reco)
   fCutR(reco.fCutR),        fCutEta(reco.fCutEta),           fCutPhi(reco.fCutPhi),
   fClusterWindow(reco.fClusterWindow),
   fMass(reco.fMass),        fStepSurface(reco.fStepSurface), fStepCluster(reco.fStepCluster),
+  fITSTrackSA(reco.fITSTrackSA),                             fEMCalSurfaceDistance(430.),
   fTrackCutsType(reco.fTrackCutsType),                       fCutMinTrackPt(reco.fCutMinTrackPt), 
   fCutMinNClusterTPC(reco.fCutMinNClusterTPC),               fCutMinNClusterITS(reco.fCutMinNClusterITS), 
   fCutMaxChi2PerClusterTPC(reco.fCutMaxChi2PerClusterTPC),   fCutMaxChi2PerClusterITS(reco.fCutMaxChi2PerClusterITS),
   fCutRequireTPCRefit(reco.fCutRequireTPCRefit),             fCutRequireITSRefit(reco.fCutRequireITSRefit),
   fCutAcceptKinkDaughters(reco.fCutAcceptKinkDaughters),     fCutMaxDCAToVertexXY(reco.fCutMaxDCAToVertexXY),    
-  fCutMaxDCAToVertexZ(reco.fCutMaxDCAToVertexZ),             fCutDCAToVertex2D(reco.fCutDCAToVertex2D)
+  fCutMaxDCAToVertexZ(reco.fCutMaxDCAToVertexZ),             fCutDCAToVertex2D(reco.fCutDCAToVertex2D),
+  fCutRequireITSStandAlone(reco.fCutRequireITSStandAlone),   fCutRequireITSpureSA(reco.fCutRequireITSpureSA) 
 {
   //Copy ctor
   
   for(Int_t i = 0; i < 15 ; i++) { fMisalRotShift[i]      = reco.fMisalRotShift[i]      ; 
-                                   fMisalTransShift[i]    = reco.fMisalTransShift[i]    ; } 
+                                   fMisalTransShift[i]    = reco.fMisalTransShift[i]    ; }
   for(Int_t i = 0; i < 7  ; i++) { fNonLinearityParams[i] = reco.fNonLinearityParams[i] ; }
   for(Int_t i = 0; i < 3  ; i++) { fSmearClusterParam[i]  = reco.fSmearClusterParam[i]  ; }
 
@@ -190,6 +194,8 @@ AliEMCALRecoUtils & AliEMCALRecoUtils::operator = (const AliEMCALRecoUtils & rec
   fPIDUtils                  = reco.fPIDUtils;
 
   fAODFilterMask             = reco.fAODFilterMask;
+  fAODHybridTracks           = reco.fAODHybridTracks;
+  fAODTPCOnlyTracks          = reco.fAODTPCOnlyTracks;
   
   fCutEtaPhiSum              = reco.fCutEtaPhiSum;
   fCutEtaPhiSeparate         = reco.fCutEtaPhiSeparate;
@@ -200,7 +206,9 @@ AliEMCALRecoUtils & AliEMCALRecoUtils::operator = (const AliEMCALRecoUtils & rec
   fMass                      = reco.fMass;
   fStepSurface               = reco.fStepSurface;
   fStepCluster               = reco.fStepCluster;
-
+  fITSTrackSA                = reco.fITSTrackSA;
+  fEMCalSurfaceDistance      = reco.fEMCalSurfaceDistance;
+  
   fTrackCutsType             = reco.fTrackCutsType;
   fCutMinTrackPt             = reco.fCutMinTrackPt;
   fCutMinNClusterTPC         = reco.fCutMinNClusterTPC;
@@ -213,7 +221,8 @@ AliEMCALRecoUtils & AliEMCALRecoUtils::operator = (const AliEMCALRecoUtils & rec
   fCutMaxDCAToVertexXY       = reco.fCutMaxDCAToVertexXY;
   fCutMaxDCAToVertexZ        = reco.fCutMaxDCAToVertexZ;
   fCutDCAToVertex2D          = reco.fCutDCAToVertex2D;
-  
+  fCutRequireITSStandAlone   = reco.fCutRequireITSStandAlone; 
+  fCutRequireITSpureSA       = reco.fCutRequireITSpureSA; 
   if(reco.fResidualEta)
   {
     // assign or copy construct
@@ -323,7 +332,7 @@ AliEMCALRecoUtils::~AliEMCALRecoUtils()
 }
 
 //_______________________________________________________________________________
-Bool_t AliEMCALRecoUtils::AcceptCalibrateCell(const Int_t absID, const Int_t bc,
+Bool_t AliEMCALRecoUtils::AcceptCalibrateCell(Int_t absID, Int_t bc,
                                               Float_t  & amp,    Double_t & time, 
                                               AliVCaloCells* cells) 
 {
@@ -452,7 +461,7 @@ Bool_t AliEMCALRecoUtils::CheckCellFiducialRegion(const AliEMCALGeometry* geom,
 //_______________________________________________________________________________
 Bool_t AliEMCALRecoUtils::ClusterContainsBadChannel(const AliEMCALGeometry* geom, 
                                                     const UShort_t* cellList, 
-                                                    const Int_t nCells)
+                                                    Int_t nCells)
 {
   // Check that in the cluster cells, there is no bad channel of those stored 
   // in fEMCALBadChannelMap or fPHOSBadChannelMap
@@ -483,8 +492,8 @@ Bool_t AliEMCALRecoUtils::ClusterContainsBadChannel(const AliEMCALGeometry* geom
 
 
 //___________________________________________________________________________
-Float_t AliEMCALRecoUtils::GetECross(const Int_t absID, const Double_t tcell,
-                                     AliVCaloCells* cells, const Int_t bc)
+Float_t AliEMCALRecoUtils::GetECross(Int_t absID, Double_t tcell,
+                                     AliVCaloCells* cells, Int_t bc)
 {
   //Calculate the energy in the cross around the energy given cell
   
@@ -559,7 +568,7 @@ Float_t AliEMCALRecoUtils::GetECross(const Int_t absID, const Double_t tcell,
 }
 
 //_____________________________________________________________________________________________
-Bool_t AliEMCALRecoUtils::IsExoticCell(const Int_t absID, AliVCaloCells* cells, const Int_t bc)
+Bool_t AliEMCALRecoUtils::IsExoticCell(Int_t absID, AliVCaloCells* cells, Int_t bc)
 {
   // Look to cell neighbourhood and reject if it seems exotic
   // Do before recalibrating the cells
@@ -589,7 +598,7 @@ Bool_t AliEMCALRecoUtils::IsExoticCell(const Int_t absID, AliVCaloCells* cells,
 //___________________________________________________________________
 Bool_t AliEMCALRecoUtils::IsExoticCluster(const AliVCluster *cluster, 
                                           AliVCaloCells *cells, 
-                                          const Int_t bc) 
+                                          Int_t bc) 
 {
   // Check if the cluster highest energy tower is exotic
   
@@ -648,6 +657,13 @@ Float_t AliEMCALRecoUtils::CorrectClusterEnergyLinearity(AliVCluster* cluster)
   
   Float_t energy = cluster->E();
 
+  if(energy < 0.05)
+  {
+    // Clusters with less than 50 MeV or negative are not possible
+    AliInfo(Form("Too Low Cluster energy!, E = %f < 0.05 GeV",energy));
+    return 0;
+  }
+  
   switch (fNonLinearityFunction) 
   {
       
@@ -675,6 +691,22 @@ Float_t AliEMCALRecoUtils::CorrectClusterEnergyLinearity(AliVCluster* cluster)
       energy *= fNonLinearityParams[0]/TMath::Power(energy+fNonLinearityParams[1],fNonLinearityParams[2])+1;
       break;
     }
+    
+    case kPi0MCv3:
+    {
+      //Same as beam test corrected, change parameters
+      //fNonLinearityParams[0] =  9.81039e-01
+      //fNonLinearityParams[1] =  1.13508e-01;
+      //fNonLinearityParams[2] =  1.00173e+00; 
+      //fNonLinearityParams[3] =  9.67998e-02;
+      //fNonLinearityParams[4] =  2.19381e+02;
+      //fNonLinearityParams[5] =  6.31604e+01;
+      //fNonLinearityParams[6] =  1;
+      energy *= fNonLinearityParams[6]/(fNonLinearityParams[0]*(1./(1.+fNonLinearityParams[1]*exp(-energy/fNonLinearityParams[2]))*1./(1.+fNonLinearityParams[3]*exp((energy-fNonLinearityParams[4])/fNonLinearityParams[5]))));
+      
+      break;
+    }
+      
       
     case kPi0GammaGamma:
     {
@@ -724,6 +756,21 @@ Float_t AliEMCALRecoUtils::CorrectClusterEnergyLinearity(AliVCluster* cluster)
 
       break;
     }
+     
+    case kBeamTestCorrectedv2:
+    {
+      //From beam test, corrected for material between beam and EMCAL
+      //fNonLinearityParams[0] =  0.983504;
+      //fNonLinearityParams[1] =  0.210106;
+      //fNonLinearityParams[2] =  0.897274;
+      //fNonLinearityParams[3] =  0.0829064;
+      //fNonLinearityParams[4] =  152.299;
+      //fNonLinearityParams[5] =  31.5028;
+      //fNonLinearityParams[6] =  0.968;
+      energy *= fNonLinearityParams[6]/(fNonLinearityParams[0]*(1./(1.+fNonLinearityParams[1]*exp(-energy/fNonLinearityParams[2]))*1./(1.+fNonLinearityParams[3]*exp((energy-fNonLinearityParams[4])/fNonLinearityParams[5]))));
+      
+      break;
+    }
       
     case kNoCorrection:
       AliDebug(2,"No correction on the energy\n");
@@ -748,6 +795,24 @@ void AliEMCALRecoUtils::InitNonLinearityParam()
     fNonLinearityParams[4] = -0.4335;
   }
   
+  if(fNonLinearityFunction == kPi0MCv2) 
+  {
+    fNonLinearityParams[0] = 3.11111e-02;
+    fNonLinearityParams[1] =-5.71666e-02; 
+    fNonLinearityParams[2] = 5.67995e-01;      
+  }
+  
+  if(fNonLinearityFunction == kPi0MCv3) 
+  {
+    fNonLinearityParams[0] =  9.81039e-01;
+    fNonLinearityParams[1] =  1.13508e-01;
+    fNonLinearityParams[2] =  1.00173e+00; 
+    fNonLinearityParams[3] =  9.67998e-02;
+    fNonLinearityParams[4] =  2.19381e+02;
+    fNonLinearityParams[5] =  6.31604e+01;
+    fNonLinearityParams[6] =  1;
+  }
+  
   if(fNonLinearityFunction == kPi0GammaGamma) 
   {
     fNonLinearityParams[0] = 1.04;
@@ -794,12 +859,23 @@ void AliEMCALRecoUtils::InitNonLinearityParam()
     fNonLinearityParams[5] =  23.6904;
     fNonLinearityParams[6] =  0.978;
   }
+  
+  if(fNonLinearityFunction == kBeamTestCorrectedv2)
+  {
+    fNonLinearityParams[0] =  0.983504;
+    fNonLinearityParams[1] =  0.210106;
+    fNonLinearityParams[2] =  0.897274;
+    fNonLinearityParams[3] =  0.0829064;
+    fNonLinearityParams[4] =  152.299;
+    fNonLinearityParams[5] =  31.5028;
+    fNonLinearityParams[6] =  0.968;
+  }
 }
 
 //_________________________________________________________
-Float_t  AliEMCALRecoUtils::GetDepth(const Float_t energy, 
-                                     const Int_t iParticle, 
-                                     const Int_t iSM) const 
+Float_t  AliEMCALRecoUtils::GetDepth(Float_t energy, 
+                                     Int_t iParticle, 
+                                     Int_t iSM) const 
 {
   //Calculate shower depth for a given cluster energy and particle type
 
@@ -807,15 +883,22 @@ Float_t  AliEMCALRecoUtils::GetDepth(const Float_t energy,
   Float_t x0    = 1.31;
   Float_t ecr   = 8;
   Float_t depth = 0;
+  Float_t arg   = energy*1000/ ecr; //Multiply energy by 1000 to transform to MeV
   
   switch ( iParticle )
   {
     case kPhoton:
-      depth = x0 * (TMath::Log(energy*1000/ ecr) + 0.5); //Multiply energy by 1000 to transform to MeV
+      if (arg < 1) 
+       depth = 0;
+      else
+       depth = x0 * (TMath::Log(arg) + 0.5); 
       break;
       
     case kElectron:
-      depth = x0 * (TMath::Log(energy*1000/ ecr) - 0.5); //Multiply energy by 1000 to transform to MeV
+      if (arg < 1) 
+       depth = 0;
+      else
+       depth = x0 * (TMath::Log(arg) - 0.5); 
       break;
       
     case kHadron:
@@ -838,13 +921,19 @@ Float_t  AliEMCALRecoUtils::GetDepth(const Float_t energy,
       }
       else
       {//electron
-        depth = x0 * (TMath::Log(energy*1000 / ecr)  - 0.5); //Multiply energy by 1000 to transform to MeV
+       if (arg < 1) 
+         depth = 0;
+       else
+         depth = x0 * (TMath::Log(arg) - 0.5); 
       }
         
       break;
       
     default://photon
-      depth = x0 * (TMath::Log(energy*1000 / ecr) + 0.5); //Multiply energy by 1000 to transform to MeV
+      if (arg < 1) 
+       depth = 0;
+      else
+       depth = x0 * (TMath::Log(arg) + 0.5);
   }  
   
   return depth;
@@ -937,7 +1026,9 @@ void AliEMCALRecoUtils::InitParameters()
   fExoticCellDiffTime     = 1e6;
   fExoticCellMinAmplitude = 0.5;
   
-  fAODFilterMask = 32;
+  fAODFilterMask    = 128;
+  fAODHybridTracks  = kFALSE;
+  fAODTPCOnlyTracks = kTRUE;
   
   fCutEtaPhiSum      = kTRUE;
   fCutEtaPhiSeparate = kFALSE;
@@ -968,6 +1059,8 @@ void AliEMCALRecoUtils::InitParameters()
   fCutMaxDCAToVertexZ  = 1e10;              
   fCutDCAToVertex2D    = kFALSE;
   
+  fCutRequireITSStandAlone = kFALSE; //MARCEL
+  fCutRequireITSpureSA     = kFALSE; //Marcel
   
   //Misalignment matrices
   for(Int_t i = 0; i < 15 ; i++) 
@@ -979,19 +1072,14 @@ void AliEMCALRecoUtils::InitParameters()
   //Non linearity
   for(Int_t i = 0; i < 7  ; i++) fNonLinearityParams[i] = 0.; 
   
-  //For kBeamTestCorrected case, but default is no correction
-  fNonLinearityParams[0] =  0.99078;
-  fNonLinearityParams[1] =  0.161499;
-  fNonLinearityParams[2] =  0.655166; 
-  fNonLinearityParams[3] =  0.134101;
-  fNonLinearityParams[4] =  163.282;
-  fNonLinearityParams[5] =  23.6904;
-  fNonLinearityParams[6] =  0.978;
-  
-  //For kPi0GammaGamma case
-  //fNonLinearityParams[0] = 0.1457/0.1349766/1.038;
-  //fNonLinearityParams[1] = -0.02024/0.1349766/1.038;
-  //fNonLinearityParams[2] = 1.046;
+  //For kBeamTestCorrectedv2 case, but default is no correction
+  fNonLinearityParams[0] =  0.983504;
+  fNonLinearityParams[1] =  0.210106;
+  fNonLinearityParams[2] =  0.897274;
+  fNonLinearityParams[3] =  0.0829064;
+  fNonLinearityParams[4] =  152.299;
+  fNonLinearityParams[5] =  31.5028;
+  fNonLinearityParams[6] =  0.968;
   
   //Cluster energy smearing
   fSmearClusterEnergy   = kFALSE;
@@ -1087,7 +1175,7 @@ void AliEMCALRecoUtils::InitEMCALBadChannelStatusMap()
 void AliEMCALRecoUtils::RecalibrateClusterEnergy(const AliEMCALGeometry* geom, 
                                                  AliVCluster * cluster, 
                                                  AliVCaloCells * cells, 
-                                                 const Int_t bc)
+                                                 Int_t bc)
 {
   // Recalibrate the cluster energy and Time, considering the recalibration map 
   // and the energy of the cells and time that compose the cluster.
@@ -1146,28 +1234,27 @@ void AliEMCALRecoUtils::RecalibrateClusterEnergy(const AliEMCALGeometry* geom,
 
   cluster->SetE(energy);
 
-  // Recalculate time of cluster   
+  // Recalculate time of cluster
   Double_t timeorg = cluster->GetTOF();
+
+  Double_t time = cells->GetCellTime(absIdMax);
   if(!fCellsRecalibrated && IsTimeRecalibrationOn())
-  {
-    Double_t time = timeorg;
     RecalibrateCellTime(absIdMax,bc,time);
-    cluster->SetTOF(time);
-  } 
 
-  AliDebug(2,Form("AliEMCALRecoUtils::RecalibrateClusterEnergy - Time before %f, after %f \n",timeorg,cluster->GetTOF()));
+  cluster->SetTOF(time);
 
+  AliDebug(2,Form("AliEMCALRecoUtils::RecalibrateClusterEnergy - Time before %f, after %f \n",timeorg,cluster->GetTOF()));
 }
 
 //_____________________________________________________________
 void AliEMCALRecoUtils::RecalibrateCells(AliVCaloCells * cells,
-                                         const Int_t bc)
+                                         Int_t bc)
 {
   // Recalibrate the cells time and energy, considering the recalibration map and the energy 
   // of the cells that compose the cluster.
   // bc= bunch crossing number returned by esdevent->GetBunchCrossNumber();
 
-  if(!IsRecalibrationOn() && !IsTimeRecalibrationOn()) return;
+  if(!IsRecalibrationOn() && !IsTimeRecalibrationOn() && !IsBadChannelsRemovalSwitchedOn()) return;
   
   if(!cells)
   {
@@ -1181,7 +1268,7 @@ void AliEMCALRecoUtils::RecalibrateCells(AliVCaloCells * cells,
   Double_t tcell  = 0;
   Double_t ecellin = 0;
   Double_t tcellin = 0;
-  Short_t  mclabel = -1;
+  Int_t  mclabel = -1;
   Double_t efrac = 0;
   
   Int_t nEMcell  = cells->GetNumberOfCells() ;  
@@ -1204,7 +1291,7 @@ void AliEMCALRecoUtils::RecalibrateCells(AliVCaloCells * cells,
 }
 
 //_______________________________________________________________________________________________________
-void AliEMCALRecoUtils::RecalibrateCellTime(const Int_t absId, const Int_t bc, Double_t & celltime) const
+void AliEMCALRecoUtils::RecalibrateCellTime(Int_t absId, Int_t bc, Double_t & celltime) const
 {
   // Recalibrate time of cell with absID  considering the recalibration map 
   // bc= bunch crossing number returned by esdevent->GetBunchCrossNumber();
@@ -1254,6 +1341,8 @@ void AliEMCALRecoUtils::RecalculateClusterPositionFromTowerGlobal(const AliEMCAL
   Bool_t shared = kFALSE;
 
   Float_t  clEnergy = clu->E(); //Energy already recalibrated previously
+  if (clEnergy <= 0)
+    return;
   GetMaxEnergyCell(geom, cells, clu, absId,  iSupModMax, ieta, iphi,shared);
   Double_t depth = GetDepth(clEnergy,fParticleType,iSupModMax) ;
   
@@ -1337,6 +1426,9 @@ void AliEMCALRecoUtils::RecalculateClusterPositionFromTowerIndex(const AliEMCALG
   Bool_t shared = kFALSE;
 
   Float_t clEnergy = clu->E(); //Energy already recalibrated previously.
+  
+  if (clEnergy <= 0)
+    return;
   GetMaxEnergyCell(geom, cells, clu, absId,  iSupModMax, ieta, iphi,shared);
   Float_t  depth = GetDepth(clEnergy,fParticleType,iSupMod) ;
 
@@ -1494,8 +1586,8 @@ void AliEMCALRecoUtils::RecalculateClusterPID(AliVCluster * cluster)
   if ( cluster->GetM02() != 0)
     fPIDUtils->ComputePID(cluster->E(),cluster->GetM02());
   
-  Float_t pidlist[AliPID::kSPECIESN+1];
-  for(Int_t i = 0; i < AliPID::kSPECIESN+1; i++) pidlist[i] = fPIDUtils->GetPIDFinal(i);
+  Float_t pidlist[AliPID::kSPECIESCN+1];
+  for(Int_t i = 0; i < AliPID::kSPECIESCN+1; i++) pidlist[i] = fPIDUtils->GetPIDFinal(i);
         
   cluster->SetPID(pidlist);
 }
@@ -1536,7 +1628,38 @@ void AliEMCALRecoUtils::RecalculateClusterShowerShapeParameters(const AliEMCALGe
   Double_t w       = 0.;
   Double_t etaMean = 0.;
   Double_t phiMean = 0.;
+  
+  //Loop on cells, calculate the cluster energy, in case a cut on cell energy is added
+  // and to check if the cluster is between 2 SM in eta
+  Int_t   iSM0   = -1;
+  Bool_t  shared = kFALSE;
+  Float_t energy = 0;
+  
+  for(Int_t iDigit=0; iDigit < cluster->GetNCells(); iDigit++)
+  {
+    //Get from the absid the supermodule, tower and eta/phi numbers
+    geom->GetCellIndex(cluster->GetCellAbsId(iDigit),iSupMod,iTower,iIphi,iIeta);
+    geom->GetCellPhiEtaIndexInSModule(iSupMod,iTower,iIphi,iIeta, iphi,ieta);
+    
+    //Check if there are cells of different SM
+    if     (iDigit == 0   ) iSM0 = iSupMod;
+    else if(iSupMod!= iSM0) shared = kTRUE;
+    
+    //Get the cell energy, if recalibration is on, apply factors
+    fraction  = cluster->GetCellAmplitudeFraction(iDigit);
+    if(fraction < 1e-4) fraction = 1.; // in case unfolding is off
+    
+    if(IsRecalibrationOn())
+    {
+      recalFactor = GetEMCALChannelRecalibrationFactor(iSupMod,ieta,iphi);
+    }
+    
+    eCell  = cells->GetCellAmplitude(cluster->GetCellAbsId(iDigit))*fraction*recalFactor;
+    
+    energy += eCell;
     
+  }//cell loop
+  
   //Loop on cells
   for(Int_t iDigit=0; iDigit < cluster->GetNCells(); iDigit++) 
   {
@@ -1558,6 +1681,10 @@ void AliEMCALRecoUtils::RecalculateClusterShowerShapeParameters(const AliEMCALGe
     
     eCell  = cells->GetCellAmplitude(cluster->GetCellAbsId(iDigit))*fraction*recalFactor;
     
+    // In case of a shared cluster, index of SM in C side, columns start at 48 and ends at 48*2
+    // C Side impair SM, nSupMod%2=1; A side pair SM, nSupMod%2=0
+    if(shared && iSupMod%2) ieta+=AliEMCALGeoParams::fgkEMCALCols;
+    
     if(cluster->E() > 0 && eCell > 0)
     {
       w  = GetCellWeight(eCell,cluster->E());
@@ -1606,6 +1733,10 @@ void AliEMCALRecoUtils::RecalculateClusterShowerShapeParameters(const AliEMCALGe
     }
     eCell  = cells->GetCellAmplitude(cluster->GetCellAbsId(iDigit))*fraction*recalFactor;
     
+    // In case of a shared cluster, index of SM in C side, columns start at 48 and ends at 48*2
+    // C Side impair SM, nSupMod%2=1; A side pair SM, nSupMod%2=0
+    if(shared && iSupMod%2) ieta+=AliEMCALGeoParams::fgkEMCALCols;
+    
     if(cluster->E() > 0 && eCell > 0)
     {
       w  = GetCellWeight(eCell,cluster->E());
@@ -1698,36 +1829,37 @@ void AliEMCALRecoUtils::FindMatches(AliVEvent *event,
   // init the magnetic field if not already on
   if(!TGeoGlobalMagField::Instance()->GetField())
   {
-    AliInfo("Init the magnetic field\n");
-    if     (esdevent) 
-    {
-      esdevent->InitMagneticField();
-    }
-    else if(aodevent)
-    {
-      Double_t curSol = 30000*aodevent->GetMagneticField()/5.00668;
-      Double_t curDip = 6000 *aodevent->GetMuonMagFieldScale();
-      AliMagF *field  = AliMagF::CreateFieldMap(curSol,curDip);
-      TGeoGlobalMagField::Instance()->SetField(field);
-    }
-    else
+    if (!event->InitMagneticField())
     {
       AliInfo("Mag Field not initialized, null esd/aod evetn pointers");
     }
     
   } // Init mag field
   
+  if (esdevent) {
+    UInt_t mask1 = esdevent->GetESDRun()->GetDetectorsInDAQ();
+    UInt_t mask2 = esdevent->GetESDRun()->GetDetectorsInReco();
+    Bool_t desc1 = (mask1 >> 3) & 0x1;
+    Bool_t desc2 = (mask2 >> 3) & 0x1;
+    if (desc1==0 || desc2==0) { 
+//       AliError(Form("TPC not in DAQ/RECO: %u (%u)/%u (%u)", 
+//       mask1, esdevent->GetESDRun()->GetDetectorsInReco(),
+//       mask2, esdevent->GetESDRun()->GetDetectorsInDAQ()));
+      fITSTrackSA=kTRUE;
+    }
+  }
+
   TObjArray *clusterArray = 0x0;
-  if(!clusterArr)
-    {
-      clusterArray = new TObjArray(event->GetNumberOfCaloClusters());
-      for(Int_t icl=0; icl<event->GetNumberOfCaloClusters(); icl++)
+  if(!clusterArr) 
   {
-    AliVCluster *cluster = (AliVCluster*) event->GetCaloCluster(icl);
-    if(geom && !IsGoodCluster(cluster,geom,(AliVCaloCells*)event->GetEMCALCells())) continue;
-    clusterArray->AddAt(cluster,icl);
-  }
+    clusterArray = new TObjArray(event->GetNumberOfCaloClusters());
+    for(Int_t icl=0; icl<event->GetNumberOfCaloClusters(); icl++) 
+    {
+      AliVCluster *cluster = (AliVCluster*) event->GetCaloCluster(icl);
+      if(geom && !IsGoodCluster(cluster,geom,(AliVCaloCells*)event->GetEMCALCells())) continue;
+      clusterArray->AddAt(cluster,icl);
     }
+  }
   
   Int_t    matched=0;
   Double_t cv[21];
@@ -1747,7 +1879,10 @@ void AliEMCALRecoUtils::FindMatches(AliVEvent *event,
       if(esdTrack->Pt()<fCutMinTrackPt) continue;
       Double_t phi = esdTrack->Phi()*TMath::RadToDeg();
       if(TMath::Abs(esdTrack->Eta())>0.8 || phi <= 20 || phi >= 240 ) continue;
-      trackParam =  const_cast<AliExternalTrackParam*>(esdTrack->GetInnerParam());
+      if(!fITSTrackSA)
+       trackParam =  const_cast<AliExternalTrackParam*>(esdTrack->GetInnerParam());  // if TPC Available
+      else
+       trackParam =  new AliExternalTrackParam(*esdTrack); // If ITS Track Standing alone              
     }
     
     //If the input event is AOD, the starting point for extrapolation is at vertex
@@ -1756,14 +1891,32 @@ void AliEMCALRecoUtils::FindMatches(AliVEvent *event,
     {
       aodTrack = aodevent->GetTrack(itr);
       if(!aodTrack) continue;
-      if(!aodTrack->TestFilterMask(fAODFilterMask)) continue; //Select AOD tracks that fulfill GetStandardITSTPCTrackCuts2010()
+            
+      if(fAODTPCOnlyTracks) // Match with TPC only tracks, default from May 2013, before filter bit 32
+      {
+        //printf("Match with TPC only tracks, accept? %d, test bit 128 <%d> \n", aodTrack->IsTPCOnly(), aodTrack->TestFilterMask(128));
+        if(!aodTrack->IsTPCOnly()) continue ;
+      }
+      else if(fAODHybridTracks) // Match with hybrid tracks
+      {
+        //printf("Match with Hybrid tracks, accept? %d \n", aodTrack->IsHybridGlobalConstrainedGlobal());
+        if(!aodTrack->IsHybridGlobalConstrainedGlobal()) continue ;
+      }
+      else // Match with tracks on a mask
+      {
+        //printf("Match with tracks having filter bit mask %d, accept? %d \n",fAODFilterMask,aodTrack->TestFilterMask(fAODFilterMask));
+        if(!aodTrack->TestFilterMask(fAODFilterMask) ) continue; //Select AOD tracks
+      }
+      
       if(aodTrack->Pt()<fCutMinTrackPt) continue;
+
       Double_t phi = aodTrack->Phi()*TMath::RadToDeg();
       if(TMath::Abs(aodTrack->Eta())>0.8 || phi <= 20 || phi >= 240 ) continue;
       Double_t pos[3],mom[3];
       aodTrack->GetXYZ(pos);
       aodTrack->GetPxPyPz(mom);
       AliDebug(5,Form("aod track: i=%d | pos=(%5.4f,%5.4f,%5.4f) | mom=(%5.4f,%5.4f,%5.4f) | charge=%d\n",itr,pos[0],pos[1],pos[2],mom[0],mom[1],mom[2],aodTrack->Charge()));
+
       trackParam= new AliExternalTrackParam(pos,mom,cv,aodTrack->Charge());
     }
     
@@ -1772,10 +1925,10 @@ void AliEMCALRecoUtils::FindMatches(AliVEvent *event,
     {
       printf("Wrong input data type! Should be \"AOD\" or \"ESD\"\n");
       if(clusterArray)
-  {
-    clusterArray->Clear();
-    delete clusterArray;
-  }
+      {
+       clusterArray->Clear();
+       delete clusterArray;
+      }
       return;
     }
     
@@ -1783,36 +1936,32 @@ void AliEMCALRecoUtils::FindMatches(AliVEvent *event,
 
     //Extrapolate the track to EMCal surface
     AliExternalTrackParam emcalParam(*trackParam);
-    Float_t eta, phi;
-    if(!ExtrapolateTrackToEMCalSurface(&emcalParam, 430., fMass, fStepSurface, eta, phi)) 
-      {
-  if(aodevent && trackParam) delete trackParam;
-  continue;
-      }
-
-//    if(esdevent)
-//      {
-//  esdTrack->SetOuterParam(&emcalParam,AliExternalTrackParam::kMultSec);
-//      }
+    Float_t eta, phi, pt;
+    if(!ExtrapolateTrackToEMCalSurface(&emcalParam, fEMCalSurfaceDistance, fMass, fStepSurface, eta, phi, pt)) 
+    {
+      if(aodevent && trackParam) delete trackParam;
+      if(fITSTrackSA && trackParam) delete trackParam;
+      continue;
+    }
 
     if(TMath::Abs(eta)>0.75 || (phi) < 70*TMath::DegToRad() || (phi) > 190*TMath::DegToRad())
-      {
-  if(aodevent && trackParam) delete trackParam;
-  continue;
-      }
-
+    {
+      if(aodevent && trackParam) delete trackParam;
+      if(fITSTrackSA && trackParam) delete trackParam;
+      continue;
+    }
 
     //Find matched clusters
     Int_t index = -1;
     Float_t dEta = -999, dPhi = -999;
     if(!clusterArr)
-      {
-  index = FindMatchedClusterInClusterArr(&emcalParam, &emcalParam, clusterArray, dEta, dPhi);  
-      }
+    {
+      index = FindMatchedClusterInClusterArr(&emcalParam, &emcalParam, clusterArray, dEta, dPhi);  
+    } 
     else
-      {
-  index = FindMatchedClusterInClusterArr(&emcalParam, &emcalParam, clusterArr, dEta, dPhi);  
-      }  
+    {
+      index = FindMatchedClusterInClusterArr(&emcalParam, &emcalParam, clusterArr, dEta, dPhi);  
+    }  
     
     if(index>-1)
     {
@@ -1823,13 +1972,14 @@ void AliEMCALRecoUtils::FindMatches(AliVEvent *event,
       matched++;
     }
     if(aodevent && trackParam) delete trackParam;
+    if(fITSTrackSA && trackParam) delete trackParam;
   }//track loop
 
   if(clusterArray)
-    {
-      clusterArray->Clear();
-      delete clusterArray;
-    }
+  {
+    clusterArray->Clear();
+    delete clusterArray;
+  }
   
   AliDebug(2,Form("Number of matched pairs = %d !\n",matched));
   
@@ -1851,13 +2001,25 @@ Int_t AliEMCALRecoUtils::FindMatchedClusterInEvent(const AliESDtrack *track,
   Int_t index = -1;
   Double_t phiV = track->Phi()*TMath::RadToDeg();
   if(TMath::Abs(track->Eta())>0.8 || phiV <= 20 || phiV >= 240 ) return index;
-  AliExternalTrackParam *trackParam = const_cast<AliExternalTrackParam*>(track->GetInnerParam());
+  AliExternalTrackParam *trackParam = 0;
+  if(!fITSTrackSA)
+    trackParam = const_cast<AliExternalTrackParam*>(track->GetInnerParam());  // If TPC
+  else
+    trackParam = new AliExternalTrackParam(*track);
+    
   if(!trackParam) return index;
   AliExternalTrackParam emcalParam(*trackParam);
-  Float_t eta, phi;
-  if(!ExtrapolateTrackToEMCalSurface(&emcalParam, 430., fMass, fStepSurface, eta, phi)) return index;
-  if(TMath::Abs(eta)>0.75 || (phi) < 70*TMath::DegToRad() || (phi) > 190*TMath::DegToRad()) return index;
+  Float_t eta, phi, pt;
 
+  if(!ExtrapolateTrackToEMCalSurface(&emcalParam, fEMCalSurfaceDistance, fMass, fStepSurface, eta, phi, pt))   {
+       if(fITSTrackSA) delete trackParam;
+       return index;
+  }
+  if(TMath::Abs(eta)>0.75 || (phi) < 70*TMath::DegToRad() || (phi) > 190*TMath::DegToRad()){
+       if(fITSTrackSA) delete trackParam;
+       return index;
+  }
+  
   TObjArray *clusterArr = new TObjArray(event->GetNumberOfCaloClusters());
 
   for(Int_t icl=0; icl<event->GetNumberOfCaloClusters(); icl++)
@@ -1870,7 +2032,8 @@ Int_t AliEMCALRecoUtils::FindMatchedClusterInEvent(const AliESDtrack *track,
   index = FindMatchedClusterInClusterArr(&emcalParam, &emcalParam, clusterArr, dEta, dPhi);  
   clusterArr->Clear();
   delete clusterArr;
-  
+  if(fITSTrackSA) delete trackParam;
+
   return index;
 }
 
@@ -1892,43 +2055,43 @@ Int_t  AliEMCALRecoUtils::FindMatchedClusterInClusterArr(const AliExternalTrackP
 
   Float_t clsPos[3] = {0.,0.,0.};
   for(Int_t icl=0; icl<clusterArr->GetEntriesFast(); icl++)
+  {
+    AliVCluster *cluster = dynamic_cast<AliVCluster*> (clusterArr->At(icl)) ;
+    if(!cluster || !cluster->IsEMCAL()) continue;
+    cluster->GetPosition(clsPos);
+    Double_t dR = TMath::Sqrt(TMath::Power(exPos[0]-clsPos[0],2)+TMath::Power(exPos[1]-clsPos[1],2)+TMath::Power(exPos[2]-clsPos[2],2));
+    if(dR > fClusterWindow) continue;
+    
+    AliExternalTrackParam trkPamTmp (*trkParam);//Retrieve the starting point every time before the extrapolation
+    if(!ExtrapolateTrackToCluster(&trkPamTmp, cluster, fMass, fStepCluster, tmpEta, tmpPhi)) continue;
+    if(fCutEtaPhiSum)
     {
-      AliVCluster *cluster = dynamic_cast<AliVCluster*> (clusterArr->At(icl)) ;
-      if(!cluster || !cluster->IsEMCAL()) continue;
-      cluster->GetPosition(clsPos);
-      Double_t dR = TMath::Sqrt(TMath::Power(exPos[0]-clsPos[0],2)+TMath::Power(exPos[1]-clsPos[1],2)+TMath::Power(exPos[2]-clsPos[2],2));
-      if(dR > fClusterWindow) continue;
-
-      AliExternalTrackParam trkPamTmp (*trkParam);//Retrieve the starting point every time before the extrapolation
-      if(!ExtrapolateTrackToCluster(&trkPamTmp, cluster, fMass, fStepCluster, tmpEta, tmpPhi)) continue;
-      if(fCutEtaPhiSum)
-        {
-          Float_t tmpR=TMath::Sqrt(tmpEta*tmpEta + tmpPhi*tmpPhi);
-          if(tmpR<dRMax)
+      Float_t tmpR=TMath::Sqrt(tmpEta*tmpEta + tmpPhi*tmpPhi);
+      if(tmpR<dRMax)
       {
         dRMax=tmpR;
         dEtaMax=tmpEta;
         dPhiMax=tmpPhi;
         index=icl;
       }
-        }
-      else if(fCutEtaPhiSeparate)
-        {
-          if(TMath::Abs(tmpEta)<TMath::Abs(dEtaMax) && TMath::Abs(tmpPhi)<TMath::Abs(dPhiMax))
+    }
+    else if(fCutEtaPhiSeparate)
+    {
+      if(TMath::Abs(tmpEta)<TMath::Abs(dEtaMax) && TMath::Abs(tmpPhi)<TMath::Abs(dPhiMax))
       {
         dEtaMax = tmpEta;
         dPhiMax = tmpPhi;
         index=icl;
       }
-        }
-      else
-        {
-          printf("Error: please specify your cut criteria\n");
-          printf("To cut on sqrt(dEta^2+dPhi^2), use: SwitchOnCutEtaPhiSum()\n");
-          printf("To cut on dEta and dPhi separately, use: SwitchOnCutEtaPhiSeparate()\n");
-          return index;
-        }
     }
+    else
+    {
+      printf("Error: please specify your cut criteria\n");
+      printf("To cut on sqrt(dEta^2+dPhi^2), use: SwitchOnCutEtaPhiSum()\n");
+      printf("To cut on dEta and dPhi separately, use: SwitchOnCutEtaPhiSeparate()\n");
+      return index;
+    }
+  }
 
   dEta=dEtaMax;
   dPhi=dPhiMax;
@@ -1936,17 +2099,85 @@ Int_t  AliEMCALRecoUtils::FindMatchedClusterInClusterArr(const AliExternalTrackP
   return index;
 }
 
+//------------------------------------------------------------------------------------
+Bool_t AliEMCALRecoUtils::ExtrapolateTrackToEMCalSurface(AliVTrack *track,
+                                                        Double_t emcalR, Double_t mass, Double_t step)
+{ 
+  // Extrpolate track to EMCAL surface
+
+  track->SetTrackPhiEtaPtOnEMCal(-999, -999, -999);
+
+  if (track->Pt()<0.350) 
+    return kFALSE;
+
+  Double_t phi = track->Phi()*TMath::RadToDeg();
+  if (TMath::Abs(track->Eta())>0.9 || phi <= 10 || phi >= 250) 
+    return kFALSE;
+
+  AliESDtrack *esdt = dynamic_cast<AliESDtrack*>(track);
+  AliAODTrack *aodt = 0;
+  if (!esdt) {
+    aodt = dynamic_cast<AliAODTrack*>(track);
+    if (!aodt)
+      return kFALSE;
+  }
+
+  if (mass<0) {
+    Bool_t onlyTPC = kFALSE;
+    if (mass==-99)
+      onlyTPC=kTRUE;
+    if (esdt)
+      mass = esdt->GetMass(onlyTPC);
+    else 
+      mass = aodt->M();
+  }
+
+  AliExternalTrackParam *trackParam = 0;
+  if (esdt) {
+    const AliExternalTrackParam *in = esdt->GetInnerParam();
+    if (!in)
+      return kFALSE;
+    trackParam = new AliExternalTrackParam(*in);
+  } else {
+    Double_t xyz[3] = {0}, pxpypz[3] = {0}, cv[21] = {0};
+    aodt->PxPyPz(pxpypz);  
+    aodt->XvYvZv(xyz);
+    aodt->GetCovarianceXYZPxPyPz(cv);  
+    trackParam = new AliExternalTrackParam(xyz,pxpypz,cv,aodt->Charge());
+  }
+  if (!trackParam)
+    return kFALSE;
+
+  Float_t etaout=-999, phiout=-999, ptout=-999;
+  Bool_t ret = ExtrapolateTrackToEMCalSurface(trackParam, 
+                                             emcalR,
+                                             mass,
+                                             step,
+                                             etaout, 
+                                             phiout,
+                                             ptout);
+  delete trackParam;
+  if (!ret)
+    return kFALSE;
+  if (TMath::Abs(etaout)>0.75 || (phiout<70*TMath::DegToRad()) || (phiout>190*TMath::DegToRad()))
+    return kFALSE;
+  track->SetTrackPhiEtaPtOnEMCal(phiout, etaout, ptout);
+  return kTRUE;
+}
+
+
 //------------------------------------------------------------------------------------
 Bool_t AliEMCALRecoUtils::ExtrapolateTrackToEMCalSurface(AliExternalTrackParam *trkParam, 
-                                                         const Double_t emcalR,
-                                                         const Double_t mass, 
-                                                         const Double_t step, 
+                                                         Double_t emcalR,
+                                                         Double_t mass, 
+                                                         Double_t step, 
                                                          Float_t &eta, 
-                                                         Float_t &phi)
+                                                         Float_t &phi,
+                                                        Float_t &pt)
 {
   //Extrapolate track to EMCAL surface
   
-  eta = -999, phi = -999;
+  eta = -999, phi = -999, pt = -999;
   if(!trkParam) return kFALSE;
   if(!AliTrackerBase::PropagateTrackToBxByBz(trkParam, emcalR, mass, step, kTRUE, 0.8, -1)) return kFALSE;
   Double_t trkPos[3] = {0.,0.,0.};
@@ -1954,6 +2185,7 @@ Bool_t AliEMCALRecoUtils::ExtrapolateTrackToEMCalSurface(AliExternalTrackParam *
   TVector3 trkPosVec(trkPos[0],trkPos[1],trkPos[2]);
   eta = trkPosVec.Eta();
   phi = trkPosVec.Phi();
+  pt = trkParam->Pt();
   if(phi<0)
     phi += 2*TMath::Pi();
 
@@ -1994,8 +2226,8 @@ Bool_t AliEMCALRecoUtils::ExtrapolateTrackToPosition(AliExternalTrackParam *trkP
 //----------------------------------------------------------------------------------
 Bool_t AliEMCALRecoUtils::ExtrapolateTrackToCluster(AliExternalTrackParam *trkParam, 
                                                     const AliVCluster *cluster, 
-                                                    const Double_t mass, 
-                                                    const Double_t step, 
+                                                    Double_t mass, 
+                                                    Double_t step, 
                                                     Float_t &tmpEta, 
                                                     Float_t &tmpPhi)
 {
@@ -2026,7 +2258,7 @@ Bool_t AliEMCALRecoUtils::ExtrapolateTrackToCluster(AliExternalTrackParam *trkPa
 }
 
 //_______________________________________________________________________
-void AliEMCALRecoUtils::GetMatchedResiduals(const Int_t clsIndex, 
+void AliEMCALRecoUtils::GetMatchedResiduals(Int_t clsIndex, 
                                             Float_t &dEta, Float_t &dPhi)
 {
   //Given a cluster index as in AliESDEvent::GetCaloCluster(clsIndex)
@@ -2163,7 +2395,7 @@ UInt_t AliEMCALRecoUtils::FindMatchedPosForTrack(Int_t trkIndex) const
 //__________________________________________________________________________
 Bool_t AliEMCALRecoUtils::IsGoodCluster(AliVCluster *cluster, 
                                         const AliEMCALGeometry *geom, 
-                                        AliVCaloCells* cells,const Int_t bc)
+                                        AliVCaloCells* cells, Int_t bc)
 {
   // check if the cluster survives some quality cut
   //
@@ -2264,6 +2496,21 @@ Bool_t AliEMCALRecoUtils::IsAccepted(AliESDtrack *esdTrack)
   cuts[10] = kTRUE;
     }
 
+      // ITS
+  if(fCutRequireITSStandAlone || fCutRequireITSpureSA){
+    if ((status & AliESDtrack::kITSin) == 0 || (status & AliESDtrack::kTPCin)){
+      // TPC tracks
+      cuts[11] = kTRUE; 
+    }else{
+      // ITS standalone tracks
+      if(fCutRequireITSStandAlone && !fCutRequireITSpureSA){
+       if(status & AliESDtrack::kITSpureSA) cuts[11] = kTRUE;
+      }else if(fCutRequireITSpureSA){
+       if(!(status & AliESDtrack::kITSpureSA)) cuts[11] = kTRUE;
+      }
+    }
+  }
+  
   Bool_t cut=kFALSE;
   for (Int_t i=0; i<kNCuts; i++)
     if (cuts[i]) { cut = kTRUE ; }
@@ -2328,6 +2575,16 @@ void AliEMCALRecoUtils::InitTrackCuts()
       
       break;
     }
+
+    case kITSStandAlone:
+    {
+      AliInfo(Form("Track cuts for matching: ITS Stand Alone tracks cut w/o DCA cut"));
+      SetRequireITSRefit(kTRUE);
+      SetRequireITSStandAlone(kTRUE);
+      SetITSTrackSA(kTRUE);
+      break;
+    }
+    
   }
 }
 
@@ -2462,7 +2719,7 @@ void AliEMCALRecoUtils::Print(const Option_t *) const
 
   printf("Track cuts: \n");
   printf("Minimum track pT: %1.2f\n",fCutMinTrackPt);
-  printf("AOD track selection mask: %d\n",fAODFilterMask);
+  printf("AOD track selection: tpc only %d, or hybrid %d, or mask: %d\n",fAODTPCOnlyTracks,fAODHybridTracks, fAODFilterMask);
   printf("TPCRefit = %d, ITSRefit = %d\n",fCutRequireTPCRefit,fCutRequireITSRefit);
   printf("AcceptKinks = %d\n",fCutAcceptKinkDaughters);
   printf("MinNCulsterTPC = %d, MinNClusterITS = %d\n",fCutMinNClusterTPC,fCutMinNClusterITS);