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::its
27{
28
29class Cell final
30{
31 public:
32 GPUhd() int getFirstClusterIndex() const { return mFirstClusterIndex; };
33 GPUhd() int getSecondClusterIndex() const { return mSecondClusterIndex; };
34 GPUhd() int getThirdClusterIndex() const { return mThirdClusterIndex; };
35 GPUhd() int getFirstTrackletIndex() const { return mFirstTrackletIndex; };
36 GPUhd() int getSecondTrackletIndex() const { return mSecondTrackletIndex; };
37 GPUhd() int getLevel() const { return mLevel; };
38 GPUhd() void setLevel(const int level) { mLevel = level; };
39 GPUhd() int* getLevelPtr() { return &mLevel; }
40
41 private:
42 int mFirstClusterIndex{0};
43 int mSecondClusterIndex{0};
44 int mThirdClusterIndex{0};
45 int mFirstTrackletIndex{0};
46 int mSecondTrackletIndex{0};
47 int mLevel{0};
48};
49
51{
52 public:
53 GPUhdDefault() CellSeed() = default;
54 GPUhd() CellSeed(int innerL, int cl0, int cl1, int cl2, int trkl0, int trkl1, o2::track::TrackParCovF& tpc, float chi2) : o2::track::TrackParCovF(tpc), mChi2(chi2), mLevel(1)
55 {
56 setUserField(innerL);
57 mClusters[innerL + 0] = cl0;
58 mClusters[innerL + 1] = cl1;
59 mClusters[innerL + 2] = cl2;
60 mTracklets[0] = trkl0;
61 mTracklets[1] = trkl1;
62 }
63 GPUhdDefault() CellSeed(const CellSeed&) = default;
64 GPUhdDefault() ~CellSeed() = default;
65 // GPUhdDefault() CellSeed(CellSeed&&) = default; TODO cannot use this yet since TrackPar only has device
66 GPUhdDefault() CellSeed& operator=(const CellSeed&) = default;
67 GPUhdDefault() CellSeed& operator=(CellSeed&&) = default;
68
69 GPUhd() int getFirstClusterIndex() const { return mClusters[getUserField()]; };
70 GPUhd() int getSecondClusterIndex() const { return mClusters[getUserField() + 1]; };
71 GPUhd() int getThirdClusterIndex() const { return mClusters[getUserField() + 2]; };
72 GPUhd() int getFirstTrackletIndex() const { return mTracklets[0]; };
73 GPUhd() void setFirstTrackletIndex(int trkl) { mTracklets[0] = trkl; };
74 GPUhd() int getSecondTrackletIndex() const { return mTracklets[1]; };
75 GPUhd() void setSecondTrackletIndex(int trkl) { mTracklets[1] = trkl; };
76 GPUhd() float getChi2() const { return mChi2; };
77 GPUhd() void setChi2(float chi2) { mChi2 = chi2; };
78 GPUhd() int getLevel() const { return mLevel; };
79 GPUhd() void setLevel(int level) { mLevel = level; };
80 GPUhd() int* getLevelPtr() { return &mLevel; }
81 GPUhd() int* getClusters() { return mClusters; }
82 GPUhd() int getCluster(int i) const { return mClusters[i]; }
83 GPUhd() void printCell() const
84 {
85 printf("trkl: %d, %d\t lvl: %d\t chi2: %f\n", mTracklets[0], mTracklets[1], mLevel, mChi2);
86 }
87
88 private:
89 float mChi2 = 0.f;
90 int mLevel = 0;
91 int mTracklets[2] = {-1, -1};
92 int mClusters[7] = {-1, -1, -1, -1, -1, -1, -1};
93};
94
95} // namespace o2::its
96
97#endif /* TRACKINGITSU_INCLUDE_CACELL_H_ */
int32_t i
int int int int int trkl1
Definition Cell.h:54
GPUhd() int getLevel() const
Definition Cell.h:78
GPUhd() void setSecondTrackletIndex(int trkl)
Definition Cell.h:75
GPUhd() void setChi2(float chi2)
Definition Cell.h:77
int int int int int o2::track::TrackParCovF float chi2
Definition Cell.h:54
GPUhdDefault() CellSeed()=default
GPUhd() void setFirstTrackletIndex(int trkl)
Definition Cell.h:73
GPUhd() float getChi2() const
Definition Cell.h:76
GPUhd() int *getClusters()
Definition Cell.h:81
GPUhdDefault() CellSeed(const CellSeed &)=default
GPUhd() int *getLevelPtr()
Definition Cell.h:80
GPUhd() int getFirstTrackletIndex() const
Definition Cell.h:72
GPUhd() void printCell() const
Definition Cell.h:83
GPUhd() CellSeed(int innerL
int int int cl2
Definition Cell.h:54
GPUhd() int getSecondClusterIndex() const
Definition Cell.h:70
GPUhd() int getThirdClusterIndex() const
Definition Cell.h:71
GPUhd() int getCluster(int i) const
Definition Cell.h:82
int int int int trkl0
Definition Cell.h:54
int int cl1
Definition Cell.h:54
GPUhd() int getSecondTrackletIndex() const
Definition Cell.h:74
int int int int int o2::track::TrackParCovF & tpc
Definition Cell.h:54
GPUhd() void setLevel(int level)
Definition Cell.h:79
GPUhd() int *getLevelPtr()
Definition Cell.h:39
GPUhd() int getFirstClusterIndex() const
Definition Cell.h:32
GPUhd() void setLevel(const int level)
Definition Cell.h:38
GPUhd() int getFirstTrackletIndex() const
Definition Cell.h:35
GPUhd() int getThirdClusterIndex() const
Definition Cell.h:34
GPUhd() int getSecondClusterIndex() const
Definition Cell.h:33
GPUhd() int getLevel() const
Definition Cell.h:37
GPUhd() int getSecondTrackletIndex() const
Definition Cell.h:36
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLint level
Definition glcorearb.h:275
TrackParametrizationWithError< float > TrackParCovF
Definition Track.h:31
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...