]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITStrackerV2.h
merging RecPoints and ClustersV2. All ClusterFinders produce AliITSRecPoints objects...
[u/mrichter/AliRoot.git] / ITS / AliITStrackerV2.h
index 8cca95bdd0988939ead0b6443c7c6faf576ef75e..a8b343f3d5c80e64f4c8d652c8ec45180f3505c5 100644 (file)
@@ -5,17 +5,14 @@
 
 //-------------------------------------------------------------------------
 //                          ITS tracker
-//     reads AliITSclusterV2 clusters and creates AliITStrackV2 tracks
+//     reads AliITSRecPoint clusters and creates AliITStrackV2 tracks
 //           Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
 //-------------------------------------------------------------------------
-
-#include <TObjArray.h>
-
 #include "AliTracker.h"
 #include "AliITSrecoV2.h"
 #include "AliITStrackV2.h"
 
-class AliITSclusterV2;
+class AliITSRecPoint;
 class AliESD;
 class AliITSgeom;
 class TTree;
@@ -26,14 +23,16 @@ class AliITStrackerV2 : public AliTracker {
 public:
   AliITStrackerV2():AliTracker(){}
   AliITStrackerV2(const AliITSgeom *geom);
+  ~AliITStrackerV2(){}
   AliCluster *GetCluster(Int_t index) const;
-  AliITSclusterV2 *GetClusterLayer(Int_t layn, Int_t ncl) const
-                        {return fgLayers[layn].GetCluster(ncl);}
-  Int_t GetNumberOfClustersLayer(Int_t layn) const 
-                        {return fgLayers[layn].GetNumberOfClusters();}
+  AliITSRecPoint *GetCluster(Int_t l, Int_t c) const {
+    return fgLayers[l].GetCluster(c);
+  }
+  Int_t GetNumberOfClustersLayer(Int_t n) const {
+     return fgLayers[n].GetNumberOfClusters();
+  }   
   Int_t LoadClusters(TTree *cf);
   void UnloadClusters();
-  Int_t Clusters2Tracks(TTree *in, TTree *out);
   Int_t Clusters2Tracks(AliESD *event);
   Int_t PropagateBack(AliESD *event);
   Int_t RefitInward(AliESD *event);
@@ -59,24 +58,24 @@ public:
 
   class AliITSlayer {
   public:
+    enum {kNsector=5, kMaxClusterPerSector=kMaxClusterPerLayer/kNsector};
     AliITSlayer();
     AliITSlayer(Double_t r, Double_t p, Double_t z, Int_t nl, Int_t nd);
    ~AliITSlayer();
-    Int_t InsertCluster(AliITSclusterV2 *c);
+    Int_t InsertCluster(AliITSRecPoint *c);
     void ResetClusters();
-    void SelectClusters(Double_t zmi,Double_t zma,Double_t ymi,Double_t yma);
-    const AliITSclusterV2 *GetNextCluster(Int_t &ci);
+    Int_t SelectClusters(Float_t zmi, Float_t zma, Float_t ymi, Float_t yma);
+    const AliITSRecPoint *GetNextCluster(Int_t &ci);
     void ResetRoad();
     Double_t GetRoad() const {return fRoad;}
     Double_t GetR() const {return fR;}
-    AliITSclusterV2 *GetCluster(Int_t i) const {return i<fN? fClusters[i]:0;
+    AliITSRecPoint *GetCluster(Int_t i) const { return fClusters[i]; 
     AliITSdetector &GetDetector(Int_t n) const { return fDetectors[n]; }
     Int_t FindDetectorIndex(Double_t phi, Double_t z) const;
     Double_t GetThickness(Double_t y, Double_t z, Double_t &x0) const;
-    Int_t InRoad() const ;
-    Int_t GetNumberOfClusters() const {return fN;}
     Int_t GetNladders() const {return fNladders;}
     Int_t GetNdetectors() const {return fNdetectors;}
+    Int_t GetNumberOfClusters() const;
   protected:
     Double_t fR;                // mean radius of this layer
     Double_t fPhiOffset;        // offset of the first detector in Phi
@@ -84,16 +83,17 @@ public:
     Double_t fZOffset;          // offset of the first detector in Z
     Int_t fNdetectors;          // detectors/ladder
     AliITSdetector *fDetectors; // array of detectors
-    Int_t fN;                   // number of clusters
-    AliITSclusterV2 *fClusters[kMaxClusterPerLayer]; // pointers to clusters
-    Double_t fZmax;      //    edges
-    Double_t fYmin;      //   of  the
-    Double_t fYmax;      //   "window"
-    Int_t fI;            // index of the current cluster within the "window"
-    Double_t fRoad;      // road defined by the cluster density
-    Int_t FindClusterIndex(Double_t z) const;
+
+    AliITSRecPoint *fClusters[kMaxClusterPerLayer]; // pointers to clusters
+    Int_t fN[kNsector];         // numbers of clusters sector by sector 
+
+    Int_t fIndex[kMaxClusterPerLayer]; // indexes of selected clusters 
+    Int_t fNsel;                       // number of selected clusters
+
+    Double_t fRoad;     // road defined by the cluster density
+    Int_t FindClusterIndex(Float_t z, Int_t s) const;
   };
-  
+
 protected:
   void CookLabel(AliKalmanTrack *t,Float_t wrong) const;
   Double_t GetEffectiveThickness(Double_t y, Double_t z) const;
@@ -107,16 +107,11 @@ protected:
      fTrackToFollow.~AliITStrackV2();
      new(&fTrackToFollow) AliITStrackV2(t);
   }
-  void AddTrackHypothesys(AliITStrackV2 * track, Int_t esdindex);
-  void CompressTrackHypothesys(Int_t esdindex, Int_t maxsize);
-  AliITStrackV2 * GetBestHypothesys(Int_t esdindex, AliITStrackV2 * original); 
   Int_t fI;                              // index of the current layer
   static AliITSlayer fgLayers[kMaxLayer];// ITS layers
   AliITStrackV2 fTracks[kMaxLayer];      // track estimations at the ITS layers
   AliITStrackV2 fBestTrack;              // "best" track 
   AliITStrackV2 fTrackToFollow;          // followed track
-  TObjArray     fTrackHypothesys;        // ! array with track hypothesys- ARRAY is the owner of tracks- MI
-  Int_t         fCurrentEsdTrack;        // ! current esd track           - MI
   Int_t fPass;                           // current pass through the data 
   Int_t fConstraint[2];                  // constraint flags