00001 // Modify the pixel packing to make 100micron pixels possible. d.k. 2/02 00002 // 00003 #include "DataFormats/SiPixelDetId/interface/PixelChannelIdentifier.h" 00004 00005 #include <iostream> 00006 #include <algorithm> 00007 00008 00009 PixelChannelIdentifier::Packing::Packing(const int row_w, const int column_w, 00010 const int time_w, const int adc_w) : 00011 row_width(row_w), column_width(column_w), adc_width(adc_w) 00012 { 00013 // Constructor: pre-computes masks and shifts from field widths 00014 // Order of fields (from right to left) is 00015 // row, column, time, adc count. 00016 00017 if ( row_w+column_w+time_w+adc_w != 32) { 00018 std::cout << std::endl << "Warning in PixelDigi::Packing constructor:" 00019 << "sum of field widths != 32" << std::endl; 00020 } 00021 // Fields are counted from right to left! 00022 00023 row_shift = 0; 00024 column_shift = row_shift + row_w; 00025 time_shift = column_shift + column_w; 00026 adc_shift = time_shift + time_w; 00027 00028 row_mask = ~(~0 << row_w); 00029 column_mask = ~(~0 << column_w); 00030 time_mask = ~(~0 << time_w); 00031 adc_mask = ~(~0 << adc_w); 00032 00033 max_row = row_mask; 00034 max_column = column_mask; 00035 max_adc = adc_mask; 00036 00037 } 00038 00039 /* 00040 // Extract from CMSIM manual (version Thu Jul 31 16:38:50 MET DST 1997) 00041 // -------------------------------------------------------------------- 00042 // DIGI format for pixel 00043 // 00044 // For pixel digitization one word per fired pixel is used. 00045 // The information includes pixel row and column number, time 00046 // and charge information with 7, 9, 4 and 12 bits for each as shown below. 00047 // 00048 // :DETD :TRAK :PXBD 4 #. no. of digitization elements 00049 // #. name no. bits 00050 // :V 7 #. row number 00051 // :W 9 #. column number 00052 // :TIME 4 #. time (ns) 00053 // :ADC 12 #. charge 00054 // 00055 // MODIFY 19.02.2002 for ORCA_6 00056 // Change to enable 100micron row pixels, we than have 160 pixels in the v 00057 // direction. 00058 // #. name no. bits 00059 // :V 8 #. row number (256) 00060 // :W 9 #. column number (512) 00061 // :TIME 4 #. time (ns) (16) 00062 // :ADC 11 #. charge (2048) 00063 */ 00064 00065 // Initialization of static data members - DEFINES DIGI PACKING ! 00066 PixelChannelIdentifier::Packing PixelChannelIdentifier::thePacking( 8, 9, 4, 11); // row, col, time, adc