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 299 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

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

Definition at line 316 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.

316  {
317  unsigned int start = 0;
324  }
Definition: start.py:1
ThreeVector v3
Definition: gt_datatypes.h:301
valid_t valid
Definition: gt_datatypes.h:300
egquality_t quality
Definition: gt_datatypes.h:302
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 306 of file gt_datatypes.h.

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

306  {
307  ap_uint<96> ret(0);
308  unsigned int start = 0;
313  return ret;
314  }
Definition: start.py:1
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:59
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:301
valid_t valid
Definition: gt_datatypes.h:300
egquality_t quality
Definition: gt_datatypes.h:302

◆ unpack()

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

Definition at line 332 of file gt_datatypes.h.

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

332  {
333  ap_uint<BITWIDTH> bits;
334  if (parity == 0) {
335  bits(63, 0) = src[0];
336  bits(95, 64) = src[1];
337  } else {
338  bits(63, 0) = src[1];
339  bits(95, 64) = (src[0] >> 32);
340  }
341  return unpack_ap(bits);
342  }
constexpr uint32_t bits
Definition: gpuClustering.h:25
static Photon unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:326

◆ unpack_ap()

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

Definition at line 326 of file gt_datatypes.h.

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

Referenced by l1t::L1GTProducer::produceCL2Photons(), and unpack().

326  {
327  Photon ret;
328  ret.initFromBits(src);
329  return ret;
330  }
Definition: Photon.py:1
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

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

Definition at line 305 of file gt_datatypes.h.

◆ isolation

iso_t l1gt::Photon::isolation

Definition at line 303 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 300 of file gt_datatypes.h.

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