16#ifndef MATHUTILS_INCLUDE_MATHUTILS_DETAIL_TRIGONOMETRIC_H_
17#define MATHUTILS_INCLUDE_MATHUTILS_DETAIL_TRIGONOMETRIC_H_
24#ifndef GPUCA_GPUCODE_DEVICE
114template <
typename T,
typename S,
typename U>
117 return o2::gpu::GPUCommonMath::SinCos(ang,
s,
c);
123 return o2::gpu::GPUCommonMath::SinCos(ang,
s,
c);
128 return o2::gpu::GPUCommonMath::SinCosd(ang,
s,
c);
132#ifndef GPUCA_GPUCODE_DEVICE
139 sincos<T>(ang, sin, cos);
140 return std::make_tuple(sin, cos);
164 sincos<T>(
alpha, sin, cos);
166 xy[0] =
x * cos - xy[1] * sin;
167 xy[1] =
x * sin + xy[1] * cos;
186template <
typename T =
float>
187GPUhdi() constexpr
T sectorDAlpha()
216 return sector2Angle<T>(angle2Sector<T>(
phi));
223 const T dphi =
phi - phiMin;
231 const T dphi =
phi - phiMax;
240 if (!okForPhiMin(phi0,
phi1)) {
259 if (!okForPhiMin(phi0,
phi1)) {
278 constexpr T Pi = 3.1415926535897932384626433832795;
284 constexpr T A = 0.0776509570923569;
285 constexpr T B = -0.287434475393028;
286 constexpr T C = (Pi / 4 -
A -
B);
288 return ((
A * a2 +
B) * a2 + C) *
a;
293 constexpr T Pi025 = 1 * Pi / 4;
294 constexpr T Pi075 = 3 * Pi / 4;
295 const T x1 = xx + yy;
296 const T y1 = yy - xx;
306 return phi0 +
atan(tan);
316 return o2::gpu::GPUCommonMath::ASin(
x);
322 return o2::gpu::GPUCommonMath::ACos(
x);
328 return o2::gpu::GPUCommonMath::ATan(
x);
334 return o2::gpu::GPUCommonMath::ATan2(
y,
x);
340 return o2::gpu::GPUCommonMath::Sin(
x);
346 return o2::gpu::GPUCommonMath::Cos(
x);
352 return o2::gpu::GPUCommonMath::Tan(
x);
358 return o2::gpu::GPUCommonMath::TwoPi();
370 return o2::gpu::GPUCommonMath::Pi();
379#ifndef GPUCA_GPUCODE_DEVICE
393 return std::atan2(
y,
x);
GLfloat GLfloat GLfloat alpha
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLuint GLfloat GLfloat GLfloat x1
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLboolean GLboolean GLboolean GLboolean a
constexpr float SectorSpanDeg
constexpr float SectorSpanRad
void bringTo02PiGen(T &phi)
return((dphi > 0 &&dphi< constants::math::PI)||dphi< -constants::math::PI) ? true GPUhdi() const expr bool okForPhiMax(T phiMax
return((dphi< 0 &&dphi > -constants::math::PI)||dphi > constants::math::PI) ? true T phi1
void bringToPMPiGen(T &phi)
std::tuple< T, T > rotateZ(T xL, T yL, T snAlp, T csAlp)
return copysign< T >(atan2P(o2::gpu::GPUCommonMath::Abs(y), x), y)
float angle2Alpha(float phi)
int angle2Sector(float phi)
std::tuple< float, float > rotateZInv(float xG, float yG, float snAlp, float csAlp)
float sector2Angle(int sect)
void bringToPMPi(float &phi)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.