File indexing completed on 2025-06-20 01:53:32
0001 #ifndef L1Trigger_Phase2L1ParticleFlow_newfirmware_gcthadinput_ref_h
0002 #define L1Trigger_Phase2L1ParticleFlow_newfirmware_gcthadinput_ref_h
0003
0004 #include "DataFormats/L1TParticleFlow/interface/layer1_emulator.h"
0005
0006
0007
0008 namespace edm {
0009 class ParameterSet;
0010 class ParameterSetDescription;
0011 }
0012
0013 namespace l1ct {
0014 class GctHadClusterDecoderEmulator {
0015 public:
0016 GctHadClusterDecoderEmulator() {};
0017 GctHadClusterDecoderEmulator(const edm::ParameterSet &pset);
0018
0019 ~GctHadClusterDecoderEmulator() = default;
0020
0021 static edm::ParameterSetDescription getParameterSetDescription();
0022
0023 l1ct::HadCaloObjEmu decode(const l1ct::PFRegionEmu §or, const ap_uint<64> &in) const;
0024
0025 private:
0026 double fracPart(const double total, const unsigned int hoe) const;
0027 ap_uint<12> pt(const ap_uint<64> &in) const { return in.range(11, 0); }
0028
0029
0030 ap_uint<7> eta(const ap_uint<64> &in) const { return (ap_uint<7>)in.range(18, 12); }
0031
0032
0033 ap_int<7> phi(const ap_uint<64> &in) const { return (ap_int<7>)in.range(25, 19); }
0034
0035
0036 ap_uint<4> hoe(const ap_uint<64> &in) const { return in.range(29, 26); }
0037 };
0038 }
0039
0040 #endif