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 floatHoe () const
 
float floatMeanZ () const
 
float floatPhi () const
 
float floatPt () const
 
float floatPtErr () const
 
float floatSrrTot () 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
 
ap_uint< BITWIDTH_SLIMpack_slim () const
 

Static Public Member Functions

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

Public Attributes

emid_t hwEmID
 
eta_t hwEta
 
hoe_t hwHoe
 
meanz_t hwMeanZ
 
phi_t hwPhi
 
pt_t hwPt
 
pt_t hwPtErr
 
srrtot_t hwSrrTot
 

Static Public Attributes

static const int BITWIDTH = BITWIDTH_SLIM + srrtot_t::width + meanz_t::width + hoe_t::width
 
static const int BITWIDTH_SLIM = pt_t::width + eta_t::width + phi_t::width + pt_t::width + emid_t::width
 

Detailed Description

Definition at line 89 of file layer1_objs.h.

Member Function Documentation

◆ clear()

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

Definition at line 106 of file layer1_objs.h.

References hwEmID, hwEta, hwHoe, hwMeanZ, hwPhi, hwPt, hwPtErr, and hwSrrTot.

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

106  {
107  hwPt = 0;
108  hwPtErr = 0;
109  hwEta = 0;
110  hwPhi = 0;
111  hwEmID = 0;
112  hwSrrTot = 0;
113  hwMeanZ = 0;
114  hwHoe = 0;
115  }
srrtot_t hwSrrTot
Definition: layer1_objs.h:94
meanz_t hwMeanZ
Definition: layer1_objs.h:95

◆ floatEta()

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

Definition at line 123 of file layer1_objs.h.

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

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

◆ floatHoe()

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

Definition at line 127 of file layer1_objs.h.

References l1ct::Scales::floatHoe(), and hwHoe.

127 { return Scales::floatHoe(hwHoe); };
float floatHoe(hoe_t hoe)
Definition: datatypes.h:179

◆ floatMeanZ()

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

Definition at line 126 of file layer1_objs.h.

References l1ct::Scales::floatMeanZ(), and hwMeanZ.

126 { return Scales::floatMeanZ(hwMeanZ); };
meanz_t hwMeanZ
Definition: layer1_objs.h:95
float floatMeanZ(meanz_t meanz)
Definition: datatypes.h:178

◆ floatPhi()

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

Definition at line 124 of file layer1_objs.h.

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

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

◆ floatPt()

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

Definition at line 121 of file layer1_objs.h.

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

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

◆ floatPtErr()

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

Definition at line 122 of file layer1_objs.h.

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

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

◆ floatSrrTot()

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

Definition at line 125 of file layer1_objs.h.

References l1ct::Scales::floatSrrTot(), and hwSrrTot.

125 { return Scales::floatSrrTot(hwSrrTot); };
srrtot_t hwSrrTot
Definition: layer1_objs.h:94
float floatSrrTot(srrtot_t srrtot)
Definition: datatypes.h:177

◆ intEta()

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

Definition at line 119 of file layer1_objs.h.

References hwEta.

119 { return hwEta.to_int(); }

◆ intPhi()

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

Definition at line 120 of file layer1_objs.h.

References hwPhi.

120 { return hwPhi.to_int(); }

◆ intPt()

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

Definition at line 117 of file layer1_objs.h.

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

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

◆ intPtErr()

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

Definition at line 118 of file layer1_objs.h.

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

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

◆ operator<()

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

Definition at line 104 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

104 { return hwPt < other.hwPt; }

◆ operator==()

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

Definition at line 98 of file layer1_objs.h.

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

98  {
99  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwPtErr == other.hwPtErr &&
100  hwEmID == other.hwEmID && hwSrrTot == other.hwSrrTot && hwMeanZ == other.hwMeanZ && hwHoe == other.hwHoe;
101  }
srrtot_t hwSrrTot
Definition: layer1_objs.h:94
meanz_t hwMeanZ
Definition: layer1_objs.h:95

◆ operator>()

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

Definition at line 103 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

103 { return hwPt > other.hwPt; }

◆ pack()

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

Definition at line 133 of file layer1_objs.h.

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

Referenced by pack_slim().

133  {
134  ap_uint<BITWIDTH> ret;
135  unsigned int start = 0;
144  return ret;
145  }
Definition: start.py:1
srrtot_t hwSrrTot
Definition: layer1_objs.h:94
ret
prodAgent to be discontinued
meanz_t hwMeanZ
Definition: layer1_objs.h:95
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8

◆ pack_slim()

ap_uint<BITWIDTH_SLIM> l1ct::EmCaloObj::pack_slim ( ) const
inline

Definition at line 161 of file layer1_objs.h.

References BITWIDTH_SLIM, and pack().

161 { return pack()(BITWIDTH_SLIM - 1, 0); }
static const int BITWIDTH_SLIM
Definition: layer1_objs.h:129
ap_uint< BITWIDTH > pack() const
Definition: layer1_objs.h:133

◆ unpack()

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

Definition at line 146 of file layer1_objs.h.

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

146  {
147  EmCaloObj ret;
148  unsigned int start = 0;
149  unpack_from_bits(src, start, ret.hwPt);
150  unpack_from_bits(src, start, ret.hwEta);
151  unpack_from_bits(src, start, ret.hwPhi);
152  unpack_from_bits(src, start, ret.hwPtErr);
153  unpack_from_bits(src, start, ret.hwEmID);
154  unpack_from_bits(src, start, ret.hwSrrTot);
155  unpack_from_bits(src, start, ret.hwMeanZ);
156  unpack_from_bits(src, start, ret.hwHoe);
157 
158  return ret;
159  }
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 = BITWIDTH_SLIM + srrtot_t::width + meanz_t::width + hoe_t::width
static

Definition at line 131 of file layer1_objs.h.

◆ BITWIDTH_SLIM

const int l1ct::EmCaloObj::BITWIDTH_SLIM = pt_t::width + eta_t::width + phi_t::width + pt_t::width + emid_t::width
static

Definition at line 129 of file layer1_objs.h.

Referenced by pack_slim().

◆ hwEmID

emid_t l1ct::EmCaloObj::hwEmID

Definition at line 93 of file layer1_objs.h.

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

◆ hwEta

eta_t l1ct::EmCaloObj::hwEta

Definition at line 91 of file layer1_objs.h.

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

◆ hwHoe

hoe_t l1ct::EmCaloObj::hwHoe

Definition at line 96 of file layer1_objs.h.

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

◆ hwMeanZ

meanz_t l1ct::EmCaloObj::hwMeanZ

Definition at line 95 of file layer1_objs.h.

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

◆ hwPhi

phi_t l1ct::EmCaloObj::hwPhi

Definition at line 92 of file layer1_objs.h.

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

◆ hwPt

pt_t l1ct::EmCaloObj::hwPt

Definition at line 90 of file layer1_objs.h.

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

◆ hwPtErr

pt_t l1ct::EmCaloObj::hwPtErr

Definition at line 90 of file layer1_objs.h.

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

◆ hwSrrTot

srrtot_t l1ct::EmCaloObj::hwSrrTot

Definition at line 94 of file layer1_objs.h.

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