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 */
6 //-------------------------------------------------------------------------
9 // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
10 //-------------------------------------------------------------------------
11 #include "AliTracker.h"
12 #include "AliITSrecoV2.h"
13 #include "AliITStrackV2.h"
15 class AliITSclusterV2;
20 //-------------------------------------------------------------------------
21 class AliITStrackerV2 : public AliTracker {
23 AliITStrackerV2():AliTracker(){}
24 AliITStrackerV2(const AliITSgeom *geom, Int_t event=0) throw (const Char_t *);
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);
31 Int_t fEventN; //event number
32 Double_t GetEffectiveThickness(Double_t phi, Double_t z) const;
34 void FollowProlongation();
35 Int_t TakeNextProlongation();
37 void ResetBestTrack() {
38 fBestTrack.~AliITStrackV2();
39 new(&fBestTrack) AliITStrackV2(fTrackToFollow);
42 void ResetTrackToFollow(const AliITStrackV2 &t) {
43 fTrackToFollow.~AliITStrackV2();
44 new(&fTrackToFollow) AliITStrackV2(t);
47 //The two subclasses are public in order to access one from the another
49 class AliITSdetector {
51 Double_t fR; // polar coordinates
52 Double_t fPhi; // of this detector
56 AliITSdetector(Double_t r,Double_t phi) {fR=r; fPhi=phi;}
58 void *operator new(size_t s,AliITSdetector *p) {return p;}
60 Double_t GetR() const {return fR;}
61 Double_t GetPhi() const {return fPhi;}
65 Double_t fR; // mean radius of this layer
66 Double_t fPhiOffset; // offset of the first detector in Phi
67 Int_t fNladders; // number of ladders
68 Double_t fZOffset; // offset of the first detector in Z
69 Int_t fNdetectors; // detectors/ladder
70 AliITSdetector *fDetectors; // array of detectors
72 Int_t fN; // number of clusters
73 AliITSclusterV2 *fClusters[kMaxClusterPerLayer]; // pointers to clusters
75 Double_t fZmax; // edges
76 Double_t fYmin; // of the
77 Double_t fYmax; // "window"
78 Int_t fI; // index of the current cluster within the "window"
80 Int_t FindClusterIndex(Double_t z) const;
84 AliITSlayer(Double_t r, Double_t p, Double_t z, Int_t nl, Int_t nd);
86 Int_t InsertCluster(AliITSclusterV2 *c);
87 void SelectClusters(Double_t zmin,Double_t zmax,Double_t ymin,Double_t ymax);
88 const AliITSclusterV2 *GetNextCluster(Int_t &ci);
90 void *operator new(size_t s, AliITSlayer *p) {return p;}
92 Double_t GetR() const {return fR;}
93 AliITSclusterV2 *GetCluster(Int_t i) const {return fClusters[i];}
94 AliITSdetector &GetDetector(Int_t n) const { return fDetectors[n]; }
95 Int_t FindDetectorIndex(Double_t phi, Double_t z) const;
96 Double_t GetThickness(Double_t phi, Double_t z) const;
98 Int_t InRoad() const ;
99 Int_t GetNumberOfClusters() const {return fN;}
103 Int_t fI; // index of the current layer
104 static AliITSlayer fLayers[kMaxLayer]; // ITS layers
105 AliITStrackV2 fTracks[kMaxLayer]; // track estimations at the ITS layers
106 AliITStrackV2 fBestTrack; // "best" track
107 AliITStrackV2 fTrackToFollow; // followed track
109 Double_t fYV; // Y-coordinate of the primary vertex
110 Double_t fZV; // Z-coordinate of the primary vertex