28GPUhdi() constexpr
float computePhi(
float x,
float y)
30 return o2::math_utils::fastATan2(-
y, -
x) + o2::constants::math::PI;
33GPUhdi() constexpr
float hypot(
float x,
float y)
35 return o2::gpu::CAMath::Hypot(
x,
y);
38GPUhdi() constexpr
float getNormalizedPhi(
float phi)
40 phi -= o2::constants::math::TwoPI * o2::gpu::CAMath::Floor(phi * (1.f / o2::constants::math::TwoPI));
44GPUhdi() constexpr
float computeNormalizedPhi(
float x,
float y)
46 return getNormalizedPhi(computePhi(
x,
y));
54 return o2::constants::math::Almost0;
65GPUhdi() float computeCurvatureCentreX(
float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
68 float dx21 =
x2 -
x1, dx32 =
x3 -
x2;
77 return o2::constants::math::VeryBig;
85 const float d = o2::gpu::CAMath::Hypot(
x1 -
x2,
y1 -
y2);
87 return ((
z1 >
z2) ? -1.f : 1.f) * o2::constants::math::VeryBig;
92GPUhdi() float smallestAngleDifference(
float a,
float b)
94 return o2::gpu::CAMath::Remainderf(
b -
a, o2::constants::math::TwoPI);
97GPUhdi() bool isPhiDifferenceBelow(const
float phiA, const
float phiB, const
float phiCut)
99 const float deltaPhi = o2::gpu::CAMath::Abs(phiA -
phiB);
100 return deltaPhi < phiCut || deltaPhi > o2::constants::math::TwoPI -
phiCut;
103GPUhdi() constexpr
float Sq(
float v)
110 return Sq(
v) + Sq(
w);
113GPUhdi() constexpr
float SqSum(
float u,
float v,
float w)
115 return Sq(u) + SqSum(
v,
w);
118GPUhdi() constexpr
float SqDiff(
float x,
float y)
128 float beta =
p / o2::gpu::CAMath::Hypot(mass,
p);
129 return 0.0136f * o2::gpu::CAMath::Sqrt(
xX0) * (1.f + 0.038f * o2::gpu::CAMath::Log(
xX0)) / (beta *
p);
132GPUhdi() float cellDeltaPhiBound(const
float bz, const
float ptMin,
137 return o2::constants::math::TwoPI;
139 const float oneOverR = 0.001f * 0.3f * o2::gpu::CAMath::Abs(bz) /
ptMin;
140 const float sA = o2::gpu::CAMath::Min(0.25f * (
rIn +
rMid) * oneOverR, 1.f - 1.e-6f);
141 const float sB = o2::gpu::CAMath::Min(0.25f * (
rMid +
rOut) * oneOverR, 1.f - 1.e-6f);
142 const float bound = 2.f * (o2::gpu::CAMath::ASin(
sB) - o2::gpu::CAMath::ASin(
sA)) + 2.f *
msAngle;
143 return o2::gpu::CAMath::Min(
bound,
static_cast<float>(o2::constants::math::PI));