]>
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" | |
55 | #include "AliGenInfo.h" | |
56 | ||
57 | #include "AliESDRecV0Info.h" | |
58 | ||
59 | ||
60 | ||
61 | ClassImp(AliESDRecV0Info) | |
62 | ||
63 | ||
64 | ||
65 | ||
66 | ||
67 | void AliESDRecV0Info::Update(Float_t vertex[3]) | |
68 | { | |
69 | ||
70 | if ( (fT1.fStatus[1]>0)&& (fT2.fStatus[1]>0)){ | |
71 | Float_t distance1,distance2; | |
72 | Double_t xx[3],pp[3]; | |
73 | // | |
74 | Double_t xd[3],pd[3],signd; | |
75 | Double_t xm[3],pm[3],signm; | |
76 | // | |
77 | // | |
78 | if (fT1.fITSOn&&fT2.fITSOn){ | |
79 | for (Int_t i=0;i<3;i++){ | |
80 | xd[i] = fT2.fITSinR1[i]; | |
81 | pd[i] = fT2.fITSinP1[i]; | |
82 | xm[i] = fT1.fITSinR1[i]; | |
83 | pm[i] = fT1.fITSinP1[i]; | |
84 | } | |
85 | } | |
86 | else{ | |
87 | ||
88 | for (Int_t i=0;i<3;i++){ | |
89 | xd[i] = fT2.fTPCinR1[i]; | |
90 | pd[i] = fT2.fTPCinP1[i]; | |
91 | xm[i] = fT1.fTPCinR1[i]; | |
92 | pm[i] = fT1.fTPCinP1[i]; | |
93 | } | |
94 | } | |
95 | // | |
96 | // | |
97 | signd = fT2.fSign<0 ? -1:1; | |
98 | signm = fT1.fSign<0 ? -1:1; | |
99 | ||
100 | AliHelix dhelix1(xd,pd,signd); | |
101 | dhelix1.GetMomentum(0,pp,0); | |
102 | dhelix1.Evaluate(0,xx); | |
103 | // | |
104 | // Double_t x2[3],p2[3]; | |
105 | // | |
106 | AliHelix mhelix(xm,pm,signm); | |
107 | // | |
108 | //find intersection linear | |
109 | // | |
110 | Double_t phase[2][2],radius[2]; | |
111 | Int_t points = dhelix1.GetRPHIintersections(mhelix, phase, radius,200); | |
112 | Double_t delta1=10000,delta2=10000; | |
113 | ||
114 | if (points==1){ | |
115 | fRs[0] = TMath::Sqrt(radius[0]); | |
116 | fRs[1] = TMath::Sqrt(radius[0]); | |
117 | } | |
118 | if (points==2){ | |
119 | fRs[0] =TMath::Min(TMath::Sqrt(radius[0]),TMath::Sqrt(radius[1])); | |
120 | fRs[1] =TMath::Max(TMath::Sqrt(radius[0]),TMath::Sqrt(radius[1])); | |
121 | } | |
122 | ||
123 | if (points>0){ | |
124 | dhelix1.LinearDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1); | |
125 | dhelix1.LinearDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1); | |
126 | dhelix1.LinearDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1); | |
127 | } | |
128 | if (points==2){ | |
129 | dhelix1.LinearDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2); | |
130 | dhelix1.LinearDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2); | |
131 | dhelix1.LinearDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2); | |
132 | } | |
133 | if (points==1){ | |
134 | fRs[0] = TMath::Sqrt(radius[0]); | |
135 | fRs[1] = TMath::Sqrt(radius[0]); | |
136 | fDistMinR = delta1; | |
137 | } | |
138 | if (points==2){ | |
139 | if (radius[0]<radius[1]){ | |
140 | fRs[0] = TMath::Sqrt(radius[0]); | |
141 | fRs[1] = TMath::Sqrt(radius[1]); | |
142 | fDistMinR = delta1; | |
143 | } | |
144 | else{ | |
145 | fRs[0] = TMath::Sqrt(radius[1]); | |
146 | fRs[1] = TMath::Sqrt(radius[0]); | |
147 | fDistMinR = delta2; | |
148 | } | |
149 | } | |
150 | // | |
151 | // | |
152 | distance1 = TMath::Min(delta1,delta2); | |
153 | // | |
154 | //find intersection parabolic | |
155 | // | |
156 | points = dhelix1.GetRPHIintersections(mhelix, phase, radius); | |
157 | delta1=10000,delta2=10000; | |
158 | ||
159 | if (points>0){ | |
160 | dhelix1.ParabolicDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1); | |
161 | } | |
162 | if (points==2){ | |
163 | dhelix1.ParabolicDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2); | |
164 | } | |
165 | ||
166 | distance2 = TMath::Min(delta1,delta2); | |
167 | if (distance2>100) fDist2 =100; | |
168 | return; | |
169 | if (delta1<delta2){ | |
170 | //get V0 info | |
171 | dhelix1.Evaluate(phase[0][0],fXr); | |
172 | dhelix1.GetMomentum(phase[0][0],fPdr); | |
173 | mhelix.GetMomentum(phase[0][1],fPm); | |
174 | dhelix1.GetAngle(phase[0][0],mhelix,phase[0][1],fAngle); | |
175 | fRr = TMath::Sqrt(radius[0]); | |
176 | } | |
177 | else{ | |
178 | dhelix1.Evaluate(phase[1][0],fXr); | |
179 | dhelix1.GetMomentum(phase[1][0], fPdr); | |
180 | mhelix.GetMomentum(phase[1][1], fPm); | |
181 | dhelix1.GetAngle(phase[1][0],mhelix,phase[1][1],fAngle); | |
182 | fRr = TMath::Sqrt(radius[1]); | |
183 | } | |
184 | fDist1 = TMath::Sqrt(distance1); | |
185 | fDist2 = TMath::Sqrt(distance2); | |
186 | ||
187 | if (fDist2<10.5){ | |
188 | Double_t x,alpha,param[5],cov[15]; | |
189 | // | |
190 | fT1.GetESDtrack()->GetInnerExternalParameters(alpha,x,param); | |
191 | fT1.GetESDtrack()->GetInnerExternalCovariance(cov); | |
192 | AliExternalTrackParam paramm(x,alpha,param,cov); | |
193 | // | |
194 | fT2.GetESDtrack()->GetInnerExternalParameters(alpha,x,param); | |
195 | fT2.GetESDtrack()->GetInnerExternalCovariance(cov); | |
196 | AliExternalTrackParam paramd(x,alpha,param,cov); | |
197 | } | |
198 | // | |
199 | // | |
200 | ||
201 | Float_t v[3] = {fXr[0]-vertex[0],fXr[1]-vertex[1],fXr[2]-vertex[2]}; | |
202 | Float_t p[3] = {fPdr[0]+fPm[0], fPdr[1]+fPm[1],fPdr[2]+fPm[2]}; | |
203 | ||
204 | Float_t vnorm2 = v[0]*v[0]+v[1]*v[1]; | |
205 | Float_t vnorm3 = TMath::Sqrt(v[2]*v[2]+vnorm2); | |
206 | vnorm2 = TMath::Sqrt(vnorm2); | |
207 | Float_t pnorm2 = p[0]*p[0]+p[1]*p[1]; | |
208 | Float_t pnorm3 = TMath::Sqrt(p[2]*p[2]+pnorm2); | |
209 | pnorm2 = TMath::Sqrt(pnorm2); | |
210 | ||
211 | fPointAngleFi = (v[0]*p[0]+v[1]*p[1])/(vnorm2*pnorm2); | |
212 | fPointAngleTh = (v[2]*p[2]+vnorm2*pnorm2)/(vnorm3*pnorm3); | |
213 | fPointAngle = (v[0]*p[0]+v[1]*p[1]+v[2]*p[2])/(vnorm3*pnorm3); | |
214 | } | |
215 | } | |
216 |