CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
l1ct::MuObj Struct Reference

#include <layer1_objs.h>

Inheritance diagram for l1ct::MuObj:
l1ct::MuObjEmu

Public Member Functions

void clear ()
 
float floatDEta () const
 
float floatDPhi () const
 
float floatDxy () const
 
float floatEta () const
 
float floatPhi () const
 
float floatPt () const
 
float floatVtxEta () const
 
float floatVtxPhi () const
 
float floatZ0 () const
 
glbeta_t hwVtxEta () const
 
glbphi_t hwVtxPhi () const
 
int intCharge () const
 
int intEta () const
 
int intPhi () const
 
int intPt () const
 
int intVtxEta () const
 
int intVtxPhi () const
 
bool operator< (const MuObj &other) const
 
bool operator== (const MuObj &other) const
 
bool operator> (const MuObj &other) const
 
ap_uint< BITWIDTHpack () const
 

Static Public Member Functions

static MuObj unpack (const ap_uint< BITWIDTH > &src)
 

Public Attributes

bool hwCharge
 
tkdeta_t hwDEta
 
tkdphi_t hwDPhi
 
dxy_t hwDxy
 
glbeta_t hwEta
 
glbphi_t hwPhi
 
pt_t hwPt
 
ap_uint< 3 > hwQuality
 
z0_t hwZ0
 

Static Public Attributes

static const int BITWIDTH
 

Detailed Description

Definition at line 210 of file layer1_objs.h.

Member Function Documentation

◆ clear()

void l1ct::MuObj::clear ( void  )
inline

Definition at line 232 of file layer1_objs.h.

References hwCharge, hwDEta, hwDPhi, hwDxy, hwEta, hwPhi, hwPt, hwQuality, and hwZ0.

Referenced by l1ct::MuObjEmu::clear().

232  {
233  hwPt = 0;
234  hwEta = 0;
235  hwPhi = 0;
236  hwDEta = 0;
237  hwDPhi = 0;
238  hwZ0 = 0;
239  hwDxy = 0;
240  hwCharge = false;
241  hwQuality = 0;
242  }
tkdphi_t hwDPhi
Definition: layer1_objs.h:215
ap_uint< 3 > hwQuality
Definition: layer1_objs.h:219
glbphi_t hwPhi
Definition: layer1_objs.h:213
tkdeta_t hwDEta
Definition: layer1_objs.h:214
glbeta_t hwEta
Definition: layer1_objs.h:212

◆ floatDEta()

float l1ct::MuObj::floatDEta ( ) const
inline

Definition at line 253 of file layer1_objs.h.

References l1ct::Scales::floatEta(), and hwDEta.

253 { return Scales::floatEta(hwDEta); }
float floatEta(eta_t eta)
Definition: datatypes.h:157
tkdeta_t hwDEta
Definition: layer1_objs.h:214

◆ floatDPhi()

float l1ct::MuObj::floatDPhi ( ) const
inline

Definition at line 254 of file layer1_objs.h.

References l1ct::Scales::floatPhi(), and hwDPhi.

254 { return Scales::floatPhi(hwDPhi); }
tkdphi_t hwDPhi
Definition: layer1_objs.h:215
float floatPhi(phi_t phi)
Definition: datatypes.h:158

◆ floatDxy()

float l1ct::MuObj::floatDxy ( ) const
inline

Definition at line 258 of file layer1_objs.h.

References l1ct::Scales::floatDxy(), and hwDxy.

258 { return Scales::floatDxy(hwDxy); }
float floatDxy(dxy_t dxy)
Definition: datatypes.h:164

◆ floatEta()

float l1ct::MuObj::floatEta ( ) const
inline

Definition at line 251 of file layer1_objs.h.

References l1ct::Scales::floatEta(), and hwEta.

251 { return Scales::floatEta(hwEta); }
float floatEta(eta_t eta)
Definition: datatypes.h:157
glbeta_t hwEta
Definition: layer1_objs.h:212

◆ floatPhi()

float l1ct::MuObj::floatPhi ( ) const
inline

Definition at line 252 of file layer1_objs.h.

References l1ct::Scales::floatPhi(), and hwPhi.

252 { return Scales::floatPhi(hwPhi); }
glbphi_t hwPhi
Definition: layer1_objs.h:213
float floatPhi(phi_t phi)
Definition: datatypes.h:158

◆ floatPt()

float l1ct::MuObj::floatPt ( ) const
inline

Definition at line 250 of file layer1_objs.h.

References l1ct::Scales::floatPt(), and hwPt.

250 { return Scales::floatPt(hwPt); }
float floatPt(pt_t pt)
Definition: datatypes.h:152

◆ floatVtxEta()

float l1ct::MuObj::floatVtxEta ( ) const
inline

Definition at line 255 of file layer1_objs.h.

References l1ct::Scales::floatEta(), and hwVtxEta().

255 { return Scales::floatEta(hwVtxEta()); }
float floatEta(eta_t eta)
Definition: datatypes.h:157
glbeta_t hwVtxEta() const
Definition: layer1_objs.h:221

◆ floatVtxPhi()

float l1ct::MuObj::floatVtxPhi ( ) const
inline

Definition at line 256 of file layer1_objs.h.

References l1ct::Scales::floatPhi(), and hwVtxPhi().

256 { return Scales::floatPhi(hwVtxPhi()); }
glbphi_t hwVtxPhi() const
Definition: layer1_objs.h:220
float floatPhi(phi_t phi)
Definition: datatypes.h:158

◆ floatZ0()

float l1ct::MuObj::floatZ0 ( ) const
inline

Definition at line 257 of file layer1_objs.h.

References l1ct::Scales::floatZ0(), and hwZ0.

257 { return Scales::floatZ0(hwZ0); }
float floatZ0(z0_t z0)
Definition: datatypes.h:163

◆ hwVtxEta()

glbeta_t l1ct::MuObj::hwVtxEta ( ) const
inline

Definition at line 221 of file layer1_objs.h.

References hwDEta, and hwEta.

Referenced by floatVtxEta(), and intVtxEta().

221 { return hwEta + hwDEta; }
tkdeta_t hwDEta
Definition: layer1_objs.h:214
glbeta_t hwEta
Definition: layer1_objs.h:212

◆ hwVtxPhi()

glbphi_t l1ct::MuObj::hwVtxPhi ( ) const
inline

Definition at line 220 of file layer1_objs.h.

References hwCharge, hwDPhi, and hwPhi.

Referenced by floatVtxPhi(), and intVtxPhi().

220 { return hwCharge ? hwPhi + hwDPhi : hwPhi - hwDPhi; }
tkdphi_t hwDPhi
Definition: layer1_objs.h:215
glbphi_t hwPhi
Definition: layer1_objs.h:213

◆ intCharge()

int l1ct::MuObj::intCharge ( ) const
inline

Definition at line 249 of file layer1_objs.h.

References hwCharge.

249 { return hwCharge ? +1 : -1; }

◆ intEta()

int l1ct::MuObj::intEta ( ) const
inline

Definition at line 245 of file layer1_objs.h.

References hwEta.

245 { return hwEta.to_int(); }
glbeta_t hwEta
Definition: layer1_objs.h:212

◆ intPhi()

int l1ct::MuObj::intPhi ( ) const
inline

Definition at line 246 of file layer1_objs.h.

References hwPhi.

246 { return hwPhi.to_int(); }
glbphi_t hwPhi
Definition: layer1_objs.h:213

◆ intPt()

int l1ct::MuObj::intPt ( ) const
inline

Definition at line 244 of file layer1_objs.h.

References hwPt, and l1ct::Scales::intPt().

244 { return Scales::intPt(hwPt); }
int intPt(pt_t pt)
Definition: datatypes.h:155

◆ intVtxEta()

int l1ct::MuObj::intVtxEta ( ) const
inline

Definition at line 247 of file layer1_objs.h.

References hwVtxEta().

247 { return hwVtxEta().to_int(); }
glbeta_t hwVtxEta() const
Definition: layer1_objs.h:221

◆ intVtxPhi()

int l1ct::MuObj::intVtxPhi ( ) const
inline

Definition at line 248 of file layer1_objs.h.

References hwVtxPhi().

248 { return hwVtxPhi().to_int(); }
glbphi_t hwVtxPhi() const
Definition: layer1_objs.h:220

◆ operator<()

bool l1ct::MuObj::operator< ( const MuObj other) const
inline

Definition at line 230 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

230 { return hwPt < other.hwPt; }

◆ operator==()

bool l1ct::MuObj::operator== ( const MuObj other) const
inline

Definition at line 223 of file layer1_objs.h.

References hwCharge, hwDEta, hwDPhi, hwDxy, hwEta, hwPhi, hwPt, hwQuality, hwZ0, and trackingPlots::other.

223  {
224  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwDEta == other.hwDEta &&
225  hwDPhi == other.hwDPhi && hwZ0 == other.hwZ0 && hwDxy == other.hwDxy && hwCharge == other.hwCharge &&
226  hwQuality == other.hwQuality;
227  }
tkdphi_t hwDPhi
Definition: layer1_objs.h:215
ap_uint< 3 > hwQuality
Definition: layer1_objs.h:219
glbphi_t hwPhi
Definition: layer1_objs.h:213
tkdeta_t hwDEta
Definition: layer1_objs.h:214
glbeta_t hwEta
Definition: layer1_objs.h:212

◆ operator>()

bool l1ct::MuObj::operator> ( const MuObj other) const
inline

Definition at line 229 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

229 { return hwPt > other.hwPt; }

◆ pack()

ap_uint<BITWIDTH> l1ct::MuObj::pack ( ) const
inline

Definition at line 262 of file layer1_objs.h.

References hwCharge, hwDEta, hwDPhi, hwDxy, hwEta, hwPhi, hwPt, hwQuality, hwZ0, pack_bool_into_bits(), pack_into_bits(), and runTheMatrix::ret.

262  {
263  ap_uint<BITWIDTH> ret;
264  unsigned int start = 0;
274  return ret;
275  }
Definition: start.py:1
ret
prodAgent to be discontinued
tkdphi_t hwDPhi
Definition: layer1_objs.h:215
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
ap_uint< 3 > hwQuality
Definition: layer1_objs.h:219
glbphi_t hwPhi
Definition: layer1_objs.h:213
tkdeta_t hwDEta
Definition: layer1_objs.h:214
glbeta_t hwEta
Definition: layer1_objs.h:212
void pack_bool_into_bits(U &u, unsigned int &start, bool data)
Definition: bit_encoding.h:22

◆ unpack()

static MuObj l1ct::MuObj::unpack ( const ap_uint< BITWIDTH > &  src)
inlinestatic

Definition at line 276 of file layer1_objs.h.

References runTheMatrix::ret, TrackRefitter_38T_cff::src, unpack_bool_from_bits(), and unpack_from_bits().

276  {
277  MuObj ret;
278  unsigned int start = 0;
279  unpack_from_bits(src, start, ret.hwPt);
280  unpack_from_bits(src, start, ret.hwEta);
281  unpack_from_bits(src, start, ret.hwPhi);
282  unpack_from_bits(src, start, ret.hwDEta);
283  unpack_from_bits(src, start, ret.hwDPhi);
284  unpack_bool_from_bits(src, start, ret.hwCharge);
285  unpack_from_bits(src, start, ret.hwZ0);
286  unpack_from_bits(src, start, ret.hwDxy);
287  unpack_from_bits(src, start, ret.hwQuality);
288  return ret;
289  }
Definition: start.py:1
ret
prodAgent to be discontinued
void unpack_bool_from_bits(const U &u, unsigned int &start, bool &data)
Definition: bit_encoding.h:27
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15

Member Data Documentation

◆ BITWIDTH

const int l1ct::MuObj::BITWIDTH
static

◆ hwCharge

bool l1ct::MuObj::hwCharge

Definition at line 216 of file layer1_objs.h.

Referenced by clear(), hwVtxPhi(), intCharge(), operator==(), and pack().

◆ hwDEta

tkdeta_t l1ct::MuObj::hwDEta

Definition at line 214 of file layer1_objs.h.

Referenced by clear(), floatDEta(), hwVtxEta(), operator==(), and pack().

◆ hwDPhi

tkdphi_t l1ct::MuObj::hwDPhi

Definition at line 215 of file layer1_objs.h.

Referenced by clear(), floatDPhi(), hwVtxPhi(), operator==(), and pack().

◆ hwDxy

dxy_t l1ct::MuObj::hwDxy

Definition at line 218 of file layer1_objs.h.

Referenced by clear(), floatDxy(), operator==(), and pack().

◆ hwEta

glbeta_t l1ct::MuObj::hwEta

Definition at line 212 of file layer1_objs.h.

Referenced by clear(), floatEta(), hwVtxEta(), intEta(), operator==(), and pack().

◆ hwPhi

glbphi_t l1ct::MuObj::hwPhi

Definition at line 213 of file layer1_objs.h.

Referenced by clear(), floatPhi(), hwVtxPhi(), intPhi(), operator==(), and pack().

◆ hwPt

pt_t l1ct::MuObj::hwPt

Definition at line 211 of file layer1_objs.h.

Referenced by clear(), floatPt(), intPt(), operator<(), operator==(), operator>(), and pack().

◆ hwQuality

ap_uint<3> l1ct::MuObj::hwQuality

Definition at line 219 of file layer1_objs.h.

Referenced by clear(), operator==(), and pack().

◆ hwZ0

z0_t l1ct::MuObj::hwZ0

Definition at line 217 of file layer1_objs.h.

Referenced by clear(), floatZ0(), operator==(), and pack().