Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
DataFormats
SiPixelDetId
interface
PixelChannelIdentifier.h
Go to the documentation of this file.
1
#ifndef DATAFORMATS_PIXELCHANMNELIDENTIFIER_H
2
#define DATAFORMATS_PIXELCHANMNELIDENTIFIER_H
3
4
#include <utility>
5
6
class
PixelChannelIdentifier
{
7
public
:
8
9
typedef
unsigned
int
PackedDigiType
;
10
typedef
unsigned
int
ChannelType
;
11
12
static
std::pair<int,int>
channelToPixel
(
int
ch) {
13
int
row = ( ch >>
thePacking
.
column_width
) &
thePacking
.
row_mask
;
14
int
col = ch &
thePacking
.
column_mask
;
15
return
std::pair<int,int>(row,col);
16
}
17
18
static
int
pixelToChannel
(
int
row,
int
col) {
19
return
(row <<
thePacking
.
column_width
) | col;
20
}
21
22
private
:
27
class
Packing
{
28
public
:
29
30
// Constructor: pre-computes masks and shifts from field widths
31
Packing
(
const
int
row_w,
const
int
column_w,
32
const
int
time_w,
const
int
adc_w);
33
34
// public data:
35
int
adc_shift
;
36
int
time_shift
;
37
int
row_shift
;
38
int
column_shift
;
39
40
PackedDigiType
adc_mask
;
41
PackedDigiType
time_mask
;
42
PackedDigiType
row_mask
;
43
PackedDigiType
column_mask
;
44
45
int
row_width
;
46
int
column_width
;
47
int
adc_width
;
48
49
int
max_row
;
50
int
max_column
;
51
int
max_adc
;
52
};
53
54
public
:
55
static
Packing
thePacking
;
56
};
57
58
59
#endif
PixelChannelIdentifier::Packing::row_mask
PackedDigiType row_mask
Definition:
PixelChannelIdentifier.h:42
PixelChannelIdentifier::Packing::max_adc
int max_adc
Definition:
PixelChannelIdentifier.h:51
PixelChannelIdentifier::Packing::row_width
int row_width
Definition:
PixelChannelIdentifier.h:45
PixelChannelIdentifier::Packing::column_mask
PackedDigiType column_mask
Definition:
PixelChannelIdentifier.h:43
PixelChannelIdentifier::Packing::time_shift
int time_shift
Definition:
PixelChannelIdentifier.h:36
PixelChannelIdentifier::Packing::max_column
int max_column
Definition:
PixelChannelIdentifier.h:50
PixelChannelIdentifier::thePacking
static Packing thePacking
Definition:
PixelChannelIdentifier.h:55
PixelChannelIdentifier::channelToPixel
static std::pair< int, int > channelToPixel(int ch)
Definition:
PixelChannelIdentifier.h:12
PixelChannelIdentifier::Packing::column_width
int column_width
Definition:
PixelChannelIdentifier.h:46
PixelChannelIdentifier
Definition:
PixelChannelIdentifier.h:6
PixelChannelIdentifier::Packing::time_mask
PackedDigiType time_mask
Definition:
PixelChannelIdentifier.h:41
PixelChannelIdentifier::Packing::row_shift
int row_shift
Definition:
PixelChannelIdentifier.h:37
PixelChannelIdentifier::PackedDigiType
unsigned int PackedDigiType
Definition:
PixelChannelIdentifier.h:9
PixelChannelIdentifier::Packing::max_row
int max_row
Definition:
PixelChannelIdentifier.h:49
PixelChannelIdentifier::Packing::Packing
Packing(const int row_w, const int column_w, const int time_w, const int adc_w)
Definition:
PixelChannelIdentifier.cc:9
PixelChannelIdentifier::Packing::adc_width
int adc_width
Definition:
PixelChannelIdentifier.h:47
PixelChannelIdentifier::Packing::adc_shift
int adc_shift
Definition:
PixelChannelIdentifier.h:35
PixelChannelIdentifier::Packing
Definition:
PixelChannelIdentifier.h:27
PixelChannelIdentifier::pixelToChannel
static int pixelToChannel(int row, int col)
Definition:
PixelChannelIdentifier.h:18
PixelChannelIdentifier::Packing::adc_mask
PackedDigiType adc_mask
Definition:
PixelChannelIdentifier.h:40
PixelChannelIdentifier::Packing::column_shift
int column_shift
Definition:
PixelChannelIdentifier.h:38
PixelChannelIdentifier::ChannelType
unsigned int ChannelType
Definition:
PixelChannelIdentifier.h:10
Generated for CMSSW Reference Manual by
1.8.5