Project
Loading...
Searching...
No Matches
Cluster.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_CACLUSTER_H_
17#define TRACKINGITSU_INCLUDE_CACLUSTER_H_
18
19#ifndef GPUCA_GPUCODE_DEVICE
20#include <array>
21#endif
22
23#include "GPUCommonRtypes.h"
24#include "GPUCommonArray.h"
27
28namespace o2
29{
30namespace its
31{
32
33class IndexTableUtils;
34
35struct Cluster final {
36 Cluster() = default;
37 Cluster(const float x, const float y, const float z, const int idx);
38 Cluster(const int, const IndexTableUtils& utils, const Cluster&);
39 Cluster(const int, const float3&, const IndexTableUtils& utils, const Cluster&);
40 void Init(const int, const float3&, const IndexTableUtils& utils, const Cluster&);
41 bool operator==(const Cluster&) const;
42 GPUhd() void print() const;
43
44 float xCoordinate; // = -999.f;
45 float yCoordinate; // = -999.f;
46 float zCoordinate; // = -999.f;
47 float phi; // = -999.f;
48 float radius; // = -999.f;
49 int clusterId; // = -1;
50 int indexTableBinIndex; // = -1;
51
53};
54
55GPUhdi() void Cluster::print() const
56{
57#if !defined(GPUCA_GPUCODE_DEVICE) || (!defined(__OPENCL__) && defined(GPUCA_GPU_DEBUG_PRINT))
58 printf("Cluster: %f %f %f %f %f %d %d\n", xCoordinate, yCoordinate, zCoordinate, phi, radius, clusterId, indexTableBinIndex);
59#endif
60}
61
62struct TrackingFrameInfo {
63 TrackingFrameInfo() = default;
64 TrackingFrameInfo(float x, float y, float z, float xTF, float alpha, o2::gpu::gpustd::array<float, 2>&& posTF, o2::gpu::gpustd::array<float, 3>&& covTF);
65
66 float xCoordinate;
67 float yCoordinate;
68 float zCoordinate;
69 float xTrackingFrame;
70 float alphaTrackingFrame;
71 o2::gpu::gpustd::array<float, 2> positionTrackingFrame = {-1., -1.};
72 o2::gpu::gpustd::array<float, 3> covarianceTrackingFrame = {999., 999., 999.};
73 GPUdi() void print() const
74 {
75#if !defined(GPUCA_GPUCODE_DEVICE) || (!defined(__OPENCL__) && defined(GPUCA_GPU_DEBUG_PRINT))
76 printf("x: %f y: %f z: %f xTF: %f alphaTF: %f posTF: %f %f covTF: %f %f %f\n",
77 xCoordinate, yCoordinate, zCoordinate, xTrackingFrame, alphaTrackingFrame,
78 positionTrackingFrame[0], positionTrackingFrame[1],
79 covarianceTrackingFrame[0], covarianceTrackingFrame[1], covarianceTrackingFrame[2]);
80#endif
81 }
82
83 ClassDefNV(TrackingFrameInfo, 1);
84};
85} // namespace its
86} // namespace o2
87
88#endif /* TRACKINGITSU_INCLUDE_CACLUSTER_H_ */
void print() const
#define GPUdi()
GLfloat GLfloat GLfloat alpha
Definition glcorearb.h:279
GLint GLenum GLint x
Definition glcorearb.h:403
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
std::array< T, N > array
GPUhdi() Cell
Definition Cell.h:55
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Common utility functions.
GPUhd() void print() const
float yCoordinate
Definition Cluster.h:45
float zCoordinate
Definition Cluster.h:46
ClassDefNV(Cluster, 1)
int indexTableBinIndex
Definition Cluster.h:50
Cluster()=default
void Init(const int, const float3 &, const IndexTableUtils &utils, const Cluster &)
Definition Cluster.cxx:69
bool operator==(const Cluster &) const
Definition Cluster.cxx:82
float xCoordinate
Definition Cluster.h:44