CMS 3D CMS Logo

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

#include <egamma.h>

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

Public Member Functions

void clear ()
 
float floatDEta () const
 
float floatDPhi () const
 
float floatVtxEta () const
 
float floatVtxPhi () const
 
float floatZ0 () const
 
eta_t hwVtxEta () const
 
phi_t hwVtxPhi () const
 
void initFromBits (const ap_uint< BITWIDTH > &src)
 
int intCharge () const
 
bool operator< (const EGIsoEleObj &other) const
 
bool operator== (const EGIsoEleObj &other) const
 
bool operator> (const EGIsoEleObj &other) const
 
ap_uint< BITWIDTHpack () const
 
l1gt::Electron toGT () const
 
- Public Member Functions inherited from l1ct::EGIsoObj
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 EGIsoEleObj unpack (const ap_uint< BITWIDTH > &src)
 
- Static Public Member Functions inherited from l1ct::EGIsoObj
static EGIsoObj unpack (const ap_uint< BITWIDTH > &src)
 

Public Attributes

bool hwCharge
 
tkdeta_t hwDEta
 
tkdphi_t hwDPhi
 
z0_t hwZ0
 
- Public Attributes inherited from l1ct::EGIsoObj
glbeta_t hwEta
 
iso_t hwIso
 
glbphi_t hwPhi
 
pt_t hwPt
 
egquality_t hwQual
 

Static Public Attributes

static const int BITWIDTH = EGIsoObj::BITWIDTH + tkdeta_t::width + tkdphi_t::width + z0_t::width + 1
 
- Static Public Attributes inherited from l1ct::EGIsoObj
static const int BITWIDTH = pt_t::width + glbeta_t::width + glbphi_t::width + egquality_t::width + iso_t::width
 

Detailed Description

Definition at line 84 of file egamma.h.

Member Function Documentation

◆ clear()

void l1ct::EGIsoEleObj::clear ( void  )
inline

Definition at line 104 of file egamma.h.

References hwCharge, hwDEta, hwDPhi, l1ct::EGIsoObj::hwEta, l1ct::EGIsoObj::hwIso, l1ct::EGIsoObj::hwPhi, l1ct::EGIsoObj::hwPt, l1ct::EGIsoObj::hwQual, and hwZ0.

Referenced by l1ct::EGIsoEleObjEmu::clear(), l1ct::L2EgSorterEmulator::toFirmware(), and l1ct::PFTkEGSorterBarrelEmulator::toFirmware_ele().

104  {
105  hwPt = 0;
106  hwEta = 0;
107  hwPhi = 0;
108  hwQual = 0;
109  hwIso = 0;
110  hwDEta = 0;
111  hwDPhi = 0;
112  hwZ0 = 0;
113  hwCharge = false;
114  }
tkdeta_t hwDEta
Definition: egamma.h:88
pt_t hwPt
Definition: egamma.h:11
glbeta_t hwEta
Definition: egamma.h:12
tkdphi_t hwDPhi
Definition: egamma.h:89
egquality_t hwQual
Definition: egamma.h:14
glbphi_t hwPhi
Definition: egamma.h:13
iso_t hwIso
Definition: egamma.h:15

◆ floatDEta()

float l1ct::EGIsoEleObj::floatDEta ( ) const
inline

Definition at line 117 of file egamma.h.

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

117 { return Scales::floatEta(hwDEta); }
tkdeta_t hwDEta
Definition: egamma.h:88
float floatEta(eta_t eta)
Definition: datatypes.h:166

◆ floatDPhi()

float l1ct::EGIsoEleObj::floatDPhi ( ) const
inline

Definition at line 118 of file egamma.h.

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

118 { return Scales::floatPhi(hwDPhi); }
tkdphi_t hwDPhi
Definition: egamma.h:89
float floatPhi(phi_t phi)
Definition: datatypes.h:167

◆ floatVtxEta()

float l1ct::EGIsoEleObj::floatVtxEta ( ) const
inline

Definition at line 119 of file egamma.h.

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

119 { return Scales::floatEta(hwVtxEta()); }
eta_t hwVtxEta() const
Definition: egamma.h:93
float floatEta(eta_t eta)
Definition: datatypes.h:166

◆ floatVtxPhi()

float l1ct::EGIsoEleObj::floatVtxPhi ( ) const
inline

Definition at line 120 of file egamma.h.

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

120 { return Scales::floatPhi(hwVtxPhi()); }
phi_t hwVtxPhi() const
Definition: egamma.h:92
float floatPhi(phi_t phi)
Definition: datatypes.h:167

◆ floatZ0()

float l1ct::EGIsoEleObj::floatZ0 ( ) const
inline

Definition at line 121 of file egamma.h.

References l1ct::Scales::floatZ0(), and hwZ0.

121 { return Scales::floatZ0(hwZ0); }
float floatZ0(z0_t z0)
Definition: datatypes.h:172

◆ hwVtxEta()

eta_t l1ct::EGIsoEleObj::hwVtxEta ( ) const
inline

Definition at line 93 of file egamma.h.

References hwDEta, and l1ct::EGIsoObj::hwEta.

Referenced by l1ct::PFTkEGAlgoEmulator::deltaR2(), and floatVtxEta().

93 { return hwEta + hwDEta; }
tkdeta_t hwDEta
Definition: egamma.h:88
glbeta_t hwEta
Definition: egamma.h:12

◆ hwVtxPhi()

phi_t l1ct::EGIsoEleObj::hwVtxPhi ( ) const
inline

Definition at line 92 of file egamma.h.

References hwCharge, hwDPhi, and l1ct::EGIsoObj::hwPhi.

Referenced by l1ct::PFTkEGAlgoEmulator::deltaR2(), and floatVtxPhi().

92 { return hwCharge ? hwPhi + hwDPhi : hwPhi - hwDPhi; }
tkdphi_t hwDPhi
Definition: egamma.h:89
glbphi_t hwPhi
Definition: egamma.h:13

◆ initFromBits()

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

Definition at line 144 of file egamma.h.

References hwCharge, hwDEta, hwDPhi, l1ct::EGIsoObj::hwEta, l1ct::EGIsoObj::hwIso, l1ct::EGIsoObj::hwPhi, l1ct::EGIsoObj::hwPt, l1ct::EGIsoObj::hwQual, hwZ0, TrackRefitter_38T_cff::src, unpack_bool_from_bits(), and unpack_from_bits().

Referenced by L1TCtL2EgProducer::convertToEmu().

144  {
145  unsigned int start = 0;
155  }
Definition: start.py:1
tkdeta_t hwDEta
Definition: egamma.h:88
pt_t hwPt
Definition: egamma.h:11
void unpack_bool_from_bits(const U &u, unsigned int &start, bool &data)
Definition: bit_encoding.h:27
glbeta_t hwEta
Definition: egamma.h:12
tkdphi_t hwDPhi
Definition: egamma.h:89
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

◆ intCharge()

int l1ct::EGIsoEleObj::intCharge ( ) const
inline

Definition at line 116 of file egamma.h.

References hwCharge.

116 { return hwCharge ? +1 : -1; }

◆ operator<()

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

Definition at line 102 of file egamma.h.

References l1ct::EGIsoObj::hwPt, and trackingPlots::other.

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

◆ operator==()

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

Definition at line 95 of file egamma.h.

References hwCharge, hwDEta, hwDPhi, l1ct::EGIsoObj::hwEta, l1ct::EGIsoObj::hwIso, l1ct::EGIsoObj::hwPhi, l1ct::EGIsoObj::hwPt, l1ct::EGIsoObj::hwQual, hwZ0, and trackingPlots::other.

95  {
96  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwQual == other.hwQual &&
97  hwIso == other.hwIso && hwDEta == other.hwDEta && hwDPhi == other.hwDPhi && hwZ0 == other.hwZ0 &&
98  hwCharge == other.hwCharge;
99  }
tkdeta_t hwDEta
Definition: egamma.h:88
pt_t hwPt
Definition: egamma.h:11
glbeta_t hwEta
Definition: egamma.h:12
tkdphi_t hwDPhi
Definition: egamma.h:89
egquality_t hwQual
Definition: egamma.h:14
glbphi_t hwPhi
Definition: egamma.h:13
iso_t hwIso
Definition: egamma.h:15

◆ operator>()

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

Definition at line 101 of file egamma.h.

References l1ct::EGIsoObj::hwPt, and trackingPlots::other.

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

◆ pack()

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

Definition at line 124 of file egamma.h.

References hwCharge, hwDEta, hwDPhi, l1ct::EGIsoObj::hwEta, l1ct::EGIsoObj::hwIso, l1ct::EGIsoObj::hwPhi, l1ct::EGIsoObj::hwPt, l1ct::EGIsoObj::hwQual, hwZ0, pack_bool_into_bits(), pack_into_bits(), and runTheMatrix::ret.

Referenced by L1TCtL2EgProducer::encodeLayer1().

124  {
125  ap_uint<BITWIDTH> ret;
126  unsigned int start = 0;
136  return ret;
137  }
Definition: start.py:1
tkdeta_t hwDEta
Definition: egamma.h:88
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
tkdphi_t hwDPhi
Definition: egamma.h:89
egquality_t hwQual
Definition: egamma.h:14
glbphi_t hwPhi
Definition: egamma.h:13
iso_t hwIso
Definition: egamma.h:15
void pack_bool_into_bits(U &u, unsigned int &start, bool data)
Definition: bit_encoding.h:22

◆ toGT()

l1gt::Electron l1ct::EGIsoEleObj::toGT ( ) const
inline

Definition at line 157 of file egamma.h.

References l1gt::Electron::charge, l1ct::CTtoGT_eta(), l1ct::CTtoGT_phi(), l1ct::CTtoGT_pt(), l1gt::ThreeVector::eta, hwCharge, l1ct::EGIsoObj::hwEta, l1ct::EGIsoObj::hwIso, l1ct::EGIsoObj::hwPhi, l1ct::EGIsoObj::hwPt, l1ct::EGIsoObj::hwQual, hwZ0, l1gt::Electron::isolation, l1gt::ThreeVector::phi, l1gt::ThreeVector::pt, l1gt::Electron::quality, l1gt::Electron::v3, l1gt::Electron::valid, ApeEstimator_cff::width, and l1gt::Electron::z0.

Referenced by L1TCtL2EgProducer::convertFromEmu().

157  {
158  l1gt::Electron ele;
159  ele.valid = hwPt != 0;
160  ele.v3.pt = CTtoGT_pt(hwPt);
161  ele.v3.phi = CTtoGT_phi(hwPhi);
162  ele.v3.eta = CTtoGT_eta(hwEta);
163  ele.quality = hwQual;
164  ele.charge = hwCharge;
165  ele.z0(l1ct::z0_t::width - 1, 0) = hwZ0(l1ct::z0_t::width - 1, 0);
166  ele.isolation = hwIso;
167  return ele;
168  }
egquality_t quality
Definition: gt_datatypes.h:253
l1gt::eta_t CTtoGT_eta(glbeta_t x)
Definition: gt_datatypes.h:364
pt_t hwPt
Definition: egamma.h:11
glbeta_t hwEta
Definition: egamma.h:12
ThreeVector v3
Definition: gt_datatypes.h:252
l1gt::phi_t CTtoGT_phi(glbphi_t x)
Definition: gt_datatypes.h:369
egquality_t hwQual
Definition: egamma.h:14
ap_uint< 1 > charge
Definition: gt_datatypes.h:254
l1gt::pt_t CTtoGT_pt(pt_t x)
Definition: gt_datatypes.h:358
glbphi_t hwPhi
Definition: egamma.h:13
iso_t hwIso
Definition: egamma.h:15

◆ unpack()

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

Definition at line 138 of file egamma.h.

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

138  {
139  EGIsoEleObj ret;
140  ret.initFromBits(src);
141  return ret;
142  }
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

const int l1ct::EGIsoEleObj::BITWIDTH = EGIsoObj::BITWIDTH + tkdeta_t::width + tkdphi_t::width + z0_t::width + 1
static

Definition at line 123 of file egamma.h.

◆ hwCharge

bool l1ct::EGIsoEleObj::hwCharge

Definition at line 90 of file egamma.h.

Referenced by clear(), hwVtxPhi(), initFromBits(), intCharge(), operator==(), pack(), and toGT().

◆ hwDEta

tkdeta_t l1ct::EGIsoEleObj::hwDEta

Definition at line 88 of file egamma.h.

Referenced by clear(), floatDEta(), hwVtxEta(), initFromBits(), operator==(), and pack().

◆ hwDPhi

tkdphi_t l1ct::EGIsoEleObj::hwDPhi

Definition at line 89 of file egamma.h.

Referenced by clear(), floatDPhi(), hwVtxPhi(), initFromBits(), operator==(), and pack().

◆ hwZ0

z0_t l1ct::EGIsoEleObj::hwZ0