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 floatPhi () const
 
float floatPt () 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
 

Static Public Member Functions

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

Public Attributes

emid_t hwEmID
 
pt_t hwEmPt
 
eta_t hwEta
 
phi_t hwPhi
 
pt_t hwPt
 

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 9 of file layer1_objs.h.

Member Function Documentation

◆ clear()

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

Definition at line 24 of file layer1_objs.h.

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

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

24  {
25  hwPt = 0;
26  hwEta = 0;
27  hwPhi = 0;
28  hwEmPt = 0;
29  hwEmID = 0;
30  }

◆ floatEmPt()

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

Definition at line 37 of file layer1_objs.h.

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

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

◆ floatEta()

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

Definition at line 38 of file layer1_objs.h.

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

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

◆ floatPhi()

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

Definition at line 39 of file layer1_objs.h.

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

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

◆ floatPt()

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

Definition at line 36 of file layer1_objs.h.

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

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

◆ hwIsEM()

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

Definition at line 41 of file layer1_objs.h.

References hwEmID.

41 { return hwEmID != 0; }

◆ intEmPt()

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

Definition at line 33 of file layer1_objs.h.

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

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

◆ intEta()

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

Definition at line 34 of file layer1_objs.h.

References hwEta.

34 { return hwEta.to_int(); }

◆ intPhi()

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

Definition at line 35 of file layer1_objs.h.

References hwPhi.

35 { return hwPhi.to_int(); }

◆ intPt()

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

Definition at line 32 of file layer1_objs.h.

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

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

◆ operator<()

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

Definition at line 22 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

22 { return hwPt < other.hwPt; }

◆ operator==()

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

Definition at line 16 of file layer1_objs.h.

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

16  {
17  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwEmPt == other.hwEmPt &&
18  hwEmID == other.hwEmID;
19  }

◆ operator>()

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

Definition at line 21 of file layer1_objs.h.

References hwPt, and trackingPlots::other.

21 { return hwPt > other.hwPt; }

◆ pack()

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

Definition at line 44 of file layer1_objs.h.

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

44  {
45  ap_uint<BITWIDTH> ret;
46  unsigned int start = 0;
52  return ret;
53  }
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 HadCaloObj l1ct::HadCaloObj::unpack ( const ap_uint< BITWIDTH > &  src)
inlinestatic

Definition at line 54 of file layer1_objs.h.

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

54  {
55  HadCaloObj ret;
56  unsigned int start = 0;
57  unpack_from_bits(src, start, ret.hwPt);
58  unpack_from_bits(src, start, ret.hwEta);
59  unpack_from_bits(src, start, ret.hwPhi);
60  unpack_from_bits(src, start, ret.hwEmPt);
61  unpack_from_bits(src, start, ret.hwEmID);
62  return ret;
63  }
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 = pt_t::width + eta_t::width + phi_t::width + pt_t::width + emid_t::width
static

Definition at line 43 of file layer1_objs.h.

◆ 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().

◆ 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().