Project
Loading...
Searching...
No Matches
Cell.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_CACELL_H_
17#define TRACKINGITSU_INCLUDE_CACELL_H_
18#ifndef GPUCA_GPUCODE_DEVICE
19#include <array>
20#include <vector>
21#include <iostream>
22#endif
23
24#include "GPUCommonDef.h"
25
26namespace o2
27{
28namespace its
29{
30
31class Cell final
32{
33 public:
35 GPUd() Cell(const int, const int, const int, const int, const int);
36
37 GPUhd() int getFirstClusterIndex() const { return mFirstClusterIndex; };
38 GPUhd() int getSecondClusterIndex() const { return mSecondClusterIndex; };
39 GPUhd() int getThirdClusterIndex() const { return mThirdClusterIndex; };
40 GPUhd() int getFirstTrackletIndex() const { return mFirstTrackletIndex; };
41 GPUhd() int getSecondTrackletIndex() const { return mSecondTrackletIndex; };
42 GPUhd() int getLevel() const { return mLevel; };
43 GPUhd() void setLevel(const int level) { mLevel = level; };
44 GPUhd() int* getLevelPtr() { return &mLevel; }
45
46 private:
47 const int mFirstClusterIndex;
48 const int mSecondClusterIndex;
49 const int mThirdClusterIndex;
50 const int mFirstTrackletIndex;
51 const int mSecondTrackletIndex;
52 int mLevel;
53};
54
56 : mFirstClusterIndex{0},
57 mSecondClusterIndex{0},
58 mThirdClusterIndex{0},
59 mFirstTrackletIndex{0},
60 mSecondTrackletIndex{0},
61 mLevel{0}
62{
63 // Nothing to do
64}
65
66GPUdi() Cell::Cell(const int firstClusterIndex, const int secondClusterIndex, const int thirdClusterIndex,
67 const int firstTrackletIndex, const int secondTrackletIndex)
68 : mFirstClusterIndex{firstClusterIndex},
69 mSecondClusterIndex{secondClusterIndex},
70 mThirdClusterIndex{thirdClusterIndex},
71 mFirstTrackletIndex{firstTrackletIndex},
72 mSecondTrackletIndex{secondTrackletIndex},
73 mLevel{1}
74{
75 // Nothing to do
76}
77
79{
80 public:
81 GPUhdDefault() CellSeed() = default;
82 GPUhdDefault() CellSeed(const CellSeed&) = default;
83 GPUhdDefault() ~CellSeed() = default;
84 GPUd() CellSeed(int innerL, int cl0, int cl1, int cl2, int trkl0, int trkl1, o2::track::TrackParCovF& tpc, float chi2) : o2::track::TrackParCovF{tpc}, mLevel{1}, mChi2{chi2}
85 {
86 setUserField(innerL);
87 mClusters[innerL + 0] = cl0;
88 mClusters[innerL + 1] = cl1;
89 mClusters[innerL + 2] = cl2;
90 mTracklets[0] = trkl0;
91 mTracklets[1] = trkl1;
92 }
93 GPUhd() int getFirstClusterIndex() const { return mClusters[getUserField()]; };
94 GPUhd() int getSecondClusterIndex() const { return mClusters[getUserField() + 1]; };
95 GPUhd() int getThirdClusterIndex() const { return mClusters[getUserField() + 2]; };
96 GPUhd() int getFirstTrackletIndex() const { return mTracklets[0]; };
97 GPUhd() void setFirstTrackletIndex(int trkl) { mTracklets[0] = trkl; };
98 GPUhd() int getSecondTrackletIndex() const { return mTracklets[1]; };
99 GPUhd() void setSecondTrackletIndex(int trkl) { mTracklets[1] = trkl; };
100 GPUhd() int getChi2() const { return mChi2; };
101 GPUhd() void setChi2(float chi2) { mChi2 = chi2; };
102 GPUhd() int getLevel() const { return mLevel; };
103 GPUhd() void setLevel(int level) { mLevel = level; };
104 GPUhd() int* getLevelPtr() { return &mLevel; }
105 GPUhd() int* getClusters() { return mClusters; }
106 GPUhd() int getCluster(int i) const { return mClusters[i]; }
107 GPUhdi() void printCell() const;
108
109 private:
110 int mClusters[7] = {-1, -1, -1, -1, -1, -1, -1};
111 int mTracklets[2] = {-1, -1};
112 int mLevel = 0;
113 float mChi2 = 0.f;
114};
115
116GPUhdi() void CellSeed::printCell() const
117{
118 printf("trkl: %d, %d\t lvl: %d\t chi2: %f\n", mTracklets[0], mTracklets[1], mLevel, mChi2);
119}
120
121} // namespace its
122} // namespace o2
123#endif /* TRACKINGITSU_INCLUDE_CACELL_H_ */
int32_t i
int int int int int trkl1
Definition Cell.h:84
GPUhd() int getLevel() const
Definition Cell.h:102
GPUhd() void setSecondTrackletIndex(int trkl)
Definition Cell.h:99
GPUhd() void setChi2(float chi2)
Definition Cell.h:101
int int int int int o2::track::TrackParCovF float chi2
Definition Cell.h:84
GPUhdi() void printCell() const
GPUhdDefault() CellSeed()=default
GPUhd() void setFirstTrackletIndex(int trkl)
Definition Cell.h:97
GPUhd() int *getClusters()
Definition Cell.h:105
int int int int int o2::track::TrackParCovF float mLevel
Definition Cell.h:84
GPUhd() int *getLevelPtr()
Definition Cell.h:104
GPUhd() int getFirstTrackletIndex() const
Definition Cell.h:96
int int int cl2
Definition Cell.h:84
GPUhd() int getSecondClusterIndex() const
Definition Cell.h:94
GPUhd() int getChi2() const
Definition Cell.h:100
GPUhd() int getThirdClusterIndex() const
Definition Cell.h:95
GPUhd() int getCluster(int i) const
Definition Cell.h:106
int int int int trkl0
Definition Cell.h:84
int int cl1
Definition Cell.h:84
GPUhd() int getSecondTrackletIndex() const
Definition Cell.h:98
int int int int int o2::track::TrackParCovF & tpc
Definition Cell.h:84
int int int int int o2::track::TrackParCovF float mChi2
Definition Cell.h:84
GPUd() CellSeed(int innerL
GPUhd() void setLevel(int level)
Definition Cell.h:103
GPUhd() Cell()
GPUhd() int *getLevelPtr()
Definition Cell.h:44
GPUhd() void setLevel(const int level)
Definition Cell.h:43
GPUd() Cell(const int
GPUhd() int getFirstTrackletIndex() const
Definition Cell.h:40
GPUhd() int getThirdClusterIndex() const
Definition Cell.h:39
GPUhd() int getSecondClusterIndex() const
Definition Cell.h:38
GPUhd() int getLevel() const
Definition Cell.h:42
GPUhd() int getSecondTrackletIndex() const
Definition Cell.h:41
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLint level
Definition glcorearb.h:275
GPUhdi() Cell
Definition Cell.h:55
GPUdi() Cell
Definition Cell.h:66
TrackParametrizationWithError< float > TrackParCovF
Definition Track.h:31
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...