@@ -26,16 +26,6 @@ Surface::Surface(const Transform3& transform)
2626Surface::Surface (const SurfacePlacementBase& placement) noexcept
2727 : GeometryObject(), m_placement(&placement) {}
2828
29- Surface::Surface (const Surface& other) noexcept
30- : GeometryObject(other),
31- std::enable_shared_from_this<Surface>(),
32- m_placement (other.m_placement),
33- m_surfaceMaterial(other.m_surfaceMaterial) {
34- if (other.m_transform ) {
35- m_transform = std::make_unique<Transform3>(*other.m_transform );
36- }
37- }
38-
3929Surface::Surface (const GeometryContext& gctx, const Surface& other,
4030 const Transform3& shift) noexcept
4131 : GeometryObject(),
@@ -158,23 +148,6 @@ std::shared_ptr<const Surface> Surface::getSharedPtr() const {
158148 return shared_from_this ();
159149}
160150
161- Surface& Surface::operator =(const Surface& other) {
162- if (&other != this ) {
163- GeometryObject::operator =(other);
164- // detector element, identifier & layer association are unique
165- if (other.m_transform ) {
166- m_transform = std::make_unique<Transform3>(*other.m_transform );
167- } else {
168- m_transform.reset ();
169- }
170- m_associatedLayer = other.m_associatedLayer ;
171- m_surfaceMaterial = other.m_surfaceMaterial ;
172- m_placement = other.m_placement ;
173- m_isSensitive = other.m_isSensitive ;
174- }
175- return *this ;
176- }
177-
178151bool Surface::operator ==(const Surface& other) const {
179152 // (a) fast exit for pointer comparison
180153 if (&other == this ) {
@@ -241,9 +214,7 @@ std::string Surface::toString(const GeometryContext& gctx) const {
241214}
242215
243216Vector3 Surface::center (const GeometryContext& gctx) const {
244- // fast access via transform matrix (and not translation())
245- auto tMatrix = localToGlobalTransform (gctx).matrix ();
246- return Vector3 (tMatrix (0 , 3 ), tMatrix (1 , 3 ), tMatrix (2 , 3 ));
217+ return localToGlobalTransform (gctx).translation ();
247218}
248219
249220const Transform3& Surface::transform (const GeometryContext& gctx) const {
0 commit comments