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 isolation
 
egquality_t quality
 
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

Definition at line 326 of file gt_datatypes.h.

References l1gt::ThreeVector::eta, l1gt::ThreeVector::phi, l1gt::ThreeVector::pt, quality, TrackRefitter_38T_cff::src, unpack_from_bits(), v3, and valid.

326  {
327  unsigned int start = 0;
334  }
Definition: start.py:1
ThreeVector v3
Definition: gt_datatypes.h:311
valid_t valid
Definition: gt_datatypes.h:310
egquality_t quality
Definition: gt_datatypes.h:312
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15

◆ pack()

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

Definition at line 316 of file gt_datatypes.h.

References l1gt::ThreeVector::pack(), pack_into_bits(), quality, 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
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:62
ret
prodAgent to be discontinued
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
egquality_t quality
Definition: gt_datatypes.h:312

◆ 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(), l1t::L1GTProducer::produceCL2Photons(), 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.

◆ isolation

iso_t l1gt::Photon::isolation

Definition at line 313 of file gt_datatypes.h.

Referenced by l1t::L1GTProducer::produceCL2Photons(), and l1ct::EGIsoObj::toGT().

◆ quality

egquality_t l1gt::Photon::quality

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