24 constexpr int cellsPerLayer[] = {0, 50, 60, 72, 96};
25 constexpr int cellsInMB1 = ( cellsPerLayer[1] * 8 ) + ( cellsInTheta * 4 );
26 constexpr int cellsInMB2 = ( cellsPerLayer[2] * 8 ) + ( cellsInTheta * 4 );
27 constexpr int cellsInMB3 = ( cellsPerLayer[3] * 8 ) + ( cellsInTheta * 4 );
28 constexpr int cellsInMB4 = cellsPerLayer[4] * 8;
33 cellsInMB1 + cellsInMB2,
34 cellsInMB1 + cellsInMB2 + cellsInMB3
36 constexpr int cellsPerSector = cellsInMB1 + cellsInMB2 + cellsInMB3 + cellsInMB4;
37 constexpr int cellsIn13Sectors = ( cellsPerSector * 12 ) + cellsInMB4;
38 constexpr int cellsPerWheel = cellsIn13Sectors + cellsInMB4;
52 if ( wheel <= 0 )
return -1;
53 if ( station <= 0 )
return -2;
54 if ( sector <= 0 )
return -3;
55 if ( superlayer <= 0 )
return -4;
56 if ( layer <= 0 )
return -5;
57 if ( cell <= 0 )
return -6;
61 if ( wheel > 5 )
return -1;
62 seqWireNum += ( wheel - 1 ) * cellsPerWheel;
64 if ( sector > 14 )
return -2;
66 station < 4 )
return -2;
67 if ( sector > 13 ) seqWireNum += cellsIn13Sectors;
69 seqWireNum += ( sector - 1 ) * cellsPerSector;
71 if ( station > 4 )
return -3;
73 seqWireNum += offsetChamber[
station];
75 if ( superlayer > 3 )
return -4;
76 if ( layer > 4 )
return -5;
77 if ( superlayer != 2 ) {
78 if ( cell > cellsPerLayer[station] )
return -6;
79 if ( superlayer == 3 ) layer += 4;
80 seqWireNum += ( layer - 1 ) * cellsPerLayer[station];
83 if ( station == 4 )
return -4;
84 if ( cell > cellsInTheta )
return -6;
85 seqWireNum += ( 8 * cellsPerLayer[
station] ) +
86 ( ( layer - 1 ) * cellsInTheta );
89 return seqWireNum + cell;
95 return 5 * cellsPerWheel;
static int id(int wheel, int station, int sector, int superlayer, int layer, int cell)