CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
l1gt::Photon Struct Reference

#include <gt_datatypes.h>

Public Member Functions

void initFromBits (const ap_uint< BITWIDTH > &src)
 
ap_uint< BITWIDTHpack () const
 

Static Public Member Functions

static Photon unpack (const std::array< uint64_t, 2 > &src, int parity)
 
static Photon unpack_ap (const ap_uint< BITWIDTH > &src)
 

Public Attributes

iso_t isolationPT
 
egquality_t qualityFlags
 
ThreeVector v3
 
valid_t valid
 

Static Public Attributes

static const int BITWIDTH = 96
 

Detailed Description

Definition at line 309 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

void l1gt::Photon::initFromBits ( const ap_uint< BITWIDTH > &  src)
inline

◆ pack()

ap_uint<BITWIDTH> l1gt::Photon::pack ( ) const
inline

Definition at line 316 of file gt_datatypes.h.

References isolationPT, l1gt::ThreeVector::pack(), pack_into_bits(), qualityFlags, runTheMatrix::ret, v3, and valid.

316  {
317  ap_uint<96> ret(0);
318  unsigned int start = 0;
323  return ret;
324  }
Definition: start.py:1
egquality_t qualityFlags
Definition: gt_datatypes.h:312
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:62
ret
prodAgent to be discontinued
iso_t isolationPT
Definition: gt_datatypes.h:313
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
ThreeVector v3
Definition: gt_datatypes.h:311
valid_t valid
Definition: gt_datatypes.h:310

◆ unpack()

static Photon l1gt::Photon::unpack ( const std::array< uint64_t, 2 > &  src,
int  parity 
)
inlinestatic

Definition at line 342 of file gt_datatypes.h.

References ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::bits, TrackRefitter_38T_cff::src, and unpack_ap().

342  {
343  ap_uint<BITWIDTH> bits(0);
344  if (parity == 0) {
345  bits(63, 0) = src[0];
346  bits(95, 64) = src[1];
347  } else {
348  bits(63, 0) = src[1];
349  bits(95, 64) = (src[0] >> 32);
350  }
351  return unpack_ap(bits);
352  }
static Photon unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:336

◆ unpack_ap()

static Photon l1gt::Photon::unpack_ap ( const ap_uint< BITWIDTH > &  src)
inlinestatic

Definition at line 336 of file gt_datatypes.h.

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

Referenced by l1t::TkEm::hwObj(), and unpack().

336  {
337  Photon ret;
338  ret.initFromBits(src);
339  return ret;
340  }
Definition: Photon.py:1
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

const int l1gt::Photon::BITWIDTH = 96
static

Definition at line 315 of file gt_datatypes.h.

◆ isolationPT

iso_t l1gt::Photon::isolationPT

◆ qualityFlags

egquality_t l1gt::Photon::qualityFlags

◆ v3

ThreeVector l1gt::Photon::v3

◆ valid

valid_t l1gt::Photon::valid

Definition at line 310 of file gt_datatypes.h.

Referenced by initFromBits(), pack(), and l1ct::EGIsoObj::toGT().