2323
2424#include " GPUCommonDef.h"
2525
26- namespace o2
27- {
28- namespace its
26+ namespace o2 ::its
2927{
3028
3129class Cell final
3230{
3331 public:
34- GPUhd () Cell();
35- GPUd () Cell(const int , const int , const int , const int , const int );
32+ GPUhdDefault () Cell() = default ;
33+ GPUhd () Cell(const int firstClusterIndex, const int secondClusterIndex, const int thirdClusterIndex,
34+ const int firstTrackletIndex, const int secondTrackletIndex)
35+ : mFirstClusterIndex (firstClusterIndex),
36+ mSecondClusterIndex (secondClusterIndex),
37+ mThirdClusterIndex(thirdClusterIndex),
38+ mFirstTrackletIndex(firstTrackletIndex),
39+ mSecondTrackletIndex(secondTrackletIndex),
40+ mLevel(1 ) {}
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;
3647
3748 GPUhd () int getFirstClusterIndex() const { return mFirstClusterIndex ; };
3849 GPUhd () int getSecondClusterIndex() const { return mSecondClusterIndex ; };
@@ -44,44 +55,19 @@ class Cell final
4455 GPUhd () int* getLevelPtr() { return &mLevel ; }
4556
4657 private:
47- const int mFirstClusterIndex ;
48- const int mSecondClusterIndex ;
49- const int mThirdClusterIndex ;
50- const int mFirstTrackletIndex ;
51- const int mSecondTrackletIndex ;
52- int mLevel ;
58+ int mFirstClusterIndex { 0 } ;
59+ int mSecondClusterIndex { 0 } ;
60+ int mThirdClusterIndex { 0 } ;
61+ int mFirstTrackletIndex { 0 } ;
62+ int mSecondTrackletIndex { 0 } ;
63+ int mLevel { 0 } ;
5364};
5465
55- GPUhdi () Cell::Cell()
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-
66- GPUdi () 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-
7866class CellSeed final : public o2::track::TrackParCovF
7967{
8068 public:
8169 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}
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}
8571 {
8672 setUserField (innerL);
8773 mClusters [innerL + 0 ] = cl0;
@@ -90,6 +76,12 @@ class CellSeed final : public o2::track::TrackParCovF
9076 mTracklets [0 ] = trkl0;
9177 mTracklets [1 ] = trkl1;
9278 }
79+ GPUhdDefault () CellSeed(const CellSeed&) = default ;
80+ GPUhdDefault () ~CellSeed () = default ;
81+ // GPUhdDefault() CellSeed(CellSeed&&) = default; TODO cannot use this yet since TrackPar only has device
82+ GPUhdDefault () CellSeed& operator =(const CellSeed&) = default ;
83+ GPUhdDefault () CellSeed& operator =(CellSeed&&) = default ;
84+
9385 GPUhd () int getFirstClusterIndex () const { return mClusters [getUserField ()]; };
9486 GPUhd () int getSecondClusterIndex () const { return mClusters [getUserField () + 1 ]; };
9587 GPUhd () int getThirdClusterIndex () const { return mClusters [getUserField () + 2 ]; };
@@ -104,20 +96,18 @@ class CellSeed final : public o2::track::TrackParCovF
10496 GPUhd () int * getLevelPtr () { return &mLevel ; }
10597 GPUhd () int * getClusters () { return mClusters ; }
10698 GPUhd () int getCluster (int i) const { return mClusters [i]; }
107- GPUhdi () void printCell () const ;
99+ GPUhd () void printCell () const
100+ {
101+ printf (" trkl: %d, %d\t lvl: %d\t chi2: %f\n " , mTracklets [0 ], mTracklets [1 ], mLevel , mChi2 );
102+ }
108103
109104 private:
110- int mClusters [7 ] = {-1 , -1 , -1 , -1 , -1 , -1 , -1 };
111- int mTracklets [2 ] = {-1 , -1 };
112- int mLevel = 0 ;
113105 float mChi2 = 0 .f;
106+ int mLevel = 0 ;
107+ int mTracklets [2 ] = {-1 , -1 };
108+ int mClusters [7 ] = {-1 , -1 , -1 , -1 , -1 , -1 , -1 };
114109};
115110
116- GPUhdi () void CellSeed::printCell () const
117- {
118- printf (" trkl: %d, %d\t lvl: %d\t chi2: %f\n " , mTracklets [0 ], mTracklets [1 ], mLevel , mChi2 );
119- }
111+ } // namespace o2::its
120112
121- } // namespace its
122- } // namespace o2
123113#endif /* TRACKINGITSU_INCLUDE_CACELL_H_ */
0 commit comments