don't sort clusters after local reco, do this in AliITSUTrackerGlo
[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
c64acbbe 9#include "AliITSUTrackerGlo.h"
4fb1e9d1 10
11class TTree;
12class TClonesArray;
13class TObjArray;
14
15class AliESDEvent;
16class AliCluster;
17class AliITSUClusterPix;
66be9a4e 18class AliITSUTrackCooked;
c64acbbe 19class AliITSUReconstructor;
4fb1e9d1 20
21//-------------------------------------------------------------------------
c64acbbe 22class AliITSUTrackerCooked : public AliITSUTrackerGlo {
4fb1e9d1 23public:
66be9a4e 24 enum {
4cce6dec 25 kNLayers=7, kMaxClusterPerLayer=15000, kMaxSelected=kMaxClusterPerLayer/10
26 };
c64acbbe 27 AliITSUTrackerCooked(AliITSUReconstructor *rec);
4fb1e9d1 28 virtual ~AliITSUTrackerCooked();
29
30 // These functions must be implemented
31 Int_t Clusters2Tracks(AliESDEvent *event);
32 Int_t PropagateBack(AliESDEvent *event);
33 Int_t RefitInward(AliESDEvent *event);
34 Int_t LoadClusters(TTree *ct);
35 void UnloadClusters();
ae63ad3b 36 Bool_t
37 RefitAt(Double_t x, AliITSUTrackCooked *seed, const AliITSUTrackCooked *t);
38
4fb1e9d1 39 AliCluster *GetCluster(Int_t index) const;
40
c64acbbe 41 void SetSAonly(Bool_t sa=kTRUE) {fSAonly=sa;}
42 Bool_t GetSAonly() const {return fSAonly;}
43
4fb1e9d1 44 // internal helper classes
45 class AliITSUlayer;
46
47protected:
48 AliITSUTrackerCooked(const AliITSUTrackerCooked&);
49 // Other protected functions
ae14edfe 50 Int_t MakeSeeds();
4fb1e9d1 51 Bool_t AddCookedSeed(const Float_t r1[3], Int_t l1, Int_t i1,
52 const Float_t r2[3], Int_t l2, Int_t i2,
53 const AliCluster *c3,Int_t l3, Int_t i3);
66be9a4e 54 void FollowProlongation();
55 Int_t TakeNextProlongation();
56 void ResetTrackToFollow(const AliITSUTrackCooked &t);
57 void ResetBestTrack();
4fb1e9d1 58
59private:
60 AliITSUTrackerCooked &operator=(const AliITSUTrackerCooked &tr);
61
62 // Data members
63 // Internal tracker arrays, layers, modules, etc
64 static AliITSUlayer fgLayers[kNLayers];// Layers
65
66 TObjArray *fSeeds; // Track seeds
66be9a4e 67
68 Int_t fI; // index of the current layer
69 AliITSUTrackCooked *fBestTrack; // "best" track
70 AliITSUTrackCooked *fTrackToFollow; // followed track
4fb1e9d1 71
c64acbbe 72 Bool_t fSAonly; // kTRUE if the standalone tracking only
73
74 ClassDef(AliITSUTrackerCooked,2) //ITSU stand-alone tracker
4fb1e9d1 75};
76
77
78
79// The helper classes
80class AliITSUTrackerCooked::AliITSUlayer {
81 public:
82 AliITSUlayer();
66be9a4e 83 ~AliITSUlayer();
4fb1e9d1 84
c64acbbe 85 void InsertClusters(TClonesArray *clusters, Bool_t seedingLayer, Bool_t sa);
4fb1e9d1 86 void SetR(Double_t r) {fR=r;}
87 void DeleteClusters();
4cce6dec 88 void ResetSelectedClusters() {fI=0;}
89 void SelectClusters(Float_t phi, Float_t dy, Float_t z, Float_t dz);
66be9a4e 90 const AliCluster *GetNextCluster(Int_t &i);
91 void ResetTrack(const AliITSUTrackCooked &t);
4fb1e9d1 92 Int_t FindClusterIndex(Double_t z) const;
4cce6dec 93 Float_t GetR() const {return fR;}
4fb1e9d1 94 AliCluster *GetCluster(Int_t i) const { return fClusters[i]; }
4cce6dec 95 Float_t GetXRef(Int_t i) const { return fXRef[i]; }
96 Float_t GetAlphaRef(Int_t i) const { return fAlphaRef[i]; }
97 Float_t GetClusterPhi(Int_t i) const { return fPhi[i]; }
4fb1e9d1 98 Int_t GetNumberOfClusters() const {return fN;}
66be9a4e 99 const AliITSUTrackCooked *GetTrack() const {return fTrack;}
4fb1e9d1 100
101 protected:
102 AliITSUlayer(const AliITSUlayer&);
103 AliITSUlayer &operator=(const AliITSUlayer &tr);
104 Int_t InsertCluster(AliCluster *c);
105
4cce6dec 106 Float_t fR; // mean radius of this layer
107
108 AliCluster *fClusters[kMaxClusterPerLayer]; // All clusters
109 Float_t fXRef[kMaxClusterPerLayer]; // x of the reference plane
110 Float_t fAlphaRef[kMaxClusterPerLayer]; // alpha of the reference plane
111 Float_t fPhi[kMaxClusterPerLayer]; // cluster phi
112 Int_t fN; // Total number of clusters
4fb1e9d1 113
4cce6dec 114 Int_t fIndex[kMaxSelected];
115 Int_t fNsel; // Number of selected clusters
116 Int_t fI; // Running index for the selected clusters
4fb1e9d1 117
66be9a4e 118 AliITSUTrackCooked *fTrack; // track estimation at this layer
4fb1e9d1 119 };
120
121
122#endif