14 int vL2ax[3] = {4, 6, 10};
15 int vL2ay[3] = {29, 31, 35};
20 int vL3ax[3] = {30, 34, 36};
21 int vL3ay[3] = {35, 31, 29};
26 int vL1ax[26] = {2, 4, 4, 8, 8, 8, 8, 10, 12, 12, 14, 14, 20, 20, 26, 26, 28, 28, 30, 32, 32, 32, 32, 36, 36, 38};
27 int vL1ay[26] = {21, 25, 21, 33, 29, 25, 21, 21, 25, 21, 31, 27, 32,
28 28, 31, 27, 25, 21, 21, 33, 29, 25, 21, 25, 21, 21};
42 int vL0ax[23] = {6, 6, 10, 10, 12, 12, 14, 16, 16, 18, 18, 20, 22, 22, 24, 24, 26, 28, 28, 30, 30, 34, 34};
43 int vL0ay[23] = {26, 21, 30, 25, 34, 29, 35, 36, 31, 36, 31, 36, 36, 31, 36, 31, 35, 34, 29, 30, 25, 26, 21};
51 for (
int i = 0;
i < 1; ++
i) {
70 for (
int i = 0;
i < 3; ++
i) {
77 for (
int i = 0;
i < 23; ++
i) {
82 for (
int i = 0;
i < 26; ++
i) {
87 edm::LogInfo(
"EcalGeom") <<
"Creating EcalPreshowerNumberingScheme";
91 edm::LogInfo(
"EcalGeom") <<
"Deleting EcalPreshowerNumberingScheme";
96 uint32_t intIndex = 0;
105 edm::LogWarning(
"EcalGeom") <<
"EcalPreshowerNumberingScheme: Wrong name"
106 <<
" of Presh. Si. Strip : " << baseNumber.
getLevelName(0);
116 int x = 0,
y = 0, ix, iy,
id;
117 int mapX[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
118 int mapY[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
122 if (ladd ==
"SFLX0a" || ladd ==
"SFLY0a") {
123 mapX[5] = mapX[6] = mapX[7] = mapX[8] = mapX[9] = 1;
135 id = (
int)((
float)ladd_copy / 2 + 0.5);
137 x =
L0ax[
id - 1] + mapX[box - 1000 - 1];
138 y =
L0ay[
id - 1] + mapY[box - 1000 - 1];
140 if ((ladd_copy % 2) == 0) {
141 if (mapX[box - 1000 - 1] == 0)
143 else if (mapX[box - 1000 - 1] == 1)
148 if (ladd ==
"SFLX0b" || ladd ==
"SFLY0b") {
149 mapX[4] = mapX[5] = mapX[6] = mapX[7] = mapX[8] = 1;
161 x =
L0bx[0] + mapX[box - 2000 - 1];
162 y =
L0by[0] + mapY[box - 2000 - 1];
164 if (ladd_copy == 1) {
169 if (ladd ==
"SFLX0c" || ladd ==
"SFLY0c") {
170 mapX[5] = mapX[6] = mapX[7] = mapX[8] = 1;
182 x =
L0cx[0] + mapX[box - 3000 - 1];
183 y =
L0cy[0] + mapY[box - 3000 - 1];
185 if (ladd_copy == 2) {
190 if (ladd ==
"SFLX1a" || ladd ==
"SFLY1a") {
191 mapX[4] = mapX[5] = mapX[6] = mapX[7] = 1;
203 id = (
int)((
float)ladd_copy / 2 + 0.5);
205 x =
L1ax[
id - 1] + mapX[box - 4000 - 1];
206 y =
L1ay[
id - 1] + mapY[box - 4000 - 1];
208 if ((ladd_copy % 2) == 0) {
209 if (mapX[box - 4000 - 1] == 0)
211 else if (mapX[box - 4000 - 1] == 1)
216 if (ladd ==
"SFLX1b" || ladd ==
"SFLY1b") {
217 mapX[3] = mapX[4] = mapX[5] = mapX[6] = 1;
229 x =
L1bx[0] + mapX[box - 5000 - 1];
230 y =
L1by[0] + mapY[box - 5000 - 1];
232 if (ladd_copy == 1) {
237 if (ladd ==
"SFLX1c" || ladd ==
"SFLY1c") {
238 mapX[4] = mapX[5] = mapX[6] = 1;
250 x =
L1cx[0] + mapX[box - 6000 - 1];
251 y =
L1cy[0] + mapY[box - 6000 - 1];
253 if (ladd_copy == 2) {
258 if (ladd ==
"SFLX1d" || ladd ==
"SFLY1d") {
259 mapX[2] = mapX[3] = mapX[4] = mapX[5] = 1;
271 x =
L1dx[0] + mapX[box - 7000 - 1];
272 y =
L1dy[0] + mapY[box - 7000 - 1];
274 if (ladd_copy == 1) {
279 if (ladd ==
"SFLX1e" || ladd ==
"SFLY1e") {
280 mapX[4] = mapX[5] = 1;
292 x =
L1ex[0] + mapX[box - 8000 - 1];
293 y =
L1ey[0] + mapY[box - 8000 - 1];
295 if (ladd_copy == 2) {
300 if (ladd ==
"SFLX3a" || ladd ==
"SFLY3a") {
301 mapX[4] = mapX[5] = mapX[6] = 1;
313 id = (ladd_copy > 3) ? ladd_copy - 3 : 4 - ladd_copy;
315 x =
L3ax[
id - 1] + mapX[box - 9000 - 1];
316 y =
L3ay[
id - 1] + mapY[box - 9000 - 1];
323 if (ladd ==
"SFLX3b" || ladd ==
"SFLY3b") {
324 mapX[4] = mapX[5] = 1;
336 x =
L3bx[0] + mapX[box - 11000 - 1];
337 y =
L3by[0] + mapY[box - 11000 - 1];
339 if (ladd_copy == 1) {
344 if (ladd ==
"SFLX2a" || ladd ==
"SFLY2a") {
345 mapX[3] = mapX[4] = mapX[5] = mapX[6] = 1;
357 id = (ladd_copy > 3) ? 7 - ladd_copy : ladd_copy;
359 x =
L2ax[
id - 1] + mapX[box - 10000 - 1];
360 y =
L2ay[
id - 1] + mapY[box - 10000 - 1];
367 if (ladd ==
"SFLX2b" || ladd ==
"SFLY2b") {
368 mapX[2] = mapX[3] = mapX[4] = mapX[5] = 1;
380 x =
L2bx[0] + mapX[box - 12000 - 1];
381 y =
L2by[0] + mapY[box - 12000 - 1];
383 if (ladd_copy == 2) {
389 if (
zside < 0 && layer == 1)
396 x = (
zside > 0) ? iy : 41 - iy;
406 else if (zside < 0 && y > 20)
408 }
else if (layer == 2) {
411 else if (zside < 0 && x > 20)
417 LogDebug(
"EcalGeom") <<
"EcalPreshowerNumberingScheme : zside " <<
zside <<
" Ladd " << ladd
418 <<
" ladd_copy: " << ladd_copy <<
" box " << box <<
" x " <<
x <<
" y " <<
y <<
" layer "
419 << layer <<
" strip " <<
strip <<
" UnitID 0x" << std::hex << intIndex <<
std::dec;
421 for (
int ich = 0; ich <
level; ich++) {