Project
Loading...
Searching...
No Matches
GeometryFlat.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 O2_TRD_GEOMETRYFLAT_H
13#define O2_TRD_GEOMETRYFLAT_H
14
15#ifndef GPUCA_GPUCODE_DEVICE
16#include <cstring>
17#endif
18#include "FlatObject.h"
19#include "GPUCommonDef.h"
22#include "TRDBase/PadPlane.h"
24
25namespace o2
26{
27namespace trd
28{
29
30class Geometry;
31
32//Reduced flat version of TRD geometry class.
33//Contains all entries required for tracking on GPUs.
35{
36 public:
37#ifndef GPUCA_GPUCODE
38 GeometryFlat() = default;
40 {
41 memcpy((void*)this, (void*)&v, sizeof(*this));
42 }
43 GeometryFlat(const Geometry& geo);
44 ~GeometryFlat() = default;
45#endif
46 GPUd() const o2::gpu::Transform3D* getMatrixT2L(int det) const
47 {
48 if (mMatrixIndirection[det] == -1) {
49 return nullptr;
50 }
51 return &mMatrixCache[mMatrixIndirection[det]];
52 ;
53 }
54
55 GPUd() bool chamberInGeometry(int det) const
56 {
57 return (mMatrixIndirection[det] >= 0);
58 }
59
60 private:
63};
64
65} // namespace trd
66} // namespace o2
67
68#endif
Global TRD definitions and constants.
Definition of FlatObject class.
GPUCA_GPUCODE.
Definition FlatObject.h:176
FlatObject()=default
_____________ Constructors / destructors __________________________
GPUd() int isVersion()
GPUd() const o2 short mMatrixIndirection[constants::MAXCHAMBER]
GeometryFlat(const GeometryFlat &v)
const GLdouble * v
Definition glcorearb.h:832
constexpr int MAXCHAMBER
the maximum number of installed chambers
Definition Constants.h:30
constexpr int NCHAMBER
the number of chambers actually installed
Definition Constants.h:32
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...