From c8bb4a761d79521f8c063b4c4fd29b9e96ebc45c Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sun, 19 Nov 2023 13:41:26 -0500
Subject: [PATCH] MCTruthClassifier: Fix cppcheck warning.

Redundant null pointer test.
---
 PhysicsAnalysis/MCTruthClassifier/Root/MCTruthClassifierGen.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/MCTruthClassifier/Root/MCTruthClassifierGen.cxx b/PhysicsAnalysis/MCTruthClassifier/Root/MCTruthClassifierGen.cxx
index 4380a94788b3..4873973e3501 100644
--- a/PhysicsAnalysis/MCTruthClassifier/Root/MCTruthClassifierGen.cxx
+++ b/PhysicsAnalysis/MCTruthClassifier/Root/MCTruthClassifierGen.cxx
@@ -2073,7 +2073,7 @@ MCTruthClassifier::findEndVert(const xAOD::TruthParticle* thePart)
       for (unsigned int ipOut = 0; ipOut < EndVert->nOutgoingParticles(); ipOut++) {
         const xAOD::TruthParticle* itrDaug = EndVert->outgoingParticle(ipOut);
         if (!itrDaug) continue;
-        if (((itrDaug &&thePart && HepMC::is_same_generator_particle(itrDaug,thePart)) ||
+        if (((itrDaug && HepMC::is_same_generator_particle(itrDaug,thePart)) ||
              // brem on generator level for tau
              (EndVert->nOutgoingParticles() == 1 && EndVert->nIncomingParticles() == 1 &&
               !HepMC::is_simulation_particle(itrDaug) && !HepMC::is_simulation_particle(thePart))) &&
-- 
GitLab