CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
PixelDigi Class Reference

#include <PixelDigi.h>

Public Types

typedef unsigned int ChannelType
 
typedef unsigned int PackedDigiType
 

Public Member Functions

unsigned short adc () const
 
int channel () const
 
int column () const
 
void init (int row, int col, int adc)
 
PackedDigiType packedData () const
 
 PixelDigi (PackedDigiType packed_value)
 
 PixelDigi (int row, int col, int adc)
 
 PixelDigi (int chan, int adc)
 
 PixelDigi ()
 
int row () const
 

Static Public Member Functions

static std::pair< int, int > channelToPixel (int ch)
 
static int pixelToChannel (int row, int col)
 

Private Attributes

PackedDigiType theData
 

Detailed Description

Persistent digi for the Pixels.

Definition at line 14 of file PixelDigi.h.

Member Typedef Documentation

typedef unsigned int PixelDigi::ChannelType

Definition at line 17 of file PixelDigi.h.

typedef unsigned int PixelDigi::PackedDigiType

Definition at line 16 of file PixelDigi.h.

Constructor & Destructor Documentation

PixelDigi::PixelDigi ( PackedDigiType  packed_value)
inlineexplicit

Definition at line 19 of file PixelDigi.h.

19 : theData(packed_value) {}
PackedDigiType theData
Definition: PixelDigi.h:76
PixelDigi::PixelDigi ( int  row,
int  col,
int  adc 
)
inline

Definition at line 21 of file PixelDigi.h.

References init().

21 { init(row, col, adc); }
int row() const
Definition: PixelDigi.h:52
void init(int row, int col, int adc)
Definition: PixelDigi.h:30
unsigned short adc() const
Definition: PixelDigi.h:60
col
Definition: cuy.py:1010
PixelDigi::PixelDigi ( int  chan,
int  adc 
)
inline

Definition at line 23 of file PixelDigi.h.

References channelToPixel(), and init().

23  {
24  std::pair<int, int> rc = channelToPixel(chan);
25  init(rc.first, rc.second, adc);
26  }
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:65
void init(int row, int col, int adc)
Definition: PixelDigi.h:30
unsigned short adc() const
Definition: PixelDigi.h:60
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
PixelDigi::PixelDigi ( )
inline

Definition at line 28 of file PixelDigi.h.

28 : theData(0) {}
PackedDigiType theData
Definition: PixelDigi.h:76

Member Function Documentation

unsigned short PixelDigi::adc ( ) const
inline
int PixelDigi::channel ( ) const
inline

Definition at line 73 of file PixelDigi.h.

References column(), PixelChannelIdentifier::pixelToChannel(), and row().

Referenced by operator<<().

int row() const
Definition: PixelDigi.h:52
static int pixelToChannel(int row, int col)
int column() const
Definition: PixelDigi.h:55
static std::pair<int, int> PixelDigi::channelToPixel ( int  ch)
inlinestatic

Definition at line 65 of file PixelDigi.h.

References cuy::col, PixelChannelIdentifier::Packing::column_mask, PixelChannelIdentifier::Packing::column_width, row(), and PixelChannelIdentifier::thePacking.

Referenced by PixelDigitizerAlgorithm::add_cross_talk(), Phase2TrackerDigitizerAlgorithm::add_cross_talk(), cms::Phase2TrackerDigitizer::addPixelCollection(), TrackerHitAssociator::associatePixelRecHit(), SiPixelDigitizerAlgorithm::hitSignalReweight(), SiPixelDigitizerAlgorithm::induce_signal(), SiPixelDigitizerAlgorithm::make_digis(), Phase2TrackerDigitizerAlgorithm::module_killing_conf(), SiPixelDigitizerAlgorithm::module_killing_conf(), Phase2TrackerDigitizerAlgorithm::module_killing_DB(), SiPixelDigitizerAlgorithm::module_killing_DB(), SiPixelDigitizerAlgorithm::pixel_inefficiency(), Phase2TrackerDigitizerAlgorithm::pixel_inefficiency_db(), SiPixelDigitizerAlgorithm::pixel_inefficiency_db(), and PixelDigi().

65  {
68  return std::pair<int, int>(row, col);
69  }
int row() const
Definition: PixelDigi.h:52
static const Packing thePacking
col
Definition: cuy.py:1010
int PixelDigi::column ( ) const
inline
void PixelDigi::init ( int  row,
int  col,
int  adc 
)
inline

Definition at line 30 of file PixelDigi.h.

References PixelChannelIdentifier::Packing::adc_shift, gather_cfg::cout, SiStripPI::max, PixelChannelIdentifier::Packing::max_adc, PixelChannelIdentifier::Packing::row_shift, theData, and PixelChannelIdentifier::thePacking.

Referenced by PixelDigi().

30  {
31 #ifdef FIXME_DEBUG
32  // This check is for the maximal row or col number that can be packed
33  // in a PixelDigi. The actual number of rows or columns in a detector
34  // may be smaller!
35  // it is done much better in Raw2Digi...
36  if (row < 0 || row > PixelChannelIdentifier::thePacking.max_row || col < 0 ||
38  std::cout << "PixelDigi constructor: row or column out packing range " << row << ' ' << col << std::endl;
39  }
40 #endif
41 
42  // Set adc to max_adc in case of overflow
44  : std::max(adc, 0);
45 
47  (col << PixelChannelIdentifier::thePacking.column_shift) |
49  }
int row() const
Definition: PixelDigi.h:52
static const Packing thePacking
unsigned short adc() const
Definition: PixelDigi.h:60
col
Definition: cuy.py:1010
PackedDigiType theData
Definition: PixelDigi.h:76
PackedDigiType PixelDigi::packedData ( ) const
inline

Definition at line 63 of file PixelDigi.h.

References theData.

Referenced by operator<().

63 { return theData; }
PackedDigiType theData
Definition: PixelDigi.h:76
static int PixelDigi::pixelToChannel ( int  row,
int  col 
)
inlinestatic
int PixelDigi::row ( ) const
inline

Member Data Documentation

PackedDigiType PixelDigi::theData
private

Definition at line 76 of file PixelDigi.h.

Referenced by adc(), column(), init(), packedData(), and row().