]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCtracker.h
Message commented out
[u/mrichter/AliRoot.git] / TPC / AliTPCtracker.h
index 3ed995aa9643ea74de3fcb15fd9635b3d63045e5..b2891e0628744812d228683f641f05450a095904 100644 (file)
 //-------------------------------------------------------
 #include "AliTracker.h"
 #include "AliTPCtrack.h"
-#include "AliTPCClustersArray.h"
-
 #include "AliTPCreco.h"
+#include "AliTPCcluster.h"
+#include "AliBarrelTrack.h"
 
 class TFile;
+class TTree;
+class TBranch;
 class AliTPCParam;
+class TObjArray;
+class TClonesArray;
+class AliESD;
 
 class AliTPCtracker : public AliTracker {
 public:
    AliTPCtracker():AliTracker(),fkNIS(0),fkNOS(0) {
       fInnerSec=fOuterSec=0; fSeeds=0; 
+      fParam = 0;
    }
-   AliTPCtracker(const AliTPCParam *par, Int_t eventn=0);
+   AliTPCtracker(const AliTPCParam *par);
   ~AliTPCtracker();
 
    Int_t ReadSeeds(const TFile *in);
 
-   void LoadInnerSectors();
-   void UnloadInnerSectors();
-   void LoadOuterSectors();
-   void UnloadOuterSectors();
+   Int_t LoadClusters(TTree *c);
+   void UnloadClusters();
 
    AliCluster *GetCluster(Int_t index) const;
-   Int_t Clusters2Tracks(const TFile *in, TFile *out);
-   Int_t PropagateBack(const TFile *in, TFile *out);
+   Int_t Clusters2Tracks(AliESD *event);
+   Int_t PropagateBack(AliESD *event);
+   Int_t RefitInward(AliESD *event);
 
    virtual void  CookLabel(AliKalmanTrack *t,Float_t wrong) const; 
 
@@ -44,10 +49,20 @@ public:
 //**************** Internal tracker class ********************** 
    class AliTPCRow {
    public:
-     AliTPCRow() {fN=0;}
-     void InsertCluster(const AliTPCcluster *c, UInt_t index);
+     AliTPCRow() {
+       fN=0; 
+       fSize=kMaxClusterPerRow/8;
+       fClusterArray=new AliTPCcluster[fSize];
+     }
+     ~AliTPCRow() {delete[] fClusterArray;}
+     void InsertCluster(const AliTPCcluster *c, Int_t sec, Int_t row);
+     void ResetClusters() {fN=0; delete[] fClusterArray; fClusterArray=0;}
      operator int() const {return fN;}
-     const AliTPCcluster* operator[](Int_t i) const {return fClusters[i];}
+     const AliTPCcluster *operator[](Int_t i) const {return fClusters[i];}
+     const AliTPCcluster *GetUnsortedCluster(Int_t i) const {
+       if ((i < 0) || (i >= fN)) return NULL;
+       return fClusterArray+i;
+     }
      UInt_t GetIndex(Int_t i) const {return fIndex[i];}
      Int_t Find(Double_t y) const; 
      void SetX(Double_t x) {fX=x;}
@@ -56,6 +71,8 @@ public:
    private:
      Int_t fN;                                          //number of clusters 
      const AliTPCcluster *fClusters[kMaxClusterPerRow]; //pointers to clusters
+     Int_t fSize;                                 //size of array of clusters
+     AliTPCcluster *fClusterArray;                      //array of clusters
      UInt_t fIndex[kMaxClusterPerRow];                  //indeces of clusters
      Double_t fX;                                 //X-coordinate of this row
 
@@ -135,24 +152,38 @@ public:
    };
 
 private:
+
    void MakeSeeds(Int_t i1, Int_t i2);
    Int_t FollowProlongation(AliTPCseed& t, Int_t rf=0);
    Int_t FollowBackProlongation(AliTPCseed &s, const AliTPCtrack &t);
+   Int_t FollowRefitInward(AliTPCseed *seed, AliTPCtrack *track);
 
    AliTPCtracker(const AliTPCtracker& r);           //dummy copy constructor
    AliTPCtracker &operator=(const AliTPCtracker& r);//dummy assignment operator
 
    const Int_t fkNIS;        //number of inner sectors
-   AliTPCSector *fInnerSec;  //array of inner sectors;
+   AliTPCSector *fInnerSec;  //array of inner sectors
    const Int_t fkNOS;        //number of outer sectors
-   AliTPCSector *fOuterSec;  //array of outer sectors;
-
-   Int_t fN;               //number of loaded sectors
-   AliTPCSector *fSectors; //pointer to loaded sectors;
-
-   Int_t fEventN;                      //event number
-   AliTPCClustersArray fClustersArray; //array of TPC clusters
-   TObjArray *fSeeds;                  //array of track seeds
+   AliTPCSector *fOuterSec;  //array of outer sectors
+
+   Int_t fN;               //number of "active" sectors
+   AliTPCSector *fSectors; //pointer to "active" sectors;
+   
+   AliTPCParam *fParam;      //! TPC parameters for outer reference plane [SR, GSI, 18.02.2003]
+   TObjArray *fSeeds;        //array of track seeds
+
+   // [SR, 01.04.2003]
+   void SetBarrelTree(const char *mode);
+   void StoreBarrelTrack(AliTPCtrack *ps, Int_t refPlane, Int_t isIn);
+
+   // [SR, 01.04.2003]
+   TFile *fBarrelFile;             // file with "barrel" tracks
+   TTree *fBarrelTree;             // tree with "barrel" tracks
+   TBranch *fBarrelBranch;
+   TClonesArray *fBarrelArray;
+   AliBarrelTrack *fBarrelTrack;
+
+  ClassDef(AliTPCtracker,1)   // Time Projection Chamber tracker
 };
 
 #endif