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

Member Function Documentation

◆ initFromBits()

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

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

230  {
231  unsigned int start = 0;
243  }
Definition: start.py:1
ap_uint< 2 > id0
Definition: gt_datatypes.h:189
valid_t valid
Definition: gt_datatypes.h:182
z0_t seed_z0
Definition: gt_datatypes.h:185
tauseed_pt_t seed_pt
Definition: gt_datatypes.h:184
ap_uint< 1 > charge
Definition: gt_datatypes.h:186
ap_uint< 2 > id1
Definition: gt_datatypes.h:190
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15
ThreeVector v3
Definition: gt_datatypes.h:183

◆ pack()

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

Definition at line 208 of file gt_datatypes.h.

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

Referenced by L1NNTauProducer::makeTau_HW().

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

◆ pack_ap()

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

Definition at line 193 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().

193  {
194  ap_uint<BITWIDTH> ret;
195  unsigned int start = 0;
205  return ret;
206  }
Definition: start.py:1
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:59
ret
prodAgent to be discontinued
ap_uint< 2 > id0
Definition: gt_datatypes.h:189
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
valid_t valid
Definition: gt_datatypes.h:182
z0_t seed_z0
Definition: gt_datatypes.h:185
tauseed_pt_t seed_pt
Definition: gt_datatypes.h:184
ap_uint< 1 > charge
Definition: gt_datatypes.h:186
ap_uint< 2 > id1
Definition: gt_datatypes.h:190
ThreeVector v3
Definition: gt_datatypes.h:183

◆ unpack()

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

Definition at line 222 of file gt_datatypes.h.

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

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

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

◆ unpack_ap()

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

Definition at line 216 of file gt_datatypes.h.

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

Referenced by unpack().

216  {
217  Tau ret;
218  ret.initFromBits(src);
219  return ret;
220  }
ret
prodAgent to be discontinued
Definition: Tau.py:1

Member Data Documentation

◆ BITWIDTH

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

Definition at line 192 of file gt_datatypes.h.

◆ charge

ap_uint<1> l1gt::Tau::charge

Definition at line 186 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ id0

ap_uint<2> l1gt::Tau::id0

Definition at line 189 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ id1

ap_uint<2> l1gt::Tau::id1

Definition at line 190 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ isolation

tau_rawid_t l1gt::Tau::isolation

Definition at line 188 of file gt_datatypes.h.

◆ seed_pt

tauseed_pt_t l1gt::Tau::seed_pt

Definition at line 184 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ seed_z0

z0_t l1gt::Tau::seed_z0

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

Referenced by initFromBits(), and pack_ap().

◆ valid

valid_t l1gt::Tau::valid

Definition at line 182 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().