]>
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(); | |
38 | } | |
39 | ||
40 | ||
41 | //___________________________________________________ | |
15dd636f | 42 | AliITStrackSA::AliITStrackSA(const AliITStrackMI& t) : |
43 | AliITStrackMI(t){ | |
13918578 | 44 | // Copy a V2 track into a SA track |
45 | SetNumberOfClustersSA(0); | |
46 | ResetIndexSA(); | |
47 | } | |
48 | //___________________________________________________ | |
49 | AliITStrackSA::AliITStrackSA(const AliITStrackSA& t) : | |
15dd636f | 50 | AliITStrackMI(t){ |
13918578 | 51 | // Copy constructor |
52 | ||
7d62fb64 | 53 | |
13918578 | 54 | ResetIndexSA(); |
55 | Int_t number = t.GetNumberOfClustersSA(); | |
56 | SetNumberOfClustersSA(number); | |
57 | for(Int_t i=0;i<number;i++){ | |
58 | fSain[i]=t.fSain[i]; | |
59 | } | |
60 | ||
61 | } | |
62 | //____________________________________________________ | |
7d62fb64 | 63 | 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 | 64 | // standard constructor. Used for ITS standalone tracking |
7d62fb64 | 65 | |
13918578 | 66 | if(!geom){ |
67 | Fatal("AliITStrackSA","ITS geometry not found - Abort\n"); | |
68 | return; | |
69 | } | |
70 | // get the azimuthal angle of the detector containing the innermost | |
71 | // cluster of this track (data member fAlpha) | |
72 | Float_t rotmatr[9]; | |
73 | geom->GetRotMatrix(layer,ladder,detector,rotmatr); | |
74 | fAlpha=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi(); | |
75 | fAlpha+=TMath::Pi()/2.; | |
76 | if(layer==1) fAlpha+=TMath::Pi(); | |
77 | ||
78 | ||
79 | // get the radius of this detector. Procedure taken from the | |
80 | // AliITStrackerV2 constructor | |
81 | Float_t x=0,y=0,z=0; | |
82 | geom->GetTrans(layer,ladder,detector,x,y,z); | |
83 | ||
84 | Double_t fi=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi(); | |
85 | fi+=TMath::Pi()/2; | |
86 | if (layer==1) fi+=TMath::Pi(); | |
87 | Double_t cp=TMath::Cos(fi), sp=TMath::Sin(fi); | |
88 | fX=x*cp+y*sp; | |
89 | ||
90 | ||
91 | fdEdx = 0; | |
92 | ||
93 | fC00 = 0.000009; // 0.000009 | |
94 | fC10 = 0.; | |
95 | fC11 = 0.000003; //0.000030 | |
96 | fC20 = 0.; | |
97 | fC21 = 0.; | |
98 | fC22 = 0.000001; //0.000001 | |
99 | fC30 = 0.; | |
100 | fC31 = 0.; | |
101 | fC32 = 0.; | |
102 | fC33 = 0.000002; //0.000002 | |
103 | fC40 = 0.; | |
104 | fC41 = 0.; | |
105 | fC42 = 0.; | |
106 | fC43 = 0.; | |
107 | fC44 = 0.000001; //0.0000001 | |
108 | ||
109 | fP0 = Ycoor; | |
110 | fP1 = Zcoor; | |
111 | ||
112 | fP2 = TMath::Sin(phi-fAlpha); | |
113 | fP3 = tanlambda; | |
114 | fP4 = curv; | |
115 | for(Int_t i=0; i<kMaxLayer; i++) fIndex[i] = 0; // to be set explicitely | |
116 | ||
117 | for(Int_t i=0; i<4; i++) fdEdxSample[i] = 0; | |
118 | ||
119 | SetNumberOfClusters(0); | |
120 | SetNumberOfClustersSA(0); | |
121 | ResetIndexSA(); | |
122 | SetChi2(0); | |
123 | SetMass(0.139); // pion mass | |
124 | SetLabel(lab); | |
125 | ||
7d62fb64 | 126 | |
13918578 | 127 | } |
128 | ||
129 | //____________________________________________________________ | |
130 | void AliITStrackSA::AddClusterSA(Int_t layer, Int_t clnumb) { | |
131 | // add one clusters to the list (maximum number=fgkMaxNumberOfClusters) | |
132 | Int_t presnum = GetNumberOfClustersSA(); | |
133 | if(presnum>=fgkMaxNumberOfClusters){ | |
134 | Warning("AddClusterSA","Maximum number of clusters already reached. Nothing is done\n"); | |
135 | return; | |
136 | } | |
137 | ||
138 | fSain[presnum] = (layer<<28)+clnumb; | |
139 | presnum++; | |
140 | SetNumberOfClustersSA(presnum); | |
141 | } | |
142 | ||
143 | //____________________________________________________________ | |
144 | void AliITStrackSA::AddClusterV2(Int_t layer,Int_t clnumb) { | |
145 | // add one clusters to the list (maximum number=6) | |
146 | Int_t presnum = GetNumberOfClusters(); | |
147 | if(presnum>=kMaxLayer){ | |
148 | Warning("AddClusterV2","Maximum number of clusters already reached. Nothing is done\n"); | |
149 | return; | |
150 | } | |
151 | ||
152 | fIndex[presnum] = (layer<<28)+clnumb; | |
153 | presnum++; | |
154 | SetNumberOfClusters(presnum); | |
155 | } | |
156 | ||
157 | ||
158 | ||
159 | ||
160 | ||
161 | ||
162 | ||
163 | ||
164 | ||
165 | ||
166 | ||
167 | ||
168 | ||
169 | ||
170 | ||
171 | ||
172 | ||
173 |