]>
Commit | Line | Data |
---|---|---|
1d9af2d5 | 1 | #ifndef ALIITSTRACKERUPGRADE_H |
2 | #define ALIITSTRACKERUPGRADE_H | |
3 | ||
1d9af2d5 | 4 | /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
8 | //////////////////////////////////////////////////// | |
9 | // ITS Upgrade Stand alone tracker class // | |
10 | // Authors: A.Mastroserio C.Terrevoli // | |
11 | // e-mail:annalisa.mastroserio@cern.ch // | |
12 | // cristina.terrevoli@ba.infn.it // | |
13 | // tracks are saved as AliITStrackV2 objects // | |
14 | //////////////////////////////////////////////////// | |
15 | ||
0ac80088 | 16 | |
17 | ||
1d9af2d5 | 18 | #include <TClonesArray.h> |
0ac80088 | 19 | #include "AliITSRecPointU.h" |
20 | #include "AliITStrackerMI.h" | |
21 | #include "AliITSlayerUpgrade.h" | |
22 | #include "AliITStrackU.h" | |
1d9af2d5 | 23 | |
24 | class AliITSclusterTable; | |
0b255a22 | 25 | class AliITStrackU; |
db688ae2 | 26 | class AliITSsegmentationUpgrade; |
1d9af2d5 | 27 | class AliESDVertex; |
28 | class AliESDEvent; | |
29 | class AliITSVertexer; | |
30 | class TTree; | |
31 | class TArrayD; | |
32 | ||
33 | class AliITStrackerUpgrade : public AliITStrackerMI { | |
34 | ||
35 | ||
36 | public: | |
37 | ||
38 | AliITStrackerUpgrade(); | |
665c0bc7 | 39 | AliITStrackerUpgrade(Int_t nLay); |
1d9af2d5 | 40 | AliITStrackerUpgrade(const AliITStrackerUpgrade& tracker); |
41 | AliITStrackerUpgrade& operator=(const AliITStrackerUpgrade& source); | |
42 | virtual ~AliITStrackerUpgrade(); | |
4211bbc5 | 43 | virtual Int_t Clusters2Tracks(AliESDEvent *event); |
44 | Int_t FindTracks(AliESDEvent* event,Bool_t useAllClusters=kFALSE); | |
1d9af2d5 | 45 | Int_t PropagateBack(AliESDEvent *event); |
4211bbc5 | 46 | Int_t CorrectForPipeMaterial(AliITStrackU *t, TString direction="inward"); |
47 | Int_t RefitInward(AliESDEvent *event); | |
1d9af2d5 | 48 | AliCluster *GetCluster(Int_t index) const; |
49 | ||
0b255a22 | 50 | AliITStrackV2* FitTrack(AliITStrackU* tr,Double_t* primaryVertex,Bool_t onePoint=kFALSE); |
1d9af2d5 | 51 | void StoreTrack(AliITStrackV2 *t,AliESDEvent *event, Bool_t pureSA) /*const*/; |
52 | Int_t FindTrackLowChiSquare() const; | |
53 | Int_t LoadClusters(TTree *clusTree); | |
54 | void SetVertex(AliESDVertex *vtx){fVert = vtx;} | |
55 | void SetClusterTree(TTree * itscl){fITSclusters = itscl;} | |
56 | ||
57 | void SetOutwardFinding() {fInwardFlag=kFALSE;} | |
58 | void SetInwardFinding() {fInwardFlag=kTRUE;} | |
59 | void SetOuterStartLayer(Int_t osl = 0) { | |
665c0bc7 | 60 | if(osl>(fNLayers-2)) AliWarning("Minimum Number of layers is 2. OuterStartLayer set to Nlayers-2"); |
61 | fOuterStartLayer = TMath::Min(fNLayers-2,osl); | |
1d9af2d5 | 62 | } |
63 | Int_t GetOuterStartLayer() const {return fOuterStartLayer;} | |
64 | void SetInnerStartLayer(Int_t isl = 5) { | |
65 | if(isl<1) AliWarning("Minimum Number of layers is 2. InnerStartLayer set to 1"); | |
66 | fInnerStartLayer = TMath::Max(1,isl); | |
67 | } | |
68 | Int_t GetInnerStartLayer() const {return fInnerStartLayer;} | |
69 | void SetSAFlag(Bool_t fl){fITSStandAlone=fl;} // StandAlone flag setter | |
70 | Bool_t GetSAFlag() const {return fITSStandAlone;} // StandAlone flag gett | |
71 | void SetFixedWindowSizes(Int_t n=46, Double_t *phi=0, Double_t *lam=0); | |
72 | void SetCalculatedWindowSizes(Int_t n=10, Float_t phimin=0.002, Float_t phimax=0.0145, Float_t lambdamin=0.003, Float_t lambdamax=0.008); | |
73 | void UnloadClusters(); | |
74 | void SetMinNPoints(Int_t np){fMinNPoints=np;} | |
75 | Int_t GetMinNPoints() const {return fMinNPoints;} | |
76 | void SetMinimumChargeSDDSSD(Float_t minq=0.){fMinQ=minq;} | |
77 | enum {kSAflag=0x8000}; //flag to mark clusters used in the SA tracker | |
78 | ||
665c0bc7 | 79 | void SetNlayers(Int_t nlay) {fNLayers = nlay;} |
4211bbc5 | 80 | |
1d9af2d5 | 81 | protected: |
82 | ||
83 | //Initialization | |
84 | void Init(); | |
85 | void CreateLayers(Int_t iEvent); | |
86 | void ResetForFinding(); | |
4211bbc5 | 87 | void ResetTrackToFollow(const AliITStrackU &t) { |
88 | fTrackToFollow.~AliITStrackU(); | |
89 | Bool_t trackMI = kTRUE; | |
90 | new(&fTrackToFollow) AliITStrackU(t,trackMI); | |
91 | } | |
92 | ||
93 | ||
1d9af2d5 | 94 | void UpdatePoints(); |
95 | Bool_t SetFirstPoint(Int_t lay, Int_t clu, Double_t* primaryVertex); | |
96 | static Double_t Curvature(Double_t x1,Double_t y1,Double_t x2,Double_t y2, | |
4211bbc5 | 97 | Double_t x3,Double_t y3); |
1d9af2d5 | 98 | |
99 | Double_t ChoosePoint(Double_t p1, Double_t p2, Double_t pp); | |
100 | ||
101 | static Int_t FindIntersection(Float_t a1, Float_t b1, Float_t c1, Float_t c2, | |
4211bbc5 | 102 | Float_t& x1,Float_t& y1, Float_t& x2, Float_t& y2); |
1d9af2d5 | 103 | static Int_t FindEquation(Float_t x1, Float_t y1, Float_t x2, Float_t y2, |
4211bbc5 | 104 | Float_t x3, Float_t y3,Float_t& a, Float_t& b, |
105 | Float_t& c); | |
1d9af2d5 | 106 | |
0a64515a | 107 | Int_t FindLabel(AliITStrackV2* track) const; |
1d9af2d5 | 108 | |
109 | Int_t SearchClusters(Int_t layer,Double_t phiwindow,Double_t lambdawindow, | |
0b255a22 | 110 | AliITStrackU* trs,Double_t zvertex,Int_t flagp); |
1d9af2d5 | 111 | |
0ac80088 | 112 | void GetCoorAngles(AliITSRecPointU* cl,Double_t &phi,Double_t &lambda,Double_t &x,Double_t &y,Double_t &z,Double_t* vertex); |
113 | void GetCoorErrors(AliITSRecPointU* cl,Float_t &sx,Float_t &sy, Float_t &sz); | |
1d9af2d5 | 114 | AliITSclusterTable* GetClusterCoord(Int_t layer,Int_t n) const {return (AliITSclusterTable*)fCluCoord[layer]->UncheckedAt(n);} |
115 | void RemoveClusterCoord(Int_t layer, Int_t n) {fCluCoord[layer]->RemoveAt(n);fCluCoord[layer]->Compress();} | |
4211bbc5 | 116 | Bool_t RefitAtBase(Double_t x, AliITStrackU *track, |
117 | const Int_t *clusters); | |
0ac80088 | 118 | Int_t UpdateMI(AliITStrackU* track, const AliITSRecPointU* cl,Double_t chi2,Int_t layer) const; |
4211bbc5 | 119 | Int_t CorrectForLayerMaterial(AliITStrackU *t, Int_t layerindex, Double_t oldGlobXYZ[3], TString direction="inward"); |
0ac80088 | 120 | Double_t GetPredictedChi2MI(AliITStrackU* track, const AliITSRecPointU *cluster,Int_t layer); |
121 | static Int_t GetError(Int_t layer,const AliITSRecPointU *cl, | |
1d9af2d5 | 122 | Float_t tgl,Float_t tgphitr,Float_t expQ, |
123 | Float_t &erry,Float_t &errz,Float_t &covyz, | |
124 | Bool_t addMisalErr=kTRUE); | |
125 | ||
0ac80088 | 126 | static Int_t GetErrorOrigRecPoint(const AliITSRecPointU*cl, |
1d9af2d5 | 127 | Float_t &erry,Float_t &errz,Float_t &covyz); |
0ac80088 | 128 | static void GetNTeor(Int_t layer,const AliITSRecPointU* cl, |
1d9af2d5 | 129 | Float_t tgl,Float_t tgphitr, |
130 | Float_t &ny,Float_t &nz); | |
0b255a22 | 131 | static const Int_t fgMaxNLayer = 8; //max number of layers in ITSUpgrade |
665c0bc7 | 132 | Int_t fNLayers;//number of layer in ITSUpgrade |
1d9af2d5 | 133 | Double_t fPhiEstimate; //Estimation of phi angle on next layer |
134 | Bool_t fITSStandAlone; //Tracking is performed in the ITS alone if kTRUE | |
135 | Float_t fPoint1[2]; //! coord. of 1-st point to evaluate the curvature | |
136 | Float_t fPoint2[2]; //! coord. of 2-nd point to evaluate the curvature | |
137 | Float_t fPoint3[2]; //! coord. of 3-rd point to evaluate the curvature | |
138 | Float_t fPointc[2]; //! current point coord (for curvature eval.) | |
139 | Double_t fLambdac; //! current value of the Lambda angle in the window | |
140 | Double_t fPhic; //! current value of the Phi angle in the window | |
141 | Float_t fCoef1; //! param. of the equation of the circ. approx a layer | |
142 | Float_t fCoef2; //! param. of the equation of the circ. approx a layer | |
143 | Float_t fCoef3; //! param. of the equation of the circ. approx a layer | |
144 | Int_t fNloop; // Number of iterqations on phi and lambda windows | |
145 | Double_t *fPhiWin; // phi window sizes | |
146 | Double_t *fLambdaWin; // lambda window sizes | |
147 | AliESDVertex *fVert; //! primary vertex | |
148 | AliITSVertexer *fVertexer; //! vertexer | |
149 | TClonesArray *fListOfTracks; //! container for found tracks | |
0b255a22 | 150 | TClonesArray *fListOfUTracks; //! container for found SA tracks |
1d9af2d5 | 151 | TTree *fITSclusters; //! pointer to ITS tree of clusters |
152 | Bool_t fInwardFlag; // set to kTRUE for inward track finding | |
153 | Int_t fOuterStartLayer; // Outward search for tracks with <6 points: outer layer to start from | |
154 | Int_t fInnerStartLayer; // Inward search for tracks with <6 points: inner layer to start from | |
155 | Int_t fMinNPoints; // minimum number of clusters for a track | |
156 | Float_t fMinQ; // lower cut on cluster charge (SDD and SSD) | |
4211bbc5 | 157 | AliITStrackU fTrackToFollow; |
158 | ||
1d9af2d5 | 159 | AliITSlayerUpgrade** fLayers; |
db688ae2 | 160 | AliITSsegmentationUpgrade *fSegmentation; |
1d9af2d5 | 161 | |
162 | TClonesArray** fCluLayer; //! array with clusters | |
163 | TClonesArray** fCluCoord; //! array with cluster info | |
164 | ||
db688ae2 | 165 | ClassDef(AliITStrackerUpgrade,2) |
4211bbc5 | 166 | }; |
1d9af2d5 | 167 | |
168 | #endif | |
169 | ||
170 |