From b72579b71d751cf9eeba3837e30de5ff7be50fbd Mon Sep 17 00:00:00 2001 From: caleb-james-smith Date: Tue, 25 Feb 2020 16:34:52 -0600 Subject: [PATCH] Fix bug in TTMFilterBase::markConstituentsUsed() --- TopTagger/src/TTMFilterBase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TopTagger/src/TTMFilterBase.cpp b/TopTagger/src/TTMFilterBase.cpp index 763783d3..1617a753 100644 --- a/TopTagger/src/TTMFilterBase.cpp +++ b/TopTagger/src/TTMFilterBase.cpp @@ -66,7 +66,7 @@ void TTMFilterBase::markConstituentsUsed(const std::vector& //If there is one or fewer subjets, instead match to the overall AK8 jet for(const auto& matchConst : allConstituents) { - if(ROOT::Math::VectorUtil::DeltaR(constituent->p(), matchConst.p()) < dRMaxAK8) + if(matchConst.getType() == Constituent::AK4JET && ROOT::Math::VectorUtil::DeltaR(constituent->p(), matchConst.p()) < dRMaxAK8) { usedConstituents.insert(&matchConst); } @@ -78,7 +78,7 @@ void TTMFilterBase::markConstituentsUsed(const std::vector& { for(const auto& matchConst : allConstituents) { - if(ROOT::Math::VectorUtil::DeltaR(subjet.p(), matchConst.p()) < dRMax) + if(matchConst.getType() == Constituent::AK4JET && ROOT::Math::VectorUtil::DeltaR(subjet.p(), matchConst.p()) < dRMax) { usedConstituents.insert(&matchConst); }