CMS 3D CMS Logo

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

#include <layer1_objs.h>

Inheritance diagram for l1ct::HadCaloObj:
l1ct::HadCaloObjEmu

Public Member Functions

void clear ()
 
float floatEmPt () const
 
float floatEta () const
 
float floatHoe () const
 
float floatMeanZ () const
 
float floatPhi () const
 
float floatPt () const
 
float floatSrrTot () const
 
bool hwIsEM () const
 
int intEmPt () const
 
int intEta () const
 
int intPhi () const
 
int intPt () const
 
bool operator< (const HadCaloObj &other) const
 
bool operator== (const HadCaloObj &other) const
 
bool operator> (const HadCaloObj &other) const
 
ap_uint< BITWIDTHpack () const
 
ap_uint< BITWIDTH_SLIMpack_slim () const
 

Static Public Member Functions

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

Public Attributes

emid_t hwEmID
 
pt_t hwEmPt
 
eta_t hwEta
 
hoe_t hwHoe
 
meanz_t hwMeanZ
 
phi_t hwPhi
 
pt_t hwPt
 
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 9 of file layer1_objs.h.

Member Function Documentation

◆ clear()

void l1ct::HadCaloObj::clear ( void  )
inline

Definition at line 27 of file layer1_objs.h.

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

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

27  {
28  hwPt = 0;
29  hwEta = 0;
30  hwPhi = 0;
31  hwEmPt = 0;
32  hwEmID = 0;
33  hwSrrTot = 0;
34  hwMeanZ = 0;
35  hwHoe = 0;
36  }
srrtot_t hwSrrTot
Definition: layer1_objs.h:15

◆ floatEmPt()

float l1ct::HadCaloObj::floatEmPt ( ) const
inline

Definition at line 43 of file layer1_objs.h.

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

43 { return Scales::floatPt(hwEmPt); }
float floatPt(pt_t pt)
Definition: datatypes.h:161

◆ floatEta()

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

Definition at line 44 of file layer1_objs.h.

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

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

◆ floatHoe()

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

Definition at line 48 of file layer1_objs.h.

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

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

◆ floatMeanZ()

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

Definition at line 47 of file layer1_objs.h.

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

47 { return Scales::floatMeanZ(hwMeanZ); };
float floatMeanZ(meanz_t meanz)
Definition: datatypes.h:177

◆ floatPhi()

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

Definition at line 45 of file layer1_objs.h.

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

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

◆ floatPt()

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

Definition at line 42 of file layer1_objs.h.

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

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

◆ floatSrrTot()

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

Definition at line 46 of file layer1_objs.h.

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

46 { return Scales::floatSrrTot(hwSrrTot); };
float floatSrrTot(srrtot_t srrtot)
Definition: datatypes.h:176
srrtot_t hwSrrTot
Definition: layer1_objs.h:15

◆ hwIsEM()

bool l1ct::HadCaloObj::hwIsEM ( ) const
inline

Definition at line 50 of file layer1_objs.h.

References hwEmID.

50 { return hwEmID != 0; }

◆ intEmPt()

int l1ct::HadCaloObj::intEmPt ( ) const
inline

Definition at line 39 of file layer1_objs.h.

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

39 { return Scales::intPt(hwEmPt); }
int intPt(pt_t pt)
Definition: datatypes.h:164

◆ intEta()

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

Definition at line 40 of file layer1_objs.h.

References hwEta.

40 { return hwEta.to_int(); }

◆ intPhi()

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

Definition at line 41 of file layer1_objs.h.

References hwPhi.

41 { return hwPhi.to_int(); }

◆ intPt()

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

Definition at line 38 of file layer1_objs.h.

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

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

◆ operator<()

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

Definition at line 25 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

25 { return hwPt < other.hwPt; }

◆ operator==()

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

Definition at line 19 of file layer1_objs.h.

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

19  {
20  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwEmPt == other.hwEmPt &&
21  hwEmID == other.hwEmID && hwSrrTot == other.hwSrrTot && hwMeanZ == other.hwMeanZ && hwHoe == other.hwHoe;
22  }
srrtot_t hwSrrTot
Definition: layer1_objs.h:15

◆ operator>()

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

Definition at line 24 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

24 { return hwPt > other.hwPt; }

◆ pack()

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

Definition at line 56 of file layer1_objs.h.

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

Referenced by pack_slim().

56  {
57  ap_uint<BITWIDTH> ret;
58  unsigned int start = 0;
67  return ret;
68  }
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
srrtot_t hwSrrTot
Definition: layer1_objs.h:15

◆ pack_slim()

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

Definition at line 84 of file layer1_objs.h.

References BITWIDTH_SLIM, and pack().

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

◆ unpack()

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

Definition at line 70 of file layer1_objs.h.

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

70  {
71  HadCaloObj ret;
72  unsigned int start = 0;
73  unpack_from_bits(src, start, ret.hwPt);
74  unpack_from_bits(src, start, ret.hwEta);
75  unpack_from_bits(src, start, ret.hwPhi);
76  unpack_from_bits(src, start, ret.hwEmPt);
77  unpack_from_bits(src, start, ret.hwEmID);
78  unpack_from_bits(src, start, ret.hwSrrTot);
79  unpack_from_bits(src, start, ret.hwMeanZ);
80  unpack_from_bits(src, start, ret.hwHoe);
81  return ret;
82  }
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::HadCaloObj::BITWIDTH = BITWIDTH_SLIM + srrtot_t::width + meanz_t::width + hoe_t::width
static

Definition at line 54 of file layer1_objs.h.

◆ BITWIDTH_SLIM

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

Definition at line 52 of file layer1_objs.h.

Referenced by pack_slim().

◆ hwEmID

emid_t l1ct::HadCaloObj::hwEmID

Definition at line 14 of file layer1_objs.h.

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

◆ hwEmPt

pt_t l1ct::HadCaloObj::hwEmPt

Definition at line 13 of file layer1_objs.h.

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

◆ hwEta

eta_t l1ct::HadCaloObj::hwEta

Definition at line 11 of file layer1_objs.h.

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

◆ hwHoe

hoe_t l1ct::HadCaloObj::hwHoe

Definition at line 17 of file layer1_objs.h.

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

◆ hwMeanZ

meanz_t l1ct::HadCaloObj::hwMeanZ

Definition at line 16 of file layer1_objs.h.

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

◆ hwPhi

phi_t l1ct::HadCaloObj::hwPhi

Definition at line 12 of file layer1_objs.h.

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

◆ hwPt

pt_t l1ct::HadCaloObj::hwPt

Definition at line 10 of file layer1_objs.h.

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

◆ hwSrrTot

srrtot_t l1ct::HadCaloObj::hwSrrTot

Definition at line 15 of file layer1_objs.h.

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