]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/UPGRADE/AliITSUTrackerCooked.h
First implementation of PropagateBack and RefitInward
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUTrackerCooked.h
CommitLineData
4fb1e9d1 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
11class TTree;
12class TClonesArray;
13class TObjArray;
14
15class AliESDEvent;
16class AliCluster;
17class AliITSUClusterPix;
66be9a4e 18class AliITSUTrackCooked;
4fb1e9d1 19
20//-------------------------------------------------------------------------
21class AliITSUTrackerCooked : public AliTracker {
22public:
66be9a4e 23 enum {
24 kNLayers=7,kMaxClusterPerLayer=9999,kMaxSelected=kMaxClusterPerLayer/9};
4fb1e9d1 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();
ae63ad3b 34 Bool_t
35 RefitAt(Double_t x, AliITSUTrackCooked *seed, const AliITSUTrackCooked *t);
36
4fb1e9d1 37 AliCluster *GetCluster(Int_t index) const;
38
39 // internal helper classes
40 class AliITSUlayer;
41
42protected:
43 AliITSUTrackerCooked(const AliITSUTrackerCooked&);
44 // Other protected functions
ae14edfe 45 Int_t MakeSeeds();
4fb1e9d1 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);
66be9a4e 49 void FollowProlongation();
50 Int_t TakeNextProlongation();
51 void ResetTrackToFollow(const AliITSUTrackCooked &t);
52 void ResetBestTrack();
4fb1e9d1 53
54private:
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
66be9a4e 62
63 Int_t fI; // index of the current layer
64 AliITSUTrackCooked *fBestTrack; // "best" track
65 AliITSUTrackCooked *fTrackToFollow; // followed track
4fb1e9d1 66
67 ClassDef(AliITSUTrackerCooked,1) //ITSU stand-alone tracker
68};
69
70
71
72// The helper classes
73class AliITSUTrackerCooked::AliITSUlayer {
74 public:
75 AliITSUlayer();
66be9a4e 76 ~AliITSUlayer();
4fb1e9d1 77
66be9a4e 78 void InsertClusters(TClonesArray *clusters, Bool_t seedingLayer);
4fb1e9d1 79 void SetR(Double_t r) {fR=r;}
80 void DeleteClusters();
66be9a4e 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);
4fb1e9d1 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;}
66be9a4e 89 const AliITSUTrackCooked *GetTrack() const {return fTrack;}
4fb1e9d1 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
66be9a4e 98 AliCluster *fClusters[kMaxClusterPerLayer]; //All clusters
4fb1e9d1 99 Int_t fN; //number of clusters
100
66be9a4e 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
4fb1e9d1 104 };
105
106
107#endif