#include <DataFormats/SiPixelDigi/interface/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 () | |
PixelDigi (int chan, int adc) | |
PixelDigi (int row, int col, int adc) | |
PixelDigi (int packed_value) | |
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 |
Definition at line 13 of file PixelDigi.h.
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.
PixelDigi::PixelDigi | ( | int | packed_value | ) | [inline] |
Definition at line 25 of file PixelDigi.h.
References channelToPixel(), and init().
00025 { 00026 std::pair<int,int> rc = channelToPixel(chan); 00027 init( rc.first, rc.second, adc); 00028 }
PixelDigi::PixelDigi | ( | ) | [inline] |
unsigned short PixelDigi::adc | ( | ) | const [inline] |
Definition at line 38 of file PixelDigi.h.
References theData, and PixelChannelIdentifier::thePacking.
Referenced by PixelDataFormatter::digi2word(), operator<<(), PixelDataFormatter::print(), and VisPixelDigiTwig::update().
00038 {return (theData >> PixelChannelIdentifier::thePacking.adc_shift) & PixelChannelIdentifier::thePacking.adc_mask;}
int PixelDigi::channel | ( | ) | const [inline] |
Definition at line 51 of file PixelDigi.h.
References column(), PixelChannelIdentifier::pixelToChannel(), and row().
Referenced by operator<(), and operator<<().
00051 {return PixelChannelIdentifier::pixelToChannel( row(), column());}
Definition at line 41 of file PixelDigi.h.
References parsecf::pyparsing::col(), row(), and PixelChannelIdentifier::thePacking.
Referenced by TrackerHitAssociator::associatePixelRecHit(), SiPixelDigitizerAlgorithm::induce_signal(), SiPixelDigitizerAlgorithm::make_digis(), SiPixelDigitizerAlgorithm::module_killing_conf(), SiPixelDigitizerAlgorithm::pixel_inefficiency(), SiPixelDigitizerAlgorithm::pixel_inefficiency_db(), and PixelDigi().
00041 { 00042 int row = ( ch >> PixelChannelIdentifier::thePacking.column_width) & PixelChannelIdentifier::thePacking.row_mask; 00043 int col = ch & PixelChannelIdentifier::thePacking.column_mask; 00044 return std::pair<int,int>(row,col); 00045 }
int PixelDigi::column | ( | ) | const [inline] |
Definition at line 36 of file PixelDigi.h.
References theData, and PixelChannelIdentifier::thePacking.
Referenced by channel(), PixelDataFormatter::digi2word(), PixelDataFormatter::print(), and VisPixelDigiTwig::update().
00036 {return (theData >> PixelChannelIdentifier::thePacking.column_shift) & PixelChannelIdentifier::thePacking.column_mask;}
Definition at line 7 of file PixelDigi.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), max, theData, and PixelChannelIdentifier::thePacking.
Referenced by PixelDigi().
00007 { 00008 // This check is for the maximal row or col number that can be packed 00009 // in a PixelDigi. The actual number of rows or columns in a detector 00010 // may be smaller! 00011 if ( row < 0 || row > PixelChannelIdentifier::thePacking.max_row || 00012 col < 0 || col > PixelChannelIdentifier::thePacking.max_column) { 00013 std::cout << "PixelDigi constructor: row or column out packing range" << std::endl; 00014 } 00015 00016 // Set adc to max_adc in case of overflow 00017 adc = (adc > PixelChannelIdentifier::thePacking.max_adc) ? PixelChannelIdentifier::thePacking.max_adc : std::max(adc,0); 00018 00019 theData = (row << PixelChannelIdentifier::thePacking.row_shift) | 00020 (col << PixelChannelIdentifier::thePacking.column_shift) | 00021 (adc << PixelChannelIdentifier::thePacking.adc_shift); 00022 }
PackedDigiType PixelDigi::packedData | ( | ) | const [inline] |
Definition at line 47 of file PixelDigi.h.
References PixelChannelIdentifier::thePacking.
Referenced by SiPixelDigitizerAlgorithm::add_noise(), and SiPixelDigitizerAlgorithm::induce_signal().
00047 { 00048 return (row << PixelChannelIdentifier::thePacking.column_width) | col; 00049 }
int PixelDigi::row | ( | ) | const [inline] |
Definition at line 35 of file PixelDigi.h.
References theData, and PixelChannelIdentifier::thePacking.
Referenced by channel(), channelToPixel(), PixelDataFormatter::digi2word(), PixelDataFormatter::print(), and VisPixelDigiTwig::update().
00035 {return (theData >> PixelChannelIdentifier::thePacking.row_shift) & PixelChannelIdentifier::thePacking.row_mask;}
PackedDigiType PixelDigi::theData [private] |
Definition at line 54 of file PixelDigi.h.
Referenced by adc(), column(), init(), packedData(), and row().