First commit of ITS tracking version 2 (Yu.Belikov)
[u/mrichter/AliRoot.git] / ITS / AliITStrackerV2.h
CommitLineData
006b5f7f 1#ifndef ALIITSTRACKER_H
2#define ALIITSTRACKER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6//-------------------------------------------------------------------------
7// ITS tracker
8//
9// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
10//-------------------------------------------------------------------------
11#include "AliTracker.h"
12#include "AliITSrecoV2.h"
13#include "AliITStrackV2.h"
14
15class AliITSclusterV2;
16class AliITSgeom;
17class TFile;
18
19
20//-------------------------------------------------------------------------
21class AliITStrackerV2 : public AliTracker {
22public:
23 AliITStrackerV2():AliTracker(){}
24 AliITStrackerV2(const AliITSgeom *geom) throw (const Char_t *);
25
26 AliCluster *GetCluster(Int_t index) const;
27 Int_t Clusters2Tracks(const TFile *in, TFile *out);
28 Int_t PropagateBack(const TFile *in, TFile *out) {return 0;}
29
30private:
31
32 Double_t GetEffectiveThickness(Double_t phi, Double_t z) const;
33
34 void FollowProlongation();
35 Int_t TakeNextProlongation();
36
37 void ResetBestTrack() {
38 fBestTrack.~AliITStrackV2();
39 new(&fBestTrack) AliITStrackV2(fTrackToFollow);
40 }
41
42 void ResetTrackToFollow(const AliITStrackV2 &t) {
43 fTrackToFollow.~AliITStrackV2();
44 new(&fTrackToFollow) AliITStrackV2(t);
45 }
46
47class AliITSdetector {
48private:
49 Double_t fR; // polar coordinates
50 Double_t fPhi; // of this detector
51
52public:
53 AliITSdetector(){}
54 AliITSdetector(Double_t r,Double_t phi) {fR=r; fPhi=phi;}
55
56 void *operator new(size_t s,AliITSdetector *p) {return p;}
57
58 Double_t GetR() const {return fR;}
59 Double_t GetPhi() const {return fPhi;}
60};
61
62class AliITSlayer {
63 Double_t fR; // mean radius of this layer
64 Double_t fPhiOffset; // offset of the first detector in Phi
65 Int_t fNladders; // number of ladders
66 Double_t fZOffset; // offset of the first detector in Z
67 Int_t fNdetectors; // detectors/ladder
68 AliITSdetector *fDetectors; // array of detectors
69
70 Int_t fN; // number of clusters
71 AliITSclusterV2 *fClusters[kMaxClusterPerLayer]; // pointers to clusters
72
73 Double_t fZmax; // edges
74 Double_t fYmin; // of the
75 Double_t fYmax; // "window"
76 Int_t fI; // index of the current cluster within the "window"
77
78 Int_t FindClusterIndex(Double_t z) const;
79
80public:
81 AliITSlayer();
82 AliITSlayer(Double_t r, Double_t p, Double_t z, Int_t nl, Int_t nd);
83 ~AliITSlayer();
84 Int_t InsertCluster(AliITSclusterV2 *c);
85 void SelectClusters(Double_t zmin,Double_t zmax,Double_t ymin,Double_t ymax);
86 const AliITSclusterV2 *GetNextCluster(Int_t &ci);
87
88 void *operator new(size_t s, AliITSlayer *p) {return p;}
89
90 Double_t GetR() const {return fR;}
91 AliITSclusterV2 *GetCluster(Int_t i) const {return fClusters[i];}
92 AliITSdetector &GetDetector(Int_t n) const { return fDetectors[n]; }
93 Int_t FindDetectorIndex(Double_t phi, Double_t z) const;
94 Double_t GetThickness(Double_t phi, Double_t z) const;
95
96 Int_t InRoad() const ;
97};
98
99 Int_t fI; // index of the current layer
100 static AliITSlayer fLayers[kMaxLayer]; // ITS layers
101 AliITStrackV2 fTracks[kMaxLayer]; // track estimations at the ITS layers
102 AliITStrackV2 fBestTrack; // "best" track
103 AliITStrackV2 fTrackToFollow; // followed track
104
105 Double_t fYV; // Y-coordinate of the primary vertex
106 Double_t fZV; // Z-coordinate of the primary vertex
107};
108
109
110
111#endif