Skip to content

Commit

Permalink
Merge pull request #45461 from aloeliger/BMTF_O2O_14_0
Browse files Browse the repository at this point in the history
[14_0] Add 2024 L1T modifier & modifiers for changing BMTF quality calculation
  • Loading branch information
cmsbuild authored Jul 16, 2024
2 parents 32a8a37 + 9b2dcea commit ec53e60
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 14 deletions.
3 changes: 2 additions & 1 deletion Configuration/Eras/python/Era_Run3_2024_cff.py
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 3 additions & 0 deletions Configuration/Eras/python/Modifier_run3_2024_L1T_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import FWCore.ParameterSet.Config as cms

run3_2024_L1T = cms.Modifier()
2 changes: 2 additions & 0 deletions L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelKalmanAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 8 additions & 2 deletions L1Trigger/L1TMuonBarrel/python/simKBmtfDigis_cfi.py
Original file line number Diff line number Diff line change
@@ -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), #
Expand Down Expand Up @@ -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",
Expand Down
27 changes: 16 additions & 11 deletions L1Trigger/L1TMuonBarrel/src/L1TMuonBarrelKalmanAlgo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ L1TMuonBarrelKalmanAlgo::L1TMuonBarrelKalmanAlgo(const edm::ParameterSet& settin
pointResolutionPhiB_(settings.getParameter<double>("pointResolutionPhiB")),
pointResolutionPhiBH_(settings.getParameter<std::vector<double> >("pointResolutionPhiBH")),
pointResolutionPhiBL_(settings.getParameter<std::vector<double> >("pointResolutionPhiBL")),
pointResolutionVertex_(settings.getParameter<double>("pointResolutionVertex"))
pointResolutionVertex_(settings.getParameter<double>("pointResolutionVertex")),
useNewQualityCalculation_(settings.getParameter<bool>("useNewQualityCalculation"))

{}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ec53e60

Please sign in to comment.