From 3ddd4b257f7312b19639823d3d84e1eac06c789f Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 1 Feb 2021 08:04:21 -0600 Subject: [PATCH 1/5] fixed bug in evaluation of unconstrained pT cut --- L1Trigger/L1TGlobal/src/MuCondition.cc | 29 ++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/L1Trigger/L1TGlobal/src/MuCondition.cc b/L1Trigger/L1TGlobal/src/MuCondition.cc index d45ce64a90040..ab920ffe70ce6 100644 --- a/L1Trigger/L1TGlobal/src/MuCondition.cc +++ b/L1Trigger/L1TGlobal/src/MuCondition.cc @@ -382,12 +382,29 @@ const bool l1t::MuCondition::checkObjectParameter(const int iCondition, << "\n\t hwQual = 0x " << cand.hwQual() << "\n\t hwIso = 0x " << cand.hwIso() << std::dec << std::endl; - if (!checkThreshold(objPar.unconstrainedPtLow, - objPar.unconstrainedPtHigh, - cand.hwPtUnconstrained(), - m_gtMuonTemplate->condGEq())) { - LogDebug("L1TGlobal") << "\t\t Muon Failed unconstrainedPt checkThreshold " << std::endl; - return false; + if( objPar.unconstrainedPtHigh > 0 ) // POTENTIAL FIX (HACK) RICK + { + if (!checkThreshold(objPar.unconstrainedPtLow, objPar.unconstrainedPtHigh, cand.hwPtUnconstrained(), m_gtMuonTemplate->condGEq())) + { + LogDebug("L1TGlobal") << "\t\t Muon Failed unconstrainedPt checkThreshold " << std::endl; + std::cout << "\t\t Muon Failed unconstrainedPt checkThreshold; iCondition = " << iCondition << std::endl; + return false; + } + // check impact parameter ( bit check ) with impact parameter LUT + // sanity check on candidate impact parameter + if (cand.hwDXY() > 3) { + LogDebug("L1TGlobal") << "\t\t l1t::Candidate has out of range hwDXY = " << cand.hwDXY() << std::endl; + return false; + } + bool passImpactParameterLUT = ((objPar.impactParameterLUT >> cand.hwDXY()) & 1); + if (!passImpactParameterLUT) // POTENITAL PROBLEM RICK + { + LogDebug("L1TGlobal") << "\t\t l1t::Candidate failed impact parameter requirement" << std::endl; + std::cout << "\t\t l1t::Candidate failed impact parameter requirement" << std::endl; + std::cout << "\t\t l1t::Candidate impactParameterLUT = " << objPar.impactParameterLUT << std::endl; + std::cout << "\t\t l1t::Candidate cand.hwDXY() = " << cand.hwDXY() << std::endl; + return false; + } } if (!checkThreshold(objPar.ptLowThreshold, objPar.ptHighThreshold, cand.hwPt(), m_gtMuonTemplate->condGEq())) { From beb0c2daf3c822d18f740acc2a994f01e75f2558 Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 1 Feb 2021 08:46:56 -0600 Subject: [PATCH 2/5] fixed bug in evaluation of unconstrained pT cut --- L1Trigger/L1TGlobal/src/MuCondition.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/L1Trigger/L1TGlobal/src/MuCondition.cc b/L1Trigger/L1TGlobal/src/MuCondition.cc index ab920ffe70ce6..96fc8f8ef785b 100644 --- a/L1Trigger/L1TGlobal/src/MuCondition.cc +++ b/L1Trigger/L1TGlobal/src/MuCondition.cc @@ -9,7 +9,7 @@ * * \author: Vasile Mihai Ghete - HEPHY Vienna * Vladimir Rekovic - extend for indexing - * + * Rick Cavanaugh - include displaced muons * */ From f46a5cab7b17ce4d047346ecba80c497132a7f8d Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 1 Feb 2021 09:20:10 -0600 Subject: [PATCH 3/5] fixed bug in evaluation of unconstrained pT cut (and removed cout statements) --- L1Trigger/L1TGlobal/src/MuCondition.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/L1Trigger/L1TGlobal/src/MuCondition.cc b/L1Trigger/L1TGlobal/src/MuCondition.cc index 96fc8f8ef785b..8cb1ac76e313a 100644 --- a/L1Trigger/L1TGlobal/src/MuCondition.cc +++ b/L1Trigger/L1TGlobal/src/MuCondition.cc @@ -382,7 +382,7 @@ const bool l1t::MuCondition::checkObjectParameter(const int iCondition, << "\n\t hwQual = 0x " << cand.hwQual() << "\n\t hwIso = 0x " << cand.hwIso() << std::dec << std::endl; - if( objPar.unconstrainedPtHigh > 0 ) // POTENTIAL FIX (HACK) RICK + if( objPar.unconstrainedPtHigh > 0 ) // Check if unconstrained pT cut-window is valid { if (!checkThreshold(objPar.unconstrainedPtLow, objPar.unconstrainedPtHigh, cand.hwPtUnconstrained(), m_gtMuonTemplate->condGEq())) { @@ -400,9 +400,6 @@ const bool l1t::MuCondition::checkObjectParameter(const int iCondition, if (!passImpactParameterLUT) // POTENITAL PROBLEM RICK { LogDebug("L1TGlobal") << "\t\t l1t::Candidate failed impact parameter requirement" << std::endl; - std::cout << "\t\t l1t::Candidate failed impact parameter requirement" << std::endl; - std::cout << "\t\t l1t::Candidate impactParameterLUT = " << objPar.impactParameterLUT << std::endl; - std::cout << "\t\t l1t::Candidate cand.hwDXY() = " << cand.hwDXY() << std::endl; return false; } } From dee0e92c7ce96f98ebda588e1b1966ee33732189 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 2 Feb 2021 11:31:08 +0100 Subject: [PATCH 4/5] format. --- L1Trigger/L1TGlobal/src/MuCondition.cc | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/L1Trigger/L1TGlobal/src/MuCondition.cc b/L1Trigger/L1TGlobal/src/MuCondition.cc index 8cb1ac76e313a..cab5fd9eec34b 100644 --- a/L1Trigger/L1TGlobal/src/MuCondition.cc +++ b/L1Trigger/L1TGlobal/src/MuCondition.cc @@ -382,26 +382,28 @@ const bool l1t::MuCondition::checkObjectParameter(const int iCondition, << "\n\t hwQual = 0x " << cand.hwQual() << "\n\t hwIso = 0x " << cand.hwIso() << std::dec << std::endl; - if( objPar.unconstrainedPtHigh > 0 ) // Check if unconstrained pT cut-window is valid + if (objPar.unconstrainedPtHigh > 0) // Check if unconstrained pT cut-window is valid { - if (!checkThreshold(objPar.unconstrainedPtLow, objPar.unconstrainedPtHigh, cand.hwPtUnconstrained(), m_gtMuonTemplate->condGEq())) - { - LogDebug("L1TGlobal") << "\t\t Muon Failed unconstrainedPt checkThreshold " << std::endl; - std::cout << "\t\t Muon Failed unconstrainedPt checkThreshold; iCondition = " << iCondition << std::endl; - return false; + if (!checkThreshold(objPar.unconstrainedPtLow, + objPar.unconstrainedPtHigh, + cand.hwPtUnconstrained(), + m_gtMuonTemplate->condGEq())) { + LogDebug("L1TGlobal") << "\t\t Muon Failed unconstrainedPt checkThreshold " << std::endl; + std::cout << "\t\t Muon Failed unconstrainedPt checkThreshold; iCondition = " << iCondition << std::endl; + return false; } - // check impact parameter ( bit check ) with impact parameter LUT + // check impact parameter ( bit check ) with impact parameter LUT // sanity check on candidate impact parameter if (cand.hwDXY() > 3) { LogDebug("L1TGlobal") << "\t\t l1t::Candidate has out of range hwDXY = " << cand.hwDXY() << std::endl; return false; } bool passImpactParameterLUT = ((objPar.impactParameterLUT >> cand.hwDXY()) & 1); - if (!passImpactParameterLUT) // POTENITAL PROBLEM RICK - { - LogDebug("L1TGlobal") << "\t\t l1t::Candidate failed impact parameter requirement" << std::endl; - return false; - } + if (!passImpactParameterLUT) // POTENITAL PROBLEM RICK + { + LogDebug("L1TGlobal") << "\t\t l1t::Candidate failed impact parameter requirement" << std::endl; + return false; + } } if (!checkThreshold(objPar.ptLowThreshold, objPar.ptHighThreshold, cand.hwPt(), m_gtMuonTemplate->condGEq())) { From cd133e0493250b6b4747da71a2e4b9d914497cf8 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 2 Feb 2021 13:09:07 +0100 Subject: [PATCH 5/5] Remove cout. --- L1Trigger/L1TGlobal/src/MuCondition.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/L1Trigger/L1TGlobal/src/MuCondition.cc b/L1Trigger/L1TGlobal/src/MuCondition.cc index cab5fd9eec34b..f91a17660cee2 100644 --- a/L1Trigger/L1TGlobal/src/MuCondition.cc +++ b/L1Trigger/L1TGlobal/src/MuCondition.cc @@ -388,8 +388,8 @@ const bool l1t::MuCondition::checkObjectParameter(const int iCondition, objPar.unconstrainedPtHigh, cand.hwPtUnconstrained(), m_gtMuonTemplate->condGEq())) { - LogDebug("L1TGlobal") << "\t\t Muon Failed unconstrainedPt checkThreshold " << std::endl; - std::cout << "\t\t Muon Failed unconstrainedPt checkThreshold; iCondition = " << iCondition << std::endl; + LogDebug("L1TGlobal") << "\t\t Muon Failed unconstrainedPt checkThreshold; iCondition = " << iCondition + << std::endl; return false; } // check impact parameter ( bit check ) with impact parameter LUT