29 cout<<
"Emc mapper version 0 does not exist"<<endl;
75 cout<<
"Emc Mapper version "<<mapVersion<<
" is not defined"<<endl;
83 cout<<
"Emc mapper should be initialised first with PndEmcMapper::Init()"<<endl;
91 std::map<Int_t,PndEmcTwoCoordIndex* > newMapp = newMapper->
GetTciMap();
100 for(std::map<Int_t,PndEmcTwoCoordIndex* >::iterator iter =
fIntTwoCoordMap.begin();
102 delete (*iter).second;
111 Int_t iTheta, iPhi, detId, detId_tmp, iX, iY;
112 iTheta = iPhi = detId = detId_tmp =iX = iY = 0;
116 for (Int_t module=1; module<=2; module++)
121 for (Int_t crystal=1; crystal<=10;crystal++)
122 for (Int_t copy=1; copy<=16;copy++)
124 if ((copy==1 || copy==9) && (crystal>=4 && crystal<=6) && (
row<=3))
continue;
125 iPhi=(11-crystal)+(copy-1)*10;
128 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
136 for (Int_t crystal=1; crystal<=10;crystal++)
137 for (Int_t copy=1; copy<=16;copy++)
139 iPhi=(11-crystal)+(copy-1)*10;
142 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
153 Int_t iTheta, iPhi, detId, detId_tmp, iX, iY;
154 iTheta = iPhi = detId = detId_tmp =iX = iY = 0;
158 for (Int_t module = 1; module <= 2; module++) {
161 for (Int_t crystal = 1; crystal <= 10; crystal++) {
162 for (Int_t copy = 1; copy <= 16; copy++) {
163 if ((copy==1 || copy==9) && (crystal>=3 && crystal<=8) && (
row<=3))
continue;
164 iPhi = (11-crystal)+(copy-1)*10;
167 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
176 for (Int_t crystal = 1; crystal <= 10; crystal++) {
177 for (Int_t copy=1; copy<=16;copy++) {
178 if ((copy==1 || copy==9) && (crystal>=3 && crystal<=8) && (
row<=3))
continue;
179 iPhi = (11-crystal)+(copy-1)*10;
182 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
195 Int_t detId, detId_tmp, iX, iY;
196 detId = detId_tmp =iX = iY = 0;
200 for (Int_t crystal=1; crystal<=40;crystal++)
201 for (Int_t copy=1; copy<=4;copy++)
203 if (copy==1) { iX = -
row+1; iY = crystal; }
204 if (copy==2) { iX = -
row+1; iY = -crystal+1; }
205 if (copy==3) { iX =
row; iY = -crystal+1; }
206 if (copy==4) { iX =
row; iY = crystal; }
208 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
218 Int_t detId, detId_tmp, iX, iY;
219 detId = detId_tmp =iX = iY = 0;
223 for (Int_t crystal=1; crystal<=36;crystal++)
224 for (Int_t copy=1; copy<=4;copy++)
226 if (copy==1) { iX = -
row+1; iY = crystal; }
227 if (copy==2) { iX = -
row+1; iY = -crystal+1; }
228 if (copy==3) { iX =
row; iY = -crystal+1; }
229 if (copy==4) { iX =
row; iY = crystal; }
231 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
241 Int_t detId, detId_tmp, iX, iY;
242 detId = detId_tmp =iX = iY = 0;
249 detId = module*100000000 + (
row+37)*1000000 + (
col+36);
266 Int_t detId, detId_tmp, iX, iY;
267 detId = detId_tmp =iX = iY = 0;
270 for (Int_t crystal=1; crystal<=18;crystal++)
271 for (Int_t copy=1; copy<=4;copy++)
273 if (copy==1) { iX = -
row+1; iY = crystal; }
274 if (copy==2) { iX = -
row+1; iY = -crystal+1; }
275 if (copy==3) { iX =
row; iY = -crystal+1; }
276 if (copy==4) { iX =
row; iY = crystal; }
278 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
290 Int_t detId, detId_tmp, iX, iY;
291 detId = detId_tmp =iX = iY = 0;
295 for (Int_t crystal=1; crystal<=16;crystal++)
296 for (Int_t copy=1; copy<=4;copy++)
298 if (copy==1) { iX = -
row+1; iY = crystal; }
299 if (copy==2) { iX = -
row+1; iY = -crystal+1; }
300 if (copy==3) { iX =
row; iY = -crystal+1; }
301 if (copy==4) { iX =
row; iY = crystal; }
303 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
313 Int_t detId, iX, iY, iXrel, iYrel, rowc;
314 detId = iX = iY = iXrel = iYrel = rowc = 0;
320 for (Int_t crystal=0; crystal<16;crystal++){
324 iXrel = 4*(
row%3) + (crystal%4) - 6;
325 iYrel = -4*(
row/3) - (crystal/4) + 14;
330 iXrel = 4*(rowc%2) + (crystal%4) + 6;
331 iYrel = -4*(rowc/2) - (crystal/4) + 13;
335 for (Int_t copy=0; copy<4;copy++){
337 if (copy==0) { iX = iXrel ; iY = iYrel ; }
338 if (copy==1) { iX = -iYrel-1; iY = iXrel ; }
339 if (copy==2) { iX = -iXrel-1; iY = -iYrel-1; }
340 if (copy==3) { iX = iYrel ; iY = -iXrel-1; }
342 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
355 Int_t detId, detId_tmp, iX, iY;
356 detId = detId_tmp =iX = iY = 0;
360 for (Int_t crystal=1; crystal<=7;crystal++)
361 for (Int_t copy=1; copy<=4;copy++)
363 if (copy==1) { iX = -
row+1; iY = crystal; }
364 if (copy==2) { iX = -
row+1; iY = -crystal+1; }
365 if (copy==3) { iX =
row; iY = -crystal+1; }
366 if (copy==4) { iX =
row; iY = crystal; }
368 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
380 Int_t detId, detId_tmp, iX, iY;
381 detId = detId_tmp =iX = iY = 0;
385 for (Int_t crystal=1; crystal<=54;crystal++)
390 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
399 Int_t detId, detId_tmp, iX, iY;
400 detId = detId_tmp =iX = iY = 0;
403 for (Int_t crystal=1; crystal<=5;crystal++)
409 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
425 for(Int_t crystal=1;crystal<=10;crystal++)
427 detId = module*100000000 +
row*1000000 + copy*10000 + crystal;
448 Int_t module,
row,copy,crystal,detId;
449 module = row = copy = crystal = detId = 0;
455 crystal=10 - (iPhi-1)%10;
457 else if ((iTheta>29)&&(iTheta<73))
462 crystal=10 - (iPhi-1)%10;
466 if (iTheta>200 && iTheta<300)
470 if (iTheta<250 && iPhi>=250) {
471 row = (iPhi-250)+1+37;
472 crystal = -(iTheta-250)+36;
474 else if (iTheta<250 && iPhi<250) {
476 crystal = -(iTheta-250)+36;
478 else if (iTheta>=250 && iPhi>=250) {
479 row = (iPhi-250)+1+37;
480 crystal = -(iTheta-250+1)+36;
482 else if (iTheta>=250 && iPhi<250) {
484 crystal = -(iTheta-250+1)+36;
489 if ((iTheta>300)&&(iTheta<400))
492 if ((iTheta<=350)&& (iPhi>350))
494 copy = 1; row = 1-(iTheta-350); crystal = iPhi-350;
496 if ((iTheta<=350)&& (iPhi<=350))
498 copy = 2; row = 1-(iTheta-350); crystal = 1-(iPhi-350);
500 if ((iTheta>350)&& (iPhi<=350))
502 copy = 3; row = (iTheta-350); crystal = 1-(iPhi-350);
504 if ((iTheta>350)&& (iPhi>350))
506 copy = 4; row = (iTheta-350); crystal = iPhi-350;
509 if ((iTheta>400)&&(iTheta<500))
512 if ((iTheta<=450)&& (iPhi>450))
514 copy = 1; row = 1-(iTheta-450); crystal = iPhi-450;
516 if ((iTheta<=450)&& (iPhi<=450))
518 copy = 2; row = 1-(iTheta-450); crystal = 1-(iPhi-450);
520 if ((iTheta>450)&& (iPhi<=450))
522 copy = 3; row = (iTheta-450); crystal = 1-(iPhi-450);
524 if ((iTheta>450)&& (iPhi>450))
526 copy = 4; row = (iTheta-450); crystal = iPhi-450;
529 if ((iTheta>500)&&(iTheta<600))
537 detId = module*100000000 + row*1000000 + copy*10000 + crystal;
const std::map< Int_t, PndEmcTwoCoordIndex * > & GetTciMap()
stores crystal index coordinates (x,y) or (theta,phi)
PndEmcTwoCoordIndex * GetTCI(Int_t DetectorId)
std::map< Int_t, PndEmcTwoCoordIndex * > fIntTwoCoordMap
static void Init(Int_t MapVersion)
Int_t GetDetId(Int_t iTheta, Int_t iPhi)
static PndEmcMapper * _instance
PndEmcMapperGeoProto60Root()
static PndEmcMapper * Instance()