CMS 3D CMS Logo

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

#include <egamma.h>

Inheritance diagram for l1ct::EGIsoObj:
l1ct::EGIsoEleObj l1ct::EGIsoObjEmu l1ct::EGObjEmu l1ct::EGIsoEleObjEmu

Public Member Functions

void clear ()
 
float floatEta () const
 
float floatIso () const
 
float floatPhi () const
 
float floatPt () const
 
void initFromBits (const ap_uint< BITWIDTH > &src)
 
int intEta () const
 
int intIso () const
 
int intPhi () const
 
int intPt () const
 
int intQual () const
 
bool operator< (const EGIsoObj &other) const
 
bool operator== (const EGIsoObj &other) const
 
bool operator> (const EGIsoObj &other) const
 
ap_uint< BITWIDTHpack () const
 
l1gt::Photon toGT () const
 

Static Public Member Functions

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

Public Attributes

glbeta_t hwEta
 
iso_t hwIso
 
glbphi_t hwPhi
 
pt_t hwPt
 
egquality_t hwQual
 

Static Public Attributes

static const int BITWIDTH = pt_t::width + glbeta_t::width + glbphi_t::width + egquality_t::width + iso_t::width
 

Detailed Description

Definition at line 10 of file egamma.h.

Member Function Documentation

◆ clear()

void l1ct::EGIsoObj::clear ( void  )
inline

Definition at line 36 of file egamma.h.

References hwEta, hwIso, hwPhi, hwPt, and hwQual.

Referenced by l1ct::EGObjEmu::clear(), l1ct::EGIsoObjEmu::clear(), l1ct::L2EgSorterEmulator::toFirmware(), and l1ct::PFTkEGSorterBarrelEmulator::toFirmware_pho().

36  {
37  hwPt = 0;
38  hwEta = 0;
39  hwPhi = 0;
40  hwQual = 0;
41  hwIso = 0;
42  }
pt_t hwPt
Definition: egamma.h:11
glbeta_t hwEta
Definition: egamma.h:12
egquality_t hwQual
Definition: egamma.h:14
glbphi_t hwPhi
Definition: egamma.h:13
iso_t hwIso
Definition: egamma.h:15

◆ floatEta()

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

Definition at line 24 of file egamma.h.

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

24 { return Scales::floatEta(hwEta); }
float floatEta(eta_t eta)
Definition: datatypes.h:164
glbeta_t hwEta
Definition: egamma.h:12

◆ floatIso()

float l1ct::EGIsoObj::floatIso ( ) const
inline

Definition at line 26 of file egamma.h.

References l1ct::Scales::floatIso(), and hwIso.

26 { return Scales::floatIso(hwIso); }
float floatIso(iso_t iso)
Definition: datatypes.h:173
iso_t hwIso
Definition: egamma.h:15

◆ floatPhi()

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

Definition at line 25 of file egamma.h.

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

25 { return Scales::floatPhi(hwPhi); }
float floatPhi(phi_t phi)
Definition: datatypes.h:165
glbphi_t hwPhi
Definition: egamma.h:13

◆ floatPt()

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

Definition at line 23 of file egamma.h.

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

Referenced by l1ct::EGIsoObjEmu::floatRelIso(), and l1ct::EGIsoEleObjEmu::floatRelIso().

23 { return Scales::floatPt(hwPt); }
pt_t hwPt
Definition: egamma.h:11
float floatPt(pt_t pt)
Definition: datatypes.h:153

◆ initFromBits()

void l1ct::EGIsoObj::initFromBits ( const ap_uint< BITWIDTH > &  src)
inline

Definition at line 61 of file egamma.h.

References hwEta, hwIso, hwPhi, hwPt, hwQual, TrackRefitter_38T_cff::src, and unpack_from_bits().

Referenced by L1TCtL2EgProducer::convertToEmu().

61  {
62  unsigned int start = 0;
68  }
Definition: start.py:1
pt_t hwPt
Definition: egamma.h:11
glbeta_t hwEta
Definition: egamma.h:12
egquality_t hwQual
Definition: egamma.h:14
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15
glbphi_t hwPhi
Definition: egamma.h:13
iso_t hwIso
Definition: egamma.h:15

◆ intEta()

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

Definition at line 18 of file egamma.h.

References hwEta.

18 { return hwEta.to_int(); }
glbeta_t hwEta
Definition: egamma.h:12

◆ intIso()

int l1ct::EGIsoObj::intIso ( ) const
inline

Definition at line 21 of file egamma.h.

References hwIso.

21 { return hwIso.to_int(); }
iso_t hwIso
Definition: egamma.h:15

◆ intPhi()

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

Definition at line 19 of file egamma.h.

References hwPhi.

19 { return hwPhi.to_int(); }
glbphi_t hwPhi
Definition: egamma.h:13

◆ intPt()

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

Definition at line 17 of file egamma.h.

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

17 { return Scales::intPt(hwPt); }
pt_t hwPt
Definition: egamma.h:11
int intPt(pt_t pt)
Definition: datatypes.h:156

◆ intQual()

int l1ct::EGIsoObj::intQual ( ) const
inline

Definition at line 20 of file egamma.h.

References hwQual.

20 { return hwQual.to_int(); }
egquality_t hwQual
Definition: egamma.h:14

◆ operator<()

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

Definition at line 34 of file egamma.h.

References hwPt, and trackingPlots::other.

34 { return hwPt < other.hwPt; }
pt_t hwPt
Definition: egamma.h:11

◆ operator==()

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

Definition at line 28 of file egamma.h.

References hwEta, hwIso, hwPhi, hwPt, hwQual, and trackingPlots::other.

28  {
29  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwQual == other.hwQual &&
30  hwIso == other.hwIso;
31  }
pt_t hwPt
Definition: egamma.h:11
glbeta_t hwEta
Definition: egamma.h:12
egquality_t hwQual
Definition: egamma.h:14
glbphi_t hwPhi
Definition: egamma.h:13
iso_t hwIso
Definition: egamma.h:15

◆ operator>()

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

Definition at line 33 of file egamma.h.

References hwPt, and trackingPlots::other.

33 { return hwPt > other.hwPt; }
pt_t hwPt
Definition: egamma.h:11

◆ pack()

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

Definition at line 45 of file egamma.h.

References hwEta, hwIso, hwPhi, hwPt, hwQual, pack_into_bits(), and runTheMatrix::ret.

Referenced by L1TCtL2EgProducer::encodeLayer1().

45  {
46  ap_uint<BITWIDTH> ret;
47  unsigned int start = 0;
53  return ret;
54  }
Definition: start.py:1
ret
prodAgent to be discontinued
pt_t hwPt
Definition: egamma.h:11
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
glbeta_t hwEta
Definition: egamma.h:12
egquality_t hwQual
Definition: egamma.h:14
glbphi_t hwPhi
Definition: egamma.h:13
iso_t hwIso
Definition: egamma.h:15

◆ toGT()

l1gt::Photon l1ct::EGIsoObj::toGT ( ) const
inline

Definition at line 70 of file egamma.h.

References l1ct::CTtoGT_eta(), l1ct::CTtoGT_phi(), l1ct::CTtoGT_pt(), l1gt::ThreeVector::eta, hwEta, hwIso, hwPhi, hwPt, hwQual, l1gt::Photon::isolation, l1gt::ThreeVector::phi, l1gt::ThreeVector::pt, l1gt::Photon::quality, l1gt::Photon::v3, and l1gt::Photon::valid.

Referenced by L1TCtL2EgProducer::convertFromEmu().

70  {
71  l1gt::Photon pho;
72  pho.valid = hwPt != 0;
73  pho.v3.pt = CTtoGT_pt(hwPt);
74  pho.v3.phi = CTtoGT_phi(hwPhi);
75  pho.v3.eta = CTtoGT_eta(hwEta);
76  pho.quality = hwQual;
77  pho.isolation = hwIso;
78  return pho;
79  }
l1gt::eta_t CTtoGT_eta(glbeta_t x)
Definition: gt_datatypes.h:371
pt_t hwPt
Definition: egamma.h:11
glbeta_t hwEta
Definition: egamma.h:12
ThreeVector v3
Definition: gt_datatypes.h:311
valid_t valid
Definition: gt_datatypes.h:310
l1gt::phi_t CTtoGT_phi(glbphi_t x)
Definition: gt_datatypes.h:376
egquality_t hwQual
Definition: egamma.h:14
egquality_t quality
Definition: gt_datatypes.h:312
l1gt::pt_t CTtoGT_pt(pt_t x)
Definition: gt_datatypes.h:365
glbphi_t hwPhi
Definition: egamma.h:13
iso_t hwIso
Definition: egamma.h:15

◆ unpack()

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

Definition at line 55 of file egamma.h.

References runTheMatrix::ret, and TrackRefitter_38T_cff::src.

55  {
56  EGIsoObj ret;
57  ret.initFromBits(src);
58  return ret;
59  }
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

const int l1ct::EGIsoObj::BITWIDTH = pt_t::width + glbeta_t::width + glbphi_t::width + egquality_t::width + iso_t::width
static

Definition at line 44 of file egamma.h.

◆ hwEta

glbeta_t l1ct::EGIsoObj::hwEta

◆ hwIso

iso_t l1ct::EGIsoObj::hwIso

◆ hwPhi

glbphi_t l1ct::EGIsoObj::hwPhi

◆ hwPt

pt_t l1ct::EGIsoObj::hwPt

◆ hwQual

egquality_t l1ct::EGIsoObj::hwQual