]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDtracker.h
Reconstruction and PID using transition radiation photons: first implementation ...
[u/mrichter/AliRoot.git] / TRD / AliTRDtracker.h
index e74b15a1dfe84ed2444b7d9d8adf0c1df54dc63e..b54f4d7cc0246278657a7a97b125f2f6b616b743 100644 (file)
@@ -6,8 +6,6 @@
 
 #include "AliTracker.h" 
 #include "TObjArray.h" 
-#include "AliBarrelTrack.h"
-#include "AliESD.h"
 
 class TFile;
 class TTree;
@@ -18,7 +16,8 @@ class AliTRDgeometry;
 class AliTRDparameter;
 class AliTRDtrack;
 class AliTRDcluster;
-class AliTRDmcTrack;
+class AliBarrelTrack;
+class AliESD;
 
 const unsigned kMaxLayersPerSector = 1000;  
 const unsigned kMaxTimeBinIndex = 216;  // (30 drift + 6 ampl) * 6 planes  
@@ -30,18 +29,16 @@ class AliTRDtracker : public AliTracker {
 
  public:
 
-  AliTRDtracker():AliTracker() {} 
+  AliTRDtracker();
   AliTRDtracker(const TFile *in);
   virtual ~AliTRDtracker(); 
 
-  Int_t         Clusters2Tracks(const TFile *in, TFile *out);
   Int_t         Clusters2Tracks(AliESD* event);
-  Int_t         PropagateBack(const TFile *in, TFile *out);
   Int_t         PropagateBack(AliESD* event);
-  Int_t         RefitInward(AliESD* /*event*/) {return 0;}
+  Int_t         RefitInward(AliESD* event);
 
   Int_t         LoadClusters(TTree *cTree);
-  void          UnloadClusters(){UnloadEvent();}
+  void          UnloadClusters();
   AliCluster   *GetCluster(Int_t index) const { if (index >= fNclusters) return NULL; 
                                                 return (AliCluster*) fClusters->UncheckedAt(index); };
   virtual void  CookLabel(AliKalmanTrack *t,Float_t wrong) const;
@@ -52,10 +49,10 @@ class AliTRDtracker : public AliTracker {
 
   Double_t      GetTiltFactor(const AliTRDcluster* c);
 
-  void          ReadClusters(TObjArray *array, const Char_t *filename); 
-  Int_t         ReadClusters(TObjArray *array, TTree *in);
+  Int_t         ReadClusters(TObjArray *array, TTree *in) const;
   Int_t         CookSectorIndex(Int_t gs) const { return kTrackingSectors - 1 - gs; }
-
+  AliTRDcluster * GetCluster(AliTRDtrack * track, Int_t plane, Int_t timebin);
+  Int_t         GetLastPlane(AliTRDtrack * track); //return last updated plane
 
   Float_t  GetSeedGap()       const {return fgkSeedGap;}   
   Int_t    GetMaxGap()        const {return fMaxGap;}   
@@ -107,10 +104,13 @@ class AliTRDtracker : public AliTracker {
      void           GetPropagationParameters(Double_t y, Double_t z,
                                 Double_t &dx, Double_t &rho, Double_t &x0, 
                                 Bool_t &lookForCluster) const;
+     Int_t          GetZone( Double_t z) const;
      Int_t          Find(Double_t y) const; 
      void           SetZmax(Int_t cham, Double_t center, Double_t w)
                       { fZc[cham] = center;  fZmax[cham] = w; }
-     void           SetYmax(Double_t w) { fYmax = w; }
+     void           SetZ(Double_t* center, Double_t *w, Double_t *wsensitive);
+     void           SetHoles(Bool_t* holes);
+     void           SetYmax(Double_t w, Double_t wsensitive) { fYmax = w; fYmaxSensitive = wsensitive; }
      Double_t       GetYmax() const { return fYmax; }
      Double_t       GetZmax(Int_t c) const { return fZmax[c]; }
      Double_t       GetZc(Int_t c) const { return fZc[c]; }
@@ -122,10 +122,11 @@ class AliTRDtracker : public AliTracker {
      Bool_t         IsSensitive() const {return (fTimeBinIndex>=0)? kTRUE: kFALSE;}
                        
      void    Clear() {for(Int_t i=0; i<fN; i++) fClusters[i] = NULL; fN = 0;}
-                   
+     Bool_t  IsHole(Int_t zone) const  { return fIsHole[zone];}              
    private:     
 
      Int_t         fN;          // this is fN
+     Int_t         fSec;        // sector mumber
      AliTRDcluster **fClusters; // array of pointers to clusters
      UInt_t        *fIndex;     // array of cluster indexes
      Double_t       fX;         // x coordinate of the middle plane
@@ -135,7 +136,10 @@ class AliTRDtracker : public AliTracker {
      Int_t          fTimeBinIndex;  // plane * F(local_tb)  
      Double_t       fZc[kZones];  // Z position of the center for 5 active areas
      Double_t       fZmax[kZones]; // half of active area length in Z
+     Double_t       fZmaxSensitive[kZones]; //sensitive area for detection Z     
+     Bool_t         fIsHole[kZones]; //is hole in given sector       
      Double_t       fYmax;        // half of active area length in Y
+     Double_t       fYmaxSensitive;        // half of active area length in Y
 
      Bool_t         fHole;        // kTRUE if there is a hole in the layer
      Double_t       fHoleZc;      // Z of the center of the hole 
@@ -181,7 +185,6 @@ class AliTRDtracker : public AliTracker {
   AliTRDparameter    *fPar;             // Pointer to TRD parameter
 
   AliTRDtrackingSector *fTrSec[kTrackingSectors];  // array of tracking sectors;    
-  
   Int_t            fNclusters;        // Number of clusters in TRD 
   TObjArray        *fClusters;        // List of clusters for all sectors
 
@@ -233,7 +236,7 @@ class AliTRDtracker : public AliTracker {
   Bool_t                fAddTRDseeds;      // Something else
 
   Bool_t                fNoTilt;           // No tilt, or what?
+  Bool_t                fHoles[5][18];     // holes
   
   Bool_t AdjustSector(AliTRDtrack *track); 
  
@@ -253,21 +256,16 @@ class AliTRDtracker : public AliTracker {
 
  private:
 
-  void          LoadEvent();
-  void          UnloadEvent();
-
   virtual void  MakeSeeds(Int_t inner, Int_t outer, Int_t turn);
 
   Int_t         FollowProlongation(AliTRDtrack& t, Int_t rf);
   Int_t         FollowBackProlongation(AliTRDtrack& t);
-  //Int_t         FolowRefitInward(AliTRDtrack *seed, AliTPCtrack *track);
+  Int_t         Refit(AliTRDtrack& t, Int_t rf);
+  void          CookdEdxTimBin(AliTRDtrack& t);  
 
   Int_t         PropagateToTPC(AliTRDtrack& t);
   Int_t         PropagateToOuterPlane(AliTRDtrack& t, Double_t x);
 
-  Int_t         WriteTracks(); 
-  void          ReadClusters(TObjArray *array, const TFile *in=0);
-
   void          SetSY2corr(Float_t w)    {fSY2corr = w;}
   void          SetSZ2corr(Float_t w)    {fSZ2corr = w;}
   Double_t      ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt) const;