]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUTrackerCooked.h
A first rough implementation of the main tracking functions
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUTrackerCooked.h
1 #ifndef ALIITSUTRACKERCooked_H
2 #define ALIITSUTRACKERCooked_H
3
4 //-------------------------------------------------------------------------
5 //                   The stand-alone ITSU tracker
6 //    The pattern recongintion based on the "cooked covariance" approach
7 //-------------------------------------------------------------------------
8
9 #include "AliTracker.h"
10
11 class TTree;
12 class TClonesArray;
13 class TObjArray;
14
15 class AliESDEvent;
16 class AliCluster;
17 class AliITSUClusterPix;
18 class AliITSUTrackCooked;
19
20 //-------------------------------------------------------------------------
21 class AliITSUTrackerCooked : public AliTracker {
22 public:
23   enum {
24      kNLayers=7,kMaxClusterPerLayer=9999,kMaxSelected=kMaxClusterPerLayer/9};
25   AliITSUTrackerCooked();
26   virtual ~AliITSUTrackerCooked();
27
28   // These functions must be implemented 
29   Int_t Clusters2Tracks(AliESDEvent *event);
30   Int_t PropagateBack(AliESDEvent *event);
31   Int_t RefitInward(AliESDEvent *event);
32   Int_t LoadClusters(TTree *ct);
33   void UnloadClusters();
34   AliCluster *GetCluster(Int_t index) const;
35
36   // internal helper classes
37   class AliITSUlayer;
38
39 protected:
40   AliITSUTrackerCooked(const AliITSUTrackerCooked&);
41   // Other protected functions
42   Int_t MakeSeeds();
43   Bool_t AddCookedSeed(const Float_t r1[3], Int_t l1, Int_t i1,
44                        const Float_t r2[3], Int_t l2, Int_t i2,
45                        const AliCluster *c3,Int_t l3, Int_t i3);
46   void  FollowProlongation();
47   Int_t TakeNextProlongation();
48   void ResetTrackToFollow(const AliITSUTrackCooked &t);
49   void ResetBestTrack();
50
51 private:
52   AliITSUTrackerCooked &operator=(const AliITSUTrackerCooked &tr);
53
54   // Data members
55   // Internal tracker arrays, layers, modules, etc
56   static AliITSUlayer fgLayers[kNLayers];// Layers
57     
58   TObjArray *fSeeds; // Track seeds
59
60   Int_t fI;                              // index of the current layer
61   AliITSUTrackCooked *fBestTrack;        // "best" track 
62   AliITSUTrackCooked *fTrackToFollow;    // followed track
63   
64   ClassDef(AliITSUTrackerCooked,1)   //ITSU stand-alone tracker
65 };
66
67
68
69 // The helper classes
70 class AliITSUTrackerCooked::AliITSUlayer {
71   public:
72     AliITSUlayer();
73     ~AliITSUlayer();
74
75     void InsertClusters(TClonesArray *clusters, Bool_t seedingLayer);
76     void SetR(Double_t r) {fR=r;}
77     void DeleteClusters();
78     Int_t 
79     SelectClusters(Float_t zMin,Float_t zMax,Float_t phiMin, Float_t phiMax);
80     const AliCluster *GetNextCluster(Int_t &i); 
81     void ResetTrack(const AliITSUTrackCooked &t);
82     Int_t FindClusterIndex(Double_t z) const;
83     Double_t GetR() const {return fR;}
84     AliCluster *GetCluster(Int_t i) const { return fClusters[i]; } 
85     Int_t GetNumberOfClusters() const {return fN;}
86     const AliITSUTrackCooked *GetTrack() const {return fTrack;}
87
88   protected:
89     AliITSUlayer(const AliITSUlayer&);
90     AliITSUlayer &operator=(const AliITSUlayer &tr);  
91     Int_t InsertCluster(AliCluster *c);
92
93     Double_t fR;                // mean radius of this layer
94
95     AliCluster *fClusters[kMaxClusterPerLayer]; //All clusters
96     Int_t fN; //number of clusters 
97
98     Int_t fIndex[kMaxSelected]; // Indices of selected clusters 
99     Int_t fNsel;                // number of preselected clusters
100     AliITSUTrackCooked *fTrack; // track estimation at this layer
101   };
102
103
104 #endif