Project
Loading...
Searching...
No Matches
SurfaceDescriptor.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
12#ifndef ALICEO2_ITSMFT_TRACKING_SURFACEDESCRIPTOR_H_
13#define ALICEO2_ITSMFT_TRACKING_SURFACEDESCRIPTOR_H_
14
15#include <cstddef>
16#include <cstdint>
17#include <type_traits>
18
19#include "GPUCommonDef.h"
21
23{
24
25// Nominal normal-incidence material; zero denotes material not configured.
27 float xOverX0{0.f};
29};
30
32 float min{0.f};
33 float max{0.f};
34
35 GPUhdi() constexpr bool isValid() const noexcept { return min < max; }
36};
37
38// Immutable surface geometry and nominal material. Its LayerId is the dense
39// position of this descriptor in DetectorConfiguration and is intentionally not
40// duplicated here.
43 uint8_t detectorId{0};
45 uint16_t flags{0};
46 float referenceCoordinate{0.f}; // nominal radius for cylinders, z for disks
49};
50
51// Non-owning surface-catalog view. Topology, timing and measurements stay
52// outside this POD so loading and propagation do not depend on them.
54 const SurfaceDescriptor* surfaces{nullptr};
55 uint32_t nSurfaces{0};
56
57 GPUhdi() uint32_t getSurfaceIndex(LayerId id) const
58 {
59 return id.isValid() && id.value() < nSurfaces ? id.value() : nSurfaces;
60 }
61
62 GPUhdi() bool hasSurface(LayerId id) const { return getSurfaceIndex(id) < nSurfaces; }
63 GPUhdi() const SurfaceDescriptor& getSurface(LayerId id) const { return surfaces[getSurfaceIndex(id)]; }
64};
65
66} // namespace o2::itsmft::tracking
67
68#endif /* ALICEO2_ITSMFT_TRACKING_SURFACEDESCRIPTOR_H_ */
GLbitfield flags
Definition glcorearb.h:1570
uint32_t trackClusterIndicesSize noexcept
bool isValid(std::string alias)
GPUhdi() bool hasSurface(LayerId id) const
GPUhdi() const SurfaceDescriptor &getSurface(LayerId id) const
GPUhdi() uint32_t getSurfaceIndex(LayerId id) const
GPUhdi() const expr bool isValid() const noexcept