1 #ifndef L1Trigger_Phase2L1ParticleFlow_l1converters_tracks_tkinput_ref_h 2 #define L1Trigger_Phase2L1ParticleFlow_l1converters_tracks_tkinput_ref_h 36 std::pair<l1ct::TkObjEmu, bool>
decodeTrack(ap_uint<96> tkword,
42 std::pair<l1ct::TkObjEmu, bool>
decodeTrack(ap_uint<96> tkword,
48 static bool valid(
const ap_uint<96> &tkword) {
return tkword[95]; }
49 static bool charge(
const ap_uint<96> &tkword) {
return !tkword[94]; }
51 static ap_int<15>
signedRinv(
const ap_uint<96> &tkword) {
return ap_int<15>(tkword(94, 80)); }
52 static ap_int<12>
signedZ0(
const ap_uint<96> &tkword) {
return ap_int<12>(tkword(47, 36)); }
53 static ap_int<16>
signedTanl(
const ap_uint<96> &tkword) {
return ap_int<16>(tkword(63, 48)); }
54 static ap_int<12>
signedPhi(
const ap_uint<96> &tkword) {
return ap_int<12>(tkword(79, 68)); }
61 float floatEta(ap_int<16> tanl)
const;
64 float floatPt(ap_int<15> Rinv)
const;
67 float floatPhi(ap_int<12> phi)
const;
70 float floatZ0(ap_int<12> z0)
const;
100 float floatDEtaBarrel(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
102 float floatDPhiBarrel(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
116 float floatDEtaHGCal(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
118 float floatDPhiHGCal(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
151 static bool mayReachHGCal(ap_int<16> tanl) {
return (tanl > 6000) || (tanl < -6000); }
153 static bool withinTracker(ap_int<16> tanl) {
return (-25000 < tanl) && (tanl < 25000); }
155 static bool withinBarrel(ap_int<16> tanl) {
return (-13000 < tanl) && (tanl < 13000); }
168 unsigned int count = 0;
180 float ret = signedVal.to_float();
183 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