@@ -26,15 +26,13 @@ template <typename BASE>
26
26
class spacepoint : public BASE {
27
27
28
28
public:
29
- // / @name Constructors
29
+ // / @name Functions inherited from the base class
30
30
// / @{
31
31
32
32
// / Inherit the base class's constructor(s)
33
33
using BASE::BASE;
34
- // / Use a default copy constructor
35
- spacepoint (const spacepoint& other) = default ;
36
- // / Use a default move constructor
37
- spacepoint (spacepoint&& other) = default ;
34
+ // / Inherit the base class's assignment operator(s).
35
+ using BASE::operator =;
38
36
39
37
// / @}
40
38
@@ -54,55 +52,84 @@ class spacepoint : public BASE {
54
52
TRACCC_HOST_DEVICE
55
53
const auto & measurement_index () const { return BASE::template get<0 >(); }
56
54
55
+ // / Global / 3D position of the spacepoint
56
+ // /
57
+ // / @return A (non-const) vector of @c traccc::point3 values
58
+ // /
59
+ TRACCC_HOST_DEVICE auto & global () { return BASE::template get<1 >(); }
60
+ // / Global / 3D position of the spacepoint
61
+ // /
62
+ // / @return A (const) vector of @c traccc::point3 values
63
+ // /
64
+ TRACCC_HOST_DEVICE const auto & global () const {
65
+ return BASE::template get<1 >();
66
+ }
67
+
57
68
// / The X position of the spacepoint (non-const)
58
69
// /
59
- // / @return A (non-const) vector of @c traccc::scalar values
70
+ // / @note This function must only be used on proxy objects, not on
71
+ // / containers!
72
+ // /
73
+ // / @return A (non-const) reference to a @c traccc::scalar value
60
74
// /
61
75
TRACCC_HOST_DEVICE
62
- auto & x () { return BASE:: template get< 1 >(); }
76
+ auto & x ();
63
77
// / The X position of the spacepoint (const)
64
78
// /
65
- // / @return A (const) vector of @c traccc::scalar values
79
+ // / @note This function must only be used on proxy objects, not on
80
+ // / containers!
81
+ // /
82
+ // / @return A (const) reference to a @c traccc::scalar value
66
83
// /
67
84
TRACCC_HOST_DEVICE
68
- const auto & x () const { return BASE:: template get< 1 >(); }
85
+ const auto & x () const ;
69
86
70
87
// / The Y position of the spacepoint (non-const)
71
88
// /
72
- // / @return A (non-const) vector of @c traccc::scalar values
89
+ // / @note This function must only be used on proxy objects, not on
90
+ // / containers!
91
+ // /
92
+ // / @return A (non-const) reference to a @c traccc::scalar value
73
93
// /
74
94
TRACCC_HOST_DEVICE
75
- auto & y () { return BASE:: template get< 2 >(); }
95
+ auto & y ();
76
96
// / The Y position of the spacepoint (const)
77
97
// /
78
- // / @return A (const) vector of @c traccc::scalar values
98
+ // / @return A (const) reference to a @c traccc::scalar value
79
99
// /
80
100
TRACCC_HOST_DEVICE
81
- const auto & y () const { return BASE:: template get< 2 >(); }
101
+ const auto & y () const ;
82
102
83
103
// / The Z position of the spacepoint (non-const)
84
104
// /
85
- // / @return A (non-const) vector of @c traccc::scalar values
105
+ // / @note This function must only be used on proxy objects, not on
106
+ // / containers!
107
+ // /
108
+ // / @return A (non-const) reference to a @c traccc::scalar value
86
109
// /
87
110
TRACCC_HOST_DEVICE
88
- auto & z () { return BASE:: template get< 3 >(); }
111
+ auto & z ();
89
112
// / The Z position of the spacepoint (const)
90
113
// /
91
- // / @return A (const) vector of @c traccc::scalar values
114
+ // / @note This function must only be used on proxy objects, not on
115
+ // / containers!
116
+ // /
117
+ // / @return A (const) reference to a @c traccc::scalar value
92
118
// /
93
119
TRACCC_HOST_DEVICE
94
- const auto & z () const { return BASE::template get<3 >(); }
120
+ const auto & z () const ;
121
+
95
122
// / The variation on the spacepoint's Z coordinate (non-const)
96
123
// /
97
124
// / @return A (non-const) vector of @c traccc::scalar values
98
125
// /
99
- TRACCC_HOST_DEVICE auto & z_variance () { return BASE::template get<4 >(); }
126
+ TRACCC_HOST_DEVICE auto & z_variance () { return BASE::template get<2 >(); }
100
127
// / The variation on the spacepoint's Z coordinate (const)
101
128
// /
102
129
// / @return A (const) vector of @c traccc::scalar values
103
130
// /
104
131
TRACCC_HOST_DEVICE const auto & z_variance () const {
105
- return BASE::template get<4 >();
132
+ return BASE::template get<2 >();
106
133
}
107
134
108
135
// / The radius of the spacepoint in the XY plane (non-const)
@@ -119,14 +146,14 @@ class spacepoint : public BASE {
119
146
// / @return A (non-const) vector of @c traccc::scalar values
120
147
// /
121
148
TRACCC_HOST_DEVICE auto & radius_variance () {
122
- return BASE::template get<5 >();
149
+ return BASE::template get<3 >();
123
150
}
124
151
// / The variation on the spacepoint radious (const)
125
152
// /
126
153
// / @return A (non-const) vector of @c traccc::scalar values
127
154
// /
128
155
TRACCC_HOST_DEVICE const auto & radius_variance () const {
129
- return BASE::template get<5 >();
156
+ return BASE::template get<3 >();
130
157
}
131
158
132
159
// / The azimuthal angle of the spacepoint in the XY plane (non-const)
@@ -138,36 +165,11 @@ class spacepoint : public BASE {
138
165
// /
139
166
TRACCC_HOST_DEVICE auto phi () const ;
140
167
141
- // / Global / 3D position of the spacepoint
142
- // /
143
- // / @note This function must only be used on proxy objects, not on
144
- // / containers!
145
- // /
146
- // / @return A @c traccc::point3 value
147
- // /
148
- TRACCC_HOST_DEVICE auto global () const ;
149
-
150
168
// / @}
151
169
152
170
// / @name Utility functions
153
171
// / @{
154
172
155
- // / Assignment operator
156
- // /
157
- // / @param[in] other The object to assign from
158
- // / @return A reference to this object
159
- // /
160
- TRACCC_HOST_DEVICE spacepoint& operator =(const spacepoint& other);
161
-
162
- // / Assignment operator
163
- // /
164
- // / @param[in] other The object to assign from
165
- // / @return A reference to this object
166
- // /
167
- template <typename T,
168
- std::enable_if_t <!std::is_same_v<BASE, T>, bool > = false >
169
- TRACCC_HOST_DEVICE spacepoint& operator =(const spacepoint<T>& other);
170
-
171
173
// / Equality operator
172
174
// /
173
175
// / @note This function must only be used on proxy objects, not on
@@ -197,11 +199,11 @@ class spacepoint : public BASE {
197
199
}; // class spacepoint
198
200
199
201
// / SoA container describing reconstructed spacepoints
200
- using spacepoint_collection = vecmem::edm::container<
201
- spacepoint, vecmem::edm::type::vector<unsigned int >,
202
- vecmem::edm::type::vector<scalar>, vecmem::edm::type::vector<scalar >,
203
- vecmem::edm::type::vector<scalar>, vecmem::edm::type::vector<scalar>,
204
- vecmem::edm::type::vector<scalar> >;
202
+ using spacepoint_collection =
203
+ vecmem::edm::container< spacepoint, vecmem::edm::type::vector<unsigned int >,
204
+ vecmem::edm::type::vector<point3 >,
205
+ vecmem::edm::type::vector<scalar>,
206
+ vecmem::edm::type::vector<scalar> >;
205
207
206
208
} // namespace traccc::edm
207
209
0 commit comments