]>
Commit | Line | Data |
---|---|---|
6fc428f0 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, 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 | ||
17 | /////////////////////////////////////////////////////////////////////////////// | |
18 | // // | |
19 | // // | |
20 | // Comparison class for V0 information // | |
21 | // responsible: | |
22 | // marian.ivanov@cern.ch // | |
23 | // | |
24 | // | |
25 | ||
26 | ||
27 | ||
28 | ||
29 | ||
30 | #include <stdio.h> | |
31 | #include <string.h> | |
32 | //ROOT includes | |
33 | #include "Rtypes.h" | |
34 | // | |
35 | //ALIROOT includes | |
36 | // | |
37 | #include "AliESDtrack.h" | |
38 | #include "AliTPCParam.h" | |
39 | #include "AliTrackReference.h" | |
40 | #include "AliTPCParamSR.h" | |
41 | #include "AliESD.h" | |
42 | #include "AliESDfriend.h" | |
43 | #include "AliESDtrack.h" | |
44 | #include "AliTPCseed.h" | |
45 | #include "AliITStrackMI.h" | |
46 | #include "AliTRDtrack.h" | |
47 | #include "AliHelix.h" | |
48 | #include "AliESDVertex.h" | |
49 | #include "AliExternalTrackParam.h" | |
50 | #include "AliESDkink.h" | |
51 | #include "AliESDv0.h" | |
52 | #include "AliV0.h" | |
53 | // | |
54 | #include "AliTreeDraw.h" | |
76472f75 | 55 | #include "AliMCInfo.h" |
56 | #include "AliGenKinkInfo.h" | |
57 | #include "AliGenV0Info.h" | |
58 | ||
6fc428f0 | 59 | |
60 | #include "AliESDRecV0Info.h" | |
61 | ||
62 | ||
63 | ||
64 | ClassImp(AliESDRecV0Info) | |
65 | ||
66 | ||
cd875161 | 67 | AliESDRecV0Info:: AliESDRecV0Info(): |
68 | TObject(), | |
69 | fT1(), //track1 | |
70 | fT2(), //track2 | |
71 | fDist1(0), //info about closest distance according closest MC - linear DCA | |
72 | fDist2(0), //info about closest distance parabolic DCA | |
73 | fInvMass(0), //reconstructed invariant mass - | |
74 | // | |
75 | fDistMinR(0), // distance at minimal radius | |
76 | fRr(0), // rec position of the vertex | |
77 | fPointAngleFi(0), //point angle fi | |
78 | fPointAngleTh(0), //point angle theta | |
79 | fPointAngle(0), //point angle full | |
80 | fV0Status(0), // status of the kink | |
81 | fV0tpc(0), // Vo information from reconsturction according TPC | |
82 | fV0its(0), // Vo information from reconsturction according ITS | |
83 | fV0rec(0), // V0 information form the reconstruction | |
84 | fMultiple(0), // how man times V0 was recostructed | |
85 | fV0Multiple(0), // how man times was V0 reconstucted | |
86 | fRecStatus(0) // status form the reconstuction | |
87 | { | |
88 | // | |
89 | // default constructor | |
90 | // | |
a1e6aa99 | 91 | fV0tpc = new AliV0(); |
92 | fV0its = new AliV0(); | |
cd875161 | 93 | } |
6fc428f0 | 94 | |
95 | ||
96 | void AliESDRecV0Info::Update(Float_t vertex[3]) | |
97 | { | |
98 | ||
99 | if ( (fT1.fStatus[1]>0)&& (fT2.fStatus[1]>0)){ | |
100 | Float_t distance1,distance2; | |
101 | Double_t xx[3],pp[3]; | |
102 | // | |
103 | Double_t xd[3],pd[3],signd; | |
104 | Double_t xm[3],pm[3],signm; | |
105 | // | |
106 | // | |
107 | if (fT1.fITSOn&&fT2.fITSOn){ | |
108 | for (Int_t i=0;i<3;i++){ | |
109 | xd[i] = fT2.fITSinR1[i]; | |
110 | pd[i] = fT2.fITSinP1[i]; | |
111 | xm[i] = fT1.fITSinR1[i]; | |
112 | pm[i] = fT1.fITSinP1[i]; | |
113 | } | |
114 | } | |
115 | else{ | |
116 | ||
117 | for (Int_t i=0;i<3;i++){ | |
118 | xd[i] = fT2.fTPCinR1[i]; | |
119 | pd[i] = fT2.fTPCinP1[i]; | |
120 | xm[i] = fT1.fTPCinR1[i]; | |
121 | pm[i] = fT1.fTPCinP1[i]; | |
122 | } | |
123 | } | |
124 | // | |
125 | // | |
126 | signd = fT2.fSign<0 ? -1:1; | |
127 | signm = fT1.fSign<0 ? -1:1; | |
128 | ||
129 | AliHelix dhelix1(xd,pd,signd); | |
130 | dhelix1.GetMomentum(0,pp,0); | |
131 | dhelix1.Evaluate(0,xx); | |
132 | // | |
133 | // Double_t x2[3],p2[3]; | |
134 | // | |
135 | AliHelix mhelix(xm,pm,signm); | |
136 | // | |
137 | //find intersection linear | |
138 | // | |
139 | Double_t phase[2][2],radius[2]; | |
140 | Int_t points = dhelix1.GetRPHIintersections(mhelix, phase, radius,200); | |
141 | Double_t delta1=10000,delta2=10000; | |
142 | ||
143 | if (points==1){ | |
144 | fRs[0] = TMath::Sqrt(radius[0]); | |
145 | fRs[1] = TMath::Sqrt(radius[0]); | |
146 | } | |
147 | if (points==2){ | |
148 | fRs[0] =TMath::Min(TMath::Sqrt(radius[0]),TMath::Sqrt(radius[1])); | |
149 | fRs[1] =TMath::Max(TMath::Sqrt(radius[0]),TMath::Sqrt(radius[1])); | |
150 | } | |
151 | ||
152 | if (points>0){ | |
153 | dhelix1.LinearDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1); | |
154 | dhelix1.LinearDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1); | |
155 | dhelix1.LinearDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1); | |
156 | } | |
157 | if (points==2){ | |
158 | dhelix1.LinearDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2); | |
159 | dhelix1.LinearDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2); | |
160 | dhelix1.LinearDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2); | |
161 | } | |
162 | if (points==1){ | |
163 | fRs[0] = TMath::Sqrt(radius[0]); | |
164 | fRs[1] = TMath::Sqrt(radius[0]); | |
165 | fDistMinR = delta1; | |
166 | } | |
167 | if (points==2){ | |
168 | if (radius[0]<radius[1]){ | |
169 | fRs[0] = TMath::Sqrt(radius[0]); | |
170 | fRs[1] = TMath::Sqrt(radius[1]); | |
171 | fDistMinR = delta1; | |
172 | } | |
173 | else{ | |
174 | fRs[0] = TMath::Sqrt(radius[1]); | |
175 | fRs[1] = TMath::Sqrt(radius[0]); | |
176 | fDistMinR = delta2; | |
177 | } | |
178 | } | |
179 | // | |
180 | // | |
181 | distance1 = TMath::Min(delta1,delta2); | |
182 | // | |
183 | //find intersection parabolic | |
184 | // | |
185 | points = dhelix1.GetRPHIintersections(mhelix, phase, radius); | |
186 | delta1=10000,delta2=10000; | |
187 | ||
188 | if (points>0){ | |
189 | dhelix1.ParabolicDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1); | |
190 | } | |
191 | if (points==2){ | |
192 | dhelix1.ParabolicDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2); | |
193 | } | |
194 | ||
195 | distance2 = TMath::Min(delta1,delta2); | |
196 | if (distance2>100) fDist2 =100; | |
197 | return; | |
198 | if (delta1<delta2){ | |
199 | //get V0 info | |
200 | dhelix1.Evaluate(phase[0][0],fXr); | |
201 | dhelix1.GetMomentum(phase[0][0],fPdr); | |
202 | mhelix.GetMomentum(phase[0][1],fPm); | |
203 | dhelix1.GetAngle(phase[0][0],mhelix,phase[0][1],fAngle); | |
204 | fRr = TMath::Sqrt(radius[0]); | |
205 | } | |
206 | else{ | |
207 | dhelix1.Evaluate(phase[1][0],fXr); | |
208 | dhelix1.GetMomentum(phase[1][0], fPdr); | |
209 | mhelix.GetMomentum(phase[1][1], fPm); | |
210 | dhelix1.GetAngle(phase[1][0],mhelix,phase[1][1],fAngle); | |
211 | fRr = TMath::Sqrt(radius[1]); | |
212 | } | |
213 | fDist1 = TMath::Sqrt(distance1); | |
214 | fDist2 = TMath::Sqrt(distance2); | |
215 | ||
216 | if (fDist2<10.5){ | |
217 | Double_t x,alpha,param[5],cov[15]; | |
218 | // | |
219 | fT1.GetESDtrack()->GetInnerExternalParameters(alpha,x,param); | |
220 | fT1.GetESDtrack()->GetInnerExternalCovariance(cov); | |
221 | AliExternalTrackParam paramm(x,alpha,param,cov); | |
222 | // | |
223 | fT2.GetESDtrack()->GetInnerExternalParameters(alpha,x,param); | |
224 | fT2.GetESDtrack()->GetInnerExternalCovariance(cov); | |
225 | AliExternalTrackParam paramd(x,alpha,param,cov); | |
226 | } | |
227 | // | |
228 | // | |
229 | ||
230 | Float_t v[3] = {fXr[0]-vertex[0],fXr[1]-vertex[1],fXr[2]-vertex[2]}; | |
231 | Float_t p[3] = {fPdr[0]+fPm[0], fPdr[1]+fPm[1],fPdr[2]+fPm[2]}; | |
232 | ||
233 | Float_t vnorm2 = v[0]*v[0]+v[1]*v[1]; | |
234 | Float_t vnorm3 = TMath::Sqrt(v[2]*v[2]+vnorm2); | |
235 | vnorm2 = TMath::Sqrt(vnorm2); | |
236 | Float_t pnorm2 = p[0]*p[0]+p[1]*p[1]; | |
237 | Float_t pnorm3 = TMath::Sqrt(p[2]*p[2]+pnorm2); | |
238 | pnorm2 = TMath::Sqrt(pnorm2); | |
239 | ||
240 | fPointAngleFi = (v[0]*p[0]+v[1]*p[1])/(vnorm2*pnorm2); | |
241 | fPointAngleTh = (v[2]*p[2]+vnorm2*pnorm2)/(vnorm3*pnorm3); | |
242 | fPointAngle = (v[0]*p[0]+v[1]*p[1]+v[2]*p[2])/(vnorm3*pnorm3); | |
243 | } | |
244 | } | |
245 |