Skip to content

Commit

Permalink
Merge pull request #32790 from cms-l1t-offline/pr113x-L1T-uGT-unconst…
Browse files Browse the repository at this point in the history
…rainedPT-impactParameter-fix

Pr113x L1T Bug fix:  uGT emulator of displaced muons
  • Loading branch information
cmsbuild committed Feb 3, 2021
2 parents bf052a3 + cd133e0 commit 2dc7c8c
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions L1Trigger/L1TGlobal/src/MuCondition.cc
Expand Up @@ -9,7 +9,7 @@
*
* \author: Vasile Mihai Ghete - HEPHY Vienna
* Vladimir Rekovic - extend for indexing
*
* Rick Cavanaugh - include displaced muons
*
*/

Expand Down Expand Up @@ -382,12 +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 (!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) // 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; 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;
return false;
}
}

if (!checkThreshold(objPar.ptLowThreshold, objPar.ptHighThreshold, cand.hwPt(), m_gtMuonTemplate->condGEq())) {
Expand Down

0 comments on commit 2dc7c8c

Please sign in to comment.