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