]>
Commit | Line | Data |
---|---|---|
13918578 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
bf6adc12 | 15 | |
16 | /* $Id$ */ | |
17 | ||
13918578 | 18 | //////////////////////////////////////////////////// |
19 | // Stand alone track class // | |
20 | // Origin: Elisabetta Crescio // | |
21 | // e-mail: crescio@to.infn.it // | |
22 | // it is a V2 track with a possible number // | |
23 | // of cluster equal to fgkMaxNumberOfClusters // | |
24 | //////////////////////////////////////////////////// | |
25 | ||
13918578 | 26 | #include "AliITSgeom.h" |
27 | #include "AliITStrackSA.h" | |
28 | ||
29 | ||
30 | ClassImp(AliITStrackSA) | |
31 | ||
32 | //_____________________________________ | |
15dd636f | 33 | AliITStrackSA:: AliITStrackSA() : AliITStrackMI(){ |
13918578 | 34 | // Default constructor |
35 | SetNumberOfClusters(0); | |
36 | SetNumberOfClustersSA(0); | |
37 | ResetIndexSA(); | |
7e5bf5af | 38 | for(Int_t nlay=0;nlay<fgkLayers;nlay++){ |
39 | SetNumberOfMarked(nlay,0); | |
40 | } | |
41 | ResetMarked(); | |
13918578 | 42 | } |
43 | ||
44 | ||
45 | //___________________________________________________ | |
15dd636f | 46 | AliITStrackSA::AliITStrackSA(const AliITStrackMI& t) : |
47 | AliITStrackMI(t){ | |
13918578 | 48 | // Copy a V2 track into a SA track |
49 | SetNumberOfClustersSA(0); | |
50 | ResetIndexSA(); | |
7e5bf5af | 51 | for(Int_t nlay=0;nlay<fgkLayers;nlay++){ |
52 | SetNumberOfMarked(nlay,0); | |
53 | } | |
54 | ResetMarked(); | |
55 | ||
13918578 | 56 | } |
57 | //___________________________________________________ | |
58 | AliITStrackSA::AliITStrackSA(const AliITStrackSA& t) : | |
15dd636f | 59 | AliITStrackMI(t){ |
13918578 | 60 | // Copy constructor |
61 | ||
7d62fb64 | 62 | |
13918578 | 63 | ResetIndexSA(); |
7e5bf5af | 64 | ResetMarked(); |
13918578 | 65 | Int_t number = t.GetNumberOfClustersSA(); |
66 | SetNumberOfClustersSA(number); | |
7e5bf5af | 67 | for(Int_t nlay=0;nlay<fgkLayers;nlay++){ |
68 | SetNumberOfMarked(nlay,t.GetNumberOfMarked(nlay)); | |
69 | } | |
13918578 | 70 | for(Int_t i=0;i<number;i++){ |
71 | fSain[i]=t.fSain[i]; | |
72 | } | |
7e5bf5af | 73 | for(Int_t nlay=0;nlay<fgkLayers;nlay++){ |
74 | for(Int_t i=0;i<t.GetNumberOfMarked(nlay);i++){ | |
75 | fCluMark[nlay][i]=t.fCluMark[nlay][i]; | |
76 | } | |
77 | } | |
13918578 | 78 | } |
79 | //____________________________________________________ | |
7d62fb64 | 80 | AliITStrackSA::AliITStrackSA(AliITSgeom* geom,Int_t layer, Int_t ladder, Int_t detector, Double_t Ycoor, Double_t Zcoor, Double_t phi, Double_t tanlambda, Double_t curv, Int_t lab ) { |
13918578 | 81 | // standard constructor. Used for ITS standalone tracking |
7d62fb64 | 82 | |
13918578 | 83 | if(!geom){ |
84 | Fatal("AliITStrackSA","ITS geometry not found - Abort\n"); | |
85 | return; | |
86 | } | |
87 | // get the azimuthal angle of the detector containing the innermost | |
88 | // cluster of this track (data member fAlpha) | |
89 | Float_t rotmatr[9]; | |
90 | geom->GetRotMatrix(layer,ladder,detector,rotmatr); | |
6c94f330 | 91 | Double_t sAlpha=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi(); |
92 | sAlpha+=TMath::Pi()/2.; | |
93 | if(layer==1) sAlpha+=TMath::Pi(); | |
13918578 | 94 | |
95 | ||
96 | // get the radius of this detector. Procedure taken from the | |
97 | // AliITStrackerV2 constructor | |
98 | Float_t x=0,y=0,z=0; | |
99 | geom->GetTrans(layer,ladder,detector,x,y,z); | |
100 | ||
101 | Double_t fi=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi(); | |
102 | fi+=TMath::Pi()/2; | |
103 | if (layer==1) fi+=TMath::Pi(); | |
104 | Double_t cp=TMath::Cos(fi), sp=TMath::Sin(fi); | |
6c94f330 | 105 | Double_t sX=x*cp+y*sp; |
13918578 | 106 | |
107 | ||
108 | fdEdx = 0; | |
109 | ||
6c94f330 | 110 | Double_t conv=GetBz()*kB2C; |
111 | Double_t sC[] = {0.000009, // 0.000009 | |
112 | 0., | |
113 | 0.000003, //0.000030 | |
114 | 0., | |
115 | 0., | |
116 | 0.000001, //0.000001 | |
117 | 0., | |
118 | 0., | |
119 | 0., | |
120 | 0.000002, //0.000002 | |
121 | 0., | |
122 | 0., | |
123 | 0., | |
124 | 0., | |
125 | 0.000001/(conv*conv)}; //0.0000001 | |
126 | ||
127 | Double_t sP[] = {Ycoor, | |
128 | Zcoor, | |
129 | TMath::Sin(phi-sAlpha), | |
130 | tanlambda, | |
131 | curv/conv}; | |
132 | ||
133 | Set(sX,sAlpha,sP,sC); | |
134 | ||
13918578 | 135 | for(Int_t i=0; i<kMaxLayer; i++) fIndex[i] = 0; // to be set explicitely |
136 | ||
137 | for(Int_t i=0; i<4; i++) fdEdxSample[i] = 0; | |
138 | ||
139 | SetNumberOfClusters(0); | |
140 | SetNumberOfClustersSA(0); | |
7e5bf5af | 141 | for(Int_t nlay=0;nlay<fgkLayers;nlay++) SetNumberOfMarked(nlay,0); |
13918578 | 142 | ResetIndexSA(); |
7e5bf5af | 143 | ResetMarked(); |
13918578 | 144 | SetChi2(0); |
145 | SetMass(0.139); // pion mass | |
146 | SetLabel(lab); | |
147 | ||
148 | } | |
149 | ||
150 | //____________________________________________________________ | |
151 | void AliITStrackSA::AddClusterSA(Int_t layer, Int_t clnumb) { | |
152 | // add one clusters to the list (maximum number=fgkMaxNumberOfClusters) | |
153 | Int_t presnum = GetNumberOfClustersSA(); | |
154 | if(presnum>=fgkMaxNumberOfClusters){ | |
155 | Warning("AddClusterSA","Maximum number of clusters already reached. Nothing is done\n"); | |
156 | return; | |
157 | } | |
158 | ||
159 | fSain[presnum] = (layer<<28)+clnumb; | |
160 | presnum++; | |
161 | SetNumberOfClustersSA(presnum); | |
162 | } | |
163 | ||
7e5bf5af | 164 | //____________________________________________________________ |
165 | void AliITStrackSA::AddClusterMark(Int_t layer, Int_t clnumb) { | |
166 | // add one clusters to the list (maximum number=fgkMaxNumberOfClusters) | |
167 | Int_t presnum = GetNumberOfMarked(layer); | |
168 | // printf("presnum=%d\n",presnum); | |
169 | if(presnum>=fgkMaxNumberOfClustersL){ | |
170 | Warning("AddClusterMark","Maximum number of clusters already reached. Nothing is done\n"); | |
171 | return; | |
172 | } | |
173 | ||
174 | fCluMark[layer][presnum] = clnumb; | |
175 | presnum++; | |
176 | SetNumberOfMarked(layer,presnum); | |
177 | } | |
178 | ||
13918578 | 179 | //____________________________________________________________ |
180 | void AliITStrackSA::AddClusterV2(Int_t layer,Int_t clnumb) { | |
181 | // add one clusters to the list (maximum number=6) | |
182 | Int_t presnum = GetNumberOfClusters(); | |
183 | if(presnum>=kMaxLayer){ | |
184 | Warning("AddClusterV2","Maximum number of clusters already reached. Nothing is done\n"); | |
185 | return; | |
186 | } | |
187 | ||
188 | fIndex[presnum] = (layer<<28)+clnumb; | |
189 | presnum++; | |
190 | SetNumberOfClusters(presnum); | |
191 | } | |
192 | ||
7e5bf5af | 193 | //_____________________________________________________________ |
194 | void AliITStrackSA::ResetMarked(){ | |
13918578 | 195 | |
7e5bf5af | 196 | //Reset array of marked clusters |
197 | for(Int_t nlay=0;nlay<fgkLayers;nlay++){ | |
198 | for(Int_t k=0; k<fgkMaxNumberOfClustersL; k++) fCluMark[nlay][k]=0; | |
199 | } | |
200 | } | |
13918578 | 201 | |
202 | ||
203 | ||
204 | ||
205 | ||
206 | ||
207 | ||
208 | ||
209 | ||
210 | ||
211 | ||
212 | ||
213 | ||
214 |