From 9b2dcea3c224a3c761249b6ecde1bb09c30ed607 Mon Sep 17 00:00:00 2001 From: Andrew Loeliger Date: Mon, 1 Jul 2024 07:33:26 -0500 Subject: [PATCH] Add 2024 L1T modifier & modifiers for changing BMTF quality calculation --- .../Eras/python/Era_Run3_2024_cff.py | 3 ++- .../Eras/python/Modifier_run3_2024_L1T_cff.py | 3 +++ .../interface/L1TMuonBarrelKalmanAlgo.h | 2 ++ .../L1TMuonBarrel/python/simKBmtfDigis_cfi.py | 10 +++++-- .../src/L1TMuonBarrelKalmanAlgo.cc | 27 +++++++++++-------- 5 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 Configuration/Eras/python/Modifier_run3_2024_L1T_cff.py diff --git a/Configuration/Eras/python/Era_Run3_2024_cff.py b/Configuration/Eras/python/Era_Run3_2024_cff.py index 6dc5f3a1b6e03..fec4b81b1ddfb 100644 --- a/Configuration/Eras/python/Era_Run3_2024_cff.py +++ b/Configuration/Eras/python/Era_Run3_2024_cff.py @@ -1,5 +1,6 @@ import FWCore.ParameterSet.Config as cms from Configuration.Eras.Era_Run3_cff import Run3 +from Configuration.Eras.Modifier_run3_2024_L1T_cff import run3_2024_L1T -Run3_2024 = cms.ModifierChain(Run3) +Run3_2024 = cms.ModifierChain(Run3, run3_2024_L1T) diff --git a/Configuration/Eras/python/Modifier_run3_2024_L1T_cff.py b/Configuration/Eras/python/Modifier_run3_2024_L1T_cff.py new file mode 100644 index 0000000000000..7a981a35023ac --- /dev/null +++ b/Configuration/Eras/python/Modifier_run3_2024_L1T_cff.py @@ -0,0 +1,3 @@ +import FWCore.ParameterSet.Config as cms + +run3_2024_L1T = cms.Modifier() diff --git a/L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelKalmanAlgo.h b/L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelKalmanAlgo.h index 31b03f79d5166..318ef30b4650c 100644 --- a/L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelKalmanAlgo.h +++ b/L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelKalmanAlgo.h @@ -141,6 +141,8 @@ class L1TMuonBarrelKalmanAlgo { //double pointResolutionPhiB_; //point resolution for vertex double pointResolutionVertex_; + //Toggle for the new quality calculation in the emulator + bool useNewQualityCalculation_; //Sorter class StubSorter { diff --git a/L1Trigger/L1TMuonBarrel/python/simKBmtfDigis_cfi.py b/L1Trigger/L1TMuonBarrel/python/simKBmtfDigis_cfi.py index ceb1fd44f3e2b..42d79cefae658 100644 --- a/L1Trigger/L1TMuonBarrel/python/simKBmtfDigis_cfi.py +++ b/L1Trigger/L1TMuonBarrel/python/simKBmtfDigis_cfi.py @@ -1,4 +1,5 @@ import FWCore.ParameterSet.Config as cms +from Configuration.Eras.Modifier_run3_2024_L1T_cff import run3_2024_L1T bmtfKalmanTrackingSettings = cms.PSet( verbose = cms.bool(False), # @@ -46,9 +47,14 @@ pointResolutionPhiB = cms.double(500.), pointResolutionPhiBH = cms.vdouble(151., 173., 155., 153.), pointResolutionPhiBL = cms.vdouble(17866., 19306., 23984., 23746.), - pointResolutionVertex = cms.double(1.) -) + pointResolutionVertex = cms.double(1.), + useNewQualityCalculation = cms.bool(False), +) +run3_2024_L1T.toModify( + bmtfKalmanTrackingSettings, + useNewQualityCalculation = cms.bool(True), +) simKBmtfDigis = cms.EDProducer("L1TMuonBarrelKalmanTrackProducer", diff --git a/L1Trigger/L1TMuonBarrel/src/L1TMuonBarrelKalmanAlgo.cc b/L1Trigger/L1TMuonBarrel/src/L1TMuonBarrelKalmanAlgo.cc index 719bcd67e6b99..fc001c4cc8658 100644 --- a/L1Trigger/L1TMuonBarrel/src/L1TMuonBarrelKalmanAlgo.cc +++ b/L1Trigger/L1TMuonBarrel/src/L1TMuonBarrelKalmanAlgo.cc @@ -39,7 +39,8 @@ L1TMuonBarrelKalmanAlgo::L1TMuonBarrelKalmanAlgo(const edm::ParameterSet& settin pointResolutionPhiB_(settings.getParameter("pointResolutionPhiB")), pointResolutionPhiBH_(settings.getParameter >("pointResolutionPhiBH")), pointResolutionPhiBL_(settings.getParameter >("pointResolutionPhiBL")), - pointResolutionVertex_(settings.getParameter("pointResolutionVertex")) + pointResolutionVertex_(settings.getParameter("pointResolutionVertex")), + useNewQualityCalculation_(settings.getParameter("useNewQualityCalculation")) {} @@ -99,16 +100,20 @@ l1t::RegionalMuonCand L1TMuonBarrelKalmanAlgo::convertToBMTF(const L1MuKBMTrack& int processor = track.sector(); int HF = track.hasFineEta(); - int quality; - int r = rank(track); - if (r < 192) - quality = 12; - else if (r < 204) - quality = 13; - else if (r < 220) - quality = 14; - else - quality = 15; + int quality = 0; + if (useNewQualityCalculation_) { + int r = rank(track); + if (r < 192) + quality = 12; + else if (r < 204) + quality = 13; + else if (r < 220) + quality = 14; + else + quality = 15; + } else { + quality = 12 | (rank(track) >> 6); + } int dxy = abs(track.dxy()) >> 8; if (dxy > 3)