CMS 3D CMS Logo

ESDetId.cc
Go to the documentation of this file.
3 
4 #include <ostream>
5 
7  int ixs,
8  int iys,
9  int plane,
10  int iz )
11 {
12  if( !validDetId( strip, ixs, iys, plane, iz) )
13  throw cms::Exception("InvalidDetId")
14  << "ESDetId: Cannot create object. Indexes out of bounds \n"
15  << " strip = " << strip << " x = " << ixs << " y = " << iys << "\n"
16  << " plane = " << plane << " z = " << iz
17  << " hxy = " << (1==plane?hxy1[ixs-1][iys-1]:hxy2[ixs-1][iys-1])
18  << "\n";
19 }
20 
21 bool
22 ESDetId::validDetId( int istrip,
23  int ixs,
24  int iys,
25  int iplane,
26  int iz )
27 {
28  return ( !( ( istrip < ISTRIP_MIN ) ||
29  ( istrip > ISTRIP_MAX ) ||
30  ( ixs < IX_MIN ) ||
31  ( ixs > IX_MAX ) ||
32  ( iys < IY_MIN ) ||
33  ( iys > IY_MAX ) ||
34  ( abs( iz ) != 1 ) ||
35  ( iplane < PLANE_MIN ) ||
36  ( iplane > PLANE_MAX ) ||
37  ( ( 1 == iplane ) &&
38  0 == hxy1[ixs-1][iys-1] ) ||
39  ( ( 2 == iplane ) &&
40  0 == hxy2[ixs-1][iys-1] ) ) ) ;
41 }
42 
43 int
45 {
46  const int ia ( 1 == zside() ? 2 : 1 ) ;
47  const int ib ( plane() ) ;
48  const int ix ( six() ) ;
49  const int iy ( siy() ) ;
50  const int ic ( 1 == ib ?
51  hxy1[ ix - 1 ][ iy - 1 ] :
52  hxy2[ ix - 1 ][ iy - 1 ] ) ;
53  const int id ( strip() ) ;
54 
55  return ( ( ia - 1 )*kLb +
56  ( ib - 1 )*kLc +
57  ( ic - 1 )*kLd +
58  id - 1 ) ;
59 }
60 
61 ESDetId
63 {
64  if( validHashIndex( hi ) )
65  {
66  const int id ( hi%kLd + 1 ) ;
67  const int nd ( hi - id + 1 ) ;
68  const int ic ( ( nd%kLc )/kLd + 1 ) ;
69  const int nc ( nd - ( ic - 1 )*kLd ) ;
70  const int ib ( ( nc%kLb )/kLc + 1 ) ;
71  const int nb ( nc - ( ib - 1 )*kLc ) ;
72  const int ia ( nb/kLb + 1 );// + 1 ) ;
73 
74  const int st ( id ) ;
75  const int pl ( ib ) ;
76  int ix ;
77  int iy ;
78  const int ic1 ( ic - 1 ) ;
79  if( 1 == pl )
80  {
81  ix = hx1[ ic1 ] ;
82  iy = hy1[ ic1 ] ;
83  }
84  else
85  {
86  ix = hx2[ ic1 ] ;
87  iy = hy2[ ic1 ] ;
88  }
89  const int iz ( 1 == ia ? -1 : 1 ) ;
90 
91  return ESDetId( st, ix, iy, pl, iz ) ;
92  }
93  else
94  {
95  return ESDetId() ;
96  }
97 }
98 
99 std::ostream& operator<<(std::ostream& s,const ESDetId& id)
100 {
101  return s << "(ES z=" << id.zside()
102  << " plane " << id.plane()
103  << " "
104  << id.six()
105  << ':'
106  << id.siy()
107  << " "
108  << id.strip()
109  << ')'
110  << " hashIndex = ";
111 // << id.hashedIndex() ;
112 }
113 
114 
115 const unsigned short ESDetId::hxy1[ kXMAX ][ kYMAX ] = {
116 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
117  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
118  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
119  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } , //1
120 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
121  0, 0, 0, 0, 1, 2, 3, 4, 5, 6,
122  7, 8, 9, 10, 11, 12, 0, 0, 0, 0,
123  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } , //2
124 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
125  0, 0, 13, 14, 15, 16, 17, 18, 19, 20,
126  21, 22, 23, 24, 25, 26, 27, 28, 0, 0,
127  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } , //3
128 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
129  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
130  40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
131  50, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ,
132 { 0, 0, 0, 0, 0, 0, 0, 0, 51, 52,
133  53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
134  63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
135  73, 74, 0, 0, 0, 0, 0, 0, 0, 0 } ,
136 { 0, 0, 0, 0, 0, 0, 0, 75, 76, 77,
137  78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
138  88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
139  98, 99, 100, 0, 0, 0, 0, 0, 0, 0 } ,//6
140 { 0, 0, 0, 0, 0, 0, 101, 102, 103, 104,
141  105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
142  115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
143  125, 126, 127, 128, 0, 0, 0, 0, 0, 0 } ,
144 { 0, 0, 0, 0, 129, 130, 131, 132, 133, 134,
145  135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
146  145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
147  155, 156, 157, 158, 159, 160, 0, 0, 0, 0 } ,
148 { 0, 0, 0, 0, 161, 162, 163, 164, 165, 166,
149  167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
150  177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
151  187, 188, 189, 190, 191, 192, 0, 0, 0, 0 } ,
152 { 0, 0, 0, 193, 194, 195, 196, 197, 198, 199,
153  200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
154  210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
155  220, 221, 222, 223, 224, 225, 226, 0, 0, 0 } ,//10
156 { 0, 0, 227, 228, 229, 230, 231, 232, 233, 234,
157  235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
158  245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
159  255, 256, 257, 258, 259, 260, 261, 262, 0, 0 } ,
160 { 0, 0, 263, 264, 265, 266, 267, 268, 269, 270,
161  271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
162  281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
163  291, 292, 293, 294, 295, 296, 297, 298, 0, 0 } ,
164 { 0, 0, 299, 300, 301, 302, 303, 304, 305, 306,
165  307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
166  317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
167  327, 328, 329, 330, 331, 332, 333, 334, 0, 0 } ,
168 { 0, 335, 336, 337, 338, 339, 340, 341, 342, 343,
169  344, 345, 346, 347, 348, 349, 350, 351, 0, 0,
170  0, 0, 352, 353, 354, 355, 356, 357, 358, 359,
171  360, 361, 362, 363, 364, 365, 366, 367, 368, 0 } ,
172 { 0, 369, 370, 371, 372, 373, 374, 375, 376, 377,
173  378, 379, 380, 381, 382, 383, 0, 0, 0, 0,
174  0, 0, 0, 0, 384, 385, 386, 387, 388, 389,
175  390, 391, 392, 393, 394, 395, 396, 397, 398, 0 } ,//15
176 { 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
177  409, 410, 411, 412, 413, 0, 0, 0, 0, 0,
178  0, 0, 0, 0, 0, 414, 415, 416, 417, 418,
179  419, 420, 421, 422, 423, 424, 425, 426, 427, 428 } ,
180 { 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
181  439, 440, 441, 442, 0, 0, 0, 0, 0, 0,
182  0, 0, 0, 0, 0, 0, 443, 444, 445, 446,
183  447, 448, 449, 450, 451, 452, 453, 454, 455, 456 } ,
184 { 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
185  467, 468, 469, 470, 0, 0, 0, 0, 0, 0,
186  0, 0, 0, 0, 0, 0, 471, 472, 473, 474,
187  475, 476, 477, 478, 479, 480, 481, 482, 483, 484 } ,
188 { 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
189  495, 496, 497, 0, 0, 0, 0, 0, 0, 0,
190  0, 0, 0, 0, 0, 0, 0, 498, 499, 500,
191  501, 502, 503, 504, 505, 506, 507, 508, 509, 510 } ,
192 { 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
193  521, 522, 523, 0, 0, 0, 0, 0, 0, 0,
194  0, 0, 0, 0, 0, 0, 0, 524, 525, 526,
195  527, 528, 529, 530, 531, 532, 533, 534, 535, 536 } ,
196 { 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
197  547, 548, 549, 0, 0, 0, 0, 0, 0, 0,
198  0, 0, 0, 0, 0, 0, 0, 550, 551, 552,
199  553, 554, 555, 556, 557, 558, 559, 560, 561, 562 } ,
200 { 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
201  573, 574, 575, 0, 0, 0, 0, 0, 0, 0,
202  0, 0, 0, 0, 0, 0, 0, 576, 577, 578,
203  579, 580, 581, 582, 583, 584, 585, 586, 587, 588 } ,
204 { 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
205  599, 600, 601, 602, 0, 0, 0, 0, 0, 0,
206  0, 0, 0, 0, 0, 0, 603, 604, 605, 606,
207  607, 608, 609, 610, 611, 612, 613, 614, 615, 616 } ,
208 { 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
209  627, 628, 629, 630, 0, 0, 0, 0, 0, 0,
210  0, 0, 0, 0, 0, 0, 631, 632, 633, 634,
211  635, 636, 637, 638, 639, 640, 641, 642, 643, 644 } ,
212 { 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
213  655, 656, 657, 658, 659, 0, 0, 0, 0, 0,
214  0, 0, 0, 0, 0, 660, 661, 662, 663, 664,
215  665, 666, 667, 668, 669, 670, 671, 672, 673, 674 } ,
216 { 0, 675, 676, 677, 678, 679, 680, 681, 682, 683,
217  684, 685, 686, 687, 688, 689, 0, 0, 0, 0,
218  0, 0, 0, 0, 690, 691, 692, 693, 694, 695,
219  696, 697, 698, 699, 700, 701, 702, 703, 704, 0 } ,
220 { 0, 705, 706, 707, 708, 709, 710, 711, 712, 713,
221  714, 715, 716, 717, 718, 719, 720, 721, 0, 0,
222  0, 0, 722, 723, 724, 725, 726, 727, 728, 729,
223  730, 731, 732, 733, 734, 735, 736, 737, 738, 0 } ,
224 { 0, 0, 739, 740, 741, 742, 743, 744, 745, 746,
225  747, 748, 749, 750, 751, 752, 753, 754, 755, 756,
226  757, 758, 759, 760, 761, 762, 763, 764, 765, 766,
227  767, 768, 769, 770, 771, 772, 773, 774, 0, 0 } ,
228 { 0, 0, 775, 776, 777, 778, 779, 780, 781, 782,
229  783, 784, 785, 786, 787, 788, 789, 790, 791, 792,
230  793, 794, 795, 796, 797, 798, 799, 800, 801, 802,
231  803, 804, 805, 806, 807, 808, 809, 810, 0, 0 } ,
232 { 0, 0, 811, 812, 813, 814, 815, 816, 817, 818,
233  819, 820, 821, 822, 823, 824, 825, 826, 827, 828,
234  829, 830, 831, 832, 833, 834, 835, 836, 837, 838,
235  839, 840, 841, 842, 843, 844, 845, 846, 0, 0 } ,
236 { 0, 0, 0, 847, 848, 849, 850, 851, 852, 853,
237  854, 855, 856, 857, 858, 859, 860, 861, 862, 863,
238  864, 865, 866, 867, 868, 869, 870, 871, 872, 873,
239  874, 875, 876, 877, 878, 879, 880, 0, 0, 0 } ,
240 { 0, 0, 0, 0, 881, 882, 883, 884, 885, 886,
241  887, 888, 889, 890, 891, 892, 893, 894, 895, 896,
242  897, 898, 899, 900, 901, 902, 903, 904, 905, 906,
243  907, 908, 909, 910, 911, 912, 0, 0, 0, 0 } ,
244 { 0, 0, 0, 0, 913, 914, 915, 916, 917, 918,
245  919, 920, 921, 922, 923, 924, 925, 926, 927, 928,
246  929, 930, 931, 932, 933, 934, 935, 936, 937, 938,
247  939, 940, 941, 942, 943, 944, 0, 0, 0, 0 } ,
248 { 0, 0, 0, 0, 0, 0, 945, 946, 947, 948,
249  949, 950, 951, 952, 953, 954, 955, 956, 957, 958,
250  959, 960, 961, 962, 963, 964, 965, 966, 967, 968,
251  969, 970, 971, 972, 0, 0, 0, 0, 0, 0 } ,
252 { 0, 0, 0, 0, 0, 0, 0, 973, 974, 975,
253  976, 977, 978, 979, 980, 981, 982, 983, 984, 985,
254  986, 987, 988, 989, 990, 991, 992, 993, 994, 995,
255  996, 997, 998, 0, 0, 0, 0, 0, 0, 0 } ,
256 { 0, 0, 0, 0, 0, 0, 0, 0, 999, 1000,
257  1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010,
258  1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020,
259  1021, 1022, 0, 0, 0, 0, 0, 0, 0, 0 } ,
260 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1023,
261  1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033,
262  1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043,
263  1044, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ,
264 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
265  0, 0, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052,
266  1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 0, 0,
267  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ,
268 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
269  0, 0, 0, 0, 1061, 1062, 1063, 1064, 1065, 1066,
270  1067, 1068, 1069, 1070, 1071, 1072, 0, 0, 0, 0,
271  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ,
272 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
273  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
274  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
275  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
276 };
277 
278 const unsigned short ESDetId::hxy2[ kXMAX ][ kYMAX ] = {
279 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
280  0, 0, 0, 0, 0, 1, 2, 3, 4, 5,
281  6, 7, 8, 9, 10, 0, 0, 0, 0, 0,
282  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ,
283 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
284  0, 0, 0, 11, 12, 13, 14, 15, 16, 17,
285  18, 19, 20, 21, 22, 23, 24, 0, 0, 0,
286  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ,
287 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
288  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
289  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
290  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ,
291 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 45,
292  46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
293  56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
294  66, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ,
295 { 0, 0, 0, 0, 0, 0, 0, 67, 68, 69,
296  70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
297  80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
298  90, 91, 92, 0, 0, 0, 0, 0, 0, 0 } ,
299 { 0, 0, 0, 0, 0, 0, 0, 93, 94, 95,
300  96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
301  106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
302  116, 117, 118, 0, 0, 0, 0, 0, 0, 0 } ,
303 { 0, 0, 0, 0, 0, 0, 119, 120, 121, 122,
304  123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
305  133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
306  143, 144, 145, 146, 0, 0, 0, 0, 0, 0 } ,
307 { 0, 0, 0, 0, 0, 147, 148, 149, 150, 151,
308  152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
309  162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
310  172, 173, 174, 175, 176, 0, 0, 0, 0, 0 } ,
311 { 0, 0, 0, 0, 177, 178, 179, 180, 181, 182,
312  183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
313  193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
314  203, 204, 205, 206, 207, 208, 0, 0, 0, 0 } ,
315 { 0, 0, 0, 209, 210, 211, 212, 213, 214, 215,
316  216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
317  226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
318  236, 237, 238, 239, 240, 241, 242, 0, 0, 0 } ,
319 { 0, 0, 0, 243, 244, 245, 246, 247, 248, 249,
320  250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
321  260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
322  270, 271, 272, 273, 274, 275, 276, 0, 0, 0 } ,
323 { 0, 0, 0, 277, 278, 279, 280, 281, 282, 283,
324  284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
325  294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
326  304, 305, 306, 307, 308, 309, 310, 0, 0, 0 } ,
327 { 0, 0, 311, 312, 313, 314, 315, 316, 317, 318,
328  319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
329  329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
330  339, 340, 341, 342, 343, 344, 345, 346, 0, 0 } ,
331 { 0, 0, 347, 348, 349, 350, 351, 352, 353, 354,
332  355, 356, 357, 358, 359, 360, 361, 362, 0, 0,
333  0, 0, 363, 364, 365, 366, 367, 368, 369, 370,
334  371, 372, 373, 374, 375, 376, 377, 378, 0, 0 } ,
335 { 0, 379, 380, 381, 382, 383, 384, 385, 386, 387,
336  388, 389, 390, 391, 392, 393, 0, 0, 0, 0,
337  0, 0, 0, 0, 394, 395, 396, 397, 398, 399,
338  400, 401, 402, 403, 404, 405, 406, 407, 408, 0 } ,
339 { 0, 409, 410, 411, 412, 413, 414, 415, 416, 417,
340  418, 419, 420, 421, 422, 0, 0, 0, 0, 0,
341  0, 0, 0, 0, 0, 423, 424, 425, 426, 427,
342  428, 429, 430, 431, 432, 433, 434, 435, 436, 0 } ,
343 { 0, 437, 438, 439, 440, 441, 442, 443, 444, 445,
344  446, 447, 448, 449, 0, 0, 0, 0, 0, 0,
345  0, 0, 0, 0, 0, 0, 450, 451, 452, 453,
346  454, 455, 456, 457, 458, 459, 460, 461, 462, 0 } ,
347 { 0, 463, 464, 465, 466, 467, 468, 469, 470, 471,
348  472, 473, 474, 475, 0, 0, 0, 0, 0, 0,
349  0, 0, 0, 0, 0, 0, 476, 477, 478, 479,
350  480, 481, 482, 483, 484, 485, 486, 487, 488, 0 } ,
351 { 0, 489, 490, 491, 492, 493, 494, 495, 496, 497,
352  498, 499, 500, 0, 0, 0, 0, 0, 0, 0,
353  0, 0, 0, 0, 0, 0, 0, 501, 502, 503,
354  504, 505, 506, 507, 508, 509, 510, 511, 512, 0 } ,
355 { 0, 513, 514, 515, 516, 517, 518, 519, 520, 521,
356  522, 523, 524, 0, 0, 0, 0, 0, 0, 0,
357  0, 0, 0, 0, 0, 0, 0, 525, 526, 527,
358  528, 529, 530, 531, 532, 533, 534, 535, 536, 0 } ,
359 { 0, 537, 538, 539, 540, 541, 542, 543, 544, 545,
360  546, 547, 548, 0, 0, 0, 0, 0, 0, 0,
361  0, 0, 0, 0, 0, 0, 0, 549, 550, 551,
362  552, 553, 554, 555, 556, 557, 558, 559, 560, 0 } ,
363 { 0, 561, 562, 563, 564, 565, 566, 567, 568, 569,
364  570, 571, 572, 0, 0, 0, 0, 0, 0, 0,
365  0, 0, 0, 0, 0, 0, 0, 573, 574, 575,
366  576, 577, 578, 579, 580, 581, 582, 583, 584, 0 } ,
367 { 0, 585, 586, 587, 588, 589, 590, 591, 592, 593,
368  594, 595, 596, 597, 0, 0, 0, 0, 0, 0,
369  0, 0, 0, 0, 0, 0, 598, 599, 600, 601,
370  602, 603, 604, 605, 606, 607, 608, 609, 610, 0 } ,
371 { 0, 611, 612, 613, 614, 615, 616, 617, 618, 619,
372  620, 621, 622, 623, 0, 0, 0, 0, 0, 0,
373  0, 0, 0, 0, 0, 0, 624, 625, 626, 627,
374  628, 629, 630, 631, 632, 633, 634, 635, 636, 0 } ,
375 { 0, 637, 638, 639, 640, 641, 642, 643, 644, 645,
376  646, 647, 648, 649, 650, 0, 0, 0, 0, 0,
377  0, 0, 0, 0, 0, 651, 652, 653, 654, 655,
378  656, 657, 658, 659, 660, 661, 662, 663, 664, 0 } ,
379 { 0, 665, 666, 667, 668, 669, 670, 671, 672, 673,
380  674, 675, 676, 677, 678, 679, 0, 0, 0, 0,
381  0, 0, 0, 0, 680, 681, 682, 683, 684, 685,
382  686, 687, 688, 689, 690, 691, 692, 693, 694, 0 } ,
383 { 0, 0, 695, 696, 697, 698, 699, 700, 701, 702,
384  703, 704, 705, 706, 707, 708, 709, 710, 0, 0,
385  0, 0, 711, 712, 713, 714, 715, 716, 717, 718,
386  719, 720, 721, 722, 723, 724, 725, 726, 0, 0 } ,
387 { 0, 0, 727, 728, 729, 730, 731, 732, 733, 734,
388  735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
389  745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
390  755, 756, 757, 758, 759, 760, 761, 762, 0, 0 } ,
391 { 0, 0, 0, 763, 764, 765, 766, 767, 768, 769,
392  770, 771, 772, 773, 774, 775, 776, 777, 778, 779,
393  780, 781, 782, 783, 784, 785, 786, 787, 788, 789,
394  790, 791, 792, 793, 794, 795, 796, 0, 0, 0 } ,
395 { 0, 0, 0, 797, 798, 799, 800, 801, 802, 803,
396  804, 805, 806, 807, 808, 809, 810, 811, 812, 813,
397  814, 815, 816, 817, 818, 819, 820, 821, 822, 823,
398  824, 825, 826, 827, 828, 829, 830, 0, 0, 0 } ,
399 { 0, 0, 0, 831, 832, 833, 834, 835, 836, 837,
400  838, 839, 840, 841, 842, 843, 844, 845, 846, 847,
401  848, 849, 850, 851, 852, 853, 854, 855, 856, 857,
402  858, 859, 860, 861, 862, 863, 864, 0, 0, 0 } ,
403 { 0, 0, 0, 0, 865, 866, 867, 868, 869, 870,
404  871, 872, 873, 874, 875, 876, 877, 878, 879, 880,
405  881, 882, 883, 884, 885, 886, 887, 888, 889, 890,
406  891, 892, 893, 894, 895, 896, 0, 0, 0, 0 } ,
407 { 0, 0, 0, 0, 0, 897, 898, 899, 900, 901,
408  902, 903, 904, 905, 906, 907, 908, 909, 910, 911,
409  912, 913, 914, 915, 916, 917, 918, 919, 920, 921,
410  922, 923, 924, 925, 926, 0, 0, 0, 0, 0 } ,
411 { 0, 0, 0, 0, 0, 0, 927, 928, 929, 930,
412  931, 932, 933, 934, 935, 936, 937, 938, 939, 940,
413  941, 942, 943, 944, 945, 946, 947, 948, 949, 950,
414  951, 952, 953, 954, 0, 0, 0, 0, 0, 0 } ,
415 { 0, 0, 0, 0, 0, 0, 0, 955, 956, 957,
416  958, 959, 960, 961, 962, 963, 964, 965, 966, 967,
417  968, 969, 970, 971, 972, 973, 974, 975, 976, 977,
418  978, 979, 980, 0, 0, 0, 0, 0, 0, 0 } ,
419 { 0, 0, 0, 0, 0, 0, 0, 981, 982, 983,
420  984, 985, 986, 987, 988, 989, 990, 991, 992, 993,
421  994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003,
422  1004, 1005, 1006, 0, 0, 0, 0, 0, 0, 0 } ,
423 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1007,
424  1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017,
425  1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027,
426  1028, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ,
427 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
428  1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038,
429  1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048,
430  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ,
431 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
432  0, 0, 0, 1049, 1050, 1051, 1052, 1053, 1054, 1055,
433  1056, 1057, 1058, 1059, 1060, 1061, 1062, 0, 0, 0,
434  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ,
435 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
436  0, 0, 0, 0, 0, 1063, 1064, 1065, 1066, 1067,
437  1068, 1069, 1070, 1071, 1072, 0, 0, 0, 0, 0,
438  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
439 };
440 
441 const unsigned short ESDetId::hx1[ kXYMAX ] = {
442  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443  2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
444  3, 3, 3, 3, 3, 3, 3, 3, 4, 4,
445  4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
446  4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
447  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
448  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
449  5, 5, 5, 5, 6, 6, 6, 6, 6, 6,
450  6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
451  6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
452  7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
453  7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
454  7, 7, 7, 7, 7, 7, 7, 7, 8, 8,
455  8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
456  8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
457  8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
458  9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
459  9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
460  9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
461  9, 9, 10, 10, 10, 10, 10, 10, 10, 10,
462  10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
463  10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
464  10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
465  11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
466  11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
467  11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
468  11, 11, 12, 12, 12, 12, 12, 12, 12, 12,
469  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
470  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
471  12, 12, 12, 12, 12, 12, 12, 12, 13, 13,
472  13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
473  13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
474  13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
475  13, 13, 13, 13, 14, 14, 14, 14, 14, 14,
476  14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
477  14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
478  14, 14, 14, 14, 14, 14, 14, 14, 15, 15,
479  15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
480  15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
481  15, 15, 15, 15, 15, 15, 15, 15, 16, 16,
482  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
483  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
484  16, 16, 16, 16, 16, 16, 16, 16, 17, 17,
485  17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
486  17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
487  17, 17, 17, 17, 17, 17, 18, 18, 18, 18,
488  18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
489  18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
490  18, 18, 18, 18, 19, 19, 19, 19, 19, 19,
491  19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
492  19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
493  20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
494  20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
495  20, 20, 20, 20, 20, 20, 21, 21, 21, 21,
496  21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
497  21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
498  21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
499  22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
500  22, 22, 22, 22, 22, 22, 22, 22, 23, 23,
501  23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
502  23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
503  23, 23, 23, 23, 23, 23, 24, 24, 24, 24,
504  24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
505  24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
506  24, 24, 24, 24, 25, 25, 25, 25, 25, 25,
507  25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
508  25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
509  25, 25, 25, 25, 26, 26, 26, 26, 26, 26,
510  26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
511  26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
512  26, 26, 26, 26, 27, 27, 27, 27, 27, 27,
513  27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
514  27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
515  27, 27, 27, 27, 27, 27, 27, 27, 28, 28,
516  28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
517  28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
518  28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
519  28, 28, 28, 28, 29, 29, 29, 29, 29, 29,
520  29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
521  29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
522  29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
523  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
524  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
525  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
526  30, 30, 30, 30, 30, 30, 31, 31, 31, 31,
527  31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
528  31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
529  31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
530  32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
531  32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
532  32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
533  32, 32, 33, 33, 33, 33, 33, 33, 33, 33,
534  33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
535  33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
536  33, 33, 33, 33, 34, 34, 34, 34, 34, 34,
537  34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
538  34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
539  34, 34, 35, 35, 35, 35, 35, 35, 35, 35,
540  35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
541  35, 35, 35, 35, 35, 35, 35, 35, 36, 36,
542  36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
543  36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
544  36, 36, 37, 37, 37, 37, 37, 37, 37, 37,
545  37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
546  37, 37, 37, 37, 38, 38, 38, 38, 38, 38,
547  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
548  39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
549  39, 39
550 };
551 
552 const unsigned short ESDetId::hy1[ kXYMAX ] = {
553  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
554  25, 26, 13, 14, 15, 16, 17, 18, 19, 20,
555  21, 22, 23, 24, 25, 26, 27, 28, 10, 11,
556  12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
557  22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
558  9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
559  19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
560  29, 30, 31, 32, 8, 9, 10, 11, 12, 13,
561  14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
562  24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
563  7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
564  17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
565  27, 28, 29, 30, 31, 32, 33, 34, 5, 6,
566  7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
567  17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
568  27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
569  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
570  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
571  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
572  35, 36, 4, 5, 6, 7, 8, 9, 10, 11,
573  12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
574  22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
575  32, 33, 34, 35, 36, 37, 3, 4, 5, 6,
576  7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
577  17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
578  27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
579  37, 38, 3, 4, 5, 6, 7, 8, 9, 10,
580  11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
581  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
582  31, 32, 33, 34, 35, 36, 37, 38, 3, 4,
583  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
584  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
585  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
586  35, 36, 37, 38, 2, 3, 4, 5, 6, 7,
587  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
588  18, 23, 24, 25, 26, 27, 28, 29, 30, 31,
589  32, 33, 34, 35, 36, 37, 38, 39, 2, 3,
590  4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
591  14, 15, 16, 25, 26, 27, 28, 29, 30, 31,
592  32, 33, 34, 35, 36, 37, 38, 39, 1, 2,
593  3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
594  13, 14, 15, 26, 27, 28, 29, 30, 31, 32,
595  33, 34, 35, 36, 37, 38, 39, 40, 1, 2,
596  3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
597  13, 14, 27, 28, 29, 30, 31, 32, 33, 34,
598  35, 36, 37, 38, 39, 40, 1, 2, 3, 4,
599  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
600  27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
601  37, 38, 39, 40, 1, 2, 3, 4, 5, 6,
602  7, 8, 9, 10, 11, 12, 13, 28, 29, 30,
603  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
604  1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
605  11, 12, 13, 28, 29, 30, 31, 32, 33, 34,
606  35, 36, 37, 38, 39, 40, 1, 2, 3, 4,
607  5, 6, 7, 8, 9, 10, 11, 12, 13, 28,
608  29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
609  39, 40, 1, 2, 3, 4, 5, 6, 7, 8,
610  9, 10, 11, 12, 13, 28, 29, 30, 31, 32,
611  33, 34, 35, 36, 37, 38, 39, 40, 1, 2,
612  3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
613  13, 14, 27, 28, 29, 30, 31, 32, 33, 34,
614  35, 36, 37, 38, 39, 40, 1, 2, 3, 4,
615  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
616  27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
617  37, 38, 39, 40, 1, 2, 3, 4, 5, 6,
618  7, 8, 9, 10, 11, 12, 13, 14, 15, 26,
619  27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
620  37, 38, 39, 40, 2, 3, 4, 5, 6, 7,
621  8, 9, 10, 11, 12, 13, 14, 15, 16, 25,
622  26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
623  36, 37, 38, 39, 2, 3, 4, 5, 6, 7,
624  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
625  18, 23, 24, 25, 26, 27, 28, 29, 30, 31,
626  32, 33, 34, 35, 36, 37, 38, 39, 3, 4,
627  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
628  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
629  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
630  35, 36, 37, 38, 3, 4, 5, 6, 7, 8,
631  9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
632  19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
633  29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
634  3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
635  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
636  23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
637  33, 34, 35, 36, 37, 38, 4, 5, 6, 7,
638  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
639  18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
640  28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
641  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
642  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
643  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
644  35, 36, 5, 6, 7, 8, 9, 10, 11, 12,
645  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
646  23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
647  33, 34, 35, 36, 7, 8, 9, 10, 11, 12,
648  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
649  23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
650  33, 34, 8, 9, 10, 11, 12, 13, 14, 15,
651  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
652  26, 27, 28, 29, 30, 31, 32, 33, 9, 10,
653  11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
654  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
655  31, 32, 10, 11, 12, 13, 14, 15, 16, 17,
656  18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
657  28, 29, 30, 31, 13, 14, 15, 16, 17, 18,
658  19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
659  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
660  25, 26
661 };
662 
663 const unsigned short ESDetId::hx2[ kXYMAX ] = {
664  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
665  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
666  2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
667  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
668  3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
669  4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
670  4, 4, 4, 4, 4, 4, 5, 5, 5, 5,
671  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
672  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
673  5, 5, 6, 6, 6, 6, 6, 6, 6, 6,
674  6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
675  6, 6, 6, 6, 6, 6, 6, 6, 7, 7,
676  7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
677  7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
678  7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
679  8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
680  8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
681  8, 8, 8, 8, 8, 8, 9, 9, 9, 9,
682  9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
683  9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
684  9, 9, 9, 9, 9, 9, 9, 9, 10, 10,
685  10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
686  10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
687  10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
688  10, 10, 11, 11, 11, 11, 11, 11, 11, 11,
689  11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
690  11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
691  11, 11, 11, 11, 11, 11, 12, 12, 12, 12,
692  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
693  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
694  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
695  13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
696  13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
697  13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
698  13, 13, 13, 13, 13, 13, 14, 14, 14, 14,
699  14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
700  14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
701  14, 14, 14, 14, 14, 14, 14, 14, 15, 15,
702  15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
703  15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
704  15, 15, 15, 15, 15, 15, 15, 15, 16, 16,
705  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
706  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
707  16, 16, 16, 16, 16, 16, 17, 17, 17, 17,
708  17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
709  17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
710  17, 17, 18, 18, 18, 18, 18, 18, 18, 18,
711  18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
712  18, 18, 18, 18, 18, 18, 18, 18, 19, 19,
713  19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
714  19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
715  19, 19, 20, 20, 20, 20, 20, 20, 20, 20,
716  20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
717  20, 20, 20, 20, 20, 20, 21, 21, 21, 21,
718  21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
719  21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
720  22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
721  22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
722  22, 22, 22, 22, 23, 23, 23, 23, 23, 23,
723  23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
724  23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
725  24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
726  24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
727  24, 24, 24, 24, 24, 24, 25, 25, 25, 25,
728  25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
729  25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
730  25, 25, 25, 25, 26, 26, 26, 26, 26, 26,
731  26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
732  26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
733  26, 26, 26, 26, 27, 27, 27, 27, 27, 27,
734  27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
735  27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
736  27, 27, 27, 27, 27, 27, 28, 28, 28, 28,
737  28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
738  28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
739  28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
740  28, 28, 29, 29, 29, 29, 29, 29, 29, 29,
741  29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
742  29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
743  29, 29, 29, 29, 29, 29, 30, 30, 30, 30,
744  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
745  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
746  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
747  31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
748  31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
749  31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
750  31, 31, 31, 31, 32, 32, 32, 32, 32, 32,
751  32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
752  32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
753  32, 32, 32, 32, 32, 32, 33, 33, 33, 33,
754  33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
755  33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
756  33, 33, 33, 33, 33, 33, 34, 34, 34, 34,
757  34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
758  34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
759  34, 34, 34, 34, 35, 35, 35, 35, 35, 35,
760  35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
761  35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
762  36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
763  36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
764  36, 36, 36, 36, 36, 36, 37, 37, 37, 37,
765  37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
766  37, 37, 37, 37, 37, 37, 37, 37, 38, 38,
767  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
768  38, 38, 38, 38, 38, 38, 38, 38, 39, 39,
769  39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
770  39, 39, 40, 40, 40, 40, 40, 40, 40, 40,
771  40, 40
772 };
773 
774 const unsigned short ESDetId::hy2[ kXYMAX ] = {
775  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
776  14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
777  24, 25, 26, 27, 11, 12, 13, 14, 15, 16,
778  17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
779  27, 28, 29, 30, 10, 11, 12, 13, 14, 15,
780  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
781  26, 27, 28, 29, 30, 31, 8, 9, 10, 11,
782  12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
783  22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
784  32, 33, 8, 9, 10, 11, 12, 13, 14, 15,
785  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
786  26, 27, 28, 29, 30, 31, 32, 33, 7, 8,
787  9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
788  19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
789  29, 30, 31, 32, 33, 34, 6, 7, 8, 9,
790  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
791  20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
792  30, 31, 32, 33, 34, 35, 5, 6, 7, 8,
793  9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
794  19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
795  29, 30, 31, 32, 33, 34, 35, 36, 4, 5,
796  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
797  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
798  26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
799  36, 37, 4, 5, 6, 7, 8, 9, 10, 11,
800  12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
801  22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
802  32, 33, 34, 35, 36, 37, 4, 5, 6, 7,
803  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
804  18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
805  28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
806  3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
807  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
808  23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
809  33, 34, 35, 36, 37, 38, 3, 4, 5, 6,
810  7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
811  17, 18, 23, 24, 25, 26, 27, 28, 29, 30,
812  31, 32, 33, 34, 35, 36, 37, 38, 2, 3,
813  4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
814  14, 15, 16, 25, 26, 27, 28, 29, 30, 31,
815  32, 33, 34, 35, 36, 37, 38, 39, 2, 3,
816  4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
817  14, 15, 26, 27, 28, 29, 30, 31, 32, 33,
818  34, 35, 36, 37, 38, 39, 2, 3, 4, 5,
819  6, 7, 8, 9, 10, 11, 12, 13, 14, 27,
820  28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
821  38, 39, 2, 3, 4, 5, 6, 7, 8, 9,
822  10, 11, 12, 13, 14, 27, 28, 29, 30, 31,
823  32, 33, 34, 35, 36, 37, 38, 39, 2, 3,
824  4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
825  28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
826  38, 39, 2, 3, 4, 5, 6, 7, 8, 9,
827  10, 11, 12, 13, 28, 29, 30, 31, 32, 33,
828  34, 35, 36, 37, 38, 39, 2, 3, 4, 5,
829  6, 7, 8, 9, 10, 11, 12, 13, 28, 29,
830  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
831  2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
832  12, 13, 28, 29, 30, 31, 32, 33, 34, 35,
833  36, 37, 38, 39, 2, 3, 4, 5, 6, 7,
834  8, 9, 10, 11, 12, 13, 14, 27, 28, 29,
835  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
836  2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
837  12, 13, 14, 27, 28, 29, 30, 31, 32, 33,
838  34, 35, 36, 37, 38, 39, 2, 3, 4, 5,
839  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
840  26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
841  36, 37, 38, 39, 2, 3, 4, 5, 6, 7,
842  8, 9, 10, 11, 12, 13, 14, 15, 16, 25,
843  26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
844  36, 37, 38, 39, 3, 4, 5, 6, 7, 8,
845  9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
846  23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
847  33, 34, 35, 36, 37, 38, 3, 4, 5, 6,
848  7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
849  17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
850  27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
851  37, 38, 4, 5, 6, 7, 8, 9, 10, 11,
852  12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
853  22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
854  32, 33, 34, 35, 36, 37, 4, 5, 6, 7,
855  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
856  18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
857  28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
858  4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
859  14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
860  24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
861  34, 35, 36, 37, 5, 6, 7, 8, 9, 10,
862  11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
863  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
864  31, 32, 33, 34, 35, 36, 6, 7, 8, 9,
865  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
866  20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
867  30, 31, 32, 33, 34, 35, 7, 8, 9, 10,
868  11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
869  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
870  31, 32, 33, 34, 8, 9, 10, 11, 12, 13,
871  14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
872  24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
873  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
874  18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
875  28, 29, 30, 31, 32, 33, 10, 11, 12, 13,
876  14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
877  24, 25, 26, 27, 28, 29, 30, 31, 11, 12,
878  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
879  23, 24, 25, 26, 27, 28, 29, 30, 14, 15,
880  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
881  26, 27, 16, 17, 18, 19, 20, 21, 22, 23,
882  24, 25
883 };
int strip() const
Definition: ESDetId.h:53
static const unsigned short hy2[kXYMAX]
Definition: ESDetId.h:105
static const unsigned short hxy2[kXMAX][kYMAX]
Definition: ESDetId.h:103
static const unsigned short hy1[kXYMAX]
Definition: ESDetId.h:101
static const int IY_MAX
Definition: ESDetId.h:74
int six() const
Definition: ESDetId.h:49
static const int ISTRIP_MAX
Definition: ESDetId.h:76
static const int PLANE_MIN
Definition: ESDetId.h:77
static void verify(int istrip, int ixs, int iys, int iplane, int iz)
Definition: ESDetId.cc:6
int siy() const
Definition: ESDetId.h:51
static const int PLANE_MAX
Definition: ESDetId.h:78
ESDetId()
Definition: ESDetId.h:20
std::ostream & operator<<(std::ostream &s, const ESDetId &id)
Definition: ESDetId.cc:99
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int zside() const
Definition: ESDetId.h:45
static const unsigned short hxy1[kXMAX][kYMAX]
Definition: ESDetId.h:99
static const int IY_MIN
Definition: ESDetId.h:72
static const unsigned short hx2[kXYMAX]
Definition: ESDetId.h:104
static bool validDetId(int istrip, int ixs, int iys, int iplane, int iz)
check if a valid index combination
Definition: ESDetId.cc:22
static const int IX_MAX
Definition: ESDetId.h:73
int plane() const
Definition: ESDetId.h:47
static ESDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: ESDetId.cc:62
static const unsigned short hx1[kXYMAX]
Definition: ESDetId.h:100
static const int ISTRIP_MIN
Definition: ESDetId.h:75
static bool validHashIndex(int hi)
Definition: ESDetId.h:65
ib
Definition: cuy.py:661
static const int IX_MIN
Definition: ESDetId.h:71
int hashedIndex() const
get a compact index for arrays [TODO: NEEDS WORK]
Definition: ESDetId.cc:44