Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
Helix.cc
Go to the documentation of this file.
1
9#include "Objects/Helix.h"
10
11#include <cmath>
12#include <iostream>
13#include <limits>
14
15namespace pandora
16{
17
18const float Helix::FCT = 2.99792458E-4f;
19const float Helix::TWO_PI = static_cast<float>(2. * std::acos(-1.0));
20const float Helix::HALF_PI = static_cast<float>(0.5 * std::acos(-1.0));
21
22//------------------------------------------------------------------------------------------------------------------------------------------
23
24Helix::Helix(const float phi0, const float d0, const float z0, const float omega, const float tanLambda, const float bField) :
25 m_referencePoint(0.f, 0.f, 0.f),
26 m_momentum(0.f, 0.f, 0.f),
27 m_phi0(phi0),
28 m_d0(d0),
29 m_z0(z0),
30 m_omega(omega),
31 m_tanLambda(tanLambda)
32{
33 if ((bField < std::numeric_limits<float>::epsilon()) || (std::fabs(omega) < std::numeric_limits<float>::epsilon()))
34 {
35 std::cout << "Helix, invalid parameter: bField " << bField << ", omega " << omega << std::endl;
36 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
37 }
38
39 m_charge = omega / std::fabs(omega);
40 m_radius = 1.f / std::fabs(omega);
41 m_xAtPCA = -m_d0 * std::sin(m_phi0);
42 m_yAtPCA = m_d0 * std::cos(m_phi0);
44 m_pxy = FCT * bField * m_radius;
45 m_momentum.SetValues(m_pxy * std::cos(m_phi0), m_pxy * std::sin(m_phi0), m_tanLambda * m_pxy);
51 m_phiAtPCA = std::atan2(-m_yCentre, -m_xCentre);
53}
54
55//------------------------------------------------------------------------------------------------------------------------------------------
56
57Helix::Helix(const CartesianVector &position, const CartesianVector &momentum, const float charge, const float bField) :
58 m_referencePoint(position),
59 m_momentum(momentum),
60 m_charge(charge)
61{
62 const double px(momentum.GetX()), py(momentum.GetY());
63 const double pxy(std::sqrt(px * px + py * py));
64
65 if ((bField < std::numeric_limits<float>::epsilon()) || (std::fabs(pxy) < std::numeric_limits<float>::epsilon()))
66 {
67 std::cout << "Helix, invalid parameter: bField " << bField << ", pxy " << pxy << std::endl;
68 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
69 }
70
71 const double radius(pxy / (FCT * bField));
72 m_pxy = static_cast<float>(pxy);
73 m_radius = static_cast<float>(radius);
74
75 m_omega = charge / m_radius;
76 m_tanLambda = momentum.GetZ() / m_pxy;
77 m_phiMomRefPoint = static_cast<float>(std::atan2(py, px));
78
79 const double x(position.GetX()), y(position.GetY());
80 const double xCentre(x + radius * static_cast<double>(std::cos(m_phiMomRefPoint - HALF_PI * charge)));
81 const double yCentre(y + radius * static_cast<double>(std::sin(m_phiMomRefPoint - HALF_PI * charge)));
82 m_xCentre = static_cast<float>(xCentre);
83 m_yCentre = static_cast<float>(yCentre);
84
85 double d0;
86 if (charge > 0)
87 {
88 d0 = static_cast<double>(charge) * radius - static_cast<double>(std::sqrt(xCentre * xCentre + yCentre * yCentre));
89 }
90 else
91 {
92 d0 = static_cast<double>(charge) * radius + static_cast<double>(std::sqrt(xCentre * xCentre + yCentre * yCentre));
93 }
94 m_d0 = static_cast<float>(d0);
95
96 m_phiRefPoint = static_cast<float>(std::atan2(y - yCentre, x - xCentre));
97 m_phiAtPCA = static_cast<float>(std::atan2(-yCentre, -xCentre));
98 m_phi0 = -HALF_PI * charge + m_phiAtPCA;
99
100 while (m_phi0 < 0.)
101 m_phi0 += TWO_PI;
102
103 while (m_phi0 >= TWO_PI)
104 m_phi0 -= TWO_PI;
105
106 m_xAtPCA = m_xCentre + m_radius * std::cos(m_phiAtPCA);
107 m_yAtPCA = m_yCentre + m_radius * std::sin(m_phiAtPCA);
108 m_pxAtPCA = m_pxy * std::cos(m_phi0);
109 m_pyAtPCA = m_pxy * std::sin(m_phi0);
110
111 float deltaPhi = m_phiRefPoint - m_phiAtPCA;
112 float xCircles = (-position.GetZ() * charge) / (TWO_PI * ((m_radius * m_tanLambda) - deltaPhi));
113
114 int n1, n2;
115 if (xCircles >= std::numeric_limits<float>::epsilon())
116 {
117 n1 = static_cast<int>(xCircles);
118 n2 = n1 + 1;
119 }
120 else
121 {
122 n1 = static_cast<int>(xCircles) - 1;
123 n2 = n1 + 1;
124 }
125
126 const int nCircles((std::fabs(n1 - xCircles) < std::fabs(n2 - xCircles) ? n1 : n2));
127 m_z0 = position.GetZ() + m_radius * m_tanLambda * charge * (deltaPhi + TWO_PI * nCircles);
128}
129
130//------------------------------------------------------------------------------------------------------------------------------------------
131
132StatusCode Helix::GetPointInXY(const float x0, const float y0, const float ax, const float ay, const CartesianVector &referencePoint,
133 CartesianVector &intersectionPoint, float &genericTime) const
134{
135 const float AA(std::sqrt(ax * ax + ay * ay));
136
137 if (AA <= 0)
138 return STATUS_CODE_FAILURE;
139
140 const float BB((ax * (x0 - m_xCentre) + ay * (y0 - m_yCentre)) / AA);
141 const float CC(((x0 - m_xCentre) * (x0 - m_xCentre) + (y0 - m_yCentre) * (y0 - m_yCentre) - m_radius * m_radius) / AA);
142
143 const float DET(BB * BB - CC);
144
145 if (DET < 0)
146 return STATUS_CODE_NOT_FOUND;
147
148 float tt1(-BB + std::sqrt(DET));
149 float tt2(-BB - std::sqrt(DET));
150
151 const float xx1(x0 + tt1 * ax);
152 const float yy1(y0 + tt1 * ay);
153 const float xx2(x0 + tt2 * ax);
154 const float yy2(y0 + tt2 * ay);
155
156 const float phi1(std::atan2(yy1 - m_yCentre, xx1 - m_xCentre));
157 const float phi2(std::atan2(yy2 - m_yCentre, xx2 - m_xCentre));
158 const float phi0(std::atan2(referencePoint.GetY() - m_yCentre, referencePoint.GetX() - m_xCentre));
159
160 float dphi1(phi1 - phi0);
161 float dphi2(phi2 - phi0);
162
163 if (dphi1 < 0 && m_charge < 0)
164 {
165 dphi1 = dphi1 + TWO_PI;
166 }
167 else if (dphi1 > 0 && m_charge > 0)
168 {
169 dphi1 = dphi1 - TWO_PI;
170 }
171
172 if (dphi2 < 0 && m_charge < 0)
173 {
174 dphi2 = dphi2 + TWO_PI;
175 }
176 else if (dphi2 > 0 && m_charge > 0)
177 {
178 dphi2 = dphi2 - TWO_PI;
179 }
180
181 // Calculate generic time
182 tt1 = -m_charge * dphi1 * m_radius / m_pxy;
183 tt2 = -m_charge * dphi2 * m_radius / m_pxy;
184
185 if ((tt1 < 0.) || (tt2 < 0.))
186 std::cout << "Helix:: GetPointInXY, warning - negative generic time, tt1 " << tt1 << ", tt2 " << tt2 << std::endl;
187
188 if (tt1 < tt2)
189 {
190 genericTime = tt1;
191 intersectionPoint.SetValues(xx1, yy1, referencePoint.GetZ() + genericTime * m_momentum.GetZ());
192 }
193 else
194 {
195 genericTime = tt2;
196 intersectionPoint.SetValues(xx2, yy2, referencePoint.GetZ() + genericTime * m_momentum.GetZ());
197 }
198
199 return STATUS_CODE_SUCCESS;
200}
201
202//------------------------------------------------------------------------------------------------------------------------------------------
203
204StatusCode Helix::GetPointInZ(const float zPlane, const CartesianVector &referencePoint, CartesianVector &intersectionPoint,
205 float &genericTime) const
206{
207 if (std::fabs(m_momentum.GetZ()) < std::numeric_limits<float>::epsilon())
208 return STATUS_CODE_NOT_FOUND;
209
210 genericTime = (zPlane - referencePoint.GetZ()) / m_momentum.GetZ();
211
212 const float phi0(std::atan2(referencePoint.GetY() - m_yCentre, referencePoint.GetX() - m_xCentre));
213 const float phi(phi0 - m_charge * m_pxy * genericTime / m_radius);
214
215 intersectionPoint.SetValues(m_xCentre + m_radius * std::cos(phi), m_yCentre + m_radius * std::sin(phi), zPlane);
216
217 return STATUS_CODE_SUCCESS;
218}
219
220//------------------------------------------------------------------------------------------------------------------------------------------
221
222StatusCode Helix::GetPointOnCircle(const float radius, const CartesianVector &referencePoint, CartesianVector &intersectionPoint,
223 float &genericTime) const
224{
225 const float distCenterToIP(std::sqrt(m_xCentre * m_xCentre + m_yCentre * m_yCentre));
226
227 if ( ((distCenterToIP + m_radius) < radius) || ((m_radius + radius) < distCenterToIP) )
228 return STATUS_CODE_NOT_FOUND;
229
230 const float phiCentre(std::atan2(m_yCentre, m_xCentre));
231
232 float phiStar(radius * radius + distCenterToIP * distCenterToIP - m_radius * m_radius);
233 phiStar = 0.5f * phiStar / std::max(1.e-20f, radius * distCenterToIP);
234
235 if (phiStar > 1.f)
236 phiStar = 0.9999999f;
237
238 if (phiStar < -1.f)
239 phiStar = -0.9999999f;
240
241 phiStar = std::acos(phiStar);
242
243 const float xx1(radius * std::cos(phiCentre + phiStar));
244 const float yy1(radius * std::sin(phiCentre + phiStar));
245
246 const float xx2(radius * std::cos(phiCentre-phiStar));
247 const float yy2(radius * std::sin(phiCentre-phiStar));
248
249 const float phi1(std::atan2(yy1 - m_yCentre, xx1 - m_xCentre));
250 const float phi2(std::atan2(yy2 - m_yCentre, xx2 - m_xCentre));
251 const float phi0(std::atan2(referencePoint.GetY() - m_yCentre, referencePoint.GetX() - m_xCentre));
252
253 float dphi1(phi1 - phi0);
254 float dphi2(phi2 - phi0);
255
256 if (dphi1 < 0 && m_charge < 0)
257 {
258 dphi1 = dphi1 + TWO_PI;
259 }
260 else if (dphi1 > 0 && m_charge > 0)
261 {
262 dphi1 = dphi1 - TWO_PI;
263 }
264
265 if (dphi2 < 0 && m_charge < 0)
266 {
267 dphi2 = dphi2 + TWO_PI;
268 }
269 else if (dphi2 > 0 && m_charge > 0)
270 {
271 dphi2 = dphi2 - TWO_PI;
272 }
273
274 // Calculate generic time
275 const float tt1(-m_charge * dphi1 * m_radius / m_pxy);
276 const float tt2(-m_charge * dphi2 * m_radius / m_pxy);
277
278 if ((tt1 < 0.) || (tt2 < 0.))
279 std::cout << "Helix:: GetPointOnCircle, warning - negative generic time, tt1 " << tt1 << ", tt2 " << tt2 << std::endl;
280
281 // Previously returned both xx1, xx2, etc.
282 if (tt1 < tt2)
283 {
284 genericTime = tt1;
285 intersectionPoint.SetValues(xx1, yy1, referencePoint.GetZ() + genericTime * m_momentum.GetZ());
286 }
287 else
288 {
289 genericTime = tt2;
290 intersectionPoint.SetValues(xx2, yy2, referencePoint.GetZ() + genericTime * m_momentum.GetZ());
291 }
292
293 return STATUS_CODE_SUCCESS;
294}
295
296//------------------------------------------------------------------------------------------------------------------------------------------
297
298StatusCode Helix::GetDistanceToPoint(const CartesianVector &point, CartesianVector &distance, float &genericTime) const
299{
300 const float phi(std::atan2(point.GetY() - m_yCentre, point.GetX() - m_xCentre));
301 const float phi0(std::atan2(m_referencePoint.GetY() - m_yCentre, m_referencePoint.GetX() - m_xCentre));
302
303 int nCircles = 0;
304 if (std::fabs(m_tanLambda * m_radius) > 1.e-20)
305 {
306 const float xCircles((phi0 - phi - m_charge * (point.GetZ() - m_referencePoint.GetZ()) / (m_tanLambda * m_radius)) / TWO_PI);
307
308 int n1, n2;
309 if (xCircles >= std::numeric_limits<float>::epsilon())
310 {
311 n1 = static_cast<int>(xCircles);
312 n2 = n1 + 1;
313 }
314 else
315 {
316 n1 = static_cast<int>(xCircles) - 1;
317 n2 = n1 + 1;
318 }
319
320 nCircles = ((std::fabs(n1 - xCircles) < std::fabs(n2 - xCircles) ? n1 : n2));
321 }
322
323 const float dPhi(TWO_PI * (static_cast<float>(nCircles)) + phi - phi0);
324 const float zOnHelix(m_referencePoint.GetZ() - m_charge * m_radius * m_tanLambda * dPhi);
325
326 const float distX(std::fabs(m_xCentre - point.GetX()));
327 const float distY(std::fabs(m_yCentre - point.GetY()));
328 const float distZ(std::fabs(zOnHelix - point.GetZ()));
329
330 float distXY(std::sqrt(distX * distX + distY * distY));
331 distXY = std::fabs(distXY - m_radius);
332
333 distance.SetValues(distXY, distZ, std::sqrt(distXY * distXY + distZ * distZ));
334
335 if (std::fabs(m_momentum.GetZ()) > 0)
336 {
337 genericTime = (zOnHelix - m_referencePoint.GetZ()) / m_momentum.GetZ();
338 }
339 else
340 {
341 genericTime = m_charge * m_radius * dPhi / m_pxy;
342 }
343
344 return STATUS_CODE_SUCCESS;
345}
346
347//------------------------------------------------------------------------------------------------------------------------------------------
348
349StatusCode Helix::GetDistanceToHelix(const Helix *const pHelix, CartesianVector &positionOfClosestApproach, CartesianVector &v0momentum,
350 float &helixDistance) const
351{
352 if (this == pHelix)
353 return STATUS_CODE_INVALID_PARAMETER;
354
355 const float x01(this->GetXCentre());
356 const float y01(this->GetYCentre());
357
358 const float x02(pHelix->GetXCentre());
359 const float y02(pHelix->GetYCentre());
360
361 const float rad1(this->GetRadius());
362 const float rad2(pHelix->GetRadius());
363
364 const float distance(std::sqrt((x01-x02) * (x01-x02) + (y01-y02) * (y01-y02)));
365
366 bool singlePoint(true);
367 float phi1(0.), phi2(0.);
368
369 if (rad1 + rad2 < distance)
370 {
371 phi1 = std::atan2(y02 - y01, x02 - x01);
372 phi2 = std::atan2(y01 - y02, x01 - x02);
373 }
374 else if (distance + rad2 < rad1)
375 {
376 phi1 = std::atan2(y02 - y01, x02 - x01);
377 phi2 = phi1;
378 }
379 else if (distance + rad1 < rad2)
380 {
381 phi1 = std::atan2(y01 - y02, x01 - x02);
382 phi2 = phi1;
383 }
384 else
385 {
386 if ((std::fabs(distance) < std::numeric_limits<float>::epsilon()) || (std::fabs(rad2) < std::numeric_limits<float>::epsilon()))
387 return STATUS_CODE_FAILURE;
388
389 singlePoint = false;
390 float cosAlpha = 0.5f * (distance * distance + rad2 * rad2 - rad1 * rad1) / (distance * rad2);
391 float alpha = std::acos(cosAlpha);
392 float phi0 = std::atan2(y01 - y02, x01 - x02);
393 phi1 = phi0 + alpha;
394 phi2 = phi0 - alpha;
395 }
396
397 const CartesianVector &referencePoint1(m_referencePoint);
398 const CartesianVector &referencePoint2(pHelix->GetReferencePoint());
399
400 CartesianVector position1(0.f, 0.f, 0.f), position2(0.f, 0.f, 0.f);
401
402 if (singlePoint)
403 {
404 const float xSect1(x01 + rad1 * std::cos(phi1));
405 const float ySect1(y01 + rad1 * std::sin(phi1));
406 const float xSect2(x02 + rad2 * std::cos(phi2));
407 const float ySect2(y02 + rad2 * std::sin(phi2));
408 const float r1(std::sqrt(xSect1 * xSect1 + ySect1 * ySect1));
409 const float r2(std::sqrt(xSect2 * xSect2 + ySect2 * ySect2));
410
411 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, this->GetPointOnCircle(r1, referencePoint1, position1));
412 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, pHelix->GetPointOnCircle(r2, referencePoint2, position2));
413 }
414 else
415 {
416 const float xSect1(x02 + rad2*std::cos(phi1));
417 const float ySect1(y02 + rad2*std::sin(phi1));
418 const float xSect2(x02 + rad2*std::cos(phi2));
419 const float ySect2(y02 + rad2*std::sin(phi2));
420
421 const float phiI2(std::atan2(referencePoint2.GetY() - y02, referencePoint2.GetX() - x02));
422 const float phiF21(std::atan2(ySect1 - y02, xSect1 - x02));
423 const float phiF22(std::atan2(ySect2 - y02, xSect2 - x02));
424 const float charge2(pHelix->GetCharge());
425
426 float deltaPhi21(phiF21 - phiI2);
427 float deltaPhi22(phiF22 - phiI2);
428
429 if (deltaPhi21 < 0 && charge2 < 0)
430 {
431 deltaPhi21 += TWO_PI;
432 }
433 else if (deltaPhi21 > 0 && charge2 > 0)
434 {
435 deltaPhi21 -= TWO_PI;
436 }
437
438 if (deltaPhi22 < 0 && charge2 < 0)
439 {
440 deltaPhi22 += TWO_PI;
441 }
442 else if (deltaPhi22 > 0 && charge2 > 0)
443 {
444 deltaPhi22 -= TWO_PI;
445 }
446
447 const float pxy2(pHelix->GetPxy());
448 const float genericTime21(-charge2 * deltaPhi21 * rad2 / pxy2);
449 const float genericTime22(-charge2 * deltaPhi22 * rad2 / pxy2);
450
451 const float pz2(pHelix->GetMomentum().GetZ());
452 const float Z21(referencePoint2.GetZ() + genericTime21 * pz2);
453 const float Z22(referencePoint2.GetZ() + genericTime22 * pz2);
454
455 const CartesianVector temp21(xSect1, ySect1, Z21);
456 const CartesianVector temp22(xSect2, ySect2, Z22);
457
458 const float phiI1(std::atan2(referencePoint1.GetY() - y01, referencePoint1.GetX() - x01));
459 const float phiF11(std::atan2(ySect1-y01,xSect1-x01));
460 const float phiF12(std::atan2(ySect2-y01,xSect2-x01));
461 const float charge1(m_charge);
462
463 float deltaPhi11(phiF11 - phiI1);
464 float deltaPhi12(phiF12 - phiI1);
465
466 if (deltaPhi11 < 0 && charge1 < 0)
467 {
468 deltaPhi11 += TWO_PI;
469 }
470 else if (deltaPhi11 > 0 && charge1 > 0)
471 {
472 deltaPhi11 -= TWO_PI;
473 }
474
475 if (deltaPhi12 < 0 && charge1 < 0)
476 {
477 deltaPhi12 += TWO_PI;
478 }
479 else if (deltaPhi12 > 0 && charge1 > 0)
480 {
481 deltaPhi12 -= TWO_PI;
482 }
483
484 const float pxy1(m_pxy);
485 const float genericTime11(-charge1 * deltaPhi11 * rad1 / pxy1);
486 const float genericTime12(-charge1 * deltaPhi12 * rad1 / pxy1);
487
488 const float pz1(m_momentum.GetZ());
489 const float Z11(referencePoint1.GetZ() + genericTime11 * pz1);
490 const float Z12(referencePoint1.GetZ() + genericTime12 * pz1);
491
492 const CartesianVector temp11(xSect1, ySect1, Z11);
493 const CartesianVector temp12(xSect2, ySect2, Z12);
494
495 const float dist1((temp11 - temp21).GetMagnitudeSquared());
496 const float dist2((temp12 - temp22).GetMagnitudeSquared());
497
498 if (dist1 < dist2)
499 {
500 position1 = temp11;
501 position2 = temp21;
502 }
503 else
504 {
505 position1 = temp12;
506 position2 = temp22;
507 }
508 }
509
510 const CartesianVector momentum1(this->GetExtrapolatedMomentum(position1));
511 const CartesianVector momentum2(pHelix->GetExtrapolatedMomentum(position2));
512
513 helixDistance = (position1 - position2).GetMagnitude();
514 positionOfClosestApproach = (position1 + position2) * 0.5;
515 v0momentum = momentum1 + momentum2;
516
517 return STATUS_CODE_SUCCESS;
518}
519
520//------------------------------------------------------------------------------------------------------------------------------------------
521
523{
524 float phi = std::atan2(position.GetY() - m_yCentre, position.GetX() - m_xCentre);
525
526 if (phi < 0.)
527 phi += TWO_PI;
528
529 phi = phi - m_phiAtPCA + m_phi0;
530
531 return CartesianVector(m_pxy * std::cos(phi), m_pxy * std::sin(phi), m_momentum.GetZ());
532}
533
534} // namespace pandora
Header file for the helix class, based on marlin util helix class.
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
Definition StatusCodes.h:19
CartesianVector class.
void SetValues(float x, float y, float z)
Set the values of cartesian vector components.
float GetX() const
Get the cartesian x coordinate.
float GetZ() const
Get the cartesian z coordinate.
float GetY() const
Get the cartesian y coordinate.
Helix class.
Definition Helix.h:22
float GetCharge() const
Get charge.
Definition Helix.h:363
float m_phiRefPoint
Phi w.r.t. (X0, Y0) of circle at reference point.
Definition Helix.h:260
float m_charge
The particle charge.
Definition Helix.h:256
float m_pxy
The transverse momentum.
Definition Helix.h:255
StatusCode GetPointInZ(const float zPlane, const CartesianVector &referencePoint, CartesianVector &intersectionPoint) const
Get helix intersection point with a plane perpendicular to z axis.
Definition Helix.h:280
CartesianVector m_referencePoint
The coordinates of the reference point.
Definition Helix.h:247
float GetXCentre() const
Get x coordinate of circumference.
Definition Helix.h:370
float GetRadius() const
Get radius of circumference.
Definition Helix.h:384
float m_yAtPCA
y coordinate at point of closest approach
Definition Helix.h:263
float m_phiMomRefPoint
Phi of Momentum vector at reference point.
Definition Helix.h:266
StatusCode GetDistanceToPoint(const CartesianVector &point, CartesianVector &distance) const
Get distance of the closest approach of helix to an arbitrary point in space.
Definition Helix.h:296
Helix(const float phi0, const float d0, const float z0, const float omega, const float tanlambda, const float bField)
Constructor using canonical (LEP-wise) parameterisation.
Definition Helix.cc:24
CartesianVector m_momentum
The momentum vector at reference point.
Definition Helix.h:248
float m_d0
d0 in canonical parameterisation
Definition Helix.h:251
static const float TWO_PI
Definition Helix.h:244
float GetYCentre() const
Get y coordinate of circumference.
Definition Helix.h:377
float m_pxAtPCA
Momentum x component at point of closest approach.
Definition Helix.h:264
float m_pyAtPCA
Momentum y component at point of closest approach.
Definition Helix.h:265
float m_tanLambda
tanLambda
Definition Helix.h:254
const CartesianVector & GetMomentum() const
Get momentum of particle at the point of closest approach to IP.
Definition Helix.h:304
float m_xCentre
The circle centre x coordinate.
Definition Helix.h:257
CartesianVector GetExtrapolatedMomentum(const CartesianVector &position) const
Definition Helix.cc:522
static const float HALF_PI
Definition Helix.h:245
float m_phi0
phi0 in canonical parameterization
Definition Helix.h:250
float m_xAtPCA
x coordinate at point of closest approach
Definition Helix.h:262
float GetPxy() const
Get transverse momentum of the track.
Definition Helix.h:356
float m_omega
signed curvature in canonical parameterisation
Definition Helix.h:253
float m_radius
The radius of circle in XY plane.
Definition Helix.h:259
float m_phiAtPCA
Phi w.r.t. (X0, Y0) of circle at point of closest approach.
Definition Helix.h:261
StatusCode GetPointOnCircle(const float radius, const CartesianVector &referencePoint, CartesianVector &intersectionPoint) const
Get coordinates of helix intersection with cylinder, aligned along z-axis.
Definition Helix.h:288
float m_yCentre
The circle centre y coordinate.
Definition Helix.h:258
static const float FCT
Definition Helix.h:243
float m_z0
z0 in canonical parameterisation
Definition Helix.h:252
const CartesianVector & GetReferencePoint() const
Get reference point of track.
Definition Helix.h:311
StatusCode GetPointInXY(const float x0, const float y0, const float ax, const float ay, const CartesianVector &referencePoint, CartesianVector &intersectionPoint) const
Get helix intersection point with a plane parallel to z axis. The plane is defined by two coordinates...
Definition Helix.h:271
StatusCode GetDistanceToHelix(const Helix *const pHelix, CartesianVector &positionOfClosestApproach, CartesianVector &v0momentum, float &helixDistance) const
Get distance between two helices.
Definition Helix.cc:349
StatusCodeException class.
StatusCode
The StatusCode enum.