]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUTrackerCooked.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[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   Bool_t 
35   RefitAt(Double_t x, AliITSUTrackCooked *seed, const AliITSUTrackCooked *t);
36
37   AliCluster *GetCluster(Int_t index) const;
38
39   // internal helper classes
40   class AliITSUlayer;
41
42 protected:
43   AliITSUTrackerCooked(const AliITSUTrackerCooked&);
44   // Other protected functions
45   Int_t MakeSeeds();
46   Bool_t AddCookedSeed(const Float_t r1[3], Int_t l1, Int_t i1,
47                        const Float_t r2[3], Int_t l2, Int_t i2,
48                        const AliCluster *c3,Int_t l3, Int_t i3);
49   void  FollowProlongation();
50   Int_t TakeNextProlongation();
51   void ResetTrackToFollow(const AliITSUTrackCooked &t);
52   void ResetBestTrack();
53
54 private:
55   AliITSUTrackerCooked &operator=(const AliITSUTrackerCooked &tr);
56
57   // Data members
58   // Internal tracker arrays, layers, modules, etc
59   static AliITSUlayer fgLayers[kNLayers];// Layers
60     
61   TObjArray *fSeeds; // Track seeds
62
63   Int_t fI;                              // index of the current layer
64   AliITSUTrackCooked *fBestTrack;        // "best" track 
65   AliITSUTrackCooked *fTrackToFollow;    // followed track
66   
67   ClassDef(AliITSUTrackerCooked,1)   //ITSU stand-alone tracker
68 };
69
70
71
72 // The helper classes
73 class AliITSUTrackerCooked::AliITSUlayer {
74   public:
75     AliITSUlayer();
76     ~AliITSUlayer();
77
78     void InsertClusters(TClonesArray *clusters, Bool_t seedingLayer);
79     void SetR(Double_t r) {fR=r;}
80     void DeleteClusters();
81     Int_t 
82     SelectClusters(Float_t zMin,Float_t zMax,Float_t phiMin, Float_t phiMax);
83     const AliCluster *GetNextCluster(Int_t &i); 
84     void ResetTrack(const AliITSUTrackCooked &t);
85     Int_t FindClusterIndex(Double_t z) const;
86     Double_t GetR() const {return fR;}
87     AliCluster *GetCluster(Int_t i) const { return fClusters[i]; } 
88     Int_t GetNumberOfClusters() const {return fN;}
89     const AliITSUTrackCooked *GetTrack() const {return fTrack;}
90
91   protected:
92     AliITSUlayer(const AliITSUlayer&);
93     AliITSUlayer &operator=(const AliITSUlayer &tr);  
94     Int_t InsertCluster(AliCluster *c);
95
96     Double_t fR;                // mean radius of this layer
97
98     AliCluster *fClusters[kMaxClusterPerLayer]; //All clusters
99     Int_t fN; //number of clusters 
100
101     Int_t fIndex[kMaxSelected]; // Indices of selected clusters 
102     Int_t fNsel;                // number of preselected clusters
103     AliITSUTrackCooked *fTrack; // track estimation at this layer
104   };
105
106
107 #endif