]> 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
19 //-------------------------------------------------------------------------
20 class AliITSUTrackerCooked : public AliTracker {
21 public:
22   enum{kNLayers=7, kMaxClusterPerLayer=70000};
23   AliITSUTrackerCooked();
24   virtual ~AliITSUTrackerCooked();
25
26   // These functions must be implemented 
27   Int_t Clusters2Tracks(AliESDEvent *event);
28   Int_t PropagateBack(AliESDEvent *event);
29   Int_t RefitInward(AliESDEvent *event);
30   Int_t LoadClusters(TTree *ct);
31   void UnloadClusters();
32   AliCluster *GetCluster(Int_t index) const;
33
34   // internal helper classes
35   class AliITSUlayer;
36
37 protected:
38   AliITSUTrackerCooked(const AliITSUTrackerCooked&);
39   // Other protected functions
40   Int_t MakeSeeds(Int_t layer1, Int_t layer2);
41   Bool_t AddCookedSeed(const Float_t r1[3], Int_t l1, Int_t i1,
42                        const Float_t r2[3], Int_t l2, Int_t i2,
43                        const AliCluster *c3,Int_t l3, Int_t i3);
44
45 private:
46   AliITSUTrackerCooked &operator=(const AliITSUTrackerCooked &tr);
47
48   // Data members
49   // Internal tracker arrays, layers, modules, etc
50   static AliITSUlayer fgLayers[kNLayers];// Layers
51     
52   TObjArray *fSeeds; // Track seeds
53   
54   ClassDef(AliITSUTrackerCooked,1)   //ITSU stand-alone tracker
55 };
56
57
58
59 // The helper classes
60 class AliITSUTrackerCooked::AliITSUlayer {
61   public:
62     AliITSUlayer();
63    ~AliITSUlayer(){DeleteClusters();}
64
65     void InsertClusters(TClonesArray *clusters);
66     void SetR(Double_t r) {fR=r;}
67     void DeleteClusters();
68
69     Int_t FindClusterIndex(Double_t z) const;
70     Double_t GetR() const {return fR;}
71     AliCluster *GetCluster(Int_t i) const { return fClusters[i]; } 
72     Int_t GetNumberOfClusters() const {return fN;}
73
74   protected:
75     AliITSUlayer(const AliITSUlayer&);
76     AliITSUlayer &operator=(const AliITSUlayer &tr);  
77     Int_t InsertCluster(AliCluster *c);
78
79     Double_t fR;                // mean radius of this layer
80
81     AliCluster *fClusters[kMaxClusterPerLayer]; // array of clusters
82     Int_t fN; //number of clusters 
83
84     Int_t fIndex[kMaxClusterPerLayer]; // Indexes of selected clusters 
85     Int_t fNsel;                       // number of selected clusters
86   };
87
88
89 #endif