]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/UPGRADE/AliITSUTrackerCooked.h
Fix for the case of non-existent calibration files
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUTrackerCooked.h
index 1a64687b49523d9c05ea425b27fbeb89035a0698..22e0860e2776a24606c3122e472fe31629851702 100644 (file)
@@ -15,11 +15,13 @@ class TObjArray;
 class AliESDEvent;
 class AliCluster;
 class AliITSUClusterPix;
+class AliITSUTrackCooked;
 
 //-------------------------------------------------------------------------
 class AliITSUTrackerCooked : public AliTracker {
 public:
-  enum{kNLayers=7, kMaxClusterPerLayer=70000};
+  enum {
+     kNLayers=7,kMaxClusterPerLayer=9999,kMaxSelected=kMaxClusterPerLayer/9};
   AliITSUTrackerCooked();
   virtual ~AliITSUTrackerCooked();
 
@@ -29,6 +31,9 @@ public:
   Int_t RefitInward(AliESDEvent *event);
   Int_t LoadClusters(TTree *ct);
   void UnloadClusters();
+  Bool_t 
+  RefitAt(Double_t x, AliITSUTrackCooked *seed, const AliITSUTrackCooked *t);
+
   AliCluster *GetCluster(Int_t index) const;
 
   // internal helper classes
@@ -37,10 +42,14 @@ public:
 protected:
   AliITSUTrackerCooked(const AliITSUTrackerCooked&);
   // Other protected functions
-  Int_t MakeSeeds(Int_t layer1, Int_t layer2);
+  Int_t MakeSeeds();
   Bool_t AddCookedSeed(const Float_t r1[3], Int_t l1, Int_t i1,
                        const Float_t r2[3], Int_t l2, Int_t i2,
                        const AliCluster *c3,Int_t l3, Int_t i3);
+  void  FollowProlongation();
+  Int_t TakeNextProlongation();
+  void ResetTrackToFollow(const AliITSUTrackCooked &t);
+  void ResetBestTrack();
 
 private:
   AliITSUTrackerCooked &operator=(const AliITSUTrackerCooked &tr);
@@ -50,6 +59,10 @@ private:
   static AliITSUlayer fgLayers[kNLayers];// Layers
     
   TObjArray *fSeeds; // Track seeds
+
+  Int_t fI;                              // index of the current layer
+  AliITSUTrackCooked *fBestTrack;        // "best" track 
+  AliITSUTrackCooked *fTrackToFollow;    // followed track
   
   ClassDef(AliITSUTrackerCooked,1)   //ITSU stand-alone tracker
 };
@@ -60,16 +73,20 @@ private:
 class AliITSUTrackerCooked::AliITSUlayer {
   public:
     AliITSUlayer();
-   ~AliITSUlayer(){DeleteClusters();}
+    ~AliITSUlayer();
 
-    void InsertClusters(TClonesArray *clusters);
+    void InsertClusters(TClonesArray *clusters, Bool_t seedingLayer);
     void SetR(Double_t r) {fR=r;}
     void DeleteClusters();
-
+    Int_t 
+    SelectClusters(Float_t zMin,Float_t zMax,Float_t phiMin, Float_t phiMax);
+    const AliCluster *GetNextCluster(Int_t &i); 
+    void ResetTrack(const AliITSUTrackCooked &t);
     Int_t FindClusterIndex(Double_t z) const;
     Double_t GetR() const {return fR;}
     AliCluster *GetCluster(Int_t i) const { return fClusters[i]; } 
     Int_t GetNumberOfClusters() const {return fN;}
+    const AliITSUTrackCooked *GetTrack() const {return fTrack;}
 
   protected:
     AliITSUlayer(const AliITSUlayer&);
@@ -78,11 +95,12 @@ class AliITSUTrackerCooked::AliITSUlayer {
 
     Double_t fR;                // mean radius of this layer
 
-    AliCluster *fClusters[kMaxClusterPerLayer]; // array of clusters
+    AliCluster *fClusters[kMaxClusterPerLayer]; //All clusters
     Int_t fN; //number of clusters 
 
-    Int_t fIndex[kMaxClusterPerLayer]; // Indexes of selected clusters 
-    Int_t fNsel;                       // number of selected clusters
+    Int_t fIndex[kMaxSelected]; // Indices of selected clusters 
+    Int_t fNsel;                // number of preselected clusters
+    AliITSUTrackCooked *fTrack; // track estimation at this layer
   };