]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITStrackerV2.h
Automatic treatment of the magnetic field value
[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);
14825d5a 28 Int_t PropagateBack(const TFile *in, TFile *out);
006b5f7f 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
7310dc5d 47 //The two subclasses are public in order to access one from the another
48 public:
006b5f7f 49class AliITSdetector {
50private:
51 Double_t fR; // polar coordinates
52 Double_t fPhi; // of this detector
53
54public:
55 AliITSdetector(){}
56 AliITSdetector(Double_t r,Double_t phi) {fR=r; fPhi=phi;}
57
58 void *operator new(size_t s,AliITSdetector *p) {return p;}
59
60 Double_t GetR() const {return fR;}
61 Double_t GetPhi() const {return fPhi;}
62};
63
64class AliITSlayer {
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
71
72 Int_t fN; // number of clusters
73 AliITSclusterV2 *fClusters[kMaxClusterPerLayer]; // pointers to clusters
74
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"
79
80 Int_t FindClusterIndex(Double_t z) const;
81
82public:
83 AliITSlayer();
84 AliITSlayer(Double_t r, Double_t p, Double_t z, Int_t nl, Int_t nd);
85 ~AliITSlayer();
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);
89
90 void *operator new(size_t s, AliITSlayer *p) {return p;}
91
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;
97
98 Int_t InRoad() const ;
14825d5a 99 Int_t GetNumberOfClusters() const {return fN;}
006b5f7f 100};
101
7310dc5d 102 private:
006b5f7f 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
108
109 Double_t fYV; // Y-coordinate of the primary vertex
110 Double_t fZV; // Z-coordinate of the primary vertex
111};
112
113
114
115#endif