13 int vL2ax[3] = {4, 6, 10};
14 int vL2ay[3] = {29, 31, 35};
19 int vL3ax[3] = {30, 34, 36};
20 int vL3ay[3] = {35, 31, 29};
25 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};
26 int vL1ay[26] = {21, 25, 21, 33, 29, 25, 21, 21, 25, 21, 31, 27, 32,
27 28, 31, 27, 25, 21, 21, 33, 29, 25, 21, 25, 21, 21};
41 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};
42 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};
50 for (
int i = 0;
i < 1; ++
i) {
69 for (
int i = 0;
i < 3; ++
i) {
76 for (
int i = 0;
i < 23; ++
i) {
81 for (
int i = 0;
i < 26; ++
i) {
99 const int numberOfHierarchyLevels = baseNumber.
getLevels();
100 uint32_t intIndex = 0;
101 if (numberOfHierarchyLevels > 0) {
104 if (baseNumber.
getLevelName(0).find(
"SFSX") != std::string::npos) {
106 }
else if (baseNumber.
getLevelName(0).find(
"SFSY") != std::string::npos) {
109 edm::LogWarning(
"EcalGeom") <<
"EcalPreshowerNumberingScheme: Wrong name"
110 <<
" of Presh. Si. Strip : " << baseNumber.
getLevelName(0);
114 static constexpr
int stripHierachyLevel = 0;
115 static constexpr
int boxHierachyLevel = 2;
116 static constexpr
int ladderHierachyLevel = 3;
117 static constexpr
int regionHierachyLevel = 5;
122 int zside = 2 * (1 - zs) + 1;
127 int x = 0,
y = 0, ix, iy,
id;
128 int mapX[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
129 int mapY[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
131 int ladd_copy = baseNumber.
getCopyNumber(ladderHierachyLevel);
133 if (ladd ==
"SFLX0a" || ladd ==
"SFLY0a") {
134 mapX[5] = mapX[6] = mapX[7] = mapX[8] = mapX[9] = 1;
146 id = (
int)((
float)ladd_copy / 2 + 0.5);
148 x =
L0ax[
id - 1] + mapX[box - 1000 - 1];
149 y =
L0ay[
id - 1] + mapY[box - 1000 - 1];
151 if ((ladd_copy % 2) == 0) {
152 if (mapX[box - 1000 - 1] == 0)
154 else if (mapX[box - 1000 - 1] == 1)
159 if (ladd ==
"SFLX0b" || ladd ==
"SFLY0b") {
160 mapX[4] = mapX[5] = mapX[6] = mapX[7] = mapX[8] = 1;
172 x =
L0bx[0] + mapX[box - 2000 - 1];
173 y =
L0by[0] + mapY[box - 2000 - 1];
175 if (ladd_copy == 1) {
180 if (ladd ==
"SFLX0c" || ladd ==
"SFLY0c") {
181 mapX[5] = mapX[6] = mapX[7] = mapX[8] = 1;
193 x =
L0cx[0] + mapX[box - 3000 - 1];
194 y =
L0cy[0] + mapY[box - 3000 - 1];
196 if (ladd_copy == 2) {
201 if (ladd ==
"SFLX1a" || ladd ==
"SFLY1a") {
202 mapX[4] = mapX[5] = mapX[6] = mapX[7] = 1;
214 id = (
int)((
float)ladd_copy / 2 + 0.5);
216 x =
L1ax[
id - 1] + mapX[box - 4000 - 1];
217 y =
L1ay[
id - 1] + mapY[box - 4000 - 1];
219 if ((ladd_copy % 2) == 0) {
220 if (mapX[box - 4000 - 1] == 0)
222 else if (mapX[box - 4000 - 1] == 1)
227 if (ladd ==
"SFLX1b" || ladd ==
"SFLY1b") {
228 mapX[3] = mapX[4] = mapX[5] = mapX[6] = 1;
240 x =
L1bx[0] + mapX[box - 5000 - 1];
241 y =
L1by[0] + mapY[box - 5000 - 1];
243 if (ladd_copy == 1) {
248 if (ladd ==
"SFLX1c" || ladd ==
"SFLY1c") {
249 mapX[4] = mapX[5] = mapX[6] = 1;
261 x =
L1cx[0] + mapX[box - 6000 - 1];
262 y =
L1cy[0] + mapY[box - 6000 - 1];
264 if (ladd_copy == 2) {
269 if (ladd ==
"SFLX1d" || ladd ==
"SFLY1d") {
270 mapX[2] = mapX[3] = mapX[4] = mapX[5] = 1;
282 x =
L1dx[0] + mapX[box - 7000 - 1];
283 y =
L1dy[0] + mapY[box - 7000 - 1];
285 if (ladd_copy == 1) {
290 if (ladd ==
"SFLX1e" || ladd ==
"SFLY1e") {
291 mapX[4] = mapX[5] = 1;
303 x =
L1ex[0] + mapX[box - 8000 - 1];
304 y =
L1ey[0] + mapY[box - 8000 - 1];
306 if (ladd_copy == 2) {
311 if (ladd ==
"SFLX3a" || ladd ==
"SFLY3a") {
312 mapX[4] = mapX[5] = mapX[6] = 1;
324 id = (ladd_copy > 3) ? ladd_copy - 3 : 4 - ladd_copy;
326 x =
L3ax[
id - 1] + mapX[box - 9000 - 1];
327 y =
L3ay[
id - 1] + mapY[box - 9000 - 1];
334 if (ladd ==
"SFLX3b" || ladd ==
"SFLY3b") {
335 mapX[4] = mapX[5] = 1;
347 x =
L3bx[0] + mapX[box - 11000 - 1];
348 y =
L3by[0] + mapY[box - 11000 - 1];
350 if (ladd_copy == 1) {
355 if (ladd ==
"SFLX2a" || ladd ==
"SFLY2a") {
356 mapX[3] = mapX[4] = mapX[5] = mapX[6] = 1;
368 id = (ladd_copy > 3) ? 7 - ladd_copy : ladd_copy;
370 x =
L2ax[
id - 1] + mapX[box - 10000 - 1];
371 y =
L2ay[
id - 1] + mapY[box - 10000 - 1];
378 if (ladd ==
"SFLX2b" || ladd ==
"SFLY2b") {
379 mapX[2] = mapX[3] = mapX[4] = mapX[5] = 1;
391 x =
L2bx[0] + mapX[box - 12000 - 1];
392 y =
L2by[0] + mapY[box - 12000 - 1];
394 if (ladd_copy == 2) {
400 if (
zside < 0 && layer == 1)
407 x = (
zside > 0) ? iy : 41 - iy;
417 else if (zside < 0 && y > 20)
419 }
else if (layer == 2) {
422 else if (zside < 0 && x > 20)
429 edm::LogVerbatim(
"EcalGeom") <<
"EcalPreshowerNumberingScheme : zside " << zs <<
":" <<
zside <<
" Ladd " << ladd
430 <<
" ladd_copy: " << ladd_copy <<
" box " << box <<
" x " <<
x <<
" y " <<
y
431 <<
" layer " << layer <<
" strip " <<
strip <<
" UnitID 0x" << std::hex << intIndex
434 for (
int ich = 0; ich < numberOfHierarchyLevels; ich++)