CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EEDetId.cc
Go to the documentation of this file.
3 
4 #include <algorithm>
5 
6 const int EEDetId::QuadColLimits[EEDetId::nCols+1] = { 0, 8,17,27,36,45,54,62,70,76,79 };
7 
8 const int EEDetId::iYoffset[EEDetId::nCols+1] = { 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
9 
10 const unsigned short EEDetId::kxf[] = {
11  41, 51, 41, 51, 41, 51, 36, 51, 36, 51,
12  26, 51, 26, 51, 26, 51, 21, 51, 21, 51,
13  21, 51, 21, 51, 21, 51, 16, 51, 16, 51,
14  14, 51, 14, 51, 14, 51, 14, 51, 14, 51,
15  9, 51, 9, 51, 9, 51, 9, 51, 9, 51,
16  6, 51, 6, 51, 6, 51, 6, 51, 6, 51,
17  6, 51, 6, 51, 6, 51, 6, 51, 6, 51,
18  4, 51, 4, 51, 4, 51, 4, 51, 4, 56,
19  1, 58, 1, 59, 1, 60, 1, 61, 1, 61,
20  1, 62, 1, 62, 1, 62, 1, 62, 1, 62,
21  1, 62, 1, 62, 1, 62, 1, 62, 1, 62,
22  1, 61, 1, 61, 1, 60, 1, 59, 1, 58,
23  4, 56, 4, 51, 4, 51, 4, 51, 4, 51,
24  6, 51, 6, 51, 6, 51, 6, 51, 6, 51,
25  6, 51, 6, 51, 6, 51, 6, 51, 6, 51,
26  9, 51, 9, 51, 9, 51, 9, 51, 9, 51,
27  14, 51, 14, 51, 14, 51, 14, 51, 14, 51,
28  16, 51, 16, 51, 21, 51, 21, 51, 21, 51,
29  21, 51, 21, 51, 26, 51, 26, 51, 26, 51,
30  36, 51, 36, 51, 41, 51, 41, 51, 41, 51
31 } ;
32 
33 const unsigned short EEDetId::kdi[] = {
34  0, 10, 20, 30, 40, 50, 60, 75, 90, 105,
35  120, 145, 170, 195, 220, 245, 270, 300, 330, 360,
36  390, 420, 450, 480, 510, 540, 570, 605, 640, 675,
37  710, 747, 784, 821, 858, 895, 932, 969, 1006, 1043,
38  1080, 1122, 1164, 1206, 1248, 1290, 1332, 1374, 1416, 1458,
39  1500, 1545, 1590, 1635, 1680, 1725, 1770, 1815, 1860, 1905,
40  1950, 1995, 2040, 2085, 2130, 2175, 2220, 2265, 2310, 2355,
41  2400, 2447, 2494, 2541, 2588, 2635, 2682, 2729, 2776, 2818,
42  2860, 2903, 2946, 2988, 3030, 3071, 3112, 3152, 3192, 3232,
43  3272, 3311, 3350, 3389, 3428, 3467, 3506, 3545, 3584, 3623,
44  3662, 3701, 3740, 3779, 3818, 3857, 3896, 3935, 3974, 4013,
45  4052, 4092, 4132, 4172, 4212, 4253, 4294, 4336, 4378, 4421,
46  4464, 4506, 4548, 4595, 4642, 4689, 4736, 4783, 4830, 4877,
47  4924, 4969, 5014, 5059, 5104, 5149, 5194, 5239, 5284, 5329,
48  5374, 5419, 5464, 5509, 5554, 5599, 5644, 5689, 5734, 5779,
49  5824, 5866, 5908, 5950, 5992, 6034, 6076, 6118, 6160, 6202,
50  6244, 6281, 6318, 6355, 6392, 6429, 6466, 6503, 6540, 6577,
51  6614, 6649, 6684, 6719, 6754, 6784, 6814, 6844, 6874, 6904,
52  6934, 6964, 6994, 7024, 7054, 7079, 7104, 7129, 7154, 7179,
53  7204, 7219, 7234, 7249, 7264, 7274, 7284, 7294, 7304, 7314
54 } ;
55 
56 EEDetId::EEDetId( int index1, int index2, int iz, int mode ) : DetId( Ecal, EcalEndcap )
57 {
58  int crystal_ix=0;
59  int crystal_iy=0;
60  if (mode == XYMODE)
61  {
62  crystal_ix = index1;
63  crystal_iy = index2;
64  }
65  else if (mode == SCCRYSTALMODE)
66  {
67  int SC = index1;
68  int crystal = index2;
69  // std::cout << "iz " << iz << " SC " << index1 << "crystal " << index2 << std::endl;
70 
71  crystal_ix=iz*ix(SC,crystal);
72  if (crystal_ix<0)
73  crystal_ix++;
74  crystal_ix+=50;
75  crystal_iy=iy(SC,crystal);
76  if (crystal_iy<0)
77  crystal_iy++;
78  crystal_iy+=50;
79 
80  }
81  else
82  {
83  throw cms::Exception("InvalidDetId") << "EEDetId: Cannot create object. Unknown mode for (int, int, int) constructor.";
84  }
85 
86  if (!validDetId(crystal_ix,crystal_iy,iz))
87  {
88  throw cms::Exception("InvalidDetId") << "EEDetId: Cannot create object. Indexes out of bounds \n"
89  << "x = " << crystal_ix << " y = " << crystal_iy << " z = " << iz;
90  }
91 
92  id_|=(crystal_iy&0x7f)|((crystal_ix&0x7f)<<7)|((iz>0)?(0x4000):(0));
93 }
94 
95 
96 
97 
98 EEDetId
100 {
101  if( validHashIndex( hi ) )
102  {
103  const int iz ( hi<kEEhalf ? -1 : 1 ) ;
104  const uint32_t di ( hi%kEEhalf ) ;
105  const int ii ( ( std::upper_bound( kdi, kdi+(2*IY_MAX), di ) - kdi ) - 1 ) ;
106  const int iy ( 1 + ii/2 ) ;
107  const int ix ( kxf[ii] + di - kdi[ii] ) ;
108  return EEDetId( ix, iy, iz ) ;
109  }
110  else
111  {
112  return EEDetId() ;
113  }
114 }
115 
116 int
117 EEDetId::ix( int iSC, int iCrys ) const
118 {
119  /*
120  * ix() return individual crystal x-coordinate
121  *
122  * Author : B W Kennedy
123  * Version : 1.00
124  * Created : 21 December 2005
125  * Last Mod : 31 January 2006
126  *
127  * Input : iSC, iCrys - Supercrystal and crystal ids
128  */
129 
130 
131  int nSCinQuadrant = QuadColLimits[nCols];
132 
133  if (iSC > 4*nSCinQuadrant || iSC < 1)
134  {
135  throw new std::exception();
136  }
137 
138  // Map SC number into (x>0,y>0) quadrant.
139  int iSCmap, iqx,iq;
140  if (iSC > 3*nSCinQuadrant)
141  {
142  iSCmap = iSC - 3*nSCinQuadrant;
143  iqx = 1;
144  iq=4;
145  }
146  else if (iSC > 2*nSCinQuadrant)
147  {
148  iSCmap = iSC - 2*nSCinQuadrant;
149  iqx = -1;
150  iq=3;
151  }
152  else if (iSC > nSCinQuadrant)
153  {
154  iSCmap = iSC - nSCinQuadrant;
155  iqx = -1;
156  iq=2;
157  }
158  else
159  {
160  iSCmap = iSC;
161  iqx = 1;
162  iq=1;
163  }
164 
165  // Decide which column the SC is in
166  int iCol = 0 ;
167  while (iSCmap > QuadColLimits[iCol++]) ;
168  iCol-- ;
169 
170  int ixCrys=-1;
171  if (iq == 1 || iq == 3)
172  ixCrys = iqx*(5*(iCol-1) + (int)(iCrys+4)/5);
173  else if (iq == 2 || iq == 4)
174  ixCrys = iqx*(5*(iCol-1) + (iCrys-1)%5 + 1);
175 
176  // returning a value from 1 to 100
177 
178  return ixCrys;
179 }
180 
181 int EEDetId::iy( int iSC, int iCrys ) const
182 {
183  /*
184  * iy() return individual crystal y-coordinate
185  *
186  * Author : B W Kennedy
187  * Version : 1.00
188  * Created : 21 December 2005
189  * Last Mod : 31 January 2006
190  *
191  * Input : iSC, iCrys - Supercrystal and crystal ids
192  */
193 
194  int nSCinQuadrant = QuadColLimits[nCols];
195  if (iSC > 4*nSCinQuadrant || iSC < 1)
196  {
197  throw new std::exception();
198  }
199 
200  // Map SC number into (x>0,y>0) quadrant
201  int iSCmap, iqy,iq;
202  if (iSC > 3*nSCinQuadrant)
203  {
204  iSCmap = iSC - 3*nSCinQuadrant;
205  iqy = -1;
206  iq=4;
207  }
208  else if (iSC > 2*nSCinQuadrant)
209  {
210  iSCmap = iSC - 2*nSCinQuadrant;
211  iqy = -1;
212  iq=3;
213  }
214  else if (iSC > nSCinQuadrant)
215  {
216  iSCmap = iSC - nSCinQuadrant;
217  iqy = 1;
218  iq=2;
219  } else
220  {
221  iSCmap = iSC;
222  iqy = 1;
223  iq=1;
224  }
225 
226  // Decide which column the SC is in
227  int iCol = 0;
228  while (iSCmap > QuadColLimits[iCol++]) ;
229  iCol--;
230 
231  int iSCy = iSCmap - QuadColLimits[iCol-1] + iYoffset[iCol];
232 
233  int iyCrys=-1;
234  if (iq == 1 || iq == 3)
235  iyCrys = iqy*(5*(iSCy-1) + (iCrys-1)%5 + 1);
236  else if (iq == 2 || iq == 4)
237  iyCrys = iqy*(5*(iSCy-1) + (int)(iCrys+4)/5 );
238  return iyCrys;
239 }
240 
242 {
243  int iQuadrant = iquadrant();
244  if ( iQuadrant == 1 || iQuadrant == 4)
245  return (ix() - 50);
246  else if ( iQuadrant == 2 || iQuadrant == 3)
247  return (51 - ix());
248  //Should never be reached
249  return -1;
250 }
251 
253 {
254  int iQuadrant = iquadrant();
255  if ( iQuadrant == 1 || iQuadrant == 2)
256  return (iy() - 50);
257  else if ( iQuadrant == 3 || iQuadrant == 4)
258  return 51 - iy();
259  //Should never be reached
260  return -1;
261 }
262 
263 int
265 {
266  if (ix()>50)
267  {
268  if(iy()>50)
269  return 1;
270  else
271  return 4;
272  }
273  else
274  {
275  if(iy()>50)
276  return 2;
277  else
278  return 3;
279  }
280  //Should never be reached
281  return -1;
282 }
283 
284 int
286 {
287  return isc( 1 + ( ix() - 1 )/nCrys,
288  1 + ( iy() - 1 )/nCrys ) ;
289 }
290 
291 int
292 EEDetId::isc( int jx, int jy )
293 {
294  if( 0 < jx &&
295  21 > jx &&
296  0 < jy &&
297  21 > jy )
298  {
299  const int iquad ( ( 10<jx && 10<jy ? 1 :
300  ( 11>jx && 10<jy ? 2 :
301  ( 11>jx && 11>jy ? 3 : 4 ) ) ) ) ;
302 
303  const int iCol = ( 1 == iquad || 4 == iquad ? jx - 10 : 11 - jx ) ;
304  const int iRow = ( 1 == iquad || 2 == iquad ? jy - 10 : 11 - jy ) ;
305 
306  static const int nSCinQuadrant = ISC_MAX/4;
307 
308  const int yOff ( iYoffset[iCol] ) ;
309 
310  const int qOff ( nSCinQuadrant*( iquad - 1 ) ) ;
311 
312  const int iscOne ( QuadColLimits[iCol-1] + iRow - yOff ) ;
313 
314  return ( yOff >= iRow ? -1 :
315  ( QuadColLimits[iCol] < iscOne ? -2 :
316  iscOne + qOff ) ) ;
317  }
318  else
319  {
320  return -3 ; // bad inputs
321  }
322 }
323 
324 int EEDetId::ic() const
325 {
326  /*
327  * Return crystal number from (x,y) coordinates.
328  *
329  * Author : B W Kennedy
330  * Version : 1.00
331  * Created : 5 May 2006
332  * Last Mod :
333  *
334  * Input : ix, iy - (x,y) position of crystal
335  */
336 
337  /* Useful constants . */
338  int iQuadrant = iquadrant();
339  int icrCol=-1;
340  int icrRow=-1;
341 
342  if (iQuadrant == 1 || iQuadrant == 3)
343  {
344  icrCol=(ixQuadrantOne()-1) % nCrys;
345  icrRow=(iyQuadrantOne()-1) % nCrys;
346  }
347 
348  else if (iQuadrant == 2 || iQuadrant == 4)
349  {
350  icrRow=(ixQuadrantOne()-1) % nCrys;
351  icrCol=(iyQuadrantOne()-1) % nCrys;
352  }
353 
354  int icrys = 5*icrCol + icrRow + 1;
355 
356  return icrys;
357 }
358 
359 
360 bool
362 {
363  return isNextToDBoundary( id ) || isNextToRingBoundary( id ) ;
364 }
365 
366 bool
368 {
369  // hardcoded values for D boundary
370  return id.ix() == 50 || id.ix() == 51 ;
371 }
372 
373 
374 bool
376 {
377  for (int i = -1; i <= 1; ++i) {
378  for (int j = -1; j <= 1; ++j) {
379  if ( ! validDetId( id.ix() + i, id.iy() + j, id.zside() ) ) {
380  return true;
381  }
382  }
383  }
384  return false;
385 }
386 
387 int
389 {
390  int returnValue ( 0 ) ;
391  if( isOuterRing() )
392  {
393  const int ax ( abs( ix() - IX_MAX/2 ) ) ;
394  const int ay ( abs( iy() - IY_MAX/2 ) ) ;
395  returnValue = ax + 50 - ay ;
396  if( ay <= 47 ) --returnValue ;
397  if( ay <= 45 ) --returnValue ;
398  if( ay <= 42 ) --returnValue ;
399  if( ay <= 37 ) --returnValue ;
400  if( ay <= 35 ) --returnValue ;
401  if( ay <= 30 ) --returnValue ;
402  if( ay <= 25 ) --returnValue ;
403  if( ay <= 15 ) --returnValue ;
404  if( ay <= 10 ) --returnValue ;
405  const int iq ( iquadrant() ) ;
406  if( 1==iq )
407  {
408  returnValue = 91 - returnValue ;
409  }
410  else
411  {
412  if( 2==iq )
413  {
414  returnValue += 90 ;
415  }
416  else
417  {
418  if( 3==iq )
419  {
420  returnValue = 271 - returnValue ;
421  }
422  else
423  {
424  returnValue += 270 ;
425  }
426  }
427  }
428  returnValue = 1 + ( 360 + returnValue - 10 -1 )%360 ;
429  }
430 // if( positiveZ() ) returnValue += 360 ;
431  return returnValue ;
432 }
433 
434 EEDetId
435 EEDetId::idOuterRing( int iPhi , int zEnd )
436 {
437  iPhi -= 10 ; // phi=1 in barrel is at -10deg
438  while( iPhi < 1 ) iPhi+=360 ;
439  while( iPhi > 360 ) iPhi-=360 ;
440 
441  const int index1 ( iPhi - 1 ) ;
442  const int quad ( index1/90 ) ;
443  int indexq ( index1 - quad*90 + 1 ) ;
444  if( 0==quad || 2==quad ) indexq = 91 - indexq ;
445  const int indexh ( indexq > 45 ? 91 - indexq : indexq ) ;
446  const int axh ( indexh<=10 ? indexh :
447  ( indexh<=12 ? 10 :
448  ( indexh<=17 ? indexh - 2 :
449  ( indexh<=18 ? 15 :
450  ( indexh<=28 ? indexh - 3 :
451  ( indexh<=30 ? 25 :
452  ( indexh<=35 ? indexh - 5 :
453  ( indexh<=39 ? 30 :
454  ( indexh<=44 ? indexh - 9 : 35 ))))))))) ;
455  const int ayh ( indexh<=10 ? 50 :
456  ( indexh<=12 ? 60 - indexh :
457  ( indexh<=17 ? 47 :
458  ( indexh<=18 ? 64 - indexh :
459  ( indexh<=28 ? 45 :
460  ( indexh<=30 ? 73 - indexh :
461  ( indexh<=35 ? 42 :
462  ( indexh<=39 ? 77 - indexh :
463  ( indexh<=44 ? 37 : 36 ))))))))) ;
464  const int bxh ( indexq>45 ? ayh : axh ) ;
465  const int byh ( indexq>45 ? axh : ayh ) ;
466  const int cx ( ( quad==0 || quad==3 ? bxh : -bxh+1 ) + IX_MAX/2 ) ;
467  const int cy ( ( quad==0 || quad==1 ? byh : -byh+1 ) + IY_MAX/2 ) ;
468 
469  return EEDetId( cx, cy, ( zEnd > 0 ? 1 : -1 ) ) ;
470 }
471 
472 
473 EEDetId
474 EEDetId::offsetBy(int nrStepsX, int nrStepsY ) const
475 {
476  int newX = ix() + nrStepsX;
477  int newY = iy() + nrStepsY;
478 
479  if( validDetId( newX, newY, zside() ) ) {
480  return EEDetId( newX, newY, zside() );
481  } else {
482  return EEDetId(0);
483  }
484 }
485 
486 EEDetId
488 {
489  int newZSide = -1 * zside();
490  if( validDetId(ix(), iy(), newZSide ) ) {
491  return EEDetId( ix(), iy(), newZSide );
492  } else {
493  return EEDetId(0);
494  }
495 }
496 
497 DetId
498 EEDetId::offsetBy( const DetId startId, int nrStepsX, int nrStepsY )
499 {
500  if( startId.det() == DetId::Ecal && startId.subdetId() == EcalEndcap ) {
501  EEDetId eeStartId( startId );
502  return eeStartId.offsetBy( nrStepsX, nrStepsY ).rawId();
503  } else {
504  return DetId(0);
505  }
506 }
507 
508 DetId
509 EEDetId::switchZSide( const DetId startId )
510 {
511  if( startId.det() == DetId::Ecal && startId.subdetId() == EcalEndcap ) {
512  EEDetId eeStartId(startId);
513  return eeStartId.switchZSide().rawId();
514  } else {
515  return DetId(0);
516  }
517 }
518 
519 bool
521 {
522  const int kx ( ix() ) ;
523  const int ky ( iy() ) ;
524  const int ax ( kx>IX_MAX/2 ? kx-IX_MAX/2 : IX_MAX/2 + 1 - kx ) ;
525  const int ay ( ky>IY_MAX/2 ? ky-IY_MAX/2 : IY_MAX/2 + 1 - ky ) ;
526  return ( isOuterRingXY( ax, ay ) ||
527  isOuterRingXY( ay, ax ) ) ;
528 }
529 
530 bool
532 {
533  return ( ( ax<=10 && ay==50 ) ||
534  ( ax==10 && ay>=48 ) ||
535  ( ax<=15 && ax>=11 && ay==47 ) ||
536  ( ax==15 && ay==46 ) ||
537  ( ax<=25 && ax>=16 && ay==45 ) ||
538  ( ax==25 && ay<=44 && ay>=43 ) ||
539  ( ax<=30 && ax>=26 && ay==42 ) ||
540  ( ax==30 && ay<=41 && ay>=38 ) ||
541  ( ax<=35 && ax>=31 && ay==37 ) ||
542  ( ax==35 && ay==36 ) ) ;
543 }
544 
545 bool
546 EEDetId::slowValidDetId(int crystal_ix, int crystal_iy)
547 {
548  return // negative logic!
549  !(
550  (crystal_ix >= 1 && crystal_ix <= 3 && (crystal_iy <= 40 || crystal_iy > 60) ) ||
551  (crystal_ix >= 4 && crystal_ix <= 5 && (crystal_iy <= 35 || crystal_iy > 65) ) ||
552  (crystal_ix >= 6 && crystal_ix <= 8 && (crystal_iy <= 25 || crystal_iy > 75) ) ||
553  (crystal_ix >= 9 && crystal_ix <= 13 && (crystal_iy <= 20 || crystal_iy > 80) ) ||
554  (crystal_ix >= 14 && crystal_ix <= 15 && (crystal_iy <= 15 || crystal_iy > 85) ) ||
555  (crystal_ix >= 16 && crystal_ix <= 20 && (crystal_iy <= 13 || crystal_iy > 87) ) ||
556  (crystal_ix >= 21 && crystal_ix <= 25 && (crystal_iy <= 8 || crystal_iy > 92) ) ||
557  (crystal_ix >= 26 && crystal_ix <= 35 && (crystal_iy <= 5 || crystal_iy > 95) ) ||
558  (crystal_ix >= 36 && crystal_ix <= 39 && (crystal_iy <= 3 || crystal_iy > 97) ) ||
559  (crystal_ix >= 98 && crystal_ix <= 100 && (crystal_iy <= 40 || crystal_iy > 60) ) ||
560  (crystal_ix >= 96 && crystal_ix <= 97 && (crystal_iy <= 35 || crystal_iy > 65) ) ||
561  (crystal_ix >= 93 && crystal_ix <= 95 && (crystal_iy <= 25 || crystal_iy > 75) ) ||
562  (crystal_ix >= 88 && crystal_ix <= 92 && (crystal_iy <= 20 || crystal_iy > 80) ) ||
563  (crystal_ix >= 86 && crystal_ix <= 87 && (crystal_iy <= 15 || crystal_iy > 85) ) ||
564  (crystal_ix >= 81 && crystal_ix <= 85 && (crystal_iy <= 13 || crystal_iy > 87) ) ||
565  (crystal_ix >= 76 && crystal_ix <= 80 && (crystal_iy <= 8 || crystal_iy > 92) ) ||
566  (crystal_ix >= 66 && crystal_ix <= 75 && (crystal_iy <= 5 || crystal_iy > 95) ) ||
567  (crystal_ix >= 62 && crystal_ix <= 65 && (crystal_iy <= 3 || crystal_iy > 97) ) ||
568  ( (crystal_ix == 40 || crystal_ix == 61) && ( (crystal_iy >= 46 && crystal_iy <= 55 ) || crystal_iy <= 3 || crystal_iy > 97 )) ||
569  ( (crystal_ix == 41 || crystal_ix == 60) && crystal_iy >= 44 && crystal_iy <= 57 ) ||
570  ( (crystal_ix == 42 || crystal_ix == 59) && crystal_iy >= 43 && crystal_iy <= 58 ) ||
571  ( (crystal_ix == 43 || crystal_ix == 58) && crystal_iy >= 42 && crystal_iy <= 59 ) ||
572  ( (crystal_ix == 44 || crystal_ix == 45 || crystal_ix == 57 || crystal_ix == 56) && crystal_iy >= 41 && crystal_iy <= 60 ) ||
573  ( crystal_ix >= 46 && crystal_ix <= 55 && crystal_iy >= 40 && crystal_iy <= 61 )
574  );
575 }
576 
578 {
579  return abs(a.ix()-b.ix());
580 }
581 
583 {
584  return abs(a.iy() - b.iy());
585 }
586 
587 #include <ostream>
588 std::ostream& operator<<(std::ostream& s,const EEDetId& id)
589 {
590  return s << "(EE iz " << ((id.zside()>0)?("+ "):("- "))
591  << " ix " << id.ix() << " , iy " << id.iy() << ')';
592 }
static bool isNextToBoundary(EEDetId id)
Definition: EEDetId.cc:361
int i
Definition: DBlmapReader.cc:9
static const int ISC_MAX
Definition: EEDetId.h:320
int ix() const
Definition: EEDetId.h:76
int ic() const
Definition: EEDetId.cc:324
static int distanceX(const EEDetId &a, const EEDetId &b)
Definition: EEDetId.cc:577
int isc() const
Definition: EEDetId.cc:285
static const int XYMODE
Definition: EEDetId.h:339
int iquadrant() const
Definition: EEDetId.cc:264
EEDetId offsetBy(int nrStepsX, int nrStepsY) const
Definition: EEDetId.cc:474
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
int ixQuadrantOne() const
Definition: EEDetId.cc:241
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:99
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
int ii
Definition: cuy.py:588
static const int SCCRYSTALMODE
Definition: EEDetId.h:340
static bool validHashIndex(int i)
Definition: EEDetId.h:239
static const int iYoffset[nCols+1]
Definition: EEDetId.h:354
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
bool isOuterRing() const
Definition: EEDetId.cc:520
static bool isOuterRingXY(int ax, int ay)
Definition: EEDetId.cc:531
static const int nCols
Definition: EEDetId.h:351
static bool slowValidDetId(int crystal_ix, int crystal_iy)
Definition: EEDetId.cc:546
int zside() const
Definition: EEDetId.h:70
int iPhiOuterRing() const
Definition: EEDetId.cc:388
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
static bool isNextToRingBoundary(EEDetId id)
Definition: EEDetId.cc:375
int iy() const
Definition: EEDetId.h:82
static int distanceY(const EEDetId &a, const EEDetId &b)
Definition: EEDetId.cc:582
static bool isNextToDBoundary(EEDetId id)
Definition: EEDetId.cc:367
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
static const int IX_MAX
Definition: EEDetId.h:302
EEDetId switchZSide() const
Definition: EEDetId.cc:487
Definition: DetId.h:18
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int nCrys
Definition: EEDetId.h:352
uint32_t id_
Definition: DetId.h:55
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
static const int QuadColLimits[nCols+1]
Definition: EEDetId.h:353
static const unsigned short kxf[2 *IY_MAX]
Definition: EEDetId.h:356
static EEDetId idOuterRing(int iPhi, int zEnd)
Definition: EEDetId.cc:435
int iyQuadrantOne() const
Definition: EEDetId.cc:252
static const int IY_MAX
Definition: EEDetId.h:306
static const unsigned short kdi[2 *IY_MAX]
Definition: EEDetId.h:357
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
EEDetId()
Definition: EEDetId.h:25