1 #ifndef L1Trigger_Phase2L1ParticleFlow_l1converters_tracks_tkinput_ref_h 2 #define L1Trigger_Phase2L1ParticleFlow_l1converters_tracks_tkinput_ref_h 30 std::pair<l1ct::TkObjEmu, bool>
decodeTrack(ap_uint<96> tkword,
35 static bool valid(
const ap_uint<96> &tkword) {
return tkword[95]; }
36 static bool charge(
const ap_uint<96> &tkword) {
return !tkword[94]; }
38 static ap_int<15>
signedRinv(
const ap_uint<96> &tkword) {
return ap_int<15>(tkword(94, 80)); }
39 static ap_int<12>
signedZ0(
const ap_uint<96> &tkword) {
return ap_int<12>(tkword(47, 36)); }
40 static ap_int<16>
signedTanl(
const ap_uint<96> &tkword) {
return ap_int<16>(tkword(63, 48)); }
41 static ap_int<12>
signedPhi(
const ap_uint<96> &tkword) {
return ap_int<12>(tkword(79, 68)); }
48 float floatEta(ap_int<16> tanl)
const;
51 float floatPt(ap_int<15> Rinv)
const;
54 float floatPhi(ap_int<12> phi)
const;
57 float floatZ0(ap_int<12> z0)
const;
87 float floatDEtaBarrel(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
89 float floatDPhiBarrel(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
103 float floatDEtaHGCal(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
105 float floatDPhiHGCal(ap_int<12> z0, ap_int<15> Rinv, ap_int<16> tanl)
const;
138 static bool mayReachHGCal(ap_int<16> tanl) {
return (tanl > 6000) || (tanl < -6000); }
140 static bool withinTracker(ap_int<16> tanl) {
return (-25000 < tanl) && (tanl < 25000); }
142 static bool withinBarrel(ap_int<16> tanl) {
return (-13000 < tanl) && (tanl < 13000); }
158 float ret = signedVal.to_float();
161 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