From a2a5e3f464149a2cefa6bfbf515bcbcbb561f0e5 Mon Sep 17 00:00:00 2001
From: abarton <Adam.Edward.Barton@cern.ch>
Date: Wed, 10 Feb 2021 09:53:44 +0000
Subject: [PATCH] Fix undef behaviour as warned by cppcheck

---
 .../DerivationFrameworkBPhys/src/CascadeTools.cxx               | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/CascadeTools.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/CascadeTools.cxx
index 7721d36d9ee2..7b8877d229c4 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/CascadeTools.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/CascadeTools.cxx
@@ -81,7 +81,7 @@ double CascadeTools::invariantMassError(const std::vector<TLorentzVector> &parti
     ATH_MSG_DEBUG("The provided number of masses does not match the number of tracks in the vertex");
     return -999999.;
   }
-  std::vector<TLorentzVector> particleMom(NTrk); particleMom.clear();
+  std::vector<TLorentzVector> particleMom(NTrk);
   for( unsigned int it=0; it<NTrk; it++) {
     double esq = particleMom2[it].Px()*particleMom2[it].Px() + particleMom2[it].Py()*particleMom2[it].Py() +
                  particleMom2[it].Pz()*particleMom2[it].Pz() + masses[it]*masses[it];
-- 
GitLab