CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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: 8
 
unsigned int detid_in_layer: 12
 
unsigned int span_cols: 3
 
unsigned int span_rows: 3
 

Detailed Description

Definition at line 192 of file Hit.h.

Constructor & Destructor Documentation

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

Definition at line 198 of file Hit.h.

198 : detid_in_layer(0), charge_pcm(0), span_rows(0), span_cols(0) {}
unsigned int detid_in_layer
Definition: Hit.h:193
unsigned int span_cols
Definition: Hit.h:196
unsigned int span_rows
Definition: Hit.h:195
unsigned int charge_pcm
Definition: Hit.h:194

Member Function Documentation

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

Definition at line 206 of file Hit.h.

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

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

206  {
207  if (charge_pcm == 0)
208  return 0;
209  else
210  return ((charge_pcm - 1) << 3) + kMinChargePerCM;
211  }
static constexpr int kMinChargePerCM
Definition: Hit.h:190
unsigned int charge_pcm
Definition: Hit.h:194
void mkfit::Hit::PackedData::set_charge_pcm ( int  cpcm)
inline

Definition at line 200 of file Hit.h.

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

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

200  {
201  if (cpcm < kMinChargePerCM)
202  charge_pcm = 0;
203  else
204  charge_pcm = std::min(0xff, ((cpcm - kMinChargePerCM) >> 3) + 1);
205  }
static constexpr int kMinChargePerCM
Definition: Hit.h:190
unsigned int charge_pcm
Definition: Hit.h:194

Member Data Documentation

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

Definition at line 194 of file Hit.h.

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

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

Definition at line 196 of file Hit.h.

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

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

Definition at line 195 of file Hit.h.

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