127 #include "StEmcGeom.h"
133 #include "StEmcUtil/others/emcInternalDef.h"
139 const Float_t perr=0.01;
140 Float_t rmin, rsmdEta, rsmdPhi;
143 *StEmcGeom::instance(
const Int_t det)
145 return getEmcGeom(det);
148 *StEmcGeom::getEmcGeom(
const Int_t det)
150 if(det>=1 && det<=4) {
151 Int_t indDet = det - 1;
152 if(mGeom[indDet] == 0) mGeom[indDet] =
new StEmcGeom(det);
153 return mGeom[indDet];
159 *StEmcGeom::instance(
const Char_t *cdet)
161 return getEmcGeom(cdet);
164 *StEmcGeom::getEmcGeom(
const Char_t *cdet)
166 Int_t det=getDetNumFromName(cdet);
167 return getEmcGeom(det);
172 *StEmcGeom::instance(
const Int_t det,
const Char_t* mode)
174 return getEmcGeom(det,mode);
177 *StEmcGeom::getEmcGeom(
const Int_t det,
const Char_t* mode)
179 if(det>=1 && det<=4) {
180 Int_t indDet = det - 1;
181 if(mGeom[indDet] == 0) mGeom[indDet] =
new StEmcGeom(det, mode);
182 return mGeom[indDet];
187 StEmcGeom::StEmcGeom(
const Int_t det)
192 StEmcGeom::StEmcGeom(
const Char_t *cdet)
194 Int_t det=getDetNumFromName(cdet);
195 if(det) initGeom(det);
199 StEmcGeom::getDetNumFromName(
const Char_t *cdet)
202 if (!strcmp(cdet,
"bemc")) {det=1;}
203 else if(!strcmp(cdet,
"bprs")) {det=2;}
204 else if(!strcmp(cdet,
"bsmde")){det=3;}
205 else if(!strcmp(cdet,
"bsmdp")){det=4;}
206 else if(!strcmp(cdet,
"eemc")) {det=5;}
207 else if(!strcmp(cdet,
"eprs")) {det=6;}
208 else if(!strcmp(cdet,
"esmde")){det=7;}
209 else if(!strcmp(cdet,
"esmdp")){det=8;}
210 else {LOG_ERROR << Form(
" StEmcGeom: Bad value of cdet %s ", cdet) << endm;}
214 StEmcGeom::~StEmcGeom()
216 mGeom[mDetector] = 0;
219 void StEmcGeom::initGeom(
const Int_t det)
229 mPhiOffset.Set(2); mPhiStep.Set(2); mPhiBound.Set(2);
231 defineDefaultCommonConstants();
232 defineModuleGridOnPhi();
234 mMaxAdc = 1024;
if(det==1) mMaxAdc = 4096;
265 LOG_FATAL << Form(
" StEmcGeom: Bad value of mDetector %i ", mDetector) << endm;
271 StEmcGeom::StEmcGeom(
const Int_t det,
const Char_t *mode)
273 mMode=mode; mMode.ToLower();
274 if(mMode ==
"geant"){
275 getGeantGeometryTable();
277 else mMode.Append(
" : wrong option !!! ");
279 if(!(mMode==
"geant")){
280 LOG_WARN << Form(
"<W> Something wrong(%s)=> using default",mMode.Data()) << endm;
285 LOG_INFO << Form(
"<I> Used Geant Geometry for BEMC, version %5.2f ",mCalg_st->version) << endm;
287 mPhiOffset.Set(2); mPhiStep.Set(2); mPhiBound.Set(2);
289 defineCommonConstants();
290 defineModuleGridOnPhi();
292 Float_t currentDepth;
298 currentDepth = mRadius+mCalg_st->scintthk[0]+2.*mCalg_st->abpapthk;
299 mYWidth = currentDepth*tan(mPhiStepHalf)-mCalg_st->crackwd;
304 mYWidth = mCalg_st->smalfwdh*2.;
309 mYWidth = mCalg_st->smalfwdh*2.;
323 LOG_ERROR << Form(
" StEmcGeom: Bad value of mDetector %i ", mDetector) << endm;
328 StEmcGeom::defineDefaultCommonConstants()
335 mPhiOffset[0] = (75.-3.)/ 180. * C_PI;
336 mPhiOffset[1] = (105.+3.)/180. * C_PI;
337 mPhiStep[0] = -C_2PI /(mNModule/2);
338 mPhiStep[1] = -mPhiStep[0];
340 mPhiBound[0] = 75. /180. * C_PI;
341 mPhiBound[1] = 105./180. * C_PI;
342 mPhiStepHalf = 3. * C_PI/180.;
346 StEmcGeom::defineCommonConstants()
353 mPhiStepHalf = 360. / (Float_t)mNModule;
358 mPhiOffset[0] = (75.-3.)/ 180. * C_PI;
359 mPhiOffset[1] = (105.+3.)/180. * C_PI;
361 mPhiStep[0] = -toRad(2.*mPhiStepHalf);
362 mPhiStep[1] = -mPhiStep[0];
363 mPhiStepHalf = toRad(mPhiStepHalf);
365 rmin = mCalr_st->rmin;
366 Int_t nsuper=(Int_t)mCalg_st->nsuper;
367 Int_t nsmd=(Int_t)mCalg_st->nsmd;
368 for(Int_t i=0; i<2; i++){
369 lW[i] = mCalg_st->scintthk[i]+mCalg_st->absorthk+2.*mCalg_st->abpapthk;
372 rsmdEta=rmin+2.*(lW[0]*nsuper+lW[1]*(nsmd-nsuper));
374 smdW=2.*(mCalg_st->g10sbthk+mCalg_st->smalfthk+mCalg_st->abpapthk);
376 rsmdPhi=rsmdEta + 2.*smdW;
380 StEmcGeom::defineModuleGridOnPhi()
387 mPhiModule.Set(mNModule);
389 for(Int_t i=0; i<mNModule/2; i++){
391 Double_t phiW = mPhiOffset[im] + mPhiStep[im]*i;
392 while(phiW >= C_PI) phiW -= C_2PI;
393 while(phiW < -C_PI) phiW += C_2PI;
394 if(phiW > (C_PI-0.0001)) phiW = -C_PI;
395 mPhiModule[i] = phiW;
396 Int_t cond =
getBin(mPhiModule[i], etaw, mw,ew,sw);
397 if (!cond) mPhiModule[mw-1] = phiW;
398 else {LOG_WARN <<
"<W> Something wrong in StEmcGeom::defineModuleGridOnPhi()" << endm;}
403 StEmcGeom::initBEMCorBPRS()
405 if(mMode.CompareTo(
"geant") == 0) {
406 mNEta = (Int_t)mCalg_st->netat;
407 mNSub = (Int_t)mCalg_st->nsub;
409 else {mNEta = 20; mNSub= 2;}
411 mNes = mNEta * mNSub;
412 mNRaw = mNes * mNModule;
413 mZlocal.Set(mNEta); mEta.Set(mNEta);
414 mYlocal.Set(mNSub); mPhi.Set(mNSub);
417 mEtaB.Set(mNEta+1); Int_t i;
419 for(i=0; i<mNEta; i++) {mEtaB[i] = 0.05*i;} mEtaB[mNEta]=mEtaMax; mEtaB[0]=mEtaMin;
421 for(i=0; i< mNEta; i++){
422 mEta[i] = (mEtaB[i+1] + mEtaB[i])/2.;
423 mZlocal[i] = mRadius * sinh(mEta[i]);
429 mYlocal[0] = -mYWidth/2.; mYlocal[1] = mYWidth/2.;
432 for(Int_t i=0;i<mNSub; i++) mPhi[i] = atan2(mYlocal[i],mRadius);
434 mYB.Set(mNSub+1); mPhiB.Set(mNSub+1);
438 for(Int_t i=0; i<mNSub+1; i++) mPhiB[i] = atan2(mYB[i],mRadius);
442 void StEmcGeom::initBSMDE(){
443 Float_t smetawdh, seta1wdh, seta2wdh, seta12wdh;
444 if(mMode.CompareTo(
"geant") == 0) {
445 mNEta = (Int_t)mCalg_st->netfirst + (Int_t)mCalg_st->netsecon;
447 smetawdh = mCalg_st->smetawdh;
448 seta1wdh = mCalg_st->seta1wdh;
449 seta2wdh = mCalg_st->seta2wdh;
450 seta12wdh= mCalg_st->set12wdh;
461 mNes = mNEta * mNSub;
462 mNRaw = mNes * mNModule;
463 mZlocal.Set(mNEta); mEta.Set(mNEta);
464 mYlocal.Set(mNSub); mPhi.Set(mNSub);
470 Float_t shift1, shift2;
471 shift1 = 2.*smetawdh + seta1wdh;
473 shift2 = shift1 + (seta1wdh+seta12wdh)*2*74 + (seta1wdh+seta12wdh)
474 + (seta2wdh+seta12wdh);
476 for(i=0; i<mNEta; i++) {
478 mZlocal[i] = shift1 + (seta1wdh+seta12wdh)*2*i;
479 zb[i+1] = zb[i] + (seta1wdh+seta12wdh)*2;
482 mZlocal[i] = shift2 + (seta2wdh+seta12wdh)*2*(i-75);
483 zb[i+1] = zb[i] + (seta2wdh+seta12wdh)*2;
485 mEta[i] = -::log(tan(atan2(mRadius,mZlocal[i])/2.0));
486 mEtaB[i] = -::log(tan(atan2(mRadius,zb[i])/2.0));
488 mEtaB[mNEta] = -::log(tan(atan2(mRadius,zb[mNEta])/2.0));
491 mEtaMax = mEtaB[mNEta];
494 mYlocal.Set(mNSub); mYlocal[0] = 0.0;
495 mPhi.Set(mNSub); mPhi[0] = 0.0;
497 mYB.Set(mNSub+1); mPhiB.Set(mNSub+1);
498 mYB[0] = -mYWidth/2.;
500 for(Int_t i=0; i<mNSub+1; i++) mPhiB[i] = atan2(mYB[i],mRadius);
503 void StEmcGeom::initBSMDP()
505 Float_t sphiwdh, sphidwdh, shift, smdgaswdh;
507 if(mMode.CompareTo(
"geant") == 0) {
508 mNEta = (Int_t)mCalg_st->netasmdp;
509 mNSub = (Int_t)mCalg_st->nphistr;
510 sphiwdh = mCalg_st->sphiwdh;
511 sphidwdh = mCalg_st->sphidwdh;
512 smdgaswdh= mCalg_st->smgaswdh;
522 shift = - mYWidth/2. + smdgaswdh + sphiwdh;
524 mNes = mNEta * mNSub;
525 mNRaw = mNes * mNModule;
526 mZlocal.Set(mNEta); mEta.Set(mNEta);
527 mYlocal.Set(mNSub); mPhi.Set(mNSub);
530 mEtaB.Set(mNEta+1); Int_t i;
532 for(i=0; i<mNEta; i++) {mEtaB[i] = 0.1*i;}
533 mEtaB[mNEta]=mEtaMax;
535 for(i=0; i< mNEta; i++){
536 mEta[i] = (mEtaB[i+1] + mEtaB[i])/2.;
537 mZlocal[i] = mRadius * sinh(mEta[i]);
542 mYlocal.Set(mNSub); mPhi.Set(mNSub);
543 mYB.Set(mNSub+1); mPhiB.Set(mNSub+1);
544 mYB[0] = -mYWidth/2. + smdgaswdh;
546 if(mMode.CompareTo(
"geant") == 0){
549 for(i=n2+1; i<mNSub; i++){
550 mYlocal[i] = (sphiwdh+sphidwdh)*2*(i-n2);
551 mYlocal[mNSub-i-1] = -mYlocal[i];
553 for(i=0; i<mNSub; i++){
554 mPhi[i] = atan2(mYlocal[i], mRadius);
558 for(i=0; i<mNSub; i++){
559 mYlocal[i] = shift + (sphiwdh+sphidwdh)*2*i;
560 mPhi[i] = atan2(mYlocal[i], mRadius);
561 if(i==0 || i==(mNSub-1)) mYB[i+1] = mYB[i] + sphiwdh*2. + sphidwdh;
562 else mYB[i+1] = mYB[i] + (sphiwdh + sphidwdh)*2.;
563 mPhiB[i] = atan2(mYB[i], mRadius);
565 mPhiB[mNSub] = atan2(mYB[mNSub], mRadius);
569 Int_t StEmcGeom::getVolIdBemc(
const Int_t ivid, Int_t &module,Int_t &eta,Int_t &sub, Int_t &detector)
574 static Int_t emcIvid[5]={10000000,100000,100,10,1};
575 Int_t emcChid[5], i, ividw, rl, phi, dep;
577 if(mCalg_st == 0) getGeantGeometryTable();
581 emcChid[i] = ividw/emcIvid[i];
582 ividw = ividw%emcIvid[i];
592 detector = BPRS;
break;
594 detector = BEMC;
break;
596 LOG_WARN << Form(
"<W> StEmcGeom::getVolIdBemc => wrong value of dep %i ",dep) << endm;
601 phi += Int_t((75.-mCalg_st->shift[0])/6.);
602 while (phi<=0) phi+=60;
603 while (phi>=61) phi-=60;
609 phi += Int_t((105.-mCalg_st->shift[1])/6.);
610 while (phi<=0) phi+=60;
611 while (phi>=61) phi-=60;
616 LOG_ERROR << Form(
"<E> getVolIdBemc -- error decoding BEMC Geant volume Id %i; rl=%i", ivid, rl) << endm;
621 LOG_ERROR << Form(
"<E> getVolIdBemc -- error decoding BEMC Geant volume Id %i=>%i", ivid, ividw) << endm;
629 Int_t StEmcGeom::getVolIdBsmd(
const Int_t ivid, Int_t &module,Int_t &eta,Int_t &sub, Int_t &detector)
633 static Int_t smdIvid[5]={100000000,1000000,1000,100,1};
634 Int_t smdChid[5], i, ividw, rl, phi, t, strip;
636 if(mCalg_st == 0) getGeantGeometryTable();
640 smdChid[i] = ividw/smdIvid[i];
641 ividw = ividw%smdIvid[i];
651 phi += Int_t((75. - mCalg_st->shift[0])/6.);
652 while (phi<=0) phi+=60;
653 while (phi>=61) phi-=60;
658 phi += Int_t((105. - mCalg_st->shift[1])/6.);
659 while (phi<=0) phi+=60;
660 while (phi>=61) phi-=60;
664 LOG_ERROR << Form(
"<E> getVolIdBsmd -- error decoding BSMD Geant volume Id %i; rl=%i", ivid, rl) << endm;
693 LOG_ERROR << Form(
"<E> getVolIdBsmd: Type mismatch %i ",t) << endm;
698 LOG_ERROR << Form(
"<E> getVolIdBsmd -- error decoding BSMD Geant volume Id %i=>%i", ivid, ividw) << endm;
706 Int_t StEmcGeom::getVolId(
const Int_t ivid, Int_t &module,Int_t &eta,Int_t &sub, Int_t &det)
708 if (mDetector==1||mDetector==2)
return getVolIdBemc(ivid,module,eta,sub,det);
709 else if(mDetector==3||mDetector==4)
return getVolIdBsmd(ivid,module,eta,sub,det);
711 LOG_ERROR << Form(
"<E> getVolId -- wrong detectot number %i ",mDetector) << endm;
716 void StEmcGeom::initEEMCorEPRS()
721 mNes = mNEta * mNSub;
722 mNRaw = mNes * mNModule;
725 mZlocal.Set(mNEta); mEta.Set(mNEta);
726 mYlocal.Set(mNSub); mPhi.Set(mNSub);
729 mEtaB.Set(mNEta+1); Int_t i;
731 for(i=0; i<mNEta; i++) {mEtaB[i] = 0.05*i;} mEtaB[mNEta]=0.99;
733 for(i=0; i< mNEta; i++){
734 mEta[i] = (mEtaB[i+1] + mEtaB[i])/2.;
735 mZlocal[i] = mRadius * sinh(mEta[i]);
740 mYlocal[0] = mYWidth/2; mYlocal[1] = - mYlocal[0];
743 mPhi[0] = atan2(mYWidth/2,mRadius); mPhi[1] = -mPhi[0];
748 void StEmcGeom::initESMDE(){
752 mNes = mNEta * mNSub;
753 mNRaw = mNes * mNModule;
756 mZlocal.Set(mNEta); mEta.Set(mNEta);
757 mYlocal.Set(mNSub); mPhi.Set(mNSub);
761 Float_t smetawdh=0.9806;
762 Float_t seta1wdh=0.7277, seta2wdh=0.9398, seta12wdh=0.0406;
763 Float_t shift1, shift2;
764 shift1 = 2.*smetawdh + seta1wdh;
766 shift2 = shift1 + (seta1wdh+seta12wdh)*2*74 + (seta1wdh+seta12wdh)
767 + (seta2wdh+seta12wdh);
769 for(i=0; i<mNEta; i++) {
770 if(i<mNEta/2) mZlocal[i] = shift1 + (seta1wdh+seta12wdh)*2*i;
771 else mZlocal[i] = shift2 + (seta2wdh+seta12wdh)*2*(i-75);
772 mEta[i] = -::log(tan(atan2(mRadius,mZlocal[i])/2.0));
776 mYlocal.Set(mNSub); mYlocal[0] = 0.0;
778 mPhi.Set(mNSub); mPhi[0] = 0.0;
784 void StEmcGeom::initESMDP()
789 mNes = mNEta * mNSub;
790 mNRaw = mNes * mNModule;
793 mZlocal.Set(mNEta); mEta.Set(mNEta);
794 mYlocal.Set(mNSub); mPhi.Set(mNSub);
797 mEtaB.Set(mNEta+1); Int_t i;
799 for(i=0; i<mNEta; i++) {mEtaB[i] = 0.1*i;}
802 for(i=0; i< mNEta; i++){
803 mEta[i] = (mEtaB[i+1] + mEtaB[i])/2.;
804 mZlocal[i] = mRadius * sinh(mEta[i]);
809 mYlocal.Set(mNSub); mPhi.Set(mNSub);
811 Float_t sphiwdh = 0.668;
812 Float_t sphidwdh = 0.07874;
813 Float_t shift = mYWidth/2. - 0.295 - sphiwdh;
815 for(i=0; i<mNSub; i++){
816 mYlocal[i] = shift - (sphiwdh+sphidwdh)*2*i;
817 mPhi[i] = atan2(mYlocal[i], mRadius);
821 void StEmcGeom::printGeom()
const
823 cout<<
" mMode "<<mMode.Data()<<endl;
824 cout<<
" mDetector "<<mDetector<<endl;
825 cout<<
" mNModule "<<mNModule<<endl;
826 cout<<
" mNEta "<<mNEta<<endl;
827 cout<<
" mNSub "<<mNSub<<endl;
828 cout<<
" mNes "<<mNes<<endl;
829 cout<<
" mNRaw "<<mNRaw<<endl;
830 cout<<
" mRadius "<<mRadius<<endl;
831 cout<<
" mYWidth "<<mYWidth<<endl;
832 cout<<
" mEtaMin "<<mEtaMin<<endl;
833 cout<<
" mEtaMax "<<mEtaMax<<endl;
834 cout<<
" mPhiOffset "<<mPhiOffset[0]<<
"("<<toDeg(mPhiOffset[0])<<
") "
835 <<mPhiOffset[1]<<
"("<<toDeg(mPhiOffset[0])<<
")"<<endl;
836 cout<<
" mPhiStep "<<mPhiStep[0]<<
"("<<toDeg(mPhiStep[0])<<
") "
837 <<mPhiStep[1]<<
"("<<toDeg(mPhiStep[1])<<
")"<<endl;
838 cout<<
" Max ADC "<<mMaxAdc<<endl;
841 cout<<
"\n Z grid and Eta grid "<<endl;
842 cout<<
" mEtaB[0] "<<mEtaB[0]<<endl;
843 for(i=0; i<mNEta; i++){
844 printf(
" i %3i Zl %7.3f Eta %8.5f mEtaB %7.5f\n"
845 , i, mZlocal[i], mEta[i], mEtaB[i+1]);
848 cout<<
"\n Y grid and Phi grid "<<endl;
850 printf(
" mYB %7.3f mPhiB %9.5f \n", mYB[0], mPhiB[0]);
851 for(i=0; i<mNSub; i++){
852 printf(
" i %2i Yl %7.3f Phi %9.5f ", i, mYlocal[i], mPhi[i]);
853 printf(
" mYB %7.3f mPhiB %9.5f \n", mYB[i+1], mPhiB[i+1]);
855 cout<<
"\n Phi grid of center of modules in STAR system\n";
856 cout<<
" =============================================\n";
859 for(i=0; i<mNModule/2; i++){
860 printf(
" %3i phi %10.7f (%6.1f)",
861 i+1,mPhiModule[i],mPhiModule[i]*C_DEG_PER_RAD);
862 Int_t cond =
getBin(mPhiModule[i], etaw, mw,ew,sw);
864 printf(
" => %3i phi %10.7f (%6.1f)",
865 mw,mPhiModule[mw-1],mPhiModule[mw-1]*C_DEG_PER_RAD);
869 cout<<
"\n == "<<endl;
870 for(Int_t i=0;i<4; i++){
871 cout<<
" Pointer for det = "<<i+1<<
" -> "<<mGeom[i]<<endl;
875 void StEmcGeom::compare(
const StEmcGeom &g, Bool_t key=kFALSE)
const
879 if(mDetector==g.Detector()) {
880 printf(
" mMode %10s | %10s \n", mMode.Data(), g.Mode()->Data());
881 printf(
"---------------------------------------------------\n");
882 if(mNModule != g.NModule() || key)
883 printf(
" mNModule %10i | %10i\n",mNModule,g.NModule());
884 if(mNEta != g.NEta() || key)
885 printf(
" mNEta %10i | %10i\n",mNEta,g.NEta());
886 if(mNSub != g.NSub() || key)
887 printf(
" mNSub %10i | %10i\n",mNSub,g.NSub());
888 if(mNes != g.Nes() || key)
889 printf(
" mNes %10i | %10i\n",mNes,g.Nes());
890 if(mNRaw != g.NRaw() || key)
891 printf(
" mNRaw %10i | %10i\n",mNRaw,g.NRaw());
893 err=relativeError(mRadius,g.Radius());
895 printf(
" mRadius %10.3f | %10.3f",mRadius,g.Radius());
899 err=relativeError(mYWidth,g.YWidth());
900 if(err>perr || key) {
901 printf(
" mYWidth %10.3f | %10.3f",mYWidth,g.YWidth());
905 err=relativeError(mEtaMax,g.EtaMax());
906 if(err>perr || key) {
907 printf(
" mEtaMax %10.3f | %10.3f",mEtaMax,g.EtaMax());
912 err=relativeError(mPhiOffset[i],g.PhiOffset()[i]);
914 printf(
" mPhiOffset[%1i] %7.3f | %10.3f",i,mPhiOffset[i],g.PhiOffset()[i]);
919 err=relativeError(mPhiStep[i],g.PhiStep()[i]);
921 printf(
" mPhiStep[%1i] %7.3f | %10.3f",i,mPhiStep[i],g.PhiStep()[i]);
925 printf(
"\n Phi grid for center of module in STAR system mNModule=%i\n",mNModule);
926 for(i=0; i<mNModule; i++){
927 err=relativeError(mPhiModule[i],g.PhiModule()[i]);
929 printf(
" %3i phi %7.2f | %10.2f",i,toDeg(mPhiModule[i])
930 ,toDeg(g.PhiModule()[i]));
935 printf(
"\n Z grid and Eta grid => mNEta=%i\n",mNEta);
936 for(i=0; i<mNEta; i++){
937 err=relativeError(mZlocal[i], g.Zlocal()[i]);
939 printf(
" %3i Zl %7.2f | %10.2f || ",i, mZlocal[i], g.Zlocal()[i]);
940 printf(
"Eta %7.3f | %7.3f",mEta[i], g.Eta()[i]);
945 printf(
"\n Y grid and Phi grid => mNSub=%i\n",mNSub);
946 for(i=0; i<mNSub; i++){
947 err=relativeError(mYlocal[i], g.Ylocal()[i]);
949 printf(
"%3i Yl %7.3f | %10.3f || ",i, mYlocal[i], g.Ylocal()[i]);
950 printf(
"Phi %9.6f | %9.6f",mPhi[i], g.Phi()[i]);
955 else printf(
"<W> You compare geometry for different detector %i != %i \n",
956 mDetector, g.mDetector);
959 Float_t StEmcGeom::relativeError(Float_t a, Float_t b)
const
961 Float_t sum = fabs(a) + fabs(b), perr;
962 if(sum == 0.0)
return 0.0;
964 perr = 200.*fabs(a-b)/sum;
970 StEmcGeom::printError(Float_t err)
const
972 if(err>perr) {LOG_INFO << Form(
" | perr=%6.3f%% ",err) << endm;}
973 else {LOG_INFO <<
" " << endm; }
977 StEmcGeom::getGeantGeometryTable()
986 mChain = StMaker::GetChain();
988 if(mChain) mGeantGeom = mChain->GetDataSet(
".const/geom");
993 mCalg = (St_calb_calg *) mGeantGeom->
Find(
"calb_calg");
994 if(mCalg && mCalg->GetNRows()) {
995 mCalg_st = mCalg->GetTable();
996 printf(
"calb_calr get from Geant::");
997 for(Int_t i=0;i<2;i++) printf(
" Barrel %i Angle shift %6.0f ", i+1, mCalg_st->shift[i]);
999 mCalr = (St_calb_calr *) mGeantGeom->
Find(
"calb_calr");
1000 if(mCalr) mCalr_st = mCalr->GetTable();
1003 if(!mCalg_st || !mCalr_st) {
1004 mMode.Append(
" : No table");
1005 LOG_INFO << Form(
"StEmcGeom::getGeantGeometryTable() could not find geom") << endm;
1006 LOG_INFO << Form(
"StEmcGeom::getGeantGeometryTable() create own calb_calg/r") << endm;
1007 mCalg =
new St_calb_calg(
"calg", 1);
1008 mCalr =
new St_calb_calr(
"calr", 1);
1009 mCalg_st = mCalg->GetTable();
1010 mCalr_st = mCalr->GetTable();
1015 mCalg_st[0].shift[0]=75.0;
1016 mCalg_st[0].shift[1]=105.0;
Int_t getBin(const Float_t phi, const Float_t eta, Int_t &m, Int_t &e, Int_t &s) const
virtual TDataSet * Find(const char *path) const