8 #include "StEmcUtil/StEmcGeom.h"
11 void tgeom(
const Int_t det=1);
12 Int_t tg1(
const Int_t
id);
13 Int_t tg2(
const Int_t det=1,
const Int_t
id=0);
15 void tg4(
const Int_t det=1,
const Int_t m1=1,
const Int_t m2=120);
22 tgeom(
const Int_t det)
24 if(strlen(gSystem->GetLibraries(
"*StEmcUtil.so",
"D")) == 0){
25 gROOT->ProcessLine(
".x Load.C");
26 gSystem->Load(
"StEmcUtil.so");
40 ret = geom->
getBin(
id,m,e,s);
43 printf(
" id %4i => m %3i e %2i s %i \n",
id, m, e, s);
50 tg2(
const Int_t det,
const Int_t
id)
55 Int_t m,e,s, idW, id1, id2;
62 case 2: {id1=1; id2=4800;
break;}
64 case 4: {id1=1; id2=18000;
break;}
70 for(Int_t i=id1; i<=id2; i++){
71 Int_t ret = geom->
getBin(i,m,e,s);
73 Int_t retW = geom->getId(m,e,s,idW);
77 printf(
" bad case %i | id %4i : %4i => m %3i e %2i s %i \n"
78 ,ibad, i, idW, m, e, s);
81 else {printf(
" Something wrong \n");
return 0;}
86 if(ibad) printf(
" Detector %i Bad case %i \n", det, ibad);
87 else printf(
" Detector %i => No Errors \n", det);
98 for(det=1; det<=4; det++){
100 Int_t ret = geom->
getBin(
id,m,e,s);
101 if(ret == 0) printf(
" det %i id %i => m %i e %i s %i \n",
107 tg4(
const Int_t det,
const Int_t m1,
const Int_t m2)
114 Int_t mw, ew, sw, ier1=0, ier2=0;
116 for(Int_t m=m1; m<=m2; m++){
117 for(Int_t e=1; e<=geom->NEta(); e++){
118 for(Int_t s=1; s<=geom->NSub(); s++){
119 if(geom->getEta(m,e,eta)==0&&geom->getPhi(m,s,phi)==0){
120 geom->
getBin(phi,eta, mw,ew,sw);
121 if(m!=mw || e!=ew || s!=sw) {
123 printf(
"<E> %5i | m %i=>%i e %i=>%i s %i=>%i phi %f eta %f \n",
124 ier2, m,mw, e,ew, s,sw, phi,eta);
129 printf(
"<E> %5i | something wrong m %i e %i s %i\n", ier1, m,e,s);
134 printf(
" For Detector %i ",det);
135 if(ier1==0 && ier2==0) printf(
" => No Errors \n");
136 else printf(
" #Error1 %i #Error2 %i\n", ier1, ier2);
Int_t getBin(const Float_t phi, const Float_t eta, Int_t &m, Int_t &e, Int_t &s) const