CMS 3D CMS Logo

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

#include <gt_datatypes.h>

Public Member Functions

void initFromBits (const ap_uint< BITWIDTH > &src)
 
PackedTau pack () const
 
ap_uint< BITWIDTHpack_ap () const
 

Static Public Member Functions

static Tau unpack (const PackedTau &src)
 
static Tau unpack_ap (const ap_uint< BITWIDTH > &src)
 

Public Attributes

ap_uint< 1 > charge
 
ap_uint< 2 > id0
 
ap_uint< 2 > id1
 
tau_rawid_t isolation
 
tauseed_pt_t seed_pt
 
z0_t seed_z0
 
ap_uint< 2 > type
 
ThreeVector v3
 
valid_t valid
 

Static Public Attributes

static const int BITWIDTH = 128
 

Detailed Description

Definition at line 184 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

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

Definition at line 233 of file gt_datatypes.h.

References charge, l1gt::ThreeVector::eta, id0, id1, l1gt::ThreeVector::phi, l1gt::ThreeVector::pt, seed_pt, seed_z0, TrackRefitter_38T_cff::src, unpack_from_bits(), v3, and valid.

233  {
234  unsigned int start = 0;
246  }
Definition: start.py:1
ap_uint< 2 > id0
Definition: gt_datatypes.h:192
valid_t valid
Definition: gt_datatypes.h:185
z0_t seed_z0
Definition: gt_datatypes.h:188
tauseed_pt_t seed_pt
Definition: gt_datatypes.h:187
ap_uint< 1 > charge
Definition: gt_datatypes.h:189
ap_uint< 2 > id1
Definition: gt_datatypes.h:193
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15
ThreeVector v3
Definition: gt_datatypes.h:186

◆ pack()

PackedTau l1gt::Tau::pack ( ) const
inline

Definition at line 211 of file gt_datatypes.h.

References gpuClustering::pixelStatus::bits, and pack_ap().

Referenced by L1NNTauProducer::makeTau_HW().

211  {
212  PackedTau packed;
213  ap_uint<BITWIDTH> bits = this->pack_ap();
214  packed[0] = bits(63, 0);
215  packed[1] = bits(127, 64);
216  return packed;
217  }
constexpr uint32_t bits
Definition: gpuClustering.h:25
std::array< uint64_t, 2 > PackedTau
Definition: gt_datatypes.h:38
ap_uint< BITWIDTH > pack_ap() const
Definition: gt_datatypes.h:196

◆ pack_ap()

ap_uint<BITWIDTH> l1gt::Tau::pack_ap ( ) const
inline

Definition at line 196 of file gt_datatypes.h.

References charge, id0, id1, l1gt::ThreeVector::pack(), pack_into_bits(), runTheMatrix::ret, seed_pt, seed_z0, v3, and valid.

Referenced by pack().

196  {
197  ap_uint<BITWIDTH> ret;
198  unsigned int start = 0;
208  return ret;
209  }
Definition: start.py:1
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:62
ret
prodAgent to be discontinued
ap_uint< 2 > id0
Definition: gt_datatypes.h:192
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
valid_t valid
Definition: gt_datatypes.h:185
z0_t seed_z0
Definition: gt_datatypes.h:188
tauseed_pt_t seed_pt
Definition: gt_datatypes.h:187
ap_uint< 1 > charge
Definition: gt_datatypes.h:189
ap_uint< 2 > id1
Definition: gt_datatypes.h:193
ThreeVector v3
Definition: gt_datatypes.h:186

◆ unpack()

static Tau l1gt::Tau::unpack ( const PackedTau src)
inlinestatic

Definition at line 225 of file gt_datatypes.h.

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

Referenced by l1t::PFTau::getHWTauGT().

225  {
226  ap_uint<BITWIDTH> bits;
227  bits(63, 0) = src[0];
228  bits(127, 64) = src[1];
229 
230  return unpack_ap(bits);
231  }
constexpr uint32_t bits
Definition: gpuClustering.h:25
static Tau unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:219

◆ unpack_ap()

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

Definition at line 219 of file gt_datatypes.h.

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

Referenced by unpack().

219  {
220  Tau ret;
221  ret.initFromBits(src);
222  return ret;
223  }
ret
prodAgent to be discontinued
Definition: Tau.py:1

Member Data Documentation

◆ BITWIDTH

const int l1gt::Tau::BITWIDTH = 128
static

Definition at line 195 of file gt_datatypes.h.

◆ charge

ap_uint<1> l1gt::Tau::charge

Definition at line 189 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ id0

ap_uint<2> l1gt::Tau::id0

Definition at line 192 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ id1

ap_uint<2> l1gt::Tau::id1

Definition at line 193 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ isolation

tau_rawid_t l1gt::Tau::isolation

Definition at line 191 of file gt_datatypes.h.

◆ seed_pt

tauseed_pt_t l1gt::Tau::seed_pt

Definition at line 187 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ seed_z0

z0_t l1gt::Tau::seed_z0

Definition at line 188 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ type

ap_uint<2> l1gt::Tau::type

◆ v3

ThreeVector l1gt::Tau::v3

Definition at line 186 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ valid

valid_t l1gt::Tau::valid

Definition at line 185 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().