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
 
ap_uint< BITWIDTH_SLIMpack_slim () 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
 
redChi2Bin_t hwRedChi2Bend
 
redChi2Bin_t hwRedChi2RPhi
 
redChi2Bin_t hwRedChi2RZ
 
stub_t hwStubs
 
z0_t hwZ0
 

Static Public Attributes

static const int BITWIDTH
 
static const int BITWIDTH_SLIM
 

Detailed Description

Definition at line 165 of file layer1_objs.h.

Member Enumeration Documentation

◆ TkQuality

Enumerator
PFLOOSE 
PFTIGHT 

Definition at line 181 of file layer1_objs.h.

Member Function Documentation

◆ clear()

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

Definition at line 197 of file layer1_objs.h.

References hwCharge, hwDEta, hwDPhi, hwDxy, hwEta, hwPhi, hwPt, hwQuality, hwRedChi2Bend, hwRedChi2RPhi, hwRedChi2RZ, hwStubs, and hwZ0.

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

197  {
198  hwPt = 0;
199  hwEta = 0;
200  hwPhi = 0;
201  hwDEta = 0;
202  hwDPhi = 0;
203  hwZ0 = 0;
204  hwDxy = 0;
205  hwCharge = false;
206  hwQuality = 0;
207  hwStubs = 0;
208  hwRedChi2RZ = 0;
209  hwRedChi2RPhi = 0;
210  hwRedChi2Bend = 0;
211  }
tkquality_t hwQuality
Definition: layer1_objs.h:174
redChi2Bin_t hwRedChi2RZ
Definition: layer1_objs.h:176
stub_t hwStubs
Definition: layer1_objs.h:175
redChi2Bin_t hwRedChi2Bend
Definition: layer1_objs.h:179
redChi2Bin_t hwRedChi2RPhi
Definition: layer1_objs.h:177
tkdphi_t hwDPhi
Definition: layer1_objs.h:170
tkdeta_t hwDEta
Definition: layer1_objs.h:169

◆ floatDEta()

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

Definition at line 222 of file layer1_objs.h.

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

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

◆ floatDPhi()

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

Definition at line 223 of file layer1_objs.h.

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

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

◆ floatDxy()

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

Definition at line 227 of file layer1_objs.h.

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

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

◆ floatEta()

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

Definition at line 220 of file layer1_objs.h.

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

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

◆ floatPhi()

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

Definition at line 221 of file layer1_objs.h.

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

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

◆ floatPt()

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

Definition at line 219 of file layer1_objs.h.

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

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

◆ floatVtxEta()

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

Definition at line 224 of file layer1_objs.h.

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

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

◆ floatVtxPhi()

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

Definition at line 225 of file layer1_objs.h.

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

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

◆ floatZ0()

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

Definition at line 226 of file layer1_objs.h.

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

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

◆ hwVtxEta()

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

Definition at line 185 of file layer1_objs.h.

References hwDEta, and hwEta.

Referenced by floatVtxEta(), and intVtxEta().

185 { return hwEta + hwDEta; }
tkdeta_t hwDEta
Definition: layer1_objs.h:169

◆ hwVtxPhi()

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

Definition at line 184 of file layer1_objs.h.

References hwCharge, hwDPhi, and hwPhi.

Referenced by floatVtxPhi(), and intVtxPhi().

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

◆ intCharge()

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

Definition at line 218 of file layer1_objs.h.

References hwCharge.

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

◆ intEta()

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

Definition at line 214 of file layer1_objs.h.

References hwEta.

214 { return hwEta.to_int(); }

◆ intPhi()

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

Definition at line 215 of file layer1_objs.h.

References hwPhi.

215 { return hwPhi.to_int(); }

◆ intPt()

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

Definition at line 213 of file layer1_objs.h.

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

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

◆ intVtxEta()

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

Definition at line 216 of file layer1_objs.h.

References hwVtxEta().

216 { return hwVtxEta().to_int(); }
eta_t hwVtxEta() const
Definition: layer1_objs.h:185

◆ intVtxPhi()

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

Definition at line 217 of file layer1_objs.h.

References hwVtxPhi().

217 { return hwVtxPhi().to_int(); }
phi_t hwVtxPhi() const
Definition: layer1_objs.h:184

◆ isPFLoose()

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

Definition at line 182 of file layer1_objs.h.

References hwQuality.

182 { return hwQuality[0]; }
tkquality_t hwQuality
Definition: layer1_objs.h:174

◆ isPFTight()

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

Definition at line 183 of file layer1_objs.h.

References hwQuality.

183 { return hwQuality[1]; }
tkquality_t hwQuality
Definition: layer1_objs.h:174

◆ operator<()

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

Definition at line 195 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

195 { return hwPt < other.hwPt; }

◆ operator==()

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

Definition at line 187 of file layer1_objs.h.

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

187  {
188  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwDEta == other.hwDEta &&
189  hwDPhi == other.hwDPhi && hwZ0 == other.hwZ0 && hwDxy == other.hwDxy && hwCharge == other.hwCharge &&
190  hwQuality == other.hwQuality && hwStubs == other.hwStubs && hwRedChi2RZ == other.hwRedChi2RZ &&
191  hwRedChi2RPhi == other.hwRedChi2RPhi && hwRedChi2Bend == other.hwRedChi2Bend;
192  }
tkquality_t hwQuality
Definition: layer1_objs.h:174
redChi2Bin_t hwRedChi2RZ
Definition: layer1_objs.h:176
stub_t hwStubs
Definition: layer1_objs.h:175
redChi2Bin_t hwRedChi2Bend
Definition: layer1_objs.h:179
redChi2Bin_t hwRedChi2RPhi
Definition: layer1_objs.h:177
tkdphi_t hwDPhi
Definition: layer1_objs.h:170
tkdeta_t hwDEta
Definition: layer1_objs.h:169

◆ operator>()

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

Definition at line 194 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

194 { return hwPt > other.hwPt; }

◆ pack()

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

Definition at line 235 of file layer1_objs.h.

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

Referenced by pack_slim().

235  {
236  ap_uint<BITWIDTH> ret;
237  unsigned int start = 0;
251  return ret;
252  }
Definition: start.py:1
tkquality_t hwQuality
Definition: layer1_objs.h:174
ret
prodAgent to be discontinued
redChi2Bin_t hwRedChi2RZ
Definition: layer1_objs.h:176
stub_t hwStubs
Definition: layer1_objs.h:175
redChi2Bin_t hwRedChi2Bend
Definition: layer1_objs.h:179
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
redChi2Bin_t hwRedChi2RPhi
Definition: layer1_objs.h:177
tkdphi_t hwDPhi
Definition: layer1_objs.h:170
tkdeta_t hwDEta
Definition: layer1_objs.h:169
void pack_bool_into_bits(U &u, unsigned int &start, bool data)
Definition: bit_encoding.h:22

◆ pack_slim()

ap_uint<BITWIDTH_SLIM> l1ct::TkObj::pack_slim ( ) const
inline

Definition at line 271 of file layer1_objs.h.

References BITWIDTH_SLIM, and pack().

271 { return pack()(BITWIDTH_SLIM - 1, 0); }
ap_uint< BITWIDTH > pack() const
Definition: layer1_objs.h:235
static const int BITWIDTH_SLIM
Definition: layer1_objs.h:229

◆ unpack()

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

Definition at line 253 of file layer1_objs.h.

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

253  {
254  TkObj ret;
255  unsigned int start = 0;
256  unpack_from_bits(src, start, ret.hwPt);
257  unpack_from_bits(src, start, ret.hwEta);
258  unpack_from_bits(src, start, ret.hwPhi);
259  unpack_from_bits(src, start, ret.hwDEta);
260  unpack_from_bits(src, start, ret.hwDPhi);
261  unpack_bool_from_bits(src, start, ret.hwCharge);
262  unpack_from_bits(src, start, ret.hwZ0);
263  unpack_from_bits(src, start, ret.hwDxy);
264  unpack_from_bits(src, start, ret.hwQuality);
265  unpack_from_bits(src, start, ret.hwStubs);
266  unpack_from_bits(src, start, ret.hwRedChi2RZ);
267  unpack_from_bits(src, start, ret.hwRedChi2RPhi);
268  unpack_from_bits(src, start, ret.hwRedChi2Bend);
269  return ret;
270  }
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

◆ BITWIDTH_SLIM

const int l1ct::TkObj::BITWIDTH_SLIM
static
Initial value:

Definition at line 229 of file layer1_objs.h.

Referenced by pack_slim().

◆ hwCharge

bool l1ct::TkObj::hwCharge

Definition at line 171 of file layer1_objs.h.

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

◆ hwDEta

tkdeta_t l1ct::TkObj::hwDEta

Definition at line 169 of file layer1_objs.h.

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

◆ hwDPhi

tkdphi_t l1ct::TkObj::hwDPhi

Definition at line 170 of file layer1_objs.h.

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

◆ hwDxy

dxy_t l1ct::TkObj::hwDxy

Definition at line 173 of file layer1_objs.h.

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

◆ hwEta

eta_t l1ct::TkObj::hwEta

Definition at line 167 of file layer1_objs.h.

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

◆ hwPhi

phi_t l1ct::TkObj::hwPhi

Definition at line 168 of file layer1_objs.h.

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

◆ hwPt

pt_t l1ct::TkObj::hwPt

Definition at line 166 of file layer1_objs.h.

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

◆ hwQuality

tkquality_t l1ct::TkObj::hwQuality

Definition at line 174 of file layer1_objs.h.

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

◆ hwRedChi2Bend

redChi2Bin_t l1ct::TkObj::hwRedChi2Bend

Definition at line 179 of file layer1_objs.h.

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

◆ hwRedChi2RPhi

redChi2Bin_t l1ct::TkObj::hwRedChi2RPhi

Definition at line 177 of file layer1_objs.h.

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

◆ hwRedChi2RZ

redChi2Bin_t l1ct::TkObj::hwRedChi2RZ

Definition at line 176 of file layer1_objs.h.

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

◆ hwStubs

stub_t l1ct::TkObj::hwStubs

Definition at line 175 of file layer1_objs.h.

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

◆ hwZ0

z0_t l1ct::TkObj::hwZ0

Definition at line 172 of file layer1_objs.h.

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