]>
Commit | Line | Data |
---|---|---|
e43c066c | 1 | #ifndef ALIITSTRACKERMI_H |
2 | #define ALIITSTRACKERMI_H | |
572f41f9 | 3 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * |
e43c066c | 4 | * See cxx source for full Copyright notice */ |
5 | ||
572f41f9 | 6 | /* $Id$ */ |
bf6adc12 | 7 | |
e43c066c | 8 | //------------------------------------------------------------------------- |
9 | // ITS tracker | |
15dd636f | 10 | // reads AliITSclusterMI clusters and creates AliITStrackMI tracks |
11 | // Origin: Marian Ivanov, CERN, Marian.Ivanov@cern.ch | |
23197852 | 12 | // Current support and development: |
13 | // Andrea Dainese, andrea.dainese@lnl.infn.it | |
e43c066c | 14 | //------------------------------------------------------------------------- |
15 | ||
bf6adc12 | 16 | class TTree; |
17 | class TTreeSRedirector; | |
af885e0f | 18 | class AliESDEvent; |
67c1e979 | 19 | |
00a7cc50 | 20 | #include <TObjArray.h> |
21 | #include "AliITSRecPoint.h" | |
bf6adc12 | 22 | #include "AliITStrackMI.h" |
4a66240a | 23 | #include "AliITSPlaneEff.h" |
23197852 | 24 | #include "AliITSChannelStatus.h" |
25 | #include "AliITSDetTypeRec.h" | |
7167ae53 | 26 | #include "AliPlaneEff.h" |
ae00569a | 27 | #include "AliTracker.h" |
e43c066c | 28 | |
29 | //------------------------------------------------------------------------- | |
30 | class AliITStrackerMI : public AliTracker { | |
31 | public: | |
8221b41b | 32 | AliITStrackerMI(); |
1f3e997f | 33 | AliITStrackerMI(const Char_t *geom); |
8221b41b | 34 | virtual ~AliITStrackerMI(); |
e43c066c | 35 | AliCluster *GetCluster(Int_t index) const; |
df29e9a4 | 36 | virtual Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const; |
9a5326b1 | 37 | virtual Bool_t GetTrackPointTrackingError(Int_t index, |
38 | AliTrackPoint& p, const AliESDtrack *t); | |
00a7cc50 | 39 | AliITSRecPoint *GetClusterLayer(Int_t layn, Int_t ncl) const |
e43c066c | 40 | {return fgLayers[layn].GetCluster(ncl);} |
41 | Int_t GetNumberOfClustersLayer(Int_t layn) const | |
42 | {return fgLayers[layn].GetNumberOfClusters();} | |
43 | Int_t LoadClusters(TTree *cf); | |
44 | void UnloadClusters(); | |
23197852 | 45 | void FillClusterArray(TObjArray* array) const; |
af885e0f | 46 | Int_t Clusters2Tracks(AliESDEvent *event); |
47 | Int_t PropagateBack(AliESDEvent *event); | |
48 | Int_t RefitInward(AliESDEvent *event); | |
ae00569a | 49 | Bool_t RefitAt(Double_t x, AliITStrackMI *track, |
7167ae53 | 50 | const AliITStrackMI *clusters, Bool_t extra=kFALSE, Bool_t planeeff=kFALSE); |
ae00569a | 51 | Bool_t RefitAt(Double_t x, AliITStrackMI *track, |
7167ae53 | 52 | const Int_t *clusters, Bool_t extra=kFALSE, Bool_t planeeff=kFALSE); |
e43c066c | 53 | void SetupFirstPass(Int_t *flags, Double_t *cuts=0); |
54 | void SetupSecondPass(Int_t *flags, Double_t *cuts=0); | |
55 | ||
56 | void SetLastLayerToTrackTo(Int_t l=0) {fLastLayerToTrackTo=l;} | |
57 | void SetLayersNotToSkip(Int_t *l); | |
58 | void UseClusters(const AliKalmanTrack *t, Int_t from=0) const; | |
628e7bb0 | 59 | |
60 | void GetDCASigma(AliITStrackMI* track, Float_t & sigmarfi, Float_t &sigmaz); | |
00a7cc50 | 61 | Double_t GetPredictedChi2MI(AliITStrackMI* track, const AliITSRecPoint *cluster,Int_t layer); |
62 | Int_t UpdateMI(AliITStrackMI* track, const AliITSRecPoint* cl,Double_t chi2,Int_t layer) const; | |
7167ae53 | 63 | AliPlaneEff *GetPlaneEff() {return (AliPlaneEff*)fPlaneEff;} // return the pointer to AliPlaneEff |
23197852 | 64 | void SetDetTypeRec(AliITSDetTypeRec *detTypeRec) {fDetTypeRec = detTypeRec; ReadBadFromDetTypeRec(); } |
65 | ||
e43c066c | 66 | class AliITSdetector { |
67 | public: | |
23197852 | 68 | AliITSdetector():fR(0),fPhi(0),fSinPhi(0),fCosPhi(0),fYmin(0),fYmax(0),fZmin(0),fZmax(0),fIsBad(kFALSE),fNChips(0),fChipIsBad(0) {} |
69 | AliITSdetector(Double_t r,Double_t phi):fR(r),fPhi(phi),fSinPhi(TMath::Sin(phi)),fCosPhi(TMath::Cos(phi)),fYmin(10000),fYmax(-1000),fZmin(10000),fZmax(-1000),fIsBad(kFALSE),fNChips(0),fChipIsBad(0) {} | |
70 | ~AliITSdetector() {if(fChipIsBad) delete [] fChipIsBad;} | |
00a7cc50 | 71 | inline void GetGlobalXYZ( const AliITSRecPoint *cl, Double_t xyz[3]) const; |
e43c066c | 72 | Double_t GetR() const {return fR;} |
73 | Double_t GetPhi() const {return fPhi;} | |
74 | Double_t GetYmin() const {return fYmin;} | |
75 | Double_t GetYmax() const {return fYmax;} | |
76 | Double_t GetZmin() const {return fZmin;} | |
77 | Double_t GetZmax() const {return fZmax;} | |
23197852 | 78 | Bool_t IsBad() const {return fIsBad;} |
79 | Int_t GetNChips() const {return fNChips;} | |
80 | Bool_t IsChipBad(Int_t iChip) const {return (fChipIsBad ? fChipIsBad[iChip] : kFALSE);} | |
e43c066c | 81 | void SetYmin(Double_t min) {fYmin = min;} |
82 | void SetYmax(Double_t max) {fYmax = max;} | |
83 | void SetZmin(Double_t min) {fZmin = min;} | |
84 | void SetZmax(Double_t max) {fZmax = max;} | |
23197852 | 85 | void SetBad() {fIsBad = kTRUE;} |
86 | void ReadBadDetectorAndChips(Int_t ilayer,Int_t idet,AliITSDetTypeRec *detTypeRec); | |
e43c066c | 87 | private: |
23197852 | 88 | AliITSdetector(const AliITSdetector& det); |
89 | AliITSdetector & operator=(const AliITSdetector& det){ | |
90 | this->~AliITSdetector();new(this) AliITSdetector(det); | |
91 | return *this;} | |
e43c066c | 92 | Double_t fR; // polar coordinates |
93 | Double_t fPhi; // of this detector | |
94 | Double_t fSinPhi; // sin of phi; | |
95 | Double_t fCosPhi; // cos of phi | |
96 | Double_t fYmin; // local y minimal | |
97 | Double_t fYmax; // local max y | |
98 | Double_t fZmin; // local z min | |
99 | Double_t fZmax; // local z max | |
23197852 | 100 | Bool_t fIsBad; // is detector dead or noisy? |
101 | Int_t fNChips; // number of chips | |
102 | Bool_t *fChipIsBad; //[fNChips] is chip dead or noisy? | |
e43c066c | 103 | }; |
104 | ||
105 | class AliITSlayer { | |
e43c066c | 106 | public: |
107 | AliITSlayer(); | |
108 | AliITSlayer(Double_t r, Double_t p, Double_t z, Int_t nl, Int_t nd); | |
23197852 | 109 | ~AliITSlayer(); |
00a7cc50 | 110 | Int_t InsertCluster(AliITSRecPoint *c); |
e43c066c | 111 | void SortClusters(); |
112 | void ResetClusters(); | |
113 | void ResetWeights(); | |
6518a6c5 | 114 | void SelectClusters(Double_t zmin,Double_t zmax,Double_t ymin,Double_t ymax); |
ae00569a | 115 | const AliITSRecPoint *GetNextCluster(Int_t &ci,Bool_t test=kFALSE); |
e43c066c | 116 | void ResetRoad(); |
117 | Double_t GetRoad() const {return fRoad;} | |
118 | Double_t GetR() const {return fR;} | |
119 | Int_t FindClusterIndex(Float_t z) const; | |
00a7cc50 | 120 | AliITSRecPoint *GetCluster(Int_t i) const {return i<fN? fClusters[i]:0;} |
8602c008 | 121 | Float_t *GetWeight(Int_t i) {return i<fN ?&fClusterWeight[i]:0;} |
e43c066c | 122 | AliITSdetector &GetDetector(Int_t n) const { return fDetectors[n]; } |
123 | Int_t FindDetectorIndex(Double_t phi, Double_t z) const; | |
124 | Double_t GetThickness(Double_t y, Double_t z, Double_t &x0) const; | |
125 | Int_t InRoad() const ; | |
126 | Int_t GetNumberOfClusters() const {return fN;} | |
127 | Int_t GetNladders() const {return fNladders;} | |
128 | Int_t GetNdetectors() const {return fNdetectors;} | |
129 | Int_t GetSkip() const {return fSkip;} | |
130 | void SetSkip(Int_t skip){fSkip=skip;} | |
131 | void IncAccepted(){fAccepted++;} | |
81e97e0d | 132 | Int_t GetAccepted() const {return fAccepted;} |
b9671574 | 133 | Int_t GetClusterTracks(Int_t i, Int_t j) const {return fClusterTracks[i][j];} |
134 | void SetClusterTracks(Int_t i, Int_t j, Int_t c) {fClusterTracks[i][j]=c;} | |
e43c066c | 135 | protected: |
8221b41b | 136 | AliITSlayer(const AliITSlayer& layer); |
137 | AliITSlayer & operator=(const AliITSlayer& layer){ | |
138 | this->~AliITSlayer();new(this) AliITSlayer(layer); | |
139 | return *this;} | |
e43c066c | 140 | Double_t fR; // mean radius of this layer |
141 | Double_t fPhiOffset; // offset of the first detector in Phi | |
142 | Int_t fNladders; // number of ladders | |
143 | Double_t fZOffset; // offset of the first detector in Z | |
144 | Int_t fNdetectors; // detectors/ladder | |
145 | AliITSdetector *fDetectors; // array of detectors | |
146 | Int_t fN; // number of clusters | |
e50912db | 147 | AliITSRecPoint *fClusters[AliITSRecoParam::fgkMaxClusterPerLayer]; // pointers to clusters |
148 | Int_t fClusterIndex[AliITSRecoParam::fgkMaxClusterPerLayer]; // pointers to clusters | |
149 | Float_t fY[AliITSRecoParam::fgkMaxClusterPerLayer]; // y position of the clusters | |
150 | Float_t fZ[AliITSRecoParam::fgkMaxClusterPerLayer]; // z position of the clusters | |
e43c066c | 151 | Float_t fYB[2]; // ymin and ymax |
152 | // | |
e50912db | 153 | AliITSRecPoint *fClusters5[6][AliITSRecoParam::fgkMaxClusterPerLayer5]; // pointers to clusters - slice in y |
154 | Int_t fClusterIndex5[6][AliITSRecoParam::fgkMaxClusterPerLayer5]; // pointers to clusters - slice in y | |
155 | Float_t fY5[6][AliITSRecoParam::fgkMaxClusterPerLayer5]; // y position of the clusters slice in y | |
156 | Float_t fZ5[6][AliITSRecoParam::fgkMaxClusterPerLayer5]; // z position of the clusters slice in y | |
e43c066c | 157 | Int_t fN5[6]; // number of cluster in slice |
158 | Float_t fDy5; //delta y | |
159 | Float_t fBy5[6][2]; //slice borders | |
160 | // | |
e50912db | 161 | AliITSRecPoint *fClusters10[11][AliITSRecoParam::fgkMaxClusterPerLayer10]; // pointers to clusters - slice in y |
162 | Int_t fClusterIndex10[11][AliITSRecoParam::fgkMaxClusterPerLayer10]; // pointers to clusters - slice in y | |
163 | Float_t fY10[11][AliITSRecoParam::fgkMaxClusterPerLayer10]; // y position of the clusters slice in y | |
164 | Float_t fZ10[11][AliITSRecoParam::fgkMaxClusterPerLayer10]; // z position of the clusters slice in y | |
e43c066c | 165 | Int_t fN10[11]; // number of cluster in slice |
f43e383b | 166 | Float_t fDy10; // delta y |
167 | Float_t fBy10[11][2]; // slice borders | |
e43c066c | 168 | // |
e50912db | 169 | AliITSRecPoint *fClusters20[21][AliITSRecoParam::fgkMaxClusterPerLayer20]; // pointers to clusters - slice in y |
170 | Int_t fClusterIndex20[21][AliITSRecoParam::fgkMaxClusterPerLayer20]; // pointers to clusters - slice in y | |
171 | Float_t fY20[21][AliITSRecoParam::fgkMaxClusterPerLayer20]; // y position of the clusters slice in y | |
172 | Float_t fZ20[21][AliITSRecoParam::fgkMaxClusterPerLayer20]; // z position of the clusters slice in y | |
e43c066c | 173 | Int_t fN20[21]; // number of cluster in slice |
f43e383b | 174 | Float_t fDy20; //delta y |
175 | Float_t fBy20[21][2]; //slice borders | |
e43c066c | 176 | // |
00a7cc50 | 177 | AliITSRecPoint** fClustersCs; //clusters table in current slice |
e43c066c | 178 | Int_t *fClusterIndexCs; //cluster index in current slice |
179 | Float_t *fYcs; //y position in current slice | |
180 | Float_t *fZcs; //z position in current slice | |
181 | Int_t fNcs; //number of clusters in current slice | |
182 | Int_t fCurrentSlice; //current slice | |
183 | // | |
e50912db | 184 | Float_t fClusterWeight[AliITSRecoParam::fgkMaxClusterPerLayer]; // probabilistic weight of the cluster |
185 | Int_t fClusterTracks[4][AliITSRecoParam::fgkMaxClusterPerLayer]; //tracks registered to given cluster | |
e43c066c | 186 | Float_t fZmax; // edges |
187 | Float_t fYmin; // of the | |
188 | Float_t fYmax; // "window" | |
189 | Int_t fI; // index of the current cluster within the "window" | |
190 | Int_t fImax; // index of the last cluster within the "window" | |
191 | Int_t fSkip; // indicates possibility to skip cluster | |
f43e383b | 192 | Int_t fAccepted; // accept indicator |
e43c066c | 193 | Double_t fRoad; // road defined by the cluster density |
194 | }; | |
195 | AliITStrackerMI::AliITSlayer & GetLayer(Int_t layer) const; | |
196 | AliITStrackerMI::AliITSdetector & GetDetector(Int_t layer, Int_t n) const {return GetLayer(layer).GetDetector(n); } | |
197 | ||
198 | protected: | |
81e97e0d | 199 | Int_t GetNearestLayer(const Double_t *xr) const; //get nearest upper layer close to the point xr |
af885e0f | 200 | void FindV02(AliESDEvent *event); //try to find V0 |
201 | void RefitV02(AliESDEvent *event); //try to refit V0's | |
202 | void UpdateTPCV0(AliESDEvent *event); //try to update, or reject TPC V0s | |
e43c066c | 203 | void CookLabel(AliKalmanTrack *t,Float_t wrong) const; |
15dd636f | 204 | void CookLabel(AliITStrackMI *t,Float_t wrong) const; |
e50912db | 205 | Double_t GetEffectiveThickness(); |
81e97e0d | 206 | void FollowProlongationTree(AliITStrackMI * otrack, Int_t esdindex, Bool_t constrain); |
e43c066c | 207 | void ResetBestTrack() { |
15dd636f | 208 | fBestTrack.~AliITStrackMI(); |
209 | new(&fBestTrack) AliITStrackMI(fTrackToFollow); | |
e43c066c | 210 | } |
15dd636f | 211 | void ResetTrackToFollow(const AliITStrackMI &t) { |
212 | fTrackToFollow.~AliITStrackMI(); | |
213 | new(&fTrackToFollow) AliITStrackMI(t); | |
e43c066c | 214 | } |
15dd636f | 215 | void CookdEdx(AliITStrackMI* track); |
216 | Double_t GetNormalizedChi2(AliITStrackMI * track, Int_t mode); | |
217 | Double_t GetTruncatedChi2(AliITStrackMI * track, Float_t fac); | |
218 | Double_t NormalizedChi2(AliITStrackMI * track, Int_t layer); | |
219 | Double_t GetInterpolatedChi2(AliITStrackMI * forwardtrack, AliITStrackMI * backtrack); | |
220 | Double_t GetMatchingChi2(AliITStrackMI * track1, AliITStrackMI * track2); | |
6518a6c5 | 221 | Double_t GetSPDDeadZoneProbability(Double_t zpos, Double_t zerr); |
e43c066c | 222 | |
223 | Float_t *GetWeight(Int_t index); | |
15dd636f | 224 | void AddTrackHypothesys(AliITStrackMI * track, Int_t esdindex); |
e43c066c | 225 | void SortTrackHypothesys(Int_t esdindex, Int_t maxcut, Int_t mode); |
15dd636f | 226 | AliITStrackMI * GetBestHypothesys(Int_t esdindex, AliITStrackMI * original, Int_t checkmax); |
e43c066c | 227 | void GetBestHypothesysMIP(TObjArray &itsTracks); |
15dd636f | 228 | void RegisterClusterTracks(AliITStrackMI* track, Int_t id); |
229 | void UnRegisterClusterTracks(AliITStrackMI* track, Int_t id); | |
00a7cc50 | 230 | Float_t GetNumberOfSharedClusters(AliITStrackMI* track,Int_t id, Int_t list[6], AliITSRecPoint *clist[6]); |
15dd636f | 231 | Int_t GetOverlapTrack(AliITStrackMI *track, Int_t trackID, Int_t &shared, Int_t clusterlist[6], Int_t overlist[6]); |
232 | AliITStrackMI * GetBest2Tracks(Int_t trackID1, Int_t treackID2, Float_t th0, Float_t th1); | |
afd25725 | 233 | Float_t * GetErrY(Int_t trackindex) const {return &fCoefficients[trackindex*48];} |
234 | Float_t * GetErrZ(Int_t trackindex) const {return &fCoefficients[trackindex*48+12];} | |
235 | Float_t * GetNy(Int_t trackindex) const {return &fCoefficients[trackindex*48+24];} | |
236 | Float_t * GetNz(Int_t trackindex) const {return &fCoefficients[trackindex*48+36];} | |
e43c066c | 237 | void SignDeltas( TObjArray *ClusterArray, Float_t zv); |
afd25725 | 238 | void MakeCoefficients(Int_t ntracks); |
e50912db | 239 | void BuildMaterialLUT(TString material); |
240 | void MakeTrksMaterialLUT(Int_t ntracks); | |
241 | void DeleteTrksMaterialLUT(); | |
242 | Int_t CorrectForPipeMaterial(AliITStrackMI *t, TString direction="inward"); | |
243 | Int_t CorrectForShieldMaterial(AliITStrackMI *t, TString shield, TString direction="inward"); | |
244 | Int_t CorrectForLayerMaterial(AliITStrackMI *t, Int_t layerindex, Double_t oldGlobXYZ[3], TString direction="inward"); | |
15dd636f | 245 | void UpdateESDtrack(AliITStrackMI* track, ULong_t flags) const; |
23197852 | 246 | void ReadBadFromDetTypeRec(); |
6518a6c5 | 247 | Int_t CheckSkipLayer(AliITStrackMI *track,Int_t ilayer,Int_t idet) const; |
23197852 | 248 | Int_t CheckDeadZone(AliITStrackMI *track,Int_t ilayer,Int_t idet,Double_t zmin,Double_t zmax,Double_t ymin,Double_t ymax,Bool_t noClusters=kFALSE) const; |
ae00569a | 249 | Bool_t LocalModuleCoord(Int_t ilayer,Int_t idet,AliITStrackMI *track, |
250 | Float_t &xloc,Float_t &zloc) const; | |
7167ae53 | 251 | // method to be used for Plane Efficiency evaluation |
252 | Bool_t IsOKForPlaneEff(AliITStrackMI* track, Int_t ilayer) const; // Check if a track is usable | |
253 | // for Plane Eff evaluation | |
254 | void UseTrackForPlaneEff(AliITStrackMI* track, Int_t ilayer); // Use this track for Plane Eff | |
255 | // | |
e43c066c | 256 | Int_t fI; // index of the current layer |
e50912db | 257 | static AliITSlayer fgLayers[AliITSgeomTGeo::kNLayers];// ITS layers |
258 | AliITStrackMI fTracks[AliITSgeomTGeo::kNLayers]; // track estimations at the ITS layers | |
15dd636f | 259 | AliITStrackMI fBestTrack; // "best" track |
260 | AliITStrackMI fTrackToFollow; // followed track | |
e43c066c | 261 | TObjArray fTrackHypothesys; // ! array with track hypothesys- ARRAY is the owner of tracks- MI |
81e97e0d | 262 | TObjArray fBestHypothesys; // ! array with track hypothesys- ARRAY is the owner of tracks- MI |
628e7bb0 | 263 | TObjArray fOriginal; // ! array with seeds from the TPC |
e43c066c | 264 | Int_t fBestTrackIndex[100000]; // ! index of the best track |
265 | Int_t fCurrentEsdTrack; // ! current esd track - MI | |
266 | Int_t fPass; // current pass through the data | |
267 | Int_t fConstraint[2]; // constraint flags | |
628e7bb0 | 268 | Bool_t fAfterV0; //indicates V0 founded |
e50912db | 269 | Int_t fLayersNotToSkip[AliITSgeomTGeo::kNLayers]; // layer masks |
e43c066c | 270 | Int_t fLastLayerToTrackTo; // the innermost layer to track to |
e50912db | 271 | Float_t * fCoefficients; //! working array with errors and mean cluster shape |
afd25725 | 272 | AliESDEvent * fEsd; //! pointer to the ESD event |
273 | Double_t fSPDdetzcentre[4]; // centres of SPD modules in z | |
e50912db | 274 | TString fTrackingPhase; // current tracking phase |
275 | Int_t fUseTGeo; // use TGeo to get material budget | |
276 | Int_t fNtracks; // number of tracks to prolong | |
277 | Float_t fxOverX0Pipe; // material budget | |
278 | Float_t fxTimesRhoPipe; // material budget | |
279 | Float_t fxOverX0Shield[2]; // material budget | |
280 | Float_t fxTimesRhoShield[2]; // material budget | |
281 | Float_t fxOverX0Layer[6]; // material budget | |
282 | Float_t fxTimesRhoLayer[6]; // material budget | |
283 | Float_t *fxOverX0PipeTrks; //! material budget | |
284 | Float_t *fxTimesRhoPipeTrks; //! material budget | |
285 | Float_t *fxOverX0ShieldTrks; //! material budget | |
286 | Float_t *fxTimesRhoShieldTrks; //! material budget | |
287 | Float_t *fxOverX0LayerTrks; //! material budget | |
288 | Float_t *fxTimesRhoLayerTrks; //! material budget | |
289 | TTreeSRedirector *fDebugStreamer; //!debug streamer | |
23197852 | 290 | AliITSChannelStatus *fITSChannelStatus;//! bitmaps with channel status for SPD and SDD |
291 | AliITSDetTypeRec *fDetTypeRec; //! ITS det type rec, from AliITSReconstructor | |
ae00569a | 292 | AliITSPlaneEff *fPlaneEff; //! Pointer to the ITS plane efficicency |
bf6adc12 | 293 | private: |
8221b41b | 294 | AliITStrackerMI(const AliITStrackerMI &tracker); |
295 | AliITStrackerMI & operator=(const AliITStrackerMI &tracker); | |
23197852 | 296 | ClassDef(AliITStrackerMI,5) //ITS tracker MI |
e43c066c | 297 | }; |
298 | ||
299 | ||
300 | ||
301 | ||
302 | ///////////////////////////////////////////////////////// | |
303 | ///////////////////////////////////////////////////////// | |
304 | ///////////////////////////////////////////////////////// | |
305 | ||
306 | ||
307 | ||
308 | ||
309 | ||
310 | inline void AliITStrackerMI::SetupFirstPass(Int_t *flags, Double_t *cuts) { | |
311 | // This function sets up flags and cuts for the first tracking pass | |
312 | // | |
313 | // flags[0] - vertex constaint flag | |
314 | // negative means "skip the pass" | |
315 | // 0 means "no constraint" | |
316 | // positive means "normal constraint" | |
317 | ||
318 | fConstraint[0]=flags[0]; | |
319 | if (cuts==0) return; | |
320 | } | |
321 | ||
322 | inline void AliITStrackerMI::SetupSecondPass(Int_t *flags, Double_t *cuts) { | |
323 | // This function sets up flags and cuts for the second tracking pass | |
324 | // | |
325 | // flags[0] - vertex constaint flag | |
326 | // negative means "skip the pass" | |
327 | // 0 means "no constraint" | |
328 | // positive means "normal constraint" | |
329 | ||
330 | fConstraint[1]=flags[0]; | |
331 | if (cuts==0) return; | |
332 | } | |
333 | ||
334 | inline void AliITStrackerMI::CookLabel(AliKalmanTrack *t,Float_t wrong) const { | |
335 | //-------------------------------------------------------------------- | |
336 | //This function "cooks" a track label. If label<0, this track is fake. | |
337 | //-------------------------------------------------------------------- | |
338 | Int_t tpcLabel=t->GetLabel(); | |
339 | if (tpcLabel<0) return; | |
340 | AliTracker::CookLabel(t,wrong); | |
341 | if (tpcLabel!=TMath::Abs(t->GetLabel())){ | |
342 | t->SetFakeRatio(1.); | |
343 | } | |
344 | if (tpcLabel !=t->GetLabel()) { | |
345 | t->SetLabel(-tpcLabel); | |
346 | } | |
347 | } | |
348 | ||
15dd636f | 349 | inline Double_t AliITStrackerMI::NormalizedChi2(AliITStrackMI * track, Int_t layer) |
e43c066c | 350 | { |
351 | //-------------------------------------------------------------------- | |
352 | //get normalize chi2 | |
353 | //-------------------------------------------------------------------- | |
b9671574 | 354 | track->SetNormChi2(layer,2.*track->GetNSkipped()+0.25*track->GetNDeadZone()+track->GetdEdxMismatch()+track->GetChi2()/ |
e43c066c | 355 | //track->fNormChi2[layer] = 2.*track->fNSkipped+0.25*track->fNDeadZone+track->fdEdxMismatch+track->fChi22/ |
b9671574 | 356 | TMath::Max(double(track->GetNumberOfClusters()-track->GetNSkipped()), |
357 | 1./(1.+track->GetNSkipped()))); | |
358 | return track->GetNormChi2(layer); | |
e43c066c | 359 | } |
00a7cc50 | 360 | inline void AliITStrackerMI::AliITSdetector::GetGlobalXYZ(const AliITSRecPoint *cl, Double_t xyz[3]) const |
e43c066c | 361 | { |
362 | // | |
363 | // get cluster coordinates in global cooordinate | |
364 | // | |
365 | xyz[2] = cl->GetZ(); | |
366 | xyz[0] = fR*fCosPhi - cl->GetY()*fSinPhi; | |
367 | xyz[1] = fR*fSinPhi + cl->GetY()*fCosPhi; | |
368 | } | |
369 | #endif |