Project
Loading...
Searching...
No Matches
GPUDefConstantsAndSettings.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
14
15// This files contains compile-time constants affecting the GPU algorithms / reconstruction results.
16// Architecture-dependant compile-time constants affecting the performance without changing the results are stored in GPUDefParameters*.h
17
18#ifndef GPUDEFCONSTANTSANDSETTINGS_H
19#define GPUDEFCONSTANTSANDSETTINGS_H
20
21// clang-format off
22
23#include "GPUCommonDef.h"
24
25#if !defined(GPUCA_STANDALONE) && !defined(GPUCA_O2_LIB) && !defined(GPUCA_O2_INTERFACE)
26 #error You are using the CA GPU tracking without defining the build type (O2/Standalone). If you are running an O2 ROOT macro, please include GPUO2ExternalUser.h first!
27#endif
28
29#if (defined(GPUCA_O2_LIB) && defined(GPUCA_STANDALONE))
30 #error Invalid Compile Definitions, need to build for either O2 or Standalone!
31#endif
32
33#define GPUCA_TRACKLET_SELECTOR_MIN_HITS_B5(QPTB5) (CAMath::Abs(QPTB5) > 10 ? 10 : (CAMath::Abs(QPTB5) > 5 ? 15 : 29)) // Minimum hits should depend on Pt, low Pt tracks can have few hits. 29 Hits default, 15 for < 200 mev, 10 for < 100 mev
34
35#define GPUCA_MERGER_MAX_TRACK_CLUSTERS 1024 // Maximum number of clusters a track may have after merging
36
37#define GPUCA_MAXN 40 // Maximum number of neighbor hits to consider in one row in neightbors finder
38
39#define GPUCA_MAX_SIN_PHI_LOW 0.99f // Limits for maximum sin phi during fit
40#define GPUCA_MAX_SIN_PHI 0.999f // Must be preprocessor define because c++ pre 11 cannot use static constexpr for initializes
41
42#define GPUCA_MIN_BIN_SIZE 2.f // Minimum bin size in TPC fast access grid
43#define GPUCA_MAX_BIN_SIZE 1000.f // Maximum bin size in TPC fast access grid
44
45#define GPUCA_TPC_COMP_CHUNK_SIZE 1024 // Chunk size of sorted unattached TPC cluster in compression
46
47#define TPC_MAX_TIME_BIN_TRIGGERED 600
48
49#if defined(GPUCA_NSECTORS) || defined(GPUCA_ROW_COUNT)
50 #error GPUCA_NSECTORS or GPUCA_ROW_COUNT already defined, do not include GPUTPCGeometry.h before!
51#endif
52#if defined(GPUCA_TPC_GEOMETRY_O2) && !(defined(ROOT_VERSION_CODE) && ROOT_VERSION_CODE < 393216)
53 //Use definitions from the O2 headers if available for nicer code and type safety
55 #define GPUCA_NSECTORS o2::tpc::constants::MAXSECTOR
56 #define GPUCA_ROW_COUNT o2::tpc::constants::MAXGLOBALPADROW
57#else
58 //Define it manually, if O2 headers not available, ROOT5, and OpenCL 1.2, which do not know C++11.
59 #define GPUCA_NSECTORS 36
60 #ifdef GPUCA_TPC_GEOMETRY_O2
61 #define GPUCA_ROW_COUNT 152
62 #else
63 #define GPUCA_ROW_COUNT 159
64 #endif
65#endif
66
67//#define GPUCA_MERGER_BY_MC_LABEL // Use MC labels for TPC track merging - for performance studies // TODO: Cleanup unneeded options
68
69// clang-format on
70
71#endif