CMS 3D CMS Logo

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

#include <layer1_objs.h>

Inheritance diagram for l1ct::EmCaloObj:
l1ct::EmCaloObjEmu

Public Member Functions

void clear ()
 
float floatEta () const
 
float floatPhi () const
 
float floatPt () const
 
float floatPtErr () const
 
int intEta () const
 
int intPhi () const
 
int intPt () const
 
int intPtErr () const
 
bool operator< (const EmCaloObj &other) const
 
bool operator== (const EmCaloObj &other) const
 
bool operator> (const EmCaloObj &other) const
 
ap_uint< BITWIDTHpack () const
 

Static Public Member Functions

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

Public Attributes

emid_t hwEmID
 
eta_t hwEta
 
phi_t hwPhi
 
pt_t hwPt
 
pt_t hwPtErr
 

Static Public Attributes

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

Detailed Description

Definition at line 68 of file layer1_objs.h.

Member Function Documentation

◆ clear()

void l1ct::EmCaloObj::clear ( void  )
inline

Definition at line 82 of file layer1_objs.h.

References hwEmID, hwEta, hwPhi, hwPt, and hwPtErr.

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

82  {
83  hwPt = 0;
84  hwPtErr = 0;
85  hwEta = 0;
86  hwPhi = 0;
87  hwEmID = 0;
88  }

◆ floatEta()

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

Definition at line 96 of file layer1_objs.h.

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

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

◆ floatPhi()

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

Definition at line 97 of file layer1_objs.h.

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

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

◆ floatPt()

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

Definition at line 94 of file layer1_objs.h.

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

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

◆ floatPtErr()

float l1ct::EmCaloObj::floatPtErr ( ) const
inline

Definition at line 95 of file layer1_objs.h.

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

95 { return Scales::floatPt(hwPtErr); }
float floatPt(pt_t pt)
Definition: datatypes.h:152

◆ intEta()

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

Definition at line 92 of file layer1_objs.h.

References hwEta.

92 { return hwEta.to_int(); }

◆ intPhi()

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

Definition at line 93 of file layer1_objs.h.

References hwPhi.

93 { return hwPhi.to_int(); }

◆ intPt()

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

Definition at line 90 of file layer1_objs.h.

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

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

◆ intPtErr()

int l1ct::EmCaloObj::intPtErr ( ) const
inline

Definition at line 91 of file layer1_objs.h.

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

91 { return Scales::intPt(hwPtErr); }
int intPt(pt_t pt)
Definition: datatypes.h:155

◆ operator<()

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

Definition at line 80 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

80 { return hwPt < other.hwPt; }

◆ operator==()

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

Definition at line 74 of file layer1_objs.h.

References hwEmID, hwEta, hwPhi, hwPt, hwPtErr, and trackingPlots::other.

74  {
75  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwPtErr == other.hwPtErr &&
76  hwEmID == other.hwEmID;
77  }

◆ operator>()

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

Definition at line 79 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

79 { return hwPt > other.hwPt; }

◆ pack()

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

Definition at line 100 of file layer1_objs.h.

References hwEmID, hwEta, hwPhi, hwPt, hwPtErr, pack_into_bits(), and runTheMatrix::ret.

100  {
101  ap_uint<BITWIDTH> ret;
102  unsigned int start = 0;
108  return ret;
109  }
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()

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

Definition at line 110 of file layer1_objs.h.

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

110  {
111  EmCaloObj ret;
112  unsigned int start = 0;
113  unpack_from_bits(src, start, ret.hwPt);
114  unpack_from_bits(src, start, ret.hwEta);
115  unpack_from_bits(src, start, ret.hwPhi);
116  unpack_from_bits(src, start, ret.hwPtErr);
117  unpack_from_bits(src, start, ret.hwEmID);
118  return ret;
119  }
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::EmCaloObj::BITWIDTH = pt_t::width + eta_t::width + phi_t::width + pt_t::width + emid_t::width
static

Definition at line 99 of file layer1_objs.h.

◆ hwEmID

emid_t l1ct::EmCaloObj::hwEmID

Definition at line 72 of file layer1_objs.h.

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

◆ hwEta

eta_t l1ct::EmCaloObj::hwEta

Definition at line 70 of file layer1_objs.h.

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

◆ hwPhi

phi_t l1ct::EmCaloObj::hwPhi

Definition at line 71 of file layer1_objs.h.

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

◆ hwPt

pt_t l1ct::EmCaloObj::hwPt

Definition at line 69 of file layer1_objs.h.

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

◆ hwPtErr

pt_t l1ct::EmCaloObj::hwPtErr

Definition at line 69 of file layer1_objs.h.

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