From 3439e2a9189ec485af9054c47f6d425bcc8de194 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Tue, 23 Jul 2024 08:16:32 +0200 Subject: [PATCH 1/3] chore: Tweak `TrackProxy::copyFrom` --- Core/include/Acts/EventData/TrackProxy.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/include/Acts/EventData/TrackProxy.hpp b/Core/include/Acts/EventData/TrackProxy.hpp index 8853367d602..d86bd12d1ba 100644 --- a/Core/include/Acts/EventData/TrackProxy.hpp +++ b/Core/include/Acts/EventData/TrackProxy.hpp @@ -689,12 +689,14 @@ class TrackProxy { reverseTrackStates(); } - parameters() = other.parameters(); - covariance() = other.covariance(); setParticleHypothesis(other.particleHypothesis()); + if (other.hasReferenceSurface()) { setReferenceSurface(other.referenceSurface().getSharedPtr()); + parameters() = other.parameters(); + covariance() = other.covariance(); } + nMeasurements() = other.nMeasurements(); nHoles() = other.nHoles(); nOutliers() = other.nOutliers(); From 979fae7f8b26b24fee118be9e71e0fd0d497cfb9 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Tue, 23 Jul 2024 08:17:56 +0200 Subject: [PATCH 2/3] also copy indices? --- Core/include/Acts/EventData/TrackProxy.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/include/Acts/EventData/TrackProxy.hpp b/Core/include/Acts/EventData/TrackProxy.hpp index d86bd12d1ba..333817f74bb 100644 --- a/Core/include/Acts/EventData/TrackProxy.hpp +++ b/Core/include/Acts/EventData/TrackProxy.hpp @@ -687,6 +687,10 @@ class TrackProxy { // reverse using standard linked list reversal algorithm reverseTrackStates(); + } else { + // just copy the track state indices + tipIndex() = other.tipIndex(); + stemIndex() = other.stemIndex(); } setParticleHypothesis(other.particleHypothesis()); From f802656ae96f69aa34b1b77aef5cb986bfaf48de Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Tue, 23 Jul 2024 08:28:07 +0200 Subject: [PATCH 3/3] Revert "also copy indices?" This reverts commit 979fae7f8b26b24fee118be9e71e0fd0d497cfb9. --- Core/include/Acts/EventData/TrackProxy.hpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Core/include/Acts/EventData/TrackProxy.hpp b/Core/include/Acts/EventData/TrackProxy.hpp index 333817f74bb..d86bd12d1ba 100644 --- a/Core/include/Acts/EventData/TrackProxy.hpp +++ b/Core/include/Acts/EventData/TrackProxy.hpp @@ -687,10 +687,6 @@ class TrackProxy { // reverse using standard linked list reversal algorithm reverseTrackStates(); - } else { - // just copy the track state indices - tipIndex() = other.tipIndex(); - stemIndex() = other.stemIndex(); } setParticleHypothesis(other.particleHypothesis());