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