Skip to content

Commit

Permalink
Fixes for emulator-firmware correctness for HT. Initialise the packed…
Browse files Browse the repository at this point in the history
… object word to 0 before packing. Round the eta limit to hardware units
  • Loading branch information
thesps committed Oct 20, 2023
1 parent 8570d4f commit 41b686e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions DataFormats/L1TParticleFlow/interface/gt_datatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ namespace l1gt {

static const int BITWIDTH = 64;
inline ap_uint<BITWIDTH> pack() const {
ap_uint<BITWIDTH> ret;
ap_uint<BITWIDTH> ret(0);
unsigned int start = 0;
pack_into_bits(ret, start, valid);
pack_into_bits(ret, start, vector_pt);
Expand Down Expand Up @@ -191,7 +191,7 @@ namespace l1gt {

static const int BITWIDTH = 128;
inline ap_uint<BITWIDTH> pack_ap() const {
ap_uint<BITWIDTH> ret;
ap_uint<BITWIDTH> ret(0);
unsigned int start = 0;
pack_into_bits(ret, start, valid);
pack_into_bits(ret, start, v3.pack());
Expand Down Expand Up @@ -330,7 +330,7 @@ namespace l1gt {
}

inline static Photon unpack(const std::array<uint64_t, 2> &src, int parity) {
ap_uint<BITWIDTH> bits;
ap_uint<BITWIDTH> bits(0);
if (parity == 0) {
bits(63, 0) = src[0];
bits(95, 64) = src[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

0 comments on commit 41b686e

Please sign in to comment.