CMS 3D CMS Logo

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

#include <pf.h>

Inheritance diagram for l1ct::PFChargedObj:
l1ct::PFCommonObj l1ct::PFChargedObjEmu

Public Member Functions

void clear ()
 
float floatDEta () const
 
float floatDPhi () const
 
float floatDxy () const
 
float floatVtxEta () const
 
float floatVtxPhi () const
 
float floatZ0 () const
 
eta_t hwVtxEta () const
 
phi_t hwVtxPhi () const
 
int intVtxEta () const
 
int intVtxPhi () const
 
bool operator< (const PFChargedObj &other) const
 
bool operator== (const PFChargedObj &other) const
 
bool operator> (const PFChargedObj &other) const
 
ap_uint< BITWIDTHpack () const
 
- Public Member Functions inherited from l1ct::PFCommonObj
float floatEta () const
 
float floatPhi () const
 
float floatPt () const
 
int intCharge () const
 
int intEta () const
 
int intId () const
 
int intPhi () const
 
int intPt () const
 
int oldId () const
 
template<typename U >
void pack_common (U &out, unsigned int &start) const
 
int pdgId () const
 
template<typename U >
void unpack_common (const U &src, unsigned int &start)
 

Static Public Member Functions

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

Public Attributes

tkdeta_t hwDEta
 
tkdphi_t hwDPhi
 
dxy_t hwDxy
 
tkquality_t hwTkQuality
 
z0_t hwZ0
 
- Public Attributes inherited from l1ct::PFCommonObj
eta_t hwEta
 
ParticleID hwId
 
phi_t hwPhi
 
pt_t hwPt
 

Static Public Attributes

static const int BITWIDTH
 
- Static Public Attributes inherited from l1ct::PFCommonObj
static const int _PFCOMMON_BITWIDTH = pt_t::width + eta_t::width + phi_t::width + 3
 

Detailed Description

Definition at line 43 of file pf.h.

Member Function Documentation

◆ clear()

void l1ct::PFChargedObj::clear ( void  )
inline

Definition at line 64 of file pf.h.

References l1ct::ParticleID::clear(), hwDEta, hwDPhi, hwDxy, l1ct::PFCommonObj::hwEta, l1ct::PFCommonObj::hwId, l1ct::PFCommonObj::hwPhi, l1ct::PFCommonObj::hwPt, hwTkQuality, and hwZ0.

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

64  {
65  hwPt = 0;
66  hwEta = 0;
67  hwPhi = 0;
68  hwId.clear();
69  hwDEta = 0;
70  hwDPhi = 0;
71  hwZ0 = 0;
72  hwDxy = 0;
73  hwTkQuality = 0;
74  }
tkdeta_t hwDEta
Definition: pf.h:48
tkdphi_t hwDPhi
Definition: pf.h:49
eta_t hwEta
Definition: pf.h:11
ParticleID hwId
Definition: pf.h:13
phi_t hwPhi
Definition: pf.h:12
tkquality_t hwTkQuality
Definition: pf.h:50
z0_t hwZ0
Definition: pf.h:46
dxy_t hwDxy
Definition: pf.h:47
pt_t hwPt
Definition: pf.h:10

◆ floatDEta()

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

Definition at line 78 of file pf.h.

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

78 { return Scales::floatEta(hwDEta); }
tkdeta_t hwDEta
Definition: pf.h:48
float floatEta(eta_t eta)
Definition: datatypes.h:164

◆ floatDPhi()

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

Definition at line 79 of file pf.h.

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

79 { return Scales::floatPhi(hwDPhi); }
tkdphi_t hwDPhi
Definition: pf.h:49
float floatPhi(phi_t phi)
Definition: datatypes.h:165

◆ floatDxy()

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

Definition at line 83 of file pf.h.

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

83 { return Scales::floatDxy(hwDxy); }
float floatDxy(dxy_t dxy)
Definition: datatypes.h:171
dxy_t hwDxy
Definition: pf.h:47

◆ floatVtxEta()

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

Definition at line 80 of file pf.h.

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

80 { return Scales::floatEta(hwVtxEta()); }
float floatEta(eta_t eta)
Definition: datatypes.h:164
eta_t hwVtxEta() const
Definition: pf.h:53

◆ floatVtxPhi()

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

Definition at line 81 of file pf.h.

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

81 { return Scales::floatPhi(hwVtxPhi()); }
phi_t hwVtxPhi() const
Definition: pf.h:52
float floatPhi(phi_t phi)
Definition: datatypes.h:165

◆ floatZ0()

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

Definition at line 82 of file pf.h.

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

82 { return Scales::floatZ0(hwZ0); }
float floatZ0(z0_t z0)
Definition: datatypes.h:170
z0_t hwZ0
Definition: pf.h:46

◆ hwVtxEta()

eta_t l1ct::PFChargedObj::hwVtxEta ( ) const
inline

Definition at line 53 of file pf.h.

References hwDEta, and l1ct::PFCommonObj::hwEta.

Referenced by floatVtxEta(), and intVtxEta().

53 { return hwEta + hwDEta; }
tkdeta_t hwDEta
Definition: pf.h:48
eta_t hwEta
Definition: pf.h:11

◆ hwVtxPhi()

phi_t l1ct::PFChargedObj::hwVtxPhi ( ) const
inline

Definition at line 52 of file pf.h.

References l1ct::ParticleID::chargeOrNull(), hwDPhi, l1ct::PFCommonObj::hwId, and l1ct::PFCommonObj::hwPhi.

Referenced by floatVtxPhi(), and intVtxPhi().

52 { return hwId.chargeOrNull() ? hwPhi + hwDPhi : hwPhi - hwDPhi; }
tkdphi_t hwDPhi
Definition: pf.h:49
ParticleID hwId
Definition: pf.h:13
phi_t hwPhi
Definition: pf.h:12
bool chargeOrNull() const
Definition: datatypes.h:79

◆ intVtxEta()

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

Definition at line 76 of file pf.h.

References hwVtxEta().

76 { return hwVtxEta().to_int(); }
eta_t hwVtxEta() const
Definition: pf.h:53

◆ intVtxPhi()

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

Definition at line 77 of file pf.h.

References hwVtxPhi().

77 { return hwVtxPhi().to_int(); }
phi_t hwVtxPhi() const
Definition: pf.h:52

◆ operator<()

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

Definition at line 62 of file pf.h.

References l1ct::PFCommonObj::hwPt, and trackingPlots::other.

62 { return hwPt < other.hwPt; }
pt_t hwPt
Definition: pf.h:10

◆ operator==()

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

Definition at line 55 of file pf.h.

References hwDEta, hwDPhi, hwDxy, l1ct::PFCommonObj::hwEta, l1ct::PFCommonObj::hwId, l1ct::PFCommonObj::hwPhi, l1ct::PFCommonObj::hwPt, hwTkQuality, hwZ0, and trackingPlots::other.

55  {
56  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwId == other.hwId &&
57  hwDEta == other.hwDEta && hwDPhi == other.hwDPhi && hwZ0 == other.hwZ0 && hwDxy == other.hwDxy &&
58  hwTkQuality == other.hwTkQuality;
59  }
tkdeta_t hwDEta
Definition: pf.h:48
tkdphi_t hwDPhi
Definition: pf.h:49
eta_t hwEta
Definition: pf.h:11
ParticleID hwId
Definition: pf.h:13
phi_t hwPhi
Definition: pf.h:12
tkquality_t hwTkQuality
Definition: pf.h:50
z0_t hwZ0
Definition: pf.h:46
dxy_t hwDxy
Definition: pf.h:47
pt_t hwPt
Definition: pf.h:10

◆ operator>()

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

Definition at line 61 of file pf.h.

References l1ct::PFCommonObj::hwPt, and trackingPlots::other.

61 { return hwPt > other.hwPt; }
pt_t hwPt
Definition: pf.h:10

◆ pack()

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

Definition at line 87 of file pf.h.

References hwDEta, hwDPhi, hwDxy, hwTkQuality, hwZ0, l1ct::PFCommonObj::pack_common(), pack_into_bits(), and runTheMatrix::ret.

87  {
88  ap_uint<BITWIDTH> ret;
89  unsigned int start = 0;
96  return ret;
97  }
Definition: start.py:1
tkdeta_t hwDEta
Definition: pf.h:48
ret
prodAgent to be discontinued
void pack_common(U &out, unsigned int &start) const
Definition: pf.h:28
tkdphi_t hwDPhi
Definition: pf.h:49
tkquality_t hwTkQuality
Definition: pf.h:50
z0_t hwZ0
Definition: pf.h:46
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
dxy_t hwDxy
Definition: pf.h:47

◆ unpack()

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

Definition at line 98 of file pf.h.

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

98  {
99  PFChargedObj ret;
100  unsigned int start = 0;
101  ret.unpack_common(src, start);
102  unpack_from_bits(src, start, ret.hwDEta);
103  unpack_from_bits(src, start, ret.hwDPhi);
104  unpack_from_bits(src, start, ret.hwZ0);
105  unpack_from_bits(src, start, ret.hwDxy);
106  unpack_from_bits(src, start, ret.hwTkQuality);
107  return ret;
108  }
Definition: start.py:1
ret
prodAgent to be discontinued
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15

Member Data Documentation

◆ BITWIDTH

const int l1ct::PFChargedObj::BITWIDTH
static

◆ hwDEta

tkdeta_t l1ct::PFChargedObj::hwDEta

Definition at line 48 of file pf.h.

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

◆ hwDPhi

tkdphi_t l1ct::PFChargedObj::hwDPhi

Definition at line 49 of file pf.h.

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

◆ hwDxy

dxy_t l1ct::PFChargedObj::hwDxy

Definition at line 47 of file pf.h.

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

◆ hwTkQuality

tkquality_t l1ct::PFChargedObj::hwTkQuality

Definition at line 50 of file pf.h.

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

◆ hwZ0

z0_t l1ct::PFChargedObj::hwZ0

Definition at line 46 of file pf.h.

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