16#ifndef TRACKINGITSU_INCLUDE_CAUTILS_H_
17#define TRACKINGITSU_INCLUDE_CAUTILS_H_
19#ifndef GPUCA_GPUCODE_DEVICE
39GPUhdni()
float hypot(const
float, const
float);
40GPUhdni() constexpr
float getNormalizedPhi(const
float);
43GPUhdni()
float computeCurvatureCentreX(
float x1,
float y1,
float x2,
float y2,
float x3,
float y3);
48GPUhdi()
float math_utils::computePhi(const
float x, const
float y)
56 return o2::gpu::CAMath::Sqrt(
x *
x +
y *
y);
59GPUhdi() constexpr
float math_utils::getNormalizedPhi(const
float phi)
68 return float3{(firstVector.y * secondVector.z) - (firstVector.z * secondVector.y),
69 (firstVector.z * secondVector.x) - (firstVector.x * secondVector.z),
70 (firstVector.x * secondVector.y) - (firstVector.y * secondVector.x)};
80 const float den2 = (d *
x1 -
a) * (d *
x1 -
a) + (d *
y1 -
b) * (d *
y1 -
b);
81 return den2 > 0.f ? -1.f * d / o2::gpu::CAMath::Sqrt(den2) : 0.f;
86 float dx21 =
x2 -
x1, dx32 =
x3 -
x2;
87 if (dx21 == 0.f || dx32 == 0.f) {
92 float k1 = (
y2 -
y1) / dx21, k2 = (
y3 -
y2) / dx32;
93 return (k1 != k2) ? 0.5f * (k1 * k2 * (
y1 -
y3) + k2 * (
x1 +
x2) - k1 * (
x2 +
x3)) / (k2 - k1) : 1e5;
General auxilliary methods.
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLuint GLfloat GLfloat GLfloat x1
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
const float3 float float x2
GPUhdni() float computePhi(const float
float float float float float z2
const float3 float float float float float y3
const float3 float float float float x3
float float float float z1
const float3 float float float y2
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...