Project
Loading...
Searching...
No Matches
GPUTPCGrid.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#ifndef GPUTPCGRID_H
16#define GPUTPCGRID_H
17
18#include "GPUTPCDef.h"
19
20namespace o2::gpu
21{
31{
32 public:
33 GPUd() void CreateEmpty();
34 GPUd() void Create(float yMin, float yMax, float zMin, float zMax, int32_t ny, int32_t nz);
35
36 GPUd() int32_t GetBin(float Y, float Z) const;
40 GPUd() int32_t GetBinBounded(float Y, float Z) const;
41 GPUd() void GetBin(float Y, float Z, int32_t* const bY, int32_t* const bZ) const;
42 GPUd() void GetBinArea(float Y, float Z, float dy, float dz, int32_t& bin, int32_t& ny, int32_t& nz) const;
43
44 GPUd() uint32_t N() const { return mN; }
45 GPUd() uint32_t Ny() const { return mNy; }
46 GPUd() uint32_t Nz() const { return mNz; }
47 GPUd() float YMin() const { return mYMin; }
48 GPUd() float YMax() const { return mYMax; }
49 GPUd() float ZMin() const { return mZMin; }
50 GPUd() float ZMax() const { return mZMax; }
51 GPUd() float StepYInv() const { return mStepYInv; }
52 GPUd() float StepZInv() const { return mStepZInv; }
53
54 private:
56
57 uint32_t mNy; //* N bins in Y
58 uint32_t mNz; //* N bins in Z
59 uint32_t mN; //* total N bins
60 float mYMin; //* minimal Y value
61 float mYMax; //* maximal Y value
62 float mZMin; //* minimal Z value
63 float mZMax; //* maximal Z value
64 float mStepYInv; //* inverse bin size in Y
65 float mStepZInv; //* inverse bin size in Z
66};
67} // namespace o2::gpu
68
69#endif // GPUTPCGRID_H
float float float dz
Definition GPUTPCGrid.h:42
GPUd() void CreateEmpty()
float float float zMax
Definition GPUTPCGrid.h:34
float float float int32_t & bin
Definition GPUTPCGrid.h:42
GPUd() uint32_t Ny() const
Definition GPUTPCGrid.h:45
GPUd() float YMax() const
Definition GPUTPCGrid.h:48
GPUd() float StepZInv() const
Definition GPUTPCGrid.h:52
GPUd() float ZMax() const
Definition GPUTPCGrid.h:50
GPUd() float YMin() const
Definition GPUTPCGrid.h:47
GPUd() uint32_t Nz() const
Definition GPUTPCGrid.h:46
GPUd() float StepYInv() const
Definition GPUTPCGrid.h:51
float float float int32_t ny
Definition GPUTPCGrid.h:34
float float zMin
Definition GPUTPCGrid.h:34
float int32_t *const bY
Definition GPUTPCGrid.h:41
GPUd() float ZMin() const
Definition GPUTPCGrid.h:49
float float float int32_t int32_t nz
Definition GPUTPCGrid.h:34
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)