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 18 of file PixelDigi.h.

typedef unsigned int PixelDigi::PackedDigiType

Definition at line 17 of file PixelDigi.h.

Constructor & Destructor Documentation

PixelDigi::PixelDigi ( PackedDigiType  packed_value)
inlineexplicit

Definition at line 20 of file PixelDigi.h.

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

Definition at line 22 of file PixelDigi.h.

References init().

22  {
23  init( row, col, adc);
24  }
int row() const
Definition: PixelDigi.h:56
void init(int row, int col, int adc)
Definition: PixelDigi.h:33
unsigned short adc() const
Definition: PixelDigi.h:59
col
Definition: cuy.py:1008
PixelDigi::PixelDigi ( int  chan,
int  adc 
)
inline

Definition at line 26 of file PixelDigi.h.

References channelToPixel(), and init().

26  {
27  std::pair<int,int> rc = channelToPixel(chan);
28  init( rc.first, rc.second, adc);
29  }
void init(int row, int col, int adc)
Definition: PixelDigi.h:33
unsigned short adc() const
Definition: PixelDigi.h:59
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:62
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 31 of file PixelDigi.h.

31 : theData(0) {}
PackedDigiType theData
Definition: PixelDigi.h:75

Member Function Documentation

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

Definition at line 72 of file PixelDigi.h.

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

Referenced by operator<<().

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

Definition at line 62 of file PixelDigi.h.

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

Referenced by Phase2TrackerDigitizerAlgorithm::add_noise(), cms::Phase2TrackerDigitizer::addPixelCollection(), TrackerHitAssociator::associatePixelRecHit(), 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(), PixelDigi(), edm::DataMixingSiPixelMCDigiWorker::putSiPixel(), and TrackClusterSplitter::splitCluster().

62  {
65  return std::pair<int,int>(row,col);
66  }
int row() const
Definition: PixelDigi.h:56
static const Packing thePacking
col
Definition: cuy.py:1008
int PixelDigi::column ( ) const
inline
void PixelDigi::init ( int  row,
int  col,
int  adc 
)
inline

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

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

Definition at line 60 of file PixelDigi.h.

References theData.

Referenced by operator<().

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

Member Data Documentation

PackedDigiType PixelDigi::theData
private

Definition at line 75 of file PixelDigi.h.

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