CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
l1gt::ThreeVector Struct Reference

#include <gt_datatypes.h>

Public Member Functions

void initFromBits (const ap_uint< BITWIDTH > &src)
 
bool operator== (const ThreeVector &other) const
 
ap_uint< BITWIDTHpack () const
 

Static Public Member Functions

static ThreeVector unpack_ap (const ap_uint< BITWIDTH > &src)
 

Public Attributes

eta_t eta
 
phi_t phi
 
pt_t pt
 

Static Public Attributes

static const int BITWIDTH = pt_t::width + phi_t::width + eta_t::width
 

Detailed Description

Definition at line 53 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

void l1gt::ThreeVector::initFromBits ( const ap_uint< BITWIDTH > &  src)
inline

Definition at line 78 of file gt_datatypes.h.

References eta, phi, pt, TrackRefitter_38T_cff::src, and unpack_from_bits().

78  {
79  unsigned int start = 0;
83  }
Definition: start.py:1
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15

◆ operator==()

bool l1gt::ThreeVector::operator== ( const ThreeVector other) const
inline

Definition at line 58 of file gt_datatypes.h.

References eta, trackingPlots::other, phi, and pt.

58  {
59  return pt == other.pt && phi == other.phi && eta == other.eta;
60  }

◆ pack()

ap_uint<BITWIDTH> l1gt::ThreeVector::pack ( ) const
inline

Definition at line 63 of file gt_datatypes.h.

References eta, pack_into_bits(), phi, pt, and runTheMatrix::ret.

Referenced by l1gt::Electron::pack(), l1gt::Photon::pack(), l1gt::Jet::pack_ap(), and l1gt::Tau::pack_ap().

63  {
64  ap_uint<BITWIDTH> ret;
65  unsigned int start = 0;
69  return ret;
70  }
Definition: start.py:1
ret
prodAgent to be discontinued
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8

◆ unpack_ap()

static ThreeVector l1gt::ThreeVector::unpack_ap ( const ap_uint< BITWIDTH > &  src)
inlinestatic

Definition at line 72 of file gt_datatypes.h.

References runTheMatrix::ret, and TrackRefitter_38T_cff::src.

72  {
73  ThreeVector ret;
74  ret.initFromBits(src);
75  return ret;
76  }
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

const int l1gt::ThreeVector::BITWIDTH = pt_t::width + phi_t::width + eta_t::width
static

Definition at line 62 of file gt_datatypes.h.

◆ eta

eta_t l1gt::ThreeVector::eta

◆ phi

phi_t l1gt::ThreeVector::phi

◆ pt

pt_t l1gt::ThreeVector::pt