From ad42deefef265c0895b92e9a118b0b01c6765fa8 Mon Sep 17 00:00:00 2001 From: aferrero2707 Date: Thu, 10 Sep 2026 15:08:38 +0200 Subject: [PATCH] [MUON] Fix assignment of GlobalFwdTrack from base class The fix introduces an explicit assignment operator between the GlobalFwdTrack class and its TrackParCovFwd base class. This prevents a SEGFAULT in this kind of assignment: o2::track::TrackParCovFwd trackParCovFwd; o2::dataformats::GlobalFwdTrack globalFwdTrack; globalFwdTrack = trackParCovFwd; --- .../ReconstructionDataFormats/GlobalFwdTrack.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DataFormats/Reconstruction/include/ReconstructionDataFormats/GlobalFwdTrack.h b/DataFormats/Reconstruction/include/ReconstructionDataFormats/GlobalFwdTrack.h index 5d13a216316ef..777c5aec25532 100644 --- a/DataFormats/Reconstruction/include/ReconstructionDataFormats/GlobalFwdTrack.h +++ b/DataFormats/Reconstruction/include/ReconstructionDataFormats/GlobalFwdTrack.h @@ -34,6 +34,19 @@ class GlobalFwdTrack : public o2::track::TrackParCovFwd, public o2::dataformats: GlobalFwdTrack(o2::track::TrackParCovFwd const& t) { *this = t; } ~GlobalFwdTrack() = default; + GlobalFwdTrack& operator=(const TrackParCovFwd& rhs) + { + o2::track::TrackParCovFwd::operator=(rhs); + return *this; + } + + GlobalFwdTrack& operator=(const GlobalFwdTrack& rhs) + { + o2::track::TrackParCovFwd::operator=(rhs); + o2::dataformats::MatchInfoFwd::operator=(rhs); + return *this; + } + SMatrix5 computeResiduals2Cov(const o2::track::TrackParCovFwd& t) const { SMatrix5 Residuals2Cov;