]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - CORRFW/AliCFTrackIsPrimaryCuts.h
First commit of post-processing macro for phi QA
[u/mrichter/AliRoot.git] / CORRFW / AliCFTrackIsPrimaryCuts.h
index 72446bc7bc7dad43927975305fd1780d3cfecdbc..4aa46739d9043e69f32e899bbd423faa402e8319 100644 (file)
 // - accept or not accept daughter tracks of kink decays
 //
 // By default, the distance to 'vertex calculated from tracks' is used.
-// Optionally the TPC (TPC only tracks based) vertex can be used.
+// Optionally the SPD (tracklet based) or TPC (TPC only tracks based) vertex
+// can be used.
+// Note: the distance to the TPC-vertex is already stored in the ESD,
+// the distance to the SPD-vertex has to be re-calculated by propagating each
+// track while executing this cut.
 //
 // The cut values for these cuts are set with the corresponding set functions.
 // All cut classes provided by the correction framework are supposed to be
@@ -52,7 +56,9 @@
 #include <TH2.h>
 #include "AliESDtrackCuts.h"
 class TBits;
-class AliESDtrack ;
+class AliESDtrack;
+class AliAODTrack;
+class AliVEvent;
 
 class AliCFTrackIsPrimaryCuts : public AliCFCutBase
 {
@@ -68,7 +74,8 @@ class AliCFTrackIsPrimaryCuts : public AliCFCutBase
   Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
 
   // cut value setter
-  void UseTPCvertex(Bool_t b=kFALSE)                   {fUseTPCvertex = b;}
+  void UseSPDvertex(Bool_t b=kFALSE);
+  void UseTPCvertex(Bool_t b=kFALSE);
   void SetMinDCAToVertexXY(Float_t dist=0.)             {fMinDCAToVertexXY = dist;}
   void SetMinDCAToVertexZ(Float_t dist=0.)              {fMinDCAToVertexZ = dist;}
   void SetMaxDCAToVertexXY(Float_t dist=1e10)           {fMaxDCAToVertexXY = dist;}
@@ -91,6 +98,7 @@ class AliCFTrackIsPrimaryCuts : public AliCFCutBase
   // please use indices from the enumeration below
   void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins);
   void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax);
+  virtual void SetRecEventInfo(const TObject* esd);
 
   // indeces/counters for single selections
   enum { 
@@ -112,11 +120,13 @@ class AliCFTrackIsPrimaryCuts : public AliCFCutBase
  private:
   void SelectionBitMap(TObject* obj);
   void GetDCA(AliESDtrack* esdTrack);
+  void GetDCA(AliAODTrack* aodTrack);
   void DefineHistograms();             // books histograms and TList
   void Initialise();                   // sets everything to 0
   void FillHistograms(TObject* obj, Bool_t b);
                                        // Fills histograms before and after cuts
-
+  AliVEvent*  fEvt;                    // pointer to event, needed for SPD vertex and DCA in AODs
+  Bool_t   fUseSPDvertex;              // flag: calculate dca to SPD-vertex, off by default
   Bool_t   fUseTPCvertex;              // flag: calculate dca to TPC-vertex, off by default
   Double_t fMinDCAToVertexXY;          // cut value: min distance to main vertex in transverse plane
   Double_t fMinDCAToVertexZ;           // cut value: min longitudinal distance to main vertex