From 41b686e71e8281f966700774db558e4c110a5e76 Mon Sep 17 00:00:00 2001 From: Sioni Summers <14807534+thesps@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:15:07 +0200 Subject: [PATCH] Fixes for emulator-firmware correctness for HT. Initialise the packed object word to 0 before packing. Round the eta limit to hardware units --- DataFormats/L1TParticleFlow/interface/gt_datatypes.h | 6 +++--- .../Phase2L1ParticleFlow/python/l1tMHTPFProducer_cfi.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DataFormats/L1TParticleFlow/interface/gt_datatypes.h b/DataFormats/L1TParticleFlow/interface/gt_datatypes.h index 5f01de0230818..b7ceff79923c3 100644 --- a/DataFormats/L1TParticleFlow/interface/gt_datatypes.h +++ b/DataFormats/L1TParticleFlow/interface/gt_datatypes.h @@ -154,7 +154,7 @@ namespace l1gt { static const int BITWIDTH = 64; inline ap_uint pack() const { - ap_uint ret; + ap_uint ret(0); unsigned int start = 0; pack_into_bits(ret, start, valid); pack_into_bits(ret, start, vector_pt); @@ -191,7 +191,7 @@ namespace l1gt { static const int BITWIDTH = 128; inline ap_uint pack_ap() const { - ap_uint ret; + ap_uint ret(0); unsigned int start = 0; pack_into_bits(ret, start, valid); pack_into_bits(ret, start, v3.pack()); @@ -330,7 +330,7 @@ namespace l1gt { } inline static Photon unpack(const std::array &src, int parity) { - ap_uint bits; + ap_uint bits(0); if (parity == 0) { bits(63, 0) = src[0]; bits(95, 64) = src[1]; diff --git a/L1Trigger/Phase2L1ParticleFlow/python/l1tMHTPFProducer_cfi.py b/L1Trigger/Phase2L1ParticleFlow/python/l1tMHTPFProducer_cfi.py index 31e3f57591c9e..e9d8ebf9c7def 100644 --- a/L1Trigger/Phase2L1ParticleFlow/python/l1tMHTPFProducer_cfi.py +++ b/L1Trigger/Phase2L1ParticleFlow/python/l1tMHTPFProducer_cfi.py @@ -3,5 +3,5 @@ l1tMHTPFProducer = cms.EDProducer("L1MhtPfProducer", jets = cms.InputTag("l1tSCPFL1PuppiEmulator"), minJetPt = cms.double(30.0), - maxJetEta = cms.double(2.4) + maxJetEta = cms.double(550 * cms.math.pi / 720) # 2.4 rounded to hardware unit granularity )