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
 
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

◆ ChannelType

typedef unsigned int PixelDigi::ChannelType

Definition at line 17 of file PixelDigi.h.

◆ PackedDigiType

typedef unsigned int PixelDigi::PackedDigiType

Definition at line 16 of file PixelDigi.h.

Constructor & Destructor Documentation

◆ PixelDigi() [1/5]

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() [2/5]

PixelDigi::PixelDigi ( int  row,
int  col,
int  adc 
)
inline

Definition at line 21 of file PixelDigi.h.

References adc(), cuy::col, init(), and row().

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

◆ PixelDigi() [3/5]

PixelDigi::PixelDigi ( int  row,
int  col,
int  adc,
int  flag 
)
inline

Definition at line 22 of file PixelDigi.h.

References adc(), cuy::col, flag(), init(), and row().

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

◆ PixelDigi() [4/5]

PixelDigi::PixelDigi ( int  chan,
int  adc 
)
inline

Definition at line 24 of file PixelDigi.h.

References adc(), officialStyle::chan, 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
unsigned short adc() const
Definition: PixelDigi.h:64
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
void init(int row, int col, int adc, int flag=0)
Definition: PixelDigi.h:31

◆ PixelDigi() [5/5]

PixelDigi::PixelDigi ( )
inline

Definition at line 29 of file PixelDigi.h.

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

Member Function Documentation

◆ adc()

unsigned short PixelDigi::adc ( ) const
inline

◆ channel()

int PixelDigi::channel ( ) const
inline

Definition at line 77 of file PixelDigi.h.

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

Referenced by operator<<().

int column() const
Definition: PixelDigi.h:57
static int pixelToChannel(int row, int col)
int row() const
Definition: PixelDigi.h:54

◆ channelToPixel()

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(), PixelDigitizerAlgorithm::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  }
static constexpr Packing thePacking
col
Definition: cuy.py:1009
int row() const
Definition: PixelDigi.h:54

◆ column()

int PixelDigi::column ( ) const
inline

◆ flag()

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(), and PixelDigi().

61  {
63  }
static constexpr Packing thePacking
PackedDigiType theData
Definition: PixelDigi.h:80

◆ init()

void PixelDigi::init ( int  row,
int  col,
int  adc,
int  flag = 0 
)
inline

Definition at line 31 of file PixelDigi.h.

References adc(), pixelchannelidentifierimpl::Packing::adc_shift, cuy::col, gather_cfg::cout, flag(), SiStripPI::max, pixelchannelidentifierimpl::Packing::max_adc, row(), 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 flag() const
Definition: PixelDigi.h:61
unsigned short adc() const
Definition: PixelDigi.h:64
static constexpr Packing thePacking
col
Definition: cuy.py:1009
int row() const
Definition: PixelDigi.h:54
PackedDigiType theData
Definition: PixelDigi.h:80

◆ packedData()

PackedDigiType PixelDigi::packedData ( ) const
inline

Definition at line 67 of file PixelDigi.h.

References theData.

67 { return theData; }
PackedDigiType theData
Definition: PixelDigi.h:80

◆ pixelToChannel()

static int PixelDigi::pixelToChannel ( int  row,
int  col 
)
inlinestatic

◆ row()

int PixelDigi::row ( ) const
inline

Member Data Documentation

◆ theData

PackedDigiType PixelDigi::theData
private

Definition at line 80 of file PixelDigi.h.

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