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
19namespace o2
20{
21namespace constants
22{
23namespace math
24{
25constexpr float Almost0 = 0x1.0p-126f; // smallest non-denormal float
26constexpr float Epsilon = 0x0.000002p0f; // smallest float such that 1 != 1 + Epsilon
27constexpr float Almost1 = 1.f - 1.0e-6f;
28constexpr float VeryBig = 1.f / Almost0;
29
30constexpr float PI = 3.14159274101257324e+00f;
31constexpr float TwoPI = 2.f * PI;
32constexpr float PIHalf = 0.5f * PI;
33constexpr float PIThird = PI / 3.0f;
34constexpr float PIQuarter = 0.25f * PI;
35constexpr float Rad2Deg = 180.f / PI;
36constexpr float Deg2Rad = PI / 180.f;
37
38constexpr int NSectors = 18;
39constexpr float SectorSpanDeg = 360. / NSectors;
41
42// conversion from B(kGaus) to curvature for 1GeV pt
43constexpr float B2C = -0.299792458e-3;
44} // namespace math
45} // namespace constants
46} // namespace o2
47#endif
constexpr int NSectors
constexpr float SectorSpanDeg
constexpr float Almost0
constexpr float B2C
constexpr float Deg2Rad
constexpr float Epsilon
constexpr float TwoPI
constexpr float SectorSpanRad
constexpr float PI
constexpr float PIQuarter
constexpr float PIHalf
constexpr float Rad2Deg
constexpr float VeryBig
constexpr float Almost1
constexpr float PIThird
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...