CMS 3D CMS Logo

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

#include <layer1_objs.h>

Inheritance diagram for l1ct::TkObj:
l1ct::TkObjEmu

Public Types

enum  TkQuality { PFLOOSE = 1, PFTIGHT = 2 }
 

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
 
eta_t hwVtxEta () const
 
phi_t hwVtxPhi () const
 
int intCharge () const
 
int intEta () const
 
int intPhi () const
 
int intPt () const
 
int intVtxEta () const
 
int intVtxPhi () const
 
bool isPFLoose () const
 
bool isPFTight () const
 
bool operator< (const TkObj &other) const
 
bool operator== (const TkObj &other) const
 
bool operator> (const TkObj &other) const
 
ap_uint< BITWIDTHpack () const
 

Static Public Member Functions

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

Public Attributes

bool hwCharge
 
tkdeta_t hwDEta
 
tkdphi_t hwDPhi
 
dxy_t hwDxy
 
eta_t hwEta
 
phi_t hwPhi
 
pt_t hwPt
 
tkquality_t hwQuality
 
z0_t hwZ0
 

Static Public Attributes

static const int BITWIDTH
 

Detailed Description

Definition at line 123 of file layer1_objs.h.

Member Enumeration Documentation

◆ TkQuality

Enumerator
PFLOOSE 
PFTIGHT 

Definition at line 134 of file layer1_objs.h.

Member Function Documentation

◆ clear()

void l1ct::TkObj::clear ( void  )
inline

Definition at line 149 of file layer1_objs.h.

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

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

149  {
150  hwPt = 0;
151  hwEta = 0;
152  hwPhi = 0;
153  hwDEta = 0;
154  hwDPhi = 0;
155  hwZ0 = 0;
156  hwDxy = 0;
157  hwCharge = false;
158  hwQuality = 0;
159  }
tkquality_t hwQuality
Definition: layer1_objs.h:132
tkdphi_t hwDPhi
Definition: layer1_objs.h:128
tkdeta_t hwDEta
Definition: layer1_objs.h:127

◆ floatDEta()

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

Definition at line 170 of file layer1_objs.h.

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

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

◆ floatDPhi()

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

Definition at line 171 of file layer1_objs.h.

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

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

◆ floatDxy()

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

Definition at line 175 of file layer1_objs.h.

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

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

◆ floatEta()

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

Definition at line 168 of file layer1_objs.h.

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

168 { return Scales::floatEta(hwEta); }
float floatEta(eta_t eta)
Definition: datatypes.h:157

◆ floatPhi()

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

Definition at line 169 of file layer1_objs.h.

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

169 { return Scales::floatPhi(hwPhi); }
float floatPhi(phi_t phi)
Definition: datatypes.h:158

◆ floatPt()

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

Definition at line 167 of file layer1_objs.h.

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

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

◆ floatVtxEta()

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

Definition at line 172 of file layer1_objs.h.

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

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

◆ floatVtxPhi()

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

Definition at line 173 of file layer1_objs.h.

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

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

◆ floatZ0()

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

Definition at line 174 of file layer1_objs.h.

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

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

◆ hwVtxEta()

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

Definition at line 138 of file layer1_objs.h.

References hwDEta, and hwEta.

Referenced by floatVtxEta(), and intVtxEta().

138 { return hwEta + hwDEta; }
tkdeta_t hwDEta
Definition: layer1_objs.h:127

◆ hwVtxPhi()

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

Definition at line 137 of file layer1_objs.h.

References hwCharge, hwDPhi, and hwPhi.

Referenced by floatVtxPhi(), and intVtxPhi().

137 { return hwCharge ? hwPhi + hwDPhi : hwPhi - hwDPhi; }
tkdphi_t hwDPhi
Definition: layer1_objs.h:128

◆ intCharge()

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

Definition at line 166 of file layer1_objs.h.

References hwCharge.

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

◆ intEta()

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

Definition at line 162 of file layer1_objs.h.

References hwEta.

162 { return hwEta.to_int(); }

◆ intPhi()

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

Definition at line 163 of file layer1_objs.h.

References hwPhi.

163 { return hwPhi.to_int(); }

◆ intPt()

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

Definition at line 161 of file layer1_objs.h.

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

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

◆ intVtxEta()

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

Definition at line 164 of file layer1_objs.h.

References hwVtxEta().

164 { return hwVtxEta().to_int(); }
eta_t hwVtxEta() const
Definition: layer1_objs.h:138

◆ intVtxPhi()

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

Definition at line 165 of file layer1_objs.h.

References hwVtxPhi().

165 { return hwVtxPhi().to_int(); }
phi_t hwVtxPhi() const
Definition: layer1_objs.h:137

◆ isPFLoose()

bool l1ct::TkObj::isPFLoose ( ) const
inline

Definition at line 135 of file layer1_objs.h.

References hwQuality.

135 { return hwQuality[0]; }
tkquality_t hwQuality
Definition: layer1_objs.h:132

◆ isPFTight()

bool l1ct::TkObj::isPFTight ( ) const
inline

Definition at line 136 of file layer1_objs.h.

References hwQuality.

136 { return hwQuality[1]; }
tkquality_t hwQuality
Definition: layer1_objs.h:132

◆ operator<()

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

Definition at line 147 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

147 { return hwPt < other.hwPt; }

◆ operator==()

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

Definition at line 140 of file layer1_objs.h.

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

140  {
141  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwDEta == other.hwDEta &&
142  hwDPhi == other.hwDPhi && hwZ0 == other.hwZ0 && hwDxy == other.hwDxy && hwCharge == other.hwCharge &&
143  hwQuality == other.hwQuality;
144  }
tkquality_t hwQuality
Definition: layer1_objs.h:132
tkdphi_t hwDPhi
Definition: layer1_objs.h:128
tkdeta_t hwDEta
Definition: layer1_objs.h:127

◆ operator>()

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

Definition at line 146 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

146 { return hwPt > other.hwPt; }

◆ pack()

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

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

179  {
180  ap_uint<BITWIDTH> ret;
181  unsigned int start = 0;
191  return ret;
192  }
Definition: start.py:1
tkquality_t hwQuality
Definition: layer1_objs.h:132
ret
prodAgent to be discontinued
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
tkdphi_t hwDPhi
Definition: layer1_objs.h:128
tkdeta_t hwDEta
Definition: layer1_objs.h:127
void pack_bool_into_bits(U &u, unsigned int &start, bool data)
Definition: bit_encoding.h:22

◆ unpack()

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

Definition at line 193 of file layer1_objs.h.

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

193  {
194  TkObj ret;
195  unsigned int start = 0;
196  unpack_from_bits(src, start, ret.hwPt);
197  unpack_from_bits(src, start, ret.hwEta);
198  unpack_from_bits(src, start, ret.hwPhi);
199  unpack_from_bits(src, start, ret.hwDEta);
200  unpack_from_bits(src, start, ret.hwDPhi);
201  unpack_bool_from_bits(src, start, ret.hwCharge);
202  unpack_from_bits(src, start, ret.hwZ0);
203  unpack_from_bits(src, start, ret.hwDxy);
204  unpack_from_bits(src, start, ret.hwQuality);
205  return ret;
206  }
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::TkObj::BITWIDTH
static

◆ hwCharge

bool l1ct::TkObj::hwCharge

Definition at line 129 of file layer1_objs.h.

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

◆ hwDEta

tkdeta_t l1ct::TkObj::hwDEta

Definition at line 127 of file layer1_objs.h.

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

◆ hwDPhi

tkdphi_t l1ct::TkObj::hwDPhi

Definition at line 128 of file layer1_objs.h.

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

◆ hwDxy

dxy_t l1ct::TkObj::hwDxy

Definition at line 131 of file layer1_objs.h.

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

◆ hwEta

eta_t l1ct::TkObj::hwEta

Definition at line 125 of file layer1_objs.h.

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

◆ hwPhi

phi_t l1ct::TkObj::hwPhi

Definition at line 126 of file layer1_objs.h.

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

◆ hwPt

pt_t l1ct::TkObj::hwPt

Definition at line 124 of file layer1_objs.h.

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

◆ hwQuality

tkquality_t l1ct::TkObj::hwQuality

Definition at line 132 of file layer1_objs.h.

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

◆ hwZ0

z0_t l1ct::TkObj::hwZ0

Definition at line 130 of file layer1_objs.h.

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