1 #ifndef L1Trigger_Phase2L1ParticleFlow_l1converters_tracks_tkinput_ref_h 2 #define L1Trigger_Phase2L1ParticleFlow_l1converters_tracks_tkinput_ref_h 33 std::pair<l1ct::TkObjEmu, bool>
decodeTrack(ap_uint<96> tkword,
39 std::pair<l1ct::TkObjEmu, bool>
decodeTrack(ap_uint<96> tkword,
45 static bool valid(
const ap_uint<96> &tkword) {
return tkword[95]; }
46 static bool charge(
const ap_uint<96> &tkword) {
return !tkword[94]; }
48 static ap_int<15>
signedRinv(
const ap_uint<96> &tkword) {
return ap_int<15>(tkword(94, 80)); }
49 static ap_int<12>
signedZ0(
const ap_uint<96> &tkword) {
return ap_int<12>(tkword(47, 36)); }
50 static ap_int<16>
signedTanl(
const ap_uint<96> &tkword) {
return ap_int<16>(tkword(63, 48)); }
51 static ap_int<12>
signedPhi(
const ap_uint<96> &tkword) {
return ap_int<12>(tkword(79, 68)); }
58 float floatEta(ap_int<16> tanl)
const;
61 float floatPt(ap_int<15> Rinv)
const;
64 float floatPhi(ap_int<12> phi)
const;
67 float floatZ0(ap_int<12> z0)
const;
97 float floatDEtaBarrel(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
99 float floatDPhiBarrel(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
113 float floatDEtaHGCal(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
115 float floatDPhiHGCal(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
148 static bool mayReachHGCal(ap_int<16> tanl) {
return (tanl > 6000) || (tanl < -6000); }
150 static bool withinTracker(ap_int<16> tanl) {
return (-25000 < tanl) && (tanl < 25000); }
152 static bool withinBarrel(ap_int<16> tanl) {
return (-13000 < tanl) && (tanl < 13000); }
165 unsigned int count = 0;
177 float ret = signedVal.to_float();
180 return (signedVal >= 0 ?
ret + 0.5 :
ret - 0.5);
ret
prodAgent to be discontinued
ap_ufixed< 14, 12, AP_TRN, AP_SAT > pt_t
static unsigned int const shift