Project
Loading...
Searching...
No Matches
Constants.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.
15
16#ifndef TRACKINGITSU_INCLUDE_CONSTANTS_H_
17#define TRACKINGITSU_INCLUDE_CONSTANTS_H_
18
19#include <array>
20#include <utility>
21
23{
24
25constexpr float KB = 1024.f;
26constexpr float MB = KB * KB;
27constexpr float GB = MB * KB;
28constexpr bool DoTimeBenchmarks = true;
29constexpr bool SaveTimeBenchmarks = false;
30constexpr float Tolerance = 1e-12; // numerical tolerance
31constexpr int ClustersPerCell = 3; // number of clusters for a cell
32constexpr int UnusedIndex = -1; // global unused flag
33constexpr float UnsetValue = -999.f; // global unset value
34constexpr float Radl = 9.36f; // Radiation length of Si [cm]
35constexpr float Rho = 2.33f; // Density of Si [g/cm^3]
36constexpr int MaxIter = 4; // Max. supported iterations
37constexpr int MaxSelectedTrackletsPerCluster = 100; // vertexer: max lines per cluster
38
39namespace helpers
40{
41
42// initialize a std::array at compile time fully with T
43template <typename T, std::size_t N, T Value>
44constexpr std::array<T, N> initArray()
45{
46 return []<std::size_t... Is>(std::index_sequence<Is...>) { return std::array<T, N>{(static_cast<void>(Is), Value)...}; }(std::make_index_sequence<N>{});
47}
48
49} // namespace helpers
50} // namespace o2::its::constants
51
52#endif /* TRACKINGITSU_INCLUDE_CONSTANTS_H_ */
o2::monitoring::tags::Value Value
constexpr std::array< T, N > initArray()
Definition Constants.h:44
constexpr int UnusedIndex
Definition Constants.h:32
constexpr int MaxSelectedTrackletsPerCluster
Definition Constants.h:37
constexpr float Radl
Definition Constants.h:34
constexpr int ClustersPerCell
Definition Constants.h:31
constexpr float Tolerance
Definition Constants.h:30
constexpr float GB
Definition Constants.h:27
constexpr float Rho
Definition Constants.h:35
constexpr float UnsetValue
Definition Constants.h:33
constexpr float KB
Definition Constants.h:25
constexpr float MB
Definition Constants.h:26
constexpr bool DoTimeBenchmarks
Definition Constants.h:28
constexpr int MaxIter
Definition Constants.h:36
constexpr bool SaveTimeBenchmarks
Definition Constants.h:29