CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
mkfit::Hit::PackedData Struct Reference

#include <Hit.h>

Public Member Functions

unsigned int get_charge_pcm () const
 
 PackedData ()
 
void set_charge_pcm (int cpcm)
 

Public Attributes

unsigned int charge_pcm: kChargePerCMBits
 
unsigned int detid_in_layer: kDetIdInLayerBits
 
unsigned int span_cols: kClusterSizeBits
 
unsigned int span_rows: kClusterSizeBits
 

Detailed Description

Definition at line 206 of file Hit.h.

Constructor & Destructor Documentation

◆ PackedData()

mkfit::Hit::PackedData::PackedData ( )
inline

Definition at line 212 of file Hit.h.

212 : detid_in_layer(0), charge_pcm(0), span_rows(0), span_cols(0) {}
unsigned int detid_in_layer
Definition: Hit.h:207
unsigned int span_cols
Definition: Hit.h:210
unsigned int span_rows
Definition: Hit.h:209
unsigned int charge_pcm
Definition: Hit.h:208

Member Function Documentation

◆ get_charge_pcm()

unsigned int mkfit::Hit::PackedData::get_charge_pcm ( ) const
inline

Definition at line 220 of file Hit.h.

References charge_pcm, and mkfit::Hit::kMinChargePerCM.

Referenced by mkfit::Hit::chargePerCM().

220  {
221  if (charge_pcm == 0)
222  return 0;
223  else
224  return ((charge_pcm - 1) << 3) + kMinChargePerCM;
225  }
static constexpr int kMinChargePerCM
Definition: Hit.h:200
unsigned int charge_pcm
Definition: Hit.h:208

◆ set_charge_pcm()

void mkfit::Hit::PackedData::set_charge_pcm ( int  cpcm)
inline

Definition at line 214 of file Hit.h.

References charge_pcm, mkfit::Hit::kChargePerCMBits, mkfit::Hit::kMinChargePerCM, and SiStripPI::min.

Referenced by mkfit::Hit::setupAsStrip().

214  {
215  if (cpcm < kMinChargePerCM)
216  charge_pcm = 0;
217  else
218  charge_pcm = std::min((1 << kChargePerCMBits) - 1, ((cpcm - kMinChargePerCM) >> 3) + 1);
219  }
static constexpr int kChargePerCMBits
Definition: Hit.h:201
static constexpr int kMinChargePerCM
Definition: Hit.h:200
unsigned int charge_pcm
Definition: Hit.h:208

Member Data Documentation

◆ charge_pcm

unsigned int mkfit::Hit::PackedData::charge_pcm

Definition at line 208 of file Hit.h.

Referenced by get_charge_pcm(), set_charge_pcm(), and mkfit::Hit::setupAsPixel().

◆ detid_in_layer

unsigned int mkfit::Hit::PackedData::detid_in_layer

◆ span_cols

unsigned int mkfit::Hit::PackedData::span_cols

Definition at line 210 of file Hit.h.

Referenced by mkfit::Hit::setupAsPixel(), and mkfit::Hit::spanCols().

◆ span_rows

unsigned int mkfit::Hit::PackedData::span_rows

Definition at line 209 of file Hit.h.

Referenced by mkfit::Hit::setupAsPixel(), mkfit::Hit::setupAsStrip(), and mkfit::Hit::spanRows().