CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixelChannelIdentifier.cc
Go to the documentation of this file.
1 // Modify the pixel packing to make 100micron pixels possible. d.k. 2/02
2 //
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;
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
Packing(const int row_w, const int column_w, const int time_w, const int adc_w)
tuple cout
Definition: gather_cfg.py:121