CMS 3D CMS Logo

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

#include <sums.h>

Public Member Functions

void clear ()
 
float floatPhi () const
 
float floatPt () const
 
float floatSumPt () const
 
int intPhi () const
 
int intPt () const
 
int intSumPt () const
 
bool operator== (const Sum &other) const
 
ap_uint< BITWIDTHpack () const
 
l1gt::Sum toGT () const
 

Static Public Member Functions

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

Public Attributes

glbphi_t hwPhi
 
pt_t hwPt
 
pt_t hwSumPt
 

Static Public Attributes

static const int BITWIDTH = pt_t::width + glbphi_t::width + pt_t::width
 

Detailed Description

Definition at line 10 of file sums.h.

Member Function Documentation

◆ clear()

void l1ct::Sum::clear ( void  )
inline

Definition at line 19 of file sums.h.

References hwPhi, hwPt, and hwSumPt.

Referenced by BeautifulSoup.Tag::setString().

19  {
20  hwPt = 0;
21  hwPhi = 0;
22  hwSumPt = 0;
23  }
pt_t hwPt
Definition: sums.h:11
glbphi_t hwPhi
Definition: sums.h:12
pt_t hwSumPt
Definition: sums.h:13

◆ floatPhi()

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

Definition at line 29 of file sums.h.

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

29 { return Scales::floatPhi(hwPhi); }
glbphi_t hwPhi
Definition: sums.h:12
float floatPhi(phi_t phi)
Definition: datatypes.h:158

◆ floatPt()

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

Definition at line 28 of file sums.h.

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

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

◆ floatSumPt()

float l1ct::Sum::floatSumPt ( ) const
inline

Definition at line 30 of file sums.h.

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

30 { return Scales::floatPt(hwSumPt); }
float floatPt(pt_t pt)
Definition: datatypes.h:152
pt_t hwSumPt
Definition: sums.h:13

◆ intPhi()

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

Definition at line 26 of file sums.h.

References hwPhi.

26 { return hwPhi.to_int(); }
glbphi_t hwPhi
Definition: sums.h:12

◆ intPt()

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

Definition at line 25 of file sums.h.

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

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

◆ intSumPt()

int l1ct::Sum::intSumPt ( ) const
inline

Definition at line 27 of file sums.h.

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

27 { return Scales::intPt(hwSumPt); }
int intPt(pt_t pt)
Definition: datatypes.h:155
pt_t hwSumPt
Definition: sums.h:13

◆ operator==()

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

Definition at line 15 of file sums.h.

References hwPhi, hwPt, hwSumPt, and trackingPlots::other.

15  {
16  return hwPt == other.hwPt && hwPhi == other.hwPhi && hwSumPt == other.hwSumPt;
17  }
pt_t hwPt
Definition: sums.h:11
glbphi_t hwPhi
Definition: sums.h:12
pt_t hwSumPt
Definition: sums.h:13

◆ pack()

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

Definition at line 33 of file sums.h.

References hwPhi, hwPt, hwSumPt, pack_into_bits(), and runTheMatrix::ret.

33  {
34  ap_uint<BITWIDTH> ret;
35  unsigned int start = 0;
39  return ret;
40  }
Definition: start.py:1
pt_t hwPt
Definition: sums.h:11
ret
prodAgent to be discontinued
glbphi_t hwPhi
Definition: sums.h:12
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
pt_t hwSumPt
Definition: sums.h:13

◆ toGT()

l1gt::Sum l1ct::Sum::toGT ( ) const
inline

Definition at line 50 of file sums.h.

References l1ct::CTtoGT_phi(), l1ct::CTtoGT_pt(), hwPhi, hwPt, hwSumPt, l1gt::Sum::scalar_pt, l1gt::Sum::valid, l1gt::Sum::vector_phi, and l1gt::Sum::vector_pt.

50  {
51  l1gt::Sum sum;
52  sum.valid = (hwPt != 0) || (hwSumPt != 0);
53  sum.vector_pt = CTtoGT_pt(hwPt);
56  return sum;
57  }
pt_t hwPt
Definition: sums.h:11
glbphi_t hwPhi
Definition: sums.h:12
pt_t vector_pt
Definition: gt_datatypes.h:139
phi_t vector_phi
Definition: gt_datatypes.h:140
l1gt::phi_t CTtoGT_phi(glbphi_t x)
Definition: gt_datatypes.h:269
l1gt::pt_t CTtoGT_pt(pt_t x)
Definition: gt_datatypes.h:258
pt_t hwSumPt
Definition: sums.h:13
pt_t scalar_pt
Definition: gt_datatypes.h:141
valid_t valid
Definition: gt_datatypes.h:138

◆ unpack()

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

Definition at line 41 of file sums.h.

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

41  {
42  Sum ret;
43  unsigned int start = 0;
44  unpack_from_bits(src, start, ret.hwPt);
45  unpack_from_bits(src, start, ret.hwPhi);
46  unpack_from_bits(src, start, ret.hwSumPt);
47  return ret;
48  }
Definition: start.py:1
ret
prodAgent to be discontinued
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15

Member Data Documentation

◆ BITWIDTH

const int l1ct::Sum::BITWIDTH = pt_t::width + glbphi_t::width + pt_t::width
static

Definition at line 32 of file sums.h.

◆ hwPhi

glbphi_t l1ct::Sum::hwPhi

Definition at line 12 of file sums.h.

Referenced by clear(), L1MhtPfProducer::convertHWToEDM(), floatPhi(), intPhi(), operator==(), pack(), and toGT().

◆ hwPt

pt_t l1ct::Sum::hwPt

Definition at line 11 of file sums.h.

Referenced by clear(), L1MhtPfProducer::convertHWToEDM(), floatPt(), intPt(), operator==(), pack(), and toGT().

◆ hwSumPt

pt_t l1ct::Sum::hwSumPt

Definition at line 13 of file sums.h.

Referenced by clear(), L1MhtPfProducer::convertHWToEDM(), floatSumPt(), intSumPt(), operator==(), pack(), and toGT().