Skip to content

Commit 72899dd

Browse files
committed
ITS: Artefacts fix defaulted
1 parent 89213b3 commit 72899dd

File tree

3 files changed

+56
-20
lines changed

3 files changed

+56
-20
lines changed

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Cell.h

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace o2::its
2929
class Cell final
3030
{
3131
public:
32-
GPUhd() Cell() = default;
32+
GPUhdDefault() Cell() = default;
3333
GPUhd() Cell(const int firstClusterIndex, const int secondClusterIndex, const int thirdClusterIndex,
3434
const int firstTrackletIndex, const int secondTrackletIndex)
3535
: mFirstClusterIndex(firstClusterIndex),
@@ -38,11 +38,12 @@ class Cell final
3838
mFirstTrackletIndex(firstTrackletIndex),
3939
mSecondTrackletIndex(secondTrackletIndex),
4040
mLevel(1) {}
41-
GPUhd() ~Cell() = default;
42-
GPUhd() Cell(const Cell&) = default;
43-
GPUhd() Cell(Cell&&) = default;
44-
GPUhd() Cell& operator=(const Cell&) = default;
45-
GPUhd() Cell& operator=(Cell&&) = default;
41+
GPUhdDefault() Cell(const Cell&) = default;
42+
GPUhdDefault() Cell(Cell&&) = default;
43+
GPUhdDefault() ~Cell() = default;
44+
45+
GPUhdDefault() Cell& operator=(const Cell&) = default;
46+
GPUhdDefault() Cell& operator=(Cell&&) noexcept = default;
4647

4748
GPUhd() int getFirstClusterIndex() const { return mFirstClusterIndex; };
4849
GPUhd() int getSecondClusterIndex() const { return mSecondClusterIndex; };
@@ -66,9 +67,7 @@ class CellSeed final : public o2::track::TrackParCovF
6667
{
6768
public:
6869
GPUhdDefault() CellSeed() = default;
69-
GPUhdDefault() CellSeed(const CellSeed&) = default;
70-
GPUhdDefault() ~CellSeed() = default;
71-
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}
70+
GPUhd() 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}
7271
{
7372
setUserField(innerL);
7473
mClusters[innerL + 0] = cl0;
@@ -77,6 +76,11 @@ class CellSeed final : public o2::track::TrackParCovF
7776
mTracklets[0] = trkl0;
7877
mTracklets[1] = trkl1;
7978
}
79+
GPUhdDefault() CellSeed(const CellSeed&) = default;
80+
GPUhdDefault() ~CellSeed() = default;
81+
GPUhdDefault() CellSeed(CellSeed&&) = default;
82+
GPUhdDefault() CellSeed& operator=(const CellSeed&) = default;
83+
GPUhdDefault() CellSeed& operator=(CellSeed&&) = default;
8084

8185
GPUhd() int getFirstClusterIndex() const { return mClusters[getUserField()]; };
8286
GPUhd() int getSecondClusterIndex() const { return mClusters[getUserField() + 1]; };

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Cluster.h

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,30 @@ namespace o2::its
2525
class IndexTableUtils;
2626

2727
struct Cluster final {
28-
Cluster() = default;
29-
Cluster(const float x, const float y, const float z, const int idx);
30-
Cluster(const int, const IndexTableUtils& utils, const Cluster&);
31-
Cluster(const int, const float3&, const IndexTableUtils& utils, const Cluster&);
32-
bool operator==(const Cluster&) const = default;
28+
GPUhdDefault() Cluster() = default;
29+
GPUhd() Cluster(const float x, const float y, const float z, const int idx);
30+
GPUhd() Cluster(const int, const IndexTableUtils& utils, const Cluster&);
31+
GPUhd() Cluster(const int, const float3&, const IndexTableUtils& utils, const Cluster&);
32+
GPUhdDefault() Cluster(const Cluster&) = default;
33+
GPUhdDefault() Cluster(Cluster&&) noexcept = default;
34+
GPUhdDefault() ~Cluster() = default;
35+
36+
GPUhdDefault() Cluster& operator=(const Cluster&) = default;
37+
GPUhdDefault() Cluster& operator=(Cluster&&) noexcept = default;
38+
39+
// TODO
40+
/*GPUhdDefault() bool operator==(const Cluster&) const = default;*/
41+
GPUhd() bool operator==(const Cluster& other) const
42+
{
43+
return xCoordinate == other.xCoordinate &&
44+
yCoordinate == other.yCoordinate &&
45+
zCoordinate == other.zCoordinate &&
46+
phi == other.phi &&
47+
radius == other.radius &&
48+
clusterId == other.clusterId &&
49+
indexTableBinIndex == other.indexTableBinIndex;
50+
}
51+
3352
GPUhd() void print() const;
3453

3554
float xCoordinate{-999.f};
@@ -42,8 +61,15 @@ struct Cluster final {
4261
};
4362

4463
struct TrackingFrameInfo final {
45-
TrackingFrameInfo() = default;
46-
TrackingFrameInfo(float x, float y, float z, float xTF, float alpha, std::array<float, 2>&& posTF, std::array<float, 3>&& covTF);
64+
GPUhdDefault() TrackingFrameInfo() = default;
65+
GPUhd() TrackingFrameInfo(float x, float y, float z, float xTF, float alpha, std::array<float, 2>&& posTF, std::array<float, 3>&& covTF);
66+
GPUhdDefault() TrackingFrameInfo(const TrackingFrameInfo&) = default;
67+
GPUhdDefault() TrackingFrameInfo(TrackingFrameInfo&&) noexcept = default;
68+
GPUhdDefault() ~TrackingFrameInfo() = default;
69+
70+
GPUhdDefault() TrackingFrameInfo& operator=(const TrackingFrameInfo&) = default;
71+
GPUhdDefault() TrackingFrameInfo& operator=(TrackingFrameInfo&&) = default;
72+
4773
GPUhd() void print() const;
4874

4975
float xCoordinate{-999.f};

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Road.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,17 @@ template <unsigned char maxRoadSize = 5>
2626
class Road final
2727
{
2828
public:
29-
GPUhd() Road() = default;
29+
GPUhdDefault() Road() = default;
3030
GPUhd() Road(int cellLayer, int cellId) : Road() { addCell(cellLayer, cellId); }
3131

32-
GPUhdi() int getRoadSize() const { return mRoadSize; }
32+
GPUhdDefault() Road(const Road&) = default;
33+
GPUhdDefault() Road(Road&&) noexcept = default;
34+
GPUhdDefault() ~Road() = default;
35+
36+
GPUhdDefault() Road& operator=(const Road&) = default;
37+
GPUhdDefault() Road& operator=(Road&&) noexcept = default;
38+
39+
GPUhdi() uint8_t getRoadSize() const { return mRoadSize; }
3340
GPUhdi() bool isFakeRoad() const { return mIsFakeRoad; }
3441
GPUhdi() void setFakeRoad(const bool fake) { mIsFakeRoad = fake; }
3542
GPUhdi() int& operator[](const int& i) { return mCellIds[i]; }
@@ -54,8 +61,7 @@ class Road final
5461

5562
private:
5663
int mCellIds[maxRoadSize]{constants::UnusedIndex};
57-
// int mLabel;
58-
unsigned char mRoadSize{0};
64+
uint8_t mRoadSize{0};
5965
bool mIsFakeRoad{false};
6066
};
6167

0 commit comments

Comments
 (0)