]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITStrackerV2.h
Removing obsolete macros
[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(){}
61ab8ea8 24 AliITStrackerV2(const AliITSgeom *geom);
006b5f7f 25 AliCluster *GetCluster(Int_t index) const;
8676d691 26 Int_t LoadClusters();
61ab8ea8 27 void UnloadClusters();
006b5f7f 28 Int_t Clusters2Tracks(const TFile *in, TFile *out);
14825d5a 29 Int_t PropagateBack(const TFile *in, TFile *out);
880f41b9 30 Int_t RefitInward(const TFile *in, TFile *out);
3a382e5c 31 Bool_t RefitAt(Double_t x, AliITStrackV2 *seed, const AliITStrackV2 *t);
7f6ddf58 32 void SetupFirstPass(Int_t *flags, Double_t *cuts=0);
33 void SetupSecondPass(Int_t *flags, Double_t *cuts=0);
34
c0dd5278 35 void SetLastLayerToTrackTo(Int_t l=0) {fLastLayerToTrackTo=l;}
36 void SetLayersNotToSkip(Int_t *l);
37
b87bd7cd 38 void UseClusters(const AliKalmanTrack *t, Int_t from=0) const;
39
7f6ddf58 40 class AliITSdetector {
41 public:
42 AliITSdetector(){}
43 AliITSdetector(Double_t r,Double_t phi) {fR=r; fPhi=phi;}
44 void *operator new(size_t s,AliITSdetector *p) {return p;}
45 Double_t GetR() const {return fR;}
46 Double_t GetPhi() const {return fPhi;}
47 private:
48 Double_t fR; // polar coordinates
49 Double_t fPhi; // of this detector
50 };
51
52 class AliITSlayer {
53 public:
54 AliITSlayer();
55 AliITSlayer(Double_t r, Double_t p, Double_t z, Int_t nl, Int_t nd);
56 ~AliITSlayer();
57 Int_t InsertCluster(AliITSclusterV2 *c);
61ab8ea8 58 void ResetClusters();
7f6ddf58 59 void SelectClusters(Double_t zmi,Double_t zma,Double_t ymi,Double_t yma);
60 const AliITSclusterV2 *GetNextCluster(Int_t &ci);
61 void *operator new(size_t s, AliITSlayer *p) {return p;}
b87bd7cd 62 void ResetRoad();
63 Double_t GetRoad() const {return fRoad;}
7f6ddf58 64 Double_t GetR() const {return fR;}
65 AliITSclusterV2 *GetCluster(Int_t i) const {return fClusters[i];}
66 AliITSdetector &GetDetector(Int_t n) const { return fDetectors[n]; }
67 Int_t FindDetectorIndex(Double_t phi, Double_t z) const;
61ab8ea8 68 Double_t GetThickness(Double_t y, Double_t z, Double_t &x0) const;
7f6ddf58 69 Int_t InRoad() const ;
70 Int_t GetNumberOfClusters() const {return fN;}
61ab8ea8 71 Int_t GetNladders() const {return fNladders;}
72 Int_t GetNdetectors() const {return fNdetectors;}
7f6ddf58 73 private:
74 Double_t fR; // mean radius of this layer
75 Double_t fPhiOffset; // offset of the first detector in Phi
76 Int_t fNladders; // number of ladders
77 Double_t fZOffset; // offset of the first detector in Z
78 Int_t fNdetectors; // detectors/ladder
79 AliITSdetector *fDetectors; // array of detectors
80 Int_t fN; // number of clusters
81 AliITSclusterV2 *fClusters[kMaxClusterPerLayer]; // pointers to clusters
82 Double_t fZmax; // edges
83 Double_t fYmin; // of the
84 Double_t fYmax; // "window"
85 Int_t fI; // index of the current cluster within the "window"
b87bd7cd 86 Double_t fRoad; // road defined by the cluster density
7f6ddf58 87 Int_t FindClusterIndex(Double_t z) const;
88 };
006b5f7f 89
90private:
7f6ddf58 91 void CookLabel(AliKalmanTrack *t,Float_t wrong) const;
a9a2d814 92 Double_t GetEffectiveThickness(Double_t y, Double_t z) const;
006b5f7f 93 void FollowProlongation();
94 Int_t TakeNextProlongation();
006b5f7f 95 void ResetBestTrack() {
96 fBestTrack.~AliITStrackV2();
97 new(&fBestTrack) AliITStrackV2(fTrackToFollow);
98 }
006b5f7f 99 void ResetTrackToFollow(const AliITStrackV2 &t) {
100 fTrackToFollow.~AliITStrackV2();
101 new(&fTrackToFollow) AliITStrackV2(t);
102 }
7f6ddf58 103 Int_t fI; // index of the current layer
006b5f7f 104 static AliITSlayer fLayers[kMaxLayer]; // ITS layers
7f6ddf58 105 AliITStrackV2 fTracks[kMaxLayer]; // track estimations at the ITS layers
106 AliITStrackV2 fBestTrack; // "best" track
107 AliITStrackV2 fTrackToFollow; // followed track
108 Int_t fPass; // current pass through the data
109 Int_t fConstraint[2]; // constraint flags
8676d691 110
c0dd5278 111 Int_t fLayersNotToSkip[kMaxLayer]; // layer masks
112 Int_t fLastLayerToTrackTo; // the innermost layer to track to
113
8676d691 114 ClassDef(AliITStrackerV2,1) //ITS tracker V2
006b5f7f 115};
116
117
7f6ddf58 118inline void AliITStrackerV2::SetupFirstPass(Int_t *flags, Double_t *cuts) {
119 // This function sets up flags and cuts for the first tracking pass
120 //
121 // flags[0] - vertex constaint flag
122 // negative means "skip the pass"
123 // 0 means "no constraint"
124 // positive means "normal constraint"
125
126 fConstraint[0]=flags[0];
127 if (cuts==0) return;
128}
129
130inline void AliITStrackerV2::SetupSecondPass(Int_t *flags, Double_t *cuts) {
131 // This function sets up flags and cuts for the second tracking pass
132 //
133 // flags[0] - vertex constaint flag
134 // negative means "skip the pass"
135 // 0 means "no constraint"
136 // positive means "normal constraint"
137
138 fConstraint[1]=flags[0];
139 if (cuts==0) return;
140}
141
142inline void AliITStrackerV2::CookLabel(AliKalmanTrack *t,Float_t wrong) const {
143 //--------------------------------------------------------------------
144 //This function "cooks" a track label. If label<0, this track is fake.
145 //--------------------------------------------------------------------
146 Int_t tpcLabel=t->GetLabel();
147 if (tpcLabel<0) return;
148 AliTracker::CookLabel(t,wrong);
149 if (tpcLabel != t->GetLabel()) t->SetLabel(-tpcLabel);
150}
006b5f7f 151
152#endif