#define gmtod GMTOD #define gdtom GDTOM #define gufield GUFIELD #include using std::cout; using std::endl; #include #include #include #include "PamVMCFieldMgr.h" extern "C"{ void gmtod_(Float_t* , Float_t* , Int_t& ); void gdtom_(Float_t* , Float_t* , Int_t& ); void gufield_(Float_t*, Float_t*); } void gmtod_(Float_t* a, Float_t* b, Int_t& c){ Double_t master[3]; Double_t local[3]; for (Int_t i=0; i<3; ++i) master[i] = (Double_t) a[i]; Double_t * m = &master[0]; Double_t * l = &local[0]; gGeoManager->cd(gMC->CurrentVolPath()); gGeoManager->MasterToLocal(m,l); for (Int_t i=0; i<3; ++i) b[i] = (Float_t)local[i]; c=c; } void gdtom_(Float_t* a, Float_t* b, Int_t& c){ Double_t master[3]; Double_t local[3]; for (Int_t i=0; i<3; ++i) local[i] = (Double_t)a[i]; Double_t * m = &master[0]; Double_t * l = &local[0]; gGeoManager->cd(gMC->CurrentVolPath()); gGeoManager->LocalToMaster(l,m); for (Int_t i=0; i<3; ++i) b[i] = (Float_t)master[i]; c=c; } void gufield_(Float_t *x, Float_t *b){ PamVMCFieldMgr::Instance()->Field(x,b); } //#endif //ROOT_TGeant3f77