CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
int flag () const
 
void init (int row, int col, int adc, int flag=0)
 
PackedDigiType packedData () const
 
 PixelDigi (PackedDigiType packed_value)
 
 PixelDigi (int row, int col, int adc)
 
 PixelDigi (int row, int col, int adc, int flag)
 
 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:80
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:54
unsigned short adc() const
Definition: PixelDigi.h:64
void init(int row, int col, int adc, int flag=0)
Definition: PixelDigi.h:31
int col
Definition: cuy.py:1009
PixelDigi::PixelDigi ( int  row,
int  col,
int  adc,
int  flag 
)
inline

Definition at line 22 of file PixelDigi.h.

References init().

22 { init(row, col, adc, flag); }
int row() const
Definition: PixelDigi.h:54
unsigned short adc() const
Definition: PixelDigi.h:64
void init(int row, int col, int adc, int flag=0)
Definition: PixelDigi.h:31
int flag() const
Definition: PixelDigi.h:61
int col
Definition: cuy.py:1009
PixelDigi::PixelDigi ( int  chan,
int  adc 
)
inline

Definition at line 24 of file PixelDigi.h.

References channelToPixel(), and init().

24  {
25  std::pair<int, int> rc = channelToPixel(chan);
26  init(rc.first, rc.second, adc);
27  }
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:69
tuple chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, &quot;NDC&quot;) lumi.SetBorderSize( 0 ) lumi...
unsigned short adc() const
Definition: PixelDigi.h:64
void init(int row, int col, int adc, int flag=0)
Definition: PixelDigi.h:31
PixelDigi::PixelDigi ( )
inline

Definition at line 29 of file PixelDigi.h.

29 : theData(0) {}
PackedDigiType theData
Definition: PixelDigi.h:80

Member Function Documentation

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

Definition at line 77 of file PixelDigi.h.

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

Referenced by operator<<().

int row() const
Definition: PixelDigi.h:54
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 69 of file PixelDigi.h.

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

Referenced by PixelDigitizerAlgorithm::add_cross_talk(), Phase2TrackerDigitizerAlgorithm::add_cross_talk(), cms::Phase2TrackerDigitizer::addPixelCollection(), TrackerHitAssociator::associatePixelRecHit(), SiPixelChargeReweightingAlgorithm::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().

69  {
72  return std::pair<int, int>(row, col);
73  }
int row() const
Definition: PixelDigi.h:54
static constexpr Packing thePacking
int col
Definition: cuy.py:1009
int PixelDigi::column ( ) const
inline
int PixelDigi::flag ( ) const
inline

Definition at line 61 of file PixelDigi.h.

References pixelchannelidentifierimpl::Packing::flag_mask, theData, and PixelChannelIdentifier::thePacking.

Referenced by init().

61  {
63  }
static constexpr Packing thePacking
PackedDigiType theData
Definition: PixelDigi.h:80
void PixelDigi::init ( int  row,
int  col,
int  adc,
int  flag = 0 
)
inline

Definition at line 31 of file PixelDigi.h.

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

Referenced by PixelDigi().

31  {
32 #ifdef FIXME_DEBUG
33  // This check is for the maximal row or col number that can be packed
34  // in a PixelDigi. The actual number of rows or columns in a detector
35  // may be smaller!
36  // it is done much better in Raw2Digi...
37  if (row < 0 || row > PixelChannelIdentifier::thePacking.max_row || col < 0 ||
39  std::cout << "PixelDigi constructor: row or column out packing range " << row << ' ' << col << std::endl;
40  }
41 #endif
42 
43  // Set adc to max_adc in case of overflow
45  : std::max(adc, 0);
46 
48  (col << PixelChannelIdentifier::thePacking.column_shift) |
51  }
int row() const
Definition: PixelDigi.h:54
static constexpr Packing thePacking
unsigned short adc() const
Definition: PixelDigi.h:64
int flag() const
Definition: PixelDigi.h:61
tuple cout
Definition: gather_cfg.py:144
int col
Definition: cuy.py:1009
PackedDigiType theData
Definition: PixelDigi.h:80
PackedDigiType PixelDigi::packedData ( ) const
inline

Definition at line 67 of file PixelDigi.h.

References theData.

Referenced by operator<().

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

Member Data Documentation

PackedDigiType PixelDigi::theData
private

Definition at line 80 of file PixelDigi.h.

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