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+ GPUhd () 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+ 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;
3646
3747 GPUhd () int getFirstClusterIndex() const { return mFirstClusterIndex ; };
3848 GPUhd () int getSecondClusterIndex() const { return mSecondClusterIndex ; };
@@ -44,37 +54,14 @@ class Cell final
4454 GPUhd () int* getLevelPtr() { return &mLevel ; }
4555
4656 private:
47- const int mFirstClusterIndex ;
48- const int mSecondClusterIndex ;
49- const int mThirdClusterIndex ;
50- const int mFirstTrackletIndex ;
51- const int mSecondTrackletIndex ;
52- int mLevel ;
57+ int mFirstClusterIndex { 0 } ;
58+ int mSecondClusterIndex { 0 } ;
59+ int mThirdClusterIndex { 0 } ;
60+ int mFirstTrackletIndex { 0 } ;
61+ int mSecondTrackletIndex { 0 } ;
62+ int mLevel { 0 } ;
5363};
5464
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-
7865class CellSeed final : public o2::track::TrackParCovF
7966{
8067 public:
@@ -90,6 +77,7 @@ class CellSeed final : public o2::track::TrackParCovF
9077 mTracklets [0 ] = trkl0;
9178 mTracklets [1 ] = trkl1;
9279 }
80+
9381 GPUhd () int getFirstClusterIndex () const { return mClusters [getUserField ()]; };
9482 GPUhd () int getSecondClusterIndex () const { return mClusters [getUserField () + 1 ]; };
9583 GPUhd () int getThirdClusterIndex () const { return mClusters [getUserField () + 2 ]; };
@@ -104,20 +92,18 @@ class CellSeed final : public o2::track::TrackParCovF
10492 GPUhd () int * getLevelPtr () { return &mLevel ; }
10593 GPUhd () int * getClusters () { return mClusters ; }
10694 GPUhd () int getCluster (int i) const { return mClusters [i]; }
107- GPUhdi () void printCell () const ;
95+ GPUhd () void printCell () const
96+ {
97+ printf (" trkl: %d, %d\t lvl: %d\t chi2: %f\n " , mTracklets [0 ], mTracklets [1 ], mLevel , mChi2 );
98+ }
10899
109100 private:
110- int mClusters [7 ] = {-1 , -1 , -1 , -1 , -1 , -1 , -1 };
111- int mTracklets [2 ] = {-1 , -1 };
112- int mLevel = 0 ;
113101 float mChi2 = 0 .f;
102+ int mLevel = 0 ;
103+ int mTracklets [2 ] = {-1 , -1 };
104+ int mClusters [7 ] = {-1 , -1 , -1 , -1 , -1 , -1 , -1 };
114105};
115106
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- }
107+ } // namespace o2::its
120108
121- } // namespace its
122- } // namespace o2
123109#endif /* TRACKINGITSU_INCLUDE_CACELL_H_ */
0 commit comments