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 275 of file layer1_objs.h.

Member Function Documentation

◆ clear()

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

Definition at line 297 of file layer1_objs.h.

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

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

297  {
298  hwPt = 0;
299  hwEta = 0;
300  hwPhi = 0;
301  hwDEta = 0;
302  hwDPhi = 0;
303  hwZ0 = 0;
304  hwDxy = 0;
305  hwCharge = false;
306  hwQuality = 0;
307  }
tkdphi_t hwDPhi
Definition: layer1_objs.h:280
ap_uint< 3 > hwQuality
Definition: layer1_objs.h:284
glbphi_t hwPhi
Definition: layer1_objs.h:278
tkdeta_t hwDEta
Definition: layer1_objs.h:279
glbeta_t hwEta
Definition: layer1_objs.h:277

◆ floatDEta()

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

Definition at line 318 of file layer1_objs.h.

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

318 { return Scales::floatEta(hwDEta); }
float floatEta(eta_t eta)
Definition: datatypes.h:166
tkdeta_t hwDEta
Definition: layer1_objs.h:279

◆ floatDPhi()

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

Definition at line 319 of file layer1_objs.h.

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

319 { return Scales::floatPhi(hwDPhi); }
tkdphi_t hwDPhi
Definition: layer1_objs.h:280
float floatPhi(phi_t phi)
Definition: datatypes.h:167

◆ floatDxy()

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

Definition at line 323 of file layer1_objs.h.

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

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

◆ floatEta()

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

Definition at line 316 of file layer1_objs.h.

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

316 { return Scales::floatEta(hwEta); }
float floatEta(eta_t eta)
Definition: datatypes.h:166
glbeta_t hwEta
Definition: layer1_objs.h:277

◆ floatPhi()

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

Definition at line 317 of file layer1_objs.h.

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

317 { return Scales::floatPhi(hwPhi); }
glbphi_t hwPhi
Definition: layer1_objs.h:278
float floatPhi(phi_t phi)
Definition: datatypes.h:167

◆ floatPt()

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

Definition at line 315 of file layer1_objs.h.

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

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

◆ floatVtxEta()

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

Definition at line 320 of file layer1_objs.h.

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

320 { return Scales::floatEta(hwVtxEta()); }
float floatEta(eta_t eta)
Definition: datatypes.h:166
glbeta_t hwVtxEta() const
Definition: layer1_objs.h:286

◆ floatVtxPhi()

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

Definition at line 321 of file layer1_objs.h.

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

321 { return Scales::floatPhi(hwVtxPhi()); }
glbphi_t hwVtxPhi() const
Definition: layer1_objs.h:285
float floatPhi(phi_t phi)
Definition: datatypes.h:167

◆ floatZ0()

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

Definition at line 322 of file layer1_objs.h.

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

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

◆ hwVtxEta()

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

Definition at line 286 of file layer1_objs.h.

References hwDEta, and hwEta.

Referenced by floatVtxEta(), and intVtxEta().

286 { return hwEta + hwDEta; }
tkdeta_t hwDEta
Definition: layer1_objs.h:279
glbeta_t hwEta
Definition: layer1_objs.h:277

◆ hwVtxPhi()

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

Definition at line 285 of file layer1_objs.h.

References hwCharge, hwDPhi, and hwPhi.

Referenced by floatVtxPhi(), and intVtxPhi().

285 { return hwCharge ? hwPhi + hwDPhi : hwPhi - hwDPhi; }
tkdphi_t hwDPhi
Definition: layer1_objs.h:280
glbphi_t hwPhi
Definition: layer1_objs.h:278

◆ intCharge()

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

Definition at line 314 of file layer1_objs.h.

References hwCharge.

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

◆ intEta()

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

Definition at line 310 of file layer1_objs.h.

References hwEta.

310 { return hwEta.to_int(); }
glbeta_t hwEta
Definition: layer1_objs.h:277

◆ intPhi()

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

Definition at line 311 of file layer1_objs.h.

References hwPhi.

311 { return hwPhi.to_int(); }
glbphi_t hwPhi
Definition: layer1_objs.h:278

◆ intPt()

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

Definition at line 309 of file layer1_objs.h.

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

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

◆ intVtxEta()

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

Definition at line 312 of file layer1_objs.h.

References hwVtxEta().

312 { return hwVtxEta().to_int(); }
glbeta_t hwVtxEta() const
Definition: layer1_objs.h:286

◆ intVtxPhi()

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

Definition at line 313 of file layer1_objs.h.

References hwVtxPhi().

313 { return hwVtxPhi().to_int(); }
glbphi_t hwVtxPhi() const
Definition: layer1_objs.h:285

◆ operator<()

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

Definition at line 295 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

295 { return hwPt < other.hwPt; }

◆ operator==()

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

Definition at line 288 of file layer1_objs.h.

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

288  {
289  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwDEta == other.hwDEta &&
290  hwDPhi == other.hwDPhi && hwZ0 == other.hwZ0 && hwDxy == other.hwDxy && hwCharge == other.hwCharge &&
291  hwQuality == other.hwQuality;
292  }
tkdphi_t hwDPhi
Definition: layer1_objs.h:280
ap_uint< 3 > hwQuality
Definition: layer1_objs.h:284
glbphi_t hwPhi
Definition: layer1_objs.h:278
tkdeta_t hwDEta
Definition: layer1_objs.h:279
glbeta_t hwEta
Definition: layer1_objs.h:277

◆ operator>()

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

Definition at line 294 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

294 { return hwPt > other.hwPt; }

◆ pack()

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

Definition at line 327 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.

327  {
328  ap_uint<BITWIDTH> ret;
329  unsigned int start = 0;
339  return ret;
340  }
Definition: start.py:1
ret
prodAgent to be discontinued
tkdphi_t hwDPhi
Definition: layer1_objs.h:280
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:284
glbphi_t hwPhi
Definition: layer1_objs.h:278
tkdeta_t hwDEta
Definition: layer1_objs.h:279
glbeta_t hwEta
Definition: layer1_objs.h:277
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 341 of file layer1_objs.h.

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

341  {
342  MuObj ret;
343  unsigned int start = 0;
344  unpack_from_bits(src, start, ret.hwPt);
345  unpack_from_bits(src, start, ret.hwEta);
346  unpack_from_bits(src, start, ret.hwPhi);
347  unpack_from_bits(src, start, ret.hwDEta);
348  unpack_from_bits(src, start, ret.hwDPhi);
349  unpack_bool_from_bits(src, start, ret.hwCharge);
350  unpack_from_bits(src, start, ret.hwZ0);
351  unpack_from_bits(src, start, ret.hwDxy);
352  unpack_from_bits(src, start, ret.hwQuality);
353  return ret;
354  }
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 281 of file layer1_objs.h.

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

◆ hwDEta

tkdeta_t l1ct::MuObj::hwDEta

Definition at line 279 of file layer1_objs.h.

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

◆ hwDPhi

tkdphi_t l1ct::MuObj::hwDPhi

Definition at line 280 of file layer1_objs.h.

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

◆ hwDxy

dxy_t l1ct::MuObj::hwDxy

Definition at line 283 of file layer1_objs.h.

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

◆ hwEta

glbeta_t l1ct::MuObj::hwEta

Definition at line 277 of file layer1_objs.h.

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

◆ hwPhi

glbphi_t l1ct::MuObj::hwPhi

Definition at line 278 of file layer1_objs.h.

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

◆ hwPt

pt_t l1ct::MuObj::hwPt

Definition at line 276 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 284 of file layer1_objs.h.

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

◆ hwZ0

z0_t l1ct::MuObj::hwZ0

Definition at line 282 of file layer1_objs.h.

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