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

Member Function Documentation

◆ initFromBits()

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

Definition at line 77 of file gt_datatypes.h.

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

77  {
78  unsigned int start = 0;
82  }
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 57 of file gt_datatypes.h.

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

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

◆ pack()

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

Definition at line 62 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().

62  {
63  ap_uint<BITWIDTH> ret;
64  unsigned int start = 0;
68  return ret;
69  }
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 71 of file gt_datatypes.h.

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

71  {
72  ThreeVector ret;
73  ret.initFromBits(src);
74  return ret;
75  }
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 61 of file gt_datatypes.h.

◆ eta

eta_t l1gt::ThreeVector::eta

◆ phi

phi_t l1gt::ThreeVector::phi

◆ pt

pt_t l1gt::ThreeVector::pt