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 49 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

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

Definition at line 74 of file gt_datatypes.h.

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

74  {
75  unsigned int start = 0;
79  }
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 54 of file gt_datatypes.h.

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

54  {
55  return pt == other.pt && phi == other.phi && eta == other.eta;
56  }

◆ pack()

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

Definition at line 59 of file gt_datatypes.h.

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

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

59  {
60  ap_uint<BITWIDTH> ret;
61  unsigned int start = 0;
65  return ret;
66  }
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 68 of file gt_datatypes.h.

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

68  {
69  ThreeVector ret;
70  ret.initFromBits(src);
71  return ret;
72  }
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 58 of file gt_datatypes.h.

◆ eta

eta_t l1gt::ThreeVector::eta

◆ phi

phi_t l1gt::ThreeVector::phi

◆ pt

pt_t l1gt::ThreeVector::pt