10 #include "StarClassLibrary/StThreeVectorF.hh"
11 #include "StEvent/StMeasuredPoint.h"
12 #include "StEvent/StHit.h"
13 #include "StEmcUtil/StEmcMath.h"
14 #include "StEmcUtil/StSmdDaqUtil.h"
16 #include "StEmcUtil/emcInternalDef.h"
17 #include "StDetectorId.h"
27 if(strlen(gSystem->GetLibraries(
"*StEmcUtil.so",
"D")) == 0){
28 gROOT->ProcessLine(
".x Load.C");
29 gSystem->Load(
"StEmcUtil.so");
39 printf(
" For vector => eta %f phi %f\n",v1.pseudoRapidity(),v1.phi());
40 hit1 =
new StHit(v1,ve,0,0,0);
43 for(Int_t z=-50; z<=50; z+=10){
45 hit2 =
new StHit(vzero,ve,0,0,0);
46 Bool_t tmp = StEmcMath::etaPhi(hit1,hit2, eta,phi);
47 printf(
" For StEmcMath : z %5.1f eta %f phi %f => %i \n", z, eta, phi,tmp);
55 UInt_t id, idw; StDetectorId stId=0;
56 cout<<
" Check local to STAR \n";
57 for(
id=0;
id<=9;
id++){
58 stId = StEmcMath::detectorId(
id);
59 if(stId) cout<<
" Local Emc Id "<<
id<<
" => Star Id "<<UInt_t(stId)<<endl;
60 else cout<<
" Wrong local Emc Id "<<
id<<endl;
63 cout<<
"\n Check STAR to local\n";
64 for(idw=7; idw<=17; idw++){
65 stId = StDetectorId(idw);
66 id = StEmcMath::detectorId(stId);
67 if(
id) cout<<
" Star Id "<<UInt_t(stId)<<
" => Local Emc Id "<<
id<<endl;
68 else cout<<
" Wrong Star Id "<<UInt_t(stId)<<endl;
78 for(Int_t con=1; con<=3; con++){
79 for(Int_t pin=1; pin<=50; pin++){
80 if(StSmdDaqUtil::getBsmdeCell(con,pin,e)){
81 printf(
" Bsmde con %1i pin %2i => e %3i ",con,pin,e);
82 if(StSmdDaqUtil::getBsmdpCell(con,pin,e,s))
83 printf(
" Bsmdp => e %2i s %2i\n",e,s);