Project
Loading...
Searching...
No Matches
MathConstants.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16#ifndef ALICEO2_COMMON_MATH_CONSTANTS_
17#define ALICEO2_COMMON_MATH_CONSTANTS_
18
19#include "GPUCommonDef.h"
20
21namespace o2
22{
23namespace constants
24{
25namespace math
26{
27GPUglobalconstexpr() float Almost0 = 0x1.0p-126f; // smallest non-denormal float
28GPUglobalconstexpr() float Epsilon = 0x0.000002p0f; // smallest float such that 1 != 1 + Epsilon
29GPUglobalconstexpr() float Almost1 = 1.f - 1.0e-6f;
30GPUglobalconstexpr() float VeryBig = 1.f / Almost0;
31
32GPUglobalconstexpr() float PI = 3.14159274101257324e+00f;
33GPUglobalconstexpr() float TwoPI = 2.f * PI;
34GPUglobalconstexpr() float PIHalf = 0.5f * PI;
35GPUglobalconstexpr() float PIThird = PI / 3.0f;
36GPUglobalconstexpr() float PIQuarter = 0.25f * PI;
37GPUglobalconstexpr() float Rad2Deg = 180.f / PI;
38GPUglobalconstexpr() float Deg2Rad = PI / 180.f;
39
40GPUglobalconstexpr() int NSectors = 18;
41GPUglobalconstexpr() float SectorSpanDeg = 360. / NSectors;
42GPUglobalconstexpr() float SectorSpanRad = SectorSpanDeg * Deg2Rad;
43
44// conversion from B(kGaus) to curvature for 1GeV pt
45GPUglobalconstexpr() float B2C = -0.299792458e-3;
46} // namespace math
47} // namespace constants
48} // namespace o2
49#endif
GLuint GLfloat GLfloat GLfloat x1
Definition glcorearb.h:5034
GLdouble f
Definition glcorearb.h:310
GLuint GLfloat x0
Definition glcorearb.h:5034
GPUglobalconstexpr() float Almost0=0x1.0p-126f
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...