diff --git a/TrackingTools/GsfTracking/src/GsfMultiStateUpdator.cc b/TrackingTools/GsfTracking/src/GsfMultiStateUpdator.cc index 4dfa194f3b3fd..f3d6d173c105d 100644 --- a/TrackingTools/GsfTracking/src/GsfMultiStateUpdator.cc +++ b/TrackingTools/GsfTracking/src/GsfMultiStateUpdator.cc @@ -31,15 +31,12 @@ TrajectoryStateOnSurface GsfMultiStateUpdator::update(const TrajectoryStateOnSur for (auto const& tsosI : predictedComponents) { TrajectoryStateOnSurface updatedTSOS = KFUpdator().update(tsosI, aRecHit); - double det = 0; - double det22 = 0; - double det33 = 0; - double det44 = 0; - if (updatedTSOS.isValid() && updatedTSOS.localError().valid() && updatedTSOS.localError().posDef() && - (updatedTSOS.curvilinearError().matrix().Sub(0, 0).Det(det22) && det22 > 0) && - (updatedTSOS.curvilinearError().matrix().Sub(0, 0).Det(det33) && det33 > 0) && - (updatedTSOS.curvilinearError().matrix().Sub(0, 0).Det(det44) && det44 > 0) && - (updatedTSOS.curvilinearError().matrix().Det2(det)) && det > 0) { + if (double det; + updatedTSOS.isValid() && updatedTSOS.localError().valid() && updatedTSOS.localError().posDef() && + (det = 0., updatedTSOS.curvilinearError().matrix().Sub(0, 0).Det(det) && det > 0) && + (det = 0., updatedTSOS.curvilinearError().matrix().Sub(0, 0).Det(det) && det > 0) && + (det = 0., updatedTSOS.curvilinearError().matrix().Sub(0, 0).Det(det) && det > 0) && + (det = 0., updatedTSOS.curvilinearError().matrix().Det2(det) && det > 0)) { result.addState(TrajectoryStateOnSurface(weights[i], updatedTSOS.localParameters(), updatedTSOS.localError(),