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