62 float ca = NAN, sa = NAN, snp = NAN, q2pt = NAN, q2pt2 = NAN;
63 o2::gpu::CAMath::SinCos(tf3.alphaTrackingFrame, sa, ca);
64 const float sign =
reverse ? -1.f : 1.f;
65 const float x1 = (cluster1.xCoordinate * ca) + (cluster1.yCoordinate * sa);
66 const float y1 = (-cluster1.xCoordinate * sa) + (cluster1.yCoordinate * ca);
67 const float x2 = (cluster2.xCoordinate * ca) + (cluster2.yCoordinate * sa);
68 const float y2 = (-cluster2.xCoordinate * sa) + (cluster2.yCoordinate * ca);
69 const float x3 = tf3.xTrackingFrame;
70 const float y3 = tf3.positionTrackingFrame[0];
71 if (o2::gpu::CAMath::Abs(
bz) < 0.01f) {
72 const float dx = x3 -
x1;
73 const float dy = y3 -
y1;
74 snp = sign * dy / o2::gpu::CAMath::Hypot(dx, dy);
78 const float crv = math_utils::computeCurvature(x3, y3, x2, y2,
x1,
y1);
79 snp = sign * crv * (x3 - math_utils::computeCurvatureCentreX(x3, y3, x2, y2,
x1,
y1));
83 const float tgl = 0.5f * (math_utils::computeTanDipAngle(
x1,
y1, x2, y2, cluster1.zCoordinate, cluster2.zCoordinate) +
84 math_utils::computeTanDipAngle(x2, y2, x3, y3, cluster2.zCoordinate, tf3.positionTrackingFrame[1]));
86 return {x3, tf3.alphaTrackingFrame, {y3, tf3.positionTrackingFrame[1], snp, tgl, q2pt}, {tf3.covarianceTrackingFrame[0], tf3.covarianceTrackingFrame[1], tf3.covarianceTrackingFrame[2], 0.f, 0.f,
o2::track::kCSnp2max, 0.f, 0.f, 0.f,
o2::track::kCTgl2max, 0.f, 0.f, 0.f, 0.f, sg2q2pt}};