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#include "GPUCommonRtypes.h"
22
23#ifndef GPUCA_GPUCODE_DEVICE
24#include <array>
25#endif
26
27namespace o2
28{
29namespace its
30{
31
32class IndexTableUtils;
33
34struct Cluster final {
35 Cluster() = default;
36 Cluster(const float x, const float y, const float z, const int idx);
37 Cluster(const int, const IndexTableUtils& utils, const Cluster&);
38 Cluster(const int, const float3&, const IndexTableUtils& utils, const Cluster&);
39 void Init(const int, const float3&, const IndexTableUtils& utils, const Cluster&);
40 bool operator==(const Cluster&) const;
41 GPUhd() void print() const;
42
43 float xCoordinate; // = -999.f;
44 float yCoordinate; // = -999.f;
45 float zCoordinate; // = -999.f;
46 float phi; // = -999.f;
47 float radius; // = -999.f;
48 int clusterId; // = -1;
49 int indexTableBinIndex; // = -1;
50
52};
53
54GPUhdi() void Cluster::print() const
55{
56#if !defined(GPUCA_GPUCODE_DEVICE) || (!defined(__OPENCL__) && defined(GPUCA_GPU_DEBUG_PRINT))
57 printf("Cluster: %f %f %f %f %f %d %d\n", xCoordinate, yCoordinate, zCoordinate, phi, radius, clusterId, indexTableBinIndex);
58#endif
59}
60
61struct TrackingFrameInfo {
62 TrackingFrameInfo() = default;
63 TrackingFrameInfo(float x, float y, float z, float xTF, float alpha, std::array<float, 2>&& posTF, std::array<float, 3>&& covTF);
64
65 float xCoordinate;
66 float yCoordinate;
67 float zCoordinate;
68 float xTrackingFrame;
69 float alphaTrackingFrame;
70 std::array<float, 2> positionTrackingFrame = {-1., -1.};
71 std::array<float, 3> covarianceTrackingFrame = {999., 999., 999.};
72 GPUdi() void print() const
73 {
74#if !defined(GPUCA_GPUCODE_DEVICE) || (!defined(__OPENCL__) && defined(GPUCA_GPU_DEBUG_PRINT))
75 printf("x: %f y: %f z: %f xTF: %f alphaTF: %f posTF: %f %f covTF: %f %f %f\n",
76 xCoordinate, yCoordinate, zCoordinate, xTrackingFrame, alphaTrackingFrame,
77 positionTrackingFrame[0], positionTrackingFrame[1],
78 covarianceTrackingFrame[0], covarianceTrackingFrame[1], covarianceTrackingFrame[2]);
79#endif
80 }
81
82 ClassDefNV(TrackingFrameInfo, 1);
83};
84} // namespace its
85} // namespace o2
86
87#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
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:44
float zCoordinate
Definition Cluster.h:45
ClassDefNV(Cluster, 1)
int indexTableBinIndex
Definition Cluster.h:49
Cluster()=default
void Init(const int, const float3 &, const IndexTableUtils &utils, const Cluster &)
Definition Cluster.cxx:73
bool operator==(const Cluster &) const
Definition Cluster.cxx:86
float xCoordinate
Definition Cluster.h:43