CMS 3D CMS Logo

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

#include <pf.h>

Inheritance diagram for l1ct::PFRegion:
l1ct::PFRegionEmu

Public Member Functions

float floatEtaCenter () const
 
float floatEtaExtra () const
 
float floatEtaHalfWidth () const
 
float floatEtaMax () const
 
float floatEtaMaxExtra () const
 
float floatEtaMin () const
 
float floatEtaMinExtra () const
 
float floatGlbEta (eta_t hwEta) const
 
float floatGlbEta (glbeta_t hwEta) const
 
template<typename T >
float floatGlbEtaOf (const T &t) const
 
float floatGlbPhi (phi_t hwPhi) const
 
float floatGlbPhi (glbphi_t hwPhi) const
 
template<typename T >
float floatGlbPhiOf (const T &t) const
 
float floatPhiCenter () const
 
float floatPhiExtra () const
 
float floatPhiHalfWidth () const
 
float floatPhiHalfWidthExtra () const
 
glbeta_t hwGlbEta (eta_t hwEta) const
 
glbeta_t hwGlbEta (glbeta_t hwEta) const
 
template<typename T >
glbeta_t hwGlbEtaOf (const T &t) const
 
glbphi_t hwGlbPhi (glbphi_t hwPhi) const
 
template<typename T >
glbphi_t hwGlbPhiOf (const T &t) const
 
int intEtaCenter () const
 
int intPhiCenter () const
 
bool isFiducial (eta_t hwEta, phi_t hwPhi) const
 
template<typename T >
bool isFiducial (const T &t) const
 
template<typename ET , typename PT >
bool isInside (ET hwEta, PT hwPhi) const
 
template<typename T >
bool isInside (const T &t) const
 
ap_uint< BITWIDTHpack () const
 

Static Public Member Functions

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

Public Attributes

glbeta_t hwEtaCenter
 
eta_t hwEtaExtra
 
eta_t hwEtaHalfWidth
 
glbphi_t hwPhiCenter
 
phi_t hwPhiExtra
 
phi_t hwPhiHalfWidth
 

Static Public Attributes

static const int BITWIDTH = glbeta_t::width + glbphi_t::width + 2 * eta_t::width + 2 * phi_t::width
 

Detailed Description

Definition at line 161 of file pf.h.

Member Function Documentation

◆ floatEtaCenter()

float l1ct::PFRegion::floatEtaCenter ( ) const
inline

Definition at line 171 of file pf.h.

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

171 { return Scales::floatEta(hwEtaCenter); }
glbeta_t hwEtaCenter
Definition: pf.h:162
float floatEta(eta_t eta)
Definition: datatypes.h:157

◆ floatEtaExtra()

float l1ct::PFRegion::floatEtaExtra ( ) const
inline

Definition at line 175 of file pf.h.

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

175 { return Scales::floatEta(hwEtaExtra); }
eta_t hwEtaExtra
Definition: pf.h:166
float floatEta(eta_t eta)
Definition: datatypes.h:157

◆ floatEtaHalfWidth()

float l1ct::PFRegion::floatEtaHalfWidth ( ) const
inline

Definition at line 173 of file pf.h.

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

173 { return Scales::floatEta(hwEtaHalfWidth); }
eta_t hwEtaHalfWidth
Definition: pf.h:164
float floatEta(eta_t eta)
Definition: datatypes.h:157

◆ floatEtaMax()

float l1ct::PFRegion::floatEtaMax ( ) const
inline

Definition at line 179 of file pf.h.

References l1ct::Scales::floatEta(), hwEtaCenter, and hwEtaHalfWidth.

eta_t hwEtaHalfWidth
Definition: pf.h:164
glbeta_t hwEtaCenter
Definition: pf.h:162
float floatEta(eta_t eta)
Definition: datatypes.h:157
ap_int< 12 > glbeta_t
Definition: datatypes.h:29

◆ floatEtaMaxExtra()

float l1ct::PFRegion::floatEtaMaxExtra ( ) const
inline

Definition at line 183 of file pf.h.

References l1ct::Scales::floatEta(), hwEtaCenter, hwEtaExtra, and hwEtaHalfWidth.

183  {
185  }
eta_t hwEtaHalfWidth
Definition: pf.h:164
glbeta_t hwEtaCenter
Definition: pf.h:162
eta_t hwEtaExtra
Definition: pf.h:166
float floatEta(eta_t eta)
Definition: datatypes.h:157
ap_int< 12 > glbeta_t
Definition: datatypes.h:29

◆ floatEtaMin()

float l1ct::PFRegion::floatEtaMin ( ) const
inline

Definition at line 178 of file pf.h.

References l1ct::Scales::floatEta(), hwEtaCenter, and hwEtaHalfWidth.

eta_t hwEtaHalfWidth
Definition: pf.h:164
glbeta_t hwEtaCenter
Definition: pf.h:162
float floatEta(eta_t eta)
Definition: datatypes.h:157
ap_int< 12 > glbeta_t
Definition: datatypes.h:29

◆ floatEtaMinExtra()

float l1ct::PFRegion::floatEtaMinExtra ( ) const
inline

Definition at line 180 of file pf.h.

References l1ct::Scales::floatEta(), hwEtaCenter, hwEtaExtra, and hwEtaHalfWidth.

180  {
182  }
eta_t hwEtaHalfWidth
Definition: pf.h:164
glbeta_t hwEtaCenter
Definition: pf.h:162
eta_t hwEtaExtra
Definition: pf.h:166
float floatEta(eta_t eta)
Definition: datatypes.h:157
ap_int< 12 > glbeta_t
Definition: datatypes.h:29

◆ floatGlbEta() [1/2]

float l1ct::PFRegion::floatGlbEta ( eta_t  hwEta) const
inline

Definition at line 208 of file pf.h.

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

Referenced by floatGlbEtaOf().

208 { return Scales::floatEta(hwGlbEta(hwEta)); }
glbeta_t hwGlbEta(eta_t hwEta) const
Definition: pf.h:187
float floatEta(eta_t eta)
Definition: datatypes.h:157

◆ floatGlbEta() [2/2]

float l1ct::PFRegion::floatGlbEta ( glbeta_t  hwEta) const
inline

Definition at line 210 of file pf.h.

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

210 { return Scales::floatEta(hwGlbEta(hwEta)); }
glbeta_t hwGlbEta(eta_t hwEta) const
Definition: pf.h:187
float floatEta(eta_t eta)
Definition: datatypes.h:157

◆ floatGlbEtaOf()

template<typename T >
float l1ct::PFRegion::floatGlbEtaOf ( const T t) const
inline

Definition at line 214 of file pf.h.

References floatGlbEta(), and submitPVValidationJobs::t.

214  {
215  return floatGlbEta(t.hwEta);
216  }
float floatGlbEta(eta_t hwEta) const
Definition: pf.h:208

◆ floatGlbPhi() [1/2]

float l1ct::PFRegion::floatGlbPhi ( phi_t  hwPhi) const
inline

Definition at line 209 of file pf.h.

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

Referenced by floatGlbPhiOf().

209 { return Scales::floatPhi(hwGlbPhi(hwPhi)); }
glbphi_t hwGlbPhi(glbphi_t hwPhi) const
Definition: pf.h:189
float floatPhi(phi_t phi)
Definition: datatypes.h:158

◆ floatGlbPhi() [2/2]

float l1ct::PFRegion::floatGlbPhi ( glbphi_t  hwPhi) const
inline

Definition at line 211 of file pf.h.

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

211 { return Scales::floatPhi(hwGlbPhi(hwPhi)); }
glbphi_t hwGlbPhi(glbphi_t hwPhi) const
Definition: pf.h:189
float floatPhi(phi_t phi)
Definition: datatypes.h:158

◆ floatGlbPhiOf()

template<typename T >
float l1ct::PFRegion::floatGlbPhiOf ( const T t) const
inline

Definition at line 218 of file pf.h.

References floatGlbPhi(), and submitPVValidationJobs::t.

218  {
219  return floatGlbPhi(t.hwPhi);
220  }
float floatGlbPhi(phi_t hwPhi) const
Definition: pf.h:209

◆ floatPhiCenter()

float l1ct::PFRegion::floatPhiCenter ( ) const
inline

Definition at line 172 of file pf.h.

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

172 { return Scales::floatPhi(hwPhiCenter); }
glbphi_t hwPhiCenter
Definition: pf.h:163
float floatPhi(phi_t phi)
Definition: datatypes.h:158

◆ floatPhiExtra()

float l1ct::PFRegion::floatPhiExtra ( ) const
inline

Definition at line 176 of file pf.h.

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

Referenced by floatPhiHalfWidthExtra().

176 { return Scales::floatPhi(hwPhiExtra); }
float floatPhi(phi_t phi)
Definition: datatypes.h:158
phi_t hwPhiExtra
Definition: pf.h:167

◆ floatPhiHalfWidth()

float l1ct::PFRegion::floatPhiHalfWidth ( ) const
inline

Definition at line 174 of file pf.h.

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

Referenced by floatPhiHalfWidthExtra().

174 { return Scales::floatPhi(hwPhiHalfWidth); }
float floatPhi(phi_t phi)
Definition: datatypes.h:158
phi_t hwPhiHalfWidth
Definition: pf.h:165

◆ floatPhiHalfWidthExtra()

float l1ct::PFRegion::floatPhiHalfWidthExtra ( ) const
inline

Definition at line 177 of file pf.h.

References floatPhiExtra(), and floatPhiHalfWidth().

177 { return floatPhiHalfWidth() + floatPhiExtra(); }
float floatPhiExtra() const
Definition: pf.h:176
float floatPhiHalfWidth() const
Definition: pf.h:174

◆ hwGlbEta() [1/2]

glbeta_t l1ct::PFRegion::hwGlbEta ( eta_t  hwEta) const
inline

Definition at line 187 of file pf.h.

References l1trig_cff::hwEta, and hwEtaCenter.

Referenced by floatGlbEta(), and hwGlbEtaOf().

187 { return hwEtaCenter + hwEta; }
glbeta_t hwEtaCenter
Definition: pf.h:162

◆ hwGlbEta() [2/2]

glbeta_t l1ct::PFRegion::hwGlbEta ( glbeta_t  hwEta) const
inline

Definition at line 188 of file pf.h.

References l1trig_cff::hwEta, and hwEtaCenter.

188 { return hwEtaCenter + hwEta; }
glbeta_t hwEtaCenter
Definition: pf.h:162

◆ hwGlbEtaOf()

template<typename T >
glbeta_t l1ct::PFRegion::hwGlbEtaOf ( const T t) const
inline

Definition at line 200 of file pf.h.

References hwGlbEta(), and submitPVValidationJobs::t.

200  {
201  return hwGlbEta(t.hwEta);
202  }
glbeta_t hwGlbEta(eta_t hwEta) const
Definition: pf.h:187

◆ hwGlbPhi()

glbphi_t l1ct::PFRegion::hwGlbPhi ( glbphi_t  hwPhi) const
inline

Definition at line 189 of file pf.h.

References l1trig_cff::hwPhi, hwPhiCenter, l1ct::Scales::INTPHI_PI, l1ct::Scales::INTPHI_TWOPI, and runTheMatrix::ret.

Referenced by floatGlbPhi(), and hwGlbPhiOf().

189  {
190  ap_int<glbphi_t::width + 1> ret = hwPhiCenter + hwPhi;
191  if (ret > Scales::INTPHI_PI)
192  return ret - Scales::INTPHI_TWOPI;
193  else if (ret <= -Scales::INTPHI_PI)
194  return ret + Scales::INTPHI_TWOPI;
195  else
196  return ret;
197  }
constexpr int INTPHI_PI
Definition: datatypes.h:145
ret
prodAgent to be discontinued
glbphi_t hwPhiCenter
Definition: pf.h:163
constexpr int INTPHI_TWOPI
Definition: datatypes.h:146

◆ hwGlbPhiOf()

template<typename T >
glbphi_t l1ct::PFRegion::hwGlbPhiOf ( const T t) const
inline

Definition at line 204 of file pf.h.

References hwGlbPhi(), and submitPVValidationJobs::t.

204  {
205  return hwGlbPhi(t.hwPhi);
206  }
glbphi_t hwGlbPhi(glbphi_t hwPhi) const
Definition: pf.h:189

◆ intEtaCenter()

int l1ct::PFRegion::intEtaCenter ( ) const
inline

Definition at line 169 of file pf.h.

References hwEtaCenter.

169 { return hwEtaCenter.to_int(); }
glbeta_t hwEtaCenter
Definition: pf.h:162

◆ intPhiCenter()

int l1ct::PFRegion::intPhiCenter ( ) const
inline

Definition at line 170 of file pf.h.

References hwPhiCenter.

170 { return hwPhiCenter.to_int(); }
glbphi_t hwPhiCenter
Definition: pf.h:163

◆ isFiducial() [1/2]

bool l1ct::PFRegion::isFiducial ( eta_t  hwEta,
phi_t  hwPhi 
) const
inline

Definition at line 222 of file pf.h.

References hwEtaHalfWidth, and hwPhiHalfWidth.

Referenced by isFiducial().

222  {
223  return hwEta <= hwEtaHalfWidth && hwEta > -hwEtaHalfWidth && hwPhi <= hwPhiHalfWidth && hwPhi > -hwPhiHalfWidth;
224  }
eta_t hwEtaHalfWidth
Definition: pf.h:164
phi_t hwPhiHalfWidth
Definition: pf.h:165

◆ isFiducial() [2/2]

template<typename T >
bool l1ct::PFRegion::isFiducial ( const T t) const
inline

Definition at line 232 of file pf.h.

References isFiducial(), and submitPVValidationJobs::t.

232  {
233  return isFiducial(t.hwEta, t.hwPhi);
234  }
bool isFiducial(eta_t hwEta, phi_t hwPhi) const
Definition: pf.h:222

◆ isInside() [1/2]

template<typename ET , typename PT >
bool l1ct::PFRegion::isInside ( ET  hwEta,
PT  hwPhi 
) const
inline

Definition at line 226 of file pf.h.

References hwEtaExtra, hwEtaHalfWidth, hwPhiExtra, and hwPhiHalfWidth.

Referenced by isInside().

226  {
227  return hwEta <= hwEtaHalfWidth + hwEtaExtra && hwEta >= -hwEtaHalfWidth - hwEtaExtra &&
228  hwPhi <= hwPhiHalfWidth + hwPhiExtra && hwPhi >= -hwPhiHalfWidth - hwPhiExtra;
229  }
eta_t hwEtaHalfWidth
Definition: pf.h:164
eta_t hwEtaExtra
Definition: pf.h:166
phi_t hwPhiExtra
Definition: pf.h:167
phi_t hwPhiHalfWidth
Definition: pf.h:165

◆ isInside() [2/2]

template<typename T >
bool l1ct::PFRegion::isInside ( const T t) const
inline

Definition at line 236 of file pf.h.

References isInside(), and submitPVValidationJobs::t.

236  {
237  return isInside(t.hwEta, t.hwPhi);
238  }
bool isInside(ET hwEta, PT hwPhi) const
Definition: pf.h:226

◆ pack()

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

Definition at line 241 of file pf.h.

References hwEtaCenter, hwEtaExtra, hwEtaHalfWidth, hwPhiCenter, hwPhiExtra, hwPhiHalfWidth, pack_into_bits(), and runTheMatrix::ret.

241  {
242  ap_uint<BITWIDTH> ret;
243  unsigned int start = 0;
250  return ret;
251  }
Definition: start.py:1
eta_t hwEtaHalfWidth
Definition: pf.h:164
glbeta_t hwEtaCenter
Definition: pf.h:162
ret
prodAgent to be discontinued
eta_t hwEtaExtra
Definition: pf.h:166
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
glbphi_t hwPhiCenter
Definition: pf.h:163
phi_t hwPhiExtra
Definition: pf.h:167
phi_t hwPhiHalfWidth
Definition: pf.h:165

◆ unpack()

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

Definition at line 252 of file pf.h.

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

252  {
253  PFRegion ret;
254  unsigned int start = 0;
255  unpack_from_bits(src, start, ret.hwEtaCenter);
256  unpack_from_bits(src, start, ret.hwPhiCenter);
257  unpack_from_bits(src, start, ret.hwEtaHalfWidth);
258  unpack_from_bits(src, start, ret.hwPhiHalfWidth);
259  unpack_from_bits(src, start, ret.hwEtaExtra);
260  unpack_from_bits(src, start, ret.hwPhiExtra);
261  return ret;
262  }
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::PFRegion::BITWIDTH = glbeta_t::width + glbphi_t::width + 2 * eta_t::width + 2 * phi_t::width
static

Definition at line 240 of file pf.h.

◆ hwEtaCenter

glbeta_t l1ct::PFRegion::hwEtaCenter

◆ hwEtaExtra

eta_t l1ct::PFRegion::hwEtaExtra

Definition at line 166 of file pf.h.

Referenced by floatEtaExtra(), floatEtaMaxExtra(), floatEtaMinExtra(), isInside(), and pack().

◆ hwEtaHalfWidth

eta_t l1ct::PFRegion::hwEtaHalfWidth

◆ hwPhiCenter

glbphi_t l1ct::PFRegion::hwPhiCenter

Definition at line 163 of file pf.h.

Referenced by floatPhiCenter(), hwGlbPhi(), intPhiCenter(), and pack().

◆ hwPhiExtra

phi_t l1ct::PFRegion::hwPhiExtra

Definition at line 167 of file pf.h.

Referenced by floatPhiExtra(), isInside(), and pack().

◆ hwPhiHalfWidth

phi_t l1ct::PFRegion::hwPhiHalfWidth

Definition at line 165 of file pf.h.

Referenced by floatPhiHalfWidth(), isFiducial(), isInside(), and pack().