From a41c0cebf84a8f9d4228ea5bd804d64a15f144f3 Mon Sep 17 00:00:00 2001
From: tstreble <thomas.strebler@cern.ch>
Date: Thu, 28 May 2020 17:49:15 +0200
Subject: [PATCH] Loosened checkTPAndDefiningParamCov

---
 Event/xAOD/xAODTracking/Root/TrackParticlexAODHelpers.cxx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Event/xAOD/xAODTracking/Root/TrackParticlexAODHelpers.cxx b/Event/xAOD/xAODTracking/Root/TrackParticlexAODHelpers.cxx
index 348c803cecd..d648b11c93c 100644
--- a/Event/xAOD/xAODTracking/Root/TrackParticlexAODHelpers.cxx
+++ b/Event/xAOD/xAODTracking/Root/TrackParticlexAODHelpers.cxx
@@ -14,7 +14,9 @@ namespace xAOD {
     if (!tp) {
       throw std::runtime_error("Invalid TrackParticle pointer.");
     }
-    if( tp->definingParametersCovMatrixFilled() != xAOD::FullCovMatrixAvailable ) {
+    SG::AuxElement::ConstAccessor< std::vector<float> > accDiag( "definingParametersCovMatrixDiag" );
+    SG::AuxElement::ConstAccessor< std::vector<float> > accOffDiag( "definingParametersCovMatrixOffDiag" );
+    if( !(accDiag.isAvailable( *tp ) && accOffDiag.isAvailable( *tp )) ) {
       throw std::runtime_error("TrackParticle without covariance matrix for the defining parameters.");
     }
   }
-- 
GitLab