Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
DataFormats
SiPixelDigi
src
PixelDigi.cc
Go to the documentation of this file.
1
// Modify the pixel packing to make 100micron pixels possible. d.k. 2/02
2
//
3
#include "
DataFormats/SiPixelDigi/interface/PixelDigi.h
"
4
5
#include <algorithm>
6
7
void
PixelDigi::init
(
int
row
,
int
col
,
int
adc
) {
8
// This check is for the maximal row or col number that can be packed
9
// in a PixelDigi. The actual number of rows or columns in a detector
10
// may be smaller!
11
if
( row < 0 || row >
PixelChannelIdentifier::thePacking
.max_row ||
12
col < 0 || col >
PixelChannelIdentifier::thePacking
.max_column) {
13
std::cout
<<
"PixelDigi constructor: row or column out packing range"
<< std::endl;
14
}
15
16
// Set adc to max_adc in case of overflow
17
adc = (adc >
PixelChannelIdentifier::thePacking
.
max_adc
) ?
PixelChannelIdentifier::thePacking
.max_adc :
std::max
(adc,0);
18
19
theData
= (row <<
PixelChannelIdentifier::thePacking
.
row_shift
) |
20
(col <<
PixelChannelIdentifier::thePacking
.column_shift) |
21
(adc <<
PixelChannelIdentifier::thePacking
.
adc_shift
);
22
}
23
ecalMGPA::adc
int adc(sample_type sample)
get the ADC sample (12 bits)
Definition:
EcalMGPASample.h:11
PixelChannelIdentifier::Packing::max_adc
int max_adc
Definition:
PixelChannelIdentifier.h:51
PixelChannelIdentifier::thePacking
static Packing thePacking
Definition:
PixelChannelIdentifier.h:55
PixelDigi.h
PixelChannelIdentifier::Packing::row_shift
int row_shift
Definition:
PixelChannelIdentifier.h:37
max
const T & max(const T &a, const T &b)
Definition:
MaterialBudgetTrackerHistos.cc:4
SiPixelCalibDigi::row
uint16_t row() const
Definition:
SiPixelCalibDigi.h:30
PixelDigi::init
void init(int row, int col, int adc)
Definition:
PixelDigi.cc:7
PixelChannelIdentifier::Packing::adc_shift
int adc_shift
Definition:
PixelChannelIdentifier.h:35
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
cuy.col
int col
Definition:
cuy.py:1008
PixelDigi::theData
PackedDigiType theData
Definition:
PixelDigi.h:54
Generated for CMSSW Reference Manual by
1.8.5