16 int vL2ax[3] = { 4, 6, 10};
17 int vL2ay[3] = {29, 31, 35};
22 int vL3ax[3] = {30, 34, 36};
23 int vL3ay[3] = {35, 31, 29};
28 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};
29 int vL1ay[26] = {21, 25, 21, 33, 29, 25, 21, 21, 25, 21, 31, 27, 32, 28, 31, 27, 25, 21, 21, 33, 29, 25, 21, 25, 21, 21};
43 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};
44 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};
52 for (
int i=0;
i<1; ++
i) {
71 for (
int i=0;
i<3; ++
i) {
78 for (
int i=0;
i<23; ++
i) {
83 for (
int i=0;
i<26; ++
i) {
88 edm::LogInfo(
"EcalGeom") <<
"Creating EcalPreshowerNumberingScheme";
92 edm::LogInfo(
"EcalGeom") <<
"Deleting EcalPreshowerNumberingScheme";
98 uint32_t intIndex = 0;
108 edm::LogWarning(
"EcalGeom") <<
"EcalPreshowerNumberingScheme: Wrong name"
109 <<
" of Presh. Si. Strip : "
120 int x=0,
y=0,ix,iy,
id;
121 int mapX[10] ={0,0,0,0,0,0,0,0,0,0};
int mapY[10] ={0,0,0,0,0,0,0,0,0,0};
125 if(ladd==
"SFLX0a" || ladd==
"SFLY0a" ) {
126 mapX[5] = mapX[6] = mapX[7] = mapX[8] = mapX[9] = 1;
127 mapY[0] = 0; mapY[1] = 1; mapY[2] = 2; mapY[3] = 3; mapY[4] = 4;
128 mapY[5] = 0; mapY[6] = 1; mapY[7] = 2; mapY[8] = 3; mapY[9] = 4;
130 id = (int) ((
float)ladd_copy/2+0.5);
132 x =
L0ax[
id-1] + mapX[box-1000-1];
133 y =
L0ay[
id-1] + mapY[box-1000-1];
135 if ((ladd_copy%2) == 0) {
136 if (mapX[box-1000-1]==0) x += 1;
137 else if (mapX[box-1000-1]==1) x -= 1;
141 if(ladd==
"SFLX0b" || ladd==
"SFLY0b") {
142 mapX[4] = mapX[5] = mapX[6] = mapX[7] = mapX[8] = 1;
143 mapY[0] = 1; mapY[1] = 2; mapY[2] = 3; mapY[3] = 4; mapY[4] = 0;
144 mapY[5] = 1; mapY[6] = 2; mapY[7] = 3; mapY[8] = 4; mapY[9] = 0;
146 x =
L0bx[0] + mapX[box-2000-1];
147 y =
L0by[0] + mapY[box-2000-1];
149 if (ladd_copy == 1) {
154 if(ladd==
"SFLX0c" || ladd==
"SFLY0c") {
155 mapX[5] = mapX[6] = mapX[7] = mapX[8] = 1;
156 mapY[0] = 0; mapY[1] = 1; mapY[2] = 2; mapY[3] = 3; mapY[4] = 4;
157 mapY[5] = 1; mapY[6] = 2; mapY[7] = 3; mapY[8] = 4; mapY[9] = 0;
159 x =
L0cx[0] + mapX[box-3000-1];
160 y =
L0cy[0] + mapY[box-3000-1];
162 if (ladd_copy == 2) {
167 if(ladd==
"SFLX1a" || ladd==
"SFLY1a" ) {
168 mapX[4] = mapX[5] = mapX[6] = mapX[7] = 1;
169 mapY[0] = 0; mapY[1] = 1; mapY[2] = 2; mapY[3] = 3; mapY[4] = 0;
170 mapY[5] = 1; mapY[6] = 2; mapY[7] = 3; mapY[8] = 0; mapY[9] = 0;
172 id = (int) ((
float)ladd_copy/2+0.5);
174 x =
L1ax[
id-1] + mapX[box-4000-1];
175 y =
L1ay[
id-1] + mapY[box-4000-1];
177 if ((ladd_copy%2) == 0) {
178 if (mapX[box-4000-1]==0) x += 1;
179 else if (mapX[box-4000-1]==1) x -= 1;
183 if(ladd==
"SFLX1b" || ladd==
"SFLY1b" ) {
184 mapX[3] = mapX[4] = mapX[5] = mapX[6] = 1;
185 mapY[0] = 1; mapY[1] = 2; mapY[2] = 3; mapY[3] = 0; mapY[4] = 1;
186 mapY[5] = 2; mapY[6] = 3; mapY[7] = 0; mapY[8] = 0; mapY[9] = 0;
188 x =
L1bx[0] + mapX[box-5000-1];
189 y =
L1by[0] + mapY[box-5000-1];
191 if (ladd_copy == 1) {
196 if(ladd==
"SFLX1c" || ladd==
"SFLY1c" ) {
197 mapX[4] = mapX[5] = mapX[6] = 1;
198 mapY[0] = 0; mapY[1] = 1; mapY[2] = 2; mapY[3] = 3; mapY[4] = 1;
199 mapY[5] = 2; mapY[6] = 3; mapY[7] = 0; mapY[8] = 0; mapY[9] = 0;
201 x =
L1cx[0] + mapX[box-6000-1];
202 y =
L1cy[0] + mapY[box-6000-1];
204 if (ladd_copy == 2) {
209 if(ladd==
"SFLX1d" || ladd==
"SFLY1d" ) {
210 mapX[2] = mapX[3] = mapX[4] = mapX[5] = 1;
211 mapY[0] = 2; mapY[1] = 3; mapY[2] = 0; mapY[3] = 1; mapY[4] = 2;
212 mapY[5] = 3; mapY[6] = 0; mapY[7] = 0; mapY[8] = 0; mapY[9] = 0;
214 x =
L1dx[0] + mapX[box-7000-1];
215 y =
L1dy[0] + mapY[box-7000-1];
217 if (ladd_copy == 1) {
222 if(ladd==
"SFLX1e" || ladd==
"SFLY1e") {
223 mapX[4] = mapX[5] = 1;
224 mapY[0] = 0; mapY[1] = 1; mapY[2] = 2; mapY[3] = 3; mapY[4] = 2;
225 mapY[5] = 3; mapY[6] = 0; mapY[7] = 0; mapY[8] = 0; mapY[9] = 0;
227 x =
L1ex[0] + mapX[box-8000-1];
228 y =
L1ey[0] + mapY[box-8000-1];
230 if (ladd_copy == 2) {
235 if(ladd==
"SFLX3a" || ladd==
"SFLY3a" ) {
236 mapX[4] = mapX[5] = mapX[6] = 1;
237 mapY[0] = 0; mapY[1] = 1; mapY[2] = 2; mapY[3] = 3; mapY[4] = 0;
238 mapY[5] = 1; mapY[6] = 2; mapY[7] = 0; mapY[8] = 0; mapY[9] = 0;
240 id = (ladd_copy>3)? ladd_copy-3 : 4-ladd_copy;
242 x =
L3ax[
id-1] + mapX[box-9000-1];
243 y =
L3ay[
id-1] + mapY[box-9000-1];
250 if(ladd==
"SFLX3b" || ladd==
"SFLY3b") {
251 mapX[4] = mapX[5] = 1;
252 mapY[0] = 0; mapY[1] = 1; mapY[2] = 2; mapY[3] = 3; mapY[4] = 0;
253 mapY[5] = 1; mapY[6] = 0; mapY[7] = 0; mapY[8] = 0; mapY[9] = 0;
255 x =
L3bx[0] + mapX[box-11000-1];
256 y =
L3by[0] + mapY[box-11000-1];
258 if (ladd_copy == 1) {
263 if(ladd==
"SFLX2a" || ladd==
"SFLY2a") {
264 mapX[3] = mapX[4] = mapX[5] = mapX[6] = 1;
265 mapY[0] = 0; mapY[1] = 1; mapY[2] = 2; mapY[3] = 0; mapY[4] = 1;
266 mapY[5] = 2; mapY[6] = 3; mapY[7] = 0; mapY[8] = 0; mapY[9] = 0;
268 id = (ladd_copy>3)? 7-ladd_copy : ladd_copy;
270 x =
L2ax[
id-1] + mapX[box-10000-1];
271 y =
L2ay[
id-1] + mapY[box-10000-1];
278 if(ladd==
"SFLX2b" || ladd==
"SFLY2b") {
279 mapX[2] = mapX[3] = mapX[4] = mapX[5] = 1;
280 mapY[0] = 0; mapY[1] = 1; mapY[2] = 0; mapY[3] = 1; mapY[4] = 2;
281 mapY[5] = 3; mapY[6] = 0; mapY[7] = 0; mapY[8] = 0; mapY[9] = 0;
283 x =
L2bx[0] + mapX[box-12000-1];
284 y =
L2by[0] + mapY[box-12000-1];
286 if (ladd_copy == 2) {
292 if (zside<0 && layer == 1) x = 41 -
x;
298 x = (zside>0) ? iy : 41 - iy;
306 if (zside>0 &&
y<=20)
308 else if (zside<0 && y>20)
310 }
else if (layer == 2) {
311 if (zside>0 && x<=20)
313 else if (zside<0 && x>20)
319 LogDebug(
"EcalGeom") <<
"EcalPreshowerNumberingScheme : zside "<<zside<<
" Ladd "<< ladd <<
" ladd_copy: "<<ladd_copy<<
" box "<<box<<
" x "<<x<<
" y "<<
y<<
" layer "<<layer<<
" strip " << strip<<
" UnitID 0x" << std::hex << intIndex << std::dec;
321 for (
int ich = 0; ich <
level; ich++) {
std::string const & getLevelName(int level) const
int getCopyNumber(int level) const
virtual uint32_t getUnitID(const EcalBaseNumber &baseNumber) const
uint32_t rawId() const
get the raw id
~EcalPreshowerNumberingScheme()
EcalPreshowerNumberingScheme()