66 o2::gpu::CAMath::SinCos(tf3.alphaTrackingFrame, sa, ca);
67 const float sign =
reverse ? -1.f : 1.f;
68 const float x1 = (cluster1.xCoordinate * ca) + (cluster1.yCoordinate * sa);
69 const float y1 = (-cluster1.xCoordinate * sa) + (cluster1.yCoordinate * ca);
70 const float x2 = (cluster2.xCoordinate * ca) + (cluster2.yCoordinate * sa);
71 const float y2 = (-cluster2.xCoordinate * sa) + (cluster2.yCoordinate * ca);
72 const float x3 = tf3.xTrackingFrame;
73 const float y3 = tf3.positionTrackingFrame[0];
74 if (o2::gpu::CAMath::Abs(
bz) < 0.01f) {
75 const float dx = x3 -
x1;
76 const float dy = y3 -
y1;
77 snp = sign * dy / o2::gpu::CAMath::Hypot(dx, dy);
81 const float crv = math_utils::computeCurvature(x3, y3, x2, y2,
x1,
y1);
82 snp = sign * crv * (x3 - math_utils::computeCurvatureCentreX(x3, y3, x2, y2,
x1,
y1));
86 const float tgl = -0.5f * sign * (math_utils::computeTanDipAngle(
x1,
y1, x2, y2, cluster1.zCoordinate, cluster2.zCoordinate) + math_utils::computeTanDipAngle(x2, y2, x3, y3, cluster2.zCoordinate, tf3.positionTrackingFrame[1]));
88 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}};