Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
DataFormats
SiPixelDetId
src
PixelChannelIdentifier.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/SiPixelDetId/interface/PixelChannelIdentifier.h
"
4
5
#include <iostream>
6
#include <algorithm>
7
8
9
PixelChannelIdentifier::Packing::Packing
(
const
int
row_w,
const
int
column_w,
10
const
int
time_w,
const
int
adc_w) :
11
row_width(row_w), column_width(column_w), adc_width(adc_w)
12
{
13
// Constructor: pre-computes masks and shifts from field widths
14
// Order of fields (from right to left) is
15
// row, column, time, adc count.
16
17
if
( row_w+column_w+time_w+adc_w != 32) {
18
std::cout
<< std::endl <<
"Warning in PixelDigi::Packing constructor:"
19
<<
"sum of field widths != 32"
<< std::endl;
20
}
21
// Fields are counted from right to left!
22
23
row_shift
= 0;
24
column_shift
=
row_shift
+ row_w;
25
time_shift
=
column_shift
+ column_w;
26
adc_shift
=
time_shift
+ time_w;
27
28
row_mask
= ~(~0 << row_w);
29
column_mask
= ~(~0 << column_w);
30
time_mask
= ~(~0 << time_w);
31
adc_mask
= ~(~0 << adc_w);
32
33
max_row
=
row_mask
;
34
max_column
=
column_mask
;
35
max_adc
=
adc_mask
;
36
37
}
38
39
/*
40
// Extract from CMSIM manual (version Thu Jul 31 16:38:50 MET DST 1997)
41
// --------------------------------------------------------------------
42
// DIGI format for pixel
43
//
44
// For pixel digitization one word per fired pixel is used.
45
// The information includes pixel row and column number, time
46
// and charge information with 7, 9, 4 and 12 bits for each as shown below.
47
//
48
// :DETD :TRAK :PXBD 4 #. no. of digitization elements
49
// #. name no. bits
50
// :V 7 #. row number
51
// :W 9 #. column number
52
// :TIME 4 #. time (ns)
53
// :ADC 12 #. charge
54
//
55
// MODIFY 19.02.2002 for ORCA_6
56
// Change to enable 100micron row pixels, we than have 160 pixels in the v
57
// direction.
58
// #. name no. bits
59
// :V 8 #. row number (256)
60
// :W 9 #. column number (512)
61
// :TIME 4 #. time (ns) (16)
62
// :ADC 11 #. charge (2048)
63
*/
64
65
// Initialization of static data members - DEFINES DIGI PACKING !
66
PixelChannelIdentifier::Packing
PixelChannelIdentifier::thePacking
( 8, 9, 4, 11);
// row, col, time, adc
PixelChannelIdentifier::Packing::row_mask
PackedDigiType row_mask
Definition:
PixelChannelIdentifier.h:42
PixelChannelIdentifier::Packing::max_adc
int max_adc
Definition:
PixelChannelIdentifier.h:51
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::Packing::time_mask
PackedDigiType time_mask
Definition:
PixelChannelIdentifier.h:41
PixelChannelIdentifier::Packing::row_shift
int row_shift
Definition:
PixelChannelIdentifier.h:37
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.h
PixelChannelIdentifier::Packing::adc_shift
int adc_shift
Definition:
PixelChannelIdentifier.h:35
PixelChannelIdentifier::Packing
Definition:
PixelChannelIdentifier.h:27
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
PixelChannelIdentifier::Packing::adc_mask
PackedDigiType adc_mask
Definition:
PixelChannelIdentifier.h:40
PixelChannelIdentifier::Packing::column_shift
int column_shift
Definition:
PixelChannelIdentifier.h:38
Generated for CMSSW Reference Manual by
1.8.5